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
Merge pull request #1563 from crbnos/feat/active-pieces-integration
Anshul sharma4ec5b10a74cf
diff --git a/.ai/lessons.md b/.ai/lessons.mdindex f854958267..91e72bb676 100644--- a/.ai/lessons.md+++ b/.ai/lessons.md@@ -1353,6 +1353,31 @@ any new `memo` writer.**Applies to:** `apps/erp/app/root.tsx` (and `apps/mes/app/root.tsx`) loader `env` objects, `packages/env/src/index.ts` `getBrowserEnv()`, any `window.env`-gated integration/feature flag.+## Secret material is read through ONE reader — never off a column++**Context:** After `20260817132607` moved integration tokens into the Vault, three readers kept+reading `companyIntegration.metadata.access_token` directly (`send-slack.ts`, `integrations.slack.interactive.ts`,+`notify.ts`). They did not fail — they got `undefined`, fell back or returned `[]`, and Slack DMs /+slash commands silently stopped for weeks. When Slack later moved to `integrationConnection`+(`20261026151304`), the same class of miss happened again with `notify.ts` because the consumer map+was built from module exports, not from a grep of the column.++**Rule:** A credential has exactly one reader (`resolveIntegrationSecrets` for `companyIntegration`,+`readConnectionAccessToken` / `resolveConnectionAuth` for `integrationConnection`). Before changing+where a secret lives, grep for the *column and id* (`"companyIntegration"` + `"slack"`,+`metadata.access_token`, `secretRef`) across `apps/` and `packages/`, not for function names — and+make the old path fail loudly (throw) rather than return `undefined`.++**Applies to:** every `companyIntegration` / `integrationConnection` reader; any future secret move.++## `.po` catalogs are committed only after `lingui:clean`++**Context:** `pnpm run lingui:extract` alone leaves `#: path:line` origin comments and a+`POT-Creation-Date` header in all 26 catalogs — 170k diff lines for ~30 real strings.++**Rule:** always `pnpm run lingui:extract && pnpm run lingui:clean` (or `pnpm run translate`);+the commit hook normalises, but the working tree should never carry the noise.+## Kysely builds ONE column list per multi-row insert — a conditionally-set key writes NULL into its siblings**Context:** `get-method`'s `quoteLineToJob` builds every `jobMaterial` row into one array, then inserts them with a single `trx.insertInto("jobMaterial").values(rows)`. Only rows whose item had an effective supersession successor carried a `unitCost` key; the rest omitted it, on the assumption that omitting a key lets the column default apply.@@ -1413,6 +1438,26 @@ any new `memo` writer.**Applies to:** `packages/jobs/src/scripts/**`, `packages/database/src/{seed,check}-*.ts`, `ci/src/**`, and any new `tsx`-run script in a CJS-rooted package.+## Compare OAuth scopes the way the vendor REPORTS them, not the way you asked++**Context:** The Gmail allowlist row requested `["…/auth/gmail.send", "email"]`, the spelling+the Activepieces piece uses. Google's token response came back with+`openid …/auth/gmail.send …/auth/userinfo.email` — the alias canonicalised, an unrequested+`openid` added. `missingScopes(granted, required)` reported `email` missing and the account+showed "Reconnect needed" the second it connected. Google Calendar's piece has the same alias+and was never caught only because its first connections predate scope recording.++**Rule:** Every scope in an allowlist row (and anything else that feeds `requiredScopesFor`)+is spelled exactly as the vendor echoes it in the token response — for Google the full+`https://www.googleapis.com/auth/…` URL. When a piece's own list uses an alias, override+`oauth.scope` with the canonical form (same set of permissions). `oauth.test.ts` refuses+`email` / `profile` / `openid` on any row. When a "reconnect needed" appears on a freshly+connected account, diff `metadata.scopes` against `requiredScopesFor` before anything else.++**Applies to:** `packages/jobs/src/workflows/integrations/allowlist.ts` `oauth.scope`,+`packages/ee/src/integrations/connections.ts` `missingScopes`, any future vendor whose token+response normalises scope names (Microsoft returns short names for Graph scopes too).+## `CREATE OR REPLACE VIEW` cannot reorder columns — DROP + CREATE when `t.*` grows**Context:** The work-center batch-capacity migration added `batchCapacity`/`minimumBatchQuantity` to `workCenter` and re-declared the `workCenters` view (which selects `wc.*` before aliased join columns like `locationName`) with `CREATE OR REPLACE VIEW`.@@ -4049,6 +4094,26 @@ The write was then removed (nothing reads it), so the rail always starts collaps**Applies to:** `postReceipt` / `postShipment` and every posting in `inventory.service.ts` that builds update maps before its write loop.+## Open an OAuth popup in the click, before you fetch its URL++**Context:** Install and Add account on a workflow piece card (`startIntegrationConnect`, `packages/ee/src/integrations/connect.ts`) fetch the consent URL from the connect route, then open it in a popup.++**Problem:** The old code awaited the fetch and then called `window.open`. The await can outlive the click's transient user activation, so Chrome blocked the popup without an error, and Install looked like it did nothing.++**Rule:** Call `beginOAuthPopup()` (`packages/ee/src/oauth-popup.ts`) synchronously in the click handler, before any await. Then fetch the URL and call `navigate(url)` on the handle. If the fetch fails, call `close()`. If the browser blocked the popup anyway, `navigate` falls back to the current window.++**Applies to:** every consent or payment flow that opens a window after a request: the piece cards, the Onshape connect, any new OAuth integration.++## One OAuth state mechanism: the cookie helper, consumed by value for a shared callback++**Context:** The workflow pieces (Slack, Gmail, Google Calendar) signed their own OAuth state with an HMAC helper in `settings.service.ts`, beside the cookie-bound state that every other integration uses (`@carbon/auth/oauth-state.server`).++**Problem:** Two mechanisms meant two sets of binding, expiry and single-use rules to keep correct, and a review had to check both. The pieces share one callback route, so that route cannot know which integration's entry to consume before it reads the state.++**Rule:** Issue every OAuth state with `issueOAuthState`. Carry extra facts (`mode`, `name`, `connectionId`) as `OAuthStateExtras`, never in the query string. Pass the request, so the other integrations' pending entries survive the Set-Cookie. A callback that serves several integrations calls `consumeOAuthStateByValue`; it finds the entry that holds the value and takes the integration id from that entry. Do not add a second signer.++**Applies to:** `api+/integrations.connections.$piece.connect.ts`, `api+/integrations.connections.callback.ts`, `api+/integrations.$id.connect.ts`, and any new OAuth connect or callback route.+## A header and the get-method copy into it share one transaction**Context:** New Version on a make method inserted the `makeMethod` header through supabase-js, set the source version Active, then ran get-method's `makeMethodToMakeMethod` copy, which opened its own Kysely transaction. A version change notice and the Onshape panel's Draft did the same in their own code.diff --git a/.ai/plans/2026-08-27-workflow-integration-node.md b/.ai/plans/2026-08-27-workflow-integration-node.mdnew file mode 100644index 0000000000..7893dd247b--- /dev/null+++ b/.ai/plans/2026-08-27-workflow-integration-node.md@@ -0,0 +1,168 @@+# Integrations as a first-class node + vendor config by table++Follow-on to `.ai/plans/2026-08-27-workflow-integrations.md`, which shipped Google Calendar+as an `action` node. Two changes, in this order:++- **A.** Per-vendor facts move out of shared code into the allowlist, so adding a vendor+ edits no shared file.+- **B.** `integration` becomes its own workflow node type with its own catalog, so the+ action path stops carrying a piece concept at all.++Both are prerequisites for adding 5–7 more vendors without repeating the same edits per+vendor. Nothing here is customer-visible on an existing workflow: the feature has not+shipped, so no stored definition contains an integration step.++## Decisions taken++1. **Integration steps leave `WORKFLOW_ACTION_CATALOG`** and get their own generated+ catalog. The action count returns to 16 and the action picker stops listing+ "Google Calendar: Create Event".+2. **One `Integration` palette entry**, not one per vendor. The vendor and its step are+ chosen inside the node, so the palette stays a fixed list of six kinds however many+ vendors exist.+3. **No format-version bump and no data migration.** Adding a node variant leaves every+ stored v3 document valid. Integration steps saved on a developer's local database+ during the first pass keep parsing but reference an action id the catalog no longer+ has, so they surface as a normal validation issue — re-create those few test nodes.+ If we ever ship an integration action node before B lands, this decision reverses and+ a v3 → v4 migration is required.+4. **API-key pieces stay unsupported** and are commented as such, not worked around.++## What is true today (grounded)++- Node kinds are `trigger | condition | compute | lookup | filter | action`+ (`packages/workflows/src/definition/schema.ts`), one `z.literal` variant each.+- Each kind has exactly one executor in `packages/workflows/src/runtime/`, registered in+ `runtime/executors.ts`. A kind with no entry refuses to execute — that is how `trigger`+ is recorded but never run.+- What an `action` node can DO is the 18-entry action catalog; the per-action+ implementations live in `packages/jobs/src/workflows/actions/`, including the existing+ `integration.ts` executor.+- The builder mirrors the kind list in five exhaustive+ `Record<WorkflowNodeType, …>` maps — `nodes/index.ts` (`nodeTypes`), `nodes/meta.ts`+ (`NODE_KIND_META`), and `nodes/kinds.ts` (`NODE_CARD_WIDTH`, `NODE_CARD_HEIGHT`,+ `NODE_ACCEPTS_INCOMING`) — plus one form per kind in `config/forms/`.+ **These five maps are the work list**: adding the type makes TypeScript name every one.+- `workflowStepRun."nodeType"` is plain `TEXT` (`20260810100100_workflows-foundation.sql`),+ so a new kind needs no migration.+- Per-vendor code lives in exactly three places today, all `google-calendar`-shaped:+ `oauthCredentials` in `packages/jobs/src/workflows/integrations/oauth.ts`, the direct+ `GOOGLE_OAUTH_*` reads in `apps/erp/app/routes/api+/integrations.connections.$piece.connect.ts`,+ and `accountLabelFor` in `apps/erp/app/routes/api+/integrations.connections.callback.ts`.++---++## Workstream A — vendor facts by table++Small, self-contained, no behaviour change for Google Calendar. Do it first: B is easier+to review when no vendor names are left in shared code.++- [x] **A1.** Extend `AllowlistEntry` in `integrations/allowlist.ts` with the vendor's own+ configuration: the NAMES of its three env vars (`clientIdEnv`, `clientSecretEnv`,+ `redirectUrlEnv`) and an optional `accountLabel` describing how to read back which+ account was connected (`{ url, field }` — Google's is+ `https://www.googleapis.com/oauth2/v2/userinfo` / `email`). Names, not values: the+ allowlist is imported by build-time scripts and must stay free of secrets.+- [x] **A2.** Add `resolveOAuthEnv(entry)` to `integrations/oauth.ts` reading+ `process.env` by those names, and delete the `if (pieceName === "google-calendar")`+ branch. Keep the existing refusal — `No OAuth app is configured for ${pieceName}.` —+ so an unconfigured server still fails loudly rather than half-working.+- [x] **A3.** Point the connect route at the same resolver instead of reading+ `GOOGLE_OAUTH_CLIENT_ID` / `GOOGLE_OAUTH_REDIRECT_URL` directly.+- [x] **A4.** Make `accountLabelFor` read `entry.accountLabel` and drop its+ `if (pieceName !== "google-calendar") return null;`. Stays best-effort: a failure+ here must never lose a connection that already authorized.+- [x] **A5.** The settings card still needs a client id in the BROWSER to decide+ "Coming soon". `getBrowserEnv()` is a fixed list, so a per-vendor env var cannot be+ looked up dynamically there. Add each new vendor's client id to `getBrowserEnv()` and+ to the `Window.env` declaration when it is added — call this out in the checklist+ rather than inventing a dynamic mechanism.+- [x] **A6.** Comment `PIECE_ALLOWLIST` and `getPieceOAuth2Auth` with the v1 auth limit:+ **only OAuth2 pieces are supported**; a piece whose auth is `SECRET_TEXT`,+ `BASIC_AUTH` or `CUSTOM_AUTH` is refused by `UnsupportedPieceAuthError` and needs its+ own design (an API-key entry form, no callback, no refresh). Say why, so the next+ developer does not read it as an oversight.+- [x] **A7.** Add every integration env var that is currently undocumented to+ `.env.example` — `XERO_*`, `QUICKBOOKS_*`, `JIRA_*`, `ONSHAPE_*`, `SLACK_*`,+ `LINEAR_*`. Today only `SLACK_BOT_TOKEN` and `GOOGLE_OAUTH_*` are listed, so the rest+ are undiscoverable without reading `packages/env/src/index.ts`.++**Verify A:** `pnpm --filter @carbon/jobs test`, `pnpm exec turbo run typecheck --filter=@carbon/jobs --filter=erp`,+and connect Google Calendar end to end — the flow must be byte-identical to today.++---++## Workstream B — `integration` as its own node type++### B1. Definition and catalog++- [x] Add the `integration` variant to `definition/schema.ts`:+ `{ type: "integration", data: { piece, action, inputs } }`. The connection stays an+ ordinary input (`connectionId`) so the generic options provider keeps serving it.+ No `formatVersion` bump (decision 3).+- [x] New `CatalogIntegration` type + `WORKFLOW_INTEGRATION_CATALOG`, generated into+ `packages/workflows/src/catalog/integrations.generated.ts` by the SAME+ `buildPieceActionDeclarations()`, and merged by neither generator into the actions map.+ `scripts/generate-workflow-catalog.ts` and `scripts/check-workflow-catalog.ts` both+ stop merging pieces into `WORKFLOW_ACTIONS` and start emitting/checking the new file.+ Expect the reported counts to go `18 actions` → `16 actions, 2 integration steps`.+- [x] Delete the `piece` field from `ActionDeclarationLike` / `BuiltAction` and the+ `route.piece` branch from `getActionRoute`. If TypeScript still finds a piece concept+ on the action path after this step, the split is not done.+- [x] Extract the shared "validate inputs against a catalog entry" logic in+ `definition/validate.ts` so the integration node reuses it rather than growing a+ second copy — required inputs, type match, `dependsOn` sanity.++### B2. Runtime++- [x] New `packages/workflows/src/runtime/integration.ts` (`integrationExecutor`),+ registered in `runtime/executors.ts`. `permission()` returns `workflows_update`, the+ same gate the catalog entry carries today.+- [x] It resolves inputs, then delegates through `ctx.services` to the existing+ `packages/jobs/src/workflows/actions/integration.ts` — which keeps its two-client+ token read UNCHANGED (owner's client for the tenancy check, service role for the+ vault). That code is the security boundary; this workstream must not touch it.+- [x] `engine/execute.ts` and `engine/walk.ts` write `nodeType: "integration"` on the step+ row. No DB change (`nodeType` is TEXT).+- [x] Remove the `route.piece` dispatch from `actions/services.ts`, since nothing reaches+ it through an action any more.++### B3. Builder++- [x] Five exhaustive maps: `nodeTypes`, `NODE_KIND_META` (plug icon, name, description),+ `NODE_CARD_WIDTH`, `NODE_CARD_HEIGHT`, `NODE_ACCEPTS_INCOMING` (true). TypeScript+ names each one — work through the errors rather than searching.+- [x] New `config/forms/IntegrationNodeForm.tsx` — deliberately NOT `IntegrationForm`,+ which is the settings drawer's component. Vendor picker → step picker → the same+ `OptionsField` / `ValueField` inputs the action form already renders. Changing the+ vendor clears the step and the inputs, the same way changing the action does.+- [x] Register it in `config/forms/index.ts`, and add the label keys+ (`labelKeys.ts` `isDefaultNodeName` / `nodeTitle`) so a new node reads+ `integration_0` and the card names the vendor and step.+- [x] Check the node-type branches in `ports.ts`, `selectors.ts`, `store.ts`,+ `WorkflowNodeCard.tsx` and `definition/order.ts` — most are trigger-vs-rest and need+ nothing, but each must be READ rather than assumed.++### B4. Run history++- [x] `ui/Runs/WorkflowRunSteps.tsx` and `useNodeLabel.ts` learn the kind, so a step reads+ "Google Calendar: Create event" and not a raw id. `topologicalNodeOrder` is+ type-agnostic apart from the trigger and should need nothing — confirm.++**Verify B:** regenerate + check the catalog, `typecheck` across `@carbon/workflows`,+`@carbon/jobs`, `@carbon/ee`, `erp`, all four test suites, `biome check` on changed files.+Then in a browser: drop an Integration node, pick Google Calendar, pick the connection, pick+a calendar, test-run it, and confirm the run-history step row names it correctly.++---++## Risks++- **The five `Record<WorkflowNodeType, …>` maps are the whole risk surface in the builder,+ and TypeScript catches every one.** The genuinely uncatchable part is the branch-on-type+ code in B3's last item, which compiles fine while silently treating an integration node+ as "some other kind".+- **Do not let B touch the token path.** The tenancy check + service-role vault read in+ `actions/integration.ts` is the security boundary; it moves callers, not contents.+- Catalog counts appear in `.claude/rules/workflow-actions.md` and+ `workflow-event-catalog.md` and will need updating with the 18 → 16 change.diff --git a/.ai/plans/2026-08-27-workflow-integrations.md b/.ai/plans/2026-08-27-workflow-integrations.mdnew file mode 100644index 0000000000..ebdf04fc6e--- /dev/null+++ b/.ai/plans/2026-08-27-workflow-integrations.md@@ -0,0 +1,793 @@+# Third-party integration steps in Workflows (Activepieces-backed) — implementation plan++**Spec / source:** `.ai/specs/2026-08-27-workflow-integrations.md`+**Research:** `.ai/research/activepieces-integrations.md`, `.ai/research/workflows-catalog-refresher.md`+**Branch:** `feat/active-pieces-integration`++Scope of v1: one piece (Google Calendar), OAuth2 only, actions only, several named+connections per company. Everything else is listed under Non-goals in the spec.++## Progress++- [x] Task 1: Migration — `integrationConnection` table, RLS, vault RPCs+- [x] Task 2: Regenerate database types+- [x] Task 3: Add Google OAuth env vars+- [x] Task 4: Add the pinned piece dependency, allowlist and registry loader+- [x] Task 5: Piece property ⇄ Carbon value-type mapping+- [x] Task 6: Teach the catalog the `piece` route block+- [x] Task 7: Fifth generator input — emit piece actions+- [x] Task 8: Connections service (CRUD + fresh-token resolution)+- [x] Task 9: OAuth connect and callback routes+- [x] Task 10: Settings → Integrations connections panel+- [x] Task 11: The integration action executor+- [x] Task 12: Smart-dropdown options endpoint+- [x] Task 13: Builder — connection picker and dynamic options+- [x] Task 14: End-to-end verification — run log at `.ai/runs/2026-08-27-workflow-integrations.md`. Every automated gate passes; every BROWSER criterion is unverified pending a Google Cloud OAuth app.++## Dependencies++```+1 → 2 → 3+4 → 5 → 6 → 7 (5 and 6 are independent of each other; both need 4)+2 + 4 → 8 → 9 → 10+7 + 8 → 11+8 + 5 → 12 → 13+everything → 14+```++Tasks 5 and 6 may run in parallel. Tasks 9–10 and 11 may run in parallel once 8 lands.++---++## Task 1: Migration — `integrationConnection` table, RLS, vault RPCs++**Depends on:** none++**Files:**+- Create: `packages/database/supabase/migrations/<timestamp>_workflow-integration-connections.sql` (created by the command below)+- Copy from (precedent): `packages/database/supabase/migrations/20260817122916_integration-secret-vault.sql` (the three vault RPCs + the delete trigger) and `packages/database/supabase/migrations/20250201181148_rls-refactor.sql` lines 719–760 (the `companyIntegration` RLS policy shape)++**Steps:**++1. Create the migration file:+ ```bash+ pnpm db:migrate:new workflow-integration-connections+ ```+2. Write the table. `id('icn')` follows the repo's prefixed-id convention; the composite+ primary key `("id", "companyId")` is mandatory for every Carbon table.+ ```sql+ CREATE TABLE "integrationConnection" (+ "id" TEXT NOT NULL DEFAULT id('icn'),+ "companyId" TEXT NOT NULL,+ "pieceName" TEXT NOT NULL,+ "name" TEXT NOT NULL,+ "authType" TEXT NOT NULL DEFAULT 'OAUTH2',+ "accountLabel" TEXT,+ "metadata" JSONB NOT NULL DEFAULT '{}',+ "secretRef" TEXT,+ "expiresAt" TIMESTAMP WITH TIME ZONE,+ "refreshingAt" TIMESTAMP WITH TIME ZONE,+ "status" TEXT NOT NULL DEFAULT 'Active',+ "lastError" TEXT,+ "createdBy" TEXT NOT NULL REFERENCES "user"("id"),+ "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),+ "updatedBy" TEXT REFERENCES "user"("id"),+ "updatedAt" TIMESTAMP WITH TIME ZONE,+ CONSTRAINT "integrationConnection_pkey" PRIMARY KEY ("id", "companyId"),+ CONSTRAINT "integrationConnection_companyId_fkey" FOREIGN KEY ("companyId")+ REFERENCES "company"("id") ON DELETE CASCADE ON UPDATE CASCADE,+ CONSTRAINT "integrationConnection_status_check"+ CHECK ("status" IN ('Active', 'Expired', 'Revoked')),+ CONSTRAINT "integrationConnection_name_unique" UNIQUE ("companyId", "pieceName", "name")+ );++ CREATE INDEX "integrationConnection_companyId_pieceName_idx"+ ON "integrationConnection" ("companyId", "pieceName");+ ```+3. Add RLS, copying the `companyIntegration` policy shape verbatim and only changing the table+ name — same `settings_view` / `settings_create` / `settings_update` / `settings_delete` gates:+ ```sql+ ALTER TABLE "integrationConnection" ENABLE ROW LEVEL SECURITY;++ CREATE POLICY "SELECT" ON "public"."integrationConnection"+ FOR SELECT USING (+ "companyId" = ANY ((SELECT get_companies_with_employee_permission ('settings_view'))::text[])+ );++ CREATE POLICY "INSERT" ON "public"."integrationConnection"+ FOR INSERT WITH CHECK (+ "companyId" = ANY ((SELECT get_companies_with_employee_permission ('settings_create'))::text[])+ );++ CREATE POLICY "UPDATE" ON "public"."integrationConnection"+ FOR UPDATE USING (+ "companyId" = ANY ((SELECT get_companies_with_employee_permission ('settings_update'))::text[])+ );++ CREATE POLICY "DELETE" ON "public"."integrationConnection"+ FOR DELETE USING (+ "companyId" = ANY ((SELECT get_companies_with_employee_permission ('settings_delete'))::text[])+ );+ ```+4. Add three vault RPCs. The existing `upsert_integration_secret` / `get_integration_secret` /+ `delete_integration_secret` are hard-wired to the `companyIntegration` table and its+ `'integration:' || companyId || ':' || id` secret name, so they cannot be reused. Mirror them+ exactly against the new table, with the secret name prefix `connection:`:+ ```sql+ CREATE OR REPLACE FUNCTION upsert_connection_secret(p_company_id text, p_connection_id text, p_secret jsonb)+ RETURNS text LANGUAGE plpgsql SECURITY DEFINER SET search_path = public, vault AS $$+ DECLARE+ v_name text := 'connection:' || p_company_id || ':' || p_connection_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 connection secret');+ ELSE+ PERFORM vault.update_secret(v_id, p_secret::text);+ END IF;+ UPDATE "integrationConnection" SET "secretRef" = v_id::text+ WHERE "companyId" = p_company_id AND "id" = p_connection_id;+ RETURN v_id::text;+ END $$;++ CREATE OR REPLACE FUNCTION get_connection_secret(p_company_id text, p_connection_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 "integrationConnection"+ WHERE "companyId" = p_company_id AND "id" = p_connection_id;+ IF v_ref IS NULL THEN RETURN NULL; END IF;+ 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_connection_secret(p_company_id text, p_connection_id text)+ RETURNS void LANGUAGE plpgsql SECURITY DEFINER SET search_path = public, vault AS $$+ BEGIN+ DELETE FROM vault.secrets+ WHERE name = 'connection:' || p_company_id || ':' || p_connection_id;+ UPDATE "integrationConnection" SET "secretRef" = NULL+ WHERE "companyId" = p_company_id AND "id" = p_connection_id;+ END $$;+ ```+5. Add the delete trigger so a deleted row does not strand its vault secret (vault does not+ cascade), copying `drop_integration_secret_on_delete` from the precedent migration:+ ```sql+ CREATE OR REPLACE FUNCTION drop_connection_secret_on_delete()+ RETURNS trigger LANGUAGE plpgsql SECURITY DEFINER SET search_path = public, vault AS $$+ BEGIN+ DELETE FROM vault.secrets+ WHERE name = 'connection:' || OLD."companyId" || ':' || OLD.id;+ RETURN OLD;+ END $$;++ CREATE TRIGGER "integrationConnection_drop_secret"+ AFTER DELETE ON "integrationConnection"+ FOR EACH ROW EXECUTE FUNCTION drop_connection_secret_on_delete();+ ```+6. Grant execute on the three RPCs to `service_role` only, matching the precedent migration's+ grant block. Read that block and copy its exact form — do NOT grant to `authenticated`.+7. Apply it:+ ```bash+ pnpm db:migrate+ ```++**Verify:**+```bash+pnpm db:migrate+# Expected: the migration applies with no error.+```+Then confirm the RPCs exist and the table is protected — run in your local database:+```sql+SELECT proname FROM pg_proc+ WHERE proname IN ('upsert_connection_secret','get_connection_secret','delete_connection_secret');+-- Expected: 3 rows.+SELECT relrowsecurity FROM pg_class WHERE relname = 'integrationConnection';+-- Expected: t+```++**Out of scope:** any change to `companyIntegration`, its RPCs, or its policies. The 12 existing+integrations must keep working untouched.++> If `get_companies_with_employee_permission` or the `id()` function is not present in this+> database, STOP and report — do not invent a substitute.++---++## Task 2: Regenerate database types++**Depends on:** Task 1++**Files:**+- Modify (generated): `packages/database/src/types.ts`, `packages/database/supabase/functions/lib/types.ts`++**Steps:**+1. Run the generator. This must happen before any typecheck that touches the new table —+ `@carbon/database` types are generated, never hand-edited.+ ```bash+ pnpm run generate:types+ ```+2. Commit the regenerated files alongside the migration.++**Verify:**+```bash+grep -c "integrationConnection" packages/database/src/types.ts+# Expected: a number greater than 0.+```++**Out of scope:** hand-editing any generated type. If the table is missing from the output, the+migration did not apply — go back to Task 1.++---++## Task 3: Add Google OAuth env vars++**Depends on:** none (do it alongside Task 1)++**Files:**+- Modify: `packages/env/src/index.ts` — add three exports+- Copy from (precedent): the `ONSHAPE_CLIENT_ID` declaration at `packages/env/src/index.ts:252`++**Steps:**+1. Add, following the exact `getEnv(...)` shape used by `ONSHAPE_CLIENT_ID` immediately above:+ `GOOGLE_OAUTH_CLIENT_ID`, `GOOGLE_OAUTH_CLIENT_SECRET`, `GOOGLE_OAUTH_REDIRECT_URL`.+2. Mark them optional in the same way Onshape's are, so a developer without Google credentials+ can still boot the app. A piece whose credentials are absent must be listed as unavailable+ rather than crashing the Integrations page (handled in Task 10).+3. Add the three names to `.env.example` if that file exists at the repo root, with empty values+ and a comment pointing at the Google Cloud Console.++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=@carbon/env+# Expected: no errors.+```++**Out of scope:** committing any real credential value. Never put a client secret in the repo.++---++## Task 4: Add the pinned piece dependency, allowlist and registry loader++**Depends on:** none++**Files:**+- Modify: `packages/jobs/package.json` — add the dependency, pinned exactly+- Create: `packages/jobs/src/workflows/integrations/allowlist.ts`+- Create: `packages/jobs/src/workflows/integrations/registry.ts`+- Create: `packages/jobs/src/workflows/integrations/registry.test.ts`++**Steps:**+1. Add the dependency with an **exact** version — no `^`, no `~`. The spec's Design Decisions+ require exact pins so an upstream release cannot silently change executed code:+ ```bash+ pnpm --filter @carbon/jobs add @activepieces/[email protected]+ ```+ Then edit `packages/jobs/package.json` to make sure the recorded range is the bare string+ `"0.10.3"`, not `"^0.10.3"`.+2. Write `allowlist.ts` — the single hand-written declaration of what we expose:+ ```ts+ export interface AllowlistEntry {+ package: string;+ version: string;+ label: string;+ actions: readonly string[];+ }++ export const PIECE_ALLOWLIST: Record<string, AllowlistEntry> = {+ "google-calendar": {+ package: "@activepieces/piece-google-calendar",+ version: "0.10.3",+ label: "Google Calendar",+ actions: [+ "create_google_calendar_event",+ "google_calendar_get_events"+ ]+ }+ };++ export type PieceName = keyof typeof PIECE_ALLOWLIST;+ ```+3. Write `registry.ts`. It is the **only** module allowed to import a piece package, so nothing+ else can accidentally pull Node-only code into a browser bundle:+ ```ts+ export async function loadPiece(name: string): Promise<Piece>;+ export async function getPieceAction(name: string, action: string): Promise<PieceAction>;+ export async function getPieceOAuth2Auth(name: string): Promise<OAuth2AuthDeclaration>;+ ```+ - `loadPiece` dynamically imports `PIECE_ALLOWLIST[name].package` and returns the exported+ piece object (for Google Calendar the export is named `googleCalendar`; find the export by+ picking the first value that has both `auth` and an `actions()` function, so a differently+ named export in a future piece still resolves).+ - `getPieceAction` throws a named error when the action is not in that entry's `actions` list —+ the allowlist, not the piece, decides what we expose.+ - `getPieceOAuth2Auth` handles `piece.auth` being an **array** (Google Calendar exposes+ `['OAUTH2', 'CUSTOM_AUTH']`) and returns the `OAUTH2` member, throwing when there is none.+ v1 supports OAuth2 only.+4. Write `registry.test.ts` asserting, against the real installed package: the piece loads;+ `create_google_calendar_event` resolves; a non-allowlisted action name throws;+ `getPieceOAuth2Auth("google-calendar").authUrl === "https://accounts.google.com/o/oauth2/auth"`.++**Verify:**+```bash+pnpm --filter @carbon/jobs test -- registry+# Expected: all tests pass, including the auth URL assertion.+```++**Out of scope:** importing any piece package from `packages/workflows` or from `apps/erp`.+`packages/workflows` compiles for the browser at ES2019 and must never see piece code.++> If `piece.actions()` is not a function on the installed version, STOP and report — the piece+> API has changed since the spike and the mapping in Task 5 needs rechecking.++---++## Task 5: Piece property ⇄ Carbon value-type mapping++**Depends on:** Task 4++**Files:**+- Create: `packages/jobs/src/workflows/integrations/properties.ts`+- Create: `packages/jobs/src/workflows/integrations/properties.test.ts`++**Steps:**+1. Write `toValueType(property)` mapping a piece property to a Carbon `ValueType` from+ `@carbon/workflows` (`t.string`, `t.number`, `t.boolean`, `t.date`, `t.list(...)`). Type+ imports only — never a value import that would drag piece code in. Map:++ | Piece `type` | Carbon type |+ |---|---|+ | `SHORT_TEXT`, `LONG_TEXT` | `t.string` |+ | `NUMBER` | `t.number` |+ | `CHECKBOX` | `t.boolean` |+ | `DATE_TIME` | `t.date` |+ | `ARRAY` | `t.list(t.string)` |+ | `STATIC_DROPDOWN` | `t.string` + `choices` read off `property.options.options` |+ | `DROPDOWN` | `t.string` + a `dynamicOptions: true` marker (resolved at edit time, Task 12) |+ | `MULTI_SELECT_DROPDOWN` | `t.list(t.string)` + the same choices/marker rule |++2. Every other kind (`OBJECT`, `JSON`, `FILE`, `DYNAMIC`, `MARKDOWN`, …) **throws**+ `UnmappablePropertyError` carrying the piece, action and property names. The generator in+ Task 7 turns that into a build failure. A half-described action must never be emitted.+3. Write `toPropsValue(actionProps, inputs)` — the inverse, converting resolved Carbon+ `RuntimeValue`s back into the plain object a piece's `run()` expects. A date becomes an ISO+ string; a list becomes a plain array; an absent optional input is omitted rather than sent as+ `null` (pieces branch on `undefined`).+4. Write `properties.test.ts` covering: each mapped kind; that `STATIC_DROPDOWN` carries its+ three `send_notifications` choices from the real piece; that `OBJECT` throws with all three+ names in the message; and a `toPropsValue` round-trip for the create-event inputs.++**Verify:**+```bash+pnpm --filter @carbon/jobs test -- properties+# Expected: all tests pass, including the UnmappablePropertyError message assertions.+```++**Out of scope:** supporting `OBJECT`/`JSON`/`FILE`/`DYNAMIC`. They are Non-goals for v1 and must+fail loudly, not degrade.++---++## Task 6: Teach the catalog the `piece` route block++**Depends on:** Task 4++**Files:**+- Modify: `packages/workflows/src/catalog/build.ts` — add `piece` to `BuiltAction`+- Modify: `packages/workflows/src/catalog/catalog.ts` — `getActionRoute` returns it+- Modify: `packages/workflows/src/catalog/catalog.test.ts` — cover the new route+- Copy from (precedent): the existing `call` and `update` route blocks in the same two files++**Steps:**+1. Add to `BuiltAction` an optional `piece?: { name: string; action: string }`, documented in the+ same style as the existing `call` and `update` fields ("Set by the generator; never+ hand-written").+2. Extend `getActionRoute` so it surfaces `piece` alongside `call` and `update`. Routing must stay+ **off the catalog entry**, never off the id's shape — the existing comment in+ `packages/jobs/src/workflows/actions/services.ts` states this rule and it applies here.+3. Add a `catalog.test.ts` case asserting that an action with a `piece` block returns it from+ `getActionRoute`, and that an action without one returns `piece` as `undefined`.+4. Add an `integration` grouping hint so the builder palette can group these separately — reuse+ whatever grouping the palette already reads; if there is none, group on the `integration.`+ id prefix in the palette (Task 13) and add nothing here.++**Verify:**+```bash+pnpm --filter @carbon/workflows test -- catalog+pnpm exec turbo run typecheck --filter=@carbon/workflows+# Expected: all tests pass; no type errors.+```++**Out of scope:** adding a new node type. An integration step is an ordinary `action` node —+`NODE_KINDS` is unchanged, and so is `CURRENT_DEFINITION_FORMAT_VERSION` (still 4).++---++## Task 7: Fifth generator input — emit piece actions++**Depends on:** Tasks 5, 6++**Files:**+- Modify: `scripts/generate-workflow-catalog.ts` — read the allowlist and emit piece actions+- Modify: `scripts/check-workflow-catalog.ts` — keep the staleness check honest+- Modify (generated, committed): `packages/workflows/src/catalog/actions.generated.ts`,+ `labels.generated.ts`, `help.generated.ts`+- Copy from (precedent): the existing `buildCatalog(...)` call in `scripts/generate-workflow-catalog.ts`++**Steps:**+1. In the generator, import `PIECE_ALLOWLIST` and the registry from+ `packages/jobs/src/workflows/integrations/`. The script runs under `tsx` in Node, so importing+ piece code here is fine — this is the one place outside `packages/jobs` that may.+2. For every allowlisted piece and action, emit an entry keyed+ `integration.<pieceName>.<actionName>` (e.g.+ `integration.google-calendar.create_google_calendar_event`) with:+ - `label` — `"<piece label>: <action displayName>"`, e.g. `"Google Calendar: Create Event"`+ - `permission` — `{ module: "workflows", action: "update" }`+ - `inputs` — `connectionId` first (`t.string`, required, label `"connection"`), then one input+ per piece prop via `toValueType`, `required` copied from the prop, `label` from its+ `displayName`+ - `outputs` — `{ result: t.string }` for v1; the piece's own output schema is not mapped+ - `batchable: false`+ - `piece: { name, action }`+3. Emit a `WORKFLOW_LABELS` entry for each new action id, so the builder and the run history name+ the step properly. Labels go in `labels.generated.ts` as `msg``…``` like every other entry.+4. Let `UnmappablePropertyError` propagate — the generator must **exit non-zero** with the piece,+ action and property named, and write no files.+5. Update `scripts/check-workflow-catalog.ts` so the staleness comparison includes the piece+ actions (it rebuilds the catalog and diffs against the committed file; feeding it the same+ fifth input is enough). CI runs this via `.github/workflows/check.yml`, so skipping it makes+ the build red.+6. Regenerate and commit the output:+ ```bash+ pnpm run generate:workflow-catalog+ ```++**Verify:**+```bash+pnpm run generate:workflow-catalog && pnpm run check:workflow-catalog+# Expected: generation succeeds; the check reports no drift.+pnpm exec tsx -e 'import {WORKFLOW_ACTION_CATALOG} from "./packages/workflows/src/catalog/actions.generated"; const a = WORKFLOW_ACTION_CATALOG["integration.google-calendar.create_google_calendar_event"]; console.log(Object.keys(a.inputs).join(","), JSON.stringify(a.piece));'+# Expected: the input list starts with connectionId and includes title and start_date_time,+# and the piece block is {"name":"google-calendar","action":"create_google_calendar_event"}.+```++**Out of scope:** hand-editing any `*.generated.ts` file. Change the generator and re-run.++---++## Task 8: Connections service (CRUD + fresh-token resolution)++**Depends on:** Tasks 2, 4++**Files:**+- Create: `packages/ee/src/integrations/connections.ts`+- Create: `packages/ee/src/integrations/connections.test.ts`+- Modify: `packages/ee/src/integrations/secrets.ts` — nothing structural; see step 5+- Modify: `packages/ee/src/index.ts` — export the new service+- Copy from (precedent): `packages/ee/src/integrations/secrets.ts` (`persistIntegrationSecrets` /+ `resolveIntegrationSecrets` are the shape to mirror, but they target `companyIntegration`, so+ these are new functions against the new RPCs from Task 1)++**Steps:**+1. Implement, all taking a Supabase client as the first argument in Carbon's service idiom:+ ```ts+ listConnections(client, companyId, pieceName?)+ getConnection(client, companyId, connectionId) // non-secret fields only+ createConnection(serviceClient, { companyId, pieceName, name, authType, accountLabel, metadata, tokens, expiresAt, createdBy })+ renameConnection(client, companyId, connectionId, name, updatedBy)+ disconnectConnection(serviceClient, companyId, connectionId, updatedBy)+ resolveConnectionAuth(serviceClient, companyId, connectionId) // returns FRESH auth+ ```+2. `createConnection` inserts the row, then writes `{ accessToken, refreshToken }` through the+ `upsert_connection_secret` RPC. Tokens must never be written into `metadata`.+3. `disconnectConnection` calls `delete_connection_secret` and sets+ `status = 'Revoked'`, `secretRef = NULL`. It does **not** delete the row — a saved workflow+ node may reference the id, and a dangling id produces a worse error than a clear+ "reconnect this" message.+4. `resolveConnectionAuth`:+ - reads the row; throws a named `ConnectionRevokedError` when `status !== 'Active'`+ - reads tokens via `get_connection_secret`; throws `ConnectionSecretUnavailableError` when+ null (fail closed, exactly as `resolveIntegrationSecrets` does)+ - when `expiresAt` is more than five minutes away, returns the token as is+ - otherwise **claims the refresh** with a conditional update, so two concurrent workflow steps+ cannot both refresh and clobber each other's token:+ ```sql+ UPDATE "integrationConnection"+ SET "refreshingAt" = NOW()+ WHERE "id" = :id AND "companyId" = :companyId+ AND ("refreshingAt" IS NULL OR "refreshingAt" < NOW() - INTERVAL '30 seconds')+ RETURNING "id"+ ```+ The claimant POSTs `grant_type=refresh_token` to the piece's `tokenUrl` with our client id+ and secret, writes the new token through `upsert_connection_secret`, updates `expiresAt`,+ and clears `refreshingAt`. A caller that does **not** win the claim waits 250 ms and+ re-reads, up to 20 times (5 s), then throws `ConnectionRefreshTimeoutError`.+ - on a refresh rejected by the vendor: set `status = 'Expired'` and `lastError`, then throw+ `ConnectionRevokedError`.+5. Add a `SECRET_KEYS`-style guarantee for the new table by asserting in a test that+ `metadata` never contains `accessToken` or `refreshToken` after `createConnection`. The+ existing `SECRET_KEYS` map is keyed by `companyIntegration` id and is not used here; do not+ add connection keys to it.+6. Write `connections.test.ts` with a mocked client covering: create writes tokens via the RPC+ and not into metadata; resolve returns the stored token when far from expiry; resolve+ refreshes exactly once when two calls race (the loser observes the winner's token); a revoked+ connection throws `ConnectionRevokedError`.++**Verify:**+```bash+pnpm --filter @carbon/ee test -- connections+pnpm exec turbo run typecheck --filter=@carbon/ee+# Expected: all tests pass, including the concurrent-refresh test; no type errors.+```++**Out of scope:** touching `persistIntegrationSecrets` / `resolveIntegrationSecrets` or+`SECRET_KEYS`. The 12 existing integrations keep their own path.++---++## Task 9: OAuth connect and callback routes++**Depends on:** Tasks 3, 8++**Files:**+- Create: `apps/erp/app/routes/api+/integrations.connections.$piece.connect.ts`+- Create: `apps/erp/app/routes/api+/integrations.connections.callback.ts`+- Modify: `apps/erp/app/utils/path.ts` — add the two route paths next to the existing+ `integrations` entries around line 122+- Copy from (precedent): `apps/erp/app/routes/api+/integrations.slack.install.ts` (the install+ loader shape) and `apps/erp/app/routes/api+/integrations.onshape.oauth.ts` (the callback:+ `requirePermissions(request, { update: "settings" })`, `export const config = { runtime: "nodejs" }`,+ the `connectionFailed` redirect helper, and the rule that a failure redirects to the+ integrations page with an error **code** rather than returning JSON)++**Steps:**+1. **Connect loader.** Takes `?name=<connection name>` and the `$piece` route param. Requires+ `{ update: "settings" }`. Builds the consent URL from the piece's own OAuth2 declaration+ (`getPieceOAuth2Auth`) — `authUrl` and `scope` — plus `GOOGLE_OAUTH_CLIENT_ID` and+ `GOOGLE_OAUTH_REDIRECT_URL`, with `response_type=code`, `access_type=offline`,+ `prompt=consent` (needed for Google to return a refresh token) and a signed `state`.+ Returns `{ url }`, matching the Slack install route's contract so the client opens it in a+ popup.+2. **`state` must be signed and verified.** Sign `{ companyId, pieceName, name, userId, nonce }`+ with an existing server secret; the callback rejects anything that fails verification, is+ older than 10 minutes, or whose `companyId` does not match the session. This is the control+ that stops a token being planted into another company's connection — it is not optional and+ must not be reduced to an unsigned query parameter.+3. **Callback loader.** Mirrors the Onshape callback: handle a `?error=` denial first, then parse+ with `oAuthCallbackSchema` from `apps/erp/app/modules/shared/shared.models.ts`, then verify+ `state`. Exchange the code at the piece's `tokenUrl` server-side with+ `GOOGLE_OAUTH_CLIENT_SECRET`. Call `createConnection` with a service-role client+ (`getCarbonServiceRole` from `@carbon/auth/client.server`). Fetch the account label+ (the connected email) if the token response carries it; otherwise leave it null.+4. Log parameter **names only** on a malformed callback, never values — `code` is a live+ credential. The Onshape route's comment states this; keep it.+5. On success, redirect to `path.to.integrations`; the popup-closing behaviour follows Slack's+ `app_oauth_completed` `postMessage` convention in `packages/ee/src/slack/config.tsx`.++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=erp+# Expected: no type errors. (The app package is named `erp`, not `@carbon/erp` — a wrong+# filter silently passes.)+```+Manual: from Settings → Integrations, click Connect on Google Calendar, complete consent, and+confirm a row appears in `integrationConnection` with `secretRef` set and no token in `metadata`.++**Out of scope:** any change to the Slack, Onshape, Jira, QuickBooks or Xero OAuth routes.++---++## Task 10: Settings → Integrations connections panel++**Depends on:** Task 9++**Files:**+- Create: `apps/erp/app/modules/settings/ui/Integrations/ConnectionsPanel.tsx`+- Modify: `apps/erp/app/modules/settings/ui/Integrations/IntegrationsList.tsx` — list allowlisted+ pieces alongside the existing integrations+- Modify: `apps/erp/app/routes/x+/settings+/integrations.$id.tsx` — load connections for a piece+- Copy from (precedent): `apps/erp/app/modules/settings/ui/Integrations/IntegrationCard.tsx` for+ the card, and `apps/erp/app/modules/settings/ui/Integrations/SyncActivity.tsx` for a+ list-inside-an-integration-detail layout++**Steps:**+1. Add allowlisted pieces to the integrations grid as cards using the same `IntegrationCard`+ component. A piece whose OAuth env vars are absent renders **disabled** with "Not configured+ on this server" — the same treatment `defineIntegration`'s computed `active` gives an+ integration with no client id.+2. `ConnectionsPanel` lists that company's connections for the piece: name, connected account,+ status badge, `lastError` when present, and per-row Rename and Disconnect. A "Connect" button+ opens the Task 9 connect URL in a popup (copy the popup code from+ `packages/ee/src/slack/config.tsx`, including the `app_oauth_completed` listener).+3. Connecting asks for a name first, defaulting to the piece label, and rejects a duplicate name+ in the same company with the message the unique constraint implies.+4. Use existing components only — grep `packages/react/src/` and `apps/erp/app/components/`+ before writing any new UI primitive.++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=erp+pnpm exec biome check+# Expected: no type errors; no new error-severity biome findings (pre-existing warnings stay).+```+Manual: the Google Calendar card appears, connects, and shows two differently-named connections.++**Out of scope:** redesigning the integrations page, or changing how the 12 existing integrations+render.++---++## Task 11: The integration action executor++**Depends on:** Tasks 7, 8++**Files:**+- Create: `packages/jobs/src/workflows/integrations/context.ts`+- Create: `packages/jobs/src/workflows/actions/integration.ts`+- Create: `packages/jobs/src/workflows/actions/integration.test.ts`+- Modify: `packages/jobs/src/workflows/actions/services.ts` — one new branch in `runAction`+- Copy from (precedent): `packages/jobs/src/workflows/actions/webhook.ts` (an outbound action+ returning `ActionOutcome`) and the existing `route.update` / `route.call` branches in+ `services.ts`++**Steps:**+1. `context.ts` exports `buildPieceContext({ auth, propsValue })` returning the object the spike+ proved sufficient: `auth`, `propsValue`, plus `store`, `connections`, `project`, `flows`,+ `step`, `files`. Every stub **throws** a named error when called, rather than returning empty —+ a piece that genuinely needs one must fail loudly in development, not misbehave in production.+2. `integration.ts` exports+ `runIntegrationAction({ client, companyId, pieceName, actionName, inputs })`:+ pull `connectionId` out of `inputs`; `resolveConnectionAuth`; map the remaining inputs with+ `toPropsValue`; `getPieceAction`; call `run(buildPieceContext(...))`; return+ `{ ok: true, outputs: { result } }`.+3. Every failure returns `{ ok: false, error }` with a sentence a customer can act on, following+ the existing constants at the top of `services.ts` (`GONE`, `NO_DISPATCH`, `UNKNOWN_RESULT`):+ - no `connectionId` → `"This step needs a connection."`+ - `ConnectionRevokedError` → `"The <label> connection needs to be reconnected."`+ - refresh failure → the same reconnect sentence+ - a vendor error → the vendor's message, truncated, prefixed `"<label> rejected this: "`+4. In `services.ts#runAction`, add the branch **before** the `route.update` / `route.call`+ branches and route it off `route.piece`, never off the id's shape — the existing comment in+ that file states the rule.+5. Confirm `redactForLog` in `packages/jobs/src/workflows/engine/ledger.ts` already redacts the+ keys a piece auth object uses (`access_token`, `refresh_token`, `client_secret` all match its+ regex). Add a test asserting a step's recorded `input` contains no token. If any key escapes+ the regex, widen the regex rather than filtering at this call site.+6. `integration.test.ts` covers: a successful run with a stubbed piece; each failure sentence;+ and the redaction assertion.++**Verify:**+```bash+pnpm --filter @carbon/jobs test -- integration+pnpm exec turbo run typecheck --filter=@carbon/jobs+# Expected: all tests pass; no type errors.+```++**Out of scope:** triggers, and any non-OAuth2 auth variant. Both are Non-goals for v1.++---++## Task 12: Smart-dropdown options endpoint++**Depends on:** Tasks 5, 8++**Files:**+- Create: `apps/erp/app/routes/api+/integrations.connections.options.ts`+- Copy from (precedent): `apps/erp/app/routes/api+/integrations.quickbooks.accounts.ts` (a+ resource route that fetches a remote list for a picker)++**Steps:**+1. Action/loader takes `{ pieceName, actionName, propName, connectionId }` plus the node's+ current input values (a dropdown's `refreshers` may name other props).+2. Gate with `requirePermissions(request, { update: "workflows" })` — the same permission the+ action itself carries, so the endpoint cannot be used to reach a vendor a user could not+ otherwise call.+3. Resolve fresh auth via `resolveConnectionAuth`, load the property from the piece, and call its+ `options({ auth, propsValue })`. Return `{ options: [{ label, value }] }`.+4. **Never echo the auth value back** in the response or in an error message.+5. On failure return `{ options: [], error }` with a short sentence — the builder shows it inline+ rather than blocking the form.++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=erp+# Expected: no type errors.+```+Manual: with a connection in place, request the route for `calendar_id` and confirm it returns+the connected account's real calendars.++**Out of scope:** caching. If the vendor rate-limits, handle it in a follow-up.++---++## Task 13: Builder — connection picker and dynamic options++**Depends on:** Task 12++**Files:**+- Modify: `apps/erp/app/modules/workflows/ui/Builder/fields/recordPickers.tsx` — add a connection+ picker for the `connectionId` input+- Modify: `apps/erp/app/modules/workflows/ui/Builder/fields/choiceOptions.tsx` — fetch options+ from the Task 12 route when an input is marked `dynamicOptions`+- Modify: `apps/erp/app/modules/workflows/ui/Builder/NodePalette.tsx` — group ids starting+ `integration.` under an "Integrations" heading+- Copy from (precedent): the existing pickers in `recordPickers.tsx` and the existing static+ choice rendering in `choiceOptions.tsx`++**Steps:**+1. The connection picker lists the company's connections for the action's piece (read the piece+ name off the catalog entry's `piece` block). With none, it renders an inline link to+ Settings → Integrations rather than an empty dropdown.+2. A `dynamicOptions` input renders as a select that fetches from+ `/api/integrations/connections/options` once a connection is chosen, with a visible loading+ state and a plain error state: `"Couldn't load options — check the connection."`+3. Refetch when the chosen connection changes. Reset the field's value on connection change —+ a calendar id from one account is meaningless in another.+4. Add no new UI primitive; use what `fields/` already has.++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=erp+npx vitest run apps/erp/app/modules/workflows+# Expected: no type errors; existing builder tests still pass.+```+Manual: add "Google Calendar: Create Event" to a workflow; the connection picker lists your+connection and the calendar dropdown lists real calendars.++**Out of scope:** changing how Carbon's own actions render. The generic field renderers are+shared — a regression there breaks all 16 existing actions.++---++## Task 14: End-to-end verification++**Depends on:** all previous tasks++**Files:** none created; this task only runs and records.++**Steps:**+1. Run the full gate set:+ ```bash+ pnpm run generate:workflow-catalog+ pnpm run check:workflow-catalog+ pnpm exec biome check+ pnpm exec turbo run typecheck --filter=@carbon/workflows --filter=@carbon/jobs --filter=@carbon/ee --filter=erp+ pnpm --filter @carbon/workflows test+ pnpm --filter @carbon/jobs test+ pnpm --filter @carbon/ee test+ ```+2. Walk the spec's Acceptance Criteria list in order, in the running app, and record the result+ of each in `.ai/runs/2026-08-27-workflow-integrations.md`. The criteria that need a browser:+ connect a Google account; add a second named connection; reject a duplicate name; build the+ node and see real calendars; missing connection blocks activation; a real trigger creates a+ real calendar event; the run history shows Succeeded with no token in `input`/`output`;+ an expired token refreshes once; a disconnected connection fails the run with the reconnect+ message and recovers after reconnecting without editing the workflow.+3. Record any criterion that could not be verified, and why. Do not mark the plan complete with+ an unverified criterion silently dropped.++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=@carbon/workflows --filter=@carbon/jobs --filter=@carbon/ee --filter=erp+# Expected: all four packages typecheck clean.+```++**Out of scope:** a whole-repo `pnpm run build` — the repo-wide typecheck OOMs, which is why the+scoped filters above are used instead.++---++## Notes for the executor++- Never use `npm`. Always `pnpm`.+- Never hand-edit `packages/database/src/types.ts` or any `*.generated.ts` — regenerate.+- Run `pnpm run generate:types` after the migration and **before** any typecheck that touches the+ new table.+- `apps/erp` sits near TypeScript's instantiation budget; if a new type surface trips TS2589 in an+ unrelated file, prefer flat selects and verify with a direct `tsgo` run rather than the turbo+ cache.+- Do not commit anything without explicit permission from the user.diff --git a/.ai/plans/2026-08-31-data-node-operation-chain.md b/.ai/plans/2026-08-31-data-node-operation-chain.mdnew file mode 100644index 0000000000..73774fb3d6Binary files /dev/null and b/.ai/plans/2026-08-31-data-node-operation-chain.md differdiff --git a/.ai/plans/2026-08-31-workflow-integration-outputs.md b/.ai/plans/2026-08-31-workflow-integration-outputs.mdnew file mode 100644index 0000000000..d8d293a082--- /dev/null+++ b/.ai/plans/2026-08-31-workflow-integration-outputs.md@@ -0,0 +1,1235 @@+# Workflow integration outputs, data node, and form control — implementation plan++**Spec / source:** `.ai/specs/implemented/2026-08-31-workflow-integration-outputs.md`+**Research:** `.ai/research/activepieces-decisions.md`, `.ai/research/activepieces-integration-findings.md`+**Branch:** current worktree branch (`carbon-feat-active-pieces-integration`)++## Progress+- [x] Task 0: Make value-kind dispatch exhaustive (`assertNever`)+- [x] Task 1: Fix the two options-provider bugs+- [x] Task 2: Add the `record` kind to `ValueType` and its type functions+- [x] Task 3: Add `record` to the runtime value model and resolver+- [x] Task 3b: Teach the three record-blind consumers about records+- [x] Task 4: Refuse a record-typed catalog input+- [x] Task 5: Read `outputSchema` off a piece and map it to `ValueType`+- [x] Task 6: Emit typed integration outputs; refuse an action with no schema+- [x] Task 7: Project the vendor response into record outputs at run time+- [x] Task 9: Widen the filter node schema with `operation`+- [x] Task 10a: Extract the data node kind out of `nodes.ts`+- [x] Task 10b: One operation table driving type, runtime and UI+- [x] Task 12: Filter form — operation selector, field picker, record sources+- [x] Task 13: Tier 1+2 prop hiding, and `advancedInputs` on the declaration+- [x] Task 14: Advanced properties section on the integration form+- [x] Task 15: Builder support for walking into record fields+- [x] Task 8: Regenerate and verify the workflow catalog (ONCE, after 6 and 13)+- [x] Task 16: End-to-end verification++## Dependencies++```+Task 0 FIRST — makes every later kind-change fail loudly instead of silently+Task 1 independent (do early; the calendar dropdown is broken now)+Task 0 -> Task 2 -> Task 3 -> Task 3b -> Task 4+Task 5 -> Task 6 -> Task 7 (Task 6 needs Task 2)+Task 9 -> Task 10a -> Task 10b -> Task 12 (Task 10b needs Task 2)+Task 13 -> Task 14+Task 15 needs Task 2+Task 8 needs BOTH Task 6 and Task 13 — the SINGLE regeneration, do not run it earlier+Task 16 needs everything+```++Tasks 1 and 13 are independent of the record work and may run in parallel with Tasks 2-7.+Task 15 may run in parallel with Tasks 9-12 once Task 2 lands.++**Why Task 0 exists.** There are **43 value-kind branch sites across 12 files** in+`packages/workflows/src`, and **zero exhaustive switches** — every one is an+`if (x.kind === "list") … else if (x.kind === "entity")` chain that **falls through** on+an unrecognised kind. Adding `record` therefore produces no compile error at most of+them; it produces silent wrong behaviour that passes typecheck AND tests. Task 0+converts the value-shaped chains to switches with `assertNever`, so the compiler+enumerates every site needing a record case rather than trusting a grep to have been+complete.++**Baselines confirmed before planning** (all green at time of writing):+`pnpm exec turbo run typecheck --filter=@carbon/workflows` ok;+`cd packages/workflows && pnpm exec vitest run` -> 26 files, 436 tests passed;+`pnpm exec turbo run typecheck --filter=@carbon/jobs` ok;+`pnpm run check:workflow-catalog` -> "ok — 106 events, 9 moments raised, 17 entities, 16 actions, 2 integration steps, 15 operations".+Any task whose Verify block reports fewer passing tests than its predecessor has+regressed something — STOP and report.++---++## Task 0: Make value-kind dispatch exhaustive++**Depends on:** none. **Do this first** — it is the safety net for Tasks 2, 3 and 3b.++**Files:**+- Modify: `packages/workflows/src/definition/types.ts` — add `assertNever`+- Modify: `packages/workflows/src/runtime/resolve.ts` — `walk`'s kind chain -> switch+- Modify: `packages/workflows/src/runtime/values.ts` — `fromColumn`'s kind chain -> switch+- Modify: `packages/workflows/src/runtime/compare.ts` — `equals`' kind chain -> switch++**Steps:**++1. Add to `types.ts`:+ ```ts+ /** Compile-time exhaustiveness. A new ValueType/RuntimeValue kind that any dispatch+ * forgets becomes a type error here rather than a silent fallthrough. */+ export function assertNever(value: never): never {+ throw new Error(`Unhandled kind: ${JSON.stringify(value)}`);+ }+ ```++2. Convert the three **value-shaped** dispatches above from if-chains to+ `switch (value.kind)` with `default: assertNever(value)`. Pure behaviour-preserving+ refactor: every existing branch keeps its exact body, and `default` is unreachable+ today.++3. Do **not** convert type-shaped guards that legitimately test for one kind+ (`catalog/build.ts:432`, `definition/catalog.ts:83`, `definition/batch.ts`) or the+ `isMultiSelect`-style predicates. Those ask "is this specifically a list of strings?"+ and a record correctly fails them; converting would add noise, not safety.++4. This task changes no behaviour. If any test output changes, STOP and report — it+ means a chain was not equivalent to its switch.++**Verify:**+```bash+cd packages/workflows && pnpm exec vitest run+# Expected: 26 files, 436 tests passed — EXACTLY the baseline. A behaviour-preserving+# refactor must not move any count.+pnpm exec turbo run typecheck --filter=@carbon/workflows+# Expected: "Tasks: 1 successful, 1 total"+```++**Out of scope:** adding the `record` kind (Task 2). This task only makes its absence+detectable.++---++## Task 1: Fix the two options-provider bugs++**Depends on:** none++**Files:**+- Modify: `apps/erp/app/modules/workflows/ui/Builder/fields/useWorkflowOptions.ts` — refetch when the query changes; allow retry after failure+- Modify: `apps/erp/app/modules/workflows/ui/Builder/fields/OptionsField.tsx` — render a distinct error state; stop `issue` masking `error`++**Steps:**++1. In `useWorkflowOptions.ts`, the effect currently reads:+ ```ts+ useEffect(() => {+ if (!ready || query === undefined) return;+ if (fetcher.state === "idle" && fetcher.data === undefined) {+ fetcher.load(`${path.to.api.workflowOptions}?${query}`);+ }+ }, [fetcher, query, ready]);+ ```+ `fetcher.data === undefined` is only true before the FIRST response, so the field+ never refetches — and a failed first load leaves `fetcher.data` set to+ `{ options: [], error }`, permanently sticking the field empty for the rest of the+ editing session.++ Replace the guard with one that tracks the query actually loaded. Add+ `const loadedQuery = useRef<string | undefined>(undefined);` (import `useRef`), and:+ ```ts+ useEffect(() => {+ if (!ready || query === undefined) return;+ if (fetcher.state !== "idle") return;+ if (loadedQuery.current === query) return;+ loadedQuery.current = query;+ fetcher.load(`${path.to.api.workflowOptions}?${query}`);+ }, [fetcher, query, ready]);+ ```++2. Add a `retry` function to the hook's return value, so a failed load can be retried+ without a page reload:+ ```ts+ const retry = useCallback(() => {+ loadedQuery.current = undefined;+ if (ready && query !== undefined) {+ loadedQuery.current = query;+ fetcher.load(`${path.to.api.workflowOptions}?${query}`);+ }+ }, [fetcher, query, ready]);+ ```+ Return it alongside the existing fields. Import `useCallback`.++3. In `OptionsField.tsx`, the failure path currently falls through to a `Combobox` with+ an empty list, which reads as "this account has no calendars" rather than "the call+ failed". Add an explicit error branch AFTER the `!ready` branch and BEFORE the+ `loaded && options.length === 0 && emptyHref` branch:+ ```tsx+ if (loaded && error) {+ return (+ <Field label={label} required={required} issue={issue}>+ <div className="flex items-center gap-2">+ <p className="text-sm text-muted-foreground">+ <Trans>Couldn't load the choices for this field.</Trans>+ </p>+ <Button variant="secondary" size="sm" onClick={retry} isDisabled={isReadOnly}>+ <Trans>Try again</Trans>+ </Button>+ </div>+ </Field>+ );+ }+ ```+ Import `Button` from `@carbon/react` and destructure `retry` from `useWorkflowOptions`.++4. In the same file, the final `Field` currently passes `issue={issue ?? error}`, which+ lets a field-level issue mask the error entirely. Since step 3 now handles `error` in+ its own branch, change that prop to just `issue={issue}`.++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=erp+# Expected: "Tasks: 1 successful, 1 total" and no TypeScript errors+```++**Out of scope:** the options endpoint (`api+/workflows.options.ts`) and+`options-providers.server.ts` — the server already returns `{ options: [], error }`+correctly; this task is entirely client-side. Do NOT change the piece's auth shape:+it was verified correct (a real call reaches Google and returns a genuine 401 on a+bad token).++---++## Task 2: Add the `record` kind to `ValueType` and its type functions++**Depends on:** none (but Tasks 6, 10, 15 depend on this)++**Files:**+- Modify: `packages/workflows/src/definition/types.ts` — add the kind and every type function's record case+- Modify: `packages/workflows/src/definition/catalog.ts` — `walkPath` record branch+- Create: `packages/workflows/src/definition/record.test.ts`++**Steps:**++1. In `types.ts`, add a recursive record schema. `valueTypeSchema` is a+ `z.discriminatedUnion`, which cannot be recursive directly, so declare the record+ member with `z.lazy` and give the union an explicit type annotation:+ ```ts+ /** A bag of named fields. No table, no id, no row to load — unlike `entity`.+ * Structural: the type carries its own fields, so nothing is registered anywhere. */+ export const recordTypeSchema: z.ZodType<{+ kind: "record";+ fields: Record<string, ValueType>;+ }> = z.lazy(() =>+ z.object({+ kind: z.literal("record"),+ fields: z.record(z.string(), valueTypeSchema)+ })+ );+ ```+ **This was verified before planning, so it is a decision rather than a coin flip.**+ A `z.lazy` member cannot go inside `z.discriminatedUnion`, so `scalarTypeSchema` and+ `valueTypeSchema` must both become `z.union` with explicit `z.ZodType<…>` annotations.+ A runnable proof of the exact shape — nested records parse, `list<record>` parses, and+ `list<list<T>>` is still REJECTED — is recorded in the review notes for this plan.++ The one real cost: a plain union degrades zod's parse error from+ "expected `kind` to be one of…" to a nested `invalid_union` dump. That surfaces to a+ user only through `validate.ts`'s `MALFORMED_DEFINITION`, and only for a corrupted+ stored definition (catalog types never round-trip through this schema), so it is+ acceptable. Do NOT weaken the schema to `z.any()` to avoid it.++2. Add `record` to `scalarTypeSchema` (so `list<record>` is legal) and to+ `valueTypeSchema`. **`list.of` must still refuse another `list`** — `list<list<T>>`+ stays unrepresentable, which is what makes `flatten` a flag rather than an operation+ in Task 10.++3. Add the constructor to `t`:+ ```ts+ record: (fields: Record<string, ValueType>): ValueType => ({ kind: "record", fields })+ ```++4. Fix the three call sites that currently assume `list.of` has an `.of` string.+ **These break silently, not loudly** — this is the most important step in the task.++ - `typesEqual` currently does `a.of.kind === b.of.kind && a.of.of === b.of.of`.+ On a record `.of.of` is `undefined`, so **two different record lists would compare+ equal**. Rewrite it to recurse:+ ```ts+ export function typesEqual(a: ValueType, b: ValueType): boolean {+ if (a.kind === "list" && b.kind === "list") return typesEqual(a.of, b.of);+ if (a.kind === "primitive" && b.kind === "primitive") return a.of === b.of;+ if (a.kind === "entity" && b.kind === "entity") return a.of === b.of;+ if (a.kind === "record" && b.kind === "record") {+ const ak = Object.keys(a.fields).sort();+ const bk = Object.keys(b.fields).sort();+ if (ak.length !== bk.length) return false;+ return ak.every((k, i) => {+ const bf = b.fields[k];+ const af = a.fields[k];+ return bk[i] === k && af !== undefined && bf !== undefined && typesEqual(af, bf);+ });+ }+ return false;+ }+ ```+ - `describeType` currently does `` `a list of ${type.of.of}` ``, which would render+ "a list of undefined" in a customer-facing issue message. Add record cases:+ `record` → `"an object"`; `list` of a record → `"a list of objects"`; otherwise+ keep today's wording.+ - `scalarValueMatches` — records are never literals (step 5), so it must+ **return `false`** for `kind === "record"` rather than fall through.++5. Records may never be literals, comparable, or renderable as text:+ - `rendersAsText` — return `false` for `record`, and for a `list` whose `of` is a+ record. This is what keeps a record out of every template.+ - `operatorsForType` — return `[]` for `record`, and `[]` for a `list` whose `of`+ is a record (`equals` cannot compare records, so `contains` would be a lie).+ Note `OPERATORS_BY_TYPE` is `satisfies Record<string, readonly Operator[]>`;+ do not add a `record` key to it — branch in the function instead.+ - `literalValueMatchesType` — via step 4's `scalarValueMatches` change, a record+ literal can never validate. Confirm a `list<record>` literal also fails.++6. In `definition/catalog.ts`, `walkPath` currently descends only through entities.+ Add a record branch BEFORE the entity check:+ ```ts+ if (current.kind === "record") {+ const next = current.fields[segment];+ if (next === undefined) return undefined;+ current = next;+ continue;+ }+ ```+ Change the loop's opening `if (current.kind !== "entity") return undefined;` so it+ only rejects after the record branch has had its turn.++7. Create `record.test.ts` covering: `typesEqual` distinguishes two record types with+ different fields (the silent-equality bug from step 4); `typesEqual` treats field+ order as irrelevant; `describeType` on a record and on `list<record>`;+ `rendersAsText` false for both; `operatorsForType` empty for both;+ `literalValueMatchesType` false for a record; `walkPath` descends+ `record{organizer: record{email: string}}` via `["organizer","email"]` and returns+ `undefined` for a missing field; and that a `list<list<string>>` fails to parse+ through `valueTypeSchema`.++**Verify:**+```bash+cd packages/workflows && pnpm exec vitest run+# Expected: all files pass, total >= 437 tests (436 baseline + the new record tests),+# and zero failures. A DROP below 436 means an existing test broke — STOP and report.+pnpm exec turbo run typecheck --filter=@carbon/workflows+# Expected: "Tasks: 1 successful, 1 total"+```++**Out of scope:** the runtime value model (Task 3), any catalog or integration file,+and the filter node. Do NOT add a `record` case to `runtime/compare.ts` — its `equals`+already returns `false` for anything that is not a primitive or entity, which is the+correct behaviour and needs no edit.++---++## Task 3: Add `record` to the runtime value model and resolver++**Depends on:** Task 2++**Files:**+- Modify: `packages/workflows/src/runtime/types.ts` — `RuntimeValue` gains a record member+- Modify: `packages/workflows/src/runtime/values.ts` — `recordValue`, `fromColumn` record branch+- Modify: `packages/workflows/src/runtime/resolve.ts` — `walk` record branch+- Create: `packages/workflows/src/runtime/record.test.ts`++**Steps:**++1. In `runtime/types.ts`, add to the `RuntimeValue` union:+ ```ts+ // Carries its own type so `walk` knows each field's declared type without a+ // catalog lookup — records are structural and registered nowhere.+ | { kind: "record"; of: Extract<ValueType, { kind: "record" }>; fields: Record<string, RuntimeValue> }+ ```++2. In `runtime/values.ts`, add:+ ```ts+ export function recordValue(+ of: Extract<ValueType, { kind: "record" }>,+ fields: Record<string, RuntimeValue>+ ): RuntimeValue {+ return { kind: "record", of, fields };+ }+ ```++3. In the same file, `fromColumn` shapes a raw value against a declared type. Add a+ record branch that walks the declared fields (NOT the raw object's keys — a vendor+ sending an extra field must not smuggle it into a typed value):+ ```ts+ if (type.kind === "record") {+ const source = (raw !== null && typeof raw === "object" && !Array.isArray(raw))+ ? (raw as Record<string, unknown>)+ : {};+ const fields: Record<string, RuntimeValue> = {};+ for (const [name, fieldType] of Object.entries(type.fields)) {+ fields[name] = fromColumn(fieldType, source[name]);+ }+ return recordValue(type, fields);+ }+ ```+ Place it AFTER the existing `type.kind === "list"` branch and BEFORE the+ `raw === null || raw === undefined` early return, so a null record still yields a+ record of nulls rather than a bare null. The existing list branch already applies+ `MAX_LIST_ITEMS` through `listValue`, so a `list<record>` is capped for free.++4. In `runtime/resolve.ts`, `walk` currently fails on any non-entity segment. Add a+ record branch at the top of the loop, after the `isNull` check:+ ```ts+ if (current.kind === "record") {+ const next = current.fields[segment];+ // A field the vendor did not send resolves to null, never an error.+ current = next ?? nullValue();+ continue;+ }+ ```+ **It must never touch `ctx.loader`** — a record carries its data inline, so there is+ nothing to fetch. Import `nullValue` if not already imported.++5. Create `record.test.ts` covering: `fromColumn` builds a record from a plain object;+ a missing field becomes null; an extra key in the raw object is dropped; a nested+ record is built recursively; `fromColumn` on a `list<record>` builds a list of+ records and caps at `MAX_LIST_ITEMS`; `walk` reaches `["organizer","email"]` on a+ record value; `walk` returns null for a field the record type declares but the value+ lacks; and — critically — that walking a record **never calls the loader** (pass a+ loader stub that throws if called).++**Verify:**+```bash+cd packages/workflows && pnpm exec vitest run+# Expected: all pass, total greater than after Task 2, zero failures+pnpm exec turbo run typecheck --filter=@carbon/workflows+# Expected: "Tasks: 1 successful, 1 total"+```++**Out of scope:** `runtime/compare.ts` (see Task 2's out-of-scope note), the filter+executor (Task 10b), and the integration action (Task 7).++---++## Task 3b: Teach the three record-blind consumers about records++**Depends on:** Task 3++**Files:**+- Modify: `packages/jobs/src/workflows/integrations/properties.ts` — `toPlain` record case+- Modify: `packages/jobs/src/workflows/retention.ts` — `compactForLog` record case+- Modify: `apps/erp/app/modules/workflows/ui/Runs/RuntimeValueView.tsx` — render a record++**Steps:**++These three consume `RuntimeValue` from outside `packages/workflows` and each is blind to+a new kind in a different way. **All three are load-bearing for this feature** — without+the third, an integration step's output renders as nothing in run history, which is the+first place a user looks after a workflow runs.++1. `properties.ts:97` `toPlain` is a real exhaustive `switch (value.kind)`, so Task 3+ **breaks the `@carbon/jobs` typecheck** the moment `record` joins `RuntimeValue`. That+ is the desired behaviour — fix it here by adding:+ ```ts+ case "record":+ return Object.fromEntries(+ Object.entries(value.fields).map(([name, field]) => [name, toPlain(field)])+ );+ ```+ This also makes a record usable as a piece input value, which costs nothing and is the+ obvious reading of "convert a runtime value to plain JSON".++2. `retention.ts` `compactForLog` special-cases `entity` and `pairs` (lines ~30-41) and+ otherwise walks a value as a generic object. A record would have its nested+ `RuntimeValue` fields walked as plain data, corrupting stored run history when pass 3+ compacts it after 7 days. Add a record branch that recurses through `fields` with the+ same depth/size caps the existing branches use.++3. `RuntimeValueView.tsx:32` `isRuntimeValue` is a hand-maintained allowlist:+ ```ts+ return obj.kind === "primitive" || obj.kind === "entity"+ || obj.kind === "list" || obj.kind === "pairs";+ ```+ A record fails it, so the view falls through to raw JSON or nothing. Add+ `|| obj.kind === "record"` and a render branch. **Copy the existing `pairs` branch+ (lines ~199-225) verbatim as the precedent** — a record renders exactly like named+ rows: a `<dl>` of field name -> nested `<RuntimeValueView>`, with the same+ `depth + 1` recursion and the same "Nothing" empty state.++4. Add a test for `toPlain` on a nested record, and one for `compactForLog` preserving a+ record's structure while capping it.++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=@carbon/jobs --filter=erp+# Expected: both succeed. Before this task, @carbon/jobs MUST have been failing on+# toPlain's exhaustive switch — if it was not, Task 3 did not add the kind correctly.+cd packages/jobs && pnpm exec vitest run src/workflows/+# Expected: all pass, including the new toPlain and compactForLog cases+```++**Out of scope:** `ConditionDetail.tsx` — records are never condition operands+(Task 2 makes `operatorsForType` return `[]`), so it needs no record case.++---++## Task 4: Refuse a record-typed catalog input++**Depends on:** Task 2++**Files:**+- Modify: `packages/workflows/src/catalog/build.ts` — reject a record-typed input in `validateCatalogInputs`+- Modify: `packages/workflows/src/catalog/build.test.ts` — add the case++**Steps:**++1. The spec scopes records to outputs and the data node only: a record must never be a+ catalog INPUT type, because every existing form, template and condition would then+ have to handle one. Find `validateCatalogInputs` in `build.ts` (it already reports+ problems like `Entity "X" names table "Y", which is not in the database schema.`+ and is thrown on by `buildCatalog`).++2. Add a check over every action, integration and operation input that pushes a problem+ when the input's declared type is a record, or a list whose `of` is a record:+ ```ts+ const isRecordType = (type: ValueType): boolean =>+ type.kind === "record" || (type.kind === "list" && type.of.kind === "record");+ ```+ Message shape, matching the file's existing voice:+ `` `Input "${inputName}" on ${id} is an object, which cannot be filled in by a person.` ``++3. Follow the existing traversal in that function so the check covers the same three+ declaration kinds it already validates. If the function's shape makes a single+ shared helper awkward, add the check at each of the three sites rather than+ restructuring the function.++4. Add a test to `build.test.ts` asserting `buildCatalog` throws when a hand-written+ action declaration carries a record-typed input, and that the message names the+ input and the action. Follow the existing throwing-case tests in that file for+ shape.++**Verify:**+```bash+cd packages/workflows && pnpm exec vitest run+# Expected: all pass, includes the new record-input rejection test+pnpm run check:workflow-catalog+# Expected: "check-workflow-catalog: ok — ..." (no shipped input is a record, so this+# must still pass unchanged)+```++**Out of scope:** the generated catalog files — this task adds a guard only, and+changes no emitted output.++---++## Task 5: Read `outputSchema` off a piece and map it to `ValueType`++**Depends on:** none (pure mapping; Task 6 consumes it)++**Files:**+- Modify: `packages/jobs/src/workflows/integrations/types.ts` — add `PieceOutputField` / `PieceOutputSchema`, and `outputSchema` on `PieceAction`+- Create: `packages/jobs/src/workflows/integrations/outputs.ts`+- Create: `packages/jobs/src/workflows/integrations/outputs.test.ts`+- Copy from (precedent): `packages/jobs/src/workflows/integrations/properties.ts` and its `properties.test.ts` — this file is its mirror image for the output side++**Steps:**++1. In `types.ts`, add the structural shapes (measured against 12 pieces / 496 actions —+ `key` and `label` appear on all 3,987 field descriptors; `format` on 1,728;+ `children` on 339; `listItems` on 175):+ ```ts+ export interface PieceOutputField {+ key: string;+ label: string;+ /** Dotted path to read the value from, relative to its container.+ * Absent means the value is at `key`. e.g. "body.items", "start.dateTime". */+ value?: string;+ format?: string;+ children?: readonly PieceOutputField[];+ listItems?: readonly PieceOutputField[];+ labelKey?: string;+ /** The vendor declaring that keys under here vary per account and cannot be+ * enumerated. We omit such fields rather than invent names for them. */+ dynamicKey?: boolean;+ }+ export interface PieceOutputSchema {+ fields: readonly PieceOutputField[];+ itemLabel?: string;+ }+ ```+ Add `outputSchema?: PieceOutputSchema;` to `PieceAction`.++2. Create `outputs.ts` exporting `UnmappableOutputError` (mirroring+ `UnmappablePropertyError` in `properties.ts`) and `toOutputTypes`:+ ```ts+ export class UnmappableOutputError extends Error {+ constructor(piece: string, action: string) {+ super(`${piece}.${action} declares no outputSchema, so Carbon cannot describe what it returns.`);+ this.name = "UnmappableOutputError";+ }+ }+ ```++3. `toOutputTypes(schema: PieceOutputSchema): Record<string, ValueType>` maps each+ top-level field to a named output. Mapping rules:++ | descriptor | Carbon |+ |---|---|+ | `listItems` present | `t.list(t.record(<element fields>))` |+ | `children` present | `t.record(<child fields>)` |+ | `format: "datetime"` | `t.date` |+ | `format: "number"` | `t.number` |+ | `format: "boolean"` | `t.boolean` |+ | `format` url/email/image/filesize, or absent | `t.string` |+ | `dynamicKey: true` | **omit the field entirely** |++ Recurse for `children` and `listItems`. A container with neither is a leaf.+ Because `list.of` refuses another list (Task 2), a `listItems` entry that itself+ carries `listItems` must map its inner list to `t.string` rather than throwing —+ the raw `result` output remains the way to reach it. Add a comment saying so.++4. Export a companion `outputPaths(schema)` returning, for each emitted output, the+ dotted `value` path (or `key` when `value` is absent) plus the same recursive+ structure — Task 7 needs it to project the real response. Keep it in this file so+ the type mapping and the path extraction can never disagree about which fields exist.++5. Create `outputs.test.ts` using the REAL Google Calendar schema as a fixture (copy the+ literal from the installed piece; do not import the package in a unit test).+ Cover: `google_calendar_get_events` maps `items` to `list<record>` with `summary`,+ `startDateTime` (date, from `start.dateTime`), `organizerEmail` (string, from+ `organizer.email`); `create_google_calendar_event` maps `start`/`end`/`organizer`+ to nested records via `children`; a `dynamicKey: true` field is omitted; each+ `format` maps to the right primitive; and `outputPaths` returns the dotted paths+ matching the type map's keys.++**Verify:**+```bash+cd packages/jobs && pnpm exec vitest run src/workflows/integrations/outputs.test.ts+# Expected: the new test file passes with zero failures+pnpm exec turbo run typecheck --filter=@carbon/jobs+# Expected: "Tasks: 1 successful, 1 total"+```++**Out of scope:** `catalog.ts` (Task 6) and the run-time projection (Task 7). Do not+change `properties.ts` — the input side is unaffected.++---++## Task 6: Emit typed integration outputs; refuse an action with no schema++**Depends on:** Task 2, Task 5++**Files:**+- Modify: `packages/jobs/src/workflows/integrations/catalog.ts` — typed outputs, `count`, refuse a schema-less action+- Modify: `.claude/rules/workflow-integrations.md` — update the "Adding a piece" checklist and the outputs non-goal++**Steps:**++1. In `catalog.ts`, `buildPieceActionDeclarations` currently emits+ `outputs: { result: { kind: "primitive", of: "string" } }` for every action.+ Replace with:+ ```ts+ if (action.outputSchema === undefined) {+ throw new UnmappableOutputError(pieceName, actionName);+ }+ const outputs = {+ ...toOutputTypes(action.outputSchema),+ // `compare` has no "is empty" operator on lists, so "did anything come back?"+ // is otherwise inexpressible.+ count: { kind: "primitive", of: "number" } as const,+ // Retained so every already-saved workflow referencing `result` keeps working.+ result: { kind: "primitive", of: "string" } as const+ };+ ```+ Throwing fails `generate:workflow-catalog`, which then writes no files — the same+ posture `UnmappablePropertyError` already has for inputs.++2. If `toOutputTypes` returns a key named `count` or `result`, the piece's own field+ would be shadowed. Guard it: prefix a colliding vendor key with the piece's own+ naming rather than silently dropping it, or STOP and report if a collision is found+ in the two allowlisted actions. (Checked at planning time: neither+ `google_calendar_get_events` nor `create_google_calendar_event` declares a `count`+ or `result` field, so this is a guard, not an expected case.)++3. Update `.claude/rules/workflow-integrations.md`:+ - The "Non-goals (v1)" line currently reads that mapping a piece's output schema is+ a non-goal and `outputs` is `{ result: t.string }`. Replace it with a short+ statement of the new behaviour: outputs are derived from the piece's own+ `outputSchema`, `result` is retained as the raw escape hatch, and an action+ without an `outputSchema` is refused by the generator.+ - Add a line to the "Adding a piece" checklist: verify every allowlisted action+ ships an `outputSchema` (coverage is binary per piece — ~100% on Google Calendar,+ Sheets, Airtable, Notion, GitHub, Slack; 0% on HubSpot, Salesforce, Jira, Shopify,+ Excel-365, Xero), because the generator will refuse the piece otherwise.++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=@carbon/jobs+# Expected: "Tasks: 1 successful, 1 total"+```+Catalog regeneration is Task 8 — do not run the generator yet.++**Out of scope:** the allowlist's prop hiding (Task 13) and the run-time projection+(Task 7).++---++## Task 7: Project the vendor response into record outputs at run time++**Depends on:** Task 3, Task 6++**Files:**+- Modify: `packages/jobs/src/workflows/actions/integration.ts` — build record outputs from the real response+- Create: `packages/jobs/src/workflows/actions/integration-outputs.test.ts`++**Steps:**++1. In `runIntegrationAction`, the success path currently returns+ `outputs: { result: { kind: "primitive", of: "string", value: JSON.stringify(result) } }`.+ Extend it to also project the declared outputs using `outputPaths` (Task 5) and+ `fromColumn` (Task 3):+ - walk each output's dotted path against the raw `result` object;+ - shape the value with `fromColumn(declaredType, rawAtPath)`, which already yields+ null for anything missing or unusable;+ - set `count` to the length when the projected value is a list, else `result === undefined ? 0 : 1`;+ - keep `result` exactly as today.++2. **Never throw from projection.** A vendor response that does not match its declared+ schema must degrade field-by-field to null, not fail the step — `outputSchema` is+ unvalidated upstream (`run()` returns `Promise<unknown | void>` and nothing checks+ it anywhere), so treating it as a contract at run time would break real workflows.+ Wrap the projection in a try/catch that falls back to `{ count, result }` alone and+ logs at warn level. If you find yourself adding a validation error path, STOP and+ report — that contradicts the spec.++3. Create `integration-outputs.test.ts` covering: a realistic Google Calendar+ `get_events` response projects `items` to a list of records with the right field+ values; a missing `organizer` yields null rather than throwing; `count` matches the+ item count; `count` is 0 for an empty list; `result` still holds the full raw JSON;+ and a response of an entirely unexpected shape still returns `{ count, result }`+ without throwing. Follow the existing test style under+ `packages/jobs/src/workflows/`; stub the piece action rather than making a network+ call.++**Verify:**+```bash+cd packages/jobs && pnpm exec vitest run src/workflows/actions/integration-outputs.test.ts+# Expected: the new test file passes with zero failures+pnpm exec turbo run typecheck --filter=@carbon/jobs+# Expected: "Tasks: 1 successful, 1 total"+```++**Out of scope:** the connection/auth path in the same file — it was verified correct+and must not be touched.++---++## Task 8: Regenerate and verify the workflow catalog++**Depends on:** Task 6 AND Task 13. **Run this ONCE, after both have landed** — the+generator has two inputs changing in this plan (typed outputs from Task 6, hidden props+from Task 13), and running it against a half-changed allowlist just produces a diff you+throw away. Its position in the Progress list reflects that.++**Files:**+- Modify (generated, do not hand-edit): `packages/workflows/src/catalog/actions.generated.ts`, `events.generated.ts`, `labels.generated.ts`, `help.generated.ts`++**Steps:**++1. Run the generator. It reads the allowlist, loads each piece, and writes all four+ generated files:+ ```bash+ pnpm run generate:workflow-catalog+ ```++2. Inspect the diff on `actions.generated.ts` and confirm+ `WORKFLOW_INTEGRATION_CATALOG` now carries record-shaped outputs for both+ allowlisted actions plus `count` and `result`. If either action still shows only+ `{ result }`, Task 6 did not take effect — STOP and report.++3. Run the staleness check, which rebuilds from the same six inputs and compares:+ ```bash+ pnpm run check:workflow-catalog+ ```++4. Regenerating changes label text, so refresh the translation catalogs per+ `.claude/rules/i18n-lingui-system.md`:+ ```bash+ pnpm run lingui:extract && pnpm run lingui:clean+ ```+ If either script does not exist, skip this step and report it rather than inventing+ a command.++**Verify:**+```bash+pnpm run check:workflow-catalog+# Expected: "check-workflow-catalog: ok — ... 17 entities, 16 actions, 2 integration steps, ..."+# The entity count MUST still be 17 — records are not entities, so this number must not move.+pnpm exec turbo run typecheck --filter=@carbon/workflows+# Expected: "Tasks: 1 successful, 1 total"+```++**Out of scope:** hand-editing any `*.generated.ts` file. If the generated output is+wrong, fix the generator input and re-run.++---++## Task 9: Widen the filter node schema with `operation`++**Depends on:** none structurally, but land after Task 2 so Task 10 can follow immediately++**Files:**+- Modify: `packages/workflows/src/definition/schema.ts` — add `operation`, `field`, `flatten` to `filterNode.data`+- Modify: `packages/workflows/src/definition/schema.test.ts` — add the back-compat case++**Steps:**++1. In `schema.ts`, `filterNode.data` is currently+ `{ source, combinator, clauses }`. Add three optional-with-default fields:+ ```ts+ export const dataOperationSchema = z.enum([+ "filter", "count", "first", "last", "pluck", "join"+ ]);+ export type DataOperation = z.infer<typeof dataOperationSchema>;+ ```+ and in `filterNode.data`:+ ```ts+ operation: dataOperationSchema.default("filter"),+ /** Which field `pluck` projects. A dotted path into the source's record type. */+ field: z.string().optional(),+ /** `pluck` only: collapse a list-valued field into one flat list, since+ * list<list<T>> is unrepresentable. Defaults FALSE so stored data never carries a+ * flag that means nothing — the form sets it true when the chosen field is+ * list-valued, which is the only case where it applies. */+ flatten: z.boolean().default(false)+ ```++2. **Do not bump `CURRENT_DEFINITION_FORMAT_VERSION`** (currently 4) and do not add a+ `normalize.ts` migration. An existing saved node has no `operation` key, so the+ default makes it parse as `"filter"` and behave exactly as before. This is the whole+ reason the spec chose to widen in place rather than rename the node type.++3. Add a test asserting a filter node parsed from JSON with **no** `operation`, `field`+ or `flatten` keys yields `operation === "filter"` and `flatten === false`, and that+ its `source`/`combinator`/`clauses` are unchanged.++**Verify:**+```bash+cd packages/workflows && pnpm exec vitest run+# Expected: all pass, including the new back-compat test+pnpm exec turbo run typecheck --filter=@carbon/workflows+# Expected: "Tasks: 1 successful, 1 total" — note this will FAIL to typecheck any+# exhaustive switch that must now handle the new operations; that is Task 10's job.+# If typecheck fails ONLY inside nodes.ts/filter.ts, proceed to Task 10.+```++**Out of scope:** the file extraction (Task 10a), per-operation behaviour and+runtime (Task 10b), UI (Task 12).++---++## Task 10a: Extract the data node kind out of `nodes.ts`++**Depends on:** Task 9++**Files:**+- Create: `packages/workflows/src/definition/kinds/data.ts`+- Modify: `packages/workflows/src/definition/nodes.ts` — import the kind instead of defining it inline+- Copy from (precedent): `packages/workflows/src/runtime/filter.ts` — the runtime layer ALREADY splits one file per node kind (`action.ts`, `lookup.ts`, `compute.ts`, `condition.ts`, `integration.ts`, `filter.ts`); this task brings the definition layer in line with that.++**Steps:**++1. `definition/nodes.ts` is **840 lines** and holds all seven node kinds inline. Task 10b+ adds a six-operation matrix across `outputs` / `loopList` / `checkTypes` /+ `checkConfig`, which would push it toward 1000+ and turn the tidiest kind block (36+ lines today) into the messiest. Extract first, then grow.++2. Move `filterLoopList` and the whole `filter:` entry of `NODE_KINDS` into+ `definition/kinds/data.ts`, exporting it as `dataNodeKind`. Keep the node type id+ `"filter"` — only the file moves.++3. The `NodeKind<N>` interface is not currently exported from `nodes.ts`. Export it (and+ `NodeContext`, `LoopList`, `NodeOutputs` if not already) so the extracted file can type+ its export. Import the shared helpers it needs (`checkClauses`, `clauseConfigIssues`,+ `incomplete`) rather than duplicating them — if that creates an import cycle+ (`nodes.ts` -> `kinds/data.ts` -> `nodes.ts`), move those three helpers into a sibling+ `definition/kinds/shared.ts` instead. Do NOT copy them.++4. `nodes.ts` then reads `filter: dataNodeKind,` in its `NODE_KINDS` map. `NODE_KINDS` is+ a **total** mapped type over `WorkflowNodeType`, so a missing entry is a compile error+ — that safety is unchanged by the move.++5. This task changes no behaviour. It is a pure file move.++**Verify:**+```bash+cd packages/workflows && pnpm exec vitest run+# Expected: EXACTLY the baseline count from Task 9 — a file move must not change any test+pnpm exec turbo run typecheck --filter=@carbon/workflows+# Expected: "Tasks: 1 successful, 1 total"+wc -l src/definition/nodes.ts+# Expected: meaningfully below 840 — the file must SHRINK, never grow, in this task+```++**Out of scope:** any per-operation behaviour (Task 10b). Extract only.++---++## Task 10b: One operation table driving type, runtime and UI++**Depends on:** Task 2, Task 10a++**Files:**+- Modify: `packages/workflows/src/definition/kinds/data.ts` — the operation table plus per-operation `outputs` / `loopList` / `checkTypes` / `checkConfig`+- Modify: `packages/workflows/src/runtime/filter.ts` — execute via the same table+- Modify: `packages/workflows/src/definition/schema.ts` — derive the enum from the table+- Modify: `packages/workflows/src/runtime/filter.test.ts` and the data-kind test file++**Steps:**++1. **The point of this task is that one concept lives in one place.** A naive+ implementation spreads "what each operation does" across four lists — the schema enum,+ the output-type switch, the runtime switch, and the form's dropdown — with nothing+ keeping them in sync. Instead declare a single table in `kinds/data.ts`:++ ```ts+ export interface DataOperationSpec {+ /** Shown in the builder's operation dropdown. */+ label: MessageDescriptor;+ /** The `result` type, or undefined when the source cannot support this operation+ * (which reads as "not configured" and suppresses downstream type errors). */+ resultType(source: ValueType, node: FilterNode, ctx: NodeContext): ValueType | undefined;+ /** Whether this operation exposes a loop item — only `filter` does, which is what+ * keeps `ItemRef` meaning exactly one thing. */+ loops: boolean;+ /** Clause rows apply to this operation. */+ usesClauses: boolean;+ }+ export const DATA_OPERATIONS = { filter: {...}, count: {...}, ... }+ satisfies Record<string, DataOperationSpec>;+ export type DataOperation = keyof typeof DATA_OPERATIONS;+ ```++2. Derive the zod enum from the table so the two can never disagree:+ `z.enum(Object.keys(DATA_OPERATIONS) as [DataOperation, ...DataOperation[]])`.+ If Task 9 hard-coded the enum literal, replace it here.++3. `resultType` per operation, given the source's resolved type `S`:++ | operation | requires | `result` |+ |---|---|---|+ | `filter` | `S` is `list<T>` | `list<T>` (unchanged) |+ | `count` | `S` is `list<T>` | `number` |+ | `first` / `last` | `S` is `list<T>` | `T` |+ | `pluck` | `S` is `list<record>`, `field` names a field of type `F` | `F`; if `F` is `list<X>` and `flatten`, then `list<X>` |+ | `join` | `S` is `list<primitive>` | `string` |++ Resolve `pluck`'s field with `walkPath(elementType, field.split("."), ctx.catalog)` so+ a dotted path into a nested record works. Return `undefined` whenever a requirement is+ unmet — the existing convention in this file.++4. The kind's `outputs`, `loopList`, `checkTypes` and `checkConfig` all read the table+ rather than switching on the operation themselves: `outputs` calls `resultType`,+ `loopList` returns the source list only when `spec.loops`, `checkTypes` reports a+ `TYPE_MISMATCH` when `resultType` returns undefined and only runs `checkClauses` when+ `spec.usesClauses`, and `checkConfig` adds an `incomplete(node, "field", …)` for+ `pluck` with no `field`. Keep `configured: () => true`.++5. In `runtime/filter.ts`, keep the source resolution and `ctx.record?.("source", …)`+ exactly as today, then dispatch on the operation. Put each operation's execution body next to+ its spec (add a `run` member to `DataOperationSpec`) so a reader sees the type rule and+ the behaviour together, and adding an operation is one table entry rather than four+ edits. `permission` stays `() => undefined`.++ Behaviour per operation: `filter` is today's loop verbatim (clause evaluation, the+ `unresolved` counter, `filterSummary`); `count` emits `items.length`; `first`/`last`+ emit the item or a null value when empty; `pluck` walks `field.split(".")` per item and,+ when `flatten`, splices list-valued results instead of nesting; `join` string-joins with+ `", "`. Cap results through `listValue`, which already applies `MAX_LIST_ITEMS`.++6. Give each operation a one-line summary in the existing voice (today's is+ `"Kept N of M."`): `"Counted N."`, `"Took the first of N."`, `"Took N values."`,+ `"Joined N values."`.++7. Tests: each operation's output type; `pluck` with a scalar field; `pluck` with a+ list-valued field and `flatten: true` giving a flat list; the same with `flatten: false`+ returning `undefined` (unrepresentable, so not configured); `loopList` present for+ `filter` and absent otherwise; `pluck` naming a missing field producing a type issue;+ empty-list `first`/`last` yielding null rather than failing. **Every pre-existing filter+ test must still pass unmodified** — that is the back-compat guarantee.++**Verify:**+```bash+cd packages/workflows && pnpm exec vitest run+# Expected: all pass, total greater than after Task 10a, and every pre-existing+# filter test passes UNCHANGED+pnpm exec turbo run typecheck --filter=@carbon/workflows+# Expected: "Tasks: 1 successful, 1 total"+```++**Out of scope:** the engine (`packages/jobs/.../engine/execute.ts`) — integration nodes+stay non-batchable; `node.type !== "action"` at execute.ts:261 is deliberate. Also out of+scope: the form (Task 12), which will read `DATA_OPERATIONS` for its dropdown rather than+listing operations again.++---++## Task 12: Filter form — operation selector, field picker, record sources++**Depends on:** Task 10++**Files:**+- Modify: `apps/erp/app/modules/workflows/ui/Builder/config/forms/FilterForm.tsx`+- Modify: `apps/erp/app/modules/workflows/ui/Builder/nodes/meta.ts` — palette label/description+- Copy from (precedent): `apps/erp/app/modules/workflows/ui/Builder/config/forms/IntegrationNodeForm.tsx` — its App/Step `Select` blocks (lines ~120–180) are the exact pattern for a labelled dropdown that resets dependent state on change++**Steps:**++1. Add an **Operation** `Select` above the source picker, using the+ `Select`/`SelectTrigger`/`SelectValue`/`SelectContent`/`SelectItem` imports from+ `@carbon/react` exactly as `IntegrationNodeForm.tsx` does. **Build the options by+ mapping over `DATA_OPERATIONS` from Task 10b** — do not re-list the operations here;+ that table is the single source of truth and its `label` is already a Lingui+ `MessageDescriptor`, resolved the same way `useWorkflowLabel` resolves catalog labels. Changing the operation clears `clauses` and+ `field` (a clause means nothing to `count`), mirroring how `handlePieceChange`+ clears dependent state.++2. Render the clause editor (`ClauseRow`, `CombinatorToggle`) **only when**+ `DATA_OPERATIONS[operation].usesClauses` — again reading the table rather than+ testing for `"filter"` by name. The heading currently reads+ `` t`Keep only the ${entityName} where…` `` — keep it for `filter` and use a neutral+ heading for other operations.++3. When `operation === "pluck"`, render a **Field** `Combobox` listing the fields of+ the source's element record type (read from the resolved source type via the+ builder catalog, not typed free-hand). Use `Combobox` from `@carbon/react` as+ `OptionsField.tsx` does. Show a dotted path for nested record fields.++4. The source list currently filters `vars.filter(v => v.type.kind === "list")`. Widen+ it so record-typed and `list<record>` variables are offered too, since the data node+ now works on them.++5. In `meta.ts`, the filter entry's name is "Filter" with description "Keeps only the+ items that match" and `defaultTitle: "Narrow a list"`. Change the display name to+ "Data" and generalise the description/defaultTitle. **Do not change the node type+ id** — it stays `filter`, which is what keeps saved workflows valid. Leave the+ `LEGACY_RENAMES` map (`{ entity: "compute" }`) untouched.++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=erp+# Expected: "Tasks: 1 successful, 1 total" and no TypeScript errors+pnpm run lint+# Expected: no new lint errors in the files touched+```++**Out of scope:** `graph.ts` default node data — a new filter node's data omits+`operation`, which the schema default fills in as `"filter"`; adding it explicitly is+unnecessary and would be the only place the default is written twice.++---++## Task 13: Tier 1+2 prop hiding, and `advancedInputs` on the declaration++**Depends on:** none (independent of the record work)++**Files:**+- Modify: `packages/jobs/src/workflows/integrations/allowlist.ts` — add a `props` hide-list+- Modify: `packages/jobs/src/workflows/integrations/catalog.ts` — apply tier-1 rules and tier-2 overrides+- Modify: `packages/jobs/src/workflows/integrations/properties.ts` — `toPropsValue` applies pinned values+- Modify: `packages/jobs/src/workflows/integrations/properties.test.ts` — pinned-value cases++**Steps:**++1. In `allowlist.ts`, extend `AllowlistEntry` with:+ ```ts+ /** Per-action prop overrides. Written when a piece is allowlisted — the few cases+ * where the vendor's own default is WRONG for us, not merely uninteresting. */+ props?: Record<string, Record<string, { hidden?: boolean; value?: unknown; label?: string }>>;+ ```+ and add to the `google-calendar` entry:+ ```ts+ props: {+ google_calendar_get_events: {+ // "Expand Recurring Event?" defaults to false, which silently drops every+ // recurring meeting from a date-filtered query. Always true for us.+ singleEvents: { hidden: true, value: true },+ // Required with a sensible vendor default; nothing for a person to decide.+ event_types: { hidden: true }+ }+ }+ ```++2. In `catalog.ts`, before emitting an input, apply in order:+ - **Tier 2** — if the allowlist marks the prop `hidden`, do not emit it.+ - **Tier 1** — do not emit a prop that is `required` AND has a `defaultValue`; do not+ emit a prop whose choices contain exactly one value.+ - A hidden REQUIRED prop with **no** allowlist `value` and **no** piece+ `defaultValue` must **throw** and fail the generator — otherwise the piece call+ goes out missing a required field and fails in the customer's face.++ **Emit hidden props as `advancedInputs`, a second map beside `inputs`** on the+ integration declaration (and on `CatalogIntegration` in+ `packages/workflows/src/definition/catalog.ts`). Task 14 renders that map and MUST NOT+ re-derive the hide rules in the browser — one set of rules, evaluated once, at build+ time.++ *Recorded decision, so it does not read as an accident:* the alternative was a+ `hidden: true` flag on `CatalogInput` with the form filtering. Two maps won because+ `validateCatalogInputs` and every `required` check iterate `inputs` — a hidden-but-+ present required input would make the validator demand a field the author was never+ shown. Splitting the maps makes that unrepresentable rather than merely avoided.++3. In `properties.ts`, `toPropsValue` must merge pinned values at RUN time. Give it+ access to the per-action overrides and, for each prop with a `value`, set it when the+ node supplied nothing. **Pinned values are never stored on the node** — that is what+ lets us change our mind and fix every existing workflow at once.++4. Add tests: a pinned `singleEvents: true` reaches `propsValue` when the node has no+ such input; a node-supplied value wins over the pin (Task 14's Advanced override);+ a hidden prop with a piece default is simply absent from `propsValue`, letting the+ piece apply its own default.++**Verify:**+```bash+cd packages/jobs && pnpm exec vitest run src/workflows/integrations/+# Expected: all integration tests pass, including the new pinned-value cases+pnpm exec turbo run typecheck --filter=@carbon/jobs+# Expected: "Tasks: 1 successful, 1 total"+```+Then re-run Task 8's regeneration, since the emitted inputs have changed:+```bash+pnpm run generate:workflow-catalog && pnpm run check:workflow-catalog+# Expected: check passes; the diff shows singleEvents and event_types gone from+# the get_events integration step's inputs+```++**Out of scope:** the connection auto-hide (Task 14 — it depends on how many+connections exist at edit time, so it is UI, not catalog).++---++## Task 14: Advanced properties section on the integration form++**Depends on:** Task 13++**Files:**+- Modify: `apps/erp/app/modules/workflows/ui/Builder/config/forms/IntegrationNodeForm.tsx`+- Copy from (precedent): the same file's existing input loop (`inputNames.map(... renderStepInput ...)`) — Advanced reuses `renderStepInput` verbatim rather than a second renderer++**Steps:**++1. **Auto-hide a lone connection.** The form already calls `useWorkflowOptions` for the+ connection provider and holds the result in `connections`. When+ `connections.length === 1`, do not render the `connectionId` field, and ensure the+ node stores that connection's id (write it via `handleInputChange` on mount if the+ node has no `connectionId` yet). When `connections.length > 1`, render the field as+ today. **The value must still be stored** — a second connection added later must not+ silently repoint existing workflows.++2. **Advanced properties.** Add a collapsed section at the bottom of the form listing+ every input in the step's `advancedInputs` map (emitted by Task 13), rendered with the+ SAME `renderStepInput` helper the visible inputs use. Do not re-derive the hide rules+ here — the catalog already evaluated them.++3. Use an existing disclosure component from `@carbon/react` for the collapse — grep+ `packages/react/src/` for an Accordion/Collapsible before writing one. Label it+ "Advanced properties" via Lingui.++4. A value set in Advanced is stored on the node and must win over the tier-2 pin —+ Task 13 step 3 already implements that precedence (node value beats pin).++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=erp+# Expected: "Tasks: 1 successful, 1 total"+pnpm run lint+# Expected: no new lint errors in the touched files+```++**Out of scope:** changing which props are hidden — that is Task 13's allowlist data.++---++## Task 15: Builder support for walking into record fields++**Depends on:** Task 2++**Files:**+- Modify: `apps/erp/app/modules/workflows/ui/Builder/fields/variableMenu.ts` — offer record fields+- Modify: `apps/erp/app/modules/workflows/ui/Builder/labelKeys.ts` — `describeValueType` and `outputLabel`++**Steps:**++1. `variableMenu.ts` builds the variable picker by walking entity properties through the+ catalog. Add a record branch that walks `type.fields` directly — no catalog lookup,+ because a record is structural. Nest recursively for record-valued fields, and for a+ `list<record>` offer the element's fields the same way the code already handles a+ list of entities.++2. Field LABELS come from the record type itself, not from `WORKFLOW_LABELS` — vendor+ field names are vendor data, the same reasoning that makes customer custom-field+ names deliberately untranslated (`catalog.ts` `getPropertyLabel` reads only the+ overlay). Use the field key as the display name, humanised the way the existing+ fallback does.++3. In `labelKeys.ts`, `describeValueType` renders types as "a list of Customer records",+ "text", "a number". Add record cases: "an object", "a list of objects". Also check+ `outputLabel` — it maps `record`/`before`/`after` to display names and falls through+ to the raw name otherwise; add friendly names for the new `count` output (and `items`+ if the generated catalog uses that key).++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=erp+# Expected: "Tasks: 1 successful, 1 total"+pnpm run lint+# Expected: no new lint errors in the touched files+```++**Out of scope:** `ValueField`, `TemplateField` and `ClauseRow` — records are refused in+those positions by construction (Task 2's `rendersAsText`/`operatorsForType` and Task 4's+input guard), so they need no record handling.++---++## Task 16: End-to-end verification++**Depends on:** all previous tasks++**Steps:**++1. Full scoped verification of every touched package:+ ```bash+ pnpm exec turbo run typecheck --filter=@carbon/workflows --filter=@carbon/jobs --filter=erp+ cd packages/workflows && pnpm exec vitest run+ cd ../jobs && pnpm exec vitest run src/workflows/+ cd ../.. && pnpm run check:workflow-catalog+ pnpm run lint+ ```+ Do NOT run a whole-repo `pnpm run typecheck` — `AGENTS.md` records that it OOMs.++2. Confirm the structural guarantees this plan added, which no single task's Verify+ block covers on its own:+ ```bash+ wc -l packages/workflows/src/definition/nodes.ts+ # Expected: BELOW the 840-line baseline — Task 10a shrank it and Task 10b put the+ # operation matrix in kinds/data.ts, so it must not have grown.+ grep -c "kind === \"record\"" apps/erp/app/modules/workflows/ui/Runs/RuntimeValueView.tsx+ # Expected: at least 1 — a record must render in run history, not fall through.+ ```++3. Walk the spec's Acceptance Criteria list and check each one off in the spec file.+ The ones needing a running app (variable picker contents, Advanced section, the+ calendar dropdown error state, single-connection auto-hide) require the `/run` skill+ or the user's own browser — ask the user before starting the app, and report which+ criteria are verified by tests versus by hand.++4. Update `.claude/rules/workflow-integrations.md` for anything that drifted during+ implementation, per `.claude/rules/keep-sources-in-sync.md`.++5. Report what was done, what passed, and anything deferred. **Do not commit** — the+ user has a standing rule that commits require explicit permission.++**Verify:** every command in step 1 exits zero; test totals are at or above the+recorded baselines (436 in `@carbon/workflows`); `check-workflow-catalog` still reports+17 entities.++**Out of scope:** committing, pushing, opening a PR.diff --git a/.ai/plans/2026-09-01-connection-reconnect-prompts.md b/.ai/plans/2026-09-01-connection-reconnect-prompts.mdnew file mode 100644index 0000000000..65a1a6f52e--- /dev/null+++ b/.ai/plans/2026-09-01-connection-reconnect-prompts.md@@ -0,0 +1,260 @@+# Under-scoped connection reconnect prompts — implementation plan++**Spec / source:** `.ai/specs/implemented/2026-09-01-connection-reconnect-prompts.md`+**Branch:** `feat/active-pieces-integration` · never `git commit` (user's rule)+**Filters:** `@carbon/ee`, `@carbon/jobs`, `erp`, `@carbon/workflows` (scope every typecheck)++## Progress++- [x] Task 1: ee — `grantedScopes` / `missingScopes`; revive refreshes `metadata`; tests+- [x] Task 2: jobs — `requiredScopesFor`; barrel export; GCal `metadata.scopes`; tests+- [x] Task 3: Runner — pre-check + `missing_scope` mapping; tests+- [x] Task 4: Options provider `reconnect` state + node banner+- [x] Task 5: Accounts tab — `requiredScopes` in loader, badge/copy, Reconnect button+- [x] Task 6: Card health includes the scope check+- [x] Task 7: Regen catalog + Lingui; rule/spec sync+- [x] Task 8: Verification + run log++## Dependencies++```+1 → 3, 4, 5, 6 2 → 3, 4, 5, 6 7 after 2–6 8 last+```+Tasks 1 and 2 in parallel; then 3–6 in parallel (disjoint files).++---++## Task 1: ee — scope predicates + revive metadata++**Files:** Modify `packages/ee/src/integrations/connections.ts`, `packages/ee/src/integrations/connections.test.ts`++**Steps:**+1. Below `connectionsHealthy`, add:+ ```ts+ /**+ * Scopes the vendor said it granted, recorded by the callback from the token+ * response (`metadata.scopes`; Slack separates with commas, the v2 backfill with+ * spaces). `null` when the connection predates recording or the vendor does not+ * report them — a caller must never flag what it cannot see.+ */+ export function grantedScopes(+ connection: Pick<IntegrationConnection, "metadata">+ ): string[] | null {+ const raw = connection.metadata.scopes;+ if (typeof raw !== "string") return null;+ const scopes = raw.split(/[\s,]+/).filter((s) => s.length > 0);+ return scopes.length === 0 ? null : scopes;+ }++ /** Required scopes the connection does not hold. Empty when grants are unknown. */+ export function missingScopes(+ connection: Pick<IntegrationConnection, "metadata">,+ required: readonly string[]+ ): string[] {+ const granted = grantedScopes(connection);+ if (granted === null) return [];+ const have = new Set(granted);+ return required.filter((scope) => !have.has(scope));+ }+ ```+2. In `createConnection`'s revive `update({...})` add+ `...(args.metadata === undefined ? {} : { metadata: args.metadata as never }),` with a one-line+ comment: a re-consent's token response is authoritative (its `scopes` is how "reconnect" clears).+3. Tests (new `describe("scopes")` + one revive case):+ - `grantedScopes({ metadata: { scopes: "a,b" } })` → `["a","b"]`; `"a b"` → same; `{}` → `null`; `""` → `null`.+ - `missingScopes({ metadata: { scopes: "a" } }, ["a","c"])` → `["c"]`; unknown → `[]`.+ - Revive: `makeClient({ status: "Revoked" })` with `metadata: { scopes: "old" }` on the row; `createConnection` same name with `metadata: { scopes: "new" }` → `rows.get(CONNECTION)!.metadata.scopes === "new"`. (Check `makeClient`'s `update` handles a `metadata` key; if not, extend the stub's `update` to assign it.)++**Verify:**+```bash+pnpm --filter @carbon/ee exec vitest run src/integrations/connections.test.ts # pass incl. new cases+pnpm exec turbo run typecheck --filter=@carbon/ee # no errors+```++---++## Task 2: jobs — `requiredScopesFor`, GCal scopes map++**Files:** Modify `packages/jobs/src/workflows/integrations/oauth.ts`, `index.ts`, `allowlist.ts`, `oauth.test.ts`++**Steps:**+1. `oauth.ts`:+ ```ts+ /** The scopes a connection for this piece must hold — exactly what `buildConsentUrl`+ * requests, so "reconnect" always grants what the check demands. */+ export async function requiredScopesFor(pieceName: string): Promise<readonly string[]> {+ const entry = PIECE_ALLOWLIST[pieceName];+ if (entry === undefined) return [];+ return entry.oauth.scope ?? (await getPieceOAuth2Auth(pieceName)).scope;+ }+ ```+2. `index.ts`: add `requiredScopesFor` to the `./oauth` export list.+3. `allowlist.ts` google-calendar row: add `metadata: { scopes: "scope" }` after `accountLabel`, comment: Google reports granted scopes too; recorded so a future scope change can be detected.+4. `oauth.test.ts`: `requiredScopesFor("slack")` → 16 unique, contains `channels:read`; `requiredScopesFor("google-calendar")` deep-equals `(await getPieceOAuth2Auth("google-calendar")).scope`; `requiredScopesFor("nope")` → `[]`.++**Verify:**+```bash+pnpm --filter @carbon/jobs exec vitest run src/workflows/integrations/ # all pass+pnpm exec turbo run typecheck --filter=@carbon/jobs+```++---++## Task 3: Runner — pre-check + vendor-error mapping++**Files:** Modify `packages/jobs/src/workflows/actions/integration.ts`, `packages/jobs/src/workflows/actions/integration.test.ts`++**Steps:**+1. Import `missingScopes` from `@carbon/ee/integrations/connections` and `requiredScopesFor` from `../integrations/oauth`. Add:+ ```ts+ const reconnectCopy = (label: string) =>+ `The ${label} connection needs to be reconnected to grant the permissions this step uses — Settings → Integrations → ${label} → Accounts → Reconnect.`;+ const SCOPE_ERROR = /missing_scope|insufficient_scope|insufficient.?permission/i;+ ```+2. After the `owned` check (before resolving the token):+ ```ts+ // Deterministic first: a workspace connected before this piece needed a scope+ // fails here, without a vendor call, with words that name the fix.+ const missing = missingScopes(owned, await requiredScopesFor(pieceName));+ if (missing.length > 0) {+ logger?.warn?.(...) — if the file has no logger, skip logging; do NOT add a logger import just for this.+ return { ok: false, error: reconnectCopy(label) };+ }+ ```+3. In the final `catch`: `if (SCOPE_ERROR.test(message)) return { ok: false, error: reconnectCopy(label) };` before the generic `rejected this` return.+4. Tests: the module mock of `@carbon/ee/integrations/connections` lists exports explicitly — change it to+ `vi.mock("@carbon/ee/integrations/connections", async (importOriginal) => ({ ...(await importOriginal<typeof import("@carbon/ee/integrations/connections")>()), readConnection: ..., resolveConnectionAuth: ... }))`+ so the real `missingScopes` runs. The `../integrations/registry` mock must also expose `getPieceOAuth2Auth: vi.fn().mockResolvedValue({ scope: [] })` (google-calendar has no `oauth.scope` override). `readConnection`'s default mock row gets `metadata: {}`. Add:+ - "refuses before calling the vendor when the connection lacks a required scope": `readConnection` → `{ id, pieceName: "slack", metadata: { scopes: "chat:write" } }`, `pieceName: "slack"` → error matches `/reconnected .* Accounts → Reconnect/`, and the mocked `run` was not called;+ - "maps a vendor scope error to the reconnect copy": `run` rejects `new Error("An API error occurred: missing_scope")` → same copy.++**Verify:**+```bash+pnpm --filter @carbon/jobs exec vitest run src/workflows/actions/integration.test.ts # pass incl. 2 new+pnpm exec turbo run typecheck --filter=@carbon/jobs+```++---++## Task 4: Options provider `reconnect` + node banner++**Files:** Modify `apps/erp/app/modules/workflows/options-providers.server.ts`, `apps/erp/app/modules/workflows/ui/Builder/config/forms/IntegrationNodeForm.tsx`++**Steps:**+1. Provider: import `missingScopes` (ee) and `requiredScopesFor` (jobs). In `connectionProvider.resolve`:+ ```ts+ const usable = usableConnections(await readConnections(getCarbonServiceRole(), companyId, piece));+ const required = await requiredScopesFor(piece);+ const ready = usable.filter((row) => missingScopes(row, required).length === 0);+ // Connected, but every account predates a scope this piece now needs: the fix is a+ // re-consent, not a new account — say so instead of offering an empty list.+ if (ready.length === 0 && usable.length > 0) {+ return { options: [], errorCode: "reconnect", errorHref: `${path.to.integration(piece)}?tab=connections` };+ }+ return { options: ready.map(...same as today...), emptyHref: path.to.integrations };+ ```+2. `IntegrationNodeForm`: destructure `errorCode, errorHref` from the existing `useWorkflowOptions(...)` call. Where the "isn't connected yet" block renders (`piece && checked && !connected`), branch first:+ ```tsx+ {piece && checked && !connected && errorCode === "reconnect" ? (+ <div className="flex flex-col items-start gap-3 rounded-md border border-dashed p-4">+ <p className="text-sm text-muted-foreground">+ <Trans>{appName} is connected, but needs to be reconnected before workflow steps can use it.</Trans>+ </p>+ <Button asChild variant="secondary" isDisabled={isReadOnly}>+ <Link to={errorHref ?? `${path.to.integration(piece)}?tab=connections`} target="_blank" rel="noreferrer">+ <Trans>Reconnect {appName}</Trans>+ </Link>+ </Button>+ </div>+ ) : piece && checked && !connected ? ( …existing Connect block… ) : null}+ ```++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=erp+grep -n '"reconnect"' apps/erp/app/modules/workflows/options-providers.server.ts # ≥ 1 in connectionProvider+```++---++## Task 5: Accounts tab — badge, copy, Reconnect++**Files:** Modify `apps/erp/app/routes/x+/settings+/integrations.$id.tsx` (~line 912), `apps/erp/app/modules/settings/ui/Integrations/ConnectionsTab.tsx`+**Precedent:** the existing Add-account button + `connect` fetcher effect in the same file.++**Steps:**+1. Loader: import `requiredScopesFor` from `@carbon/jobs/integrations`; `connections` gains `requiredScopes: await requiredScopesFor(integrationId)` (as a plain `string[]`).+2. `ConnectionsTab`: `ConnectionRow` adds `"metadata"`; props add `requiredScopes: readonly string[]`; the drawer passes it (`integrations.$id.tsx` ~line 1698). Lift the `connect` fetcher's `load` into `const startConnect = (name: string) => connect.load(\`${path.to.api.integrationConnect(pieceName)}?name=${encodeURIComponent(name)}\`)` and pass `onReconnect={() => startConnect(connection.name)}` + `reconnecting={connect.state !== "idle"}` + `requiredScopes` to `ConnectionItem`.+3. `ConnectionItem`:+ - `const needsScopes = connectionUsable(connection) && missingScopes(connection, requiredScopes).length > 0;` (import `missingScopes` from `@carbon/ee/integrations/connections`).+ - Beside the status badge: `{needsScopes && <Badge variant="yellow" className="shrink-0"><Trans>Reconnect needed</Trans></Badge>}`.+ - Replace the "This account has stopped working. Add it again…" paragraph with:+ ```tsx+ {needsScopes ? (+ <span className="text-xs text-muted-foreground"><Trans>Connected before workflows needed extra permissions. Reconnect to grant them — everything else keeps working meanwhile.</Trans></span>+ ) : !connectionUsable(connection) ? (+ <span className="text-xs text-muted-foreground"><Trans>This account has stopped working. Reconnect it — workflow steps using it will fail until you do.</Trans></span>+ ) : null}+ ```+ - In the right-hand column, above the Disconnect form: `{(needsScopes || !connectionUsable(connection)) && (<Button size="sm" leftIcon={<LuPlug />} isLoading={reconnecting} onClick={onReconnect}><Trans>Reconnect</Trans></Button>)}`; wrap the column in a `VStack spacing={2} className="shrink-0 items-end"` so both buttons stack.++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=erp+grep -c "Reconnect" apps/erp/app/modules/settings/ui/Integrations/ConnectionsTab.tsx # ≥ 3+```++---++## Task 6: Card health includes the scope check++**Files:** Modify `apps/erp/app/modules/settings/settings.server.ts` (`getIntegrationHealth`)++**Steps:**+1. Imports: `connectionUsable, missingScopes, readConnections` from `@carbon/ee/integrations/connections`; `PIECE_ALLOWLIST, requiredScopesFor` from `@carbon/jobs/integrations` (this is a `.server.ts` module — server-only is fine).+2. After `const status = await (healthcheck …)(companyId, resolvedMetadata);` and before the `redis.set`:+ ```ts+ // A piece card is also unhealthy while any usable account predates a scope the+ // piece now needs — the step would fail with `missing_scope`. Checked here rather+ // than in the ee hook because only this side can see the allowlist's required list.+ let healthy = status;+ if (healthy && PIECE_ALLOWLIST[integration.id!] !== undefined) {+ const [rows, required] = await Promise.all([+ readConnections(getCarbonServiceRole(), companyId, integration.id!),+ requiredScopesFor(integration.id!)+ ]);+ healthy = !rows.some((row) => connectionUsable(row) && missingScopes(row, required).length > 0);+ }+ ```+ and use `healthy` in the `redis.set` and the returned `health`.++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=erp+```++---++## Task 7: Regen + docs++**Steps:**+1. `pnpm run generate:workflow-catalog && pnpm run check:workflow-catalog && pnpm run lingui:extract` (the GCal row change is metadata the generator ignores; Lingui picks up the new UI strings).+2. `.claude/rules/workflow-integrations.md`: under "Connections" add a short "Scopes drift" paragraph: `metadata.scopes` records the grant; `missingScopes` vs `requiredScopesFor`; the four surfaces; revive refreshes metadata.+3. Spec status → `implemented (2026-09-01)` + changelog line.++**Verify:**+```bash+pnpm run check:workflow-catalog # ok+grep -c "missingScopes\|requiredScopesFor" .claude/rules/workflow-integrations.md # ≥ 2+```++---++## Task 8: Verification + run log++**Files:** Create `.ai/runs/2026-09-01-connection-reconnect-prompts.md` (format: the two earlier run logs today)++**Steps:**+1. Gates: typecheck `@carbon/ee @carbon/jobs erp @carbon/workflows`; `pnpm --filter @carbon/ee test`; `pnpm --filter @carbon/jobs test` (services.test.ts env-gated, pre-existing); `pnpm --filter @carbon/workflows test`; biome on touched files.+2. Data check on dev: the backfilled Slack row has 10 scopes → `missingScopes` = the 6 piece-only scopes (compute with a one-off `node -e` against the row's `metadata.scopes` string and the allowlist list, or via psql string ops).+3. Browser matrix (spec AC 4–6) — user-driven after the Slack manifest update; record UNVERIFIED honestly.diff --git a/.ai/plans/2026-09-01-gmail-workflow-piece.md b/.ai/plans/2026-09-01-gmail-workflow-piece.mdnew file mode 100644index 0000000000..346de30c43--- /dev/null+++ b/.ai/plans/2026-09-01-gmail-workflow-piece.md@@ -0,0 +1,465 @@+# Gmail as a workflow integration piece — implementation plan++**Spec / source:** `.ai/specs/implemented/2026-09-01-gmail-workflow-piece.md`+**Research:** `.ai/research/2026-09-01-gmail-workflow-piece.md`+**Rule:** `.claude/rules/workflow-integrations.md` ("Adding a piece" checklist — followed verbatim; nothing generic changes)+**Branch:** `feat/active-pieces-integration`++Package names (for `--filter`): `@carbon/jobs`, `@carbon/ee`, `@carbon/workflows`, `erp` (apps/erp).+Whole-repo typecheck OOMs — always scope it. `@carbon/jobs` typecheck is `tsc --noEmit`; `@carbon/ee`+and `erp` use `tsgo --noEmit` (both via `pnpm --filter <pkg> typecheck`).++## Progress++- [x] Task 1: Pin `@activepieces/[email protected]` in `@carbon/jobs`+- [x] Task 2: The `gmail` allowlist row+- [x] Task 3: Registry, consent and pinned-value tests for the row+- [x] Task 4: Catalog test for the emitted Gmail step+- [x] Task 5: Gmail settings card + registration + uninstall hook+- [x] Task 6: Regenerate the workflow catalog + Lingui catalogs+- [x] Task 7: Docs: rule, AGENTS, `.env.example`, spec status+- [x] Task 8: End-to-end verification + run log+- [x] Task 9 (added after browser test): `integration` row migration + callback error logging + rule checklist fix++## Dependencies++```+1 → 2 → 3, 4, 6+5 independent of 2–4 (needs only Task 1's package for nothing; it references the piece by name)+6 → 7 → 8+```++Tasks 3, 4 and 5 may run in parallel once Task 2 is done. Task 6 must follow 2 (the generator+reads the allowlist). Task 8 last.++---++## Task 1: Pin `@activepieces/[email protected]` in `@carbon/jobs`++**Depends on:** none+**Files:**+- Modify: `packages/jobs/package.json` — add `"@activepieces/piece-gmail": "0.13.0"` to `dependencies`, alphabetically before `@activepieces/piece-google-calendar`+- Modify: `pnpm-lock.yaml` (by pnpm)++**Steps:**+1. `pnpm --filter @carbon/jobs add @activepieces/[email protected] --save-exact`+2. Confirm the dependency line reads exactly `"@activepieces/piece-gmail": "0.13.0"` (no `^`). If pnpm wrote a range, edit it to the bare version and run `pnpm install`.++**Verify:**+```bash+grep -n '"@activepieces/piece-gmail"' packages/jobs/package.json+# Expected: one line, version "0.13.0" with no ^ or ~+node -e 'const m=require("./packages/jobs/node_modules/@activepieces/piece-gmail");console.log(Object.keys(m.gmail.actions()).length)'+# Expected: 26+```++**Out of scope:** any other dependency; the piece's own transitive versions.++---++## Task 2: The `gmail` allowlist row++**Depends on:** 1+**Files:**+- Modify: `packages/jobs/src/workflows/integrations/allowlist.ts` — add a `gmail` entry to `PIECE_ALLOWLIST` after the `slack` entry+- Copy from (precedent): the `"google-calendar"` entry in the same file (same OAuth app, same `accountLabel`, same `metadata`)++**Steps:**+1. Append this entry to `PIECE_ALLOWLIST`, after `slack`:++```ts+ // Same Google OAuth app as Google Calendar; its own card, consent and connections.+ gmail: {+ package: "@activepieces/piece-gmail",+ version: "0.13.0",+ label: "Gmail",+ actions: ["gmail_send_email"],+ oauth: {+ clientIdEnv: "GOOGLE_OAUTH_CLIENT_ID",+ clientSecretEnv: "GOOGLE_OAUTH_CLIENT_SECRET",+ redirectUrlEnv: "GOOGLE_OAUTH_REDIRECT_URL",+ // SEND-ONLY, deliberately. The piece also asks for gmail.readonly and+ // gmail.compose, which Google classes as RESTRICTED: an app holding them must+ // pass an annual third-party CASA security assessment before anyone outside+ // its test users can consent. gmail.send is merely "sensitive" — the same+ // verification tier the Calendar scopes already need. Adding a read or reply+ // action is therefore a compliance decision, not a one-line edit.+ scope: ["https://www.googleapis.com/auth/gmail.send", "https://www.googleapis.com/auth/userinfo.email"]+ },+ accountLabel: {+ url: "https://www.googleapis.com/oauth2/v2/userinfo",+ field: "email"+ },+ metadata: { scopes: "scope" },+ props: {+ gmail_send_email: {+ // An array of {data,name} FILE objects; Carbon would send list<string>.+ // Deferred with the rest of attachments (needs a file value type).+ attachments: { omit: true },+ // Resolves the thread through messages.list, which needs gmail.readonly.+ in_reply_to: { omit: true },+ // Required-with-default would land it under Advanced, where switching it+ // on calls drafts.create → gmail.compose → 403. Pinned off and out.+ draft: { omit: true, value: false }+ }+ }+ }+```++2. Do not touch the `google-calendar` or `slack` entries.++**Verify:**+```bash+pnpm --filter @carbon/jobs typecheck+# Expected: no errors+pnpm --filter @carbon/jobs test -- src/workflows/integrations/registry.test.ts+# Expected: all existing tests pass (the row is loadable; Task 3 adds assertions)+```++**Out of scope:** `visibility.ts`, `properties.ts`, `catalog.ts`, `oauth.ts` — no generic change is needed; if the generator or any of these refuses the row, STOP and report rather than editing them.++---++## Task 3: Registry, consent and pinned-value tests for the row++**Depends on:** 2+**Files:**+- Modify: `packages/jobs/src/workflows/integrations/registry.test.ts` — add a `describe("gmail")` block after `describe("slack")`+- Modify: `packages/jobs/src/workflows/integrations/oauth.test.ts` — add one case to `describe("buildConsentUrl")` and one to `describe("requiredScopesFor")`+- Modify: `packages/jobs/src/workflows/integrations/visibility.test.ts` — add one case to `describe("pinnedValues")`+- Copy from (precedent): the `slack` cases in each of those files++**Steps:**+1. `registry.test.ts` — after the `describe("slack", …)` block:++```ts+describe("gmail", () => {+ it("loads the piece", async () => {+ const piece = await loadPiece("gmail");+ expect(Object.keys(piece.actions())).toContain("gmail_send_email");+ });++ it("exposes exactly the one allowlisted action", async () => {+ const actions = await getPieceActions("gmail");+ expect(Object.keys(actions)).toEqual(["gmail_send_email"]);+ });++ it("refuses the read and reply actions the piece has but the allowlist does not", async () => {+ await expect(getPieceAction("gmail", "gmail_search_email")).rejects.toThrow();+ await expect(getPieceAction("gmail", "gmail_reply_to_thread")).rejects.toThrow();+ await expect(getPieceAction("gmail", "send_email")).rejects.toThrow();+ });++ // The piece offers OAuth2 and a service-account CustomAuth; only the former is ours.+ it("finds the OAuth2 auth, whose scope list includes restricted scopes we do not request", async () => {+ const auth = await getPieceOAuth2Auth("gmail");+ expect(auth.tokenUrl).toBe("https://oauth2.googleapis.com/token");+ expect(auth.scope).toContain("https://www.googleapis.com/auth/gmail.readonly");+ });+});+```++2. `oauth.test.ts` — inside `describe("buildConsentUrl")`, after the Slack sixteen-scopes case:++```ts+ it("asks Google for send-only Gmail scopes, offline, with forced consent", async () => {+ const url = new URL(+ buildConsentUrl({+ entry: PIECE_ALLOWLIST.gmail!,+ auth: await getPieceOAuth2Auth("gmail"),+ app,+ state: "s"+ })+ );+ expect(url.origin + url.pathname).toBe("https://accounts.google.com/o/oauth2/auth");+ expect(url.searchParams.get("scope")).toBe(+ "https://www.googleapis.com/auth/gmail.send email"+ );+ expect(url.searchParams.get("access_type")).toBe("offline");+ expect(url.searchParams.get("prompt")).toBe("consent");+ });+```++ and inside `describe("requiredScopesFor")`:++```ts+ it("is send-only for gmail, never the piece's restricted scopes", async () => {+ const scopes = await requiredScopesFor("gmail");+ expect(scopes).toEqual(["https://www.googleapis.com/auth/gmail.send", "https://www.googleapis.com/auth/userinfo.email"]);+ });+```++ If `requiredScopesFor` is not already imported in that file, add it to the existing import from `./oauth`.++3. `visibility.test.ts` — inside `describe("pinnedValues")`, after "reads the real allowlist entry":++```ts+ it("pins gmail's draft flag off even though the prop is omitted from the form", () => {+ expect(pinnedValues("gmail", "gmail_send_email")).toEqual({ draft: false });+ });+```++ If `pinnedValues` for an `omit` override with a `value` does NOT include that value, STOP and report — the spec relies on `omit + value` behaving as Slack's `sendAsBot` does.++**Verify:**+```bash+pnpm --filter @carbon/jobs test -- src/workflows/integrations/registry.test.ts src/workflows/integrations/oauth.test.ts src/workflows/integrations/visibility.test.ts+# Expected: all pass, including the 7 new cases+```++**Out of scope:** `connections.test.ts` (ee) — nothing there is piece-specific.++---++## Task 4: Catalog test for the emitted Gmail step++**Depends on:** 2+**Files:**+- Modify: `packages/jobs/src/workflows/integrations/catalog.test.ts` — add a `describe("buildPieceActionDeclarations (gmail)")` block+- Copy from (precedent): `describe("buildPieceActionDeclarations (slack)")` in the same file++**Steps:**+1. Append:++```ts+describe("buildPieceActionDeclarations (gmail)", () => {+ it("emits the one send step with the send-only prop set", async () => {+ const all = await buildPieceActionDeclarations();+ const ids = Object.keys(all).filter((id) => id.startsWith("integration.gmail."));+ expect(ids).toEqual(["integration.gmail.gmail_send_email"]);++ const send = all["integration.gmail.gmail_send_email"]!;+ expect(Object.keys(send.inputs).sort()).toEqual(+ [+ "connectionId",+ "receiver",+ "cc",+ "bcc",+ "subject",+ "body",+ "reply_to",+ "sender_name",+ "from"+ ].sort()+ );+ // Required with a vendor default: hidden, still reachable, sent as plain_text.+ expect(Object.keys(send.advancedInputs ?? {})).toEqual(["body_type"]);+ for (const gone of ["attachments", "in_reply_to", "draft"]) {+ expect(send.inputs).not.toHaveProperty(gone);+ expect(send.advancedInputs ?? {}).not.toHaveProperty(gone);+ }+ expect(send.inputs.receiver!.type).toEqual({+ kind: "list",+ of: { kind: "primitive", of: "string" }+ });+ expect(send.outputs).toHaveProperty("count");+ expect(send.outputs).toHaveProperty("result");+ });+});+```++2. If the real emitted input set differs from the list above (for example a prop the generic visibility rules hide that the spec expected shown), STOP and report the actual list — do not edit the expectation to match without checking the spec's Design Decision #6/#7.++**Verify:**+```bash+pnpm --filter @carbon/jobs test -- src/workflows/integrations/catalog.test.ts src/workflows/integrations/properties.test.ts src/workflows/integrations/outputs.test.ts+# Expected: all pass+```++**Out of scope:** the generated catalog files (Task 6).++---++## Task 5: Gmail settings card + registration + uninstall hook++**Depends on:** none (may run in parallel with 2–4)+**Files:**+- Create: `packages/ee/src/gmail/config.tsx`+- Modify: `packages/ee/src/index.ts` — import, add to `integrations` array, export `Gmail` and `GmailLogo`+- Modify: `packages/ee/src/hooks.server.ts` — one `gmail` entry+- Copy from (precedent): `packages/ee/src/google-calendar/config.tsx` (card), `packages/ee/src/hooks.server.ts` `"google-calendar"` entry (hook)++**Steps:**+1. Create `packages/ee/src/gmail/config.tsx`:++```tsx+import { GOOGLE_OAUTH_CLIENT_ID } from "@carbon/auth";+import type { SVGProps } from "react";+import { z } from "zod";+import { defineIntegration } from "../fns";+import { startIntegrationConnect } from "../integrations/connect";++/** The card's id IS the Activepieces piece name — see google-calendar/config.tsx. */+const PIECE = "gmail";++/**+ * Gmail, as an ordinary integration card, on the same Google OAuth app as Google+ * Calendar. Each connected account sends as itself. The consent asks ONLY for+ * permission to send (`gmail.send`) — never to read the mailbox — which is what+ * keeps the app out of Google's restricted-scope tier.+ */+export const Gmail = defineIntegration({+ name: "Gmail",+ id: PIECE,+ category: "Email",+ // Unset OAuth credentials render the card "Coming soon" rather than offering an+ // Install that could only fail.+ active: !!GOOGLE_OAUTH_CLIENT_ID,+ logo: Logo,+ shortDescription:+ "Send email from your workflows using a connected Google account.",+ description:+ "Connect a Google account so your workflows can send email as that account — purchase orders to suppliers, quotes and updates to customers — with the message in its Sent folder and replies going to a real inbox. Carbon asks only for permission to send, never to read the mailbox. Connect more than one account if different workflows should send as different people. Google's own daily sending limits apply to each account.",+ images: [],+ settings: [],+ schema: z.object({}),+ onClientInstall: () =>+ startIntegrationConnect(`/api/integrations/connections/${PIECE}/connect`)+});++export function Logo(props: SVGProps<SVGSVGElement>) {+ return (+ <svg+ viewBox="0 0 48 36"+ xmlns="http://www.w3.org/2000/svg"+ role="img"+ aria-label="Gmail"+ {...props}+ >+ <path d="M3.27 36h7.64V17.45L0 9.27v23.46A3.27 3.27 0 0 0 3.27 36z" fill="#4285f4" />+ <path d="M37.09 36h7.64A3.27 3.27 0 0 0 48 32.73V9.27l-10.91 8.18V36z" fill="#34a853" />+ <path d="M37.09 3.27v14.18L48 9.27V4.91c0-4.05-4.62-6.36-7.85-3.93l-3.06 2.29z" fill="#fbbc04" />+ <path d="M10.91 17.45V3.27L24 13.09 37.09 3.27v14.18L24 27.27 10.91 17.45z" fill="#ea4335" />+ <path d="M0 4.91v4.36l10.91 8.18V3.27L7.85.98C4.62-1.45 0 .86 0 4.91z" fill="#c5221f" />+ </svg>+ );+}+```++2. `packages/ee/src/index.ts`:+ - Add `import { Gmail } from "./gmail/config";` after the `ExchangeRates` import.+ - In the `integrations` array insert `Gmail,` between `ExchangeRates,` and `GoogleCalendar,`.+ - After the `GoogleCalendar` re-export block add:+ ```ts+ export { Gmail, Logo as GmailLogo } from "./gmail/config";+ ```+3. `packages/ee/src/hooks.server.ts` — directly after the `"google-calendar": { … },` entry:++```ts+ gmail: {+ onUninstall: (companyId) =>+ revokeConnectionsForPiece(getCarbonServiceRole(), "gmail", companyId)+ },+```++**Verify:**+```bash+pnpm --filter @carbon/ee typecheck+# Expected: no errors+pnpm --filter erp typecheck+# Expected: no errors (IntegrationID union grows; nothing narrows on it)+pnpm exec biome check packages/ee/src/gmail/config.tsx packages/ee/src/index.ts packages/ee/src/hooks.server.ts+# Expected: no diagnostics+```++**Out of scope:** `ConnectionsTab.tsx`, `IntegrationForm.tsx`, `getIntegrationHealth` — all key off `PIECE_ALLOWLIST` by name. Any `if (id === "gmail")` anywhere is a bug.++---++## Task 6: Regenerate the workflow catalog + Lingui catalogs++**Depends on:** 2, 3, 4 (green tests first, so a generator refusal is a real one)+**Files:**+- Modify (generated): `packages/workflows/src/catalog/actions.generated.ts`, `packages/workflows/src/catalog/labels.generated.ts` (and `help.generated.ts` if the generator writes the vendor prop descriptions there)+- Modify (generated): `packages/locale/locales/*/erp.po`++**Steps:**+1. `pnpm run generate:workflow-catalog && pnpm run check:workflow-catalog`+ If the generator refuses a prop, STOP and report which — the spec's override set is meant to be complete.+2. `pnpm run lingui:extract && pnpm run lingui:clean` (never commit `.po` files without the clean step — see `.ai/lessons.md`).+3. Inspect that `integration.gmail` and `integration.gmail.gmail_send_email` labels exist in `labels.generated.ts`, and that `attachments`, `in_reply_to`, `draft` do not appear inside the `integration.gmail.gmail_send_email` block of `actions.generated.ts`.++**Verify:**+```bash+pnpm run check:workflow-catalog+# Expected: exit 0, no staleness report+grep -o '"integration\.gmail\.[a-z_-]*"' packages/workflows/src/catalog/actions.generated.ts | sort -u+# Expected: exactly "integration.gmail.gmail_send_email"+grep -c 'integration.gmail' packages/workflows/src/catalog/labels.generated.ts+# Expected: a number > 0+pnpm --filter @carbon/workflows test+# Expected: all pass+git diff --stat -- packages/locale | tail -1+# Expected: 26 .po files changed with the new strings only (no "#:" origin lines)+```++**Out of scope:** hand-editing any generated file; running `pnpm run translate` (LLM translation — leave to the usual translation pass).++---++## Task 7: Docs: rule, AGENTS, `.env.example`, spec status++**Depends on:** 6+**Files:**+- Modify: `.claude/rules/workflow-integrations.md` — line "the allowlist has two (Google Calendar, Slack)." → "the allowlist has three (Google Calendar, Slack, Gmail)."; under "### Scope drift" add one paragraph (below)+- Modify: `packages/ee/AGENTS.md` — the "Workflow integration connections" bullet: extend the config list "(`google-calendar/config.tsx`, `slack/config.tsx`; `id` === the piece name)" → "(`google-calendar/config.tsx`, `gmail/config.tsx`, `slack/config.tsx`; `id` === the piece name)"+- Modify: `packages/jobs/AGENTS.md` — wherever the allowlist is described, mention `gmail` (send-only) beside the other two; if the file does not describe the allowlist, leave it untouched+- Modify: `.env.example` — line 95 "(Google Calendar)." → "(Google Calendar, Gmail)."+- Modify: `.ai/specs/implemented/2026-09-01-gmail-workflow-piece.md` — `Status: draft — awaiting review` → `Status: implemented (2026-09-01)`; append a changelog line++**Steps:**+1. Rule paragraph to add at the end of "### Scope drift — "Reconnect needed"":++ > Gmail is deliberately **send-only** (`gmail.send` + `email`, an allowlist `oauth.scope`+ > override). The piece's own list adds `gmail.readonly` and `gmail.compose`, which Google+ > classes as *restricted*: an app holding them must pass an annual third-party CASA security+ > assessment before non-test users can consent. So the row omits `in_reply_to` (needs+ > `messages.list`), pins `draft` off (needs `drafts.create`) and omits `attachments` (file+ > objects — no Carbon input type yet). Widening to read/reply is a compliance decision first.++2. Apply the other edits verbatim.++**Verify:**+```bash+grep -n "three (Google Calendar, Slack, Gmail)" .claude/rules/workflow-integrations.md+# Expected: 1 match+grep -n "gmail/config.tsx" packages/ee/AGENTS.md+# Expected: 1 match+grep -n "Google Calendar, Gmail" .env.example+# Expected: 1 match+grep -n "Status: implemented" .ai/specs/implemented/2026-09-01-gmail-workflow-piece.md+# Expected: 1 match+```++**Out of scope:** rewriting any other section of the rule; `docs/`.++---++## Task 8: End-to-end verification + run log++**Depends on:** 7+**Files:**+- Create: `.ai/runs/2026-09-01-gmail-workflow-piece.md` — the run log (precedent: `.ai/runs/2026-09-01-slack-workflow-piece.md`)++**Steps:**+1. Run every automated gate:+ ```bash+ pnpm --filter @carbon/jobs test+ pnpm --filter @carbon/ee test+ pnpm --filter @carbon/workflows test+ pnpm --filter @carbon/jobs typecheck && pnpm --filter @carbon/ee typecheck && pnpm --filter erp typecheck+ pnpm run check:workflow-catalog+ pnpm exec biome check packages/jobs/src/workflows/integrations packages/ee/src/gmail packages/ee/src/index.ts packages/ee/src/hooks.server.ts+ ```+2. Walk the spec's Acceptance Criteria 1–10. Criteria 1, 4 (the `metadata` invariant via `connections.test.ts`), 6 (form shape via `catalog.test.ts`), 8 (via `revokeConnectionsForPiece` scoping by piece name) and 10 are provable here. Criteria 2, 3, 5, 7, 9 need a browser and a Google test user on the consent screen with `gmail.send` added — record them as BROWSER-PENDING with the exact click path, as the Slack run log did.+3. Write the run log: one line per gate with its result, one line per criterion with PASS / BROWSER-PENDING and how it was checked, and the Google Cloud console steps (add scope, add test user, submit sensitive-scope verification) as the operator's to-do.++**Verify:**+```bash+test -f .ai/runs/2026-09-01-gmail-workflow-piece.md && grep -c "PASS\|BROWSER-PENDING" .ai/runs/2026-09-01-gmail-workflow-piece.md+# Expected: file exists; count ≥ 10+git status --short+# Expected: only the files named in Tasks 1–8 (plus generated catalog/.po files)+```++**Out of scope:** committing — the user commits (never auto-commit).diff --git a/.ai/plans/2026-09-01-slack-single-source-of-truth.md b/.ai/plans/2026-09-01-slack-single-source-of-truth.mdnew file mode 100644index 0000000000..4abd62957b--- /dev/null+++ b/.ai/plans/2026-09-01-slack-single-source-of-truth.md@@ -0,0 +1,25 @@+# Slack single source of truth — implementation plan (executed)++**Spec:** `.ai/specs/implemented/2026-09-01-slack-single-source-of-truth.md` · **Run log:** `.ai/runs/2026-09-01-slack-single-source-of-truth.md`+**Branch:** `feat/active-pieces-integration`++## Progress++- [x] Task 1: Allowlist types (`accountLabel.path`, `metadata`) + Slack row (16 scopes, metadata map)+- [x] Task 2: `connectionMetadataFrom` / `accountLabelFromBody` + tests+- [x] Task 3: `ExchangedTokens.body` + `readConnectionAccessToken` + tests+- [x] Task 4: Callback uses body-derived label + metadata+- [x] Task 5: Migration `20260901173100_slack-connections-single-source.sql` (hardened after review: user-validated `createdBy`, vault read before insert, `Expired` when tokenless, `Revoked` without secret, partial index, no webhook URL)+- [x] Task 6: Slack service — `getSlackWorkspace`, `getSlackWorkspaceByTeamId` (+ `AmbiguousSlackWorkspaceError`), `getSlackAuth` on connections+- [x] Task 7: Jobs — `send-slack.ts` (token resolved inside the single step), `slack-document-sync.ts` (four functions), `notify.ts` (added after review)+- [x] Task 8: Interactive route on `getSlackWorkspaceByTeamId`; `integrations.slack.install.ts` deleted; `integrations.slack.oauth.ts` kept as a 302 forwarder+- [x] Task 9: Slack card installs through the piece consent; installer/schemas removed; `@slack/oauth` dropped+- [x] Task 10: Notification-preferences page reads connections; dead settings helpers + `SECRET_KEYS.slack` removed+- [x] Task 11: Env — `SLACK_STATE_SECRET` removed; `SLACK_OAUTH_REDIRECT_URL` kept (no new var)+- [x] Task 12: Regenerate workflow catalog + Lingui; docs sync+- [x] Task 13: Verification + run log++## Notes++- `companyIntegration` has no `createdBy` and its `updatedBy` has no FK; `integrationConnection.createdBy` is NOT NULL → `user`. Hence the actor resolution chain in the migration.+- `getSlackWorkspace` = `readConnections(...).find(Active)` + `readConnectionAccessToken`; three round trips per call (accepted; see review MINOR 12).diff --git a/.ai/plans/2026-09-01-slack-workflow-piece.md b/.ai/plans/2026-09-01-slack-workflow-piece.mdnew file mode 100644index 0000000000..73508e8fb6--- /dev/null+++ b/.ai/plans/2026-09-01-slack-workflow-piece.md@@ -0,0 +1,657 @@+# Slack as a workflow integration piece — implementation plan++**Spec / source:** `.ai/specs/implemented/2026-09-01-slack-workflow-piece.md`+**Research:** `.ai/research/2026-09-01-slack-workflow-piece.md`+**Rule:** `.claude/rules/workflow-integrations.md` ("Adding a piece" checklist; this plan deviates+only where the spec says so: same card as the Assistant, allowlist `oauth.authUrl`/`scope`+overrides, `omit` prop override, mark-installed that preserves metadata).+**Branch:** `feat/active-pieces-integration`++Package names (for `--filter`): `@carbon/jobs`, `@carbon/ee`, `@carbon/env`, `@carbon/workflows`,+`erp` (apps/erp). Whole-repo typecheck OOMs — always scope it.++## Progress++- [x] Task 1: Pin `@activepieces/[email protected]` in `@carbon/jobs`+- [x] Task 2: Allowlist types + the `slack` row; registry tests+- [x] Task 3: `omit` visibility (+ `MARKDOWN` auto-omit) and pinned values+- [x] Task 4: Generator consults visibility before mapping; `toPropsValue` skips `MARKDOWN`; catalog test+- [x] Task 5: `buildConsentUrl` with allowlist overrides; connect route uses it+- [x] Task 6: `markIntegrationInstalled` preserves metadata; callback uses it+- [x] Task 7: `getSlackAuth` null-guard; `readTokenResponse` names Slack's `error`+- [x] Task 8: `hooks.server.ts` `slack` entry + Slack card copy+- [x] Task 9: `SLACK_CONNECTIONS_REDIRECT_URL` env plumbing — **reverted later the same day**; `SLACK_OAUTH_REDIRECT_URL` kept (see the single-source plan, Task 11)+- [x] Task 10: Builder "Connect" deep-links to the Accounts tab+- [x] Task 11: Regenerate the workflow catalog + Lingui catalogs+- [x] Task 12: Sync the rule doc and spec status+- [x] Task 13: End-to-end verification + run log++## Dependencies++```+1 → 2 → 4 → 11+3 → 4+2 → 5+6, 7, 8, 9, 10 independent of each other; 8 and 9 need 2 only for the names they reference+11 → 12 → 13+```++Tasks 3, 6, 7, 9, 10 may run in parallel with Task 2. Task 11 must run after 2, 3, 4 (it reads+the allowlist through the generator).++---++## Task 1: Pin `@activepieces/[email protected]` in `@carbon/jobs`++**Depends on:** none+**Files:**+- Modify: `packages/jobs/package.json` — add `"@activepieces/piece-slack": "0.17.9"` (exact, no `^`)+- Modify: `pnpm-lock.yaml` — by pnpm++**Steps:**+1. `pnpm --filter @carbon/jobs add @activepieces/[email protected] --save-exact`+2. Confirm the entry sits beside `"@activepieces/piece-google-calendar": "0.10.3"` with no range.+3. The bundle requires only Node built-ins (verified in research); no framework dependency is needed.+ If pnpm reports a peer-dependency warning for `@activepieces/pieces-framework`, STOP and report — do+ not add the framework.++**Verify:**+```bash+grep -n '"@activepieces/piece-slack": "0.17.9"' packages/jobs/package.json+# Expected: one line+cd packages/jobs && node -e 'import("@activepieces/piece-slack").then(m => console.log(Object.keys(m.slack.actions()).length))'+# Expected: a number ≥ 70+```++**Out of scope:** any other dependency change; no `patches/` entry.++---++## Task 2: Allowlist types + the `slack` row; registry tests++**Depends on:** 1+**Files:**+- Modify: `packages/jobs/src/workflows/integrations/allowlist.ts`+- Modify: `packages/jobs/src/workflows/integrations/registry.test.ts`++**Steps:**+1. Extend the types (keep existing fields and their comments):+ ```ts+ export interface AllowlistPropOverride {+ hidden?: boolean;+ /** Drop the prop from the step entirely — neither the form nor Advanced offers it.+ * For props whose non-default value needs a host capability Carbon refuses (send as+ * user, mention the origin flow) or a type Carbon cannot render. A `value` is still+ * sent at run time; a required prop needs one. */+ omit?: boolean;+ value?: unknown;+ }+ export interface AllowlistEntry {+ // ...existing...+ oauth: {+ clientIdEnv: string;+ clientSecretEnv: string;+ redirectUrlEnv: string;+ /** Consent endpoint to use instead of the piece's `authUrl` — for a piece that bakes+ * extra requests (Slack's `user_scope=`) into its URL. */+ authUrl?: string;+ /** Scopes to request instead of the piece's full list. Must cover every allowlisted+ * action and the `options()` its dropdowns call. */+ scope?: readonly string[];+ };+ // ...existing...+ }+ ```+2. Add the row after `"google-calendar"` exactly as written in spec §1 (`package`, `version: "0.17.9"`,+ `label: "Slack"`, the four actions, `oauth` with `clientIdEnv: "SLACK_CLIENT_ID"`,+ `clientSecretEnv: "SLACK_CLIENT_SECRET"`, `redirectUrlEnv: "SLACK_CONNECTIONS_REDIRECT_URL"`,+ `authUrl: "https://slack.com/oauth/v2/authorize"`, the 10-scope list with the per-line comments,+ `accountLabel: { url: "https://slack.com/api/auth.test", field: "team" }`, and the `props`+ block: `send_channel_message` → `sendAsBot: { omit: true, value: true }`,+ `mentionOriginFlow: { omit: true }`, `file: { omit: true }`, `blocks: { omit: true }`;+ `send_direct_message` → `mentionOriginFlow: { omit: true }`, `blocks: { omit: true }`).+ Add a one-line comment above the row: the card id `slack` is the Carbon Assistant's, shared on+ purpose (spec Q1).+3. In `registry.test.ts` add, mirroring the existing google-calendar cases:+ - `loadPiece("slack")` resolves a piece whose `actions()` includes `send_channel_message`;+ - `getPieceActions("slack")` keys equal `[...PIECE_ALLOWLIST.slack!.actions].sort()`;+ - `getPieceAction("slack", "custom_api_call")` rejects;+ - `getPieceOAuth2Auth("slack")` resolves with `tokenUrl === "https://slack.com/api/oauth.v2.access"`+ and an `authUrl` that `includes("user_scope=")` (documents WHY the override exists).++**Verify:**+```bash+pnpm --filter @carbon/jobs exec vitest run src/workflows/integrations/registry.test.ts+# Expected: all tests pass, including the 4 new slack cases+pnpm exec turbo run typecheck --filter=@carbon/jobs+# Expected: no errors+```++**Out of scope:** `oauth.ts` `resolveOAuthApp` (unchanged — it reads the three env names only).++---++## Task 3: `omit` visibility (+ `MARKDOWN` auto-omit) and pinned values++**Depends on:** none (types from Task 2; if Task 2 has not landed, add `omit?: boolean` to+`AllowlistPropOverride` here — the two edits are identical)+**Files:**+- Modify: `packages/jobs/src/workflows/integrations/visibility.ts`+- Modify: `packages/jobs/src/workflows/integrations/visibility.test.ts`++**Steps:**+1. Widen the type:+ ```ts+ export type Visibility =+ | { show: true }+ | { show: false; omit?: false; value?: unknown }+ | { show: false; omit: true; value?: unknown };+ ```+2. In `visibilityOf`, BEFORE the existing `override?.hidden` check:+ ```ts+ // Display-only: Activepieces `Property.MarkDown` renders text and never collects a+ // value, so there is no input to offer.+ if (property.type === "MARKDOWN") return { show: false, omit: true };+ if (override?.omit === true) {+ return override.value === undefined+ ? { show: false, omit: true }+ : { show: false, omit: true, value: override.value };+ }+ ```+3. `assertHiddenPropIsSatisfied` needs no change (an omitted required prop with no value already+ throws). Update its message to `is required but hidden or omitted with no value to send.`+4. `pinnedValues` needs no change — it already pins any `!show` visibility with a value.+5. Tests (same `prop()` helper style):+ - `omit: true` → `{ show: false, omit: true }`; with `value: true` → carries the value;+ - `type: "MARKDOWN"` with no override → `{ show: false, omit: true }`;+ - `assertHiddenPropIsSatisfied` throws for `required: true` + `{ omit: true }` and passes with+ `{ omit: true, value: true }`;+ - `pinnedValues` returns `{ sendAsBot: true }` for a required-with-default prop overridden+ `{ omit: true, value: true }` (build the override map via a stubbed `PIECE_ALLOWLIST` the way+ the existing `pinnedValues` tests do — read them first and copy the mechanism).++**Verify:**+```bash+pnpm --filter @carbon/jobs exec vitest run src/workflows/integrations/visibility.test.ts+# Expected: all pass, including the new omit / MARKDOWN cases+```++**Out of scope:** `catalog.ts` (Task 4).++---++## Task 4: Generator consults visibility before mapping; `toPropsValue` skips `MARKDOWN`; catalog test++**Depends on:** 2, 3+**Files:**+- Modify: `packages/jobs/src/workflows/integrations/catalog.ts` — reorder the prop loop+- Modify: `packages/jobs/src/workflows/integrations/properties.ts` — `toPropsValue`+- Modify: `packages/jobs/src/workflows/integrations/properties.test.ts`+- Create: `packages/jobs/src/workflows/integrations/catalog.test.ts`++**Steps:**+1. In `catalog.ts`'s `for (const [propName, property] of Object.entries(action.props))` loop, move the+ `visibilityOf(...)` + `assertHiddenPropIsSatisfied(...)` calls to the TOP of the loop body, then:+ ```ts+ // Omitted props are not part of the step: nothing to render, so nothing to map — an+ // unmappable type is only ever an error for a prop a person would see.+ if (!visibility.show && visibility.omit === true) continue;+ const mapped = toValueType(pieceName, actionName, propName, property);+ ```+ Keep the rest (shown → `inputs`, hidden → `advancedInputs`) unchanged.+2. In `toPropsValue`, skip `MARKDOWN` props at the top of the loop:+ ```ts+ if (props[name]?.type === "MARKDOWN") continue; // display-only, never a value+ ```+ (Pins for omitted props still flow through the existing `pinned[name]` branch.)+3. `properties.test.ts`: add a `toPropsValue` case — props `{ info: MARKDOWN, text: LONG_TEXT }`,+ inputs `{ info: "x", text: "hi" }` → `{ text: "hi" }`.+4. `catalog.test.ts` (new; the registry tests already load real pieces, so this one does too):+ ```ts+ import { describe, expect, it } from "vitest";+ import { buildPieceActionDeclarations } from "./catalog";+ describe("buildPieceActionDeclarations (slack)", () => {+ it("emits the four allowlisted slack steps with omitted props absent", async () => {+ const all = await buildPieceActionDeclarations();+ const ids = Object.keys(all).filter((id) => id.startsWith("integration.slack."));+ expect(ids.sort()).toEqual([+ "integration.slack.send_channel_message",+ "integration.slack.send_direct_message",+ "integration.slack.slack-create-channel",+ "integration.slack.slack-find-user-by-email"+ ]);+ const send = all["integration.slack.send_channel_message"]!;+ expect(Object.keys(send.inputs)).toEqual([+ "connectionId", "channel", "text", "threadTs", "username",+ "profilePicture", "iconEmoji", "replyBroadcast", "unfurlLinks"+ ]);+ expect(send.advancedInputs).toBeUndefined();+ for (const gone of ["info", "file", "blocks", "sendAsBot", "mentionOriginFlow"]) {+ expect(send.inputs).not.toHaveProperty(gone);+ }+ expect(send.inputs.channel!.options?.provider).toBe("integration.property");+ expect(send.outputs).toHaveProperty("count");+ expect(send.outputs).toHaveProperty("result");+ });+ it("still refuses an unmappable prop that is merely hidden", async () => {+ // pinnedValues-style stub of PIECE_ALLOWLIST is heavier than needed here; assert the+ // rule at the unit that owns it instead:+ const { toValueType, UnmappablePropertyError } = await import("./properties");+ expect(() => toValueType("p", "a", "blocks", { type: "JSON", required: false })).toThrow(+ UnmappablePropertyError+ );+ });+ });+ ```+ If the actual input key ORDER differs from the list above (it follows the piece's own prop order),+ compare sorted arrays instead — do not reorder the generator.++5. **(Added during execution.)** The generator's `assertLabelIsSafe` refuses any label or+ description containing a backtick or `${` (it emits them inside `msg` template literals), and+ Slack's `threadTs` description contains both backticked examples. Vendor prose is not Carbon+ prose, so sanitise it where it enters: in `properties.ts` add+ `function vendorText(text: string): string` that replaces every backtick with `'` and every+ `${` with `$ {`, and apply it to `label` and `description` in `toValueType`. Test in+ `properties.test.ts`: a prop with `description: "use `ts` or ${x}"` maps to+ `"use 'ts' or $ {x}"`.++**Verify:**+```bash+pnpm --filter @carbon/jobs exec vitest run src/workflows/integrations/+# Expected: every integrations test passes (registry, visibility, properties, catalog, outputs, project, oauth)+pnpm exec turbo run typecheck --filter=@carbon/jobs+# Expected: no errors+```++**Out of scope:** `outputs.ts`, `project.ts`, the generated files (Task 11).++---++## Task 5: `buildConsentUrl` with allowlist overrides; connect route uses it++**Depends on:** 2+**Files:**+- Modify: `packages/jobs/src/workflows/integrations/oauth.ts` — add `buildConsentUrl`+- Modify: `packages/jobs/src/workflows/integrations/oauth.test.ts`+- Modify: `packages/jobs/src/workflows/integrations/index.ts` — export it (check the barrel's shape first)+- Modify: `apps/erp/app/routes/api+/integrations.connections.$piece.connect.ts` — call it++**Steps:**+1. In `oauth.ts`:+ ```ts+ /** The vendor consent URL. The piece supplies `authUrl` and `scope`; an allowlist row may+ * override either — Slack's piece bakes `user_scope=` into its URL and asks for 30 bot+ * scopes, and we want the bot scopes our four actions need and nothing else. */+ export function buildConsentUrl(args: {+ entry: Pick<AllowlistEntry, "oauth">;+ auth: Pick<OAuth2AuthDeclaration, "authUrl" | "scope">;+ app: Pick<PieceOAuthApp, "clientId" | "redirectUrl">;+ state: string;+ }): string {+ const url = new URL(args.entry.oauth.authUrl ?? args.auth.authUrl);+ url.searchParams.set("client_id", args.app.clientId);+ url.searchParams.set("redirect_uri", args.app.redirectUrl);+ url.searchParams.set("response_type", "code");+ url.searchParams.set("scope", (args.entry.oauth.scope ?? args.auth.scope).join(" "));+ // Without both of these Google returns no refresh token on a re-authorization.+ // Slack ignores them.+ url.searchParams.set("access_type", "offline");+ url.searchParams.set("prompt", "consent");+ url.searchParams.set("state", args.state);+ return url.toString();+ }+ ```+ Import `AllowlistEntry` from `./allowlist` and `OAuth2AuthDeclaration` from `./types`.+2. Replace the inline URL building in the connect route (from `const url = new URL(auth.authUrl)` to+ `return { url: url.toString() }`) with+ `return { url: buildConsentUrl({ entry, auth, app, state: signConnectionState({ companyId, pieceName, name, userId }) }) };`+ and import `buildConsentUrl` from `@carbon/jobs/integrations`.+3. `oauth.test.ts` — add:+ - piece defaults: entry with no overrides, auth `{ authUrl: "https://v.example/auth?x=1", scope: ["a","b"] }`+ → URL keeps `x=1`, `scope === "a b"`, has `client_id`, `redirect_uri`, `state`;+ - overrides: entry `{ oauth: { ..., authUrl: "https://slack.com/oauth/v2/authorize", scope: ["chat:write"] } }`+ with auth `authUrl` containing `?user_scope=search:read` → result has NO `user_scope` param and+ `scope === "chat:write"`;+ - the real row: `buildConsentUrl({ entry: PIECE_ALLOWLIST.slack!, auth: await getPieceOAuth2Auth("slack"), app: {clientId:"c", redirectUrl:"https://r"}, state:"s" })`+ → no `user_scope`, `scope` split by space has length 10 and includes `chat:write.public`.++**Verify:**+```bash+pnpm --filter @carbon/jobs exec vitest run src/workflows/integrations/oauth.test.ts+# Expected: pass, including the 3 new cases+pnpm exec turbo run typecheck --filter=erp+# Expected: no errors+```++**Out of scope:** the callback route (Task 6); `resolveOAuthApp`.++---++## Task 6: `markIntegrationInstalled` preserves metadata; callback uses it++**Depends on:** none+**Files:**+- Modify: `apps/erp/app/modules/settings/settings.server.ts` — add `markIntegrationInstalled` next to `upsertCompanyIntegration`+- Modify: `apps/erp/app/routes/api+/integrations.connections.callback.ts` — replace the `upsertCompanyIntegration` call++**Steps:**+1. Add:+ ```ts+ /**+ * Flip an integration to installed WITHOUT touching what is already there. The piece+ * callback marks its card installed after a connection is saved; on a card another+ * flow also owns (Slack: the Carbon Assistant's bot install), an upsert with empty+ * metadata would wipe that flow's `team_id`, `channel_id` and webhook url.+ */+ export async function markIntegrationInstalled(+ client: SupabaseClient<Database>,+ args: { id: string; companyId: string; updatedBy: string }+ ): Promise<{ error: PostgrestError | null }> {+ const existing = await client+ .from("companyIntegration")+ .select("active")+ .eq("id", args.id)+ .eq("companyId", args.companyId)+ .maybeSingle();+ if (existing.error) return { error: existing.error };++ let error: PostgrestError | null = null;+ if (existing.data === null) {+ ({ error } = await client.from("companyIntegration").insert({+ id: args.id,+ companyId: args.companyId,+ active: true,+ metadata: {},+ updatedBy: args.updatedBy+ }));+ } else if (existing.data.active !== true) {+ ({ error } = await client+ .from("companyIntegration")+ .update({ active: true, updatedBy: args.updatedBy })+ .eq("id", args.id)+ .eq("companyId", args.companyId));+ }+ if (error === null) await clearCompanyIntegrationCache(args.companyId);+ return { error };+ }+ ```+ Match the file's existing imports for `PostgrestError` (check how `upsertCompanyIntegration`'s+ return type is written; if the file does not import `PostgrestError`, import it from+ `@supabase/supabase-js`). Read the row directly rather than via `getCompanyIntegration` — that+ helper is Redis-cached and filters `active === true`.+ If the `companyIntegration` insert requires columns beyond `id, companyId, active, metadata, updatedBy`+ (check `packages/database/src/types.ts` `companyIntegration.Insert`), add them with the same values+ `upsertCompanyIntegration` would produce; do not invent defaults — STOP and report if unclear.+2. In the callback replace the block starting `await upsertCompanyIntegration(client, {` with+ ```ts+ const installed = await markIntegrationInstalled(client, {+ id: state.pieceName,+ companyId,+ updatedBy: userId+ });+ if (installed.error) throw installed.error;+ ```+ Keep the explanatory comment above it, extended with one line: "never overwrite an existing row —+ the Slack card is also the Assistant's". Update the import (`markIntegrationInstalled` in place of+ `upsertCompanyIntegration`).++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=erp+# Expected: no errors+grep -n "upsertCompanyIntegration" apps/erp/app/routes/api+/integrations.connections.callback.ts+# Expected: no output+```++**Out of scope:** `upsertCompanyIntegration` itself (still used by the Assistant's own callback);+the Slack Assistant OAuth route.++---++## Task 7: `getSlackAuth` null-guard; `readTokenResponse` names Slack's `error`++**Depends on:** none+**Files:**+- Modify: `packages/ee/src/slack/lib/service.ts` — `getSlackAuth`+- Modify: `packages/ee/src/integrations/connections.ts` — `readTokenResponse`+- Modify: `packages/ee/src/integrations/connections.test.ts`++**Steps:**+1. In `getSlackAuth`, after `resolveIntegrationSecrets(...)` and the existing `if (!metadata) return null;`:+ ```ts+ // The row can be "installed" by a workflow connection alone (the card is shared with+ // the Activepieces Slack piece); without a bot token the Assistant is not connected.+ if (typeof metadata.access_token !== "string" || metadata.access_token.length === 0) {+ return null;+ }+ ```+ Widen the cast to `{ access_token?: string; channel_id?: string }` so the guard type-checks, and keep+ the returned shape unchanged.+2. In `readTokenResponse` (connections.ts), extend the parsed shape with `error?: string` and change+ the throw to:+ ```ts+ if (typeof body.access_token !== "string") {+ // Slack rejects with HTTP 200 and `{ ok: false, error }`; name it for the server log.+ // The callback maps this message to a code — the browser never sees it.+ throw new Error(+ typeof body.error === "string"+ ? `The connection returned no access token (${body.error}).`+ : "The connection returned no access token."+ );+ }+ ```+ The callback's `message.includes("access token")` match still holds.+3. `connections.test.ts`: add a `resolveConnectionAuth` case where `fetch` resolves+ `{ ok: true, json: async () => ({ ok: false, error: "invalid_code" }) }` for a connection with+ `expiresAt: inMinutes(1)` and stored `rt-1`: it rejects with `ConnectionRevokedError`? — NO: a+ 200 with no token is not a `ConnectionRejectedError`, so per the transient rule from commit+ `cd04bee95` it must **keep the row Active**, release the claim, and reject with a message+ containing `invalid_code`. Assert exactly that.++**Verify:**+```bash+pnpm --filter @carbon/ee exec vitest run src/integrations/connections.test.ts+# Expected: pass, including the new invalid_code case+pnpm exec turbo run typecheck --filter=@carbon/ee+# Expected: no errors+```++**Out of scope:** `send-slack.ts` (already returns `null` → env fallback when `access_token` is absent —+verified, unchanged); other Slack service functions.++---++## Task 8: `hooks.server.ts` `slack` entry + Slack card copy++**Depends on:** none (references the piece name only)+**Files:**+- Modify: `packages/ee/src/hooks.server.ts`+- Modify: `packages/ee/src/slack/config.tsx`+- Copy from (precedent): the `"google-calendar"` entry in `hooks.server.ts`; `packages/ee/src/google-calendar/config.tsx` for copy tone++**Steps:**+1. Add, keeping alphabetical position near `stripe-connect`/`rillet` if the object is ordered, else after+ `"google-calendar"`:+ ```ts+ // The Slack card is shared: the Carbon Assistant's bot install AND the workflow piece's+ // accounts. Health reads the accounts; Uninstall revokes them along with the Assistant.+ slack: {+ onHealthcheck: (companyId) => pieceConnectionsHealthy(companyId, "slack"),+ onUninstall: (companyId) =>+ revokeConnectionsForPiece(getCarbonServiceRole(), "slack", companyId)+ },+ ```+ If a `slack` key already exists (grep first), MERGE into it rather than duplicating.+2. In `config.tsx` change:+ - `shortDescription` → `"Use the Carbon Assistant in Slack, and let workflows post to your channels."`+ - `description` → `"Integrating Carbon with Slack lets you use the Carbon Assistant from your workspace and lets workflow steps send messages, find users and create channels. Connect one or more accounts under Accounts to choose which workspace a workflow acts as."`+ Plain strings, matching every other `defineIntegration` card (spec §6).++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=@carbon/ee+# Expected: no errors+grep -n "slack:" packages/ee/src/hooks.server.ts+# Expected: exactly one match+```++**Out of scope:** the Assistant's install/oauth/interactive routes; `packages/ee/src/index.ts`+(the Slack card is already registered).++---++## Task 9: `SLACK_CONNECTIONS_REDIRECT_URL` env plumbing++**Depends on:** none+**Files:**+- Modify: `packages/env/src/index.ts` — `ProcessEnv` declaration (next to `SLACK_OAUTH_REDIRECT_URL`, ~line 67) and an export after `SLACK_OAUTH_REDIRECT_URL` (~line 329)+- Modify: `.env.example` — after line 57 `SLACK_OAUTH_REDIRECT_URL=""`+- Modify: `.env` — set `SLACK_CONNECTIONS_REDIRECT_URL="https://erp.active-pieces-integration.dev/api/integrations/connections/callback"` (same host as `GOOGLE_OAUTH_REDIRECT_URL`; local only, never committed — `.env` is gitignored, confirm with `git check-ignore .env`)+- Modify: `sst.config.ts` — after line 86+- Modify: `ci/src/deploy.ts` — interface (~line 68), destructure (~line 151), env mapping (~line 309)++**Steps:**+1. `packages/env/src/index.ts`:+ ```ts+ // ProcessEnv:+ SLACK_CONNECTIONS_REDIRECT_URL: string;+ // export:+ /** Callback for workflow-piece Slack accounts (`/api/integrations/connections/callback`);+ * distinct from `SLACK_OAUTH_REDIRECT_URL`, which is the Assistant's own route. */+ export const SLACK_CONNECTIONS_REDIRECT_URL = getEnv("SLACK_CONNECTIONS_REDIRECT_URL", {+ isRequired: false+ });+ ```+ Do NOT add it to `getBrowserEnv()` or `Window.env` — server-only (spec: card gating unchanged).+2. `.env.example`: `SLACK_CONNECTIONS_REDIRECT_URL=""` with a trailing comment `# workflow piece accounts callback`.+3. `sst.config.ts`: `SLACK_CONNECTIONS_REDIRECT_URL: process.env.SLACK_CONNECTIONS_REDIRECT_URL,`.+4. `ci/src/deploy.ts`: `slack_connections_redirect_url: string | null;` in the interface, add to the+ destructure list, and `SLACK_CONNECTIONS_REDIRECT_URL: slack_connections_redirect_url ?? undefined,`+ in the env map — each immediately after its `slack_oauth_redirect_url` sibling.++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=@carbon/env+# Expected: no errors+grep -rn "SLACK_CONNECTIONS_REDIRECT_URL" packages/env/src/index.ts .env.example sst.config.ts ci/src/deploy.ts | wc -l+# Expected: 5 (2 in env index, 1 each elsewhere)+git status --short .env+# Expected: no output (ignored)+```++**Out of scope:** `apps/erp/app/root.tsx` loader env (server-only var — the window.env lesson does not apply).++---++## Task 10: Builder "Connect" deep-links to the Accounts tab++**Depends on:** none+**Files:**+- Modify: `apps/erp/app/modules/workflows/ui/Builder/config/forms/IntegrationNodeForm.tsx` (~line 226)++**Steps:**+1. Change `to={path.to.integration(piece)}` to `to={`${path.to.integration(piece)}?tab=connections`}`.+2. Add a one-line comment above the `<Link>`: on a card shared with another flow (Slack: the+ Assistant) the Install button is not the piece's consent — land on Accounts → Add account.+ `integrations.$id.tsx` already honours `?tab=` (`tabParam`, ~line 1782).++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=erp+# Expected: no errors+grep -n 'tab=connections' apps/erp/app/modules/workflows/ui/Builder/config/forms/IntegrationNodeForm.tsx+# Expected: one match+```++**Out of scope:** `path.ts` (no new helper), `ConnectionsTab.tsx`.++---++## Task 11: Regenerate the workflow catalog + Lingui catalogs++**Depends on:** 2, 3, 4+**Files:**+- Modify (generated): `packages/workflows/src/catalog/actions.generated.ts`, `packages/workflows/src/catalog/labels.generated.ts`+- Modify (generated): `packages/locale/locales/*/erp.po` (and compiled outputs, whatever `lingui:extract` touches)++**Steps:**+1. `pnpm run generate:workflow-catalog && pnpm run check:workflow-catalog`+2. `pnpm run lingui:extract`+3. Inspect: `grep -c '"integration.slack.' packages/workflows/src/catalog/actions.generated.ts` and confirm+ none of `info`, `blocks`, `sendAsBot`, `mentionOriginFlow`, `file` appear inside the+ `integration.slack.send_channel_message` block.++**Verify:**+```bash+pnpm run check:workflow-catalog+# Expected: exit 0, no staleness report+grep -o '"integration\.slack\.[a-z_-]*"' packages/workflows/src/catalog/actions.generated.ts | sort -u+# Expected: exactly the 4 step ids+pnpm --filter @carbon/workflows test+# Expected: all pass (catalog.test.ts still green)+```++**Out of scope:** hand-editing any generated file.++---++## Task 12: Sync the rule doc and spec status++**Depends on:** 11+**Files:**+- Modify: `.claude/rules/workflow-integrations.md`+- Modify: `.ai/specs/implemented/2026-09-01-slack-workflow-piece.md` — status line → `Status: implemented`; changelog entry++**Steps:**+1. Rule doc edits (short, in the existing voice):+ - "Curated, not a marketplace": "the allowlist has one" → "the allowlist has two (Google Calendar, Slack)".+ - "The form shows a curated subset": add a paragraph on `omit` (removed from both maps; pin still sent;+ required needs a value; `MARKDOWN` auto-omitted; an unmappable type must be `omit`ted explicitly —+ never dropped silently).+ - "OAuth round trip": the consent URL is `buildConsentUrl`; allowlist `oauth.authUrl`/`scope` overrides+ and why (Slack's `user_scope`).+ - "The settings UI is the ordinary integration card": the callback calls `markIntegrationInstalled`+ (never overwrites metadata) and why; a card MAY be shared with another flow (Slack/Assistant) —+ the builder deep-links `?tab=connections`.+ - "Adding a piece": step 4 becomes conditional ("if the card is new"); mention `omit` in step 6.+2. Spec: status + changelog `2026-09-01 — Implemented; see .ai/runs/2026-09-01-slack-workflow-piece.md`.++**Verify:**+```bash+grep -n "allowlist has two\|omit\|buildConsentUrl\|markIntegrationInstalled" .claude/rules/workflow-integrations.md | wc -l+# Expected: ≥ 4+```++**Out of scope:** other rule files.++---++## Task 13: End-to-end verification + run log++**Depends on:** 12+**Files:**+- Create: `.ai/runs/2026-09-01-slack-workflow-piece.md` (format: copy `.ai/runs/2026-08-27-workflow-integrations.md`)++**Steps:**+1. Automated gates, all must pass:+ ```bash+ pnpm exec turbo run typecheck --filter=@carbon/jobs --filter=@carbon/ee --filter=@carbon/env --filter=@carbon/workflows --filter=erp+ pnpm --filter @carbon/jobs test+ pnpm --filter @carbon/ee test+ pnpm --filter @carbon/workflows test+ pnpm run check:workflow-catalog+ pnpm exec biome check packages/jobs/src/workflows/integrations packages/ee/src/integrations packages/ee/src/slack apps/erp/app/routes/api+ apps/erp/app/modules/settings apps/erp/app/modules/workflows/ui/Builder/config/forms+ ```+2. Browser criteria (spec Acceptance 8–10) require the Slack app manifest to carry the new redirect URL+ and the 10 bot scopes. Record each as VERIFIED or UNVERIFIED-PENDING-MANIFEST in the run log; do not+ claim a browser criterion without doing it.+3. Run log table: one row per task with the concrete artefact, then "Automated gates" output summary,+ then the browser matrix, then "Not committed" (per the user's rule — the user commits).++**Verify:**+```bash+test -f .ai/runs/2026-09-01-slack-workflow-piece.md && grep -c "Task" .ai/runs/2026-09-01-slack-workflow-piece.md+# Expected: file exists, ≥ 13+```++**Out of scope:** committing, pushing, editing the Slack app manifest.diff --git a/.ai/plans/2026-09-04-integration-datetime-inputs.md b/.ai/plans/2026-09-04-integration-datetime-inputs.mdnew file mode 100644index 0000000000..e3e4412728--- /dev/null+++ b/.ai/plans/2026-09-04-integration-datetime-inputs.md@@ -0,0 +1,449 @@+# Generic date + time inputs for integration steps — implementation plan++**Spec / source:** `.ai/specs/implemented/2026-09-04-integration-datetime-inputs.md`+**Research:** `.ai/research/datetime-input-plumbing.md`+**Worktree:** `/Users/aashu/work/carbon/carbon-feat-active-pieces-integration`++## Progress+- [x] Task 1: Declare `precision` on the three catalog input types+- [x] Task 2: Derive `precision` from the piece's `DATE_TIME` property+- [x] Task 3: Regenerate the workflow catalog+- [x] Task 4: Render `DateTimePicker` for a `precision: "datetime"` input+- [x] Task 5: Verify end to end++## Dependencies++- Task 2 needs Task 1 (it sets a field Task 1 declares).+- Task 3 needs Tasks 1–2 (it regenerates from them) and MUST run before any typecheck that reads the generated catalog.+- Task 4 needs Task 1 (it reads `CatalogInput.precision`); it is otherwise independent of Tasks 2–3 and may be done in parallel with them.+- Task 5 needs everything.++## Background the executor needs++`precision?: "datetime"` is a **presentation-only** flag. The input's `ValueType`+stays `{ kind: "primitive", of: "date" }` — do NOT add a new `PrimitiveKind`, and do+not touch `compare.ts`, `values.ts`, `OPERATORS_BY_TYPE` or any `switch` over+`PrimitiveKind`. The runtime already accepts a full ISO instant for a `date`.++Two of the files on this path build their objects with **hand-written field lists**+rather than spreading, so an unlisted field is silently dropped:+`packages/workflows/src/catalog/build.ts` (`buildDeclaredInputs`) and+`packages/jobs/src/workflows/integrations/catalog.ts` (the `declared` literal).+Both are covered explicitly below.++**Never use JavaScript `Date`** anywhere in this work (`.claude/rules/date-handling.md`).+Use `@internationalized/date`, which is already a dependency of both `erp` and+`packages/workflows`.++---++## Task 1: Declare `precision` on the three catalog input types++**Depends on:** none+**Files:**+- Modify: `packages/workflows/src/catalog/actions.ts` — add `precision` to `ActionInputLike`+- Modify: `packages/workflows/src/catalog/build.ts` — add `precision` to `BuiltActionInput`, copy it in `buildDeclaredInputs`, add a validation rule+- Modify: `packages/workflows/src/definition/catalog.ts` — add `precision` to `CatalogInput`+- Copy from (precedent): the existing `template?: boolean` field in all three of those files++**Steps:**++1. In `packages/workflows/src/catalog/actions.ts`, in `interface ActionInputLike`,+ immediately after the `template?: boolean;` line (~line 13), add:++ ```ts+ /** The input is a moment, not a calendar day: the builder renders a date AND+ * time picker and stores a full ISO instant. Set from a vendor's `DATE_TIME`+ * property. Never set on a Carbon business date (`dueDate`, `orderDate`,+ * `postingDate`), which is a day on the company's calendar and has no time. */+ precision?: "datetime";+ ```++2. In `packages/workflows/src/catalog/build.ts`, in `interface BuiltActionInput`,+ immediately after its `template?: boolean;` line (~line 91), add the SAME field+ with the same doc comment.++3. In the same file, in `buildDeclaredInputs`, inside the `inputs[input] = { … }`+ object literal, immediately after the line+ `...(spec.template ? { template: true } : {}),` add:++ ```ts+ ...(spec.precision ? { precision: spec.precision } : {}),+ ```++ This literal does NOT spread `spec` — without this line the flag never reaches+ the generated catalog.++4. In the same file, in `validateCatalogInputs`, immediately after the existing+ `spec.template === true && …` block that pushes+ `` `${id}.${input} is a template but is not a string.` ``, add the parallel rule:++ ```ts+ if (+ spec.precision !== undefined &&+ !(spec.type.kind === "primitive" && spec.type.of === "date")+ ) {+ problems.push(`${id}.${input} declares precision but is not a date.`);+ }+ ```++5. In `packages/workflows/src/definition/catalog.ts`, in `interface CatalogInput`,+ immediately after its `template?: boolean;` line (~line 65), add the SAME field+ with the same doc comment. This is the shape the builder UI reads.++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=@carbon/workflows+# Expected: exits 0. (The flag is optional and nothing sets it yet, so nothing breaks.)+```++**Out of scope:** `PrimitiveKind` / `primitiveKindSchema` in `definition/types.ts`;+`OPERATORS_BY_TYPE`; `compare.ts`; `values.ts`; any zod schema (none covers catalog+input declarations); `pickControl` in `fields/control.ts`.++---++## Task 2: Derive `precision` from the piece's `DATE_TIME` property++**Depends on:** Task 1+**Files:**+- Modify: `packages/jobs/src/workflows/integrations/properties.ts` — add `precision` to `MappedProperty`, set it in the `DATE_TIME` case+- Modify: `packages/jobs/src/workflows/integrations/catalog.ts` — copy it into the emitted `declared` literal+- Modify: `packages/jobs/src/workflows/integrations/properties.test.ts` — assert the new mapping+- Copy from (precedent): how `template: true` is set in `properties.ts`'s `LONG_TEXT`+ case and merged in `catalog.ts`++**Steps:**++1. In `packages/jobs/src/workflows/integrations/properties.ts`, in+ `interface MappedProperty`, after the `template?: boolean;` field (~line 41), add:++ ```ts+ /** The vendor declared a moment, not a day. The builder renders a date and time+ * picker; the stored value is a full ISO instant. */+ precision?: "datetime";+ ```++2. In the same file, in `toValueType`, change the `DATE_TIME` case from++ ```ts+ case "DATE_TIME":+ return { ...base, type: DATE };+ ```++ to++ ```ts+ // The vendor said DATE_TIME, not DATE. Dropping the time here is what left+ // Google Calendar's "Start date time of the event" with a date-only picker,+ // and made the value an underspecified instant the piece then read in the+ // WORKER's timezone.+ case "DATE_TIME":+ return { ...base, type: DATE, precision: "datetime" };+ ```++ This one line is what makes the fix generic — every piece declares its+ date-times as `DATE_TIME`, so future pieces need no further edit.++3. In `packages/jobs/src/workflows/integrations/catalog.ts`, inside the `declared`+ object literal, immediately after the existing block++ ```ts+ ...(mapped.template === true || override?.template === true+ ? { template: true }+ : {}),+ ```++ add:++ ```ts+ ...(mapped.precision === undefined+ ? {}+ : { precision: mapped.precision }),+ ```++ There is deliberately NO allowlist override for `precision` — the vendor's own+ type is the signal, and an override would reintroduce the per-piece edit this+ change removes. Do not add a field to `AllowlistPropOverride`.++4. In `packages/jobs/src/workflows/integrations/properties.test.ts`, find the+ existing assertion near line 52 that reads+ `expect(map({ type: "DATE_TIME" }).type).toEqual({ … })` and add a sibling+ assertion in the same test that+ `map({ type: "DATE_TIME" }).precision` equals `"datetime"`, plus one that a+ `SHORT_TEXT` property's `precision` is `undefined`. Match the file's existing+ test style — read the surrounding cases first and follow them.++**Verify:**+```bash+cd /Users/aashu/work/carbon/carbon-feat-active-pieces-integration && pnpm exec turbo run typecheck --filter=@carbon/jobs && pnpm exec turbo run test --filter=@carbon/jobs+# Expected: typecheck exits 0; tests pass, including the new DATE_TIME precision assertions.+```++**Out of scope:** `allowlist.ts` (no override field); `visibility.ts`; `outputs.ts`+(a piece's `format: "datetime"` OUTPUT is a separate, already-working path — do not+touch it); `toPropsValue` (the value arrives already correct).++---++## Task 3: Regenerate the workflow catalog++**Depends on:** Tasks 1 and 2++**Files:**+- Modify (generated, do NOT hand-edit): `packages/workflows/src/catalog/actions.generated.ts`++**Steps:**++1. Run the generator:++ ```bash+ cd /Users/aashu/work/carbon/carbon-feat-active-pieces-integration && pnpm run generate:workflow-catalog+ ```++ `scripts/generate-workflow-catalog.ts` emits via `JSON.stringify`, so the new+ field carries automatically; the script then runs biome, which is why generated+ keys are unquoted.++2. Inspect the diff and confirm it is limited to `precision: "datetime"` appearing on+ integration inputs that came from a `DATE_TIME` property, and on nothing else:++ ```bash+ git diff --stat packages/workflows/src/catalog/actions.generated.ts+ git diff packages/workflows/src/catalog/actions.generated.ts | grep '^[+-]' | grep -v '^[+-][+-]'+ ```++ Expect `+` lines only, every one containing `precision: "datetime"`. Google+ Calendar's `start_date_time` and `end_date_time` must be among them.++ If any line changes something OTHER than adding `precision`, STOP and report —+ do not improvise.++3. Confirm no Carbon-native action input gained the flag: every `+` line must sit+ inside `WORKFLOW_INTEGRATION_CATALOG`, not `WORKFLOW_ACTION_CATALOG`. (Carbon's+ own `dueDate`/`orderDate`/`postingDate` are built from the database schema by+ `propertyType`, which never sets `precision`.) If an action-catalog input gained+ it, STOP and report.++**Verify:**+```bash+cd /Users/aashu/work/carbon/carbon-feat-active-pieces-integration && pnpm run check:workflow-catalog+# Expected: exits 0. This uses assert.deepStrictEqual on the whole catalog, so it+# fails loudly if the generated file and the builders disagree.+```++**Out of scope:** hand-editing `actions.generated.ts`; `events.generated.ts`,+`labels.generated.ts`, `help.generated.ts` (this change adds no label or event).++---++## Task 4: Render `DateTimePicker` for a `precision: "datetime"` input++**Depends on:** Task 1 (may run in parallel with Tasks 2–3)+**Files:**+- Modify: `apps/erp/app/modules/workflows/ui/Builder/fields/types.ts` — add `precision` to `ValueFieldProps`+- Modify: `apps/erp/app/modules/workflows/ui/Builder/config/forms/StepInput.tsx` — forward `inputDef.precision`+- Modify: `apps/erp/app/modules/workflows/ui/Builder/fields/ValueField.tsx` — destructure and forward+- Modify: `apps/erp/app/modules/workflows/ui/Builder/fields/LiteralControl.tsx` — branch the `date` case+- Copy from (precedent): `packages/form/src/components/DateTimePicker.tsx:60-86` — the+ exact `parseAbsolute` → `toCalendarDateTime` read and+ `toZoned(...).toAbsoluteString()` write round-trip. Our version substitutes+ `useCompanyTimeZone()` for that file's `getLocalTimeZone()`.++**Steps:**++1. In `fields/types.ts`, in `ValueFieldProps`, immediately after the+ `choices?: readonly string[];` line, add:++ ```ts+ /** The input is a moment, not a calendar day: render a date AND time picker+ * and store a full ISO instant, resolved against the company's timezone. */+ precision?: "datetime";+ ```++2. In `config/forms/StepInput.tsx`, in the final `return (<ValueField … />)`+ fallthrough, add `precision={inputDef.precision}` immediately after the existing+ `choices={inputDef.choices}` line. This prop list is hand-picked — without this+ line `ValueField` never sees the flag.++3. In `fields/ValueField.tsx`:+ - add `precision` to the destructured props at the top of the component+ (alongside `choices`);+ - in the `<LiteralControl … />` call in the `else` branch, add+ `precision={precision}` immediately after `choices={choices}`.++4. In `fields/LiteralControl.tsx`:++ a. Extend the imports. From `@carbon/react` add `DateTimePicker` to the existing+ import list. Replace the current `@internationalized/date` import+ (`parseDate`) with:++ ```ts+ import {+ parseAbsolute,+ parseDate,+ toCalendarDateTime,+ toZoned+ } from "@internationalized/date";+ ```++ and add:++ ```ts+ import { useCompanyTimeZone } from "~/hooks";+ ```++ b. Beside the existing `asCalendarDate` helper, add a read helper. It must handle+ three cases: a full ISO instant (the new format), a legacy `YYYY-MM-DD`+ literal saved before this change, and anything unparseable.++ ```ts+ /** Stored datetimes are the full ISO instant the picker itself writes. A+ * value saved before datetime inputs existed is a bare `YYYY-MM-DD`, which+ * `parseAbsolute` rejects — read it as midnight on the company's calendar,+ * the moment it already effectively meant. Anything else leaves the picker+ * empty rather than crashing the node form. */+ function asCalendarDateTime(value: unknown, timeZone: string) {+ if (typeof value !== "string" || !value) return null;+ try {+ return toCalendarDateTime(parseAbsolute(value, timeZone));+ } catch {+ const date = asCalendarDate(value);+ return date ? toCalendarDateTime(date) : null;+ }+ }+ ```++ c. Add `precision?: "datetime";` to `LiteralControlProps` (next to `choices`) and+ destructure it in the component signature.++ d. Call the hook at the top of the component body, beside the existing+ `const { t } = useLingui();`:++ ```ts+ const companyTimeZone = useCompanyTimeZone();+ ```++ It must be called unconditionally at the top level — never inside the `date`+ branch, which would violate the rules of hooks.++ e. Replace the existing `case "date":` block with one that branches on the flag,+ keeping the date-only path byte-for-byte as it is today:++ ```ts+ case "date": {+ // A vendor's DATE_TIME. The picked wall clock is resolved against the+ // COMPANY's timezone, not the browser's — two admins in different offices+ // must not store different moments for the same typed time — and stored as+ // a full ISO instant, so the piece's own `dayjs(value).format(...)`+ // reproduces that moment whatever zone the worker runs in.+ if (precision === "datetime") {+ return shell(+ <DateTimePicker+ value={asCalendarDateTime(value, companyTimeZone)}+ onChange={(date) =>+ emit(+ date+ ? toZoned(date, companyTimeZone).toAbsoluteString()+ : undefined+ )+ }+ aria-label={t`Date and time`}+ isDisabled={isReadOnly}+ />+ );+ }+ return shell(+ <DatePicker+ value={asCalendarDate(value)}+ onChange={(date) => emit(date?.toString() ?? undefined)}+ aria-label={t`Date`}+ isDisabled={isReadOnly}+ />+ );+ }+ ```++ Note `DateTimePicker`'s `onChange` may be typed loosely (the form wrapper casts+ it). If TypeScript objects to the handler or to `value`, mirror whatever cast+ `packages/form/src/components/DateTimePicker.tsx` uses at its own+ `onChange={handleChange as any}` call site rather than inventing a new one.++ f. The new `aria-label` string uses Lingui's `t` macro, consistent with every+ other label in this file. Do not introduce an untranslated English string.++**Verify:**+```bash+cd /Users/aashu/work/carbon/carbon-feat-active-pieces-integration && pnpm exec turbo run typecheck --filter=erp+# Expected: exits 0.+```++**Out of scope:** `fields/control.ts` `pickControl` (already returns `"literal"` for a+date — the choice between the two pickers is internal to `LiteralControl`);+`ComputeForm.tsx` (renders `ValueField` directly and passes no `precision`, so its+Carbon-typed date inputs correctly stay date-only); `TemplateField`,+`MultiChoiceField`, `PairsField`, `OptionsField`; `packages/react`'s+`DateTimePicker` itself (use it as-is).++If `useCompanyTimeZone` cannot be imported from `~/hooks` inside this file (a+circular import, or the builder rendering outside the `/x` layout), STOP and report —+do not fall back to `getLocalTimeZone()`, which would store a different moment+depending on who edited the workflow.++---++## Task 5: Verify end to end++**Depends on:** Tasks 1–4++**Steps:**++1. Full scoped verification:++ ```bash+ cd /Users/aashu/work/carbon/carbon-feat-active-pieces-integration+ pnpm exec turbo run typecheck --filter=@carbon/workflows --filter=@carbon/jobs --filter=erp+ pnpm run check:workflow-catalog+ pnpm run test+ pnpm run lint+ ```++ Expected: all four exit 0. (A whole-repo `pnpm run typecheck` OOMs per+ `AGENTS.md`, so it stays scoped.)++2. Confirm the round-trip logic directly, without a browser, by checking that a+ wall clock resolved in a company timezone reads back as the same wall clock:++ ```bash+ cd /Users/aashu/work/carbon/carbon-feat-active-pieces-integration && pnpm exec tsx -e '+ import { CalendarDateTime, parseAbsolute, toCalendarDateTime, toZoned } from "@internationalized/date";+ const tz = "America/Chicago";+ const typed = new CalendarDateTime(2026, 9, 10, 15, 0);+ const stored = toZoned(typed, tz).toAbsoluteString();+ const readBack = toCalendarDateTime(parseAbsolute(stored, tz));+ console.log("stored:", stored);+ console.log("reads back as:", readBack.toString());+ console.log("same wall clock:", readBack.toString() === typed.toString());+ '+ # Expected: "same wall clock: true", and `stored` ends in a -05:00/-06:00 offset+ # (NOT a bare date, and NOT Z unless the company timezone is UTC).+ ```++ If `same wall clock` is false, STOP and report — the read and write helpers+ disagree and every saved node would drift.++3. Browser check in the real builder (ask the user before driving the app, per+ `AGENTS.md`). Open a workflow, add an Integration node, pick Google Calendar →+ Create Event, and confirm each acceptance criterion in the spec:+ - "Start date time of the event" shows a calendar AND a time field;+ - entering a date and `3:00 PM`, saving, and re-opening the node shows `3:00 PM`+ again;+ - "End date time of the event" also shows a time field;+ - a Carbon-native action with a date input still shows the date-only picker.++4. Tick every box in the spec's Acceptance Criteria that now holds, and update the+ spec's changelog with an implementation line.++**Out of scope:** committing (the user commits — never run `git commit` without+explicit permission); moving the spec to `.ai/specs/implemented/`; running a+database migration (there is none).diff --git a/.ai/research/2026-09-01-gmail-workflow-piece.md b/.ai/research/2026-09-01-gmail-workflow-piece.mdnew file mode 100644index 0000000000..d91ab0f454--- /dev/null+++ b/.ai/research/2026-09-01-gmail-workflow-piece.md@@ -0,0 +1,57 @@+# Gmail as a workflow piece — research++> Date: 2026-09-01 · Author: Aashu · Feeds `.ai/specs/implemented/2026-09-01-gmail-workflow-piece.md`++## The package: `@activepieces/[email protected]` (researched on 0.14.0; pinned 0.13.0 — see below)++- Self-contained bundle (no runtime deps; nodemailer + `@googleapis/gmail` inlined). `minimumSupportedRelease: 0.87.0`.+- `auth` is an ARRAY: `[OAuth2, CustomAuth("Service Account")]` — `getPieceOAuth2Auth` already picks the OAUTH2 member (Google Calendar has the same shape).+- Piece OAuth2 declaration: `authUrl https://accounts.google.com/o/oauth2/auth`, `tokenUrl https://oauth2.googleapis.com/token`,+ scope `gmail.send`, `gmail.readonly`, `gmail.compose`, `email`.+- Published actions (0.13.0): `send_email` (legacy), `gmail_send_email` (current), `request_approval_in_mail`,+ `reply_to_email`, `gmail_reply_to_thread`, `create_draft_reply`, `gmail_get_mail`, `gmail_get_message`,+ `gmail_search_mail`, `gmail_search_email`. Upstream `main` has ~25 more (drafts, forward, labels, threads) — not in 0.13.0.+- Every published action ships an `outputSchema` (coverage all-or-nothing per piece holds).+- Triggers exist (new email etc.) — out of scope, Carbon runs no piece triggers.++## Google scope classification (developers.google.com/workspace/gmail/api/auth/scopes)++| Scope | Class | Consequence |+|---|---|---|+| `gmail.send` | **Sensitive** | ordinary OAuth app verification (brand + privacy policy), which the Calendar app already needs |+| `email` (userinfo) | non-sensitive | already requested by Google Calendar's `accountLabel` |+| `gmail.readonly`, `gmail.compose`, `gmail.modify`, `gmail.metadata`, `mail.google.com` | **Restricted** | restricted-scope verification + an annual third-party **CASA security assessment** (paid, weeks) |++So the piece's default scope set is restricted-tier. A **send-only** override (`gmail.send` + `email`) stays sensitive-tier.++## What each action needs (read from the 0.13.0 bundle + upstream source)++- `gmail_send_email` / `send_email` (same props, same `run`): `users.messages.send` → `gmail.send`.+ - Blank `from` → `oauth2.userinfo.get()` → `email` scope. OK send-only.+ - `in_reply_to` set → `users.messages.list(q=Rfc822msgid:…)` → needs `gmail.readonly`. **Not OK send-only.**+ - `draft = true` → `users.drafts.create` → needs `gmail.compose`. **Not OK send-only.**+ - `attachments` is `ARRAY` of `{ data: base64|url, name }` objects. Carbon maps ARRAY → `list<string>`; strings would reach `run()` as malformed attachments. **Must be omitted.**+- `gmail_reply_to_thread`, `reply_to_email`, `create_draft_reply`: `message_id` DROPDOWN whose `options()` lists recent messages → `gmail.readonly`; `attachment` is `FILE` (unmappable).+- `gmail_get_message`, `gmail_get_mail`, `gmail_search_email`, `gmail_search_mail`: `gmail.readonly`.+- `request_approval_in_mail`: pauses the flow and waits on a callback URL (`ctx.run.pause`) — Carbon's shim throws on run control. Unusable.++## `gmail_send_email` vs legacy `send_email`++Identical props and `run`; only the `outputSchema` differs (`gmail_send_email` nests `data.{id,threadId,labelIds}` as children, `send_email` flattens via `value` paths). Both map through `outputs.ts`. Upstream keeps `send_email` for saved flows; `gmail_send_email` is the maintained one.++## Visibility outcome for `gmail_send_email` under the generic rules++Shown: `receiver` (list), `cc`, `bcc`, `subject`, `body`, `reply_to`, `sender_name`, `from`.+Auto-hidden with value (required + default): `body_type = plain_text`, `draft = false`.+Need allowlist overrides: `attachments` (omit), `in_reply_to` (omit, send-only), `draft` (omit + value false, so Advanced cannot flip it into a `gmail.compose` failure).++## Host facts that carry over unchanged++- Same Google OAuth app (`GOOGLE_OAUTH_*`) — already in `getBrowserEnv()`, so the card's "Coming soon" gate is free.+- A Gmail connection is its own `integrationConnection` row (`pieceName = "gmail"`), separate consent from Calendar, own refresh token. Google issues one refresh token per consent; consents for different scope sets on one client id do not interfere.+- `accountLabel` via `https://www.googleapis.com/oauth2/v2/userinfo` `email` — exactly Calendar's.+- Operational: the Gmail scope(s) must be added to the Google Cloud OAuth consent screen and go through sensitive-scope verification; until then only test users can consent.++## Why 0.13.0, not 0.14.0++pnpm-workspace.yaml sets `minimumReleaseAge: 4320` (3 days) and 0.14.0 was published 2026-09-01. 0.13.0 (2026-08-20) passes. Introspected 0.13.0: `gmail_send_email` props, `outputSchema` and the OAuth2 scope list are identical to 0.14.0. 0.13.0 actually ships MORE actions (26, incl. drafts/forward/labels/threads) than the trimmed 0.14.0 (10) — irrelevant under the allowlist, which exposes one.diff --git a/.ai/research/2026-09-01-slack-workflow-piece.md b/.ai/research/2026-09-01-slack-workflow-piece.mdnew file mode 100644index 0000000000..293e876018--- /dev/null+++ b/.ai/research/2026-09-01-slack-workflow-piece.md@@ -0,0 +1,87 @@+# Research: Slack as the second Activepieces workflow piece++Date: 2026-09-01. Companion to `.claude/rules/workflow-integrations.md` (the authoritative+"Adding a piece" checklist) and `.ai/research/activepieces-*.md`.++## 1. The piece — `@activepieces/[email protected]` (npm latest, inspected 2026-09-01)++Single minified bundle (`src/index.js`), no `lib/` sources shipped. Introspected by loading it+against `packages/jobs/node_modules` (framework resolves; same shape as `piece-google-calendar`).++**Auth** is an array `[slackOAuth2Auth, slackAuth]` — exactly like Google Calendar, so+`getPieceOAuth2Auth` picks the OAuth2 entry unchanged.++- OAuth2: `tokenUrl https://slack.com/api/oauth.v2.access`;+ `authUrl https://slack.com/oauth/v2/authorize?user_scope=<17 user scopes>` (the piece+ bakes a **user-token** request into the URL); `scope` = 30 bot scopes (channels:read,+ channels:manage, channels:history, chat:write, groups:*, im:*, mpim:*, users:read,+ users:read.email, files:read/write, reactions:*, usergroups:*, chat:write.customize,+ links:*, emoji:read, users.profile:read, channels:join, conversations.connect:write, …).+- CUSTOM_AUTH: `{ botToken*, userToken }` — unsupported by design (rule: OAuth2 only).++**Runtime auth contract** (from the bundle): `isCustomAuth = auth.type === "CUSTOM_AUTH"`;+bot token = `auth.access_token` otherwise; user token = `auth.data.authed_user.access_token`,+used ONLY when an action sends/reacts *as the user* (`sendAsBot=false`, `reactAsUser`).+`auth.data.team` is read by `getConnectionIdentifier` (auth-level, we never call it) and by+trigger `onEnable` (triggers are a non-goal). So our current+`buildPieceContext({ auth: { access_token } })` is sufficient for bot-only actions.++**Token response quirks**: `oauth.v2.access` returns HTTP 200 with `{ ok:false, error }` on+failure (our `readTokenResponse` then throws "returned no access token" — acceptable); bot+tokens carry **no `expires_in` and no refresh token** unless the app opts into token+rotation → `expiresAt = null` → `expiringSoon` is false → never refreshed. Account label:+`GET https://slack.com/api/auth.test` → `team` (workspace name).++**Actions**: ~70, with heavy duplication (legacy `send_channel_message` with a fetched+`channel: DROPDOWN` vs newer `slack_post_message` with `channel: SHORT_TEXT`). Only+`custom_api_call`, `delete-message`, `markdownToSlackFormat`, `slack-add-reaction-to-message`+and a handful of `slack_*` mutators lack `outputSchema`; every candidate below has one.++| action | props (types; `*` required; `=` default) | notes |+|---|---|---|+| `send_channel_message` — Send Message To A Channel | `info:MARKDOWN`, `channel:DROPDOWN*`, `text:LONG_TEXT`, `sendAsBot:CHECKBOX*=true`, `threadTs`, `username`, `profilePicture`, `iconEmoji`, `file:FILE`, `replyBroadcast=false`, `mentionOriginFlow=false`, `unfurlLinks=true`, `blocks:JSON=[]` | MARKDOWN/FILE/JSON are unmappable today |+| `send_direct_message` — Send Message To A User | `userId:DROPDOWN*`, `text:LONG_TEXT*`, `username`, `profilePicture`, `iconEmoji`, `mentionOriginFlow=false`, `blocks:JSON=[]`, `unfurlLinks=true` | |+| `slack-find-user-by-email` | `email:SHORT_TEXT*` | |+| `slack-create-channel` | `channelName:SHORT_TEXT*`, `isPrivate=false` | needs `channels:manage` |+| `retrieveThreadMessages` | `channel:DROPDOWN*`, `threadTs*` | read path |+| `updateMessage` | `info:MARKDOWN`, `channel:DROPDOWN*`, `ts*`, `text*`, `mentionOriginFlow`, `blocks:JSON` | |++`mentionOriginFlow=true` calls the host `flows`/`run` context (our stubs throw) → must stay+hidden/pinned false. `DROPDOWN` channel/user lists run the piece's own `options()` through the+existing `integration.property` provider (`conversations.list` → `channels:read`/`groups:read`;+`users.list` → `users:read`).++## 2. Gaps in the current host for this piece++1. **`toValueType` runs before `visibilityOf`** (`integrations/catalog.ts`), so an unmappable+ prop (`MARKDOWN`, `FILE`, `JSON`) fails the generator even when the allowlist hides it.+ Activepieces `MARKDOWN` is display-only (never collects a value); `FILE`/`JSON` here are+ optional extras.+2. **Consent URL** (`integrations.connections.$piece.connect.ts`) is `new URL(auth.authUrl)` ++ our params, so Slack's baked-in `user_scope=` survives and every connecting user would hand+ Carbon a personal user token we do not use; and `scope` is the piece's full 30-scope list.+ The Slack app manifest must declare every requested scope or Slack answers `invalid_scope`.+3. `access_type=offline&prompt=consent` are Google params; Slack ignores unknown query params.++## 3. The existing Slack integration (Carbon Assistant) — collision++`packages/ee/src/slack/config.tsx` already registers `id: "slack"` (name "Slack", category+"Assistant"): a bot install via `@slack/oauth` (`integrations.slack.install.ts` →+`integrations.slack.oauth.ts`), scopes `assistant:write chat:write.public chat:write commands+files:read im:history incoming-webhook team:read users:read users:read.email`, token in the+vault under `companyIntegration.secretRef` (`SECRET_KEYS.slack`), metadata `team_id`,+`team_name`, `channel`, webhook `url`, `bot_user_id`. Drives issue/NCR thread sync, notification+fan-out (`carbon/send-slack`), slash-command interactivity. Env: `SLACK_CLIENT_ID`,+`SLACK_CLIENT_SECRET`, `SLACK_OAUTH_REDIRECT_URL`, `SLACK_SIGNING_SECRET`, `SLACK_STATE_SECRET`,+`SLACK_BOT_TOKEN` (Carbon's own workspace).++The workflow design leans on `card id === piece name === PIECE_ALLOWLIST key`+(`integrations.$id.tsx` grafts the Accounts tab from `PIECE_ALLOWLIST[id]`, the callback upserts+`companyIntegration[id]`, `hooks.server.ts` is keyed by id, the builder links to+`path.to.integration(piece)`). A `"slack"` allowlist key would therefore bolt workflow accounts+onto the Assistant card and have the piece callback mark the Assistant "Installed" without its+metadata. The two installs also request different scope sets against (potentially) the same+Slack app.++Full maps from the two exploration passes: see `../scratch` notes in this session; the+rule file remains the source of truth for the mechanics.diff --git a/.ai/research/activepieces-decisions.md b/.ai/research/activepieces-decisions.mdnew file mode 100644index 0000000000..8ed264d85f--- /dev/null+++ b/.ai/research/activepieces-decisions.md@@ -0,0 +1,323 @@+# Activepieces integration — goals and decisions++All three problems are closed on design. This doc states **what we are trying to achieve**,+then the decision behind each. Evidence lives in `activepieces-integration-findings.md`.++## Why this is bigger than originally planned++v1 shipped integrations as a node kind with `outputs: { result: t.string }` — the JSON the+piece returned, as one string. That was a deliberate, documented non-goal+(`.claude/rules/workflow-integrations.md`: *"mapping a piece's output schema"*), and it was+the right call to ship on.++The consequence is that **a workflow can call a vendor but cannot use the answer.** "Get all+Events" hands the author one opaque string: no property access, no counting, no looping, no+branching on what came back. Every use case past fire-and-forget is blocked, and blocked+*silently* — the author sees a `result` variable and only discovers at run time that it is a+blob.++Closing that is not a patch to the integration node. It touches the catalog generator (emit+real output types), the type system's entity registry (synthetic entities), a node kind (the+filter node becomes a JSON/data node), and the builder form (which inputs a person sees). That+is the scope increase, and it is deliberate — the alternative is an integration feature whose+output nobody can consume.++## Goals++1. **An author can see, at build time, what an integration step returns** — real named+ properties in the variable picker, not a JSON string. Without running the step, without+ touching the customer's account, and without us hand-writing a shape per action.+2. **An author can operate on returned data** — count it, filter it, take the first, project a+ field across a list, loop over it — using one node rather than a new one per operation.+3. **An author sees a form worth filling in** — vendor API trivia hidden by default, business+ decisions surfaced, and nothing permanently out of reach.+4. **No per-action maintenance burden on us.** Adding a piece stays "a few lines and a package"+ — that was the whole reason to build on Activepieces, and no decision here may erode it.+5. **Nothing already saved breaks.** Every change is additive; `result: t.string` stays.++## Non-goals (this round)++- Genuinely nested (2D+) array structure kept grouped — needs `list<list<T>>`, a core-model+ change. Flatten covers the real cases.+- Publish-time guarantee that a vendor's response matches its declared schema. Nobody in the+ market does this; run-time resolution stays tolerant.+- Pieces with no `outputSchema` (HubSpot, Salesforce, Shopify, …). Deferred, not designed+ away — see P1.+- Triggers, non-OAuth2 auth. Unchanged from v1's non-goals.++# Problem 1 — Build-time knowledge of what a step outputs ✅ CLOSED++**Today:** every integration step declares `outputs: { result: t.string }` holding+`JSON.stringify(...)`. `walkPath` descends only into `entity` types, so there is no way to+reach `items[0].summary`. The author sees one `result` variable and discovers at run time+that it is a blob. Unusable, and silently so.++## Decision — allowlist only actions that ship an `outputSchema`++The schema is the source of build-time paths and labels. An action without one is not+exposed. Enforced in the generator, like the existing `UnmappablePropertyError`: a piece+action that fails the rule fails the build rather than reaching a customer's canvas.++**Why this works.** Coverage is **binary per piece**, not a per-action lottery — Google+Calendar 25/25, Sheets 60/61, Airtable 33/34, versus HubSpot 0/45, Salesforce 0/27. So the+rule is knowable with one check when a piece is allowlisted, which is already a deliberate,+human-gated step. And it is genuinely free: no per-action authoring, no capture pipeline, no+calls against a customer's account.++**What it rules out**, and why that is right:+- *Hand-writing shapes per action* — rebuilding the integration by hand. This was the+ objection that killed the original proposal, and it stands.+- *Sampling on the customer's account* — Zapier's model, real side effects; their own docs+ warn about it. `/test-step` upstream is a real run; `RunEnvironment.TESTING` is only a label.+- *Packaging-time capture on our own dev account* — still the best fallback if we ever need+ a piece without schemas, but it is a pipeline to build and maintain. Not needed if we can+ simply decline such actions.++## What this does NOT solve — and the design must absorb it++`outputSchema` is **unvalidated metadata**, not a contract:+- upstream docs scope it to presentation, *"without changing the expression paths used in+ automations"*;+- `ActionRunner` returns `Promise<unknown | void>`; there is zero validation in+ server/core/web/engine;+- it shipped August 2026 — one month old;+- upstream's own picker expands arrays from **executed sample data**, using the schema only+ for labels.++Therefore:+- **Authoring-time only.** Schema-derived types populate the variable picker and generate+ paths. They are not a publish-time guarantee.+- **Tolerant at run time.** Resolve a declared path against the real response; missing or+ mistyped → `null`, never a crash and never a lie. Same posture as `toPropsValue` omitting+ an absent optional input, and the same behaviour as n8n's `Reflect.get`.+- **Keep `result: t.string`** alongside, holding the raw JSON. It is the escape hatch when a+ schema misses a field, keeps "pass the blob to a webhook" working, and makes the whole+ change purely additive to saved workflows.++## Representation++`ValueType` has no object type and `list<list<T>>` is unrepresentable, so we do **not** add a+kind. Instead the generator emits a **synthetic entity** per schema container — an entity is+only a name plus a property map, and nothing requires it to be a database table.++- `listItems` → `list<entity>`; `children` → a nested `entity`; `format` → a `ValueType`+ guess (`datetime`→date, `number`→number, `boolean`→boolean, else string).+- Namespaced ids (e.g. `integration.google-calendar.event`) so they can never collide with a+ real Carbon entity. No `permission` — it is not Carbon data.+- `list<entity>` plus the **existing** `batchPlan` gives per-item looping for free: Carbon+ already derives "this step repeats" from a list wired into a single-value slot, which is+ n8n's implicit-per-item model.+- Add a `count` output. `compare` allows only `contains` on lists, so "did anything come+ back?" is otherwise inexpressible.++**Open:** does run history render a `list<entity>` output usefully today? Unchecked.+**Open:** `dynamicKey: true` marks per-account-varying keys (Sheets `find_rows`). Render+those as free-text path entry rather than a picker — needs a UI decision.++---++# Problem 2 — Operating on the returned data ✅ CLOSED++**Today:** nothing. Even with Problem 1 solved, an author holding+`list<googleCalendarEvent>` can loop over it via batching, but cannot count it, filter it,+take the first one, or reach into a nested array.++**Hypothesis on the table:** a JSON-operations node that accepts JSON, performs an operation,+and returns either a primitive or another JSON value.++## What the prior art says++Every platform concluded arrays need a **first-class primitive**, not expression syntax:++| platform | mechanism |+|---|---|+| n8n | **Split Out** (1 item holding an N-array → N items) + **Aggregate** (inverse, with `Merge Lists` for list-of-lists) |+| Make | **Iterator** ("converts an array into a series of bundles") + **Array Aggregator** |+| Activepieces | `LOOP_ON_ITEMS` step type, validates input is an array, **nests** |+| Zapier | line items only; escape hatch is Formatter → Line-item-to-Text (flatten to string). Weakest of the four. |++And **nobody solves nested arrays** past one level: chain Split Outs, chain Iterators, or drop+to a Code node. Fair for us to stop there too.++## Decision — widen the existing filter node into a JSON/data node++Do **not** add a second node. The filter node already owns `loopList` and `ItemRef` ("the+item a looping node is currently on"), so a separate extract node would need its own parallel+item concept and we would have two loop primitives that must be kept agreeing. Widen the one+that exists: from *list in → filtered list out* to *value in → operation → value out*, where+filtering becomes one operation among several.++Operation set (Activepieces' own formula library is the shopping list — `pluck`,+`filter_list`, `count`, `first_item`, `join_list`):+`filter` · `count` · `first` / `last` · `pluck` (project one field across a list, with an+optional **flatten** flag) · `join`.++**This is fully typed, because P1 gives it typed input.** Once an integration step emits+`list<googleCalendarEvent>` instead of `t.string`, the node reads the upstream step's catalog+entry and knows exactly what it is operating on. Every operation's output type is then+derivable and checkable at publish, like the rest of Carbon:++| operation | output type |+|---|---|+| `count` | `number` |+| `first` / `last` | the element entity |+| `filter` | same `list<entity>` |+| `pluck("title")` | `list<string>` — looked up on the entity |+| `pluck("attendees")` + flatten | `list<attendee>` — see nested arrays below |+| `join` | `string` |++**Correction to an earlier claim in this doc's history:** `list<entity>` does **not** get+looping "for free" from existing batching. `engine/execute.ts:261` is+`if (node.type !== "action") return undefined` — the engine batches **action nodes only**, and+`catalog.ts` hard-codes `batchable: false` for integration steps. Batching also means "this+step repeats over a list fed *into* it", not "this step emits a list others iterate." That is+exactly why iteration has to live in this node.++### Nested objects and nested arrays++**Nested objects chain naturally.** `children` become nested entities and `walkPath` already+descends through entities, so `first → organizer → email` composes across two nodes with+nothing new.++**Nested arrays need one addition.** A 2D array cannot chain the same way, because+`valueTypeSchema`'s `list` accepts only a scalar (primitive or entity), never another list —+`list<list<T>>` is unrepresentable, so a node has no type in which to return one, and nothing+upstream could hand one to the next node.++So flatten is **not** a standalone operation taking a 2D array (such an input cannot exist).+It is an **optional flag on the operation that would otherwise produce one**:+`pluck("attendees")` over `list<event>` logically yields `list<list<attendee>>`; with flatten+it returns `list<attendee>` directly. The 2D value is never materialised — it is collapsed at+the moment it is created. Default it on: the flat result is nearly always what is wanted+("every attendee across every event"). This is Make's `Merge Lists` on Array Aggregator.++What this deliberately does not give: genuinely ragged multi-level structure — keeping events+*grouped* with their attendees. That needs real `list<list<T>>`, i.e. the core-model change+(schema, validator, operators, templates, picker, and `rendersAsText` which assumes an entity+part is never a list). Grouping is rarely the ask; flattening is. Not v1.++Worth noting nobody else represents nested arrays either: n8n chains Split Outs and Make+chains Iterators precisely because their data is untyped — they never need a *name* for the+intermediate value. Zapier flattens to text. Our flatten flag reaches the same place while+staying typed.++**Deliberately NOT in v1: a raw `path` operation into the `result` blob.** It is the only+operation whose output type is not derivable, because it would reach into things the synthetic+entity does not model — a sub-array (`list<list<T>>` is unrepresentable) or a field the schema+omitted. Leaving it out keeps P2 fully typed end to end with no publish-time hole, and stops+exactly where n8n, Make and Zapier stop. Additive later as an explicit escape hatch with+tolerant resolution if a real need appears.++**Open (implementation, not design):** replacing the shipped `filter` node type has a+migration cost on already-saved workflows — check what is published before committing to a+rename versus adding a mode.++# Problem 3 — UI presentation and control ✅ CLOSED++**Today:** `buildPieceActionDeclarations` loops `Object.entries(action.props)` and emits every+prop. Whatever the vendor wrote, the author sees.++Measured on `google_calendar_get_events` (piece 0.10.3):++| prop | type | verdict |+|---|---|---|+| `calendar_id` | DROPDOWN, required | **keep** — a real business choice |+| `event_types` | STATIC_MULTI_SELECT, required, default `["default","focusTime","outOfOffice"]` | hide, use default |+| `search` | SHORT_TEXT | keep |+| `start_date` / `end_date` | DATE_TIME | keep |+| `singleEvents` | CHECKBOX, required, default `false` | **hide and pin to `true`** |++`singleEvents` ("Expand Recurring Event?") is worse than clutter — defaulting to `false`+means "events tomorrow" silently misses every recurring meeting, because unexpanded+recurring events carry the *series* start date. The vendor default is wrong for our use case.++**The rule:** hide fields that encode vendor API trivia; keep fields that encode a business+decision. `singleEvents` is trivia. `calendar_id` is a decision.++## Decision — three tiers: generic rules, a reviewed hide list, and Advanced properties++Not a per-action override table (that carries the same maintenance smell as hand-writing+schemas). Three layers, cheapest first:++**1. Generic rules, auto-applied, no per-action data.**+- **required + has a `defaultValue`** → hide, send the default. Covers `event_types`.+- **exactly one possible value** → hide.+- **connection input with exactly one connection** → auto-select and hide. Must still *store*+ the `connectionId` (a second connection added later must not silently repoint existing+ workflows) and stay a required input the validator checks — hiding is never removing. Zero+ connections already renders "Connect …"; two or more shows the field.++**2. A reviewed hide list per integration.** Written once when we allowlist a piece — which is+already a deliberate, human-gated step — for fields the rules cannot catch because the+vendor's default is *wrong for us* rather than merely boring. `singleEvents` is the case:+required, defaulted to `false`, and that default silently drops every recurring meeting. Pin+such values **at run time**, not stored on the node, so changing our mind fixes every existing+workflow instead of leaving stale literals behind. A hidden required prop with no pinned value+must **fail the generator**.++**3. An "Advanced properties" section on the node**, collapsed by default, showing everything —+including fields hidden by tiers 1 and 2. This is what makes the whole approach safe: a hidden+field is **demoted, never lost**. A normal user sees the simplified form; a power user opens+Advanced and gets full control without needing a code change from us. It also means being+wrong about a hide decision costs a click, not a release.++**Advanced shows pinned values as editable.** More honest than read-only, and the stale-literal+risk is acceptable because overriding is an explicit, deliberate action — the run-time pin+still governs every node that has not opted out.++**On `calendar_id`:** do not "select all calendars" — `get_events` hits+`/calendars/{id}/events` for exactly one id, so "all" means N fanned-out calls plus every+subscribed holiday calendar. Default to the **primary** calendar and keep the field visible:+which calendar is a genuine business choice on a shared workshop account.++## Two real bugs, traced (fix regardless of the above)++Auth shape is **fine** — I invoked the real options function; it reached Google and returned a+genuine 401 on a fake token.++1. **A vendor error becomes "no options."** The piece's `options()` throws on any non-2xx;+ `workflows.options.ts` flattens that to `{options: [], error}`; `OptionsField` then renders+ an empty `Combobox` (the `emptyHref` branch does not apply to the property provider), so it+ reads as "this account has no calendars" rather than "the call failed." `issue ?? error`+ also lets a field issue mask the error entirely.+2. **The fetch never retries.** `useWorkflowOptions` loads only when+ `fetcher.state === "idle" && fetcher.data === undefined`, so it fires **once**. A failed+ first load leaves `fetcher.data` set, so the field is **permanently stuck empty** for the+ rest of the editing session. Almost certainly the reported regression.++**Open:** how much of the piece's own `description` text to surface as field help.++---++# Cross-cutting note — what remains unguaranteed++With the raw-`path` operation left out of v1, there is **no publish-time hole of our own+making**: paths come from the schema, and every JSON-node operation's output type is derived+and checked like any other Carbon wiring.++What stays unguaranteed is narrower, and is not something any platform solves: whether the+**vendor's actual response matches the schema it declared**. `outputSchema` is unvalidated+upstream (`run()` returns `Promise<unknown | void>`; zero validation in server/core/web/engine).+So run-time resolution stays tolerant — a declared path that is absent or mistyped yields+`null`, never a crash and never a lie — and `result: t.string` remains alongside as the raw+escape hatch. Zapier, Make, n8n and Activepieces all accept exactly this.++# Suggested order++1. **Options bugs** (P3) — smallest, and the calendar dropdown is broken right now.+2. **Generic hide rules + auto-hide single connection + Advanced section** (P3).+3. **Schema-gated allowlist + synthetic entities + `count` output** (P1).+4. **Widen the filter node into the JSON/data node** (P2) — needs 3 to be useful.++Steps 1–2 are days. Step 3 is the one to design carefully. Step 4 carries a migration+question (rename the shipped `filter` node type versus add a mode) — check what is already+published first.++## Still open (implementation detail only, no design blockers)++- Rename/migration cost of replacing the shipped `filter` node type.+- One node with an operation dropdown versus a mode — affects validation shape.+- Does run history render a `list<entity>` output usefully today? Unchecked.+- `dynamicKey: true` fields (per-account-varying keys) — render as free-text path entry+ rather than a picker.+- How much of a piece's own `description` text to surface as field help.diff --git a/.ai/research/activepieces-integration-findings.md b/.ai/research/activepieces-integration-findings.mdnew file mode 100644index 0000000000..7c73d2d584--- /dev/null+++ b/.ai/research/activepieces-integration-findings.md@@ -0,0 +1,251 @@+# Activepieces: returned data + UI control++Two problems on the integration node:+1. A piece's output is `{ result: t.string }` — a JSON blob. `walkPath` only descends into+ `entity` types, so there is no way to reach `items[0].summary`. The data is unusable, and+ silently so: the author sees a `result` variable and only finds out at run time.+2. We emit every vendor prop (`buildPieceActionDeclarations` loops `action.props`), so the+ form shows API trivia nobody wants.++The hard part of (1) is **discovery, not representation**: the author must write a path at+build time against data that only exists at run time. So the first question is how everyone+else solves that.++---++# Part 1 — How the other platforms do it++## Zapier++**The declaration.** A static `sample` JSON blob plus an `outputFields` array, committed in+the integration definition. Live capture exists only as a bootstrap button:++> "Either click the **Use Response from Test Data** button to import the fields your app sent+> to Zapier in the previous test, or add your own JSON-formatted fields."+> — docs.zapier.com/platform/build/sample-data++Nothing re-captures it at run time. The field mapper is populated **from the sample**, not+from live data.++**Testing mutates, and they say so plainly.**++> "When you test an action step, Zapier will perform the action on your behalf." /+> "Testing is live and may result in changes made in your app."+> — help.zapier.com/.../18811411817741++There is a **Skip tests** button for actions; triggers, Filters and Paths *must* be tested+before publishing.++**Their answer to the sample-vs-live gap is a lint rule.** Because mapping comes from the+sample: *"If that mapped field is then not available when a user's Zap runs, the action field+will be empty, causing errors."* Mitigations: a discipline rule on the developer — **"Only+include fields that are present every time a Zap runs"** — plus automated checks that sample+and live data match. That is the whole solution. **This is exactly the "my dev account had no+`queries` field" problem, and the market leader has no better answer.**++**Dynamic fields** (`z.request` + `altersDynamicFields` + a **Refresh Fields** button) handle+per-account custom fields — but **actions only, not triggers**.++**Arrays are second-class.** "Line items" are the only array primitive, shown in a separate+indented section; both trigger and action must support them, and not all action fields+accept them. Escape hatch: Formatter → **Line-item to Text**, flattening to a delimited+string. Arrays-in-arrays effectively unsupported.++## Make.com++**Architecturally identical to Zapier**: the Interface block is static JSON, with a generator+as convenience. The documented workflow is copy-paste: run module → Download output bundles →+Generator → paste JSON → replace Interface.++**And Make explicitly distrusts the generated result:** **"The generated code still needs to+be reviewed!"** — dates get mistyped, labels need capitalization, pagination fields must be+stripped from Search modules. *A machine-derived shape is a draft, not an answer.*++**Make has the one real escape hatch found anywhere: RPC dynamic interfaces.** "You can use+RPC to generate the interface dynamically" — computed per account at design time, mixable+with static params. This is the only mechanism in the whole survey that **solves** per-account+divergence instead of policing it. It costs a design-time call per account.++**Arrays are first-class**: **Iterator** ("converts an array into a series of bundles — each+array item will output as a separate bundle") and **Array Aggregator** (the inverse).+Decompose → process per item → reassemble.++**Honest gaps:** Make never states in first-party wording that "Run this module only" mutates+real data — only that it "consumes one credit." And arrays-in-arrays have no first-party docs;+chained Iterators appear only in community threads.++## n8n++**No output schema at all in the node type.** `INodeTypeDescription.outputs` describes+*connection topology only* — how many branches, of what type. There is no field anywhere+describing the JSON a node emits. The entire runtime contract is+`Array<{ json: {...}, binary?: {...} }>`.++**Discovery is execution.** Run the node, read the INPUT/OUTPUT panels, drag a field into a+parameter to generate `{{ $json.fruit }}`. Autocomplete is resolution-based, not type-based.+Worth stealing as a warning: **Schema view is built from the first item only**, so a field+missing from item 1 is invisible even when item 2 has it.++**Real API calls at build time, with no guard whatsoever.** Grepping the node type for+`readOnly|idempoten|destructive|mutating|sideEffect` finds nothing relevant — n8n has no basis+on which to warn, and doesn't. Its own framing of the risk is resource limits, not mutations:+pinning *"protect[s] live systems from repeated test calls."*++**Pin data is a genuine firewall — but only from the 2nd call on.** The engine short-circuits+before `execute()`:++```ts+if (pinData && !executionNode.disabled && pinData[executionNode.name] !== undefined) {+ nodeSuccessData = [nodePinData]; // node never runs, no API call+} else { /* actually run the node */ }+```++But the documented way to pin is *"1. Run the node to load data. 2. Select Pin data."*+**Pinning presupposes discovery; it doesn't provide it.**++**The one genuinely new idea: committed schema files.** n8n's **Schema Preview** — *"view a+node's expected output — no execution, no credentials needed"* — is not inferred from TS+types or cached runs. It is hand-written draft-7 **JSON Schema checked into the repo** at+`nodes/<Node>/__schema__/v<version>/<resource>/<operation>.json`, fetched by path.+*Caveat:* coverage is partial and hand-curated — Slack, Notion, Asana, Stripe present;+**Google Calendar, Airtable, HubSpot absent (404)**. A moderator confirms there is no way to+generate one *"without executing the node or using pinned data."*++**Arrays are the model, not a feature.** n8n's data is an array of items and **nodes+automatically run once per item**: *"n8n handles this repetitive processing automatically...+Nodes usually run once for each item."* Fan-out is a property of the data, not control flow —+which is why **Split Out** (1 item holding an N-array → N items) is the idiomatic loop, and+**Aggregate** is the inverse (with a `Merge Lists` option for list-of-lists). Escapes:+**Execute Once**, the Code node's run-once-for-all mode, and a hand-maintained list of+non-iterating nodes.++## Activepieces itself (upstream, HEAD `0ff753b`)++**`outputSchema` exists but is explicitly presentational:**++> "…a friendly, labelled presentation … **without changing the expression paths used in+> automations.**"++`ActionRunner` returns `Promise<unknown | void>`. Grepping server/core/web/engine finds+**zero runtime validation** — `piece-executor.ts` calls `setOutput(output)` directly. A schema+claiming `invoice_id` when `run()` returns `invoiceId` produces no error anywhere. It shipped+**August 2026**, one month ago.++**Their picker is driven by executed sample data, not by the schema.** `utils-schema.ts` walks+`outputSchema` *against real sample data*, expanding `listItems` per actual array element.+**With no sample data there is nothing to expand** — the schema only paints labels on a tree+that sample data built. And **actions have no `sampleData` field at all** (triggers require+one), so for an action the only shape source is execution.++**Sample data is stored per-step, per-flow-version**, as a JSON file blob (DB or S3), and+**never expires**.++**Testing a mutating action really mutates.** `/test-step` enqueues a real engine run;+`RunEnvironment.TESTING` is just a label. The framework *does* have a `test()` override that+test-mode prefers over `run()` — and across all 728 pieces there are **48 `test:` definitions,+0 of them on actions** (all triggers). Upstream gates data access behind "test the step+first," which for a create/delete action means really creating/deleting.++**Neither marker helps.** `aiMetadata.idempotent` is an LLM hint — docs: *"it does not by+itself prevent or trigger retries"*; its only readers are MCP surfaces.+`ActionClassification` (READ/SEARCH/WRITE/DESTRUCTIVE) has `isReadOnlyClassification()` but+**no runtime consumer** found in server, engine or web.++**Arrays:** a `LOOP_ON_ITEMS` step type that validates its input is an array and **nests**.+Reshaping is the Code step or a spreadsheet-style formula library (`pluck`, `filter_list`,+`count`, `first_item`…). No data-mapper node.++## The one conclusion all four share++| | declared schema | how authors really discover | test mutates? | arrays |+|---|---|---|---|---|+| Zapier | static `sample`, hand-written | sample data | **yes**, documented | line items (weak) |+| Make | static Interface JSON | generator + mandatory review | implied (costs a credit) | Iterator / Aggregator |+| n8n | none in node type; separate committed JSON files, partial | execute → panels → drag-drop | **yes**, no marker at all | Split Out / Aggregate |+| Activepieces | `outputSchema`, ~8% of pieces, presentational | executed sample data per step | **yes**; `test()` hook exists, 0 actions use it | Loop on Items |++**Four independent teams, one answer: the authoritative shape comes from an executed+response, and every one gates authoring behind running the step for real.** Nobody solved+discovery without execution. Every declared schema above is hand-curated, partially adopted,+and **validated by no one at run time**. Nested arrays: everyone stops at one level.++---++# Part 2 — What the pieces actually ship (measured, not read)++Loaded the packages and inspected them.++**Correction:** I earlier said `outputSchema` was missing on our two allowlisted actions.+Wrong — I'd read a minified bundle. It is on all 25 Google Calendar actions.++Then I over-sold it. Across 12 pieces / 496 actions, coverage is **binary per piece**:++| ~full coverage | zero coverage |+|---|---|+| google-calendar 100%, google-sheets 98%, airtable 97%, notion 92%, github 84%, slack 81% | hubspot, salesforce, jira-cloud, shopify, excel-365, xero — all **0%** |++Upstream-wide: **57 of 728 pieces (7.8%)**. My first sample was biased toward the ones that+have it. `classification` is **81%**, not the 100% I claimed — zero on Salesforce/Shopify/Xero.+Being binary per piece is the useful part: it is knowable with one check at allowlist time.++**Where present it is rich** — human labels, dotted `value` paths, `listItems` for array+element shapes, `children` for nesting, `format` hints (datetime/url/email/number). Across+3,987 field descriptors: `key`/`label` on all, `format` 1728, `children` 339, `listItems` 175.+I verified the paths describe `run()`'s **real** return envelope (`status` unmapped at the+top, everything else under `body.*`).++`dynamicKey: true` (Google Sheets `find_rows`) is the vendor pre-declaring "keys here vary per+account" — the `queries` problem, declared instead of silently missed.++---++# Part 3 — Our own constraints (read from our code)++- `ValueType` = primitive | entity | list-of-scalar. **No object type**, `list<list<T>>`+ unrepresentable, `walkPath` descends only through `entity`. "Just add a nested type" is a+ core-model change touching schema, validator, operators, templates and the picker.+- **But `entity` is only a name + property map** — nothing requires a DB table. A synthetic+ `googleCalendarEvent` entity is representable *today*, and `list<entity>` plus the existing+ `batchPlan` gives per-item looping **for free**. Carbon already has n8n's model: batching is+ derived from a list wired into a single-value slot.+- `compare` allows only `contains` on lists and `eq`/`neq` on entities → "did anything come+ back?" is not expressible without an explicit `count` output.++**The calendar dropdown bug — traced, not guessed.** Auth shape is **fine**: I invoked the+real options function, it reached Google and returned a genuine 401 on a fake token. Two other+defects:+1. The piece's `options()` **throws** on any non-2xx; the route flattens that to+ `{options: []}`; the field then renders an empty dropdown reading as "this account has no+ calendars" rather than "the call failed" (and `issue ?? error` lets a field issue mask it).+2. `useWorkflowOptions` only fetches when `fetcher.data === undefined`, so it fires **once** —+ a failed first load leaves it **permanently stuck empty** until a page reload. Almost+ certainly the regression.++---++# Part 4 — Where this leaves the design++Ranked by what the evidence supports:++- **Hand-writing shapes per action** — rebuilding the integration by hand; the objection that+ killed this was correct.+- **`outputSchema` as a typed contract** — dead. Unvalidated, 8%-adopted, one month old,+ presentational by upstream's own docs. **Survives as a path/label suggester** in the picker,+ which is exactly how upstream uses it, and costs one generic mapper.+- **Sampling on the customer's account** — this is Zapier's model, side effects and all, and+ Zapier's own docs warn about it. Rejecting it was right; the incumbent version isn't better.+- **Capturing the shape once on OUR dev account at packaging time** — strongest option. It is+ Make's generator workflow *including* its review step, minus the customer side effects. Its+ con (dev account lacks a field the customer has) is **universal and unsolved by the+ leaders** — Zapier's entire answer is a lint rule — and `dynamicKey` plus a raw-JSON escape+ hatch puts us slightly ahead.+- **Runtime stays tolerant**: resolve a path, yield null if absent (n8n's `Reflect.get`+ behaviour). Never enforce a declared shape at run time — nobody does.+- **Arrays**: `list<entity>` + existing batching covers one level. A Split-Out-style node is+ the shape to copy for explicit control. Nested arrays — fair to stop where all four stopped.++**Open calls**+- Is authoring-time-only typing acceptable, when "publish catches broken wiring" is Carbon's+ selling point? Product call, not technical.+- Fallback for a 0%-coverage piece (HubSpot et al.) — capture-only, or refuse to allowlist?+- Does run history render a `list<entity>` output usefully today? Unchecked.diff --git a/.ai/research/datetime-input-plumbing.md b/.ai/research/datetime-input-plumbing.mdnew file mode 100644index 0000000000..03c42e0edd--- /dev/null+++ b/.ai/research/datetime-input-plumbing.md@@ -0,0 +1,88 @@+# Research: presentation-flag plumbing for workflow catalog inputs++Traced 2026-09-04 against the `template?: boolean` flag, which is the exact+precedent for a new presentation-only input flag.++## Declaration points (must edit)++| # | File:line | What |+|---|---|---|+| 1 | `packages/workflows/src/catalog/actions.ts:13` | `ActionInputLike` — hand-written + generator-facing spec. `IntegrationDeclarationLike` (:56) reuses it via `Omit<ActionDeclarationLike, …>` |+| 2 | `packages/workflows/src/catalog/build.ts:91` | `BuiltActionInput` — the emitted shape. `BuiltIntegration` (:117) reuses `BuiltAction`'s inputs |+| 3 | `packages/workflows/src/catalog/build.ts:178` | `buildDeclaredInputs` (fn :155, literal :163-182) copies `spec.template` field-by-field — **does NOT spread `spec`**, so a new flag is silently dropped without a line here. Shared by actions, integrations and operations |+| 4 | `packages/workflows/src/definition/catalog.ts:65` | `CatalogInput` — the shape every consumer (validator, builder UI) reads |+| 5 | `packages/jobs/src/workflows/integrations/properties.ts:41` | `MappedProperty`; derived in `toValueType` (:79-113), `case "DATE_TIME"` at :92 |+| 6 | `packages/jobs/src/workflows/integrations/allowlist.ts:35` + `integrations/catalog.ts:82-84` | `AllowlistPropOverride` and the merge into the emitted `declared` literal (:63-101, also field-by-field) |+| 7 | `apps/erp/.../config/forms/StepInput.tsx:161-178` | `renderStepInput` fallthrough hand-picks props for `ValueField` (`type` :169, `required` :170, `choices` :171) |+| 8 | `apps/erp/.../fields/types.ts:17-47` | `ValueFieldProps`, shared by ValueField/TemplateField/MultiChoiceField/PairsField |+| 9 | `apps/erp/.../fields/ValueField.tsx:14-31`, `:119-137` | destructure + hand-written `LiteralControl` prop list |+| 10 | `apps/erp/.../fields/LiteralControl.tsx:37-51`, date branch `:215-224` | props type + the `<DatePicker>` branch |+| 11 | `packages/workflows/src/catalog/build.ts` ~`:510` | `validateCatalogInputs` — allowlist of consistency rules; `template` has one at :510-515 |+| 12 | `apps/erp/.../fields/control.ts:35-48` | only if the flag changes control SELECTION (it does not — `pickControl` already returns `"literal"` for a date) |++## Automatic — no edit needed++- `scripts/generate-workflow-catalog.ts:66-77` emits via `JSON.stringify(sorted(...))` → a new field carries automatically. Biome reformats afterwards, which is why generated keys are unquoted.+- `scripts/check-workflow-catalog.ts:200,216` uses `assert.deepStrictEqual` on whole objects → compared automatically, fails loudly until regenerated.+- `packages/workflows/src/catalog/catalog.ts:43-55` spreads (`{ id, ...action }`).+- `ActionForm.tsx:378-399` / `IntegrationNodeForm.tsx:374-400, 416-440` pass `inputDef` WHOLE into `renderStepInput`.+- No zod schema covers catalog input declarations — `CatalogInput`/`ActionInputLike`/`BuiltActionInput` are plain TS interfaces, and no `.strict()` exists in `definition/catalog.ts` or `definition/schema.ts`. TypeScript excess-property checking is the only strictness.++## Other facts++- There is NO `integrations.generated.ts`. `WORKFLOW_INTEGRATION_CATALOG` lives inside `actions.generated.ts:321`.+- `ComputeForm.tsx:210-212` renders `ValueField` directly, bypassing `StepInput` — a second call site.+- `LiteralControl.tsx:28-35` `asCalendarDate` parses `parseDate(value.slice(0,10))` — date-only.++## Timezone machinery (the documented handling to follow)++- `apps/erp/app/hooks/useCompanyTimeZone.tsx:12` — `useCompanyTimeZone(): string`+ reads `company.timezone` off `useRouteData(path.to.authenticatedRoot)`, falling+ back to `"UTC"`. Synchronous, client-side, available to any component under `/x`+ (the workflow builder routes are `apps/erp/app/routes/x+/workflows+/`).+ `useCompanyToday()` (:22) is the date-only sibling already used for business-date+ form defaults. Exported from `~/hooks` (`hooks/index.ts:50-51`).+- `company.timezone` is a NOT NULL column (`packages/database/src/types.ts:6715`).+- `.claude/rules/date-handling.md` is the rule: JS `Date` is banned for parsing,+ formatting and arithmetic; a form default that will be PERSISTED as a business+ value must use the company's timezone, not the browser's.+- **Wall-clock → instant, the pattern to copy**:+ `apps/erp/app/modules/people/ui/Shifts/ShiftsTable.tsx:82-85`+ ```ts+ toZoned(toCalendarDateTime(today(tz), parseTime(time)), tz).toAbsoluteString()+ ```+- `no-local-timezone` (`packages/checks/src/conformance/no-local-timezone.ts:18-42`)+ bans `getLocalTimeZone()` and friends in SERVER paths only. A client component+ using the company timezone is compliant; using `getLocalTimeZone()` for a+ persisted value would be wrong on the merits even where the check does not reach.++## Why the vendor value must be a full instant++`@activepieces/[email protected]` `runCreateEvent` does:+```js+{ dateTime: dayjs(start_date_time).format("YYYY-MM-DDTHH:mm:ss.sssZ") }+```+dayjs parses the value and formats it with an OFFSET taken from the WORKER's+local zone. A naive wall-clock string (`2026-09-10T15:00`) would therefore be+interpreted in the worker's zone. A full ISO instant with an offset+(`2026-09-10T15:00:00.000-05:00`) is unambiguous and formats back to the same+moment regardless of worker zone. `end_date_time` is optional and defaults to+`dayjs(start).add(30, "m")`, so it inherits the same correctness.++## Storage format is already consistent++`packages/workflows/src/runtime/values.ts:105-109` coerces a `date` column value+via `parsed.toISOString()` — so a date-typed value from an UPSTREAM step is+already a full ISO instant. A literal storing a full ISO instant matches what+refs already produce, and `literalValueMatchesType`+(`definition/types.ts:278`) accepts any `Date.parse`-able string. `compare.ts`+`orderable()` (:14-19) likewise parses with `Date.parse`. So no schema, no+runtime and no new `PrimitiveKind` are needed.++## Server-side alternative considered++`packages/jobs/src/workflows/actions/integration.ts:49-56` `runIntegrationAction`+has both `client` and `companyId` in scope immediately before `toPropsValue`+(:117), so the company timezone COULD be resolved there instead. Rejected in the+spec: the author's intent ("3 PM") is only knowable at authoring time, and+resolving late would reinterpret an already-stored instant.diff --git a/.ai/reviews/2026-08-28-workflow-integrations.md b/.ai/reviews/2026-08-28-workflow-integrations.mdnew file mode 100644index 0000000000..9336f97dee--- /dev/null+++ b/.ai/reviews/2026-08-28-workflow-integrations.md@@ -0,0 +1,374 @@+# Thermo-nuclear review — workflow integrations (Activepieces)++Scope: `a3cb049fd..HEAD` (11 commits, ~7.2k lines excluding locale + lockfile).+Verified: `packages/workflows` 436 tests pass, `packages/jobs` 262 tests pass.++**Verdict: do not approve as-is.** The architecture is genuinely good — the node-kind+separation, the provider-generic `OptionsSource`, and the refuse-don't-degrade property+mapping are all the right calls, and `renderStepInput` is a real net-negative-lines+refactor. But the headline claim — "easy to add new integrations" — is not yet true, and+F1 breaks visibly on vendor #2.++---++## What the code gets right++Worth stating, because these are the decisions that make the rest fixable:++- `integration` as its own node kind rather than an action variant. `BuiltAction` has no+ `piece`, `getActionRoute` returns none, `runAction` has no integration branch. Nothing on+ the action path has to ask whether it is really a vendor call.+- `OptionsSource` names a *provider*, never an integration. The endpoint, the field and the+ builder are all integration-agnostic by construction; a Carbon-backed dropdown is one+ registry entry. This is the piece of the design most likely to still be right in a year.+- `UnmappablePropertyError` fails the *generator*, writing no files. A half-described action+ can't reach a canvas.+- The refresh claim (conditional UPDATE on `refreshingAt`, loser polls) with the comment+ explaining why an advisory lock can't work. The two-client token read in+ `runIntegrationAction` with the comment saying not to "simplify" it to one.+- HMAC-signed `state` + session `companyId` recheck; parameter *names* only in the malformed+ callback log.++The comments are, overall, a strength — they explain invariants a reader could not derive+locally rather than narrating the code.++---++## F1 — `pieceLabel()` re-derives a label that already exists twice. Blocker.++`apps/erp/app/modules/workflows/ui/Builder/config/forms/IntegrationNodeForm.tsx:44`++```ts+function pieceLabel(piece: string): string {+ return piece.split("-").map(w => w.charAt(0).toUpperCase() + w.slice(1)).join(" ");+}+```++The app's real name is written in `allowlist.ts` as `label: "Google Calendar"`, and reaches+the generated catalog *already interpolated* into the translated step label:++```+"integration.google-calendar.create_google_calendar_event": msg`Google Calendar: Create Event`+```++So the label survives the build, gets dropped at the catalog boundary, and is guessed back+in the browser by title-casing a package slug. It happens to be correct for exactly one+vendor. The next ones:++| slug | `pieceLabel()` | actual |+|---|---|---|+| `hubspot` | Hubspot | HubSpot |+| `github` | Github | GitHub |+| `zoho-crm` | Zoho Crm | Zoho CRM |+| `activecampaign` | Activecampaign | ActiveCampaign |+| `microsoft-dynamics-crm` | Microsoft Dynamics Crm | Microsoft Dynamics 365 |++It is also the only user-facing string in this feature that is not translated — it feeds the+App dropdown, the `Connect {appName}` button and the `{appName} isn't connected yet` prose,+all of which are wrapped in `<Trans>` around an untranslatable interpolation.++**Fix:** carry the app label through the generator. Either add `label` to+`BuiltIntegration["piece"]`, or emit a `WORKFLOW_INTEGRATION_APPS: Record<string, string>`+beside `WORKFLOW_INTEGRATION_CATALOG` in `buildPieceActionDeclarations()` — the value is+already in hand there (`entry.label`). Then delete `pieceLabel` entirely. If it goes through+the label pipeline it is translated for free, like every other catalog string.++---++## F2 — the per-vendor `hooks.server.ts` should not exist. Code judo.++`packages/ee/src/google-calendar/hooks.server.ts` is 28 lines whose entire content is+"revoke every connection for this piece":++```ts+const PIECE_NAME = "google-calendar";+export async function googleCalendarOnUninstall(companyId: string) {+ const client = getCarbonServiceRole();+ const { data } = await listConnections(client, companyId, PIECE_NAME);+ for (const connection of data ?? []) {+ if (connection.status === "Revoked") continue;+ await disconnectConnection(client, companyId, connection.id, "system");+ }+}+```++Nothing in it is vendor-specific. And the design *already guarantees* it can't be — the+config comment says `id` deliberately matches the piece name so no lookup table is needed.++So: make `getIntegrationServerHooks(id)` fall back to a generic piece `onUninstall` when+`PIECE_ALLOWLIST[id]` exists and no explicit hook is registered:++```ts+export function getIntegrationServerHooks(integrationId: string) {+ return serverHooks[integrationId]+ ?? (isAllowlistedPiece(integrationId)+ ? { onUninstall: (companyId: string) => revokeConnectionsFor(integrationId, companyId) }+ : undefined);+}+```++That deletes a file and a registry entry from step 5 of "adding a piece", and — more+importantly — removes the failure mode where someone adds a vendor and forgets the hook,+leaving live tokens behind after an uninstall. (`isAllowlistedPiece` is currently dead code,+F5 — this is its call site.)++---++## F3 — three implementations of "open the OAuth consent popup"++1. `useIntegrationInstall.ts:40-53` — the `oauth` branch, just extracted in this PR to be+ *the* place Install means something.+2. `packages/ee/src/google-calendar/config.tsx:29-53` — `onClientInstall`. Hardcodes+ `"/api/integrations/connections/google-calendar/connect"` as a string literal, bypassing+ `path.to.api.integrationConnect(piece)` which this PR added. Centered popup, falls back to+ `window.location.href`, throws on error.+3. `ConnectionsTab.tsx:61-70` + `109-115` — "Add account". Uses the path helper, opens+ `600x800` `_blank`, `toast.error`s on failure.++(2) and (3) hit the *same route* for the *same purpose* and behave differently. (2) is the+copy that gets duplicated once per vendor, and the hardcoded URL means a route rename breaks+it silently — `path.to` exists precisely to stop that.++**Fix:** one `connectIntegrationAccount(pieceName, name?)` in the settings module: fetch+`path.to.api.integrationConnect(pieceName)`, open the popup, one error behaviour. `config.tsx`'s+`onClientInstall` becomes `() => connectIntegrationAccount("google-calendar")` — one line,+and the only vendor-specific token in it is the id that already has to be there.++---++## F4 — `useHasConnection` is a second copy of `OptionsField`'s fetch++`IntegrationNodeForm.tsx:58-81` and `OptionsField.tsx:63-87` both: build a query string from+`source.provider` + JSON `source.params`, then `useEffect` → `fetcher.load` guarded on+`state === "idle" && data === undefined`. Same endpoint, same guard, same shape.++They have already drifted: `OptionsField` serializes `dependsOn` values into `values`,+`useHasConnection` ignores `dependsOn` entirely. That is fine today only because the+connection input happens to have none — it is a latent bug the moment a provider gains a+dependency.++**Fix:** one `useWorkflowOptions(source, values?)` hook returning+`{ options, emptyHref, error, loaded }`. `OptionsField` renders it; `IntegrationNodeForm`+reads `.length > 0`. Removes the drift by construction.++---++## F5 — a cluster of exports with zero callers++Verified by grep across `packages`, `apps`, `scripts`:++| symbol | file | callers |+|---|---|---|+| `parseIntegrationActionId` | `integrations/catalog.ts:23` | none |+| `INTEGRATION_ACTION_PREFIX` | `integrations/catalog.ts:16` | only `parseIntegrationActionId` |+| `isAllowlistedPiece` | `integrations/allowlist.ts:68` | none (see F2) |+| `PieceName` | `integrations/allowlist.ts:66` | none |+| `getCatalogIntegration` | `catalog/catalog.ts:145` | none |+| `integrationStepIds` | `catalog/catalog.ts:152` | none |+| `integrationActionId` | `integrations/catalog.ts:19` | 1, in its own file |++Three specific problems inside that list:++- `parseIntegrationActionId` exists to split an id apart, and the rule doc explicitly says+ *"Nothing parses an id"*. It is a documented non-goal with an implementation. Delete it —+ its existence invites the next person to route on a parsed id.+- `integrationStepIds()` is commented **"The id of every integration step, for the builder's+ picker."** The builder's picker does not call it — `IntegrationNodeForm.tsx:32` reaches into+ `WORKFLOW_INTEGRATION_CATALOG` directly and groups by piece itself. Pick one: either the+ builder uses the accessor, or the accessor goes.+- `PieceName = keyof typeof PIECE_ALLOWLIST` resolves to **`string`**, because+ `PIECE_ALLOWLIST` is annotated `Record<string, AllowlistEntry>`. It looks like a+ type-safety guarantee and provides none. Either drop it or write the constant as+ `{ ... } as const satisfies Record<string, AllowlistEntry>` so `keyof` means something.++`integrationActionId` is a bare `export const x = y` alias used once, inside the file that+declares it. Call `integrationStepId` directly.++---++## F6 — `AllowlistEntry.version` is never read++`allowlist.ts:22` carries `version: "0.10.3"` with the comment *"pinned exactly in+packages/jobs/package.json"*. Nothing reads it and nothing compares the two. It is a second+copy of a fact whose whole justification is that it must not drift — the exact shape the doc+warns about ("an upstream release must never silently change code we execute against a+customer's account").++Either delete the field, or make it load-bearing: have `loadPiece` (or the catalog check+script) compare it against the installed package's version and refuse on mismatch. A comment+is not an enforcement mechanism.++---++## F7 — three casts of the same row shape++- `connections.ts:272` — `row as unknown as IntegrationConnection`+- `connections.ts:353` — `data as unknown as IntegrationConnection | null`+- `integrations.$id.tsx:918` — `... .data ?? []) as ConnectionRow[]`++A double cast (`as unknown as`) means the two types genuinely disagree and nothing checks it.+The cause is `SELECT_COLUMNS` being an opaque string, so supabase-js can't infer the row.++**Fix:** one `readConnection(client, companyId, id): Promise<IntegrationConnection | null>`+and one `readConnections(...)` in `connections.ts` that own the cast, and have+`resolveConnectionAuth`, `awaitRefreshedToken` and the settings loader call those. `ConnectionRow`+in `ConnectionsTab.tsx` is a structural subset of `IntegrationConnection` — it should be+`Pick<IntegrationConnection, "id" | "pieceName" | "name" | "accountLabel" | "status" | "lastError">`+rather than a fourth hand-written declaration of the same fields.++---++## F8 — dead branch in the error path++`packages/jobs/src/workflows/actions/integration.ts:69-80`:++```ts+} catch (cause) {+ if (cause instanceof ConnectionRevokedError) {+ return { ok: false, error: `The ${label} connection needs to be reconnected.` };+ }+ return { ok: false, error: `The ${label} connection needs to be reconnected.` };+}+```++Both branches return an identical object. Either the `instanceof` check was meant to produce+a *different* message for the non-revoked case (a timeout and a revocation are not the same+problem to a customer, and `ConnectionRefreshTimeoutError` exists), or the check is noise.+As written it reads as an intent that was lost — collapse it or differentiate it.++---++## F9 — the two token exchanges are the same function++`connections.ts:386-405` and `:408-428`. Identical `fetch` shape, identical headers,+identical `!response.ok` throw with the same message, identical `readTokenResponse(await+response.json())`. Only the `URLSearchParams` body differs.++```ts+async function postTokenRequest(tokenUrl: string, body: Record<string, string>) {+ const response = await fetch(tokenUrl, {+ method: "POST",+ headers: { "Content-Type": "application/x-www-form-urlencoded" },+ body: new URLSearchParams(body)+ });+ if (!response.ok) throw new Error(`The connection was rejected (${response.status}).`);+ return readTokenResponse(await response.json());+}+```++Both exported functions become three lines. Matters beyond tidiness: the callback matches on+`message.includes("rejected")` (`integrations.connections.callback.ts:141`) to pick an error+code, so that string is a contract between two files — having it written twice is how it+starts differing.++---++## F10 — permission boundary worth confirming (not necessarily a change)++The `integrationConnection` SELECT policy is `settings_view`+(`20260901173000_...sql`), but `connectionProvider` runs at `workflows_view`+(`options-providers.server.ts:56`) using the requester's own client.++A workflow author with `workflows_update` but without `settings_view` therefore gets zero+rows from RLS. The builder reads that as "not connected" and renders the "Connect Google+Calendar" button — pointing at a settings page they also cannot use. The step is+unconfigurable, and the message tells them the wrong reason.++If workflow authors are always settings admins in practice, this is fine and worth a comment+on the provider saying so. If not, the connection list needs its own read path (a+`workflows_view`-scoped view, or a service-role read scoped by the run's `companyId` the way+the token read already is).++---++## Minor++- **`integrations.$id.tsx`** was already ~1700 lines and gains a+ `PIECE_ALLOWLIST[integrationId]` special case in its loader plus a tab. Not a threshold+ crossing and it follows the existing tabs pattern, so not a blocker — but this route is+ now the fifth integration-specific branch in one loader and is overdue for splitting the+ per-integration loader slices into their own module.+- **`buildPieceContext`** returns `Record<string, unknown>` with `server: { publicUrl: "",+ apiUrl: "", token: "" }` — three empty strings among ten stubs that all deliberately+ *throw*. Inconsistent with the module's own stated rule ("every stub THROWS rather than+ returning empty"). If a piece reads `server.token` it gets `""` and fails obscurely at the+ vendor instead of loudly here.+- **`BuiltIntegration`** duplicates every field of `BuiltAction` except `call`/`update`/+ `requireOneOf`. `IntegrationDeclarationLike` already models this correctly as+ `Omit<ActionDeclarationLike, "call" | "update"> & { piece }` — `BuiltIntegration` should+ mirror that rather than restate the fields.+- **`allowlist.ts` header comment** claims *"adding a vendor edits no shared file."* It edits+ at least five: `packages/jobs/package.json`, `packages/env/src/index.ts` (×5 spots),+ `packages/ee/src/index.ts`, `packages/ee/src/hooks.server.ts`, `.env.example`. Fix the+ comment, or fix the count (F2 and F3 remove two of them).++---++## The extensibility claim, measured++The rule doc lists 6 steps for adding a piece. The actual touch points today:++1. `packages/jobs/package.json` — dependency+2. `allowlist.ts` — the row *(the one that should be the only one)*+3. `.env.example` — 3 vars+4. `packages/env/src/index.ts` — 3 `getEnv` exports + 2 `declare global` blocks + `getBrowserEnv()`+5. `packages/ee/src/<vendor>/config.tsx` — new file, incl. a copy-pasted `onClientInstall`+6. `packages/ee/src/index.ts` — import + array + re-export+7. `packages/ee/src/<vendor>/hooks.server.ts` — **new file, 100% boilerplate**+8. `packages/ee/src/hooks.server.ts` — register it+9. `pnpm run generate:workflow-catalog && pnpm run check:workflow-catalog`++F2 deletes 7 and 8. F3 reduces 5 to a near-empty config. That gets it to a row, a config+object, an env block and a regen — which is a defensible "easy".++Step 4 is the stubborn one, and the doc is honest that `getBrowserEnv()` can't be indexed by+name. Worth noting there is a way out if it becomes annoying: `active` only exists so the+card can say "Coming soon", and the integrations page loader runs server-side — it could+return the set of pieces for which `resolveOAuthApp` succeeds and let the card read that,+removing the browser-env step entirely. Not required for this PR.++---++---++## Resolution (2026-08-28)++Applied in the working tree. Verified: 4 typechecks (erp, ee, jobs, workflows) pass,+1513 package tests + 160 erp module tests pass, `pnpm run check:workflow-catalog` ok,+biome error-level clean on every touched path.++| # | What changed |+|---|---|+| F1 | `IntegrationDeclarationLike.piece` gained `label`; `buildCatalog` emits it under the new `integrationAppLabelKey(piece)` → `labels.generated.ts` now has `"integration.google-calendar": msg\`Google Calendar\``. `pieceLabel()` deleted; the builder reads it through `useWorkflowLabel` like every other catalog string, so it is translated too. |+| F2 | `packages/ee/src/google-calendar/hooks.server.ts` **deleted**. Replaced by generic `revokeConnectionsForPiece(client, piece, companyId)` in `connections.ts` + a one-line `serverHooks` entry. (Kept in `@carbon/ee`: `ee → jobs` would be an import cycle, so the allowlist cannot be consulted from there.) |+| F3 | New `packages/ee/src/integrations/connect.ts` — `openConsentPopup` / `startIntegrationConnect`. `google-calendar/config.tsx` drops ~25 lines of popup code; `ConnectionsTab` uses the same opener. |+| F4 | New `useWorkflowOptions` hook; `OptionsField` (−51 lines) and `IntegrationNodeForm` (−64) both call it. The `dependsOn` divergence is gone by construction. |+| F5 | Deleted `parseIntegrationActionId`, `INTEGRATION_ACTION_PREFIX`, `integrationActionId`, `isAllowlistedPiece`, `PieceName`, `getCatalogIntegration`, `integrationStepIds` — verified 0 references remain. |+| F6 | `assertPinnedVersions(dependencies)` added and wired into `check-workflow-catalog.ts`. Confirmed it rejects `^0.10.3` and a missing dependency, and accepts `0.10.3`. |+| F7 | `getConnection`/`listConnections` → `readConnection`/`readConnections`, which own the single cast. Removed the double casts in `resolveConnectionAuth` + `awaitRefreshedToken` and the `as ConnectionRow[]` in the settings loader. `ConnectionRow` is now a `Pick<IntegrationConnection, …>`. |+| F8 | Branch differentiated rather than collapsed: refresh-timeout → "was busy refreshing. Try again."; revoked/secret-unavailable → "needs to be reconnected."; anything else (e.g. a missing OAuth app) → "is unavailable." Three new tests cover them. |+| F9 | `postTokenRequest` extracted; both exchanges are now 6 lines each. |+| minor | `buildPieceContext`'s `server` is a throwing getter, consistent with the other nine stubs (verified the piece never reads it, so no behaviour change today). `BuiltIntegration` now `extends Omit<BuiltAction, …>`. Stale `allowlist.ts` header claim and the `.claude/rules/workflow-integrations.md` checklist corrected. |++Adding a piece is now: the allowlist row, a `defineIntegration` config, a one-line hooks+entry, the env block, and a regen. The two boilerplate files are gone.++### Deliberately not done++- **F10** — needs a product answer, not a code change. See above.+- **Onshape / Slack popup duplication.** Both pre-date this branch and Onshape's variant+ carries an `app_oauth_completed` message listener; converting them is a behaviour risk+ outside this PR's scope. `connect.ts` is where they should land when someone does.+- **`pnpm run lingui:extract`** for the one new `integration.google-calendar` key. Lingui+ falls back to the message itself, so it renders "Google Calendar" untranslated meanwhile;+ extract on this branch churns ~120k lines of unrelated `.po` diff.++---++## Suggested order++1. F1 (blocker — wrong on vendor #2, and untranslated)+2. F2, F3 (the two deletions that make the extensibility claim true)+3. F8, F9, F5 (small, mechanical, and F5 is ~7 symbols of pure deletion)+4. F4, F7 (drift-prevention refactors)+5. F10 (answer it; change only if the answer is "no")diff --git a/.ai/runs/2026-08-27-workflow-integrations.md b/.ai/runs/2026-08-27-workflow-integrations.mdnew file mode 100644index 0000000000..bb915984e2--- /dev/null+++ b/.ai/runs/2026-08-27-workflow-integrations.md@@ -0,0 +1,233 @@+# Run log — third-party integration steps in Workflows (Activepieces-backed)++Plan: `.ai/plans/2026-08-27-workflow-integrations.md`+Spec: `.ai/specs/2026-08-27-workflow-integrations.md`+Branch: `feat/active-pieces-integration` · Executed 2026-08-27 · Nothing committed.++## What landed++| Task | Result |+|---|---|+| 1. Migration | `20260901173000_workflow-integration-connections.sql` — `integrationConnection` + 4 RLS policies + 3 `*_connection_secret` RPCs + delete trigger. Applied. |+| 2. Types | `pnpm db:migrate` regenerated; `integrationConnection` present in `packages/database/src/types.ts`. |+| 3. Env | `GOOGLE_OAUTH_CLIENT_ID` / `_SECRET` / `_REDIRECT_URL` in `packages/env/src/index.ts` + `.env.example`. |+| 4. Piece dep | `@activepieces/[email protected]` (exact pin) + `allowlist.ts` + `registry.ts` + `types.ts`. |+| 5. Property map | `properties.ts` — 8 piece kinds mapped, everything else throws `UnmappablePropertyError`. |+| 6. Catalog route | `piece` block on `BuiltAction` / `ActionDeclarationLike`; `getActionRoute` returns it. |+| 7. Generator | Fifth input via `integrations/catalog.ts`; both catalog scripts now merge it. 16 → **18 actions**. |+| 8. Connections | `packages/ee/src/integrations/connections.ts` + `@carbon/ee/integrations/connections` subpath. |+| 9. OAuth routes | connect + callback under `api+/integrations.connections.*`, signed `state`. |+| 10. Settings UI | `ConnectionsPanel` on the integrations page + `integrations.connections.tsx` action. |+| 11. Executor | `actions/integration.ts` + one `route.piece` branch in `services.ts`. |+| 12. Options endpoint | `api+/integrations.connections.options.ts`, gated on `workflows_update`. |+| 13. Builder | `IntegrationFields.tsx` (connection picker + dynamic options) wired into `ActionForm`. |++## Verification run++```+pnpm db:migrate → applied; RPCs + RLS confirmed via psql+pnpm run generate:workflow-catalog → 106 events, 17 entities, 18 actions, 15 operations+pnpm run check:workflow-catalog → ok, no drift+pnpm exec biome check <changed files> → 0 errors, 2 warnings (both deliberate, see below)+pnpm exec turbo run typecheck --filter=@carbon/workflows --filter=@carbon/jobs \+ --filter=@carbon/ee --filter=erp --filter=@carbon/env → 5 successful, 5 total+pnpm --filter @carbon/workflows test → 25 files, 432 tests passed+pnpm --filter @carbon/jobs test → 35 files, 510 tests passed+pnpm --filter @carbon/ee test → 43 files, 562 tests passed+cd apps/erp && pnpm exec vitest run app/modules/workflows → 15 files, 160 tests passed+```++Emitted catalog entry, read back from the committed file:++```+integration.google-calendar.create_google_calendar_event+inputs: connectionId,calendar_id,title,start_date_time,end_date_time,location,+ description,colorId,attendees,guests_can_modify,guests_can_invite_others,+ guests_can_see_other_guests,send_notifications,create_meet_link+piece: {"name":"google-calendar","action":"create_google_calendar_event"}+calendar_id → {"type":{"kind":"primitive","of":"string"},"required":true,"dynamicOptions":true}+send_notifications → {"type":{"kind":"primitive","of":"string"},"required":true,+ "choices":["all","externalOnly","none"]}+```++The two remaining biome warnings are the `useExhaustiveDependencies` suppressions in+`IntegrationFields.tsx`, both with a `biome-ignore` explaining why including `fetcher`+would loop. Repo-wide `pnpm exec biome check` still reports its ~475 pre-existing+warnings and 17 pre-existing errors in files this branch does not touch.++## NOT verified — needs a human++**Every browser acceptance criterion is unverified.** They all require a Google Cloud+OAuth app that does not exist yet: `GOOGLE_OAUTH_CLIENT_ID`, `GOOGLE_OAUTH_CLIENT_SECRET`+and `GOOGLE_OAUTH_REDIRECT_URL` are unset locally, so the Connect button renders+disabled ("Not configured on this server") and no consent round trip can be started.++Unverified until that app exists:++- connect a Google account; add a second named connection; reject a duplicate name+- the builder's calendar dropdown listing the connected account's real calendars+- a real trigger creating a real calendar event+- run history showing Succeeded with no token in `input`/`output`+- an expired token refreshing exactly once against Google+- a disconnected connection failing with the reconnect message, then recovering++What IS proven without it: the piece loads and its actions resolve against the real+installed package (`registry.test.ts`); the property mapping produces the real+`send_notifications` choices and marks `calendar_id` dynamic (`properties.test.ts`);+the executor's success and all five failure sentences (`integration.test.ts`); the+concurrent-refresh claim refreshing exactly once with the loser observing the winner's+token, and tokens never reaching `metadata` (`connections.test.ts`).++## Deviations from the plan++**Task 10 renders its own panel rather than reusing `IntegrationCard`.** That component+is bound to the `Integration` config type — a logo component, a `settings` array, an+`onClientInstall` hook and a one-row-per-company install/uninstall model. A piece has+none of those and allows several named connections per company, so reusing the card+would have meant distorting the 12 existing integrations' model. `ConnectionsPanel`+sits above the integrations grid on the same page instead; the failure codes go through+the existing `integrationErrors` mechanism under a new `connection` key.++**Task 11 uses a service-role client for the vault read.** The plan said+`resolveConnectionAuth(serviceClient, …)` but the executor is handed the owner's client.+The vault RPCs are granted to `service_role` only, so a user client cannot decrypt a+token at all. The executor therefore checks the connection exists in this company+**through the owner's client first** (RLS applies to that lookup), and only then reads+the token with `getCarbonServiceRole()`, scoped by the run's own `companyId`. Same+guarantee `resolveIntegrationSecrets` already gives the 12 existing integrations.++**`STATIC_MULTI_SELECT_DROPDOWN` was missing from the plan's mapping table.**+`google_calendar_get_events.event_types` uses it. Mapped to `t.list(t.string)` with its+static choices, alongside the planned `MULTI_SELECT_DROPDOWN`.++**Both catalog scripts became `async function main()` wrappers.** `tsx` transpiles them+to CJS, which rejects top-level `await`, and reading a piece's actions requires a dynamic+import. No behaviour change.++---++# Revision — 2026-08-27, same branch++Two changes asked for after the first pass landed. Both are behaviour-preserving for the+run path (the executor, the connections service, the vault and the OAuth round trip are+untouched); everything that moved is the catalog's options declaration and the settings UI.++## 1. Fetched choices are generic, not an integration feature++`dynamicOptions?: boolean` is gone. An input that cannot list its values at build time now+carries an `OptionsSource` — `{ provider, params?, dependsOn? }` — where `provider` names a+resolver and never an integration. Piece dropdowns are simply the first two providers.++- `packages/workflows/src/definition/catalog.ts` — new exported `OptionsSource`; `CatalogInput.options`+ replaces `dynamicOptions`. Same swap in `catalog/actions.ts` (`ActionInputLike`) and+ `catalog/build.ts` (`BuiltActionInput`).+- `build.ts` gained two refusals: an input that both fetches and lists its values, and a+ `dependsOn` naming an input the action does not have.+- `packages/jobs/src/workflows/integrations/options.ts` (new) — `CONNECTION_INPUT`,+ `CONNECTION_PROVIDER`, `PROPERTY_PROVIDER`. The whole contract between the committed+ catalog and the app registry, in one file.+- `properties.ts` emits `options: { provider: "integration.property", params: { piece, action,+ prop }, dependsOn: ["connectionId"] }`; `catalog.ts` gives `connectionId` itself+ `options: { provider: "integration.connection", params: { piece } }` — so the connection+ picker is no longer a special case, just another fetched list.+- `apps/erp/app/modules/workflows/options-providers.server.ts` (new) — `OPTIONS_PROVIDERS`,+ the only module that knows what a provider id means. Each entry declares its own+ permission (`workflows_view` for connections, `workflows_update` for a vendor call).+- `api+/workflows.options.ts` (new) replaces `api+/integrations.connections.options.ts` and+ `api+/integrations.connections.ts`, both deleted. An unknown provider still passes through+ `workflows_view` before being refused, so it is not an unauthenticated probe.+- `fields/OptionsField.tsx` (new) replaces `fields/IntegrationFields.tsx`, deleted. One field+ for every fetched list, single or multi. `ActionForm` no longer reads `getActionRoute().piece`+ at all — the branch is `if (inputDef.options)`.++A Carbon-backed dropdown is now one registry entry plus an `options` block. No change to the+catalog format, the endpoint or the field.++## 2. Google Calendar is an ordinary integration card++The separate "Workflow connections" panel above the grid is gone.++- `packages/ee/src/google-calendar/config.tsx` (new) — an ordinary `defineIntegration` in the+ ordinary `integrations` array, `id` deliberately identical to the piece name.+ `active: !!GOOGLE_OAUTH_CLIENT_ID`, so an unconfigured server shows the standard+ "Coming soon" instead of a bespoke "Not configured on this server".+- `GOOGLE_OAUTH_CLIENT_ID` added to `getBrowserEnv()` and the `Window.env` declaration — the+ card reads it client-side. Public client id; the secret is untouched.+- The callback now upserts the `companyIntegration` row, which is what "Installed" means to+ the grid.+- `ui/Integrations/ConnectionsTab.tsx` replaces `ConnectionsPanel.tsx`: the same list, as an+ "Accounts" tab on the card's own Details drawer. Multi-account support is kept — a workflow+ step still picks which account it runs as.+- `google-calendar/hooks.server.ts` (new) `onUninstall` revokes every connected account, so+ uninstalling cannot strand live tokens.++## Verification++```+check-workflow-catalog: ok — 106 events, 9 moments raised, 17 entities, 18 actions, 15 operations+generate-workflow-catalog: 106 events, 17 entities, 18 actions, 15 operations, 59 help terms+typecheck: @carbon/workflows, @carbon/jobs, @carbon/ee, erp — 4 successful, 4 total+@carbon/workflows 432 · @carbon/jobs 510 · @carbon/ee 562 · erp workflows 160 — all passed+biome check <28 changed files>: 0 errors, 7 warnings (all pre-existing console.error in integrations.$id.tsx)+```++Still unverified in a browser, and still blocked on the same thing: a Google Cloud OAuth app+and its three env vars.++---++# Revision 2 — integrations as a first-class node + vendor config by table++Plan: `.ai/plans/2026-08-27-workflow-integration-node.md`. Both workstreams landed.++## A — a vendor is named in one place++`AllowlistEntry` now carries the vendor's own configuration: the NAMES of its three env+vars and an optional `accountLabel` (`{ url, field }`). `resolveOAuthApp` in+`integrations/oauth.ts` reads them via `getEnv` and replaced the+`if (pieceName === "google-calendar")` branch; the connect route and the callback both use+it, and `accountLabelFor` reads the allowlist row instead of hard-coding Google's userinfo+endpoint. New `oauth.test.ts` covers the resolution and both refusals.++The OAuth2-only limit is now commented in `allowlist.ts` and on `getPieceOAuth2Auth`, with+the reason: an API-key piece needs a credential form, no callback and no refresh, so it is+its own work rather than a branch. `.env.example` gained every previously-undocumented+integration variable (Slack, Onshape, Xero, QuickBooks, Jira, exchange rates).++One thing the allowlist row deliberately cannot carry: `getBrowserEnv()` is a fixed list,+so each new vendor's client id must be added there and to the `Window.env` declaration by+hand. That is step 4 of "Adding a piece" in the rule.++## B — `integration` is a node kind++- `definition/schema.ts` — a seventh variant, `{ piece, action, inputs }`. No+ `formatVersion` bump: adding a variant leaves every stored v3 document valid.+- `CatalogIntegration` + `WORKFLOW_INTEGRATION_CATALOG`, emitted beside the action and+ operation maps. `buildCatalog` takes a sixth argument and returns `built.integrations`;+ both catalog scripts pass it the same way. `buildDeclaredInputs` and `labelDeclaration`+ are now shared, so the two kinds are validated and labelled by the same code.+- **`piece` is gone from the action path**: off `BuiltAction`, off `getActionRoute`, and+ the `route.piece` branch is out of `runAction`. `runIntegration` is a separate service+ method handed the `{ name, action }` block off the step's own catalog entry.+- `runtime/integration.ts` `integrationExecutor`, registered like every other kind.+- `integrationStepId` in `@carbon/workflows` is the one place the id shape is written;+ `packages/jobs`' `integrationActionId` delegates to it.+- Builder: `NODE_KIND_META` (plug icon), the three `kinds.ts` maps, `nodeTypes`,+ `NODE_KIND_ORDER`, `createNode`, the default-name regex, and a new+ `IntegrationNodeForm` (app picker → step picker → inputs). `StepInput.tsx` was extracted+ from `ActionForm` and is shared by both, so input rendering cannot drift.++Counts moved as expected: **18 actions → 16 actions + 2 integration steps**.++## Verification++```+generate-workflow-catalog: 106 events, 17 entities, 16 actions, 2 integration steps, 15 operations, 59 help terms+check-workflow-catalog: ok — 106 events, 9 moments raised, 17 entities, 16 actions, 2 integration steps, 15 operations+typecheck: @carbon/workflows, @carbon/jobs, @carbon/ee, erp — 4 successful, 4 total+@carbon/workflows 436 · @carbon/jobs 513 · @carbon/ee 562 · erp workflows 160 — all passed+biome check <51 changed files>: 0 errors, 13 warnings (all pre-existing)+```++Still unverified in a browser. The Google OAuth env vars are set locally now, so the+connect flow and a real test run of an Integration node are the next thing to try by hand.diff --git a/.ai/runs/2026-09-01-connection-reconnect-prompts.md b/.ai/runs/2026-09-01-connection-reconnect-prompts.mdnew file mode 100644index 0000000000..84489de37e--- /dev/null+++ b/.ai/runs/2026-09-01-connection-reconnect-prompts.md@@ -0,0 +1,44 @@+# Run log — under-scoped connection reconnect prompts++Plan: `.ai/plans/2026-09-01-connection-reconnect-prompts.md`+Spec: `.ai/specs/implemented/2026-09-01-connection-reconnect-prompts.md`+Branch: `feat/active-pieces-integration` · Executed 2026-09-01 · **Nothing committed** (user commits). Stacks on today's uncommitted v1 + v2 Slack work.++## What landed++| Task | Result |+|---|---|+| 1. ee predicates | `grantedScopes` (comma/space parser, `null` = unknown), `missingScopes`; `createConnection` revive now refreshes `metadata`. 3 tests. |+| 2. jobs | `requiredScopesFor(piece)` = row `oauth.scope` ?? piece scope; barrel export; Google Calendar row records `metadata.scopes`. 3 tests. |+| 3. Runner | Pre-check `missingScopes` before the vendor call → reconnect copy naming Settings → Integrations → App → Accounts → Reconnect; vendor `missing_scope`/`insufficient_scope`/`insufficient permission` mapped to the same copy. 2 tests (runner mock now spreads the real ee module). |+| 4. Builder | `integration.connection` provider hides under-scoped accounts and returns `errorCode: "reconnect"` + `errorHref` (Accounts tab) when that empties a connected app; `IntegrationNodeForm` shows "{app} is connected, but needs to be reconnected…" + **Reconnect {app}** instead of "Connect". |+| 5. Accounts tab | Loader passes `requiredScopes`; rows carry `metadata`; amber **Reconnect needed** badge + copy; **Reconnect** button (also for Expired/Revoked rows) re-runs the consent under the same name via the shared `startConnect`. |+| 6. Card | `getIntegrationHealth` marks a piece card unhealthy while any usable account is under-scoped (erp-side, since ee cannot see the allowlist). |+| 7. Regen/docs | Catalog + Lingui regenerated (`check-workflow-catalog: ok`, 6 steps unchanged); "Scope drift" section in `workflow-integrations.md`; spec → implemented. |++## Automated gates++| Gate | Result |+|---|---|+| `turbo typecheck` — `@carbon/ee`, `@carbon/jobs`, `erp` | 3/3 successful |+| `@carbon/ee` vitest | 582 passed (43 files) |+| `@carbon/jobs` vitest | 583 passed; `services.test.ts` still import-fails on the empty local `INNGEST_SIGNING_KEY` (pre-existing) |+| `@carbon/workflows` vitest | 557 passed |+| `check:workflow-catalog` | ok |+| biome on touched files | clean; `integrations.$id.tsx` reports 7 pre-existing `noConsole` warnings on lines this work did not touch (hunks: 53, 917, 1704) |++## Dev data check++Backfilled Slack workspace: 10 granted scopes → `missingScopes` = `channels:read groups:read chat:write.customize im:write channels:manage groups:write` (the six piece-only scopes). So on this DB the Accounts row shows "Reconnect needed", the Slack card reads Unhealthy, the builder shows the reconnect banner, and a Slack step fails fast with the reconnect copy — all without calling Slack.++## Browser criteria (spec AC 4–6) — UNVERIFIED, user-driven++Needs the Slack app manifest to carry the connections redirect URL and the 16 bot scopes first. Then: Settings → Integrations → Slack → Accounts → **Reconnect** on "acme-dev" → approve → badge clears, card Healthy, builder lists the account, step runs (AC 5). Reconnect on a Revoked row revives it (AC 6).++## Deviations from plan++None beyond formatting.++## Follow-up (same day) — thermo-nuclear remediation++See `.ai/runs/2026-09-01-thermo-nuclear-review.md` → Remediation. Relevant here: mixed-readiness notice (provider `noticeCode`, field/banner), `storedNotOffered` guard in the node form, shared `needsReconnect`, health decided once in erp with a 60 s negative cache, `omittedProps` stripping at run time, loader projects `metadata` to `{ scopes }`.diff --git a/.ai/runs/2026-09-01-gmail-workflow-piece.md b/.ai/runs/2026-09-01-gmail-workflow-piece.mdnew file mode 100644index 0000000000..785c876619--- /dev/null+++ b/.ai/runs/2026-09-01-gmail-workflow-piece.md@@ -0,0 +1,92 @@+# Run log — Gmail as a workflow integration piece++**Plan:** `.ai/plans/2026-09-01-gmail-workflow-piece.md` · **Spec:** `.ai/specs/implemented/2026-09-01-gmail-workflow-piece.md`+**Branch:** `feat/active-pieces-integration` · **Date:** 2026-09-01++## Deviations from plan++- **Pin 0.13.0, not 0.14.0.** `pnpm-workspace.yaml` `minimumReleaseAge: 4320` (3 days) refused+ 0.14.0 (published 2026-09-01). User chose 0.13.0 (2026-08-20); its `gmail_send_email` props,+ `outputSchema` and OAuth scopes are identical. Spec/plan/research updated.+- **`events.generated.ts` reverted.** The generator re-emitted a 3-line key reorder+ (`productionQuantity` / `scheduleOutdatedAt`) unrelated to Gmail; reverted to HEAD and+ `check:workflow-catalog` still passes.+- **No per-task commits** — user rule (never auto-commit). Tree left for the user to commit.+- `packages/jobs/AGENTS.md` untouched: it does not enumerate allowlisted pieces.+- **Browser test 1 (criterion 3) FAILED, then fixed.** Consent succeeded with exactly `gmail.send` ++ `email`, but the callback logged `Integration connection save failed: name=object detail=` and+ redirected with `save-failed`. Cause: `markIntegrationInstalled` inserts `companyIntegration`,+ whose `id` is an FK to `integration.id`, and no `gmail` row existed (Calendar's was added by its+ migration; the rule's checklist did not mention it). Fix: the `gmail` row is inserted beside+ `google-calendar`'s in `20260901173000_workflow-integration-connections.sql` (first written as a+ separate migration, then folded in and both branch migrations re-stamped past main's newest, since+ the feature is not in production yet; local `schema_migrations` rows re-pointed by hand),+ applied locally with `pnpm db:migrate`; the callback now logs a PostgREST error's JSON instead of+ an empty string; the rule's "Adding a piece" checklist gained the step. The stale `integrationConnection`+ row from the failed attempt is revived by `createConnection` on retry (lookup by name, any status).+- **Browser test 2 (criteria 3–4) connected, then showed "Reconnect needed" immediately.** Stored+ `metadata.scopes` = `openid …/gmail.send …/userinfo.email`; required = `…/gmail.send email`.+ Google canonicalises the `email` alias. Fix: both Google rows spell scopes as full URLs (Calendar+ gained an `oauth.scope` override with the same three permissions); `oauth.test.ts` now refuses+ `email`/`profile`/`openid` on any row. The existing Gmail row needs no change — its granted set+ already contains both canonical scopes. Findings from all three pieces written as the numbered+ WHAT BIT US block above `PIECE_ALLOWLIST`, pointed to from the rule and `.ai/lessons.md`.+- **Browser test 3 (criterion 5, builder) — two form defects.** (a) `receiver`/`cc`/`bcc`/`reply_to`+ are `list<string>` and `fields/control.ts` sent EVERY list to the variable picker, so an address+ could not be typed. Fix: `isWritableList` — a list of plain text renders as a `CreatableMultiSelect`+ chip field whose value is stored as a literal list (`LiteralControl`); a plain comma-separated box was+ tried and rejected — chips make "several recipients" visible; `{` still binds a whole list.+ Calendar's `attendees` gets the same. New `control.test.ts` (5 cases). (b) `body` is a vendor+ `ShortText` → one-line box. Fix: `LONG_TEXT` → `template: true` in `properties.ts` (Slack message,+ Calendar description now multiline), plus an allowlist `template` prop override for Gmail's body.+ Catalog regenerated (4 integration inputs carry `template: true`); jobs 97 integration tests,+ workflows 558, erp typecheck all green.++## Automated gates++| Gate | Command | Result |+|---|---|---|+| Package pinned | `grep piece-gmail packages/jobs/package.json` → `"0.13.0"`; piece loads, 26 actions | PASS |+| jobs typecheck | `pnpm --filter @carbon/jobs typecheck` | PASS |+| ee typecheck | `pnpm --filter @carbon/ee typecheck` | PASS |+| erp typecheck | `pnpm --filter erp typecheck` (after catalog regen) | PASS |+| workflows typecheck | `pnpm --filter @carbon/workflows typecheck` | PASS |+| jobs tests | `pnpm --filter @carbon/jobs test` — 45 files / 677 tests with `.env.local` sourced | PASS (8 new: registry ×4, oauth ×2, visibility ×1, catalog ×1 … see below) |+| ↳ note | `src/workflows/actions/services.test.ts` fails to IMPORT without the server env (`INNGEST_SIGNING_KEY`, `INNGEST_EVENT_KEY`, `SUPABASE_SERVICE_ROLE_KEY` via `@carbon/auth`) — pre-existing on this branch, unrelated to Gmail; passes once `.env.local` is sourced | env-only |+| ee tests | `pnpm --filter @carbon/ee test` — 59 files / 810 tests | PASS |+| workflows tests | `pnpm --filter @carbon/workflows test` — 31 files / 558 tests | PASS |+| catalog | `pnpm run generate:workflow-catalog && pnpm run check:workflow-catalog` — 7 integration steps; exactly `integration.gmail.gmail_send_email` emitted | PASS |+| lingui | `pnpm run lingui:extract && pnpm run lingui:clean` — 13 `.po` files, 0 `#:` origin lines; new msgids incl. "Gmail", "Gmail: Send Email", "Receiver Email (To)" | PASS |+| biome | `pnpm exec biome check` on the allowlist, 4 test files, `gmail/config.tsx`, `index.ts`, `hooks.server.ts` | PASS |++New tests (8): registry `gmail` ×4, oauth `buildConsentUrl` gmail ×1 + `requiredScopesFor` gmail ×1,+visibility `pinnedValues` gmail ×1, catalog `buildPieceActionDeclarations (gmail)` ×1.++## Acceptance criteria++| # | Criterion | Status | How |+|---|---|---|---|+| 1 | Catalog emits the one step with inputs `connectionId, receiver, cc, bcc, subject, body, reply_to, sender_name, from`; advancedInputs `body_type` only | PASS | `catalog.test.ts` + inspection of `actions.generated.ts` (attachments / in_reply_to / draft: 0 occurrences) |+| 2 | Card "Coming soon" without `GOOGLE_OAUTH_CLIENT_ID`, Install with it | BROWSER-PENDING | Settings → Integrations → Gmail card; toggle the env var |+| 3 | Consent screen lists only "Send email on your behalf" + email; Accounts tab shows the address; card Installed | BROWSER-PENDING | Install → popup → consent → Accounts tab. Needs the Google Cloud steps below first |+| 4 | `metadata.scopes` holds `gmail.send`; vault holds the token; `metadata` never holds a token | PASS (invariant) | `oauth.test.ts` metadata mapping + `connections.test.ts` vault invariant; the scope string itself is BROWSER-PENDING (inspect the row after consent) |+| 5 | Send Email node with a variable body delivers from the connected address; outputs carry `messageId`/`threadId` | BROWSER-PENDING | Builder → Integration → Gmail → Send Email → Test run → check Sent folder + run history outputs |+| 6 | Advanced → Body Type `html` works; `draft`/`attachments`/`in_reply_to` offered nowhere | PASS (form shape) / BROWSER-PENDING (html send) | `catalog.test.ts`; HTML delivery needs a real send |+| 7 | Disconnect → reconnect banner in the node form; step fails before vendor call with reconnect copy | BROWSER-PENDING | Accounts → Disconnect → reopen node → Test run |+| 8 | Uninstall revokes every `gmail` connection and leaves Calendar's untouched | PASS | `hooks.server.ts` `gmail` entry → `revokeConnectionsForPiece(…, "gmail", …)` filters by `pieceName` (ee `connections.test.ts` covers the reader) |+| 9 | Second Google account connects under another name and is independently pickable | BROWSER-PENDING | Accounts → Add account (different Google login) → node connection dropdown |+| 10 | Scoped tests + typechecks pass | PASS | table above |++## Operator to-do (Google Cloud console, before criteria 2–9 can be exercised)++1. OAuth consent screen → Scopes → add `https://www.googleapis.com/auth/gmail.send` (sensitive tier; `email` is already there for Calendar's account label).+2. Add the tester's Google account under Test users (needed until verification is approved).+3. Submit sensitive-scope verification: brand info, privacy policy URL, and a short demo video of the Carbon consent + send flow. Calendar's scopes ride the same submission.+4. No env change: `GOOGLE_OAUTH_CLIENT_ID/SECRET/REDIRECT_URL` are reused as-is.++## Files touched++Modified: `packages/jobs/package.json`, `pnpm-lock.yaml`, `packages/jobs/src/workflows/integrations/{allowlist,registry.test,oauth.test,visibility.test,catalog.test}.ts`,+`packages/ee/src/{index.ts,hooks.server.ts}`, `packages/workflows/src/catalog/{actions,labels}.generated.ts`,+`packages/locale/locales/*/erp.po` (13), `.claude/rules/workflow-integrations.md`, `packages/ee/AGENTS.md`, `.env.example`.+Created: `packages/ee/src/gmail/config.tsx`, `.ai/specs/implemented/2026-09-01-gmail-workflow-piece.md`, `.ai/plans/2026-09-01-gmail-workflow-piece.md`, `.ai/research/2026-09-01-gmail-workflow-piece.md`, this file.diff --git a/.ai/runs/2026-09-01-slack-single-source-of-truth.md b/.ai/runs/2026-09-01-slack-single-source-of-truth.mdnew file mode 100644index 0000000000..88b9103c94--- /dev/null+++ b/.ai/runs/2026-09-01-slack-single-source-of-truth.md@@ -0,0 +1,27 @@+# Run log — Slack single source of truth++Spec: `.ai/specs/implemented/2026-09-01-slack-single-source-of-truth.md` · Plan: `.ai/plans/2026-09-01-slack-single-source-of-truth.md`+Branch: `feat/active-pieces-integration` · Executed 2026-09-01 · Committed in `94cd181cd7` together with the piece (v1) and reconnect-prompt work.++## DB before / after (dev, company `HJzQ4BiYavLgTUi63ghSfJ`)++| | before | after |+|---|---|---|+| `companyIntegration.slack.metadata` | team_id `T0000000000`, team_name `acme-dev`, channel `#new-channel`, channel_id `C0000000000`, webhook url, bot_user_id | `{}` |+| `companyIntegration.slack.secretRef` | set | `NULL`; `get_integration_secret(...)` → null |+| `integrationConnection` (piece `slack`) | 0 rows | 1 row, Active, `accountLabel = acme-dev`, `metadata` = team/channel/bot/scopes (webhook keys stripped after review), `get_connection_secret ? 'accessToken'` = true |++Token verified against Slack afterwards: `auth.test` → team **acme-dev**, bot `carbon-test-bot`; `conversations.info` on the stored channel → `new-channel`. The hardened migration was re-run in a `BEGIN…ROLLBACK` transaction without error.++## Gates (final, after thermo-nuclear remediation)++typecheck `@carbon/ee @carbon/jobs @carbon/env @carbon/workflows erp` 5/5 · ee 582 ✓ · jobs 586 ✓ (`services.test.ts` env-gated on empty local `INNGEST_SIGNING_KEY`, pre-existing) · workflows 557 ✓ · `check:workflow-catalog` ok · biome clean on touched files · forwarder verified live (`302 → /api/integrations/connections/callback?code&state`).++## Browser criteria — UNVERIFIED, user-driven++Slack app needs the 16 bot scopes: `assistant:write chat:write.public commands files:read im:history incoming-webhook team:read chat:write users:read users:read.email channels:read groups:read chat:write.customize im:write channels:manage groups:write`. Redirect URL unchanged (legacy path forwards). Then: fresh consent → connection with `channel_id`, card Installed, builder shows the step form; slash command resolves the company by `team_id`.++## Follow-ups folded in the same day++- Review: `SLACK_CONNECTIONS_REDIRECT_URL` dropped; `SLACK_OAUTH_REDIRECT_URL` kept; `api+/integrations.slack.oauth.ts` forwards.+- Thermo-nuclear remediation (`.ai/runs/2026-09-01-thermo-nuclear-review.md`): `notify.ts` per-user DMs read the workspace (B1); migration hardened (M3); webhook URL never stored (M4); `send-slack` keeps the token out of step output (M6); ambiguous workspace refused (M8).diff --git a/.ai/runs/2026-09-01-slack-workflow-piece.md b/.ai/runs/2026-09-01-slack-workflow-piece.mdnew file mode 100644index 0000000000..81323a8f77--- /dev/null+++ b/.ai/runs/2026-09-01-slack-workflow-piece.md@@ -0,0 +1,32 @@+# Run log — Slack as a workflow integration piece (v1)++Plan: `.ai/plans/2026-09-01-slack-workflow-piece.md`+Spec: `.ai/specs/implemented/2026-09-01-slack-workflow-piece.md`+Branch: `feat/active-pieces-integration` · Executed 2026-09-01 · **Nothing committed** (user commits).+Recreated after the file was removed from disk outside the session. The card/credential model of this+run was superseded the same day by `2026-09-01-slack-single-source-of-truth.md`.++## What landed++| Task | Result |+|---|---|+| 1. Piece dep | `@activepieces/[email protected]` exact pin in `packages/jobs/package.json`; bundle loads, 72 actions. |+| 2. Allowlist | `AllowlistPropOverride.omit`, `AllowlistEntry.oauth.{authUrl,scope}`; `slack` row (4 actions: `send_channel_message`, `send_direct_message`, `slack-find-user-by-email`, `slack-create-channel`). 4 registry tests; the pre-existing "unknown piece" fixture renamed `slack` → `notion`. |+| 3. Visibility | `Visibility` gains `omit`; `MARKDOWN` auto-omits; allowlist `omit` honoured. 4 tests. |+| 4. Generator | `catalog.ts` consults visibility BEFORE `toValueType`; `toPropsValue` skips `MARKDOWN`. Added during execution: `vendorText` straightens backticks / `${` in vendor labels and descriptions (Slack's `threadTs` help text tripped `assertLabelIsSafe`). New `catalog.test.ts`. |+| 5. Consent URL | `buildConsentUrl` in `oauth.ts`; connect route calls it. 3 tests. |+| 6. Mark installed | `markIntegrationInstalled` in `settings.server.ts` (insert-if-absent / re-activate, never touches metadata); callback uses it. |+| 7. Assistant guard + token error | `getSlackAuth` null-guard (later rewritten in v2); `readTokenResponse` names Slack's in-body `error`. 1 test. |+| 8. Card | `hooks.server.ts` `slack` entry (health + uninstall revoke); card copy updated. |+| 9. Env | `SLACK_CONNECTIONS_REDIRECT_URL` added (later removed in v2's review — `SLACK_OAUTH_REDIRECT_URL` kept instead). |+| 10. Builder | Connect link → `${path.to.integration(piece)}?tab=connections`. |+| 11. Regen | Catalog: 6 integration steps, exactly 4 `integration.slack.*`; none of `info/file/blocks/sendAsBot/mentionOriginFlow` in `send_channel_message`; Lingui extracted. |+| 12. Docs | `workflow-integrations.md` synced; spec status → implemented. |++## Automated gates (at the time)++typecheck 5/5 · jobs 574 ✓ (`services.test.ts` env-gated, pre-existing) · ee 575 ✓ · workflows 557 ✓ · catalog check ok · biome clean.++## Deviations++`vendorText` added mid-run (recorded in the plan first); no per-task commits (user's rule).diff --git a/.ai/runs/2026-09-01-thermo-nuclear-review.md b/.ai/runs/2026-09-01-thermo-nuclear-review.mdnew file mode 100644index 0000000000..c1c20b6b9a--- /dev/null+++ b/.ai/runs/2026-09-01-thermo-nuclear-review.md@@ -0,0 +1,298 @@+# Thermo-nuclear review — Slack workflow piece · single source of truth · reconnect prompts++> **Remediated 2026-09-01 (same session):** BLOCKER 1–2 and MAJOR 3–10 are fixed — see the+> "Remediation" section at the end. MINOR 11–23 (except 24, fixed in passing) and Q1–Q6 are+> still open. Verification after the fixes: typecheck `@carbon/ee @carbon/jobs @carbon/workflows erp`+> clean; ee 582 / jobs 586 (+ the pre-existing env-gated `services.test.ts`) / workflows 557 pass;+> `check:workflow-catalog` ok; biome clean on every touched file; the hardened migration ran in a+> rolled-back transaction without error; `.po` diff is 13 files / 1,223 lines of real strings.++Scope: the uncommitted working tree on `feat/active-pieces-integration` (43 modified + 14 new+files, 26 `.po` files) plus today's one commit `cd04bee95` (transient-refresh fix). Reviewed via+`self-review` strict mode: four area reviewers (ee + migration · jobs integrations · erp routes/UI ·+env/docs/tests) whose claims were re-verified against the code before inclusion; items marked+*(reviewer)* were checked by the reviewer with `file:line` evidence but not independently+re-executed by me.++Verification run while reviewing: typecheck `@carbon/ee @carbon/jobs @carbon/env @carbon/workflows erp`+clean; ee 582 / jobs 583 (+1 pre-existing env-gated suite) / workflows 557 tests pass;+`check:workflow-catalog` ok; biome clean on touched lines.++Nothing below has been fixed — the user decides.++---++## BLOCKER 1 — a fourth reader of `companyIntegration.slack` was missed: per-user Slack DMs go dark++`packages/jobs/src/inngest/functions/notifications/notify.ts:650-673`++The v2 spec repointed `getSlackAuth`, `send-slack`, `slack-document-sync` (×4), the interactive+route and the prefs page. `notify.ts`'s `resolve-slack-recipients` step still does+`companyIntegration … .eq("id","slack")` → `resolveIntegrationSecrets(client, companyId, "slack", …)`.+With `SECRET_KEYS.slack` removed (`packages/ee/src/integrations/secrets.ts:26`) that helper returns+the now-empty metadata `{}` at its early return, `accessToken` is `undefined`, the step returns `[]`,+and **every per-user Slack DM notification is silently skipped for every tenant** the moment the+migration runs. No type error, no test, no log above `console.error` on the happy path.++Fix: replace the block with `const workspace = await getSlackWorkspace(client, payload.companyId)`+and use `workspace?.token`; then grep once more for `"slack"` next to `companyIntegration` before+merging (the earlier consumer map was built from `packages/ee/src/slack` exports and missed this+inline read).++## BLOCKER 2 — 169,651 lines of `.po` noise++`packages/locale/locales/*/erp.po` (26 files)++`lingui:extract` was run without the repo's `lingui:clean`, so every catalog gained `#: path:line`+origin comments and a `POT-Creation-Date` header (`lingui.config.js:9-12`, `package.json:65`).+Translations are intact (one legitimately reworded msgid). The commit hook would normalise it, but+as a working tree it hides the real change. Fix: `pnpm run lingui:clean`.++## MAJOR 3 — the migration can abort a deploy, or leave an Active connection with no secret++`packages/database/supabase/migrations/20260901173100_slack-connections-single-source.sql:32-63`++- `companyIntegration.updatedBy` is bare `TEXT` (no FK — verified against `pg_constraint`), but it is+ copied into `integrationConnection.createdBy/updatedBy`, both `REFERENCES "user"`. One stale user+ id in any tenant raises 23503 inside the `DO` loop and fails the whole migration. Fix: resolve+ `v_actor` through `SELECT id FROM "user" WHERE id = …` before the `userToCompany` fallback, and use+ `v_actor` for `updatedBy` too.+- The row is inserted `Active` before the vault is consulted; if `get_integration_secret` returns+ NULL / no `access_token`, the plaintext and old vault entry are then deleted (`:67-71`) and the+ company ends with an Active connection whose `readTokens` throws `ConnectionSecretUnavailableError`+ forever, while the card reads Healthy. Fix: read the bag first; insert `status='Expired',+ lastError='No token found at migration'` when absent; skip the vault upsert when `v_row.active`+ is false (a Revoked row must hold no secret, as `disconnectConnection` guarantees). Also have+ `getSlackWorkspace*` catch `ConnectionSecretUnavailableError` → `null`.+- *(reviewer)* The "no member" skip branch leaves the old token orphaned in the integration vault+ with no remaining reader; strip + `delete_integration_secret` there too, or say why not.++## MAJOR 4 — the Slack incoming-webhook URL is copied into `metadata` and shipped to the browser++`packages/jobs/src/workflows/integrations/allowlist.ts:165-166` (`webhook_url`, `configuration_url`),+migration `:49-50`, `apps/erp/app/routes/x+/settings+/integrations.$id.tsx:917` (full rows →+`ConnectionRow` now includes `metadata`, `ConnectionsTab.tsx:184`).++An incoming-webhook URL is a bearer capability (whoever holds it can post to the channel). Nothing+reads it (`workspaceFacts` uses only `team_id/channel_id/bot_user_id`), yet the map, the migration+and the loader all carry it, and the `oauth.test.ts` "never the token" test asserts its presence.+Fix: drop both keys from the allowlist map and the migration (and strip them from the already-+migrated dev row); project the loader payload to `{ …row, metadata: { scopes } }` or compute+`needsReconnect` server-side and remove `metadata` from `ConnectionRow`.++## MAJOR 5 — `omit` is catalog-only; a node value still reaches the vendor++`packages/jobs/src/workflows/integrations/properties.ts:152-176` (`toPropsValue`),+`packages/workflows/src/runtime/integration.ts:32`, `packages/workflows/src/definition/nodes.ts:246`++`toPropsValue` iterates the piece's own `props` and "a node value always wins". `checkInputs` only+validates *declared* inputs. So a node saved before the omit (or a definition posted with+`inputs.sendAsBot=false` / `inputs.blocks=[…]`) sends the omitted prop — the exact user-token path+the omit exists to make unreachable. Fix: `toPropsValue` (or `runIntegrationAction`) consults+`visibilityOf` and, for `omit: true`, ignores `inputs[name]` and sends only the pin. Test: "an+omitted prop with a stale node value is not sent".++## MAJOR 6 — the bot token is persisted in Inngest step state++`packages/jobs/src/inngest/functions/notifications/send-slack.ts:15-22`++`step.run("resolve-slack-token")` returns the token as step output, which Inngest serialises. The+old code had the same shape but had been returning `null` since the Aug-17 vault scrub; this diff+makes it return a live token again. Fix: resolve and use the token inside the single `post-message`+step (as `slack-document-sync.ts` does); never return secret material from `step.run`. Also catch+and return `null` on lookup failure to preserve the env-token fallback (see MINOR 12).++## MAJOR 7 — mixed readiness: builder and card disagree, and a stale account is silently repointed++`apps/erp/app/modules/workflows/options-providers.server.ts:96-108`,+`…/IntegrationNodeForm.tsx:89-93,151-168,178-183` *(reviewer, logic confirmed by reading)*++One ready + one under-scoped Active account: the provider drops the stale one with no `errorCode`;+`onlyConnection` becomes the single ready id, the connection field is hidden, a node already+storing the stale id keeps it with no field and no banner, a new node is silently pointed at the+other account — while the card says Unhealthy. Fix: return `errorCode: "reconnect"` + `errorHref`+whenever `ready.length < usable.length` (alongside the ready options); never hide the field while+the stored `connectionId` is not among the offered options.++## MAJOR 8 — `getSlackWorkspaceByTeamId` picks the first company when a workspace is linked to two++`packages/ee/src/slack/lib/service.ts:254-281` *(reviewer)*++One Slack app serves all tenants and the card now advertises "add more accounts", so two Carbon+companies can connect the same workspace. `.limit(1)` routes every slash command to whichever+connected first; `getCarbonEmployeeFromSlackId` falls back to `id: "system"` (`:381-392`), so an+employee of company B creates issues in company A. The old code took `data[0]` too — this diff+codifies it. Fix: fetch all Active matches; if >1 distinct `companyId`, answer with an ephemeral+"this workspace is linked to more than one Carbon company" (or resolve by the invoking user's+email → membership). Test the ambiguity branch.++## MAJOR 9 — health check does the work twice and never caches "unhealthy"++`apps/erp/app/modules/settings/settings.server.ts:427-434,475-483`, `packages/ee/src/hooks.server.ts:56`++Only `"1"` is honoured from Redis, so every legacy Slack workspace (now permanently under-scoped+until someone reconnects) is recomputed on every Settings → Integrations load — the ee hook's+`readConnections` plus a second identical `readConnections` here plus `requiredScopesFor`. Fix:+one read in erp (`connectionsHealthy(rows) && !rows.some(needsReconnect)`), skip the ee hook for+allowlisted pieces, and cache `"0"` with a short TTL (the callback already invalidates the key).++## MAJOR 10 — docs contradict the code++- `.claude/rules/workflow-integrations.md:327` says "the ten our four actions need"; the row has 16.+- `.ai/specs/implemented/2026-09-01-slack-workflow-piece.md:59,92,172,217` and `.ai/plans/…workflow-piece.md:23`+ still name `SLACK_CONNECTIONS_REDIRECT_URL` while marked implemented.+- `.claude/rules/issue-module.md:169` documents `nonconformance_channel_id` /+ `nonconformance_notifications_enabled` that the migration dropped.+- `.claude/rules/workflow-actions.md:230` and `…/fields/choiceOptions.tsx:27` gate the notify+ action's Slack channel on `companyIntegration.slack.active`, while delivery now needs a usable+ connection (MINOR 13).+- `packages/ee/AGENTS.md:42` still describes the piece pattern as `google-calendar/config.tsx` only.++---++## MINOR 11 — `markIntegrationInstalled` is read-then-insert+`settings.server.ts:316-343`. Two concurrent callbacks both see `null`; the second insert hits the+PK and the callback reports `save-failed` after tokens were already written. Use+`upsert(…, { onConflict: "id,companyId", ignoreDuplicates: true })` then a guarded `update`.++## MINOR 12 — `getSlackWorkspace` now throws where the old path fell back+`send-slack.ts:17-21`, `service.ts:232-252`. Vault errors / near-expiry now throw (3 retries, then+fail) instead of falling back to `SLACK_BOT_TOKEN`; and it costs three round trips+(`readConnections` → `readConnection` → vault). Catch → `null` in the step; let+`readConnectionAccessToken` accept an already-read connection.++## MINOR 13 — revoking the last account leaves the card installed+Disconnect (not Uninstall) the only Slack account: card stays Installed, builder still offers the+Slack notify channel (`choiceOptions.tsx:27`), `send-slack` falls back to the env token silently.+Decide: deactivate the card when the last connection is revoked, or have `notify` warn and skip.++## MINOR 14 — `needsReconnect` written three times+`settings.server.ts:481-482`, `options-providers.server.ts:96-98`, `ConnectionsTab.tsx:184-185`+(+ `requiredScopesFor` fetched in three places). One `partitionByScopes(rows, required) → { ready, stale }`+in `@carbon/ee/integrations/connections`.++## MINOR 15 — `service.ts:258-268` re-inlines `SELECT_COLUMNS` and the `as unknown as IntegrationConnection`+cast that `connections.ts:86-90` promises is bridged in one place. Add `readConnectionsWhere(...)`+to `connections.ts`.++## MINOR 16 — `readConnectionAccessToken` duplicates `resolveConnectionAuth`'s read/status guard and+throws a bare `Error` where the file otherwise uses typed errors (`connections.ts:535-554`). Extract+`readActiveConnection()`; name the error.++## MINOR 17 — revive omits `updatedAt` (`connections.ts:217-232`) unlike rename/disconnect.++## MINOR 18 — `vendorText` (`properties.ts:114-116`) does not escape `\`; the generator emits raw+template literals, so a vendor `\u`/trailing `\` would break `labels.generated.ts`. Also the step+label `${entry.label}: ${action.displayName}` (`catalog.ts:127`) bypasses both `vendorText` and+`assertLabelIsSafe`. Latent today.++## MINOR 19 — `SCOPE_ERROR` (`integration.ts:28-29,138`) also matches Carbon's own throws inside the+same `try` and `insufficient.?permission` can relabel a resource ACL denial as "reconnect". Apply it+only to errors from `action.run`; narrow to observed vendor tokens.++## MINOR 20 — shared `reconnecting` state (`ConnectionsTab.tsx:130,150`): one Reconnect click spins+every Reconnect and Add-account button. Track `pendingName`.++## MINOR 21 — `IntegrationNodeForm.tsx:224-268` two near-identical banner blocks; provider's+`emptyHref: path.to.integrations` (`options-providers.server.ts:115`) still points at the grid while+both banners deep-link to `?tab=connections`.++## MINOR 22 — migration `integrationConnection_slack_team_idx` is Slack-named but not partial; the+helper's `SECURITY DEFINER SET search_path` is unneeded (the RPCs it calls are definers). Cosmetic.++## MINOR 23 — connect route error strings (`$piece.connect.ts:29,38`) are English-only and now+toasted from two entry points; route them through `integration-errors.ts` codes like the callback.++## MINOR 24 — `settings.server.ts:305-309` comment on `markIntegrationInstalled` still says the Slack+row holds `team_id/channel_id/webhook url`; it no longer does.++---++## QUESTIONS++- **Q1** Every existing Slack customer's card goes Unhealthy at deploy (backfilled scopes = the+ Assistant's 10) although the Assistant works. This is the badge behaviour the user chose, but the+ blast radius is "all legacy tenants at once". Keep, or gate the badge on the company having a+ workflow that uses the piece?+- **Q2** Reconnect re-consents under the same name and the revive overwrites `metadata` wholesale+ (`connections.ts:224-226`); picking a *different* workspace or channel in Slack's picker silently+ repoints the Assistant's `team_id`/`channel_id`. Refuse (or warn) when the new `team_id` differs?+- **Q3** If the Slack app ever enables token rotation, `expiresAt` is stored and every Assistant+ call throws "use resolveConnectionAuth". Deliberate constraint — is it written where the person+ flipping that switch will see it?+- **Q4** `slack-user:${userId}` Redis key (`service.ts:311,333`) is not keyed by team; multi-workspace+ is now a feature. Pre-existing.+- **Q5** Runner copy (`reconnectCopy`, `NO_CONNECTION`) is English-only by precedent; the reconnect+ string is the longest user-facing one yet. Is the run ledger exempt from Lingui by design?+- **Q6** `.ai/docs/slack-integration-storage-eli5.html` is the only `.html` in `.ai/docs/`. Keep in+ repo or move to scratch/artifact?++## Docs freshness++| File | Stale | Fix |+|---|---|---|+| `.claude/rules/workflow-integrations.md:327` | "ten" scopes | sixteen (10 Assistant + 6 workflow) |+| `.claude/rules/issue-module.md:169` | `nonconformance_*` on the integration row | channel comes from the connection's `channel_id` via `getSlackWorkspace` |+| `.claude/rules/workflow-actions.md:230` | Slack gated on the integration being active | a usable Slack connection |+| `.ai/specs/implemented/2026-09-01-slack-workflow-piece.md:59,92,172,217`, `.ai/plans/…workflow-piece.md:23` | `SLACK_CONNECTIONS_REDIRECT_URL` | superseded note → `SLACK_OAUTH_REDIRECT_URL` + forwarder |+| `packages/ee/AGENTS.md:42` | piece pattern described as GCal-only | mention Slack; the Assistant consumes the connection |+| `apps/erp/app/modules/settings/AGENTS.md:75` | helper list | add `markIntegrationInstalled` |+| `.ai/specs/AGENTS.md:30` | three specs "implemented" but not in `implemented/` | ask, then move |+| `.ai/lessons.md` | no entry | add: "secret material is read through one reader — three readers of `companyIntegration.metadata.access_token` silently degraded after the Aug-17 vault scrub" and "commit `.po` files only after `lingui:clean`" |++## Missing tests (would a revert be caught?)++| Change | Covered | Feasible as |+|---|---|---|+| `notify.ts` Slack recipient resolution | no | unit with mocked `getSlackWorkspace` |+| `markIntegrationInstalled` insert / reactivate / never-overwrite | no | erp unit with a hand-rolled client stub (precedent: `connections.test.ts` `makeClient`) |+| forwarder `integrations.slack.oauth.ts` | no | trivial loader test asserting `Location` |+| `getSlackWorkspace` / `getSlackWorkspaceByTeamId` (oldest-Active, null, missing-secret, ambiguity) | no | ee unit with `from`/`rpc` stub; extract a pure `pickAssistantConnection` |+| `getIntegrationHealth` scope branch | no | unit with mocked `readConnections`/`requiredScopesFor`/redis |+| options-provider `reconnect` branch (incl. mixed readiness) | no | unit with mocked ee/jobs |+| revive **without** `metadata` keeps the old map | no | one more case in `connections.test.ts` |+| omitted prop with stale node value not sent | no | `properties.test.ts` |+| migration (tokenless row, no-member skip, re-run) | manual only | no SQL harness in repo |+| `ConnectionsTab` / `IntegrationNodeForm` | no | browser/RTL; low ROI |+| Covered: `buildConsentUrl`, `requiredScopesFor`, `connectionMetadataFrom`, `missingScopes`, `readConnectionAccessToken`, revive-with-metadata, runner scope refusal + `missing_scope` mapping, catalog emission, `omit`/MARKDOWN visibility, `vendorText` | — | — |++## Checked and cleared++Forwarder is a fixed same-origin path with only `url.search` passed through — no open redirect; the+callback still enforces session, HMAC state (10-min) and `state.companyId === companyId`; token+exchange uses the same `redirectUri` the consent was built with. Service-role reads in health,+provider and prefs page are all scoped by the session's `companyId`. `@slack/oauth` removed from+`@carbon/ee` (transitive of `@slack/bolt` only). `SLACK_STATE_SECRET`, `getSlackInstallUrl`,+`slackOAuthTokenResponseSchema`, `integrations/slack/install`, `getSlackIntegration*`,+`hasSlackIntegration` — zero live references. RPC signatures, json/jsonb casts and idempotency of+the migration verified; `companyIntegration.updatedAt` defaults to `now()`. `loadPiece` memoises,+so `requiredScopesFor` is a map lookup after warm-up. Google Calendar rows have no recorded scopes+→ never flagged. All new UI strings go through `<Trans>`; catalog diff is additive only.+`connections.ts` transient-refresh commit (`cd04bee95`) is sound.++## Verdict++**Not shippable as is.** BLOCKER 1 breaks per-user Slack DMs for every tenant on deploy and is a+five-line fix; BLOCKER 2 is one command. MAJOR 3 (migration robustness) and MAJOR 4 (webhook URL+in metadata / browser) should land before the migration runs anywhere but dev, because both are+much cheaper to fix before data exists. MAJOR 5 (omit at run time) and MAJOR 6 (token in Inngest+state) are correctness/security gaps in code that is otherwise complete. MAJOR 7–9 are design+tightenings; Q1 is a product call to make explicitly.++---++## Remediation (what was changed for each)++| # | Fix |+|---|---|+| B1 | `notify.ts` `resolve-slack-recipients` now calls `getSlackWorkspace(client, companyId)` (try/catch → `[]`); `resolveIntegrationSecrets` import dropped. |+| B2 | `pnpm run lingui:clean` (and a fresh `lingui:extract` for the new banner strings). |+| M3 | Migration rewritten: `v_actor` resolved through `"user"` then `userToCompany`, else NOTICE + untouched; vault read BEFORE insert; no token → `status='Expired'` + `lastError`; inactive → `'Revoked'` with no secret; `updatedBy = v_actor`; index made partial on `pieceName='slack'`; no `SECURITY DEFINER`. Dry-run in `BEGIN…ROLLBACK` clean. |+| M4 | `webhook_url` / `configuration_url` removed from the Slack allowlist `metadata` map, the migration and the dev row (`metadata - 'webhook_url' - 'configuration_url'`); `oauth.test.ts` now asserts their absence; the drawer loader projects rows to `{ …, metadata: { scopes } }`. |+| M5 | `omittedProps(piece, action, props)` in `visibility.ts`; `runIntegrationAction` strips those keys from the node's inputs before `toPropsValue`, so only the pin is sent. Tests in `visibility.test.ts` (real Slack row) and `integration.test.ts` (stale `sendAsBot=false` → piece receives `true`). |+| M6 | `send-slack.ts` resolves the token inside the single `post-message` step (never a step output) and falls back to the env token on any lookup failure. |+| M7 | Provider returns ready options **plus** `noticeCode: "reconnect"` / `noticeHref` when some usable accounts are under-scoped (error only when none are ready); `useWorkflowOptions` passes the notice through; `OptionsField` shows "An account is missing from this list until it is reconnected · Reconnect it"; `IntegrationNodeForm` shows a non-blocking banner, and never hides the connection field when the node's stored account is not among the offered options (`storedNotOffered`). Provider `emptyHref` now deep-links to `?tab=connections`. |+| M8 | `getSlackWorkspaceByTeamId` fetches every Active match and throws `AmbiguousSlackWorkspaceError` when they span companies; the interactive route answers with an ephemeral explanation instead of acting in the wrong company. |+| M9 | `getIntegrationHealth` decides piece-card health once in erp (`connectionsHealthy(rows) && !rows.some(needsReconnect)`), honours a cached `"0"` (60 s TTL; unhealthy is stable until a reconnect, and every mutation path invalidates the key), and the ee hook no longer runs for piece cards (`pieceConnectionsHealthy` + its `onHealthcheck` entries removed). New shared `needsReconnect(row, required)` in `@carbon/ee/integrations/connections` used by the provider, the health check and the Accounts tab (also closes MINOR 14). |+| M10 | Docs: `workflow-integrations.md` (sixteen scopes), `issue-module.md:169`, `workflow-actions.md:230`, v1 spec + plan superseded notes, `packages/ee/AGENTS.md:42`, settings `AGENTS.md:75`, two new `.ai/lessons.md` entries. Spec moves to `implemented/` still pending your say-so (`.ai/specs/AGENTS.md:14`). |+| Minor 24 | `markIntegrationInstalled` comment reworded in passing. |diff --git a/.ai/runs/2026-10-21-thermo-nuclear-review-2.md b/.ai/runs/2026-10-21-thermo-nuclear-review-2.mdnew file mode 100644index 0000000000..039a19806f--- /dev/null+++ b/.ai/runs/2026-10-21-thermo-nuclear-review-2.md@@ -0,0 +1,263 @@+# Thermo-nuclear review 2 — feat/active-pieces-integration++Target: base `d29d84c07a` → working tree (committed + the uncommitted fix pass + untracked+`20261021123105_revoke-connections.sql`). Four read-only reviewers (connections/auth, jobs/catalog,+ee engine, erp UI); the lead re-opened every blocker. No typecheck, tests or build were run (RAM rule).+No file crosses 1,000 lines except `ee/catalog/build.test.ts` (980 → 1026).++**Status:** blockers N1–N7 are fixed in `5a29c420be` and `57f8626806`. N4's palette and+`labelKeys` strings stay English, like every other node kind's. N5 folded the branch's connection+migrations into `20261021123100`, `…102` and `…104`. Code-judo, risks and docs below are open.++## Status of review 1 (same day)++- **Fixed:** B1, B2, B3, B5, B7, B8, B9, B10. Code-judo 1 (leftovers below), 3, 4, 5, 6, 7, 8, 10, 11, 12.+ Risks: refresh race, Slack `team_id` across companies, `fromColumn` on vendor JSON, flatten >100,+ `operationOf` fallback, run error redaction, `accountLabelFor` timeout, install race,+ `String(option.value)`, `Object.hasOwn`, `setNotices`, nested output paths, label escaping.+ Nearly all suggestions and docs items.+- **Partial:** B4 (error text — see N3), B6 (see N4), code-judo 9 (ee side still re-spreads),+ `ItemRef.card` (validator yes, runtime no).+- **Open:** code-judo 2 (flat filter fields), CDN logos for non-piece cards, legacy Slack scopes (Q1),+ quote-PDF change in scope, `manifests/schema.json` churn, migration `…123101:39` comment.++---++## Blockers++### N1 [V] A view-only user is navigated out of the builder by opening an integration node+`api+/workflows.options.ts:64` calls `requirePermissions(request, provider.permission)`; the property+provider needs `{ update: "workflows" }` (`workflows.service.ts:825`). On denial `requirePermissions`+throws a redirect with "Access Denied" (`packages/auth/src/services/auth.server.ts:433-439`).+The builder loads with `view` only. `useWorkflowOptions.ts:70-77` fetches even when the form is read-only.+So when a viewer opens a node with a dependent input (calendar, channel), the redirect sends them to the app root.+Fix: authenticate with `view`, check the provider permission against the returned `permissions`+and return `{ options: [], errorCode: "forbidden" }`; don't fetch while `isReadOnly`.++### N2 [V] A failed Accounts-tab connect closes the popup with no message+`integrations.connections.callback.ts:88` replies to `state?.integrationId ?? "connection"`.+If the state is invalid, expired or replaced, the reply goes to `"connection"`.+Every card listener drops a message for another integration id (`IntegrationCard.tsx:136`).+A replaced state is easy to get: Reconnect, then Add account for another account, replaces the pending entry.+Fix: one page-level listener in the integrations route for `"connection"`, or let each card also+accept `"connection"`.++### N3 [V] Vendor request bodies still reach run history (B4 remainder)+`actions/integration.ts:182-184` stores `cause.message`. An Activepieces `HttpError` message is+`JSON.stringify({ response, request: { body } })`. So the step row stores attendees and prose.+`execute.ts:646` (`firstError`) copies them into the run error too.+`integration.test.ts:233-284` only asserts the prefix.+Fix: word the failure from status / structured code; never store the message.++### N4 Untranslated copy, and one step named two ways (B6 remainder)+- `ui/Runs/DataDetail.tsx:17-19` falls back to the engine's English `card.summary`.+- `ui/Runs/runOutcome.ts:21-24` names data steps through `DATA_OPERATIONS[op].label` (English) while+ the step list uses the Lingui hook — breaks "never name one step two ways" (`workflow-run-history.md`).+- `ConnectionsTab.tsx:268-272` renders raw `lastError` (`connections.ts:68,590,644`, migration `…123102:80`).+- `nodes/meta.ts:121-195` palette strings; `labelKeys.ts:87,92` ("an object", "a list of objects").+- [V] "operation" msgids collide with routing operations: de "Add operation" → "Arbeitsgang hinzufügen",+ ja → "工程を追加" (`FilterForm.tsx:195`, `OperationCardEditor.tsx:138,142`). Add a Lingui `context`.++### N5 [V] `createConnection` still chains Supabase writes (AGENTS.md "Never")+Revive path: the vault write (`connections.ts:347`) runs before the row update (`:348-366`).+If the update fails, a Revoked or Expired row holds a live secret. Migration `…123102:16-17` forbids that.+Insert path: row, then vault, then a cleanup delete. The code ignores that delete's error (`:397-401`).+Fix: one `save_connection` RPC, the same shape as `revoke_connections`.++### N6 [V] An existing node loses its whole form when its only account is disconnected+With zero usable accounts, `connected` is false. The `connected` check hides the stored-account banner+(`IntegrationNodeForm.tsx:316-319`). The form says "{app} isn't connected yet" (`:364-376`).+`canConfigure` hides the step and every input (`:129`). `reference/workflows.mdx` promises an+"Open … accounts" banner here. Fix: `canConfigure ||= storedConnectionId !== undefined`; drop the+`connected` gate from the stored-account banner.++### N7 [V] Source comment in a test+`packages/ee/src/integrations/connections.test.ts:242` — "the exact contradiction a customer reported".+Reword neutrally ("the two surfaces disagreed").++---++## Code-judo / simplification++1. **Drop the flat `operation` / `field` / `flatten` filter fields** (still open). `schema.ts:117-123`;+ base `filterNode` never had them. `cardsOf` synthesizes card 0 from `combinator`/`clauses`;+ `operationOf` (`data-operations.ts:96-113`, applied unevenly — no-op at `:186`, `data-node.ts:71`,+ skipped at `data-node.ts:163-271`, `filter.ts:139,268`), the `variables.ts:299-304` probe, the+ "legacy rows" `summary` doc (`runtime/types.ts:134`) and test noise all go.+2. **One `declaredInputs(step)`.** `{ ...inputs, ...advancedInputs }` is written 5× —+ `batch.ts:47`, `nodes.ts:216`, `notices.ts:70-73`, `runtime/integration.ts:35`, `catalog/build.ts:880`.+ A missed copy makes validator, batch plan, hints and run see different inputs.+3. **One `runStep` body.** `runtime/action.ts:21-46` ≈ `runtime/integration.ts:28-54` (resolve, call,+ map to Succeeded/Failed); only the lookup, the GONE text and the service call differ.+4. **Split `connections.ts` client/server.** `ConnectionsTab.tsx:9-13` (browser) value-imports+ `@carbon/ee/integrations/connections`, which holds vault RPCs and the token exchange posting+ `client_secret` (`connections.ts:286-889`); no `.server` suffix, so `no-server-code-in-client`+ can't see it. Move the pure status helpers to `connection-status.ts`; rename the rest `connections.server.ts`.+5. **ERP stops knowing the piece's shape.** `workflows.service.ts:881-900` casts `property.options`+ and hand-builds `{ auth, propsValue }`; the `propsValue` loop (`:889-893`) is dead (every fetched+ prop `dependsOn` only the connection, `properties.ts:47`) under a false comment. Export+ `runPropertyOptions(piece, action, prop, token)` from `@carbon/jobs/integrations`.+6. **One options wire type and one error notice.** `OptionsProviderResult` (`workflows.service.ts:746-762`)+ is copied as `WorkflowOptions` (`useWorkflowOptions.ts:11-19`) → move to `types.ts`.+ `IntegrationNodeForm.tsx:340-361` copies `OptionsField.tsx:106-151`, and a failure fetches the+ connection list twice and shows two "Try again" buttons; the `"refreshing"` branch (`:343`) is+ unreachable. Extract `<OptionsErrorNotice/>`, share the fetcher key.+7. **One `revokeConnections(client, { companyId, pieceName, connectionId?, updatedBy })`** —+ `disconnectConnection` / `revokeConnectionsForPiece` (`connections.ts:428-461`) wrap the same RPC+ with `companyId`/`pieceName` in swapped positions.+8. **One health-cache path.** `settings.service.ts:2671-2709` re-implements `:2723-2760` with another+ policy; pass a `pieceHealthcheck` and a TTL into the shared path.+9. **Fold the unshipped migrations.** `…123103` and `…123105` into `…123101`; delete+ `delete_connection_secret` (no caller); drop `integrationConnection_companyId_idx` and+ `_companyId_pieceName_idx` (covered by PK / unique by left prefix).+10. **`build.ts` fakes declarations.** `:862-866`, `:877-882` pass spread fakes to helpers that read+ only `.inputs`; `buildDeclaredInputs` (`:176-191`) still re-spreads ~10 fields; tuple casts+ `:476-492`, `:511`. Take the inputs map directly.+11. Small indirections: `CONNECTION_INPUT` alias (`integrations/options.ts:17`) beside the real name,+ and `integration.ts:105` uses neither; `integrationStepId` relayed through `catalog/catalog.ts:146`+ and `catalog/index.ts:20`; `inputLabel` (`IntegrationNodeForm.tsx:152-156`) = `labelFor`+ (`StepInput.tsx:69-73`); dead `?? path.to.integrationAccounts(piece)` (`IntegrationNodeForm.tsx:308,334`).++---++## Risks / questions++- [V] **`ItemRef.card` unchecked at run time** — `resolveItem` (`runtime/resolve.ts:205-213`) ignores+ `ref.card`; drafts aren't validated, so a test run reads another list's item.+- [V] **`defaultValue` is now read at run time** — `effectiveLiteral` (`links.ts:28`) inside+ `resolveStepInputs`, against `catalog.ts:63-64` / `AGENTS.md:258-259` ("nothing reads it at run time").+- [V] **Advanced field with a default shows blank** — `LiteralControl.tsx:90-111` ignores `defaultValue`+ for choices/string/number; Gmail `body_type` shows "Select…" while the run sends `plain_text`.+- **Legacy Slack scopes (Q1)** — backfill wrote 10 (`…123102:77`), allowlist needs 16 (`allowlist.ts:241-261`):+ every migrated Slack card reads unhealthy at deploy. Product decision.+- **CDN logos for non-piece cards** — `piece-logo.tsx:18` used by jira/linear/xero/quickbooks/stripe-connect;+ `alt={piece}` is the slug; unrelated logo recolors (email, onshape, rillet, sage, paperless) in scope.+- [V] **`readConnection` throws outside any try** (`piece-auth.ts:56`) → step left Running, later+ "This step was interrupted"; return `{ reason: "failed", cause }`.+- [V] **`dropTransport` strips `config` / `request` at every depth** (`integration.ts:84-86`), not just+ the Gaxios top level.+- [V] **Swallowed, unlogged failures** — `integration.ts:154` (`auth.cause` dropped), `:161-164`+ `catch {}`, `settings.service.ts:2691`, `account.notifications.ts:37`, `send-slack.ts:30`.+- [V] **Rename to a taken name** reads as internal error (`settings.server.ts:1724-1726`), and the row keeps+ showing the rejected name (`ConnectionsTab.tsx:209,225-233`; also `useState` seeded from loader data).+- [V] One `connecting` flag spins every Reconnect / Add account (`ConnectionsTab.tsx:84,154`);+ Disconnect has no confirmation.+- [V] `DateTimePickerState.test.tsx` never renders `DateTimePicker` — reverting `granularity: "minute"`+ (`DateTimePicker.tsx:66-69`) keeps it green.+- [V] Test-run drawer mounted conditionally (`WorkflowBuilder.tsx:212,219`, `open` hard-coded) — cannot+ animate closed, against `packages/react/AGENTS.md`.+- `TimeCombobox` emits `onChange` on every blur, even unedited (`:106-112`).+- [V] Enum inference by id prefix could fire on integration inputs (`build.ts:193-201`).+- Scope: quote-PDF fix (`shared.service.ts:250-256`) and a version sort in `$id.tsx:98-104` (already+ sorted by `getWorkflowVersions`, `workflows.service.ts:118`) are unrelated — split them out.++---++## Suggestions++- Cut: `export { Gmail }` / `{ GoogleCalendar }` (`ee/index.ts:84-85`), `path.to.api.integrationConnectionCallback`+ (`path.ts:167`; `integrations.slack.oauth.ts:26` hardcodes it), public `TimeCombobox` export,+ `getPieceActions`' repeated allowlist check (`registry.ts:79-80`), default `integrations = {}` (`build.ts:366,682`).+- Leftovers in the operation rule: `usesField` ≡ `=== "pluck"` (`data-operations.ts:30`); "no field"+ twice (`:200`, `data-node.ts:272`); "not a list" three times (`data-node.ts:203`, `filter.ts:126,242`);+ dead pluck branches (`filter.ts:179-181,187-188`).+- Types: export `DataCardDetail`; `notices.ts:34` `typeOf` → `ValueType`; `FilterForm.tsx:120` cast;+ `data-node.test.ts` `as never` everywhere (type `EVENT` as `RecordType`; its `typeOf` stub returns the list type for every operand).+- No test pins `result` redaction (`integration.test.ts:408-425` re-tests `redactForLog`).+- `connections.ts:416` `new Date().toISOString()` → `datetime.timestamp()`.+- Orphan JSDoc: `connect.ts:7-16`, `allowlist.ts:11-29`, `hoverIntent.ts:5-13`. `log.ts:163-164` comment+ overclaims `redactText`. `noticeCopy.ts:18` extracts as `{0}`. `Button asChild isDisabled` on a Link+ only dims (`IntegrationNodeForm.tsx:68`). Split `build.test.ts` (now 1026 lines).++---++## Docs freshness++- `docs/.../workflow-apps.mdx:46` says emails are sent as HTML — default `body_type` is `plain_text`.+- `reference/workflows.mdx:49`, `workflow-apps.mdx:34` still say "Filter"; quoted "isn't connected" copy+ differs from the UI; "Advanced … pre-filled" false for non-boolean inputs.+- `apps/erp/app/modules/workflows/AGENTS.md:3,34,105,108` — six node kinds (now seven), "Four controls+ in ActionForm" (five, in `StepInput.tsx`).+- `packages/ee/src/workflows/AGENTS.md:68,98-135,114,116,258-262,373` — layout missing data-node /+ data-operations / links / notices / runtime integration; `WorkflowServices` without `runIntegration`;+ 5-arg `buildCatalog`; no `WORKFLOW_INTEGRATION_CATALOG`; four `RuntimeValue` kinds (five); `record`+ ValueType absent; `rendersAsText` line.+- `.claude/rules/workflow-event-catalog.md:39,76,196,204,225` — 2 integration steps, 5-arg `buildCatalog`,+ integrations under Actions, "four maps", staleness check scope.+- `.claude/rules/workflow-actions.md:140` — `WorkflowServices` missing `runIntegration`.+- `.claude/rules/workflow-integrations.md` — `:512` says the default is omitted (code SENDS it,+ `visibility.ts:70-78`); `:127` `DATE_TIME` lacks `precision: "datetime"`; Connect goes to+ `integrationAccounts`, not `integration`; the options key is set in `StepInput.tsx:106`; `paths:` misses+ gmail/slack, `ConnectionsTab.tsx`, `settings.server.ts`, the `20261021123*` migrations.+- `.claude/rules/workflow-engine.md:159`, `workflow-run-history.md` — `detail` is not condition-only+ (`NodeDetail` `kind:"data"`); "never named two ways" now false (N4).+- `packages/ee/AGENTS.md` — `getSlackWorkspace` prefers the oldest Active connection with a webhook channel.+- Stale `@carbon/workflows` in `integrations/options.ts:14`, `registry.ts:12`, `dataOperationLabels.ts:13`.+- Migration `20261021123101:39` comment quotes the old manifest rule.++---++## TLDR++**Blockers**+- N1 viewer redirected out of the builder by the options route+- N2 invalid-state connect closes the popup silently (`"connection"` has no listener)+- N3 vendor request body stored as the step/run error+- N4 untranslated data-step copy, raw `lastError`, "operation" i18n collision, step named two ways+- N5 `createConnection` chains writes (live secret on a Revoked row)+- N6 disconnected-only-account node hides its whole form+- N7 source comment in `connections.test.ts:242`++**Code-judo**+- drop the flat filter fields+- one `declaredInputs`+- one `runStep`+- split `connections.ts` client/server+- `runPropertyOptions` in jobs + delete the dead loop+- one options type + one error notice+- one `revokeConnections`+- one health-cache path+- fold the migrations+- `build.ts` fakes+- small aliases/relays++**Risks**+- `ItemRef.card` at run time+- run-time `defaultValue`+- blank default in Advanced+- legacy Slack scopes+- CDN logos+- `readConnection` throw+- deep `dropTransport`+- unlogged swallows+- rename conflict+- shared `connecting`+- weak DateTimePicker test+- drawer mount+- TimeCombobox blur+- enum inference+- unrelated changes++**Suggestions**+- dead exports+- rule leftovers+- types/casts+- redaction test+- JS Date+- orphan JSDoc+- split `build.test.ts`++**Docs**+- workflow-apps / reference mdx+- erp + ee workflows AGENTS.md+- event-catalog / actions / integrations / engine / run-history rules+- ee AGENTS.md+- `@carbon/workflows` names+- migration comment++## Verdict++**Block.** The fix pass closed review 1's blockers B1, B2, B3, B5, B7, B8, B9 and B10. But this pass+found new user-facing bugs: N1, N2 and N6. Request bodies still leak into run history (N3). A chained+write still breaks the atomicity rule (N5). Code-judo 1, 2 and 3 are each small, and each deletes a+parallel copy of logic.diff --git a/.ai/runs/2026-10-21-thermo-nuclear-review.md b/.ai/runs/2026-10-21-thermo-nuclear-review.mdnew file mode 100644index 0000000000..a5f48a357b--- /dev/null+++ b/.ai/runs/2026-10-21-thermo-nuclear-review.md@@ -0,0 +1,358 @@+# Thermo-nuclear review — feat/active-pieces-integration++Target: the full branch diff `d29d84c07a…HEAD`. It has 270 files and about 13,000 lines of code+outside docs and `.po` files. The uncommitted working tree holds only `packages/database/src/types.ts`.+That change is a regen reorder of three FK relations. Do not commit it.++Four read-only reviewers covered four areas:++1. ee connections and migrations+2. jobs integrations and the catalog+3. ee workflow definition and runtime+4. erp UI and services, and the react Date components++Each reviewer re-opened every finding at its `file:line`. The lead re-checked the items marked **[V]**.+Nobody ran typecheck, tests or a build, because of the RAM limit. This review does not claim a green build.++Nobody has fixed any finding below.++---++## Blockers++### B1 [V] Pluck on a field the type does not declare still "succeeds" with `list<null>`+`packages/ee/src/workflows/runtime/filter.ts:160-202`. When `walkPath` misses, `declared` is+`undefined` and the card does not refuse. Every `pick` returns null. The node returns Succeeded+and types the list from a sample as `list<null>`. The build side (`definition/data-operations.ts:170-171`)+declares no output for the same card. So the builder builds downstream steps against nothing.+The validator never checks drafts or test runs, so this reaches real runs.+`data-consistency.test.ts` misses it: only its primitive lists get the bogus field (`:121-122`).++Fix:+1. Add `if (declared === undefined) return { ok: false, reason: … }`.+2. Add `list<record>` and `list<entity>` with `"nope"` to the test matrix.+3. Delete `sample`, the nested ternary (`:194-202`) and `typeOfValue` (`:297-314`). They are then dead code.++### B2 [V] The Settings card says "Healthy" for up to 5 h after a token dies at run time+`apps/erp/app/modules/settings/settings.service.ts:2697-2705` caches a healthy result for+`INTEGRATION_CACHE_TTL * 5`. The TTL is 3600 (`:2082`), so the cache lasts 5 hours.+The comment says that every path that changes health clears the key.+`markExpired` (`packages/ee/src/integrations/connections.ts:697-711`) does not clear it.+The comment at `integrations.connections.tsx:70` also says "five minutes", which is wrong.++Fix: clear the key from the caller of `markExpired`, or cut the healthy TTL to minutes. Correct both comments.++### B3 [V] A failed connections lookup tells the author the app "isn't connected" and hides the step+`apps/erp/app/modules/workflows/ui/Builder/config/forms/IntegrationNodeForm.tsx:325-344` checks+only `connectionsError !== "reconnect"`. A lookup can fail with `errorCode: "failed"`+(`api+/workflows.options.ts:93`) or a 500. Then the form shows the Connect banner.+It also hides the step picker and every input of an existing node, and it offers no retry.++Fix: branch on `"failed"`. Show the same error and "Try again" that `OptionsField.tsx:97-135` shows,+and use the `retry` that the hook already returns.++### B4 [V] A vendor call that succeeded can be reported as failed (→ duplicate sends on re-run)+`packages/jobs/src/workflows/actions/integration.ts:115-153` has three problems in one block:++1. `JSON.stringify(result)` sits in the same `try` as `action.run`. A circular or BigInt result+ lands in the catch as "`<label>` rejected this: …". By then the email or message already went out.+2. For Gmail, `result` stores the raw `GaxiosResponse`. That object includes `config`, with the+ base64 request body. It holds no token today only because gaxios serializes `Headers` to `{}`.+ `redactForLog` matches keys, so it cannot see inside the string.+3. The code matches `SCOPE_ERROR` against the `HttpError` message, and that message embeds the+ request body. This is prior MINOR 19, still open.++Fix:+1. Treat only a throw from `action.run` as a vendor failure.+2. Serialize with a replacer that drops `config` and `request`. Run `redactForLog` on the object first.+3. Match a scope error on the status or error code, not on the message text.++### B5 [V] `connect.ts` re-implements `oauth-popup.ts` — and reintroduces the bug that file exists to prevent+`packages/ee/src/integrations/connect.ts:16-49` awaits `fetch` and then calls `window.open`.+The canonical `beginOAuthPopup` (`packages/ee/src/oauth-popup.ts:5-30`) opens the popup inside the click.+It does this because Chrome blocks a popup opened after an await.+When Chrome blocks it here, the fallback navigates the whole page away. `connect.ts` also copies the popup geometry.++Fix: build `startIntegrationConnect` on `beginOAuthPopup()`. Open it in the click, then call+`navigate(url)` or `close()`. Delete `popupFeatures` and `openConsentPopup`.++### B6 [V] Untranslated user-facing copy (Lingui-from-day-one)+- `packages/react/src/Date/TimeCombobox.tsx:195` "No matching time"; `DateTimePicker.tsx:156` `aria-label="Time"`.+- `ConnectionsTab.tsx:219` renders the raw status enum.+- The `t` fallback at `ConnectionsTab.tsx:105-108` never runs, because `connect.ts:46` always+ throws English. The tab also toasts the connect route's own English strings+ (`integrations.connections.$piece.connect.ts:37,46,60`). This is prior MINOR 23.+- `useIntegrationInstall.ts:78` toast moved over still untranslated.+- `ui/Runs/DataDetail.tsx` renders engine English (`filter.ts:125,206,226` "Counted N.").+- `nodes/meta.ts:179,185` uses `DATA_OPERATIONS[op].label` (English) while the form uses the+ translated `useDataOperationLabel` — card and form can disagree.+Fix: throw/return codes and word them in the UI; `t`/`Trans` for the rest.++### B7 Non-atomic writes and a per-row loop the root AGENTS.md forbids+- `disconnectConnection` (`packages/ee/src/integrations/connections.ts:375-400`) makes two writes:+ a vault RPC, then a row UPDATE. Its `secretRef: null` is also redundant, because+ `delete_connection_secret` already sets it to null (migration `…120101:98`).+- `revokeConnectionsForPiece` (`:412-430`) runs that pair once per row, in a loop.++Fix: add one `revoke_connection` RPC. It deletes the secrets and sets `Revoked` in one statement.++### B8 New route action written the legacy way, with no service function+`apps/erp/app/routes/x+/settings+/integrations.connections.tsx:21-92` calls `assertIsPost`, then+`requirePermissions`, then the ee building blocks directly. `conventions-forms.md` says not to write+new actions this way. The action also takes `pieceName` for cache invalidation from the client+(`:65-76`, `ConnectionsTab.tsx:274`).++Fix:+1. Add `renameIntegrationConnection` and `disconnectIntegrationConnection` as `defineServiceFn` in+ `settings.server.ts`, with `permission: { update: "settings" }`.+2. Let the service functions clear the cache and read `pieceName` from the row.++### B9 [V] Forked `toPlainValue`+`packages/jobs/src/workflows/integrations/properties.ts:140-160` (`toPlain`) is+`actions/values.ts:9-27` again; `workflow-actions.md` says "Don't fork it." Import it.++### B10 Test theater in `connections.test.ts`+`packages/ee/src/integrations/connections.test.ts:47-200` is a hand-written in-memory Supabase.+It has its own `or`, `lt` and vault logic. The "two callers race" test (`:319`) proves the fake,+not READ COMMITTED. `.claude/rules/testing-no-mock-theater.md` names this pattern.++Fix:+1. Keep the pure tests.+2. Export `sameAccount`, `accountIdentity` and `expiringSoon`, and test them directly.+3. Stub only `fetch` for the token-endpoint branches.++---++## Code-judo / simplification++1. **One per-operation rule, not four.** "pluck needs record/entity", "field must resolve",+ "a list field needs flatten", "join needs text" are re-derived in `operationsFor`+ (`data-operations.ts:106-117`), `cardResultType` (`:147-188`), `checkTypes`+ (`data-node.ts:152-198`) and `runCard` (`filter.ts:143-216`). Make `cardResultType` return+ `{ type } | { refusal }`; validator emits the refusal, `operationsFor` filters on it, the runtime+ calls it for refusal + declared type. ~60 lines of parallel guards and their "a draft is never+ validated" comments go. The three flags (`loops`, `usesClauses` identical everywhere; `usesField`+ ≡ `=== "pluck"`) collapse to one `accepts(of)` per entry.+2. **Drop the flat `operation` / `field` / `flatten` filter-node fields.** They were added on this+ branch alongside `operations` (base `filterNode` had only `source/combinator/clauses`), so they+ are back-compat for a shape that never shipped. Synthesize card-0 in `cardsOf`; `operationOf`'s+ flat path, the probe at `variables.ts:299-304` and test-helper noise disappear. (Caveat: unless a+ preview env holds drafts with them.)+3. **Action and integration executors/kinds are near copies.** Input resolution+ `runtime/integration.ts:37-60` ≈ `runtime/action.ts:25-50` → one `resolveStepInputs(inputs,+ declared, ctx)` (make `linkState` take `(inputs, declared, name)`). Node kinds+ `nodes.ts:716-772` ≈ `:662-714` → one `stepNodeKind` factory; give `BatchableStep` `outputs`.+4. **One connection-auth resolver.** `integration.ts:66-113` (read, piece check, refresh, three+ error classes) is re-implemented in `workflows.service.ts:861-927` (`propertyProvider`), which+ has already drifted — it never calls `missingScopes`. Extract `resolvePieceAuth(companyId,+ piece, connectionId)` returning a tagged outcome. (Also: `readConnection` / `requiredScopesFor`+ at `integration.ts:66,77` throw outside any `try`.)+5. **Single-pass props.** `integration.ts:119-127` walks `action.props` three times+ (`omittedProps`, filter, `pinnedValues`) then `toPropsValue` repeats "fall back to pin" ×3+ (`properties.ts:181,187,194`) and re-checks MARKDOWN (`visibility.ts:50`). One+ `toPropsValue(piece, action, props, inputs)` loop deletes `pinnedValues`, `omittedProps` and ~60 lines.+6. **One walk over the output schema.** `toOutputTypes` + `toOutputPaths` (`outputs.ts`) and+ `project.ts:36-37` recompute both per run → `describeOutputs(schema)`; fold `project.ts` into+ `outputs.ts`. `project.ts:65`'s `.slice(0, MAX_LIST_ITEMS)` is redundant with `listValue`.+7. **Pieces as data.** `gmail/config.tsx`, `google-calendar/config.tsx`, `slack/config.tsx` and+ `hooks.server.ts` repeat id/logo/`settings: []`/`z.object({})`/`onClientInstall` and three+ identical `onUninstall` lambdas. A `PIECES` const + `definePieceIntegration(piece, {...})` + one+ `map` for hooks.+8. **Second OAuth-state mechanism.** HMAC signer in `settings.service.ts:8715-8785` beside the+ cookie-bound single-use `issueOAuthState` / `consumeOAuthState`+ (`packages/auth/src/lib/oauth-state.server.ts:179,192`, which already has an `extras` hook).+ Extend `OAuthStateExtras` and drop the signer — or document why two exist.+9. **`MappedProperty` re-spread.** `integrations/catalog.ts:66-128` copies every field with+ conditional spreads and casts, then `ee/catalog/build.ts:168-194` strips undefined again. Have+ `toValueType` return `ActionInputLike`; rename allowlist `links.when.prop` → `input` so `links`+ passes through.+10. **FilterForm decomposition.** `FilterForm.tsx` 233 → 533 lines, mostly one ~280-line+ `cards.map`. Extract `<SourceListPicker>` and `<OperationCardEditor>` (with `<FieldPicker>` /+ `<ClauseList>`).+11. **`renderStepInput` is a 15-argument function.** `StepInput.tsx:54`; both callers pass the+ same hook value and resolve labels identically (`ActionForm.tsx:386-397`, `IntegrationNodeForm`+ ×2). Make it `<StepInput …/>` that calls `useChoiceOptions()` itself. `hint` is dropped for+ Pairs/MultiChoice/Options. `IntegrationNodeForm`'s three banners (`:267-344`) → one+ `<ConnectBanner>`; add `path.to.integrationAccounts(piece)` (string repeated 3× + `workflows.service.ts:805`).+12. **Slack reader outside the "ONLY place".** `slack/lib/service.ts:282,289` re-inlines+ `SELECT_COLUMNS` and an `as unknown as` cast; `:246` hand-filters `Active` instead of+ `usableConnections`; `readConnectionAccessToken` (`connections.ts:636-655`) repeats+ `resolveConnectionAuth`'s read + guard (prior MINOR 12/15/16, still open).++---++## Risks / questions++- **Refresh race** `connections.ts:549,564,584` — tokens read before the claim, exchanged after;+ a vendor that rotates refresh tokens gets `invalid_grant` → `markExpired` condemns a healthy+ connection. Latent today (Google doesn't rotate, Slack doesn't expire). Re-read after winning the claim.+- **Slack `team_id` in two companies** — nothing at connect time refuses it; afterwards every+ inbound interaction for the first company throws `AmbiguousSlackWorkspaceError`+ (`slack/lib/service.ts:274-295`).+- **CDN logos for non-piece integrations** — jira/linear/xero/quickbooks/stripe-connect cards+ now load from `cdn.activepieces.com` (`piece-logo.tsx:18`): third-party dependency, viewer IP ++ Referer leak (incl. `CONTROLLED_ENVIRONMENT`), and out of scope. `alt={piece}` renders the slug.+- **Vendor JSON goes through the column coercer** `values.ts:109-125` via `project.ts:66,70`:+ `Boolean("false") === true`, `String(obj)` → `"[object Object]"`, `new Date(raw)` (banned by+ `date-handling.md`). The rule promises "null for anything mistyped". Needs a strict `fromJson`.+- **Flattened pluck drops items past 100 and misreports** `filter.ts:203-206` — `listValue`'s+ `dropped` is discarded ("Took 2000 values" holding 100).+- **`ItemRef.card` never checked** against the card it sits in (`filter.ts:78-81`,+ `variables.ts:138`); card ids not unique/non-empty (`schema.ts:93-104`) while `dataLoopList` uses+ `findIndex`. Derive the card from position, or validate + `.refine` uniqueness.+- **[V] `operationOf`'s "falls back" can never fire** — `dataOperationSchema` is a strict enum+ (`schema.ts:95,117`), so removing an operation later makes saved workflows unparseable. Pick one+ policy (`.catch("filter")` or delete the claim). `in DATA_OPERATIONS` also matches prototype keys.+- **Run-level error not redacted/capped** `engine/execute.ts:640,656-660` (`firstError` raw;+ step row gets `redactText`). A batch with `failedItems > 0` carries `error: null` (`:262`).+- `accountLabelFor` (`integrations.connections.callback.ts:219`) has no timeout; a stalled identity endpoint hangs the callback.+- `markIntegrationInstalled` read-then-insert race (`settings.service.ts:2523-2555`, prior MINOR 11).+- `workflows.service.ts:947` `String(option.value)` on object-valued dropdowns, hidden by the cast at `:937-942`.+- `workflows.options.ts:50` indexes `OPTIONS_PROVIDERS[providerId]` without `Object.hasOwn`+ (`?provider=constructor`); not exploitable today.+- `store.ts:272` `setNotices` lacks the empty→empty identity guard its siblings have; every debounce re-renders subscribers.+- Nested remapped output paths ignored (`outputs.ts:117-131`) though the comment says types and paths "can never disagree".+- `vendorText` doesn't escape `\` but the generator emits ``msg`${label}` `` raw; step labels skip+ `assertLabelIsSafe` (prior MINOR 18).+- Prior Q1 still open: backfilled 10 Slack scopes vs the required set → every legacy Slack card reads "Reconnect needed".+- Scope: `shared.service.ts:250-255` (`TEMPLATE_ASSET_PREFIX`, commit f48533564f) is a quote-PDF+ fix unrelated to integrations — split it out.++---++## Suggested improvements++- Dead exports: `packages/ee/src/index.ts` connections block (no importer; puts+ `exchangeAuthorizationCode` / `exchangeRefreshToken` in a client-reachable barrel); 20 of 32 names+ in `packages/jobs/src/workflows/integrations/index.ts` unused.+- Duplicated dot-path walkers `oauth.ts:94-108`, `outputs.ts:137-144` → `getPath`+ (`packages/ee/src/integrations/secrets.ts:132-140`). Duplicated option parsing+ `visibility.ts:32-41` / `properties.ts:55-61`.+- `registry.ts:93-108` `getPieceAction` re-implements `getPieceActions` and repeats `loadPiece`'s allowlist check.+- `check-workflow-catalog.ts`: diff is mostly re-indent (`-w` = +47/−4); keep a sync `check()`,+ extract `compareMap` for the three copy-pasted blocks (`:222-268`), drop the+ `WORKFLOW_ACTIONS` alias. Label text is never compared, only keys.+- `retention.ts:40-54` duplicates the generic key-capping branch (`:77-85`).+- Misplaced/orphan JSDoc: `data-operations.ts:92-102`, `connections.ts:106-109`, `:722-727` (also+ contradicts `callback.ts:121-122`), `hooks.server.ts:54-64`, `visibility.ts:28`,+ `workflows.service.ts:740,791`, `useIntegrationInstall.ts:13-21`; stale `connections.ts:14`.+- `workflows.service.ts:852` hardcodes `connectionId` — use `INTEGRATION_CONNECTION_INPUT`.+- `useWorkflowOptions.ts:8` imports a type from server-only `workflows.service` — move to models/types.+- `TimeCombobox.tsx:95,102-104` effect mirrors `committed` into `draft` — derive `isEditing ? draft : committed`.+- `OptionsProviderContext.client` and `search` are unused (`workflows.service.ts:753,759,941`).+- `integrations.$id.tsx:997-1026` awaits two independent reads serially — `Promise.all`.+- `date.ts:237-240` sets `hour` twice; `parseTypedTime` (`:319,337`) dead `isInteger` checks and accepts `3.5` as 3:05.+- `data-node.ts:168` empty-string field gets a double message; `notices.ts:93` redundant `String()`;+ `integration.ts:141` `JSON.stringify(undefined)` → use `?? null`.+- Tests: `data-consistency.test.ts:155` name doesn't match what it exercises; pervasive `as never` /+ `as unknown as` casts (`:39-112`).+- `packages/jobs/manifests/schema.json` reorders two unrelated columns — local churn.+- `OutputHandle.tsx`: IIFE in JSX → `<FieldList>`; timers typed via `as unknown as number`.++Not a finding: one reviewer said two files grew past 1,000 lines. Both were already over 1,000 at the base:+`integrations.$id.tsx` (1679 → 1734) and `IntegrationForm.tsx` (1119 → 1136).+No file crosses 1,000 lines on this branch. The closest are `workflows.service.ts` (713 → 956)+and `ee/workflows/catalog/build.ts` (723 → 923).++---++## Docs freshness++- **[V] Specs.** `.ai/specs/2026-08-31-workflow-integration-outputs.md` still "draft" and+ `2026-08-31-data-node-operation-chain.md` "Approved (pending user sign-off)" though both are+ implemented; the four "implemented" specs (`2026-09-01-*` ×3 relevant, `2026-09-04-integration-datetime-inputs.md`)+ are not moved to `.ai/specs/implemented/` per `keep-sources-in-sync.md`.+- **[V] `.claude/rules/workflow-integrations.md`** points at `.ai/specs/2026-08-27-workflow-integrations.md`+ and `.ai/research/activepieces-integrations.md` — neither exists; its `paths:` includes+ `packages/workflows/src/runtime/integration.ts` (the engine moved to `packages/ee`). It also+ documents `connect.ts` / `openConsentPopup` as the shared entry point (see B5).+- **[V] `linkify`** still described in `packages/ee/src/workflows/AGENTS.md:361-365` and+ `.claude/rules/workflow-engine.md:204-205`; this branch replaced it with `links`.+- **[V] `.claude/rules/workflow-actions.md:30`** "2 integration steps" — the generated catalog has 7.+- `packages/jobs/AGENTS.md` calls `buildPieceActionDeclarations` the "fifth input"; the rule and code say sixth.+- `TestRunPanel.tsx` doc comment and footer ("not saved") contradict `workflow-run-history.md`+ (test runs write `isTest = true` rows) — user-facing copy is wrong.+- `packages/jobs/src/backups/schema.ts:40-42` comment is false since `get_connection_secret` reads by vault name.+- Migration `20261020120101…sql:39` policy comment quotes the old manifest rule.++---++## TLDR++**Blockers**+- B1 pluck on an undeclared field succeeds with `list<null>` (`filter.ts:160`)+- B2 health cache stays Healthy 5 h after `markExpired` (`settings.service.ts:2705`)+- B3 lookup failure shows "isn't connected" and hides the step (`IntegrationNodeForm.tsx:325`)+- B4 serialization in the vendor `try` → sent-but-"failed"; raw Gaxios response stored (`integration.ts:115`)+- B5 `connect.ts` duplicates `oauth-popup.ts` and opens after await+- B6 untranslated copy (TimeCombobox, DateTimePicker, ConnectionsTab status, connect errors, DataDetail, meta labels)+- B7 non-atomic disconnect + per-row revoke loop (`connections.ts:375-430`)+- B8 legacy-style connections action, no service function, client-supplied `pieceName`+- B9 forked `toPlainValue` (`properties.ts:140`)+- B10 mock-theater Supabase fake in `connections.test.ts`++**Code-judo**+- one per-operation rule table replaces 4 copies+- drop never-shipped flat filter fields+- shared `resolveStepInputs` + `stepNodeKind` for action/integration+- one `resolvePieceAuth` (erp copy already drifted on scopes)+- single-pass `toPropsValue`+- one `describeOutputs` walk, fold `project.ts`+- `PIECES` const + `definePieceIntegration`+- reuse `issueOAuthState` instead of a second HMAC state+- drop `MappedProperty` re-spread+- decompose `FilterForm`+- `StepInput` as a component + one `ConnectBanner`+- Slack reader back inside `connections.ts`++**Risks**+- refresh race (latent)+- Slack `team_id` across companies+- CDN logos for non-piece cards+- `fromColumn` coercion of vendor JSON+- flatten drops >100 silently+- `ItemRef.card` unchecked / duplicate card ids+- `operationOf` fallback can't fire+- run error not redacted+- no timeout on `accountLabelFor`+- install race+- `String(option.value)`+- `Object.hasOwn` on providers+- `setNotices` identity+- nested output paths+- label escaping+- legacy Slack scopes+- unrelated quote-PDF commit++**Suggestions**+- dead barrel exports+- duplicated path walkers / option parsing+- registry dup+- catalog-check `compareMap`+- retention dup+- misplaced JSDoc+- hardcoded `connectionId`+- server type import+- TimeCombobox derived state+- unused `client` / `search`+- `Promise.all`+- date helper nits+- test casts+- manifest churn++**Docs**+- spec statuses + not moved to `implemented/`+- `workflow-integrations.md` dead links/paths+- `linkify` in AGENTS/rule+- "2 integration steps"+- "fifth input"+- test-run "not saved" copy+- backups comment+- migration comment++## Verdict++**Block.** The branch has three correctness bugs that a user can see (B1–B3).+B4 can report a sent message as a failure. B5 copies a canonical helper and brings back the bug it prevents.+The branch also has untranslated copy and non-atomic writes, which the root AGENTS.md forbids.+Simplifications 1, 3, 4 and 5 are still open. Each one deletes a parallel copy of logic.diff --git a/.ai/specs/implemented/2026-08-31-data-node-operation-chain.md b/.ai/specs/implemented/2026-08-31-data-node-operation-chain.mdnew file mode 100644index 0000000000..0228abc969--- /dev/null+++ b/.ai/specs/implemented/2026-08-31-data-node-operation-chain.md@@ -0,0 +1,289 @@+# Data node operation chain++**Status:** implemented+**Date:** 2026-08-31+**Research:** N/A — internal composition of an existing node. External precedent+(Zapier's Formatter chains, n8n's item pipelines) confirms the pattern of piping+one transform into the next inside a single step, but settles no decision the+codebase does not already settle.++## Problem++The data node (`type: "filter"`) performs exactly ONE operation on its source+list — filter, count, first, last, pluck, or join. Real flows need several in+sequence: "keep the matching events, take each one's organizer, count them"+today requires three chained data nodes on the canvas, each re-picking the+previous node's output as its source. That is three cards of canvas noise for+one logical transformation, and the wiring is the author's job instead of the+node's.++## Goal++One data node holds an ordered **chain of operation cards**. Data flows top to+bottom: the node's source feeds card 1, card N's result feeds card N+1, and the+LAST card's result is the node's single output. Everything happens inside the+node — no new canvas nodes, edges, or handles.++## Non-goals++- Reordering cards (delete-only management; re-adding is the reorder).+- Branching or parallel pipelines inside the node — the chain is strictly linear.+- Exposing intermediate card results as referenceable node outputs. Only the+ final result is an output; intermediates appear only in run history.+- Any change to the other node kinds or to the canvas graph model.++## Design++### 1. Schema — `operations` array, no format bump++`filterNode.data` gains an optional `operations` array. Following the node's own+precedent ("no format bump, no migration" — the stored `type` literal stayed+`"filter"` when the node widened), the existing flat fields remain in the schema+with their zod defaults, and a saved single-operation node parses unchanged.++```ts+const operationCardSchema = z.object({+ /** Stable identity for React keys, issue field paths, and detail rows. */+ id: z.string(),+ operation: dataOperationSchema.default("filter"),+ combinator: combinatorSchema.default("and"),+ clauses: z.array(clauseSchema).default([]),+ field: z.string().optional(),+ flatten: z.boolean().default(false)+});++// on filterNode.data, beside the existing flat fields:+operations: z.array(operationCardSchema).optional()+```++- `source` stays **node-level** (`node.data.source`), not card-level: only the+ first card consumes it, and deleting the first card must not lose it.+- **Normalizer** `cardsOf(node): OperationCard[]` in `data-node.ts` is the one+ read path: `operations` when present and non-empty, else one card synthesized+ from the flat fields (id `"card-0"`). Every definition, runtime, and UI+ consumer goes through it; nothing else reads `node.data.operation` /+ `clauses` / `field` / `flatten` directly.+- The builder writes `operations` on any edit. The flat fields are left as+ parsed (zod defaults) and ignored once `operations` exists.+- Card ids are generated client-side (existing id helper the builder uses for+ clauses/paths); uniqueness is per node.+- A generous cap (`.max(20)`) guards against a runaway array; the UI never+ reaches it in practice.++### 2. Type walk — `chainTypes`++New exported helper in `data-node.ts`:++```ts+/** inputs[i] = the type flowing INTO card i; inputs[cards.length] = the node's+ * output type. undefined = unconfigured/unsupported at that point, which+ * suppresses downstream errors exactly as resultType does today. */+function chainTypes(node: FilterNode, ctx: NodeContext): (ValueType | undefined)[]+```++It folds the existing per-operation typing (today's `resultType`, refactored to+`cardResultType(card, input, catalog)`) over the chain, starting from the source+type. `dataOutputs` returns the final element; the form, the operation gating,+and `checkTypes` all read the same array so they can never disagree.++### 3. Operation gating — `operationsFor`++```ts+/** Which operations can consume this type. Every operation needs a list;+ * pluck additionally needs record/entity items. undefined input = all+ * operations (unconfigured source — the author is still choosing). */+function operationsFor(input: ValueType | undefined): DataOperation[]+```++- Card N's operation dropdown offers `operationsFor(inputs[N])`, plus the card's+ currently stored operation if it is no longer in that list (so a stored-but-+ invalid choice still renders; validation marks it red rather than the Select+ silently blanking).+- **"Add operation" is disabled** when `operationsFor(finalOutput)` is empty+ (after count/join/first/last — nothing consumes a bare number, string, or+ single item) or when the final output is `undefined` (chain not yet+ configured). An unknown output must never read as "anything goes".+- **Switching a card to a terminal operation truncates the tail**+ (`truncateStarvedCards`): the cards below would receive a bare value no+ operation could ever consume, so they are dropped rather than left as+ unfixable red. Only a card whose input is DEFINED and not a list is starved —+ an unknown input keeps its tail (delete-ripple rule unchanged for deletions+ and field edits).+- `join` stays offerable on any list whose items render as text, exactly per+ `rendersAsText` today.++### 4. Validation — per-card, card-scoped item typing++`checkTypes` walks the cards with `chainTypes` and validates each card against+its own input, reusing today's per-operation checks. Issue field paths become+`operations.{id}.{field}` (e.g. `operations.card-2.clauses.0`), the same scoped+convention condition paths already use (`paths.{id}.clauses.0`), so the form+attaches each issue to the right card.++**Item refs:** Runtime needs no change — only one card executes at a time, so+`ctx.item` is always the right item. Design-time, the plan-phase check+confirmed `validate.ts`'s layer 5 DOES type ItemRefs through the node-level+loop list, so a wrapped context inside `checkTypes` would not have been enough.+The mechanism is instead:++- `itemRefSchema` gains `card: z.string().optional()` — the id of the card the+ ref lives in. An old ref without one resolves against the FIRST card, which+ for every pre-chain node is the only card: exact back-compat by default.+- `NodeContext.loopListOf` and the `NodeKind.loopList` hook take an optional+ `card` id; only the data node reads it (`dataLoopList` returns the input of+ that card when its operation loops). `resolveItem` passes `ref.card`+ through, which makes `checkClauses` AND layer 5 card-correct with no+ special-cased context.+- The builder stamps `card` onto every ItemRef it creates inside a card+ (variable menu + token id round-trip), keyed by `FieldContext.itemCard`.++`values()` returns every card's clauses (with `operations.{id}.clauses` field+paths) plus the node source, so reference validation still sees every ref.++Delete ripple (user decision): deleting a card re-runs live validation; later+cards keep their config and any type mismatch shows as the ordinary red issue.+Nothing is auto-cleared.++### 5. Runtime — sequential fold in `filter.ts`++`filterExecutor` loops the cards, feeding each card's result to the next. Each+card runs today's per-operation logic (extracted to run one card against one+input value) and yields a one-line summary — the same wording each operation+produces today ("Kept 3 of 10.", "Took 4 values.").++- A card that **skips** (the draft-only runtime guards: plain-value pluck,+ unflattened list field, non-text join, non-list input) skips the whole node;+ the reason names the card position ("Step 2 (Take one field): …").+- The node's `summary` is the LAST card's summary; per-card summaries go into+ `detail`.+- `NodeDetail` gains a second variant:++```ts+| {+ kind: "data";+ cards: Array<{+ id: string;+ operation: DataOperation;+ summary: string;+ status: "Succeeded" | "Skipped";+ }>;+ }+```++Written on Succeeded and Skipped (cards up to and including the skipping one),+never on Failed — per the existing `detail` contract. `compactForLog` already+truncates strings structurally; no retention change needed.++### 6. Builder UI — cards in `FilterForm`++- Each card renders as a rounded bordered box: operation Select (gated per §3),+ then that operation's fields exactly as today (clauses + combinator for+ filter; field picker + flatten for pluck; nothing for count/first/last/join).+- The **first card** additionally carries the node's source picker, above its+ operation.+- Between consecutive cards, a small downward arrow (chevron/arrow glyph in a+ centered column) shows the flow. Below the last card, the **"Add operation"**+ button (disabled per §3, with a tooltip saying why). Adding appends a card+ defaulted to the first operation `operationsFor` offers.+- Each card has a **remove** button (trash icon, top-right), hidden when only+ one card remains — the chain never goes empty.+- Per-card field choices and the "current item" entry in the variable picker+ derive from `inputs[N]` (via `chainTypes` re-exported through+ `@carbon/workflows`). `FieldContext` gains an optional `itemType` override+ that `ClauseRow`'s value resolution consults before falling back to the+ node-level loop list — the form sets it per card.+- Changing a card's operation clears only that card's now-meaningless fields+ (clauses / field / flatten), exactly as `handleOperationChange` does today.+ Changing the node source still clears card 1's dependent state; later cards+ follow the delete-ripple rule (keep + validate red).+- All new copy (Add operation, remove tooltip, disabled-reason tooltip) is+ Lingui-translatable from day one.++### 7. Canvas card summary (`meta.ts`)++Arrow-joined operation labels: `"Keep matching items → Take one field from+every item → Count items"`, ellipsis-truncated by the existing card summary+styles. Single-card nodes keep today's behavior (clause count for filter, the+op label otherwise). Uses `DATA_OPERATIONS[op].label` like the rest of+`meta.ts` (that file's strings are uniformly untranslated today — pre-existing+debt, not widened by adding labels already in the table).++### 8. Run history — `DataDetail`++A sibling of `ConditionDetail` in `ui/Runs/`: renders the per-card breakdown as+a numbered list — operation label, summary, and a subtle Skipped marker.+Surfaced everywhere `detail` already renders (run drawer + test-run panel).++## Design decisions++| Decision | Choice | Why |+|---|---|---|+| Storage shape | Optional `operations` array beside the flat fields; `cardsOf` normalizer | Node's own no-migration precedent; length-1 chains parse from old data unchanged |+| Source ownership | Node-level, consumed by card 1 | Deleting card 1 must not lose the source; only one source exists |+| Op gating on add | Dropdown offers only `operationsFor(input)`; Add disabled when nothing consumes the output | User decision; keeps invalid chains unbuildable rather than merely flagged |+| Stored-invalid op | Still listed in its card's Select, flagged red | A Select that blanks a stored value silently destroys state |+| Card management | Add + delete only, min 1 card, cap 20 | User decision (no reorder); a chain never goes empty |+| Delete ripple | Keep later cards, validate red | User decision; never destroys work, matches existing validation UX |+| Item typing | Runtime untouched; `ItemRef.card` (optional) + card-aware `loopListOf` | Layer 5 types ItemRefs too, so scoping must live on the ref; absent `card` = first card = exact back-compat |+| Run detail | New `NodeDetail` kind `"data"` with per-card rows | User decision; mirrors the condition detail contract exactly |+| Node output | Last card's result only, under `DEFAULT_OUTPUT` | User requirement; intermediates are diagnostics, not data |+| Canvas summary | Arrow-joined labels | User decision |+| Format version | Unchanged (4) | zod defaults + optional array make old definitions parse as length-1 chains |++## Acceptance criteria++1. A saved pre-chain data node (flat fields, no `operations`) loads, validates,+ runs, and displays exactly as before — as a chain of one card.+2. In the builder: source list of calendar events → card 1 `filter` (keep+ status = confirmed) → Add operation → card 2 `pluck` (organizer.email,+ offered because items are records) → Add operation → card 3 `count`. After+ card 3, "Add operation" is disabled with a reason tooltip.+3. Card 2's operation dropdown offers no `pluck` when card 1's output is+ `list<string>`; card 2's clause picker's "current item" is typed by card 1's+ output element, not the node source's.+4. Running the node from criterion 2 over 10 events (3 confirmed) outputs the+ number 3; the run drawer's step shows three rows: "Kept 3 of 10." →+ "Took 3 values." → the count summary; the node's own summary is the last+ card's.+5. Deleting card 2 leaves card 3 in place with a red TYPE_MISMATCH on the right+ card (count over `list<record>` is fine, so use a chain where the ripple+ genuinely breaks — e.g. delete a pluck feeding a join that needed text+ items); nothing is auto-cleared.+6. A mid-chain skip (unvalidated draft: pluck with no field) skips the node+ with a reason naming the card position; detail shows cards up to the skip.+7. The canvas card reads "Keep matching items → Take one field from every item+ → Count items" for the criterion-2 node.+8. `pnpm exec turbo run typecheck --filter=@carbon/workflows --filter=@carbon/jobs`+ and both packages' vitest suites pass; ERP typechecks; new behavior is+ covered by tests at the schema, type-walk, validation, and runtime layers.++## Open questions (resolved)++- [x] What happens after an operation whose output is not a list? —+ **Answer:** only type-compatible operations are offered; "Add operation" is+ disabled when nothing can consume the output.+- [x] Card management beyond adding? — **Answer:** delete only, no reorder.+- [x] Run history: per-card or final-only? — **Answer:** per-card breakdown in+ the step detail.+- [x] Collapsed canvas card summary for a chain? — **Answer:** arrow-joined+ operation labels.+- [x] Deleting a mid-chain card that invalidates later cards? — **Answer:**+ keep the later cards; live validation flags them red; nothing auto-cleared.++## Changelog++- 2026-08-31 — Spec written after resolving all five open questions with the+ user.+- 2026-08-31 — Item-typing mechanism amended during planning: `validate.ts`+ layer 5 resolves ItemRefs through the node loop list, so the wrapped-context+ idea was insufficient; replaced with an optional `card` field on `ItemRef`+ plus a card-aware `loopListOf`. No user-facing change.+- 2026-08-31 — Post-build user feedback: switching a middle card to a terminal+ operation now DROPS the starved tail (`truncateStarvedCards`) instead of+ leaving it red; "Add operation" also disables on an unknown output (an+ implementation gap — the spec already required it).+- 2026-08-31 — Second round: the terminal fact moved into the operation table+ (`keepsList`) so truncation and validation are STRUCTURAL — they hold while+ the source or a pluck field is still unconfigured, where type-based checks+ saw only "unknown" and did nothing. Every `operations` write in the form+ truncates, and `checkTypes` flags any card following a terminal one.diff --git a/.ai/specs/implemented/2026-08-31-workflow-integration-outputs.md b/.ai/specs/implemented/2026-08-31-workflow-integration-outputs.mdnew file mode 100644index 0000000000..7f55ffeab4--- /dev/null+++ b/.ai/specs/implemented/2026-08-31-workflow-integration-outputs.md@@ -0,0 +1,493 @@+# Workflow integration outputs, the data node, and form control++> Status: implemented+> Author: Aashu+> Date: 2026-08-31++## TLDR++An integration step can call a vendor but nobody can use the answer: its output is+`{ result: t.string }`, one opaque JSON string. This spec adds a **`record` value type**+(Carbon's missing object type), makes the catalog generator derive real output types from a+piece's own `outputSchema`, widens the **filter node** into a data node that can count /+pick / project over those values, and gives the integration form **three tiers of field+control** so a person sees a form worth filling in. Research:+`.ai/research/activepieces-decisions.md` (decisions) and+`.ai/research/activepieces-integration-findings.md` (evidence, incl. a four-platform survey).++## Problem Statement++v1 shipped integrations as their own node kind with a documented non-goal — mapping a piece's+output schema (`.claude/rules/workflow-integrations.md`). Three consequences, all now blocking:++1. **The answer is unusable.** "Get all Events" returns+ `{"body":{"items":[…]}}` as a single string. `walkPath` descends only through `entity`+ types, so there is no way to reach `items[0].summary`. `availableVariables` offers exactly+ one variable, of type text. It fails *silently*: the author sees a `result` variable and+ only discovers at run time that it is a blob.+2. **Nothing can operate on it.** Even given a list, there is no way to count it, take the+ first, or project a field. `compare` supports only `contains` on lists and `eq`/`neq` on+ entities, so even "did anything come back?" is inexpressible.+3. **The form shows vendor API trivia.** `buildPieceActionDeclarations` emits every+ `action.props` entry. For `google_calendar_get_events` that includes `singleEvents`+ ("Expand Recurring Event?", required, default `false`) — which is not merely clutter: left+ at its default, a workflow filtering "events tomorrow" silently misses every recurring+ meeting, because unexpanded recurring events carry the *series* start date.++Two traced bugs compound it (see Design §5).++## Goals++1. An author can see, at build time, what an integration step returns — real named fields in+ the variable picker, without running the step, without touching the customer's account,+ and without us hand-writing a shape per action.+2. An author can operate on returned data — count, filter, first/last, project a field,+ join — using one node rather than a new node per operation.+3. An author sees a form worth filling in: vendor trivia hidden by default, business+ decisions surfaced, nothing permanently out of reach.+4. **No per-action maintenance burden.** Adding a piece stays "a few lines and a package" —+ the entire reason to build on Activepieces. No decision here may erode it.+5. Nothing already saved breaks. Every change is additive.++## Non-Goals++- **Nested (2D+) arrays kept grouped.** Needs `list<list<T>>`; `flatten` on `pluck` covers the+ real cases. No platform surveyed solves this either.+- **A publish-time guarantee that a vendor's response matches its declared schema.** Nobody in+ the market does this. Run-time resolution is tolerant; see Design §1.4.+- **Pieces with no `outputSchema`** (HubSpot, Salesforce, Shopify, Xero, Jira, Excel — all at+ 0%). Refused at build time, not designed around. Revisit if a customer needs one.+- **`record` as a catalog input type, a stored literal, or inside templates/conditions.**+ Scoped to outputs and the data node only.+- Triggers and non-OAuth2 auth — unchanged from v1's non-goals.++## Proposed Solution++### Design Decisions++| Decision | Choice | Rationale |+|---|---|---|+| Object representation | New `record` `ValueType` kind | An `entity` means table + id + permission + loader + `lookup` support. Vendor data has none of those; reusing it would force a lie or a special case at every one of those points. |+| Record shape | **Structural** — fields inline | No registry, no names to resolve, nesting is just a field whose type is a record, and a saved workflow can never dangle against a definition that vanished. Cost: deep equality, bigger types. |+| Record scope | Outputs + data node only | Keeps every existing form, template, condition and literal path untouched. An author reaches down to a primitive before feeding any existing node. |+| Output source | The piece's own `outputSchema` | Zero per-action authoring (goal 4). Coverage is **binary per piece**, so it is knowable with one check at allowlist time. |+| Action with no `outputSchema` | **Refuse — fail the generator** | Same posture as the existing `UnmappablePropertyError`: a half-described action must never reach a customer's canvas. Caught when adding a piece, never by a customer. |+| Schema trust | Authoring-time only; tolerant at run time | `outputSchema` is presentational by upstream's own docs, `run()` returns `Promise<unknown \| void>`, and nothing validates it anywhere. A declared path that is absent or mistyped yields `null`. |+| Data node | **Widen `filter` in place** + `operation` field | The filter node already owns `loopList` and `ItemRef`. A second looping node would mean two loop primitives kept in sync. Existing nodes stay valid with `operation` defaulting to `"filter"` — no migration, `formatVersion` stays 4. |+| Nested arrays | `flatten` flag on `pluck` | A 2D array cannot exist as a value (`list.of` admits only scalars/records), so flatten cannot be a standalone operation taking one — it collapses at the moment of creation. |+| Data node permission | `() => undefined` (unchanged) | It reads values already in the run, fetched by an upstream node that did its own check. Records carry no `permission`, so `lookup` can never target them. |+| Field visibility | Three tiers | Generic rules cost nothing; a reviewed hide list handles the few wrong-for-us defaults; Advanced means a hidden field is **demoted, never lost**. |+| Pinned prop values | Applied at run time, not stored on the node | Changing our mind fixes every existing workflow instead of leaving stale literals behind. |++---++### 1. The `record` value type++**1.1 The type.** `packages/workflows/src/definition/types.ts`:++```ts+// A bag of named fields. No table, no id, no row to load — unlike `entity`.+// Structural: the type carries its own fields, so nothing has to be registered.+const recordTypeSchema = z.object({+ kind: z.literal("record"),+ fields: z.record(z.string(), valueTypeSchema) // lazy: recursive+});+```++`valueTypeSchema` gains `record`. `scalarTypeSchema` — what a `list` may contain — widens to+admit `record`, so `list<record>` is legal. **`list<list<T>>` stays unrepresentable**, which is+the constraint that makes `flatten` a flag rather than an operation.++`t.record(fields)` joins the `t` constructors.++**Widening `ScalarType` has three known call sites that break silently and must be fixed+together** (each currently assumes `list.of` has a `.of` string):++- `types.ts:43` `typesEqual` — `a.of.kind === b.of.kind && a.of.of === b.of.of`. On a record+ `.of.of` is `undefined`, so **two different record lists would compare equal**. Must delegate+ to a recursive type comparison instead.+- `types.ts:91` `describeType` — `` `a list of ${type.of.of}` `` would render "a list of+ undefined" in a customer-facing issue message. Needs a record case ("a list of objects").+- `types.ts:181` `scalarValueMatches` — reached only for literals; records are never literals+ (§1.3), so it must **return `false`** for a record rather than fall through.++Three further sites were checked and are **already safe**: `catalog/build.ts:432` and+`definition/catalog.ts:83` guard on `of.kind === "entity"` / `"primitive"` first, and+`runtime/compare.ts` `equals` returns `false` for anything that is not a primitive or entity —+so a record is not comparable, which is exactly §1.2's intent, with no edit needed.++**1.2 Type functions.** All in `types.ts`:+- `typesEqual` — records compare **structurally**: same field names, each field type equal.+- `canAssign` — unchanged semantics; structural equality does the work.+- `describeType` — `"an object"`, or `"a list of objects"`.+- `rendersAsText` — **`false`** for `record` and `list<record>`. An object has no reading in a+ sentence, so it can never land in a template. This is the existing guard that keeps+ `renderPart` honest, extended one kind further.+- `operatorsForType` — `record` returns **`[]`**. Records are not comparable; you reach into+ one first. (`list<record>` keeps `contains`? **No** — `equals` cannot compare records, so+ `list<record>` also returns `[]`.)+- `literalValueMatchesType` — records are never literals (§1.3), so this returns `false` for+ `record`, which is what makes a stored record literal impossible by construction.++**1.3 Where a record may appear.** Enforced, not merely documented:+- **Allowed:** a node's `outputs`; the data node's source and result; a `VariableRef` path+ walking into fields.+- **Refused:** `CatalogInput.type` — `catalog/build.ts` `validateCatalogInputs` gains a check+ rejecting a record-typed input, with the same "fails the build" posture as the table check.+ A `literal` whose `type.kind === "record"` fails `valueOrRefSchema`'s refinement.+ `template` parts and clause operands reject records via `rendersAsText` / `operatorsForType`+ returning nothing usable.++**1.4 Walking into a record.**++Definition side — `definition/catalog.ts` `walkPath` gains a record branch **before** the+entity branch:++```ts+if (current.kind === "record") {+ const next = current.fields[segment];+ if (next === undefined) return undefined;+ current = next;+ continue;+}+```++Run time — `runtime/resolve.ts` `walk` gains the mirror branch. **It never touches the+loader**: a record value carries its data inline, so there is nothing to fetch.++```ts+if (current.kind === "record") {+ const declared = /* field type from the value's own type */;+ current = fromColumn(declared, current.fields[segment]); // absent -> nullValue()+ continue;+}+```++**A missing or mistyped field yields `null`, never an error.** This is the tolerance the+Design Decisions table calls for, and it matches `walk`'s existing "a null anywhere along the+path ends the walk as null" rule.++**1.5 The runtime value.** `runtime/types.ts` `RuntimeValue` gains:++```ts+| { kind: "record"; of: RecordType; fields: Record<string, RuntimeValue> }+```++Carrying `of` (its own type) is what lets `walk` know each field's declared type without a+catalog lookup. Note the precedent: `entity` already has an optional `row` for values the+loader cannot produce (the `before` snapshot) — records are the same idea, made a first-class+kind rather than an escape hatch.++`values.ts` gains `recordValue(type, fields)` and `fromColumn` gains a record branch that+shapes a plain JSON object into a record value, **applying `MAX_LIST_ITEMS` to nested lists**+exactly as the existing list branch does.++---++### 2. Typed integration outputs++**2.1 Reading `outputSchema`.** `packages/jobs/src/workflows/integrations/types.ts` gains the+structural shape (measured against 12 pieces / 496 actions — see the findings doc):++```ts+export interface PieceOutputField {+ key: string;+ label: string;+ value?: string; // dotted remap path, e.g. "body.items", "start.dateTime"+ format?: string; // datetime | number | boolean | url | email | image | filesize+ children?: readonly PieceOutputField[]; // nested object+ listItems?: readonly PieceOutputField[]; // array element shape+ labelKey?: string;+ dynamicKey?: boolean; // keys here vary per account and cannot be enumerated+}+export interface PieceOutputSchema { fields: readonly PieceOutputField[]; itemLabel?: string }+```++**2.2 Mapping to `ValueType`.** New `integrations/outputs.ts`, sibling to `properties.ts` and+symmetrical with it:++| `outputSchema` | Carbon |+|---|---|+| `listItems` present | `list<record>` of the element's fields |+| `children` present | nested `record` |+| `format: "datetime"` | `t.date` |+| `format: "number"` | `t.number` |+| `format: "boolean"` | `t.boolean` |+| `format: url \| email \| image \| filesize`, or absent | `t.string` |+| `dynamicKey: true` | `t.string`, and the field is **omitted** from the record type |++`dynamicKey` fields are omitted deliberately: the vendor is declaring the keys are unknowable,+so inventing a field name would be the exact lie this design refuses. The raw `result` string+remains the way to reach them.++**2.3 The step's outputs.** `integrations/catalog.ts` replaces+`outputs: { result: {…string} }` with:++```ts+outputs: {+ ...describeOutputs(action.outputSchema), // e.g. { items: list<record>, status: number }+ count: t.number, // number of items when the payload is a list; else 0/1+ result: t.string // the raw JSON, unchanged — the escape hatch+}+```++As built, `describeOutputs` (`integrations/outputs.ts`) returns each output's type and its+declared field. `toOutputTypes` and `toOutputPaths` do not exist.++`count` exists because `compare` has no "is empty" operator on lists, so "did anything come+back?" is otherwise inexpressible. `result` staying is what makes this **purely additive**:+every saved workflow referencing `result` keeps working untouched.++**2.4 Refusing an action with no schema.** `integrations/catalog.ts`:++```ts+if (action.outputSchema === undefined) {+ throw new UnmappableOutputError(pieceName, actionName);+}+```++Fails `generate:workflow-catalog`, which writes no files — identical posture to+`UnmappablePropertyError`. Documented in the "Adding a piece" checklist so it is understood as+a gate, not a bug.++**2.5 Projecting at run time.** `actions/integration.ts` `runIntegrationAction`, after+`action.run(...)`, walks each declared field's `value` path against the real response and+shapes a record value. Absent or mistyped → `null`. The vendor's raw JSON still fills+`result`. **No validation, no throwing** — a wrong schema degrades one field, it never fails a+run.++**2.6 Labels.** Record fields carry their labels **inside the type** (from `outputSchema.label`),+not through `WORKFLOW_LABELS`. This is deliberate: the check-script's per-property label gate+(`check-workflow-catalog.ts:259-267`) iterates `rebuilt.entities`, and records are not+entities, so it does not apply. The generator still emits `integration.<piece>` and step+labels as today. Vendor field names are vendor data — the same reasoning that makes custom+field names deliberately untranslated (`catalog.ts:118-121`).++---++### 3. The data node (widened `filter`)++**3.1 Schema.** `definition/schema.ts` — additive only, `formatVersion` stays **4**:++```ts+const filterNode = z.object({+ ...nodeBase,+ type: z.literal("filter"),+ data: z.object({+ source: variableRefSchema.optional(),+ combinator: combinatorSchema.default("and"),+ clauses: z.array(clauseSchema).default([]),+ operation: dataOperationSchema.default("filter"), // NEW+ field: z.string().optional(), // NEW: pluck+ flatten: z.boolean().default(false) // NEW: pluck+ })+});+```++`operation` = `filter | count | first | last | pluck | join`. **An existing saved node has no+`operation`, so it defaults to `"filter"` and behaves exactly as before** — no migration, no+format bump, no legacy alias.++**3.2 Output types** (`definition/nodes.ts`, replacing `filterLoopList`-as-outputs):++| operation | source | output `result` |+|---|---|---|+| `filter` | `list<T>` | `list<T>` (unchanged) |+| `count` | `list<T>` | `number` |+| `first` / `last` | `list<T>` | `T` |+| `pluck` | `list<record>` | `list<F>` where `F` = the field's type; **if `F` is `list<S>` and `flatten`, then `list<S>`** |+| `join` | `list<primitive>` | `string` |++`loopList` returns the source list for `filter` only — the other operations do not expose a+loop item, because clauses only apply to `filter`. This keeps `ItemRef` meaning exactly one+thing.++**Why `flatten` is a flag:** `pluck("attendees")` over `list<event>` would logically produce+`list<list<attendee>>`, which is unrepresentable. With `flatten` it yields `list<attendee>`+directly — the 2D value is never materialised. Default **true** in the builder for a+list-typed field, since the flat result is nearly always what is wanted.++**3.3 Validation.** `checkTypes` becomes per-operation: `filter` requires a list source and+checks clauses; `pluck` requires `list<record>` and a `field` naming a real field on it;+`join` requires a list of primitives. `checkConfig` reports a missing `field` for `pluck`.+`configured` stays `true` (a filter has no catalog entry to be missing).++**3.4 Runtime.** `runtime/filter.ts` gains a switch on `operation`, defaulting to today's+path. `permission` stays `() => undefined`.++**3.5 UI.** `FilterForm.tsx` gains an operation selector; clause rows render only for+`filter`; a field selector renders for `pluck` (populated from the source record's fields, so+it is a dropdown, not free text). The source picker widens from list-typed variables only to+also accept `record` and `list<record>`. `meta.ts` label becomes "Data" with the summary+reflecting the operation; the node type id stays `filter`.++---++### 4. Form control — three tiers++**Tier 1 — generic rules, no per-action data**, in `integrations/catalog.ts`:+- required **and** has a `defaultValue` → not emitted; the piece's default applies.+- exactly one possible value → not emitted.+- `connectionId` when the company has exactly one connection → auto-selected and hidden by the+ form. It is **still stored on the node and still a required input the validator checks** — a+ second connection added later must never silently repoint existing workflows. Zero+ connections keeps today's "Connect …" panel; two or more shows the field.++**Tier 2 — a reviewed hide list**, one entry per allowlisted piece, written when the piece is+allowlisted (already a human-gated step):++```ts+"google-calendar": {+ …,+ props: {+ google_calendar_get_events: {+ singleEvents: { hidden: true, value: true }, // vendor default is wrong for us+ event_types: { hidden: true } // use the piece's own default+ }+ }+}+```++`value` is applied in `toPropsValue` **at run time**, never stored on the node. A hidden+required prop with **no** `value` and no piece default **fails the generator**.++**Tier 3 — Advanced properties**, a collapsed section on the integration node form showing+every hidden field, **editable**. This is what makes tiers 1–2 safe: a hidden field is+demoted, never lost, so being wrong about a hide decision costs a click rather than a release.+An override stored on the node wins over a tier-2 pinned value for that node only.++**`calendar_id` stays visible**, defaulting to the primary calendar. It is a genuine business+choice on a shared workshop account. "All calendars" is deliberately not offered:+`get_events` hits `/calendars/{id}/events` for exactly one id, so "all" means N fanned-out+calls plus every subscribed holiday calendar.++---++### 5. Two traced bugs++Auth shape is **not** the problem — invoking the real options function reached Google and+returned a genuine 401 on a fake token, so the call path is correct end to end.++**5.1 A vendor error renders as "no options."** The piece's `options()` throws on any non-2xx;+`api+/workflows.options.ts` flattens that to `{ options: [], error }`; `OptionsField` then+renders an empty `Combobox` (the `emptyHref` branch does not apply to the property provider),+which reads as "this account has no calendars." `issue ?? error` also lets a field issue mask+the error entirely.+**Fix:** render a distinct error state, and never let `issue` suppress `error`.++**5.2 The fetch never retries.** `useWorkflowOptions` loads only when+`fetcher.state === "idle" && fetcher.data === undefined`, so it fires **once**. A failed first+load leaves `fetcher.data` set, so the field is **permanently stuck empty** for the rest of+the editing session. This is almost certainly the reported regression.+**Fix:** key the guard on the query rather than on `data` being undefined, and allow a retry+after a failure.++## Data Model Changes++**None.** No tables, no columns, no migrations. Every change is to committed catalog files and+in-memory types. `integrationConnection` and the vault RPCs are untouched.++## API / Service Changes++| File | Change |+|---|---|+| `packages/workflows/src/definition/types.ts` | Add `record` kind, `t.record`, and record cases in `typesEqual`/`canAssign`/`describeType`/`rendersAsText`/`operatorsForType`/`literalValueMatchesType` |+| `packages/workflows/src/definition/catalog.ts` | `walkPath` record branch |+| `packages/workflows/src/definition/schema.ts` | `filterNode.data` gains `operation`/`field`/`flatten` |+| `packages/workflows/src/definition/nodes.ts` | Per-operation `outputs`/`loopList`/`checkTypes`/`checkConfig` for filter |+| `packages/workflows/src/runtime/types.ts` | `RuntimeValue` gains `record` |+| `packages/workflows/src/runtime/values.ts` | `recordValue`, `fromColumn` record branch (with `MAX_LIST_ITEMS`) |+| `packages/workflows/src/runtime/resolve.ts` | `walk` record branch (no loader) |+| `packages/workflows/src/runtime/filter.ts` | Switch on `operation` |+| `packages/workflows/src/catalog/build.ts` | Reject a record-typed `CatalogInput` |+| `packages/jobs/src/workflows/integrations/types.ts` | `PieceOutputSchema` shapes |+| `packages/jobs/src/workflows/integrations/outputs.ts` | **New** — `outputSchema` → `ValueType` |+| `packages/jobs/src/workflows/integrations/catalog.ts` | Typed outputs, `count`, `UnmappableOutputError`, tier-1/2 prop filtering |+| `packages/jobs/src/workflows/integrations/allowlist.ts` | `props` hide-list per action |+| `packages/jobs/src/workflows/integrations/properties.ts` | `toPropsValue` applies pinned values |+| `packages/jobs/src/workflows/actions/integration.ts` | Project the response into record outputs |++## UI Changes++| File | Change |+|---|---|+| `.../Builder/config/forms/FilterForm.tsx` | Operation selector; clauses only for `filter`; field selector for `pluck`; source accepts records |+| `.../Builder/config/forms/IntegrationNodeForm.tsx` | Auto-hide single connection; **Advanced properties** section |+| `.../Builder/fields/OptionsField.tsx` | Distinct error state (bug 5.1) |+| `.../Builder/fields/useWorkflowOptions.ts` | Refetch on query change, retry after failure (bug 5.2) |+| `.../Builder/fields/variableMenu.ts` | Walk into record fields, using labels carried on the type |+| `.../Builder/labelKeys.ts` | `describeValueType` renders records; `outputLabel` handles `count`/`items` |+| `.../Builder/nodes/meta.ts` | Filter node renamed to "Data" in the palette (type id unchanged) |++## Acceptance Criteria++- [ ] Dropping a Google Calendar "Get all Events" step and opening the variable picker shows+ named fields (Title, Start, Organizer → Email), not a single `result` text variable.+- [x] `pnpm run generate:workflow-catalog && pnpm run check:workflow-catalog` both pass, and+ the committed catalog contains `list<record>` outputs for both allowlisted actions.+- [x] Allowlisting an action whose piece ships no `outputSchema` fails the generator with a+ message naming the piece and action, and writes no files.+- [x] A data node with `operation: "count"` on the events list outputs a number, and a+ condition can branch on `count > 0`.+- [x] A data node with `operation: "pluck"`, `field: "organizer.email"` outputs+ `list<string>`; with a list-typed field and `flatten`, it outputs a flat list, not a+ list of lists.+- [x] An existing saved workflow containing a filter node loads, validates and runs unchanged,+ with `operation` absent from its stored data.+- [x] A workflow referencing `result` on an integration step still publishes and runs.+- [x] `singleEvents` and `event_types` do not appear on the Get-all-Events form; the step still+ sends `singleEvents: true`, verified by the recorded step inputs.+- [ ] Opening **Advanced properties** reveals `singleEvents`, editable; setting it to `false`+ on one node affects only that node.+- [ ] With exactly one Google connection, the Connection field is not rendered but the node+ still stores its `connectionId`; adding a second connection makes the field appear with+ the original still selected.+- [ ] When the calendar options call fails, the field shows an error state distinct from+ "nothing to choose", and a retry succeeds without reloading the page.+- [x] A record-typed value cannot be selected into an action input, a template, or a condition+ operand anywhere in the builder.+- [x] A declared field missing from a vendor response resolves to null at run time; the step+ succeeds and the run log shows the null rather than an error.++## Risks++| Risk | Severity | Mitigation |+|---|---|---|+| `record` touches the core type model used by every node | High | Scoped to outputs + data node; refused as input/literal/template/condition by construction. Existing paths never see a record. |+| Widening a shipped node type breaks saved workflows | Med | `operation` defaults to `"filter"`; absent field = today's behaviour. No format bump, no migration. Covered by an acceptance criterion. |+| `outputSchema` is unvalidated and may not match reality | Med | Authoring-time only; tolerant run-time resolution (null, never throw); raw `result` retained as escape hatch. No platform surveyed does better. |+| Losing pieces with no `outputSchema` (HubSpot, Salesforce, …) | Med | Accepted: OAuth verification already gates us to few vendors. Failing loudly at build beats a silent blob. Upstreaming schemas is a cheap future option. |+| A hidden field turns out to be needed | Low | Tier 3 Advanced shows every hidden field, editable — a click, not a release. |+| Pinned values drifting from vendor behaviour | Low | Applied at run time, never stored, so one edit fixes every existing workflow. |+| `record` in run history renders as a blob | Low | Verify during implementation; falls back to the raw JSON view we already show. |++## Open Questions++> All resolved before this spec was written.++- [x] Should an integration's returned object reuse `entity`? — **Answer:** No. Entity means+ table + id + permission + loader + `lookup` support, none of which is true of vendor+ data; reusing it would force a lie or a special case at each. Add a `record` kind+ instead. (User correction — an earlier draft of this design proposed "synthetic+ entities" and was wrong.)+- [x] Structural or named records? — **Answer:** Structural, fields inline. No registry, no+ names to resolve, nesting is free, and a saved workflow can never dangle against a+ vanished definition. Accepts deeper equality and larger types.+- [x] Where may a record appear? — **Answer:** Outputs and the data node only; never a catalog+ input, stored literal, template part or condition operand. Keeps every existing form and+ the template renderer untouched.+- [x] Widen `filter`, add a new node, or rename with a migration? — **Answer:** Widen in place+ with an `operation` field defaulting to `"filter"`. One loop primitive, one `ItemRef`+ meaning, zero migration risk on published workflows.+- [x] What happens to an action with no `outputSchema`? — **Answer:** Refuse it and fail the+ generator, matching `UnmappablePropertyError`. Caught when adding a piece, never by a+ customer.+- [x] What permission should the data node carry? — **Answer:** None, as today. It reads+ values already fetched by an upstream node that did its own check; records carry no+ `permission`, so `lookup` can never target them.++## Changelog++- 2026-08-31: Created. Design decisions carried from `.ai/research/activepieces-decisions.md`;+ evidence from `.ai/research/activepieces-integration-findings.md` (four-platform survey plus+ measurements across 12 pieces / 496 actions).diff --git a/.ai/specs/implemented/2026-09-01-connection-reconnect-prompts.md b/.ai/specs/implemented/2026-09-01-connection-reconnect-prompts.mdnew file mode 100644index 0000000000..9eebd738b4--- /dev/null+++ b/.ai/specs/implemented/2026-09-01-connection-reconnect-prompts.md@@ -0,0 +1,139 @@+# Under-scoped connections: say "reconnect" everywhere the customer would otherwise file a bug++> Status: implemented (2026-09-01)+> Author: Aashu+> Date: 2026-09-01+> Follows: `2026-09-01-slack-single-source-of-truth.md` (v2)++## TLDR++After v2, a Slack workspace connected before the workflow piece existed is **connected but+under-scoped**: its bot token carries the Assistant's 10 scopes, not the 16 the piece asks for, so+a workflow Slack step or its channel dropdown fails with Slack's `missing_scope` — and nothing in+Carbon says why. This spec compares each connection's **granted** scopes (already recorded as+`metadata.scopes` by the v2 callback and backfill) against the piece's **required** scopes (the+allowlist row / piece auth — the same list the consent URL sends) and surfaces one consistent+"Reconnect" state in four places: the Accounts tab (with a one-click **Reconnect** that re-runs the+consent for that account), the workflow builder (connection field and the node's banner), the+Integrations card badge (Unhealthy), and the step's run error (pre-checked before calling the+vendor, and mapped if the vendor says so anyway). Everything is data-driven off the allowlist row;+a vendor whose connections record no scopes (Google Calendar today) is never flagged.++## Problem Statement++Customers will not read release notes. An admin who installed Slack for the Assistant months ago+opens a workflow, drops a Slack step, sees the account in the dropdown, publishes, and the run+fails with `Slack rejected this: An API error occurred: missing_scope`. They file a bug. The fix+is one click (re-consent) — Carbon just has to say so, at the moment they'd otherwise get stuck.++## Goals++1. Detect under-scoped connections generically: `missingScopes(connection, required)`.+2. Show it and offer the fix where the person is: Accounts tab, builder, card, run error.+3. Reconnect = the existing consent for that account name (row revives, token and `metadata.scopes`+ refresh). No new route, no new table.+4. Vendors without recorded scopes are untouched; Google Calendar starts recording them for the future.++## Non-Goals++- Automatic re-consent, emails, or in-app notifications about it.+- Per-scope explanations ("you are missing channels:read") to customers — the fix is the same+ regardless; the missing list goes to the server log only.+- Changing what "usable"/"healthy" mean for the Assistant: an under-scoped workspace is still fully+ usable by the Assistant.++## Proposed Solution++### Design Decisions++| Decision | Choice | Rationale |+|---|---|---|+| Granted scopes source | `connection.metadata.scopes` (string; split on `/[\s,]+/`) | Slack's token response uses commas, the v2 backfill wrote spaces; one parser, no migration. Absent → `null` = unknown. |+| Required scopes source | `requiredScopesFor(piece)` = `entry.oauth.scope ?? pieceAuth.scope` (jobs, `oauth.ts`) | Exactly what `buildConsentUrl` sends, so "reconnect" always grants what "required" checks. Shared by connect route, options provider, health and runner. |+| Predicate home | `packages/ee/src/integrations/connections.ts`: `grantedScopes`, `missingScopes(connection, required)` — pure | ee cannot import jobs (jobs depends on ee), so the required list is a parameter; every caller lives where both are known (erp, jobs). Unknown grants → `[]` missing (never flag what we cannot see). |+| Builder dropdown | Under-scoped accounts are **excluded**; if that empties an otherwise-connected app, the provider returns `errorCode: "reconnect"` + `errorHref` (Accounts tab) | Precedent: "a revoked account in a dropdown is a trap". `OptionsProviderResult` already carries `errorCode`/`errorHref`, and `OptionsField` already renders "This account needs to be reconnected · Fix this". |+| Node banner | `IntegrationNodeForm` distinguishes "not connected" from "needs reconnect" using the same hook result | Today it shows "Connect Slack" whenever the option list is empty — wrong words for an installed app. |+| Card badge | `getIntegrationHealth` (erp) marks a piece card **unhealthy** when any usable connection is under-scoped | User decision. erp knows both sides; the generic hook keeps returning connection health, the erp layer adds the scope check for `PIECE_ALLOWLIST` ids only. Unhealthy is never cached, so Reconnect clears it at once. |+| Reconnect action | Accounts row button → `GET /api/integrations/connections/{piece}/connect?name={row.name}` → consent → callback → `createConnection` **revives** the row | Existing revive path; it must now also refresh `metadata` (today it keeps the old map, so `scopes` would never update). |+| Runner | Pre-check `missingScopes` before `action.run`; ALSO map a vendor error matching `/missing_scope\|insufficient_scope\|insufficient.?permission/i` | Deterministic first (no vendor call, no partial side effects), belt-and-braces second for a grant that drifted server-side. Copy names the path: Settings → Integrations → {app} → Accounts. |+| Google Calendar | Add `metadata: { scopes: "scope" }` to its allowlist row | Google returns `scope` too; new connections record it, old ones stay `null`/unflagged. One line; makes the mechanism uniform. |+| Copy | Lingui (`<Trans>`/`t`) in UI; runner copy is plain English like the runner's other errors | Matches each layer's existing convention. |++### 1. `packages/ee/src/integrations/connections.ts`++```ts+/** Scopes the vendor said it granted, recorded by the callback from the token response+ * (`metadata.scopes`, comma- or space-separated). `null` when the connection predates+ * recording or the vendor does not report them — the caller must not flag those. */+export function grantedScopes(connection: Pick<IntegrationConnection, "metadata">): string[] | null+/** Required scopes the connection does not hold. Empty when grants are unknown. */+export function missingScopes(connection, required: readonly string[]): string[]+```+`createConnection` revive branch: `...(args.metadata === undefined ? {} : { metadata: args.metadata })`.++### 2. `packages/jobs/src/workflows/integrations/oauth.ts`++`export async function requiredScopesFor(pieceName): Promise<readonly string[]>` — `PIECE_ALLOWLIST[piece].oauth.scope ?? (await getPieceOAuth2Auth(piece)).scope`; `buildConsentUrl` unchanged (sync, already takes both) — the connect route keeps calling it; the new helper is for the three readers below.++### 3. Accounts tab++Loader (`integrations.$id.tsx`) adds `requiredScopes: await requiredScopesFor(integrationId)` to `connections`; `ConnectionRow` gains `metadata`. `ConnectionsTab` → `ConnectionItem` receives `requiredScopes`:+- `needsScopes = connectionUsable(c) && missingScopes(c, required).length > 0` → amber `Badge` "Reconnect needed" beside the status badge, copy: *"Connected before workflows needed extra {app} permissions. Reconnect to grant them — everything else keeps working meanwhile."*+- **Reconnect** button (icon `LuPlug`) for `needsScopes` OR `!connectionUsable(c)`: `connect.load(connectUrl?name=<c.name>)` through the same fetcher/effect the Add-account button uses (popup opens from the returned URL). Replaces today's "Add it again to reconnect" sentence for broken rows.++### 4. Options provider + builder++`connectionProvider`: `required = await requiredScopesFor(piece)`; `ready = usable.filter(r => missingScopes(r, required).length === 0)`; if `ready.length === 0 && usable.length > 0` → `{ options: [], errorCode: "reconnect", errorHref: \`${path.to.integration(piece)}?tab=connections\` }`; else options from `ready`, `emptyHref` as today.+`IntegrationNodeForm`: read `errorCode`/`errorHref` from `useWorkflowOptions` (extend the hook's return if it does not expose them — `OptionsField` already consumes them from the same fetcher data); when `errorCode === "reconnect"` render *"{app} is connected but needs to be reconnected before workflow steps can use it."* + button **Reconnect {app}** → `errorHref` (new tab); the existing "isn't connected yet / Connect {app}" branch stays for the truly-empty case.++### 5. Card health (`settings.server.ts` `getIntegrationHealth`)++After `status` is computed and before caching: if `status && PIECE_ALLOWLIST[integration.id]` → `rows = await readConnections(getCarbonServiceRole(), companyId, integration.id)`, `required = await requiredScopesFor(integration.id)`, `status = !rows.some(r => connectionUsable(r) && missingScopes(r, required).length > 0)`. Comment why it lives here (ee cannot see the allowlist).++### 6. Runner (`packages/jobs/src/workflows/actions/integration.ts`)++Before `getPieceAction`: `const missing = missingScopes(connection, await requiredScopesFor(pieceName)); if (missing.length > 0) { log missing; return { ok: false, error: reconnectCopy(label) } }` where+`reconnectCopy = (label) => \`The ${label} connection needs to be reconnected to grant the permissions this step uses — Settings → Integrations → ${label} → Accounts → Reconnect.\``.+In the run `catch`: if `/missing_scope|insufficient_scope|insufficient.?permission/i.test(message)` → same copy.++### 7. Allowlist++`google-calendar`: `metadata: { scopes: "scope" }`.++## Data Model Changes++None (reads `metadata.scopes` written by v2; revive now refreshes `metadata`).++## API / Service Changes++`grantedScopes`, `missingScopes` (ee); `requiredScopesFor` (jobs, exported from the barrel); loader payload `connections.requiredScopes`; provider `reconnect` error for under-scoped apps; health includes the scope check; runner pre-check + mapping.++## UI Changes++Accounts row: "Reconnect needed" badge + copy + Reconnect button (also for Expired/Revoked rows). Builder: connection field shows the existing reconnect message with "Fix this"; node banner gets a reconnect variant. Card: Unhealthy while under-scoped. All new UI copy through Lingui.++## Acceptance Criteria++1. `grantedScopes` parses `"a,b"` and `"a b"` to `["a","b"]`, returns `null` when absent; `missingScopes(c, ["a","c"])` → `["c"]`; unknown grants → `[]`.+2. `createConnection` on an existing name with `metadata: { scopes: "x" }` leaves the row with `metadata.scopes === "x"` (test in `connections.test.ts`).+3. `requiredScopesFor("slack")` has 16 unique scopes; `requiredScopesFor("google-calendar")` equals the piece's own `scope`.+4. Dev DB (backfilled workspace, 10 granted): Accounts row shows "Reconnect needed" + Reconnect; the builder's Slack node shows the reconnect banner, not "Connect Slack"; the Slack card reads Unhealthy; a run of a Slack step fails **without calling Slack** with the reconnect copy.+5. After clicking Reconnect and approving: same row id, `metadata.scopes` now the 16-scope grant, badge gone, dropdown lists the account, card Healthy, step runs.+6. A revoked Slack row also shows the Reconnect button and revives through it.+7. Google Calendar behaviour unchanged (no scopes recorded on existing rows → never flagged); a new GCal connection records `metadata.scopes`.+8. Typecheck (`@carbon/ee`, `@carbon/jobs`, `erp`) and tests (`ee`, `jobs`) green; `check:workflow-catalog` ok (catalog unchanged apart from the GCal metadata map, which the generator ignores).++## Risks++- A vendor that reports scopes in an unexpected format would read as "missing everything" → flagged wrongly. Mitigation: parser accepts commas and whitespace; the flag only fires when at least one *known* scope parsed.+- The health check now reads connections on every uncached health resolution for piece cards — one indexed query per card, bounded by the existing 5-minute healthy cache.++## Open Questions++- [x] Should an under-scoped account also flip the card badge? — **Answer:** yes, Unhealthy while any usable account is under-scoped (user, 2026-09-01).+- [x] Hide or flag under-scoped accounts in the builder dropdown? — **Answer:** hide, with the existing `reconnect` error state (precedent: revoked accounts are hidden; decided from codebase).++## Changelog++- 2026-09-01 — Draft.+- 2026-09-01 — Implemented; run log at `.ai/runs/2026-09-01-connection-reconnect-prompts.md`.diff --git a/.ai/specs/implemented/2026-09-01-gmail-workflow-piece.md b/.ai/specs/implemented/2026-09-01-gmail-workflow-piece.mdnew file mode 100644index 0000000000..73d3df9afd--- /dev/null+++ b/.ai/specs/implemented/2026-09-01-gmail-workflow-piece.md@@ -0,0 +1,266 @@+# Gmail as a workflow integration piece++> Status: implemented (2026-09-01)+> Author: Aashu+> Date: 2026-09-01+> Research: `.ai/research/2026-09-01-gmail-workflow-piece.md`+> Rule: `.claude/rules/workflow-integrations.md` ("Adding a piece" checklist)+> Precedent: `.ai/specs/implemented/2026-09-01-slack-workflow-piece.md`, Google Calendar (`packages/ee/src/google-calendar/config.tsx`)++## TLDR++Add `@activepieces/[email protected]` as the third row of `PIECE_ALLOWLIST`, exposing ONE+step — **Gmail: Send Email** — as an `integration` node. It ships as its own **Gmail** card+(id `gmail`), connects through the **same Google OAuth app** as Google Calendar+(`GOOGLE_OAUTH_*`), and requests a **send-only** scope set (`gmail.send` + `email`) instead of+the piece's default, which would drag the app into Google's restricted-scope tier and an annual+CASA security assessment. No schema change, no new env vars, no generic host change: this is an+allowlist row, a card, one hook line, tests and a regenerated catalog.++## Problem Statement++A workflow can post to Slack and write to a calendar, but cannot send an email — the most+common way a shop talks to a supplier or customer ("PO issued", "quote ready", "shipment+late"). Carbon's own transactional email is system-branded and unconfigurable per company;+the ask is to send from the company's *own* Gmail/Workspace account, with the message landing+in that mailbox's Sent folder and replies coming back to a real person.++Everything needed to do that already exists in the branch (connections, consent, refresh,+the Integration node). What is missing is the piece.++## Goals++- A workflow author can add an Integration node → Gmail → Send Email, pick a connected Google+ account, and send a plain-text or HTML email with To/CC/BCC, subject, body, an optional+ display name and Reply-To — with workflow variables in every text field.+- Settings → Integrations shows a **Gmail** card with the same Install → consent popup →+ Accounts tab flow as Google Calendar; "Coming soon" when the Google app is unconfigured.+- Only `gmail.send` and `email` are ever requested. A connection's granted scopes are recorded+ so the existing "Reconnect needed" machinery works unchanged if the set grows later.+- The step's outputs (`messageId`, `threadId`, `labels`, `status`) are typed and referenceable+ by later steps, as every piece step's are.++## Non-Goals++- Reading, searching, replying to or drafting emails (needs `gmail.readonly` / `gmail.compose`,+ both restricted-tier). If ever wanted, that is a scope-tier decision with a compliance cost,+ not a code change.+- Attachments, including Carbon-generated PDFs (quote, PO, invoice). Deferred: the workflow+ engine has no file value type. Follow-up spec.+- Threading a message into an existing conversation (`in_reply_to`): the piece resolves it+ through `messages.list`, which needs `gmail.readonly`.+- Gmail triggers ("new email received"): Carbon runs no piece triggers.+- The piece's Service Account auth variant: `getPieceOAuth2Auth` already selects the OAuth2+ member and ignores it.+- A shared "Google" card covering Calendar + Gmail with one consent. One card per piece is the+ rule (`id` === piece name) and the two scope sets are verified separately by Google anyway.+- Replacing Carbon's system email (`packages/ee/src/email`, Resend/SMTP). That card stays as is.++## Proposed Solution++### Design Decisions++| # | Decision | Choice | Why |+|---|---|---|---|+| 1 | Scope set | `oauth.scope` override: `["https://www.googleapis.com/auth/gmail.send", "https://www.googleapis.com/auth/userinfo.email"]` (canonical spelling — Google reports `email` as `userinfo.email`, see changelog) | Piece default adds `gmail.readonly` + `gmail.compose` (restricted tier → CASA). Send-only stays sensitive tier — same verification the Calendar app already needs. **User decision.** |+| 2 | Action set | `["gmail_send_email"]` | The only action `gmail.send` covers. `send_email` is the legacy twin (same props, same `run`); `gmail_send_email` is the maintained one with the structured `outputSchema`. |+| 3 | `attachments` prop | `omit: true` | `ARRAY` of `{data,name}` file objects; Carbon would send `list<string>`, which `run()` would try to attach. Deferred by **user decision**. |+| 4 | `in_reply_to` prop | `omit: true` | Setting it calls `messages.list` → `gmail.readonly` → 403 at run time under send-only. Hiding it (Advanced) would leave a trap; omitting removes it. |+| 5 | `draft` prop | `omit: true, value: false` | Required-with-default would auto-hide it into Advanced, where flipping it calls `drafts.create` → `gmail.compose` → 403. Pin it off and out of the form. |+| 6 | `body_type` prop | leave to the generic rule (hidden, value `plain_text`, reachable under Advanced) | Required with a default; HTML is a legitimate Advanced choice and needs no extra scope. |+| 7 | `cc`, `bcc`, `reply_to`, `sender_name`, `from` | shown, no override | Per the rule, overrides are only for defaults that are WRONG for us, not for merely-uninteresting fields. `from` is a real choice (send-as alias). |+| 8 | Card identity | New card `packages/ee/src/gmail/config.tsx`, `id: "gmail"`, `category: "Email"`, `active: !!GOOGLE_OAUTH_CLIENT_ID` | Rule: card id IS the piece name. `GOOGLE_OAUTH_CLIENT_ID` is already in `getBrowserEnv()`, so no env plumbing. `"Email"` is the existing category of the system-email card; Gmail sits beside it. |+| 9 | OAuth app | Reuse `GOOGLE_OAUTH_CLIENT_ID/SECRET/REDIRECT_URL` | One Google Cloud app per vendor; Gmail is a scope on it, not a second app. Separate consent → separate `integrationConnection` row and refresh token per piece. |+| 10 | Account label | `{ url: "https://www.googleapis.com/oauth2/v2/userinfo", field: "email" }` | Identical to Calendar; `email` scope covers it. |+| 11 | Metadata | `{ scopes: "scope" }` | Google echoes granted scopes in the token response; feeds `missingScopes` → "Reconnect needed". |+| 12 | Uninstall | `hooks.server.ts` `gmail: { onUninstall: revokeConnectionsForPiece(…, "gmail", …) }` | One line, as Calendar and Slack. No per-vendor hooks file. |+| 13 | Label | `label: "Gmail"` | Emitted as the `integration.gmail` catalog label; not derived from the slug. |+| 14 | Card copy | Plain strings in `defineIntegration`, like every other card | Existing convention for integration cards; the step/label copy is Lingui-translated through the generated catalog as usual. |+| 15 | Version pin | `"@activepieces/piece-gmail": "0.13.0"` exact | `assertPinnedVersions` gate. 0.14.0 (published 2026-09-01) is refused by the repo's `minimumReleaseAge` (3 days); 0.13.0's `gmail_send_email` has identical props, output schema and scopes. **User decision.** |++### 1. Allowlist row (`packages/jobs/src/workflows/integrations/allowlist.ts`)++```ts+gmail: {+ package: "@activepieces/piece-gmail",+ version: "0.13.0",+ label: "Gmail",+ actions: ["gmail_send_email"],+ oauth: {+ clientIdEnv: "GOOGLE_OAUTH_CLIENT_ID",+ clientSecretEnv: "GOOGLE_OAUTH_CLIENT_SECRET",+ redirectUrlEnv: "GOOGLE_OAUTH_REDIRECT_URL",+ // Send-only. The piece also asks for gmail.readonly + gmail.compose, which are+ // Google "restricted" scopes: verifying an app that holds them requires an annual+ // third-party CASA security assessment. gmail.send is "sensitive" only.+ scope: ["https://www.googleapis.com/auth/gmail.send", "https://www.googleapis.com/auth/userinfo.email"]+ },+ accountLabel: { url: "https://www.googleapis.com/oauth2/v2/userinfo", field: "email" },+ metadata: { scopes: "scope" },+ props: {+ gmail_send_email: {+ attachments: { omit: true }, // file objects; no Carbon input type+ in_reply_to: { omit: true }, // needs gmail.readonly (messages.list)+ draft: { omit: true, value: false } // needs gmail.compose (drafts.create)+ }+ }+}+```++Resulting form (from the generic visibility rules): `connectionId`, `receiver` (list of+emails), `cc`, `bcc`, `subject`, `body`, `reply_to`, `sender_name`, `from`. Advanced:+`body_type` (`plain_text` | `html`). Outputs: `data.messageId`, `data.threadId`,+`data.labels`, `status`, `statusText`, plus the standard `count` and `result`.++The step is batchable like every piece step: wiring a list to `receiver` sends one email+per item (`receiver` is declared as a list, so under the batching fix in this branch it keeps+its list; a list wired to `subject` or `body` batches instead).++### 2. Generator, properties, visibility, outputs++No change. Every prop of `gmail_send_email` maps under the existing table (`ARRAY` →+`list<string>`, `SHORT_TEXT`, `STATIC_DROPDOWN`, `CHECKBOX`); the three overrides above are+`omit`, which Slack already introduced. `outputSchema` is present (`children` + `format`).+`pnpm run generate:workflow-catalog` must complete with no refusal — that is the gate.++### 3. Consent and callback++No change. `buildConsentUrl` already applies the row's `scope` override with+`access_type=offline&prompt=consent`; the callback already reads `accountLabel` and+`metadata` off the row and calls `markIntegrationInstalled("gmail")`.++### 4. Settings card (`packages/ee/src/gmail/config.tsx`, `packages/ee/src/index.ts`, `hooks.server.ts`)++- `defineIntegration({ name: "Gmail", id: "gmail", category: "Email", active: !!GOOGLE_OAUTH_CLIENT_ID, logo, shortDescription, description, images: [], settings: [], schema: z.object({}), onClientInstall: () => startIntegrationConnect("/api/integrations/connections/gmail/connect") })`.+- Copy: short "Send email from your workflows using a connected Google account."; long+ explains that each connected account sends as itself, that more than one account can be+ connected, and that only permission to send is requested (no reading of the mailbox).+- Logo: inline SVG "M" envelope in Gmail's four colours, `aria-label="Gmail"`.+- Register in the `integrations` array and export `Gmail` / `GmailLogo` from `index.ts`.+- `hooks.server.ts`: the one-line `onUninstall` entry.+- The Accounts tab, health check, builder "Connect Gmail" gating and reconnect prompts all+ key off `PIECE_ALLOWLIST["gmail"]` and need nothing.++### 5. Environment and Google Cloud (operational, not code)++- No new env vars. `.env.example` comment for the Google app widens from "(Google Calendar)"+ to "(Google Calendar, Gmail)".+- On the Google Cloud OAuth consent screen: add `…/auth/gmail.send` to the app's scopes and+ submit sensitive-scope verification (brand + privacy policy + a short demo video). Until+ approved, only listed test users can complete consent — same state Calendar is in today.++### 6. Tests++- `registry.test.ts`: the `gmail` row resolves, `gmail_send_email` loads, a non-allowlisted+ action (`gmail_search_email`) is refused.+- `oauth.test.ts`: `buildConsentUrl("gmail")` requests exactly `gmail.send email`, offline,+ prompt=consent; `requiredScopesFor("gmail")` returns the override.+- `visibility.test.ts` / `catalog.test.ts`: `attachments` and `in_reply_to` absent from+ inputs AND advancedInputs; `draft` absent and pinned `false` in `toPropsValue`; `body_type`+ in advancedInputs with value `plain_text`.+- `assertPinnedVersions` passes (`check:workflow-catalog`).++### 7. Docs++- `.claude/rules/workflow-integrations.md`: allowlist count "two" → "three (Google Calendar,+ Slack, Gmail)"; one paragraph under "Scope drift" noting the Gmail send-only choice and why.+- `packages/ee/AGENTS.md` / `packages/jobs/AGENTS.md`: mention the Gmail card and row.+- This spec's status → implemented; changelog entry.++## Data Model Changes++One row, no new columns: `20260901173000_workflow-integration-connections.sql` (this branch's+own migration, re-stamped past main's newest before the feature ships) inserts the `integration`+rows for BOTH pieces — `google-calendar` and `gmail` — because `companyIntegration.id` is an FK+to `integration.id` and the callback's `markIntegrationInstalled` insert fails without one. Found+during the first browser test (the spec originally said "None"); first added as its own migration,+then folded into the connections migration since nothing here is in production yet.+Then `integrationConnection` rows with `pieceName = "gmail"` and the `companyIntegration`+row `id = "gmail"` written by `markIntegrationInstalled`.++## API / Service Changes++None. Existing routes (`/api/integrations/connections/gmail/connect`, the shared callback,+`/api/workflows/options`) serve the new piece by name.++## UI Changes++- Settings → Integrations: a **Gmail** card (Email category), Coming soon without+ `GOOGLE_OAUTH_CLIENT_ID`; Details drawer shows the Accounts tab.+- Workflow builder: Integration node → app picker gains **Gmail**; step **Send Email**;+ "Connect Gmail" link when no account is connected.+- Run history: the step renders its typed outputs like any piece step.++## Acceptance Criteria++1. `pnpm run generate:workflow-catalog && pnpm run check:workflow-catalog` succeed and emit+ `integration.gmail.gmail_send_email` with inputs `connectionId, receiver, cc, bcc,+ subject, body, reply_to, sender_name, from` and advancedInputs `body_type` only.+2. With `GOOGLE_OAUTH_CLIENT_ID` unset the Gmail card reads "Coming soon"; set, it offers+ Install.+3. Install → consent popup: the Google screen lists ONLY "Send email on your behalf" and the+ email address; after consent the Accounts tab shows the account's email as its label and+ the card shows Installed.+4. The stored connection's `metadata.scopes` contains `gmail.send`; the vault holds the+ token; `metadata` holds no token (existing `connections.test.ts` invariant).+5. In a workflow, Integration → Gmail → Send Email with a literal recipient, subject and a+ body using a variable (`{{trigger.customer.name}}`): running it delivers the email from+ the connected address, the Sent folder shows it, and the run's step outputs carry a+ non-empty `messageId` and `threadId`.+6. Advanced → Body Type = `html` sends an HTML body; `draft`, `attachments`, `in_reply_to`+ are not offered anywhere in the node form.+7. Disconnecting the account makes the node form show the reconnect banner and the step fail+ before any vendor call with the standard reconnect copy.+8. Uninstalling Gmail revokes every `gmail` connection (`status = Revoked`, token deleted)+ and leaves Google Calendar connections untouched.+9. A second Google account can be connected under a different name and picked independently+ by another node.+10. `pnpm --filter @carbon/jobs test`, `--filter @carbon/ee test`, `--filter @carbon/workflows test`+ and the scoped typechecks (`@carbon/jobs`, `@carbon/ee`, `erp`) pass.++## Risks++- **Google verification lag.** Until sensitive-scope verification is approved, only test+ users can consent; the code is correct before that, so ship and verify in parallel.+- **Deliverability.** Mail sent via `messages.send` is ordinary user mail; a workflow that+ fires hundreds of sends per day can trip Gmail's per-user sending limits (500/day consumer,+ 2,000/day Workspace). Documented in the card's long description; no throttling in v1.+- **`from` aliases.** A `from` not configured as a send-as alias in that Gmail account is+ rewritten by Google to the account's own address, silently. Surfaced in the prop's vendor+ description (already: "must be listed in your Gmail account's settings").+- **Scope creep pressure.** The first "reply to the customer's email" request needs+ `gmail.readonly`. The allowlist comment names the compliance cost so it is a conscious+ decision next time, not a one-line edit.++## Open Questions++- [x] Scope tier: send-only vs piece default (send + read/reply) — **Answer:** send-only+ (`gmail.send` + `email`). Restricted scopes would require an annual CASA assessment; one+ action covers the actual ask (outbound email from the company's own account).+- [x] Attachments in v1 (Carbon PDFs such as quotes and POs) — **Answer:** defer to a+ follow-up spec. Needs a file value type in the workflow engine; `attachments` is omitted+ from the step for now.+- [x] Card: separate Gmail card vs a shared Google card — **Resolved by precedent:** one card+ per piece, `id` === piece name (rule), sharing the Google OAuth app.+- [x] Version: 0.14.0 vs 0.13.0 — **Answer:** pin 0.13.0. pnpm's 3-day `minimumReleaseAge` refuses+ 0.14.0 (published today); the send action is identical in both. Bump later is one line.+- [x] Which send action: `gmail_send_email` vs legacy `send_email` — **Resolved by research:**+ identical props and `run`; `gmail_send_email` is the maintained one with the structured+ output schema.++## Changelog++- 2026-09-01 — Draft written after research and the two user decisions above (scope tier,+ attachments).+- 2026-09-01 — Pin changed 0.14.0 → 0.13.0 during execution (release-age policy); user decision.+- 2026-09-01 — Implemented; run log `.ai/runs/2026-09-01-gmail-workflow-piece.md`.+- 2026-09-01 — First consent failed at `markIntegrationInstalled` (FK to `integration`); added the+ `integration` row migration, fixed the rule's checklist, and made the callback log PostgREST details.+- 2026-09-01 — Third browser test (builder): the To field offered only a variable picker and the+ body was a one-line box. Builder: `list<string>` inputs are a chip field (one chip per entry) stored as+ a list (`fields/control.ts` `isWritableList`, `LiteralControl`); jobs: `LONG_TEXT` maps to+ `template: true`, and a new allowlist prop override `template` marks Gmail's `ShortText` body as+ prose. Slack's message and Calendar's description gain the multiline editor too.+- 2026-09-01 — Second browser test: account connected but read "Reconnect needed" at once — Google+ reports the `email` alias as `…/auth/userinfo.email`. Both Google rows now spell scopes+ canonically; `oauth.test.ts` refuses aliases; pitfalls block added above `PIECE_ALLOWLIST`.diff --git a/.ai/specs/implemented/2026-09-01-slack-single-source-of-truth.md b/.ai/specs/implemented/2026-09-01-slack-single-source-of-truth.mdnew file mode 100644index 0000000000..0cf7e6fe5d--- /dev/null+++ b/.ai/specs/implemented/2026-09-01-slack-single-source-of-truth.md@@ -0,0 +1,68 @@+# Slack: one source of truth — the Carbon Assistant becomes a consumer of a Slack connection++> Status: implemented (2026-09-01)+> Author: Aashu+> Date: 2026-09-01+> Supersedes: the "one card, two meanings" trade-off in `2026-09-01-slack-workflow-piece.md` (v1)++## TLDR++v1 put the Slack workflow piece on the existing Assistant card, which left **two stores of truth**:+the card and the Assistant read `companyIntegration.slack` (token in the integration vault,+`team_id`/`channel_id`/webhook in its metadata), while the workflow builder and step runner read+`integrationConnection` rows for piece `slack`. They diverged the moment one was set without the+other ("Installed · Healthy" on the card, "Connect Slack" in the builder). This spec makes+**`integrationConnection` the only place Slack credentials and workspace facts live**, exactly as+Google Calendar already works: `companyIntegration.slack` shrinks to the installed flag with+`metadata: {}`, Install becomes the piece consent (union of scopes, one popup), and every Assistant+reader (`getSlackAuth`, interactive slash commands, notifications incl. per-user DMs, issue thread+sync) resolves the company's **oldest Active** Slack connection. A one-time migration backfills+existing installs. Readers that had silently degraded since the Aug-17 vault scrub (`send-slack.ts`,+`interactive.ts`, `notify.ts` reading `metadata.access_token`) are fixed by construction.+Research: `.ai/research/2026-09-01-slack-workflow-piece.md` §3. Rule: `.claude/rules/workflow-integrations.md`.++## Goals++1. One consent installs Slack for both the Assistant and workflows; card, health, builder and Assistant all read the same rows.+2. `companyIntegration.slack` carries no token and no workspace facts (like `google-calendar`).+3. Existing installs keep working without re-consent (backfilled), including slash commands and issue thread sync.+4. No `if (pieceName === "slack")` in shared code; what Slack needs from the token response is data on the allowlist row.+5. Delete the Assistant's private OAuth flow (`integrations.slack.install.ts`, the `@slack/oauth` installer, `SLACK_STATE_SECRET`); keep the legacy redirect path as a forwarder so deployed environments need no env or Slack-app change.++## Non-Goals++Per-workspace Assistant settings; outbound multi-workspace routing beyond "oldest Active"; changing the Assistant's messages or the workflow actions; Slack triggers; non-OAuth auth.++## Design Decisions++| Decision | Choice | Rationale |+|---|---|---|+| Credential home | `integrationConnection` (piece `slack`) only | Already the model for Google Calendar; vault RPCs, refresh claim, Accounts UI, health and builder gating all exist. |+| `companyIntegration.slack` | Installed flag, `metadata: {}`, jsonschema `{properties:{}}`; `SECRET_KEYS.slack` removed | Identical to `google-calendar`. The `nonconformance_*` schema fields were read nowhere — dropped. |+| Install | The piece consent via `startIntegrationConnect`, like Google Calendar | One popup, one callback, one state signer (`SESSION_SECRET`). |+| OAuth app | Same `SLACK_CLIENT_ID` / `SLACK_CLIENT_SECRET` / `SLACK_OAUTH_REDIRECT_URL`; legacy `/api/integrations/slack/oauth` becomes a 302 forwarder onto the connections callback | Keeping the old env name and forwarding the old path means a deployed environment needs no env or Slack-app redirect change (user, 2026-09-01). |+| Scopes | Allowlist `oauth.scope` = 16 (Assistant's 10 + workflow's 6) | Slack scopes are additive per app+workspace; one bot serves both. `incoming-webhook` keeps Slack's channel picker, which is how the Assistant learns its channel. |+| Workspace facts | Allowlist `metadata: Record<connectionKey, tokenResponsePath>` + `accountLabel: { path }` | `connectionMetadataFrom(entry, body)` copies exactly the declared scalar paths: `team_id`, `team_name`, `bot_user_id`, `channel`, `channel_id`, `scopes`. **Not** the incoming-webhook URL — a bearer capability, and `metadata` is readable by every settings admin (review finding M4). |+| Outbound connection | Oldest Active connection for piece `slack` | User decision. Deterministic, no new column. |+| Inbound connection | Active row whose `metadata->>'team_id'` matches the event; **refused** (ephemeral message) when the workspace is linked to more than one company | One Slack app serves every tenant, so ambiguity is possible; acting in the wrong company is worse than refusing (review finding M8). |+| Token outside a workflow step | `readConnectionAccessToken` — Active + non-expiring only | Slack tokens do not expire; a refreshable vendor must use `resolveConnectionAuth`. |+| Backfill | One migration, idempotent; vault read BEFORE insert; no token → `Expired` + `lastError`; inactive → `Revoked` with no secret; `createdBy` = a user id that still exists (row's `updatedBy` → first member → skip with NOTICE) | Review findings M3: never an Active row without a secret, never a 23503 from a stale user id. |+| Backfilled scopes | `metadata.scopes` records the 10 Assistant scopes; not re-consented automatically | Surfaced by `2026-09-01-connection-reconnect-prompts.md`. |+| Uninstall | `revokeConnectionsForPiece` (unchanged) | One path. |++## Acceptance Criteria (all met, see run log)++Metadata pick returns the declared keys only; migration leaves one Active connection with a vault secret and a stripped card row, and is a no-op on re-run; `readConnectionAccessToken` refuses non-Active/expiring; `getSlackWorkspace` = oldest Active (as built, the oldest one with a webhook channel comes first); consent `scope` = 16 unique, no `user_scope`; forwarder 302s `?code&state` to the callback; `install.ts` and `SLACK_STATE_SECRET` gone; `send-slack`, `notify`, `slack-document-sync`, `interactive` all resolve the per-company token through `getSlackWorkspace`; package tests and typechecks pass.++## Open Questions++- [x] One store or two? — one; `integrationConnection` (user).+- [x] Which connection when several exist? — oldest Active outbound (user); inbound by `team_id`, ambiguous → refuse.+- [x] How does the callback learn `team_id`/channel without Slack-specific code? — allowlist path map + `accountLabel.path`.+- [x] New redirect env var or keep the old one? — keep `SLACK_OAUTH_REDIRECT_URL`; legacy route forwards (user).++## Changelog++- 2026-09-01 — Draft after the divergence surfaced in dev; implemented the same day.+- 2026-09-01 — Revised after review: no new env var; forwarder kept.+- 2026-09-01 — Thermo-nuclear remediation folded in (M3 migration hardening, M4 no webhook URL in metadata, M8 ambiguity refusal, B1 `notify.ts`).diff --git a/.ai/specs/implemented/2026-09-01-slack-workflow-piece.md b/.ai/specs/implemented/2026-09-01-slack-workflow-piece.mdnew file mode 100644index 0000000000..e78fb3255d--- /dev/null+++ b/.ai/specs/implemented/2026-09-01-slack-workflow-piece.md@@ -0,0 +1,271 @@+# Slack as a workflow integration piece++> **Superseded in part (2026-09-01):** the card/credential model and every mention of+> `SLACK_CONNECTIONS_REDIRECT_URL` below were replaced by `2026-09-01-slack-single-source-of-truth.md`+> — `SLACK_OAUTH_REDIRECT_URL` keeps its name and `api+/integrations.slack.oauth.ts` forwards to the+> connections callback. The allowlist/`omit`/generator changes stand.++> Status: implemented (2026-09-01)+> Author: Aashu+> Date: 2026-09-01++## TLDR++Add `@activepieces/piece-slack` as the second row of `PIECE_ALLOWLIST`, so a workflow can+**send a message to a channel, send a message to a user, find a user by email, and create a+channel** as `integration` nodes. The piece lives **on the existing Slack (Assistant) card**+under id `slack`, connects through the **same Slack app** with a **bot-only, narrowed scope+set**, and stores per-account connections in `integrationConnection` exactly like Google+Calendar. Three small generic host changes fall out of it (an `omit` prop override, allowlist+`oauth.authUrl`/`scope` overrides, and a "mark installed" that never clobbers an existing+row). No migration. Research: `.ai/research/2026-09-01-slack-workflow-piece.md`. Rule:+`.claude/rules/workflow-integrations.md` (the "Adding a piece" checklist is followed here,+with the deviations called out).++## Problem Statement++Workflows can call exactly one vendor (Google Calendar). Slack is the obvious second: it is+where shop-floor and office notifications already land, and Carbon already owns a Slack app+(the Carbon Assistant), so the one real gate for a new piece — a registered, reviewable OAuth+app — is already passed. But the Assistant already holds the card id `slack`, and the whole+workflow-integration design keys the card, the allowlist, the hooks, the connections table+and the builder's "Connect" link on `card id === piece name`. The piece cannot be dropped in+by the checklist alone; the two have to share one card without sharing code paths.++## Goals++1. Four Slack steps in the builder's Integration node, with fetched channel/user dropdowns,+ typed outputs, and the ordinary connection picker.+2. One Slack card in Settings → Integrations: Install = Assistant (unchanged), Accounts tab =+ workflow connections (add / rename / disconnect), health reflects both.+3. Consent asks for the **bot scopes the four steps need, and nothing else** — no user token.+4. Every host change is generic (data on the allowlist or a rule that applies to all pieces);+ no `if (pieceName === "slack")` anywhere.+5. The Assistant keeps working unchanged whether or not workflow accounts exist.++## Non-Goals++- Slack triggers (webhook lifecycle) — unchanged v1 non-goal.+- Send-as-user / react-as-user paths (they need `auth.data.authed_user`, a user token, and+ user scopes). Deliberately unreachable.+- More than the four actions. Adding one later is an allowlist edit plus a scope check.+- Making the Assistant install create a workflow connection (one consent for both). Two+ consents, two token rows; Slack keeps scopes additive per app+workspace so this is safe.+- A separate "Slack (Workflows)" card, or renaming the Assistant's id.+- Storing the vendor's full token response (`auth.data`) — not needed for bot-only actions.++## Proposed Solution++### Design Decisions++| Decision | Choice | Rationale |+|---|---|---|+| Card identity | Allowlist key **`slack`** = existing card id | User decision (Q1). One Slack card; the Accounts tab, hooks, health and builder link all key off the id with no new mapping. Cost: the card now means two things — mitigated below. |+| OAuth app | Same `SLACK_CLIENT_ID` / `SLACK_CLIENT_SECRET`; new `SLACK_CONNECTIONS_REDIRECT_URL` | Slack scopes are additive per app+workspace and earlier tokens stay valid (docs.slack.dev/authentication/installing-with-oauth), so one app serves both installs. The redirect differs because the piece callback is `/api/integrations/connections/callback`, not the Assistant's route. |+| Scopes | Bot-only, narrowed, via new allowlist `oauth.scope` + `oauth.authUrl` overrides | User decision (Q2). The piece's `authUrl` bakes in 17 user scopes and asks 30 bot scopes; we request the 10 the four actions and their dropdowns use. Data on the row, not a branch. |+| Actions | `send_channel_message`, `send_direct_message`, `slack-find-user-by-email`, `slack-create-channel` | User decision (Q3). These are the `DROPDOWN`-bearing variants (fetched channel/user lists); all four ship an `outputSchema`. |+| Unusable props | New `AllowlistPropOverride.omit` (+ optional `value`) | `hidden` demotes to Advanced, where an author could still flip `sendAsBot` off or enable `mentionOriginFlow` and hit a host capability we refuse. `omit` removes the prop from both maps; a pin still applies at run time. Required + omit without value fails the generator. |+| `MARKDOWN` props | Auto-omitted by the generator | Activepieces `Property.MarkDown` is display-only and never collects a value; it is not an input. |+| Unmappable optional props (`FILE`, `JSON`) | Still fail the generator unless explicitly `omit`ted | Keeps "refuse, never degrade": a human decides per prop; nothing is dropped silently. |+| Mark-installed in the callback | Insert-if-absent / re-activate; **never overwrite metadata** | Today's `upsertCompanyIntegration(metadata: {})` would wipe the Assistant's `team_id`, `channel_id`, webhook url. Generic and idempotent; Google Calendar is unaffected. |+| Assistant row without a bot token | `getSlackAuth` returns `null` when the merged metadata has no `access_token` | A row can now be "installed" by a workflow connection alone. The Assistant must treat that as not connected, not crash on `undefined`. |+| Health / Uninstall | `hooks.server.ts` `slack` entry: `pieceConnectionsHealthy` + `revokeConnectionsForPiece` | Same one-liner as Google Calendar. Uninstall disconnects the Assistant **and** revokes workflow accounts — one card, one Uninstall. |+| Builder "Connect" link | `path.to.integration(piece)` + `?tab=connections` for every piece | On the merged card the big Install button installs the Assistant; the builder must land the author on Accounts → Add account. Harmless for Google Calendar. |+| Card gating | Unchanged (`CONTROLLED_ENVIRONMENT === false`) | The Assistant already needs `SLACK_CLIENT_ID`; an unconfigured server returns the existing `not-configured` error from the connect route. No browser env change (checklist step 4 is N/A). |+| Token refresh | None — `expiresAt` null | Slack bot tokens do not expire without token rotation; `expiringSoon(null)` is already false. |+| Slack's `200 { ok:false, error }` | `readTokenResponse` names `body.error` in the thrown message | Slack rejects with HTTP 200. The message reaches server logs only; the browser still gets an error code. |+| Account label | `GET https://slack.com/api/auth.test` → `team` | Workspace name tells two connections apart; existing best-effort `accountLabelFor`. |++### 1. Allowlist row++`packages/jobs/src/workflows/integrations/allowlist.ts`:++```ts+slack: {+ package: "@activepieces/piece-slack",+ version: "0.17.9", // exact; assertPinnedVersions gates it+ label: "Slack",+ actions: [+ "send_channel_message",+ "send_direct_message",+ "slack-find-user-by-email",+ "slack-create-channel"+ ],+ oauth: {+ clientIdEnv: "SLACK_CLIENT_ID",+ clientSecretEnv: "SLACK_CLIENT_SECRET",+ redirectUrlEnv: "SLACK_CONNECTIONS_REDIRECT_URL",+ authUrl: "https://slack.com/oauth/v2/authorize", // drops the piece's user_scope+ scope: [+ "channels:read", "groups:read", // channel dropdown (conversations.list)+ "chat:write", "chat:write.public", // post; public channels the bot has not joined+ "chat:write.customize", // username / icon props+ "im:write", // DM (conversations.open)+ "users:read", "users:read.email", // user dropdown, lookupByEmail+ "channels:manage", "groups:write" // create public / private channel+ ]+ },+ accountLabel: { url: "https://slack.com/api/auth.test", field: "team" },+ props: {+ send_channel_message: {+ sendAsBot: { omit: true, value: true },+ mentionOriginFlow: { omit: true },+ file: { omit: true },+ blocks: { omit: true }+ },+ send_direct_message: {+ mentionOriginFlow: { omit: true },+ blocks: { omit: true }+ }+ }+}+```++`AllowlistEntry.oauth` gains optional `authUrl?: string` and `scope?: readonly string[]`.+`AllowlistPropOverride` gains `omit?: boolean`.++### 2. Generator (`integrations/catalog.ts`, `visibility.ts`, `properties.ts`)++- `visibilityOf` returns a third shape `{ show: false, omit: true, value? }` when the override+ says `omit`, or when `property.type === "MARKDOWN"`.+- The prop loop consults visibility **first**; an omitted prop is skipped before `toValueType`+ runs, so an unmappable type is only ever an error for a prop that would be rendered.+- `assertHiddenPropIsSatisfied` already fails a required prop with no value; it applies to+ omitted props too (`sendAsBot` is required, hence `value: true`).+- An omitted prop with a `value` is a pin, like a hidden one. `toPropsValue` sends+ `sendAsBot: true` at run time and never stores it on a node. (As built, `toPropsValue`+ reads the pins from `visibilityOf` in one pass; `pinnedValues` does not exist.)+- `toPropsValue` never sends a `MARKDOWN` prop (there is no input to read).++### 3. Consent URL (`integrations.connections.$piece.connect.ts`)++`new URL(entry.oauth.authUrl ?? auth.authUrl)` and `scope = (entry.oauth.scope ?? auth.scope).join(" ")`.+The Google-specific `access_type` / `prompt` params stay; Slack ignores them.++### 4. Callback (`integrations.connections.callback.ts`)++Replace the unconditional `upsertCompanyIntegration(..., metadata: {})` with a+`markIntegrationInstalled(client, { id, companyId, updatedBy })` in `settings.server.ts`:+read the row; if absent insert `{ active: true, metadata: {} }`; if present and inactive set+`active: true` only; if present and active do nothing. Metadata and `secretRef` are never+touched. Cache invalidation as today.++### 5. Assistant hardening (`packages/ee/src/slack/lib/service.ts`)++`getSlackAuth` returns `null` when `metadata.access_token` is not a non-empty string.+`send-slack.ts` already falls back to the env token when no per-company token resolves —+verified in the plan, not changed.++### 6. Settings card (`packages/ee/src/slack/config.tsx`, `hooks.server.ts`)++- Copy: `shortDescription` / `description` mention both uses ("Use the Carbon Assistant in+ Slack, and let workflows post to your channels."). `defineIntegration` copy is plain+ strings on every card today (Google Calendar included) and is rendered untranslated, so this+ edit follows that convention; making card copy Lingui-aware is a cross-card change outside+ this spec.+- `hooks.server.ts` gains the `slack` entry (health + uninstall one-liners).+- The Accounts tab, Add account, rename and Disconnect come for free from+ `PIECE_ALLOWLIST["slack"]` in `integrations.$id.tsx`.++### 7. Builder++No vendor code. `IntegrationNodeForm`'s Connect link gains `?tab=connections`. The generated+catalog emits `integration.slack.<action>` for the four steps, label "Slack", inputs per §1/§2,+outputs from each action's `outputSchema` (+ `count`, `result`).++### 8. Environment++- `packages/env/src/index.ts`: `SLACK_CONNECTIONS_REDIRECT_URL` (server-only, beside+ `SLACK_OAUTH_REDIRECT_URL`).+- `.env.example`, `sst.config.ts`, `ci/src/deploy.ts`: wired the same way `SLACK_OAUTH_REDIRECT_URL` is.+- Slack app manifest (manual, the real gate): add the redirect URL and the 10 bot scopes.++## Data Model Changes++None. `integrationConnection.pieceName = 'slack'` rows reuse the existing table, RLS and+vault RPCs. `companyIntegration.slack` keeps its current jsonschema.++## API / Service Changes++- `PIECE_ALLOWLIST`: new row; `AllowlistEntry.oauth.{authUrl,scope}`, `AllowlistPropOverride.omit`.+- `visibilityOf` / catalog prop loop: omit semantics, MARKDOWN auto-omit.+- Connect route: allowlist overrides win over the piece's `authUrl` / `scope`.+- `settings.server.ts`: `markIntegrationInstalled` (new); callback uses it.+- `connections.ts` `readTokenResponse`: includes `body.error` in the message when present.+- `getSlackAuth`: null-guard.+- `hooks.server.ts`: `slack` entry.++## UI Changes++- Slack card copy; Accounts tab appears on it.+- Builder: Integration node lists "Slack" with four steps; Connect link deep-links to Accounts.+- New builder/catalog copy is Lingui-translatable (the generator emits `msg` strings). Card+ copy stays a plain string per the existing `defineIntegration` convention (see §6).++## Acceptance Criteria++1. `pnpm run generate:workflow-catalog && pnpm run check:workflow-catalog` pass with the+ Slack row; `actions.generated.ts` contains exactly four `integration.slack.*` steps.+2. `integration.slack.send_channel_message` has visible inputs `connectionId`, `channel`+ (options provider `integration.property`), `text`, `threadTs`, `username`, `profilePicture`,+ `iconEmoji`, `replyBroadcast`, `unfurlLinks` (optional-with-default props stay visible under+ the existing rules); no Advanced inputs; **no** `info`, `file`, `blocks`, `sendAsBot`,+ `mentionOriginFlow` in either map. `send_direct_message` likewise has no+ `blocks` / `mentionOriginFlow`.+3. A generator run on a fixture piece with an optional `JSON` prop and no `omit` override+ still fails with `UnmappablePropertyError`; with `omit: true` it passes; a required prop+ with `omit: true` and no `value` fails with the "hidden with no value" error.+4. `toPropsValue` for `send_channel_message` with inputs `{ channel, text }` yields+ `sendAsBot: true` and no `info` / `mentionOriginFlow` / `blocks` / `file` keys.+5. `GET /api/integrations/connections/slack/connect` returns a URL on+ `https://slack.com/oauth/v2/authorize` whose `scope` is the 10 scopes above and which has+ **no** `user_scope` parameter; `client_id` is `SLACK_CLIENT_ID`; `redirect_uri` is+ `SLACK_CONNECTIONS_REDIRECT_URL`.+6. Callback on a company whose `companyIntegration.slack` row already holds Assistant+ metadata: after connecting, the row's `metadata` and `secretRef` are byte-identical to+ before and `active` is true. On a company with no row: a row with `metadata: {}` exists.+7. `getSlackAuth` returns `null` (no throw) for an active `slack` row whose vault/metadata has+ no `access_token`.+8. Settings → Integrations → Slack shows the Accounts tab; Add account opens the Slack consent+ popup; a connected account lists with the workspace name as its label; Disconnect sets it+ Revoked; Uninstall revokes remaining accounts and deactivates the Assistant.+9. In the builder, with no Slack account the Integration node shows "Connect Slack" linking to+ `/x/settings/integrations/slack?tab=connections`; with one account the connection field is+ hidden and its id stored on the node; the channel dropdown lists public and private channels.+10. A published workflow with a `send_channel_message` step posts to the chosen public channel+ without the bot being invited; the run's outputs expose the projected message fields and+ `result`.+11. Google Calendar's generated catalog is unchanged except for the Connect link query string.++## Risks++- **One card, two meanings.** "Installed" now lights up when only a workflow account exists;+ the Assistant's own features do nothing until its Install runs. Mitigated by the copy and the+ `getSlackAuth` guard; accepted by the user in Q1.+- **Uninstall is shared.** Removing the Assistant also revokes workflow accounts (and vice+ versa there is no partial uninstall). Documented in the deactivate flash copy if it proves+ confusing.+- **Manifest drift.** A scope requested but not declared in the Slack app manifest fails at+ consent with `invalid_scope`. The 10 scopes are listed in one place (the allowlist row) so+ the manifest can be diffed against it.+- **Private channels** still require inviting the bot; `chat:write.public` covers public+ channels only. The piece surfaces Slack's `not_in_channel` as the step error.+- **Same bot, more scopes.** Connecting a workflow account adds scopes to the Assistant's+ existing bot token (Slack additive scopes). Harmless, but visible to a workspace admin.++## Open Questions++- [x] Card identity: separate card vs merge into `slack` vs bridge to the Assistant token —+ **Answer:** merge into the existing `slack` card (user, 2026-09-01). Consequences: never+ overwrite the row's metadata; guard `getSlackAuth`; deep-link the builder to Accounts.+- [x] Scopes: piece defaults (30 bot + 17 user) vs bot-only narrowed vs widen the Assistant+ install — **Answer:** bot-only, narrowed to the 10 the four actions need, via allowlist+ `oauth.authUrl` / `oauth.scope` overrides (user, 2026-09-01).+- [x] Action set — **Answer:** core four: send to channel, send to user, find user by email,+ create channel (user, 2026-09-01).++## Changelog++- 2026-09-01 — Draft written after the three questions above were resolved.+- 2026-09-01 — Implemented; run log at `.ai/runs/2026-09-01-slack-workflow-piece.md`.+- 2026-09-01 — Card/credential model superseded by `2026-09-01-slack-single-source-of-truth.md` (the Assistant now consumes the Slack connection; no second store).diff --git a/.ai/specs/implemented/2026-09-04-integration-datetime-inputs.md b/.ai/specs/implemented/2026-09-04-integration-datetime-inputs.mdnew file mode 100644index 0000000000..a265cc3bce--- /dev/null+++ b/.ai/specs/implemented/2026-09-04-integration-datetime-inputs.md@@ -0,0 +1,438 @@+# Generic date + time inputs for integration steps++> Status: implemented+> Author: Aashu+> Date: 2026-09-04++## TLDR++An Activepieces `DATE_TIME` property renders as a date-only picker in the workflow+builder, so "Start date time of the event" on Google Calendar's Create Event cannot+be given a time. The piece requires one. Carry the vendor's own distinction between+a *date* and a *date-time* through the catalog as a presentation flag+(`precision: "datetime"`), and render `DateTimePicker` — already in `@carbon/react`+— for any input carrying it. The stored value becomes a full ISO instant resolved+against the **company timezone**, per `.claude/rules/date-handling.md`. This is a+generic catalog capability: every current and future piece `DATE_TIME` prop adapts+with no allowlist edit, and Carbon's own date inputs are untouched.++## Problem Statement++`google_calendar.create_google_calendar_event` declares:++```js+start_date_time: q.DateTime({ displayName: "Start date time of the event", required: true })+```++`toValueType` maps `DATE_TIME` to `t.date`+([properties.ts:92](packages/jobs/src/workflows/integrations/properties.ts#L92)), and+`LiteralControl`'s `date` branch renders `<DatePicker>`+([LiteralControl.tsx:215-224](apps/erp/app/modules/workflows/ui/Builder/fields/LiteralControl.tsx#L215-L224))+writing `YYYY-MM-DD` via `date.toString()`. There is no way to enter a time.++Two consequences, both live today:++1. **The author cannot express what the vendor requires.** A calendar event has a+ start *moment*, not a start day.+2. **What we do send is ambiguous.** The piece runs+ `dayjs(start_date_time).format("YYYY-MM-DDTHH:mm:ss.sssZ")`, which parses in the+ **worker's** local timezone. `"2026-09-10"` becomes midnight in whatever zone the+ job happens to run in — so the same workflow produces a different moment+ depending on infrastructure. The bug is not only the missing time picker; it is+ that a date-only literal is an underspecified instant.++The information was never missing — the piece told us the property was a+`DateTime` and we discarded that when mapping it to `t.date`.++## Proposed Solution++Carry the vendor's distinction through as a **presentation flag**, exactly as+`template?: boolean` already carries "this prose wants the multiline editor".++### Why not a new `PrimitiveKind`++A `"datetime"` primitive would ripple through `OPERATORS_BY_TYPE`, `operatorsForType`,+`compare.ts`, `values.ts`, `describeType`, `build.ts`'s `propertyType`, every+`switch` over `PrimitiveKind`, and would make a piece's datetime incomparable with a+Carbon `dueDate` in a condition. It buys nothing: the runtime already treats a+`date` value as an arbitrary `Date.parse`-able string+([types.ts:278](packages/workflows/src/definition/types.ts#L278),+[compare.ts:14-19](packages/workflows/src/runtime/compare.ts#L14-L19)), and+`fromColumn` already normalises a date column to a full ISO instant via+`parsed.toISOString()`+([values.ts:105-109](packages/workflows/src/runtime/values.ts#L105-L109)).++So a value carrying a time is **already legal** in the type it has. Only the+*control* was wrong. This is a presentation problem and gets a presentation fix.++### The flag++```ts+/** The input is a moment, not a calendar day: the builder renders a date AND time+ * picker, and stores a full ISO instant. A vendor's DATE_TIME; never a Carbon+ * business date, which is a day on the company's calendar and has no time. */+precision?: "datetime";+```++An optional string literal rather than a boolean (`datetime: true`) so a future+`"time"`-only or `"month"` vendor property extends the same field instead of+adding a second flag that can contradict the first. Absent means date-only —+every existing input keeps its exact behaviour, and the generated catalog diff is+limited to the props that actually changed.++Derived in one place:++```ts+// properties.ts+case "DATE_TIME":+ return { ...base, type: DATE, precision: "datetime" };+```++That single line is what makes this generic. Any piece we allowlist later —+Outlook Calendar, Calendly, Notion — gets a working time picker with no further+edit, because every piece declares its date-times as `DATE_TIME`.++### Timezone: the company's, per the existing documented handling++`.claude/rules/date-handling.md` already settles this: *"a form default that will be+persisted as a business date must use `useCompanyToday()` — the stored value belongs+to the company's calendar, not to whichever zone the person filling the form happens+to be in."* The same reasoning applies to a moment.++`useCompanyTimeZone()`+([useCompanyTimeZone.tsx:12](apps/erp/app/hooks/useCompanyTimeZone.tsx#L12)) reads+`company.timezone` (a NOT NULL column) off the authenticated root loader+synchronously. The builder routes live under `x+/workflows+/`, so it is available.++The conversion copies the existing wall-clock→instant pattern from+[ShiftsTable.tsx:82-85](apps/erp/app/modules/people/ui/Shifts/ShiftsTable.tsx#L82-L85):++```ts+toZoned(calendarDateTime, companyTimeZone).toAbsoluteString()+// → "2026-09-10T15:00:00.000-05:00"+```++Reading back for display is the inverse: `parseAbsolute(stored, companyTimeZone)`+→ `toCalendarDateTime`, so re-opening a saved node shows the same wall clock the+author typed. No JS `Date` anywhere on the path.++The vendor then receives an unambiguous instant, and `dayjs(...).format(...)`+reproduces that same moment regardless of which zone the worker runs in — which+also fixes the second half of the problem statement.++**Rejected: resolving the timezone server-side.** `runIntegrationAction` has+`client` and `companyId` in scope and could resolve it at run time+([integration.ts:49-56](packages/jobs/src/workflows/actions/integration.ts#L49-L56)).+But "3 PM" is the author's intent, known only at authoring time; resolving late+would mean reinterpreting a value that is already a stored instant, and would give+a ref from an upstream step (already an instant) different treatment from a literal.+Resolve once, at the point the human expresses the intent.++**Rejected: the browser's timezone.** Two admins in different offices editing the+same workflow would store different moments for the same typed time, and the value+would silently depend on who last touched the node.++### Design Decisions++| Decision | Choice | Rationale |+|----------|--------|-----------|+| Represent a datetime | Presentation flag on the input, keep `t.date` | Runtime already accepts a full ISO string for `date`; a new `PrimitiveKind` ripples through operators/compare/coercion and would make a vendor datetime incomparable with a Carbon date |+| Flag shape | `precision?: "datetime"` | Extensible to `"time"`/`"month"` later without a second contradicting boolean; absent = today's behaviour, so the catalog diff stays minimal |+| Where derived | `toValueType`'s `DATE_TIME` case, one line | Generic by construction — every piece declares date-times as `DATE_TIME`, so future pieces need no allowlist edit |+| Which props get it | Every `DATE_TIME` prop, automatically | The vendor already told us the type; mapping it to date-only is discarding information |+| Carbon-native date inputs | Unchanged | `dueDate`/`orderDate`/`postingDate` are business days with no meaningful time; they carry no flag and keep `DatePicker` |+| Timezone | Company timezone via `useCompanyTimeZone()` | The documented rule for persisted business values; `company.timezone` is NOT NULL and already on the authenticated root loader |+| Stored format | Full ISO instant with offset | Unambiguous for `dayjs` in the piece; identical in shape to what `fromColumn` already produces for refs |+| Control | `DateTimePicker` from `@carbon/react` | Already exists with calendar + time field; no new component. `@internationalized/date` is already a dependency of both `erp` and `packages/workflows`, so no new dependency anywhere |+| Allowlist override | None | Nothing to override — the vendor's own type is the signal. Adding an override would reintroduce the per-piece edit this fix removes |++## Data Model Changes++N/A — no migration. The flag lives in the generated workflow catalog (a committed+TypeScript file), and the stored node value keeps its existing+`{ kind: "literal", type: { kind: "primitive", of: "date" }, value: string }` shape.+`literalValueMatchesType` already accepts a full ISO string for `date`.++## API / Service Changes++No route, loader, action or service function changes. No server-side change at all:+the value arrives at `toPropsValue` already correct.++The flag is threaded through the catalog types and the generator:++| File | Change |+|------|--------|+| `packages/workflows/src/catalog/actions.ts` | declare `precision` on `ActionInputLike` |+| `packages/workflows/src/catalog/build.ts` | declare on `BuiltActionInput`; copy `spec.precision` in `buildDeclaredInputs` (a hand-written field list — an unlisted field is silently dropped); add a `validateCatalogInputs` rule that `precision` requires a `date` type |+| `packages/workflows/src/definition/catalog.ts` | declare on `CatalogInput` (what consumers read) |+| `packages/jobs/src/workflows/integrations/properties.ts` | declare on `MappedProperty`; set it in the `DATE_TIME` case |+| `packages/jobs/src/workflows/integrations/catalog.ts` | copy it into the emitted `declared` literal (also a hand-written field list) |+| `packages/workflows/src/catalog/actions.generated.ts` | regenerated — `generate-workflow-catalog.ts` emits via `JSON.stringify`, so the field carries automatically |++`scripts/check-workflow-catalog.ts` compares with `assert.deepStrictEqual` on whole+objects, so it picks the field up with no registration — and will fail loudly until+the catalog is regenerated.++## UI Changes++The builder's integration and action node forms. No new page, no new route.++| File | Change |+|------|--------|+| `fields/types.ts` | add `precision` to `ValueFieldProps` |+| `config/forms/StepInput.tsx` | forward `inputDef.precision` in the `ValueField` fallthrough (hand-picked prop list) |+| `fields/ValueField.tsx` | destructure and forward to `LiteralControl` (hand-picked prop list) |+| `fields/LiteralControl.tsx` | in the `date` branch, render `DateTimePicker` when `precision === "datetime"`, else the existing `DatePicker` |+| `config/forms/ComputeForm.tsx` | renders `ValueField` directly; passes nothing, so it keeps date-only — correct, as compute inputs are Carbon-typed |++`@internationalized/date` is already in `packages/workflows`' four-dependency runtime set and is+already imported by `LiteralControl` (`parseDate`), so `toZoned`/`toCalendarDateTime`/+`parseAbsolute` add nothing new to the browser bundle.++`pickControl` is untouched — it already returns `"literal"` for a date, and the+choice between the two pickers is internal to `LiteralControl`.++The variable path is unaffected: `{` still opens the variable menu, and a ref to an+upstream date still renders as a chip. Only the literal control changes.++**Copy**: `DateTimePicker`'s internal "Time" label and its `aria-label`s are the+component's own, and the field's own label comes from the vendor via the translated+label catalog. Any new user-facing string this change introduces goes through Lingui+(`t\`\``), consistent with the rest of `LiteralControl`.++## Acceptance Criteria++- [ ] On a Google Calendar "Create Event" node, "Start date time of the event"+ renders a picker with both a calendar and a time field; entering+ `2026-09-10` `3:00 PM` and saving stores an ISO instant whose offset is the+ company's timezone for that date.+- [ ] Re-opening that saved node displays `2026-09-10` and `3:00 PM` again — the+ same wall clock that was typed, not a shifted one.+- [ ] Running the node creates a Google Calendar event at 3:00 PM company time, and+ does so identically when the worker's `TZ` is set to something else+ (verifiable by running the mapping with two different `TZ` values).+- [ ] "End date time of the event" (optional, same `DATE_TIME` type) also renders a+ time picker; left empty, the event still defaults to start + 30 min.+- [ ] A Carbon-native action with a date input (e.g. a job's `dueDate`) still+ renders the date-only `DatePicker` and still stores `YYYY-MM-DD`.+- [x] `pnpm run check:workflow-catalog` passes after regenerating, and the generated+ diff shows `precision: "datetime"` on exactly the `DATE_TIME`-derived inputs+ and on nothing else.+- [x] A date value from an upstream step can still be dropped into a datetime input+ via `{`, and a datetime input still participates in conditions as a date.+- [x] `pnpm exec turbo run typecheck --filter=@carbon/workflows --filter=@carbon/jobs --filter=erp` and `pnpm run test` pass.++## Risks++| Risk | Severity | Mitigation |+|------|----------|------------|+| An existing saved node holds a `YYYY-MM-DD` literal for a now-datetime input | Low | `parseAbsolute` fails on a date-only string, so the read-back helper falls back to parsing it as a calendar date at midnight company time — the same moment it effectively meant before, and the author can now set a real time. No migration; nothing crashes. |+| `buildDeclaredInputs` and the integrations `declared` literal are hand-written field lists | Med | Both are named explicitly in the plan; the catalog staleness check (`deepStrictEqual`) fails loudly if either is missed, so this cannot ship silently broken. |+| Company timezone unavailable before layout route data resolves | Low | `useCompanyTimeZone()` already falls back to `"UTC"`; the builder is deep inside `/x`, so the loader has run by the time a node form renders. |+| `DateTimePicker` is less exercised than `DatePicker` in this codebase | Low | It is an existing shipped component built on the same `@react-aria` primitives; verify in the real builder before calling this done. |+| DST: a wall time that does not exist (spring-forward gap) | Low | `toZoned`'s default `"compatible"` disambiguation shifts forward rather than throwing, per `.claude/rules/date-handling.md`. A 2:30 AM event on transition day resolves to 3:30 AM instead of failing. |++## Open Questions++> All resolved before this spec was written.++- [x] Whose timezone does a picked wall-clock time mean? — **Answer:** The company's,+ via the existing documented handling the user pointed to:+ `useCompanyTimeZone()` reading `company.timezone` off the authenticated root+ loader, with `toZoned(...).toAbsoluteString()` as in `ShiftsTable`, per+ `.claude/rules/date-handling.md`. Not the browser's (two admins in different+ offices would store different moments) and not UTC (the author types 3 PM and+ the meeting appears at 8 AM).+- [x] Every `DATE_TIME` prop, or opt-in per prop via the allowlist? — **Answer:**+ Every one, automatically. The piece already declared the type; an opt-in list+ would leave the default broken and require a manual edit per new piece, which+ is exactly what this fix removes.+- [x] Should Carbon's own date inputs (`dueDate`, `orderDate`, `postingDate`) change?+ — **Answer:** No. They are business days on the company's calendar with no+ meaningful time-of-day, and adding one would change what is written to those+ date columns.+- [x] New `PrimitiveKind` or a presentation flag? — **Answer:** Presentation flag.+ Settled by the codebase: the runtime already accepts a full ISO string for a+ `date` (`literalValueMatchesType`, `compare.orderable`, `fromColumn`), so a new+ kind would add ripple across operators/compare/coercion for no capability, and+ would break comparing a vendor datetime with a Carbon date in a condition.+- [x] Boolean `datetime: true` or `precision?: "datetime"`? — **Answer:** `precision`.+ A future `"time"`-only or `"month"` vendor property extends the same field+ instead of adding a second flag that could contradict the first.++## Changelog++- 2026-09-04: Created. Research: `.ai/research/datetime-input-plumbing.md`.+- 2026-09-04: Implemented per `.ai/plans/2026-09-04-integration-datetime-inputs.md`.+ `precision?: "datetime"` added to `ActionInputLike`, `BuiltActionInput` and+ `CatalogInput`; copied through `buildDeclaredInputs`; validated by a new+ `validateCatalogInputs` rule (precision requires a `date` type); derived in+ `toValueType`'s `DATE_TIME` case and carried through the integrations+ `declared` literal. Catalog regenerated — exactly four integration inputs+ gained the flag (`start_date_time`, `end_date_time` on Create Event;+ `start_date`, `end_date` on the events action), all inside+ `WORKFLOW_INTEGRATION_CATALOG`; no Carbon-native action input changed.+ `LiteralControl` renders `DateTimePicker` for a flagged input, resolving the+ wall clock against `useCompanyTimeZone()` and storing+ `toZoned(...).toAbsoluteString()`; a legacy `YYYY-MM-DD` literal falls back to+ midnight on the company calendar rather than throwing.+ Verified: scoped typechecks, `check:workflow-catalog`, full `pnpm run test`+ (696 jobs tests among them), `pnpm run lint`, and a round-trip proof that+ 3:00 PM America/Chicago stores as `2026-09-10T20:00:00.000Z` and reads back as+ `15:00`, resolving to the same instant under TZ=UTC and TZ=Asia/Kolkata.+ Browser verification in the running builder still outstanding.++## Addendum — time-picker UX (2026-09-04)++The first implementation reused `@carbon/react`'s `DateTimePicker` as-is. Its+time slot was `TimePicker`, a **segmented spinner**: hh / mm / AM-PM as three+separate cells, each accepting only digits or arrow keys, with nothing to pick+from. Tabbing through segments to enter a meeting time is poor UX, so the time+slot was replaced.++`packages/react/src/Date/TimeCombobox.tsx` — a plain text input plus a popover+list of quarter hours:++- **Type freely.** The input holds raw text while focused and is interpreted only+ when the person is done (blur or Enter), so nothing fights the keystrokes.+- **Validate then revert.** `parseTypedTime` (`@carbon/utils`) reads `3`, `3p`,+ `3 pm`, `3:07pm`, `15:30`, `1530`, `930`. Text that is not a time — `25:00`,+ `3:75`, `13pm`, `abc` — reverts to the last valid value **silently**, and is+ never clamped: a silently corrected time is a meeting at the wrong hour that+ nobody notices. Escape abandons an edit the same way.+- **Pick from a list.** All 96 quarter hours on a **24-hour clock**, filtered as+ you type — `15` shows 15:00–15:45, `3` also reaches 03:00–03:45 (labels are+ zero-padded, so the filter matches unpadded too), `1530` finds 15:30 and `3pm`+ still lands on 15:00. Opens scrolled to the current value, or 09:00 when empty. Selection uses `onMouseDown`, because the input's blur+ would otherwise fire first and commit the half-typed draft over the choice.++### Decisions++| Decision | Choice | Rationale |+|----------|--------|-----------|+| Where the fix lands | The shared `@carbon/react` `DateTimePicker` | One implementation. MES job steps, API key expiry and the 4 Maintenance forms get the same improvement instead of Carbon growing a second time picker that drifts |+| List granularity | 15 minutes (96 entries) | What calendar apps offer; 30-minute steps miss the :15 and :45 people actually book. Free text still accepts any minute |+| Clock | 24-hour (`15:30`), via a new opt-in `hour24` argument on `formatTimeOfDay` | A dropped AM/PM is a meeting twelve hours out; `15:30` cannot be misread. Opt-in rather than global — Shifts, PeopleCard and PeopleHoursModal share `formatTimeOfDay` and keep their locale-driven 12-hour display. The parser still ACCEPTS `3pm`, so nobody's typing habit breaks |+| Invalid input | Revert silently to the last valid value | What the user asked for, and it matches how Carbon's number inputs already behave on blur |+| Parser location | `@carbon/utils` beside `formatTimeOfDay` | It is the inverse of that function and is unit-testable without a DOM; 6 new test cases cover the accepted and refused forms |++`TimePicker` is left exported and untouched — it is still the right control where+a bare time-of-day field is wanted, and removing it is not this change's business.++**Note:** `no-raw-rounding` (a real conformance check, not a style rule) rejected a+`Math.floor(minutes / 60)` in the first draft of the option list. It is built by+counting hour and minute instead — there was nothing to round in the first place.++Verified: `pnpm run test` (25/25 tasks, `@carbon/checks` conformance included),+`pnpm run lint` (33/33), and typechecks for `@carbon/react`, `@carbon/utils`,+`@carbon/form`, `erp`, `mes`, `@carbon/workflows`, `@carbon/jobs`.+Browser verification still outstanding.++## Addendum 2 — three picker bugs (2026-09-04)++Reported after the first UX pass. Two shared one root cause.++### 1 + 2. The main field showed 12-hour, and picking a date cleared the time++`useDatePickerState` **derives** granularity from the value+(`@react-stately/datepicker` `utils.mjs:167`: `v && 'minute' in v ? 'minute' : 'day'`).+Carbon passed no `granularity`, so an **empty** picker fell back to `"day"` and+its `hasTime` was false. In `selectDate` that takes the else branch —+`setValue(newValue)` with a bare `CalendarDate` — so a time the person had+already entered was discarded. `selectTime` meanwhile only parks the value in+`selectedTime` until a date exists, which is why the order mattered.++The same missing settings caused the 12-hour display: `hourCycle` was never+passed, so `DateField` rendered the locale's clock (12-hour for en-US) while the+popover list was already 24-hour — one field showing a time two ways.++Fixed by pinning both on the state **and** on `useDatePicker` (the latter builds+`fieldProps`, so the state alone would leave the visible field unchanged):++```ts+granularity: "minute",+hourCycle: 24,+```++Safe for every consumer: `packages/form`'s wrapper, `ApiKeysForm` and+`LiteralControl` all pass `CalendarDateTime`. (react-stately throws when a+declared granularity is absent from the value, so a `CalendarDate` caller would+have to be converted first — there is none today.)++Pinned by `packages/react/src/__tests__/DateTimePickerState.test.tsx`, which+asserts the upstream default that caused the bug as well as the fix, so the+reason the settings exist survives a future cleanup.++### 3. The dropdown flashed open and shut++`TimeCombobox`'s anchor IS its input, so Radix counted the same click that+focused the input as an outside press and closed the list immediately. Guarded+with `onInteractOutside`, which ignores an interaction whose target is the anchor+itself.++| Bug | Cause | Fix |+|---|---|---|+| Field showed 12-hour | No `hourCycle` on the picker | `hourCycle: 24` on state and `useDatePicker` |+| Time cleared by picking a date | Derived granularity `"day"` on an empty picker → `hasTime` false | `granularity: "minute"` |+| Dropdown flashed | Radix read the focusing click as an outside press | `onInteractOutside` ignoring the anchor |++Verified: typechecks for react/utils/form/erp/mes/workflows/jobs, `pnpm run test`+(25/25 tasks, 18 `@carbon/react` tests incl. 3 new), `pnpm run lint` (33/33),+`check:workflow-catalog`. Browser verification still outstanding.++## Addendum 3 — review fixes (2026-09-04)++A thermo-nuclear review found two correctness bugs, a scope overreach and a+single-source-of-truth violation. All were fixed before commit.++### Correctness++- **Clearing the time was a silent no-op.** `TimeCombobox`'s empty branch called+ `onChange(null)`, which is react-stately's `setTimeValue`. Verified by running+ the real hook: with a full value held, `setTimeValue(null)` emits **no+ `onChange` at all** — so the field blanked and the sync effect snapped it back.+ The clear branch is gone; empty text now reverts like any other unreadable+ draft, and clearing belongs to whoever owns the whole date-time value (the+ picker's own Clear button).+- **`state.timeValue` is a `CalendarDateTime`, not a `Time`.** It is only a bare+ `Time` in the transient time-before-date state. `toTimeString` now takes the+ narrowest shape both share (`{ hour, minute }`) instead of pretending+ otherwise, and the `as` cast in `DateTimePicker` is deleted.++### Scope: `hourCycle` is now the caller's choice++The previous pin forced a 24-hour clock on **15 call sites across 8 files** —+timecards, production events, MES job steps, maintenance dispatches and API keys+— none of which asked for it. Worse, the in-code justification was circular: it+claimed to fix a field "showing a time two different ways", but the old popover+was locale-aware; the new `TimeCombobox` created that mismatch and it was then+used to justify propagating 24-hour everywhere.++`hourCycle` is now an ordinary prop, defaulting to the locale. Only+`LiteralControl` passes `24`, because a workflow step's time is read by a machine+in another system. `granularity: "minute"` stays pinned for every caller — that+one is a genuine bug fix with a regression test behind it, and the review+confirmed it independently.++### Reuse: built on `Command`, not hand-rolled++The first version re-implemented filtering, popover wiring, scroll anchoring and+option rendering that `Combobox`/`Command` already own — including duplicating+the drawer `stopPropagation` workaround verbatim. It also declared+`role="combobox"` while providing none of that contract: no arrow-key+navigation, no `aria-activedescendant`, no option roles, and 96 option buttons+in the tab order.++Rewritten on `Command` + `CommandInputTextField` + `CommandList`/`CommandItem`,+following `apps/erp/app/components/Form/AddressAutocomplete.tsx`, the existing+in-repo precedent for a typeable field with a filtered list. cmdk supplies the+keyboard navigation and ARIA. Deleted outright: every `useRef`, the+`scrollIntoView` anchoring (which would have scrolled the whole Drawer), the+Radix `PopoverAnchor`/`onInteractOutside`/`onWheel` handling, and the+open-on-focus behaviour that threw a 96-row list over the calendar on tab-in.+An empty result now renders "No matching time" rather than silently falling back+to the full list.++Verified: typechecks for react/utils/form/erp/mes/workflows/jobs, `pnpm run test`+(25/25 tasks, 19 `@carbon/react` tests), `pnpm run lint` (33/33). Browser+verification still outstanding.diff --git a/.claude/rules/environment-configuration.md b/.claude/rules/environment-configuration.mdindex 14a32a88b7..93b8c3cb04 100644--- a/.claude/rules/environment-configuration.md+++ b/.claude/rules/environment-configuration.md@@ -53,7 +53,9 @@ keys listed in `getBrowserEnv()` are exposed client-side.- `.env.local` — **generated by `crbn up`** (`packages/dev/src/commands/up.ts`);"Do not edit by hand". Holds per-worktree ports, portless `*.dev` URLs,dev Supabase keys, Redis/Inngest dev settings, `DEV_BYPASS_EMAIL`,- `ASSEMBLER_SERVICE_URL`/`_API_KEY`. Vite / React Router auto-load it on top of+ `ASSEMBLER_SERVICE_URL`/`_API_KEY`, plus the keys in `FROM_DOT_ENV`+ (`packages/dev/src/env.ts`) copied from `.env` (a key with a fallback is always+ written; one without only when set). Vite / React Router auto-load it on top of`.env`, with `.env.local` overriding.- **`#force` escape hatch** — end a line in `.env` with a `#force` comment(e.g. `ASSEMBLER_SERVICE_URL=https://… #force`) and `writeEnv`@@ -128,13 +130,16 @@ account notifications loader and the app shell loader (`pushPublicKey`), not**Integrations (all optional)** — Ramp (`RAMP_CLIENT_ID`, public and exposed by`getBrowserEnv()` for the authorize URL; `RAMP_CLIENT_SECRET`, server-only for codeexchange/token refresh), Slack (`SLACK_BOT_TOKEN`, `SLACK_CLIENT_ID`,-`SLACK_CLIENT_SECRET`, `SLACK_SIGNING_SECRET`, `SLACK_STATE_SECRET`,-`SLACK_OAUTH_REDIRECT_URL`), Onshape (two Onshape apps, no shared variable:+`SLACK_CLIENT_SECRET`, `SLACK_SIGNING_SECRET`,+`SLACK_OAUTH_REDIRECT_URL` — one Slack app serves the Assistant and workflow steps; the value may still name the legacy `/api/integrations/slack/oauth` path, which forwards to the connections callback), Onshape (two Onshape apps, no shared variable:`ONSHAPE_CLIENT_ID/SECRET` + `ONSHAPE_OAUTH_REDIRECT_URL` for the `onshape` syncintegration, `ONSHAPE_V2_CLIENT_ID/SECRET` + `ONSHAPE_V2_OAUTH_REDIRECT_URL` for the`onshape-v2` panel. `crbn up` writes `ONSHAPE_V2_OAUTH_REDIRECT_URL`into `.env.local` from the stack's `ERP_URL`, so each worktree host must be registered-on the panel's Onshape app, or pinned in `.env` with `#force`), Xero, QuickBooks, Jira (each `*_CLIENT_ID/SECRET`,+on the panel's Onshape app, or pinned in `.env` with `#force`), Google (`GOOGLE_CLIENT_ID`, public and exposed by+`getBrowserEnv()` so the Google Calendar and Gmail cards can show "Coming soon";+`GOOGLE_CLIENT_SECRET`, `GOOGLE_OAUTH_REDIRECT_URL` — one Google app serves both+workflow pieces; its own `google` feature group, so a half-set app is reported), Xero, QuickBooks, Jira (each `*_CLIENT_ID/SECRET`,plus webhook/redirect/state secrets), `EXCHANGE_RATES_API_KEY`,`GOOGLE_PLACES_API_KEY`, AI keys `ANTHROPIC_API_KEY` / `OPENAI_API_KEY`.@@ -144,14 +149,19 @@ per integration (keyed by `integrationId`, 1 h lifetime, a still-fresh one is reone signed HttpOnly cookie backed by `SESSION_SECRET`; pass the request so otherintegrations' pending states survive. `consumeOAuthState()` validates all fields andremoves that integration's entry on every attempt (the cookie is destroyed once empty).-The integrations page loader issues one for every integration with an `oauth` config-(Ramp, Xero, QuickBooks, Jira — IntegrationCard puts it on the authorize URL), Onshape's+The integrations page loader issues none (pinned by `integrations.oauth-state.test.ts`).+An integration with an `oauth` config (Ramp, Xero, QuickBooks, Jira) starts at+`api+/integrations.$id.connect.ts` (`startOAuthConnect` in `useIntegrationInstall.ts`+navigates there): it issues the state with the chosen install `mode` as an extra and+redirects to the authorize URL it builds server-side. Onshape's`api+/integrations.onshape.install.ts` issues its own (via `beginOnshapeAuthorization`,`@carbon/ee/onshape.server`), Onshape Government's is issued by the integration settingssave — its OAuth client is the customer's private app, not an env var — and each callbackconsumes it.-Slack binds its state separately (`SLACK_STATE_SECRET`, `@slack/oauth` state store,-checked against the caller's company and user). Managed deployment propagates both Ramp OAuth+Slack and every other workflow piece use the same cookie:+`api+/integrations.connections.$piece.connect.ts` issues the state with the account+`name` and an optional `connectionId` as extras, and `api+/integrations.connections.callback.ts`+consumes it with `consumeOAuthStateByValue`, since one callback serves every piece. Managed deployment propagates both Ramp OAuthvars through `ci/src/deploy.ts` → `sst.config.ts` → the ERP service only.**Analytics / config** — `POSTHOG_API_HOST`, `POSTHOG_PROJECT_PUBLIC_KEY`diff --git a/.claude/rules/issue-module.md b/.claude/rules/issue-module.mdindex fe04d50cee..7b02519a98 100644--- a/.claude/rules/issue-module.md+++ b/.claude/rules/issue-module.md@@ -198,7 +198,9 @@ Reviewers managed in `ReviewersList.tsx` (`nonConformanceReviewerValidator` = julonger exists; treat the `type: "investigation"` UI path as vestigial.- The module is `quality`, not `issue`; permission key is `quality`. Routes are split(`x+/quality+/` for list/types/workflows, `x+/issue+/` for the detail + actions).-- Slack NC notifications are config on the `integration` row (`20250810203046`):- `nonconformance_channel_id`, `nonconformance_notifications_enabled` — no extra tables.+- Slack NC notifications post to the channel picked at Slack install, read off the company's+ Slack connection (`getSlackWorkspace().channelId`, `integrationConnection` metadata) — the old+ `nonconformance_channel_id` / `nonconformance_notifications_enabled` jsonschema fields were+ dropped in `20261026151304` (they had no readers).- Filename `20251114222648_supplier_id.sql` is non-conformance work (supplier links +disposition enum), not a generic "supplier" change.diff --git a/.claude/rules/sst-deployment-infrastructure.md b/.claude/rules/sst-deployment-infrastructure.mdindex aeefbbe16b..ab5eeee029 100644--- a/.claude/rules/sst-deployment-infrastructure.md+++ b/.claude/rules/sst-deployment-infrastructure.md@@ -161,7 +161,7 @@ Both services get Supabase (`SUPABASE_URL`/`ANON_KEY`/`SERVICE_ROLE_KEY`/`JWT_SE`CONTROLLED_ENVIRONMENT`, `DOMAIN`, `ERP_URL`/`MES_URL`,`NODE_ENV=production`, `VERCEL_ENV=production`, `VERCEL_URL` (set to the app host —there is no real Vercel deploy, this is just an env shim). ERP additionally gets-`OPENAI_API_KEY`, `GOOGLE_PLACES_API_KEY`, `STRIPE_*`,+`OPENAI_API_KEY`, `GOOGLE_PLACES_API_KEY`, `GOOGLE_OAUTH_*`, `STRIPE_*`,`SLACK_*`, `JIRA_*`, `QUICKBOOKS_*`, `XERO_*`, `ONSHAPE_*`, `RAMP_CLIENT_ID`,`RAMP_CLIENT_SECRET`, `AUTH_PROVIDERS`; MES isthe leaner subset (no Stripe/Slack/Jira/QuickBooks/Xero/OpenAI). Autodesk vars arediff --git a/.claude/rules/workflow-actions.md b/.claude/rules/workflow-actions.mdindex f79703bf83..711548df3a 100644--- a/.claude/rules/workflow-actions.md+++ b/.claude/rules/workflow-actions.md@@ -21,12 +21,15 @@ packages/ee/src/workflows/catalog/entities.ts HAND-WRITTEN `write` allowlist│▼ scripts/generate-workflow-catalog.ts → buildCatalog (pure)packages/ee/src/workflows/catalog/actions.generated.ts COMMITTED- WORKFLOW_ACTION_CATALOG + WORKFLOW_OPERATION_CATALOG (one file, both maps)+ WORKFLOW_ACTION_CATALOG + WORKFLOW_INTEGRATION_CATALOG+ + WORKFLOW_OPERATION_CATALOG (one file, three maps)packages/ee/src/workflows/catalog/labels.generated.ts COMMITTED labels for events, actions and operations```-Today: **16 actions** (6 hand-written, 10 generated `<entity>.update`) and-**15 operations**. Same commands as the event side — one generator writes all+Today: **16 actions** (6 hand-written, 10 generated `<entity>.update`) and **15+operations**, plus **7 integration steps** in their own catalog — an integration is a+distinct NODE KIND, not an action, so nothing on this path carries a piece. See+`workflow-integrations.md`. Same commands as the event side — one generator writes allthree `*.generated.ts` files:```bash@@ -34,7 +37,8 @@ pnpm run generate:workflow-catalogpnpm run check:workflow-catalog```-`buildCatalog(registry, moments, actions, operations, schema)` expands each+`buildCatalog(registry, moments, actions, operations, schema, integrationSteps)`+expands eachentity's `write` map into one `<entity>.update` action: an input keyed by theentity name (the record, `required: true`), plus one optional input per writablecolumn typed from the swagger schema. It sets `update: { entity }` and@@ -42,8 +46,8 @@ column typed from the swagger schema. It sets `update: { entity }` and`Update a/an <entity>`. A hand-written id that collides with a generated one is a**build error**, not a silent overwrite.-A hand-written action must have either a `call` (an MCP tool name) or be one of-`BUILT_IN_ACTIONS` (`notify`, `webhook`) — `validateCatalogInputs` reports+An action must have a `call` (an MCP tool name) or membership in `BUILT_IN_ACTIONS`+(`notify`, `webhook`) — `validateCatalogInputs` reports`Action "<id>" has no implementation route.` otherwise. The check script alsoverifies every `call` exists in `apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json`and tells you to run `pnpm run generate:mcp`.@@ -154,6 +158,10 @@ if (route.call !== undefined) … // runCreateActionreturn { ok: false, error: GONE };```+`runIntegration` is a SEPARATE service method, not a branch here: it is handed the+`{ name, action }` block off the integration step's own catalog entry, so the action+path never learns what a piece is and no id is ever parsed for one.+An id that *reads* like `x.update` but carries no `update` block must not reachthe update executor. `getActionRoute` (`catalog/catalog.ts`) exists precisely so`call`/`update` stay off `CatalogAction`, which the builder's validator reads.@@ -244,7 +252,7 @@ Three things about it are load-bearing:on notify nodes saved before the field existed in a picker where the authorcannot tick the one channel that is actually on.- **Availability is a build-time concern.** Email needs `EMAIL_NOTIFICATIONS`- (Business/Partner) and Slack needs the company's Slack integration active; the+ (Business/Partner) and Slack needs a usable Slack connection (`getSlackWorkspace`); thejob skips a channel it cannot use with a `console.warn` at most. The builderdisables the option and says why (`fields/choiceOptions.tsx`) — that is the onlyplace the author ever finds out. "Unavailable" only blocks ADDING a channel; onediff --git a/.claude/rules/workflow-engine.md b/.claude/rules/workflow-engine.mdindex aaea8b4ab1..9c69a32e65 100644--- a/.claude/rules/workflow-engine.md+++ b/.claude/rules/workflow-engine.md@@ -21,7 +21,8 @@ packages/ee/src/workflows/runtime/ pure. no I/O, no client, no database.values.ts RuntimeValue + fromColumn coercionresolve.ts {kind:"ref"|"item"|"literal"|"template"} -> a value, or a reasoncompare.ts operator semantics + evaluateClauses- condition.ts filter.ts compute.ts lookup.ts action.ts the five executors+ condition.ts filter.ts compute.ts lookup.ts action.ts+ integration.ts the six executorsexecutors.ts the node-kind -> executor registrybatch.ts planBatch + itemKeyFor@@ -46,8 +47,10 @@ permission check — so a new kind is one registry line, never an extended## The services portThe runtime is pure, so an executor that must reach the world calls-`ctx.services` — `runAction`, `runOperation`, `search` — declared as-`WorkflowServices` in `runtime/types.ts` and **required** on `RuntimeContext`.+`ctx.services` — `runAction`, `runIntegration`, `runOperation`, `search` — declared as+`WorkflowServices` in `runtime/types.ts` and **required** on `RuntimeContext`+(`runIntegration` takes the piece off the step's catalog entry, so nothing job-side+parses an id's shape).`execute.ts` builds one per step from the owner's freshly-minted client, so theport carries the owner's identity with it and cannot be handed a privileged oneby accident. The implementations live in `packages/jobs/src/workflows/actions/`@@ -197,10 +200,12 @@ shows a customer a green tick.same answer: the run proceeds against the shipped catalog alone. Step ids are therefore`"load"`, `"custom-fields"`, `"permissions"`, `` `node:${nodeId}` ``, `"finish"`.- **`ctx.linkFor`.** `contextFor` supplies an optional `(of, id) => string | null` that turns a- record into the existing `${ERP_URL}/api/link?...` URL. `renderTemplate` uses it ONLY for- inputs the catalog marks `linkify` (today: the notify action's `message`), wrapping an entity- part as `[name](url)`. A webhook body has no `linkify`, so it still renders a bare- name with no markdown. `packages/ee/src/workflows` constructs no URL — it calls the callback.+ record into the existing `${ERP_URL}/api/link?...` URL. `resolveStepInputs` passes it to+ `renderTemplate` ONLY for inputs whose catalog `links` declaration holds (`linkState`; today+ the notify action's `message` as markdown, and integration inputs as Slack mrkdwn or html),+ wrapping an entity part in that dialect's link. A webhook body declares no `links`, so it+ still renders a bare name with no markup. `packages/ee/src/workflows` constructs no URL — it+ calls the callback.- **How a record NAMES itself in prose.** `entityText` in `runtime/resolve.ts` reads the columns`CatalogEntity.display` lists, best first, and falls back to the raw id only when none of themis readable. `display` is REQUIRED on every registry entry and comes from the hand-writtendiff --git a/.claude/rules/workflow-event-catalog.md b/.claude/rules/workflow-event-catalog.mdindex 15cbabd5f7..2359979220 100644--- a/.claude/rules/workflow-event-catalog.md+++ b/.claude/rules/workflow-event-catalog.md@@ -18,13 +18,14 @@ customer-facing feature (a "when this happens, do that" rule built on a canvas)Spec: `.ai/specs/2026-07-30-workflows-event-catalog.md`. Package guide:`packages/ee/src/workflows/AGENTS.md`.-## Four hand-written inputs, three generated files+## Five hand-written inputs, four generated files```packages/ee/src/workflows/catalog/entities.ts HAND-WRITTEN record types + watched columns + write allowlistpackages/ee/src/workflows/catalog/moments.ts HAND-WRITTEN business events + labels + outputspackages/ee/src/workflows/catalog/actions.ts HAND-WRITTEN the actions with no generic formpackages/ee/src/workflows/catalog/operations.ts HAND-WRITTEN read-only computations+packages/jobs/src/workflows/integrations/allowlist.ts HAND-WRITTEN the integration pieces we expose│▼ scripts/generate-workflow-catalog.ts (buildCatalog, pure)packages/ee/src/workflows/catalog/events.generated.ts COMMITTED ids, outputs, permission, match@@ -35,7 +36,8 @@ packages/ee/src/workflows/catalog/labels.generated.ts COMMITTED one msg`` perToday: 10 triggerable entities with 77 watched columns → 97 record events, plus 9 moments= **106 events**, plus property maps for 17 entities (the 10 triggerable ones and 7reference-only: `user`, `group`, `jobOperation`, `nonConformanceType`, `salesInvoice`,-`purchaseInvoice`, `location`), plus **16 actions** and **15 operations**.+`purchaseInvoice`, `location`), plus **16 actions**, **2 integration steps** (their own catalog — see+`workflow-integrations.md`) and **15 operations**.To add an entity, a moment, an action or an operation, edit the one hand-written fileand run:@@ -190,7 +192,9 @@ allowlist into `actions.generated.ts`, which holds **both** `WORKFLOW_ACTION_CAT- **Actions** are what a workflow does. 6 hand-written (`job.create`,`nonConformance.create`, `purchaseOrder.create`, `salesOrder.create`, `notify`,- `webhook`) plus one `<entity>.update` generated per entity that declares `write`.+ `webhook`), one `<entity>.update` generated per entity that declares `write`, and one+ `integration.<piece>.<action>` per entry in the piece allowlist (see+ `workflow-integrations.md`).- **Operations** are read-only computations over things a property map cannot reach —stored totals live only on views, and counts span child tables.@@ -224,8 +228,8 @@ tenancy checks, webhook signing and the SSRF guard — is in5. **Every moment, action and operation has a label**, and names only registry entities forits outputs, inputs and output.6. **Every action has an implementation route** — a `call` that is a real tool in- `apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json` (run `pnpm run generate:mcp`), or- membership in the built-in set (`notify`, `webhook`).+ `apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json` (run `pnpm run generate:mcp`), a+ `piece` block from the allowlist, or membership in the built-in set (`notify`, `webhook`).Deploy-time, against a live database (so not CI — they sit with `packages/checks`' invariants):the `workflow-trigger-event-drift` SQL invariant anddiff --git a/.claude/rules/workflow-integrations.md b/.claude/rules/workflow-integrations.mdnew file mode 100644index 0000000000..a5b33b88a2--- /dev/null+++ b/.claude/rules/workflow-integrations.md@@ -0,0 +1,578 @@+---+paths:+ - "packages/jobs/src/workflows/integrations/**"+ - "packages/jobs/src/workflows/actions/integration.ts"+ - "packages/ee/src/integrations/connections.ts"+ - "packages/ee/src/integrations/connect.ts"+ - "packages/ee/src/integrations/piece-integration.ts"+ - "packages/ee/src/integrations/pieces.ts"+ - "packages/ee/src/google-calendar/**"+ - "apps/erp/app/routes/api+/integrations.connections*"+ - "apps/erp/app/routes/api+/workflows.options.ts"+ - "apps/erp/app/modules/settings/settings.service.ts"+ - "apps/erp/app/modules/settings/ui/Integrations/ConnectionsTab.tsx"+ - "apps/erp/app/modules/workflows/workflows.service.ts"+ - "apps/erp/app/modules/workflows/ui/Builder/fields/OptionsField.tsx"+ - "apps/erp/app/modules/workflows/ui/Builder/config/forms/IntegrationNodeForm.tsx"+ - "packages/ee/src/workflows/runtime/integration.ts"+---++# Workflow Integrations (Activepieces pieces)++Third-party steps inside the customer-facing Workflows feature — "create a Google Calendar+event" as an **integration** node, its own kind beside action and condition. The integration+code is not ours: each vendor is one published+[Activepieces](https://github.com/activepieces/activepieces) **piece** npm package.++Plan: `.ai/plans/2026-08-27-workflow-integrations.md`. Research:+`.ai/research/activepieces-integration-findings.md` and `.ai/research/activepieces-decisions.md`.+Specs of the later rounds: `.ai/specs/implemented/2026-08-31-workflow-integration-outputs.md`,+`2026-09-01-slack-workflow-piece.md`, `2026-09-01-gmail-workflow-piece.md`,+`2026-09-01-slack-single-source-of-truth.md`, `2026-09-01-connection-reconnect-prompts.md` and+`2026-09-04-integration-datetime-inputs.md` (same folder). Catalog: `workflow-event-catalog.md`.+Actions: `workflow-actions.md`.++## The split — the piece is a recipe, Carbon is the kitchen++A piece is one object: an auth **declaration** (the vendor's `authUrl` / `tokenUrl` /+`scope`) plus a set of actions, each being form-fields-as-data (`props`) and a `run()`+function. It contains **no UI, no database, no user model, no client id and no redirect+URI** — that omission is the whole boundary.++Carbon owns everything else: which company is connected, the OAuth app registered with the+vendor, the callback route, the encrypted token, the refresh and the lock around it.++## Curated, not a marketplace++`packages/jobs/src/workflows/integrations/allowlist.ts` is the single hand-written+declaration of what we expose — package, **exact** version, label, and the specific action+names. Not the piece: `getPieceAction` refuses an action the piece has but the allowlist+does not (`custom_api_call` is real and deliberately unreachable).++The ceiling is not engineering time. Every usable OAuth integration needs an app *we*+register and get verified with that vendor, so breadth is bounded by that. ~400 pieces+exist; the allowlist has three (Google Calendar, Slack, Gmail).++Versions are pinned exactly (`"0.10.3"`, no `^`) — an upstream release must never silently+change code we execute against a customer's account.++## An integration is its own NODE KIND, with its own catalog++`integration` is a workflow node type beside `trigger`, `condition`, `compute`, `lookup`,+`filter` and `action` — NOT an action. The node stores `{ piece, action, inputs }`; which+account it acts as is an ordinary input (`connectionId`), which is what lets the generic+options provider fill it like any other fetched list.++That separation is the point: `BuiltAction` has no `piece` field, `getActionRoute` returns+no piece, and `runAction` has no integration branch. An action is something Carbon does to+its own data, and nothing on that path has to ask whether it is really a vendor call.++Under a curated allowlist the set of steps cannot change at runtime, so they are emitted by+the ordinary build-time generator — not looked up per company.+`integrations/catalog.ts` `buildPieceActionDeclarations()` is the generator's sixth input,+and `buildCatalog` returns them as `built.integrations`, emitted as+`WORKFLOW_INTEGRATION_CATALOG` beside the action and operation maps. Both the generator and+the staleness check pass them the same way, so the check compares like with like.+Both validate them with the SAME input rules as an action — only how a step RUNS differs.++Ids are `integration.<piece>.<action>` —+`integration.google-calendar.create_google_calendar_event` — built by `integrationStepId`+in `@carbon/ee/workflows` (`definition/catalog.ts`), the one place that shape is written. Nothing parses an id: the+node holds `piece` and `action` separately, and `runIntegration` is handed the+`{ name, action }` block off the catalog entry.++Running one: `runtime/integration.ts` `integrationExecutor`, registered in+`runtime/executors.ts` like every other kind, resolves its inputs with `resolveStepInputs`+(`runtime/resolve.ts`, shared with `actionExecutor`) and calls `ctx.services.runIntegration`,+which `packages/jobs/src/workflows/actions/services.ts` implements over the existing+`actions/integration.ts`. A record in prose renders as a LINK only where the input's+catalog `links` declaration says the vendor renders one — Slack mrkdwn `<url|label>`,+Gmail `<a href>` gated on `body_type = html` — via `renderTemplate`'s per-dialect+renderers (`LINK_RENDERERS`) in `runtime/resolve.ts`, which also escape every other+value in that input for the dialect (`TEXT_ESCAPERS`); `linkState` (`definition/links.ts`)+is the one verdict, for the run and the builder hint alike. Everywhere else a record stays its plain name, and the+builder says so with a muted one-liner under the field (`definition/notices.ts`+`fieldNotices` → the store's `notices` → `Field`'s `hint`; copy in `noticeCopy.ts`).++In the builder it is one **Integration** palette entry, not one per vendor — you drop the+node, then pick the app and the step inside it. `config/forms/IntegrationNodeForm.tsx`+does that; `config/forms/StepInput.tsx` renders the inputs and is SHARED with `ActionForm`,+so the two kinds cannot drift apart as input kinds are added.++Picking the app is GATED on that app being connected: the form calls `useWorkflowOptions`+— the SAME hook `OptionsField` uses, so the "is this connected?" question and the connection+dropdown cannot disagree about how a provider is called (notably about `dependsOn`, which a+hand-rolled second fetcher was free to forget) — and an app with no connection renders one+"Connect …" button (to `path.to.integration(piece)`, in a new tab so the canvas survives)+instead of the step picker and inputs. Every step of an app shares one connection input, so+the FIRST step of the app answers for it — which is what lets the question be asked before a+step has been picked. The provider is read off that input rather than named in the builder,+so this stays a fetched list like any other. `INTEGRATION_CONNECTION_INPUT` is declared in+`@carbon/ee/workflows` (`definition/catalog.ts`) because both sides need it; `integrations/options.ts`+re-exports it as `CONNECTION_INPUT` (not part of the `@carbon/jobs/integrations` barrel).++Both scripts are `async function main()` wrappers rather than top-level `await`: `tsx`+transpiles them to CJS, which rejects it, and reading a piece's actions needs a dynamic+import.++## Property mapping — refuse, never degrade++`integrations/properties.ts` `toValueType` maps a piece property to a Carbon `ValueType`:++| Piece `type` | Carbon |+|---|---|+| `SHORT_TEXT` | `t.string` |+| `LONG_TEXT` | `t.string` + `template: true` — the multiline editor with inline variables, as Carbon's own message bodies get |+| `NUMBER` | `t.number` |+| `CHECKBOX` | `t.boolean` |+| `DATE_TIME` | `t.date` |+| `ARRAY` | `t.list(t.string)` — in the builder a chip field — type an entry, Enter, repeat — so "several recipients" is visible; STORED as a list (`fields/control.ts` `isWritableList`); a whole list from an earlier step is still `{` |+| `STATIC_DROPDOWN` | `t.string` + `choices` |+| `STATIC_MULTI_SELECT_DROPDOWN` | `t.list(t.string)` + `choices` |+| `DROPDOWN` | `t.string` + an `options` source |+| `MULTI_SELECT_DROPDOWN` | `t.list(t.string)` + an `options` source |++Anything else (`OBJECT`, `JSON`, `FILE`, `DYNAMIC`, …) throws `UnmappablePropertyError`+naming the piece, action and property. That **fails the generator**, which writes no files.+A half-described action must never reach a customer's canvas.++`toPropsValue` is the inverse at run time: ONE pass over the piece's own props, so a prop+the action no longer declares is never sent. Per prop, `visibilityOf` gives the pin (a hidden+prop's value, or a shown prop's allowlist `value`). An omitted prop sends its pin and nothing+else; otherwise a node value wins and the pin fills in only where the node supplied nothing+(an emptied multi-select counts as nothing). An absent optional input is **omitted**, not sent+as `null` — pieces branch on `undefined`.++## Connections — a new table, not `companyIntegration`++`companyIntegration` has composite PK `("id", "companyId")`: one row per integration per+company. A company may connect several Google accounts, so integration connections get+their own table.++`integrationConnection` (`20261026151302_workflow-integration-connections.sql`) —+`id('icn')`, `companyId`, `pieceName`, `name`, `authType`, `accountLabel`, `metadata`,+`secretRef`, `expiresAt`, `refreshingAt`, `status`, `lastError` + audit columns. Unique on+`(companyId, pieceName, name)`. RLS is `settings_view` to read and NO API-role writes+(`20261026151306`): a user-written row could claim another company's Slack `team_id` or+point `secretRef` anywhere. Every write — create, rename, disconnect, revoke — goes+through the service role, scoped by `companyId`. Rename and Disconnect are the service+functions `renameIntegrationConnection` / `disconnectIntegrationConnection`+(`settings.server.ts`, `update: settings`, not published); each reads the row by+`ctx.company.id` first, and Disconnect takes the piece from it to drop that card's health+cache.+`get_connection_secret` reads the vault by name (`connection:<companyId>:<id>`), never by+`secretRef`.++**The existing vault RPCs could not be reused** — `upsert_integration_secret` and friends+are hard-wired to `companyIntegration` and the `'integration:'` name prefix. The same+migration adds three parallel `*_connection_secret` RPCs with a `'connection:'` prefix, plus+a delete trigger (vault does not cascade). Two RPCs keep the row and its secret in step:+`save_connection` inserts or revives the row and writes the secret in one statement+(`createConnection`), and `revoke_connections` drops the secrets and marks the rows Revoked+in one statement. All of them are `service_role` only.++`packages/ee/src/integrations/connections.ts` is the service. **Tokens live in the vault and+never in `metadata`** — `connectionMetadataFrom` copies only the allowlist row's listed+paths, and `integrations/oauth.test.ts` (jobs) asserts no token reaches it.++`disconnectConnection(serviceRole, companyId, pieceName, connectionId, updatedBy)` (one+connection) and `revokeConnectionsForPiece` (every non-Revoked one of a piece) both call+`revoke_connections`, so the token and the status change together. Both **keep the row**:+a saved workflow node references the id, and a dangling id produces a worse error than a+clear "reconnect this".++A consent that lands on an existing row must be the SAME account. Reconnect carries the+row's id in the OAuth state; Add account and Install name the row by its unique name.+`createConnection` compares the stored and the new identity (Slack's `team_id`, else the+`accountLabel`) and refuses a different one — `ConnectionAccountMismatchError` for+Reconnect, `ConnectionNameTakenError` for a name. Without that check, every saved+workflow on the row silently started acting as whoever signed in. When either side has+no identity (the label read failed), the consent is accepted, and `save_connection` keeps+the stored `accountLabel` (a NULL label never overwrites it, or the check would pass for+anyone from then on). Card Install names the account after the card (`entry.label`), and an+earlier Uninstall leaves a Revoked row under that name: the callback passes+`renameIfTaken`, so a different account takes the next free name ("Gmail 2") instead of+`duplicate-name`. A name the user typed is still refused.++A vendor workspace belongs to ONE company. Before it saves, `createConnection` reads every+company's rows of that piece with the same `metadata.team_id` (`readConnectionsByTeamId`, the+one cross-company read) and refuses with `ConnectionWorkspaceTakenError` when a usable one+belongs to another company; the callback answers the `workspace-taken` code. An inbound Slack+event names only its workspace, so a shared one could not be routed:+`getSlackWorkspaceByTeamId` throws `AmbiguousSlackWorkspaceError` rather than pick. No unique+index spans companies, so the check is not race-proof.++### Scope drift — "Reconnect needed"++A connection records what the vendor granted in `metadata.scopes` (from the token response's+`scope`, declared on the allowlist row's `metadata` map; Slack's is comma-separated, the v2+backfill wrote spaces). `missingScopes(connection, required)` (ee, pure) compares it with+`requiredScopesFor(piece)` (jobs — the row's `oauth.scope` override or the piece's own list,+i.e. exactly what `buildConsentUrl` asks for). Unknown grants are never flagged. Four surfaces+say the same thing: the Accounts row ("Reconnect needed" + a **Reconnect** button that re-runs+the consent for that row's id — `createConnection` revives the row and refreshes its+metadata, and refuses with `ConnectionAccountMismatchError` when a different account+signed in), the builder (the connection provider returns `errorCode: "reconnect"` instead of+listing an under-scoped account, and `IntegrationNodeForm` shows a reconnect banner), the card+(`getIntegrationHealth` marks a piece card unhealthy while any usable account is under-scoped —+checked in erp because ee cannot see the allowlist), and the step runner (fails before the+vendor call with copy naming Settings → Integrations → App → Accounts → Reconnect, and maps a+vendor `missing_scope` to the same words).++**Google verification does a string match.** An app's registered scopes (Cloud Console → Data+Access) must equal what it actually sends in `scope=`, and any scope broader than the calls the+app makes is refused. So a Google row's `oauth.scope` is the narrowest scope per endpoint, and+changing it is never code-only: the Console list changes with it and a new consent-flow video+has to demonstrate every scope. Calendar asks for `calendar.events` (create + list events on the+chosen calendar) and `calendar.calendarlist.readonly` (name the calendars in the picker) — NOT+the piece's `calendar.readonly`, which reads every event on every calendar. Verification bounced+on exactly that in Sept 2026.++Gmail is deliberately **send-only** (`gmail.send` + `email`, an allowlist `oauth.scope`+override). The piece's own list adds `gmail.readonly` and `gmail.compose`, which Google+classes as *restricted*: an app holding them must pass an annual third-party CASA security+assessment before non-test users can consent. So the row omits `in_reply_to` (needs+`messages.list`), pins `draft` off (needs `drafts.create`) and omits `attachments` (file+objects — no Carbon input type yet). Widening to read/reply is a compliance decision first.+Spec: `.ai/specs/implemented/2026-09-01-gmail-workflow-piece.md`.++### The refresh claim++Two workflow steps hitting an expiring token would both refresh and one would clobber the+other. A Postgres advisory lock cannot fix it — it releases at the RPC's transaction end,+which is before the token exchange finishes. So `resolveConnectionAuth` claims the refresh+with a conditional UPDATE on `refreshingAt` (`IS NULL OR < NOW() - 30s`) and the loser polls+for the winner's token (250 ms × 20). Google omits the refresh token on a refresh response,+so the stored one is carried forward rather than overwritten with `undefined`.++A disconnect or uninstall can land while a refresh is in flight. `upsert_connection_secret`+locks the row and writes only onto an Active one (else `no_data_found`, which+`writeTokens` turns into `ConnectionRevokedError`), the settle UPDATE matches `status =+'Active'` only, and `markExpired` never touches a Revoked row. So a revoked account stays+revoked.++## Who reads the token++The vault RPCs are `service_role` only, so a user client cannot decrypt a token at all.+`resolvePieceAuth(serviceRole, companyId, pieceName, connectionId)` (`integrations/piece-auth.ts`)+is the ONE copy of "read the row, check it is this piece's, check its scopes, refresh it",+shared by `runIntegrationAction` and the builder's property options (`workflows.service.ts`).+It returns `{ ok: true, accessToken }` or a `reason` each caller words: `no-connection` (another+company's or another piece's row), `missing-scopes`, `refreshing`, `reconnect`,+`misconfigured` (the OAuth app, not the account) or `failed`. Both callers pass+`getCarbonServiceRole()` and a `companyId` from the run or the request.++Do not move the row read to the owner's client. The row's RLS asks for `settings_view`,+but the builder lists connections with the service role to anyone who can edit workflows+(`OPTIONS_PROVIDERS`, `workflows.service.ts`). An owner-client read refused a connection the author was+allowed to pick, so every run failed with "This step needs a connection." The tenancy+guarantee is the `companyId` filter: it comes from the run row, never from the definition.++Outside a workflow step, a vendor whose tokens never expire (Slack bot tokens) is read with+`readConnectionAccessToken(serviceRole, connection)`, which takes the row the caller already+read (`id`, `companyId`, `status`, `expiresAt`), so its guard judges exactly the connection the+caller picked. It refuses a non-usable connection and one whose `expiresAt` is inside the+refresh window — a refreshable vendor must+go through `resolveConnectionAuth`, which owns the refresh claim.++## OAuth round trip++- `api+/integrations.connections.$piece.connect.ts` — builds the consent URL with+ `buildConsentUrl` from the piece's own `authUrl`/`scope` (or the row's overrides) plus the+ app `resolveOAuthApp(piece)` returns.+ `access_type=offline` **and** `prompt=consent`: without both,+ Google returns no refresh token on a re-authorization. Returns `{ url }` like the Slack+ install route; the client opens a popup.+- `api+/integrations.connections.callback.ts` — the vendor redirects the browser here, so a+ failure redirects to the integrations page with an error **code** (the `connection` key in+ `integration-errors.ts`), never JSON and never the vendor's own message.++**The `state` is the cookie-bound one every OAuth integration uses**+(`@carbon/auth/oauth-state.server`). The connect route calls `issueOAuthState` with the+piece name as the integration id, plus the account `name` and, for Reconnect, the+`connectionId` (`OAuthStateExtras`), and returns its Set-Cookie on the `{ url }` response+(`startIntegrationConnect` fetches it same-origin, so the browser keeps the cookie). One+redirect URI serves every piece, so the callback cannot know the piece before it reads the+state: `consumeOAuthStateByValue` finds the pending entry holding that value, checks its+user, company and expiry against the session, and removes it, leaving other integrations'+entries alone. The piece, name and connection id come only from a valid entry, and every+reply carries the rewritten cookie. That binding is what stops a token being planted into+another company's connection — it must never be reduced to a bare query parameter. One+pending entry per piece: a second connect for the same account reuses a still-fresh state,+and a connect for another account (other extras) replaces it.+Malformed callbacks log parameter **names only**: `code` is a live credential.++## The host shim++`integrations/context.ts` `buildPieceContext` supplies the context a piece's `run()`+declares — `auth`, `propsValue`, plus `store`, `connections`, `project`, `flows`, `step`,+`files`. Every stub **throws** rather than returning empty: a piece that genuinely needs one+must fail loudly in development, not misbehave in production.++## Where piece code may live++`registry.ts` is the ONLY module that imports a piece package. Code outside `@carbon/jobs`+reaches it through the `@carbon/jobs/integrations` subpath, which is **server-only** (the+catalog scripts import `integrations/catalog.ts` and `allowlist.ts` by path). Pieces bundle+Node vendor SDKs, and `packages/ee/src/workflows` is bundled for the browser — it must+never see piece code. `piece-auth.ts` imports `@carbon/ee/integrations/connections`, the+deep subpath, because the `@carbon/ee` root barrel pulls in integration config files whose+`msg` macro is untransformed outside a Vite build (the root barrel no longer re-exports the+connections service at all).++## Fetched choices are a GENERIC catalog feature, not an integration one++An input whose values are only knowable at edit time carries an `OptionsSource`+(`packages/ee/src/workflows/definition/catalog.ts`) in place of `choices`:++```ts+options?: { provider: string; params?: Record<string, string>; dependsOn?: readonly string[] }+```++`provider` names a resolver, **never an integration**. `params` are fixed arguments decided+when the catalog is built; `dependsOn` names sibling inputs whose current values the+resolver needs, and the field stays unfetched until every one of them holds a value. There+is deliberately no boolean flag and no piece-shaped field anywhere on this path — a list+backed by Carbon's own data is the same declaration with a different `provider`.++Three parts, and only the last knows what a provider id means:++- `fields/OptionsField.tsx` — one field for every fetched list. It receives the provider id,+ the params and the dependency values, and renders a `Combobox` (or `MultiSelect` for a list+ type). `ActionForm` keys it on `${name}:${dependency values}`, so changing account remounts+ it — a calendar id from one account is meaningless in another. An empty list plus an+ `emptyHref` renders a link out rather than a dropdown the author cannot act on.+- `api+/workflows.options.ts` — provider-agnostic. It looks the provider up, applies **that+ provider's declared permission**, and returns `{ options, emptyHref? }`. An unknown+ provider still passes through `workflows_view` first, so it is not an unauthenticated+ probe. A failure never echoes the resolver's own message.+- `OPTIONS_PROVIDERS` in `modules/workflows/workflows.service.ts`, the only module that+ knows what a provider id means. Two entries today, both from+ `@carbon/jobs/integrations`'s `options.ts` constants: `integration.connection`+ (`workflows_view`, lists the company's connections) and `integration.property`+ (`workflows_update` — the same permission the action carries, so it cannot reach a vendor a+ user could not otherwise call — runs the piece's own `options()`).++Adding a Carbon-backed dropdown is one registry entry plus an `options` block on the input.+It touches neither the endpoint nor the field.++`build.ts` refuses an input that both fetches and lists its values, and one whose `dependsOn`+names an input the action does not have.++## The settings UI is the ordinary integration card++A piece is a NORMAL integration: `packages/ee/src/google-calendar/config.tsx` calls+`definePieceIntegration(piece, card)` (`integrations/piece-integration.ts`), an ordinary+`defineIntegration` in the ordinary `integrations` array, rendering the ordinary+`IntegrationCard` in the ordinary grid. There is no separate panel. The helper sets the `id`+to the piece name (so nothing has to map between the two), the logo, no settings and an+`onClientInstall` that calls `startIntegrationConnect`; the config supplies only the name,+category, `active`, and the two descriptions.++- `active: !!GOOGLE_CLIENT_ID` — an unconfigured server shows "Coming soon", the same+ as any other integration missing its credentials. (`GOOGLE_CLIENT_ID` is therefore in+ `getBrowserEnv()`; it is a public client id, never the secret.)+- `settings: []` and `schema: z.object({})` (set by `definePieceIntegration`), so the drawer+ shows no settings form and no Submit. Install runs `onClientInstall` → the connect route → the consent popup, exactly+ like Onshape and Slack.+- The callback calls **`markIntegrationInstalled`** with the service role (an RLS insert+ would need settings create; the route requires settings update, like every install),+ which inserts the `companyIntegration` row if absent or re-activates it, and **never+ overwrites metadata**. A new Slack install (not a Reconnect) then posts a welcome message+ in the webhook channel picked on the consent screen (`postSlackWelcome`, best-effort). That row is what+ "Installed" means to the grid; without it the card would keep offering Install for an+ already-connected account.+- **Slack's card IS the piece card.** The Carbon Assistant (slash commands, issue threads,+ notification fan-out) is a *consumer* of the company's Slack connection: `getSlackWorkspace`+ returns the OLDEST usable `slack` connection that carries a webhook channel, else the+ oldest usable one (token from the vault, `team_id` /+ `channel_id` / `bot_user_id` from its metadata) and `getSlackWorkspaceByTeamId` matches an+ inbound slash command to its workspace. One consent — the allowlist row's `scope` is the+ union of Assistant and workflow scopes — installs both. `companyIntegration.slack` holds no+ token and no workspace facts; the Assistant's private `@slack/oauth` install flow and+ `SLACK_STATE_SECRET` are gone. `SLACK_OAUTH_REDIRECT_URL` keeps its name and may keep its+ deployed value: `api+/integrations.slack.oauth.ts` is now a 302 forwarder onto the+ connections callback, so no environment or Slack-app redirect change is needed to ship. Migration+ `20261026151304_slack-connections-single-source.sql` backfilled existing installs. The+ builder's "Connect …" link deep-links to `?tab=connections`.+- `ui/Integrations/ConnectionsTab.tsx` is an `IntegrationFormTab` ("Accounts") on that card,+ listing the connected accounts with rename, Disconnect and Add account. It is the ONE place+ this integration differs from the others, and only because a workflow step picks which+ account it runs as.+- Uninstall goes through the standard deactivate route, whose `onUninstall` hook calls the+ generic `revokeConnectionsForPiece` — otherwise the uninstall would leave live tokens the+ customer can no longer see. `hooks.server.ts` builds that hook for every entry of+ `ACTIVEPIECES_PIECES` (`pieceHooks`), so a new piece needs no hooks entry and no hooks+ FILE: the behaviour is identical for every piece.+- The card and the Details drawer read the same install checks (`useInstallGate`): a+ withheld (coming soon) install, a provider role another integration holds, and a mode to+ choose. The drawer offers Install only when none applies; opened by URL it used to+ install past all three.+- Both Install (the card) and Add account (the drawer) go through+ `integrations/connect.ts` `startIntegrationConnect`, so the two entry points cannot+ drift into different failure behaviour. It opens the popup with `beginOAuthPopup`+ (`oauth-popup.ts`) inside the click, before the fetch, and throws an+ `IntegrationConnectError` carrying the connect route's `connection` code, which+ the UI words through `integration-errors.ts`.++## A vendor is named in ONE place, on the workflow side++`allowlist.ts` carries everything the workflow side needs, so no shared file has a+`if (pieceName === …)` in it. (A vendor still has its own `defineIntegration` card and its+three env vars in `@carbon/env` — see the checklist below.) Beyond the package and the+action names, a row declares:++- `label` — the app's OWN name. The generator emits it as the `integration.<piece>` label,+ so the builder reads it like any other catalog string, translated. Nothing derives a name+ by title-casing the package slug: that is only ever right by accident ("Hubspot",+ "Github", "Zoho Crm").+- `version` — the EXACT installed version. `assertPinnedVersions` compares it against+ `packages/jobs/package.json` from the catalog check, so the field is a gate rather than a+ comment.++- `oauth` — the **NAMES** of the three env vars holding Carbon's app for that vendor, never+ the values (this module is imported by build-time catalog scripts). `resolveOAuthApp` in+ `integrations/oauth.ts` reads them through `getEnv` and throws+ `No OAuth app is configured for ${pieceName}.` if any is unset — a half-configured vendor+ must fail before a customer reaches a consent screen that cannot come back. Optional+ `authUrl` and `scope` **override the piece's own**: Slack's piece bakes `user_scope=` (a+ personal user token) into its URL and asks for 30 bot scopes, and we request sixteen: the+ ten the Carbon Assistant already used plus the six the four workflow actions need. `buildConsentUrl` (same file) is the one place the URL is assembled;+ the connect route only calls it.+- `accountLabel` — optional `{ url, field }` (a GET on the vendor's identity endpoint) or+ `{ path }` (a dot path into the token response — Slack's `team.name`) for reading back+ which account authorized, so two connections are tellable apart. The callback's+ `accountLabelFor` is best-effort: a failure there must never lose a connection that+ already authorized.+- `metadata` — optional `{ metadataKey: tokenResponsePath }`: workspace facts to keep on the+ connection's `metadata` column. Slack's response carries `team.id`, `bot_user_id` and the+ `incoming_webhook` channel the person picked; `connectionMetadataFrom` copies exactly the+ listed paths and nothing else, so a token can never land there.++**Only OAuth2 pieces are supported.** `getPieceOAuth2Auth` refuses `SECRET_TEXT`,+`BASIC_AUTH` and `CUSTOM_AUTH` with `UnsupportedPieceAuthError`. That is deliberate and+commented in both files: an API-key piece needs a credential form instead of a consent+screen, no callback route and no refresh cycle, which is its own work rather than a branch+in this path.++## Adding a piece++1. `pnpm --filter @carbon/jobs add @activepieces/piece-<name>@<exact version>`+2. Add the entry to `PIECE_ALLOWLIST`: the exact `version` (no range — `assertPinnedVersions`+ compares it to package.json from the catalog check), `label` (the app's own name, which+ the generator emits as the `integration.<piece>` label — do NOT expect it to be derived+ from the slug), action names, the three `oauth` env var names, and `accountLabel` if the+ vendor has such an endpoint. Spell every scope the way the vendor REPORTS it granted —+ for Google that is the full `https://www.googleapis.com/auth/…` URL, never the `email`+ alias the pieces use — or the account reads "Reconnect needed" from its first second.+3. Register the OAuth app with the vendor and set those env vars (add them to+ `.env.example` too).+4. If the card is new: add the client id to `getBrowserEnv()` and the `Window.env`+ declaration in `packages/env/src/index.ts`. That list is fixed and cannot be looked up by+ name, and the settings card reads it client-side to decide "Coming soon" — this is the one+ step the allowlist row cannot carry for you. (Skip when the card already exists and is+ already gated, as Slack's is.)+5. Add the piece name to `ACTIVEPIECES_PIECES` (`packages/ee/src/integrations/pieces.ts`) —+ the allowlist's `Record` then refuses to compile until both agree, and `hooks.server.ts`+ gives the piece its uninstall hook from that list. Add a config that calls+ `definePieceIntegration("<piece>", { name, category, active, shortDescription, description })`+ and register it in the `integrations` array. **And a migration inserting the `integration` row** (`INSERT INTO "integration" ("id",+ "jsonschema") VALUES ('<piece>', '{"type": "object", "properties": {}}'::json) ON CONFLICT DO+ NOTHING`): `companyIntegration.id` is an FK to `integration.id`, so without it+ `markIntegrationInstalled` fails the callback with a bare PostgREST error after the token+ is already in the vault. The `INSERT INTO "integration"` at the end of+ `20261026151302_workflow-integration-connections.sql` is the shape (one row per piece).+6. Check every action you expose ships an `outputSchema` — the generator refuses one+ that does not, and coverage is all-or-nothing per piece. Then run the generator and read+ its refusals: each unmappable prop is a decision — `omit` it (optional, or required with+ a `value`) or drop the action.+7. `pnpm run generate:workflow-catalog && pnpm run check:workflow-catalog`.++Step 3 is the real work and the real gate. The rest takes minutes — but none of the first+three pieces connected on the first try. The numbered **WHAT BIT US** block above+`PIECE_ALLOWLIST` in `allowlist.ts` is the list of exactly how each one failed (missing+`integration` row, Google scope aliases, Slack's `user_scope=`, unsent required defaults,+refresh-token conditions, PostgREST errors that log as empty, `window.env` gating, the+release-age policy, single-reader tokens, `markIntegrationInstalled`, test env). Read it+before step 1.++## Outputs come from the piece's own `outputSchema`++`integrations/outputs.ts` `describeOutputs` maps an action's `outputSchema` to Carbon+`ValueType`s, and keeps each output's declared field beside its type:+`listItems` → `list<record>`, `children` → a nested `record`, `format` → a primitive+(`datetime`/`number`/`boolean`; everything else is text). A `dynamicKey` field is+**omitted** — the vendor is declaring its keys cannot be enumerated, so naming one+would be a guess. An array inside an array is dropped too: `list.of` takes only a+scalar, so `list<list<T>>` has no representation.++Every step also gets `count` (a list's length — `compare` has no "is empty" operator,+so branching on "did anything come back?" needs it) and `result`, the raw JSON, kept+so already-saved workflows keep working and so a field the schema missed stays+reachable.++**An action with no `outputSchema` fails the generator** (`UnmappableOutputError`),+exactly as `UnmappablePropertyError` refuses an unmappable input. Coverage is+all-or-nothing per piece — ~100% on Google Calendar, Sheets, Airtable, Notion, GitHub+and Slack; **0%** on HubSpot, Salesforce, Jira, Shopify, Excel 365 and Xero — so this+is caught when a piece is allowlisted, never by a customer.++`outputSchema` is **authoring-time metadata, not a contract**: upstream scopes it to+presentation, `run()` returns `Promise<unknown | void>`, and nothing validates a+response against it. So `integrations/project.ts` shapes the real response field by+field: `readField` reads each declared field from its own path (`value`, else `key`) at+every depth, inside `children` and `listItems` too, and `fromJson` (`@carbon/ee/workflows`,+`runtime/values.ts`) coerces it against the declared type, strictly by `typeof`, so+anything absent or mistyped is `null`. It never throws, because a vendor disagreeing with+its own schema must not fail a step that really did call it.++## The form shows a curated subset++`integrations/visibility.ts` decides which props a person sees. Two generic rules cost+nothing per action and apply to every piece: a prop that is **required AND already has a+`defaultValue`** is hidden (nothing to decide — omitting it lets the piece apply its own+default), as is a dropdown with **exactly one** possible value. The allowlist's optional+`props` block is the rare exception, for a vendor default that is *wrong for us* rather+than merely uninteresting — `google_calendar_get_events.singleEvents` is the one case+today: it defaults to `false`, and an unexpanded recurring event carries the SERIES start+date, so "events tomorrow" silently misses every recurring meeting.++A pinned `value` is merged in by `toPropsValue` **at run time**, never stored on the node,+so changing a pin fixes every existing workflow at once. A node value always wins over a+pin — otherwise the Advanced section would be a lie.++`template: true` is the third override: prose the vendor declared a `ShortText` (Gmail's email+`body`) gets the multiline editor a `LongText` gets automatically. Without it the body of an+email is a one-line box.++`links` is the fourth: this prose reaches the vendor in a dialect that renders links+(`format: "slack" | "html"`, optionally gated by `when: { input, equals }` on a sibling+input — Gmail links only an html body). It asserts how THIS vendor renders text, so it is reviewed and+pinned like `omit`. Carbon's own Notify declares the same thing as `links: { format:+"markdown" }` in `catalog/actions.ts`; the old `linkify` flag is gone.++`omit: true` is the stronger override: the prop is in **neither** map. It is for a prop+whose non-default value needs a host capability the shim refuses (`mentionOriginFlow` reads+the flow context; `sendAsBot: false` needs a user token we do not request) or a type Carbon+cannot render (`FILE`, `JSON`). A pinned `value` is still sent at run time, and a required+prop must carry one (`sendAsBot: { omit: true, value: true }`). `MARKDOWN` props are omitted+automatically — Activepieces `Property.MarkDown` is help text and never collects a value.+Everything else unmappable still **fails the generator**: omission is a reviewed decision on+the allowlist, never a silent drop. The generator consults visibility BEFORE `toValueType`,+so a type is only ever an error for a prop a person would see.++Hidden inputs are emitted as **`advancedInputs`**, a second map beside `inputs`, and+rendered in the node's collapsed "Advanced properties" section. They are separate maps on+purpose: every `required` check and the validator itself iterate `inputs`, so a+hidden-but-present required input would have the validator demand a field the author was+never shown. A required prop hidden with no value to send — from us or from the piece —+**fails the generator**.++The connection field is hidden when the company has exactly one connection, but the id is+still **stored on the node**: a second account added later must not silently repoint every+existing workflow.++## Non-goals (v1)++Triggers (a piece's `triggers` need a webhook enable/disable lifecycle) and non-OAuth2+auth (`SECRET_TEXT`, `BASIC_AUTH`, `CUSTOM_AUTH`).diff --git a/.env.example b/.env.exampleindex 79b900b05e..c5cd041a79 100644--- a/.env.example+++ b/.env.example@@ -64,8 +64,41 @@ SMTP_FROM="Carbon <[email protected]>"# BotID for Cloud on Vercel, else Turnstile when the keys above are set.# BOT_PROTECTION="turnstile"+# Integrations. Every one of these is OPTIONAL: an integration whose client id is+# unset renders "Coming soon" on the Settings > Integrations page and cannot be+# installed. Set only the vendors you are actually testing.+# SlackSLACK_BOT_TOKEN="***********************"+SLACK_CLIENT_ID=""+SLACK_CLIENT_SECRET=""+SLACK_SIGNING_SECRET=""+SLACK_OAUTH_REDIRECT_URL=""++# Onshape+ONSHAPE_CLIENT_ID=""+ONSHAPE_CLIENT_SECRET=""+ONSHAPE_OAUTH_REDIRECT_URL=""++# Xero+XERO_CLIENT_ID=""+XERO_CLIENT_SECRET=""+XERO_WEBHOOK_SECRET=""++# QuickBooks Online+QUICKBOOKS_CLIENT_ID=""+QUICKBOOKS_CLIENT_SECRET=""+QUICKBOOKS_ENVIRONMENT="sandbox"+QUICKBOOKS_WEBHOOK_SECRET=""++# Jira+JIRA_CLIENT_ID=""+JIRA_CLIENT_SECRET=""+JIRA_OAUTH_REDIRECT_URL=""+JIRA_STATE_SECRET=""++# Exchange rates+EXCHANGE_RATES_API_KEY=""# Ramp (Spend Management). Carbon's single registered Ramp OAuth app — the# "Connect to Ramp" flow uses these for every company. Register a third-party app@@ -88,6 +121,13 @@ EXTRACTION_CONFIDENCE_THRESHOLD="0.85"# Google PlacesGOOGLE_PLACES_API_KEY="*******************"+# Google OAuth app for workflow integration connections (Google Calendar, Gmail).+# Register at https://console.cloud.google.com/apis/credentials and add the+# redirect URL below to the app's authorized redirect URIs.+GOOGLE_CLIENT_ID=""+GOOGLE_CLIENT_SECRET=""+GOOGLE_OAUTH_REDIRECT_URL=""+RATE_LIMIT="5"# Enterprise SAML SSO (Enterprise edition only). Generate the key with:diff --git a/AGENTS.md b/AGENTS.mdindex 80be425106..17b9ec99b4 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -114,6 +114,7 @@ IMPORTANT: Before any research or coding, match the task to this table. A single| Kanban | `.claude/rules/kanban-system.md` || Workflows (customer automation rules) | `.claude/rules/workflow-event-catalog.md` + `.claude/rules/workflow-matcher.md` + `.claude/rules/workflow-engine.md` + `packages/ee/src/workflows/AGENTS.md` || Workflow run history + retention | `.claude/rules/workflow-run-history.md` |+| Workflow integration steps (Activepieces pieces) | `.claude/rules/workflow-integrations.md` || Fixed assets | `.claude/rules/fixed-asset-lifecycle.md` || Rental agreements / leases / revenue recognition | `apps/erp/app/modules/sales/AGENTS.md` (Rentals) + `apps/erp/app/modules/accounting/AGENTS.md` (Revenue recognition, Sales-type leases) + `.claude/rules/fixed-asset-lifecycle.md` + `.claude/rules/accounting-sync-handlers.md` || Lessee leases (ASC 842, leases the company pays) / lease runs | `apps/erp/app/modules/purchasing/AGENTS.md` (Leases) + `apps/erp/app/modules/accounting/AGENTS.md` (Run types, Lessee leases, Lease Liabilities report, Lessee cutover) + `apps/erp/app/modules/invoicing/AGENTS.md` (Lease line) + `.claude/rules/fixed-asset-lifecycle.md` (purchase option) |diff --git a/apps/erp/app/modules/settings/AGENTS.md b/apps/erp/app/modules/settings/AGENTS.mdindex 89ae6d46d0..ffcbdce200 100644--- a/apps/erp/app/modules/settings/AGENTS.md+++ b/apps/erp/app/modules/settings/AGENTS.md@@ -99,7 +99,7 @@ A plan refusal from `@carbon/ee` (`EntitlementError`) comes back as an `entitlem- `getDocumentSections` / `getDocumentSectionsByIds` / `upsertDocumentSection` / `deleteDocumentSection` / `resolveSections` — sections; `resolveSections` seeds built-ins first, then lets a stored row of the same id override- `getTerms` — company terms fallback for the Terms block; `getAccountsPayableBillingAddress` / `getAccountsReceivableBillingAddress` (+ `update*`) — addresses printed on documents- `getCustomField(s)` / `getCustomFieldsTables`, plus `upsertCustomField` / `deleteCustomField` / `updateCustomFieldsSortOrder` (`settings.service.ts`, cache-clearing)-- `getIntegration(s)` / `getCompanyIntegrations` / `upsertCompanyIntegration` / `deactivateIntegration` / `getIntegrationsWithHealth`+- `getIntegration(s)` / `getCompanyIntegrations` / `upsertCompanyIntegration` / `markIntegrationInstalled` (installed flag only — never overwrites metadata) / `deactivateIntegration` / `getIntegrationsWithHealth`- Webhook + API-key READ helpers stay here (`getWebhook(s)` / `getWebhookTables`, `getApiKey(s)`); the commercial AUTHORING writers moved to `@carbon/ee` behind the entitlement lock — `upsertApiKey` / `deleteApiKey` (`@carbon/ee/api-keys.server`, `API_KEYS`) and `upsertWebhook` / `deleteWebhook` / `deactivateWebhooks` (`@carbon/ee/webhooks.server`, `WEBHOOKS`)- `insertCompany` / `insertSubsidiary` / `updateSubsidiary` / `deleteSubsidiary` / `seedCompany` / `updateCompany` / `updateCompanyPlan` — the building blocks of `createCompany` / `updateCompanyDetails` / `createSubsidiary` / `updateSubsidiaryDetails`- The lease policy (the ASC 842 thresholds `leaseMajorPartThresholdPercent` / `leaseSubstantiallyAllThresholdPercent`, `leaseDefaultDiscountRate` and `leaseIncrementalBorrowingRate`, percentage points) — written by `updateAccountingSettings` from `x+/settings+/accounting.tsx` (intent `leasePolicy`); applies to later lease activations only. Revenue recognition has no setting of its own. The same page's General Ledger card has no switch: it shows "Accounting since {date}" from `companySettings.accountingCutoverDate`, or "Accounting is not set up" and a "Set up accounting" button to the enable wizard (`x+/accounting+/activation`, see accounting AGENTS). The test is `hasAccountingCutover` (`~/modules/accounting/accounting.utils`). After the cutover the card shows a warning alert when documents posted on or after the cutover have no journal: the loader awaits `hasLegacyDocuments` (one statement of EXISTS tests, `@carbon/database/accounting-cutover-reads`), because it decides whether the alert exists, and streams the count (`getLegacyDocumentCounts`, read with `useResolved`). The alert's "Write missing journals" button posts intent `journal-legacy`, which runs `writeMissingJournals` (`repairLegacyJournals` (`accounting.service.ts`, ported from the `journal-legacy-documents` server function)); it needs `update: settings` and `update: accounting`. The `accountingEnabled` column is unuseddiff --git a/apps/erp/app/modules/settings/integration-errors.ts b/apps/erp/app/modules/settings/integration-errors.tsindex 601f85a2f3..c4ef007561 100644--- a/apps/erp/app/modules/settings/integration-errors.ts+++ b/apps/erp/app/modules/settings/integration-errors.ts@@ -150,6 +150,64 @@ export const integrationErrors = {title: msg`Onshape is already connected`,description: msg`A company connects to one Onshape at a time. Uninstall Onshape, then connect Onshape Government.`}+ },+ // Workflow integration connections (Google Calendar and friends). One shared+ // set of codes: the copy names "the integration" rather than a vendor, so a+ // second allowlisted piece needs no new entries.+ connection: {+ denied: {+ title: msg`The connection was refused`,+ description: msg`Authorization was refused. Try connecting again.`+ },+ "invalid-response": {+ title: msg`No authorization code was returned`,+ description: msg`The response was missing required parameters. Try connecting again.`+ },+ "invalid-state": {+ title: msg`The connection could not be verified`,+ description: msg`The authorization took too long or came back altered. Start the connection again from this page.`+ },+ "not-configured": {+ title: msg`This integration isn't configured`,+ description: msg`This Carbon instance is missing its OAuth credentials for this integration. Ask an administrator to set them.`+ },+ "token-exchange": {+ title: msg`The authorization was rejected`,+ description: msg`Exchanging the authorization code for an access token failed. Try connecting again.`+ },+ "duplicate-name": {+ title: msg`That connection name is already used`,+ description: msg`Another connection to this integration already has that name. Choose a different one.`+ },+ "account-mismatch": {+ title: msg`That's a different account`,+ description: msg`Reconnect with the account this connection already uses, or use Add account to connect the other one.`+ },+ "account-unverified": {+ title: msg`Couldn't confirm the account`,+ description: msg`The integration didn't say which account signed in, so this connection was left unchanged. Try again.`+ },+ "workspace-taken": {+ title: msg`That workspace is connected to another company`,+ description: msg`A workspace can be connected to one Carbon company only. Disconnect it there first, or connect a different workspace.`+ },+ "save-failed": {+ title: msg`Couldn't save the connection`,+ description: msg`The integration authorized the connection but saving it failed. Try connecting again.`+ },+ unexpected: {+ title: msg`Couldn't complete the connection`,+ description: msg`An unexpected error occurred while connecting. Try connecting again.`+ },+ // Answered by the connect route, before the consent screen opens.+ unavailable: {+ title: msg`That integration is not available`,+ description: msg`This integration can't be connected on this Carbon instance.`+ },+ "account-missing": {+ title: msg`That account no longer exists`,+ description: msg`It was removed after this page loaded. Reload the page and try again.`+ }}} satisfies Record<string, Record<string, IntegrationErrorMessage>>;@@ -161,7 +219,7 @@ export type IntegrationErrorCode<T extends IntegrationWithErrors> =/** The query string an OAuth callback redirects to the integrations page with. */export function integrationErrorSearch<T extends IntegrationWithErrors>(integration: T,- error: IntegrationErrorCode<T>+ error: IntegrationErrorCode<T> | SharedIntegrationErrorCode) {return `?integration=${integration}&error=${error}`;}@@ -172,9 +230,15 @@ const sharedErrors = {"coming-soon": {title: msg`This integration isn't available yet`,description: msg`It is coming soon. Contact Carbon to have it set up for your company.`+ },+ "plan-required": {+ title: msg`Integrations aren't included in your plan`,+ description: msg`Upgrade your plan to connect this integration.`}} satisfies Record<string, IntegrationErrorMessage>;+export type SharedIntegrationErrorCode = keyof typeof sharedErrors;+/** Resolves those params back to copy. Unknown integration or code → nothing. */export function getIntegrationError(integration: string | null,diff --git a/apps/erp/app/modules/settings/settings.models.ts b/apps/erp/app/modules/settings/settings.models.tsindex 0e1af75ebe..26ab4ae819 100644--- a/apps/erp/app/modules/settings/settings.models.ts+++ b/apps/erp/app/modules/settings/settings.models.ts@@ -104,6 +104,21 @@ export function apiKeyFields({};}+export const integrationConnectionActionValidator = z.discriminatedUnion(+ "intent",+ [+ z.object({+ intent: z.literal("rename"),+ id: z.string().min(1, { message: "No connection was named" }),+ name: z.string().trim().min(1, { message: "A connection needs a name" })+ }),+ z.object({+ intent: z.literal("disconnect"),+ id: z.string().min(1, { message: "No connection was named" })+ })+ ]+);+const ssoDomainRegex = /^[a-z0-9.-]+\.[a-z]{2,}$/;/**diff --git a/apps/erp/app/modules/settings/settings.server.ts b/apps/erp/app/modules/settings/settings.server.tsindex 16e9eb96ac..2da85bdfcc 100644--- a/apps/erp/app/modules/settings/settings.server.ts+++ b/apps/erp/app/modules/settings/settings.server.ts@@ -36,6 +36,11 @@ import {import { updateConsoleSetting } from "@carbon/ee/console.server";import { EntitlementError } from "@carbon/ee/entitlements.server";import { getIntegrationServerHooks } from "@carbon/ee/hooks.server";+import {+ disconnectConnection,+ readConnection,+ renameConnection+} from "@carbon/ee/integrations/connections";import type { OeeDevice } from "@carbon/ee/oee";import {deleteWorkCenterDevice,@@ -1692,6 +1697,92 @@ export const deactivateCompanyIntegration = defineServiceFn({}});+/**+ * Rename an account connected to a workflow integration.+ *+ * @remarks+ * The name a workflow step's account picker shows. Names are unique per app.+ */+export const renameIntegrationConnection = defineServiceFn({+ input: z.object({ id: z.string().min(1), name: z.string().trim().min(1) }),+ permission: { update: "settings" },+ async run(ctx, { id, name }) {+ // The table is read-only to API roles, so every write goes through the+ // service role, scoped by the caller's company.+ const connection = await readConnection(+ ctx.asSystem.supabase,+ ctx.company.id,+ id+ );+ if (connection === null) {+ return ctx.error("notFound", "Connection not found");+ }++ const update = await renameConnection(+ ctx.asSystem.supabase,+ ctx.company.id,+ id,+ name,+ ctx.auditUserId+ );+ // Names are unique per app: the unique index refuses a taken one.+ if (update.error?.code === "23505") {+ return ctx.error(+ "conflict",+ "An account is already called that — pick a different name."+ );+ }+ if (update.error) {+ return ctx.error("internal", "Failed to rename connection", update.error);+ }+ return { id };+ }+});++/**+ * Disconnect an account connected to a workflow integration.+ *+ * @remarks+ * Drops the account's token and marks it Revoked. The account stays listed, so+ * a workflow step that uses it says "reconnect" rather than naming an account+ * that is gone.+ */+export const disconnectIntegrationConnection = defineServiceFn({+ input: z.object({ id: z.string().min(1) }),+ permission: { update: "settings" },+ async run(ctx, { id }) {+ const connection = await readConnection(+ ctx.asSystem.supabase,+ ctx.company.id,+ id+ );+ if (connection === null) {+ return ctx.error("notFound", "Connection not found");+ }++ try {+ await disconnectConnection(+ ctx.asSystem.supabase,+ ctx.company.id,+ connection.pieceName,+ id,+ ctx.auditUserId+ );+ } catch (err) {+ return ctx.error("internal", "Failed to disconnect", err);+ }++ // The card's badge is cached (five minutes while healthy) and its health is+ // computed from these rows, so without this Settings keeps saying "Healthy"+ // for an account the builder already treats as disconnected.+ await service.invalidateIntegrationHealthCache(+ connection.pieceName,+ ctx.company.id+ );+ return { id };+ }+});+/*** Turn audit logging on.*diff --git a/apps/erp/app/modules/settings/settings.service.ts b/apps/erp/app/modules/settings/settings.service.tsindex 8fe9e1c0d5..409c6166b0 100644--- a/apps/erp/app/modules/settings/settings.service.ts+++ b/apps/erp/app/modules/settings/settings.service.ts@@ -157,6 +157,11 @@ import {getIntegrationServerHooks,onshapeConnectionHasWriteScope} from "@carbon/ee/hooks.server";+import {+ connectionsHealthy,+ needsReconnect,+ readConnections+} from "@carbon/ee/integrations/connections";import type { OeeDevice } from "@carbon/ee/oee";import { getOeeProvider } from "@carbon/ee/oee.server";import type {@@ -192,7 +197,10 @@ import {patchOnshapeOAuthGrant,patchOnshapeSettings} from "@carbon/ee/onshape.server";-import { isIntegrationComingSoon } from "@carbon/ee/plan";+import {+ isIntegrationComingSoon,+ isIntegrationWhitelisted+} from "@carbon/ee/plan";import {companyHasFeature,hasIntegrationEarlyAccess@@ -207,6 +215,7 @@ import {reportBackupCompatibility,selectExportableTables} from "@carbon/jobs/backups";+import { allowlistEntry, requiredScopesFor } from "@carbon/jobs/integrations";import { redis } from "@carbon/kv";import { getLogger } from "@carbon/logger";import type { JSONContent } from "@carbon/react";@@ -292,7 +301,10 @@ import {type CompanyBackupSummary,listCompanyBackupFolders} from "./backups.service";-import type { IntegrationErrorCode } from "./integration-errors";+import type {+ IntegrationErrorCode,+ SharedIntegrationErrorCode+} from "./integration-errors";import { integrationErrorSearch } from "./integration-errors";import type { OAuthPopupOutcome, OAuthPopupResult } from "./oauth-popup";import { OAUTH_POPUP_MESSAGE } from "./oauth-popup";@@ -611,6 +623,32 @@ export async function getIntegration(const integrationInstallLogger = getLogger("erp", "settings", "integrations");+/** The install action's checks, for the piece connect route and callback, which install without it. */+export async function pieceConnectRefusal(+ client: SupabaseClient<Database>,+ args: {+ companyId: string;+ integrationId: string;+ email: string;+ userId: string;+ }+): Promise<"unavailable" | SharedIntegrationErrorCode | null> {+ const integration = availableIntegrations.find(+ (i) => i.id === args.integrationId+ );+ if (!integration?.active) return "unavailable";+ if (+ !isIntegrationWhitelisted(args.integrationId) &&+ !(await companyHasFeature(client, args.companyId, {+ feature: "INTEGRATIONS"+ }))+ ) {+ return "plan-required";+ }+ if (await isIntegrationInstallWithheld(client, args)) return "coming-soon";+ return null;+}+/*** Whether a new install is refused: an `internalOnly` integration this user* sees as "Coming soon" (`isIntegrationComingSoon`), in a company that does not@@ -2174,6 +2212,7 @@ export async function getOeeDevicesTabData(}const INTEGRATION_CACHE_TTL = 3600;+const PIECE_HEALTHY_CACHE_TTL = 300;/*** Drop the cached auth record for an API key so a scope change or revocation@@ -2506,51 +2545,6 @@ export async function getCompanyIntegration();}-export async function getSlackIntegration(- client: SupabaseClient<Database>,- companyId: string-): Promise<{ token: string; channelId?: string } | null> {- // 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?.active || !integration.metadata) {- return null;- }-- const metadata = (await resolveIntegrationSecrets(- serviceRole,- companyId,- "slack",- integration.metadata,- integration.secretRef- )) as any;-- if (!metadata.access_token) {- return null;- }-- return {- token: metadata.access_token,- channelId: metadata.channel_id || metadata.default_channel_id- };-}--export async function hasSlackIntegration(- client: SupabaseClient<Database>,- companyId: string-): Promise<boolean> {- return hasIntegration(client, companyId, "slack");-}-export async function upsertCompanyIntegration(client: SupabaseClient<Database>,update: {@@ -2654,6 +2648,43 @@ export async function upsertCompanyIntegration(return result;}+/**+ * Flip an integration to installed without touching anything else on the row. The+ * piece callback marks its card installed after a connection is saved; an upsert+ * that UPDATES on conflict would write empty metadata over whatever settings the+ * row already holds.+ */+export async function markIntegrationInstalled(+ client: SupabaseClient<Database>,+ args: { id: string; companyId: string; updatedBy: string }+): Promise<{ error: PostgrestError | null }> {+ // Two statements that are each safe against a concurrent callback, instead of+ // read-then-insert (two callbacks both read "absent" and the second insert+ // failed on the primary key): insert only when absent, then activate only+ // when inactive. Neither touches `metadata`.+ const inserted = await client.from("companyIntegration").upsert(+ {+ id: args.id,+ companyId: args.companyId,+ active: true,+ metadata: {},+ updatedBy: args.updatedBy+ },+ { onConflict: "id,companyId", ignoreDuplicates: true }+ );+ let error: PostgrestError | null = inserted.error;+ if (error === null) {+ ({ error } = await client+ .from("companyIntegration")+ .update({ active: true, updatedBy: args.updatedBy })+ .eq("id", args.id)+ .eq("companyId", args.companyId)+ .eq("active", false));+ }+ if (error === null) await clearCompanyIntegrationCache(args.companyId);+ return { error };+}+export async function upsertCustomField(client: SupabaseClient<Database>,customField:@@ -2764,6 +2795,53 @@ async function getConnectionHealth(};}+ const key = `integrations:${companyId}:${integration.id}:health`;++ // A workflow-piece card's health is its accounts: none revoked/expired, and none+ // predating a scope the piece now needs (its steps would fail with+ // `missing_scope`). One read serves both questions. Decided here rather than in+ // an ee hook because only this side can see the allowlist's required list, and+ // an ee hook would read the same rows a second time.+ if (allowlistEntry(integration.id!) !== undefined) {+ const cached = await redis.get(key);+ if (cached === "1")+ return { ...integration, health: "healthy", healthReason: null };+ if (cached === "0")+ return { ...integration, health: "unhealthy", healthReason: null };++ // A failed read is one unhealthy card, never a crashed Settings page —+ // `getIntegrationsWithHealth` runs these in a Promise.all with no catch. It+ // is not cached: the next load should re-ask rather than pin a transient+ // failure for the TTL.+ let healthy: boolean;+ try {+ const [rows, required] = await Promise.all([+ readConnections(getCarbonServiceRole(), companyId, integration.id!),+ requiredScopesFor(integration.id!)+ ]);+ healthy =+ connectionsHealthy(rows) &&+ !rows.some((row) => needsReconnect(row, required));+ } catch {+ return { ...integration, health: "unhealthy", healthReason: null };+ }+ // The callback, disconnect and uninstall invalidate this key. A refresh the+ // vendor rejects does not: ee's `markExpired` sets the connection Expired and+ // cannot reach this key. So a healthy answer is kept for five minutes, not+ // hours, and an unhealthy one for a minute.+ await redis.set(+ key,+ healthy ? "1" : "0",+ "EX",+ healthy ? PIECE_HEALTHY_CACHE_TTL : 60+ );+ return {+ ...integration,+ health: healthy ? "healthy" : "unhealthy",+ healthReason: null+ };+ }+const serverHooks = getIntegrationServerHooks(integration.id!);const config = getIntegrationConfigById(integration.id as IntegrationID);const healthcheck = serverHooks?.onHealthcheck ?? config?.onHealthcheck;@@ -2776,8 +2854,6 @@ async function getConnectionHealth(};}- const key = `integrations:${companyId}:${integration.id}:health`;-const cached = await redis.get(key);// Only cache healthy status@@ -5259,7 +5335,8 @@ export async function completeOnshapeAuthorization({}}-function withCookie(response: Response, cookie: string) {+/** Sets the OAuth state cookie a consume rewrote on the reply that ends the flow. */+export function withCookie(response: Response, cookie: string) {response.headers.append("Set-Cookie", cookie);return response;}diff --git a/apps/erp/app/modules/settings/ui/Integrations/ConnectionsTab.tsx b/apps/erp/app/modules/settings/ui/Integrations/ConnectionsTab.tsxnew file mode 100644index 0000000000..66c2ccb505--- /dev/null+++ b/apps/erp/app/modules/settings/ui/Integrations/ConnectionsTab.tsx@@ -0,0 +1,301 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import {+ IntegrationConnectError,+ startIntegrationConnect+} from "@carbon/ee/integrations/connect";+import {+ connectionUsable,+ type IntegrationConnection,+ needsReconnect+} from "@carbon/ee/integrations/connections";+import { useAction } from "@carbon/query";+import {+ Badge,+ Button,+ DrawerBody,+ HStack,+ Input,+ toast,+ VStack+} from "@carbon/react";+import { msg } from "@lingui/core/macro";+import { Trans, useLingui } from "@lingui/react/macro";+import type { ReactNode } from "react";+import { useMemo, useState } from "react";+import { LuPlug, LuUnplug } from "react-icons/lu";+import { getIntegrationError } from "~/modules/settings/integration-errors";+import { path } from "~/utils/path";+import { suggestConnectionName } from "./connectionName";++/** Derived, not restated: the loader hands these rows straight through, so a column+ * that changes type upstream fails here rather than rendering something else. */+export type ConnectionRow = Pick<+ IntegrationConnection,+ "id" | "pieceName" | "name" | "accountLabel" | "status" | "metadata"+>;++// Keyed by the SAME status the shared predicate reads, so the badge cannot say+// one thing while `connectionUsable` says another.+const STATUS_VARIANT = {+ Active: "green",+ Expired: "yellow",+ Revoked: "red"+} as const;++const STATUS_LABEL = {+ Active: msg`Active`,+ Expired: msg`Expired`,+ Revoked: msg`Revoked`+} satisfies Record<keyof typeof STATUS_VARIANT, unknown>;++/**+ * The accounts this integration can act as, inside its own card's Details drawer.+ *+ * Every other integration installs once per company; this one allows several named+ * accounts, because a workflow step picks which one it runs as. That is the only+ * difference, and it is why the list lives here rather than on the settings form.+ */+export function ConnectionsTab({+ tabs,+ pieceName,+ defaultName,+ connections,+ requiredScopes+}: {+ tabs?: ReactNode;+ pieceName: string;+ /** Seeds the name field, so the common case is one click. */+ defaultName: string;+ connections: ConnectionRow[];+ /** What a connection must hold for this piece's steps (`requiredScopesFor`). */+ requiredScopes: readonly string[];+}) {+ const { t, i18n } = useLingui();+ const [name, setName] = useState("");+ const [connecting, setConnecting] = useState(false);++ // The default is the app's own name, so the SECOND account always collided with+ // the first — leaving the button disabled and the field showing a name the user+ // never typed, with nothing explaining what to do. Suggest a free one instead.+ const taken = useMemo(+ () => new Set(connections.map((connection) => connection.name)),+ [connections]+ );+ const suggested = useMemo(+ () => suggestConnectionName(defaultName, taken),+ [defaultName, taken]+ );++ const proposed = name.trim() || suggested;+ // Only what the user actually TYPED can collide — the suggestion never does.+ const duplicate = name.trim() !== "" && taken.has(proposed);++ // The consent screen opens from the URL the connect loader builds; the same+ // response sets the state cookie the callback checks.+ // One entry point for Add account (`?name=`) and Reconnect (`?connection=`).+ const startConnect = async (+ query: { name: string } | { connection: string }+ ) => {+ setConnecting(true);+ try {+ await startIntegrationConnect(+ `${path.to.api.integrationConnect(pieceName)}?${new URLSearchParams(+ query+ )}`+ );+ } catch (error) {+ const failure =+ error instanceof IntegrationConnectError+ ? getIntegrationError("connection", error.code)+ : undefined;+ if (failure) {+ toast.error(i18n._(failure.title), {+ description: i18n._(failure.description)+ });+ } else {+ toast.error(t`Couldn't start the authorization.`);+ }+ } finally {+ setConnecting(false);+ }+ };++ return (+ <DrawerBody className="gap-4">+ {tabs}+ <VStack spacing={4}>+ <p className="text-sm text-muted-foreground">+ <Trans>+ Accounts your workflows can act as. Add one for each account a+ workflow step should use.+ </Trans>+ </p>++ {connections.length === 0 ? (+ <p className="text-sm text-muted-foreground">+ <Trans>No accounts connected yet.</Trans>+ </p>+ ) : (+ <VStack spacing={2} className="w-full">+ {connections.map((connection) => (+ <ConnectionItem+ key={connection.id}+ connection={connection}+ requiredScopes={requiredScopes}+ reconnecting={connecting}+ onReconnect={() => startConnect({ connection: connection.id })}+ />+ ))}+ </VStack>+ )}++ <HStack spacing={2} className="w-full">+ <Input+ size="sm"+ className="max-w-64"+ value={name}+ placeholder={suggested}+ aria-label={t`Connection name`}+ onChange={(event) => setName(event.target.value)}+ />+ <Button+ size="sm"+ leftIcon={<LuPlug />}+ isDisabled={duplicate}+ isLoading={connecting}+ onClick={() => startConnect({ name: proposed })}+ >+ <Trans>Add account</Trans>+ </Button>+ {duplicate && (+ <span className="text-sm text-destructive">+ <Trans>+ An account is already called that — pick a different name.+ </Trans>+ </span>+ )}+ </HStack>+ </VStack>+ </DrawerBody>+ );+}++function ConnectionItem({+ connection,+ requiredScopes,+ reconnecting,+ onReconnect+}: {+ connection: ConnectionRow;+ requiredScopes: readonly string[];+ reconnecting: boolean;+ onReconnect: () => void;+}) {+ const { t, i18n } = useLingui();+ // What the user is typing, until the rename settles; the stored name otherwise,+ // so a refused rename shows the name the account still has.+ const [draft, setDraft] = useState<string | null>(null);+ const name = draft ?? connection.name;+ const renamer = useAction({+ onSuccess: () => toast.success(t`Renamed`),+ onSettled: () => setDraft(null)+ });+ const disconnecter = useAction({+ onSuccess: () => toast.success(t`Disconnected`)+ });+ const pending = renamer.isPending || disconnecter.isPending;+ const usable = connectionUsable(connection);+ // Connected before this piece needed a scope (a Slack workspace installed for the+ // Assistant, say). Everything it already did keeps working; workflow steps do not.+ const needsScopes = needsReconnect(connection, requiredScopes);++ return (+ <HStack className="w-full items-start justify-between gap-3 border rounded-md p-3">+ <VStack spacing={1} className="min-w-0 flex-1">+ <HStack spacing={2} className="w-full">+ <Input+ size="sm"+ className="min-w-0 flex-1"+ value={name}+ aria-label={t`Connection name`}+ onChange={(event) => setDraft(event.target.value)}+ onBlur={() => {+ if (name.trim() === "" || name === connection.name) {+ setDraft(null);+ return;+ }+ renamer.submit(+ { intent: "rename", id: connection.id, name: name.trim() },+ { method: "post", action: path.to.integrationConnections }+ );+ }}+ />+ <Badge+ variant={STATUS_VARIANT[connection.status]}+ className="shrink-0"+ >+ {i18n._(STATUS_LABEL[connection.status])}+ </Badge>+ {needsScopes && (+ <Badge variant="yellow" className="shrink-0">+ <Trans>Reconnect needed</Trans>+ </Badge>+ )}+ </HStack>+ {connection.accountLabel && (+ <span className="text-xs text-muted-foreground">+ {connection.accountLabel}+ </span>+ )}+ {needsScopes ? (+ <span className="text-xs text-muted-foreground">+ <Trans>+ Connected before workflows needed extra permissions. Reconnect to+ grant them — everything else keeps working meanwhile.+ </Trans>+ </span>+ ) : !usable ? (+ <span className="text-xs text-muted-foreground">+ <Trans>+ This account has stopped working. Reconnect it — workflow steps+ using it will fail until you do.+ </Trans>+ </span>+ ) : null}+ </VStack>+ <VStack spacing={2} className="w-auto shrink-0 items-end">+ {(needsScopes || !usable) && (+ <Button+ size="sm"+ leftIcon={<LuPlug />}+ isLoading={reconnecting}+ onClick={onReconnect}+ >+ <Trans>Reconnect</Trans>+ </Button>+ )}+ <disconnecter.Form+ method="post"+ action={path.to.integrationConnections}+ className="shrink-0"+ >+ <input type="hidden" name="intent" value="disconnect" />+ <input type="hidden" name="id" value={connection.id} />+ <Button+ type="submit"+ size="sm"+ variant="secondary"+ leftIcon={<LuUnplug />}+ isDisabled={connection.status === "Revoked" || pending}+ isLoading={disconnecter.isPending}+ >+ <Trans>Disconnect</Trans>+ </Button>+ </disconnecter.Form>+ </VStack>+ </HStack>+ );+}diff --git a/apps/erp/app/modules/settings/ui/Integrations/InstallButton.tsx b/apps/erp/app/modules/settings/ui/Integrations/InstallButton.tsxnew file mode 100644index 0000000000..f4854a3546--- /dev/null+++ b/apps/erp/app/modules/settings/ui/Integrations/InstallButton.tsx@@ -0,0 +1,52 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { Button, Tooltip, TooltipContent, TooltipTrigger } from "@carbon/react";+import { Trans } from "@lingui/react/macro";+import type { InstallableIntegration } from "./useIntegrationInstall";+import { useIntegrationInstall } from "./useIntegrationInstall";++/**+ * The Install button, wherever an integration is offered — the card in the grid and its+ * Details drawer.+ *+ * An integration this server has no credentials for can never be installed, so its button+ * is disabled and says why on hover. A disabled `<button>` fires no pointer events, so the+ * tooltip hangs off a wrapper around it rather than the button itself.+ */+export function InstallButton({+ integration,+ isDisabled = false,+ onInstall+}: {+ integration: InstallableIntegration & { active: boolean };+ isDisabled?: boolean;+ /** Replaces the default install, e.g. to ask for an install mode first. */+ onInstall?: () => void;+}) {+ const { install, isInstalling } = useIntegrationInstall(integration);++ const button = (+ <Button+ isDisabled={isDisabled || !integration.active || isInstalling}+ isLoading={isInstalling}+ onClick={onInstall ?? install}+ >+ <Trans>Install</Trans>+ </Button>+ );++ if (integration.active) return button;++ return (+ <Tooltip>+ <TooltipTrigger asChild>+ <span tabIndex={0}>{button}</span>+ </TooltipTrigger>+ <TooltipContent>+ <Trans>Coming soon</Trans>+ </TooltipContent>+ </Tooltip>+ );+}diff --git a/apps/erp/app/modules/settings/ui/Integrations/IntegrationCard.tsx b/apps/erp/app/modules/settings/ui/Integrations/IntegrationCard.tsxindex 767888ec07..4ab9325fbf 100644--- a/apps/erp/app/modules/settings/ui/Integrations/IntegrationCard.tsx+++ b/apps/erp/app/modules/settings/ui/Integrations/IntegrationCard.tsx@@ -3,11 +3,7 @@// including ports, remain AGPLv3; serving them over a network requires releasing their source.import type { Integration } from "@carbon/ee";-import {- isIntegrationComingSoon,- isIntegrationWhitelisted-} from "@carbon/ee/plan";-import { getLogger } from "@carbon/logger";+import { isIntegrationWhitelisted } from "@carbon/ee/plan";import { useRevalidator } from "@carbon/query";import {Badge,@@ -21,22 +17,20 @@ import {Tooltip,TooltipContent,TooltipTrigger,- toast,- useEdition,- useRouteData+ toast} from "@carbon/react";import { Trans, useLingui } from "@lingui/react/macro";import { useEffect, useState } from "react";import { LuLock } from "react-icons/lu";-import { Link, useFetcher, useNavigate } from "react-router";+import { Link, useFetcher } from "react-router";import { usePlanGate } from "~/hooks/usePlanGate";-import { useUser } from "~/hooks/useUser";import { getIntegrationError } from "~/modules/settings/integration-errors";import { isOAuthPopupResult } from "~/modules/settings/oauth-popup";import { path } from "~/utils/path";+import { InstallButton } from "./InstallButton";import { InstallModeDialog } from "./InstallModeDialog";--const logger = getLogger("erp", "settings", "integrations");+import { useInstallGate } from "./useInstallGate";+import { startOAuthConnect } from "./useIntegrationInstall";/** Mirrors `IntegrationHealthStatus` in settings.server (not importable here). */type IntegrationHealthStatus =@@ -62,15 +56,12 @@ export type IntegrationHealth = {export function IntegrationCard({integration,- installed,- hasEarlyAccess+ installed}: {integration: Integration;installed: IntegrationHealth | null;- hasEarlyAccess: boolean;}) {const fetcher = useFetcher<{}>();- const navigate = useNavigate();const revalidator = useRevalidator();const { i18n } = useLingui();@@ -87,70 +78,18 @@ export function IntegrationCard({}).modes?.find((m) => m.id === installed.installMode): undefined;- const routeData = useRouteData<{- activeRoles: Record<string, string | null>;- }>(path.to.integrations);const [showModeDialog, setShowModeDialog] = useState(false);const { isGated } = usePlanGate({ feature: "INTEGRATIONS" });const isWhitelisted = isIntegrationWhitelisted(integration.id);const isStarterPlan = isGated && !isWhitelisted;- const edition = useEdition();- const user = useUser();// Only an install is withheld: a company where it was installed keeps a- // working card.- const comingSoon =- !installed &&- isIntegrationComingSoon(integration, {- edition,- email: user.email,- hasEarlyAccess- });-- // At most one ACTIVE integration per provider role, enforced by a database- // trigger. Surfacing it here is what keeps a customer from meeting that- // refusal as a failed install — and it names the incumbent, so the next step- // is obvious.- const providerRole = (- integration as { providerRole?: "accounting" | "spend" | "oee" }- ).providerRole;- // Several OEE providers may be active at once (the database exempts the- // role), so an active one is never an incumbent.- const roleIncumbent =- providerRole && providerRole !== "oee"- ? (routeData?.activeRoles?.[providerRole] ?? null)- : null;- const modes =- (- integration as {- modes?: Array<{ id: string; label: string; description: string }>;- }- ).modes ?? [];-- /**- * Hand off to the connect route — for EVERY OAuth integration, not just the- * ones with modes.- *- * The card used to build the authorize URL itself and `window.open` it, with a- * correlation value from the loader. That had three problems: the scope list was- * assembled client-side, the state was neither signed nor browser-bound, and the- * popup left the originating tab stale (every callback ends in a `redirect`, so- * none of them ever wanted a popup). One server route fixes all three, and the- * card stops needing to know anything about OAuth.- *- * A full navigation, not a popup: the route sets an HttpOnly state cookie that- * must accompany the callback.- */- const startConnect = (mode?: string) => {- const url = new URL(- `/api/integrations/${integration.id}/connect`,- window.location.origin- );- if (mode) url.searchParams.set("mode", mode);- window.location.href = url.toString();- };-- const conflictsWith =- roleIncumbent && roleIncumbent !== integration.id ? roleIncumbent : null;+ // working card. The role conflict is surfaced here so a customer never meets+ // the database's one-per-role refusal as a failed install, and it names the+ // incumbent, so the next step is obvious.+ const { comingSoon, conflictsWith, modes, needsModeChoice } = useInstallGate(+ integration,+ !!installed+ );// An OAuth callback that ran inside the popup `onClientInstall` opened posts// its outcome here and closes the popup (see oauth-popup.server.ts).@@ -165,7 +104,10 @@ export function IntegrationCard({return;}- const failure = getIntegrationError(integration.id, event.data.error);+ // A workflow piece's callback answers with the shared `connection` codes.+ const failure =+ getIntegrationError(integration.id, event.data.error) ??+ getIntegrationError("connection", event.data.error);if (failure) {toast.error(i18n._(failure.title), {id: `${integration.id}:${event.data.error}`,@@ -178,39 +120,6 @@ export function IntegrationCard({return () => window.removeEventListener("message", onMessage);}, [integration.id, revalidator, i18n]);- const handleInstall = async () => {- if ("oauth" in integration && integration.oauth) {- // An integration declaring install MODES needs that question answered- // before consent, because the mode decides which scopes are requested.- // That is the ONLY branch here — where the authorize URL comes from is not- // a per-integration decision, it is always the connect route.- if (modes.length > 0) {- setShowModeDialog(true);- return;- }- startConnect();- return;- } else if (integration.settings.some((setting) => setting.required)) {- navigate(path.to.integration(integration.id));- } else if (integration.onClientInstall) {- try {- await integration.onClientInstall();- } catch (error) {- logger.error("Client install failed", {- integration: integration.id,- error- });- toast.error(`Couldn't start the ${integration.name} connection`);- }- } else {- const formData = new FormData();- fetcher.submit(formData, {- method: "post",- action: path.to.integration(integration.id)- });- }- };-const handleUninstall = async () => {await integration?.onClientUninstall?.();};@@ -290,18 +199,13 @@ export function IntegrationCard({</Button></fetcher.Form>) : (- <Button- isDisabled={- !integration.active ||- comingSoon ||- !!conflictsWith ||- fetcher.state !== "idle"+ <InstallButton+ integration={integration}+ isDisabled={comingSoon || !!conflictsWith}+ onInstall={+ needsModeChoice ? () => setShowModeDialog(true) : undefined}- isLoading={fetcher.state !== "idle"}- onClick={handleInstall}- >- <Trans>Install</Trans>- </Button>+ />)}</>)}@@ -322,7 +226,7 @@ export function IntegrationCard({integrationName={integration.name}modes={modes}onClose={() => setShowModeDialog(false)}- onChoose={(mode) => startConnect(mode)}+ onChoose={(mode) => startOAuthConnect(integration.id, mode)}/>)}</Card>diff --git a/apps/erp/app/modules/settings/ui/Integrations/IntegrationForm.tsx b/apps/erp/app/modules/settings/ui/Integrations/IntegrationForm.tsxindex 88675e84a4..a42567d227 100644--- a/apps/erp/app/modules/settings/ui/Integrations/IntegrationForm.tsx+++ b/apps/erp/app/modules/settings/ui/Integrations/IntegrationForm.tsx@@ -58,6 +58,8 @@ import { Processes } from "~/components/Form";import { MethodIcon, TrackingTypeIcon } from "~/components/Icons";import { usePermissions, useUser } from "~/hooks";import { path } from "~/utils/path";+import { InstallButton } from "./InstallButton";+import { useInstallGate } from "./useInstallGate";/*** Live state an installed integration supplies for one of its actions. With it@@ -671,6 +673,7 @@ export function IntegrationForm({const integration = integrationId? availableIntegrations.find((i) => i.id === integrationId): undefined;+ const installGate = useInstallGate(integration, installed);// Extract connected organisation name from metadata (e.g. Xero tenant// name). New credentials keep provider fields under providerMetadata;@@ -812,6 +815,18 @@ export function IntegrationForm({const integrationActions =(integration as { actions?: IntegrationAction[] })?.actions ?? [];+ // An integration with no settings has no form to submit, so Install is a button rather+ // than a Submit — the same one the card offers, so the drawer is never a dead end when+ // it is opened by URL on something that isn't installed yet. The card's checks+ // hold here too: a withheld install, a role another integration holds, and a+ // mode to choose (the card asks it) are installed from the card or not at all.+ const canInstallHere =+ !installed &&+ integration?.settings.length === 0 &&+ !installGate.comingSoon &&+ !installGate.conflictsWith &&+ !installGate.needsModeChoice;+if (!integrationId) {throw new Error("Integration ID is required");}@@ -1030,6 +1045,20 @@ export function IntegrationForm({integration.description}</p>+ {canInstallHere && (+ <p className="text-sm text-muted-foreground">+ <Trans>+ {integration.name} isn't installed yet. There's nothing to+ configure — install it to connect an account.+ </Trans>+ </p>+ )}+ {!installed && installGate.conflictsWith && (+ <p className="text-sm text-muted-foreground">+ <Trans>Uninstall {installGate.conflictsWith} first</Trans>+ </p>+ )}+{!collapseSettings && setupInstructions}{collapseSettings && actionsSection}@@ -1061,10 +1090,19 @@ export function IntegrationForm({<Trans>Update</Trans></Submit>) : (- <Submit isDisabled={isDisabled}>+ <Submit+ isDisabled={+ isDisabled ||+ installGate.comingSoon ||+ !!installGate.conflictsWith ||+ installGate.needsModeChoice+ }+ ><Trans>Install</Trans></Submit>)+ ) : canInstallHere ? (+ <InstallButton integration={integration} isDisabled={isDisabled} />) : null}<Button variant="solid" onClick={onClose}>diff --git a/apps/erp/app/modules/settings/ui/Integrations/IntegrationsList.tsx b/apps/erp/app/modules/settings/ui/Integrations/IntegrationsList.tsxindex 23065228e3..0244a7aa05 100644--- a/apps/erp/app/modules/settings/ui/Integrations/IntegrationsList.tsx+++ b/apps/erp/app/modules/settings/ui/Integrations/IntegrationsList.tsx@@ -144,7 +144,6 @@ const IntegrationsList = ({key={integration.id}integration={integration}installed={installed.find((i) => i.id === integration.id) || null}- hasEarlyAccess={hasEarlyAccess}/>);})}diff --git a/apps/erp/app/modules/settings/ui/Integrations/connectionName.test.ts b/apps/erp/app/modules/settings/ui/Integrations/connectionName.test.tsnew file mode 100644index 0000000000..9764d90dc8--- /dev/null+++ b/apps/erp/app/modules/settings/ui/Integrations/connectionName.test.ts@@ -0,0 +1,45 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { describe, expect, it } from "vitest";+import { suggestConnectionName } from "./connectionName";++describe("suggestConnectionName", () => {+ it("uses the app's own name when nothing is connected", () => {+ expect(suggestConnectionName("Google Calendar", new Set())).toBe(+ "Google Calendar"+ );+ });++ // The reported bug: one account connected, and the suggestion collided with it.+ it("suggests a free name once the default is taken", () => {+ expect(+ suggestConnectionName("Google Calendar", new Set(["Google Calendar"]))+ ).toBe("Google Calendar 2");+ });++ it("keeps counting past the names already in use", () => {+ expect(+ suggestConnectionName(+ "Google Calendar",+ new Set(["Google Calendar", "Google Calendar 2", "Google Calendar 3"])+ )+ ).toBe("Google Calendar 4");+ });++ // A gap is fine to reuse — the point is a name nobody holds, not the highest number.+ it("fills a gap left by a renamed account", () => {+ expect(+ suggestConnectionName(+ "Google Calendar",+ new Set(["Google Calendar", "Google Calendar 3"])+ )+ ).toBe("Google Calendar 2");+ });++ it("never suggests a name that is already taken", () => {+ const taken = new Set(["Slack", "Slack 2", "Slack 4"]);+ expect(taken.has(suggestConnectionName("Slack", taken))).toBe(false);+ });+});diff --git a/apps/erp/app/modules/settings/ui/Integrations/connectionName.ts b/apps/erp/app/modules/settings/ui/Integrations/connectionName.tsnew file mode 100644index 0000000000..8077f0662d--- /dev/null+++ b/apps/erp/app/modules/settings/ui/Integrations/connectionName.ts@@ -0,0 +1,21 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++/**+ * The name offered for the next connected account.+ *+ * Extracted from `ConnectionsTab` so it can be tested: the default is the app's own+ * name, so with one account already connected the SECOND always collided with the+ * first — the Add button sat disabled beside a field showing a name the user never+ * typed, and nothing said what to do about it.+ */+export function suggestConnectionName(+ defaultName: string,+ taken: ReadonlySet<string>+): string {+ if (!taken.has(defaultName)) return defaultName;+ let n = 2;+ while (taken.has(`${defaultName} ${n}`)) n += 1;+ return `${defaultName} ${n}`;+}diff --git a/apps/erp/app/modules/settings/ui/Integrations/useInstallGate.ts b/apps/erp/app/modules/settings/ui/Integrations/useInstallGate.tsnew file mode 100644index 0000000000..d6ff5226f5--- /dev/null+++ b/apps/erp/app/modules/settings/ui/Integrations/useInstallGate.ts@@ -0,0 +1,74 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { isIntegrationComingSoon } from "@carbon/ee/plan";+import { useEdition, useRouteData } from "@carbon/react";+import { useUser } from "~/hooks/useUser";+import { path } from "~/utils/path";++export type InstallMode = { id: string; label: string; description: string };++/** Only what the checks read. Structural rather than `Integration`, whose generic+ * variants don't all assign back to the bare type. */+type GatedIntegration = {+ id: string;+ internalOnly?: boolean;+ providerRole?: string;+ modes?: InstallMode[];+ oauth?: unknown;+};++/**+ * What stands between an integration and Install, read once for the card and the+ * Details drawer so the two cannot disagree: the drawer opened by URL used to+ * install past every one of these.+ *+ * - `comingSoon`: the install is withheld (a company that installed it keeps it).+ * - `conflictsWith`: another integration holds the provider role, and a database+ * trigger allows one active per role, so the install would fail after consent.+ * - `needsModeChoice`: an OAuth install whose mode decides the scopes it asks for.+ */+export function useInstallGate(+ integration: GatedIntegration | undefined,+ installed: boolean+) {+ const routeData = useRouteData<{+ activeRoles: Record<string, string | null>;+ hasEarlyAccess: boolean;+ }>(path.to.integrations);+ const edition = useEdition();+ const user = useUser();++ if (integration === undefined) {+ return {+ comingSoon: false,+ conflictsWith: null,+ modes: [] as InstallMode[],+ needsModeChoice: false+ };+ }++ const comingSoon =+ !installed &&+ isIntegrationComingSoon(integration, {+ edition,+ email: user.email,+ hasEarlyAccess: routeData?.hasEarlyAccess ?? false+ });++ const providerRole = integration.providerRole;+ // Several OEE providers may be active at once (the database exempts the+ // role), so an active one is never an incumbent.+ const roleIncumbent =+ providerRole && providerRole !== "oee"+ ? (routeData?.activeRoles?.[providerRole] ?? null)+ : null;+ const conflictsWith =+ roleIncumbent && roleIncumbent !== integration.id ? roleIncumbent : null;++ const modes = integration.modes ?? [];+ const needsModeChoice = !!integration.oauth && modes.length > 0;++ return { comingSoon, conflictsWith, modes, needsModeChoice };+}diff --git a/apps/erp/app/modules/settings/ui/Integrations/useIntegrationInstall.ts b/apps/erp/app/modules/settings/ui/Integrations/useIntegrationInstall.tsnew file mode 100644index 0000000000..f3800bad6a--- /dev/null+++ b/apps/erp/app/modules/settings/ui/Integrations/useIntegrationInstall.ts@@ -0,0 +1,106 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { IntegrationConnectError } from "@carbon/ee/integrations/connect";+import { getLogger } from "@carbon/logger";+import { toast } from "@carbon/react";+import { useLingui } from "@lingui/react/macro";+import { useCallback } from "react";+import { useFetcher, useNavigate } from "react-router";+import { getIntegrationError } from "~/modules/settings/integration-errors";+import { path } from "~/utils/path";++const logger = getLogger("erp", "settings", "integrations");++/** Only what installing needs. Structural rather than `Integration`, whose generic+ * variants don't all assign back to the bare type. */+export type InstallableIntegration = {+ id: string;+ name: string;+ settings: readonly { required?: boolean }[];+ onClientInstall?: () => void | Promise<void>;+ oauth?: {+ authUrl: string;+ clientId: string;+ redirectUri: string;+ scopes: readonly string[];+ };+};++/**+ * Hand off to the connect route — for EVERY OAuth integration. The route builds+ * the authorize URL server-side and sets the HttpOnly state cookie the callback+ * needs, so this is a full navigation, not a popup.+ */+export function startOAuthConnect(integrationId: string, mode?: string) {+ const url = new URL(+ `/api/integrations/${integrationId}/connect`,+ window.location.origin+ );+ if (mode) url.searchParams.set("mode", mode);+ window.location.href = url.toString();+}++/**+ * Installing an integration, from wherever it is offered — the card in the grid and the+ * Details drawer.+ *+ * Shared so the two can never disagree about what Install means: an OAuth integration opens+ * the vendor's consent screen, one with required settings opens its form, and anything else+ * installs in place. `integration` may be undefined so this can be called before the caller+ * has resolved one (rules of hooks).+ */+export function useIntegrationInstall(+ integration: InstallableIntegration | undefined+) {+ const { t, i18n } = useLingui();+ const fetcher = useFetcher<{}>();+ const navigate = useNavigate();++ const install = useCallback(async () => {+ if (!integration) return;++ if ("oauth" in integration && integration.oauth) {+ startOAuthConnect(integration.id);+ return;+ }++ if (integration.settings.some((setting) => setting.required)) {+ navigate(path.to.integration(integration.id));+ return;+ }++ if (integration.onClientInstall) {+ try {+ await integration.onClientInstall();+ } catch (error) {+ logger.error("Client install failed", {+ integration: integration.id,+ error+ });+ // A workflow piece's connect route answers with a `connection` code.+ const failure =+ error instanceof IntegrationConnectError+ ? getIntegrationError("connection", error.code)+ : undefined;+ const name = integration.name;+ if (failure) {+ toast.error(i18n._(failure.title), {+ description: i18n._(failure.description)+ });+ } else {+ toast.error(t`Couldn't start the ${name} connection`);+ }+ }+ return;+ }++ fetcher.submit(new FormData(), {+ method: "post",+ action: path.to.integration(integration.id)+ });+ }, [integration, navigate, fetcher, t, i18n]);++ return { install, isInstalling: fetcher.state !== "idle" };+}diff --git a/apps/erp/app/modules/shared/shared.server.ts b/apps/erp/app/modules/shared/shared.server.tsindex e20ac2ed44..6ce343a7b9 100644--- a/apps/erp/app/modules/shared/shared.server.ts+++ b/apps/erp/app/modules/shared/shared.server.ts@@ -12,7 +12,6 @@ import {actionTaskParentId,actionTaskPermissions} from "@carbon/ee/action-task-entity";-import { resolveIntegrationSecrets } from "@carbon/ee/integrations/secrets";import {getJiraClient,getJiraIssueFromExternalId,@@ -28,7 +27,8 @@ import {} from "@carbon/ee/linear.server";import {createIssueSlackThread,- getCarbonEmployeeFromSlackId+ getCarbonEmployeeFromSlackId,+ getSlackWorkspace} from "@carbon/ee/slack.server";import { ERP_URL } from "@carbon/env";import { trigger } from "@carbon/jobs";@@ -449,41 +449,31 @@ export const createIssueFromSlack = defineServiceFn({const serviceRole = ctx.asSystem.supabase;const companyId = ctx.company.id;- const integration = await serviceRole- .from("companyIntegration")- .select("metadata, secretRef")- .eq("id", "slack")- .eq("companyId", companyId)- .maybeSingle();- if (integration.error || !integration.data) {+ // The workspace's Slack connection holds the token and the channel picked+ // at install; `companyIntegration.slack` is only the installed flag.+ let workspace: Awaited<ReturnType<typeof getSlackWorkspace>>;+ try {+ workspace = await getSlackWorkspace(serviceRole, companyId);+ } catch (error) {+ return ctx.error(+ "internal",+ "Failed to read the Slack connection",+ error+ );+ }+ if (workspace === null) {return ctx.error("notFound",- "Slack integration not found for this workspace.",- integration.error+ "Slack integration not found for this workspace.");}// The configured channel, not the one the form was opened from.- const channelId = (integration.data.metadata as { channel_id?: string })- ?.channel_id;+ const channelId = workspace.channelId;if (!channelId) {return ctx.error("rule", "No channel configured for Slack integration");}-- const secrets = (await resolveIntegrationSecrets(- serviceRole,- companyId,- "slack",- integration.data.metadata,- integration.data.secretRef- )) as { access_token?: string };- const slackToken = secrets.access_token;- if (!slackToken) {- return ctx.error(- "rule",- "Slack token not found. Please reconfigure the integration."- );- }+ const slackToken = workspace.token;const employee = await getCarbonEmployeeFromSlackId(serviceRole,diff --git a/apps/erp/app/modules/shared/shared.service.ts b/apps/erp/app/modules/shared/shared.service.tsindex 0c0e44613a..00c9eb70d3 100644--- a/apps/erp/app/modules/shared/shared.service.ts+++ b/apps/erp/app/modules/shared/shared.service.ts@@ -59,6 +59,7 @@ import {orderLayersForConsumption,relieveLayers} from "@carbon/database/cost-relief";+import { TEMPLATE_ASSET_PREFIX } from "@carbon/database/dataset-assets";import type { AutomaticJournalStatus } from "@carbon/database/journal-posting-status";import {assertPostingStatusUnchanged,@@ -263,6 +264,13 @@ export async function getBase64ImageFromSupabase(return null;}+ // Demo-template artwork is bundled with the app, not uploaded — there is no+ // storage object to download. It is also SVG, which react-pdf's <Image>+ // cannot decode (JPG/PNG only), so there is nothing to hand a PDF either.+ if (path.startsWith(TEMPLATE_ASSET_PREFIX)) {+ return null;+ }+const { data, error } = await storage(client).company(companyId).download(path, heic ? { transform: { quality: 90 } } : undefined);diff --git a/apps/erp/app/modules/workflows/types.ts b/apps/erp/app/modules/workflows/types.tsindex 935e568ac7..763407b599 100644--- a/apps/erp/app/modules/workflows/types.ts+++ b/apps/erp/app/modules/workflows/types.ts@@ -13,3 +13,10 @@ export type BuilderNode = Node<expanded?: boolean;};export type BuilderEdge = Edge;++/** Why a dropdown could not be filled. Resolved to words in the builder. */+export type OptionsErrorCode =+ | "reconnect"+ | "refreshing"+ | "forbidden"+ | "failed";diff --git a/apps/erp/app/modules/workflows/ui/Builder/BuilderHeader.tsx b/apps/erp/app/modules/workflows/ui/Builder/BuilderHeader.tsxindex 6c5d502f3f..c5478553ac 100644--- a/apps/erp/app/modules/workflows/ui/Builder/BuilderHeader.tsx+++ b/apps/erp/app/modules/workflows/ui/Builder/BuilderHeader.tsx@@ -231,7 +231,13 @@ export function BuilderHeader({}/><RecordPhoneChrome />- <header className="flex h-[var(--topbar-height)] shrink-0 items-center gap-3 border-b px-4 max-md:hidden">+ <header+ // The workflow layout's ground is bg-background — GRAY in the light+ // themes — so a transparent header reads as a gray strip between the+ // palette and canvas, which are card-colored. bg-card is white in light+ // and the standard dark surface in dark, matching the rest of the chrome.+ className="flex h-[var(--topbar-height)] shrink-0 items-center gap-3 border-b bg-card px-4 max-md:hidden"+ >{/* One title on phones: its rename input lives in the hero there. */}{!isPhone && <WorkflowTitle workflow={workflow} />}diff --git a/apps/erp/app/modules/workflows/ui/Builder/LiveValidation.tsx b/apps/erp/app/modules/workflows/ui/Builder/LiveValidation.tsxindex 28fe1932e2..5f1d5454ed 100644--- a/apps/erp/app/modules/workflows/ui/Builder/LiveValidation.tsx+++ b/apps/erp/app/modules/workflows/ui/Builder/LiveValidation.tsx@@ -2,7 +2,7 @@// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,// including ports, remain AGPLv3; serving them over a network requires releasing their source.-import { referenceIssues } from "@carbon/ee/workflows";+import { fieldNotices, referenceIssues } from "@carbon/ee/workflows";import { useEffect } from "react";import { useWorkflowCatalog } from "./catalog";import { useBuilderStore, useBuilderStoreApi } from "./context";@@ -30,6 +30,7 @@ export function LiveValidation() {const definition = fromReactFlow(nodes, edges);const state = store.getState();state.setLiveIssues(referenceIssues(definition, catalog));+ state.setNotices(fieldNotices(definition, catalog));state.setBatchPlans(batchPlansFor(definition, catalog));}, DEBOUNCE_MS);diff --git a/apps/erp/app/modules/workflows/ui/Builder/OutputHandle.tsx b/apps/erp/app/modules/workflows/ui/Builder/OutputHandle.tsxindex 87f3ff311f..2a31bc5510 100644--- a/apps/erp/app/modules/workflows/ui/Builder/OutputHandle.tsx+++ b/apps/erp/app/modules/workflows/ui/Builder/OutputHandle.tsx@@ -2,23 +2,40 @@// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,// including ports, remain AGPLv3; serving them over a network requires releasing their source.-import type { AvailableVariable } from "@carbon/ee/workflows";+import type { ValueType } from "@carbon/ee/workflows";import { Popover, PopoverAnchor, PopoverContent } from "@carbon/react";import { Trans, useLingui } from "@lingui/react/macro";import { Handle, Position } from "@xyflow/react";-import { useCallback, useEffect, useRef, useState } from "react";+import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useWorkflowLabel } from "./catalog";import { useBuilderStore } from "./context";import { handleClass, PortLabel } from "./handles";+import { createHoverIntent } from "./hoverIntent";import { describeVariable, nodeNameLabel } from "./labelKeys";+import { fieldsOf, groupOutputs, MAX_FIELDS } from "./outputPreview";import type { BuilderPort } from "./ports";import { selectHasEdgeFrom } from "./selectors";import { type HandlePreview, useHandlePreviewGetter } from "./useDefinition";-const HOVER_DELAY_MS = 1000;+const HOVER_DELAY_MS = 500;-// Each row is two lines now, so half as many still fill the card it hangs off.-const MAX_ROWS = 8;+/** How long the panel survives after the pointer leaves — long enough to cross the+ * gap between the handle and the panel, short enough not to linger. */+const CLOSE_DELAY_MS = 220;++/** The first few fields of a record row, so the author sees what is inside it. */+function FieldList({ type }: { type: ValueType }) {+ const fields = fieldsOf(type);+ if (fields.length === 0) return null;+ const shownFields = fields.slice(0, MAX_FIELDS);+ const more = fields.length - shownFields.length;+ return (+ <div className="truncate font-mono text-[10px] leading-snug text-muted-foreground/80">+ {shownFields.join(", ")}+ {more > 0 ? `, +${more}` : ""}+ </div>+ );+}function OutputList({variables,@@ -39,21 +56,22 @@ function OutputList({);}- const shown = variables.slice(0, MAX_ROWS);- const hidden = variables.length - shown.length;-- // Already ordered by `availableVariables`, so grouping keeps that order.- const groups: { nodeName: string; rows: AvailableVariable[] }[] = [];- for (const variable of shown) {- const last = groups[groups.length - 1];- if (last?.nodeName === variable.nodeName) last.rows.push(variable);- else groups.push({ nodeName: variable.nodeName, rows: [variable] });- }+ const groups = groupOutputs(variables);return (- <div className="max-h-72 overflow-y-auto p-1">- {groups.map((group) => (- <div key={group.nodeName} className="px-2 py-1.5">+ // A long list scrolls inside the panel; `onWheel` keeps that scroll off the+ // canvas, which would otherwise zoom underneath it.+ <div+ className="max-h-80 overflow-y-auto overscroll-contain p-1"+ onWheel={(event) => event.stopPropagation()}+ >+ {groups.map((group, index) => (+ <div+ key={group.nodeName}+ className={+ index > 0 ? "mt-1 border-t px-2 py-1.5 pt-2" : "px-2 py-1.5"+ }+ ><div className="text-[10px] font-semibold text-muted-foreground">{nodeNameLabel(group.nodeName)}</div>@@ -68,15 +86,11 @@ function OutputList({<div className="text-[10px] leading-snug text-muted-foreground">{describeVariable(row.type, row.guaranteed, labelFor)}</div>+ <FieldList type={row.type} /></div>))}</div>))}- {hidden > 0 && (- <div className="px-2 py-1 text-[10px] text-muted-foreground">- <Trans>and {hidden} more</Trans>- </div>- )}</div>);}@@ -98,22 +112,33 @@ export function OutputHandle({const labelFor = useWorkflowLabel();const isConnected = useBuilderStore(selectHasEdgeFrom(nodeId, port.id));const anchor = useRef<HTMLDivElement>(null);- const timer = useRef<ReturnType<typeof setTimeout> | null>(null);const [preview, setPreview] = useState<HandlePreview | null>(null);const getPreview = useHandlePreviewGetter(nodeId, port.id);- const close = useCallback(() => {- if (timer.current) clearTimeout(timer.current);- timer.current = null;- setPreview(null);- }, []);+ // The timing lives in `hoverIntent` so it can be tested against a hand-driven+ // clock — the panel is offset from its handle, and getting the gap between them+ // wrong is what made it unreachable.+ const previewRef = useRef(getPreview);+ previewRef.current = getPreview;++ const intent = useMemo(+ () =>+ createHoverIntent({+ openDelayMs: HOVER_DELAY_MS,+ closeDelayMs: CLOSE_DELAY_MS,+ onOpen: () => setPreview(previewRef.current()),+ onClose: () => setPreview(null),+ setTimer: (fn, ms) => setTimeout(fn, ms),+ clearTimer: (id) => clearTimeout(id)+ }),+ []+ );- useEffect(() => close, [close]);+ const open = useCallback(() => intent.enter(), [intent]);+ const close = useCallback(() => intent.leave(), [intent]);+ const closeNow = useCallback(() => intent.dismiss(), [intent]);- const open = useCallback(() => {- if (timer.current) clearTimeout(timer.current);- timer.current = setTimeout(() => setPreview(getPreview()), HOVER_DELAY_MS);- }, [getPreview]);+ useEffect(() => () => intent.dismiss(), [intent]);return (<Popover open={preview !== null}>@@ -127,6 +152,9 @@ export function OutputHandle({className={handleClass(port.tone)}onMouseEnter={open}onMouseLeave={close}+ // Starting a connection drag: the panel would otherwise hang over the+ // canvas the author is dragging across.+ onMouseDown={closeNow}/>{showLabel && (<PortLabel label={port.label} tone={port.tone} lifted={isConnected} />@@ -135,9 +163,12 @@ export function OutputHandle({side="right"align="center"sideOffset={8}- // Never interactive: taking the pointer would count as leaving the handle,- // and the panel would close the instant you tried to reach it.- className="pointer-events-none w-72 p-0"+ // The panel holds the hover open while the pointer is inside it, and+ // cancels the pending close on the way in — that grace period is what makes+ // the gap between handle and panel crossable at all.+ onMouseEnter={open}+ onMouseLeave={close}+ className="w-72 p-0"onOpenAutoFocus={(event) => event.preventDefault()}><div className="border-b px-3 py-2 text-[11px] font-semibold text-foreground">diff --git a/apps/erp/app/modules/workflows/ui/Builder/TestRun/TestRunDialog.tsx b/apps/erp/app/modules/workflows/ui/Builder/TestRun/TestRunDialog.tsxindex afb68573a1..4fd00fbbf1 100644--- a/apps/erp/app/modules/workflows/ui/Builder/TestRun/TestRunDialog.tsx+++ b/apps/erp/app/modules/workflows/ui/Builder/TestRun/TestRunDialog.tsx@@ -197,7 +197,9 @@ function Dialog({</Trans></p><p className="text-xs text-muted-foreground">- <Trans>The result will not appear on the Runs page.</Trans>+ <Trans>+ Test runs are saved to the run history, marked as tests.+ </Trans></p>{!isScheduleMode && events.length > 1 && (diff --git a/apps/erp/app/modules/workflows/ui/Builder/TestRun/TestRunPanel.tsx b/apps/erp/app/modules/workflows/ui/Builder/TestRun/TestRunPanel.tsxindex 154f1175db..8e394bff53 100644--- a/apps/erp/app/modules/workflows/ui/Builder/TestRun/TestRunPanel.tsx+++ b/apps/erp/app/modules/workflows/ui/Builder/TestRun/TestRunPanel.tsx@@ -6,32 +6,37 @@ import {Alert,AlertDescription,cn,- IconButton,+ Drawer,+ DrawerBody,+ DrawerContent,+ DrawerFooter,+ DrawerHeader,+ DrawerTitle,Spinner} from "@carbon/react";-import { Trans, useLingui } from "@lingui/react/macro";-import { LuX } from "react-icons/lu";+import { Trans } from "@lingui/react/macro";import { RunStatus } from "../../Runs/RunStatus";import { runOutcome } from "../../Runs/runOutcome";+import { useNodeLabel } from "../../Runs/useNodeLabel";import { WorkflowRunSteps } from "../../Runs/WorkflowRunSteps";-import { useWorkflowLabel } from "../catalog";import { useBuilderStore } from "../context";import { IssueList } from "../IssueList";import { useDefinition } from "../useDefinition";-/** The result of a manual test run. Nothing was written, so this panel is the only- * place the run exists — closing it discards it. */+/** The result of a manual test run, in the application's standard drawer — the+ * same shell as an integration's details or a saved run. A test run is a real+ * run with real side effects: it is recorded as a `workflowRun` row with+ * `isTest = true`, so it stays in the run history after this drawer closes. */export function TestRunPanel() {- const { t } = useLingui();- const label = useWorkflowLabel();+ const nodeLabel = useNodeLabel();const definition = useDefinition();const status = useBuilderStore((s) => s.testRunStatus);const result = useBuilderStore((s) => s.testRunResult);const setTestRunResult = useBuilderStore((s) => s.setTestRunResult);const setTestRunStatus = useBuilderStore((s) => s.setTestRunStatus);- // Both, or the panel stays open on an empty result — the group shows it while- // either is set.+ // Both, or the drawer stays open on an empty result — the builder shows it+ // while either is set.function close() {setTestRunResult(null);setTestRunStatus("idle");@@ -42,7 +47,7 @@ export function TestRunPanel() {{ status: result.status, error: result.error, statusReason: null },result.steps,definition,- label+ (node) => nodeLabel(node).title): null;@@ -51,68 +56,68 @@ export function TestRunPanel() {result !== null && result.error !== null && !result.steps.length;return (- <div className="flex h-full flex-col border-l border-border max-md:border-l-0">- {/* Phones show this panel in a full-screen sheet, whose own × closes it. */}- <div className="flex items-center gap-2 border-b border-border p-3 max-md:min-h-11 max-md:pr-14">- <span className="text-sm font-semibold">- <Trans>Test run</Trans>- </span>- {result && <RunStatus status={result.status} />}- <IconButton- aria-label={t`Close`}- className="ml-auto max-md:hidden"- icon={<LuX />}- size="sm"- variant="ghost"- onClick={close}- />- </div>-- <div className="flex-1 min-h-0 overflow-y-auto">- {status === "running" ? (- <div className="flex items-center gap-2 p-4 text-sm text-muted-foreground">- <Spinner className="size-4" />- <Trans>Running…</Trans>+ <Drawer+ open+ onOpenChange={(open) => {+ if (!open) close();+ }}+ >+ <DrawerContent size="lg">+ <DrawerHeader>+ <div className="flex items-center gap-2">+ <DrawerTitle>+ <Trans>Test run</Trans>+ </DrawerTitle>+ {result && <RunStatus status={result.status} />}</div>- ) : isRefusal ? (- <>- <Alert variant="destructive" className="m-3 w-auto">- <AlertDescription>{result?.error}</AlertDescription>- </Alert>- {result && <IssueList issues={result.issues} />}- </>- ) : (- result && (+ </DrawerHeader>+ <DrawerBody className="p-0">+ {status === "running" ? (+ <div className="flex items-center gap-2 p-4 text-sm text-muted-foreground">+ <Spinner className="size-4" />+ <Trans>Running…</Trans>+ </div>+ ) : isRefusal ? (<>- {outcome && (- <p- className={cn(- "border-b border-border p-3 text-sm",- outcome.tone === "danger" && "text-destructive",- outcome.tone === "neutral" && "text-muted-foreground"- )}- >- {outcome.text}- </p>- )}- <WorkflowRunSteps- steps={result.steps}- definition={definition}- compacted={false}- stepsPurged={false}- truncated={result.truncated}- recordNames={{}}- />+ <Alert variant="destructive" className="m-3 w-auto">+ <AlertDescription>{result?.error}</AlertDescription>+ </Alert>+ {result && <IssueList issues={result.issues} />}</>- )- )}- </div>-- <p className="border-t border-border p-3 text-xs text-muted-foreground">- <Trans>- Test runs are not saved. Close this panel and the result is gone.- </Trans>- </p>- </div>+ ) : (+ result && (+ <>+ {outcome && (+ <p+ className={cn(+ "border-b border-border p-3 text-sm",+ outcome.tone === "danger" && "text-destructive",+ outcome.tone === "neutral" && "text-muted-foreground"+ )}+ >+ {outcome.text}+ </p>+ )}+ <WorkflowRunSteps+ steps={result.steps}+ definition={definition}+ compacted={false}+ stepsPurged={false}+ truncated={result.truncated}+ recordNames={{}}+ />+ </>+ )+ )}+ </DrawerBody>+ <DrawerFooter>+ <p className="text-xs text-muted-foreground">+ <Trans>+ Test runs are saved to the run history, marked as tests.+ </Trans>+ </p>+ </DrawerFooter>+ </DrawerContent>+ </Drawer>);}diff --git a/apps/erp/app/modules/workflows/ui/Builder/WorkflowBuilder.tsx b/apps/erp/app/modules/workflows/ui/Builder/WorkflowBuilder.tsxindex 4250db2118..6f3073f9b3 100644--- a/apps/erp/app/modules/workflows/ui/Builder/WorkflowBuilder.tsx+++ b/apps/erp/app/modules/workflows/ui/Builder/WorkflowBuilder.tsx@@ -85,8 +85,6 @@ export function WorkflowBuilder({const onConnect = useBuilderStore((state) => state.onConnect);const setSelected = useBuilderStore((state) => state.setSelected);const addNode = useBuilderStore((state) => state.addNode);- const setTestRunResult = useBuilderStore((state) => state.setTestRunResult);- const setTestRunStatus = useBuilderStore((state) => state.setTestRunStatus);const isValidConnection = useCallback<IsValidConnection>((connection) => {@@ -179,9 +177,9 @@ export function WorkflowBuilder({</div>);- // Phones: the canvas fills the page. The palette opens from the app bar +,- // and a test run's result opens as a full-screen sheet; closing it discards- // the result, as the desktop panel's close does.+ // Phones: the canvas fills the page. The palette opens from the app bar +.+ // A test run's result is the same drawer as on desktop — phones show every+ // drawer as a bottom sheet — and closing it discards the result.if (isPhone) {return (<div className="flex-1 overflow-hidden">@@ -211,54 +209,35 @@ export function WorkflowBuilder({</BottomSheet></>)}- <BottomSheet- open={showResults}- onOpenChange={(open) => {- if (open) return;- setTestRunResult(null);- setTestRunStatus("idle");- }}- >- <BottomSheetContent size="full">- <BottomSheetTitle className="sr-only">- <Trans>Test run</Trans>- </BottomSheetTitle>- <div className="min-h-0 flex-1">- <TestRunPanel />- </div>- </BottomSheetContent>- </BottomSheet>+ {showResults && <TestRunPanel />}</div>);}return (- <ResizablePanelGroup- direction="horizontal"- autoSaveId="workflow-builder"- className="flex-1 overflow-hidden"- >- {!isReadOnly && (- <ResizablePanel- id="palette"- order={1}- defaultSize={14}- minSize={10}- maxSize={22}- >- <NodePalette />- </ResizablePanel>- )}- {!isReadOnly && <ResizableHandle withHandle />}- <ResizablePanel id="canvas" order={2} defaultSize={62} minSize={30}>- {canvas}- </ResizablePanel>- {showResults && <ResizableHandle withHandle />}- {showResults && (- <ResizablePanel id="results" order={3} defaultSize={24} minSize={18}>- <TestRunPanel />+ <>+ {showResults && <TestRunPanel />}+ <ResizablePanelGroup+ direction="horizontal"+ autoSaveId="workflow-builder"+ className="flex-1 overflow-hidden"+ >+ {!isReadOnly && (+ <ResizablePanel+ id="palette"+ order={1}+ defaultSize={14}+ minSize={10}+ maxSize={22}+ >+ <NodePalette />+ </ResizablePanel>+ )}+ {!isReadOnly && <ResizableHandle withHandle />}+ <ResizablePanel id="canvas" order={2} defaultSize={62} minSize={30}>+ {canvas}</ResizablePanel>- )}- </ResizablePanelGroup>+ </ResizablePanelGroup>+ </>);}diff --git a/apps/erp/app/modules/workflows/ui/Builder/config/forms/ActionForm.tsx b/apps/erp/app/modules/workflows/ui/Builder/config/forms/ActionForm.tsxindex 7e975f485d..6737d61afa 100644--- a/apps/erp/app/modules/workflows/ui/Builder/config/forms/ActionForm.tsx+++ b/apps/erp/app/modules/workflows/ui/Builder/config/forms/ActionForm.tsx@@ -37,23 +37,14 @@ import {actionInputLabelKey,entityLabelKey,useWorkflowCatalog,- useWorkflowLabel,- workflowFieldHelp+ useWorkflowLabel} from "../../catalog";import { useBuilderStore } from "../../context";-import { lockedChoices, useChoiceOptions } from "../../fields/choiceOptions";-import { MultiChoiceField } from "../../fields/MultiChoiceField";-import { PairsField } from "../../fields/PairsField";-import { TemplateField } from "../../fields/TemplateField";import { ValueField } from "../../fields/ValueField";-import {- issueForField,- partIssuesForField,- rowIssuesForField-} from "../../issues";import { useActionBatchPlan, useAvailableVariables } from "../../useDefinition";import { FormStack, Section } from "../layout";import type { NodeFormProps } from "./index";+import { StepInput } from "./StepInput";/** Module-level, not an inline literal: it reaches the variable menu as `accepts`,* which memoises on identity. */@@ -287,7 +278,6 @@ export function ActionForm({const updateNodeData = useBuilderStore((s) => s.updateNodeData);const label = useWorkflowLabel();const catalog = useWorkflowCatalog();- const choiceOptions = useChoiceOptions();const { action: actionId, inputs } = node.data;@@ -390,84 +380,18 @@ export function ActionForm({if (!inputDef) return null;// Also guarded in the list below; a requireOneOf member reaches here without it.if (!isGateOpen(inputDef.showWhen, inputs)) return null;- const fieldLabel = inputLabel(name);- const inputHelp = workflowFieldHelp(actionInputLabelKey(actionId, name));- const fieldContext = {- nodeId: node.id,- inLoop: isBatch,- batching: isBatch- };- const fieldIssue = issueForField(issues, name, `inputs.${name}`);- const fieldParts = partIssuesForField(issues, name, `inputs.${name}`);-- if (inputDef.pairs) {- return (- <PairsField- key={name}- label={fieldLabel}- helpTermId={inputHelp}- type={inputDef.type}- required={inputDef.required}- value={inputs[name]}- onChange={(v) => handleInputChange(name, v)}- context={fieldContext}- issue={fieldIssue}- partIssues={rowIssuesForField(issues, name, `inputs.${name}`)}- isReadOnly={isReadOnly}- />- );- }-- if (isMultiSelect(inputDef)) {- return (- <MultiChoiceField- key={name}- label={fieldLabel}- helpTermId={inputHelp}- type={inputDef.type}- required={inputDef.required}- options={choiceOptions(inputDef.choices)}- locked={lockedChoices(inputDef.choices)}- value={inputs[name]}- onChange={(v) => handleInputChange(name, v)}- issue={fieldIssue}- isReadOnly={isReadOnly}- />- );- }-- if (inputDef.template) {- return (- <TemplateField- key={name}- label={fieldLabel}- helpTermId={inputHelp}- type={inputDef.type}- required={inputDef.required}- value={inputs[name]}- onChange={(v) => handleInputChange(name, v)}- context={fieldContext}- issue={fieldIssue}- partIssues={fieldParts}- isReadOnly={isReadOnly}- />- );- }-return (- <ValueField+ <StepInputkey={name}- label={fieldLabel}- helpTermId={inputHelp}- type={inputDef.type}- required={inputDef.required}- choices={inputDef.choices}- value={inputs[name]}- onChange={(v) => handleInputChange(name, v)}- context={fieldContext}- issue={fieldIssue}- partIssues={fieldParts}+ stepId={actionId}+ name={name}+ inputDef={inputDef}+ inputs={inputs}+ issues={issues}+ nodeId={node.id}+ batching={isBatch}isReadOnly={isReadOnly}+ onChange={handleInputChange}/>);}diff --git a/apps/erp/app/modules/workflows/ui/Builder/config/forms/FilterForm.tsx b/apps/erp/app/modules/workflows/ui/Builder/config/forms/FilterForm.tsxindex ac58372af9..ee582e00cc 100644--- a/apps/erp/app/modules/workflows/ui/Builder/config/forms/FilterForm.tsx+++ b/apps/erp/app/modules/workflows/ui/Builder/config/forms/FilterForm.tsx@@ -2,43 +2,33 @@// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,// including ports, remain AGPLv3; serving them over a network requires releasing their source.-import type { Clause } from "@carbon/ee/workflows";+import type { DataOperation, OperationCard } from "@carbon/ee/workflows";import {- Button,- Command,- CommandEmpty,- CommandGroup,- CommandInput,- CommandItem,- CommandList,- cn,- Popover,- PopoverContent,- PopoverTrigger-} from "@carbon/react";-import { Trans, useLingui } from "@lingui/react/macro";-import { useMemo, useState } from "react";-import { LuChevronDown, LuPlus } from "react-icons/lu";-import { describeValueType } from "../../catalog";+ cardsOf,+ DATA_OPERATIONS,+ foldOperationTypes,+ operationsFor,+ truncateStarvedCards+} from "@carbon/ee/workflows";+import { Button, Tooltip, TooltipContent, TooltipTrigger } from "@carbon/react";+import { Trans } from "@lingui/react/macro";+import { nanoid } from "nanoid";+import { Fragment, useMemo } from "react";+import { LuArrowDown, LuPlus } from "react-icons/lu";+import { useWorkflowCatalog } from "../../catalog";import { useBuilderStore } from "../../context";import { useAvailableVariables } from "../../useDefinition";-import ClauseRow from "../ClauseRow";-import { CombinatorToggle } from "../CombinatorToggle";-import { FormStack, Section } from "../layout";+import { FormStack } from "../layout";import type { NodeFormProps } from "./index";--const newClause = (): Clause => ({- left: {- kind: "literal",- type: { kind: "primitive", of: "string" },- value: ""- },- operator: "eq",- right: {- kind: "literal",- type: { kind: "primitive", of: "string" },- value: ""- }+import { OperationCardEditor } from "./OperationCardEditor";+import { SourceListPicker } from "./SourceListPicker";++const newCard = (operation: DataOperation): OperationCard => ({+ id: nanoid(),+ operation,+ combinator: "and",+ clauses: [],+ flatten: false});export function FilterForm({@@ -47,13 +37,14 @@ export function FilterForm({isReadOnly}: NodeFormProps<"filter">) {const updateNodeData = useBuilderStore((s) => s.updateNodeData);- const { t } = useLingui();-- const { source, combinator, clauses } = node.data;+ const catalog = useWorkflowCatalog();- const [sourceOpen, setSourceOpen] = useState(false);+ const { source } = node.data;+ // The chain, through the SAME normalizer the validator and runtime use — a+ // legacy node reads as one card, and the first edit materializes it.+ const cards = cardsOf(node);- // Only list-type variables are valid sources+ // Every operation works through a list; what the list HOLDS may be an object.const vars = useAvailableVariables(node.id);const listVars = useMemo(() => vars.filter((v) => v.type.kind === "list"),@@ -66,168 +57,160 @@ export function FilterForm({): undefined;- // Resolve item entity name for the heading- const itemType =- sourceVar?.type.kind === "list" ? sourceVar.type.of : undefined;- const entityName = itemType?.kind === "entity" ? itemType.of : undefined;+ const sourceType =+ sourceVar?.type.kind === "list" ? sourceVar.type : undefined;- const handleSourceSelect = (nodeId: string, output: string) => {- updateNodeData(node.id, {- source: { kind: "ref", nodeId, output, path: [] }- });- setSourceOpen(false);+ // types[i] flows INTO card i; the last element is the node's output. The same+ // fold the validator runs, so the dropdowns and the red flags cannot disagree.+ const types = useMemo(+ () => foldOperationTypes(sourceType, cards, catalog),+ [sourceType, cards, catalog]+ );+ const output = types[cards.length];+ // An UNKNOWN output must not read as "anything goes": until the chain above is+ // configured, there is nothing real for a new card to consume.+ const canAdd = output !== undefined && operationsFor(output).length > 0;++ // Every write heals structurally: nothing may follow a terminal card, so any+ // edit that leaves one mid-chain drops the dead tail with it.+ const writeCards = (next: OperationCard[]) => {+ updateNodeData(node.id, { operations: truncateStarvedCards(next) });};- const handleClearSource = () => {- updateNodeData(node.id, { source: undefined, clauses: [] });+ const patchCard = (id: string, patch: Partial<OperationCard>) => {+ writeCards(+ cards.map((card) => (card.id === id ? { ...card, ...patch } : card))+ );+ };++ // A new source means new items for card 1: its clauses and field were written+ // against the OLD element type. Later cards keep their config — the ripple+ // shows as ordinary red validation rather than silently deleted work.+ const resetHead = (+ next: FilterNodeSourcePatch+ ): Parameters<typeof updateNodeData>[1] => {+ const [head, ...rest] = cards;+ return {+ ...next,+ operations: head+ ? [{ ...head, clauses: [], field: undefined, flatten: false }, ...rest]+ : cards+ };};- function handleClauseChange(index: number, patch: Partial<Clause>) {- updateNodeData(node.id, {- clauses: clauses.map((c, i) => (i === index ? { ...c, ...patch } : c))- });- }+ const handleSourceSelect = (nodeId: string, outputName: string) => {+ updateNodeData(+ node.id,+ resetHead({+ source: { kind: "ref", nodeId, output: outputName, path: [] }+ })+ );+ };- function handleClauseRemove(index: number) {- updateNodeData(node.id, {- clauses: clauses.filter((_, i) => i !== index)- });- }+ const handleClearSource = () => {+ updateNodeData(node.id, resetHead({ source: undefined }));+ };- const handleAddClause = () => {- updateNodeData(node.id, { clauses: [...clauses, newClause()] });+ // Switching operation drops what only made sense for the old one: a clause+ // means nothing to `count`, and a field means nothing outside `pluck`. And a+ // switch to a terminal operation (count, join, first, last) drops the cards+ // BELOW it — their input becomes a bare value no operation could ever consume,+ // so keeping them would only be a tail of unfixable red.+ const handleOperationChange = (card: OperationCard, next: string) => {+ const chosen = next as DataOperation;+ if (chosen === card.operation) return;+ const patched = cards.map((c) =>+ c.id === card.id+ ? {+ ...c,+ operation: chosen,+ ...(DATA_OPERATIONS[chosen].usesClauses ? {} : { clauses: [] }),+ ...(DATA_OPERATIONS[chosen].usesField+ ? {}+ : { field: undefined, flatten: false })+ }+ : c+ );+ writeCards(patched);};- const context = { nodeId: node.id, inLoop: true };+ const handleAddCard = () => {+ const first = operationsFor(output)[0];+ if (first === undefined) return;+ writeCards([...cards, newCard(first)]);+ };return (<FormStack spacing={4}>- {/* Source list picker */}- <div className="space-y-1">- <Section>- <Trans>Source list</Trans>- </Section>-- <Popover open={sourceOpen} onOpenChange={setSourceOpen}>- <PopoverTrigger asChild>- <button- type="button"- disabled={isReadOnly}- className="flex w-full items-center justify-between rounded-md border bg-background px-3 py-2 text-sm hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"- >- <span- className={cn("truncate", !source && "text-muted-foreground")}- >- {sourceVar- ? `${sourceVar.nodeName} › ${sourceVar.output}`- : t`Pick a list variable…`}- </span>- <LuChevronDown className="ml-2 h-4 w-4 shrink-0 text-muted-foreground" />- </button>- </PopoverTrigger>- <PopoverContent- align="start"- className="w-[var(--radix-popover-trigger-width)] min-w-[260px] p-0"- onWheel={(e) => e.stopPropagation()}- onTouchMove={(e) => e.stopPropagation()}+ {cards.map((card, index) => (+ <Fragment key={card.id}>+ <OperationCardEditor+ card={card}+ input={types[index]}+ nodeId={node.id}+ hasSource={!!source}+ canRemove={cards.length > 1}+ issues={issues}+ isReadOnly={isReadOnly}+ onRemove={() => writeCards(cards.filter((c) => c.id !== card.id))}+ onOperationChange={(next) => handleOperationChange(card, next)}+ onPatch={(patch) => patchCard(card.id, patch)}>- <Command>- <CommandInput- placeholder={t`Search list variables…`}- disabled={isReadOnly}- />- <CommandList className="max-h-64 overflow-y-auto">- <CommandEmpty>- <Trans>No list variables available upstream.</Trans>- </CommandEmpty>- <CommandGroup>- {listVars.map((v) => (- <CommandItem- key={`${v.nodeId}:${v.output}`}- value={`${v.nodeName} ${v.output} ${describeValueType(v.type)}`}- disabled={isReadOnly}- onSelect={() => handleSourceSelect(v.nodeId, v.output)}- className="flex flex-col items-start gap-0.5 px-3 py-2"- >- <span className="text-sm font-medium">{v.output}</span>- <span className="text-xs text-muted-foreground">- {v.nodeName} · {describeValueType(v.type)}- </span>- </CommandItem>- ))}- </CommandGroup>- </CommandList>- </Command>- </PopoverContent>- </Popover>-- {source && (- <button- type="button"- className="text-xs text-muted-foreground hover:text-foreground underline underline-offset-2"- onClick={handleClearSource}- disabled={isReadOnly}- >- <Trans>Clear</Trans>- </button>- )}- </div>-- {/* Clause section — only shown once a source is chosen */}- {source && (- <div className="space-y-3">- <div className="flex items-center justify-between">- <Section>- {entityName- ? t`Keep only the ${entityName} where…`- : t`Keep only items where…`}- </Section>-- {/* Combinator toggle */}- <CombinatorToggle- value={combinator}- onChange={(v) => updateNodeData(node.id, { combinator: v })}- isReadOnly={isReadOnly}- />- </div>-- {clauses.map((clause, i) => (- <div key={i}>- <ClauseRow- clause={clause}- index={i}- canRemove={clauses.length > 1}- onChange={handleClauseChange}- onRemove={handleClauseRemove}- context={context}- fieldPath={`clauses.${i}`}- issues={issues}+ {/* Source list picker — the chain has ONE source, and card 1 owns it. */}+ {index === 0 && (+ <SourceListPicker+ hasSource={!!source}+ sourceVar={sourceVar}+ listVars={listVars}isReadOnly={isReadOnly}+ onSelect={handleSourceSelect}+ onClear={handleClearSource}/>- {i < clauses.length - 1 && (- <div className="flex justify-center py-1">- <CombinatorToggle- value={combinator}- onChange={(v) => updateNodeData(node.id, { combinator: v })}- isReadOnly={isReadOnly}- />- </div>- )}+ )}+ </OperationCardEditor>++ {/* The flow: this card's result feeds the next card. A sibling of the+ cards rather than a child of one, so the stack's gap centers it+ between them instead of gluing it under the card above. */}+ {index < cards.length - 1 && (+ <div className="-my-2 flex justify-center">+ <LuArrowDown className="h-4 w-4 text-muted-foreground" /></div>- ))}-- <Button- type="button"- variant="secondary"- size="sm"- leftIcon={<LuPlus />}- onClick={handleAddClause}- isDisabled={isReadOnly}- >- <Trans>Add rule</Trans>- </Button>- </div>- )}+ )}+ </Fragment>+ ))}++ <Tooltip>+ <TooltipTrigger asChild>+ {/* span, so the tooltip still opens over a disabled button */}+ <span className="inline-flex w-fit">+ <Button+ type="button"+ variant="secondary"+ size="sm"+ leftIcon={<LuPlus />}+ onClick={handleAddCard}+ isDisabled={isReadOnly || !canAdd}+ >+ <Trans context="workflow data step">Add operation</Trans>+ </Button>+ </span>+ </TooltipTrigger>+ {!canAdd && (+ <TooltipContent>+ {output === undefined ? (+ <Trans>Configure the steps above first.</Trans>+ ) : (+ <Trans>Nothing can work on this result.</Trans>+ )}+ </TooltipContent>+ )}+ </Tooltip></FormStack>);}++/** The two writes that touch the node source alongside the head card's reset. */+type FilterNodeSourcePatch = {+ source: NodeFormProps<"filter">["node"]["data"]["source"];+};diff --git a/apps/erp/app/modules/workflows/ui/Builder/config/forms/IntegrationNodeForm.tsx b/apps/erp/app/modules/workflows/ui/Builder/config/forms/IntegrationNodeForm.tsxnew file mode 100644index 0000000000..537a03a6c9--- /dev/null+++ b/apps/erp/app/modules/workflows/ui/Builder/config/forms/IntegrationNodeForm.tsx@@ -0,0 +1,475 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import type { ValueOrRef } from "@carbon/ee/workflows";+import {+ INTEGRATION_CONNECTION_INPUT,+ integrationAppLabelKey,+ integrationStepId,+ WORKFLOW_INTEGRATION_CATALOG+} from "@carbon/ee/workflows";+import {+ Accordion,+ AccordionContent,+ AccordionItem,+ AccordionTrigger,+ Button,+ Select,+ SelectContent,+ SelectItem,+ SelectTrigger,+ SelectValue+} from "@carbon/react";+import { Trans, useLingui } from "@lingui/react/macro";+import type { ReactNode } from "react";+import { useEffect, useMemo } from "react";+import { Link } from "react-router";+import { path } from "~/utils/path";+import {+ actionInputLabelKey,+ useWorkflowCatalog,+ useWorkflowLabel+} from "../../catalog";+import { useBuilderStore } from "../../context";+import { useWorkflowOptions } from "../../fields/useWorkflowOptions";+import { useNoticeCopy } from "../../noticeCopy";+import { FormStack, Section } from "../layout";+import type { NodeFormProps } from "./index";+import { StepInput } from "./StepInput";++/** Piece name → its steps, in catalog order. */+const STEPS_BY_PIECE: Map<string, { id: string; action: string }[]> = (() => {+ const byPiece = new Map<string, { id: string; action: string }[]>();+ for (const [id, step] of Object.entries(WORKFLOW_INTEGRATION_CATALOG)) {+ const list = byPiece.get(step.piece.name) ?? [];+ list.push({ id, action: step.piece.action });+ byPiece.set(step.piece.name, list);+ }+ return byPiece;+})();++/** A dashed notice with one link out to the app's accounts, opened in a new tab so+ * the canvas survives. */+function ConnectBanner({+ message,+ href,+ cta,+ isDisabled+}: {+ message: ReactNode;+ href: string;+ cta: ReactNode;+ isDisabled?: boolean;+}) {+ return (+ <div className="flex flex-col items-start gap-3 rounded-md border border-dashed p-4">+ <p className="text-sm text-muted-foreground">{message}</p>+ <Button asChild variant="secondary" isDisabled={isDisabled}>+ <Link to={href} target="_blank" rel="noreferrer">+ {cta}+ </Link>+ </Button>+ </div>+ );+}++export function IntegrationNodeForm({+ node,+ issues,+ isReadOnly+}: NodeFormProps<"integration">) {+ const { t } = useLingui();+ const updateNodeData = useBuilderStore((s) => s.updateNodeData);+ const label = useWorkflowLabel();+ const catalog = useWorkflowCatalog();++ const { piece, action, inputs } = node.data;++ const stepId = piece && action ? integrationStepId(piece, action) : undefined;+ const step = stepId ? catalog.getIntegration(stepId) : undefined;++ const pieceNames = useMemo(() => [...STEPS_BY_PIECE.keys()].sort(), []);+ const steps = STEPS_BY_PIECE.get(piece) ?? [];++ // Every step of an app shares one connection input, so the first step answers for the+ // app — which is what lets this be asked before a step has been picked.+ const connectionSource = useMemo(() => {+ const first = steps[0];+ if (first === undefined) return undefined;+ return catalog.getIntegration(first.id)?.inputs[+ INTEGRATION_CONNECTION_INPUT+ ]?.options;+ }, [steps, catalog]);++ // Asked through the same resolver the connection input itself uses, with a fetcher+ // key per app so switching apps asks again instead of reusing the last answer.+ const {+ loaded: checked,+ options: connections,+ errorCode: connectionsError,+ errorHref: connectionsFixHref,+ noticeCode: connectionsNotice,+ noticeHref: connectionsNoticeHref,+ isLoading: checkingConnections,+ retry: retryConnections+ } = useWorkflowOptions(+ connectionSource,+ {},+ `integration-connections:${piece}`+ );+ const connected = connections.length > 0;+ // The lookup itself failed, so whether the app is connected is unknown. Saying+ // "isn't connected" would send the author off to add a duplicate account, and+ // hiding the step would hide an existing node's whole configuration.+ const lookupFailed =+ checked &&+ connectionsError !== undefined &&+ connectionsError !== "reconnect";+ const storedConnection = inputs[INTEGRATION_CONNECTION_INPUT];+ const storedConnectionId =+ storedConnection?.kind === "literal" &&+ typeof storedConnection.value === "string"+ ? storedConnection.value+ : undefined;+ // An existing node keeps its configuration on screen even when its app has no+ // usable account left: hiding it would read as the node having been emptied.+ const canConfigure =+ connected || lookupFailed || storedConnectionId !== undefined;+ // The node points at an account the list no longer offers (revoked, or left out+ // until it is reconnected). Never hide the field then — the author must see it.+ const storedNotOffered =+ checked &&+ !lookupFailed &&+ storedConnectionId !== undefined &&+ !connections.some((option) => option.value === storedConnectionId);+ // One connection is not a choice — hide the field, but still STORE the id: a+ // second account added later must not silently repoint existing workflows.+ const onlyConnection =+ connections.length === 1 && !storedNotOffered+ ? connections[0]?.value+ : undefined;++ const appLabel = (name: string) => label(integrationAppLabelKey(name));+ const appName = piece ? appLabel(piece) : "";++ const inputLabel = (name: string) =>+ label(+ actionInputLabelKey(stepId ?? "", name),+ catalog.getInputLabel(stepId ?? "", name) ?? name+ );++ // A record in a field that will not render it as a link — advisory, computed+ // beside liveIssues, shown as one muted line under the field.+ const notices = useBuilderStore((s) => s.notices);+ const noticeCopy = useNoticeCopy();+ const hintFor = (name: string): string | undefined => {+ const notice = notices.find(+ (n) => n.nodeId === node.id && n.field === `inputs.${name}`+ );+ if (notice === undefined) return undefined;+ const sibling =+ notice.params === undefined ? "" : inputLabel(notice.params.input);+ return noticeCopy(notice, appName, sibling);+ };++ // Changing the app invalidates the step, and changing either invalidates every+ // input: a calendar id means nothing to a different app or a different step.+ function handlePieceChange(next: string) {+ if (next === piece) return;+ updateNodeData(node.id, { piece: next, action: "", inputs: {} });+ }++ // Seed the piece's own pre-fills as STORED literals, exactly as ActionForm+ // seeds catalog defaults. What a person sees in an untouched field must be+ // what the run sends: a checkbox whose vendor default is ON rendered as an+ // OFF toggle while sending nothing was a lie in both directions.+ //+ // VISIBLE inputs only. An Advanced input's seeded default would be a node+ // value, and a node value wins over an allowlist pin — seeding there would+ // silently defeat every pin (`singleEvents` first among them). Hidden props+ // are satisfied at run time by the pin or the piece's own default.+ function seededInputs(nextStepId: string): Record<string, ValueOrRef> {+ const definition = catalog.getIntegration(nextStepId);+ const seeded: Record<string, ValueOrRef> = {};+ for (const [name, input] of Object.entries(definition?.inputs ?? {})) {+ if (input.defaultValue === undefined) continue;+ seeded[name] = {+ kind: "literal",+ type: input.type,+ value: input.defaultValue+ };+ }+ return seeded;+ }++ function handleStepChange(next: string) {+ if (next === action) return;+ const seeded = piece ? seededInputs(integrationStepId(piece, next)) : {};+ // The app's connection is shared by every step of the app, so a same-app step+ // change keeps the chosen account — the auto-fill effect only restores it when+ // exactly one account exists, and with two the author had to re-pick each time.+ const connection = inputs[INTEGRATION_CONNECTION_INPUT];+ updateNodeData(node.id, {+ action: next,+ inputs:+ connection === undefined+ ? seeded+ : { ...seeded, [INTEGRATION_CONNECTION_INPUT]: connection }+ });+ }++ function handleInputChange(name: string, value: ValueOrRef | undefined) {+ const next = { ...inputs };+ if (value === undefined) delete next[name];+ else next[name] = value;+ updateNodeData(node.id, { inputs: next });+ }++ // The value is STORED even though no field is shown: the run resolves against it,+ // and a second account added later must not silently repoint existing workflows.+ useEffect(() => {+ // Only once THIS app's connections have come back. Without the gate, the answer+ // still in hand from the previous app could be written into the new app's+ // inputs, pinning a connection that belongs to a different piece.+ if (!checked) return;+ if (onlyConnection === undefined) return;+ if (inputs[INTEGRATION_CONNECTION_INPUT] !== undefined) return;+ updateNodeData(node.id, {+ inputs: {+ ...inputs,+ [INTEGRATION_CONNECTION_INPUT]: {+ kind: "literal",+ type: { kind: "primitive", of: "string" },+ value: onlyConnection+ }+ }+ });+ }, [checked, onlyConnection, inputs, node.id, updateNodeData]);++ // Required first, then optional, preserving catalog order within each — the same+ // ordering the action form uses.+ const inputNames = useMemo(() => {+ if (!step) return [];+ const required: string[] = [];+ const optional: string[] = [];+ for (const [name, inputDef] of Object.entries(step.inputs)) {+ // The connection is stored but not shown when there is only one to pick.+ if (+ name === INTEGRATION_CONNECTION_INPUT &&+ onlyConnection !== undefined+ ) {+ continue;+ }+ if (inputDef.required) required.push(name);+ else optional.push(name);+ }+ return [...required, ...optional];+ }, [step, onlyConnection]);++ // Hidden by the catalog's visibility rules. Shown here, editable, so a hidden+ // field is demoted rather than lost — being wrong about one costs a click.+ const advancedNames = useMemo(+ () => Object.keys(step?.advancedInputs ?? {}),+ [step]+ );++ return (+ <FormStack spacing={4}>+ <div className="space-y-1">+ <Section>+ <Trans>App</Trans>+ </Section>+ <Select+ value={piece}+ onValueChange={handlePieceChange}+ disabled={isReadOnly}+ >+ <SelectTrigger className="w-full" disabled={isReadOnly}>+ <SelectValue placeholder={t`Select an app…`} />+ </SelectTrigger>+ <SelectContent>+ {pieceNames.map((name) => (+ <SelectItem key={name} value={name}>+ {appLabel(name)}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ </div>++ {/* Connected, but every account predates a scope this app now needs: the+ fix is a re-consent, and "Connect" would send the author to add a+ duplicate account instead. */}+ {piece &&+ checked &&+ !connected &&+ !storedNotOffered &&+ connectionsError === "reconnect" && (+ <ConnectBanner+ message={+ <Trans>+ {appName} is connected, but needs to be reconnected before+ workflow steps can use it.+ </Trans>+ }+ href={connectionsFixHref ?? path.to.integrationAccounts(piece)}+ cta={<Trans>Reconnect {appName}</Trans>}+ isDisabled={isReadOnly}+ />+ )}++ {/* Some accounts are ready, one is not — or this node's stored account is the+ one left out. A non-blocking banner; the field below still works. */}+ {piece &&+ checked &&+ (storedNotOffered ||+ (connected && connectionsNotice === "reconnect")) && (+ <ConnectBanner+ message={+ storedNotOffered ? (+ <Trans>+ The {appName} account this step uses is not available — it was+ disconnected or needs to be reconnected.+ </Trans>+ ) : (+ <Trans>+ One of your {appName} accounts needs to be reconnected before+ workflow steps can use it.+ </Trans>+ )+ }+ href={connectionsNoticeHref ?? path.to.integrationAccounts(piece)}+ cta={<Trans>Open {appName} accounts</Trans>}+ isDisabled={isReadOnly}+ />+ )}++ {piece && lookupFailed && (+ <div className="flex flex-wrap items-center gap-2 rounded-md border border-dashed p-4">+ <p className="text-sm text-muted-foreground">+ {connectionsError === "refreshing" ? (+ <Trans>+ That account is still being reconnected. Try again in a moment.+ </Trans>+ ) : (+ <Trans>Couldn't check whether {appName} is connected.</Trans>+ )}+ </p>+ <Button+ variant="secondary"+ size="sm"+ onClick={retryConnections}+ isDisabled={isReadOnly}+ isLoading={checkingConnections}+ >+ <Trans>Try again</Trans>+ </Button>+ </div>+ )}++ {/* Land on the Accounts tab — where an account is added or reconnected. */}+ {piece &&+ checked &&+ !connected &&+ !storedNotOffered &&+ connectionsError === undefined && (+ <ConnectBanner+ message={+ <Trans>+ {appName} isn't connected yet. Connect an account before this+ step can do anything.+ </Trans>+ }+ href={path.to.integrationAccounts(piece)}+ cta={<Trans>Connect {appName}</Trans>}+ isDisabled={isReadOnly}+ />+ )}++ {piece && canConfigure && (+ <div className="space-y-1">+ <Section>+ <Trans>Step</Trans>+ </Section>+ <Select+ value={action}+ onValueChange={handleStepChange}+ disabled={isReadOnly}+ >+ <SelectTrigger className="w-full" disabled={isReadOnly}>+ <SelectValue placeholder={t`Select a step…`} />+ </SelectTrigger>+ <SelectContent>+ {steps.map((entry) => (+ <SelectItem key={entry.id} value={entry.action}>+ {label(entry.id)}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ </div>+ )}++ {canConfigure && step && inputNames.length > 0 && (+ <div className="space-y-3">+ <Section>+ <Trans>Inputs</Trans>+ </Section>+ {inputNames.map((name) => {+ const inputDef = step.inputs[name];+ if (!inputDef) return null;+ return (+ <StepInput+ key={name}+ stepId={stepId ?? ""}+ name={name}+ inputDef={inputDef}+ hint={hintFor(name)}+ inputs={inputs}+ issues={issues}+ nodeId={node.id}+ // A piece step is never batchable, so an input never stands for a+ // loop item here.+ batching={false}+ isReadOnly={isReadOnly}+ onChange={handleInputChange}+ />+ );+ })}+ </div>+ )}++ {canConfigure && step && advancedNames.length > 0 && (+ <Accordion type="single" collapsible>+ <AccordionItem value="advanced" className="border-none">+ <AccordionTrigger className="py-2 text-sm text-muted-foreground hover:no-underline">+ <Trans>Advanced properties</Trans>+ </AccordionTrigger>+ <AccordionContent className="space-y-3 pt-1">+ {advancedNames.map((name) => {+ const inputDef = step.advancedInputs?.[name];+ if (!inputDef) return null;+ return (+ <StepInput+ key={name}+ stepId={stepId ?? ""}+ name={name}+ inputDef={inputDef}+ hint={hintFor(name)}+ inputs={inputs}+ issues={issues}+ nodeId={node.id}+ batching={false}+ isReadOnly={isReadOnly}+ onChange={handleInputChange}+ />+ );+ })}+ </AccordionContent>+ </AccordionItem>+ </Accordion>+ )}+ </FormStack>+ );+}diff --git a/apps/erp/app/modules/workflows/ui/Builder/config/forms/OperationCardEditor.tsx b/apps/erp/app/modules/workflows/ui/Builder/config/forms/OperationCardEditor.tsxnew file mode 100644index 0000000000..8a7594c52f--- /dev/null+++ b/apps/erp/app/modules/workflows/ui/Builder/config/forms/OperationCardEditor.tsx@@ -0,0 +1,344 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import type {+ Clause,+ OperationCard,+ ValueType,+ WorkflowCatalog,+ WorkflowIssue+} from "@carbon/ee/workflows";+import { DATA_OPERATIONS, operationsFor } from "@carbon/ee/workflows";+import {+ Button,+ IconButton,+ Select,+ SelectContent,+ SelectItem,+ SelectTrigger,+ SelectValue+} from "@carbon/react";+import { Trans, useLingui } from "@lingui/react/macro";+import type { ReactNode } from "react";+import { LuPlus, LuTrash2 } from "react-icons/lu";+import { useWorkflowCatalog } from "../../catalog";+import { useDataOperationLabel } from "../../dataOperationLabels";+import type { FieldContext } from "../../fields/types";+import ClauseRow from "../ClauseRow";+import { CombinatorToggle } from "../CombinatorToggle";+import { Section } from "../layout";++const newClause = (): Clause => ({+ left: {+ kind: "literal",+ type: { kind: "primitive", of: "string" },+ value: ""+ },+ operator: "eq",+ right: {+ kind: "literal",+ type: { kind: "primitive", of: "string" },+ value: ""+ }+});++type FieldChoice = { path: string; type: ValueType };++/** Which fields a `pluck` may take, read off the element type ITS card receives. */+function fieldChoicesFor(+ itemType: ValueType | undefined,+ catalog: WorkflowCatalog+): FieldChoice[] {+ // A list of Carbon records can be plucked too — its fields come from the+ // catalog rather than the type. Offering only object fields left `pluck` over+ // a lookup's results validating but with nothing to choose.+ if (itemType?.kind === "entity") {+ const entity = catalog.getEntity(itemType.of);+ return Object.entries(entity?.properties ?? {}).map(([name, type]) => ({+ path: name,+ type+ }));+ }+ if (itemType?.kind !== "record") return [];+ const found: FieldChoice[] = [];+ const walk = (fields: Record<string, ValueType>, prefix: string[]) => {+ for (const [name, type] of Object.entries(fields)) {+ const path = [...prefix, name];+ found.push({ path: path.join("."), type });+ // One hop of nesting is enough to reach `organizer.email`; deeper paths+ // are reachable through a later pluck card.+ if (type.kind === "record" && prefix.length === 0) {+ walk(type.fields, path);+ }+ }+ };+ walk(itemType.fields, []);+ return found;+}++type CardPatch = (patch: Partial<OperationCard>) => void;++type OperationCardEditorProps = {+ card: OperationCard;+ /** The type that flows INTO this card — the previous card's result. */+ input: ValueType | undefined;+ nodeId: string;+ hasSource: boolean;+ /** A chain always keeps at least one card. */+ canRemove: boolean;+ issues?: WorkflowIssue[];+ isReadOnly?: boolean;+ onRemove: () => void;+ onOperationChange: (next: string) => void;+ onPatch: CardPatch;+ /** Rendered at the top of the card — the source picker, on the first card. */+ children?: ReactNode;+};++/** One card of a data step's chain: its operation, then what that operation needs. */+export function OperationCardEditor({+ card,+ input,+ nodeId,+ hasSource,+ canRemove,+ issues,+ isReadOnly,+ onRemove,+ onOperationChange,+ onPatch,+ children+}: OperationCardEditorProps) {+ const { t } = useLingui();+ const catalog = useWorkflowCatalog();+ const operationLabel = useDataOperationLabel();++ const itemType = input?.kind === "list" ? input.of : undefined;+ const entityName = itemType?.kind === "entity" ? itemType.of : undefined;+ const spec = DATA_OPERATIONS[card.operation];+ // What the incoming type supports — plus the stored choice when it is no+ // longer among them, so a rippled-invalid card still SHOWS its operation+ // (red, via validation) instead of the Select silently blanking.+ const offered = operationsFor(input);+ const options = offered.includes(card.operation)+ ? offered+ : [...offered, card.operation];+ const context = { nodeId, inLoop: true, itemCard: card.id };+ const fieldChoices = fieldChoicesFor(itemType, catalog);+ const at = (field: string) => `operations.${card.id}.${field}`;++ return (+ <div className="space-y-4 rounded-lg border bg-card p-3">+ {children}++ <div className="space-y-1">+ <div className="flex items-center justify-between">+ <Section>+ <Trans context="workflow data step">Operation</Trans>+ </Section>+ {canRemove && (+ <IconButton+ aria-label={t({+ message: "Remove this operation",+ context: "workflow data step"+ })}+ icon={<LuTrash2 />}+ variant="ghost"+ size="sm"+ onClick={onRemove}+ isDisabled={isReadOnly}+ />+ )}+ </div>+ {/* Built from DATA_OPERATIONS, never a second list: the same table+ drives the stored enum, the output type and the runtime. */}+ <Select+ value={card.operation}+ onValueChange={onOperationChange}+ disabled={isReadOnly}+ >+ <SelectTrigger className="w-full" disabled={isReadOnly}>+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {options.map((name) => (+ <SelectItem key={name} value={name}>+ {operationLabel(name)}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ </div>++ {/* Which field to take — `pluck` only. */}+ {hasSource && spec.usesField && (+ <FieldPicker+ card={card}+ fieldChoices={fieldChoices}+ isReadOnly={isReadOnly}+ onPatch={onPatch}+ />+ )}++ {/* Clause section — filtering only; another operation stores no clauses */}+ {hasSource && spec.usesClauses && (+ <ClauseList+ card={card}+ entityName={entityName}+ context={context}+ fieldPath={at("clauses")}+ issues={issues}+ isReadOnly={isReadOnly}+ onPatch={onPatch}+ />+ )}+ </div>+ );+}++function FieldPicker({+ card,+ fieldChoices,+ isReadOnly,+ onPatch+}: {+ card: OperationCard;+ fieldChoices: FieldChoice[];+ isReadOnly?: boolean;+ onPatch: CardPatch;+}) {+ const { t } = useLingui();++ return (+ <div className="space-y-1">+ <Section>+ <Trans>Field</Trans>+ </Section>+ {fieldChoices.length === 0 ? (+ <p className="text-sm text-muted-foreground">+ <Trans>The items in that list have no fields to take.</Trans>+ </p>+ ) : (+ <Select+ value={card.field ?? ""}+ onValueChange={(next) => {+ const chosen = fieldChoices.find((option) => option.path === next);+ onPatch({+ field: next,+ // A list-valued field can ONLY be taken flat:+ // `list<list<T>>` cannot exist, so the choice is made+ // here rather than offered as a toggle that can be wrong.+ flatten: chosen?.type.kind === "list"+ });+ }}+ disabled={isReadOnly}+ >+ <SelectTrigger className="w-full" disabled={isReadOnly}>+ <SelectValue placeholder={t`Pick a field…`} />+ </SelectTrigger>+ <SelectContent>+ {fieldChoices.map((option) => (+ <SelectItem key={option.path} value={option.path}>+ {option.path}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ )}+ {card.flatten && (+ <p className="text-xs text-muted-foreground">+ <Trans>+ That field holds several values, so they are combined into one list.+ </Trans>+ </p>+ )}+ </div>+ );+}++function ClauseList({+ card,+ entityName,+ context,+ fieldPath,+ issues,+ isReadOnly,+ onPatch+}: {+ card: OperationCard;+ /** The record type the list holds, for the heading; absent for plain items. */+ entityName: string | undefined;+ context: FieldContext;+ /** Issue path of this card's clauses; each row appends its index. */+ fieldPath: string;+ issues?: WorkflowIssue[];+ isReadOnly?: boolean;+ onPatch: CardPatch;+}) {+ const { t } = useLingui();++ return (+ <div className="space-y-3">+ <div className="flex items-center justify-between">+ <Section>+ {entityName+ ? t`Keep only the ${entityName} where…`+ : t`Keep only items where…`}+ </Section>++ <CombinatorToggle+ value={card.combinator}+ onChange={(v) => onPatch({ combinator: v })}+ isReadOnly={isReadOnly}+ />+ </div>++ {card.clauses.map((clause, i) => (+ <div key={i}>+ <ClauseRow+ clause={clause}+ index={i}+ canRemove={card.clauses.length > 1}+ onChange={(clauseIndex, patch) =>+ onPatch({+ clauses: card.clauses.map((c, j) =>+ j === clauseIndex ? { ...c, ...patch } : c+ )+ })+ }+ onRemove={(clauseIndex) =>+ onPatch({+ clauses: card.clauses.filter((_, j) => j !== clauseIndex)+ })+ }+ context={context}+ fieldPath={`${fieldPath}.${i}`}+ issues={issues}+ isReadOnly={isReadOnly}+ />+ {i < card.clauses.length - 1 && (+ <div className="flex justify-center py-1">+ <CombinatorToggle+ value={card.combinator}+ onChange={(v) => onPatch({ combinator: v })}+ isReadOnly={isReadOnly}+ />+ </div>+ )}+ </div>+ ))}++ <Button+ type="button"+ variant="secondary"+ size="sm"+ leftIcon={<LuPlus />}+ onClick={() => onPatch({ clauses: [...card.clauses, newClause()] })}+ isDisabled={isReadOnly}+ >+ <Trans>Add rule</Trans>+ </Button>+ </div>+ );+}diff --git a/apps/erp/app/modules/workflows/ui/Builder/config/forms/SourceListPicker.tsx b/apps/erp/app/modules/workflows/ui/Builder/config/forms/SourceListPicker.tsxnew file mode 100644index 0000000000..0180dc205a--- /dev/null+++ b/apps/erp/app/modules/workflows/ui/Builder/config/forms/SourceListPicker.tsx@@ -0,0 +1,121 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import type { AvailableVariable } from "@carbon/ee/workflows";+import {+ Command,+ CommandEmpty,+ CommandGroup,+ CommandInput,+ CommandItem,+ CommandList,+ cn,+ Popover,+ PopoverContent,+ PopoverTrigger+} from "@carbon/react";+import { Trans, useLingui } from "@lingui/react/macro";+import { useState } from "react";+import { LuChevronDown } from "react-icons/lu";+import { describeValueType } from "../../catalog";+import { Section } from "../layout";++type SourceListPickerProps = {+ /** Whether the node holds a source at all — it can outlive the variable it named. */+ hasSource: boolean;+ /** The upstream variable the source points at, when it still exists. */+ sourceVar: AvailableVariable | undefined;+ listVars: AvailableVariable[];+ isReadOnly?: boolean;+ onSelect: (nodeId: string, output: string) => void;+ onClear: () => void;+};++/** The chain's one source list. Rendered inside the first card, which owns it. */+export function SourceListPicker({+ hasSource,+ sourceVar,+ listVars,+ isReadOnly,+ onSelect,+ onClear+}: SourceListPickerProps) {+ const { t } = useLingui();+ const [sourceOpen, setSourceOpen] = useState(false);++ return (+ <div className="space-y-1">+ <Section>+ <Trans>Source list</Trans>+ </Section>++ <Popover open={sourceOpen} onOpenChange={setSourceOpen}>+ <PopoverTrigger asChild>+ <button+ type="button"+ disabled={isReadOnly}+ className="flex w-full items-center justify-between rounded-md border bg-background px-3 py-2 text-sm hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"+ >+ <span+ className={cn("truncate", !hasSource && "text-muted-foreground")}+ >+ {sourceVar+ ? `${sourceVar.nodeName} › ${sourceVar.output}`+ : t`Pick a list variable…`}+ </span>+ <LuChevronDown className="ml-2 h-4 w-4 shrink-0 text-muted-foreground" />+ </button>+ </PopoverTrigger>+ <PopoverContent+ align="start"+ className="w-[var(--radix-popover-trigger-width)] min-w-[260px] p-0"+ onWheel={(e) => e.stopPropagation()}+ onTouchMove={(e) => e.stopPropagation()}+ >+ <Command>+ <CommandInput+ placeholder={t`Search list variables…`}+ disabled={isReadOnly}+ />+ <CommandList className="max-h-64 overflow-y-auto">+ <CommandEmpty>+ <Trans>No list variables available upstream.</Trans>+ </CommandEmpty>+ <CommandGroup>+ {listVars.map((v) => (+ <CommandItem+ key={`${v.nodeId}:${v.output}`}+ value={`${v.nodeName} ${v.output} ${describeValueType(v.type)}`}+ disabled={isReadOnly}+ onSelect={() => {+ onSelect(v.nodeId, v.output);+ setSourceOpen(false);+ }}+ className="flex flex-col items-start gap-0.5 px-3 py-2"+ >+ <span className="text-sm font-medium">{v.output}</span>+ <span className="text-xs text-muted-foreground">+ {v.nodeName} · {describeValueType(v.type)}+ </span>+ </CommandItem>+ ))}+ </CommandGroup>+ </CommandList>+ </Command>+ </PopoverContent>+ </Popover>++ {hasSource && (+ <button+ type="button"+ className="text-xs text-muted-foreground hover:text-foreground underline underline-offset-2"+ onClick={onClear}+ disabled={isReadOnly}+ >+ <Trans>Clear</Trans>+ </button>+ )}+ </div>+ );+}diff --git a/apps/erp/app/modules/workflows/ui/Builder/config/forms/StepInput.tsx b/apps/erp/app/modules/workflows/ui/Builder/config/forms/StepInput.tsxnew file mode 100644index 0000000000..f2f2217ba0--- /dev/null+++ b/apps/erp/app/modules/workflows/ui/Builder/config/forms/StepInput.tsx@@ -0,0 +1,199 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import type {+ CatalogInput,+ ValueOrRef,+ WorkflowIssue+} from "@carbon/ee/workflows";+import { isMultiSelect } from "@carbon/ee/workflows";+import {+ actionInputLabelKey,+ useWorkflowCatalog,+ useWorkflowLabel,+ workflowFieldHelp+} from "../../catalog";+import { lockedChoices, useChoiceOptions } from "../../fields/choiceOptions";+import { MultiChoiceField } from "../../fields/MultiChoiceField";+import { OptionsField } from "../../fields/OptionsField";+import { PairsField } from "../../fields/PairsField";+import { TemplateField } from "../../fields/TemplateField";+import { ValueField } from "../../fields/ValueField";+import {+ issueForField,+ partIssuesForField,+ rowIssuesForField+} from "../../issues";++/**+ * One input of a step, whatever kind of step it is.+ *+ * Actions and integration steps declare their inputs identically, so they render+ * identically — sharing this is what stops the two drifting apart as new input+ * kinds are added.+ */+export type StepInputProps = {+ /** The catalog id of the action or integration step that declares the input. */+ stepId: string;+ name: string;+ inputDef: CatalogInput;+ /** Advisory one-liner under the control (a record that will not link, and why). */+ hint?: string;+ /** Every input on the node, for gates and for fetched-choice dependencies. */+ inputs: Record<string, ValueOrRef>;+ issues?: WorkflowIssue[];+ nodeId: string;+ batching: boolean;+ isReadOnly?: boolean;+ onChange: (name: string, value: ValueOrRef | undefined) => void;+};++export function StepInput({+ stepId,+ name,+ inputDef,+ hint,+ inputs,+ issues,+ nodeId,+ batching,+ isReadOnly,+ onChange+}: StepInputProps) {+ const label = useWorkflowLabel();+ const catalog = useWorkflowCatalog();+ const choiceOptions = useChoiceOptions();++ // A custom-field input has no translated key — fall back to the customer's own name.+ const labelFor = (input: string) =>+ label(+ actionInputLabelKey(stepId, input),+ catalog.getInputLabel(stepId, input) ?? input+ );+ const fieldLabel = labelFor(name);+ const helpTermId = workflowFieldHelp(actionInputLabelKey(stepId, name));+ // The vendor's (or a hand-written action's) own field description, translated+ // like its label.+ const help =+ inputDef.description === undefined+ ? undefined+ : label(+ `${actionInputLabelKey(stepId, name)}.description`,+ inputDef.description+ );++ const fieldContext = { nodeId, inLoop: batching, batching };+ const fieldIssue = issueForField(issues, name, `inputs.${name}`);+ const fieldParts = partIssuesForField(issues, name, `inputs.${name}`);++ // An input whose values are fetched. Remounted when a value it depends on+ // changes: a calendar id chosen against one account means nothing in another.+ if (inputDef.options) {+ const dependsOn = inputDef.options.dependsOn ?? [];+ const values: Record<string, string> = {};+ const dependencyLabels: Record<string, string> = {};+ for (const dependency of dependsOn) {+ const held = inputs[dependency];+ values[dependency] =+ held?.kind === "literal" && typeof held.value === "string"+ ? held.value+ : "";+ dependencyLabels[dependency] = labelFor(dependency);+ }+ return (+ <OptionsField+ key={`${name}:${dependsOn.map((d) => values[d]).join(":")}`}+ label={fieldLabel}+ help={help}+ hint={hint}+ source={inputDef.options}+ type={inputDef.type}+ values={values}+ dependencyLabels={dependencyLabels}+ required={inputDef.required}+ value={inputs[name]}+ onChange={(v) => onChange(name, v)}+ issue={fieldIssue}+ isReadOnly={isReadOnly}+ />+ );+ }++ if (inputDef.pairs) {+ return (+ <PairsField+ label={fieldLabel}+ helpTermId={helpTermId}+ help={help}+ hint={hint}+ type={inputDef.type}+ required={inputDef.required}+ value={inputs[name]}+ onChange={(v) => onChange(name, v)}+ context={fieldContext}+ issue={fieldIssue}+ partIssues={rowIssuesForField(issues, name, `inputs.${name}`)}+ isReadOnly={isReadOnly}+ />+ );+ }++ if (isMultiSelect(inputDef)) {+ return (+ <MultiChoiceField+ label={fieldLabel}+ helpTermId={helpTermId}+ help={help}+ hint={hint}+ type={inputDef.type}+ required={inputDef.required}+ options={choiceOptions(inputDef.choices)}+ locked={lockedChoices(inputDef.choices)}+ value={inputs[name]}+ onChange={(v) => onChange(name, v)}+ issue={fieldIssue}+ isReadOnly={isReadOnly}+ />+ );+ }++ if (inputDef.template) {+ return (+ <TemplateField+ label={fieldLabel}+ helpTermId={helpTermId}+ help={help}+ hint={hint}+ type={inputDef.type}+ required={inputDef.required}+ value={inputs[name]}+ onChange={(v) => onChange(name, v)}+ context={fieldContext}+ issue={fieldIssue}+ partIssues={fieldParts}+ isReadOnly={isReadOnly}+ />+ );+ }++ return (+ <ValueField+ label={fieldLabel}+ helpTermId={helpTermId}+ help={help}+ hint={hint}+ defaultValue={inputDef.defaultValue}+ type={inputDef.type}+ required={inputDef.required}+ choices={inputDef.choices}+ precision={inputDef.precision}+ value={inputs[name]}+ onChange={(v) => onChange(name, v)}+ context={fieldContext}+ issue={fieldIssue}+ partIssues={fieldParts}+ isReadOnly={isReadOnly}+ />+ );+}diff --git a/apps/erp/app/modules/workflows/ui/Builder/config/forms/index.ts b/apps/erp/app/modules/workflows/ui/Builder/config/forms/index.tsindex a29f2ab2e7..d65e386844 100644--- a/apps/erp/app/modules/workflows/ui/Builder/config/forms/index.ts+++ b/apps/erp/app/modules/workflows/ui/Builder/config/forms/index.ts@@ -13,6 +13,7 @@ import { ActionForm } from "./ActionForm";import { ComputeForm } from "./ComputeForm";import { ConditionForm } from "./ConditionForm";import { FilterForm } from "./FilterForm";+import { IntegrationNodeForm } from "./IntegrationNodeForm";import { LookupForm } from "./LookupForm";import { TriggerForm } from "./TriggerForm";@@ -38,7 +39,8 @@ export const NODE_FORMS: {compute: ComputeForm,lookup: LookupForm,filter: FilterForm,- action: ActionForm+ action: ActionForm,+ integration: IntegrationNodeForm};/** What the card can actually pass: the kind is a value, so it cannot be correlated. */diff --git a/apps/erp/app/modules/workflows/ui/Builder/dataOperationLabels.ts b/apps/erp/app/modules/workflows/ui/Builder/dataOperationLabels.tsnew file mode 100644index 0000000000..16ea501cc1--- /dev/null+++ b/apps/erp/app/modules/workflows/ui/Builder/dataOperationLabels.ts@@ -0,0 +1,35 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import type { DataOperation } from "@carbon/ee/workflows";+import { useLingui } from "@lingui/react/macro";++/**+ * How each data operation reads in the builder.+ *+ * The operation TABLE (`DATA_OPERATIONS`) stays the single source of truth for what+ * an operation does; only its wording lives here. It cannot live beside the table+ * because `@carbon/workflows` is imported by the job runner and by unit tests that+ * do not transform Lingui macros.+ */+export function useDataOperationLabel(): (operation: DataOperation) => string {+ const { t } = useLingui();++ return (operation) => {+ switch (operation) {+ case "filter":+ return t`Keep matching items`;+ case "count":+ return t`Count items`;+ case "first":+ return t`Take the first item`;+ case "last":+ return t`Take the last item`;+ case "pluck":+ return t`Take one field from every item`;+ case "join":+ return t`Join into text`;+ }+ };+}diff --git a/apps/erp/app/modules/workflows/ui/Builder/fields/Field.tsx b/apps/erp/app/modules/workflows/ui/Builder/fields/Field.tsxindex 0394120f20..a718670e63 100644--- a/apps/erp/app/modules/workflows/ui/Builder/fields/Field.tsx+++ b/apps/erp/app/modules/workflows/ui/Builder/fields/Field.tsx@@ -11,8 +11,12 @@ type FieldProps = {required?: boolean;/** Glossary term for the ⓘ hover. Absent => no icon, same layout. */helpTermId?: TermId;+ /** Free-text ⓘ hover — a vendor's own field description. `helpTermId` wins. */+ help?: string;/** Message from a validation issue whose `field` path resolves here. */issue?: string;+ /** Advisory one-liner, muted. An issue outranks it — one line under a field. */+ hint?: string;children: ReactNode;};@@ -21,14 +25,16 @@ export function Field({label,required,helpTermId,+ help,issue,+ hint,children}: FieldProps) {return (<div className="flex w-full min-w-0 flex-col gap-1">{/* Still rendered when hidden: an `aria-label` on a plain div is ignored. */}<label className={cn("text-sm font-medium text-foreground")}>- <LabelWithHelp termId={helpTermId}>+ <LabelWithHelp termId={helpTermId} text={help}>{label}{required && <span className="ml-0.5 text-destructive">*</span>}</LabelWithHelp>@@ -37,6 +43,9 @@ export function Field({together read as a thick red slab. */}<div className="flex items-center gap-1">{children}</div>{issue && <p className="text-xs text-destructive">{issue}</p>}+ {hint && !issue && (+ <p className="text-xs text-muted-foreground">{hint}</p>+ )}</div>);}diff --git a/apps/erp/app/modules/workflows/ui/Builder/fields/LiteralControl.tsx b/apps/erp/app/modules/workflows/ui/Builder/fields/LiteralControl.tsxindex 4fc73ca1f0..02239c4ad9 100644--- a/apps/erp/app/modules/workflows/ui/Builder/fields/LiteralControl.tsx+++ b/apps/erp/app/modules/workflows/ui/Builder/fields/LiteralControl.tsx@@ -4,7 +4,9 @@import type { ValueOrRef, ValueType } from "@carbon/ee/workflows";import {+ CreatableMultiSelect,DatePicker,+ DateTimePicker,Input,NumberDecrementStepper,NumberField,@@ -19,27 +21,25 @@ import {SelectValue,Switch} from "@carbon/react";-import { parseDate } from "@internationalized/date";+import { toZoned } from "@internationalized/date";import { useLingui } from "@lingui/react/macro";import type { KeyboardEvent, ReactNode } from "react";import { LuChevronDown, LuChevronUp } from "react-icons/lu";+import { useCompanyTimeZone } from "~/hooks";+import { asCalendarDate, asCalendarDateTime, isWritableList } from "./control";import { RECORD_PICKERS } from "./recordPickers";-/** Stored dates are the `YYYY-MM-DD` the picker itself writes. Anything else is a- * value from elsewhere, and an empty picker beats a crash. */-function asCalendarDate(value: unknown) {- if (typeof value !== "string" || !value) return null;- try {- return parseDate(value.slice(0, 10));- } catch {- return null;- }-}-type LiteralControlProps = {type: ValueType;choices?: readonly string[];- value: string | number | boolean | null | undefined;+ /** The input is a moment, not a calendar day: render a date AND time picker+ * and store a full ISO instant, resolved against the company's timezone. */+ precision?: "datetime";+ value: string | number | boolean | string[] | null | undefined;+ /** The catalog's default, shown when nothing is stored yet. A boolean control+ * especially must display what the run will actually send — an untouched+ * toggle rendered OFF while the effective default was ON lied twice over. */+ defaultValue?: unknown;onChange: (next: ValueOrRef | undefined) => void;/** Opens the variable menu. Every control here has two modes, and `{` is the one* way into the second. */@@ -51,12 +51,15 @@ type LiteralControlProps = {export function LiteralControl({type,choices,+ precision,value,+ defaultValue,onChange,onRequestVariable,isReadOnly = false}: LiteralControlProps) {const { t } = useLingui();+ const companyTimeZone = useCompanyTimeZone();function emit(raw: string | number | boolean | null | undefined) {if (raw === undefined || raw === "" || raw === null) {@@ -107,7 +110,39 @@ export function LiteralControl({);}- // 2. Primitive kinds+ // 2. A list of plain text — recipients, attendees — typed one entry at a time,+ // each becoming a chip. The vendor's field is an ARRAY, and the chips make+ // "this goes to several people" visible where a text box would not; the+ // stored value is a literal list. A list from an earlier step is still `{`.+ if (isWritableList(type)) {+ const entries = Array.isArray(value)+ ? value.filter((entry): entry is string => typeof entry === "string")+ : [];+ const emitList = (next: readonly string[]) => {+ const cleaned = [+ ...new Set(next.map((entry) => entry.trim()).filter(Boolean))+ ];+ onChange(+ cleaned.length === 0+ ? undefined+ : { kind: "literal", type, value: cleaned }+ );+ };+ return shell(+ <CreatableMultiSelect+ size="md"+ value={entries}+ options={entries.map((entry) => ({ label: entry, value: entry }))}+ onChange={emitList}+ onCreateOption={(input) => emitList([...entries, input])}+ placeholder={t`Type a value and press Enter…`}+ isReadOnly={isReadOnly}+ className="w-full"+ />+ );+ }++ // 3. Primitive kindsif (type.kind === "primitive") {switch (type.of) {// Unreachable via pickControl; kept so LiteralControl stays total over ValueType.@@ -161,7 +196,12 @@ export function LiteralControl({}case "boolean": {- const boolValue = typeof value === "boolean" ? value : false;+ const boolValue =+ typeof value === "boolean"+ ? value+ : typeof defaultValue === "boolean"+ ? defaultValue+ : false;return shell(<Switchchecked={boolValue}@@ -173,6 +213,33 @@ export function LiteralControl({}case "date": {+ // A vendor's DATE_TIME. The picked wall clock is resolved against the+ // COMPANY's timezone, not the browser's — two admins in different+ // offices must not store different moments for the same typed time — and+ // stored as a full ISO instant, so the piece's own+ // `dayjs(value).format(...)` reproduces that moment whatever zone the+ // worker runs in.+ if (precision === "datetime") {+ return shell(+ <DateTimePicker+ // A workflow step's time is read by a machine in another system,+ // not by whoever happens to be looking at the canvas, so it is+ // shown as an unambiguous 24-hour clock. Carbon's own date-and-time+ // fields (timecards, maintenance) keep their locale's clock.+ hourCycle={24}+ value={asCalendarDateTime(value, companyTimeZone)}+ onChange={(date) =>+ emit(+ date+ ? toZoned(date, companyTimeZone).toAbsoluteString()+ : undefined+ )+ }+ aria-label={t`Date and time`}+ isDisabled={isReadOnly}+ />+ );+ }return shell(<DatePickervalue={asCalendarDate(value)}@@ -188,7 +255,7 @@ export function LiteralControl({}}- // 3. Entity → the Carbon selector for that record+ // 4. Entity → the Carbon selector for that recordif (type.kind === "entity") {const Picker = RECORD_PICKERS[type.of];if (Picker) {diff --git a/apps/erp/app/modules/workflows/ui/Builder/fields/MultiChoiceField.tsx b/apps/erp/app/modules/workflows/ui/Builder/fields/MultiChoiceField.tsxindex 8c3dcb7620..fabcd5c8dd 100644--- a/apps/erp/app/modules/workflows/ui/Builder/fields/MultiChoiceField.tsx+++ b/apps/erp/app/modules/workflows/ui/Builder/fields/MultiChoiceField.tsx@@ -14,6 +14,9 @@ export type MultiChoiceFieldProps = {type: ValueType;required?: boolean;helpTermId?: TermId;+ help?: string;+ /** Advisory one-liner, muted, under the control. */+ hint?: string;/** Titles, descriptions and per-option availability, in the order to offer them. */options: ChoiceSelectOption[];/** Always ticked and never togglable, whatever is stored — a channel the platform@@ -35,6 +38,8 @@ export function MultiChoiceField({type,required,helpTermId,+ help,+ hint,options,locked,value,@@ -55,7 +60,9 @@ export function MultiChoiceField({label={label}required={required}helpTermId={helpTermId}+ help={help}issue={issue}+ hint={hint}><div className="min-w-0 flex-1"><ChoiceSelectdiff --git a/apps/erp/app/modules/workflows/ui/Builder/fields/OptionsField.tsx b/apps/erp/app/modules/workflows/ui/Builder/fields/OptionsField.tsxnew file mode 100644index 0000000000..b9c4db3bc5--- /dev/null+++ b/apps/erp/app/modules/workflows/ui/Builder/fields/OptionsField.tsx@@ -0,0 +1,236 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import type {+ OptionsSource,+ ValueOrRef,+ ValueType+} from "@carbon/ee/workflows";+import { Button, Combobox, MultiSelect } from "@carbon/react";+import { Trans, useLingui } from "@lingui/react/macro";+import { Link } from "react-router";+import { Field } from "./Field";+import { useWorkflowOptions } from "./useWorkflowOptions";++const STRING_TYPE: ValueType = { kind: "primitive", of: "string" };++function literal(value: string | undefined): ValueOrRef | undefined {+ return value ? { kind: "literal", type: STRING_TYPE, value } : undefined;+}++function literalValue(value: ValueOrRef | undefined): string | undefined {+ return value?.kind === "literal" && typeof value.value === "string"+ ? value.value+ : undefined;+}++function literalList(value: ValueOrRef | undefined): string[] {+ if (value?.kind !== "literal" || !Array.isArray(value.value)) return [];+ return value.value.filter((item): item is string => typeof item === "string");+}++/**+ * An input whose choices are fetched while editing rather than listed in the+ * catalog. It knows only the provider id, the fixed params and the values of the+ * inputs it depends on — never what the list is, or who answers for it.+ */+export function OptionsField({+ label,+ help,+ hint,+ source,+ type,+ values,+ dependencyLabels,+ required,+ value,+ onChange,+ issue,+ isReadOnly+}: {+ label: string;+ /** The vendor's own field description, for the ⓘ hover. */+ help?: string;+ /** Advisory one-liner, muted, under the control. */+ hint?: string;+ source: OptionsSource;+ type: ValueType;+ /** Current literal values of this input's `dependsOn` inputs. */+ values: Record<string, string>;+ /** Human labels for the same, for the "choose X first" prompt. */+ dependencyLabels: Record<string, string>;+ required?: boolean;+ value: ValueOrRef | undefined;+ onChange: (next: ValueOrRef | undefined) => void;+ issue?: string;+ isReadOnly?: boolean;+}) {+ const { t } = useLingui();+ const {+ ready,+ missing,+ loaded,+ isLoading,+ options,+ emptyHref,+ errorCode,+ errorHref,+ noticeCode,+ noticeHref,+ retry+ } = useWorkflowOptions(source, values);++ if (!ready) {+ const named = missing+ .map((name) => dependencyLabels[name] ?? name)+ .join(", ");+ return (+ <Field+ label={label}+ help={help}+ hint={hint}+ required={required}+ issue={issue}+ >+ <p className="text-sm text-muted-foreground">+ <Trans>Choose {named} first.</Trans>+ </p>+ </Field>+ );+ }++ // A failed lookup is NOT an empty one. Without this the vendor's error fell+ // through to an empty dropdown, which reads as "this account has nothing" —+ // sending the author off to fix data that was never the problem.+ if (loaded && errorCode) {+ return (+ <Field+ label={label}+ help={help}+ hint={hint}+ required={required}+ issue={issue}+ >+ <div className="flex flex-wrap items-center gap-2">+ {/* The specific reason when the provider knew one — "this account needs+ to be reconnected" is actionable, "couldn't load the choices" is not. */}+ <p className="text-sm text-muted-foreground">+ {errorCode === "reconnect" ? (+ <Trans>This account needs to be reconnected.</Trans>+ ) : errorCode === "refreshing" ? (+ <Trans>+ That account is still being reconnected. Try again in a moment.+ </Trans>+ ) : errorCode === "forbidden" ? (+ <Trans>+ You need permission to edit workflows to load these choices.+ </Trans>+ ) : (+ <Trans>Couldn't load the choices for this field.</Trans>+ )}+ </p>+ {errorHref ? (+ <Link+ className="text-sm underline underline-offset-2"+ to={errorHref}+ target="_blank"+ rel="noreferrer"+ >+ <Trans>Fix this</Trans>+ </Link>+ ) : null}+ {errorCode === "forbidden" ? null : (+ <Button+ variant="secondary"+ size="sm"+ onClick={retry}+ isDisabled={isReadOnly}+ isLoading={isLoading}+ >+ <Trans>Try again</Trans>+ </Button>+ )}+ </div>+ </Field>+ );+ }++ // Nothing to pick and somewhere to go and make one: a dropdown the author cannot+ // do anything about is worse than a link out.+ if (loaded && options.length === 0 && emptyHref) {+ return (+ <Field+ label={label}+ help={help}+ hint={hint}+ required={required}+ issue={issue}+ >+ <p className="text-sm text-muted-foreground">+ <Trans>+ Nothing to choose yet -{" "}+ <Link className="underline" to={emptyHref}>+ set one up in Settings+ </Link>+ .+ </Trans>+ </p>+ </Field>+ );+ }++ const placeholder = isLoading || !loaded ? t`Loading…` : t`Select an option…`;++ return (+ <Field+ label={label}+ help={help}+ hint={hint}+ required={required}+ issue={issue}+ >+ {type.kind === "list" ? (+ <MultiSelect+ options={options}+ value={literalList(value)}+ isReadOnly={isReadOnly}+ placeholder={placeholder}+ onChange={(next) =>+ onChange(+ next.length > 0+ ? { kind: "literal", type, value: next }+ : undefined+ )+ }+ />+ ) : (+ <Combobox+ options={options}+ value={literalValue(value)}+ isClearable+ isReadOnly={isReadOnly}+ placeholder={placeholder}+ onChange={(next) => onChange(literal(next || undefined))}+ />+ )}+ {loaded && noticeCode === "reconnect" && (+ <p className="mt-1 text-xs text-muted-foreground">+ <Trans>+ An account is missing from this list until it is reconnected.+ </Trans>{" "}+ {noticeHref ? (+ <Link+ className="underline underline-offset-2"+ to={noticeHref}+ target="_blank"+ rel="noreferrer"+ >+ <Trans>Reconnect it</Trans>+ </Link>+ ) : null}+ </p>+ )}+ </Field>+ );+}diff --git a/apps/erp/app/modules/workflows/ui/Builder/fields/PairsField.tsx b/apps/erp/app/modules/workflows/ui/Builder/fields/PairsField.tsxindex df332c06df..ef109f8b0a 100644--- a/apps/erp/app/modules/workflows/ui/Builder/fields/PairsField.tsx+++ b/apps/erp/app/modules/workflows/ui/Builder/fields/PairsField.tsx@@ -25,6 +25,8 @@ export function PairsField({label,required,helpTermId,+ help,+ hint,value,onChange,context,@@ -60,13 +62,14 @@ export function PairsField({label={label}required={required}helpTermId={helpTermId}+ help={help}issue={issue}+ hint={hint}><div className="flex w-full min-w-0 flex-col gap-2">{entries.map((entry, index) => {const rowIssue = partIssues?.[index];return (- // biome-ignore lint/suspicious/noArrayIndexKey: rows have no stable id<div key={index} className="flex w-full min-w-0 flex-col gap-1"><div className="flex w-full min-w-0 items-start gap-1"><Inputdiff --git a/apps/erp/app/modules/workflows/ui/Builder/fields/TemplateField.tsx b/apps/erp/app/modules/workflows/ui/Builder/fields/TemplateField.tsxindex 4ad41db415..f583fe9061 100644--- a/apps/erp/app/modules/workflows/ui/Builder/fields/TemplateField.tsx+++ b/apps/erp/app/modules/workflows/ui/Builder/fields/TemplateField.tsx@@ -12,6 +12,8 @@ export function TemplateField({label,required,helpTermId,+ help,+ hint,value,onChange,context,@@ -24,7 +26,9 @@ export function TemplateField({label={label}required={required}helpTermId={helpTermId}+ help={help}issue={issue}+ hint={hint}>{/* These are the prose inputs — a subject, a message body, a webhook payload.They open at a few rows and take line breaks, so a JSON payload can bediff --git a/apps/erp/app/modules/workflows/ui/Builder/fields/ValueField.tsx b/apps/erp/app/modules/workflows/ui/Builder/fields/ValueField.tsxindex 2f83ce56ea..dfc73d2b60 100644--- a/apps/erp/app/modules/workflows/ui/Builder/fields/ValueField.tsx+++ b/apps/erp/app/modules/workflows/ui/Builder/fields/ValueField.tsx@@ -21,7 +21,11 @@ export function ValueField({accepts,required,helpTermId,+ help,+ hint,+ defaultValue,choices,+ precision,value,onChange,context,@@ -51,7 +55,9 @@ export function ValueField({label={label}required={required}helpTermId={helpTermId}+ help={help}issue={issue}+ hint={hint}><InlineValueEditoraccepts={acceptsFilter}@@ -80,7 +86,9 @@ export function ValueField({label={label}required={required}helpTermId={helpTermId}+ help={help}issue={issue}+ hint={hint}>{/* The popup anchors to the control itself. A field is either a value you writeor a variable you pick — never a box with a second way in bolted to its edge. */}@@ -116,12 +124,15 @@ export function ValueField({<LiteralControltype={type}choices={choices}+ precision={precision}+ defaultValue={defaultValue}value={value?.kind === "literal"? (value.value as| string| number| boolean+ | string[]| null| undefined): undefineddiff --git a/apps/erp/app/modules/workflows/ui/Builder/fields/control.test.ts b/apps/erp/app/modules/workflows/ui/Builder/fields/control.test.tsnew file mode 100644index 0000000000..3a194e9d8b--- /dev/null+++ b/apps/erp/app/modules/workflows/ui/Builder/fields/control.test.ts@@ -0,0 +1,75 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import type { ValueType } from "@carbon/ee/workflows";+import { describe, expect, it } from "vitest";+import { asCalendarDateTime, isWritableList, pickControl } from "./control";++const STRING_LIST: ValueType = {+ kind: "list",+ of: { kind: "primitive", of: "string" }+};+const NUMBER_LIST: ValueType = {+ kind: "list",+ of: { kind: "primitive", of: "number" }+};+const ENTITY_LIST: ValueType = {+ kind: "list",+ of: { kind: "entity", of: "job" }+};++describe("isWritableList", () => {+ it("is a list of plain text and nothing else", () => {+ expect(isWritableList(STRING_LIST)).toBe(true);+ expect(isWritableList(NUMBER_LIST)).toBe(false);+ expect(isWritableList(ENTITY_LIST)).toBe(false);+ expect(isWritableList({ kind: "primitive", of: "string" })).toBe(false);+ });+});++describe("pickControl", () => {+ // Gmail's To/CC/BCC and a calendar's attendees: a person types the addresses.+ it("lets a list of plain text be written down", () => {+ expect(pickControl(STRING_LIST, undefined, undefined)).toBe("literal");+ });++ it("keeps a list of records or numbers variable-only", () => {+ expect(pickControl(ENTITY_LIST, undefined, undefined)).toBe("pick");+ expect(pickControl(NUMBER_LIST, undefined, undefined)).toBe("pick");+ });++ it("shows a bound variable as a chip whatever the list holds", () => {+ expect(+ pickControl(+ STRING_LIST,+ { kind: "ref", nodeId: "find", output: "emails", path: [] },+ undefined+ )+ ).toBe("chip");+ });++ it("still gives free text the inline editor", () => {+ expect(+ pickControl({ kind: "primitive", of: "string" }, undefined, undefined)+ ).toBe("inline");+ });+});++describe("asCalendarDateTime", () => {+ it("reads a stored instant on the company's calendar", () => {+ expect(asCalendarDateTime("2026-08-01T14:30:00Z", "UTC")?.toString()).toBe(+ "2026-08-01T14:30:00"+ );+ });++ it("reads a legacy bare date as midnight", () => {+ expect(asCalendarDateTime("2026-08-01", "UTC")?.toString()).toBe(+ "2026-08-01T00:00:00"+ );+ });++ it("leaves a near-miss empty rather than showing midnight", () => {+ expect(asCalendarDateTime("2026-08-01junk", "UTC")).toBeNull();+ });+});diff --git a/apps/erp/app/modules/workflows/ui/Builder/fields/control.ts b/apps/erp/app/modules/workflows/ui/Builder/fields/control.tsindex 484c1082dc..48e719193e 100644--- a/apps/erp/app/modules/workflows/ui/Builder/fields/control.ts+++ b/apps/erp/app/modules/workflows/ui/Builder/fields/control.ts@@ -3,15 +3,32 @@// including ports, remain AGPLv3; serving them over a network requires releasing their source.import type { ValueOrRef, ValueType } from "@carbon/ee/workflows";-import { hasRecordPicker } from "./recordPickers";+import {+ parseAbsolute,+ parseDate,+ toCalendarDateTime+} from "@internationalized/date";+import { hasRecordPicker } from "./recordPickerEntities";/** Which control a value field renders. */export type ControlKind = "inline" | "chip" | "pick" | "literal";-/** A value there is no way to write down: a list, or a record with no searchable- * picker behind it. The only honest source for one is an earlier step. */+/** A list of plain text — email recipients, calendar attendees — that a person+ * can write down one entry at a time. Every other list (records, numbers, dates)+ * has no honest source but an earlier step. */+export function isWritableList(type: ValueType): boolean {+ return (+ type.kind === "list" &&+ type.of.kind === "primitive" &&+ type.of.of === "string"+ );+}++/** A value there is no way to write down: a list that is not plain text, or a+ * record with no searchable picker behind it. The only honest source for one is+ * an earlier step. */function variableOnly(type: ValueType): boolean {- if (type.kind === "list") return true;+ if (type.kind === "list") return !isWritableList(type);return type.kind === "entity" && !hasRecordPicker(type.of);}@@ -38,3 +55,34 @@ export function pickControl(if (variableOnly(type)) return "pick";return "literal";}++const BARE_DATE = /^\d{4}-\d{2}-\d{2}$/;++/** Stored dates are the `YYYY-MM-DD` the picker itself writes. Anything else is a+ * value from elsewhere, and an empty picker beats a crash. */+export function asCalendarDate(value: unknown) {+ if (typeof value !== "string" || !value) return null;+ try {+ return parseDate(value.slice(0, 10));+ } catch {+ return null;+ }+}++/** Stored datetimes are the full ISO instant the picker itself writes. A value+ * saved before datetime inputs existed is a bare `YYYY-MM-DD`, which+ * `parseAbsolute` rejects — read it as midnight on the company's calendar, the+ * moment it already effectively meant. Anything else leaves the picker empty+ * rather than crashing the node form. */+export function asCalendarDateTime(value: unknown, timeZone: string) {+ if (typeof value !== "string" || !value) return null;+ try {+ return toCalendarDateTime(parseAbsolute(value, timeZone));+ } catch {+ // Only a complete bare date: `2026-08-01junk` must not display as midnight+ // while the run still sends the rejected text.+ if (!BARE_DATE.test(value)) return null;+ const date = asCalendarDate(value);+ return date ? toCalendarDateTime(date) : null;+ }+}diff --git a/apps/erp/app/modules/workflows/ui/Builder/fields/recordPickerEntities.ts b/apps/erp/app/modules/workflows/ui/Builder/fields/recordPickerEntities.tsnew file mode 100644index 0000000000..92977ef820--- /dev/null+++ b/apps/erp/app/modules/workflows/ui/Builder/fields/recordPickerEntities.ts@@ -0,0 +1,20 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++/** The entities `RECORD_PICKERS` has a selector for. Apart from the pickers so+ * pure field logic can ask without importing React components or Lingui. */+export const RECORD_PICKER_ENTITIES = [+ "customer",+ "supplier",+ "item",+ "location",+ "nonConformanceType",+ "user",+ "group"+] as const;++export type RecordPickerEntity = (typeof RECORD_PICKER_ENTITIES)[number];++export const hasRecordPicker = (entity: string): entity is RecordPickerEntity =>+ (RECORD_PICKER_ENTITIES as readonly string[]).includes(entity);diff --git a/apps/erp/app/modules/workflows/ui/Builder/fields/recordPickers.tsx b/apps/erp/app/modules/workflows/ui/Builder/fields/recordPickers.tsxindex a4ae113040..a3bbde6685 100644--- a/apps/erp/app/modules/workflows/ui/Builder/fields/recordPickers.tsx+++ b/apps/erp/app/modules/workflows/ui/Builder/fields/recordPickers.tsx@@ -11,6 +11,7 @@ import { useLocations } from "~/components/Form/Location";import { UserSelect } from "~/components/Selectors";import type { IndividualOrGroup } from "~/components/Selectors/UserSelect/types";import { useCustomers, useItems, useSuppliers } from "~/stores";+import type { RecordPickerEntity } from "./recordPickerEntities";// Plain Combobox, never CreatableCombobox: a workflow picks an existing record,// so a "Create <whatever you typed>" row would be an offer we cannot honor.@@ -170,11 +171,7 @@ const GroupPicker = ({ value, onChange, isDisabled }: RecordPickerProps) => (* nonConformance, jobOperation, salesInvoice, purchaseInvoice) fall back to a* plain text Input in LiteralControl — no store is available for those.*/-export const hasRecordPicker = (entity: string) => entity in RECORD_PICKERS;--export const RECORD_PICKERS: Partial<- Record<string, ComponentType<RecordPickerProps>>-> = {+const PICKERS: Record<RecordPickerEntity, ComponentType<RecordPickerProps>> = {customer: CustomerPicker,supplier: SupplierPicker,item: ItemPicker,@@ -183,3 +180,7 @@ export const RECORD_PICKERS: Partial<user: UserPicker,group: GroupPicker};++export const RECORD_PICKERS: Partial<+ Record<string, ComponentType<RecordPickerProps>>+> = PICKERS;diff --git a/apps/erp/app/modules/workflows/ui/Builder/fields/recordVariables.test.ts b/apps/erp/app/modules/workflows/ui/Builder/fields/recordVariables.test.tsnew file mode 100644index 0000000000..41fe0a1ab2--- /dev/null+++ b/apps/erp/app/modules/workflows/ui/Builder/fields/recordVariables.test.ts@@ -0,0 +1,95 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import type { AvailableVariable } from "@carbon/ee/workflows";+import { createFixtureCatalog, t } from "@carbon/ee/workflows";+import { describe, expect, it } from "vitest";+import { variableMenuItems, variableTree } from "./variableMenu";++/** What a Google Calendar step now hands downstream. */+const EVENT = {+ kind: "record" as const,+ fields: {+ summary: t.string,+ startDateTime: t.date,+ organizer: { kind: "record" as const, fields: { email: t.string } }+ }+};++const catalog = createFixtureCatalog();++const variable = (+ type: typeof EVENT | ReturnType<typeof t.list>+): AvailableVariable => ({+ nodeId: "gcal",+ nodeName: "gcal",+ nodeType: "integration",+ output: "items",+ type,+ guaranteed: true+});++function leaves(type: Parameters<typeof variable>[0]) {+ return variableMenuItems([variable(type)], catalog).map((item) => item.leaf);+}++describe("record variables in the picker", () => {+ it("offers every field of an object, not just the object", () => {+ const found = leaves(EVENT);+ expect(found).toContain("summary");+ expect(found).toContain("startDateTime");+ });++ // Reaching `organizer.email` is the whole point — one hop short of it is useless.+ it("descends into a nested object", () => {+ expect(leaves(EVENT)).toContain("email");+ });++ // A record's fields are the vendor's own words. Translating them would invent a+ // name for data we do not own, exactly as customer custom fields are untranslated.+ it("labels fields by their own name, with no catalog lookup", () => {+ const items = variableMenuItems([variable(EVENT)], catalog);+ const organizerEmail = items.find((item) => item.leaf === "email");+ expect(organizerEmail?.label).toContain("organizer");+ expect(organizerEmail?.label).toContain("email");+ });++ it("does not offer a field the record does not declare", () => {+ expect(leaves(EVENT)).not.toContain("location");+ });++ // Objects are not text, so a template must never be able to hold one — the field+ // inside it is what the author meant.+ it("hides objects from a text-only picker but keeps their text fields", () => {+ const items = variableMenuItems([variable(EVENT)], catalog, {+ textOnly: true+ });+ const found = items.map((item) => item.leaf);+ expect(found).toContain("summary");+ expect(found).not.toContain("organizer");+ });++ // The tree groups by node first, then by output, so an object's fields sit two+ // levels in — that nesting is what lets the menu reveal one level at a time.+ it("builds a tree whose object nodes can be opened", () => {+ const [node] = variableTree([variable(EVENT)], catalog);+ const output = node?.children?.find((child) => child.label === "items");+ expect(output?.children?.map((child) => child.label)).toEqual([+ "summary",+ "startDateTime",+ "organizer"+ ]);+ const organizer = output?.children?.find(+ (child) => child.label === "organizer"+ );+ expect(organizer?.children?.map((child) => child.label)).toEqual(["email"]);+ });++ // A list of objects is what an integration step actually returns; its ELEMENT+ // fields are reached by a data node, not by dotting through the list itself.+ it("offers a list of objects as one value", () => {+ const found = leaves(t.list(EVENT as never));+ expect(found).toContain("items");+ });+});diff --git a/apps/erp/app/modules/workflows/ui/Builder/fields/tokenId.test.ts b/apps/erp/app/modules/workflows/ui/Builder/fields/tokenId.test.tsindex 62904c520c..3bb0cd9495 100644--- a/apps/erp/app/modules/workflows/ui/Builder/fields/tokenId.test.ts+++ b/apps/erp/app/modules/workflows/ui/Builder/fields/tokenId.test.ts@@ -108,4 +108,12 @@ describe("leafOfLabel", () => {it("returns a single-segment label unchanged", () => {expect(leafOfLabel("record")).toBe("record");});++ it("round-trips an item ref's card scope", () => {+ const ref = { kind: "item" as const, path: ["v"], card: "c2" };+ expect(decodeTokenId(encodeTokenId(ref))).toEqual(ref);+ // ...and an unscoped one stays unscoped rather than gaining a key.+ const bare = { kind: "item" as const, path: [] };+ expect(decodeTokenId(encodeTokenId(bare))).toEqual(bare);+ });});diff --git a/apps/erp/app/modules/workflows/ui/Builder/fields/tokenId.ts b/apps/erp/app/modules/workflows/ui/Builder/fields/tokenId.tsindex 718dca2cbf..bf649b9d80 100644--- a/apps/erp/app/modules/workflows/ui/Builder/fields/tokenId.ts+++ b/apps/erp/app/modules/workflows/ui/Builder/fields/tokenId.ts@@ -15,7 +15,13 @@ export type RefPart = VariableRef | ItemRef;export function encodeTokenId(ref: RefPart): string {return JSON.stringify(ref.kind === "item"- ? { kind: "item", path: ref.path }+ ? // `card` scopes the item to one operation card of a data-node chain;+ // dropping it here would strip that scope on every edit of the value.+ {+ kind: "item",+ path: ref.path,+ ...(ref.card ? { card: ref.card } : {})+ }: {kind: "ref",nodeId: ref.nodeId,@@ -41,7 +47,11 @@ export function decodeTokenId(id: string): RefPart | undefined {}if (candidate.kind === "item") {- return { kind: "item", path: path as string[] };+ return {+ kind: "item",+ path: path as string[],+ ...(typeof candidate.card === "string" ? { card: candidate.card } : {})+ };}if (candidate.kind === "ref" &&diff --git a/apps/erp/app/modules/workflows/ui/Builder/fields/types.ts b/apps/erp/app/modules/workflows/ui/Builder/fields/types.tsindex 4120f2760d..b15472fcae 100644--- a/apps/erp/app/modules/workflows/ui/Builder/fields/types.ts+++ b/apps/erp/app/modules/workflows/ui/Builder/fields/types.ts@@ -9,6 +9,9 @@ export type FieldContext = {nodeId: string;/** True inside a filter node's clauses or a batch-mode action where `item` is offered. */inLoop: boolean;+ /** The operation card these values live in (data-node chains). Stamped onto every+ * item ref the picker inserts, so "the current item" types by ITS card. */+ itemCard?: string;/** The action runs once per item, so a list may fill a single-value input.* Deliberately not `inLoop`: filter clauses set that too, and there the* relaxation must not apply. */@@ -25,7 +28,17 @@ export type ValueFieldProps = {required?: boolean;/** Glossary term for the ⓘ hover next to the label. */helpTermId?: TermId;+ /** Free-text ⓘ hover — a vendor's own field description. `helpTermId` wins. */+ help?: string;+ /** Advisory one-liner under the control — a notice, muted, never blocking. */+ hint?: string;+ /** The catalog's default for this input, shown when nothing is stored yet —+ * a boolean control especially must display what the run will actually send. */+ defaultValue?: unknown;choices?: readonly string[];+ /** The input is a moment, not a calendar day: render a date AND time picker+ * and store a full ISO instant, resolved against the company's timezone. */+ precision?: "datetime";value: ValueOrRef | undefined;onChange: (next: ValueOrRef | undefined) => void;context: FieldContext;diff --git a/apps/erp/app/modules/workflows/ui/Builder/fields/useVariableMenuData.ts b/apps/erp/app/modules/workflows/ui/Builder/fields/useVariableMenuData.tsindex 61ed527c71..aeab9524a6 100644--- a/apps/erp/app/modules/workflows/ui/Builder/fields/useVariableMenuData.ts+++ b/apps/erp/app/modules/workflows/ui/Builder/fields/useVariableMenuData.ts@@ -33,6 +33,7 @@ export function useVariableMenuData(accepts,textOnly,inLoop: context.inLoop,+ itemCard: context.itemCard,batching: context.batching,labelFor: (key: string, fallback: string) =>labelRef.current(key, fallback)@@ -49,6 +50,7 @@ export function useVariableMenuData(accepts,textOnly,context.inLoop,+ context.itemCard,context.batching,catalog]);diff --git a/apps/erp/app/modules/workflows/ui/Builder/fields/useWorkflowOptions.ts b/apps/erp/app/modules/workflows/ui/Builder/fields/useWorkflowOptions.tsnew file mode 100644index 0000000000..3c49e00af4--- /dev/null+++ b/apps/erp/app/modules/workflows/ui/Builder/fields/useWorkflowOptions.ts@@ -0,0 +1,109 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import type { OptionsSource } from "@carbon/ee/workflows";+import { useCallback, useEffect, useMemo, useRef } from "react";+import { useFetcher } from "react-router";+import type { OptionsErrorCode } from "~/modules/workflows/types";+import { path } from "~/utils/path";++export type WorkflowOptions = {+ options: { label: string; value: string }[];+ emptyHref?: string;+ errorCode?: OptionsErrorCode;+ /** Where the author can go to fix what the error describes. */+ errorHref?: string;+ noticeCode?: OptionsErrorCode;+ noticeHref?: string;+};++/**+ * Fetches one input's choices from the options endpoint.+ *+ * Shared by the field that renders a fetched list and by the integration form's+ * "is this app connected?" check, so the two can never disagree about how a+ * provider is called — in particular about `dependsOn`, which a caller that built+ * its own query string would be free to forget.+ *+ * `ready` is false while any dependency is still blank; nothing is requested until+ * every one of them holds a value.+ */+export function useWorkflowOptions(+ source: OptionsSource | undefined,+ values: Record<string, string> = {},+ fetcherKey?: string+) {+ const fetcher = useFetcher<WorkflowOptions>(+ fetcherKey === undefined ? undefined : { key: fetcherKey }+ );++ const dependsOn = useMemo(() => source?.dependsOn ?? [], [source?.dependsOn]);+ const missing = dependsOn.filter((name) => !values[name]);+ const ready = source !== undefined && missing.length === 0;++ // `values` is a fresh object every render, so the serialized payload — stable by+ // value — is what identifies the request rather than the object's identity.+ const payload = JSON.stringify(+ Object.fromEntries(dependsOn.map((name) => [name, values[name] ?? ""]))+ );++ const query = useMemo(() => {+ if (source === undefined) return undefined;+ const params = new URLSearchParams({ provider: source.provider });+ if (source.params) params.set("params", JSON.stringify(source.params));+ if (dependsOn.length > 0) params.set("values", payload);+ return params.toString();+ }, [source, dependsOn, payload]);++ // Keyed on the QUERY, not on `fetcher.data` being undefined. The latter is only+ // true before the first response, so a field never refetched when a dependency+ // changed — and a first load that FAILED left `data` set to `{options: []}`,+ // pinning the field empty for the rest of the editing session with no way back.+ const loadedQuery = useRef<string | undefined>(undefined);++ // What the field SHOULD be showing, which is not always what is in flight: a+ // dependency that changes twice while a request is out would otherwise leave the+ // last query unissued, pinning the field on the previous dependency's choices.+ const wantedQuery = useRef<string | undefined>(undefined);++ useEffect(() => {+ if (!ready || query === undefined) return;+ wantedQuery.current = query;+ if (fetcher.state !== "idle") return;+ if (loadedQuery.current === query) return;+ loadedQuery.current = query;+ fetcher.load(`${path.to.api.workflowOptions}?${query}`);+ }, [fetcher, query, ready]);++ // The in-flight request has landed; issue the one the author has since asked for.+ useEffect(() => {+ if (fetcher.state !== "idle") return;+ const wanted = wantedQuery.current;+ if (wanted === undefined || loadedQuery.current === wanted) return;+ loadedQuery.current = wanted;+ fetcher.load(`${path.to.api.workflowOptions}?${wanted}`);+ }, [fetcher]);++ /** Re-request the same query after a failure. */+ const retry = useCallback(() => {+ if (!ready || query === undefined) return;+ loadedQuery.current = query;+ fetcher.load(`${path.to.api.workflowOptions}?${query}`);+ }, [fetcher, query, ready]);++ return {+ ready,+ missing,+ /** The request has come back, whatever it contained. */+ loaded: fetcher.data !== undefined,+ isLoading: fetcher.state === "loading",+ options: fetcher.data?.options ?? [],+ emptyHref: fetcher.data?.emptyHref,+ errorCode: fetcher.data?.errorCode,+ errorHref: fetcher.data?.errorHref,+ noticeCode: fetcher.data?.noticeCode,+ noticeHref: fetcher.data?.noticeHref,+ retry+ };+}diff --git a/apps/erp/app/modules/workflows/ui/Builder/fields/variableMenu.ts b/apps/erp/app/modules/workflows/ui/Builder/fields/variableMenu.tsindex 3c83c10983..6925f828da 100644--- a/apps/erp/app/modules/workflows/ui/Builder/fields/variableMenu.ts+++ b/apps/erp/app/modules/workflows/ui/Builder/fields/variableMenu.ts@@ -64,6 +64,8 @@ type Options = {* not offered; drilling into it still is, which is where its name lives. */textOnly?: boolean;inLoop?: boolean;+ /** The operation card an inserted item ref should be scoped to (data-node chains). */+ itemCard?: string;/** The action runs once per item, so a list may fill a single-value input. */batching?: boolean;/** Resolves a catalog label key to display text. Defaults to the fallback, which is what@@ -117,6 +119,7 @@ export function variableMenuItems(accepts,textOnly,inLoop,+ itemCard,batching,labelFor = (_key, fallback) => fallback}: Options = {}@@ -146,7 +149,22 @@ export function variableMenuItems(};const expand = (type: ValueType, path: string[], labels: string[]) => {- if (path.length >= MAX_PATH || type.kind !== "entity") return;+ if (path.length >= MAX_PATH) return;++ // An object carries its own fields, so it needs no catalog lookup — and its+ // field names are the vendor's own data, never translated, exactly as a+ // customer's custom field names are not.+ if (type.kind === "record") {+ for (const [field, fieldType] of Object.entries(type.fields)) {+ const nextPath = [...path, field];+ const nextLabels = [...labels, field];+ add(nextPath, nextLabels, fieldType);+ expand(fieldType, nextPath, nextLabels);+ }+ return;+ }++ if (type.kind !== "entity") return;const entity = catalog.getEntity(type.of);if (!entity) return;for (const [property, propertyType] of Object.entries(@@ -167,7 +185,11 @@ export function variableMenuItems(}if (inLoop) {- const ref = { kind: "item" as const, path: [] };+ const ref = {+ kind: "item" as const,+ path: [],+ ...(itemCard ? { card: itemCard } : {})+ };items.push({id: encodeTokenId(ref),label: refLabel(ref),@@ -188,6 +210,7 @@ export function variableTree(accepts,textOnly,inLoop,+ itemCard,batching,labelFor = (_key, fallback) => fallback}: Options = {}@@ -232,6 +255,24 @@ export function variableTree(: undefined};+ // An object's fields are on the type itself; there is nothing to look up, and+ // the field name IS the label — it is the vendor's word, not ours to translate.+ if (path.length < MAX_PATH && type.kind === "record") {+ const children = Object.entries(type.fields)+ .map(([field, fieldType]) =>+ build(+ variable,+ fieldType,+ [...path, field],+ [...pathLabels, field],+ field+ )+ )+ .filter((child): child is VariableTreeNode => child !== null);+ if (children.length) node.children = children;+ if (!node.item && !children.length) return null;+ }+if (path.length < MAX_PATH && type.kind === "entity") {const entity = catalog.getEntity(type.of);const children = entity@@ -294,7 +335,11 @@ export function variableTree();if (inLoop) {- const ref = { kind: "item" as const, path: [] };+ const ref = {+ kind: "item" as const,+ path: [],+ ...(itemCard ? { card: itemCard } : {})+ };roots.push({key: "item",label: "Current item",diff --git a/apps/erp/app/modules/workflows/ui/Builder/graph.ts b/apps/erp/app/modules/workflows/ui/Builder/graph.tsindex 99edb2e148..5d217a89d7 100644--- a/apps/erp/app/modules/workflows/ui/Builder/graph.ts+++ b/apps/erp/app/modules/workflows/ui/Builder/graph.ts@@ -146,13 +146,22 @@ export function canConnect(return !wouldCreateCycle(edges, source, target);}+/** What a new node of each kind is CALLED. Defaults to the type; `filter` differs+ * because its stored type is a legacy spelling of what the node now does. */+const NODE_NAME_SLUG: Partial<Record<WorkflowNodeType, string>> = {+ filter: "data"+};+export function createNode(type: WorkflowNodeType,position: { x: number; y: number },takenNames: Iterable<string> = []): WorkflowNode {const id = nanoid();- const name = nextNodeName(type, takenNames);+ // The default NAME is the display slug, not the stored type: a data node stored+ // as `filter` would otherwise be born called "Filter 0" and read as the old,+ // narrower node. The type is untouched — only what a new node is called.+ const name = nextNodeName(NODE_NAME_SLUG[type] ?? type, takenNames);switch (type) {case "trigger":@@ -204,7 +213,12 @@ export function createNode(type,position,expanded: true,- data: { combinator: "and", clauses: [] }+ data: {+ combinator: "and",+ clauses: [],+ operation: "filter",+ flatten: false+ }};case "action":return {@@ -215,6 +229,17 @@ export function createNode(expanded: true,data: { action: "", inputs: {} }};+ case "integration":+ return {+ id,+ name,+ type,+ position,+ expanded: true,+ // Blank until the author picks the app and then the step; `checkConfig`+ // asks for each in that order.+ data: { piece: "", action: "", inputs: {} }+ };}}diff --git a/apps/erp/app/modules/workflows/ui/Builder/hoverIntent.test.ts b/apps/erp/app/modules/workflows/ui/Builder/hoverIntent.test.tsnew file mode 100644index 0000000000..e0483a3816--- /dev/null+++ b/apps/erp/app/modules/workflows/ui/Builder/hoverIntent.test.ts@@ -0,0 +1,121 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { describe, expect, it } from "vitest";+import { createHoverIntent } from "./hoverIntent";++/** A hand-driven clock, so the timing is asserted rather than slept through. */+function harness() {+ let now = 0;+ let next = 1;+ const timers = new Map<number, { at: number; fn: () => void }>();+ const events: string[] = [];++ const intent = createHoverIntent({+ openDelayMs: 1000,+ closeDelayMs: 220,+ onOpen: () => events.push("open"),+ onClose: () => events.push("close"),+ setTimer: (fn, ms) => {+ const id = next++;+ timers.set(id, { at: now + ms, fn });+ return id;+ },+ clearTimer: (id) => timers.delete(id)+ });++ return {+ intent,+ events,+ advance(ms: number) {+ now += ms;+ for (const [id, timer] of [...timers]) {+ if (timer.at <= now) {+ timers.delete(id);+ timer.fn();+ }+ }+ }+ };+}++describe("output popover hover intent", () => {+ it("opens only after the hover delay", () => {+ const h = harness();+ h.intent.enter();+ h.advance(999);+ expect(h.events).toEqual([]);+ h.advance(1);+ expect(h.events).toEqual(["open"]);+ });++ it("does not open when the pointer passes straight through", () => {+ const h = harness();+ h.intent.enter();+ h.advance(300);+ h.intent.leave();+ h.advance(2000);+ expect(h.events).toEqual([]);+ });++ // The reported bug: the panel is offset from the handle, so the pointer crosses a+ // gap. Closing on mouse-leave dismissed it mid-journey and it could never be reached.+ it("survives the gap between the handle and the panel", () => {+ const h = harness();+ h.intent.enter();+ h.advance(1000);+ expect(h.events).toEqual(["open"]);++ h.intent.leave(); // left the handle, now over the gap+ h.advance(120); // still travelling — under the grace period+ h.intent.enter(); // arrived at the panel+ h.advance(5000); // and stays as long as the pointer is on it++ expect(h.events).toEqual(["open"]);+ expect(h.intent.isOpen()).toBe(true);+ });++ it("closes once the pointer really leaves", () => {+ const h = harness();+ h.intent.enter();+ h.advance(1000);+ h.intent.leave();+ h.advance(219);+ expect(h.events).toEqual(["open"]);+ h.advance(1);+ expect(h.events).toEqual(["open", "close"]);+ });++ // Crossing onto the panel must not re-time: re-running the open delay would+ // recompute a preview that is already on screen.+ it("does not reopen or re-time while already showing", () => {+ const h = harness();+ h.intent.enter();+ h.advance(1000);+ h.intent.leave();+ h.advance(100);+ h.intent.enter();+ h.advance(5000);+ expect(h.events).toEqual(["open"]);+ });++ it("dismisses immediately on a drag or click", () => {+ const h = harness();+ h.intent.enter();+ h.advance(1000);+ h.intent.dismiss();+ expect(h.events).toEqual(["open", "close"]);+ expect(h.intent.isOpen()).toBe(false);+ });++ it("a dismiss cancels a hover that had not opened yet", () => {+ const h = harness();+ h.intent.enter();+ h.advance(500);+ h.intent.dismiss();+ h.advance(5000);+ // One close from the dismiss, and the pending open never fires.+ expect(h.events).toEqual(["close"]);+ });+});diff --git a/apps/erp/app/modules/workflows/ui/Builder/hoverIntent.ts b/apps/erp/app/modules/workflows/ui/Builder/hoverIntent.tsnew file mode 100644index 0000000000..07a1a89a54--- /dev/null+++ b/apps/erp/app/modules/workflows/ui/Builder/hoverIntent.ts@@ -0,0 +1,71 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++/**+ * The open/close timing behind the output-handle popover.+ *+ * Extracted from the component so the one thing that is easy to get wrong — and+ * did go wrong — can be tested without a DOM: the panel sits offset from its+ * handle, so the pointer crosses a gap belonging to neither. Closing on the+ * handle's mouse-leave dismissed the panel before it could be reached.+ */+/** Whatever handle the clock hands back — `setTimeout`'s in the app, a counter in tests. */+export type HoverIntentOptions<TimerId = ReturnType<typeof setTimeout>> = {+ openDelayMs: number;+ closeDelayMs: number;+ onOpen: () => void;+ onClose: () => void;+ setTimer: (fn: () => void, ms: number) => TimerId;+ clearTimer: (id: TimerId) => void;+};++export function createHoverIntent<TimerId = ReturnType<typeof setTimeout>>(+ options: HoverIntentOptions<TimerId>+) {+ let openId: TimerId | null = null;+ let closeId: TimerId | null = null;+ let isOpen = false;++ const clearAll = () => {+ if (openId !== null) options.clearTimer(openId);+ if (closeId !== null) options.clearTimer(closeId);+ openId = null;+ closeId = null;+ };++ return {+ /** Pointer entered the handle OR the panel. */+ enter() {+ clearAll();+ // Already showing: crossing onto the panel holds it, and must not re-time.+ if (isOpen) return;+ openId = options.setTimer(() => {+ openId = null;+ isOpen = true;+ options.onOpen();+ }, options.openDelayMs);+ },+ /** Pointer left the handle or the panel — a grace period, not a dismissal. */+ leave() {+ if (openId !== null) options.clearTimer(openId);+ openId = null;+ // Nothing is showing: a pointer that merely passed over the handle should+ // leave no trace, not schedule a close for a panel that never opened.+ if (!isOpen) return;+ if (closeId !== null) options.clearTimer(closeId);+ closeId = options.setTimer(() => {+ closeId = null;+ isOpen = false;+ options.onClose();+ }, options.closeDelayMs);+ },+ /** Dismiss immediately — a click or a drag, where a lingering panel is in the way. */+ dismiss() {+ clearAll();+ isOpen = false;+ options.onClose();+ },+ isOpen: () => isOpen+ };+}diff --git a/apps/erp/app/modules/workflows/ui/Builder/labelKeys.ts b/apps/erp/app/modules/workflows/ui/Builder/labelKeys.tsindex 8f17d80008..4084df507d 100644--- a/apps/erp/app/modules/workflows/ui/Builder/labelKeys.ts+++ b/apps/erp/app/modules/workflows/ui/Builder/labelKeys.ts@@ -82,10 +82,15 @@ export function describeValueType(// "record", not "object" — an ERP user thinks in records.return `${entityLabel ?? type.of} record`;}+ // "object", never "record" — a Carbon record is an entity, and calling a+ // vendor's JSON one would collide with the word above.+ if (type.kind === "record") return "an object";if (type.kind === "list") {- return type.of.kind === "entity"- ? `a list of ${entityLabel ?? type.of.of} records`- : `a list of ${type.of.of}`;+ if (type.of.kind === "entity") {+ return `a list of ${entityLabel ?? type.of.of} records`;+ }+ if (type.of.kind === "record") return "a list of objects";+ return `a list of ${type.of.of}`;}// primitiveswitch (type.of) {@@ -106,9 +111,12 @@ export function describeValueType(* A name the user never changed carries no meaning, so callers fall back instead.* `entity` is the old spelling of `compute` and stays here forever: a node's name is an* identifier other nodes reference, so the rename left already-saved `entity_0` names- * alone. Drop it and every one of them starts rendering as "Entity 0". */+ * alone. Drop it and every one of them starts rendering as "Entity 0". `filter` is the+ * same story from the other side — it is still the stored TYPE of the data node, so+ * older nodes carry `filter_0` while new ones are named `data_0`. Both must read as+ * "never renamed". */const DEFAULT_NODE_NAME =- /^(trigger|action|condition|compute|entity|lookup|filter)_\d+$/;+ /^(trigger|action|integration|condition|compute|entity|lookup|filter|data)_\d+$/;export function isDefaultNodeName(name: string): boolean {return DEFAULT_NODE_NAME.test(name);diff --git a/apps/erp/app/modules/workflows/ui/Builder/nodes/WorkflowNodeCard.tsx b/apps/erp/app/modules/workflows/ui/Builder/nodes/WorkflowNodeCard.tsxindex 7ed9514a9f..a7b4b7cebe 100644--- a/apps/erp/app/modules/workflows/ui/Builder/nodes/WorkflowNodeCard.tsx+++ b/apps/erp/app/modules/workflows/ui/Builder/nodes/WorkflowNodeCard.tsx@@ -2,6 +2,8 @@// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,// including ports, remain AGPLv3; serving them over a network requires releasing their source.+import type { IntegrationID } from "@carbon/ee";+import { getIntegrationConfigById } from "@carbon/ee";import type { WorkflowNodeType } from "@carbon/ee/workflows";import { FAILURE_HANDLE } from "@carbon/ee/workflows";import {@@ -32,6 +34,7 @@ import {useBuilderStoreApi,useBuilderStoreShallow} from "../context";+import { useDataOperationLabel } from "../dataOperationLabels";import { asWorkflowNode, canConnect } from "../graph";import { NodeCard } from "../NodeCard";import { portsFor } from "../ports";@@ -52,8 +55,16 @@ import { NODE_KIND_META } from "./meta";function WorkflowNodeCardImpl({ id, type, data, selected }: NodeProps) {const { t } = useLingui();const eventLabel = useWorkflowEventLabel();+ const operationLabel = useDataOperationLabel();const node = asWorkflowNode(id, type as WorkflowNodeType, data);const meta = NODE_KIND_META[node.type];+ // Once an app is chosen, the node wears that app's own logo instead of the+ // generic plug. An integration's card id IS the piece name (by design — see+ // workflow-integrations.md), so the settings grid's logo is reused verbatim.+ const PieceLogo =+ node.type === "integration" && node.data.piece+ ? getIntegrationConfigById(node.data.piece as IntegrationID)?.logo+ : undefined;const store = useBuilderStoreApi();const builderNode = useBuilderStore(selectNode(id));@@ -118,7 +129,7 @@ function WorkflowNodeCardImpl({ id, type, data, selected }: NodeProps) {// shipped label and would otherwise render its raw id on the card.const label = catalogId ? eventLabel(catalogId, catalogId) : undefined;- const summary = label ?? meta.summary?.(node);+ const summary = label ?? meta.summary?.(node, { operation: operationLabel });const ports = portsFor(node, t);@@ -173,7 +184,7 @@ function WorkflowNodeCardImpl({ id, type, data, selected }: NodeProps) {<TooltipContent side="top">{hasIssues? t`Fix the problems with this workflow before testing it`- : t`Test run — results are not saved to the Runs page`}+ : t`Test runs are saved to the run history, marked as tests.`}</TooltipContent></Tooltip>) : null;@@ -220,7 +231,17 @@ function WorkflowNodeCardImpl({ id, type, data, selected }: NodeProps) {title={titleSlot}description={meta.description}summary={summary}- icon={<meta.Icon className="size-3.5" />}+ icon={+ PieceLogo ? (+ // Brand marks are drawn for white, not for the primary-colored chip+ // behind Carbon's own glyphs; the tile exactly overlays the chip.+ <span className="flex size-6 items-center justify-center rounded-md bg-white">+ <PieceLogo className="size-4" />+ </span>+ ) : (+ <meta.Icon className="size-3.5" />+ )+ }ports={ports}hasTarget={meta.hasTarget}issues={cardIssues.map((issue) => issue.message)}diff --git a/apps/erp/app/modules/workflows/ui/Builder/nodes/index.ts b/apps/erp/app/modules/workflows/ui/Builder/nodes/index.tsindex a40b2a4823..b1677ca2c2 100644--- a/apps/erp/app/modules/workflows/ui/Builder/nodes/index.ts+++ b/apps/erp/app/modules/workflows/ui/Builder/nodes/index.ts@@ -7,7 +7,7 @@ import type { NodeProps } from "@xyflow/react";import type { ComponentType } from "react";import { WorkflowNodeCard } from "./WorkflowNodeCard";-// Spelled out rather than generated, so adding a seventh node kind fails the+// Spelled out rather than generated, so adding an eighth node kind fails the// build here (and in NODE_KIND_META) instead of shipping invisibly.export const nodeTypes: Record<WorkflowNodeType, ComponentType<NodeProps>> = {trigger: WorkflowNodeCard,@@ -15,5 +15,6 @@ export const nodeTypes: Record<WorkflowNodeType, ComponentType<NodeProps>> = {compute: WorkflowNodeCard,lookup: WorkflowNodeCard,filter: WorkflowNodeCard,- action: WorkflowNodeCard+ action: WorkflowNodeCard,+ integration: WorkflowNodeCard};diff --git a/apps/erp/app/modules/workflows/ui/Builder/nodes/kinds.ts b/apps/erp/app/modules/workflows/ui/Builder/nodes/kinds.tsindex 37e520ae72..d8f9d55726 100644--- a/apps/erp/app/modules/workflows/ui/Builder/nodes/kinds.ts+++ b/apps/erp/app/modules/workflows/ui/Builder/nodes/kinds.ts@@ -13,6 +13,7 @@ export const NODE_CARD_WIDTH: Record<WorkflowNodeType, number> = {trigger: 360,condition: 612,action: 420,+ integration: 420,compute: 420,lookup: 500,filter: 500@@ -27,6 +28,7 @@ export const NODE_CARD_HEIGHT: Record<WorkflowNodeType, number> = {trigger: 180,condition: 320,action: 260,+ integration: 300,compute: 260,lookup: 280,filter: 280@@ -42,6 +44,7 @@ export const NODE_ACCEPTS_INCOMING: Record<WorkflowNodeType, boolean> = {trigger: false,condition: true,action: true,+ integration: true,compute: true,lookup: true,filter: truediff --git a/apps/erp/app/modules/workflows/ui/Builder/nodes/meta.ts b/apps/erp/app/modules/workflows/ui/Builder/nodes/meta.tsindex e76322f4f5..2b79eafaed 100644--- a/apps/erp/app/modules/workflows/ui/Builder/nodes/meta.ts+++ b/apps/erp/app/modules/workflows/ui/Builder/nodes/meta.ts@@ -2,7 +2,12 @@// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,// including ports, remain AGPLv3; serving them over a network requires releasing their source.-import type { WorkflowNode, WorkflowNodeType } from "@carbon/ee/workflows";+import type {+ DataOperation,+ WorkflowNode,+ WorkflowNodeType+} from "@carbon/ee/workflows";+import { cardsOf, integrationStepId } from "@carbon/ee/workflows";import { WORKFLOW_LABELS } from "@carbon/ee/workflows/labels";import { OPERATOR_LABELS } from "@carbon/utils";import type { IconType } from "react-icons";@@ -10,6 +15,7 @@ import {LuCalculator,LuFilter,LuPlay,+ LuPlug,LuSearch,LuSplit,LuZap@@ -17,6 +23,12 @@ import {import { camelCaseToWords } from "~/utils/string";import { NODE_ACCEPTS_INCOMING } from "./kinds";+/** Translated wording a summary needs. This module cannot call hooks, so the card+ * passes in what it resolved — the same words the node's form shows. */+export type SummaryLabels = {+ operation: (operation: DataOperation) => string;+};+/** The one place per-kind presentation lives. Palette and node card both read this. */export type NodeKindMeta = {name: string;@@ -26,7 +38,7 @@ export type NodeKindMeta = {hasTarget: boolean;catalogId?: (node: WorkflowNode) => string | undefined;title?: (node: WorkflowNode) => string | undefined;- summary?: (node: WorkflowNode) => string | undefined;+ summary?: (node: WorkflowNode, labels: SummaryLabels) => string | undefined;};const count = (n: number, one: string, many: string) =>@@ -105,6 +117,23 @@ export const NODE_KIND_META: Record<WorkflowNodeType, NodeKindMeta> = {return labelText(node.data.action) ?? node.data.action;}},+ integration: {+ name: "Integration",+ Icon: LuPlug,+ description: "Runs a step in a connected app",+ defaultTitle: "Use an integration",+ hasTarget: NODE_ACCEPTS_INCOMING.integration,+ catalogId: (node) =>+ node.type === "integration" && node.data.piece && node.data.action+ ? integrationStepId(node.data.piece, node.data.action)+ : undefined,+ summary: (node) => {+ if (node.type !== "integration" || !node.data.piece) return undefined;+ if (!node.data.action) return undefined;+ const id = integrationStepId(node.data.piece, node.data.action);+ return labelText(id) ?? id;+ }+ },compute: {name: "Compute",Icon: LuCalculator,@@ -138,15 +167,30 @@ export const NODE_KIND_META: Record<WorkflowNodeType, NodeKindMeta> = {: `Find ${entity}`;}},+ // Stored type stays `filter` — every saved workflow holds that literal. Only the+ // name a person reads widened, along with what the node can do.filter: {- name: "Filter",+ name: "Data",Icon: LuFilter,- description: "Keeps only the items that match",- defaultTitle: "Narrow a list",+ description: "Works through a list — filter, count, pick or combine",+ defaultTitle: "Work through a list",hasTarget: NODE_ACCEPTS_INCOMING.filter,- summary: (node) => {+ summary: (node, labels) => {if (node.type !== "filter") return undefined;- const n = node.data.clauses?.length ?? 0;+ // The same normalizer the form, validator and runtime read, so the card+ // cannot describe a different chain than the one that runs.+ const cards = cardsOf(node);+ if (cards.length > 1) {+ return cards+ .map((card) => labels.operation(card.operation))+ .join(" → ");+ }+ const [card] = cards;+ if (card === undefined) return undefined;+ if (card.operation !== "filter") {+ return labels.operation(card.operation);+ }+ const n = card.clauses.length;return n > 0? `Keep items matching ${count(n, "rule", "rules")}`: undefined;@@ -159,6 +203,7 @@ export const NODE_KIND_ORDER: WorkflowNodeType[] = ["trigger","condition","action",+ "integration","compute","lookup","filter"diff --git a/apps/erp/app/modules/workflows/ui/Builder/noticeCopy.ts b/apps/erp/app/modules/workflows/ui/Builder/noticeCopy.tsnew file mode 100644index 0000000000..75c19ac0d1--- /dev/null+++ b/apps/erp/app/modules/workflows/ui/Builder/noticeCopy.ts@@ -0,0 +1,20 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import type { WorkflowNotice } from "@carbon/ee/workflows";+import { useLingui } from "@lingui/react/macro";++/** The prose for a `WorkflowNotice` — the package emits codes and params only, so+ * the copy lives here, Lingui-translated like every other builder string. */+export function useNoticeCopy() {+ const { t } = useLingui();+ return (+ notice: WorkflowNotice,+ appLabel: string,+ siblingLabel: string+ ): string =>+ notice.code === "LINKS_CONDITIONAL" && notice.params !== undefined+ ? t`Records will be plain text. Set ${siblingLabel} to ${notice.params.equals} (under Advanced) to turn them into links.`+ : t`Records here appear as plain text — ${appLabel} doesn't support links in this field.`;+}diff --git a/apps/erp/app/modules/workflows/ui/Builder/outputPreview.test.ts b/apps/erp/app/modules/workflows/ui/Builder/outputPreview.test.tsnew file mode 100644index 0000000000..b563c159c7--- /dev/null+++ b/apps/erp/app/modules/workflows/ui/Builder/outputPreview.test.ts@@ -0,0 +1,106 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import type { ValueType } from "@carbon/ee/workflows";+import { t, WORKFLOW_INTEGRATION_CATALOG } from "@carbon/ee/workflows";+import { describe, expect, it } from "vitest";+import { fieldsOf, groupOutputs, weightOf } from "./outputPreview";++const EVENT: ValueType = {+ kind: "record",+ fields: { summary: t.string, id: t.string, organizer: t.string }+};++describe("what the output-handle popover shows", () => {+ // "a list of objects" on its own is a dead end: the fields are the whole reason+ // an author opens this popover.+ it("names the fields inside an object and inside a list of objects", () => {+ expect(fieldsOf(EVENT)).toEqual(["summary", "id", "organizer"]);+ expect(fieldsOf(t.list(EVENT as never))).toEqual([+ "summary",+ "id",+ "organizer"+ ]);+ });++ it("has nothing to add for a plain value", () => {+ expect(fieldsOf(t.string)).toEqual([]);+ expect(fieldsOf(t.list(t.string as never))).toEqual([]);+ expect(fieldsOf(t.entity("part"))).toEqual([]);+ });++ // The row cap plus an alphabetical tiebreak would otherwise drop the payload and+ // keep the envelope.+ it("ranks the fetched payload above envelope detail", () => {+ expect(weightOf(t.list(EVENT as never))).toBeLessThan(weightOf(t.string));+ expect(weightOf(EVENT)).toBeLessThan(weightOf(t.string));+ expect(weightOf(t.list(t.string as never))).toBeLessThan(+ weightOf(t.string)+ );+ });++ it("puts a real integration step's items first, not its access role", () => {+ const step =+ WORKFLOW_INTEGRATION_CATALOG[+ "integration.google-calendar.google_calendar_get_events"+ ];+ const outputs = step?.outputs ?? {};+ const ranked = Object.keys(outputs)+ .sort()+ .sort(+ (a, b) => weightOf(outputs[a] as never) - weightOf(outputs[b] as never)+ );+ expect(ranked[0]).toBe("items");+ });++ // The bug this helper exists for: ranking the FLAT list and merging only+ // adjacent rows split one node into two sections with another node between them,+ // so the same heading appeared twice.+ it("gives each node exactly one section", () => {+ const groups = groupOutputs([+ { nodeName: "integration_0", output: "accessRole", type: t.string },+ {+ nodeName: "integration_0",+ output: "items",+ type: t.list(EVENT as never)+ },+ { nodeName: "integration_0", output: "status", type: t.string },+ { nodeName: "trigger_0", output: "record", type: t.entity("part") }+ ]);+ expect(groups.map((g) => g.nodeName)).toEqual([+ "integration_0",+ "trigger_0"+ ]);+ expect(new Set(groups.map((g) => g.nodeName)).size).toBe(groups.length);+ });++ it("keeps the picker's node order, ranking only within a node", () => {+ const groups = groupOutputs([+ { nodeName: "a", output: "text", type: t.string },+ { nodeName: "b", output: "text", type: t.string },+ { nodeName: "a", output: "items", type: t.list(EVENT as never) }+ ]);+ // `a` came first upstream and stays first, even though `b` has no payload.+ expect(groups.map((g) => g.nodeName)).toEqual(["a", "b"]);+ // Inside `a`, the fetched payload outranks the plain field.+ expect(groups[0]?.rows.map((r) => r.output)).toEqual(["items", "text"]);+ });++ it("loses nothing while regrouping", () => {+ const rows = [+ { nodeName: "a", output: "one", type: t.string },+ { nodeName: "b", output: "two", type: t.string },+ { nodeName: "a", output: "three", type: t.number }+ ];+ const total = groupOutputs(rows).reduce((n, g) => n + g.rows.length, 0);+ expect(total).toBe(rows.length);+ });++ // Everything must still be reachable — ranking reorders, it never drops.+ it("keeps every output", () => {+ const types = [t.string, t.list(EVENT as never), t.number, EVENT];+ const ranked = [...types].sort((a, b) => weightOf(a) - weightOf(b));+ expect(ranked).toHaveLength(types.length);+ });+});diff --git a/apps/erp/app/modules/workflows/ui/Builder/outputPreview.ts b/apps/erp/app/modules/workflows/ui/Builder/outputPreview.tsnew file mode 100644index 0000000000..145bde1ac9--- /dev/null+++ b/apps/erp/app/modules/workflows/ui/Builder/outputPreview.ts@@ -0,0 +1,69 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import type { ValueType } from "@carbon/ee/workflows";++/** What the output-handle popover says about one output, beyond its type name.+ *+ * Kept apart from `OutputHandle.tsx` so it can be tested without the Lingui macro+ * transform — importing the component pulls in the glossary, whose `msg` calls+ * only exist after a Vite build. */++/** How many of an object's fields to name before trailing off. */+export const MAX_FIELDS = 4;++/**+ * The fields inside an output, when it holds an object.+ *+ * `describeVariable` can only say "a list of objects" — true, and useless: the+ * author is looking at this popover precisely to learn what is IN the object, and+ * a record carries its fields on the type itself.+ */+export function fieldsOf(type: ValueType): string[] {+ const shape =+ type.kind === "record"+ ? type+ : type.kind === "list" && type.of.kind === "record"+ ? type.of+ : undefined;+ return shape === undefined ? [] : Object.keys(shape.fields);+}++/**+ * What a person is most likely to want, lowest first.+ *+ * A structured value is what the step went and fetched; a plain field is usually+ * envelope detail. `availableVariables` breaks ties alphabetically — a fine default+ * across nodes, but on an integration step it buries `items` under `accessRole`,+ * and the row cap would then drop the payload rather than the noise.+ */+export function weightOf(type: ValueType): number {+ if (type.kind === "list") return type.of.kind === "record" ? 0 : 1;+ if (type.kind === "record") return 2;+ if (type.kind === "entity") return 3;+ return 4;+}++/**+ * The popover's sections: one per upstream node, in the order the picker gave+ * them, with each node's own values ranked inside it.+ *+ * Grouping must happen BEFORE ranking. Ranking the flat list and then merging only+ * ADJACENT rows split a single node into two sections with another node's values+ * wedged between — the same node heading appeared twice.+ */+export function groupOutputs<T extends { nodeName: string; type: ValueType }>(+ variables: readonly T[]+): { nodeName: string; rows: T[] }[] {+ const groups: { nodeName: string; rows: T[] }[] = [];+ for (const variable of variables) {+ const existing = groups.find((g) => g.nodeName === variable.nodeName);+ if (existing) existing.rows.push(variable);+ else groups.push({ nodeName: variable.nodeName, rows: [variable] });+ }+ for (const group of groups) {+ group.rows.sort((a, b) => weightOf(a.type) - weightOf(b.type));+ }+ return groups;+}diff --git a/apps/erp/app/modules/workflows/ui/Builder/store.ts b/apps/erp/app/modules/workflows/ui/Builder/store.tsindex bb59d085d8..5376960d5f 100644--- a/apps/erp/app/modules/workflows/ui/Builder/store.ts+++ b/apps/erp/app/modules/workflows/ui/Builder/store.ts@@ -5,7 +5,8 @@import type {BatchPlan,WorkflowIssue,- WorkflowNodeType+ WorkflowNodeType,+ WorkflowNotice} from "@carbon/ee/workflows";import {getNodeHandles,@@ -51,6 +52,9 @@ export type BuilderState = {/** Broken variables, recomputed as the graph is edited. Kept apart from `issues`* so a publish attempt and a live edit never overwrite each other's findings. */liveIssues: WorkflowIssue[];+ /** Advisory notes recomputed alongside `liveIssues` — a record in a field that+ * will not render it as a link. Never blocking, so never in `issues`. */+ notices: WorkflowNotice[];/** Which action steps repeat and over what, by node id — derived from the wiring* alongside `liveIssues`, and absent for a step that runs once. */batchPlans: Record<string, BatchPlan>;@@ -80,6 +84,7 @@ export type BuilderState = {setSelected: (id: string | null) => void;setIssues: (issues: WorkflowIssue[]) => void;setLiveIssues: (issues: WorkflowIssue[]) => void;+ setNotices: (notices: WorkflowNotice[]) => void;setBatchPlans: (plans: Record<string, BatchPlan>) => void;setSaveState: (state: SaveState) => void;openTestRun: (nodeId: string) => void;@@ -135,6 +140,7 @@ export function createBuilderStore(initial: {selectedNodeId: null,issues: [],liveIssues: [],+ notices: [],batchPlans: {},saveState: "idle",isVersionLocked: initial.isVersionLocked,@@ -263,6 +269,13 @@ export function createBuilderStore(initial: {if (current.length === 0 && liveIssues.length === 0) return;set({ liveIssues });},+ setNotices: (notices) => {+ // Same identity rule as `liveIssues`: most graphs have no notice, and a fresh+ // empty array on every debounce would re-render every subscriber for nothing.+ const current = get().notices;+ if (current.length === 0 && notices.length === 0) return;+ set({ notices });+ },setBatchPlans: (plans) => {// Same identity rule as `liveIssues`: most graphs have no repeating step, and a// fresh empty object every 250 ms would re-render every card that reads one.diff --git a/apps/erp/app/modules/workflows/ui/Runs/ConditionDetail.tsx b/apps/erp/app/modules/workflows/ui/Runs/ConditionDetail.tsxindex 686a16bfc6..7eecda4622 100644--- a/apps/erp/app/modules/workflows/ui/Runs/ConditionDetail.tsx+++ b/apps/erp/app/modules/workflows/ui/Runs/ConditionDetail.tsx@@ -89,7 +89,7 @@ export function ConditionDetail({const d = detail as Record<string, unknown>;if (d.kind !== "condition") return null;- const paths = d.paths as NodeDetail["paths"];+ const paths = d.paths as Extract<NodeDetail, { kind: "condition" }>["paths"];if (!Array.isArray(paths) || paths.length === 0) return null;return (diff --git a/apps/erp/app/modules/workflows/ui/Runs/DataDetail.tsx b/apps/erp/app/modules/workflows/ui/Runs/DataDetail.tsxnew file mode 100644index 0000000000..41d1d3c21c--- /dev/null+++ b/apps/erp/app/modules/workflows/ui/Runs/DataDetail.tsx@@ -0,0 +1,127 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import type { CardRefusal, NodeDetail } from "@carbon/ee/workflows";+import { Plural, Trans } from "@lingui/react/macro";+import { useDataOperationLabel } from "../Builder/dataOperationLabels";++type DataCards = Extract<NodeDetail, { kind: "data" }>["cards"];+type DataCard = DataCards[number];++function RefusalReason({ refusal }: { refusal: CardRefusal }) {+ switch (refusal) {+ case "not-a-list":+ return <Trans>This step expected a list.</Trans>;+ case "no-fields":+ return <Trans>The items in that list have no fields to take.</Trans>;+ case "no-field-chosen":+ return <Trans>No field was chosen to take.</Trans>;+ case "unknown-field":+ return <Trans>The items in that list have no field by that name.</Trans>;+ case "nested-list":+ return (+ <Trans>+ That field holds a list of its own. Turn on flattening to take it.+ </Trans>+ );+ case "not-text":+ return <Trans>The items in that list have no reading as text.</Trans>;+ }+}++/** The card's outcome in the reader's language, from the numbers or the refusal+ * code the engine stored. Only a row with neither shows the engine's own text. */+function CardSummary({ card }: { card: DataCard }) {+ if (card.status === "Skipped" && card.refusal !== undefined) {+ return <RefusalReason refusal={card.refusal} />;+ }+ const counts = card.counts;+ if (card.status !== "Succeeded" || counts === undefined) {+ return <>{card.summary}</>;+ }+ const total = counts.input;+ const kept = counts.output ?? 0;+ const unresolved = counts.unresolved ?? 0;+ switch (card.operation) {+ case "filter":+ return unresolved === 0 ? (+ <Trans>+ Kept {kept} of {total}.+ </Trans>+ ) : (+ <Trans>+ Kept {kept} of {total}; {unresolved} could not be checked.+ </Trans>+ );+ case "count":+ return <Trans>Counted {total}.</Trans>;+ case "first":+ return total === 0 ? (+ <Trans>That list was empty.</Trans>+ ) : (+ <Trans>Took the first of {total}.</Trans>+ );+ case "last":+ return total === 0 ? (+ <Trans>That list was empty.</Trans>+ ) : (+ <Trans>Took the last of {total}.</Trans>+ );+ case "pluck": {+ const dropped = counts.dropped ?? 0;+ const took = kept + dropped;+ return dropped === 0 ? (+ <Plural value={kept} one="Took # value." other="Took # values." />+ ) : (+ <Trans>+ Took {took} values; kept the first {kept}.+ </Trans>+ );+ }+ case "join":+ return (+ <Plural value={total} one="Joined # value." other="Joined # values." />+ );+ }+}++/**+ * A data node's chain, one row per operation card, in run order — how a+ * surprising final result stays debuggable ("Kept 0 of 10" three rows up).+ *+ * Takes `unknown` and answers only for its own detail kind, exactly as+ * `ConditionDetail` does, so the step row can offer the detail to both without+ * caring which node produced it.+ */+export function DataDetail({ detail }: { detail: unknown }) {+ const operationLabel = useDataOperationLabel();++ if (!detail || typeof detail !== "object") return null;+ const d = detail as Record<string, unknown>;+ if (d.kind !== "data") return null;++ const cards = d.cards as DataCards;+ if (!Array.isArray(cards) || cards.length === 0) return null;++ return (+ <ol className="space-y-1.5">+ {cards.map((card, index) => (+ <li key={card.id} className="flex items-baseline gap-2 text-sm">+ <span className="text-xs text-muted-foreground tabular-nums">+ {index + 1}.+ </span>+ <span className="font-medium">{operationLabel(card.operation)}</span>+ <span className="min-w-0 shrink text-muted-foreground">+ <CardSummary card={card} />+ </span>+ {card.status === "Skipped" && (+ <span className="ml-auto self-center rounded bg-muted px-1.5 py-0.5 text-xs text-muted-foreground">+ <Trans>Skipped</Trans>+ </span>+ )}+ </li>+ ))}+ </ol>+ );+}diff --git a/apps/erp/app/modules/workflows/ui/Runs/RuntimeValueView.tsx b/apps/erp/app/modules/workflows/ui/Runs/RuntimeValueView.tsxindex 6f43a04a50..c8bca388f0 100644--- a/apps/erp/app/modules/workflows/ui/Runs/RuntimeValueView.tsx+++ b/apps/erp/app/modules/workflows/ui/Runs/RuntimeValueView.tsx@@ -31,6 +31,7 @@ type RuntimeValue =| { kind: "primitive"; of: string; value: string | number | boolean | null }| { kind: "entity"; of: string; id: string; row?: Record<string, unknown> }| { kind: "list"; of: unknown; items: unknown[] }+ | { kind: "record"; of: unknown; fields: Record<string, unknown> }| { kind: "pairs"; entries: unknown[] };function isRuntimeValue(v: unknown): v is RuntimeValue {@@ -40,6 +41,7 @@ function isRuntimeValue(v: unknown): v is RuntimeValue {obj.kind === "primitive" ||obj.kind === "entity" ||obj.kind === "list" ||+ obj.kind === "record" ||obj.kind === "pairs");}@@ -200,6 +202,37 @@ export function RuntimeValueView({);}+ // An object reads exactly like named rows: field name on the left, the value+ // rendered by this same component on the right.+ if (value.kind === "record") {+ const fields = Object.entries(value.fields ?? {});+ if (fields.length === 0) {+ return (+ <span className="text-muted-foreground italic text-xs">+ <Trans>Nothing</Trans>+ </span>+ );+ }+ return (+ <dl className="grid grid-cols-[minmax(0,7rem)_minmax(0,1fr)] gap-x-3 gap-y-1.5 items-baseline">+ {fields.map(([name, field]) => (+ <Fragment key={`field-${name}`}>+ <dt className="text-xs text-muted-foreground text-left break-words">+ {name}+ </dt>+ <dd className="min-w-0">+ <RuntimeValueView+ value={field}+ depth={depth + 1}+ recordNames={recordNames}+ />+ </dd>+ </Fragment>+ ))}+ </dl>+ );+ }+if (value.kind === "pairs") {if (!value.entries || value.entries.length === 0) {return (diff --git a/apps/erp/app/modules/workflows/ui/Runs/WorkflowRunDetail.tsx b/apps/erp/app/modules/workflows/ui/Runs/WorkflowRunDetail.tsxindex 2a3807a4ec..4da2e0b0c2 100644--- a/apps/erp/app/modules/workflows/ui/Runs/WorkflowRunDetail.tsx+++ b/apps/erp/app/modules/workflows/ui/Runs/WorkflowRunDetail.tsx@@ -15,11 +15,12 @@ import type {WorkflowRunDetail as WorkflowRunDetailType,WorkflowRunStep} from "../../workflows.service";-import { useWorkflowEventLabel, useWorkflowLabel } from "../Builder/catalog";+import { useWorkflowEventLabel } from "../Builder/catalog";import { EntityRecordLink } from "./EntityRecordLink";import { RunLiveUpdates } from "./RunLiveUpdates";import { RunStatus, TestRunBadge } from "./RunStatus";import { runOutcome } from "./runOutcome";+import { useNodeLabel } from "./useNodeLabel";import { WorkflowRunSteps } from "./WorkflowRunSteps";type WorkflowRunDetailProps = {@@ -100,7 +101,7 @@ export function WorkflowRunDetail({const workflowName =(run.workflow as { name?: string } | null)?.name ?? run.workflowId;- const label = useWorkflowLabel();+ const nodeLabel = useNodeLabel();const triggerLabel = useWorkflowEventLabel();const eventLabel = run.eventId? triggerLabel(run.eventId, run.eventId)@@ -109,7 +110,12 @@ export function WorkflowRunDetail({const isInFlight = run.status === "Queued" || run.status === "Running";const compacted = run.compactedAt !== null;const stepsPurged = steps.length === 0 && run.compactedAt !== null;- const outcome = runOutcome(run, steps, definition, label);+ const outcome = runOutcome(+ run,+ steps,+ definition,+ (node) => nodeLabel(node).title+ );return (<div className="flex flex-col h-full overflow-auto">diff --git a/apps/erp/app/modules/workflows/ui/Runs/WorkflowRunSteps.tsx b/apps/erp/app/modules/workflows/ui/Runs/WorkflowRunSteps.tsxindex 4f9250707c..f092b5cddc 100644--- a/apps/erp/app/modules/workflows/ui/Runs/WorkflowRunSteps.tsx+++ b/apps/erp/app/modules/workflows/ui/Runs/WorkflowRunSteps.tsx@@ -21,6 +21,7 @@ import {NODE_KIND_META} from "../Builder/nodes/meta";import { ConditionDetail } from "./ConditionDetail";+import { DataDetail } from "./DataDetail";import { StepStatus } from "./RunStatus";import { ValueMap } from "./RuntimeValueView";import { useNodeLabel } from "./useNodeLabel";@@ -277,10 +278,12 @@ function StepRow({)}{step.detail !== null && (<ExpandedSection label={t`Why`}>+ {/* Each answers only for its own detail kind. */}<ConditionDetaildetail={step.detail}node={node?.type === "condition" ? node : undefined}/>+ <DataDetail detail={step.detail} /></ExpandedSection>)}</>diff --git a/apps/erp/app/modules/workflows/ui/Runs/runOutcome.ts b/apps/erp/app/modules/workflows/ui/Runs/runOutcome.tsindex 9f8f7be64e..8e17572f2a 100644--- a/apps/erp/app/modules/workflows/ui/Runs/runOutcome.ts+++ b/apps/erp/app/modules/workflows/ui/Runs/runOutcome.ts@@ -2,9 +2,9 @@// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,// including ports, remain AGPLv3; serving them over a network requires releasing their source.-import type { WorkflowDefinition } from "@carbon/ee/workflows";+import type { WorkflowDefinition, WorkflowNode } from "@carbon/ee/workflows";+import { DATA_OPERATIONS } from "@carbon/ee/workflows";import type { WorkflowRunDetail } from "../../workflows.service";-import type { LabelFor } from "../Builder/labelKeys";import { nodeTitle } from "../Builder/labelKeys";import { metaForNodeType, NODE_KIND_META } from "../Builder/nodes/meta";import type { RunStepView } from "./WorkflowRunSteps";@@ -14,28 +14,33 @@ export type RunOutcome = {text: string;};-/** This module is pure, so callers with hook access pass a translator in. */-const UNTRANSLATED: LabelFor = (_key, fallback) => fallback;+/** How a step is named. The UI passes `useNodeLabel`'s title, so the outcome+ * sentence and the step list never name one step two ways; this module is pure,+ * so the default (tests, no hooks) is the untranslated English name. */+export type NameNode = (node: WorkflowNode) => string;++const untranslatedName: NameNode = (node) => {+ const meta = NODE_KIND_META[node.type];+ const describes =+ meta.catalogId?.(node) ??+ meta.title?.(node) ??+ meta.summary?.(node, {+ operation: (operation) => DATA_OPERATIONS[operation].label+ }) ??+ meta.defaultTitle;+ return nodeTitle(node.name, describes);+};-/** The title a step should be described by in the outcome sentence. Same rule as- * the step rows use, so the sentence and the list never name a step differently. */function stepTitle(step: RunStepView,definition: WorkflowDefinition | null,- labelFor: LabelFor+ nameNode: NameNode): string {const node = definition?.nodes.find((n) => n.id === step.nodeId);if (!node) {return metaForNodeType(step.nodeType)?.defaultTitle ?? step.nodeType;}- const meta = NODE_KIND_META[node.type];- const catalogId = meta.catalogId?.(node);- const describes =- (catalogId === undefined ? undefined : labelFor(catalogId, catalogId)) ??- meta.title?.(node) ??- meta.summary?.(node) ??- meta.defaultTitle;- return nodeTitle(node.name, describes);+ return nameNode(node);}/**@@ -47,14 +52,14 @@ export function runOutcome(run: Pick<WorkflowRunDetail, "status" | "error" | "statusReason">,steps: RunStepView[],definition: WorkflowDefinition | null,- labelFor: LabelFor = UNTRANSLATED+ nameNode: NameNode = untranslatedName): RunOutcome {const nodeSteps = steps.filter((s) => !s.itemKey || s.itemKey === "");if (run.status === "Failed") {const failed = nodeSteps.find((s) => s.status === "Failed");const where = failed- ? ` at "${stepTitle(failed, definition, labelFor)}"`+ ? ` at "${stepTitle(failed, definition, nameNode)}"`: "";const why = run.error ? `: ${run.error}` : ".";return { tone: "danger", text: `Failed${where}${why}` };@@ -88,7 +93,7 @@ export function runOutcome(const noMatch = nodeSteps.find((s) => s.branchTaken === "none");if (noMatch) {- const title = stepTitle(noMatch, definition, labelFor);+ const title = stepTitle(noMatch, definition, nameNode);if (definition) {const notRun = definition.nodes.length - nodeSteps.length;if (notRun > 0) {@@ -106,7 +111,7 @@ export function runOutcome(const skipped = nodeSteps.find((s) => s.status === "Skipped");if (skipped) {- const title = stepTitle(skipped, definition, labelFor);+ const title = stepTitle(skipped, definition, nameNode);const why = skipped.statusReason ? `: ${skipped.statusReason}` : ".";return {tone: "warning",diff --git a/apps/erp/app/modules/workflows/ui/Runs/useNodeLabel.ts b/apps/erp/app/modules/workflows/ui/Runs/useNodeLabel.tsindex fd4efe71a4..5522c6ffc9 100644--- a/apps/erp/app/modules/workflows/ui/Runs/useNodeLabel.ts+++ b/apps/erp/app/modules/workflows/ui/Runs/useNodeLabel.ts@@ -4,6 +4,7 @@import type { WorkflowNode } from "@carbon/ee/workflows";import { useWorkflowLabel } from "../Builder/catalog";+import { useDataOperationLabel } from "../Builder/dataOperationLabels";import { nodeTitle } from "../Builder/labelKeys";import { NODE_KIND_META } from "../Builder/nodes/meta";@@ -20,6 +21,7 @@ export type NodeLabel = {* and any future surface cannot disagree. */export function useNodeLabel(): (node: WorkflowNode) => NodeLabel {const label = useWorkflowLabel();+ const operationLabel = useDataOperationLabel();return (node: WorkflowNode) => {const meta = NODE_KIND_META[node.type];@@ -27,7 +29,7 @@ export function useNodeLabel(): (node: WorkflowNode) => NodeLabel {const describes =(catalogId === undefined ? undefined : label(catalogId, catalogId)) ??meta.title?.(node) ??- meta.summary?.(node) ??+ meta.summary?.(node, { operation: operationLabel }) ??meta.defaultTitle;const title = nodeTitle(node.name, describes);diff --git a/apps/erp/app/modules/workflows/workflows.service.ts b/apps/erp/app/modules/workflows/workflows.service.tsindex 14b5cfc99f..a4cc93572f 100644--- a/apps/erp/app/modules/workflows/workflows.service.ts+++ b/apps/erp/app/modules/workflows/workflows.service.ts@@ -3,28 +3,44 @@// including ports, remain AGPLv3; serving them over a network requires releasing their source.import type { ServiceContext } from "@carbon/api/service-fn.server";+import { getCarbonServiceRole } from "@carbon/auth/client.server";import type { Database, Json } from "@carbon/database";import { fetchAllByIds } from "@carbon/database";import { fkDisplayRegistry } from "@carbon/database/audit.config";import type { Kysely, KyselyDatabase } from "@carbon/database/client";+import {+ needsReconnect,+ readConnections,+ usableConnections+} from "@carbon/ee/integrations/connections";import { defaultUpgradeMessage, resolveRequirement } from "@carbon/ee/plan";import { companyHasFeature } from "@carbon/ee/plan.server";import type { CompanyLock, WorkflowIssue } from "@carbon/ee/workflows";import {createWorkflowCatalog,+ INTEGRATION_CONNECTION_INPUT,readWorkflowVersion,syncWorkflowTriggers,validateDefinition} from "@carbon/ee/workflows";import { requireWorkflowsEntitlement } from "@carbon/ee/workflows.server";import { trigger } from "@carbon/jobs";+import {+ CONNECTION_PROVIDER,+ getPieceAction,+ PROPERTY_PROVIDER,+ requiredScopesFor,+ resolvePieceAuth+} from "@carbon/jobs/integrations";import { getLogger } from "@carbon/logger";import { datetime } from "@carbon/utils";import type { SupabaseClient } from "@supabase/supabase-js";import { sql } from "kysely";import type { z } from "zod";+import { path } from "~/utils/path";import type { Filter, GenericQueryFilters, Paging } from "~/utils/query";import { listCount, setGenericQueryFilters } from "~/utils/query";+import type { OptionsErrorCode } from "./types";import type { workflowValidator } from "./workflows.models";import { MAX_RUN_STEPS } from "./workflows.utils";@@ -512,7 +528,11 @@ export async function getWorkflowVersionOwnership() {return client.from("workflowVersion")- .select("workflowId, workflow(publishedVersionId)")+ .select(+ // Two FKs join these tables — this one and workflow."publishedVersionId" —+ // so the embed must name which, or PostgREST refuses it (PGRST201).+ "workflowId, workflow!workflowVersion_workflowId_companyId_fkey(publishedVersionId)"+ ).eq("id", versionId).eq("companyId", companyId).maybeSingle();@@ -725,3 +745,214 @@ export async function refuseUnlessWorkflowsEnabled(ctx: ServiceContext) {defaultUpgradeMessage(resolveRequirement({ feature: "WORKFLOWS" })));}++const optionsLogger = getLogger("erp", "workflows", "options");++export type OptionsProviderContext = {+ companyId: string;+ /** Fixed arguments from the catalog entry. */+ params: Record<string, string>;+ /** Current values of the input's `dependsOn` inputs. */+ values: Record<string, string>;+};++export type ProviderOption = { label: string; value: string };++export type OptionsProviderResult = {+ options: ProviderOption[];+ /** Where the author can go to create the first one, when there are none. */+ emptyHref?: string;+ /** Why this list could not be loaded, when we know a reason worth saying.+ * A CODE, not a sentence: the wording is the builder's, so it goes through+ * Lingui like every other string the author reads. */+ errorCode?: OptionsErrorCode;+ /** Where to go and do it. */+ errorHref?: string;+ /** Something worth saying beside a list that DID load — an account that was+ * left out because it needs reconnecting. Same code vocabulary as errors. */+ noticeCode?: OptionsErrorCode;+ noticeHref?: string;+};++export type OptionsProvider = {+ /** Checked before the provider runs, so a provider can never be a way around a+ * permission the equivalent action carries. Module per action, e.g.+ * `{ update: "workflows" }`. */+ permission: Partial<Record<"view" | "create" | "update" | "delete", string>>;+ resolve: (context: OptionsProviderContext) => Promise<OptionsProviderResult>;+};++/**+ * The company's connections for one piece. Non-secret fields only.+ *+ * Read through the SERVICE role, then scoped to `companyId` here. The row's RLS+ * SELECT policy demands `settings_view`, but this provider is gated on+ * `workflows_view` — a workflow author who cannot administer Settings would+ * otherwise get an empty list and be told the app "isn't connected yet", with+ * nothing anywhere reporting that the rows had been filtered away. The company+ * scope is not weakened: `requirePermissions` resolved `companyId` for this+ * request, and only non-secret columns leave here.+ *+ * Only USABLE accounts are offered. A revoked account in a dropdown is a trap —+ * picking it builds a workflow that cannot run.+ */+const connectionProvider: OptionsProvider = {+ permission: { view: "workflows" },+ resolve: async ({ companyId, params }) => {+ const piece = params.piece;+ if (!piece) return { options: [] };++ const usable = usableConnections(+ await readConnections(getCarbonServiceRole(), companyId, piece)+ );+ const required = await requiredScopesFor(piece);+ const ready = usable.filter((row) => !needsReconnect(row, required));+ const accountsHref = path.to.integrationAccounts(piece);++ // Connected, but every account predates a scope this piece now needs: the fix+ // is a re-consent, not a new account — say so instead of offering nothing.+ if (ready.length === 0 && usable.length > 0) {+ return { options: [], errorCode: "reconnect", errorHref: accountsHref };+ }++ return {+ options: ready.map((row) => ({+ value: row.id,+ label: row.accountLabel ? `${row.name} · ${row.accountLabel}` : row.name+ })),+ emptyHref: accountsHref,+ // Some accounts are ready and some are not: offer the ready ones, but say+ // that one is missing rather than letting it vanish from the list.+ ...(ready.length < usable.length+ ? { noticeCode: "reconnect" as const, noticeHref: accountsHref }+ : {})+ };+ }+};++/**+ * One piece property's own `options()`, run against a chosen connection — "pick a+ * calendar". Gated on `workflows_update`, the same permission the action carries,+ * so it cannot reach a vendor a user could not otherwise call.+ */+const propertyProvider: OptionsProvider = {+ permission: { update: "workflows" },+ resolve: async ({ companyId, params, values }) => {+ const { piece, action: actionName, prop } = params;+ const connectionId = values[INTEGRATION_CONNECTION_INPUT];+ if (!piece || !actionName || !prop || !connectionId) return { options: [] };++ // Read through the SERVICE role for the same reason `connectionProvider` does:+ // the row's RLS demands `settings_view`, this provider is gated on+ // `workflows_update`, and a workflow author without Settings access would+ // otherwise see every dependent list come back empty. `companyId` came from+ // `requirePermissions`, and scopes every read the resolver makes.+ const auth = await resolvePieceAuth(+ getCarbonServiceRole(),+ companyId,+ piece,+ connectionId+ );+ if (!auth.ok) {+ switch (auth.reason) {+ case "no-connection":+ return { options: [] };+ // A connection problem is not a generic lookup failure: the author cannot+ // fix "couldn't load the choices", but they can reconnect an account.+ // An under-scoped account reads the same way it does in the connection+ // dropdown, which leaves it out for that reason.+ case "missing-scopes":+ case "reconnect":+ return {+ options: [],+ errorCode: "reconnect",+ errorHref: path.to.integrationAccounts(piece)+ };+ case "refreshing":+ return { options: [], errorCode: "refreshing" };+ // Loading the piece to read its token URL failed for a reason that has+ // nothing to do with the account — a missing package, an unset OAuth env+ // var. Named in the log rather than swallowed: it looks identical to a+ // dead account from the outside, and telling them apart is the whole+ // difference between "reconnect" and "fix the server's OAuth config".+ case "misconfigured":+ optionsLogger.error(+ "Could not build the refresh config for {piece}: {cause}",+ {+ piece,+ cause:+ auth.cause instanceof Error+ ? auth.cause.message+ : String(auth.cause)+ }+ );+ return { options: [], errorCode: "failed" };+ case "failed":+ throw auth.cause;+ }+ }++ const action = await getPieceAction(piece, actionName);+ const property = action.props[prop];+ if (property === undefined || typeof property.options !== "function") {+ throw new Error(+ `${piece}.${actionName}.${prop} has no options to fetch.`+ );+ }++ // A dropdown's `refreshers` may name sibling props, so pass what the node has.+ const propsValue: Record<string, unknown> = {};+ for (const [key, value] of Object.entries(values)) {+ if (key in action.props) propsValue[key] = value;+ }++ const resolved = await (+ property.options as (context: unknown) => Promise<unknown>+ )({+ auth: { access_token: auth.accessToken },+ propsValue+ });++ return { options: optionRows(resolved) };+ }+};++/**+ * A piece's `options()` answer as dropdown rows. A stored choice is text, so only+ * a scalar value can be one: an object value would be stored as+ * "[object Object]", which the piece could never read back, so that row is left+ * out rather than offered.+ */+function optionRows(answer: unknown): ProviderOption[] {+ if (answer === null || typeof answer !== "object" || !("options" in answer))+ return [];+ const rows = answer.options;+ if (!Array.isArray(rows)) return [];+ return rows.flatMap((row: unknown) => {+ if (row === null || typeof row !== "object") return [];+ if (!("label" in row) || typeof row.label !== "string") return [];+ const value = "value" in row ? row.value : undefined;+ if (typeof value === "string") return [{ label: row.label, value }];+ if (+ (typeof value === "number" && Number.isFinite(value)) ||+ typeof value === "boolean"+ ) {+ return [{ label: row.label, value: String(value) }];+ }+ return [];+ });+}++/**+ * Every list the workflow builder fetches while a node is being edited.+ *+ * A catalog input names a provider by id and the builder forwards it verbatim, so+ * this registry is the only place that knows what a provider id MEANS. Nothing here+ * is integration-specific by construction: a provider backed by Carbon's own data+ * is one more entry, and needs no change to the catalog format, the endpoint or the+ * field that renders it.+ */+export const OPTIONS_PROVIDERS: Record<string, OptionsProvider> = {+ [CONNECTION_PROVIDER]: connectionProvider,+ [PROPERTY_PROVIDER]: propertyProvider+};diff --git a/apps/erp/app/root.tsx b/apps/erp/app/root.tsxindex 8935ec6faa..8eb6f1289b 100644--- a/apps/erp/app/root.tsx+++ b/apps/erp/app/root.tsx@@ -131,6 +131,7 @@ export async function loader({ request, context }: LoaderFunctionArgs) {MES_URL,NODE_ENV,ONSHAPE_CLIENT_ID,+ GOOGLE_CLIENT_ID,ONSHAPE_V2_CLIENT_ID,POSTHOG_API_HOST,POSTHOG_PROJECT_PUBLIC_KEY,@@ -159,6 +160,7 @@ export async function loader({ request, context }: LoaderFunctionArgs) {CONTROLLED_ENVIRONMENT,DEFAULT_LANGUAGE,ERP_URL,+ GOOGLE_CLIENT_ID,GOOGLE_PLACES_API_KEY,JIRA_CLIENT_ID,LOG_LEVEL,diff --git a/apps/erp/app/routes/api+/account.notifications.ts b/apps/erp/app/routes/api+/account.notifications.tsindex c20e10553c..5d55f343d4 100644--- a/apps/erp/app/routes/api+/account.notifications.ts+++ b/apps/erp/app/routes/api+/account.notifications.ts@@ -7,6 +7,10 @@ import { assertIsPost, error } 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 {+ connectionUsable,+ readConnections+} from "@carbon/ee/integrations/connections";import { companyHasFeature } from "@carbon/ee/plan.server";import { getVapidDetails } from "@carbon/env/push.server";import { validationError, validator } from "@carbon/form";@@ -22,16 +26,16 @@ import {export async function loader({ request }: LoaderFunctionArgs) {const { client, userId, companyId } = await requirePermissions(request, {});- const [preferences, slackIntegration, emailPlanEnabled] = await Promise.all([+ const [preferences, slackActive, emailPlanEnabled] = await Promise.all([getNotificationPreferences(client, userId, companyId),- // Service role: companyIntegration SELECT requires settings_view, which- // regular employees don't have.- getCarbonServiceRole()- .from("companyIntegration")- .select("active")- .eq("companyId", companyId)- .eq("id", "slack")- .maybeSingle(),+ // Service role: integrationConnection SELECT requires settings_view, which+ // regular employees don't have. Slack is "on" when the company has a usable+ // Slack connection — the same rows the Assistant and workflows read.+ // A failed read reads as Slack off: it must not fail the whole pane.+ readConnections(getCarbonServiceRole(), companyId, "slack").then(+ (rows) => rows.some(connectionUsable),+ () => false+ ),companyHasFeature(client, companyId, { feature: "EMAIL_NOTIFICATIONS" })]);@@ -39,7 +43,7 @@ export async function loader({ request }: LoaderFunctionArgs) {return {preferences: preferences.data ?? [],- slackActive: slackIntegration.data?.active ?? false,+ slackActive,emailPlanEnabled,// Null hides every push control: the deployment has no push keys (no// SESSION_SECRET).diff --git a/apps/erp/app/routes/api+/integrations.connections.$piece.connect.ts b/apps/erp/app/routes/api+/integrations.connections.$piece.connect.tsnew file mode 100644index 0000000000..87183bde62--- /dev/null+++ b/apps/erp/app/routes/api+/integrations.connections.$piece.connect.ts@@ -0,0 +1,101 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { requirePermissions } from "@carbon/auth/auth.server";+import { getCarbonServiceRole } from "@carbon/auth/client.server";+import { issueOAuthState } from "@carbon/auth/oauth-state.server";+import { readConnection } from "@carbon/ee/integrations/connections";+import {+ allowlistEntry,+ buildConsentUrl,+ getPieceOAuth2Auth,+ resolveOAuthApp+} from "@carbon/jobs/integrations";+import type { LoaderFunctionArgs } from "react-router";+import { data } from "react-router";+import type {+ IntegrationErrorCode,+ SharedIntegrationErrorCode+} from "~/modules/settings/integration-errors";+import { pieceConnectRefusal } from "~/modules/settings/settings.service";++export const config = {+ runtime: "nodejs"+};++/**+ * Builds the vendor's consent URL: the piece supplies `authUrl` and `scope` (an+ * allowlist row may override either), the allowlist row supplies which env vars hold+ * our OAuth app. Returns `{ url }`, so the client opens it in a popup, or+ * `{ error }` — a `connection` code from `integration-errors.ts`, worded in the UI.+ *+ * The `{ url }` response sets the state cookie (`issueOAuthState`): single-use,+ * bound to this user and company, and carrying the account name and, for+ * Reconnect, the row's id, so the callback trusts nothing from the query string.+ *+ * `?connection=<id>` is Reconnect: the callback revives that row only if the same+ * account authorizes. `?name=` is Add account.+ */+export async function loader({ request, params }: LoaderFunctionArgs) {+ const { client, companyId, userId, email } = await requirePermissions(+ request,+ { update: "settings" }+ );++ const pieceName = params.piece;+ const entry = pieceName ? allowlistEntry(pieceName) : undefined;+ if (!pieceName || entry === undefined) {+ return connectError("unavailable");+ }++ const refusal = await pieceConnectRefusal(client, {+ companyId,+ integrationId: pieceName,+ email,+ userId+ });+ if (refusal !== null) return connectError(refusal);++ let app: ReturnType<typeof resolveOAuthApp>;+ try {+ app = resolveOAuthApp(pieceName);+ } catch {+ return connectError("not-configured");+ }++ const searchParams = new URL(request.url).searchParams;+ const connectionId = searchParams.get("connection") ?? undefined;+ let name = searchParams.get("name")?.trim() || entry.label;+ if (connectionId !== undefined) {+ const existing = await readConnection(+ getCarbonServiceRole(),+ companyId,+ connectionId+ );+ if (existing === null || existing.pieceName !== pieceName) {+ return connectError("account-missing");+ }+ name = existing.name;+ }++ const auth = await getPieceOAuth2Auth(pieceName);++ // Pass the request so another integration's pending state in the cookie+ // survives this Set-Cookie.+ const { state, cookie } = await issueOAuthState(+ { integrationId: pieceName, userId, companyId, name, connectionId },+ request+ );++ return data(+ { url: buildConsentUrl({ entry, auth, app, state }) },+ { headers: { "Set-Cookie": cookie } }+ );+}++function connectError(+ error: IntegrationErrorCode<"connection"> | SharedIntegrationErrorCode+) {+ return { error };+}diff --git a/apps/erp/app/routes/api+/integrations.connections.callback.ts b/apps/erp/app/routes/api+/integrations.connections.callback.tsnew file mode 100644index 0000000000..8cf9ce9613--- /dev/null+++ b/apps/erp/app/routes/api+/integrations.connections.callback.ts@@ -0,0 +1,296 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { requirePermissions } from "@carbon/auth/auth.server";+import { getCarbonServiceRole } from "@carbon/auth/client.server";+import { consumeOAuthStateByValue } from "@carbon/auth/oauth-state.server";+import { getIntegrationServerHooks } from "@carbon/ee/hooks.server";+import {+ ConnectionAccountMismatchError,+ ConnectionAccountUnverifiedError,+ ConnectionNameTakenError,+ ConnectionWorkspaceTakenError,+ createConnection,+ exchangeAuthorizationCode,+ TOKEN_REQUEST_TIMEOUT_MS+} from "@carbon/ee/integrations/connections";+import type { AllowlistEntry } from "@carbon/jobs/integrations";+import {+ accountLabelFromBody,+ allowlistEntry,+ connectionMetadataFrom,+ getPieceOAuth2Auth,+ resolveOAuthApp+} from "@carbon/jobs/integrations";+import { getLogger } from "@carbon/logger";+import type { LoaderFunctionArgs } from "react-router";+import type {+ IntegrationErrorCode,+ SharedIntegrationErrorCode+} from "~/modules/settings/integration-errors";+import { integrationErrorSearch } from "~/modules/settings/integration-errors";+import {+ invalidateIntegrationHealthCache,+ markIntegrationInstalled,+ oauthPopupResponse,+ pieceConnectRefusal,+ withCookie+} from "~/modules/settings/settings.service";+import { oAuthCallbackSchema } from "~/modules/shared/shared.models";+import { path } from "~/utils/path";++export const config = {+ runtime: "nodejs"+};++const logger = getLogger("erp", "integrations", "connections");++/**+ * The consent screen runs in a popup the integrations page opened, so the answer+ * is posted back to that page (which refreshes, or shows the error) and the popup+ * closes. With no opener it lands on the integrations page like a redirect. Only a+ * code crosses; `integrationErrors` owns the copy. Every reply carries the state+ * cookie, which consuming the state rewrote.+ */+function connectionReply(+ integration: string,+ cookie: string,+ reason?: IntegrationErrorCode<"connection"> | SharedIntegrationErrorCode+) {+ return withCookie(+ oauthPopupResponse(+ reason === undefined+ ? { integration, ok: true }+ : { integration, ok: false, error: reason },+ reason === undefined+ ? path.to.integrations+ : `${path.to.integrations}${integrationErrorSearch("connection", reason)}`+ ),+ cookie+ );+}++export async function loader({ request }: LoaderFunctionArgs) {+ const { client, companyId, userId, email } = await requirePermissions(+ request,+ { update: "settings" }+ );++ const url = new URL(request.url);+ const searchParams = Object.fromEntries(url.searchParams.entries());++ // One redirect URI serves every piece, so the stored state is found by its+ // value, then checked against this session's user and company: that binding is+ // what stops a token being planted into another company's connection, or one+ // user's authorization code being completed in another user's session (CSRF).+ // Consumed first, so a refused consent spends it too.+ const consumed = await consumeOAuthStateByValue(+ request,+ searchParams.state ?? "",+ { userId, companyId }+ );+ const state = consumed.payload;+ // Which card the reply is for, so the right card shows a refusal.+ const replyTo = state?.integrationId ?? "connection";+ const connectionFailed = (+ reason: IntegrationErrorCode<"connection"> | SharedIntegrationErrorCode+ ) => connectionReply(replyTo, consumed.cookie, reason);++ if (searchParams.error) {+ logger.error("Integration authorization refused", {+ error: searchParams.error+ });+ return connectionFailed("denied");+ }++ const parsed = oAuthCallbackSchema.safeParse(searchParams);+ if (!parsed.success) {+ // Parameter NAMES only — `code` is a live credential.+ logger.error("Invalid integration auth response", {+ params: Object.keys(searchParams)+ });+ return connectionFailed("invalid-response");+ }++ // A piece's state always names the account; one without it was issued for+ // another integration's flow.+ if (state === undefined || state.name === undefined) {+ logger.error("Integration callback state rejected", { companyId });+ return connectionFailed("invalid-state");+ }+ const pieceName = state.integrationId;+ const name = state.name;++ const entry = allowlistEntry(pieceName);+ if (entry === undefined) {+ return connectionFailed("invalid-state");+ }++ // Checked again here, before the code is exchanged: the state may have been+ // issued before the card was switched off or the plan changed.+ const refusal = await pieceConnectRefusal(client, {+ companyId,+ integrationId: pieceName,+ email,+ userId+ });+ if (refusal !== null) return connectionFailed(refusal);++ let app: ReturnType<typeof resolveOAuthApp>;+ let auth: Awaited<ReturnType<typeof getPieceOAuth2Auth>>;+ try {+ app = resolveOAuthApp(pieceName);+ auth = await getPieceOAuth2Auth(pieceName);+ } catch {+ return connectionFailed("not-configured");+ }++ // Each stage has its own try, so the error code is decided by WHERE it failed,+ // never by reading the text of whatever was thrown.+ let tokens: Awaited<ReturnType<typeof exchangeAuthorizationCode>>;+ try {+ tokens = await exchangeAuthorizationCode(+ {+ tokenUrl: auth.tokenUrl,+ clientId: app.clientId,+ clientSecret: app.clientSecret,+ redirectUri: app.redirectUrl+ },+ parsed.data.code+ );+ } catch (err) {+ logger.error("Integration token exchange failed: {detail}", {+ detail: describeError(err)+ });+ return connectionFailed("token-exchange");+ }++ // Workspace facts the row asked for (Slack: team, bot user, webhook channel).+ const metadata = connectionMetadataFrom(entry, tokens.body);+ try {+ await createConnection(getCarbonServiceRole(), {+ companyId,+ pieceName,+ name,+ connectionId: state.connectionId,+ // Card Install names the account after the card; a Revoked row from an+ // earlier install may still hold that name for another account.+ renameIfTaken: state.connectionId === undefined && name === entry.label,+ authType: "OAUTH2",+ accountLabel:+ accountLabelFromBody(entry, tokens.body) ??+ (await accountLabelFor(entry, tokens.accessToken)),+ metadata,+ tokens: {+ accessToken: tokens.accessToken,+ refreshToken: tokens.refreshToken+ },+ expiresAt: tokens.expiresAt,+ createdBy: userId+ });+ } catch (err) {+ if (err instanceof ConnectionAccountMismatchError) {+ return connectionFailed("account-mismatch");+ }+ if (err instanceof ConnectionAccountUnverifiedError) {+ logger.error("Integration reconnect account not identified", {+ companyId,+ pieceName+ });+ return connectionFailed("account-unverified");+ }+ if (err instanceof ConnectionNameTakenError) {+ return connectionFailed("duplicate-name");+ }+ if (err instanceof ConnectionWorkspaceTakenError) {+ logger.error("Integration workspace already connected elsewhere", {+ companyId,+ pieceName+ });+ return connectionFailed("workspace-taken");+ }+ logger.error("Integration connection save failed: {detail}", {+ detail: describeError(err)+ });+ return connectionFailed("save-failed");+ }++ // The piece is an ordinary integration card, so a connected account is what+ // "installed" means for it. Without this row the grid would keep offering+ // Install for an account that is already connected. Never overwrite an+ // existing row — it may hold settings that are not this callback's to touch.+ // The service role, as for the connection: inserting the row would need+ // settings create through RLS, and this route (like every install) requires+ // settings update. Failing here would leave a live token behind a card that+ // still offers Install.+ const installed = await markIntegrationInstalled(getCarbonServiceRole(), {+ id: pieceName,+ companyId,+ updatedBy: userId+ });+ if (installed.error) {+ logger.error("Integration install mark failed: {detail}", {+ detail: describeError(installed.error)+ });+ return connectionFailed("save-failed");+ }+ await invalidateIntegrationHealthCache(pieceName, companyId);++ // A new account (not a Reconnect) runs its piece's connect hook, e.g. Slack's+ // welcome message. Best-effort: the connection is already saved.+ const onConnect = getIntegrationServerHooks(pieceName)?.onConnect;+ if (onConnect !== undefined && state.connectionId === undefined) {+ try {+ await onConnect({ accessToken: tokens.accessToken, metadata });+ } catch (err) {+ logger.warn("Integration connect hook failed: {detail}", {+ pieceName,+ detail: describeError(err)+ });+ }+ }++ return connectionReply(pieceName, consumed.cookie);+}++/** A PostgREST failure is a plain object, not an Error: its `message`, `code` and+ * `details` are the only clue to a constraint the write hit. */+function describeError(err: unknown): string {+ if (err instanceof Error) {+ return `name=${err.name} detail=${err.message.slice(0, 400)}`;+ }+ let serialized: string;+ try {+ serialized = JSON.stringify(err) ?? String(err);+ } catch {+ serialized = String(err);+ }+ return `name=${typeof err} detail=${serialized.slice(0, 400)}`;+}++/** Which account was connected, so two connections are tellable apart in the UI.+ * Best-effort: a failure here must not lose a connection that already authorized. */+async function accountLabelFor(+ entry: AllowlistEntry,+ accessToken: string+): Promise<string | null> {+ // A vendor with no such endpoint shows the connection's own name instead; one+ // that puts the label in the token response was already read by the caller.+ const label = entry.accountLabel;+ if (label === undefined || !("url" in label)) return null;+ try {+ const response = await fetch(label.url, {+ headers: { Authorization: `Bearer ${accessToken}` },+ // A stalled identity endpoint must not hang the callback; the abort lands+ // in the catch below and the connection is saved without a label.+ signal: AbortSignal.timeout(TOKEN_REQUEST_TIMEOUT_MS)+ });+ if (!response.ok) return null;+ const body = (await response.json()) as Record<string, unknown>;+ const value = body[label.field];+ return typeof value === "string" && value.length > 0 ? value : null;+ } catch {+ return null;+ }+}diff --git a/apps/erp/app/routes/api+/integrations.slack.install.ts b/apps/erp/app/routes/api+/integrations.slack.install.tsdeleted file mode 100644index 1d0c193a7e..0000000000--- a/apps/erp/app/routes/api+/integrations.slack.install.ts+++ /dev/null@@ -1,18 +0,0 @@-// SPDX-License-Identifier: AGPL-3.0-only-// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,-// including ports, remain AGPLv3; serving them over a network requires releasing their source.--import { requirePermissions } from "@carbon/auth/auth.server";-import { getSlackInstallUrl } from "@carbon/ee/slack.server";-import type { LoaderFunctionArgs } from "react-router";--export async function loader({ request }: LoaderFunctionArgs) {- const { userId, companyId } = await requirePermissions(request, {});-- const url = await getSlackInstallUrl({- companyId,- userId- });-- return { url };-}diff --git a/apps/erp/app/routes/api+/integrations.slack.interactive.ts b/apps/erp/app/routes/api+/integrations.slack.interactive.tsindex 85e1642cb7..dc2b8ad880 100644--- a/apps/erp/app/routes/api+/integrations.slack.interactive.ts+++ b/apps/erp/app/routes/api+/integrations.slack.interactive.ts@@ -6,10 +6,10 @@ import { createHmac, timingSafeEqual } from "node:crypto";import { SLACK_SIGNING_SECRET } from "@carbon/auth";import { getCarbonServiceRole } from "@carbon/auth/client.server";import type { Database } from "@carbon/database";-import { resolveIntegrationSecrets } from "@carbon/ee";import {+ AmbiguousSlackWorkspaceError,createSlackWebClient,- getSlackIntegrationByTeamId+ getSlackWorkspaceByTeamId} from "@carbon/ee/slack.server";import { getLogger } from "@carbon/logger";import type { SupabaseClient } from "@supabase/supabase-js";@@ -141,46 +141,37 @@ export async function action({ request }: ActionFunctionArgs) {};}- const integration = await getSlackIntegrationByTeamId(- serviceRole,- payload.data.team.id- );-- if (!integration.data?.[0] || integration.error) {- logger.error("Failed to get Slack integration", {- error: integration.error- });- return {- response_type: "ephemeral",- text: "Slack integration not found for this workspace."- };- }-- const { companyId, metadata, secretRef } = integration.data?.[0];- // Secret material (access_token) lives in Supabase Vault; merge it back so- // we read the same shape as before. Fails closed when the vault ref is gone.- let slackToken: string | undefined;+ let workspace: Awaited<ReturnType<typeof getSlackWorkspaceByTeamId>>;try {- const resolved = (await resolveIntegrationSecrets(+ workspace = await getSlackWorkspaceByTeamId(serviceRole,- companyId,- "slack",- metadata,- secretRef- )) as { access_token?: string };- slackToken = resolved.access_token;- } catch (error) {- logger.error("Failed to resolve Slack integration secret", { error });+ payload.data.team.id+ );+ } catch (err) {+ if (err instanceof AmbiguousSlackWorkspaceError) {+ logger.error("Slack workspace linked to more than one company", {+ teamId: payload.data.team.id+ });+ return {+ response_type: "ephemeral",+ text: "This Slack workspace is connected to more than one Carbon company, so Carbon cannot tell which one you mean. Ask an admin to disconnect it from all but one."+ };+ }+ throw err;}- if (!slackToken) {- logger.error("Slack token not found");+ if (workspace === null) {+ logger.error("No Slack connection for workspace", {+ teamId: payload.data.team.id+ });return {response_type: "ephemeral",- text: "Slack token not found. Please reconfigure the integration."+ text: "Slack integration not found for this workspace."};}+ const { companyId, token: slackToken } = workspace;+switch (payload.data.type) {case "shortcut":return handleShortcut(payload.data, companyId, slackToken, serviceRole);diff --git a/apps/erp/app/routes/api+/integrations.slack.oauth.ts b/apps/erp/app/routes/api+/integrations.slack.oauth.tsindex d12924c5ae..3cae6da74d 100644--- a/apps/erp/app/routes/api+/integrations.slack.oauth.ts+++ b/apps/erp/app/routes/api+/integrations.slack.oauth.ts@@ -2,192 +2,26 @@// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,// including ports, remain AGPLv3; serving them over a network requires releasing their source.-import {- SLACK_CLIENT_ID,- SLACK_CLIENT_SECRET,- SLACK_OAUTH_REDIRECT_URL,- VERCEL_URL-} from "@carbon/auth";-import { requirePermissions } from "@carbon/auth/auth.server";-import { Slack } from "@carbon/ee";-import {- createSlackApp,- getSlackInstaller,- slackOAuthTokenResponseSchema-} from "@carbon/ee/slack.server";-import { redirectExternal } from "@carbon/utils";+import { redirect } from "@carbon/utils";import type { LoaderFunctionArgs } from "react-router";-import { data } from "react-router";-import { z } from "zod";-import { upsertCompanyIntegration } from "~/modules/settings/settings.service";-import { oAuthCallbackSchema } from "~/modules/shared/shared.models";-import { path } from "~/utils/path";+export const config = {+ runtime: "nodejs"+};++/**+ * Legacy Slack redirect URL, kept as a forwarder. Deployed environments (and the+ * Slack app's registered Redirect URLs) still name `/api/integrations/slack/oauth`+ * in `SLACK_OAUTH_REDIRECT_URL`; the consent itself now completes in the shared+ * connections callback. Slack sends the browser here with `code` and `state`, so+ * pass the query through untouched — the callback checks the state against the+ * state cookie, which this same-origin redirect carries along, and the token+ * exchange reuses the same redirect URL it was authorized with.+ *+ * Once every environment points `SLACK_OAUTH_REDIRECT_URL` at the callback+ * directly, this file can go.+ */export async function loader({ request }: LoaderFunctionArgs) {- const { client, userId, companyId } = await requirePermissions(request, {- update: "settings"- });-const url = new URL(request.url);- const searchParams = Object.fromEntries(url.searchParams.entries());-- const slackAuthResponse = oAuthCallbackSchema.safeParse(searchParams);-- if (!slackAuthResponse.success) {- return data({ error: "Invalid Slack auth response" }, { status: 400 });- }- const veryfiedState = await getSlackInstaller().stateStore?.verifyStateParam(- new Date(),- slackAuthResponse.data.state- );-- const parsedMetadata = z- .object({- companyId: z.string(),- userId: z.string()- })- .safeParse(JSON.parse(veryfiedState?.metadata ?? "{}"));-- if (!parsedMetadata.success) {- return data({ error: "Invalid metadata" }, { status: 400 });- }-- if (parsedMetadata.data.companyId !== companyId) {- return data({ error: "Invalid company" }, { status: 400 });- }-- if (parsedMetadata.data.userId !== userId) {- return data({ error: "Invalid user" }, { status: 400 });- }-- // Validate required environment variables- if (!SLACK_CLIENT_ID || !SLACK_CLIENT_SECRET || !SLACK_OAUTH_REDIRECT_URL) {- return data({ error: "Slack OAuth not configured" }, { status: 500 });- }-- try {- const body = new URLSearchParams({- client_id: SLACK_CLIENT_ID,- client_secret: SLACK_CLIENT_SECRET,- code: slackAuthResponse.data.code,- redirect_uri: SLACK_OAUTH_REDIRECT_URL- });-- const response = await fetch("https://slack.com/api/oauth.v2.access", {- method: "POST",- headers: {- "Content-Type": "application/x-www-form-urlencoded"- },- body: body.toString()- });-- if (!response.ok) {- return data(- { error: "Failed to exchange code for token - HTTP error" },- { status: 500 }- );- }-- const responseText = await response.text();-- let responseData;- try {- responseData = JSON.parse(responseText);- // biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- } catch (parseError) {- return data(- { error: "Invalid JSON response from Slack" },- { status: 500 }- );- }-- // Check if Slack returned an error- if (!responseData.ok) {- return data(- { error: `Slack OAuth error: ${responseData.error}` },- { status: 400 }- );- }-- const parsedJson = slackOAuthTokenResponseSchema.safeParse(responseData);-- if (!parsedJson.success) {- return data(- { error: "Failed to parse Slack OAuth response" },- { status: 500 }- );- }-- const { data: tokenData } = parsedJson;-- const createdSlackIntegration = await upsertCompanyIntegration(client, {- id: Slack.id,- active: true,- metadata: {- access_token: tokenData.access_token,- team_id: tokenData.team.id,- team_name: tokenData.team.name,- ...(tokenData.incoming_webhook && {- channel: tokenData.incoming_webhook.channel,- channel_id: tokenData.incoming_webhook.channel_id,- slack_configuration_url: tokenData.incoming_webhook.configuration_url,- url: tokenData.incoming_webhook.url- }),- bot_user_id: tokenData.bot_user_id- },- updatedBy: userId,- companyId: companyId- });-- if (createdSlackIntegration?.data?.metadata) {- const slackApp = createSlackApp({- token: tokenData.access_token,- botId: tokenData.bot_user_id- });-- // Only try to post a message if we have webhook configuration- if (tokenData.incoming_webhook?.channel_id) {- try {- await slackApp.client.chat.postMessage({- channel: tokenData.incoming_webhook.channel_id,- unfurl_links: false,- unfurl_media: false,- blocks: [- {- type: "section",- text: {- type: "mrkdwn",- text: "Ahoy maties! 🦜🏴☠️ Here be your new Cargh-bon bot. Use `/` to get started."- }- }- ]- });- // biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- } catch (err) {- // Silently fail if welcome message can't be posted- }- }-- const requestUrl = new URL(request.url);-- if (!VERCEL_URL || VERCEL_URL.includes("localhost")) {- requestUrl.protocol = "http";- }-- const redirectUrl = `${requestUrl.origin}${path.to.integrations}`;-- return redirectExternal(redirectUrl);- } else {- return data(- { error: "Failed to save Slack integration" },- { status: 500 }- );- }- // biome-ignore lint/correctness/noUnusedVariables: suppressed due to migration- } catch (err) {- return data(- { error: "Failed to exchange code for token" },- { status: 500 }- );- }+ return redirect(`/api/integrations/connections/callback${url.search}`, 302);}diff --git a/apps/erp/app/routes/api+/workflows.options.ts b/apps/erp/app/routes/api+/workflows.options.tsnew file mode 100644index 0000000000..7c14ef776d--- /dev/null+++ b/apps/erp/app/routes/api+/workflows.options.ts@@ -0,0 +1,106 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { hasPermission } from "@carbon/auth";+import { requirePermissions } from "@carbon/auth/auth.server";+import { getLogger } from "@carbon/logger";+import type { LoaderFunctionArgs } from "react-router";+import { OPTIONS_PROVIDERS } from "~/modules/workflows/workflows.service";++export const config = {+ runtime: "nodejs"+};++const logger = getLogger("erp", "workflows", "options");++/** Codes, not sentences — the builder owns the wording so it can translate it. */+const FAILED = "failed" as const;+const FORBIDDEN = "forbidden" as const;++/** A JSON query parameter of plain string values, or `{}` — a malformed one is an+ * empty bag rather than a failure, since a provider decides what it needs anyway. */+function readStringMap(raw: string | null): Record<string, string> {+ if (!raw) return {};+ try {+ const parsed: unknown = JSON.parse(raw);+ if (+ typeof parsed !== "object" ||+ parsed === null ||+ Array.isArray(parsed)+ ) {+ return {};+ }+ const map: Record<string, string> = {};+ for (const [key, value] of Object.entries(parsed)) {+ if (typeof value === "string") map[key] = value;+ }+ return map;+ } catch {+ return {};+ }+}++/**+ * Resolves one workflow input's choices while the author is still editing the node.+ * Provider-agnostic: the permission and the lookup both come from the registry+ * entry, so this route never learns what any particular list is.+ */+export async function loader({ request }: LoaderFunctionArgs) {+ const url = new URL(request.url);+ const providerId = url.searchParams.get("provider");+ // Own keys only: `?provider=constructor` must not reach Object.prototype.+ const provider =+ providerId && Object.hasOwn(OPTIONS_PROVIDERS, providerId)+ ? OPTIONS_PROVIDERS[providerId]+ : undefined;++ // `workflows_view` is the weakest permission any provider uses, and anyone who+ // can open the builder holds it. The provider's own permission is checked below+ // rather than here: `requirePermissions` answers a denial with a redirect, and a+ // fetcher follows it as a navigation — a viewer opening a node was sent home.+ const { companyId, permissions } = await requirePermissions(request, {+ view: "workflows"+ });++ if (provider === undefined) {+ logger.error("Unknown workflow options provider", { provider: providerId });+ return { options: [], errorCode: FAILED };+ }++ const allowed = (+ Object.keys(provider.permission) as (keyof typeof provider.permission)[]+ ).every((action) =>+ hasPermission(permissions, provider.permission[action]!, action, companyId)+ );+ if (!allowed) return { options: [], errorCode: FORBIDDEN };++ try {+ return await provider.resolve({+ companyId,+ params: readStringMap(url.searchParams.get("params")),+ values: readStringMap(url.searchParams.get("values"))+ });+ } catch (err) {+ // Never echo a provider's raw payload to the CUSTOMER — for an integration it+ // carries the vendor's own message, and the auth value is never far from it.+ // The server log is a different audience: without the error's name and the+ // vendor's status code, "lookup failed" is unactionable, and a piece's+ // `HttpError` carries a JSON blob as its `message` that says nothing on its own.+ const status =+ typeof err === "object" && err !== null && "status" in err+ ? (err as { status?: unknown }).status+ : undefined;+ // Every field is a {placeholder} in the MESSAGE: the dev console uses LogTape's+ // `ansiColorFormatter`, which renders the template and drops any property it+ // does not reference — so unreferenced fields were invisible, and "lookup+ // failed" said nothing an operator could act on.+ const name = err instanceof Error ? err.name : typeof err;+ const detail = err instanceof Error ? err.message.slice(0, 300) : "";+ logger.error(+ "Workflow options lookup failed: provider={providerId} error={name} status={status} detail={detail}",+ { providerId, name, status: status ?? "none", detail }+ );+ return { options: [], errorCode: FAILED };+ }+}diff --git a/apps/erp/app/routes/x+/settings+/integrations.$id.tsx b/apps/erp/app/routes/x+/settings+/integrations.$id.tsxindex 6de317b21f..cae8e13907 100644--- a/apps/erp/app/routes/x+/settings+/integrations.$id.tsx+++ b/apps/erp/app/routes/x+/settings+/integrations.$id.tsx@@ -52,6 +52,7 @@ import {getIntegrationServerHooks,onshapeConnectionHasWriteScope} from "@carbon/ee/hooks.server";+import { readConnections } from "@carbon/ee/integrations/connections";import {getPath,patchIntegrationState,@@ -69,6 +70,7 @@ import { requireFeature } from "@carbon/ee/plan.server";import { LEDGER_FAMILY_KEYS, type LedgerFamilyKey } from "@carbon/ee/sync";import { STRIPE_SECRET_KEY } from "@carbon/env";import { validationError, validator } from "@carbon/form";+import { allowlistEntry, requiredScopesFor } from "@carbon/jobs/integrations";import { SERVER_MAIL_CONFIGURED } from "@carbon/lib/email.server";import { getLogger } from "@carbon/logger";import { Badge } from "@carbon/react";@@ -120,6 +122,7 @@ import {import { IntegrationForm, SyncActivity } from "~/modules/settings/ui";import { AccountingSyncControl } from "~/modules/settings/ui/Integrations/AccountingSyncControl";import { AccountMapping } from "~/modules/settings/ui/Integrations/AccountMapping";+import { ConnectionsTab } from "~/modules/settings/ui/Integrations/ConnectionsTab";import { DimensionMapping } from "~/modules/settings/ui/Integrations/DimensionMapping";import type { IntegrationFormTab } from "~/modules/settings/ui/Integrations/IntegrationForm";import { useMountActionStates } from "~/modules/settings/ui/Integrations/MountPublishStatus";@@ -548,6 +551,7 @@ export async function loader({ request, params }: LoaderFunctionArgs) {accountingSync: null,postingSync: null,dimensionSync: null,+ connections: null,devices: null};}@@ -1001,6 +1005,46 @@ export async function loader({ request, params }: LoaderFunctionArgs) {}): null;+ // An allowlisted workflow piece has no settings — what it has is the accounts a+ // workflow step can act as, so its card gets that list as a tab.+ const piece = allowlistEntry(integrationId);+ const [connectionRows, requiredScopes] = piece+ ? await Promise.all([+ readConnections(client, companyId, integrationId),+ requiredScopesFor(integrationId)+ ])+ : [[], []];+ const connections = piece+ ? {+ pieceName: integrationId,+ defaultName: piece.label,+ // Only what the tab renders. `metadata` can carry workspace facts that+ // are not for the browser; `scopes` is the one key the tab compares.+ rows: connectionRows.map(+ ({+ id,+ pieceName,+ name,+ accountLabel,+ status,+ lastError,+ metadata+ }) => ({+ id,+ pieceName,+ name,+ accountLabel,+ status,+ lastError,+ metadata: { scopes: metadata.scopes }+ })+ ),+ // What a connection must hold for this piece's steps; an account that+ // predates a scope shows "Reconnect needed".+ requiredScopes: [...requiredScopes]+ }+ : null;+// The header's sync switch: off on a new connection, and only switchable on// once every required account is mapped.const accountingSync = accountMapping@@ -1021,6 +1065,7 @@ export async function loader({ request, params }: LoaderFunctionArgs) {accountingSync,postingSync,dimensionSync,+ connections,devices};}@@ -1554,6 +1599,7 @@ export default function IntegrationRoute() {accountingSync,postingSync,dimensionSync,+ connections,devices} = useLoaderData<typeof loader>();@@ -1568,6 +1614,21 @@ export default function IntegrationRoute() {// and Sync Activity tabs next to the Settings form (deep-linkable via// ?tab=<value>).const tabs: IntegrationFormTab[] = [];+ if (connections) {+ tabs.push({+ value: "connections",+ label: <Trans>Accounts</Trans>,+ content: (tabBar) => (+ <ConnectionsTab+ tabs={tabBar}+ pieceName={connections.pieceName}+ defaultName={connections.defaultName}+ connections={connections.rows}+ requiredScopes={connections.requiredScopes}+ />+ )+ });+ }if (devices) {tabs.push({value: "devices",diff --git a/apps/erp/app/routes/x+/settings+/integrations.connections.tsx b/apps/erp/app/routes/x+/settings+/integrations.connections.tsxnew file mode 100644index 0000000000..4c4adafb29--- /dev/null+++ b/apps/erp/app/routes/x+/settings+/integrations.connections.tsx@@ -0,0 +1,28 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { carbon } from "@carbon/api/carbon.server";+import { validator } from "@carbon/form";+import type { ActionFunctionArgs } from "react-router";+import { integrationConnectionActionValidator } from "~/modules/settings/settings.models";++export const config = {+ runtime: "nodejs"+};++export async function action(args: ActionFunctionArgs) {+ const input = await validator(integrationConnectionActionValidator).request(+ args+ );+ if ("invalid" in input) return input.invalid;++ const api = await carbon(args.request);+ if (input.data.intent === "rename") {+ return api.settings.renameIntegrationConnection({+ id: input.data.id,+ name: input.data.name+ });+ }+ return api.settings.disconnectIntegrationConnection({ id: input.data.id });+}diff --git a/apps/erp/app/routes/x+/settings+/integrations.tsx b/apps/erp/app/routes/x+/settings+/integrations.tsxindex 0dd03c1d92..3f6392a038 100644--- a/apps/erp/app/routes/x+/settings+/integrations.tsx+++ b/apps/erp/app/routes/x+/settings+/integrations.tsx@@ -18,6 +18,7 @@ import { useEffect } from "react";import type { LoaderFunctionArgs } from "react-router";import { data, useLoaderData, useSearchParams } from "react-router";import { getIntegrationError } from "~/modules/settings/integration-errors";+import { isOAuthPopupResult } from "~/modules/settings/oauth-popup";import { getIntegrationsWithHealth } from "~/modules/settings/settings.service";import { IntegrationsList } from "~/modules/settings/ui";import { path } from "~/utils/path";@@ -121,6 +122,27 @@ export default function IntegrationsRoute() {);}, [integration, integrationError, i18n, setSearchParams]);+ // A connect popup whose state could not be read cannot name its card, so the+ // callback answers to `connection` and no card listener accepts it. Word it here.+ useEffect(() => {+ const onMessage = (event: MessageEvent) => {+ if (event.origin !== window.location.origin) return;+ if (!isOAuthPopupResult(event.data)) return;+ if (event.data.integration !== "connection" || event.data.ok) return;++ const failure = getIntegrationError("connection", event.data.error);+ if (failure) {+ toast.error(i18n._(failure.title), {+ id: `connection:${event.data.error}`,+ description: i18n._(failure.description)+ });+ }+ };++ window.addEventListener("message", onMessage);+ return () => window.removeEventListener("message", onMessage);+ }, [i18n]);+return (<><IntegrationsListdiff --git a/apps/erp/app/routes/x+/workflow+/$id.tsx b/apps/erp/app/routes/x+/workflow+/$id.tsxindex 082ed85081..95803d6d78 100644--- a/apps/erp/app/routes/x+/workflow+/$id.tsx+++ b/apps/erp/app/routes/x+/workflow+/$id.tsx@@ -95,10 +95,12 @@ export async function loader({ request, params }: LoaderFunctionArgs) {const all = versions.data ?? [];const requested = new URL(request.url).searchParams.get("version");+ // Ranked by `versionNumber`, which is what "latest" MEANS here and is never null.+ // Sorting on `updatedAt` alone read a never-edited version as epoch 0, so creating+ // a new version left the builder still showing the older one that happened to have+ // been edited — and a test run then posted that stale id.const mostRecent = [...all].sort(- (a, b) =>- new Date(b.updatedAt ?? 0).getTime() -- new Date(a.updatedAt ?? 0).getTime()+ (a, b) => (b.versionNumber ?? 0) - (a.versionNumber ?? 0))[0];const versionId =(requested && all.some((version) => version.id === requested)diff --git a/apps/erp/app/utils/path.ts b/apps/erp/app/utils/path.tsindex d6544c06d0..9ab1d58055 100644--- a/apps/erp/app/utils/path.ts+++ b/apps/erp/app/utils/path.ts@@ -162,6 +162,9 @@ export const path = {),inspectionDocuments: (itemId: string) =>generatePath(`${api}/quality/inspection-documents/${itemId}`),+ integrationConnect: (piece: string) =>+ generatePath(`${api}/integrations/connections/${piece}/connect`),+ integrationConnectionCallback: `${api}/integrations/connections/callback`,// The Sync Activity pages after the first; the tab adds `after`.integrationSyncActivity: (id: string, status?: string | null) =>`${generatePath(`${api}/integrations/${id}/sync-activity`)}${@@ -422,7 +425,8 @@ export const path = {webhookTables: `${api}/webhook/tables?${build}`,workCenters: `${api}/resources/work-centers`,workCentersByLocation: (id: string) =>- generatePath(`${api}/resources/work-centers?location=${id}`)+ generatePath(`${api}/resources/work-centers?location=${id}`),+ workflowOptions: `${api}/workflows/options`},// The docs render every endpoint against a host. Hand them this deployment's// REST origin so a self-hosted or non-default-region reader sees their own@@ -1423,6 +1427,9 @@ export const path = {inspections: `${x}/quality/inspections`,integration: (id: string) =>generatePath(`${x}/settings/integrations/${id}`),+ integrationAccounts: (id: string) =>+ `${generatePath(`${x}/settings/integrations/${id}`)}?tab=connections`,+ integrationConnections: `${x}/settings/integrations/connections`,integrationDeactivate: (id: string) =>generatePath(`${x}/settings/integrations/deactivate/${id}`),integrations: `${x}/settings/integrations`,diff --git a/ci/src/deploy.ts b/ci/src/deploy.tsindex 756f08ae38..76339b3b23 100644--- a/ci/src/deploy.ts+++ b/ci/src/deploy.ts@@ -48,6 +48,9 @@ export type Workspace = {cloudflare_turnstile_site_key: string | null;controlled_environment: string | null;exchange_rates_api_key: string | null;+ google_client_id: string | null;+ google_client_secret: string | null;+ google_oauth_redirect_url: string | null;google_places_api_key: string | null;inngest_base_url: string | null;inngest_event_key: string | null;@@ -79,7 +82,6 @@ export type Workspace = {slack_client_secret: string | null;slack_oauth_redirect_url: string | null;slack_signing_secret: string | null;- slack_state_secret: string | null;stripe_bypass_company_ids: string | null;stripe_secret_key: string | null;stripe_webhook_secret: string | null;@@ -137,6 +139,9 @@ async function deploy(): Promise<void> {database_url,domain_name,exchange_rates_api_key,+ google_client_id,+ google_client_secret,+ google_oauth_redirect_url,google_places_api_key,inngest_base_url,inngest_event_key,@@ -170,7 +175,6 @@ async function deploy(): Promise<void> {slack_client_secret,slack_oauth_redirect_url,slack_signing_secret,- slack_state_secret,slug,stripe_bypass_company_ids,stripe_secret_key,@@ -305,6 +309,9 @@ async function deploy(): Promise<void> {CONTROLLED_ENVIRONMENT: controlled_environment ?? undefined,DOMAIN: domain_name,EXCHANGE_RATES_API_KEY: exchange_rates_api_key ?? undefined,+ GOOGLE_CLIENT_ID: google_client_id ?? undefined,+ GOOGLE_CLIENT_SECRET: google_client_secret ?? undefined,+ GOOGLE_OAUTH_REDIRECT_URL: google_oauth_redirect_url ?? undefined,GOOGLE_PLACES_API_KEY: google_places_api_key ?? undefined,INNGEST_BASE_URL: inngest_base_url ?? undefined,INNGEST_EVENT_KEY: inngest_event_key,@@ -337,7 +344,6 @@ async function deploy(): Promise<void> {SLACK_CLIENT_SECRET: slack_client_secret ?? undefined,SLACK_OAUTH_REDIRECT_URL: slack_oauth_redirect_url ?? undefined,SLACK_SIGNING_SECRET: slack_signing_secret ?? undefined,- SLACK_STATE_SECRET: slack_state_secret ?? undefined,STRIPE_BYPASS_COMPANY_IDS: stripe_bypass_company_ids ?? undefined,STRIPE_SECRET_KEY: stripe_secret_key ?? undefined,STRIPE_WEBHOOK_SECRET: stripe_webhook_secret ?? undefined,diff --git a/docs/content/docs/integrations/assistant.mdx b/docs/content/docs/integrations/assistant.mdxindex d7dfd96854..e2229367af 100644--- a/docs/content/docs/integrations/assistant.mdx+++ b/docs/content/docs/integrations/assistant.mdx@@ -7,6 +7,9 @@ description: Bring the Carbon Assistant into Slack, with nonconformance notifica## SlackConnect **Slack** through **OAuth** to add the **Carbon Assistant** to your workspace and receive <Term id="nonconformance">nonconformance</Term> notifications. No additional configuration fields are required.+The same install also gives [workflows](/docs/reference/workflows) their Slack steps — sending messages,+finding users, creating channels — as any workspace listed on the card's **"Accounts"** tab; see+[workflow apps](/docs/integrations/workflow-apps).<Steps><Step>diff --git a/docs/content/docs/integrations/meta.json b/docs/content/docs/integrations/meta.jsonindex 4c7d5c9c6a..98070c4375 100644--- a/docs/content/docs/integrations/meta.json+++ b/docs/content/docs/integrations/meta.json@@ -8,6 +8,7 @@"oee","estimating","email",+ "workflow-apps","assistant","setup"]diff --git a/docs/content/docs/integrations/workflow-apps.mdx b/docs/content/docs/integrations/workflow-apps.mdxnew file mode 100644index 0000000000..04176d1697--- /dev/null+++ b/docs/content/docs/integrations/workflow-apps.mdx@@ -0,0 +1,72 @@+---+title: Workflow apps+plan: Business+description: Connect Google Calendar, Gmail, and Slack accounts that workflow steps can act as.+---++A <Term>workflow</Term> can take steps in outside apps: put an event on a Google Calendar, send an email from Gmail, post a Slack message. Each app is an ordinary card under **Settings → Integrations**, and what you connect is an **account** — a specific Google account or Slack workspace that authorized Carbon. A workflow step then names which account it acts as.++## Connecting an account++Install the app's card and a consent popup opens with the vendor. Approve it and Carbon stores the connection; there are no keys to paste and no settings form. The card's **"Accounts"** tab lists every connected account, where you can rename one, use **"Disconnect"**, or **"Add account"** to connect another. Uninstalling the card disconnects every account it connected.++<Callout type="tip" title="Connect one account per identity that should act">+You can connect several accounts to the same app — two Google accounts, say — and different workflow steps can act as different ones. An email sent by a workflow comes from the connected Google account itself, so "orders@" and "quality@" can each be a connection.+</Callout>++<Callout type="note" title="Carbon asks for the minimum permissions">+The consent screen asks only for what the available steps use. Gmail is the clearest case: Carbon asks for permission to **send** email, never to read the mailbox.+</Callout>++## When an account says "Reconnect needed"++An account records what the vendor granted when it was connected. If a later version of Carbon needs a permission that account never granted, the account shows **"Reconnect needed"** on the Accounts tab, the builder offers a reconnect link instead of the account, and a step that tries to run with it fails with instructions rather than a cryptic vendor error. **"Reconnect"** simply re-runs the consent for the same account; nothing else changes.++Disconnecting works the same way in reverse: the account stops working but is not erased, so a workflow step that referenced it says clearly that its account needs reconnecting instead of silently pointing at nothing.++## Google Calendar++Connect a Google account to work with its calendars. Two steps:++| Step | What it does |+| --- | --- |+| **"Google Calendar: Create Event"** | Puts an event on a calendar you pick, with title, times, and guests. |+| **"Google Calendar: Get all Events"** | Reads the events in a time window, in chronological order, ready for a **Filter** step or a repeating step. |++Recurring events are expanded into their individual occurrences, so "events tomorrow" includes tomorrow's instance of a weekly meeting.++## Gmail++Connect a Google account to send email as that account, with **"Gmail: Send Email"**. The same Google consent covers Calendar and Gmail, but each card connects its own accounts.++<Callout type="note" title="Send-only, on purpose">+Carbon never asks Google for permission to read or search the mailbox — only to send. There is no read-inbox or reply-to-thread step, and the recipient sees the mail come from the connected account like any other message it sends.+</Callout>++Emails are sent as HTML, so a record you drop into the body arrives as a clickable link back to that record in Carbon.++## Slack++One Slack install serves two purposes: it puts the [Carbon Assistant](/docs/integrations/assistant) in your workspace, and it gives workflows four steps.++| Step | What it does |+| --- | --- |+| **"Slack: Send Message To A Channel"** | Posts to a channel you pick. |+| **"Slack: Send Message To A User"** | Sends a direct message. |+| **"Slack: Find User by Email"** | Looks a workspace member up, so a later step can DM them. |+| **"Slack: Create Channel"** | Creates a channel, such as one per issue. |++Records dropped into a message render as links back to Carbon. As with Google, you can connect more than one workspace and pick per step which one posts.++A Slack workspace can be connected to one Carbon company only. If another company already has it connected, Carbon refuses with **"That workspace is connected to another company"**: disconnect it there first, or connect a different workspace.++<Callout type="warn">+Slack is hidden in controlled (ITAR) environments — when Carbon runs in a controlled deployment, the card doesn't appear at all.+</Callout>++## Related++<Cards>+ <Card title="Workflows" href="/docs/reference/workflows">The builder these accounts are used from — triggers, steps, publishing.</Card>+ <Card title="Assistant" href="/docs/integrations/assistant">The other half of the Slack install.</Card>+</Cards>diff --git a/docs/content/docs/platform/self-hosting/environment-variables.mdx b/docs/content/docs/platform/self-hosting/environment-variables.mdxindex 9307b8addd..68a51f9634 100644--- a/docs/content/docs/platform/self-hosting/environment-variables.mdx+++ b/docs/content/docs/platform/self-hosting/environment-variables.mdx@@ -124,6 +124,9 @@ OAuth credentials for each connector, all optional, set only the ones you use.<EnvVar name="ONSHAPE_V2_CLIENT_ID" type="string">Client id of the Onshape OAuth application for the panel integration (`onshape-v2`), a separate application from the pull integration's. Without it the Onshape V2 card reads Not Configured.</EnvVar><EnvVar name="ONSHAPE_V2_CLIENT_SECRET" type="string">Client secret of the panel integration's Onshape OAuth application.</EnvVar><EnvVar name="ONSHAPE_V2_OAUTH_REDIRECT_URL" type="url">Callback for the panel integration: `https://<erp-host>/api/integrations/onshape-v2/oauth`. Must be registered on the panel integration's Onshape application. Without it the Onshape V2 Connect button fails with "Onshape isn't configured".</EnvVar>+<EnvVar name="GOOGLE_CLIENT_ID" type="string">Client id of the Google OAuth application used by the Google Calendar and Gmail workflow steps. Without it both cards read Coming soon.</EnvVar>+<EnvVar name="GOOGLE_CLIENT_SECRET" type="string">Client secret of that Google OAuth application.</EnvVar>+<EnvVar name="GOOGLE_OAUTH_REDIRECT_URL" type="url">Callback for workflow integration connections: `https://<erp-host>/api/integrations/connections/callback`. Must be registered on the Google OAuth application.</EnvVar><EnvVar name="EXCHANGE_RATES_API_KEY" type="string">Currency exchange-rate feed.</EnvVar><EnvVar name="GOOGLE_PLACES_API_KEY" type="string">Address autocomplete.</EnvVar></EnvVars>diff --git a/docs/content/docs/reference/workflows.mdx b/docs/content/docs/reference/workflows.mdxindex 0697e0f2dd..a24a75ba64 100644--- a/docs/content/docs/reference/workflows.mdx+++ b/docs/content/docs/reference/workflows.mdx@@ -36,13 +36,14 @@ Carbon stores the wall-clock time and time zone separately, so 09:00 remains 09:## The steps you can add-Six kinds, in palette order:+Seven kinds, in palette order:| Step | What it does || --- | --- || **Trigger** | Starts the workflow. One per workflow, and nothing can connect into it. || **Condition** | Sends the run down one path. Each path is a set of clauses, with an optional **"Otherwise"**. || **Action** | Does the work — notifies, creates, updates, or calls out. Has separate **Success** and **Failure** handles. |+| **Integration** | Runs a step in a connected app — Google Calendar, Gmail, or Slack — acting as an account you connected. || **Compute** | Works out a number from a record, such as an order total or a scrap percentage. Read-only. || **Find** | Looks a record up so later steps can use it. || **Filter** | Keeps only the items in a list that match your rules. |@@ -59,6 +60,24 @@ Most fields take either a value you type or a value from an earlier step. Type `**Repeating steps.** Connecting a list to a single-value field runs the step once per item, up to 100 items. The form displays this behavior. Connecting two lists to one step causes a publish-time error because the loop source is ambiguous.+## Steps in connected apps++An **Integration** step acts in an outside app. Drop one on the canvas, pick the **"App"**, then the **"Step"** — **"Gmail: Send Email"**, **"Slack: Send Message To A Channel"**, **"Google Calendar: Create Event"**, and so on. The apps themselves, and the accounts they act as, are set up under **Settings → Integrations**; see [workflow apps](/docs/integrations/workflow-apps).++An app you haven't connected offers no steps. The form says so — *"… isn't connected yet. Connect an account before this step can use it."* — with a **"Connect"** button that opens the app's card in a new tab, so the canvas survives the detour.++**Which account acts.** Every step of an app carries an account choice. With exactly one account connected the field doesn't render, but the account is still stored on the step — so connecting a second account later never silently repoints existing workflows. If a step's stored account was disconnected or needs reconnecting, the form shows a banner with an **"Open … accounts"** link rather than failing quietly at run time.++**Advanced properties.** Fields the vendor requires but you rarely change sit in a collapsed **"Advanced properties"** section, pre-filled with sensible values. A value you set there wins over the default.++**Records become links where the app can show them.** Drop a record into a Slack message or a Gmail body and the recipient gets a clickable link back to that record in Carbon. Where the destination can't render a link — or a setting has turned it off, such as switching Gmail's body to plain text — the record appears as its plain name, and the builder says so under the field: *"Records here appear as plain text …"*.++<Callout type="note" title="The vendor's answer is the step's outcome">+An integration step runs as the connected account, not as the workflow's owner, on the vendor's side. If the vendor refuses, the step fails with the vendor's own message in run history; if the account is missing a permission, the message instead points you to the fix — reconnect the account under the app's **"Accounts"** tab.+</Callout>++Everything else works like an action: variables and the **Success** and **Failure** handles. The one exception is repeating — an integration step doesn't yet run once per item when a list is wired into a single-value field, so the builder flags that wiring instead of guessing.+## Calling an outside URLThe **"Call an outside URL"** action sends an HTTP request, a <Term>webhook</Term>, so another system can react to something in Carbon.@@ -80,7 +99,7 @@ There is no Save button: the builder saves as you work and reports **"Saving…"**"Publish"** is all-or-nothing. Carbon validates the whole workflow — a trigger exists, no step loops back, every required field is filled, every variable resolves and comes from upstream — and if anything is wrong, nothing is written; the problems appear in a panel and clicking one pans the canvas to the offending step. Publishing is also the only on/off switch: whichever version you publish is the one that runs, and **"Unpublish"** stops the workflow entirely. Nothing is deleted, so publishing again starts it back up. A workflow with nothing published reads as **Draft**.-Publishing freezes that version. To keep working, use the version menu to create a new version, which copies the published one and numbers it one higher. A run already in flight keeps using the version it started with even if you publish another mid-run. The trigger card also has a **"Test run"** button (owner only): it executes for real, but the result is never written to run history.+Publishing freezes that version. To keep working, use the version menu to create a new version, which copies the published one and numbers it one higher. A run already in flight keeps using the version it started with even if you publish another mid-run. The trigger card also has a **"Test run"** button (owner only): it executes for real, and the run is saved to run history with a **"Test"** badge.## Who can do what@@ -124,6 +143,7 @@ A finished run cannot be re-run from the Runs page. Fix the outside cause and le## Related<Cards>+ <Card title="Workflow apps" href="/docs/integrations/workflow-apps">Connecting the Google Calendar, Gmail, and Slack accounts integration steps act as.</Card><Card title="Notifications" href="/docs/reference/notifications">Where a workflow's "Notify someone" step lands, and how people mute topics.</Card><Card title="Approvals" href="/docs/reference/approvals">Rule-based gates on documents, the other half of Automation.</Card><Card title="Audit log" href="/docs/reference/audit-log">The separate, entity-centric record of who changed what.</Card>@@ -132,14 +152,14 @@ A finished run cannot be re-run from the Runs page. Fix the outside cause and le<AgentContext>## Internals, exact messages, and troubleshooting-Builder: the variable menu placeholder is "Type { to insert a variable"; cross-branch references are rejected at publish with "This uses a value from a step that does not always run before it."; a list wired into a single-value field confirms "A list is wired into … so this step runs once for each item in it — up to 100." The Compute step was previously named "Record" — old workflows open as Compute and keep their step names. Webhook: blocked headers fail publish with "… is set by Carbon and cannot be changed here."; Content-Type defaults to application/json on body-carrying methods; the response status is the step's output and the first part of the body is kept in the step summary. Publish problems appear in a panel headed like "3 problems — not published". The published-version lock reads "This version is published. Create a new version to edit." Test run notes "The result will not appear on the Runs page."+Builder: the variable menu placeholder is "Type { to insert a variable"; cross-branch references are rejected at publish with "This uses a value from a step that does not always run before it."; a list wired into a single-value field confirms "A list is wired into … so this step runs once for each item in it — up to 100." The Compute step was previously named "Record" — old workflows open as Compute and keep their step names. Webhook: blocked headers fail publish with "… is set by Carbon and cannot be changed here."; Content-Type defaults to application/json on body-carrying methods; the response status is the step's output and the first part of the body is kept in the step summary. Publish problems appear in a panel headed like "3 problems — not published". The published-version lock reads "This version is published. Create a new version to edit." The test run panel's footer reads "Test runs are saved to the run history, marked as tests."Runs: step statuses are Running / Succeeded / Failed / Skipped only (Queued and Blocked are run-level). Outcome sentence examples: "Completed — 4 of 6 steps ran."; "Nothing happened — 'only if overdue' matched none of its conditions, so the 3 steps after it never ran."; "Stopped early — 'find the customer' was skipped: That list was empty, so there was nothing to do."; "Blocked — Cycle: this workflow already ran in this chain". Skip labels: "Not reached", "Skipped — the check above didn't match", "Skipped — an earlier step failed". Repeating summaries: "Ran 3 of 3; 1 failed." — the summary succeeds if at least one item succeeded; an empty list is one skipped step ("That list was empty, so there was nothing to do."). Blocked reasons: "Cycle: this workflow already ran in this chain" and "Chain depth limit reached (10 hops)". A "Show raw" toggle dumps the underlying JSON. Scheduled runs have a blank Record cell.Retention banners: the 24-hour reaper writes "This run stopped reporting and was closed automatically after 24 hours."; after summarising the drawer shows "Values in this run have been summarised. Full detail is kept for 7 days."; after step deletion, "Step detail is kept for 30 days. This run's steps have been removed." Redacted key patterns include secret, token, password, authorization, api key, bearer, cookie; deliberately NOT redacted: itemKey, authorizedBy, keyword, sessionId. Owner-permission failures read like "The owner of this workflow no longer has access to Purchasing."### A run is missing from the Runs page-Test runs are never written to history. Scheduled runs more than an hour late are recorded as Skipped, not missing. Runs older than 90 days are deleted by retention.+Test runs are saved and listed with a "Test" badge. Scheduled runs more than an hour late are recorded as Skipped, not missing. Runs older than 90 days are deleted by retention.### Why did my workflow fire twice / react to itself?"Triggered by" is set to "Both" (or "Workflows"). Set it to "People" to ignore workflow-caused edits, including its own.diff --git a/packages/auth/src/lib/oauth-state.server.test.ts b/packages/auth/src/lib/oauth-state.server.test.tsindex f7fbf02af7..f4fb9b9db1 100644--- a/packages/auth/src/lib/oauth-state.server.test.ts+++ b/packages/auth/src/lib/oauth-state.server.test.ts@@ -13,6 +13,7 @@ import {} from "vitest";import {consumeOAuthState,+ consumeOAuthStateByValue,issueOAuthState,issueOAuthStates} from "./oauth-state.server";@@ -204,3 +205,141 @@ describe("OAuth state session", () => {expect(consumed.valid).toBe(false);});});++// One redirect URI serves every workflow piece, so their callback finds the+// state by its value instead of by an integration it cannot know yet.+describe("OAuth state found by value", () => {+ const piece = {+ integrationId: "google-calendar",+ userId: "user-1",+ companyId: "company-1",+ name: "Ops calendar",+ connectionId: "icn_1"+ };+ const owner = { userId: piece.userId, companyId: piece.companyId };++ beforeEach(() => {+ vi.useFakeTimers();+ vi.setSystemTime(new Date("2026-09-11T12:00:00Z"));+ });++ afterEach(() => {+ vi.useRealTimers();+ });++ it("returns the entry holding the value, with the integration and its extras", async () => {+ const issued = await issueOAuthState(piece);+ const consumed = await consumeOAuthStateByValue(+ requestWithCookie(cookieHeader(issued.cookie)),+ issued.state,+ owner+ );++ expect(consumed.valid).toBe(true);+ expect(consumed.payload).toMatchObject({+ integrationId: "google-calendar",+ name: "Ops calendar",+ connectionId: "icn_1"+ });+ });++ it.each([+ ["user", { ...owner, userId: "user-2" }],+ ["company", { ...owner, companyId: "company-2" }]+ ])(+ "refuses another %s, and returns nothing from the entry",+ async (_label, other) => {+ const issued = await issueOAuthState(piece);+ const consumed = await consumeOAuthStateByValue(+ requestWithCookie(cookieHeader(issued.cookie)),+ issued.state,+ other+ );++ expect(consumed.valid).toBe(false);+ expect(consumed.payload).toBeUndefined();+ }+ );++ it("refuses an expired state", async () => {+ const issued = await issueOAuthState(piece);+ vi.advanceTimersByTime(60 * 60 * 1000 + 1);++ const consumed = await consumeOAuthStateByValue(+ requestWithCookie(cookieHeader(issued.cookie)),+ issued.state,+ owner+ );++ expect(consumed.valid).toBe(false);+ });++ it("refuses a value no entry holds", async () => {+ const issued = await issueOAuthState(piece);+ const consumed = await consumeOAuthStateByValue(+ requestWithCookie(cookieHeader(issued.cookie)),+ "not-a-state",+ owner+ );++ expect(consumed.valid).toBe(false);+ });++ it("is single-use, even when the first attempt was refused", async () => {+ const issued = await issueOAuthState(piece);+ const refused = await consumeOAuthStateByValue(+ requestWithCookie(cookieHeader(issued.cookie)),+ issued.state,+ { ...owner, userId: "user-2" }+ );+ const retried = await consumeOAuthStateByValue(+ requestWithCookie(cookieHeader(refused.cookie)),+ issued.state,+ owner+ );++ expect(refused.valid).toBe(false);+ expect(retried.valid).toBe(false);+ });++ it("leaves other integrations' pending states in place", async () => {+ const ramp = await issueOAuthState(expected);+ const both = await issueOAuthState(+ piece,+ requestWithCookie(cookieHeader(ramp.cookie))+ );++ const pieceConsumed = await consumeOAuthStateByValue(+ requestWithCookie(cookieHeader(both.cookie)),+ both.state,+ owner+ );+ const rampConsumed = await consumeOAuthState(+ requestWithCookie(cookieHeader(pieceConsumed.cookie)),+ ramp.state,+ expected+ );++ expect(pieceConsumed.valid).toBe(true);+ expect(rampConsumed.valid).toBe(true);+ });++ // The account name rides the cookie into the saved connection, so a state+ // issued for one account must never serve a connect for another.+ it("issues a new state for another account instead of reusing one", async () => {+ const first = await issueOAuthState(piece);+ const second = await issueOAuthState(+ { ...piece, name: "Sales calendar", connectionId: undefined },+ requestWithCookie(cookieHeader(first.cookie))+ );++ expect(second.state).not.toBe(first.state);+ const consumed = await consumeOAuthStateByValue(+ requestWithCookie(cookieHeader(second.cookie)),+ second.state,+ owner+ );+ expect(consumed.payload?.name).toBe("Sales calendar");+ expect(consumed.payload?.connectionId).toBeUndefined();+ });+});diff --git a/packages/auth/src/lib/oauth-state.server.ts b/packages/auth/src/lib/oauth-state.server.tsindex a6d9b34b1b..6b9e0f8c8b 100644--- a/packages/auth/src/lib/oauth-state.server.ts+++ b/packages/auth/src/lib/oauth-state.server.ts@@ -40,9 +40,14 @@ export type OAuthStatePayload = {** It is deliberately NOT part of the match: the callback has no independent copy* to compare against, so "matching" it would only compare the cookie to itself.+ *+ * `name` and `connectionId` are the same kind of field for a workflow piece: the+ * account the consent is saved under, and the one row a Reconnect revives.*/export type OAuthStateExtras = {mode?: string;+ name?: string;+ connectionId?: string;};type StoredOAuthState = OAuthStatePayload &@@ -53,6 +58,21 @@ type StoredOAuthState = OAuthStatePayload &type StoredOAuthStates = Record<string, StoredOAuthState>;+function extrasOf(stored: StoredOAuthState): OAuthStateExtras {+ return {+ mode: stored.mode,+ name: stored.name,+ connectionId: stored.connectionId+ };+}++/** A state issued for other extras is never handed to a connect for these. */+function sameExtras(a: OAuthStateExtras, b: OAuthStateExtras) {+ return (+ a.mode === b.mode && a.name === b.name && a.connectionId === b.connectionId+ );+}+const isTestEdition = CarbonEdition === Edition.Test;const cookieDomain = isTestEdition ? undefined : getCookieDomain(DOMAIN);@@ -147,9 +167,9 @@ export async function issueOAuthStates(!!existing &&existing.userId === payload.userId &&existing.companyId === payload.companyId &&- // `mode` rides the cookie to be stamped on the install, so a state issued- // for one mode must never be handed to a connect for another.- existing.mode === payload.mode &&+ // The extras ride the cookie to be acted on by the callback, so a state+ // issued for one mode (or account) must never serve a connect for another.+ sameExtras(existing, payload) &&existing.expiresAt - now >= OAUTH_STATE_REUSE_MIN_REMAINING_MS;if (reusable) {@@ -185,42 +205,88 @@ export async function issueOAuthState(}/**- * Check a callback's `state` against the one stored for `expected.integrationId`- * and remove it — single-use whether or not it matched. Other integrations'- * pending states are left in place.+ * Remove the entry `find` picks and say whether it is valid for `state` and the+ * session's user and company. Single-use whether or not it matched; every other+ * pending entry is left in place.*/-export async function consumeOAuthState(+async function consumeStoredState(request: Request,state: string,- expected: OAuthStatePayload+ owner: Pick<OAuthStatePayload, "userId" | "companyId">,+ find: (states: StoredOAuthStates) => StoredOAuthState | undefined) {const session = await oauthStateStorage.getSession(request.headers.get("Cookie"));const states = readStates(session);- const stored = states[expected.integrationId];+ const stored = find(states);const valid =!!stored &&!!state &&stored.expiresAt > Date.now() &&stored.state === state &&- stored.integrationId === expected.integrationId &&- stored.userId === expected.userId &&- stored.companyId === expected.companyId;+ stored.userId === owner.userId &&+ stored.companyId === owner.companyId;- delete states[expected.integrationId];+ if (stored) delete states[stored.integrationId];return {valid,cookie: await commitStates(session, states),- /**- * The stored payload, for fields the callback cannot re-derive — only when- * the state was VALID. Returning it on an invalid state would hand the- * caller attacker-supplied values that passed no check.- */- payload: valid- ? ({ mode: stored?.mode } satisfies OAuthStateExtras)+ // Only a VALID entry leaves this function: an invalid one would hand the+ // caller attacker-supplied values that passed no check.+ stored: valid ? stored : undefined+ };+}++/**+ * Check a callback's `state` against the one stored for `expected.integrationId`+ * and remove it — single-use whether or not it matched. Other integrations'+ * pending states are left in place.+ */+export async function consumeOAuthState(+ request: Request,+ state: string,+ expected: OAuthStatePayload+) {+ const { valid, cookie, stored } = await consumeStoredState(+ request,+ state,+ expected,+ (states) => states[expected.integrationId]+ );+ return {+ valid,+ cookie,+ /** The stored extras, for fields the callback cannot re-derive — only when+ * the state was VALID. */+ payload: stored ? extrasOf(stored) : undefined+ };+}++/**+ * For a callback shared by several integrations (the workflow pieces' one+ * redirect URI), which cannot know the integration before reading the state:+ * find the pending entry holding `state`, check it like `consumeOAuthState`, and+ * remove it. The payload names the integration, only when the state was valid.+ */+export async function consumeOAuthStateByValue(+ request: Request,+ state: string,+ owner: Pick<OAuthStatePayload, "userId" | "companyId">+) {+ const { valid, cookie, stored } = await consumeStoredState(+ request,+ state,+ owner,+ (states) => Object.values(states).find((entry) => entry.state === state)+ );+ return {+ valid,+ cookie,+ payload: stored+ ? { integrationId: stored.integrationId, ...extrasOf(stored) }: undefined};}diff --git a/packages/database/src/authz/manifest.ts b/packages/database/src/authz/manifest.tsindex 3b74ffce3e..a58e13262f 100644--- a/packages/database/src/authz/manifest.ts+++ b/packages/database/src/authz/manifest.ts@@ -658,6 +658,15 @@ export const manifest = {inspectionSample: company("quality", { read: "quality_view" }),inspectionSamplingPlan: company("quality", { read: "quality_view" }),integration: policies({ select: authenticated }),+ // Read-only to API roles: a user-written row could claim another company's Slack+ // team_id or point secretRef at someone else's vault secret. The server writes it+ // with the service role after its own permission check.+ integrationConnection: company("settings", {+ read: "settings_view",+ create: false,+ update: false,+ delete: false+ }),intercompanyEliminationLine: company("accounting"),intercompanyTransaction: policies({select: or(diff --git a/packages/database/src/swagger-docs-schema.ts b/packages/database/src/swagger-docs-schema.tsindex 4c869c78f7..b0d5aac9f5 100644--- a/packages/database/src/swagger-docs-schema.ts+++ b/packages/database/src/swagger-docs-schema.ts@@ -8229,9 +8229,6 @@ export default {{$ref: "#/parameters/rowFilter.jobOperationsWithDependencies.assemblyInstructionId"},- {- $ref: "#/parameters/rowFilter.jobOperationsWithDependencies.readyAt"- },{$ref: "#/parameters/rowFilter.jobOperationsWithDependencies.inspectionDocumentId"},@@ -8435,9 +8432,6 @@ export default {{$ref: "#/parameters/rowFilter.jobOperationsWithDependencies.assemblyInstructionId"},- {- $ref: "#/parameters/rowFilter.jobOperationsWithDependencies.readyAt"- },{$ref: "#/parameters/rowFilter.jobOperationsWithDependencies.inspectionDocumentId"},@@ -8595,9 +8589,6 @@ export default {{$ref: "#/parameters/rowFilter.jobOperationsWithDependencies.assemblyInstructionId"},- {- $ref: "#/parameters/rowFilter.jobOperationsWithDependencies.readyAt"- },{$ref: "#/parameters/rowFilter.jobOperationsWithDependencies.inspectionDocumentId"},@@ -23946,6 +23937,9 @@ export default {{$ref: "#/parameters/rowFilter.jobs.priority"},+ {+ $ref: "#/parameters/rowFilter.jobs.productionQuantity"+ },{$ref: "#/parameters/rowFilter.jobs.projectedCompletionAt"},@@ -23955,9 +23949,6 @@ export default {{$ref: "#/parameters/rowFilter.jobs.scheduleOutdatedAt"},- {- $ref: "#/parameters/rowFilter.jobs.productionQuantity"- },{$ref: "#/parameters/rowFilter.jobs.fixedAssetClassId"},@@ -38967,6 +38958,9 @@ export default {{$ref: "#/parameters/rowFilter.job.priority"},+ {+ $ref: "#/parameters/rowFilter.job.productionQuantity"+ },{$ref: "#/parameters/rowFilter.job.projectedCompletionAt"},@@ -38976,9 +38970,6 @@ export default {{$ref: "#/parameters/rowFilter.job.scheduleOutdatedAt"},- {- $ref: "#/parameters/rowFilter.job.productionQuantity"- },{$ref: "#/parameters/rowFilter.job.fixedAssetClassId"},@@ -39155,6 +39146,9 @@ export default {{$ref: "#/parameters/rowFilter.job.priority"},+ {+ $ref: "#/parameters/rowFilter.job.productionQuantity"+ },{$ref: "#/parameters/rowFilter.job.projectedCompletionAt"},@@ -39164,9 +39158,6 @@ export default {{$ref: "#/parameters/rowFilter.job.scheduleOutdatedAt"},- {- $ref: "#/parameters/rowFilter.job.productionQuantity"- },{$ref: "#/parameters/rowFilter.job.fixedAssetClassId"},@@ -39297,6 +39288,9 @@ export default {{$ref: "#/parameters/rowFilter.job.priority"},+ {+ $ref: "#/parameters/rowFilter.job.productionQuantity"+ },{$ref: "#/parameters/rowFilter.job.projectedCompletionAt"},@@ -39306,9 +39300,6 @@ export default {{$ref: "#/parameters/rowFilter.job.scheduleOutdatedAt"},- {- $ref: "#/parameters/rowFilter.job.productionQuantity"- },{$ref: "#/parameters/rowFilter.job.fixedAssetClassId"},@@ -50362,10 +50353,10 @@ export default {$ref: "#/parameters/rowFilter.jobOperation.assemblyInstructionId"},{- $ref: "#/parameters/rowFilter.jobOperation.readyAt"+ $ref: "#/parameters/rowFilter.jobOperation.inspectionDocumentId"},{- $ref: "#/parameters/rowFilter.jobOperation.inspectionDocumentId"+ $ref: "#/parameters/rowFilter.jobOperation.readyAt"},{$ref: "#/parameters/rowFilter.jobOperation.projectedCompletionAt"@@ -50571,10 +50562,10 @@ export default {$ref: "#/parameters/rowFilter.jobOperation.assemblyInstructionId"},{- $ref: "#/parameters/rowFilter.jobOperation.readyAt"+ $ref: "#/parameters/rowFilter.jobOperation.inspectionDocumentId"},{- $ref: "#/parameters/rowFilter.jobOperation.inspectionDocumentId"+ $ref: "#/parameters/rowFilter.jobOperation.readyAt"},{$ref: "#/parameters/rowFilter.jobOperation.projectedCompletionAt"@@ -50734,10 +50725,10 @@ export default {$ref: "#/parameters/rowFilter.jobOperation.assemblyInstructionId"},{- $ref: "#/parameters/rowFilter.jobOperation.readyAt"+ $ref: "#/parameters/rowFilter.jobOperation.inspectionDocumentId"},{- $ref: "#/parameters/rowFilter.jobOperation.inspectionDocumentId"+ $ref: "#/parameters/rowFilter.jobOperation.readyAt"},{$ref: "#/parameters/rowFilter.jobOperation.projectedCompletionAt"@@ -81216,6 +81207,240 @@ export default {tags: ["materialTypes"]}},+ "/integrationConnection": {+ get: {+ parameters: [+ {+ $ref: "#/parameters/rowFilter.integrationConnection.id"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.companyId"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.pieceName"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.name"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.authType"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.accountLabel"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.metadata"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.secretRef"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.expiresAt"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.refreshingAt"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.status"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.lastError"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.createdBy"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.createdAt"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.updatedBy"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.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/integrationConnection"+ },+ type: "array"+ }+ },+ "206": {+ description: "Partial Content"+ }+ },+ tags: ["integrationConnection"]+ },+ post: {+ parameters: [+ {+ $ref: "#/parameters/body.integrationConnection"+ },+ {+ $ref: "#/parameters/select"+ },+ {+ $ref: "#/parameters/preferPost"+ }+ ],+ responses: {+ "201": {+ description: "Created"+ }+ },+ tags: ["integrationConnection"]+ },+ delete: {+ parameters: [+ {+ $ref: "#/parameters/rowFilter.integrationConnection.id"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.companyId"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.pieceName"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.name"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.authType"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.accountLabel"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.metadata"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.secretRef"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.expiresAt"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.refreshingAt"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.status"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.lastError"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.createdBy"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.createdAt"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.updatedBy"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.updatedAt"+ },+ {+ $ref: "#/parameters/preferReturn"+ }+ ],+ responses: {+ "204": {+ description: "No Content"+ }+ },+ tags: ["integrationConnection"]+ },+ patch: {+ parameters: [+ {+ $ref: "#/parameters/rowFilter.integrationConnection.id"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.companyId"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.pieceName"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.name"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.authType"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.accountLabel"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.metadata"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.secretRef"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.expiresAt"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.refreshingAt"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.status"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.lastError"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.createdBy"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.createdAt"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.updatedBy"+ },+ {+ $ref: "#/parameters/rowFilter.integrationConnection.updatedAt"+ },+ {+ $ref: "#/parameters/body.integrationConnection"+ },+ {+ $ref: "#/parameters/preferReturn"+ }+ ],+ responses: {+ "204": {+ description: "No Content"+ }+ },+ tags: ["integrationConnection"]+ }+ },"/journalLineDimension": {get: {parameters: [@@ -93021,9 +93246,6 @@ export default {{$ref: "#/parameters/rowFilter.jobOperationsWithMakeMethods.assemblyInstructionId"},- {- $ref: "#/parameters/rowFilter.jobOperationsWithMakeMethods.readyAt"- },{$ref: "#/parameters/rowFilter.jobOperationsWithMakeMethods.inspectionDocumentId"},@@ -102552,9 +102774,6 @@ export default {{$ref: "#/parameters/rowFilter.companySettings.returnPickedMaterialTiming"},- {- $ref: "#/parameters/rowFilter.companySettings.salesRuleNotificationGroup"- },{$ref: "#/parameters/rowFilter.companySettings.showCurrencyTrailingZeros"},@@ -102564,6 +102783,9 @@ export default {{$ref: "#/parameters/rowFilter.companySettings.allowLowercaseItemIds"},+ {+ $ref: "#/parameters/rowFilter.companySettings.salesRuleNotificationGroup"+ },{$ref: "#/parameters/rowFilter.companySettings.includeOperationsOnTraveler"},@@ -102839,9 +103061,6 @@ export default {{$ref: "#/parameters/rowFilter.companySettings.returnPickedMaterialTiming"},- {- $ref: "#/parameters/rowFilter.companySettings.salesRuleNotificationGroup"- },{$ref: "#/parameters/rowFilter.companySettings.showCurrencyTrailingZeros"},@@ -102851,6 +103070,9 @@ export default {{$ref: "#/parameters/rowFilter.companySettings.allowLowercaseItemIds"},+ {+ $ref: "#/parameters/rowFilter.companySettings.salesRuleNotificationGroup"+ },{$ref: "#/parameters/rowFilter.companySettings.includeOperationsOnTraveler"},@@ -103080,9 +103302,6 @@ export default {{$ref: "#/parameters/rowFilter.companySettings.returnPickedMaterialTiming"},- {- $ref: "#/parameters/rowFilter.companySettings.salesRuleNotificationGroup"- },{$ref: "#/parameters/rowFilter.companySettings.showCurrencyTrailingZeros"},@@ -103092,6 +103311,9 @@ export default {{$ref: "#/parameters/rowFilter.companySettings.allowLowercaseItemIds"},+ {+ $ref: "#/parameters/rowFilter.companySettings.salesRuleNotificationGroup"+ },{$ref: "#/parameters/rowFilter.companySettings.includeOperationsOnTraveler"},@@ -108030,6 +108252,82 @@ export default {tags: ["(rpc) get_company_groups_for_employee"]}},+ "/rpc/save_connection": {+ post: {+ parameters: [+ {+ in: "body",+ name: "args",+ required: true,+ schema: {+ properties: {+ p_account_label: {+ format: "text",+ type: "string"+ },+ p_auth_type: {+ format: "text",+ type: "string"+ },+ p_company_id: {+ format: "text",+ type: "string"+ },+ p_connection_id: {+ format: "text",+ type: "string"+ },+ p_expires_at: {+ format: "timestamp with time zone",+ type: "string"+ },+ p_metadata: {+ format: "jsonb"+ },+ p_name: {+ format: "text",+ type: "string"+ },+ p_piece_name: {+ format: "text",+ type: "string"+ },+ p_secret: {+ format: "jsonb"+ },+ p_user_id: {+ format: "text",+ type: "string"+ }+ },+ required: [+ "p_company_id",+ "p_piece_name",+ "p_name",+ "p_auth_type",+ "p_secret",+ "p_user_id"+ ],+ 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) save_connection"]+ }+ },"/rpc/getIntercompanyBalance": {post: {parameters: [@@ -110427,6 +110725,45 @@ export default {tags: ["(rpc) upsert_to_search_index"]}},+ "/rpc/get_connection_secret": {+ post: {+ parameters: [+ {+ in: "body",+ name: "args",+ required: true,+ schema: {+ properties: {+ p_company_id: {+ format: "text",+ type: "string"+ },+ p_connection_id: {+ format: "text",+ type: "string"+ }+ },+ required: ["p_company_id", "p_connection_id"],+ 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) get_connection_secret"]+ }+ },"/rpc/translateTrialBalance": {post: {parameters: [@@ -113409,6 +113746,45 @@ export default {tags: ["(rpc) users_for_groups"]}},+ "/rpc/delete_connection_secret": {+ post: {+ parameters: [+ {+ in: "body",+ name: "args",+ required: true,+ schema: {+ properties: {+ p_company_id: {+ format: "text",+ type: "string"+ },+ p_connection_id: {+ format: "text",+ type: "string"+ }+ },+ required: ["p_company_id", "p_connection_id"],+ 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) delete_connection_secret"]+ }+ },"/rpc/get_recent_job_operations_by_employee": {post: {parameters: [@@ -116572,6 +116948,53 @@ export default {tags: ["(rpc) get_next_prefixed_sequence"]}},+ "/rpc/revoke_connections": {+ post: {+ parameters: [+ {+ in: "body",+ name: "args",+ required: true,+ schema: {+ properties: {+ p_company_id: {+ format: "text",+ type: "string"+ },+ p_connection_id: {+ format: "text",+ type: "string"+ },+ p_piece_name: {+ format: "text",+ type: "string"+ },+ p_updated_by: {+ format: "text",+ type: "string"+ }+ },+ required: ["p_company_id", "p_piece_name", "p_updated_by"],+ 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) revoke_connections"]+ }+ },"/rpc/get_maintenance_schedules_by_location": {post: {parameters: [@@ -116945,6 +117368,48 @@ export default {tags: ["(rpc) get_material_details"]}},+ "/rpc/upsert_connection_secret": {+ post: {+ parameters: [+ {+ in: "body",+ name: "args",+ required: true,+ schema: {+ properties: {+ p_company_id: {+ format: "text",+ type: "string"+ },+ p_connection_id: {+ format: "text",+ type: "string"+ },+ p_secret: {+ format: "jsonb"+ }+ },+ required: ["p_company_id", "p_connection_id", "p_secret"],+ 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) upsert_connection_secret"]+ }+ },"/rpc/xid_counter": {post: {parameters: [@@ -122331,10 +122796,6 @@ export default {format: "text",type: "string"},- readyAt: {- format: "timestamp with time zone",- type: "string"- },inspectionDocumentId: {description:"Note:\nThis is a Foreign Key to `inspectionDocument.id`.<fk table='inspectionDocument' column='id'/>",@@ -129849,6 +130310,10 @@ export default {format: "double precision",type: "number"},+ productionQuantity: {+ format: "numeric",+ type: "number"+ },projectedCompletionAt: {format: "timestamp with time zone",type: "string"@@ -129861,10 +130326,6 @@ export default {format: "timestamp with time zone",type: "string"},- productionQuantity: {- format: "numeric",- type: "number"- },fixedAssetClassId: {description:"Note:\nThis is a Foreign Key to `fixedAssetClass.id`.<fk table='fixedAssetClass' column='id'/>",@@ -137179,6 +137640,10 @@ export default {format: "double precision",type: "number"},+ productionQuantity: {+ format: "numeric",+ type: "number"+ },projectedCompletionAt: {description:"Simulated finish of the job's last operation (forward-ASAP finite schedule). Null until first regen.",@@ -137195,10 +137660,6 @@ export default {format: "timestamp with time zone",type: "string"},- productionQuantity: {- format: "numeric",- type: "number"- },fixedAssetClassId: {description:"Note:\nThis is a Foreign Key to `fixedAssetClass.id`.<fk table='fixedAssetClass' column='id'/>",@@ -142770,16 +143231,16 @@ export default {format: "text",type: "string"},- readyAt: {- format: "timestamp with time zone",- type: "string"- },inspectionDocumentId: {description:"Note:\nThis is a Foreign Key to `inspectionDocument.id`.<fk table='inspectionDocument' column='id'/>",format: "text",type: "string"},+ readyAt: {+ format: "timestamp with time zone",+ type: "string"+ },projectedCompletionAt: {description:"Forward finite simulation: when this operation is projected to finish. Volatile (rewritten every regen).",@@ -157213,6 +157674,96 @@ export default {},type: "object"},+ integrationConnection: {+ required: [+ "id",+ "companyId",+ "pieceName",+ "name",+ "authType",+ "metadata",+ "status",+ "createdBy",+ "createdAt"+ ],+ properties: {+ id: {+ default: "public.id('icn'::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"+ },+ pieceName: {+ format: "text",+ type: "string"+ },+ name: {+ format: "text",+ type: "string"+ },+ authType: {+ default: "OAUTH2",+ format: "text",+ type: "string"+ },+ accountLabel: {+ format: "text",+ type: "string"+ },+ metadata: {+ format: "jsonb"+ },+ secretRef: {+ format: "text",+ type: "string"+ },+ expiresAt: {+ format: "timestamp with time zone",+ type: "string"+ },+ refreshingAt: {+ format: "timestamp with time zone",+ type: "string"+ },+ status: {+ default: "Active",+ format: "text",+ type: "string"+ },+ lastError: {+ format: "text",+ 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"+ },journalLineDimension: {required: ["id",@@ -163021,10 +163572,6 @@ export default {format: "text",type: "string"},- readyAt: {- format: "timestamp with time zone",- type: "string"- },inspectionDocumentId: {description:"Note:\nThis is a Foreign Key to `inspectionDocument.id`.<fk table='inspectionDocument' column='id'/>",@@ -167526,10 +168073,10 @@ export default {"incompletePickingListPolicy","includeMaterialsOnTraveler","returnPickedMaterialTiming",- "salesRuleNotificationGroup","showCurrencyTrailingZeros","requireMfa","allowLowercaseItemIds",+ "salesRuleNotificationGroup","includeOperationsOnTraveler","requireSupplierContactAndLocation","requireCustomerContactAndLocation",@@ -167797,13 +168344,6 @@ export default {format: "text",type: "string"},- salesRuleNotificationGroup: {- format: "text[]",- items: {- type: "string"- },- type: "array"- },showCurrencyTrailingZeros: {default: true,format: "boolean",@@ -167819,6 +168359,13 @@ export default {format: "boolean",type: "boolean"},+ salesRuleNotificationGroup: {+ format: "text[]",+ items: {+ type: "string"+ },+ type: "array"+ },includeOperationsOnTraveler: {default: true,format: "boolean",@@ -172927,12 +173474,6 @@ export default {in: "query",type: "string"},- "rowFilter.jobOperationsWithDependencies.readyAt": {- name: "readyAt",- required: false,- in: "query",- type: "string"- },"rowFilter.jobOperationsWithDependencies.inspectionDocumentId": {name: "inspectionDocumentId",required: false,@@ -181325,6 +181866,12 @@ export default {in: "query",type: "string"},+ "rowFilter.jobs.productionQuantity": {+ name: "productionQuantity",+ required: false,+ in: "query",+ type: "string"+ },"rowFilter.jobs.projectedCompletionAt": {name: "projectedCompletionAt",required: false,@@ -181343,12 +181890,6 @@ export default {in: "query",type: "string"},- "rowFilter.jobs.productionQuantity": {- name: "productionQuantity",- required: false,- in: "query",- type: "string"- },"rowFilter.jobs.fixedAssetClassId": {name: "fixedAssetClassId",required: false,@@ -189570,6 +190111,12 @@ export default {in: "query",type: "string"},+ "rowFilter.job.productionQuantity": {+ name: "productionQuantity",+ required: false,+ in: "query",+ type: "string"+ },"rowFilter.job.projectedCompletionAt": {name: "projectedCompletionAt",description:@@ -189592,12 +190139,6 @@ export default {in: "query",type: "string"},- "rowFilter.job.productionQuantity": {- name: "productionQuantity",- required: false,- in: "query",- type: "string"- },"rowFilter.job.fixedAssetClassId": {name: "fixedAssetClassId",required: false,@@ -195620,14 +196161,14 @@ export default {in: "query",type: "string"},- "rowFilter.jobOperation.readyAt": {- name: "readyAt",+ "rowFilter.jobOperation.inspectionDocumentId": {+ name: "inspectionDocumentId",required: false,in: "query",type: "string"},- "rowFilter.jobOperation.inspectionDocumentId": {- name: "inspectionDocumentId",+ "rowFilter.jobOperation.readyAt": {+ name: "readyAt",required: false,in: "query",type: "string"@@ -211909,6 +212450,111 @@ export default {in: "query",type: "string"},+ "body.integrationConnection": {+ name: "integrationConnection",+ description: "integrationConnection",+ required: false,+ in: "body",+ schema: {+ $ref: "#/definitions/integrationConnection"+ }+ },+ "rowFilter.integrationConnection.id": {+ name: "id",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.integrationConnection.companyId": {+ name: "companyId",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.integrationConnection.pieceName": {+ name: "pieceName",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.integrationConnection.name": {+ name: "name",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.integrationConnection.authType": {+ name: "authType",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.integrationConnection.accountLabel": {+ name: "accountLabel",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.integrationConnection.metadata": {+ name: "metadata",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.integrationConnection.secretRef": {+ name: "secretRef",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.integrationConnection.expiresAt": {+ name: "expiresAt",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.integrationConnection.refreshingAt": {+ name: "refreshingAt",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.integrationConnection.status": {+ name: "status",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.integrationConnection.lastError": {+ name: "lastError",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.integrationConnection.createdBy": {+ name: "createdBy",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.integrationConnection.createdAt": {+ name: "createdAt",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.integrationConnection.updatedBy": {+ name: "updatedBy",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.integrationConnection.updatedAt": {+ name: "updatedAt",+ required: false,+ in: "query",+ type: "string"+ },"body.journalLineDimension": {name: "journalLineDimension",description: "journalLineDimension",@@ -218384,12 +219030,6 @@ export default {in: "query",type: "string"},- "rowFilter.jobOperationsWithMakeMethods.readyAt": {- name: "readyAt",- required: false,- in: "query",- type: "string"- },"rowFilter.jobOperationsWithMakeMethods.inspectionDocumentId": {name: "inspectionDocumentId",required: false,@@ -223677,12 +224317,6 @@ export default {in: "query",type: "string"},- "rowFilter.companySettings.salesRuleNotificationGroup": {- name: "salesRuleNotificationGroup",- required: false,- in: "query",- type: "string"- },"rowFilter.companySettings.showCurrencyTrailingZeros": {name: "showCurrencyTrailingZeros",required: false,@@ -223701,6 +224335,12 @@ export default {in: "query",type: "string"},+ "rowFilter.companySettings.salesRuleNotificationGroup": {+ name: "salesRuleNotificationGroup",+ required: false,+ in: "query",+ type: "string"+ },"rowFilter.companySettings.includeOperationsOnTraveler": {name: "includeOperationsOnTraveler",required: false,diff --git a/packages/database/src/types.ts b/packages/database/src/types.tsindex c1bda3d9dc..5f0e1c2794 100644--- a/packages/database/src/types.ts+++ b/packages/database/src/types.ts@@ -23316,6 +23316,162 @@ export type Database = {}Relationships: []}+ integrationConnection: {+ Row: {+ accountLabel: string | null+ authType: string+ companyId: string+ createdAt: string+ createdBy: string+ expiresAt: string | null+ id: string+ lastError: string | null+ metadata: Json+ name: string+ pieceName: string+ refreshingAt: string | null+ secretRef: string | null+ status: string+ updatedAt: string | null+ updatedBy: string | null+ }+ Insert: {+ accountLabel?: string | null+ authType?: string+ companyId: string+ createdAt?: string+ createdBy: string+ expiresAt?: string | null+ id?: string+ lastError?: string | null+ metadata?: Json+ name: string+ pieceName: string+ refreshingAt?: string | null+ secretRef?: string | null+ status?: string+ updatedAt?: string | null+ updatedBy?: string | null+ }+ Update: {+ accountLabel?: string | null+ authType?: string+ companyId?: string+ createdAt?: string+ createdBy?: string+ expiresAt?: string | null+ id?: string+ lastError?: string | null+ metadata?: Json+ name?: string+ pieceName?: string+ refreshingAt?: string | null+ secretRef?: string | null+ status?: string+ updatedAt?: string | null+ updatedBy?: string | null+ }+ Relationships: [+ {+ foreignKeyName: "integrationConnection_companyId_fkey"+ columns: ["companyId"]+ isOneToOne: false+ referencedRelation: "companies"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "integrationConnection_companyId_fkey"+ columns: ["companyId"]+ isOneToOne: false+ referencedRelation: "company"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "integrationConnection_companyId_fkey"+ columns: ["companyId"]+ isOneToOne: false+ referencedRelation: "customFieldTables"+ referencedColumns: ["companyId"]+ },+ {+ foreignKeyName: "integrationConnection_companyId_fkey"+ columns: ["companyId"]+ isOneToOne: false+ referencedRelation: "integrations"+ referencedColumns: ["companyId"]+ },+ {+ foreignKeyName: "integrationConnection_createdBy_fkey"+ columns: ["createdBy"]+ isOneToOne: false+ referencedRelation: "employeeSummary"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "integrationConnection_createdBy_fkey"+ columns: ["createdBy"]+ isOneToOne: false+ referencedRelation: "employees"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "integrationConnection_createdBy_fkey"+ columns: ["createdBy"]+ isOneToOne: false+ referencedRelation: "employeesAcrossCompanies"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "integrationConnection_createdBy_fkey"+ columns: ["createdBy"]+ isOneToOne: false+ referencedRelation: "user"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "integrationConnection_createdBy_fkey"+ columns: ["createdBy"]+ isOneToOne: false+ referencedRelation: "userDefaults"+ referencedColumns: ["userId"]+ },+ {+ foreignKeyName: "integrationConnection_updatedBy_fkey"+ columns: ["updatedBy"]+ isOneToOne: false+ referencedRelation: "employeeSummary"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "integrationConnection_updatedBy_fkey"+ columns: ["updatedBy"]+ isOneToOne: false+ referencedRelation: "employees"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "integrationConnection_updatedBy_fkey"+ columns: ["updatedBy"]+ isOneToOne: false+ referencedRelation: "employeesAcrossCompanies"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "integrationConnection_updatedBy_fkey"+ columns: ["updatedBy"]+ isOneToOne: false+ referencedRelation: "user"+ referencedColumns: ["id"]+ },+ {+ foreignKeyName: "integrationConnection_updatedBy_fkey"+ columns: ["updatedBy"]+ isOneToOne: false+ referencedRelation: "userDefaults"+ referencedColumns: ["userId"]+ }+ ]+ }intercompanyEliminationLine: {Row: {accountId: string@@ -78778,7 +78934,6 @@ export type Database = {quantityComplete: number | nullquantityReworked: number | nullquantityScrapped: number | null- readyAt: string | nullreworkId: string | nullsetupTime: number | nullsetupUnit: Database["public"]["Enums"]["factor"] | null@@ -78831,7 +78986,6 @@ export type Database = {quantityComplete?: number | nullquantityReworked?: number | nullquantityScrapped?: number | null- readyAt?: string | nullreworkId?: string | nullsetupTime?: number | nullsetupUnit?: Database["public"]["Enums"]["factor"] | null@@ -78884,7 +79038,6 @@ export type Database = {quantityComplete?: number | nullquantityReworked?: number | nullquantityScrapped?: number | null- readyAt?: string | nullreworkId?: string | nullsetupTime?: number | nullsetupUnit?: Database["public"]["Enums"]["factor"] | null@@ -79207,7 +79360,6 @@ export type Database = {quantityComplete: number | nullquantityReworked: number | nullquantityScrapped: number | null- readyAt: string | nullreworkId: string | nullsetupTime: number | nullsetupUnit: Database["public"]["Enums"]["factor"] | null@@ -92227,6 +92379,10 @@ export type Database = {Args: { p_company_id: string }Returns: undefined}+ delete_connection_secret: {+ Args: { p_company_id: string; p_connection_id: string }+ Returns: undefined+ }delete_event_system_subscription: {Args: { p_subscription_id: string }Returns: undefined@@ -92667,6 +92823,10 @@ export type Database = {thumbnailPath: string}[]}+ get_connection_secret: {+ Args: { p_company_id: string; p_connection_id: string }+ Returns: Json+ }get_consumable_details: {Args: { item_id: string }Returns: {@@ -94747,10 +94907,34 @@ export type Database = {Args: { p_item_id: string; p_receipt_id: string }Returns: string}+ revoke_connections: {+ Args: {+ p_company_id: string+ p_connection_id?: string+ p_piece_name: string+ p_updated_by: string+ }+ Returns: undefined+ }rotate_webhook_signing_secret: {Args: { p_company_id: string; p_webhook_id: string }Returns: string}+ save_connection: {+ Args: {+ p_account_label?: string+ p_auth_type: string+ p_company_id: string+ p_connection_id?: string+ p_expires_at?: string+ p_metadata?: Json+ p_name: string+ p_piece_name: string+ p_secret: Json+ p_user_id: string+ }+ Returns: string+ }save_inspection_document_atomic: {Args: {p_balloons?: Json@@ -95217,6 +95401,10 @@ export type Database = {}Returns: Json}+ upsert_connection_secret: {+ Args: { p_company_id: string; p_connection_id: string; p_secret: Json }+ Returns: string+ }upsert_integration_secret: {Args: { p_company_id: string; p_integration_id: string; p_secret: Json }Returns: stringdiff --git a/packages/database/supabase/migrations/20261026151302_workflow-integration-connections.sql b/packages/database/supabase/migrations/20261026151302_workflow-integration-connections.sqlnew file mode 100644index 0000000000..72c619a245--- /dev/null+++ b/packages/database/supabase/migrations/20261026151302_workflow-integration-connections.sql@@ -0,0 +1,274 @@+-- Named per-company connections to third-party integration pieces (Workflows).+-- Separate from "companyIntegration": that table is one row per integration per+-- company (composite PK), so it cannot hold several named accounts.+CREATE TABLE IF NOT EXISTS "integrationConnection" (+ "id" TEXT NOT NULL DEFAULT id('icn'),+ "companyId" TEXT NOT NULL,+ "pieceName" TEXT NOT NULL,+ "name" TEXT NOT NULL,+ "authType" TEXT NOT NULL DEFAULT 'OAUTH2',+ "accountLabel" TEXT,+ "metadata" JSONB NOT NULL DEFAULT '{}',+ "secretRef" TEXT,+ "expiresAt" TIMESTAMP WITH TIME ZONE,+ "refreshingAt" TIMESTAMP WITH TIME ZONE,+ "status" TEXT NOT NULL DEFAULT 'Active',+ "lastError" TEXT,++ "createdBy" TEXT NOT NULL REFERENCES "user"("id"),+ "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),+ "updatedBy" TEXT REFERENCES "user"("id"),+ "updatedAt" TIMESTAMP WITH TIME ZONE,++ CONSTRAINT "integrationConnection_pkey" PRIMARY KEY ("id", "companyId"),+ CONSTRAINT "integrationConnection_companyId_fkey" FOREIGN KEY ("companyId")+ REFERENCES "company"("id") ON DELETE CASCADE ON UPDATE CASCADE,+ CONSTRAINT "integrationConnection_status_check"+ CHECK ("status" IN ('Active', 'Expired', 'Revoked')),+ CONSTRAINT "integrationConnection_name_unique" UNIQUE ("companyId", "pieceName", "name")+);++CREATE INDEX IF NOT EXISTS "integrationConnection_companyId_idx" ON "integrationConnection" ("companyId");+CREATE INDEX IF NOT EXISTS "integrationConnection_companyId_pieceName_idx"+ ON "integrationConnection" ("companyId", "pieceName");+CREATE INDEX IF NOT EXISTS "integrationConnection_createdBy_idx" ON "integrationConnection" ("createdBy");+CREATE INDEX IF NOT EXISTS "integrationConnection_updatedBy_idx" ON "integrationConnection" ("updatedBy");++ALTER TABLE "public"."integrationConnection" ENABLE ROW LEVEL SECURITY;++-- Policies: authz manifest (`integrationConnection`): settings_view reads, no API-role writes.++-- Vault RPCs. The existing upsert/get/delete_integration_secret functions are+-- hard-wired to "companyIntegration" and the 'integration:' name prefix, so these+-- mirror them against the new table with a 'connection:' prefix.+--+-- A connection's token is written only while the row is Active, so a token+-- refresh still running when someone disconnects the account (or uninstalls its+-- card) cannot write a fresh secret onto the Revoked row and bring it back.+--+-- The row is locked before the vault write, so a concurrent `revoke_connections`+-- either commits first (the row is no longer Active here, and the write is+-- refused with no_data_found) or waits and deletes the secret written here.+-- `save_connection` and the Slack backfill set the row Active before they call it.+CREATE OR REPLACE FUNCTION upsert_connection_secret(p_company_id text, p_connection_id text, p_secret jsonb)+RETURNS text LANGUAGE plpgsql SECURITY DEFINER SET search_path = public, vault AS $$+DECLARE+ v_name text := 'connection:' || p_company_id || ':' || p_connection_id;+ v_id uuid;+BEGIN+ IF current_setting('role', true) IN ('anon', 'authenticated') THEN+ RAISE EXCEPTION 'upsert_connection_secret is service role only'+ USING ERRCODE = 'insufficient_privilege';+ END IF;++ PERFORM 1 FROM "integrationConnection"+ WHERE "companyId" = p_company_id AND "id" = p_connection_id+ AND "status" = 'Active'+ FOR UPDATE;+ IF NOT FOUND THEN+ RAISE EXCEPTION 'Connection % is not active.', p_connection_id+ USING ERRCODE = 'no_data_found';+ END IF;++ 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 connection 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 "integrationConnection" SET "secretRef" = v_id::text+ WHERE "companyId" = p_company_id AND "id" = p_connection_id;+ RETURN v_id::text;+END;+$$;++-- Read a connection's secret by its vault NAME, never by the row's `secretRef`.+-- `secretRef` is a column a row's writer controls; the name is built from the+-- company and connection ids, so it can only ever resolve to this connection's own+-- secret. Every connection secret is written by `upsert_connection_secret` under+-- this name, and `delete_connection_secret` already deletes by it.+CREATE OR REPLACE FUNCTION get_connection_secret(p_company_id text, p_connection_id text)+RETURNS jsonb LANGUAGE plpgsql SECURITY DEFINER SET search_path = public, vault AS $$+DECLARE+ v_secret text;+BEGIN+ IF current_setting('role', true) IN ('anon', 'authenticated') THEN+ RAISE EXCEPTION 'get_connection_secret is service role only'+ USING ERRCODE = 'insufficient_privilege';+ END IF;++ -- A disconnected row has no secretRef; keep failing closed for it.+ IF NOT EXISTS (+ SELECT 1 FROM "integrationConnection"+ WHERE "companyId" = p_company_id AND "id" = p_connection_id+ AND "secretRef" IS NOT NULL+ ) THEN+ RETURN NULL;+ END IF;++ SELECT decrypted_secret INTO v_secret FROM vault.decrypted_secrets+ WHERE name = 'connection:' || p_company_id || ':' || p_connection_id;+ IF v_secret IS NULL THEN RETURN NULL; END IF;+ RETURN v_secret::jsonb;+END;+$$;++CREATE OR REPLACE FUNCTION delete_connection_secret(p_company_id text, p_connection_id text)+RETURNS void LANGUAGE plpgsql SECURITY DEFINER SET search_path = public, vault AS $$+BEGIN+ IF current_setting('role', true) IN ('anon', 'authenticated') THEN+ RAISE EXCEPTION 'delete_connection_secret is service role only'+ USING ERRCODE = 'insufficient_privilege';+ END IF;++ DELETE FROM vault.secrets+ WHERE name = 'connection:' || p_company_id || ':' || p_connection_id;+ UPDATE "integrationConnection" SET "secretRef" = NULL+ WHERE "companyId" = p_company_id AND "id" = p_connection_id;+END;+$$;++-- Service-role only, enforced by each body's first statement: REVOKE EXECUTE on a+-- public function segfaults this Postgres image when anon/authenticated call it+-- (see 20260924192316_api-function-guards-not-revokes.sql).++-- Revoke workflow integration connections in ONE statement: drop each one's vault+-- secret and mark its row Revoked together. Two separate writes could fail between+-- them and leave an Active row with no secret: an account every surface lists as+-- usable and every use fails.+--+-- With `p_connection_id`, that one connection of the piece (Disconnect). Without+-- it, every connection of the piece that is not already Revoked (Uninstall). The+-- row survives either way: a saved workflow node references its id. The secret is+-- deleted by its NAME, the way `upsert_connection_secret` stores it and+-- `get_connection_secret` reads it, never by `secretRef`.+CREATE OR REPLACE FUNCTION revoke_connections(+ p_company_id text,+ p_piece_name text,+ p_updated_by text,+ p_connection_id text DEFAULT NULL+)+RETURNS void LANGUAGE plpgsql SECURITY DEFINER SET search_path = public, vault AS $$+BEGIN+ IF current_setting('role', true) IN ('anon', 'authenticated') THEN+ RAISE EXCEPTION 'revoke_connections is service role only'+ USING ERRCODE = 'insufficient_privilege';+ END IF;++ WITH revoked AS (+ UPDATE "integrationConnection"+ SET "status" = 'Revoked',+ "secretRef" = NULL,+ "updatedBy" = p_updated_by,+ "updatedAt" = NOW()+ WHERE "companyId" = p_company_id+ AND "pieceName" = p_piece_name+ AND CASE+ WHEN p_connection_id IS NULL THEN "status" <> 'Revoked'+ ELSE "id" = p_connection_id+ END+ RETURNING "id"+ )+ DELETE FROM vault.secrets s+ USING revoked r+ WHERE s.name = 'connection:' || p_company_id || ':' || r."id";+END;+$$;++-- Save a workflow integration connection and its vault secret in ONE statement.+-- As two writes, a failed row update on Reconnect left a Revoked or Expired row+-- holding a live secret, and a failed vault write left an Active row with none.+--+-- With `p_connection_id`, the consent revives that row: the caller has already+-- checked that the same account signed in. Without it, a new row is inserted, and+-- the unique `(companyId, pieceName, name)` index refuses a taken name with 23505.+-- `p_metadata` NULL on a revive keeps the stored metadata.+CREATE OR REPLACE FUNCTION save_connection(+ p_company_id text,+ p_piece_name text,+ p_name text,+ p_auth_type text,+ p_secret jsonb,+ p_user_id text,+ p_account_label text DEFAULT NULL,+ p_metadata jsonb DEFAULT NULL,+ p_expires_at timestamptz DEFAULT NULL,+ p_connection_id text DEFAULT NULL+)+RETURNS text LANGUAGE plpgsql SECURITY DEFINER SET search_path = public, vault AS $$+DECLARE+ v_id text;+BEGIN+ IF current_setting('role', true) IN ('anon', 'authenticated') THEN+ RAISE EXCEPTION 'save_connection is service role only'+ USING ERRCODE = 'insufficient_privilege';+ END IF;++ IF p_connection_id IS NULL THEN+ INSERT INTO "integrationConnection" (+ "companyId", "pieceName", "name", "authType", "accountLabel",+ "metadata", "expiresAt", "status", "createdBy"+ )+ VALUES (+ p_company_id, p_piece_name, p_name, p_auth_type, p_account_label,+ COALESCE(p_metadata, '{}'::jsonb), p_expires_at, 'Active', p_user_id+ )+ RETURNING "id" INTO v_id;+ ELSE+ UPDATE "integrationConnection"+ SET "authType" = p_auth_type,+ -- No label (the account lookup failed) keeps the stored one: without it+ -- the same-account check passes for anyone on the next Reconnect.+ "accountLabel" = COALESCE(p_account_label, "accountLabel"),+ "metadata" = COALESCE(p_metadata, "metadata"),+ "expiresAt" = p_expires_at,+ "refreshingAt" = NULL,+ "status" = 'Active',+ "lastError" = NULL,+ "updatedBy" = p_user_id,+ "updatedAt" = NOW()+ WHERE "companyId" = p_company_id+ AND "pieceName" = p_piece_name+ AND "id" = p_connection_id+ RETURNING "id" INTO v_id;++ IF v_id IS NULL THEN+ RAISE EXCEPTION 'Connection % was not found.', p_connection_id+ USING ERRCODE = 'no_data_found';+ END IF;+ END IF;++ -- Same name and secretRef as every other connection secret: the vault write and+ -- the row write above commit or roll back together.+ PERFORM upsert_connection_secret(p_company_id, v_id, p_secret);+ RETURN v_id;+END;+$$;++-- Cascade: vault.secrets does not cascade on its own.+CREATE OR REPLACE FUNCTION drop_connection_secret_on_delete()+RETURNS trigger LANGUAGE plpgsql SECURITY DEFINER SET search_path = public, vault AS $$+BEGIN+ DELETE FROM vault.secrets+ WHERE name = 'connection:' || OLD."companyId" || ':' || OLD.id;+ RETURN OLD;+END;+$$;++DROP TRIGGER IF EXISTS trg_drop_connection_secret ON "integrationConnection";+CREATE TRIGGER trg_drop_connection_secret+ AFTER DELETE ON "integrationConnection"+ FOR EACH ROW EXECUTE FUNCTION drop_connection_secret_on_delete();++-- A piece is an ordinary integration card whose id IS the piece name, and+-- companyIntegration.id is an FK to integration.id — so the connect callback's+-- "installed" write (markIntegrationInstalled) needs one row per piece here.+-- Without it the callback fails AFTER the token is already in the vault.+INSERT INTO "integration" ("id", "jsonschema")+VALUES+ ('google-calendar', '{"type": "object", "properties": {}}'::json),+ ('gmail', '{"type": "object", "properties": {}}'::json)+ON CONFLICT ("id") DO NOTHING;++NOTIFY pgrst, 'reload schema';diff --git a/packages/database/supabase/migrations/20261026151304_slack-connections-single-source.sql b/packages/database/supabase/migrations/20261026151304_slack-connections-single-source.sqlnew file mode 100644index 0000000000..7aeec79dba--- /dev/null+++ b/packages/database/supabase/migrations/20261026151304_slack-connections-single-source.sql@@ -0,0 +1,125 @@+-- Slack's credential and workspace facts move to integrationConnection (piece+-- 'slack'), the same home Google Calendar already uses; companyIntegration.slack+-- becomes the installed flag alone. One connection per previously installed+-- company, token moved vault→vault, plaintext facts stripped. Idempotent: a company+-- that already has a slack connection is skipped, and a stripped row strips to the+-- same thing again.+--+-- Robustness rules, in order:+-- * integrationConnection.createdBy/updatedBy REFERENCE "user"; companyIntegration+-- .updatedBy is bare text. Only a user id that still exists is used; otherwise the+-- company's first member; otherwise the company is skipped with a NOTICE and its+-- plaintext left untouched (nothing is deleted that cannot be recreated).+-- * The vault is read BEFORE the row is written. No token → the connection is+-- inserted 'Expired' with a lastError, so the card says "reconnect" instead of+-- an Active row whose secret read throws forever.+-- * An inactive install becomes a 'Revoked' row and gets NO secret — a Revoked row+-- never holds a token (disconnectConnection's invariant).+-- * The incoming-webhook URL is a bearer capability; it is not copied anywhere.++CREATE INDEX IF NOT EXISTS "integrationConnection_slack_team_idx"+ ON "integrationConnection" ("pieceName", ("metadata"->>'team_id'))+ WHERE "pieceName" = 'slack';++CREATE OR REPLACE FUNCTION _backfill_slack_connection(p_company_id text) RETURNS void+LANGUAGE plpgsql AS $$+DECLARE+ v_row "companyIntegration"%ROWTYPE;+ v_meta jsonb;+ v_bag jsonb;+ v_token text;+ v_id text;+ v_actor text;+ v_status text;+BEGIN+ SELECT * INTO v_row FROM "companyIntegration"+ WHERE "companyId" = p_company_id AND id = 'slack';+ IF NOT FOUND THEN RETURN; END IF;+ v_meta := v_row.metadata::jsonb;++ IF v_meta->>'team_id' IS NOT NULL AND NOT EXISTS (+ SELECT 1 FROM "integrationConnection"+ WHERE "companyId" = p_company_id AND "pieceName" = 'slack'+ ) THEN+ SELECT id INTO v_actor FROM "user" WHERE id = v_row."updatedBy";+ IF v_actor IS NULL THEN+ SELECT "userId" INTO v_actor FROM "userToCompany"+ WHERE "companyId" = p_company_id ORDER BY "userId" LIMIT 1;+ END IF;+ IF v_actor IS NULL THEN+ RAISE NOTICE 'slack backfill: company % has no member to own the connection; left untouched', p_company_id;+ RETURN;+ END IF;++ v_bag := get_integration_secret(p_company_id, 'slack');+ v_token := CASE WHEN v_bag IS NOT NULL AND v_bag ? 'access_token'+ THEN v_bag->>'access_token' END;+ IF v_token = '' THEN v_token := NULL; END IF;++ v_status := CASE+ WHEN NOT v_row.active THEN 'Revoked'+ WHEN v_token IS NULL THEN 'Expired'+ ELSE 'Active'+ END;++ INSERT INTO "integrationConnection"+ ("companyId", "pieceName", "name", "authType", "accountLabel", "metadata",+ "expiresAt", "status", "lastError", "createdBy", "updatedBy")+ VALUES (+ p_company_id, 'slack', coalesce(v_meta->>'team_name', 'Slack'), 'OAUTH2',+ v_meta->>'team_name',+ jsonb_strip_nulls(jsonb_build_object(+ 'team_id', v_meta->'team_id',+ 'team_name', v_meta->'team_name',+ 'bot_user_id', v_meta->'bot_user_id',+ 'channel', v_meta->'channel',+ 'channel_id', v_meta->'channel_id',+ 'scopes', to_jsonb('assistant:write chat:write.public chat:write commands files:read im:history incoming-webhook team:read users:read users:read.email'::text)+ )),+ NULL, v_status,+ CASE WHEN v_status = 'Expired' THEN 'No token was found for this workspace during the migration; reconnect it.' END,+ v_actor, v_actor+ )+ RETURNING id INTO v_id;++ IF v_status = 'Active' THEN+ PERFORM upsert_connection_secret(+ p_company_id, v_id, jsonb_build_object('accessToken', v_token)+ );+ END IF;+ END IF;++ -- Strip: the row is the installed flag from here on. Only once a connection row+ -- exists (just inserted, or from an earlier run) — a row with a token but no+ -- team_id creates no connection above, and deleting its secret then would discard+ -- the one credential nothing can recreate.+ IF NOT EXISTS (+ SELECT 1 FROM "integrationConnection"+ WHERE "companyId" = p_company_id AND "pieceName" = 'slack'+ ) THEN+ RAISE NOTICE 'slack backfill: company % has no connection to carry the credential; left untouched', p_company_id;+ RETURN;+ END IF;+ IF v_row."secretRef" IS NOT NULL THEN+ PERFORM delete_integration_secret(p_company_id, 'slack');+ END IF;+ UPDATE "companyIntegration" SET metadata = '{}'::json, "secretRef" = NULL+ WHERE "companyId" = p_company_id AND id = 'slack';+END;+$$;++DO $$+DECLARE r record;+BEGIN+ FOR r IN SELECT "companyId" FROM "companyIntegration" WHERE id = 'slack' LOOP+ PERFORM _backfill_slack_connection(r."companyId");+ END LOOP;+END;+$$;++DROP FUNCTION _backfill_slack_connection(text);++-- The jsonschema validated the now-gone workspace fields; like google-calendar,+-- the row holds nothing to validate.+UPDATE "integration" SET "jsonschema" = '{"type":"object","properties":{}}'::json+ WHERE id = 'slack';diff --git a/packages/database/supabase/migrations/20261026151306_integration-connection-policies.sql b/packages/database/supabase/migrations/20261026151306_integration-connection-policies.sqlnew file mode 100644index 0000000000..fa7b0e6f27--- /dev/null+++ b/packages/database/supabase/migrations/20261026151306_integration-connection-policies.sql@@ -0,0 +1,15 @@+-- Generated by `pnpm --filter @carbon/database authz migration` from packages/database/src/authz. Do not edit.++-- Ships these rules to databases where `authz sync` does not run after migrations yet.++-- integrationConnection+DO $authz$+DECLARE p record;+BEGIN+ FOR p IN SELECT policyname FROM pg_policies WHERE schemaname = 'public' AND tablename = 'integrationConnection' LOOP+ EXECUTE format('DROP POLICY %I ON public.%I', p.policyname, 'integrationConnection');+ END LOOP;+END+$authz$;+ALTER TABLE public."integrationConnection" ENABLE ROW LEVEL SECURITY;+CREATE POLICY "SELECT" ON "public"."integrationConnection" FOR SELECT USING ("companyId" = ANY ((SELECT get_companies_with_employee_permission('settings_view'))::text[]));diff --git a/packages/dev/AGENTS.md b/packages/dev/AGENTS.mdindex 04303d1478..bb62ccdf48 100644--- a/packages/dev/AGENTS.md+++ b/packages/dev/AGENTS.md@@ -54,7 +54,7 @@ pnpm --filter @carbon/dev smoke # real containers: slots, fresh migrate, u- **Dev servers** — they hold more than the containers (roughly 1 GB each). After `CRBN_APPS_IDLE_MINUTES` (default 120) `crbn up` aborts them (`spawnApps`' `signal`) and listens on their ports itself (`startWaker`). A request there cannot be handed over — the dev server needs that port — so a browser gets a page that polls and reloads, anything else a 503 with `x-crbn-waking`. Inngest polls and WebSocket upgrades (an open tab's Vite client probing for its server) do not wake it. That wake is about 40 s: the dev servers boot from cold.- Off for `--no-apps`, `--run`, `--borrow` (the owning `crbn up` does it) and `--no-hibernate`. Traffic that never reaches ERP/MES (`psql`, scripts on the API) does not count; `crbn migrate` and `crbn restore` wake a sleeping stack themselves (`wakeIfAsleep`). `crbn list` and `crbn status` show a hibernated stack.- **`crbn prune` also clears stale portless routes** (`findStaleAliases`): static aliases crbn registered whose port no live slot owns. `portless prune` only reaps routes that have a process.-- **Env**: `env.ts` — `renderEnv()`, `writeEnv()`, `syncAppPortlessConfigs()`. URLs derived from the stack's ERP host (`ERP_URL`, `VERCEL_URL`, `INNGEST_SERVE_HOST`, `ONSHAPE_V2_OAUTH_REDIRECT_URL`) come from one `erpUrl`; a key a developer must keep fixed (a tunnel, a registered redirect URI) is pinned in `.env` with `#force`+- **Env**: `env.ts` — `renderEnv()`, `writeEnv()`, `syncAppPortlessConfigs()`. URLs derived from the stack's ERP host (`ERP_URL`, `VERCEL_URL`, `INNGEST_SERVE_HOST`, `ONSHAPE_V2_OAUTH_REDIRECT_URL`) come from one `erpUrl`; a key a developer must keep fixed (a tunnel, a registered redirect URI) is pinned in `.env` with `#force`. Keys copied from `.env` (with an optional default) are listed once in `FROM_DOT_ENV`- **`--run` flag**: scopes stack lifetime to a command (for headless/CI builds); `--volumes` cleans up Docker volumes on teardown## Cross-Referencesdiff --git a/packages/dev/src/env.ts b/packages/dev/src/env.tsindex 0b47129240..1686bb0534 100644--- a/packages/dev/src/env.ts+++ b/packages/dev/src/env.ts@@ -7,6 +7,23 @@ import { join } from "pathe";import { APP_CHOICES } from "./constants.js";import { type JwtCreds, type PortMap, SHARED_REDIS_PORT } from "./worktree.js";+/**+ * Keys copied from `.env`, which `crbn up` loads into process.env before this+ * runs. A key with a `fallback` is always written. One without is left out when+ * unset: an empty line in `.env.local` would hide the `.env` value.+ */+const FROM_DOT_ENV: readonly { key: string; fallback?: string }[] = [+ // Consumed by docker-compose.dev.yml. Supabase's own services hold ~20+ // connections at idle, so the old default of 25 left no room for GoTrue/the+ // app and caused "remaining connection slots are reserved..." (53300)+ // errors that surfaced as random logouts. Matches the prod default.+ { key: "PG_MAX_CONNECTIONS", fallback: "100" },+ // The workflow integrations' Google OAuth app.+ { key: "GOOGLE_CLIENT_ID" },+ { key: "GOOGLE_CLIENT_SECRET" },+ { key: "GOOGLE_OAUTH_REDIRECT_URL" }+];+export function renderEnv(opts: {slug: string;ports: PortMap;@@ -51,12 +68,11 @@ export function renderEnv(opts: {lines.push("# Internal compose ports (apps do not read these directly)");for (const [k, v] of Object.entries(ports)) lines.push(`${k}=${v}`);lines.push("");- lines.push("# Postgres tuning (consumed by docker-compose.dev.yml)");- // Supabase's own services (PostgREST, realtime, storage, cron, ...) hold- // ~20 connections at idle, so the previous default of 25 left no room for- // GoTrue/the app and caused "remaining connection slots are reserved..."- // (53300) errors that surfaced as random logouts. Match the prod default.- lines.push(`PG_MAX_CONNECTIONS=${process.env.PG_MAX_CONNECTIONS ?? "100"}`);+ lines.push("# From .env, or crbn's default when it has one");+ for (const { key, fallback } of FROM_DOT_ENV) {+ const value = process.env[key] || fallback;+ if (value) lines.push(`${key}=${value}`);+ }lines.push("");lines.push(portlessdiff --git a/packages/ee/AGENTS.md b/packages/ee/AGENTS.mdindex 2232a3697b..0e93d73490 100644--- a/packages/ee/AGENTS.md+++ b/packages/ee/AGENTS.md@@ -76,6 +76,7 @@ pnpm --filter @carbon/ee typecheck- **Provider roles**: every integration that participates in sync declares `providerRole: "accounting" | "spend" | "oee"` on its descriptor. That ONE declaration replaces the id lists that used to answer "which are accounting providers" five different ways, and the database enforces at most one ACTIVE integration per role per company (`companyIntegration_single_active_role`, migration `20260924133915`) — except `oee`, which may have several active integrations at once (`check_single_active_provider_role()` skips it, migration `20261013030022`); its one-device-per-work-center rule is `UNIQUE(workCenterId, companyId)` on `workCenterDevice` instead (`.claude/rules/oee-provider.md`). `getIntegrationsByRole`/`getIntegrationIdsByRole` (barrel) are the lookups; `no-integration-id-branching` (`@carbon/checks`) stops new id branching. NOTE the barrel cannot be imported from a `*.service.ts` (browser-bundled) or from most tests — it reaches `@carbon/auth`, which validates the full server env at import time; that is why `./sync` takes the registry slice as an argument instead of importing it- **Ledger delegation**: when a spend provider's mode declares `ownsLedgerFamilies`, `applyLedgerDelegation` sets that family to `"none"` AND disables its backing entities — derived from `POSTING_POLICY`, never a hard-coded `"bill"`. Each half alone is wrong (families-only leaves the document pushing; entity-only parks a `DOC_SYNC_DISABLED` Warning forever). `getJournalPostingPolicyDecision` accepts only `EffectivePostingSyncSettings`, so the compiler refuses a posting decision made from raw settings- **Integration pattern**: `defineIntegration()` → config with id, name, settings, OAuth, actions+- **Workflow integration connections**: `./integrations/connections` — named per-company connections to Activepieces pieces (`integrationConnection` table + its own `connection:`-prefixed vault RPCs). Distinct from `./integrations/secrets`, which serves `companyIntegration` and allows only one row per integration per company. Tokens go to the vault, never to `metadata`; refresh is claimed via `refreshingAt`. The piece itself ships as an ORDINARY integration config (`google-calendar/config.tsx`, `gmail/config.tsx`, `slack/config.tsx`; `id` === the piece name) — the accounts list is a tab on its card, not a separate panel. Slack's Carbon Assistant (`slack/lib/service.ts`) is a *consumer* of that connection (`getSlackWorkspace`, oldest Active; inbound by `team_id`), never a second store. See `.claude/rules/workflow-integrations.md`- **Internal-only integrations**: `internalOnly: true` on a descriptor makes it installable on Carbon Cloud only by Carbon staff (`isInternalEmail`), in any company, and by users whose id is in `INTEGRATION_EARLY_ACCESS_USER_IDS` (`hasIntegrationEarlyAccess`, `./plan.server`; comma-separated, read on the server only, so the list never reaches the browser or the code); everyone else sees a Coming soon card. Self-hosted editions are not gated. `isIntegrationComingSoon` (`./plan`) is the one rule; the ERP's `isIntegrationInstallWithheld` (`modules/settings/settings.service.ts`) applies it in the connect route, the install action and the `onshape-v2` install route, and only to a company that does not have the integration installed. An integration with its own install route must call it there too- **SAML SSO** (`./sso.server`, `src/sso/`): `isSsoEnabled()` (`gate.ts` — Enterprise edition AND `sso` in `AUTH_PROVIDERS`) is the ONE flag; the connection lookups and admin mutations self-gate on it. `provider.server.ts` = GoTrue admin API wrappers + `getSamlSpUrls`; `connections.server.ts` = `ssoConnection` lookups (each attaches a computed `domains: string[]` of VERIFIED `ssoDomain` claims), `isSsoRequiredForEmail`, `getSsoAwareInviteLink`, upsert/requireSso/deactivate mutations, and the domain-claim flows `addSsoDomain`/`verifySsoDomain`/`removeSsoDomain`; `verification.server.ts` = the DNS TXT ownership challenge (`_carbon-challenge.<domain>` → `carbon-domain-verification=<token>`, `checkDomainVerification` with pinned public resolvers, one-shot manual verify — no polling or re-verification); `session.server.ts` = amr-based session classification (`getSsoProviderIdFromSession` for enforcement, never `getSsoProviderIdFromUser`); `provisioning.server.ts` = identity linking + invite-first migration + `deleteJitSsoUser` (full removal of a rejected throwaway JIT user — auth user AND its trigger-created `user`/`userPermission` rows, guarded on zero memberships; takes a `Kysely<KyselyDatabase>` param — callers pass their own db client) + the **pre-seed** helpers `seedSsoIdentityForUser` / `backfillSsoIdentitiesForDomain` / `removeSsoIdentitiesForDomain` (+ pure `emailDomain` / `ssoProviderColumn`). Pre-seeding is the account-linking fix under `GOTRUE_DISABLE_SIGNUP=true`: a row in `auth.identities` with `identity_data.email = lower(email)` makes GoTrue link a SAML sign-in to the existing user via its **email-column** fallback — provider-agnostic (works for any IdP: Okta/Entra/OneLogin/Ping/…, whose NameID shapes differ), keyed on the generated `email` column NOT `provider_id`. `verifySsoDomain` backfills every existing on-domain user when a domain is verified; the three account-creation flows (`apps/erp/.../users.service.ts`) seed newly-invited users; `removeSsoDomain` tears the domain's identities down. A DB guard trigger on `auth.sso_domains` (migration `…_sso-domain-guard.sql`, `ssoReservedDomain` table) blocks registering an unclaimed/reserved domain. Only verified domains ever reach GoTrue. Full architecture + the provider-agnostic linking rationale: `.claude/rules/authentication-system.md` (Enterprise SAML SSO section); design: `.ai/specs/2026-08-29-saml-sso-account-linking.md`- **Onshape panel auth** (`./onshape/panel-session.server`, `src/onshape/panel/session.server.ts`): the `cps_` bearer credential for the Onshape iframe, which the `SameSite=Lax` `carbon` cookie cannot reach. Mints, stores (Redis `panel-session:<token>`, 12 h) and revokes sessions, and exports `requireOnshapePanelPermissions`, the panel routes' gate: the same claims check as `requirePermissions`, answering 401/403 with no redirect. Imports `getUserClaims`, `userHasVerifiedTotpFactor`, `getUserScopedClient` and `hasPermission` from `@carbon/auth`; auth never imports it back. See `.claude/rules/onshape-panel.md`diff --git a/packages/ee/package.json b/packages/ee/package.jsonindex b3c56d13a8..bf9b52ee31 100644--- a/packages/ee/package.json+++ b/packages/ee/package.json@@ -18,7 +18,10 @@"./forecast.server": "./src/forecast.server.ts","./mcp": "./src/mcp/index.ts","./mcp.server": "./src/mcp/server.ts",+ "./integrations/pieces": "./src/integrations/pieces.ts","./integrations/secrets": "./src/integrations/secrets.ts",+ "./integrations/connections": "./src/integrations/connections.ts",+ "./integrations/connect": "./src/integrations/connect.ts","./action-task-entity": "./src/lib/actionTaskEntity.ts","./oee": "./src/oee/index.ts","./oee.server": "./src/oee/service.server.ts",@@ -88,6 +91,7 @@"@modelcontextprotocol/server": "2.3.1","@slack/bolt": "4.4.0","@slack/oauth": "3.0.5",+ "@slack/types": "2.20.1","@slack/web-api": "catalog:","ai": "catalog:","axios": "catalog:",diff --git a/packages/ee/src/email/config.tsx b/packages/ee/src/email/config.tsxindex 64297a98ea..e6a1cf59e5 100644--- a/packages/ee/src/email/config.tsx+++ b/packages/ee/src/email/config.tsx@@ -2,16 +2,24 @@// Carbon Enterprise file, licensed only under the Carbon Commercial License// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.+import type { ComponentProps } from "react";import { HiEnvelope } from "react-icons/hi2";import { z } from "zod";import { defineIntegration } from "../fns";+// Carbon's own integration has no vendor mark, so the envelope wears a plain+// mail-blue to sit beside the branded, colored logos instead of reading as an+// unfinished monochrome placeholder.+function Logo(props: ComponentProps<"svg">) {+ return <HiEnvelope {...props} style={{ color: "#3B82F6" }} />;+}+export const Email = defineIntegration({name: "Email",id: "email",active: true,category: "Email",- logo: HiEnvelope,+ logo: Logo,description:"Send transactional emails — quotes, purchase orders, invoices, and more. Use this server's mail settings, or pick Resend or Custom SMTP to send from your own account.",shortDescription:diff --git a/packages/ee/src/gmail/config.tsx b/packages/ee/src/gmail/config.tsxnew file mode 100644index 0000000000..57389bdceb--- /dev/null+++ b/packages/ee/src/gmail/config.tsx@@ -0,0 +1,24 @@+// SPDX-License-Identifier: LicenseRef-Carbon-Commercial+// Carbon Enterprise file, licensed only under the Carbon Commercial License+// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.++import { GOOGLE_CLIENT_ID } from "@carbon/auth";+import { definePieceIntegration } from "../integrations/piece-integration";++/**+ * Gmail, as an ordinary integration card, on the same Google OAuth app as Google+ * Calendar. Each connected account sends as itself. The consent asks ONLY for+ * permission to send (`gmail.send`) — never to read the mailbox — which is what+ * keeps the app out of Google's restricted-scope tier.+ */+export const Gmail = definePieceIntegration("gmail", {+ name: "Gmail",+ category: "Email",+ // Unset OAuth credentials render the card "Coming soon" rather than offering an+ // Install that could only fail.+ active: !!GOOGLE_CLIENT_ID,+ shortDescription:+ "Send email from your workflows using a connected Google account.",+ description:+ "Connect a Google account so your workflows can send email as that account. Carbon only asks for permission to send, never to read the mailbox. Connect more than one account if different workflows should send as different people."+});diff --git a/packages/ee/src/google-calendar/config.tsx b/packages/ee/src/google-calendar/config.tsxnew file mode 100644index 0000000000..11cee7db0a--- /dev/null+++ b/packages/ee/src/google-calendar/config.tsx@@ -0,0 +1,24 @@+// SPDX-License-Identifier: LicenseRef-Carbon-Commercial+// Carbon Enterprise file, licensed only under the Carbon Commercial License+// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.++import { GOOGLE_CLIENT_ID } from "@carbon/auth";+import { definePieceIntegration } from "../integrations/piece-integration";++/**+ * Google Calendar, as an ordinary integration card.+ *+ * The steps it adds to a workflow come from an Activepieces piece, but nothing+ * about that is visible here: installing it connects a Google account, and the+ * card's Details drawer manages however many accounts the company has connected.+ */+export const GoogleCalendar = definePieceIntegration("google-calendar", {+ name: "Google Calendar",+ category: "Productivity",+ // Unset OAuth credentials render the card "Coming soon" rather than offering an+ // Install that could only fail.+ active: !!GOOGLE_CLIENT_ID,+ shortDescription: "Create and read calendar events from your workflows.",+ description:+ "Connect a Google account so your workflows can create and read Google Calendar events. Connect more than one account if different workflows should act as different calendars."+});diff --git a/packages/ee/src/hooks.server.ts b/packages/ee/src/hooks.server.tsindex 39f00a1235..a6d4461b8a 100644--- a/packages/ee/src/hooks.server.ts+++ b/packages/ee/src/hooks.server.ts@@ -2,7 +2,13 @@// Carbon Enterprise file, licensed only under the Carbon Commercial License// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.+import { getCarbonServiceRole } from "@carbon/auth/client.server";import { emailHealthcheck } from "./email/hooks.server";+import { revokeConnectionsForPiece } from "./integrations/connections";+import {+ ACTIVEPIECES_PIECES,+ type ActivepiecesPiece+} from "./integrations/pieces";import { jiraHealthcheck } from "./jira/hooks.server";import { linearHealthcheck } from "./linear/hooks.server";import { mountHealthcheck } from "./mount/hooks.server";@@ -28,6 +34,7 @@ import {rilletOnUninstall} from "./rillet/hooks.server";import { senseHealthcheck, senseOnUninstall } from "./sense/hooks.server";+import { slackOnConnect } from "./slack/hooks.server";import {stripeConnectHealthcheck,stripeConnectOnInstall,@@ -49,6 +56,31 @@ import {xeroOnUninstall} from "./xero/hooks.server";+/**+ * A workflow-integration card's whole uninstall behaviour is "revoke the accounts+ * it connected", and its `id` IS the piece name — so a new piece needs no entry+ * here. Health for a piece card is decided in erp's `getIntegrationHealth` (it+ * needs the allowlist's required scopes, which ee cannot see); only uninstall+ * lives here. Slack's card serves the Carbon Assistant and workflow steps alike,+ * so uninstalling it revokes every connected workspace.+ */+const pieceConnectHooks: Partial<+ Record<ActivepiecesPiece, IntegrationServerHooks["onConnect"]>+> = {+ slack: slackOnConnect+};++const pieceHooks: Record<string, IntegrationServerHooks> = Object.fromEntries(+ ACTIVEPIECES_PIECES.map((piece) => [+ piece,+ {+ onUninstall: (companyId: string) =>+ revokeConnectionsForPiece(getCarbonServiceRole(), piece, companyId),+ onConnect: pieceConnectHooks[piece]+ }+ ])+);+/*** Server-side hooks registry for integrations.*@@ -58,6 +90,7 @@ import {* their server-only lifecycle hooks.*/const serverHooks: Record<string, IntegrationServerHooks> = {+ ...pieceHooks,email: {onHealthcheck: emailHealthcheck},diff --git a/packages/ee/src/index.ts b/packages/ee/src/index.tsindex 3c2773595b..892c1714ea 100644--- a/packages/ee/src/index.ts+++ b/packages/ee/src/index.ts@@ -3,6 +3,8 @@// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.import { Email } from "./email/config";+import { Gmail } from "./gmail/config";+import { GoogleCalendar } from "./google-calendar/config";import { Jira } from "./jira/config";import { Linear } from "./linear/config";import { Mount } from "./mount/config";@@ -66,6 +68,8 @@ import {export const integrations = [// Radan,Email,+ Gmail,+ GoogleCalendar,Jira,Linear,Mount,@@ -85,6 +89,8 @@ export const integrations = [export type IntegrationID = (typeof integrations)[number]["id"];+export { Gmail } from "./gmail/config";+export { GoogleCalendar } from "./google-calendar/config";export { Jira } from "./jira/config";export { Mount } from "./mount/config";export { beginOAuthPopup } from "./oauth-popup";diff --git a/packages/ee/src/integrations/connect.ts b/packages/ee/src/integrations/connect.tsnew file mode 100644index 0000000000..666b4fc1cd--- /dev/null+++ b/packages/ee/src/integrations/connect.ts@@ -0,0 +1,53 @@+// SPDX-License-Identifier: LicenseRef-Carbon-Commercial+// Carbon Enterprise file, licensed only under the Carbon Commercial License+// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.++import { beginOAuthPopup } from "../oauth-popup";++/**+ * Opening a vendor's consent screen, from wherever an account is connected — the+ * integration card's Install button and the Accounts tab's "Add account".+ *+ * Browser-only, and deliberately not per-vendor: the route the caller names returns+ * `{ url }` (or `{ error }`, a code) and everything after that is identical for every+ * piece. Sharing it is what stops the two entry points drifting into different+ * failure behaviour.+ */+export type ConnectRouteResponse = { url?: string; error?: string };++/** The connect route refused, or could not be reached. `code` is one of the+ * `connection` codes in the ERP's `integration-errors.ts`, which words it. */+export class IntegrationConnectError extends Error {+ readonly code: string;+ constructor(code: string) {+ super(`Integration connect failed: ${code}`);+ this.code = code;+ this.name = "IntegrationConnectError";+ }+}++/**+ * Asks a connect route for its consent URL and opens it.+ *+ * Call it synchronously from the click: the popup opens before the fetch, because+ * Chrome blocks a `window.open` made after an await. Throws an+ * `IntegrationConnectError` carrying the route's code when there is no URL.+ */+export async function startIntegrationConnect(+ connectUrl: string+): Promise<void> {+ const popup = beginOAuthPopup();+ let body: ConnectRouteResponse;+ try {+ const response = await fetch(connectUrl);+ body = await response.json();+ } catch {+ popup.close();+ throw new IntegrationConnectError("unexpected");+ }+ if (!body.url) {+ popup.close();+ throw new IntegrationConnectError(body.error ?? "unexpected");+ }+ popup.navigate(body.url);+}diff --git a/packages/ee/src/integrations/connections.test.ts b/packages/ee/src/integrations/connections.test.tsnew file mode 100644index 0000000000..35e04ea737--- /dev/null+++ b/packages/ee/src/integrations/connections.test.ts@@ -0,0 +1,303 @@+// SPDX-License-Identifier: LicenseRef-Carbon-Commercial+// Carbon Enterprise file, licensed only under the Carbon Commercial License+// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.++import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";+import {+ accountIdentity,+ ConnectionRejectedError,+ connectionsHealthy,+ connectionUsable,+ exchangeAuthorizationCode,+ exchangeRefreshToken,+ expiringSoon,+ grantedScopes,+ missingScopes,+ sameAccount,+ usableConnections+} from "./connections";++// The functions that read and write `integrationConnection` and the vault+// (createConnection, resolveConnectionAuth's refresh claim, disconnect) are not+// tested here: faking PostgREST and the vault would test the fake. Their pure+// decisions are below, and the token endpoint is stubbed at `fetch`.++const OAUTH = {+ tokenUrl: "https://oauth2.googleapis.com/token",+ clientId: "client-id",+ clientSecret: "client-secret"+};++describe("accountIdentity", () => {+ it("names a Slack workspace by its team, whatever it is called", () => {+ expect(accountIdentity("Acme", { team_id: "T1" })).toBe("team:T1");+ });++ it("falls back to the account label, and to nothing", () => {+ expect(accountIdentity("[email protected]", {})).toBe(+ "label:[email protected]"+ );+ expect(accountIdentity("[email protected]", { team_id: "" })).toBe(+ "label:[email protected]"+ );+ expect(accountIdentity(null, null)).toBeNull();+ });+});++// Without this check every saved workflow on a row silently started acting as+// whoever signed in on Reconnect.+describe("sameAccount", () => {+ it("refuses a consent from a different account", () => {+ expect(+ sameAccount(+ { accountLabel: "[email protected]", metadata: {} },+ { accountLabel: "[email protected]" }+ )+ ).toBe(false);+ });++ it("accepts a workspace that was renamed but is the same team", () => {+ expect(+ sameAccount(+ { accountLabel: "Old name", metadata: { team_id: "T1" } },+ { accountLabel: "New name", metadata: { team_id: "T1" } }+ )+ ).toBe(true);+ });++ it("accepts any account for a row that was never identified", () => {+ expect(+ sameAccount(+ { accountLabel: null, metadata: {} },+ { accountLabel: "[email protected]" }+ )+ ).toBe(true);+ });++ // A failed label read must not let another account take over the row.+ it("refuses an unidentified consent on an identified row", () => {+ expect(+ sameAccount(+ { accountLabel: "[email protected]", metadata: {} },+ { accountLabel: null }+ )+ ).toBe(false);+ });+});++describe("expiringSoon", () => {+ beforeEach(() => {+ vi.useFakeTimers({ toFake: ["Date"] });+ vi.setSystemTime(new Date("2026-10-21T12:00:00Z"));+ });+ afterEach(() => {+ vi.useRealTimers();+ });++ it("never expires a token with no expiry (Slack bot tokens)", () => {+ expect(expiringSoon(null)).toBe(false);+ });++ it("refreshes inside the five-minute window and after expiry", () => {+ expect(expiringSoon("2026-10-21T12:04:00Z")).toBe(true);+ expect(expiringSoon("2026-10-21T12:05:00Z")).toBe(true);+ expect(expiringSoon("2026-10-21T11:00:00Z")).toBe(true);+ });++ it("leaves a token alone outside the window", () => {+ expect(expiringSoon("2026-10-21T12:05:01Z")).toBe(false);+ });+});++describe("the token endpoint", () => {+ afterEach(() => {+ vi.unstubAllGlobals();+ vi.useRealTimers();+ });++ const answer = (body: unknown, status = 200) =>+ vi.stubGlobal(+ "fetch",+ vi.fn().mockResolvedValue(+ new Response(typeof body === "string" ? body : JSON.stringify(body), {+ status+ })+ )+ );++ // Only `invalid_grant` says the grant itself is gone, so only it condemns the+ // connection.+ it("rejects the connection when the vendor says invalid_grant", async () => {+ answer({ error: "invalid_grant" }, 400);+ await expect(exchangeRefreshToken(OAUTH, "rt-1")).rejects.toBeInstanceOf(+ ConnectionRejectedError+ );+ });++ // A wrong client secret on Carbon's side answers every refresh with+ // `invalid_client`. That is ours to fix, not the customer's grant to revoke.+ it("keeps an error about Carbon's own OAuth app retryable", async () => {+ answer({ error: "invalid_client" }, 401);+ const refused = exchangeRefreshToken(OAUTH, "rt-1");+ await expect(refused).rejects.toThrow("401: invalid_client");+ await expect(refused).rejects.not.toBeInstanceOf(ConnectionRejectedError);+ });++ // A wifi blip at the moment the access token expired once flipped a working+ // Google account to Expired for good.+ it("keeps a vendor 5xx and a network failure retryable", async () => {+ answer("<html>Service Unavailable</html>", 503);+ const down = exchangeRefreshToken(OAUTH, "rt-1");+ await expect(down).rejects.toThrow("(503)");+ await expect(down).rejects.not.toBeInstanceOf(ConnectionRejectedError);++ vi.stubGlobal(+ "fetch",+ vi.fn().mockRejectedValue(new TypeError("fetch failed"))+ );+ await expect(exchangeRefreshToken(OAUTH, "rt-1")).rejects.toBeInstanceOf(+ TypeError+ );+ });++ // Slack answers a bad exchange with HTTP 200 and `{ ok: false, error }`; the+ // error name must reach the log.+ it("names the vendor's in-body error when a 200 carries no token", async () => {+ answer({ ok: false, error: "invalid_code" });+ await expect(exchangeRefreshToken(OAUTH, "rt-1")).rejects.toThrow(+ "invalid_code"+ );+ });++ it("reads the token pair and its expiry", async () => {+ vi.useFakeTimers({ toFake: ["Date"] });+ vi.setSystemTime(new Date("2026-10-21T12:00:00Z"));+ answer({ access_token: "at-2", refresh_token: "rt-2", expires_in: 3600 });++ const tokens = await exchangeRefreshToken(OAUTH, "rt-1");+ expect(tokens.accessToken).toBe("at-2");+ expect(tokens.refreshToken).toBe("rt-2");+ expect(tokens.expiresAt).toBe("2026-10-21T13:00:00.000Z");+ });++ // Google omits the refresh token on a refresh response; the caller keeps the+ // stored one, so it must come back undefined rather than as a value.+ it("leaves out what the vendor did not send", async () => {+ answer({ access_token: "at-2" });+ const tokens = await exchangeRefreshToken(OAUTH, "rt-1");+ expect(tokens.refreshToken).toBeUndefined();+ expect(tokens.expiresAt).toBeNull();+ });++ it("exposes the parsed token response so a row can pick workspace facts", async () => {+ answer({ access_token: "a", team: { name: "Acme" } });+ const tokens = await exchangeAuthorizationCode(+ { ...OAUTH, redirectUri: "https://erp.test/cb" },+ "code"+ );+ expect(tokens.accessToken).toBe("a");+ expect((tokens.body.team as { name: string }).name).toBe("Acme");+ });+});++describe("connectionsHealthy", () => {+ const at = (status: string) => ({ status }) as never;++ // The card reports health from this. Without a check of its own, `resolveHealth`+ // defaults every integration to "healthy" — so a revoked Google account showed a+ // green HEALTHY badge while every workflow step using it failed.+ it("is unhealthy when every account has gone bad", () => {+ expect(connectionsHealthy([at("Revoked")])).toBe(false);+ expect(connectionsHealthy([at("Revoked"), at("Expired")])).toBe(false);+ });++ it("is healthy while at least one account still works", () => {+ expect(connectionsHealthy([at("Revoked"), at("Active")])).toBe(true);+ expect(connectionsHealthy([at("Active")])).toBe(true);+ });++ // Not yet connected is not broken: the card is Installed and both it and the+ // builder already offer a Connect button, so red here would be noise.+ it("is healthy with no accounts at all", () => {+ expect(connectionsHealthy([])).toBe(true);+ });++ /**+ * An expired token is the NORMAL state — the next use refreshes it. Judging+ * usability by expiry instead of by status hid a working account from the+ * builder's dropdown while Settings still listed it, which is the mismatch that+ * replaced the original bug. Status is the only signal; the refresh path is what+ * writes it.+ */+ it("is healthy for an Active account whose token has expired", () => {+ const longDead = new Date(Date.now() - 60 * 60 * 1000).toISOString();+ expect(+ connectionsHealthy([{ status: "Active", expiresAt: longDead } as never])+ ).toBe(true);+ });+});++/**+ * Settings and the builder each decided "is this app connected?" for themselves,+ * and disagreed: the card read `companyIntegration.active` (written once, at+ * install) while the node counted `integrationConnection` rows. Disconnecting the+ * last account left Settings saying Installed/Healthy and the node saying "isn't+ * connected yet" at the same time.+ *+ * `connectionUsable` is now the single answer both derive from, so these pin the+ * one definition rather than each surface's copy of it.+ */+describe("connectionUsable is the one definition of a usable account", () => {+ const at = (status: string) => ({ status }) as never;++ it("counts only an Active account", () => {+ expect(connectionUsable(at("Active"))).toBe(true);+ expect(connectionUsable(at("Revoked"))).toBe(false);+ expect(connectionUsable(at("Expired"))).toBe(false);+ });++ // A revoked account in the builder's dropdown is a trap: picking it builds a+ // workflow that cannot run, and the author gets a vendor error at run time+ // rather than a "reconnect this" they could act on while editing.+ it("filters a broken account out of the list a workflow can pick from", () => {+ const rows = [+ { id: "a", status: "Revoked" },+ { id: "b", status: "Active" },+ { id: "c", status: "Expired" }+ ] as never[];+ expect(+ usableConnections(rows).map((row) => (row as { id: string }).id)+ ).toEqual(["b"]);+ });++ // The health badge and the builder must not be able to disagree. If a piece has+ // accounts, "healthy" and "the builder offers something" are the same question.+ it("agrees with the health badge whenever accounts exist", () => {+ for (const statuses of [+ ["Active"],+ ["Revoked"],+ ["Revoked", "Active"],+ ["Expired", "Revoked"]+ ]) {+ const rows = statuses.map(at);+ expect(usableConnections(rows).length > 0).toBe(connectionsHealthy(rows));+ }+ });+});++describe("scopes", () => {+ // Slack's token response separates with commas; the v2 backfill wrote spaces.+ it("parses either separator and treats nothing recorded as unknown", () => {+ expect(grantedScopes({ metadata: { scopes: "a,b" } })).toEqual(["a", "b"]);+ expect(grantedScopes({ metadata: { scopes: "a b" } })).toEqual(["a", "b"]);+ expect(grantedScopes({ metadata: {} })).toBeNull();+ expect(grantedScopes({ metadata: { scopes: "" } })).toBeNull();+ });++ it("names what is missing, and nothing when grants are unknown", () => {+ expect(missingScopes({ metadata: { scopes: "a" } }, ["a", "c"])).toEqual([+ "c"+ ]);+ expect(missingScopes({ metadata: {} }, ["a", "c"])).toEqual([]);+ });+});diff --git a/packages/ee/src/integrations/connections.ts b/packages/ee/src/integrations/connections.tsnew file mode 100644index 0000000000..345f0fb874--- /dev/null+++ b/packages/ee/src/integrations/connections.ts@@ -0,0 +1,911 @@+// SPDX-License-Identifier: LicenseRef-Carbon-Commercial+// Carbon Enterprise file, licensed only under the Carbon Commercial License+// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.++import type { Database } from "@carbon/database";+import type { SupabaseClient } from "@supabase/supabase-js";++/**+ * Named per-company connections to third-party integration pieces (Workflows).+ *+ * Separate from `secrets.ts`: that module serves `companyIntegration`, which holds+ * one row per integration per company and so cannot carry several named accounts.+ * These functions target `integrationConnection` and its own `connection:`-prefixed+ * vault RPCs.+ *+ * Tokens live in Supabase Vault and NEVER in `metadata`.+ */++export type ConnectionStatus = "Active" | "Expired" | "Revoked";++export interface ConnectionTokens {+ accessToken: string;+ refreshToken?: string;+}++export interface IntegrationConnection {+ id: string;+ companyId: string;+ pieceName: string;+ name: string;+ authType: string;+ accountLabel: string | null;+ metadata: Record<string, unknown>;+ expiresAt: string | null;+ status: ConnectionStatus;+ lastError: string | null;+}++/** The connection is not usable until someone reconnects it. */+export class ConnectionRevokedError extends Error {+ constructor(+ public readonly connectionId: string,+ message = "This connection needs to be reconnected."+ ) {+ super(message);+ this.name = "ConnectionRevokedError";+ }+}++/** The vault holds no token for a connection that claims to have one (fail closed). */+export class ConnectionSecretUnavailableError extends Error {+ constructor(companyId: string, connectionId: string) {+ super(+ `Connection secret unavailable for ${connectionId} (company ${companyId})`+ );+ this.name = "ConnectionSecretUnavailableError";+ }+}++/**+ * The vendor answered the token request with `invalid_grant`: the grant itself is+ * revoked or invalid. Only this condemns a connection. A network failure, a 429, a+ * vendor 5xx, or an error about Carbon's own OAuth app (`invalid_client`) leaves+ * the row Active so the next use retries.+ */+export class ConnectionRejectedError extends Error {+ constructor(status: number) {+ super(`The connection was rejected (${status}).`);+ this.name = "ConnectionRejectedError";+ }+}++/** Another worker claimed the refresh and never finished it. */+export class ConnectionRefreshTimeoutError extends Error {+ constructor(connectionId: string) {+ super(`Timed out waiting for ${connectionId} to refresh.`);+ this.name = "ConnectionRefreshTimeoutError";+ }+}++export class ConnectionAccountMismatchError extends Error {+ constructor(connectionId: string) {+ super(`The authorized account does not match connection ${connectionId}.`);+ this.name = "ConnectionAccountMismatchError";+ }+}++/** Reconnect's identity read failed on an identified row: it may be another account. */+export class ConnectionAccountUnverifiedError extends Error {+ constructor(connectionId: string) {+ super(+ `The authorized account for connection ${connectionId} could not be verified.`+ );+ this.name = "ConnectionAccountUnverifiedError";+ }+}++export class ConnectionNameTakenError extends Error {+ constructor(name: string) {+ super(`A connection called "${name}" already exists.`);+ this.name = "ConnectionNameTakenError";+ }+}++/** The vendor workspace (`metadata.team_id`) is already connected to another+ * company. An inbound vendor event names only its workspace, so two companies on+ * one workspace would make every such event ambiguous for both. */+export class ConnectionWorkspaceTakenError extends Error {+ constructor(pieceName: string) {+ super(`This ${pieceName} workspace is connected to another company.`);+ this.name = "ConnectionWorkspaceTakenError";+ }+}++const SELECT_COLUMNS =+ "id, companyId, pieceName, name, authType, accountLabel, metadata, expiresAt, status, lastError";++/** Refresh a token this long before it actually expires. */+const REFRESH_WINDOW_MS = 5 * 60 * 1000;+/** A claim older than this is treated as abandoned. */+const CLAIM_STALE_SECONDS = 30;+const POLL_INTERVAL_MS = 250;+const POLL_ATTEMPTS = 20;++/**+ * THE definition of an account a workflow step can actually act as.+ *+ * Every surface that asks "is this app connected?" — the settings card's health+ * badge, the Accounts tab, the builder's connection dropdown, the node's empty+ * state — must derive its answer from this one predicate. They disagreed before:+ * the card read `companyIntegration.active` (set once, at install) while the+ * builder counted rows in `integrationConnection`, so uninstalling or revoking an+ * account left Settings saying "Installed / Healthy" while the node said "isn't+ * connected yet". Two tables encoded one fact, and only one of them was true.+ */+export function connectionUsable(+ connection: Pick<IntegrationConnection, "status">+): boolean {+ // `status`, and nothing derived. An expired token is the NORMAL state — the+ // next use refreshes it — so judging usability by expiry hid working accounts+ // from the builder while Settings still listed them. When a refresh genuinely+ // fails, the refresh path records it here; that is what this reads.+ return connection.status === "Active";+}++/** The usable accounts, in the order `readConnections` returned them. */+export function usableConnections<+ T extends Pick<IntegrationConnection, "status">+>(connections: readonly T[]): T[] {+ return connections.filter(connectionUsable);+}++/**+ * Whether a piece's connections are in a state a workflow could actually use.+ *+ * NO accounts is not unhealthy — the card is Installed and both it and the builder+ * already offer a Connect button, so flagging it red would be noise. An account+ * that has GONE BAD is: every step using it fails, and nothing else tells anyone.+ */+export function connectionsHealthy(+ connections: readonly Pick<IntegrationConnection, "status">[]+): boolean {+ if (connections.length === 0) return true;+ return connections.some(connectionUsable);+}++/**+ * Scopes the vendor said it granted, recorded by the callback from the token+ * response (`metadata.scopes`; Slack separates with commas, the migration backfill+ * with spaces). `null` when the connection predates recording or the vendor does not+ * report them — a caller must never flag what it cannot see.+ */+export function grantedScopes(+ connection: Pick<IntegrationConnection, "metadata">+): string[] | null {+ const raw = connection.metadata.scopes;+ if (typeof raw !== "string") return null;+ const scopes = raw.split(/[\s,]+/).filter((s) => s.length > 0);+ return scopes.length === 0 ? null : scopes;+}++/**+ * Usable, but predates a scope the piece now needs — the one condition every+ * surface (Accounts tab, builder, card, step runner) must read the same way.+ */+export function needsReconnect(+ connection: Pick<IntegrationConnection, "status" | "metadata">,+ required: readonly string[]+): boolean {+ return (+ connectionUsable(connection) &&+ missingScopes(connection, required).length > 0+ );+}++/** Required scopes the connection does not hold. Empty when grants are unknown. */+export function missingScopes(+ connection: Pick<IntegrationConnection, "metadata">,+ required: readonly string[]+): string[] {+ const granted = grantedScopes(connection);+ if (granted === null) return [];+ const have = new Set(granted);+ return required.filter((scope) => !have.has(scope));+}++/**+ * The readers. `SELECT_COLUMNS` is a string, so supabase-js cannot infer the row+ * shape from it — these are the ONLY place that gap is bridged, rather than every+ * caller asserting the same shape for itself.+ */+export async function readConnections(+ client: SupabaseClient<Database>,+ companyId: string,+ pieceName?: string+): Promise<IntegrationConnection[]> {+ let query = client+ .from("integrationConnection")+ .select(SELECT_COLUMNS)+ .eq("companyId", companyId);+ if (pieceName !== undefined) query = query.eq("pieceName", pieceName);+ // A failed read must not look like "no connections": that would let an+ // uninstall finish with every vault token still valid, or report a company+ // Healthy when its rows could not be read at all.+ const { data, error } = await query.order("createdAt", { ascending: true });+ if (error) throw error;+ return (data ?? []) as unknown as IntegrationConnection[];+}++export async function readConnection(+ client: SupabaseClient<Database>,+ companyId: string,+ connectionId: string+): Promise<IntegrationConnection | null> {+ // `null` means "not this company's connection" — a transient failure must+ // not be read as that, or it turns into a false "reconnect needed" prompt.+ const { data, error } = await client+ .from("integrationConnection")+ .select(SELECT_COLUMNS)+ .eq("companyId", companyId)+ .eq("id", connectionId)+ .maybeSingle();+ if (error) throw error;+ return (data ?? null) as unknown as IntegrationConnection | null;+}++/**+ * Every company's connections of one piece to one vendor workspace+ * (`metadata.team_id`), oldest first. The one read that crosses companies: an+ * inbound vendor event names only its workspace, so the caller must check the+ * rows agree on a company before acting. Service role only.+ */+export async function readConnectionsByTeamId(+ serviceClient: SupabaseClient<Database>,+ pieceName: string,+ teamId: string+): Promise<IntegrationConnection[]> {+ // A failed read must not look like "no connection for this workspace".+ const { data, error } = await serviceClient+ .from("integrationConnection")+ .select(SELECT_COLUMNS)+ .eq("pieceName", pieceName)+ .eq("metadata->>team_id", teamId)+ .order("createdAt", { ascending: true });+ if (error) throw error;+ return (data ?? []) as unknown as IntegrationConnection[];+}++/** Which vendor account a connection acts as: the workspace for Slack, otherwise+ * the account label read back after consent. `null` when nothing identifies it. */+export function accountIdentity(+ accountLabel: string | null | undefined,+ metadata: Record<string, unknown> | null | undefined+): string | null {+ const teamId = metadata?.team_id;+ if (typeof teamId === "string" && teamId !== "") return `team:${teamId}`;+ return accountLabel ? `label:${accountLabel}` : null;+}++/** A stored row with no identity accepts any account. A stored identity must be+ * matched: an unidentified consent (the label read failed) is not the same account. */+export function sameAccount(+ stored: { accountLabel: string | null; metadata: unknown },+ incoming: {+ accountLabel?: string | null;+ metadata?: Record<string, unknown>;+ }+): boolean {+ const before = accountIdentity(+ stored.accountLabel,+ stored.metadata as Record<string, unknown> | null+ );+ const after = accountIdentity(incoming.accountLabel, incoming.metadata);+ return before === null || before === after;+}++export async function createConnection(+ serviceClient: SupabaseClient<Database>,+ args: {+ companyId: string;+ pieceName: string;+ name: string;+ /** Set by Reconnect: the one row this consent is for. */+ connectionId?: string;+ /** The name is the card's default, not one the user typed: when another+ * account holds it, the new account takes the next free name ("Gmail 2")+ * instead of being refused. Card Install after an Uninstall needs this, since+ * the revoked rows keep their names. */+ renameIfTaken?: boolean;+ authType?: string;+ accountLabel?: string | null;+ metadata?: Record<string, unknown>;+ tokens: ConnectionTokens;+ expiresAt?: string | null;+ createdBy: string;+ }+): Promise<{ id: string }> {+ // Refuse a workspace another company already uses. Only a usable connection+ // counts: a Revoked or Expired one no longer answers inbound events. Not+ // race-proof (no unique index spans companies), but it closes the ordinary path.+ const teamId = args.metadata?.team_id;+ if (typeof teamId === "string" && teamId !== "") {+ const sameWorkspace = await readConnectionsByTeamId(+ serviceClient,+ args.pieceName,+ teamId+ );+ if (+ sameWorkspace.some(+ (row) => row.companyId !== args.companyId && connectionUsable(row)+ )+ ) {+ throw new ConnectionWorkspaceTakenError(args.pieceName);+ }+ }++ // A consent REVIVES an existing row (by id for Reconnect, by name otherwise) so+ // saved workflow nodes keep their reference — but only for the SAME account, or+ // every workflow on the row would silently start acting as someone else.+ const lookup = serviceClient+ .from("integrationConnection")+ .select("id, accountLabel, metadata")+ .eq("companyId", args.companyId)+ .eq("pieceName", args.pieceName);+ const existing = await (args.connectionId === undefined+ ? lookup.eq("name", args.name)+ : lookup.eq("id", args.connectionId)+ ).maybeSingle();+ if (existing.error) throw existing.error;++ if (args.connectionId !== undefined && existing.data === null) {+ throw new Error(`Connection ${args.connectionId} was not found.`);+ }++ let name = args.name;+ let revive = existing.data;+ if (existing.data !== null && !sameAccount(existing.data, args)) {+ if (args.connectionId !== undefined) {+ throw accountIdentity(args.accountLabel, args.metadata) === null+ ? new ConnectionAccountUnverifiedError(existing.data.id)+ : new ConnectionAccountMismatchError(existing.data.id);+ }+ if (!args.renameIfTaken) throw new ConnectionNameTakenError(args.name);+ name = await freeConnectionName(+ serviceClient,+ args.companyId,+ args.pieceName,+ args.name+ );+ revive = null;+ }++ // One RPC writes the row (revive or insert) and the vault secret together, so a+ // failure can neither leave a Revoked row holding a live token nor an Active row+ // with no token.+ const { data, error } = await serviceClient.rpc("save_connection", {+ p_company_id: args.companyId,+ p_piece_name: args.pieceName,+ p_name: name,+ p_auth_type: args.authType ?? "OAUTH2",+ p_secret: args.tokens as never,+ p_user_id: args.createdBy,+ p_account_label: args.accountLabel ?? undefined,+ // A re-consent's token response is authoritative — its `scopes` is how a+ // "reconnect needed" account clears. Omitted keeps the stored metadata.+ p_metadata: args.metadata as never,+ p_expires_at: args.expiresAt ?? undefined,+ ...(revive === null ? {} : { p_connection_id: revive.id })+ });++ // Two people adding the same name at once: the unique index decides.+ if (error?.code === "23505") throw new ConnectionNameTakenError(name);+ if (error || typeof data !== "string") {+ throw error ?? new Error("Connection not saved.");+ }+ return { id: data };+}++/** `base` followed by the first number no connection of the piece is named. */+async function freeConnectionName(+ serviceClient: SupabaseClient<Database>,+ companyId: string,+ pieceName: string,+ base: string+): Promise<string> {+ const { data, error } = await serviceClient+ .from("integrationConnection")+ .select("name")+ .eq("companyId", companyId)+ .eq("pieceName", pieceName);+ if (error) throw error;+ const taken = new Set(data.map((row) => row.name));+ let suffix = 2;+ while (taken.has(`${base} ${suffix}`)) suffix += 1;+ return `${base} ${suffix}`;+}++export async function renameConnection(+ client: SupabaseClient<Database>,+ companyId: string,+ connectionId: string,+ name: string,+ updatedBy: string+) {+ return client+ .from("integrationConnection")+ .update({ name, updatedBy, updatedAt: new Date().toISOString() })+ .eq("companyId", companyId)+ .eq("id", connectionId);+}++/**+ * Drops the token and marks the row revoked, in one statement+ * (`revoke_connections`): an Active row whose secret is already gone reads as a+ * usable account that fails every use. The row itself SURVIVES: a saved workflow+ * node may reference the id, and a dangling id produces a worse error than a+ * clear "reconnect this" message.+ */+export async function disconnectConnection(+ serviceClient: SupabaseClient<Database>,+ companyId: string,+ pieceName: string,+ connectionId: string,+ updatedBy: string+) {+ const { error } = await serviceClient.rpc("revoke_connections", {+ p_company_id: companyId,+ p_piece_name: pieceName,+ p_updated_by: updatedBy,+ p_connection_id: connectionId+ });+ if (error) throw new Error(error.message);+}++/**+ * Revokes every account connected to one piece — what uninstalling its card means.+ * Generic rather than per-vendor, so a new piece registers this instead of adding a+ * hooks file of its own. Leaving live tokens behind would hand the customer+ * credentials they can no longer see.+ */+export async function revokeConnectionsForPiece(+ serviceClient: SupabaseClient<Database>,+ pieceName: string,+ companyId: string+): Promise<void> {+ const { error } = await serviceClient.rpc("revoke_connections", {+ p_company_id: companyId,+ p_piece_name: pieceName,+ p_updated_by: "system"+ });+ if (error) throw new Error(error.message);+}++async function writeTokens(+ serviceClient: SupabaseClient<Database>,+ companyId: string,+ connectionId: string,+ tokens: ConnectionTokens+): Promise<void> {+ const { error } = await serviceClient.rpc("upsert_connection_secret", {+ p_company_id: companyId,+ p_connection_id: connectionId,+ p_secret: tokens as never+ });+ // The function writes only onto an Active row: one disconnected while its+ // token was being refreshed answers no_data_found and stays revoked.+ if (error?.code === "P0002") throw new ConnectionRevokedError(connectionId);+ if (error)+ throw new ConnectionSecretUnavailableError(companyId, connectionId);+}++async function readTokens(+ serviceClient: SupabaseClient<Database>,+ companyId: string,+ connectionId: string+): Promise<ConnectionTokens> {+ const { data, error } = await serviceClient.rpc("get_connection_secret", {+ p_company_id: companyId,+ p_connection_id: connectionId+ });+ if (error || data === null || typeof data !== "object") {+ throw new ConnectionSecretUnavailableError(companyId, connectionId);+ }+ const bag = data as { accessToken?: string; refreshToken?: string };+ if (typeof bag.accessToken !== "string") {+ throw new ConnectionSecretUnavailableError(companyId, connectionId);+ }+ return { accessToken: bag.accessToken, refreshToken: bag.refreshToken };+}++/** Inside the refresh window, so a use must refresh first. No expiry never expires. */+export function expiringSoon(expiresAt: string | null): boolean {+ if (expiresAt === null) return false;+ return Date.parse(expiresAt) - Date.now() <= REFRESH_WINDOW_MS;+}++/**+ * Claim the refresh with a conditional UPDATE. A Postgres advisory lock would+ * release at the RPC's transaction end, which is before the token exchange+ * finishes — this claim survives it. Returns true when we own the refresh.+ *+ * Two sequential single-filter updates, NOT one `.or(...)`: PostgREST (13.0.8)+ * builds the or-tree of a mutation with an unquoted table qualifier, so on a+ * camelCase table like this one every such UPDATE fails with 42703 — which,+ * with the error then discarded, read as "someone else holds the claim" and+ * surfaced to the customer as an endless "still being reconnected". The split+ * is race-safe: under READ COMMITTED the second writer re-checks its WHERE+ * against the row the first one committed, so exactly one caller wins.+ *+ * A DB error is thrown, never folded into "claim lost": the losing path polls+ * for a refresh that no one is doing, and the timeout it ends in names nothing.+ */+async function claimRefresh(+ serviceClient: SupabaseClient<Database>,+ companyId: string,+ connectionId: string+): Promise<boolean> {+ const now = new Date();+ const staleBefore = new Date(+ now.getTime() - CLAIM_STALE_SECONDS * 1000+ ).toISOString();++ // The common case: nobody is refreshing.+ const fresh = await serviceClient+ .from("integrationConnection")+ .update({ refreshingAt: now.toISOString() })+ .eq("companyId", companyId)+ .eq("id", connectionId)+ .is("refreshingAt", null)+ .select("id");+ if (fresh.error) throw new Error(fresh.error.message);+ if (Array.isArray(fresh.data) && fresh.data.length > 0) return true;++ // A claim exists — take it over only if its holder has been gone too long.+ const stale = await serviceClient+ .from("integrationConnection")+ .update({ refreshingAt: now.toISOString() })+ .eq("companyId", companyId)+ .eq("id", connectionId)+ .lt("refreshingAt", staleBefore)+ .select("id");+ if (stale.error) throw new Error(stale.error.message);+ return Array.isArray(stale.data) && stale.data.length > 0;+}++const wait = (ms: number) =>+ new Promise<void>((resolve) => setTimeout(resolve, ms));++export interface OAuth2RefreshConfig {+ tokenUrl: string;+ clientId: string;+ clientSecret: string;+}++/**+ * The fresh access token for a connection, refreshing it first when it is close+ * to expiry. The one function a workflow step or an options lookup calls.+ */+export async function resolveConnectionAuth(+ serviceClient: SupabaseClient<Database>,+ companyId: string,+ connectionId: string,+ oauth: OAuth2RefreshConfig+): Promise<{ accessToken: string; connection: IntegrationConnection }> {+ const connection = await readConnection(+ serviceClient,+ companyId,+ connectionId+ );+ if (connection === null || connection.status !== "Active") {+ throw new ConnectionRevokedError(connectionId);+ }++ const tokens = await readTokens(serviceClient, companyId, connectionId);+ if (!expiringSoon(connection.expiresAt)) {+ return { accessToken: tokens.accessToken, connection };+ }++ if (tokens.refreshToken === undefined) {+ await markExpired(+ serviceClient,+ companyId,+ connectionId,+ "No refresh token was stored for this connection."+ );+ throw new ConnectionRevokedError(connectionId);+ }++ const claimed = await claimRefresh(serviceClient, companyId, connectionId);+ if (!claimed) {+ // Someone else is refreshing; wait for their token rather than racing them.+ return {+ accessToken: await awaitRefreshedToken(+ serviceClient,+ companyId,+ connectionId+ ),+ connection+ };+ }++ // Everything from here until the claim is cleared must release it on ANY failure.+ // `claimRefresh` writes a fresh `refreshingAt` when it wins, so a throw in between+ // leaves a live 30-second claim: every later request loses the claim, polls for+ // the full 5 seconds, and fails with a timeout that names nothing. Only the token+ // exchange used to be guarded — a vault write that threw stranded the claim.+ //+ // Re-read the row and its tokens AFTER winning: the reads above happened before+ // the claim, so another worker may have refreshed in between. Exchanging the+ // refresh token read earlier would send a rotated-away token, get `invalid_grant`+ // and condemn a healthy connection.+ let current: IntegrationConnection | null;+ let currentTokens: ConnectionTokens | null = null;+ try {+ current = await readConnection(serviceClient, companyId, connectionId);+ if (current !== null && current.status === "Active") {+ currentTokens = await readTokens(serviceClient, companyId, connectionId);+ }+ } catch (cause) {+ await releaseClaim(serviceClient, companyId, connectionId);+ throw cause;+ }+ if (current === null || currentTokens === null) {+ await releaseClaim(serviceClient, companyId, connectionId);+ throw new ConnectionRevokedError(connectionId);+ }+ if (!expiringSoon(current.expiresAt)) {+ // Someone refreshed between our first read and our claim.+ await releaseClaim(serviceClient, companyId, connectionId);+ return { accessToken: currentTokens.accessToken, connection: current };+ }+ const refreshToken = currentTokens.refreshToken;+ if (refreshToken === undefined) {+ await markExpired(+ serviceClient,+ companyId,+ connectionId,+ "No refresh token was stored for this connection."+ );+ throw new ConnectionRevokedError(connectionId);+ }++ let refreshed: ExchangedTokens;+ try {+ refreshed = await exchangeRefreshToken(oauth, refreshToken);+ } catch (cause) {+ // Only a definitive vendor rejection condemns the connection; a network error+ // or vendor 5xx is transient, so release the claim and let the next use retry.+ if (cause instanceof ConnectionRejectedError) {+ await markExpired(serviceClient, companyId, connectionId, cause.message);+ throw new ConnectionRevokedError(connectionId);+ }+ await releaseClaim(serviceClient, companyId, connectionId);+ throw cause;+ }++ try {+ await writeTokens(serviceClient, companyId, connectionId, {+ accessToken: refreshed.accessToken,+ // Google omits the refresh token on a refresh response; keep the stored one.+ refreshToken: refreshed.refreshToken ?? refreshToken+ });++ // Only a row still Active: a disconnect between the token write and here+ // has deleted the token, and must not be undone.+ const settled = await serviceClient+ .from("integrationConnection")+ .update({+ expiresAt: refreshed.expiresAt,+ refreshingAt: null,+ lastError: null+ })+ .eq("companyId", companyId)+ .eq("id", connectionId)+ .eq("status", "Active")+ .select("id");+ // A silent failure here leaves `expiresAt` stale and the claim held, so every+ // later request loses the claim and polls out a timeout that names nothing.+ if (settled.error) throw new Error(settled.error.message);+ if (settled.data.length === 0) {+ throw new ConnectionRevokedError(connectionId);+ }+ } catch (cause) {+ // The token itself is fine — storing it was not. Release the claim so the next+ // attempt can retry immediately rather than waiting out a phantom refresh.+ await releaseClaim(serviceClient, companyId, connectionId);+ throw cause;+ }++ return {+ accessToken: refreshed.accessToken,+ connection: { ...current, expiresAt: refreshed.expiresAt }+ };+}++/**+ * The stored access token for a vendor whose tokens do not expire (Slack bot tokens),+ * for callers outside a workflow step — the Assistant's slash commands and thread+ * sync. Takes the row the caller already read, so the guard below judges exactly+ * the connection it picked. Refuses anything it cannot vouch for: a non-Active+ * connection, or one that carries an expiry inside the refresh window (a+ * refreshable vendor must go through `resolveConnectionAuth`, which owns the+ * refresh claim).+ */+export async function readConnectionAccessToken(+ serviceClient: SupabaseClient<Database>,+ connection: Pick<+ IntegrationConnection,+ "id" | "companyId" | "status" | "expiresAt"+ >+): Promise<string> {+ if (!connectionUsable(connection)) {+ throw new ConnectionRevokedError(connection.id);+ }+ if (expiringSoon(connection.expiresAt)) {+ throw new Error(+ `Connection ${connection.id} carries an expiring token; use resolveConnectionAuth.`+ );+ }+ return (await readTokens(serviceClient, connection.companyId, connection.id))+ .accessToken;+}++async function awaitRefreshedToken(+ serviceClient: SupabaseClient<Database>,+ companyId: string,+ connectionId: string+): Promise<string> {+ for (let attempt = 0; attempt < POLL_ATTEMPTS; attempt++) {+ await wait(POLL_INTERVAL_MS);+ const current = await readConnection(+ serviceClient,+ companyId,+ connectionId+ );+ if (current === null) break;+ if (current.status !== "Active") {+ throw new ConnectionRevokedError(connectionId);+ }+ if (!expiringSoon(current.expiresAt)) {+ const tokens = await readTokens(serviceClient, companyId, connectionId);+ return tokens.accessToken;+ }+ }+ throw new ConnectionRefreshTimeoutError(connectionId);+}++/** Drop a refresh claim without touching status — the connection may still be fine.+ * A failed release is thrown, never swallowed: the stale-claim takeover bounds the+ * damage at 30 seconds, but the caller should not report a clean retry it did not get. */+async function releaseClaim(+ serviceClient: SupabaseClient<Database>,+ companyId: string,+ connectionId: string+): Promise<void> {+ const { error } = await serviceClient+ .from("integrationConnection")+ .update({ refreshingAt: null })+ .eq("companyId", companyId)+ .eq("id", connectionId);+ if (error) throw new Error(error.message);+}++async function markExpired(+ serviceClient: SupabaseClient<Database>,+ companyId: string,+ connectionId: string,+ lastError: string+): Promise<void> {+ // A failed write here would leave a condemned connection Active — the next use+ // would retry a grant the vendor already rejected instead of saying "reconnect".+ // A Revoked row stays Revoked: the account was disconnected on purpose.+ const { error } = await serviceClient+ .from("integrationConnection")+ .update({ status: "Expired", lastError, refreshingAt: null })+ .eq("companyId", companyId)+ .eq("id", connectionId)+ .neq("status", "Revoked");+ if (error) throw new Error(error.message);+}++export interface ExchangedTokens {+ accessToken: string;+ refreshToken?: string;+ expiresAt: string | null;+ /** The parsed token response, in memory only — never persisted whole. A piece's+ * allowlist row may pick workspace facts (Slack's team and webhook channel) off it. */+ body: Record<string, unknown>;+}++/** How long any call to a vendor's OAuth endpoints may take. A stalled endpoint+ * would otherwise hang the OAuth callback or a step's refresh with it. */+export const TOKEN_REQUEST_TIMEOUT_MS = 10_000;++/**+ * The one token-endpoint call. Server-side only — `client_secret` must never reach+ * the browser. A failure throws; the OAuth callback picks its error code by which+ * stage threw, never by reading this message.+ */+async function postTokenRequest(+ tokenUrl: string,+ body: Record<string, string>+): Promise<ExchangedTokens> {+ const response = await fetch(tokenUrl, {+ method: "POST",+ headers: { "Content-Type": "application/x-www-form-urlencoded" },+ body: new URLSearchParams(body),+ // The abort throws, which every caller treats as transient — exactly right+ // for a vendor that stopped answering.+ signal: AbortSignal.timeout(TOKEN_REQUEST_TIMEOUT_MS)+ });++ if (!response.ok) {+ // Only `invalid_grant` says the grant itself is gone, so only it condemns the+ // connection. Everything else stays retryable: a 429 or vendor 5xx, a+ // transient OAuth code, and `invalid_client` / `unauthorized_client`, which+ // arrive with the same 400/401 but mean Carbon's own OAuth app is+ // misconfigured (a rotated secret) — condemning on those would mark every+ // account Expired, and fixing the secret would not bring them back.+ const code = await oauthErrorCode(response);+ if (code === "invalid_grant") {+ throw new ConnectionRejectedError(response.status);+ }+ throw new Error(+ `The vendor token endpoint failed (${response.status}${code ? `: ${code}` : ""}).`+ );+ }+ return readTokenResponse(await response.json());+}++async function oauthErrorCode(response: Response): Promise<string | undefined> {+ try {+ const payload = (await response.json()) as { error?: unknown };+ return typeof payload.error === "string" ? payload.error : undefined;+ } catch {+ return undefined;+ }+}++export async function exchangeRefreshToken(+ oauth: OAuth2RefreshConfig,+ refreshToken: string+): Promise<ExchangedTokens> {+ return postTokenRequest(oauth.tokenUrl, {+ grant_type: "refresh_token",+ refresh_token: refreshToken,+ client_id: oauth.clientId,+ client_secret: oauth.clientSecret+ });+}++/** Swaps an authorization code for the first token pair. */+export async function exchangeAuthorizationCode(+ oauth: OAuth2RefreshConfig & { redirectUri: string },+ code: string+): Promise<ExchangedTokens> {+ return postTokenRequest(oauth.tokenUrl, {+ grant_type: "authorization_code",+ code,+ client_id: oauth.clientId,+ client_secret: oauth.clientSecret,+ redirect_uri: oauth.redirectUri+ });+}++function readTokenResponse(payload: unknown): ExchangedTokens {+ const body = payload as {+ access_token?: string;+ refresh_token?: string;+ expires_in?: number;+ error?: string;+ };+ if (typeof body.access_token !== "string") {+ // Slack rejects with HTTP 200 and `{ ok: false, error }`; name it for the server+ // log. The browser never sees it — the callback answers a code.+ throw new Error(+ typeof body.error === "string"+ ? `The connection returned no access token (${body.error}).`+ : "The connection returned no access token."+ );+ }+ return {+ accessToken: body.access_token,+ refreshToken: body.refresh_token,+ expiresAt:+ typeof body.expires_in === "number"+ ? new Date(Date.now() + body.expires_in * 1000).toISOString()+ : null,+ body: (payload ?? {}) as Record<string, unknown>+ };+}diff --git a/packages/ee/src/integrations/piece-integration.ts b/packages/ee/src/integrations/piece-integration.tsnew file mode 100644index 0000000000..d6a07a6cc2--- /dev/null+++ b/packages/ee/src/integrations/piece-integration.ts@@ -0,0 +1,40 @@+// SPDX-License-Identifier: LicenseRef-Carbon-Commercial+// Carbon Enterprise file, licensed only under the Carbon Commercial License+// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.++import { z } from "zod";+import { defineIntegration } from "../fns";+import type { IntegrationConfig } from "../types";+import { startIntegrationConnect } from "./connect";+import { pieceLogo } from "./piece-logo";+import type { ActivepiecesPiece } from "./pieces";++/** What a piece card says about itself. Everything else is the same for every+ * piece, so it is written once below. */+type PieceCard = Pick<+ IntegrationConfig,+ "name" | "category" | "active" | "shortDescription" | "description"+>;++/**+ * A workflow piece as an ORDINARY integration card. Its `id` IS the piece name,+ * which is what lets the connect route, the uninstall hook and the workflow+ * catalog all address it as one thing. No settings form and no Submit: Install+ * opens the piece's consent popup through the connect route, and the card's+ * Accounts tab manages however many accounts the company connects.+ */+export function definePieceIntegration<const P extends ActivepiecesPiece>(+ piece: P,+ card: PieceCard+) {+ return defineIntegration({+ ...card,+ id: piece,+ logo: pieceLogo(piece),+ images: [],+ settings: [],+ schema: z.object({}),+ onClientInstall: () =>+ startIntegrationConnect(`/api/integrations/connections/${piece}/connect`)+ });+}diff --git a/packages/ee/src/integrations/piece-logo.tsx b/packages/ee/src/integrations/piece-logo.tsxnew file mode 100644index 0000000000..7a03e4e495--- /dev/null+++ b/packages/ee/src/integrations/piece-logo.tsx@@ -0,0 +1,24 @@+// SPDX-License-Identifier: LicenseRef-Carbon-Commercial+// Carbon Enterprise file, licensed only under the Carbon Commercial License+// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.++import type { FC } from "react";+import type { PieceLogoSlug } from "./pieces";++/** Every Activepieces piece publishes its logo at this CDN path — `logoUrl` is a+ * required field of `createPiece`, and all of them follow+ * `https://cdn.activepieces.com/pieces/<name>.png` — so a card's logo is derived+ * from the name instead of drawn by hand. `PieceLogoSlug` is the set of names+ * verified to exist there; the CDN 404s silently as a broken image, which is why+ * the parameter is not a plain string. */+export function pieceLogo(piece: PieceLogoSlug): FC<{ className?: string }> {+ return function PieceLogo({ className }: { className?: string }) {+ return (+ <img+ src={`https://cdn.activepieces.com/pieces/${piece}.png`}+ alt={piece}+ className={className}+ />+ );+ };+}diff --git a/packages/ee/src/integrations/pieces.ts b/packages/ee/src/integrations/pieces.tsnew file mode 100644index 0000000000..85c84e8884--- /dev/null+++ b/packages/ee/src/integrations/pieces.ts@@ -0,0 +1,39 @@+// SPDX-License-Identifier: LicenseRef-Carbon-Commercial+// Carbon Enterprise file, licensed only under the Carbon Commercial License+// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.++/**+ * The Activepieces pieces Carbon exposes — the NAMES only.+ *+ * `PIECE_ALLOWLIST` (@carbon/jobs) stays the single declaration of what each+ * piece exposes (package, version, actions, OAuth); this list is the key set that+ * allowlist, the settings cards, the uninstall hooks and `pieceLogo` all share, so+ * a misspelled or unsupported piece name is a type error instead of a runtime 404.+ * It lives here rather than in @carbon/jobs because the dependency only runs+ * jobs → ee, and the ee configs need it too.+ *+ * Adding a piece: extend this list first — the allowlist's `Record` then+ * refuses to compile until the new piece has an entry, and vice versa.+ */+export const ACTIVEPIECES_PIECES = [+ "gmail",+ "google-calendar",+ "slack"+] as const;++export type ActivepiecesPiece = (typeof ACTIVEPIECES_PIECES)[number];++/**+ * Names `pieceLogo` may fetch: the pieces, plus integrations that are NOT+ * pieces but whose official colored mark the Activepieces CDN also hosts.+ * Each extra slug was verified to resolve at+ * `https://cdn.activepieces.com/pieces/<slug>.png` before being listed —+ * extend only after checking, since the CDN 404s silently as a broken image.+ */+export type PieceLogoSlug =+ | ActivepiecesPiece+ | "jira"+ | "linear"+ | "quickbooks"+ | "stripe"+ | "xero";diff --git a/packages/ee/src/integrations/secrets.ts b/packages/ee/src/integrations/secrets.tsindex 31729cafeb..13e9d7ed85 100644--- a/packages/ee/src/integrations/secrets.ts+++ b/packages/ee/src/integrations/secrets.ts@@ -28,7 +28,7 @@ import type { SupabaseClient } from "@supabase/supabase-js";export const SECRET_KEYS: Record<string, string[]> = {linear: ["apiKey", "webhookSigningSecret"],mount: ["clientSecret"],- slack: ["access_token"],+ // slack: none — its token lives on integrationConnection (piece "slack").jira: ["credentials.accessToken","credentials.refreshToken",diff --git a/packages/ee/src/jira/config.tsx b/packages/ee/src/jira/config.tsxindex 977424ae90..9797b0c3f8 100644--- a/packages/ee/src/jira/config.tsx+++ b/packages/ee/src/jira/config.tsx@@ -5,16 +5,16 @@import { JIRA_CLIENT_ID } from "@carbon/auth";import { Copy, Input, InputGroup, InputRightElement } from "@carbon/react";import { isBrowser } from "@carbon/utils";-import type { SVGProps } from "react";import { z } from "zod";import { defineIntegration } from "../fns";+import { pieceLogo } from "../integrations/piece-logo";export const Jira = defineIntegration({name: "Jira",id: "jira",active: !!JIRA_CLIENT_ID,category: "Project Management",- logo: Logo,+ logo: pieceLogo("jira"),description:"Jira is a project management and issue tracking tool by Atlassian. With this integration, you can link quality issues and change notices from Carbon to Jira for tracking and collaboration.",shortDescription:@@ -84,20 +84,3 @@ function SetupInstructions({ companyId }: { companyId: string }) {</>);}--export function Logo(props: SVGProps<SVGSVGElement>) {- return (- <svg- xmlns="http://www.w3.org/2000/svg"- {...props}- width="40"- height="40"- viewBox="0 0 24 24"- fill="currentColor"- >- <title>atlassian_jira</title>- <rect width="24" height="24" fill="none" />- <path d="M11.53,2a4.37,4.37,0,0,0,4.35,4.35h1.78v1.7A4.35,4.35,0,0,0,22,12.4V2.84A.85.85,0,0,0,21.16,2H11.53M6.77,6.8a4.36,4.36,0,0,0,4.34,4.34h1.8v1.72a4.36,4.36,0,0,0,4.34,4.34V7.63a.84.84,0,0,0-.83-.83H6.77M2,11.6a4.34,4.34,0,0,0,4.35,4.34H8.13v1.72A4.36,4.36,0,0,0,12.47,22V12.43a.85.85,0,0,0-.84-.84H2Z" />- </svg>- );-}diff --git a/packages/ee/src/linear/config.tsx b/packages/ee/src/linear/config.tsxindex f3e608f839..9be80ed029 100644--- a/packages/ee/src/linear/config.tsx+++ b/packages/ee/src/linear/config.tsx@@ -4,15 +4,15 @@import { Copy, Input, InputGroup, InputRightElement } from "@carbon/react";import { isBrowser } from "@carbon/utils";-import type { SVGProps } from "react";import { z } from "zod";import { defineIntegration } from "../fns";+import { pieceLogo } from "../integrations/piece-logo";export const Linear = defineIntegration({name: "Linear",id: "linear",active: true,category: "Project Management",- logo: Logo,+ logo: pieceLogo("linear"),description:"Linear is a project management software that allows you to create issues and track project progress seamlessly. With this integration, you can link issues and change notices from Carbon to Linear.",shortDescription: "Sync issues and change notices from Carbon to Linear.",@@ -90,21 +90,3 @@ function SetupInstructions({ companyId }: { companyId: string }) {</>);}--export function Logo(props: SVGProps<SVGSVGElement>) {- return (- <svg- xmlns="http://www.w3.org/2000/svg"- fill="none"- width={200}- height={200}- viewBox="0 0 100 100"- {...props}- >- <path- fill="currentColor"- d="M1.225 61.523c-.222-.949.908-1.546 1.597-.857l36.512 36.512c.69.69.092 1.82-.857 1.597-18.425-4.323-32.93-18.827-37.252-37.252M.002 46.889a1 1 0 0 0 .29.76L52.35 99.71c.201.2.478.307.76.29 2.37-.149 4.695-.46 6.963-.927.765-.157 1.03-1.096.478-1.648L2.576 39.448c-.552-.551-1.491-.286-1.648.479a50 50 0 0 0-.926 6.962M4.21 29.705a.99.99 0 0 0 .208 1.1l64.776 64.776a.99.99 0 0 0 1.1.208 50 50 0 0 0 5.185-2.684.98.98 0 0 0 .183-1.54L8.436 24.336a.98.98 0 0 0-1.541.183 50 50 0 0 0-2.684 5.185m8.448-11.631a.986.986 0 0 1-.045-1.354C21.78 6.46 35.111 0 49.952 0 77.592 0 100 22.407 100 50.048c0 14.84-6.46 28.172-16.72 37.338a.986.986 0 0 1-1.354-.045z"- />- </svg>- );-}diff --git a/packages/ee/src/onshape/config.tsx b/packages/ee/src/onshape/config.tsxindex f42a5ba7b0..acef4ddded 100644--- a/packages/ee/src/onshape/config.tsx+++ b/packages/ee/src/onshape/config.tsx@@ -237,69 +237,69 @@ export function Logo(props: SVGProps<SVGSVGElement>) {width="216"height="49"viewBox="0 0 216 49"- fill="currentColor"+ fill="#40AA1D"xmlns="http://www.w3.org/2000/svg"{...props}><pathd="M11.2302 24.3207L14.7526 26.3435V21.7777L24.3381 16.1716L20.8735 14.0332L11.2302 19.6971V24.3207Z"- fill="currentColor"+ fill="#40AA1D"></path><pathd="M20.8735 0.97168L28.8421 5.59527L7.8811 18.0212V28.7132L0.258911 24.263V12.993L20.8735 0.97168Z"- fill="currentColor"+ fill="#40AA1D"></path><pathd="M26.4168 17.3855L22.8945 19.4083L26.9365 21.7779L26.8788 32.5855L30.4012 30.5627V19.6973L26.4168 17.3855Z"- fill="currentColor"+ fill="#40AA1D"></path><pathd="M41.6612 36.8622L33.6925 41.6014V17.8477L24.0493 12.1838L32.1335 7.50244L41.6612 13.0507V36.8622Z"- fill="currentColor"+ fill="#40AA1D"></path><pathd="M24.8578 33.857V29.9269L20.8157 32.2965L11.2302 26.6904V30.6205L20.8734 36.2266L24.8578 33.857Z"- fill="currentColor"+ fill="#40AA1D"></path><pathd="M0.258911 37.0355V28.2507L20.8735 40.0409L30.3435 34.377L30.4012 43.5086L21.1045 48.9991L0.258911 37.0355Z"- fill="currentColor"+ fill="#40AA1D"></path><pathd="M68.4544 15.3625C71.3416 15.3625 73.6514 16.3451 75.4414 18.2523C77.116 20.1017 77.9822 22.4713 77.9822 25.3033C77.9822 28.1352 77.116 30.5048 75.4414 32.3542C73.6514 34.2614 71.3416 35.244 68.4544 35.244C65.5672 35.244 63.2575 34.2614 61.4674 32.3542C59.7929 30.5048 58.9267 28.1352 58.9267 25.3033C58.9267 22.4713 59.7929 20.1017 61.4674 18.2523C63.2575 16.3451 65.5672 15.3625 68.4544 15.3625ZM68.4544 32.5854C70.5332 32.5854 72.15 31.8919 73.3627 30.447C74.5175 29.0599 75.095 27.3839 75.095 25.3033C75.095 23.2226 74.5175 21.4888 73.3627 20.1595C72.15 18.7146 70.5332 18.0211 68.4544 18.0211C66.3757 18.0211 64.7588 18.7146 63.5462 20.1595C62.3913 21.5466 61.8139 23.2226 61.8139 25.3033C61.8139 27.3839 62.3913 29.1177 63.5462 30.447C64.7011 31.8919 66.3757 32.5854 68.4544 32.5854Z"- fill="currentColor"+ fill="#40AA1D"></path><pathd="M84.6805 15.7093V18.7146C85.3734 17.7899 86.2396 17.0386 87.2212 16.3451C88.2028 15.7093 89.3577 15.3625 90.6281 15.3625C91.8984 15.3625 92.9956 15.5359 93.9195 15.8827C94.8434 16.2295 95.6518 16.8074 96.3447 17.501C97.9038 19.0614 98.7122 21.142 98.7122 23.685V34.8972H95.825V23.8006C95.825 22.009 95.3053 20.6219 94.3237 19.5816C93.342 18.5413 92.0139 18.0211 90.4549 18.0211C88.838 18.0211 87.4522 18.5413 86.355 19.6394C85.2002 20.7375 84.6805 22.1245 84.6805 23.8584V34.955H81.7933V15.7093H84.6805Z"- fill="currentColor"+ fill="#40AA1D"></path><pathd="M114.823 20.853C114.592 18.8302 112.975 17.8477 110.03 17.8477C107.085 17.8477 105.584 18.7724 105.584 20.6218C105.584 21.3731 105.872 21.9511 106.508 22.3557C107.143 22.7602 107.951 23.107 108.875 23.3382C109.799 23.5693 110.838 23.8583 111.993 24.0317C113.09 24.2629 114.13 24.5519 115.111 24.9564C116.035 25.361 116.844 25.8811 117.479 26.5747C118.114 27.2682 118.403 28.1929 118.403 29.4066C118.403 31.2561 117.71 32.7009 116.266 33.6834C114.881 34.666 112.975 35.1861 110.55 35.1861C108.009 35.1861 105.93 34.5504 104.429 33.2789C103.043 32.123 102.292 30.6781 102.177 28.8287H105.18C105.353 30.6203 106.334 31.7762 108.182 32.412C108.875 32.6431 109.51 32.7009 110.146 32.7009C110.781 32.7009 111.416 32.6431 111.993 32.5853C112.571 32.5275 113.09 32.3542 113.668 32.1808C114.881 31.7184 115.516 30.8515 115.516 29.6956C115.516 28.8865 115.227 28.3085 114.592 27.8462C113.957 27.4416 113.148 27.0948 112.224 26.8059C111.3 26.5169 110.261 26.2857 109.106 26.0545C108.009 25.8233 106.97 25.5344 105.988 25.1298C105.064 24.7252 104.256 24.2051 103.62 23.5693C102.985 22.8758 102.697 22.0089 102.697 20.7952C102.697 19.0614 103.332 17.6743 104.602 16.7496C105.872 15.767 107.72 15.3047 110.203 15.3047C112.571 15.3047 114.419 15.8826 115.747 16.9807C116.902 17.9055 117.537 19.1769 117.71 20.7374H114.823V20.853Z"- fill="currentColor"+ fill="#40AA1D"></path><pathd="M124.928 7.96484V18.6569C125.621 17.7322 126.487 16.9808 127.469 16.2873C128.45 15.6516 129.605 15.3048 130.876 15.3048C132.146 15.3048 133.243 15.4782 134.167 15.8249C135.091 16.1717 135.899 16.7497 136.592 17.4432C138.151 19.0037 138.96 21.0843 138.96 23.6272V34.8394H136.073V23.8006C136.073 22.009 135.553 20.6219 134.571 19.5816C133.59 18.5413 132.261 18.0211 130.702 18.0211C129.086 18.0211 127.7 18.5413 126.603 19.6394C125.448 20.7375 124.928 22.1246 124.928 23.8584V34.955H122.041V7.96484H124.928Z"- fill="currentColor"+ fill="#40AA1D"></path><pathd="M158.766 31.8341C157.207 34.0881 154.955 35.244 151.894 35.244C149.123 35.244 146.871 34.2614 145.138 32.3542C143.464 30.447 142.598 28.1352 142.598 25.3033C142.598 22.5291 143.464 20.1595 145.138 18.2523C146.871 16.3451 149.18 15.3625 152.068 15.3625C154.955 15.3625 157.207 16.5184 158.766 18.7724V15.6515H161.653V34.8972H158.766V31.8341ZM152.299 32.5854C154.377 32.5854 155.994 31.8919 157.207 30.447C158.362 29.0599 158.939 27.3839 158.939 25.3033C158.939 23.2226 158.362 21.4888 157.207 20.1595C155.994 18.7146 154.377 18.0211 152.299 18.0211C150.278 18.0211 148.603 18.7146 147.333 20.1595C146.12 21.5466 145.543 23.2226 145.543 25.3033C145.543 27.3839 146.12 29.1177 147.333 30.447C148.545 31.8919 150.22 32.5854 152.299 32.5854Z"- fill="currentColor"+ fill="#40AA1D"></path><pathd="M169.506 18.7724C171.065 16.5184 173.317 15.3625 176.378 15.3625C179.149 15.3625 181.401 16.3451 183.076 18.2523C184.808 20.1595 185.675 22.4713 185.675 25.3033C185.675 28.0774 184.808 30.447 183.076 32.3542C181.344 34.2614 179.034 35.244 176.147 35.244C173.26 35.244 171.008 34.0881 169.448 31.8341V42.5839H166.561V15.7093H169.448V18.7724H169.506ZM176.031 17.9633C173.952 17.9633 172.336 18.6569 171.123 20.1017C169.968 21.4888 169.391 23.1648 169.391 25.2455C169.391 27.3261 169.968 29.0599 171.123 30.3892C172.336 31.8341 173.952 32.5276 176.031 32.5276C178.052 32.5276 179.727 31.8341 180.997 30.3892C182.21 29.0021 182.787 27.3261 182.787 25.2455C182.787 23.1648 182.21 21.431 180.997 20.1017C179.727 18.7146 178.052 17.9633 176.031 17.9633Z"- fill="currentColor"+ fill="#40AA1D"></path><pathd="M198.032 32.5853C200.63 32.5853 202.478 31.4872 203.575 29.3488H206.751C206.058 31.0827 205.019 32.5275 203.575 33.5679C202.132 34.666 200.284 35.1861 197.974 35.1861C195.087 35.1861 192.719 34.2036 190.929 32.2964C189.139 30.4469 188.273 28.0773 188.273 25.2454C188.273 22.4135 189.139 20.0439 190.814 18.1944C192.604 16.2872 194.914 15.3047 197.801 15.3047C200.688 15.3047 202.998 16.2872 204.788 18.1944C206.462 20.0439 207.329 22.4135 207.329 25.2454V26.4013H191.218C191.449 28.1929 192.142 29.6378 193.354 30.7937C194.567 32.0074 196.126 32.5853 198.032 32.5853ZM197.801 17.9633C196.011 17.9633 194.567 18.5412 193.354 19.6393C192.2 20.6796 191.564 22.0667 191.276 23.7427H204.326C204.095 22.0667 203.402 20.6796 202.247 19.6393C201.034 18.5412 199.591 17.9633 197.801 17.9633Z"- fill="currentColor"+ fill="#40AA1D"></path><pathd="M212.756 21.4889C211.082 21.4889 209.754 20.1019 209.754 18.4836C209.754 16.8075 211.14 15.4783 212.756 15.4783C214.431 15.4783 215.759 16.8653 215.759 18.4836C215.759 20.1019 214.431 21.4889 212.756 21.4889ZM212.756 15.7094C211.255 15.7094 210.042 16.9231 210.042 18.4258C210.042 19.9285 211.255 21.1422 212.756 21.1422C214.258 21.1422 215.47 19.9285 215.47 18.4258C215.47 16.9231 214.2 15.7094 212.756 15.7094Z"- fill="currentColor"+ fill="#40AA1D"></path><pathd="M213.045 16.9231C213.334 16.9231 213.565 16.9809 213.738 17.1543C213.911 17.3277 213.969 17.501 213.969 17.79C213.969 17.9634 213.911 18.1368 213.854 18.3102C213.738 18.4836 213.623 18.5414 213.449 18.5991C213.565 18.5991 213.623 18.6569 213.68 18.7147C213.738 18.7725 213.796 18.8303 213.796 18.8881C213.854 18.9459 213.854 19.0037 213.854 19.0615C213.854 19.1193 213.854 19.2349 213.911 19.2927C213.911 19.3505 213.911 19.4661 213.911 19.5239C213.911 19.5817 213.911 19.6972 213.911 19.755C213.911 19.8128 213.969 19.9284 213.969 19.9862C213.969 20.044 214.027 20.1018 214.084 20.1596H213.623C213.565 20.1018 213.565 20.1018 213.565 20.044C213.565 19.9862 213.565 19.9284 213.565 19.8706C213.565 19.8128 213.565 19.6972 213.565 19.6394C213.565 19.5817 213.565 19.4661 213.565 19.4083C213.565 19.3505 213.565 19.2349 213.507 19.1771C213.507 19.1193 213.449 19.0615 213.449 19.0037C213.392 18.9459 213.334 18.8881 213.276 18.8881C213.218 18.8303 213.103 18.8303 213.045 18.8303H212.006V20.2174H211.602V17.0387H213.045V16.9231ZM213.161 18.368C213.276 18.368 213.334 18.3102 213.392 18.2524C213.449 18.1946 213.507 18.1368 213.565 18.079C213.623 18.0212 213.623 17.9056 213.623 17.79C213.623 17.6166 213.565 17.501 213.507 17.3855C213.392 17.2699 213.276 17.2121 213.045 17.2121H212.006V18.3102H212.872C212.987 18.368 213.045 18.368 213.161 18.368Z"- fill="currentColor"+ fill="#40AA1D"></path></svg>);diff --git a/packages/ee/src/paperless-parts/config.tsx b/packages/ee/src/paperless-parts/config.tsxindex 756fd0f9ff..2fe219d035 100644--- a/packages/ee/src/paperless-parts/config.tsx+++ b/packages/ee/src/paperless-parts/config.tsx@@ -128,56 +128,56 @@ function Logo(props: SVGProps<SVGSVGElement>) {<g xmlns="http://www.w3.org/2000/svg"><g><path- fill="currentColor"+ fill="#F9751A"d="M30.88,44.22a15.56,15.56,0,0,1-3.23,5.08A13.43,13.43,0,0,1,23,52.44a14.08,14.08,0,0,1-5.37,1.06,11.46,11.46,0,0,1-6.35-1.64A16.52,16.52,0,0,1,7.11,48l.06,14.22H0V21.83H7.17V27a15.54,15.54,0,0,1,4.22-4.14,11.06,11.06,0,0,1,6.27-1.68A14,14,0,0,1,23,22.24a13.6,13.6,0,0,1,4.6,3.15,15.77,15.77,0,0,1,3.25,5.08,18,18,0,0,1,1.23,6.87A18.4,18.4,0,0,1,30.88,44.22Zm-6.67-11a9.58,9.58,0,0,0-1.91-3.14,8.39,8.39,0,0,0-2.82-2A8.54,8.54,0,0,0,16,27.35a8.76,8.76,0,0,0-3.47.71,8.35,8.35,0,0,0-2.87,2,10,10,0,0,0-2,3.14,11.81,11.81,0,0,0,0,8.23,10,10,0,0,0,2,3.14,8.49,8.49,0,0,0,2.87,2,8.75,8.75,0,0,0,3.47.7,8.53,8.53,0,0,0,3.44-.7,8.39,8.39,0,0,0,2.82-2,9.58,9.58,0,0,0,1.91-3.14,12.62,12.62,0,0,0,0-8.29Z"/><path- fill="currentColor"+ fill="#F9751A"d="M57.29,52.86V49a13.38,13.38,0,0,1-4,3.17,12.85,12.85,0,0,1-6,1.29A14,14,0,0,1,43,52.88a10.18,10.18,0,0,1-3.49-1.82,8.82,8.82,0,0,1-3.32-7.14v-.11a9.68,9.68,0,0,1,.94-4.41,8.57,8.57,0,0,1,2.61-3.12,12,12,0,0,1,4-1.85,19.51,19.51,0,0,1,5-.61,28.22,28.22,0,0,1,4.79.35,28.75,28.75,0,0,1,3.79.94v-.76a6.19,6.19,0,0,0-2-4.94,8.44,8.44,0,0,0-5.67-1.7,18.6,18.6,0,0,0-4.7.53,30.13,30.13,0,0,0-4.17,1.41L38.9,24a31.74,31.74,0,0,1,5.29-1.88,26.08,26.08,0,0,1,6.52-.71q6.93,0,10.28,3.44t3.35,9.66v18.4Zm.18-13.17a19.06,19.06,0,0,0-3.21-.88,21.19,21.19,0,0,0-3.9-.35,9.13,9.13,0,0,0-5.23,1.29,4.21,4.21,0,0,0-1.88,3.7v.12A3.85,3.85,0,0,0,45,47a7.44,7.44,0,0,0,4.26,1.17,10.62,10.62,0,0,0,3.26-.47,8.38,8.38,0,0,0,2.62-1.32,6.06,6.06,0,0,0,1.73-2,5.84,5.84,0,0,0,.62-2.68Z"/><path- fill="currentColor"+ fill="#F9751A"d="M101.62,44.22a15.4,15.4,0,0,1-3.23,5.08,13.39,13.39,0,0,1-4.64,3.14,14.13,14.13,0,0,1-5.38,1.06A11.44,11.44,0,0,1,82,51.86,16.18,16.18,0,0,1,77.86,48l0,14.22H70.75V21.83h7.16V27a15.69,15.69,0,0,1,4.22-4.14,11.1,11.1,0,0,1,6.28-1.68,14,14,0,0,1,5.33,1.06,13.5,13.5,0,0,1,4.6,3.15,15.79,15.79,0,0,1,3.26,5.08,18,18,0,0,1,1.23,6.87A18.2,18.2,0,0,1,101.62,44.22ZM95,33.2A9.41,9.41,0,0,0,93,30.06a8.49,8.49,0,0,0-6.25-2.71,8.72,8.72,0,0,0-3.47.71,8.3,8.3,0,0,0-2.88,2,10.15,10.15,0,0,0-2,3.14,12,12,0,0,0,0,8.23,10.15,10.15,0,0,0,2,3.14,8.43,8.43,0,0,0,2.88,2,8.71,8.71,0,0,0,3.47.7A8.43,8.43,0,0,0,93,44.63,9.41,9.41,0,0,0,95,41.49a12.45,12.45,0,0,0,0-8.29Z"/><path- fill="currentColor"+ fill="#F9751A"d="M117.34,45.72a8.84,8.84,0,0,0,5.88,2,10.34,10.34,0,0,0,4.58-.94A14.58,14.58,0,0,0,131.62,44l4.17,3.7A16.94,16.94,0,0,1,130.47,52a15.88,15.88,0,0,1-7.37,1.59,16.64,16.64,0,0,1-6.26-1.17A15.09,15.09,0,0,1,108.41,44a17.11,17.11,0,0,1-1.23-6.61,17.67,17.67,0,0,1,1.11-6.29A15.86,15.86,0,0,1,111.44,26a15.09,15.09,0,0,1,4.78-3.49,14.31,14.31,0,0,1,6.12-1.3,14.62,14.62,0,0,1,6.49,1.36,13.27,13.27,0,0,1,4.64,3.64,15.76,15.76,0,0,1,2.79,5.35,21.5,21.5,0,0,1,.94,6.4c0,.31,0,.63,0,.94s0,.65-.09,1H114.29A9.36,9.36,0,0,0,117.34,45.72Zm12.81-10.55a12.27,12.27,0,0,0-.76-3.2,8.17,8.17,0,0,0-1.59-2.59,7.63,7.63,0,0,0-2.38-1.73,7.34,7.34,0,0,0-3.14-.65,7.2,7.2,0,0,0-5.44,2.26,10.21,10.21,0,0,0-2.61,5.91Z"/><path- fill="currentColor"+ fill="#F9751A"d="M150.89,52.86h-7.17v-31h7.17v7a13.68,13.68,0,0,1,4.17-5.64,10.06,10.06,0,0,1,6.82-1.94v7.52h-.41a11.58,11.58,0,0,0-4.29.77,9,9,0,0,0-3.35,2.29,10.36,10.36,0,0,0-2.17,3.85,17.18,17.18,0,0,0-.77,5.37Z"/>- <path fill="currentColor" d="M168.4,52.86V10h7.17v42.9Z" />+ <path fill="#F9751A" d="M168.4,52.86V10h7.17v42.9Z" /><path- fill="currentColor"+ fill="#F9751A"d="M191.91,45.72a8.8,8.8,0,0,0,5.87,2,10.42,10.42,0,0,0,4.59-.94A14.54,14.54,0,0,0,206.18,44l4.18,3.7A17.05,17.05,0,0,1,205,52a16,16,0,0,1-7.38,1.59,16.58,16.58,0,0,1-6.25-1.17A15.06,15.06,0,0,1,183,44a17.11,17.11,0,0,1-1.23-6.61,17.46,17.46,0,0,1,1.12-6.29A15.83,15.83,0,0,1,186,26a15.13,15.13,0,0,1,4.79-3.49,14.27,14.27,0,0,1,6.11-1.3,14.59,14.59,0,0,1,6.49,1.36A13.4,13.4,0,0,1,208,26.18a15.94,15.94,0,0,1,2.79,5.35,21.83,21.83,0,0,1,.94,6.4c0,.31,0,.63,0,.94s-.05.65-.09,1h-22.8A9.37,9.37,0,0,0,191.91,45.72Zm12.81-10.55A12.28,12.28,0,0,0,204,32a8.33,8.33,0,0,0-1.58-2.59A7.63,7.63,0,0,0,200,27.65a7.39,7.39,0,0,0-3.15-.65,7.19,7.19,0,0,0-5.43,2.26,10.22,10.22,0,0,0-2.62,5.91Z"/><path- fill="currentColor"+ fill="#F9751A"d="M240.21,48a8.38,8.38,0,0,1-2.44,3,11,11,0,0,1-3.68,1.83,16.08,16.08,0,0,1-4.52.61,21,21,0,0,1-6.79-1.17,21.63,21.63,0,0,1-6.37-3.47L219.58,44a20.24,20.24,0,0,0,5.14,2.85,14.39,14.39,0,0,0,5,1,6,6,0,0,0,3.55-.91,2.87,2.87,0,0,0,1.27-2.44v-.11a2.27,2.27,0,0,0-.56-1.53,5.07,5.07,0,0,0-1.53-1.15,14.2,14.2,0,0,0-2.23-.88L227.63,40c-1.13-.36-2.28-.75-3.44-1.18a12.68,12.68,0,0,1-3.11-1.67,8.56,8.56,0,0,1-2.26-2.53,7.23,7.23,0,0,1-.88-3.73v-.12a8.93,8.93,0,0,1,.85-3.94,8.8,8.8,0,0,1,2.35-3A10.52,10.52,0,0,1,224.66,22,14.15,14.15,0,0,1,229,21.3a20,20,0,0,1,5.94.94,21.13,21.13,0,0,1,5.46,2.59l-2.82,5.05A23.18,23.18,0,0,0,233,27.74a13,13,0,0,0-4.23-.8,5.21,5.21,0,0,0-3.21.88,2.73,2.73,0,0,0-1.14,2.24v.11a2,2,0,0,0,.59,1.44,5.58,5.58,0,0,0,1.55,1.12,17.62,17.62,0,0,0,2.23.94c.85.29,1.72.58,2.62.85,1.14.35,2.27.77,3.41,1.24a14.35,14.35,0,0,1,3.08,1.73,8.74,8.74,0,0,1,2.27,2.5,6.91,6.91,0,0,1,.88,3.58v.12A9.89,9.89,0,0,1,240.21,48Z"/><path- fill="currentColor"+ fill="#F9751A"d="M269,48a8.38,8.38,0,0,1-2.44,3,11,11,0,0,1-3.67,1.83,16.16,16.16,0,0,1-4.53.61,20.94,20.94,0,0,1-6.78-1.17,21.56,21.56,0,0,1-6.38-3.47L248.37,44a20.29,20.29,0,0,0,5.15,2.85,14.3,14.3,0,0,0,5,1,6,6,0,0,0,3.55-.91,2.85,2.85,0,0,0,1.27-2.44v-.11a2.27,2.27,0,0,0-.56-1.53,5,5,0,0,0-1.53-1.15,14.2,14.2,0,0,0-2.23-.88L256.42,40c-1.13-.36-2.28-.75-3.43-1.18a12.57,12.57,0,0,1-3.12-1.67,8.56,8.56,0,0,1-2.26-2.53,7.23,7.23,0,0,1-.88-3.73v-.12a8.93,8.93,0,0,1,.85-3.94,8.8,8.8,0,0,1,2.35-3A10.57,10.57,0,0,1,253.46,22a14.15,14.15,0,0,1,4.32-.65,20,20,0,0,1,5.93.94,21.13,21.13,0,0,1,5.46,2.59l-2.82,5.05a22.91,22.91,0,0,0-4.52-2.14,13,13,0,0,0-4.23-.8,5.18,5.18,0,0,0-3.2.88,2.71,2.71,0,0,0-1.15,2.24v.11a2,2,0,0,0,.59,1.44,5.49,5.49,0,0,0,1.56,1.12,17,17,0,0,0,2.23.94c.84.29,1.71.58,2.61.85,1.14.35,2.27.77,3.41,1.24a14.43,14.43,0,0,1,3.09,1.73A8.7,8.7,0,0,1,269,40a6.81,6.81,0,0,1,.88,3.58v.12A9.75,9.75,0,0,1,269,48Z"/><path- fill="currentColor"+ fill="#F9751A"d="M309.19,32.35a12.76,12.76,0,0,1-3.56,4.52,15.33,15.33,0,0,1-5.28,2.74,22.69,22.69,0,0,1-6.5.91H287V52.86h-9.05V11.72h16.81a19.94,19.94,0,0,1,6.61,1,14.19,14.19,0,0,1,4.93,2.91,12.73,12.73,0,0,1,3.12,4.5,15,15,0,0,1,1.08,5.78v.12A14.45,14.45,0,0,1,309.19,32.35Zm-7.87-6.23a5.61,5.61,0,0,0-2-4.64A8.33,8.33,0,0,0,294,19.89h-7V32.47h7.17a7.36,7.36,0,0,0,5.29-1.8,5.88,5.88,0,0,0,1.88-4.43Z"/><path- fill="currentColor"+ fill="#F9751A"d="M343.62,52.86l-3.76-9.23H322.47l-3.76,9.23h-9.23l17.63-41.43h8.35l17.62,41.43ZM331.17,22.3,325.7,35.64h10.93Z"/><path- fill="currentColor"+ fill="#F9751A"d="M383.46,52.86l-8.81-13.17h-7.11V52.86h-9.05V11.72h18.8q7.35,0,11.43,3.59t4.08,10v.11a12.92,12.92,0,0,1-2.43,8.14A14.18,14.18,0,0,1,384,38.17L394,52.86Zm.18-27.09a5.26,5.26,0,0,0-1.88-4.41,8.32,8.32,0,0,0-5.23-1.47h-9V31.7h9.16a7.57,7.57,0,0,0,5.15-1.58,5.4,5.4,0,0,0,1.79-4.24Z"/><path- fill="currentColor"+ fill="#F9751A"d="M419.3,20.07V52.86h-9.05V20.07H397.74V11.72h34.08v8.35Z"/><path- fill="currentColor"+ fill="#F9751A"d="M466.44,46.13a11.07,11.07,0,0,1-3.1,4,13.87,13.87,0,0,1-4.74,2.47,20.44,20.44,0,0,1-6.1.85,27.37,27.37,0,0,1-9.22-1.61,24.52,24.52,0,0,1-8.23-5l5.35-6.4a26.67,26.67,0,0,0,5.79,3.64,15.45,15.45,0,0,0,6.49,1.35,7.88,7.88,0,0,0,4.38-1,3.24,3.24,0,0,0,1.55-2.85v-.11a3.65,3.65,0,0,0-.32-1.56,3.28,3.28,0,0,0-1.24-1.26,12.39,12.39,0,0,0-2.53-1.18c-1.08-.39-2.49-.8-4.21-1.23a50.49,50.49,0,0,1-5.66-1.71,15.78,15.78,0,0,1-4.3-2.32,9.33,9.33,0,0,1-2.74-3.44,11.88,11.88,0,0,1-1-5.11v-.12a11.93,11.93,0,0,1,1.05-5.08,11.52,11.52,0,0,1,2.95-3.91A13.29,13.29,0,0,1,445.17,12a18.1,18.1,0,0,1,5.8-.88,24.65,24.65,0,0,1,8.32,1.35,23.83,23.83,0,0,1,7,3.88l-4.7,6.81a30.39,30.39,0,0,0-5.4-3,13.94,13.94,0,0,0-5.29-1.08,6.36,6.36,0,0,0-4,1,3.1,3.1,0,0,0-1.32,2.55v.12a3.74,3.74,0,0,0,.38,1.73,3.49,3.49,0,0,0,1.39,1.32A12.29,12.29,0,0,0,450.08,27c1.15.35,2.62.77,4.39,1.24A40.2,40.2,0,0,1,460,30.09a15.42,15.42,0,0,1,4.13,2.46,9.43,9.43,0,0,1,2.53,3.38,11.48,11.48,0,0,1,.85,4.64v.12A12.89,12.89,0,0,1,466.44,46.13Z"/></g>diff --git a/packages/ee/src/quickbooks/config.tsx b/packages/ee/src/quickbooks/config.tsxindex f15d3f697e..da7a4cb0fd 100644--- a/packages/ee/src/quickbooks/config.tsx+++ b/packages/ee/src/quickbooks/config.tsx@@ -3,9 +3,9 @@// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.import { QUICKBOOKS_CLIENT_ID } from "@carbon/auth";-import type { ComponentProps } from "react";import { z } from "zod";import { defineIntegration } from "../fns";+import { pieceLogo } from "../integrations/piece-logo";export const QuickBooks = defineIntegration({name: "QuickBooks Online",@@ -13,7 +13,7 @@ export const QuickBooks = defineIntegration({active: false,category: "Accounting",providerRole: "accounting" as const,- logo: Logo,+ logo: pieceLogo("quickbooks"),description:"Integrating Carbon with QuickBooks Online keeps your books in sync: customers, vendors, items, invoices and bills flow between both systems, and Carbon's inventory and production postings are pushed as journal entries into your QuickBooks Online ledger.",shortDescription:@@ -47,28 +47,3 @@ export const QuickBooks = defineIntegration({}]});--/**- * QuickBooks logo. Exported like Onshape's Logo.- */-export function Logo(props: ComponentProps<"svg">) {- return (- <svg- {...props}- width="41"- height="40"- viewBox="0 0 41 40"- fill="none"- xmlns="http://www.w3.org/2000/svg"- >- <path- d="M20.5 40C31.5456 40 40.5 31.0456 40.5 20C40.5 8.95437 31.5456 0 20.5 0C9.45437 0 0.5 8.95437 0.5 20C0.5 31.0456 9.45437 40 20.5 40Z"- fill="#F5F5F3"- />- <path- d="M6.05585 20C6.05585 22.0628 6.8753 24.0411 8.33392 25.4998C9.79255 26.9584 11.7709 27.7778 13.8337 27.7778H14.9446V24.8888H13.8337C13.1884 24.8939 12.5484 24.7713 11.9507 24.5279C11.3531 24.2845 10.8095 23.9252 10.3513 23.4707C9.8932 23.0163 9.52957 22.4756 9.28142 21.8799C9.03328 21.2841 8.90552 20.6452 8.90552 19.9999C8.90552 19.3545 9.03328 18.7156 9.28142 18.1199C9.52957 17.5242 9.8932 16.9835 10.3513 16.529C10.8095 16.0745 11.3531 15.7152 11.9507 15.4718C12.5484 15.2284 13.1884 15.1058 13.8337 15.111H16.5002V30.2222C16.5005 30.9883 16.8049 31.723 17.3466 32.2647C17.8883 32.8064 18.6229 33.1109 19.389 33.1113V12.2222H13.8337C12.8122 12.2222 11.8008 12.4233 10.8571 12.8142C9.91345 13.205 9.05599 13.7779 8.33372 14.5002C7.61145 15.2224 7.03851 16.0798 6.64762 17.0235C6.25673 17.9672 6.05585 18.9786 6.05585 20ZM27.1668 12.2222H26.0559V15.1113H27.1668C28.4538 15.1258 29.6831 15.6473 30.5881 16.5625C31.493 17.4778 32.0006 18.7129 32.0006 20C32.0006 21.2871 31.493 22.5223 30.5881 23.4375C29.6831 24.3527 28.4538 24.8742 27.1668 24.8888H24.5002V9.77815C24.5003 9.39876 24.4256 9.02309 24.2804 8.67257C24.1353 8.32206 23.9225 8.00357 23.6542 7.73529C23.386 7.46701 23.0675 7.2542 22.717 7.10901C22.3665 6.96381 21.9909 6.88908 21.6115 6.88908V27.7781H27.1668C29.2296 27.7781 31.2079 26.9587 32.6665 25.5001C34.1252 24.0415 34.9446 22.0631 34.9446 20.0003C34.9446 17.9375 34.1252 15.9592 32.6665 14.5006C31.2079 13.042 29.2296 12.2222 27.1668 12.2222Z"- fill="#121212"- />- </svg>- );-}diff --git a/packages/ee/src/rillet/config.tsx b/packages/ee/src/rillet/config.tsxindex d6e137e6c2..cb56802e39 100644--- a/packages/ee/src/rillet/config.tsx+++ b/packages/ee/src/rillet/config.tsx@@ -169,7 +169,7 @@ function Logo(props: ComponentProps<"svg">) {><pathd="M0.69312 26.5771V1.44136H8.91611C10.8791 1.44136 12.495 1.7765 13.7637 2.44679C15.0564 3.11708 16.014 4.02675 16.6364 5.17582C17.2827 6.30095 17.6059 7.58167 17.6059 9.018C17.6059 10.6458 17.187 12.0941 16.3491 13.3629C15.5352 14.6077 14.2784 15.5174 12.5788 16.0919L17.8573 26.5771H13.4406L8.62885 16.6306H4.4994V26.5771H0.69312ZM4.4994 13.1834H8.70066C10.4243 13.1834 11.6811 12.8003 12.471 12.0343C13.285 11.2683 13.6919 10.2628 13.6919 9.018C13.6919 7.74925 13.2969 6.74381 12.5069 6.00171C11.717 5.23567 10.4362 4.85265 8.66476 4.85265H4.4994V13.1834ZM29.9443 6.03762C29.1065 6.03762 28.4003 5.77429 27.8257 5.24764C27.2752 4.69704 26.9999 4.02675 26.9999 3.23677C26.9999 2.44679 27.2752 1.78847 27.8257 1.26182C28.4003 0.735163 29.1065 0.471836 29.9443 0.471836C30.8061 0.471836 31.5123 0.735163 32.0629 1.26182C32.6375 1.78847 32.9247 2.44679 32.9247 3.23677C32.9247 4.02675 32.6375 4.69704 32.0629 5.24764C31.5123 5.77429 30.8061 6.03762 29.9443 6.03762ZM22.7986 26.5771V23.2736H28.4003V13.2552C28.4003 12.4652 28.0173 12.0702 27.2512 12.0702H23.3013V8.76665H27.9335C29.4177 8.76665 30.4949 9.11376 31.1652 9.80799C31.8594 10.4783 32.2066 11.5555 32.2066 13.0397V23.2736H37.8082V26.5771H22.7986ZM43.5036 26.5771V23.2736H49.4644V5.21173C49.4644 4.42175 49.0814 4.02676 48.3153 4.02676H44.0063V0.723194H48.9976C50.386 0.723194 51.4394 1.09425 52.1575 1.83635C52.8996 2.55452 53.2707 3.60783 53.2707 4.99628V23.2736H59.2674V26.5771H43.5036ZM65.0346 26.5771V23.2736H70.9953V5.21173C70.9953 4.42175 70.6123 4.02676 69.8463 4.02676H65.5373V0.723194H70.5285C71.917 0.723194 72.9703 1.09425 73.6885 1.83635C74.4306 2.55452 74.8016 3.60783 74.8016 4.99628V23.2736H80.7983V26.5771H65.0346ZM95.1117 27.008C93.3881 27.008 91.868 26.625 90.5513 25.859C89.2347 25.069 88.2053 23.9798 87.4632 22.5913C86.7211 21.2029 86.35 19.587 86.35 17.7437C86.35 15.8765 86.7091 14.2367 87.4273 12.8243C88.1694 11.4119 89.1988 10.3107 90.5154 9.52072C91.856 8.73074 93.4 8.33575 95.1476 8.33575C96.8712 8.33575 98.3554 8.73074 99.6002 9.52072C100.845 10.2868 101.803 11.3161 102.473 12.6088C103.167 13.9015 103.514 15.3259 103.514 16.8819C103.514 17.1213 103.514 17.3846 103.514 17.6719C103.514 17.9352 103.502 18.2345 103.478 18.5696H90.0845C90.2042 20.2214 90.7428 21.4782 91.7004 22.34C92.6579 23.1778 93.7831 23.5968 95.0758 23.5968C96.2009 23.5968 97.0866 23.3693 97.733 22.9145C98.4033 22.4357 98.894 21.7894 99.2052 20.9755H103.047C102.616 22.6751 101.719 24.1114 100.354 25.2845C98.9898 26.4335 97.2422 27.008 95.1117 27.008ZM95.1117 11.6393C93.9387 11.6393 92.8973 11.9984 91.9876 12.7166C91.078 13.4108 90.4915 14.3923 90.2281 15.661H99.7079C99.6122 14.4641 99.1454 13.4946 98.3075 12.7525C97.4696 12.0104 96.4044 11.6393 95.1117 11.6393ZM118.366 26.5771C116.619 26.5771 115.23 26.1582 114.201 25.3204C113.171 24.4586 112.657 22.9384 112.657 20.76V11.9984H108.168V8.76665H110.825C112.046 8.76665 112.765 8.16818 112.98 6.97123L113.519 4.09857H116.463V8.76665H123.501V11.9984H116.463V20.6882C116.463 21.6218 116.667 22.2801 117.073 22.6631C117.504 23.0222 118.235 23.2018 119.264 23.2018H123.429V26.5771H118.366Z"- fill="currentColor"+ className="fill-[#240257] dark:fill-white"></path></svg>);diff --git a/packages/ee/src/sage/config.tsx b/packages/ee/src/sage/config.tsxindex 56327e77c1..02086b58a8 100644--- a/packages/ee/src/sage/config.tsx+++ b/packages/ee/src/sage/config.tsx@@ -33,19 +33,19 @@ function Logo(props: ComponentProps<"svg">) {><pathd="M27.6269 0C43.2682 0 55.9863 10.8171 56.2793 25.8724C56.4258 30.1107 53.3561 32.4512 49.9935 32.4512C46.7773 32.4512 44.0006 30.1139 43.8542 26.1654C43.7077 17.6855 36.5462 11.3997 27.4805 11.3997C19.0006 11.3997 12.5716 17.3926 12.5716 25.5794C12.5716 34.4954 18.5645 38.444 30.9896 42.9753C44.2904 47.7995 56.4258 53.4993 56.4258 70.4557C56.4258 85.2213 44.8763 97.0605 28.7988 97.0605C13.0111 97.0605 0 85.9505 0 70.8952C0 61.5397 4.53125 54.9609 8.91602 54.9609C12.7181 54.9609 15.0553 57.4447 15.0553 60.8073C15.0553 63.7305 12.5716 65.0456 12.5716 70.3092C12.5716 79.6647 20.1725 85.6576 28.7988 85.6576C37.8613 85.6576 43.8542 79.3717 43.8542 71.7708C43.8542 62.4154 37.8613 58.4701 25.4362 54.082C11.5495 49.1178 0 43.1217 0 26.6048C0 11.696 11.9857 0 27.6269 0Z"- fill="currentColor"+ fill="#00D639"/><pathd="M91.4225 97.0636C75.6348 97.0636 62.4805 84.3455 62.4805 68.2648C62.4805 51.6014 75.7813 39.1763 91.862 39.1763C109.111 39.1763 121.243 52.0409 121.243 69.5832V90.9243C121.243 94.5799 118.32 97.0636 114.958 97.0636C111.449 97.0636 108.525 94.5799 108.525 90.9243V70.0194C108.525 58.4699 101.947 50.576 91.569 50.576C82.36 50.576 75.0521 58.3234 75.0521 68.2648C75.0521 77.4738 82.2135 85.3677 91.2793 85.3677C94.6419 85.3677 96.1035 84.492 98.151 84.492C100.928 84.492 103.851 86.8293 103.851 90.1919C103.848 94.7231 98.4375 97.0636 91.4225 97.0636Z"- fill="currentColor"+ fill="#00D639"/><pathd="M157.262 140.625C140.889 140.625 127.295 128.929 127.295 113.727C127.295 108.61 130.218 106.273 133.581 106.273C136.943 106.273 139.72 108.467 139.867 112.705C140.013 122.207 147.614 129.222 157.116 129.222C167.204 129.222 173.779 122.79 173.779 114.456C173.779 104.954 166.471 101.009 154.046 97.0604C139.574 92.3826 127.295 85.9504 127.295 68.1183C127.295 51.7446 139.867 39.1763 156.237 39.1763C172.754 39.1763 186.351 51.1619 186.351 66.9497C186.351 76.5981 182.406 84.0526 176.995 84.0526C173.34 84.0526 170.856 81.4224 170.856 78.2062C170.856 74.8436 173.779 73.382 173.779 67.3892C173.779 57.3013 165.885 50.5793 156.383 50.5793C147.174 50.5793 139.867 57.5975 139.867 66.8065C139.867 77.1841 147.321 81.5721 159.6 85.6639C173.779 90.3416 186.351 96.188 186.351 113.291C186.351 128.639 174.219 140.625 157.262 140.625Z"- fill="currentColor"+ fill="#00D639"/><pathd="M222.227 97.0638C205.853 97.0638 192.406 84.1992 192.406 68.1218C192.406 52.041 205.417 39.1797 221.494 39.1797C237.722 39.1797 250 50.4362 250 64.7624C250 70.3158 246.055 73.6784 239.623 73.6784H222.813C219.45 73.6784 216.966 71.3411 216.966 68.2682C216.966 65.345 219.45 63.0046 222.813 63.0046H235.384C236.553 63.0046 237.432 62.4186 237.432 61.25C237.432 57.0117 232.022 50.4329 221.937 50.4329C212.582 50.4329 204.981 58.4733 204.981 68.1218C204.981 77.9167 212.728 85.6641 222.376 85.6641C233.487 85.6641 237.142 79.0853 241.673 79.0853C245.475 79.0853 247.52 81.569 247.52 84.349C247.52 86.9792 245.765 89.3197 241.38 92.0964C236.989 94.8698 230.414 97.0638 222.227 97.0638Z"- fill="currentColor"+ fill="#00D639"/></svg>);diff --git a/packages/ee/src/slack/config.tsx b/packages/ee/src/slack/config.tsxindex 5fae2b5efa..31630020b2 100644--- a/packages/ee/src/slack/config.tsx+++ b/packages/ee/src/slack/config.tsx@@ -3,97 +3,13 @@// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.import { CONTROLLED_ENVIRONMENT } from "@carbon/auth";-import { z } from "zod";-import { defineIntegration } from "../fns";+import { definePieceIntegration } from "../integrations/piece-integration";-export const Slack = defineIntegration({+export const Slack = definePieceIntegration("slack", {name: "Slack",- id: "slack",category: "Assistant",active: CONTROLLED_ENVIRONMENT === false,- logo: Logo,- shortDescription: "Use the Carbon Assistant in your Slack workspace.",+ shortDescription: "Slack for the Carbon Assistant and your workflows.",description:- "Integrating Carbon with Slack allows you to use the Carbon Assistant to complete tasks from your Slack workspace.",- images: [],- settings: [],- schema: z.object({}),- onClientInstall: async () => {- const response = await fetch("/api/integrations/slack/install").then(- (res) => res.json()- );-- const { url } = response;-- const width = 600;- const height = 800;- const left = window.screenX + (window.outerWidth - width) / 2;- const top = window.screenY + (window.outerHeight - height) / 2.5;-- const popup = window.open(- url,- "",- `toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=${width}, height=${height}, top=${top}, left=${left}`- );-- if (!popup) {- window.location.href = url;- return;- }-- const listener = (e: MessageEvent) => {- if (e.data === "app_oauth_completed") {- window.location.reload();- window.removeEventListener("message", listener);- popup.close();- }- };-- window.addEventListener("message", listener);- }+ "One install connects your workspace for both: the Carbon Assistant (slash commands, issue threads) and workflow steps that send messages, find users and create channels. Add more accounts under Accounts if different workflows should post as different workspaces."});--function Logo() {- return (- <svg- width="40"- height="40"- viewBox="0 0 40 40"- fill="none"- xmlns="http://www.w3.org/2000/svg"- >- <path- d="M9.85313 24.6172C9.85251 25.3442 9.63636 26.0547 9.23199 26.6589C8.82763 27.2631 8.25322 27.7339 7.58136 28.0117C6.9095 28.2895 6.17036 28.3618 5.45739 28.2196C4.74441 28.0774 4.0896 27.727 3.57574 27.2127C3.06187 26.6984 2.71203 26.0433 2.57042 25.3302C2.42881 24.6171 2.5018 23.878 2.78016 23.2064C3.05852 22.5348 3.52976 21.9607 4.1343 21.5569C4.73884 21.153 5.44954 20.9375 6.17656 20.9375H9.85313V24.6172Z"- fill="currentColor"- />- <path- d="M11.7063 24.6172C11.7063 23.6421 12.0936 22.7069 12.7831 22.0175C13.4726 21.328 14.4078 20.9406 15.3829 20.9406C16.3579 20.9406 17.2931 21.328 17.9826 22.0175C18.6721 22.7069 19.0594 23.6421 19.0594 24.6172V33.8234C19.0594 34.7985 18.6721 35.7337 17.9826 36.4231C17.2931 37.1126 16.3579 37.5 15.3829 37.5C14.4078 37.5 13.4726 37.1126 12.7831 36.4231C12.0936 35.7337 11.7063 34.7985 11.7063 33.8234V24.6172Z"- fill="currentColor"- />- <path- d="M15.3829 9.85313C14.6559 9.85251 13.9454 9.63636 13.3412 9.23199C12.737 8.82763 12.2662 8.25322 11.9884 7.58136C11.7106 6.9095 11.6383 6.17036 11.7805 5.45739C11.9227 4.74441 12.2731 4.0896 12.7874 3.57574C13.3017 3.06187 13.9568 2.71203 14.6699 2.57042C15.383 2.42881 16.1221 2.5018 16.7937 2.78016C17.4653 3.05852 18.0394 3.52976 18.4432 4.1343C18.8471 4.73884 19.0626 5.44954 19.0626 6.17656V9.85313H15.3829Z"- fill="currentColor"- />- <path- d="M15.3828 11.7062C16.3579 11.7062 17.293 12.0936 17.9825 12.7831C18.672 13.4726 19.0594 14.4077 19.0594 15.3828C19.0594 16.3579 18.672 17.293 17.9825 17.9825C17.293 18.672 16.3579 19.0594 15.3828 19.0594H6.17656C5.20148 19.0594 4.26633 18.672 3.57684 17.9825C2.88735 17.293 2.5 16.3579 2.5 15.3828C2.5 14.4077 2.88735 13.4726 3.57684 12.7831C4.26633 12.0936 5.20148 11.7062 6.17656 11.7062H15.3828Z"- fill="currentColor"- />- <path- d="M30.147 15.3828C30.1476 14.6558 30.3637 13.9453 30.7681 13.3411C31.1725 12.7369 31.7469 12.2661 32.4187 11.9883C33.0906 11.7106 33.8297 11.6382 34.5427 11.7804C35.2557 11.9226 35.9105 12.273 36.4244 12.7873C36.9382 13.3016 37.2881 13.9567 37.4297 14.6698C37.5713 15.3829 37.4983 16.122 37.2199 16.7936C36.9416 17.4652 36.4703 18.0393 35.8658 18.4431C35.2613 18.847 34.5506 19.0625 33.8235 19.0625H30.147V15.3828Z"- fill="currentColor"- />- <path- d="M28.2938 15.3828C28.2938 16.3579 27.9064 17.293 27.217 17.9825C26.5275 18.672 25.5923 19.0594 24.6172 19.0594C23.6422 19.0594 22.707 18.672 22.0175 17.9825C21.328 17.293 20.9407 16.3579 20.9407 15.3828V6.17656C20.9407 5.20148 21.328 4.26633 22.0175 3.57684C22.707 2.88735 23.6422 2.5 24.6172 2.5C25.5923 2.5 26.5275 2.88735 27.217 3.57684C27.9064 4.26633 28.2938 5.20148 28.2938 6.17656V15.3828Z"- fill="currentColor"- />- <path- d="M24.6172 30.1469C25.3442 30.1475 26.0547 30.3637 26.6589 30.768C27.2631 31.1724 27.7339 31.7468 28.0117 32.4186C28.2895 33.0905 28.3618 33.8296 28.2196 34.5426C28.0774 35.2556 27.727 35.9104 27.2127 36.4243C26.6984 36.9381 26.0433 37.288 25.3302 37.4296C24.6171 37.5712 23.878 37.4982 23.2064 37.2198C22.5348 36.9415 21.9607 36.4702 21.5569 35.8657C21.153 35.2612 20.9375 34.5505 20.9375 33.8234V30.1469H24.6172Z"- fill="currentColor"- />- <path- d="M24.6172 28.2937C23.6422 28.2937 22.707 27.9064 22.0175 27.2169C21.328 26.5274 20.9407 25.5923 20.9407 24.6172C20.9407 23.6421 21.328 22.7069 22.0175 22.0175C22.707 21.328 23.6422 20.9406 24.6172 20.9406H33.8235C34.7986 20.9406 35.7337 21.328 36.4232 22.0175C37.1127 22.7069 37.5 23.6421 37.5 24.6172C37.5 25.5923 37.1127 26.5274 36.4232 27.2169C35.7337 27.9064 34.7986 28.2937 33.8235 28.2937H24.6172Z"- fill="currentColor"- />- </svg>- );-}diff --git a/packages/ee/src/slack/hooks.server.ts b/packages/ee/src/slack/hooks.server.tsnew file mode 100644index 0000000000..f7762fc1ee--- /dev/null+++ b/packages/ee/src/slack/hooks.server.ts@@ -0,0 +1,16 @@+// SPDX-License-Identifier: LicenseRef-Carbon-Commercial+// Carbon Enterprise file, licensed only under the Carbon Commercial License+// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.++import type { IntegrationServerHooks } from "../types";+import { postSlackWelcome } from "./lib/client";++/** A new install says hello in the channel picked on the consent screen, so the+ * person can see the bot is live there. */+export const slackOnConnect: NonNullable<+ IntegrationServerHooks["onConnect"]+> = async ({ accessToken, metadata }) => {+ const channelId = metadata.channel_id;+ if (typeof channelId !== "string" || channelId === "") return;+ await postSlackWelcome({ token: accessToken, channelId });+};diff --git a/packages/ee/src/slack/lib/client.ts b/packages/ee/src/slack/lib/client.tsindex 2bbd5ecf12..f28ac685fa 100644--- a/packages/ee/src/slack/lib/client.ts+++ b/packages/ee/src/slack/lib/client.ts@@ -3,61 +3,12 @@// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.import { createHmac } from "node:crypto";-import {- SLACK_CLIENT_ID,- SLACK_CLIENT_SECRET,- SLACK_OAUTH_REDIRECT_URL,- SLACK_SIGNING_SECRET,- SLACK_STATE_SECRET-} from "@carbon/auth";+import { SLACK_SIGNING_SECRET } from "@carbon/auth";import Bolt from "@slack/bolt";-import { InstallProvider } from "@slack/oauth";import { WebClient } from "@slack/web-api";-import { z } from "zod";const { App } = Bolt;-export const slackOAuthCallbackSchema = z.object({- code: z.string(),- state: z.string()-});--export const slackOAuthTokenResponseSchema = z.object({- ok: z.literal(true),- app_id: z.string(),- authed_user: z.object({- id: z.string()- }),- scope: z.string(),- token_type: z.literal("bot"),- access_token: z.string(),- bot_user_id: z.string(),- team: z.object({- id: z.string(),- name: z.string()- }),-- // incoming_webhook is only present when the app has incoming-webhook scope- incoming_webhook: z- .object({- channel: z.string(),- channel_id: z.string(),- configuration_url: z.string().url(),- url: z.string().url()- })- .optional(),- // Enterprise field can be an object, null, or missing- enterprise: z- .object({- name: z.string(),- id: z.string()- })- .nullable()- .optional()-});--let slackInstaller: InstallProvider | null = null;-export const createSlackApp = ({token,botId@@ -76,48 +27,6 @@ export const createSlackWebClient = ({ token }: { token: string }) => {return new WebClient(token);};-export const getSlackInstaller = (): InstallProvider => {- if (!slackInstaller) {- if (!SLACK_CLIENT_ID || !SLACK_CLIENT_SECRET) {- throw new Error("Slack client credentials are required but not provided");- }-- slackInstaller = new InstallProvider({- clientId: SLACK_CLIENT_ID,- clientSecret: SLACK_CLIENT_SECRET,- stateSecret: SLACK_STATE_SECRET,- logLevel:- process.env.NODE_ENV === "development" ? Bolt.LogLevel.DEBUG : undefined- });- }- return slackInstaller;-};--export const getSlackInstallUrl = ({- companyId,- userId-}: {- companyId: string;- userId: string;-}) => {- return getSlackInstaller().generateInstallUrl({- scopes: [- "assistant:write",- "chat:write.public",- "chat:write",- "commands",- "files:read",- "im:history",- "incoming-webhook",- "team:read",- "users:read",- "users:read.email"- ],- redirectUri: SLACK_OAUTH_REDIRECT_URL,- metadata: JSON.stringify({ companyId, userId })- });-};-export async function verifySlackWebhook(req: Request) {if (!SLACK_SIGNING_SECRET) {throw new Error("SLACK_SIGNING_SECRET is not set");@@ -153,6 +62,30 @@ export async function verifySlackWebhook(req: Request) {return JSON.parse(body);}+/**+ * Tell the channel picked during install that the bot is live there, so the+ * person who installed it can see it worked.+ */+export async function postSlackWelcome({+ token,+ channelId+}: {+ token: string;+ channelId: string;+}) {+ const client = createSlackWebClient({ token });+ const text =+ "Ahoy maties! 🦜🏴☠️ Here be your new Cargh-bon bot. Use `/` to get started.";++ return client.chat.postMessage({+ channel: channelId,+ text,+ blocks: [{ type: "section", text: { type: "mrkdwn", text } }],+ unfurl_links: false,+ unfurl_media: false+ });+}+/*** Post a message to a Slack thread*/diff --git a/packages/ee/src/slack/lib/service.ts b/packages/ee/src/slack/lib/service.tsindex b9f7c5aa7e..18b8fbce17 100644--- a/packages/ee/src/slack/lib/service.ts+++ b/packages/ee/src/slack/lib/service.ts@@ -9,7 +9,13 @@ 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 type { IntegrationConnection } from "../../integrations/connections";+import {+ readConnectionAccessToken,+ readConnections,+ readConnectionsByTeamId,+ usableConnections+} from "../../integrations/connections";import { createSlackWebClient } from "./client";const logger = getLogger("ee", "slack");@@ -203,48 +209,106 @@ export async function getIssueSlackThread();}-export async function getSlackAuth(- client: SupabaseClient<Database>,- companyId: string,- userId: string-): Promise<SlackAuth | null> {- const companyIntegration = await client- .from("companyIntegration")- .select("*")- .eq("companyId", companyId)- .eq("id", "slack")- .maybeSingle();- if (companyIntegration.error || !companyIntegration.data?.active) {- return null;- }+export interface SlackWorkspace {+ connectionId: string;+ companyId: string;+ token: string;+ teamId?: string;+ channelId?: string;+ botUserId?: string;+}- // 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,+function workspaceFacts(connection: IntegrationConnection) {+ const m = connection.metadata;+ const str = (v: unknown) =>+ typeof v === "string" && v.length > 0 ? v : undefined;+ return {+ teamId: str(m.team_id),+ channelId: str(m.channel_id),+ botUserId: str(m.bot_user_id)+ };+}++/**+ * The Slack workspace the Assistant acts as for a company: the OLDEST Active+ * connection for piece `slack` that carries a webhook channel, falling back to the+ * oldest Active one (`readConnections` orders by createdAt). The channel preference+ * lives HERE so every Assistant surface picks the same workspace — without it, an+ * oldest connection made without the webhook picker hid a later, complete one.+ * Credentials and workspace facts live on the connection alone —+ * `companyIntegration.slack` is only the installed flag. Service-role client+ * required (vault).+ */+export async function getSlackWorkspace(+ serviceRole: SupabaseClient<Database>,+ companyId: string+): Promise<SlackWorkspace | null> {+ const active = usableConnections(+ await readConnections(serviceRole, companyId, "slack")+ );+ const connection =+ active.find((c) => workspaceFacts(c).channelId !== undefined) ?? active[0];+ if (connection === undefined) return null;+ const token = await readConnectionAccessToken(serviceRole, connection);+ return {+ connectionId: connection.id,companyId,- "slack",- companyIntegration.data.metadata,- companyIntegration.data.secretRef- )) as {- access_token: string;- channel_id: string;+ token,+ ...workspaceFacts(connection)};+}- if (!metadata) {- return null;+/** One Slack app serves every tenant, so two Carbon companies can connect the same+ * workspace. An inbound event cannot be routed then — refusing beats acting in the+ * wrong company. */+export class AmbiguousSlackWorkspaceError extends Error {+ constructor(public readonly teamId: string) {+ super(`Slack workspace ${teamId} is connected to more than one company.`);+ this.name = "AmbiguousSlackWorkspaceError";}+}++/** Inbound: a slash command or interaction names its workspace, so match on team_id. */+export async function getSlackWorkspaceByTeamId(+ serviceRole: SupabaseClient<Database>,+ teamId: string+): Promise<SlackWorkspace | null> {+ const rows = usableConnections(+ await readConnectionsByTeamId(serviceRole, "slack", teamId)+ );+ const connection = rows[0];+ if (connection === undefined) return null;+ if (rows.some((row) => row.companyId !== connection.companyId)) {+ throw new AmbiguousSlackWorkspaceError(teamId);+ }+ const token = await readConnectionAccessToken(serviceRole, connection);+ return {+ connectionId: connection.id,+ companyId: connection.companyId,+ token,+ ...workspaceFacts(connection)+ };+}++export async function getSlackAuth(+ client: SupabaseClient<Database>,+ companyId: string,+ userId: string+): Promise<SlackAuth | null> {+ const workspace = await getSlackWorkspace(getCarbonServiceRole(), companyId);+ // A workspace connected without the webhook picker has no channel; the Assistant+ // treats that as not connected, as it did when `channel_id` was missing.+ if (workspace === null || workspace.channelId === undefined) return null;const slackUserId = await getSlackUserIdByCarbonId(client,- metadata.access_token,+ workspace.token,userId);return {- slackToken: metadata.access_token,- channelId: metadata.channel_id,+ slackToken: workspace.token,+ channelId: workspace.channelId,slackUserId: slackUserId || undefined};}@@ -299,17 +363,6 @@ export async function getSlackDocumentThread(.single();}-export async function getSlackIntegrationByTeamId(- client: SupabaseClient<Database>,- teamId: string-) {- return await client- .from("companyIntegration")- .select("*")- .eq("metadata->>team_id", teamId)- .eq("id", "slack");-}-export async function getCarbonEmployeeFromSlackId(client: SupabaseClient<Database>,accessToken: string,diff --git a/packages/ee/src/stripe-connect/config.tsx b/packages/ee/src/stripe-connect/config.tsxindex 6f1f9c52df..e62ca85b59 100644--- a/packages/ee/src/stripe-connect/config.tsx+++ b/packages/ee/src/stripe-connect/config.tsx@@ -4,10 +4,10 @@import { STRIPE_CONNECT_ENABLED } from "@carbon/env";import { Badge, Button, toast } from "@carbon/react";-import type { ComponentProps } from "react";import { useCallback, useState } from "react";import { z } from "zod";import { defineIntegration } from "../fns";+import { pieceLogo } from "../integrations/piece-logo";import { StripeConnectSetupInstructions } from "./setup-instructions";export const StripeConnectSettingsSchema = z.object({@@ -27,7 +27,7 @@ export const StripeConnect = defineIntegration({// their public clientId.active: STRIPE_CONNECT_ENABLED,category: "Payments",- logo: StripeLogo,+ logo: pieceLogo("stripe"),description:"Connect your Stripe account to send invoices with direct online payment options to your customers, automatically updating payment statuses and AR ledger entries.",shortDescription: "Accept card and ACH payments directly on sales invoices.",@@ -325,31 +325,3 @@ function StripeConnectStatus({</div>);}--function StripeLogo(props: ComponentProps<"svg">) {- return (- <svg- {...props}- viewBox="0 0 60 25"- fill="none"- xmlns="http://www.w3.org/2000/svg"- aria-label="Stripe logo"- // The official Stripe wordmark. The shared render sites size logos by- // height; clamp to a modest height and let the width follow so it never- // overflows the drawer's icon box. `currentColor` keeps it theme-aware.- style={{- ...props.style,- height: "1.25rem",- width: "auto",- maxWidth: "100%"- }}- >- <path- fill="currentColor"- fillRule="evenodd"- clipRule="evenodd"- d="M59.6444 14.2813h-8.062c.1843 1.9296 1.5983 2.5476 3.2032 2.5476 1.6352 0 2.9534-.3656 4.0453-.9506v3.3179c-1.1186.7115-2.5964 1.1068-4.5645 1.1068-4.011 0-6.8218-2.5122-6.8218-7.4783 0-4.19441 2.3837-7.52509 6.3017-7.52509 3.912 0 5.9537 3.28038 5.9537 7.49819 0 .3982-.0372 1.261-.0556 1.4835Zm-5.9241-5.62407c-1.0294 0-2.1739.72812-2.1739 2.58387h4.2573c0-1.85362-1.0721-2.58387-2.0834-2.58387ZM40.9547 20.303c-1.4411 0-2.322-.6087-2.9133-1.0417l-.0088 4.6271-4.1181.8755-.0014-19.19053h3.7543l.0864 1.01784c.6035-.52914 1.6114-1.29157 3.2256-1.29162 2.8925 0 5.6162 2.6052 5.6162 7.39971 0 5.2327-2.6948 7.6037-5.6409 7.6037Zm-.959-11.35573c-.9453 0-1.5376.34559-1.9669.81586l.0245 6.11967c.3997.433.9763.7813 1.9424.7813 1.5231 0 2.5437-1.6575 2.5437-3.8745 0-2.1544-1.037-3.84233-2.5437-3.84233Zm-11.7602-3.3739h4.1341V20.0088h-4.1341V5.57337Zm0-4.694699L32.3696 0v3.35821l-4.1341.87868V.878671ZM23.9198 10.2223v9.7861h-4.1156V5.57296h3.6867l.1317 1.21751c1.0035-1.7722 3.0722-1.41321 3.6209-1.21594v3.78524c-.5242-.16908-2.2894-.42779-3.3237.86253Zm-8.5525 4.7221c0 2.4275 2.5988 1.6719 3.1263 1.4609v3.3522c-.5492.3013-1.5437.5458-2.8901.5458-2.4441 0-4.2773-1.7999-4.2773-4.2379l.0173-13.17658 4.0206-.85464.0032 3.5395h3.1278V9.0857h-3.1278v5.8588-.0001Zm-4.9069.7026c0 2.9645-2.31051 4.6562-5.73464 4.6562-1.41958 0-2.92289-.2761-4.453935-.9347v-3.9319c1.382085.7516 3.093705 1.315 4.457755 1.315.91864 0 1.53106-.2459 1.53106-1.0069C6.26064 13.7786 0 14.5192 0 9.95995 0 7.04457 2.27622 5.2998 5.61655 5.2998c1.36404 0 2.72806.20934 4.09208.75351V9.9317c-1.25265-.67618-2.84332-1.05979-4.09588-1.05979-.86296 0-1.44753.24965-1.44753.8924.0001 1.85329 6.29518.97249 6.29518 5.88279v-.0001Z"- />- </svg>- );-}diff --git a/packages/ee/src/types.ts b/packages/ee/src/types.tsindex abc9522f70..20fb2f0761 100644--- a/packages/ee/src/types.ts+++ b/packages/ee/src/types.ts@@ -170,6 +170,14 @@ export type IntegrationServerHooks = {* Use this for cleaning up server resources, webhooks, etc.*/onUninstall?: (companyId: string) => void | Promise<void>;+ /**+ * Workflow pieces only: after the connect callback saves a NEW account (not a+ * Reconnect). Best-effort: the connection is already saved.+ */+ onConnect?: (connection: {+ accessToken: string;+ metadata: Record<string, unknown>;+ }) => Promise<void>;/*** Server-side validation hook to check integration health/credentials.* Returns true if the integration is healthy, false otherwise, or a result@@ -226,8 +234,9 @@ export type IntegrationConfig = {* anything.*/providerRole?: "accounting" | "spend" | "oee";- /** Logo component for the integration */- logo: React.FC<React.ComponentProps<"svg">>;+ /** Logo component for the integration. Consumers pass only `className`, so an+ * SVG component and a piece's CDN `<img>` (`pieceLogo`) both satisfy it. */+ logo: React.FC<{ className?: string }>;/** Brief one-liner description */shortDescription: string;/** Full description explaining the integration */diff --git a/packages/ee/src/workflows/AGENTS.md b/packages/ee/src/workflows/AGENTS.mdindex 36764edc45..a730bf93dc 100644--- a/packages/ee/src/workflows/AGENTS.md+++ b/packages/ee/src/workflows/AGENTS.md@@ -358,13 +358,19 @@ global; custom fields are runtime and per company, so they are merged in rathersynthetic `CatalogEvent`. `WORKFLOW_EVENTS` stays closed and drift-checked. `sync.ts` uses ittoo, which is what gives a custom-field trigger its `UPDATE` subscription.-## `linkify` and `ctx.linkFor`--`CatalogInput.linkify` marks an input as prose a person reads. `renderTemplate(template, ctx,-{ linkFor })` wraps an entity part as `[readableId](url)`; `actionExecutor` passes the callback-only for `linkify` inputs, so a webhook body still renders a bare readable id. This package-constructs no URL — it is bundled for the browser with four runtime dependencies and cannot-import `@carbon/env`; the engine supplies `ctx.linkFor`.+## `links` and `ctx.linkFor`++`CatalogInput.links` (`LinksDeclaration`: a `format` of `markdown`, `slack` or `html`, plus an+optional `when: { input, equals }` gate on a sibling input) marks an input as prose that its+destination renders with links. `resolveStepInputs` (`runtime/resolve.ts`, shared by the action+and integration executors) asks `linkState` (`definition/links.ts`) per input; only a `linked`+input goes through `renderTemplate(template, ctx, { linkFor, format })`, which wraps a record+part in that dialect's renderer (`LINK_RENDERERS`) and escapes every other value for it+(`TEXT_ESCAPERS`: html and Slack mrkdwn; a value is customer data, never markup, so+`AT&T <Sales>` or `<!channel>` reads as written). Every other input, a webhook body included,+renders the record's plain name. The builder's hints (`notices.ts`) read the same `linkState`.+This package constructs no URL — it is bundled for the browser with four runtime dependencies+and cannot import `@carbon/env`; the engine supplies `ctx.linkFor`.`rendersAsText` now accepts a whole record (it prints as its readable id) and still refuses aLIST of records.diff --git a/packages/ee/src/workflows/catalog/actions.generated.ts b/packages/ee/src/workflows/catalog/actions.generated.tsindex 537a2fe112..44a9d830d3 100644--- a/packages/ee/src/workflows/catalog/actions.generated.ts+++ b/packages/ee/src/workflows/catalog/actions.generated.ts@@ -1,6 +1,6 @@// GENERATED FILE — do not edit. Run `pnpm run generate:workflow-catalog`.-import type { BuiltAction, BuiltOperation } from "./build";+import type { BuiltAction, BuiltIntegration, BuiltOperation } from "./build";export const WORKFLOW_ACTION_CATALOG: Record<string, BuiltAction> = {"customer.update": {@@ -147,7 +147,7 @@ export const WORKFLOW_ACTION_CATALOG: Record<string, BuiltAction> = {type: { kind: "primitive", of: "string" },required: false,template: true,- linkify: true+ links: { format: "markdown" }},aboutId: { type: { kind: "primitive", of: "string" }, required: false },aboutType: { type: { kind: "primitive", of: "string" }, required: false }@@ -318,6 +318,615 @@ export const WORKFLOW_ACTION_CATALOG: Record<string, BuiltAction> = {}};+export const WORKFLOW_INTEGRATION_CATALOG: Record<string, BuiltIntegration> = {+ "integration.gmail.gmail_send_email": {+ inputs: {+ connectionId: {+ type: { kind: "primitive", of: "string" },+ required: true,+ options: {+ provider: "integration.connection",+ params: { piece: "gmail" }+ }+ },+ receiver: {+ type: { kind: "list", of: { kind: "primitive", of: "string" } },+ required: true+ },+ cc: {+ type: { kind: "list", of: { kind: "primitive", of: "string" } },+ required: false+ },+ bcc: {+ type: { kind: "list", of: { kind: "primitive", of: "string" } },+ required: false+ },+ subject: { type: { kind: "primitive", of: "string" }, required: true },+ body: {+ type: { kind: "primitive", of: "string" },+ required: true,+ description: "Body for the email you want to send",+ template: true,+ links: {+ format: "html",+ when: { input: "body_type", equals: ["html"] }+ }+ },+ reply_to: {+ type: { kind: "list", of: { kind: "primitive", of: "string" } },+ required: false,+ description: 'Email address to set as the "Reply-To" header'+ },+ sender_name: {+ type: { kind: "primitive", of: "string" },+ required: false+ },+ from: {+ type: { kind: "primitive", of: "string" },+ required: false,+ description:+ "The address must be listed in your GMail account's settings"+ }+ },+ advancedInputs: {+ body_type: {+ type: { kind: "primitive", of: "string" },+ required: false,+ choices: ["plain_text", "html"],+ defaultValue: "plain_text"+ }+ },+ outputs: {+ data: {+ kind: "record",+ fields: {+ id: { kind: "primitive", of: "string" },+ threadId: { kind: "primitive", of: "string" },+ labelIds: { kind: "primitive", of: "string" }+ }+ },+ status: { kind: "primitive", of: "number" },+ statusText: { kind: "primitive", of: "string" },+ count: { kind: "primitive", of: "number" },+ result: { kind: "primitive", of: "string" }+ },+ batchable: false,+ permission: { module: "workflows", action: "update" },+ piece: { name: "gmail", action: "gmail_send_email" }+ },+ "integration.google-calendar.create_google_calendar_event": {+ inputs: {+ connectionId: {+ type: { kind: "primitive", of: "string" },+ required: true,+ options: {+ provider: "integration.connection",+ params: { piece: "google-calendar" }+ }+ },+ calendar_id: {+ type: { kind: "primitive", of: "string" },+ required: true,+ options: {+ provider: "integration.property",+ params: {+ piece: "google-calendar",+ action: "create_google_calendar_event",+ prop: "calendar_id"+ },+ dependsOn: ["connectionId"]+ }+ },+ title: { type: { kind: "primitive", of: "string" }, required: true },+ start_date_time: {+ type: { kind: "primitive", of: "date" },+ required: true,+ precision: "datetime"+ },+ end_date_time: {+ type: { kind: "primitive", of: "date" },+ required: false,+ description: "By default it'll be 30 min post start time",+ precision: "datetime"+ },+ location: { type: { kind: "primitive", of: "string" }, required: false },+ description: {+ type: { kind: "primitive", of: "string" },+ required: false,+ description: "Description of the event. You can use HTML tags here.",+ template: true+ },+ colorId: {+ type: { kind: "primitive", of: "string" },+ required: false,+ options: {+ provider: "integration.property",+ params: {+ piece: "google-calendar",+ action: "create_google_calendar_event",+ prop: "colorId"+ },+ dependsOn: ["connectionId"]+ }+ },+ attendees: {+ type: { kind: "list", of: { kind: "primitive", of: "string" } },+ required: false,+ description: "Emails of the attendees (guests)"+ },+ guests_can_modify: {+ type: { kind: "primitive", of: "boolean" },+ required: false,+ defaultValue: false+ },+ guests_can_invite_others: {+ type: { kind: "primitive", of: "boolean" },+ required: false,+ defaultValue: false+ },+ guests_can_see_other_guests: {+ type: { kind: "primitive", of: "boolean" },+ required: false,+ defaultValue: false+ },+ create_meet_link: {+ type: { kind: "primitive", of: "boolean" },+ required: false,+ defaultValue: false,+ description:+ "Automatically create a Google Meet video conference link for this event"+ }+ },+ advancedInputs: {+ send_notifications: {+ type: { kind: "primitive", of: "string" },+ required: false,+ choices: ["all", "externalOnly", "none"],+ defaultValue: "all"+ }+ },+ outputs: {+ summary: { kind: "primitive", of: "string" },+ status: { kind: "primitive", of: "string" },+ htmlLink: { kind: "primitive", of: "string" },+ id: { kind: "primitive", of: "string" },+ eventType: { kind: "primitive", of: "string" },+ start: {+ kind: "record",+ fields: {+ dateTime: { kind: "primitive", of: "date" },+ timeZone: { kind: "primitive", of: "string" }+ }+ },+ end: {+ kind: "record",+ fields: {+ dateTime: { kind: "primitive", of: "date" },+ timeZone: { kind: "primitive", of: "string" }+ }+ },+ creator: {+ kind: "record",+ fields: { email: { kind: "primitive", of: "string" } }+ },+ organizer: {+ kind: "record",+ fields: { email: { kind: "primitive", of: "string" } }+ },+ created: { kind: "primitive", of: "date" },+ updated: { kind: "primitive", of: "date" },+ iCalUID: { kind: "primitive", of: "string" },+ count: { kind: "primitive", of: "number" },+ result: { kind: "primitive", of: "string" }+ },+ batchable: false,+ permission: { module: "workflows", action: "update" },+ piece: { name: "google-calendar", action: "create_google_calendar_event" }+ },+ "integration.google-calendar.google_calendar_get_events": {+ inputs: {+ connectionId: {+ type: { kind: "primitive", of: "string" },+ required: true,+ options: {+ provider: "integration.connection",+ params: { piece: "google-calendar" }+ }+ },+ calendar_id: {+ type: { kind: "primitive", of: "string" },+ required: true,+ options: {+ provider: "integration.property",+ params: {+ piece: "google-calendar",+ action: "google_calendar_get_events",+ prop: "calendar_id"+ },+ dependsOn: ["connectionId"]+ }+ },+ search: { type: { kind: "primitive", of: "string" }, required: false },+ start_date: {+ type: { kind: "primitive", of: "date" },+ required: false,+ precision: "datetime"+ },+ end_date: {+ type: { kind: "primitive", of: "date" },+ required: false,+ precision: "datetime"+ }+ },+ advancedInputs: {+ event_types: {+ type: { kind: "list", of: { kind: "primitive", of: "string" } },+ required: false,+ choices: ["default", "outOfOffice", "focusTime", "workingLocation"],+ defaultValue: ["default", "focusTime", "outOfOffice"],+ description: "Select event types"+ },+ singleEvents: {+ type: { kind: "primitive", of: "boolean" },+ required: false,+ defaultValue: true,+ description:+ "Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves."+ }+ },+ outputs: {+ status: { kind: "primitive", of: "string" },+ summary: { kind: "primitive", of: "string" },+ timeZone: { kind: "primitive", of: "string" },+ accessRole: { kind: "primitive", of: "string" },+ updated: { kind: "primitive", of: "date" },+ items: {+ kind: "list",+ of: {+ kind: "record",+ fields: {+ summary: { kind: "primitive", of: "string" },+ status: { kind: "primitive", of: "string" },+ id: { kind: "primitive", of: "string" },+ eventType: { kind: "primitive", of: "string" },+ htmlLink: { kind: "primitive", of: "string" },+ startDateTime: { kind: "primitive", of: "date" },+ endDateTime: { kind: "primitive", of: "date" },+ creatorEmail: { kind: "primitive", of: "string" },+ organizerEmail: { kind: "primitive", of: "string" },+ created: { kind: "primitive", of: "date" },+ updated: { kind: "primitive", of: "date" },+ iCalUID: { kind: "primitive", of: "string" }+ }+ }+ },+ count: { kind: "primitive", of: "number" },+ result: { kind: "primitive", of: "string" }+ },+ batchable: false,+ permission: { module: "workflows", action: "update" },+ piece: { name: "google-calendar", action: "google_calendar_get_events" }+ },+ "integration.slack.send_channel_message": {+ inputs: {+ connectionId: {+ type: { kind: "primitive", of: "string" },+ required: true,+ options: {+ provider: "integration.connection",+ params: { piece: "slack" }+ }+ },+ channel: {+ type: { kind: "primitive", of: "string" },+ required: true,+ description:+ "You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.'",+ options: {+ provider: "integration.property",+ params: {+ piece: "slack",+ action: "send_channel_message",+ prop: "channel"+ },+ dependsOn: ["connectionId"]+ }+ },+ text: {+ type: { kind: "primitive", of: "string" },+ required: false,+ description:+ "The text of your message. When using Block Kit blocks, this is used as a fallback for notifications.",+ template: true,+ links: { format: "slack" }+ },+ threadTs: {+ type: { kind: "primitive", of: "string" },+ required: false,+ description:+ "Provide the ts (timestamp) or link value of the **parent** message to make this message a reply. Do not use the ts value of the reply itself; use its parent instead. For example '1710304378.475129'.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the 'Copy link' option."+ },+ username: {+ type: { kind: "primitive", of: "string" },+ required: false,+ description: "The username of the bot"+ },+ profilePicture: {+ type: { kind: "primitive", of: "string" },+ required: false,+ description: "The profile picture of the bot"+ },+ iconEmoji: {+ type: { kind: "primitive", of: "string" },+ required: false,+ description: "The icon emoji of the bot"+ },+ replyBroadcast: {+ type: { kind: "primitive", of: "boolean" },+ required: false,+ defaultValue: false,+ description:+ "When replying to a thread, also make the message visible to everyone in the channel (only applicable when Thread Timestamp is provided)"+ },+ unfurlLinks: {+ type: { kind: "primitive", of: "boolean" },+ required: false,+ defaultValue: true,+ description: "Enable link unfurling for this message"+ }+ },+ outputs: {+ channel: { kind: "primitive", of: "string" },+ ts: { kind: "primitive", of: "string" },+ message: {+ kind: "record",+ fields: {+ ts: { kind: "primitive", of: "string" },+ user: { kind: "primitive", of: "string" },+ text: { kind: "primitive", of: "string" },+ type: { kind: "primitive", of: "string" },+ subtype: { kind: "primitive", of: "string" },+ bot_id: { kind: "primitive", of: "string" },+ team: { kind: "primitive", of: "string" },+ thread_ts: { kind: "primitive", of: "string" },+ reply_count: { kind: "primitive", of: "number" },+ reply_users_count: { kind: "primitive", of: "number" },+ latest_reply: { kind: "primitive", of: "string" },+ is_locked: { kind: "primitive", of: "boolean" },+ edited: {+ kind: "record",+ fields: {+ user: { kind: "primitive", of: "string" },+ ts: { kind: "primitive", of: "string" }+ }+ },+ reactions: {+ kind: "list",+ of: {+ kind: "record",+ fields: {+ name: { kind: "primitive", of: "string" },+ count: { kind: "primitive", of: "number" }+ }+ }+ }+ }+ },+ count: { kind: "primitive", of: "number" },+ result: { kind: "primitive", of: "string" }+ },+ batchable: false,+ permission: { module: "workflows", action: "update" },+ piece: { name: "slack", action: "send_channel_message" }+ },+ "integration.slack.send_direct_message": {+ inputs: {+ connectionId: {+ type: { kind: "primitive", of: "string" },+ required: true,+ options: {+ provider: "integration.connection",+ params: { piece: "slack" }+ }+ },+ userId: {+ type: { kind: "primitive", of: "string" },+ required: true,+ options: {+ provider: "integration.property",+ params: {+ piece: "slack",+ action: "send_direct_message",+ prop: "userId"+ },+ dependsOn: ["connectionId"]+ }+ },+ text: {+ type: { kind: "primitive", of: "string" },+ required: true,+ template: true,+ links: { format: "slack" }+ },+ username: {+ type: { kind: "primitive", of: "string" },+ required: false,+ description: "The username of the bot"+ },+ profilePicture: {+ type: { kind: "primitive", of: "string" },+ required: false,+ description: "The profile picture of the bot"+ },+ iconEmoji: {+ type: { kind: "primitive", of: "string" },+ required: false,+ description: "The icon emoji of the bot"+ },+ unfurlLinks: {+ type: { kind: "primitive", of: "boolean" },+ required: false,+ defaultValue: true,+ description: "Enable link unfurling for this message"+ }+ },+ outputs: {+ channel: { kind: "primitive", of: "string" },+ ts: { kind: "primitive", of: "string" },+ message: {+ kind: "record",+ fields: {+ ts: { kind: "primitive", of: "string" },+ user: { kind: "primitive", of: "string" },+ text: { kind: "primitive", of: "string" },+ type: { kind: "primitive", of: "string" },+ subtype: { kind: "primitive", of: "string" },+ bot_id: { kind: "primitive", of: "string" },+ team: { kind: "primitive", of: "string" },+ thread_ts: { kind: "primitive", of: "string" },+ reply_count: { kind: "primitive", of: "number" },+ reply_users_count: { kind: "primitive", of: "number" },+ latest_reply: { kind: "primitive", of: "string" },+ is_locked: { kind: "primitive", of: "boolean" },+ edited: {+ kind: "record",+ fields: {+ user: { kind: "primitive", of: "string" },+ ts: { kind: "primitive", of: "string" }+ }+ },+ reactions: {+ kind: "list",+ of: {+ kind: "record",+ fields: {+ name: { kind: "primitive", of: "string" },+ count: { kind: "primitive", of: "number" }+ }+ }+ }+ }+ },+ count: { kind: "primitive", of: "number" },+ result: { kind: "primitive", of: "string" }+ },+ batchable: false,+ permission: { module: "workflows", action: "update" },+ piece: { name: "slack", action: "send_direct_message" }+ },+ "integration.slack.slack-create-channel": {+ inputs: {+ connectionId: {+ type: { kind: "primitive", of: "string" },+ required: true,+ options: {+ provider: "integration.connection",+ params: { piece: "slack" }+ }+ },+ channelName: {+ type: { kind: "primitive", of: "string" },+ required: true+ },+ isPrivate: {+ type: { kind: "primitive", of: "boolean" },+ required: false,+ defaultValue: false+ }+ },+ outputs: {+ channel: {+ kind: "record",+ fields: {+ id: { kind: "primitive", of: "string" },+ name: { kind: "primitive", of: "string" },+ is_channel: { kind: "primitive", of: "boolean" },+ is_group: { kind: "primitive", of: "boolean" },+ is_private: { kind: "primitive", of: "boolean" },+ is_archived: { kind: "primitive", of: "boolean" },+ is_general: { kind: "primitive", of: "boolean" },+ is_member: { kind: "primitive", of: "boolean" },+ is_shared: { kind: "primitive", of: "boolean" },+ created: { kind: "primitive", of: "number" },+ creator: { kind: "primitive", of: "string" },+ num_members: { kind: "primitive", of: "number" },+ topic: {+ kind: "record",+ fields: {+ value: { kind: "primitive", of: "string" },+ creator: { kind: "primitive", of: "string" },+ last_set: { kind: "primitive", of: "number" }+ }+ },+ purpose: {+ kind: "record",+ fields: {+ value: { kind: "primitive", of: "string" },+ creator: { kind: "primitive", of: "string" },+ last_set: { kind: "primitive", of: "number" }+ }+ },+ previous_names: { kind: "primitive", of: "string" }+ }+ },+ count: { kind: "primitive", of: "number" },+ result: { kind: "primitive", of: "string" }+ },+ batchable: false,+ permission: { module: "workflows", action: "update" },+ piece: { name: "slack", action: "slack-create-channel" }+ },+ "integration.slack.slack-find-user-by-email": {+ inputs: {+ connectionId: {+ type: { kind: "primitive", of: "string" },+ required: true,+ options: {+ provider: "integration.connection",+ params: { piece: "slack" }+ }+ },+ email: { type: { kind: "primitive", of: "string" }, required: true }+ },+ outputs: {+ user: {+ kind: "record",+ fields: {+ id: { kind: "primitive", of: "string" },+ name: { kind: "primitive", of: "string" },+ real_name: { kind: "primitive", of: "string" },+ deleted: { kind: "primitive", of: "boolean" },+ is_admin: { kind: "primitive", of: "boolean" },+ is_owner: { kind: "primitive", of: "boolean" },+ is_bot: { kind: "primitive", of: "boolean" },+ is_restricted: { kind: "primitive", of: "boolean" },+ tz: { kind: "primitive", of: "string" },+ profile: {+ kind: "record",+ fields: {+ email: { kind: "primitive", of: "string" },+ real_name: { kind: "primitive", of: "string" },+ display_name: { kind: "primitive", of: "string" },+ title: { kind: "primitive", of: "string" },+ phone: { kind: "primitive", of: "string" },+ image_192: { kind: "primitive", of: "string" },+ status_text: { kind: "primitive", of: "string" },+ status_emoji: { kind: "primitive", of: "string" },+ first_name: { kind: "primitive", of: "string" },+ last_name: { kind: "primitive", of: "string" }+ }+ }+ }+ },+ count: { kind: "primitive", of: "number" },+ result: { kind: "primitive", of: "string" }+ },+ batchable: false,+ permission: { module: "workflows", action: "update" },+ piece: { name: "slack", action: "slack-find-user-by-email" }+ }+};+export const WORKFLOW_OPERATION_CATALOG: Record<string, BuiltOperation> = {"item.quantityOnHand": {entity: "item",diff --git a/packages/ee/src/workflows/catalog/actions.ts b/packages/ee/src/workflows/catalog/actions.tsindex d4dff8f36f..7168a31c01 100644--- a/packages/ee/src/workflows/catalog/actions.ts+++ b/packages/ee/src/workflows/catalog/actions.ts@@ -3,7 +3,11 @@// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.import type { TermId } from "@carbon/content/glossary";-import type { RequiredPermission } from "../definition/catalog";+import type {+ LinksDeclaration,+ OptionsSource,+ RequiredPermission+} from "../definition/catalog";import { t, type ValueType } from "../definition/types";export interface ActionInputLike {@@ -11,20 +15,33 @@ export interface ActionInputLike {required: boolean;label: string;template?: boolean;- /** Prose a person reads: a record dropped in renders as a link. Not for webhook bodies,- * where a markdown link would ship to someone else's API as literal text. */- linkify?: boolean;+ /** The input is a moment, not a calendar day: the builder renders a date AND+ * time picker and stores a full ISO instant. Set from a vendor's `DATE_TIME`+ * property. Never set on a Carbon business date (`dueDate`, `orderDate`,+ * `postingDate`), which is a day on the company's calendar and has no time. */+ precision?: "datetime";+ /** Prose that can carry a link, in the destination's own dialect. Not for webhook+ * bodies, where a link would ship to someone else's API as literal text. */+ links?: LinksDeclaration;/** Allowed literal values. The generated side infers these from the database schema;* a hand-written action is not a schema entity, so it must say so here. */choices?: readonly string[];- /** What the builder seeds a new node with. Nothing reads it at run time. */- defaultValue?: string | readonly string[];+ /** The vendor's own explanation of the field, shown as an ⓘ tooltip. Free+ * text (translated through the label catalog), unlike `help`, which names a+ * Carbon glossary term. */+ description?: string;+ /** What the builder seeds a new node with. Nothing reads it at run time.+ * Booleans and numbers are real members: a checkbox's `false` is a value, and+ * dropping it by truthiness made an OFF toggle mean "vendor decides". */+ defaultValue?: string | number | boolean | readonly string[];/** The value is a set of name/value rows. */pairs?: boolean;/** Only shown, and only required, while `input` holds one of `equals`. */showWhen?: { input: string; equals: readonly string[] };/** Glossary term whose definition explains this field. Rendered as the ⓘ hover. */help?: TermId;+ /** Choices are fetched while editing, from a registered options provider. */+ options?: OptionsSource;}export interface ActionDeclarationLike {@@ -40,6 +57,23 @@ export interface ActionDeclarationLike {update?: { entity: string };}+/**+ * One step of a third-party integration, declared by the generator from the piece+ * allowlist and never by hand. Inputs work exactly as an action's — only how the+ * step RUNS differs, which is why `piece` is required here and absent above.+ */+export interface IntegrationDeclarationLike+ extends Omit<ActionDeclarationLike, "call" | "update"> {+ /** See `CatalogIntegration.batchable`. */+ batchable: false;+ /** `label` is the APP's own name — see `integrationAppLabelKey`. */+ piece: { name: string; action: string; label: string };+ /** Inputs a person does not see by default — vendor API trivia, or a value we+ * pin. Kept apart from `inputs` so the validator never demands one; the builder+ * renders them under Advanced, so a hidden field is demoted, never lost. */+ advancedInputs?: ActionDeclarationLike["inputs"];+}+/** Identity helper, so each entry's shape is checked where it is written. */const action = (entry: ActionDeclarationLike) => entry;@@ -177,7 +211,8 @@ export const WORKFLOW_ACTIONS = {required: false,label: "message",template: true,- linkify: true+ // Markdown: the dialect the in-app notification renderer reads.+ links: { format: "markdown" }},// The value model has no "any record" type, so the record is named in two parts.aboutId: {diff --git a/packages/ee/src/workflows/catalog/build.test.ts b/packages/ee/src/workflows/catalog/build.test.tsindex 498cfe734a..c73de0d280 100644--- a/packages/ee/src/workflows/catalog/build.test.ts+++ b/packages/ee/src/workflows/catalog/build.test.ts@@ -478,6 +478,52 @@ describe("validateCatalogInputs", () => {expect(problems.join("\n")).toMatch(/names entity "nobody"/);});+ it("refuses a record-typed input on an action and on an integration step", () => {+ const recordType = {+ kind: "record" as const,+ fields: { summary: { kind: "primitive" as const, of: "string" as const } }+ };+ const problems = validateCatalogInputs(+ {},+ {},+ {+ notify: {+ label: "Notify",+ permission: { module: "users", action: "view" },+ call: "notify",+ inputs: {+ payload: { type: recordType, required: true, label: "Payload" }+ },+ outputs: {},+ batchable: false+ }+ },+ {},+ schema,+ {+ "integration.x.y": {+ label: "X: Y",+ permission: { module: "workflows", action: "update" },+ // A LIST of objects is refused for the same reason a single one is.+ inputs: {+ rows: {+ type: { kind: "list", of: recordType },+ required: false,+ label: "Rows"+ }+ },+ outputs: {},+ batchable: false,+ piece: { name: "x", action: "y", label: "X" }+ }+ }+ );+ expect(problems).toEqual([+ "notify.payload is an object, which cannot be filled in by a person.",+ "integration.x.y.rows is an object, which cannot be filled in by a person."+ ]);+ });+it("returns nothing for the real hand-written inputs", () => {expect(validateCatalogInputs(diff --git a/packages/ee/src/workflows/catalog/build.ts b/packages/ee/src/workflows/catalog/build.tsindex 3241aad358..f7db2ed0c8 100644--- a/packages/ee/src/workflows/catalog/build.ts+++ b/packages/ee/src/workflows/catalog/build.ts@@ -5,11 +5,17 @@import type { TermId } from "@carbon/content/glossary";import {type EventMatch,+ integrationAppLabelKey,isMultiSelect,+ type LinksDeclaration,+ type OptionsSource,type RequiredPermission} from "../definition/catalog";import { t, type ValueType } from "../definition/types";-import type { ActionDeclarationLike } from "./actions";+import type {+ ActionDeclarationLike,+ IntegrationDeclarationLike+} from "./actions";import type { OperationDeclarationLike } from "./operations";/** The slice of `swagger-docs-schema.ts` the builder reads. */@@ -83,11 +89,18 @@ export interface BuiltActionInput {required: boolean;choices?: readonly string[];/** What the builder seeds a new node with. Nothing reads it at run time. */- defaultValue?: string | readonly string[];+ defaultValue?: string | number | boolean | readonly string[];+ /** Vendor prose for the ⓘ tooltip; rendered through the label catalog. */+ description?: string;template?: boolean;+ /** The input is a moment, not a calendar day: the builder renders a date AND+ * time picker and stores a full ISO instant. Set from a vendor's `DATE_TIME`+ * property. Never set on a Carbon business date (`dueDate`, `orderDate`,+ * `postingDate`), which is a day on the company's calendar and has no time. */+ precision?: "datetime";/** Prose a person reads: a record dropped in renders as a link when the caller* supplies a resolver. Not set on webhook bodies. */- linkify?: boolean;+ links?: LinksDeclaration;/** Table a non-entity foreign key points at, so the update executor can scope the* value to the company. Resolved here so a dropped fk note fails CI rather than* silently disabling that check at run time. */@@ -98,6 +111,8 @@ export interface BuiltActionInput {pairs?: boolean;/** Only shown, and only required, while `input` holds one of `equals`. */showWhen?: { input: string; equals: readonly string[] };+ /** Choices are fetched while editing, from a registered options provider. */+ options?: OptionsSource;}export interface BuiltAction {@@ -110,6 +125,22 @@ export interface BuiltAction {update?: { entity: string };}+/**+ * A step run by a third-party integration. Deliberately NOT a `BuiltAction`: the+ * action path has no notion of a vendor, so the two cannot be confused at a call+ * site or routed through the same dispatcher.+ */+export interface BuiltIntegration+ extends Omit<BuiltAction, "call" | "update" | "requireOneOf"> {+ /** Which piece, and which of its actions. The app's display name lives in the+ * label map instead, so it is not repeated on every step. */+ piece: { name: string; action: string };+ /** Hidden inputs, rendered only under the node's Advanced section. */+ advancedInputs?: Record<string, BuiltActionInput>;+ /** See `CatalogIntegration.batchable`. */+ batchable: false;+}+export interface BuiltOperation {entity: string;inputs: Record<string, BuiltActionInput>;@@ -127,12 +158,80 @@ export interface BuiltCatalog {/** Allowed values per entity + property, only for enum columns. */enums: Record<string, Record<string, readonly string[]>>;actions: Record<string, BuiltAction>;+ integrations: Record<string, BuiltIntegration>;operations: Record<string, BuiltOperation>;}/** A hand-written action with neither of these has no way to run. */const BUILT_IN_ACTIONS = new Set(["notify", "webhook"]);+/** Declared inputs → built inputs. Shared by actions and integration steps: they+ * describe their inputs identically, and only differ in how the step is run. */+function buildDeclaredInputs(+ id: string,+ declaration: ActionDeclarationLike,+ registry: Record<string, RegistryEntry>,+ schema: SwaggerSchema+): Record<string, BuiltActionInput> {+ const inputs: Record<string, BuiltActionInput> = {};+ for (const [input, spec] of Object.entries(declaration.inputs)) {+ inputs[input] = {+ type: spec.type,+ required: spec.required,+ ...(spec.choices ? { choices: spec.choices } : {}),+ // `!== undefined`, never truthiness: `false` and `0` are real defaults.+ ...(spec.defaultValue !== undefined+ ? { defaultValue: spec.defaultValue }+ : {}),+ ...(spec.description !== undefined+ ? { description: spec.description }+ : {}),+ ...(spec.template ? { template: true } : {}),+ ...(spec.precision ? { precision: spec.precision } : {}),+ ...(spec.links ? { links: spec.links } : {}),+ ...(spec.pairs ? { pairs: true } : {}),+ ...(spec.showWhen ? { showWhen: spec.showWhen } : {}),+ ...(spec.options ? { options: spec.options } : {})+ };+ // An `<entity>.<verb>` id inherits its entity's enum columns; an integration+ // id has no registry entry, so this simply does not fire for one.+ const [entityPrefix] = id.split(".");+ const table =+ entityPrefix !== undefined ? registry[entityPrefix]?.table : undefined;+ if (table !== undefined) {+ const values = enumFor(schema, table, input);+ if (values !== undefined && values.length > 0) {+ inputs[input].choices = values;+ }+ }+ }+ return inputs;+}++/** The English label for a declaration and each of its inputs. Key shape is shared+ * with actions so one lookup serves both kinds in the builder. */+function labelDeclaration(+ id: string,+ declaration: ActionDeclarationLike,+ labels: Record<string, string>,+ help: Record<string, string>+): void {+ assertLabelIsSafe(id, declaration.label);+ labels[id] = declaration.label;+ for (const [input, spec] of Object.entries(declaration.inputs)) {+ const key = `action.${id}.input.${input}`;+ const label = spec.label.charAt(0).toUpperCase() + spec.label.slice(1);+ assertLabelIsSafe(key, label);+ labels[key] = label;+ if (spec.help !== undefined) help[key] = spec.help;+ // The tooltip rides the label catalog so it is translated like the label.+ if (spec.description !== undefined) {+ assertLabelIsSafe(`${key}.description`, spec.description);+ labels[`${key}.description`] = spec.description;+ }+ }+}+/** Tenancy, extensibility and audit columns, hidden from every entity. */const DROPPED_COLUMNS = new Set(["companyId",@@ -175,11 +274,17 @@ function columnLabel(entry: RegistryEntry, column: string): string {: rawLabel.charAt(0).toUpperCase() + rawLabel.slice(1);}-/** Labels are spliced into a msg`` template literal, so these would break the emit. */+/** Labels are spliced verbatim into a msg`` template literal, so these would+ * break the emit or change the text: a backtick, `${`, or a backslash that is not+ * itself escaped (`\\` reads back as one backslash, a lone one starts an escape). */function assertLabelIsSafe(key: string, label: string): void {- if (label.includes("`") || label.includes("${")) {+ if (+ label.includes("`") ||+ label.includes("${") ||+ label.replaceAll("\\\\", "").includes("\\")+ ) {throw new Error(- `Label for ${key} contains a backtick or template literal: "${label}"`+ `Label for ${key} contains a backtick, a template literal or a lone backslash: "${label}"`);}}@@ -259,7 +364,8 @@ export function validateCatalogInputs(moments: Record<string, MomentDeclarationLike>,actions: Record<string, ActionDeclarationLike>,operations: Record<string, OperationDeclarationLike>,- schema: SwaggerSchema+ schema: SwaggerSchema,+ integrations: Record<string, IntegrationDeclarationLike> = {}): string[] {const problems: string[] = [];const byTable = indexByTable(registry);@@ -368,21 +474,81 @@ export function validateCatalogInputs(}};- for (const [id, declaration] of Object.entries(actions)) {+ // Actions and integration steps declare their inputs identically, so the same+ // rules apply to both — only how each one is RUN differs.+ const declarations: [string, string, ActionDeclarationLike][] = [+ ...Object.entries(actions).map(+ ([id, declaration]) =>+ ["Action", id, declaration] as [string, string, ActionDeclarationLike]+ ),+ ...Object.entries(integrations).map(+ ([id, declaration]) =>+ ["Integration step", id, declaration] as [+ string,+ string,+ ActionDeclarationLike+ ]+ )+ ];++ for (const [kind, id, declaration] of declarations) {if (declaration.label.trim().length === 0) {- problems.push(`Action "${id}" has no label.`);+ problems.push(`${kind} "${id}" has no label.`);}- if (declaration.call === undefined && !BUILT_IN_ACTIONS.has(id)) {+ if (+ kind === "Action" &&+ declaration.call === undefined &&+ !BUILT_IN_ACTIONS.has(id)+ ) {problems.push(`Action "${id}" has no implementation route.`);}- for (const [input, spec] of Object.entries(declaration.inputs)) {- checkEntityType(`Action "${id}"`, `input "${input}"`, spec.type);+ // Advanced inputs are hidden in the form but land in the same `inputs` bag at+ // run time, so they get every structural check the visible ones get. Only the+ // required/`requireOneOf` rules are inapplicable — and this loop has none.+ const declaredInputs: Record<+ string,+ ActionDeclarationLike["inputs"][string]+ > = {+ ...declaration.inputs,+ ...(declaration as IntegrationDeclarationLike).advancedInputs+ };+ for (const [input, spec] of Object.entries(declaredInputs)) {+ checkEntityType(`${kind} "${id}"`, `input "${input}"`, spec.type);+ // An object is a step's OUTPUT, never something a person fills in: there is+ // no field that could edit one, and no literal that could hold one. Refusing+ // it here is what keeps every existing form, template and condition free of+ // a record case.+ if (+ spec.type.kind === "record" ||+ (spec.type.kind === "list" && spec.type.of.kind === "record")+ ) {+ problems.push(+ `${id}.${input} is an object, which cannot be filled in by a person.`+ );+ }if (spec.template === true &&!(spec.type.kind === "primitive" && spec.type.of === "string")) {problems.push(`${id}.${input} is a template but is not a string.`);}+ if (+ spec.precision !== undefined &&+ !(spec.type.kind === "primitive" && spec.type.of === "date")+ ) {+ problems.push(`${id}.${input} declares precision but is not a date.`);+ }+ if (spec.links !== undefined) {+ if (!(spec.type.kind === "primitive" && spec.type.of === "string")) {+ problems.push(`${id}.${input} declares links but is not a string.`);+ }+ const gate = spec.links.when;+ if (gate !== undefined && declaredInputs[gate.input] === undefined) {+ problems.push(+ `${id}.${input} gates links on "${gate.input}", which the step does not have.`+ );+ }+ }// A fixed set of values on a list is what MAKES it a multi-select (`isMultiSelect`),// so a list of anything else has no reading in the builder.if (@@ -396,10 +562,13 @@ export function validateCatalogInputs(}if (spec.defaultValue !== undefined && spec.choices !== undefined) {// One default or a set of them — a multi-select seeds several at once.+ // A boolean or number default has no choices to be a member of.const defaults =typeof spec.defaultValue === "string"? [spec.defaultValue]- : spec.defaultValue;+ : Array.isArray(spec.defaultValue)+ ? spec.defaultValue+ : [];for (const value of defaults) {if (spec.choices.includes(value)) continue;problems.push(@@ -417,9 +586,21 @@ export function validateCatalogInputs(`${id}.${input} defaults to one value but holds a set of them.`);}+ // A fetched list and a fixed one are two answers to the same question.+ if (spec.options !== undefined && spec.choices !== undefined) {+ problems.push(+ `${id}.${input} both fetches its values and lists them; it can only do one.`+ );+ }+ for (const dependency of spec.options?.dependsOn ?? []) {+ if (declaredInputs[dependency] !== undefined) continue;+ problems.push(+ `${id}.${input} fetches its values using "${dependency}", which is not an input of "${id}".`+ );+ }const gate = spec.showWhen;if (gate !== undefined) {- const target = declaration.inputs[gate.input];+ const target = declaredInputs[gate.input];if (target === undefined) {problems.push(`${id}.${input} is shown when "${gate.input}" is set, but that is not an input of "${id}".`@@ -446,7 +627,7 @@ export function validateCatalogInputs(}}for (const [output, type] of Object.entries(declaration.outputs)) {- checkEntityType(`Action "${id}"`, `output "${output}"`, type);+ checkEntityType(`${kind} "${id}"`, `output "${output}"`, type);}}@@ -499,14 +680,16 @@ export function buildCatalog(moments: Record<string, MomentDeclarationLike>,handWrittenActions: Record<string, ActionDeclarationLike>,handWrittenOperations: Record<string, OperationDeclarationLike>,- schema: SwaggerSchema+ schema: SwaggerSchema,+ integrationSteps: Record<string, IntegrationDeclarationLike> = {}): BuiltCatalog {const problems = validateCatalogInputs(registry,moments,handWrittenActions,handWrittenOperations,- schema+ schema,+ integrationSteps);if (problems.length > 0) throw new Error(problems.join("\n"));@@ -517,6 +700,7 @@ export function buildCatalog(const entities: Record<string, Record<string, ValueType>> = {};const enums: Record<string, Record<string, readonly string[]>> = {};const actions: Record<string, BuiltAction> = {};+ const integrations: Record<string, BuiltIntegration> = {};const operations: Record<string, BuiltOperation> = {};for (const [name, entry] of Object.entries(registry)) {@@ -649,28 +833,7 @@ export function buildCatalog(`Action "${id}" is declared by hand and also generated from the entity registry.`);}- const inputs: Record<string, BuiltActionInput> = {};- for (const [input, spec] of Object.entries(declaration.inputs)) {- inputs[input] = {- type: spec.type,- required: spec.required,- ...(spec.choices ? { choices: spec.choices } : {}),- ...(spec.defaultValue ? { defaultValue: spec.defaultValue } : {}),- ...(spec.template ? { template: true } : {}),- ...(spec.linkify ? { linkify: true } : {}),- ...(spec.pairs ? { pairs: true } : {}),- ...(spec.showWhen ? { showWhen: spec.showWhen } : {})- };- const [entityPrefix] = id.split(".");- const table =- entityPrefix !== undefined ? registry[entityPrefix]?.table : undefined;- if (table !== undefined) {- const values = enumFor(schema, table, input);- if (values !== undefined && values.length > 0) {- inputs[input].choices = values;- }- }- }+ const inputs = buildDeclaredInputs(id, declaration, registry, schema);actions[id] = {inputs,outputs: declaration.outputs,@@ -681,14 +844,51 @@ export function buildCatalog(: { requireOneOf: declaration.requireOneOf }),...(declaration.call === undefined ? {} : { call: declaration.call })};- labels[id] = declaration.label;- for (const [input, spec] of Object.entries(declaration.inputs)) {- const key = `action.${id}.input.${input}`;- const label = spec.label.charAt(0).toUpperCase() + spec.label.slice(1);- assertLabelIsSafe(key, label);- labels[key] = label;- if (spec.help !== undefined) help[key] = spec.help;+ labelDeclaration(id, declaration, labels, help);+ }++ // Same input handling, a different map: an integration step never reaches the+ // action dispatcher, and an action never carries a piece.+ for (const [id, declaration] of Object.entries(integrationSteps)) {+ if (actions[id] !== undefined) {+ throw new Error(+ `"${id}" is declared as both an action and an integration step.`+ );}+ const { name, action, label: appLabel } = declaration.piece;+ integrations[id] = {+ inputs: buildDeclaredInputs(id, declaration, registry, schema),+ ...(declaration.advancedInputs === undefined+ ? {}+ : {+ advancedInputs: buildDeclaredInputs(+ id,+ { ...declaration, inputs: declaration.advancedInputs },+ registry,+ schema+ )+ }),+ outputs: declaration.outputs,+ batchable: declaration.batchable,+ permission: declaration.permission,+ piece: { name, action }+ };+ // Advanced inputs need the same labels and tooltips: the builder lists them+ // under Advanced, and without these it fell back to the raw prop names.+ labelDeclaration(+ id,+ {+ ...declaration,+ inputs: { ...declaration.inputs, ...declaration.advancedInputs }+ },+ labels,+ help+ );+ // Written once per step of the app, to the same key — the builder needs the app's+ // own name to offer it before any step has been picked.+ const appKey = integrationAppLabelKey(name);+ assertLabelIsSafe(appKey, appLabel);+ labels[appKey] = appLabel;}for (const [id, declaration] of Object.entries(handWrittenOperations)) {@@ -719,5 +919,14 @@ export function buildCatalog(}}- return { events, labels, help, entities, enums, actions, operations };+ return {+ events,+ labels,+ help,+ entities,+ enums,+ actions,+ integrations,+ operations+ };}diff --git a/packages/ee/src/workflows/catalog/catalog.test.ts b/packages/ee/src/workflows/catalog/catalog.test.tsindex 12ba6e3035..84bd517960 100644--- a/packages/ee/src/workflows/catalog/catalog.test.ts+++ b/packages/ee/src/workflows/catalog/catalog.test.ts@@ -9,7 +9,11 @@ import {} from "../definition/schema";import { t } from "../definition/types";import { validateDefinition } from "../definition/validate";-import { createWorkflowCatalog, getActionRoute } from "./catalog";+import {+ createWorkflowCatalog,+ getActionRoute,+ integrationStepId+} from "./catalog";import { buildCatalogOverlay } from "./custom-fields";const catalog = createWorkflowCatalog();@@ -133,6 +137,27 @@ describe("createWorkflowCatalog — WorkflowCatalog conformance", () => {expect(getActionRoute("ghost")).toBeUndefined();});+ it("keeps integration steps out of the action catalog entirely", () => {+ const id = "integration.google-calendar.create_google_calendar_event";+ // Not an action at all: an integration step is its own node kind, so nothing on+ // the action path can reach one by accident.+ expect(catalog.getAction(id)).toBeUndefined();+ expect(getActionRoute(id)).toBeUndefined();++ const step = need(catalog.getIntegration(id), id);+ expect(step.piece).toEqual({+ name: "google-calendar",+ action: "create_google_calendar_event"+ });+ expect(step.inputs.connectionId?.required).toBe(true);+ });++ it("builds an integration step id without parsing one", () => {+ expect(+ integrationStepId("google-calendar", "create_google_calendar_event")+ ).toBe("integration.google-calendar.create_google_calendar_event");+ });+it("answers with an operation and the entity it works on", () => {const operation = need(catalog.getOperation("job.totalScrapQuantity"),diff --git a/packages/ee/src/workflows/catalog/catalog.ts b/packages/ee/src/workflows/catalog/catalog.tsindex 6431e2259a..dfe0de1b08 100644--- a/packages/ee/src/workflows/catalog/catalog.ts+++ b/packages/ee/src/workflows/catalog/catalog.ts@@ -6,11 +6,13 @@ import type {CatalogAction,CatalogEntity,CatalogEvent,+ CatalogIntegration,CatalogOperation,WorkflowCatalog} from "../definition/catalog";import {WORKFLOW_ACTION_CATALOG,+ WORKFLOW_INTEGRATION_CATALOG,WORKFLOW_OPERATION_CATALOG} from "./actions.generated";import {@@ -49,6 +51,13 @@ const ACTIONS: Map<string, CatalogAction> = new Map(]));+const INTEGRATIONS: Map<string, CatalogIntegration> = new Map(+ Object.entries(WORKFLOW_INTEGRATION_CATALOG).map(([id, integration]) => [+ id,+ { id, ...integration }+ ])+);+const OPERATIONS: Map<string, CatalogOperation> = new Map(Object.entries(WORKFLOW_OPERATION_CATALOG).map(([id, operation]) => [id,@@ -105,6 +114,8 @@ export function createWorkflowCatalog(if (base === undefined || extra === undefined) return base;return { ...base, inputs: merge(base.inputs, extra) };},+ // No overlay: a custom field belongs to a Carbon entity, never to a vendor's form.+ getIntegration: (id) => INTEGRATIONS.get(id),getOperation: (id) => OPERATIONS.get(id),getEnum: (entity, property) =>ENUMS.get(entity)?.[property] ?? overlay.enums[entity]?.[property],@@ -118,9 +129,12 @@ export function createWorkflowCatalog(}/** How a job-side action is actually run. Kept off `CatalogAction`, which the validator reads. */-export function getActionRoute(- id: string-): { call?: string; update?: { entity: string } } | undefined {+export function getActionRoute(id: string):+ | {+ call?: string;+ update?: { entity: string };+ }+ | undefined {const action = WORKFLOW_ACTION_CATALOG[id];if (action === undefined) return undefined;return {@@ -128,3 +142,5 @@ export function getActionRoute(...(action.update === undefined ? {} : { update: action.update })};}++export { integrationStepId } from "../definition/catalog";diff --git a/packages/ee/src/workflows/catalog/index.ts b/packages/ee/src/workflows/catalog/index.tsindex db07f8059c..b716b66d76 100644--- a/packages/ee/src/workflows/catalog/index.ts+++ b/packages/ee/src/workflows/catalog/index.ts@@ -4,17 +4,20 @@export type {ActionDeclarationLike,- ActionInputLike+ ActionInputLike,+ IntegrationDeclarationLike} from "./actions";export { WORKFLOW_ACTIONS } from "./actions";export {WORKFLOW_ACTION_CATALOG,+ WORKFLOW_INTEGRATION_CATALOG,WORKFLOW_OPERATION_CATALOG} from "./actions.generated";export {createWorkflowCatalog,getActionRoute,- getCatalogEvent+ getCatalogEvent,+ integrationStepId} from "./catalog";export type { CatalogOverlay, CustomFieldDef } from "./custom-fields";export {diff --git a/packages/ee/src/workflows/catalog/labels.generated.ts b/packages/ee/src/workflows/catalog/labels.generated.tsindex 454b6dcaa9..9cfb222224 100644--- a/packages/ee/src/workflows/catalog/labels.generated.ts+++ b/packages/ee/src/workflows/catalog/labels.generated.ts@@ -8,6 +8,79 @@ export const WORKFLOW_LABELS: Record<string, MessageDescriptor> = {"action.customer.update.input.assignee": msg`Assignee`,"action.customer.update.input.customer": msg`Customer`,"action.customer.update.input.customerTypeId": msg`Type`,+ "action.integration.gmail.gmail_send_email.input.bcc": msg`BCC Email`,+ "action.integration.gmail.gmail_send_email.input.body": msg`Body`,+ "action.integration.gmail.gmail_send_email.input.body.description": msg`Body for the email you want to send`,+ "action.integration.gmail.gmail_send_email.input.body_type": msg`Body Type`,+ "action.integration.gmail.gmail_send_email.input.cc": msg`CC Email`,+ "action.integration.gmail.gmail_send_email.input.connectionId": msg`Connection`,+ "action.integration.gmail.gmail_send_email.input.from": msg`Sender Email`,+ "action.integration.gmail.gmail_send_email.input.from.description": msg`The address must be listed in your GMail account's settings`,+ "action.integration.gmail.gmail_send_email.input.receiver": msg`Receiver Email (To)`,+ "action.integration.gmail.gmail_send_email.input.reply_to": msg`Reply-To Email`,+ "action.integration.gmail.gmail_send_email.input.reply_to.description": msg`Email address to set as the "Reply-To" header`,+ "action.integration.gmail.gmail_send_email.input.sender_name": msg`Sender Name`,+ "action.integration.gmail.gmail_send_email.input.subject": msg`Subject`,+ "action.integration.google-calendar.create_google_calendar_event.input.attendees": msg`Attendees`,+ "action.integration.google-calendar.create_google_calendar_event.input.attendees.description": msg`Emails of the attendees (guests)`,+ "action.integration.google-calendar.create_google_calendar_event.input.calendar_id": msg`Calendar`,+ "action.integration.google-calendar.create_google_calendar_event.input.colorId": msg`Color`,+ "action.integration.google-calendar.create_google_calendar_event.input.connectionId": msg`Connection`,+ "action.integration.google-calendar.create_google_calendar_event.input.create_meet_link": msg`Create Google Meet Link`,+ "action.integration.google-calendar.create_google_calendar_event.input.create_meet_link.description": msg`Automatically create a Google Meet video conference link for this event`,+ "action.integration.google-calendar.create_google_calendar_event.input.description": msg`Description`,+ "action.integration.google-calendar.create_google_calendar_event.input.description.description": msg`Description of the event. You can use HTML tags here.`,+ "action.integration.google-calendar.create_google_calendar_event.input.end_date_time": msg`End date time of the event`,+ "action.integration.google-calendar.create_google_calendar_event.input.end_date_time.description": msg`By default it'll be 30 min post start time`,+ "action.integration.google-calendar.create_google_calendar_event.input.guests_can_invite_others": msg`Guests can invite others`,+ "action.integration.google-calendar.create_google_calendar_event.input.guests_can_modify": msg`Guests can modify`,+ "action.integration.google-calendar.create_google_calendar_event.input.guests_can_see_other_guests": msg`Guests can see other guests`,+ "action.integration.google-calendar.create_google_calendar_event.input.location": msg`Location`,+ "action.integration.google-calendar.create_google_calendar_event.input.send_notifications": msg`Send Notifications`,+ "action.integration.google-calendar.create_google_calendar_event.input.start_date_time": msg`Start date time of the event`,+ "action.integration.google-calendar.create_google_calendar_event.input.title": msg`Title of the event`,+ "action.integration.google-calendar.google_calendar_get_events.input.calendar_id": msg`Calendar`,+ "action.integration.google-calendar.google_calendar_get_events.input.connectionId": msg`Connection`,+ "action.integration.google-calendar.google_calendar_get_events.input.end_date": msg`Date to`,+ "action.integration.google-calendar.google_calendar_get_events.input.event_types": msg`Event types`,+ "action.integration.google-calendar.google_calendar_get_events.input.event_types.description": msg`Select event types`,+ "action.integration.google-calendar.google_calendar_get_events.input.search": msg`Search Term`,+ "action.integration.google-calendar.google_calendar_get_events.input.singleEvents": msg`Expand Recurring Event?`,+ "action.integration.google-calendar.google_calendar_get_events.input.singleEvents.description": msg`Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves.`,+ "action.integration.google-calendar.google_calendar_get_events.input.start_date": msg`Date from`,+ "action.integration.slack.send_channel_message.input.channel": msg`Channel`,+ "action.integration.slack.send_channel_message.input.channel.description": msg`You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.'`,+ "action.integration.slack.send_channel_message.input.connectionId": msg`Connection`,+ "action.integration.slack.send_channel_message.input.iconEmoji": msg`Icon Emoji`,+ "action.integration.slack.send_channel_message.input.iconEmoji.description": msg`The icon emoji of the bot`,+ "action.integration.slack.send_channel_message.input.profilePicture": msg`Profile Picture`,+ "action.integration.slack.send_channel_message.input.profilePicture.description": msg`The profile picture of the bot`,+ "action.integration.slack.send_channel_message.input.replyBroadcast": msg`Broadcast reply to channel`,+ "action.integration.slack.send_channel_message.input.replyBroadcast.description": msg`When replying to a thread, also make the message visible to everyone in the channel (only applicable when Thread Timestamp is provided)`,+ "action.integration.slack.send_channel_message.input.text": msg`Message`,+ "action.integration.slack.send_channel_message.input.text.description": msg`The text of your message. When using Block Kit blocks, this is used as a fallback for notifications.`,+ "action.integration.slack.send_channel_message.input.threadTs": msg`Reply to Thread (Thread Message Link/Timestamp)`,+ "action.integration.slack.send_channel_message.input.threadTs.description": msg`Provide the ts (timestamp) or link value of the **parent** message to make this message a reply. Do not use the ts value of the reply itself; use its parent instead. For example '1710304378.475129'.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the 'Copy link' option.`,+ "action.integration.slack.send_channel_message.input.unfurlLinks": msg`Unfurl Links`,+ "action.integration.slack.send_channel_message.input.unfurlLinks.description": msg`Enable link unfurling for this message`,+ "action.integration.slack.send_channel_message.input.username": msg`Username`,+ "action.integration.slack.send_channel_message.input.username.description": msg`The username of the bot`,+ "action.integration.slack.send_direct_message.input.connectionId": msg`Connection`,+ "action.integration.slack.send_direct_message.input.iconEmoji": msg`Icon Emoji`,+ "action.integration.slack.send_direct_message.input.iconEmoji.description": msg`The icon emoji of the bot`,+ "action.integration.slack.send_direct_message.input.profilePicture": msg`Profile Picture`,+ "action.integration.slack.send_direct_message.input.profilePicture.description": msg`The profile picture of the bot`,+ "action.integration.slack.send_direct_message.input.text": msg`Message`,+ "action.integration.slack.send_direct_message.input.unfurlLinks": msg`Unfurl Links`,+ "action.integration.slack.send_direct_message.input.unfurlLinks.description": msg`Enable link unfurling for this message`,+ "action.integration.slack.send_direct_message.input.userId": msg`User`,+ "action.integration.slack.send_direct_message.input.username": msg`Username`,+ "action.integration.slack.send_direct_message.input.username.description": msg`The username of the bot`,+ "action.integration.slack.slack-create-channel.input.channelName": msg`Channel Name`,+ "action.integration.slack.slack-create-channel.input.connectionId": msg`Connection`,+ "action.integration.slack.slack-create-channel.input.isPrivate": msg`Is Private?`,+ "action.integration.slack.slack-find-user-by-email.input.connectionId": msg`Connection`,+ "action.integration.slack.slack-find-user-by-email.input.email": msg`Email`,"action.item.update.input.assignee": msg`Assignee`,"action.item.update.input.item": msg`Item`,"action.item.update.input.name": msg`Name`,@@ -498,6 +571,16 @@ export const WORKFLOW_LABELS: Record<string, MessageDescriptor> = {"entity.user.lastName": msg`Last name`,"entity.user.phone": msg`Phone`,"entity.user.signaturePath": msg`Signature path`,+ "integration.gmail": msg`Gmail`,+ "integration.gmail.gmail_send_email": msg`Gmail: Send Email`,+ "integration.google-calendar": msg`Google Calendar`,+ "integration.google-calendar.create_google_calendar_event": msg`Google Calendar: Create Event`,+ "integration.google-calendar.google_calendar_get_events": msg`Google Calendar: Get all Events`,+ "integration.slack": msg`Slack`,+ "integration.slack.send_channel_message": msg`Slack: Send Message To A Channel`,+ "integration.slack.send_direct_message": msg`Slack: Send Message To A User`,+ "integration.slack.slack-create-channel": msg`Slack: Create Channel`,+ "integration.slack.slack-find-user-by-email": msg`Slack: Find User by Email`,"inventory.receiptPosted": msg`A receipt is posted`,"inventory.shipmentPosted": msg`A shipment is posted`,"invoicing.purchaseInvoicePosted": msg`A purchase invoice is posted`,diff --git a/packages/ee/src/workflows/definition/batch.ts b/packages/ee/src/workflows/definition/batch.tsindex 402c57b0dc..d4ad76d6e7 100644--- a/packages/ee/src/workflows/definition/batch.ts+++ b/packages/ee/src/workflows/definition/batch.ts@@ -2,11 +2,23 @@// Carbon Enterprise file, licensed only under the Carbon Commercial License// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.-import type { CatalogAction } from "./catalog";+import type { CatalogInput } from "./catalog";import type { ValueOrRef, ValueType } from "./types";type ListType = Extract<ValueType, { kind: "list" }>;+/** What the validator needs of a step — an action or an integration step alike. */+export type BatchableStep = {+ inputs: Record<string, CatalogInput>;+ /** Hidden behind the form's Advanced section, but written into the same `inputs`+ * bag — so every check the visible ones get, these need too. */+ advancedInputs?: Record<string, CatalogInput>;+ outputs: Record<string, ValueType>;+ batchable: boolean;+ /** Each group needs at least one of its input names supplied. */+ requireOneOf?: string[][];+};+/*** Whether an action step repeats, and over what. Derived from the wiring rather than* stored: a list fed to a slot that takes one value has exactly one sensible meaning,@@ -25,15 +37,19 @@ export type BatchPlan =* resolving it would recurse into the loop it helps define.*/export function batchCandidates(- action: CatalogAction,+ action: BatchableStep,inputs: Record<string, ValueOrRef>): string[] {if (!action.batchable) return [];+ // Advanced inputs share the stored bag, so they are candidates like any other —+ // reading only the visible map would let a list wired into an Advanced scalar+ // slot run the step once instead of once per item.+ const declared = { ...action.inputs, ...action.advancedInputs };// Declaration order, so the validator and the engine always agree on "the first one".- return Object.keys(action.inputs).filter((name) => {- if (action.inputs[name]?.type.kind === "list") return false;+ return Object.keys(declared).filter((name) => {+ if (declared[name]?.type.kind === "list") return false;// Rows are never the list a step repeats over.- if (action.inputs[name]?.pairs) return false;+ if (declared[name]?.pairs) return false;const supplied = inputs[name];return supplied !== undefined && supplied.kind !== "item";});@@ -41,7 +57,7 @@ export function batchCandidates(/** The same rule the engine follows, resolved through whatever knows an input's type. */export function batchPlan(- action: CatalogAction,+ action: BatchableStep,inputs: Record<string, ValueOrRef>,typeOfInput: (name: string) => ValueType | undefined): BatchPlan {diff --git a/packages/ee/src/workflows/definition/catalog.ts b/packages/ee/src/workflows/definition/catalog.tsindex 0944ebb68a..14c6834609 100644--- a/packages/ee/src/workflows/definition/catalog.ts+++ b/packages/ee/src/workflows/definition/catalog.ts@@ -26,6 +26,35 @@ export interface CatalogEvent {match?: EventMatch;}+/**+ * Where an input's choices come from when they cannot be listed at build time.+ *+ * Deliberately generic: `provider` names a resolver the app registers, not an+ * integration. A vendor's calendar list, a Carbon-owned lookup and anything added+ * later are all the same shape here — the catalog says WHICH list, never HOW to+ * fetch it, so the builder renders every one of them with one field.+ */+export interface OptionsSource {+ /** Registered resolver id, e.g. `integration.connection`. */+ provider: string;+ /** Fixed arguments the resolver needs, decided when the catalog is built. */+ params?: Record<string, string>;+ /** Other inputs on the same node whose current values the resolver needs. The+ * field stays unfetched until every one of them holds a value. */+ dependsOn?: readonly string[];+}++export type LinkFormat = "markdown" | "slack" | "html";++/** This prose can carry a link, in the destination's own dialect — a record dropped+ * in renders as one when the engine supplies a resolver. `when` gates it on a sibling+ * input's literal value (Gmail links only an html body). Absent, a record renders as+ * its plain name and the builder says so (`notices.ts`). Webhook bodies set nothing. */+export interface LinksDeclaration {+ format: LinkFormat;+ when?: { input: string; equals: readonly string[] };+}+export interface CatalogInput {type: ValueType;required: boolean;@@ -33,12 +62,17 @@ export interface CatalogInput {choices?: readonly string[];/** What the builder seeds a new node with. Must be drawn from `choices` when both are* set. Stored like any other value — nothing reads it at run time. */- defaultValue?: string | readonly string[];+ defaultValue?: string | number | boolean | readonly string[];+ /** The vendor's own explanation of the field, for the builder's ⓘ hover. */+ description?: string;/** Prose that may interleave text and variables; the builder renders a chip editor. */template?: boolean;- /** This input is prose a person reads, so a record dropped into it renders as a link- * when the caller supplies a resolver. Webhook bodies deliberately do not set this. */- linkify?: boolean;+ /** The input is a moment, not a calendar day: the builder renders a date AND+ * time picker and stores a full ISO instant. Set from a vendor's `DATE_TIME`+ * property. Never set on a Carbon business date (`dueDate`, `orderDate`,+ * `postingDate`), which is a day on the company's calendar and has no time. */+ precision?: "datetime";+ links?: LinksDeclaration;/** Table a non-entity foreign key points at, so the write can be scoped to the company. */scopeTable?: string;/** The column rejects null; an input resolving to nothing is skipped, not written. */@@ -46,6 +80,8 @@ export interface CatalogInput {/** The value is a set of name/value rows; the builder renders an editable list.* Only a `pairs` value is legal here, and a `pairs` value is legal nowhere else. */pairs?: boolean;+ /** Choices are fetched while editing rather than listed in `choices`. */+ options?: OptionsSource;/** Show — and only then require — this input while another input holds one of these* values. Evaluated on literals only: a variable-valued gate cannot be read at build* time, so it opens rather than guessing and hiding the user's work. */@@ -79,6 +115,44 @@ export interface CatalogAction {requireOneOf?: string[][];}+/** The input every integration step carries: which of the company's connections it acts+ * as. Named here because the builder has to ask "is this app connected at all?" before it+ * can offer any of its steps. */+export const INTEGRATION_CONNECTION_INPUT = "connectionId";++/** The catalog id for one integration step. The ONE place the shape is written:+ * routing reads the catalog entry, never the id. */+export function integrationStepId(piece: string, action: string): string {+ return `integration.${piece}.${action}`;+}++/** The label key holding an app's own display name — "Google Calendar", not the+ * `google-calendar` package slug. Carried through the generator rather than derived+ * from the slug, so a vendor that does not title-case ("HubSpot", "GitHub") reads+ * correctly and is translated like every other catalog string. */+export function integrationAppLabelKey(piece: string): string {+ return `integration.${piece}`;+}++/**+ * One step a third-party integration offers. Separate from `CatalogAction` on+ * purpose: an action is something Carbon does to its own data, and nothing on the+ * action path should have to ask whether it is really a vendor call.+ */+export interface CatalogIntegration {+ id: string;+ inputs: Record<string, CatalogInput>;+ /** Inputs hidden from the ordinary form and shown only under Advanced. Separate+ * from `inputs` so nothing validating required fields can demand one. */+ advancedInputs?: Record<string, CatalogInput>;+ outputs: Record<string, ValueType>;+ /** Always false: the engine runs an integration step once (`execute.ts` batches+ * actions only), so a list wired into a single-value input is a type error. */+ batchable: false;+ permission: RequiredPermission;+ piece: { name: string; action: string };+}+export interface CatalogOperation {id: string;entity: string;@@ -103,6 +177,7 @@ export interface CatalogEntity {export interface WorkflowCatalog {getEvent(id: string): CatalogEvent | undefined;getAction(id: string): CatalogAction | undefined;+ getIntegration(id: string): CatalogIntegration | undefined;getOperation(id: string): CatalogOperation | undefined;getEntity(name: string): CatalogEntity | undefined;/** Allowed values for an entity's column, or undefined when it is not an enum. */@@ -121,6 +196,13 @@ export function walkPath(): ValueType | undefined {let current = type;for (const segment of path) {+ // A record carries its own fields, so it needs no catalog lookup.+ if (current.kind === "record") {+ const next = current.fields[segment];+ if (next === undefined) return undefined;+ current = next;+ continue;+ }if (current.kind !== "entity") return undefined;const entity = catalog.getEntity(current.of);if (entity === undefined) return undefined;@@ -305,6 +387,9 @@ export function createFixtureCatalog(return {getEvent: (id) => events.get(id),getAction: (id) => actions.get(id),+ // The fixtures carry no integration steps: they exercise the definition model,+ // and a vendor's form adds nothing to that.+ getIntegration: () => undefined,getOperation: (id) => operations.get(id),getEntity: (name) => entities.get(name),getEnum: options.omitEnumsdiff --git a/packages/ee/src/workflows/definition/data-node.test.ts b/packages/ee/src/workflows/definition/data-node.test.tsnew file mode 100644index 0000000000..0e5df9a19d--- /dev/null+++ b/packages/ee/src/workflows/definition/data-node.test.ts@@ -0,0 +1,441 @@+// SPDX-License-Identifier: LicenseRef-Carbon-Commercial+// Carbon Enterprise file, licensed only under the Carbon Commercial License+// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.++import { describe, expect, it } from "vitest";+import { createFixtureCatalog } from "./catalog";+import {+ cardsOf,+ foldOperationTypes,+ operationsFor,+ truncateStarvedCards+} from "./data-operations";+import {+ checkNodeConfig,+ checkNodeTypes,+ getNodeLoopList,+ getNodeOutputs+} from "./nodes";+import type { FilterNode, WorkflowDefinition } from "./schema";+import { t, type ValueType } from "./types";+import { createContext } from "./variables";++const EVENT: ValueType = {+ kind: "record",+ fields: {+ summary: t.string,+ attendees: t.list(t.string as never),+ organizer: { kind: "record", fields: { email: t.string } }+ }+};++/** A trigger whose output is the list under test, then the data node reading it. */+function build(+ data: Partial<FilterNode["data"]>,+ sourceType: ValueType = t.list(EVENT as never)+) {+ const node: FilterNode = {+ id: "d1",+ name: "d1",+ type: "filter",+ position: { x: 0, y: 0 },+ data: {+ source: { kind: "ref", nodeId: "t1", output: "items", path: [] },+ combinator: "and",+ clauses: [],+ operation: "filter",+ flatten: false,+ ...data+ }+ };++ const definition = {+ formatVersion: 4,+ nodes: [+ {+ id: "t1",+ name: "t1",+ type: "compute" as const,+ position: { x: 0, y: 0 },+ data: { operation: "job.totalScrap", inputs: {} }+ },+ node+ ],+ edges: [+ {+ id: "e1",+ source: "t1",+ sourceHandle: "out",+ target: "d1",+ targetHandle: "in"+ }+ ]+ } as unknown as WorkflowDefinition;++ // The compute fixture returns a number, so stub the context's type resolution to+ // hand the data node whatever source type this case is about.+ const { context } = createContext(definition, createFixtureCatalog());+ const ctx = {+ ...context,+ typeOf: () => sourceType,+ resolveValue: () => ({ type: sourceType })+ };+ return { node, ctx };+}++function resultOf(+ data: Partial<FilterNode["data"]>,+ sourceType?: ValueType+): ValueType | undefined {+ const { node, ctx } = build(data, sourceType);+ return getNodeOutputs(node, ctx as never)?.result;+}++describe("data node outputs", () => {+ it("filter keeps the source list type", () => {+ expect(resultOf({ operation: "filter" })).toEqual(t.list(EVENT as never));+ });++ it("count is a number", () => {+ expect(resultOf({ operation: "count" })).toEqual(t.number);+ });++ it("first and last are the element type", () => {+ expect(resultOf({ operation: "first" })).toEqual(EVENT);+ expect(resultOf({ operation: "last" })).toEqual(EVENT);+ });++ it("pluck of a scalar field is a list of that field's type", () => {+ expect(resultOf({ operation: "pluck", field: "summary" })).toEqual(+ t.list(t.string as never)+ );+ });++ it("pluck through a dotted path reads the nested field's type", () => {+ expect(resultOf({ operation: "pluck", field: "organizer.email" })).toEqual(+ t.list(t.string as never)+ );+ });++ // `list<list<T>>` is unrepresentable, so without flattening there is no type to+ // return — which reads as "not configured" rather than a lie.+ it("pluck of a list field needs flatten, and yields one flat list", () => {+ expect(+ resultOf({ operation: "pluck", field: "attendees", flatten: false })+ ).toBeUndefined();+ expect(+ resultOf({ operation: "pluck", field: "attendees", flatten: true })+ ).toEqual(t.list(t.string as never));+ });++ it("pluck of a field the items do not have has no type", () => {+ expect(resultOf({ operation: "pluck", field: "nope" })).toBeUndefined();+ });++ it("join is text, but only over a list of simple values", () => {+ expect(resultOf({ operation: "join" }, t.list(t.string as never))).toEqual(+ t.string+ );+ expect(resultOf({ operation: "join" })).toBeUndefined();+ });++ it("has no output when the source is not a list", () => {+ expect(resultOf({ operation: "count" }, t.string)).toBeUndefined();+ });+});++// The builder holds RAW node objects that never went through zod, so its default+// does not apply there. A node dropped on the canvas — or saved before this field+// existed — has no `operation` key at all, and reading it unguarded produced no+// outputs, so the output handle showed nothing.+describe("a node with no stored operation", () => {+ const bare = (extra: Record<string, unknown> = {}) => {+ const { node, ctx } = build({});+ const stripped = {+ ...node,+ data: { ...node.data, ...extra }+ } as typeof node;+ delete (stripped.data as { operation?: unknown }).operation;+ return { node: stripped, ctx };+ };++ it("still reports its output", () => {+ const { node, ctx } = bare();+ expect(getNodeOutputs(node, ctx as never)?.result).toEqual(+ t.list(EVENT as never)+ );+ });++ it("still exposes the loop item, as filtering always did", () => {+ const { node, ctx } = bare();+ expect(getNodeLoopList(node, ctx as never)).toEqual({+ type: t.list(EVENT as never)+ });+ });++ it("still validates its clauses", () => {+ const { node, ctx } = bare({+ clauses: [+ {+ left: { kind: "item" as const, path: ["summary"] },+ operator: "eq" as const,+ right: undefined+ }+ ]+ });+ expect(checkNodeConfig(node, ctx as never).length).toBeGreaterThan(0);+ });+});++describe("data node loop item", () => {+ // Only filtering walks item by item, which is what keeps `ItemRef` meaning one+ // thing — a `count` node exposing "the current item" would be nonsense.+ it("is exposed by filter and by nothing else", () => {+ const { node, ctx } = build({ operation: "filter" });+ expect(getNodeLoopList(node, ctx as never)).toEqual({+ type: t.list(EVENT as never)+ });++ for (const operation of [+ "count",+ "first",+ "last",+ "pluck",+ "join"+ ] as const) {+ const other = build({ operation, field: "summary" });+ expect(+ getNodeLoopList(other.node, other.ctx as never),+ operation+ ).toBeUndefined();+ }+ });+});++describe("data node validation", () => {+ it("reports a source that is not a list", () => {+ const { node, ctx } = build({ operation: "count" }, t.string);+ const issues = checkNodeTypes(node, ctx as never);+ expect(issues[0]?.code).toBe("TYPE_MISMATCH");+ expect(issues[0]?.field).toBe("source");+ });++ it("reports a pluck field the items do not have", () => {+ const { node, ctx } = build({ operation: "pluck", field: "nope" });+ const issues = checkNodeTypes(node, ctx as never);+ expect(issues[0]?.field).toBe("operations.card-0.field");+ expect(issues[0]?.message).toContain("nope");+ });++ it("explains that a list-valued field must be flattened", () => {+ const { node, ctx } = build({ operation: "pluck", field: "attendees" });+ const issues = checkNodeTypes(node, ctx as never);+ expect(issues[0]?.message).toContain("one combined list");+ });++ it("refuses to join a list of objects", () => {+ const { node, ctx } = build({ operation: "join" });+ const issues = checkNodeTypes(node, ctx as never);+ expect(issues[0]?.field).toBe("operations.card-0.operation");+ });++ it("requires a field for pluck and nothing else", () => {+ const { node, ctx } = build({ operation: "pluck" });+ expect(checkNodeConfig(node, ctx as never)[0]?.field).toBe(+ "operations.card-0.field"+ );++ const counted = build({ operation: "count" });+ expect(checkNodeConfig(counted.node, counted.ctx as never)).toEqual([]);+ });++ // Clauses belong to filtering alone: a stale clause left on a node switched to+ // `count` must not be validated, or the node becomes unpublishable for no reason.+ it("checks clauses only while filtering", () => {+ const stale = [+ {+ left: { kind: "item" as const, path: ["nope"] },+ operator: "eq" as const,+ right: undefined+ }+ ];+ const counting = build({ operation: "count", clauses: stale });+ expect(checkNodeConfig(counting.node, counting.ctx as never)).toEqual([]);++ const filtering = build({ operation: "filter", clauses: stale });+ expect(+ checkNodeConfig(filtering.node, filtering.ctx as never).length+ ).toBeGreaterThan(0);+ });+});++describe("operation chains", () => {+ const cards = (+ ops: Array<+ Partial<+ FilterNode["data"]["operations"] extends (infer C)[] | undefined+ ? C+ : never+ > & { id: string }+ >+ ) =>+ ops.map((op) => ({+ operation: "filter" as const,+ combinator: "and" as const,+ clauses: [],+ flatten: false,+ ...op+ }));++ it("synthesizes one card from the flat fields", () => {+ const { node } = build({ operation: "pluck", field: "summary" });+ expect(cardsOf(node)).toEqual([+ {+ id: "card-0",+ operation: "pluck",+ combinator: "and",+ clauses: [],+ field: "summary",+ flatten: false+ }+ ]);+ });++ it("types every seam of a filter → pluck → count chain", () => {+ const chain = cards([+ { id: "c1" },+ { id: "c2", operation: "pluck", field: "organizer.email" },+ { id: "c3", operation: "count" }+ ]);+ const types = foldOperationTypes(+ t.list(EVENT as never),+ chain,+ createFixtureCatalog()+ );+ expect(types).toEqual([+ t.list(EVENT as never),+ t.list(EVENT as never),+ t.list(t.string as never),+ { kind: "primitive", of: "number" }+ ]);+ // ...and the node's output is the LAST seam.+ const { node, ctx } = build({ operations: chain });+ expect(getNodeOutputs(node, ctx)?.result).toEqual({+ kind: "primitive",+ of: "number"+ });+ });++ it("suppresses everything after an unconfigured card", () => {+ const chain = cards([+ { id: "c1", operation: "pluck" }, // no field chosen yet+ { id: "c2", operation: "count" }+ ]);+ const types = foldOperationTypes(+ t.list(EVENT as never),+ chain,+ createFixtureCatalog()+ );+ expect(types[1]).toBeUndefined();+ expect(types[2]).toBeUndefined();+ const { node, ctx } = build({ operations: chain });+ expect(getNodeOutputs(node, ctx)).toBeUndefined();+ });++ it("offers only the operations the incoming type supports", () => {+ // Records have fields to pluck — but no reading as text, so no join.+ expect(operationsFor(t.list(EVENT as never))).toEqual([+ "filter",+ "count",+ "first",+ "last",+ "pluck"+ ]);+ // A Carbon record reads as its display name, so entities CAN be joined.+ expect(operationsFor(t.list(t.entity("job") as never))).toContain("join");+ // Plain strings have no fields to pluck.+ expect(operationsFor(t.list(t.string as never))).not.toContain("pluck");+ // A bare number or string is not a list: nothing can follow.+ expect(operationsFor({ kind: "primitive", of: "number" })).toEqual([]);+ expect(operationsFor({ kind: "primitive", of: "string" })).toEqual([]);+ // Still configuring: offer everything.+ expect(operationsFor(undefined)).toHaveLength(6);+ });++ it("types the loop item by the card it lives in, not the node source", () => {+ const chain = cards([+ { id: "c1", operation: "pluck", field: "organizer.email" },+ { id: "c2" } // a filter over the plucked strings+ ]);+ const { node, ctx } = build({ operations: chain });+ // Card 2's item is a plucked string...+ expect(getNodeLoopList(node, ctx, "c2")).toEqual({+ type: t.list(t.string as never)+ });+ // ...card 1 does not loop at all (pluck walks nothing item by item)...+ expect(getNodeLoopList(node, ctx, "c1")).toBeUndefined();+ // ...and no card id means the FIRST card, exactly as an old ref does.+ expect(getNodeLoopList(node, ctx)).toBeUndefined();+ });++ it("flags the card an incompatible stored operation sits on", () => {+ // The dropdown could not build this — count feeds pluck a bare number —+ // but a stored definition is not trusted.+ const chain = cards([+ { id: "c1", operation: "count" },+ { id: "c2", operation: "pluck", field: "summary" }+ ]);+ const { node, ctx } = build({ operations: chain });+ const issues = checkNodeTypes(node, ctx as never);+ expect(issues).toHaveLength(1);+ expect(issues[0]?.field).toBe("operations.c2.operation");+ expect(issues[0]?.message).toContain("Nothing can follow");+ });++ it("keeps a rippled-broken card and flags it red (delete ripple)", () => {+ // As if a pluck card between these two was deleted: the join now receives+ // the raw records, which have no reading as text.+ const chain = cards([{ id: "c1" }, { id: "c3", operation: "join" }]);+ const { node, ctx } = build({ operations: chain });+ const issues = checkNodeTypes(node, ctx as never);+ expect(issues).toHaveLength(1);+ expect(issues[0]?.field).toBe("operations.c3.operation");+ expect(issues[0]?.message).toContain("cannot be joined");+ });++ it("drops the tail after a terminal card, types known or not", () => {+ // As the form does when a middle card switches to `count`: the cards below+ // would receive a bare value no operation consumes — a STRUCTURAL fact, so+ // it holds even while the source or a pluck field is still unconfigured.+ const chain = cards([+ { id: "c1", operation: "pluck" }, // no field yet — types unknown+ { id: "c2", operation: "count" },+ { id: "c3" },+ { id: "c4", operation: "join" }+ ]);+ expect(truncateStarvedCards(chain)).toEqual(chain.slice(0, 2));+ // A list-preserving chain is never cut.+ const open = cards([{ id: "c1" }, { id: "c2", operation: "pluck" }]);+ expect(truncateStarvedCards(open)).toEqual(open);+ });++ it("flags any card that follows a terminal one, even with no types", () => {+ // The user's own repro: no source picked, count mid-chain, dead cards below.+ const { node, ctx } = build(+ {+ operations: cards([{ id: "c1", operation: "count" }, { id: "c2" }])+ },+ t.list(EVENT as never)+ );+ const issues = checkNodeTypes(node, ctx as never);+ expect(issues[0]?.field).toBe("operations.c2.operation");+ expect(issues[0]?.message).toContain("Nothing can follow");+ });++ it("resolves an old ref with no card against the first card", () => {+ const { node, ctx } = build({ operations: cards([{ id: "c1" }]) });+ expect(getNodeLoopList(node, ctx)).toEqual({+ type: t.list(EVENT as never)+ });+ });+});diff --git a/packages/ee/src/workflows/definition/data-node.ts b/packages/ee/src/workflows/definition/data-node.tsnew file mode 100644index 0000000000..c38f366170--- /dev/null+++ b/packages/ee/src/workflows/definition/data-node.ts@@ -0,0 +1,290 @@+// SPDX-License-Identifier: LicenseRef-Carbon-Commercial+// Carbon Enterprise file, licensed only under the Carbon Commercial License+// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.++import {+ type CardRefusal,+ cardResultType,+ cardsOf,+ DATA_OPERATIONS,+ foldOperationTypes,+ operationOf as sharedOperationOf+} from "./data-operations";+import type { WorkflowIssue } from "./issues";+import {+ checkClauses,+ clauseConfigIssues,+ clauseValues,+ incomplete,+ type LoopList,+ type NodeContext,+ type NodeKind,+ type NodeOutputs+} from "./nodes";+import {+ DEFAULT_HANDLE,+ DEFAULT_OUTPUT,+ type FilterNode,+ type OperationCard+} from "./schema";+import {+ describeType,+ type ItemRef,+ type ValueOrRef,+ type ValueType+} from "./types";++/**+ * The data node — filtering, counting, picking and projecting over a list.+ *+ * Its stored `type` is still `"filter"`: widening the node that already owned+ * `loopList` and `ItemRef` was the whole point, so a saved workflow needs no+ * migration and there is only ever ONE thing "the current item" can mean.+ *+ * Lives beside `nodes.ts` rather than inside it because six operations across four+ * hooks is more than a kind block should be, and `runtime/` already splits one file+ * per node kind.+ */++function chainTypes(+ node: FilterNode,+ ctx: NodeContext+): (ValueType | undefined)[] {+ const source =+ node.data.source === undefined+ ? undefined+ : ctx.typeOf(node.data.source, node.id);+ return foldOperationTypes(source, cardsOf(node), ctx.catalog);+}++/** Only `filter` walks its list item by item, so only a filter card exposes a+ * loop item — typed by what flows into THAT card, not by the node's source. */+function dataLoopList(+ node: FilterNode,+ ctx: NodeContext,+ card?: string+): LoopList | undefined {+ const cards = cardsOf(node);+ const index = card === undefined ? 0 : cards.findIndex((c) => c.id === card);+ if (index < 0) return undefined;+ if (+ !DATA_OPERATIONS[sharedOperationOf(cards[index]?.operation)].usesClauses+ ) {+ return undefined;+ }+ const input = chainTypes(node, ctx)[index];+ if (input !== undefined && input.kind === "list") return { type: input };+ return { failure: "unconfigured" };+}++function dataOutputs(+ node: FilterNode,+ ctx: NodeContext+): NodeOutputs | undefined {+ const types = chainTypes(node, ctx);+ const type = types[types.length - 1];+ return type === undefined ? undefined : { [DEFAULT_OUTPUT]: type };+}++/** A refusal worded for the author, on the card field it is about. A missing+ * field is not a type problem — `checkConfig` asks for it. */+function refusalIssue(+ refusal: CardRefusal,+ card: OperationCard,+ input: ValueType+): { field: string; message: string } | undefined {+ const at = (field: string) => `operations.${card.id}.${field}`;+ switch (refusal) {+ case "not-a-list":+ return {+ field: at("operation"),+ message: `This operation works through a list, but what reaches it is ${describeType(input)}.`+ };+ case "no-fields":+ return {+ field: at("operation"),+ message: `${describeType(input)} has no fields to take — its items are single values.`+ };+ case "no-field-chosen":+ return undefined;+ case "unknown-field":+ return {+ field: at("field"),+ message: `The items in that list have no "${card.field}".`+ };+ case "nested-list":+ return {+ field: at("field"),+ message: `"${card.field}" is itself a list, so it can only be taken as one combined list.`+ };+ case "not-text":+ return {+ field: at("operation"),+ message: `The items in ${describeType(input)} have no reading as text, so they cannot be joined.`+ };+ }+}++/** The item refs a value holds, a template's parts and a row's values included. */+function itemRefsIn(value: ValueOrRef): ItemRef[] {+ switch (value.kind) {+ case "item":+ return [value];+ case "template":+ return value.parts.flatMap((part) =>+ part.kind === "item" ? [part] : []+ );+ case "pairs":+ return value.entries.flatMap((entry) => itemRefsIn(entry.value));+ default:+ return [];+ }+}++/**+ * Item refs inside one card's clauses that name ANOTHER looping card. The runtime+ * hands each card its own item whatever the ref says, so such a ref is typed+ * against one list and run against another. A ref with no `card` means the first+ * card. A ref naming no card at all, or a card that does not loop, is left to the+ * reference layer, which already reports it as ITEM_OUTSIDE_LOOP.+ */+function foreignItemRefIssues(+ node: FilterNode,+ cards: OperationCard[],+ card: OperationCard+): WorkflowIssue[] {+ const prefix = `operations.${card.id}.clauses`;+ return clauseValues(card.clauses, prefix).flatMap(({ value, field }) =>+ itemRefsIn(value).flatMap((ref) => {+ const owner = cards.find((c) => c.id === (ref.card ?? cards[0]?.id));+ if (+ owner === undefined ||+ owner.id === card.id ||+ !DATA_OPERATIONS[owner.operation].usesClauses+ ) {+ return [];+ }+ return [+ {+ code: "ITEM_OUTSIDE_LOOP" as const,+ nodeId: node.id,+ field,+ message:+ "This refers to the current item of another step in this chain. Pick it again from this step."+ }+ ];+ })+ );+}++export const dataNodeKind: NodeKind<FilterNode> = {+ handles: () => [DEFAULT_HANDLE],+ values: (node) => [+ ...(node.data.source === undefined+ ? []+ : [{ value: node.data.source, field: "source" }]),+ // Clauses only exist for filtering; another operation never stores one.+ // Field paths carry the card id, so an issue lands on the card it names.+ ...cardsOf(node).flatMap((card) =>+ DATA_OPERATIONS[card.operation].usesClauses+ ? clauseValues(card.clauses, `operations.${card.id}.clauses`)+ : []+ )+ ],+ outputs: dataOutputs,+ loopList: dataLoopList,+ // A data node has no catalog entry to be missing.+ configured: () => true,+ checkTypes: (node, ctx) => {+ if (node.data.source === undefined) return [];+ const source = ctx.typeOf(node.data.source, node.id);+ if (source === undefined) return [];++ if (source.kind !== "list") {+ return [+ {+ code: "TYPE_MISMATCH",+ nodeId: node.id,+ field: "source",+ message: `This step works through a list, but this is ${describeType(source)}.`+ }+ ];+ }++ const cards = cardsOf(node);+ const types = foldOperationTypes(source, cards, ctx.catalog);+ const issues: WorkflowIssue[] = [];++ cards.forEach((card, index) => {+ const input = types[index];+ const at = (field: string) => `operations.${card.id}.${field}`;++ // Structural, before any typing: a terminal operation hands no list onward,+ // so a card following one is dead however the types resolve. The builder+ // truncates these on edit; a stored definition still has to be told.+ const previous = cards[index - 1];+ if (+ previous !== undefined &&+ !DATA_OPERATIONS[previous.operation].keepsList+ ) {+ issues.push({+ code: "TYPE_MISMATCH",+ nodeId: node.id,+ field: at("operation"),+ message: `Nothing can follow "${DATA_OPERATIONS[previous.operation].label}" — it does not hand a list onward.`+ });+ return;+ }++ // An earlier card is unconfigured or already wrong; it reported the cause,+ // and everything after it can only echo it.+ if (input === undefined) return;++ // The dropdown only offers what the incoming type supports, but a stored+ // definition is not trusted — a card deleted above this one, or a hand-+ // written definition, can leave an operation nothing feeds correctly.+ const result = cardResultType(card, input, ctx.catalog);+ if ("refusal" in result) {+ const issue = refusalIssue(result.refusal, card, input);+ if (issue !== undefined) {+ issues.push({ code: "TYPE_MISMATCH", nodeId: node.id, ...issue });+ }+ return;+ }++ if (DATA_OPERATIONS[card.operation].usesClauses) {+ // Item refs inside these clauses carry the card id, so `checkClauses`'+ // ordinary context types "the current item" against the card the ref+ // names — which must be THIS card.+ issues.push(...foreignItemRefIssues(node, cards, card));+ issues.push(...checkClauses(node, card.clauses, at("clauses"), ctx));+ }+ });++ return issues;+ },+ checkConfig: (node) => {+ if (node.data.source === undefined) {+ return [incomplete(node, "source", "Choose the list to work through.")];+ }+ return cardsOf(node).flatMap((card) => {+ const spec = DATA_OPERATIONS[card.operation];+ if (spec.usesField && (card.field ?? "").trim() === "") {+ return [+ incomplete(+ node,+ `operations.${card.id}.field`,+ "Choose which field to take."+ )+ ];+ }+ return spec.usesClauses+ ? clauseConfigIssues(+ node,+ card.clauses,+ `operations.${card.id}.clauses`+ )+ : [];+ });+ }+};diff --git a/packages/ee/src/workflows/definition/data-operations.ts b/packages/ee/src/workflows/definition/data-operations.tsnew file mode 100644index 0000000000..923a8ba5db--- /dev/null+++ b/packages/ee/src/workflows/definition/data-operations.ts@@ -0,0 +1,254 @@+// SPDX-License-Identifier: LicenseRef-Carbon-Commercial+// Carbon Enterprise file, licensed only under the Carbon Commercial License+// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.++import { z } from "zod";+import type { WorkflowCatalog } from "./catalog";+import { walkPath } from "./catalog";+import type { FilterNode, OperationCard } from "./schema";+import { rendersAsText, type ScalarType, type ValueType } from "./types";++/**+ * What the data node can do to a value.+ *+ * The single list. The zod enum below derives from it, the node kind reads+ * `resultType` for its outputs and checks, the executor reads `run`, and the+ * builder maps over it for the operation dropdown — so adding an operation is one+ * entry here rather than four edits that can silently disagree.+ *+ * Declared apart from `nodes.ts` because the schema needs the enum and `nodes.ts`+ * imports the schema; putting the list there would be a cycle.+ */+export interface DataOperationSpec {+ /** Shown in the builder's operation picker. */+ label: string;+ /** Whether clause rows apply — only filtering compares each item, and so only+ * filtering exposes a loop item, which is what keeps `ItemRef` ("the current+ * item") meaning exactly one thing. */+ usesClauses: boolean;+ /** Whether the operation projects a named field off each item. */+ usesField: boolean;+ /** Whether the result is still a list another operation could consume. False+ * marks a TERMINAL operation — count, first, last, join — whose output is a+ * bare value regardless of what flows in, so nothing may ever follow it. */+ keepsList: boolean;+}++export const DATA_OPERATIONS = {+ filter: {+ label: "Keep matching items",+ usesClauses: true,+ usesField: false,+ keepsList: true+ },+ count: {+ label: "Count items",+ usesClauses: false,+ usesField: false,+ keepsList: false+ },+ first: {+ label: "Take the first item",+ usesClauses: false,+ usesField: false,+ keepsList: false+ },+ last: {+ label: "Take the last item",+ usesClauses: false,+ usesField: false,+ keepsList: false+ },+ pluck: {+ label: "Take one field from every item",+ usesClauses: false,+ usesField: true,+ keepsList: true+ },+ join: {+ label: "Join into text",+ usesClauses: false,+ usesField: false,+ keepsList: false+ }+} as const satisfies Record<string, DataOperationSpec>;++export type DataOperation = keyof typeof DATA_OPERATIONS;++export const DATA_OPERATION_NAMES = Object.keys(DATA_OPERATIONS) as [+ DataOperation,+ ...DataOperation[]+];++export const dataOperationSchema = z.enum(DATA_OPERATION_NAMES);++/** Which operations can consume this type. Everything needs a list; what each+ * needs of the list's items is `itemRefusal`. An undefined input (the author is+ * still configuring) offers everything. */+export function operationsFor(input: ValueType | undefined): DataOperation[] {+ if (input === undefined) return [...DATA_OPERATION_NAMES];+ if (input.kind !== "list") return [];+ return DATA_OPERATION_NAMES.filter(+ (name) => itemRefusal(name, input.of) === undefined+ );+}++/**+ * The operation a node runs, defaulting the way the schema does.+ *+ * The zod default only applies to a definition that was PARSED. The builder holds+ * raw node objects in memory — a node just dropped on the canvas, or one loaded+ * before this field existed — so the key can genuinely be absent, and reading it+ * unguarded made `DATA_OPERATIONS[undefined]` and produced no outputs at all.+ *+ * That is the only case the fallback serves. A PARSED definition never reaches it+ * with an unknown name: `dataOperationSchema` is a strict enum, so a stored name+ * that is no longer an operation fails the parse instead. An own-key check, so a+ * raw value like `"constructor"` does not read as an operation.+ */+export function operationOf(stored: string | undefined): DataOperation {+ return stored !== undefined && Object.hasOwn(DATA_OPERATIONS, stored)+ ? (stored as DataOperation)+ : "filter";+}++/**+ * The chain, normalized. The ONE read path for a data node's operations:+ * `operations` when stored, else one card synthesized from the flat fields —+ * with the STABLE id "card-0", which old item refs (no `card`) also mean.+ */+export function cardsOf(node: FilterNode): OperationCard[] {+ const stored = node.data.operations;+ if (stored !== undefined && stored.length > 0) return stored;+ return [+ {+ id: "card-0",+ operation: operationOf(node.data.operation),+ combinator: node.data.combinator ?? "and",+ clauses: node.data.clauses ?? [],+ field: node.data.field,+ flatten: node.data.flatten ?? false+ }+ ];+}++/**+ * Why a card cannot run against what reaches it. The validator words each one as+ * an issue, the runtime as a skip reason, and the builder's dropdown hides an+ * operation the items refuse — all off this one rule, so they cannot disagree.+ */+export type CardRefusal =+ /** What reaches the card is not a list. */+ | "not-a-list"+ /** A pluck over single values: there are no fields to take. */+ | "no-fields"+ /** A pluck with no field chosen yet. */+ | "no-field-chosen"+ /** A pluck of a field the item type does not have. */+ | "unknown-field"+ /** A pluck of a field that is itself a list, without flattening:+ * `list<list<T>>` has no representation. */+ | "nested-list"+ /** A join over items with no reading as text. */+ | "not-text";++export type CardResult = { type: ValueType } | { refusal: CardRefusal };++/** What an operation needs of the items it is handed, whatever the card says. */+function itemRefusal(+ operation: DataOperation,+ of: ScalarType+): CardRefusal | undefined {+ // Only an object or a record has fields to take. A list of plain values has+ // nothing to project, and letting it through produced a list of nulls.+ if (operation === "pluck" && of.kind !== "record" && of.kind !== "entity") {+ return "no-fields";+ }+ // Anything with a reading in a sentence can be joined — that is exactly what+ // `rendersAsText` decides, and it is what the template renderer already uses.+ // Requiring a primitive refused a list of Carbon records, each of which reads+ // perfectly well as its display name. An OBJECT still has no such reading.+ if (operation === "join" && !rendersAsText(of)) return "not-text";+ return undefined;+}++/**+ * The type one card hands onward, or why it cannot run on `input`. The ONE copy+ * of every per-operation rule: the type fold, the validator and the runtime all+ * call it.+ */+export function cardResultType(+ card: OperationCard,+ input: ValueType,+ catalog: WorkflowCatalog+): CardResult {+ if (input.kind !== "list") return { refusal: "not-a-list" };+ const operation = operationOf(card.operation);+ const refusal = itemRefusal(operation, input.of);+ if (refusal !== undefined) return { refusal };++ switch (operation) {+ case "filter":+ return { type: input };+ case "count":+ return { type: { kind: "primitive", of: "number" } };+ case "first":+ case "last":+ return { type: input.of };+ case "pluck": {+ const field = card.field;+ if (field === undefined || field.trim() === "") {+ return { refusal: "no-field-chosen" };+ }+ const picked = walkPath(input.of, field.split("."), catalog);+ if (picked === undefined) return { refusal: "unknown-field" };+ // A field that is itself a list can only be projected FLAT.+ if (picked.kind === "list") {+ return card.flatten ? { type: picked } : { refusal: "nested-list" };+ }+ return { type: { kind: "list", of: picked } };+ }+ case "join":+ return { type: { kind: "primitive", of: "string" } };+ }+}++/**+ * The chain's types, folded card by card: `types[i]` is what flows INTO card i,+ * and `types[cards.length]` is the node's output. `undefined` means+ * unconfigured/unsupported at that point, suppressing downstream errors.+ *+ * Pure over an already-resolved source so the browser form can call it without+ * a NodeContext; `chainTypes` is the ctx-bound wrapper.+ */+export function foldOperationTypes(+ source: ValueType | undefined,+ cards: OperationCard[],+ catalog: WorkflowCatalog+): (ValueType | undefined)[] {+ const types: (ValueType | undefined)[] = [source];+ let current = source;+ for (const card of cards) {+ if (current !== undefined) {+ const result = cardResultType(card, current, catalog);+ current = "type" in result ? result.type : undefined;+ }+ types.push(current);+ }+ return types;+}++/**+ * The chain up to and including its first terminal card. A terminal operation's+ * output can feed nothing WHATEVER the types turn out to be — the fact lives on+ * the operation itself (`keepsList`), so this needs no type information and+ * works on a chain whose source or fields are still unconfigured. An author+ * switching a middle card to `count` must not be left with a tail of dead+ * cards that no operation could ever revive.+ */+export function truncateStarvedCards(cards: OperationCard[]): OperationCard[] {+ const terminal = cards.findIndex(+ (card) => !DATA_OPERATIONS[card.operation].keepsList+ );+ return terminal === -1 ? cards : cards.slice(0, terminal + 1);+}diff --git a/packages/ee/src/workflows/definition/links.ts b/packages/ee/src/workflows/definition/links.tsnew file mode 100644index 0000000000..d3e167e618--- /dev/null+++ b/packages/ee/src/workflows/definition/links.ts@@ -0,0 +1,53 @@+// SPDX-License-Identifier: LicenseRef-Carbon-Commercial+// Carbon Enterprise file, licensed only under the Carbon Commercial License+// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.++import type { CatalogInput, LinkFormat } from "./catalog";+import type { ValueOrRef } from "./types";++/** Whether records in one step input will render as links, and in what dialect.+ * `gated` means they would, if the named sibling held one of `equals`. */+export type LinkState =+ | { kind: "linked"; format: LinkFormat }+ | { kind: "gated"; gate: { input: string; equals: readonly string[] } }+ | { kind: "off" };++/** The value the run will send for a sibling input: the node's stored literal, else+ * the declaration's default (which carries the allowlist pins). A variable-valued+ * sibling yields undefined — links stay OFF rather than guessed. */+function effectiveLiteral(+ inputs: Record<string, ValueOrRef>,+ declared: Record<string, CatalogInput>,+ name: string+): string | number | boolean | undefined {+ const stored = inputs[name];+ if (stored?.kind === "literal" && !Array.isArray(stored.value)) {+ return stored.value as string | number | boolean;+ }+ if (stored !== undefined) return undefined;+ const fallback = declared[name]?.defaultValue;+ return typeof fallback === "object" ? undefined : fallback;+}++/**+ * The one verdict on whether `name` linkifies, read by BOTH the executors+ * (`resolveStepInputs`) and the builder's hints (`notices.ts`) — the hint and the+ * run agree because they cannot ask separately. `inputs` are the node's stored+ * values; `declared` is every input the step declares (an integration's `inputs`+ * and `advancedInputs` merged).+ */+export function linkState(+ inputs: Record<string, ValueOrRef>,+ declared: Record<string, CatalogInput>,+ name: string+): LinkState {+ const links = declared[name]?.links;+ if (links === undefined) return { kind: "off" };+ const gate = links.when;+ if (gate === undefined) return { kind: "linked", format: links.format };+ const held = effectiveLiteral(inputs, declared, gate.input);+ if (gate.equals.includes(String(held ?? ""))) {+ return { kind: "linked", format: links.format };+ }+ return { kind: "gated", gate };+}diff --git a/packages/ee/src/workflows/definition/nodes.ts b/packages/ee/src/workflows/definition/nodes.tsindex 46371b8c98..0b0a7f463f 100644--- a/packages/ee/src/workflows/definition/nodes.ts+++ b/packages/ee/src/workflows/definition/nodes.ts@@ -2,8 +2,13 @@// Carbon Enterprise file, licensed only under the Carbon Commercial License// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.-import { type BatchPlan, batchPlan } from "./batch";-import type { CatalogInput, WorkflowCatalog } from "./catalog";+import { type BatchableStep, type BatchPlan, batchPlan } from "./batch";+import {+ type CatalogInput,+ integrationStepId,+ type WorkflowCatalog+} from "./catalog";+import { dataNodeKind } from "./data-node";import type { WorkflowIssue } from "./issues";import {type ActionNode,@@ -11,7 +16,7 @@ import {DEFAULT_HANDLE,DEFAULT_OUTPUT,FAILURE_HANDLE,- type FilterNode,+ type IntegrationNode,SUCCESS_HANDLE,type WorkflowNode,type WorkflowNodeType@@ -70,25 +75,28 @@ export interface NodeContext {resolveValue(value: ValueOrRef, atNodeId: string): ResolvedRef;typeOf(value: ValueOrRef, atNodeId: string): ValueType | undefined;outputsOf(nodeId: string): NodeOutputs | undefined;- loopListOf(nodeId: string): LoopList | undefined;+ /** `card` scopes the answer to one operation card of a data-node chain;+ * every other kind ignores it. */+ loopListOf(nodeId: string, card?: string): LoopList | undefined;}/** Everything one kind of node declares about itself. */-interface NodeKind<N extends WorkflowNode> {+export interface NodeKind<N extends WorkflowNode> {/** Outgoing connection points, by name. */handles(node: N): string[];values(node: N): ValueSite[];/** What it hands onward; `undefined` when its catalog entry is missing. */outputs(node: N, ctx: NodeContext): NodeOutputs | undefined;- /** The one list this node works through, or undefined when it does not loop. */- loopList(node: N, ctx: NodeContext): LoopList | undefined;+ /** The one list this node works through, or undefined when it does not loop.+ * `card` names an operation card of a data-node chain; other kinds ignore it. */+ loopList(node: N, ctx: NodeContext, card?: string): LoopList | undefined;/** Is its catalog entry resolvable? Type checking is skipped when not. */configured(node: N, ctx: NodeContext): boolean;checkTypes(node: N, ctx: NodeContext): WorkflowIssue[];checkConfig(node: N, ctx: NodeContext): WorkflowIssue[];}-function clauseValues(clauses: Clause[], prefix: string): ValueSite[] {+export function clauseValues(clauses: Clause[], prefix: string): ValueSite[] {return clauses.flatMap((clause, index) => [{ value: clause.left, field: `${prefix}.${index}.left` },...(clause.right === undefined@@ -98,7 +106,7 @@ function clauseValues(clauses: Clause[], prefix: string): ValueSite[] {}/** A draft may save a clause with no right-hand side; publishing one may not. */-function clauseConfigIssues(+export function clauseConfigIssues(node: WorkflowNode,clauses: Clause[],prefix: string@@ -120,16 +128,6 @@ function inputValues(inputs: Record<string, ValueOrRef>): ValueSite[] {return Object.entries(inputs).map(([field, value]) => ({ value, field }));}-/** A bad source is reported by the filter's own `checkTypes`/`checkConfig`. */-function filterLoopList(node: FilterNode, ctx: NodeContext): LoopList {- if (node.data.source === undefined) return { failure: "unconfigured" };- const source = ctx.resolveValue(node.data.source, node.id);- if ("type" in source && source.type.kind === "list") {- return { type: source.type };- }- return { failure: "unconfigured" };-}-/** The first operation input wired to a list where the operation expects a single value.* When set, the compute node runs the operation once per list item and returns a list. */function computeBatchInput(@@ -148,33 +146,122 @@ function computeBatchInput(return undefined;}-/** The wiring decides whether an action repeats; nothing is stored. */-function actionBatchPlan(node: ActionNode, ctx: NodeContext): BatchPlan {- const action = ctx.catalog.getAction(node.data.action);- if (action === undefined) return { kind: "none" };- return batchPlan(action, node.data.inputs, (name) => {+/** The catalog entry a step node runs, or undefined when the id names nothing.+ * The wiring decides whether it repeats; nothing is stored. */+function stepDefinition(+ node: ActionNode | IntegrationNode,+ ctx: NodeContext+): BatchableStep | undefined {+ return node.type === "action"+ ? ctx.catalog.getAction(node.data.action)+ : ctx.catalog.getIntegration(+ integrationStepId(node.data.piece, node.data.action)+ );+}++function stepBatchPlan(+ node: ActionNode | IntegrationNode,+ ctx: NodeContext+): BatchPlan {+ const step = stepDefinition(node, ctx);+ if (step === undefined) return { kind: "none" };+ return batchPlan(step, node.data.inputs, (name) => {const supplied = node.data.inputs[name];return supplied === undefined ? undefined : ctx.typeOf(supplied, node.id);});}-function actionLoopList(- node: ActionNode,+function stepLoopList(+ node: ActionNode | IntegrationNode,ctx: NodeContext): LoopList | undefined {// With no catalog entry there is nothing to read the wiring against. `unconfigured`- // is suppressed, so an item ref reports the missing action rather than piling on.- if (ctx.catalog.getAction(node.data.action) === undefined) {+ // is suppressed, so an item ref reports the missing step rather than piling on.+ if (stepDefinition(node, ctx) === undefined) {return { failure: "unconfigured" };}- const plan = actionBatchPlan(node, ctx);+ const plan = stepBatchPlan(node, ctx);if (plan.kind === "none") return undefined;return plan.kind === "repeats"? { type: plan.type }: { failure: "unconfigured" };}-function checkClauses(+/**+ * The action and the integration kinds. Both run one catalog step, so they share+ * every check; only how the step is chosen differs, which `unchosen` reports+ * before the catalog is asked.+ */+function stepNodeKind<N extends ActionNode | IntegrationNode>(+ unchosen: (node: N) => WorkflowIssue[]+): NodeKind<N> {+ return {+ handles: () => [SUCCESS_HANDLE, FAILURE_HANDLE],+ values: (node) => inputValues(node.data.inputs),+ outputs: (node, ctx) => stepDefinition(node, ctx)?.outputs,+ loopList: stepLoopList,+ configured: (node, ctx) => stepDefinition(node, ctx) !== undefined,+ checkTypes: (node, ctx) => {+ const step = stepDefinition(node, ctx);+ if (step === undefined) return [];+ // Ambiguity counts as batching here so two wired lists raise the one issue that+ // explains them, rather than that issue plus a rejection of each list.+ const batching = stepBatchPlan(node, ctx).kind !== "none";+ // Advanced inputs write into the SAME `inputs` bag, so validating only the+ // visible ones let an off-enum choice or a mistyped ref reach the vendor+ // with no issue raised in the builder.+ return checkInputs(+ node,+ node.data.inputs,+ { ...step.inputs, ...step.advancedInputs },+ batching,+ ctx+ );+ },+ checkConfig: (node, ctx) => {+ const missing = unchosen(node);+ if (missing.length > 0) return missing;+ const step = stepDefinition(node, ctx);+ // Same code for both kinds: to the customer an integration step that no+ // longer exists and an action that no longer exists are the same problem.+ if (step === undefined) {+ return [+ {+ code: "UNKNOWN_ACTION",+ nodeId: node.id,+ field: "action",+ message: `"${node.data.action}" is not something we can do any more.`+ }+ ];+ }+ const plan = stepBatchPlan(node, ctx);+ if (plan.kind === "ambiguous") {+ return [+ incomplete(+ node,+ // Blamed on the second list, since the first was already working.+ plan.second,+ `Lists are wired into both "${plan.first}" and "${plan.second}", so this step cannot tell which one to repeat over.`+ )+ ];+ }+ for (const group of step.requireOneOf ?? []) {+ if (group.some((name) => node.data.inputs[name] !== undefined))+ continue;+ return [+ incomplete(+ node,+ group[0] ?? "inputs",+ `This step needs at least one of: ${group.join(", ")}.`+ )+ ];+ }+ return [];+ }+ };+}++export function checkClauses(node: WorkflowNode,clauses: Clause[],prefix: string,@@ -389,7 +476,7 @@ function checkInputs(return issues;}-const incomplete = (+export const incomplete = (node: WorkflowNode,field: string,message: string@@ -645,98 +732,22 @@ export const NODE_KINDS: {}},- filter: {- handles: () => [DEFAULT_HANDLE],- values: (node) => [- ...(node.data.source === undefined- ? []- : [{ value: node.data.source, field: "source" }]),- ...clauseValues(node.data.clauses, "clauses")- ],- outputs: (node, ctx) => {- const list = filterLoopList(node, ctx);- return "type" in list ? { [DEFAULT_OUTPUT]: list.type } : undefined;- },- loopList: filterLoopList,- // A filter has no catalog entry to be missing.- configured: () => true,- checkTypes: (node, ctx) => {- if (node.data.source === undefined) return [];- const source = ctx.typeOf(node.data.source, node.id);- if (source === undefined) return [];- if (source.kind !== "list") {- return [- {- code: "TYPE_MISMATCH",- nodeId: node.id,- field: "source",- message: `A filter works through a list, but this is ${describeType(source)}.`- }- ];- }- return checkClauses(node, node.data.clauses, "clauses", ctx);- },- checkConfig: (node) =>- node.data.source === undefined- ? [incomplete(node, "source", "Choose the list to filter.")]- : clauseConfigIssues(node, node.data.clauses, "clauses")- },+ filter: dataNodeKind,- action: {- handles: () => [SUCCESS_HANDLE, FAILURE_HANDLE],- values: (node) => inputValues(node.data.inputs),- outputs: (node, ctx) => ctx.catalog.getAction(node.data.action)?.outputs,- loopList: actionLoopList,- configured: (node, ctx) =>- ctx.catalog.getAction(node.data.action) !== undefined,- checkTypes: (node, ctx) => {- const action = ctx.catalog.getAction(node.data.action);- if (action === undefined) return [];- // Ambiguity counts as batching here so two wired lists raise the one issue that- // explains them, rather than that issue plus a rejection of each list.- const batching = actionBatchPlan(node, ctx).kind !== "none";- return checkInputs(node, node.data.inputs, action.inputs, batching, ctx);- },- checkConfig: (node, ctx) => {- if (node.data.action.length === 0) {- return [incomplete(node, "action", "Choose what this step should do.")];- }- if (ctx.catalog.getAction(node.data.action) === undefined) {- return [- {- code: "UNKNOWN_ACTION",- nodeId: node.id,- field: "action",- message: `"${node.data.action}" is not something we can do any more.`- }- ];- }- const plan = actionBatchPlan(node, ctx);- if (plan.kind === "ambiguous") {- return [- incomplete(- node,- // Blamed on the second list, since the first was already working.- plan.second,- `Lists are wired into both "${plan.first}" and "${plan.second}", so this step cannot tell which one to repeat over.`- )- ];- }- const action = ctx.catalog.getAction(node.data.action);- for (const group of action?.requireOneOf ?? []) {- if (group.some((name) => node.data.inputs[name] !== undefined))- continue;- return [- incomplete(- node,- group[0] ?? "inputs",- `This step needs at least one of: ${group.join(", ")}.`- )- ];- }- return [];+ action: stepNodeKind<ActionNode>((node) =>+ node.data.action.length === 0+ ? [incomplete(node, "action", "Choose what this step should do.")]+ : []+ ),+ integration: stepNodeKind<IntegrationNode>((node) => {+ if (node.data.piece.length === 0) {+ return [incomplete(node, "piece", "Choose an integration.")];}- }+ if (node.data.action.length === 0) {+ return [incomplete(node, "action", "Choose what this step should do.")];+ }+ return [];+ })};// Cast: TypeScript cannot see that `NODE_KINDS[node.type]` and `node` narrow to@@ -758,8 +769,9 @@ export const getNodeOutputs = (export const getNodeLoopList = (node: WorkflowNode,- ctx: NodeContext-): LoopList | undefined => kindOf(node).loopList(node, ctx);+ ctx: NodeContext,+ card?: string+): LoopList | undefined => kindOf(node).loopList(node, ctx, card);export const isNodeConfigured = (node: WorkflowNode,diff --git a/packages/ee/src/workflows/definition/notices.test.ts b/packages/ee/src/workflows/definition/notices.test.tsnew file mode 100644index 0000000000..343c2f4935--- /dev/null+++ b/packages/ee/src/workflows/definition/notices.test.ts@@ -0,0 +1,140 @@+// SPDX-License-Identifier: LicenseRef-Carbon-Commercial+// Carbon Enterprise file, licensed only under the Carbon Commercial License+// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.++import { describe, expect, it } from "vitest";+import type { CatalogIntegration, WorkflowCatalog } from "./catalog";+import { createFixtureCatalog } from "./catalog";+import { fieldNotices } from "./notices";+import { t } from "./types";++const STEP: CatalogIntegration = {+ id: "integration.gmail.send",+ inputs: {+ connectionId: { type: t.string, required: true },+ subject: { type: t.string, required: true },+ text: { type: t.string, required: false, links: { format: "slack" } },+ body: {+ type: t.string,+ required: false,+ links: { format: "html", when: { input: "body_type", equals: ["html"] } }+ }+ },+ advancedInputs: {+ body_type: { type: t.string, required: false, defaultValue: "plain_text" }+ },+ outputs: {},+ batchable: false,+ permission: { module: "workflows", action: "update" },+ piece: { name: "gmail", action: "send" }+};++const catalog: WorkflowCatalog = {+ ...createFixtureCatalog(),+ getIntegration: (id) => (id === STEP.id ? STEP : undefined)+};++const recordTemplate = {+ kind: "template",+ parts: [+ { kind: "text", text: "See " },+ { kind: "ref", nodeId: "trigger", output: "purchaseOrder", path: [] }+ ]+};++const definition = (inputs: Record<string, unknown>, type = "integration") => ({+ nodes: [+ {+ id: "trigger",+ name: "trigger",+ type: "trigger",+ position: { x: 0, y: 0 },+ data: { events: ["purchaseOrder.status.changed"] }+ },+ type === "integration"+ ? {+ id: "step",+ name: "integration_0",+ type: "integration",+ position: { x: 0, y: 0 },+ data: { piece: "gmail", action: "send", inputs }+ }+ : {+ id: "step",+ name: "action_0",+ type: "action",+ position: { x: 0, y: 0 },+ data: { action: "createIssue", inputs }+ }+ ],+ edges: [+ {+ id: "e1",+ source: "trigger",+ sourceHandle: "out",+ target: "step",+ targetHandle: "in"+ }+ ]+});++describe("fieldNotices", () => {+ it("says nothing when no record is in the field", () => {+ expect(+ fieldNotices(+ definition({+ subject: {+ kind: "template",+ parts: [{ kind: "text", text: "plain words" }]+ }+ }),+ catalog+ )+ ).toEqual([]);+ });++ it("flags a record in a field with no link support", () => {+ expect(+ fieldNotices(definition({ subject: recordTemplate }), catalog)+ ).toEqual([+ { code: "LINKS_UNSUPPORTED", nodeId: "step", field: "inputs.subject" }+ ]);+ });++ it("names the fix while the gate sibling holds its default", () => {+ expect(fieldNotices(definition({ body: recordTemplate }), catalog)).toEqual(+ [+ {+ code: "LINKS_CONDITIONAL",+ nodeId: "step",+ field: "inputs.body",+ params: { input: "body_type", equals: "html" }+ }+ ]+ );+ });++ it("says nothing once the gate sibling is set right", () => {+ expect(+ fieldNotices(+ definition({+ body: recordTemplate,+ body_type: { kind: "literal", type: t.string, value: "html" }+ }),+ catalog+ )+ ).toEqual([]);+ });++ it("says nothing for an always-linked field", () => {+ expect(fieldNotices(definition({ text: recordTemplate }), catalog)).toEqual(+ []+ );+ });++ it("ignores non-integration nodes entirely", () => {+ expect(+ fieldNotices(definition({ title: recordTemplate }, "action"), catalog)+ ).toEqual([]);+ });+});diff --git a/packages/ee/src/workflows/definition/notices.ts b/packages/ee/src/workflows/definition/notices.tsnew file mode 100644index 0000000000..b51643387e--- /dev/null+++ b/packages/ee/src/workflows/definition/notices.ts@@ -0,0 +1,105 @@+// SPDX-License-Identifier: LicenseRef-Carbon-Commercial+// Carbon Enterprise file, licensed only under the Carbon Commercial License+// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.++import type { CatalogInput, WorkflowCatalog } from "./catalog";+import { integrationStepId } from "./catalog";+import { linkState } from "./links";+import { workflowDefinitionSchema } from "./schema";+import type { ValueOrRef } from "./types";+import { liveDefinition } from "./validate";+import { createContext } from "./variables";++export type WorkflowNoticeCode = "LINKS_UNSUPPORTED" | "LINKS_CONDITIONAL";++/**+ * Advisory, never blocking — deliberately NOT a `WorkflowIssue`, whose every entry is+ * fatal. The package emits codes and parameters; the app owns the translated copy,+ * which is what keeps prose out of this bundle.+ */+export interface WorkflowNotice {+ code: WorkflowNoticeCode;+ nodeId: string;+ /** `inputs.<name>` — the addressing `issueForField` already resolves. */+ field: string;+ /** LINKS_CONDITIONAL: which sibling input turns links on, and the value that does. */+ params?: { input: string; equals: string };+}++/** A record dropped INTO prose, whatever shape holds it. A plain string variable is+ * not a record; a literal never is. */+function holdsRecord(+ value: ValueOrRef,+ nodeId: string,+ typeOf: (value: ValueOrRef, atNodeId: string) => { kind: string } | undefined+): boolean {+ if (value.kind === "template") {+ return value.parts.some(+ (part) => part.kind !== "text" && typeOf(part, nodeId)?.kind === "entity"+ );+ }+ if (value.kind === "ref" || value.kind === "item") {+ return typeOf(value, nodeId)?.kind === "entity";+ }+ return false;+}++/**+ * Where a record in an integration step's prose will NOT come out as a link: either the+ * destination never renders one (`LINKS_UNSUPPORTED`), or it would if a sibling input+ * held the right value (`LINKS_CONDITIONAL` — the params name that fix). Integration+ * nodes only: Carbon's own inputs either link (Notify) or are machine payloads+ * (webhook), and a hint on the latter is noise.+ */+export function fieldNotices(+ definition: unknown,+ catalog: WorkflowCatalog+): WorkflowNotice[] {+ const parsed = workflowDefinitionSchema.safeParse(definition);+ if (!parsed.success) return [];+ const live = liveDefinition(parsed.data);+ const { context } = createContext(live, catalog);++ const notices: WorkflowNotice[] = [];+ for (const node of live.nodes) {+ if (node.type !== "integration") continue;+ const step = catalog.getIntegration(+ integrationStepId(node.data.piece, node.data.action)+ );+ if (step === undefined) continue;+ const declared: Record<string, CatalogInput> = {+ ...step.inputs,+ ...step.advancedInputs+ };++ for (const [name, value] of Object.entries(node.data.inputs)) {+ const input = declared[name];+ if (input === undefined) continue;+ if (!(input.type.kind === "primitive" && input.type.of === "string")) {+ continue;+ }+ if (!holdsRecord(value, node.id, context.typeOf)) continue;++ const state = linkState(node.data.inputs, declared, name);+ if (state.kind === "linked") continue;+ notices.push(+ state.kind === "gated"+ ? {+ code: "LINKS_CONDITIONAL",+ nodeId: node.id,+ field: `inputs.${name}`,+ params: {+ input: state.gate.input,+ equals: state.gate.equals[0] ?? ""+ }+ }+ : {+ code: "LINKS_UNSUPPORTED",+ nodeId: node.id,+ field: `inputs.${name}`+ }+ );+ }+ }+ return notices;+}diff --git a/packages/ee/src/workflows/definition/record.test.ts b/packages/ee/src/workflows/definition/record.test.tsnew file mode 100644index 0000000000..6b3ff999b4--- /dev/null+++ b/packages/ee/src/workflows/definition/record.test.ts@@ -0,0 +1,168 @@+// SPDX-License-Identifier: LicenseRef-Carbon-Commercial+// Carbon Enterprise file, licensed only under the Carbon Commercial License+// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.++import { describe, expect, it } from "vitest";+import { createFixtureCatalog, walkPath } from "./catalog";+import {+ canAssign,+ describeType,+ literalValueMatchesType,+ operatorsForType,+ rendersAsText,+ t,+ typesEqual,+ valueTypeSchema+} from "./types";++/** The shape an integration step produces: an object, with an object inside it. */+const EVENT = t.record({+ summary: t.string,+ startDateTime: t.date,+ organizer: t.record({ email: t.string })+});++describe("record types", () => {+ describe("typesEqual", () => {+ // The bug this file exists for: the old `a.of.of === b.of.of` shorthand read+ // `undefined === undefined` for records, so ANY two record lists compared equal.+ it("distinguishes two record lists with different fields", () => {+ const events = t.list({ kind: "record", fields: { summary: t.string } });+ const people = t.list({ kind: "record", fields: { email: t.string } });+ expect(typesEqual(events, people)).toBe(false);+ });++ it("distinguishes records differing only in a nested field's type", () => {+ const a = t.record({ at: t.record({ on: t.date }) });+ const b = t.record({ at: t.record({ on: t.string }) });+ expect(typesEqual(a, b)).toBe(false);+ });++ it("distinguishes a subset from a superset", () => {+ const few = t.record({ summary: t.string });+ const many = t.record({ summary: t.string, extra: t.string });+ expect(typesEqual(few, many)).toBe(false);+ expect(typesEqual(many, few)).toBe(false);+ });++ it("ignores field order", () => {+ const a = t.record({ summary: t.string, at: t.date });+ const b = t.record({ at: t.date, summary: t.string });+ expect(typesEqual(a, b)).toBe(true);+ });++ // Same key count, same key names, one type different — the case a length-only+ // or key-name-only comparison would wave through.+ it("compares field types, not just field names", () => {+ const a = t.record({ id: t.string, count: t.number });+ const b = t.record({ id: t.string, count: t.string });+ expect(typesEqual(a, b)).toBe(false);+ });++ it("does not confuse a record with an entity of the same shape", () => {+ expect(typesEqual(t.record({ email: t.string }), t.entity("user"))).toBe(+ false+ );+ });+ });++ describe("assignability", () => {+ it("accepts an identical record and refuses a different one", () => {+ expect(canAssign(EVENT, EVENT)).toBe(true);+ expect(canAssign(EVENT, t.record({ summary: t.string }))).toBe(false);+ });++ // Batching lets a list fill a scalar slot; a record IS a scalar, so a list of+ // them must still satisfy that relaxation.+ it("lets a list of records fill a single record input when batching", () => {+ const list = t.list({ kind: "record", fields: { summary: t.string } });+ const one = t.record({ summary: t.string });+ expect(canAssign(list, one, { batching: true })).toBe(true);+ expect(canAssign(list, one)).toBe(false);+ });+ });++ describe("records are not literals, text, or comparable", () => {+ it("refuses a record literal even when the value looks right", () => {+ expect(+ literalValueMatchesType(EVENT, { summary: "Standup", organizer: {} })+ ).toBe(false);+ });++ it("refuses a list-of-records literal", () => {+ const list = t.list({ kind: "record", fields: { summary: t.string } });+ expect(literalValueMatchesType(list, [{ summary: "Standup" }])).toBe(+ false+ );+ });++ // rendersAsText false is what keeps a record out of every template.+ it("has no reading inside a sentence", () => {+ expect(rendersAsText(EVENT)).toBe(false);+ expect(+ rendersAsText(t.list({ kind: "record", fields: { a: t.string } }))+ ).toBe(false);+ });++ // No operator means the builder offers no way to put one in a condition.+ it("offers no operators, including on a list of records", () => {+ expect(operatorsForType(EVENT)).toEqual([]);+ expect(+ operatorsForType(t.list({ kind: "record", fields: { a: t.string } }))+ ).toEqual([]);+ });++ it("still offers contains on a list of primitives", () => {+ expect(operatorsForType(t.list(t.string as never))).toContain("contains");+ });+ });++ describe("describeType", () => {+ it("names records without leaking 'undefined'", () => {+ expect(describeType(EVENT)).toBe("an object");+ expect(+ describeType(t.list({ kind: "record", fields: { a: t.string } }))+ ).toBe("a list of objects");+ });+ });++ describe("walkPath", () => {+ const catalog = createFixtureCatalog();++ it("descends into a nested record field", () => {+ expect(walkPath(EVENT, ["organizer", "email"], catalog)).toEqual(+ t.string+ );+ });++ it("returns undefined for a field the record does not declare", () => {+ expect(walkPath(EVENT, ["location"], catalog)).toBeUndefined();+ expect(walkPath(EVENT, ["organizer", "phone"], catalog)).toBeUndefined();+ });++ it("refuses to walk past a primitive field", () => {+ expect(walkPath(EVENT, ["summary", "anything"], catalog)).toBeUndefined();+ });+ });++ describe("schema", () => {+ it("parses a nested record and a list of records", () => {+ expect(valueTypeSchema.safeParse(EVENT).success).toBe(true);+ expect(valueTypeSchema.safeParse(t.list(EVENT as never)).success).toBe(+ true+ );+ });++ // The constraint that forces `flatten` to be a flag on pluck rather than a+ // standalone operation: a 2D list cannot exist as a value at all.+ it("still refuses a list of lists", () => {+ const nested = { kind: "list", of: { kind: "list", of: t.string } };+ expect(valueTypeSchema.safeParse(nested).success).toBe(false);+ });++ it("refuses a record whose field is not a value type", () => {+ const bad = { kind: "record", fields: { a: { kind: "bogus" } } };+ expect(valueTypeSchema.safeParse(bad).success).toBe(false);+ });+ });+});diff --git a/packages/ee/src/workflows/definition/schema.test.ts b/packages/ee/src/workflows/definition/schema.test.tsindex 2430c76361..bb2a2445a7 100644--- a/packages/ee/src/workflows/definition/schema.test.ts+++ b/packages/ee/src/workflows/definition/schema.test.ts@@ -9,7 +9,12 @@ import {nodeSchema,workflowDefinitionSchema} from "./schema";-import { scheduleSchema, valueTypeSchema, variableRefSchema } from "./types";+import {+ itemRefSchema,+ scheduleSchema,+ valueTypeSchema,+ variableRefSchema+} from "./types";const node = (type: string,@@ -50,6 +55,119 @@ describe("nodeSchema", () => {expect(parsed.data).toMatchObject({ events: [], origin: "Both" });});+ // The data node was widened in place rather than renamed, so a filter node saved+ // before `operation` existed must still parse AND behave identically — that is+ // what lets this ship with no format bump and no migration.+ it("reads a filter node saved before the data operations existed", () => {+ const parsed = nodeSchema.parse({+ id: "n3",+ name: "filter_0",+ type: "filter",+ position: { x: 0, y: 0 },+ data: {+ source: { kind: "ref", nodeId: "t1", output: "record", path: [] },+ combinator: "or",+ clauses: []+ }+ });+ if (parsed.type !== "filter") throw new Error("expected a filter node");+ expect(parsed.data.operation).toBe("filter");+ // Off by default: a stored `flatten` on a non-pluck node would mean nothing.+ expect(parsed.data.flatten).toBe(false);+ expect(parsed.data.field).toBeUndefined();+ // Everything it DID carry survives untouched.+ expect(parsed.data.combinator).toBe("or");+ expect(parsed.data.source).toEqual({+ kind: "ref",+ nodeId: "t1",+ output: "record",+ path: []+ });+ });++ it("parses a filter node with no operations array as none stored", () => {+ const parsed = nodeSchema.parse({+ id: "n3",+ name: "filter_0",+ type: "filter",+ position: { x: 0, y: 0 },+ data: { combinator: "and", clauses: [], operation: "count" }+ });+ if (parsed.type !== "filter") throw new Error("expected a filter node");+ // `cardsOf` synthesizes the single card; the schema must not invent one.+ expect(parsed.data.operations).toBeUndefined();+ });++ it("applies per-card defaults inside a stored chain", () => {+ const parsed = nodeSchema.parse({+ id: "n3",+ name: "filter_0",+ type: "filter",+ position: { x: 0, y: 0 },+ data: {+ combinator: "and",+ clauses: [],+ operations: [+ { id: "card-0" },+ { id: "card-1", operation: "pluck", field: "status" }+ ]+ }+ });+ if (parsed.type !== "filter") throw new Error("expected a filter node");+ expect(parsed.data.operations).toEqual([+ {+ id: "card-0",+ operation: "filter",+ combinator: "and",+ clauses: [],+ flatten: false+ },+ {+ id: "card-1",+ operation: "pluck",+ combinator: "and",+ clauses: [],+ field: "status",+ flatten: false+ }+ ]);+ });++ it("refuses a chain whose cards share an id, or have none", () => {+ const filter = (operations: unknown[]) =>+ nodeSchema.safeParse({+ id: "n4",+ name: "filter_0",+ type: "filter",+ position: { x: 0, y: 0 },+ data: { combinator: "and", clauses: [], operations }+ }).success;+ expect(filter([{ id: "card-0" }, { id: "card-0" }])).toBe(false);+ expect(filter([{ id: "" }])).toBe(false);+ expect(filter([{ id: "card-0" }, { id: "card-1" }])).toBe(true);+ });++ it("reads an item ref with and without a card scope", () => {+ expect(+ itemRefSchema.parse({ kind: "item", path: [] }).card+ ).toBeUndefined();+ expect(+ itemRefSchema.parse({ kind: "item", path: ["id"], card: "card-1" }).card+ ).toBe("card-1");+ });++ it("refuses an operation the data node does not offer", () => {+ const parse = () =>+ nodeSchema.parse({+ id: "n4",+ name: "filter_1",+ type: "filter",+ position: { x: 0, y: 0 },+ data: { combinator: "and", clauses: [], operation: "sum" }+ });+ expect(parse).toThrow();+ });+// Rows written when repeating was a stored flag still carry it; reading one// must drop it rather than fail, or those workflows become unopenable.it("drops the batch flag an older row still carries", () => {diff --git a/packages/ee/src/workflows/definition/schema.ts b/packages/ee/src/workflows/definition/schema.tsindex fb8627415b..973e207a13 100644--- a/packages/ee/src/workflows/definition/schema.ts+++ b/packages/ee/src/workflows/definition/schema.ts@@ -3,6 +3,7 @@// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.import { z } from "zod";+import { dataOperationSchema } from "./data-operations";import {clauseSchema,combinatorSchema,@@ -87,13 +88,51 @@ const lookupNode = z.object({})});+/** One step of the data node's chain. Identity is load-bearing: React keys,+ * issue field paths (`operations.{id}.…`) and run-detail rows all key on it. */+const operationCardSchema = z.object({+ id: z.string().min(1),+ operation: dataOperationSchema.default("filter"),+ combinator: combinatorSchema.default("and"),+ clauses: z.array(clauseSchema).default([]),+ /** `pluck` only: a dotted path to the field projected off each item. */+ field: z.string().optional(),+ /** `pluck` only: flatten a list-valued field into ONE list, since+ * `list<list<T>>` is unrepresentable. Off by default so a card never stores a+ * flag that means nothing; the builder sets it when the field is a list. */+ flatten: z.boolean().default(false)+});+export type OperationCard = z.infer<typeof operationCardSchema>;++/** The data node. Still typed `"filter"`: every saved workflow holds that literal,+ * and `operation` defaults to `"filter"`, so a node stored before this existed+ * parses and behaves exactly as it did — no format bump, no migration. */const filterNode = z.object({...nodeBase,type: z.literal("filter"),data: z.object({source: variableRefSchema.optional(),combinator: combinatorSchema.default("and"),- clauses: z.array(clauseSchema).default([])+ clauses: z.array(clauseSchema).default([]),+ operation: dataOperationSchema.default("filter"),+ /** `pluck` only: a dotted path to the field projected off each item. */+ field: z.string().optional(),+ /** `pluck` only: flatten a list-valued field into ONE list, since+ * `list<list<T>>` is unrepresentable. Off by default so a node never stores a+ * flag that means nothing; the builder sets it when the field is a list. */+ flatten: z.boolean().default(false),+ /** The chain. Absent on every pre-chain definition — `cardsOf` synthesizes+ * one card from the flat fields above, which stay for exactly that reason. */+ operations: z+ .array(operationCardSchema)+ .max(20)+ // An item ref names its card by id, and `dataLoopList` finds it with+ // `findIndex`: a repeated id would type every ref against the first.+ .refine(+ (cards) => new Set(cards.map((card) => card.id)).size === cards.length,+ { message: "Every step in the chain needs its own id." }+ )+ .optional()})});@@ -107,13 +146,32 @@ const actionNode = z.object({})});+/**+ * A step run by a third-party integration. Its own kind rather than an action, so+ * the action path carries no notion of a vendor: `piece` names the integration and+ * `action` the step within it, both drawn from `WORKFLOW_INTEGRATION_CATALOG`.+ *+ * Which account it acts as is an ordinary input (`connectionId`), not a field here+ * — that is what lets the generic options provider fill it like any other list.+ */+const integrationNode = z.object({+ ...nodeBase,+ type: z.literal("integration"),+ data: z.object({+ piece: z.string(),+ action: z.string(),+ inputs: z.record(z.string(), valueOrRefSchema).default({})+ })+});+export const nodeSchema = z.discriminatedUnion("type", [triggerNode,conditionNode,computeNode,lookupNode,filterNode,- actionNode+ actionNode,+ integrationNode]);export type WorkflowNode = z.infer<typeof nodeSchema>;export type WorkflowNodeType = WorkflowNode["type"];@@ -124,6 +182,7 @@ export type ComputeNode = Extract<WorkflowNode, { type: "compute" }>;export type LookupNode = Extract<WorkflowNode, { type: "lookup" }>;export type FilterNode = Extract<WorkflowNode, { type: "filter" }>;export type ActionNode = Extract<WorkflowNode, { type: "action" }>;+export type IntegrationNode = Extract<WorkflowNode, { type: "integration" }>;export const edgeSchema = z.object({id: z.string().min(1),diff --git a/packages/ee/src/workflows/definition/types.ts b/packages/ee/src/workflows/definition/types.tsindex a04e0beefb..26cbecc03c 100644--- a/packages/ee/src/workflows/definition/types.ts+++ b/packages/ee/src/workflows/definition/types.ts@@ -14,20 +14,59 @@ export const primitiveKindSchema = z.enum([]);export type PrimitiveKind = z.infer<typeof primitiveKindSchema>;-/** A single-item type: a primitive, or a reference to a record type. */-export const scalarTypeSchema = z.discriminatedUnion("kind", [- z.object({ kind: z.literal("primitive"), of: primitiveKindSchema }),- z.object({ kind: z.literal("entity"), of: z.string() })-]);-export type ScalarType = z.infer<typeof scalarTypeSchema>;+/**+ * A bag of named fields — Carbon's object type.+ *+ * Deliberately NOT an `entity`: an entity has a table, an id, a permission module+ * and a loader that fetches its row. A record has none of those. It is data a step+ * already holds (a vendor's JSON), so its fields travel with the value and reading+ * one never touches the database.+ *+ * Structural rather than named: the type carries its own fields, so nothing is+ * registered anywhere and a saved workflow can never reference a shape that+ * vanished. Records are legal only as node OUTPUTS and inside the data node — never+ * as a catalog input, a stored literal, a template part or a condition operand.+ */+export interface RecordType {+ kind: "record";+ fields: Record<string, ValueType>;+}++/** A single-item type: a primitive, an entity reference, or an object. */+export type ScalarType =+ | { kind: "primitive"; of: PrimitiveKind }+ | { kind: "entity"; of: string }+ | RecordType;/** A list's `of` accepts only scalars, so `list<list<T>>` is unrepresentable. */-export const valueTypeSchema = z.discriminatedUnion("kind", [- z.object({ kind: z.literal("primitive"), of: primitiveKindSchema }),- z.object({ kind: z.literal("entity"), of: z.string() }),- z.object({ kind: z.literal("list"), of: scalarTypeSchema })-]);-export type ValueType = z.infer<typeof valueTypeSchema>;+export type ValueType = ScalarType | { kind: "list"; of: ScalarType };++// The schemas are annotated and built with `z.lazy` because `RecordType` is+// recursive, and a lazy member cannot sit inside `z.discriminatedUnion` — hence+// `z.union` here. The explicit `z.ZodType<…>` annotations keep TypeScript from+// inferring through the recursion, which is what would otherwise risk TS2589 in+// `apps/erp` (see packages/workflows/AGENTS.md).+export const recordTypeSchema: z.ZodType<RecordType> = z.lazy(() =>+ z.object({+ kind: z.literal("record"),+ fields: z.record(z.string(), valueTypeSchema)+ })+);++export const scalarTypeSchema: z.ZodType<ScalarType> = z.lazy(() =>+ z.union([+ z.object({ kind: z.literal("primitive"), of: primitiveKindSchema }),+ z.object({ kind: z.literal("entity"), of: z.string() }),+ recordTypeSchema+ ])+);++export const valueTypeSchema: z.ZodType<ValueType> = z.lazy(() =>+ z.union([+ scalarTypeSchema,+ z.object({ kind: z.literal("list"), of: scalarTypeSchema })+ ])+);/** The canonical `ValueType` constructors; prefer these over inline literals. */export const t = {@@ -36,18 +75,46 @@ export const t = {boolean: { kind: "primitive", of: "boolean" },date: { kind: "primitive", of: "date" },entity: (of: string): ValueType => ({ kind: "entity", of }),- list: (of: ScalarType): ValueType => ({ kind: "list", of })+ list: (of: ScalarType): ValueType => ({ kind: "list", of }),+ record: (fields: Record<string, ValueType>): ValueType => ({+ kind: "record",+ fields+ })} as const satisfies Record<string,ValueType | ((...args: never[]) => ValueType)>;+/**+ * Compile-time exhaustiveness for a dispatch over a value's `kind`.+ *+ * The kind chains in this package are `if`/`else` rather than `switch`, so a new+ * `ValueType` or `RuntimeValue` member falls through them silently — passing both+ * typecheck and tests while doing nothing. Ending a dispatch here turns that into+ * a type error at the site that forgot the member.+ */+export function assertNever(value: never): never {+ throw new Error(`Unhandled kind: ${JSON.stringify(value)}`);+}+export function typesEqual(a: ValueType, b: ValueType): boolean {- if (a.kind === "list" && b.kind === "list") {- return a.of.kind === b.of.kind && a.of.of === b.of.of;- }+ // Recursive rather than comparing `of.of`: a record has no `of`, so the old+ // shorthand read `undefined === undefined` and called two different record+ // lists equal.+ if (a.kind === "list" && b.kind === "list") return typesEqual(a.of, b.of);if (a.kind === "primitive" && b.kind === "primitive") return a.of === b.of;if (a.kind === "entity" && b.kind === "entity") return a.of === b.of;+ if (a.kind === "record" && b.kind === "record") {+ const names = Object.keys(a.fields);+ if (names.length !== Object.keys(b.fields).length) return false;+ return names.every((name) => {+ const left = a.fields[name];+ const right = b.fields[name];+ return (+ left !== undefined && right !== undefined && typesEqual(left, right)+ );+ });+ }return false;}@@ -87,12 +154,21 @@ export function expectedClauseRightType(* entity part is never a list.*/export function rendersAsText(type: ValueType): boolean {- return type.kind !== "list" || type.of.kind !== "entity";+ // An object has no reading in a sentence — the field the author meant is one hop+ // further in — so it is kept out of every template the same way a list of records is.+ if (type.kind === "record") return false;+ if (type.kind !== "list") return true;+ return type.of.kind !== "entity" && type.of.kind !== "record";}/** Customer-facing rendering of a type, for issue messages. */export function describeType(type: ValueType): string {- if (type.kind === "list") return `a list of ${type.of.of}`;+ if (type.kind === "record") return "an object";+ if (type.kind === "list") {+ return type.of.kind === "record"+ ? "a list of objects"+ : `a list of ${type.of.of}`;+ }if (type.of === "null") return "nothing";return `a ${type.of}`;}@@ -117,7 +193,12 @@ export const operatorSchema = z.enum(WORKFLOW_OPERATORS);export function operatorsForType(type: ValueType): readonly Operator[] {if (type.kind === "primitive") return OPERATORS_BY_TYPE[type.of];- if (type.kind === "list") return OPERATORS_BY_TYPE.list;+ // Objects are not comparable: `equals` has no reading for one, so `contains` on a+ // list of them would silently never match. Reach into a field and compare that.+ if (type.kind === "record") return [];+ if (type.kind === "list") {+ return type.of.kind === "record" ? [] : OPERATORS_BY_TYPE.list;+ }return OPERATORS_BY_TYPE.entity;}@@ -133,7 +214,10 @@ export type VariableRef = z.infer<typeof variableRefSchema>;/** The item a looping node is currently on: a filter's list, or a batched action's. */export const itemRefSchema = z.object({kind: z.literal("item"),- path: z.array(z.string()).default([])+ path: z.array(z.string()).default([]),+ /** The operation card this ref lives in (data-node chains). Absent = the+ * first card, which for every pre-chain ref is the only card. */+ card: z.string().optional()});export type ItemRef = z.infer<typeof itemRefSchema>;@@ -183,6 +267,9 @@ export const pairsSchema = z.object({export type Pairs = z.infer<typeof pairsSchema>;function scalarValueMatches(type: ScalarType, value: unknown): boolean {+ // A record is never a literal — it only ever arrives as a step's output — so no+ // stored value may claim to be one.+ if (type.kind === "record") return false;if (type.kind === "entity") return typeof value === "string";switch (type.of) {case "boolean":diff --git a/packages/ee/src/workflows/definition/validate.test.ts b/packages/ee/src/workflows/definition/validate.test.tsindex 4982768967..28f49f1e0a 100644--- a/packages/ee/src/workflows/definition/validate.test.ts+++ b/packages/ee/src/workflows/definition/validate.test.ts@@ -793,6 +793,112 @@ describe("the current item", () => {expect(codes(definition)).toEqual(["UNKNOWN_VARIABLE"]);});+ // A chained data node scopes "the current item" per CARD: a filter card after a+ // pluck loops over the plucked values, not the node's source — and the ref's+ // `card` id is what layer 5 resolves it by.+ const chainOn = (clauses: unknown[]) =>+ define(+ [+ trigger(),+ lookup("find", "part", "list"),+ {+ id: "f1",+ name: "f1",+ type: "filter",+ position: { x: 0, y: 0 },+ data: {+ source: ref("find", "result"),+ clauses: [],+ operations: [+ { id: "c1", operation: "pluck", field: "name" },+ { id: "c2", operation: "filter", clauses }+ ]+ }+ }+ ],+ [+ edge("e1", "trigger", "out", "find"),+ edge("e2", "find", "success", "f1")+ ]+ );++ it("types a card's item by the card the ref names", () => {+ const definition = chainOn([+ {+ left: { kind: "item", path: [], card: "c2" },+ operator: "eq",+ right: literal("string", "Bolt")+ }+ ]);+ expect(validateDefinition(definition, catalog)).toEqual([]);+ });++ it("reports a property the card's items do not have", () => {+ // The plucked values are strings; `unitPrice` was the SOURCE's property.+ const definition = chainOn([+ {+ left: { kind: "item", path: ["unitPrice"], card: "c2" },+ operator: "gt",+ right: literal("number", 10)+ }+ ]);+ expect(codes(definition)).toContain("UNKNOWN_VARIABLE");+ });++ it("reports ITEM_OUTSIDE_LOOP when the ref names no card and card 1 does not loop", () => {+ const definition = chainOn([+ {+ left: { kind: "item", path: [] },+ operator: "eq",+ right: literal("string", "Bolt")+ }+ ]);+ expect(codes(definition)).toContain("ITEM_OUTSIDE_LOOP");+ });++ // The runtime hands each card its own item, so a ref naming another looping+ // card would be typed against one list and run against another.+ it("reports a ref that names another looping card", () => {+ const definition = define(+ [+ trigger(),+ lookup("find", "part", "list"),+ {+ id: "f1",+ name: "f1",+ type: "filter",+ position: { x: 0, y: 0 },+ data: {+ source: ref("find", "result"),+ clauses: [],+ operations: [+ { id: "c1", operation: "filter", clauses: [] },+ {+ id: "c2",+ operation: "filter",+ clauses: [+ {+ left: { kind: "item", path: ["unitPrice"], card: "c1" },+ operator: "gt",+ right: literal("number", 10)+ }+ ]+ }+ ]+ }+ }+ ],+ [+ edge("e1", "trigger", "out", "find"),+ edge("e2", "find", "success", "f1")+ ]+ );+ const issues = validateDefinition(definition, catalog);+ expect(issues.map((issue) => [issue.code, issue.field])).toEqual([+ ["ITEM_OUTSIDE_LOOP", "operations.c2.clauses.0.left"]+ ]);+ });+// ITEM_OUTSIDE_LOOP is suppressed when a deeper cause exists.it("reports only UNKNOWN_ENTITY when the list's record type is gone", () => {const thin = createFixtureCatalog({ omitEntities: ["part"] });diff --git a/packages/ee/src/workflows/definition/variables.ts b/packages/ee/src/workflows/definition/variables.tsindex 0af4923237..17ecb5b4d1 100644--- a/packages/ee/src/workflows/definition/variables.ts+++ b/packages/ee/src/workflows/definition/variables.ts@@ -135,7 +135,7 @@ export function createContext(};const resolveItem = (ref: ItemRef, atNodeId: string): ResolvedRef => {- const loop = loopListOf(atNodeId);+ const loop = loopListOf(atNodeId, ref.card);if (loop === undefined) return { failure: "no-loop" };if (!("type" in loop)) return loop;const resolved = walkPath(loop.type.of, ref.path, catalog);@@ -160,11 +160,13 @@ export function createContext(return "type" in resolved ? resolved.type : undefined;};- const loopListOf = (nodeId: string): LoopList | undefined => {- if (loopCache.has(nodeId)) return loopCache.get(nodeId);+ const loopListOf = (nodeId: string, card?: string): LoopList | undefined => {+ const key = `${nodeId}\u0000${card ?? ""}`;+ if (loopCache.has(key)) return loopCache.get(key);const node = byId.get(nodeId);- const loop = node === undefined ? undefined : getNodeLoopList(node, ctx);- loopCache.set(nodeId, loop);+ const loop =+ node === undefined ? undefined : getNodeLoopList(node, ctx, card);+ loopCache.set(key, loop);return loop;};@@ -294,7 +296,12 @@ export function variablesFromHandle(name: "probe",type: "filter",position: { x: 0, y: 0 },- data: { combinator: "and", clauses: [] }+ data: {+ combinator: "and",+ clauses: [],+ operation: "filter",+ flatten: false+ }}],edges: [diff --git a/packages/ee/src/workflows/index.ts b/packages/ee/src/workflows/index.tsindex 9576266af6..e1ed54d757 100644--- a/packages/ee/src/workflows/index.ts+++ b/packages/ee/src/workflows/index.ts@@ -10,18 +10,35 @@ export type {CatalogEntity,CatalogEvent,CatalogInput,+ CatalogIntegration,CatalogOperation,EventMatch,FixtureCatalogOptions,+ LinkFormat,+ LinksDeclaration,+ OptionsSource,PermissionAction,RequiredPermission,WorkflowCatalog} from "./definition/catalog";export {createFixtureCatalog,+ INTEGRATION_CONNECTION_INPUT,+ integrationAppLabelKey,isMultiSelect,walkPath} from "./definition/catalog";+export {+ type CardRefusal,+ cardsOf,+ DATA_OPERATIONS,+ type DataOperation,+ type DataOperationSpec,+ foldOperationTypes,+ operationOf,+ operationsFor,+ truncateStarvedCards+} from "./definition/data-operations";export type { WorkflowIssue, WorkflowIssueCode } from "./definition/issues";export { REFERENCE_ISSUE_CODES } from "./definition/issues";export {@@ -56,6 +73,8 @@ export {parseWorkflowDefinition,readWorkflowVersion} from "./definition/normalize";+export type { WorkflowNotice, WorkflowNoticeCode } from "./definition/notices";+export { fieldNotices } from "./definition/notices";export { topologicalNodeOrder } from "./definition/order";export type { PathPosition } from "./definition/paths";export { pathLabel } from "./definition/paths";@@ -70,7 +89,9 @@ export type {ConditionNode,ConditionPath,FilterNode,+ IntegrationNode,LookupNode,+ OperationCard,Origin,TriggerNode,WorkflowDefinition,@@ -177,6 +198,7 @@ export {filterExecutor,filterSummary,fromColumn,+ fromJson,fromLiteral,isNull,itemKeyFor,@@ -193,6 +215,7 @@ export {resolveRef,resolveValue} from "./runtime";+export type { RenderOptions } from "./runtime/resolve";export type {CompanyLock,DesiredSubscription,diff --git a/packages/ee/src/workflows/runtime/action.test.ts b/packages/ee/src/workflows/runtime/action.test.tsindex 0d9b5024e0..56a9779317 100644--- a/packages/ee/src/workflows/runtime/action.test.ts+++ b/packages/ee/src/workflows/runtime/action.test.ts@@ -179,8 +179,8 @@ describe("actionExecutor", () => {});// The webhook-body guarantee: a markdown link shipped to someone else's API would be-// literal text there, so only an input the catalog marks `linkify` may be wrapped.-describe("actionExecutor and linkify", () => {+// literal text there, so only an input the catalog declares `links` for may be wrapped.+describe("actionExecutor and links", () => {const orderRef = {kind: "template" as const,parts: [@@ -202,7 +202,7 @@ describe("actionExecutor and linkify", () => {linkFor: (of: string, id: string) => `https://erp.test/${of}/${id}`});- it("leaves an input without linkify plain, even with a resolver present", async () => {+ it("leaves an input without links plain, even with a resolver present", async () => {let seen: Record<string, RuntimeValue> = {};const ctx = withOrder(async (_id, inputs) => {seen = inputs;@@ -214,4 +214,40 @@ describe("actionExecutor and linkify", () => {expect(seen.title).toEqual(primitiveValue("string", "Check PO000123"));});++ it("wraps a record on an input that declares links, in the declared format", async () => {+ let seen: Record<string, RuntimeValue> = {};+ const ctx = withOrder(async (_id, inputs) => {+ seen = inputs;+ return { ok: true, outputs: {} };+ });+ const base = ctx.catalog.getAction("createIssue");+ if (base === undefined) throw new Error("fixture action missing");+ const linked = {+ ...base,+ inputs: {+ ...base.inputs,+ title: {+ ...base.inputs.title!,+ links: { format: "markdown" as const }+ }+ }+ };++ await actionExecutor.execute(node("createIssue", { title: orderRef }), {+ ...ctx,+ catalog: {+ ...ctx.catalog,+ getAction: (id) =>+ id === "createIssue" ? linked : ctx.catalog.getAction(id)+ }+ });++ expect(seen.title).toEqual(+ primitiveValue(+ "string",+ "Check [PO000123](https://erp.test/purchaseOrder/po_1)"+ )+ );+ });});diff --git a/packages/ee/src/workflows/runtime/action.ts b/packages/ee/src/workflows/runtime/action.tsindex 2b1f3ceb64..618ebaaf67 100644--- a/packages/ee/src/workflows/runtime/action.ts+++ b/packages/ee/src/workflows/runtime/action.ts@@ -7,8 +7,8 @@ import {FAILURE_HANDLE,SUCCESS_HANDLE} from "../definition/schema";-import { renderTemplate, resolveValue } from "./resolve";-import type { NodeExecutor, RuntimeValue } from "./types";+import { resolveStepInputs } from "./resolve";+import type { NodeExecutor } from "./types";const GONE = "This step is no longer available.";@@ -22,24 +22,17 @@ export const actionExecutor: NodeExecutor<ActionNode> = {const action = ctx.catalog.getAction(node.data.action);if (action === undefined) return { status: "Skipped", reason: GONE };- const inputs: Record<string, RuntimeValue> = {};- for (const [name, value] of Object.entries(node.data.inputs)) {- // Only a catalog-declared prose input linkifies, and only when the engine- // supplied a resolver — a webhook body must stay plain text.- const resolved =- action.inputs[name]?.linkify === true && value.kind === "template"- ? await renderTemplate(value, ctx, { linkFor: ctx.linkFor })- : await resolveValue(value, ctx);- if (!resolved.ok) return { status: "Skipped", reason: resolved.reason };- // In a batch the one list input stands for the item this turn is on.- inputs[name] =- ctx.item !== undefined && resolved.value.kind === "list"- ? ctx.item- : resolved.value;- ctx.record?.(name, inputs[name]);- }+ const resolved = await resolveStepInputs(+ node.data.inputs,+ action.inputs,+ ctx+ );+ if (!resolved.ok) return { status: "Skipped", reason: resolved.reason };- const outcome = await ctx.services.runAction(node.data.action, inputs);+ const outcome = await ctx.services.runAction(+ node.data.action,+ resolved.inputs+ );if (!outcome.ok) {return { status: "Failed", error: outcome.error, handle: FAILURE_HANDLE };}diff --git a/packages/ee/src/workflows/runtime/compare.ts b/packages/ee/src/workflows/runtime/compare.tsindex 3c080521e3..cbc849f2da 100644--- a/packages/ee/src/workflows/runtime/compare.ts+++ b/packages/ee/src/workflows/runtime/compare.ts@@ -4,6 +4,7 @@import type { Operator } from "@carbon/utils";import type { Clause, Combinator } from "../definition/types";+import { assertNever } from "../definition/types";import { resolveValue } from "./resolve";import type { ClauseEvaluation, RuntimeContext, RuntimeValue } from "./types";import { isNull } from "./values";@@ -23,18 +24,29 @@ function orderable(value: RuntimeValue): number | undefined {}function equals(left: RuntimeValue, right: RuntimeValue): boolean {- if (left.kind === "entity") {- return (- right.kind === "entity" && left.of === right.of && left.id === right.id- );- }- if (left.kind !== "primitive" || right.kind !== "primitive") return false;- if (left.of === "date" || right.of === "date") {- const a = orderable(left);- const b = orderable(right);- return a !== undefined && a === b;+ switch (left.kind) {+ case "entity":+ return (+ right.kind === "entity" && left.of === right.of && left.id === right.id+ );+ case "primitive": {+ if (right.kind !== "primitive") return false;+ if (left.of === "date" || right.of === "date") {+ const a = orderable(left);+ const b = orderable(right);+ return a !== undefined && a === b;+ }+ return left.value === right.value;+ }+ // Lists, rows and objects have no equality worth defining. `operatorsForType`+ // offers none for a record, and `contains` on a list compares ELEMENTS, not wholes.+ case "list":+ case "pairs":+ case "record":+ return false;+ default:+ return assertNever(left);}- return left.value === right.value;}/** `contains`/`startsWith`/`endsWith` ignore case; `eq`/`neq` do not. */diff --git a/packages/ee/src/workflows/runtime/condition.test.ts b/packages/ee/src/workflows/runtime/condition.test.tsindex b9b471a97d..74017adf58 100644--- a/packages/ee/src/workflows/runtime/condition.test.ts+++ b/packages/ee/src/workflows/runtime/condition.test.ts@@ -114,13 +114,13 @@ describe("conditionExecutor", () => {);if (result.status !== "Succeeded") throw new Error("Expected Succeeded");const detail = result.detail;- expect(detail).toBeDefined();- expect(detail?.kind).toBe("condition");- expect(detail?.paths).toHaveLength(2);- expect(detail?.paths[0]?.taken).toBe(false);- expect(detail?.paths[0]?.evaluations.length).toBeGreaterThan(0);- expect(detail?.paths[1]?.taken).toBe(true);- expect(detail?.paths[1]?.evaluations).toEqual([]);+ if (detail?.kind !== "condition")+ throw new Error("Expected condition detail");+ expect(detail.paths).toHaveLength(2);+ expect(detail.paths[0]?.taken).toBe(false);+ expect(detail.paths[0]?.evaluations.length).toBeGreaterThan(0);+ expect(detail.paths[1]?.taken).toBe(true);+ expect(detail.paths[1]?.evaluations).toEqual([]);});it("skip: detail's last path has an evaluation carrying a reason", async () => {@@ -146,8 +146,9 @@ describe("conditionExecutor", () => {);if (result.status !== "Skipped") throw new Error("Expected Skipped");const detail = result.detail;- expect(detail).toBeDefined();- const lastPath = detail?.paths.at(-1);+ if (detail?.kind !== "condition")+ throw new Error("Expected condition detail");+ const lastPath = detail.paths.at(-1);expect(lastPath?.evaluations.length).toBeGreaterThan(0);expect(lastPath?.evaluations.at(-1)?.reason).toBeTruthy();});diff --git a/packages/ee/src/workflows/runtime/condition.ts b/packages/ee/src/workflows/runtime/condition.tsindex 19e2f282e2..27b5014865 100644--- a/packages/ee/src/workflows/runtime/condition.ts+++ b/packages/ee/src/workflows/runtime/condition.ts@@ -13,7 +13,7 @@ export const conditionExecutor: NodeExecutor<ConditionNode> = {permission: () => undefined,execute: async (node, ctx) => {- const paths: NodeDetail["paths"] = [];+ const paths: Extract<NodeDetail, { kind: "condition" }>["paths"] = [];for (const path of node.data.paths) {if (path.kind === "else") {diff --git a/packages/ee/src/workflows/runtime/data-consistency.test.ts b/packages/ee/src/workflows/runtime/data-consistency.test.tsnew file mode 100644index 0000000000..8b0505eb1a--- /dev/null+++ b/packages/ee/src/workflows/runtime/data-consistency.test.ts@@ -0,0 +1,370 @@+// SPDX-License-Identifier: LicenseRef-Carbon-Commercial+// Carbon Enterprise file, licensed only under the Carbon Commercial License+// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.++import { describe, expect, it } from "vitest";+import { createFixtureCatalog } from "../definition/catalog";+import type { DataOperation } from "../definition/data-operations";+import { getNodeOutputs } from "../definition/nodes";+import type { FilterNode } from "../definition/schema";+import { type RecordType, t, type ValueType } from "../definition/types";+import { createContext } from "../definition/variables";+import { filterExecutor } from "./filter";+import { createRuntimeContext } from "./fixtures";+import type { RuntimeValue } from "./types";+import { entityValue, fromColumn, listValue, primitiveValue } from "./values";++/**+ * The data node declares a type at build time and produces a value at run time.+ * Those two answers must agree for EVERY source and operation — a step that+ * declares no output but still runs puts an untyped value into the graph, and one+ * that declares an output but skips leaves a downstream step reading nothing.+ *+ * This matrix exists because four such disagreements shipped past hand-written+ * per-case tests: `join` refused entities it could render, `pluck` accepted lists+ * of plain values and returned nulls, and both ran in the runtime regardless of+ * what the validator had said.+ */++const EVENT: RecordType = { kind: "record", fields: { summary: t.string } };++const SOURCES: {+ label: string;+ type: ValueType;+ value: () => RuntimeValue;+ /** A field that exists on this list's items, where one can. */+ field?: string;+}[] = [+ {+ label: "list<string>",+ type: t.list(t.string),+ value: () => listValue(t.string, [primitiveValue("string", "a")]).value+ },+ {+ label: "list<number>",+ type: t.list(t.number),+ value: () => listValue(t.number, [primitiveValue("number", 1)]).value+ },+ {+ label: "list<date>",+ type: t.list(t.date),+ value: () =>+ listValue(t.date, [primitiveValue("date", "2026-01-01T00:00:00.000Z")])+ .value+ },+ {+ label: "list<entity>",+ type: t.list({ kind: "entity", of: "part" }),+ value: () =>+ listValue({ kind: "entity", of: "part" }, [+ entityValue("part", "p1", { name: "Bolt" })+ ]).value,+ field: "name"+ },+ {+ label: "list<record>",+ type: t.list(EVENT),+ value: () => listValue(EVENT, [fromColumn(EVENT, { summary: "A" })]).value,+ field: "summary"+ }+];++const OPERATIONS = [+ "filter",+ "count",+ "first",+ "last",+ "join",+ "pluck"+] as const;++function node(operation: DataOperation, field?: string): FilterNode {+ return {+ id: "d1",+ name: "d1",+ type: "filter",+ position: { x: 0, y: 0 },+ data: {+ source: { kind: "ref", nodeId: "s1", output: "result", path: [] },+ combinator: "and",+ clauses: [],+ operation,+ flatten: false,+ ...(field === undefined ? {} : { field })+ }+ };+}++function declaredOutput(source: ValueType, target: FilterNode) {+ const { context } = createContext(+ { formatVersion: 4, nodes: [], edges: [] },+ createFixtureCatalog()+ );+ const ctx = {+ ...context,+ typeOf: () => source,+ resolveValue: () => ({ type: source })+ };+ return getNodeOutputs(target, ctx)?.result;+}++describe("the data node's declared type and its runtime agree", () => {+ for (const source of SOURCES) {+ for (const operation of OPERATIONS) {+ // `pluck` needs a field. Every source is tried with an invented one — what an+ // author renaming or switching operations leaves behind — and a source whose+ // items have fields is tried with a real one too.+ const fields =+ operation !== "pluck"+ ? [undefined]+ : source.field === undefined+ ? ["nope"]+ : [source.field, "nope"];+ for (const field of fields) {+ it(`${source.label} + ${operation}${field === undefined ? "" : ` "${field}"`}`, async () => {+ const target = node(operation, field);+ const declared = declaredOutput(source.type, target);++ const ctx = createRuntimeContext({+ outputs: { s1: { result: source.value() } }+ });+ const result = await filterExecutor.execute(target, ctx);++ expect(+ result.status === "Succeeded",+ declared === undefined+ ? `declares no output but ran, producing an untyped value`+ : `declares ${JSON.stringify(declared)} but did not run`+ ).toBe(declared !== undefined);+ });+ }+ }+ }++ // The specific regressions behind this file, kept as named cases so a failure+ // says what broke rather than just "row 14 of the matrix".+ it("joins a list of records by their display name, not into blanks", async () => {+ const list = listValue({ kind: "entity", of: "part" }, [+ entityValue("part", "p1", { name: "Bolt" }),+ entityValue("part", "p2", { name: "Nut" })+ ]).value;+ const ctx = createRuntimeContext({ outputs: { s1: { result: list } } });+ const result = await filterExecutor.execute(node("join"), ctx);+ expect(result.status === "Succeeded" && result.outputs?.result).toEqual(+ primitiveValue("string", "Bolt, Nut")+ );+ });++ it("keeps a leading null in a plucked list typed by the declared field", async () => {+ const shape = { kind: "record" as const, fields: { v: t.string } };+ const list = listValue(shape, [+ fromColumn(shape, { v: null }),+ fromColumn(shape, { v: "a" })+ ]).value;+ const ctx = createRuntimeContext({ outputs: { s1: { result: list } } });+ const result = await filterExecutor.execute(node("pluck", "v"), ctx);+ // A null-typed list holding a string would disagree with its own contents.+ expect(result.status === "Succeeded" && result.outputs?.result).toEqual(+ listValue(t.string, [+ { kind: "primitive", of: "null", value: null },+ primitiveValue("string", "a")+ ]).value+ );+ });++ it("refuses to pluck from a list of plain values rather than returning nulls", async () => {+ const list = listValue(t.string, [primitiveValue("string", "a")]).value;+ const ctx = createRuntimeContext({ outputs: { s1: { result: list } } });+ const result = await filterExecutor.execute(node("pluck", "x"), ctx);+ expect(result.status).toBe("Skipped");+ });++ it("plucks a field off a list of Carbon records, not a list of nulls", async () => {+ // The validator, `walkPath` and the builder all offer this; only the runtime+ // read it as "not a record" and returned nothing for every item.+ const list = listValue({ kind: "entity", of: "purchaseOrder" }, [+ entityValue("purchaseOrder", "po1", { status: "Draft" }),+ entityValue("purchaseOrder", "po2", { status: "Sent" })+ ]).value;+ const ctx = createRuntimeContext({ outputs: { s1: { result: list } } });+ const result = await filterExecutor.execute(node("pluck", "status"), ctx);+ expect(result.status === "Succeeded" && result.outputs?.result).toEqual(+ listValue(t.string, [+ primitiveValue("string", "Draft"),+ primitiveValue("string", "Sent")+ ]).value+ );+ });++ it("types a plucked list from the declared field, even when every value is null", async () => {+ const shape = { kind: "record" as const, fields: { v: t.string } };+ const list = listValue(shape, [fromColumn(shape, { v: null })]).value;+ const ctx = createRuntimeContext({ outputs: { s1: { result: list } } });+ const result = await filterExecutor.execute(node("pluck", "v"), ctx);+ // Sampling the data typed this `null` and disagreed with the builder's promise.+ expect(+ result.status === "Succeeded" &&+ result.outputs?.result?.kind === "list" &&+ result.outputs.result.of+ ).toEqual(t.string);+ });++ it("skips an unflattened pluck of a list-valued field rather than nesting lists", async () => {+ const shape = {+ kind: "record" as const,+ fields: { tags: t.list(t.string) }+ };+ const list = listValue(shape, [+ fromColumn(shape, { tags: ["a", "b"] })+ ]).value;+ const ctx = createRuntimeContext({ outputs: { s1: { result: list } } });+ const result = await filterExecutor.execute(node("pluck", "tags"), ctx);+ // `list<list<T>>` has no representation; the validator refuses it and so must+ // the runtime, because a draft is never validated.+ expect(result.status).toBe("Skipped");+ });+});++describe("operation chains at run time", () => {+ const chainNode = (+ operations: FilterNode["data"]["operations"]+ ): FilterNode => ({+ id: "d1",+ name: "d1",+ type: "filter",+ position: { x: 0, y: 0 },+ data: {+ source: { kind: "ref", nodeId: "s1", output: "result", path: [] },+ combinator: "and",+ clauses: [],+ operation: "filter",+ flatten: false,+ operations+ }+ });++ const shape = { kind: "record" as const, fields: { v: t.string } };+ const rows = (values: string[]) =>+ listValue(+ shape,+ values.map((v) => fromColumn(shape, { v }))+ ).value;++ it("folds filter → pluck → count, with one detail row per card", async () => {+ const target = chainNode([+ {+ id: "c1",+ operation: "filter",+ combinator: "and",+ clauses: [+ {+ left: { kind: "item", path: ["v"], card: "c1" },+ operator: "eq",+ right: {+ kind: "literal",+ type: t.string,+ value: "yes"+ }+ }+ ],+ flatten: false+ },+ {+ id: "c2",+ operation: "pluck",+ combinator: "and",+ clauses: [],+ field: "v",+ flatten: false+ },+ {+ id: "c3",+ operation: "count",+ combinator: "and",+ clauses: [],+ flatten: false+ }+ ]);+ const list = rows(["yes", "no", "yes", "no", "yes"]);+ const ctx = createRuntimeContext({ outputs: { s1: { result: list } } });+ const result = await filterExecutor.execute(target, ctx);++ if (result.status !== "Succeeded") throw new Error("Expected Succeeded");+ expect(result.outputs?.result).toEqual(primitiveValue("number", 3));+ // The node reads as its LAST card...+ expect(result.summary).toBe("Counted 3.");+ // ...and the detail tells the whole story, in run order.+ if (result.detail?.kind !== "data") throw new Error("Expected data detail");+ expect(result.detail.cards).toEqual([+ {+ id: "c1",+ operation: "filter",+ summary: "Kept 3 of 5.",+ status: "Succeeded",+ counts: { input: 5, output: 3, unresolved: 0 }+ },+ {+ id: "c2",+ operation: "pluck",+ summary: "Took 3 values.",+ status: "Succeeded",+ counts: { input: 3, output: 3 }+ },+ {+ id: "c3",+ operation: "count",+ summary: "Counted 3.",+ status: "Succeeded",+ counts: { input: 3 }+ }+ ]);+ });++ it("skips the node at the card that cannot run, naming its position", async () => {+ const target = chainNode([+ {+ id: "c1",+ operation: "filter",+ combinator: "and",+ clauses: [],+ flatten: false+ },+ // A draft: pluck with no field chosen. The validator would refuse it,+ // but a draft is never validated.+ {+ id: "c2",+ operation: "pluck",+ combinator: "and",+ clauses: [],+ flatten: false+ }+ ]);+ const ctx = createRuntimeContext({+ outputs: { s1: { result: rows(["yes"]) } }+ });+ const result = await filterExecutor.execute(target, ctx);++ if (result.status !== "Skipped") throw new Error("Expected Skipped");+ expect(result.reason).toContain("Step 2");+ expect(result.reason).toContain("No field was chosen to take.");+ if (result.detail?.kind !== "data") throw new Error("Expected data detail");+ expect(result.detail.cards).toHaveLength(2);+ expect(result.detail.cards[1]?.status).toBe("Skipped");+ });++ it("keeps a single card's summary and skip wording exactly as before", async () => {+ const ctx = createRuntimeContext({+ outputs: { s1: { result: rows(["a", "b"]) } }+ });+ const counted = await filterExecutor.execute(node("count"), ctx);+ expect(counted.status === "Succeeded" && counted.summary).toBe(+ "Counted 2."+ );++ // No "Step 1" prefix when the card IS the node.+ const plucked = await filterExecutor.execute(node("pluck"), ctx);+ expect(plucked.status === "Skipped" && plucked.reason).toBe(+ "No field was chosen to take."+ );+ });+});diff --git a/packages/ee/src/workflows/runtime/data-operations.test.ts b/packages/ee/src/workflows/runtime/data-operations.test.tsnew file mode 100644index 0000000000..c4dcb46638--- /dev/null+++ b/packages/ee/src/workflows/runtime/data-operations.test.ts@@ -0,0 +1,247 @@+// SPDX-License-Identifier: LicenseRef-Carbon-Commercial+// Carbon Enterprise file, licensed only under the Carbon Commercial License+// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.++import { describe, expect, it } from "vitest";+import type { FilterNode } from "../definition/schema";+import { t } from "../definition/types";+import { filterExecutor } from "./filter";+import { createRuntimeContext } from "./fixtures";+import type { RuntimeValue } from "./types";+import { fromColumn, listValue, primitiveValue } from "./values";++const EVENT = {+ kind: "record" as const,+ fields: {+ summary: t.string,+ attendees: t.list(t.string as never),+ organizer: { kind: "record" as const, fields: { email: t.string } }+ }+};++function event(summary: string, attendees: string[], email: string) {+ return fromColumn(EVENT, { summary, attendees, organizer: { email } });+}++const EVENTS = [+ event("Review", ["[email protected]"], "[email protected]")+];++const node = (data: Partial<FilterNode["data"]>): FilterNode => ({+ id: "d1",+ name: "d1",+ type: "filter",+ position: { x: 0, y: 0 },+ data: {+ source: { kind: "ref", nodeId: "step", output: "items", path: [] },+ combinator: "and",+ clauses: [],+ operation: "filter",+ flatten: false,+ ...data+ }+});++async function run(+ data: Partial<FilterNode["data"]>,+ items: RuntimeValue[] = EVENTS+) {+ const list = listValue(EVENT, items).value;+ const ctx = createRuntimeContext({ outputs: { step: { items: list } } });+ return filterExecutor.execute(node(data), ctx);+}++function output(result: Awaited<ReturnType<typeof run>>) {+ return result.status === "Succeeded" ? result.outputs?.result : undefined;+}++describe("data node operations", () => {+ it("counts the items", async () => {+ expect(output(await run({ operation: "count" }))).toEqual(+ primitiveValue("number", 2)+ );+ });++ it("counts an empty list as zero", async () => {+ expect(output(await run({ operation: "count" }, []))).toEqual(+ primitiveValue("number", 0)+ );+ });++ it("takes the first and the last item", async () => {+ const first = output(await run({ operation: "first" }));+ const last = output(await run({ operation: "last" }));+ expect(first?.kind === "record" && first.fields.summary).toEqual(+ primitiveValue("string", "Standup")+ );+ expect(last?.kind === "record" && last.fields.summary).toEqual(+ primitiveValue("string", "Review")+ );+ });++ // An empty list must not fail the step — the branch after it simply reads nothing.+ it("yields null rather than failing when taking from an empty list", async () => {+ for (const operation of ["first", "last"] as const) {+ const result = await run({ operation }, []);+ expect(result.status).toBe("Succeeded");+ expect(output(result)).toEqual({+ kind: "primitive",+ of: "null",+ value: null+ });+ }+ });++ describe("pluck", () => {+ it("projects a scalar field off every item", async () => {+ const result = output(+ await run({ operation: "pluck", field: "summary" })+ );+ expect(result?.kind === "list" && result.items).toEqual([+ primitiveValue("string", "Standup"),+ primitiveValue("string", "Review")+ ]);+ });++ it("projects through a dotted path into a nested object", async () => {+ const result = output(+ await run({ operation: "pluck", field: "organizer.email" })+ );+ expect(result?.kind === "list" && result.items).toEqual([+ primitiveValue("string", "[email protected]"),+ primitiveValue("string", "[email protected]")+ ]);+ });++ // The reason `flatten` is a flag rather than an operation: `list<list<T>>` has+ // no representation, so the flat list is built directly, never nested.+ it("flattens a list-valued field into one flat list", async () => {+ const result = output(+ await run({ operation: "pluck", field: "attendees", flatten: true })+ );+ expect(result?.kind === "list" && result.items).toEqual([+ primitiveValue("string", "[email protected]"),+ primitiveValue("string", "[email protected]"),+ primitiveValue("string", "[email protected]")+ ]);+ });++ // Flattening can produce more values than a list may hold. The run history+ // used to say "Took 120 values" over a list holding 100.+ it("says how many flattened values the list cap dropped", async () => {+ const many = Array.from({ length: 60 }, (_, i) =>+ event(`E${i}`, [`a${i}@x.co`, `b${i}@x.co`], "[email protected]")+ );+ const result = await run(+ { operation: "pluck", field: "attendees", flatten: true },+ many+ );+ expect(result.status).toBe("Succeeded");+ if (result.status !== "Succeeded") return;+ const list = result.outputs?.result;+ expect(list?.kind === "list" && list.items).toHaveLength(100);+ expect(result.summary).toBe("Took 120 values; kept the first 100.");+ const detail = result.detail;+ expect(detail?.kind === "data" && detail.cards[0]?.counts).toEqual({+ input: 60,+ output: 100,+ dropped: 20+ });+ });++ it("yields null for an item missing the field, not a shorter list", async () => {+ const partial = [+ EVENTS[0] as RuntimeValue,+ fromColumn(EVENT, { summary: null })+ ];+ const result = output(+ await run({ operation: "pluck", field: "summary" }, partial)+ );+ // Two items in, two values out — position is what lines a pluck up with+ // its source.+ expect(result?.kind === "list" && result.items).toHaveLength(2);+ expect(result?.kind === "list" && result.items[1]).toEqual({+ kind: "primitive",+ of: "null",+ value: null+ });+ });++ it("yields an empty list for an empty source", async () => {+ const result = output(+ await run({ operation: "pluck", field: "summary" }, [])+ );+ expect(result?.kind === "list" && result.items).toEqual([]);+ });+ });++ describe("join", () => {+ it("joins primitives into text", async () => {+ const list = listValue(t.string as never, [+ primitiveValue("string", "a"),+ primitiveValue("string", "b")+ ]).value;+ const ctx = createRuntimeContext({ outputs: { step: { items: list } } });+ const result = await filterExecutor.execute(+ node({ operation: "join" }),+ ctx+ );+ expect(output(result)).toEqual(primitiveValue("string", "a, b"));+ });++ // A null in the middle would otherwise render as ", , " — an empty slot reads+ // as a missing value, not as a blank one.+ it("drops nulls rather than leaving gaps", async () => {+ const list = listValue(t.string as never, [+ primitiveValue("string", "a"),+ { kind: "primitive", of: "null", value: null },+ primitiveValue("string", "b")+ ]).value;+ const ctx = createRuntimeContext({ outputs: { step: { items: list } } });+ const result = await filterExecutor.execute(+ node({ operation: "join" }),+ ctx+ );+ expect(output(result)).toEqual(primitiveValue("string", "a, b"));+ });++ it("joins an empty list to an empty string", async () => {+ // An empty list of TEXT, not of objects: a list of objects is refused+ // whether or not it has items, because an object has no reading as text.+ const list = listValue(t.string as never, []).value;+ const ctx = createRuntimeContext({ outputs: { step: { items: list } } });+ const result = await filterExecutor.execute(+ node({ operation: "join" }),+ ctx+ );+ expect(output(result)).toEqual(primitiveValue("string", ""));+ });++ it("refuses a list of objects, which have no reading as text", async () => {+ const result = await run({ operation: "join" });+ expect(result.status).toBe("Skipped");+ });+ });++ // Same absence as the definition side: a node saved before this field existed+ // reaches the engine with no `operation`, and must filter exactly as it always did.+ it("filters when the stored node has no operation at all", async () => {+ const legacy = node({});+ delete (legacy.data as { operation?: unknown }).operation;+ const list = listValue(EVENT, EVENTS).value;+ const ctx = createRuntimeContext({ outputs: { step: { items: list } } });+ const result = await filterExecutor.execute(legacy, ctx);+ expect(result.status).toBe("Succeeded");+ const value =+ result.status === "Succeeded" ? result.outputs?.result : undefined;+ // No clauses means everything is kept — today's behaviour, unchanged.+ expect(value?.kind === "list" && value.items).toHaveLength(2);+ });++ it("needs no permission — it only reshapes values already in the run", () => {+ expect(+ filterExecutor.permission(node({ operation: "count" }), {} as never)+ ).toBeUndefined();+ });+});diff --git a/packages/ee/src/workflows/runtime/executors.ts b/packages/ee/src/workflows/runtime/executors.tsindex 70cd990314..ad4fa6f12d 100644--- a/packages/ee/src/workflows/runtime/executors.ts+++ b/packages/ee/src/workflows/runtime/executors.ts@@ -7,6 +7,7 @@ import { actionExecutor } from "./action";import { computeExecutor } from "./compute";import { conditionExecutor } from "./condition";import { filterExecutor } from "./filter";+import { integrationExecutor } from "./integration";import { lookupExecutor } from "./lookup";import type { NodeExecutor } from "./types";@@ -19,6 +20,7 @@ const EXECUTORS: {compute: computeExecutor,condition: conditionExecutor,filter: filterExecutor,+ integration: integrationExecutor,lookup: lookupExecutor};diff --git a/packages/ee/src/workflows/runtime/filter.test.ts b/packages/ee/src/workflows/runtime/filter.test.tsindex 4a214c3d07..bfc40e5e2f 100644--- a/packages/ee/src/workflows/runtime/filter.test.ts+++ b/packages/ee/src/workflows/runtime/filter.test.ts@@ -31,7 +31,11 @@ const dueBefore: Clause[] = [}];-const node = (clauses: Clause[], source = true): FilterNode => ({+const node = (+ clauses: Clause[],+ source = true,+ data: Partial<FilterNode["data"]> = {}+): FilterNode => ({id: "f1",name: "f1",type: "filter",@@ -41,7 +45,10 @@ const node = (clauses: Clause[], source = true): FilterNode => ({? { kind: "ref", nodeId: "find", output: "result", path: [] }: undefined,combinator: "and",- clauses+ clauses,+ operation: "filter",+ flatten: false,+ ...data}});@@ -102,7 +109,7 @@ describe("filterExecutor", () => {it("skips when no list was chosen", async () => {expect(await filterExecutor.execute(node([], false), createRuntimeContext())- ).toEqual({ status: "Skipped", reason: "No list was chosen to filter." });+ ).toEqual({ status: "Skipped", reason: "No list was chosen." });});});diff --git a/packages/ee/src/workflows/runtime/filter.ts b/packages/ee/src/workflows/runtime/filter.tsindex 8aaa6f100f..2fa429eea1 100644--- a/packages/ee/src/workflows/runtime/filter.ts+++ b/packages/ee/src/workflows/runtime/filter.ts@@ -2,15 +2,29 @@// Carbon Enterprise file, licensed only under the Carbon Commercial License// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.+import {+ type CardRefusal,+ cardResultType,+ cardsOf,+ DATA_OPERATIONS+} from "../definition/data-operations";import {DEFAULT_HANDLE,DEFAULT_OUTPUT,- type FilterNode+ type FilterNode,+ type OperationCard} from "../definition/schema";+import type { ScalarType } from "../definition/types";import { evaluateClauses } from "./compare";-import { resolveRef } from "./resolve";-import type { NodeExecutor, RuntimeValue } from "./types";-import { listValue } from "./values";+import { renderPart, resolveRef, walk } from "./resolve";+import type {+ NodeDetail,+ NodeExecutor,+ NodeResult,+ RuntimeContext,+ RuntimeValue+} from "./types";+import { listValue, nullValue, primitiveValue } from "./values";export function filterSummary(kept: number,@@ -23,44 +37,255 @@ export function filterSummary(: `Kept ${kept} of ${total}; ${unresolved} could not be checked.`;}+function succeeded(value: RuntimeValue, summary: string): NodeResult {+ return {+ status: "Succeeded",+ outputs: { [DEFAULT_OUTPUT]: value },+ handle: DEFAULT_HANDLE,+ summary+ };+}++/** Walks a dotted field path through one item.+ *+ * `walk` is the SAME path walker the variable resolver uses, so a pluck reads a field+ * exactly as a `{{ ref }}` would: inline for a record, and through the catalog and the+ * entity loader for a Carbon record. Handling only records here silently turned a+ * pluck over a list of entities — which the validator, `walkPath` and the builder all+ * allow — into a list of nulls.+ *+ * A path that does not resolve is null for that item rather than a failed step: one+ * absent field must not lose the whole list. */+async function pick(+ item: RuntimeValue,+ path: string[],+ ctx: RuntimeContext+): Promise<RuntimeValue> {+ const walked = await walk(item, path, ctx);+ return walked.ok ? walked.value : nullValue();+}++async function runFilterCard(+ card: OperationCard,+ ctx: RuntimeContext,+ items: RuntimeValue[],+ of: ScalarType+): Promise<CardOutcome> {+ const kept: RuntimeValue[] = [];+ let unresolved = 0;++ for (const item of items) {+ const result = await evaluateClauses(card.clauses, card.combinator, {+ ...ctx,+ item+ });+ // One unreadable item drops out; it never stops the whole list.+ if (!result.ok) {+ unresolved += 1;+ continue;+ }+ if (result.passed) kept.push(item);+ }++ return {+ ok: true,+ value: listValue(of, kept).value,+ summary: filterSummary(kept.length, items.length, unresolved),+ counts: { input: items.length, output: kept.length, unresolved }+ };+}++/** One card's verdict: a value handed to the next card, or the reason it could+ * not run — which skips the whole node, since everything after it is starved. */+type CardOutcome =+ | { ok: true; value: RuntimeValue; summary: string; counts: CardCounts }+ | { ok: false; refusal: CardRefusal };++type CardCounts = NonNullable<+ Extract<NodeDetail, { kind: "data" }>["cards"][number]["counts"]+>;++/** The skip reason for each refusal, worded for the run history. */+const REFUSAL_REASONS: Record<CardRefusal, string> = {+ "not-a-list": "This step expected a list.",+ "no-fields": "The items in that list have no fields to take.",+ "no-field-chosen": "No field was chosen to take.",+ "unknown-field": "The items in that list have no field by that name.",+ "nested-list":+ "That field holds a list of its own. Turn on flattening to take it.",+ "not-text": "The items in that list have no reading as text."+};++/** One operation against one incoming value. A draft is never validated, so the+ * runtime asks `cardResultType` the validator's own question before it runs. */+async function runCard(+ card: OperationCard,+ input: RuntimeValue,+ ctx: RuntimeContext+): Promise<CardOutcome> {+ if (input.kind !== "list") {+ return { ok: false, refusal: "not-a-list" };+ }+ const items = input.items;+ const of = input.of;+ // The declared type decides up front, not the data: an EMPTY source has no+ // item to trip a per-value guard, so an unflattened list field would otherwise+ // slip through as an empty list instead of the same refusal.+ const typed = cardResultType(card, { kind: "list", of }, ctx.catalog);+ if ("refusal" in typed) {+ return { ok: false, refusal: typed.refusal };+ }++ switch (card.operation) {+ case "filter":+ return runFilterCard(card, ctx, items, of);++ case "count":+ return {+ ok: true,+ value: primitiveValue("number", items.length),+ summary: `Counted ${items.length}.`,+ counts: { input: items.length }+ };++ case "first":+ case "last": {+ const item =+ card.operation === "first" ? items[0] : items[items.length - 1];+ // An empty list is not a failure — the branch below simply reads nothing.+ return {+ ok: true,+ value: item ?? nullValue(),+ summary:+ item === undefined+ ? "That list was empty."+ : `Took the ${card.operation} of ${items.length}.`,+ counts: { input: items.length }+ };+ }++ case "pluck": {+ const path = (card.field ?? "").split(".");+ const picked: RuntimeValue[] = [];+ for (const item of items) {+ const value = await pick(item, path, ctx);+ // Flattening happens HERE, as the values are produced: a list of lists+ // has no type to be returned as, so it is never built in the first place.+ if (value.kind === "list") {+ if (card.flatten) {+ picked.push(...value.items);+ continue;+ }+ // The data disagrees with the declared type: unflattened, this would+ // BE that unrepresentable `list<list<T>>`.+ return { ok: false, refusal: "nested-list" };+ }+ picked.push(value);+ }+ // The declared element type the builder promised, not one guessed from the+ // data. A pluck is always typed as a list.+ const elementType: ScalarType =+ typed.type.kind === "list" ? typed.type.of : typed.type;+ // Flattening can grow the list past MAX_LIST_ITEMS; say so rather than+ // report values the output no longer holds.+ const { value, dropped } = listValue(elementType, picked);+ const kept = picked.length - dropped;+ return {+ ok: true,+ value,+ summary:+ dropped === 0+ ? `Took ${picked.length} values.`+ : `Took ${picked.length} values; kept the first ${kept}.`,+ counts: {+ input: items.length,+ output: kept,+ ...(dropped === 0 ? {} : { dropped })+ }+ };+ }++ case "join": {+ // `renderPart`, not `renderValue`: a Carbon record reads as its display name+ // through the loader, exactly as it would inside a message. The synchronous+ // renderer only sees an inline snapshot, so entities joined as raw ids.+ const parts: string[] = [];+ for (const item of items) parts.push(await renderPart(item, ctx));+ const text = parts.filter((part) => part !== "").join(", ");+ return {+ ok: true,+ value: primitiveValue("string", text),+ summary: `Joined ${items.length} values.`,+ counts: { input: items.length }+ };+ }+ }+}++/**+ * The data node: a chain of operation cards — filter, count, first/last, pluck+ * or join — each feeding the next, the last one's result being the node output.+ *+ * Needs no permission — it only reshapes values already in the run, which an+ * upstream node fetched under its own check.+ */export const filterExecutor: NodeExecutor<FilterNode> = {permission: () => undefined,execute: async (node, ctx) => {if (node.data.source === undefined) {- return { status: "Skipped", reason: "No list was chosen to filter." };+ return { status: "Skipped", reason: "No list was chosen." };}const source = await resolveRef(node.data.source, ctx);if (!source.ok) return { status: "Skipped", reason: source.reason };if (source.value.kind !== "list") {- return { status: "Skipped", reason: "This step expected a list." };+ return { status: "Skipped", reason: REFUSAL_REASONS["not-a-list"] };}ctx.record?.("source", source.value);- const items = source.value.items;- const kept: RuntimeValue[] = [];- let unresolved = 0;-- for (const item of items) {- const result = await evaluateClauses(- node.data.clauses,- node.data.combinator,- { ...ctx, item }- );- // One unreadable item drops out; it never stops the whole list.- if (!result.ok) {- unresolved += 1;- continue;+ const cards = cardsOf(node);+ const rows: Extract<NodeDetail, { kind: "data" }>["cards"] = [];+ let current: RuntimeValue = source.value;+ let summary = "";++ for (const [index, card] of cards.entries()) {+ const outcome = await runCard(card, current, ctx);++ if (!outcome.ok) {+ const reason = REFUSAL_REASONS[outcome.refusal];+ rows.push({+ id: card.id,+ operation: card.operation,+ summary: reason,+ status: "Skipped",+ refusal: outcome.refusal+ });+ return {+ status: "Skipped",+ // One card is the whole node — naming "Step 1" there is noise.+ reason:+ cards.length === 1+ ? reason+ : `Step ${index + 1} (${DATA_OPERATIONS[card.operation].label}): ${reason}`,+ detail: { kind: "data", cards: rows }+ };}- if (result.passed) kept.push(item);++ rows.push({+ id: card.id,+ operation: card.operation,+ summary: outcome.summary,+ status: "Succeeded",+ counts: outcome.counts+ });+ current = outcome.value;+ summary = outcome.summary;}return {- status: "Succeeded",- outputs: { [DEFAULT_OUTPUT]: listValue(source.value.of, kept).value },- handle: DEFAULT_HANDLE,- summary: filterSummary(kept.length, items.length, unresolved)+ ...succeeded(current, summary),+ detail: { kind: "data", cards: rows }};}};diff --git a/packages/ee/src/workflows/runtime/fixtures.ts b/packages/ee/src/workflows/runtime/fixtures.tsindex 3ff35f2124..ccc4cd8570 100644--- a/packages/ee/src/workflows/runtime/fixtures.ts+++ b/packages/ee/src/workflows/runtime/fixtures.ts@@ -24,6 +24,7 @@ export function createFixtureServices(): WorkflowServices {return {runAction: async () => NOT_STUBBED,+ runIntegration: async () => NOT_STUBBED,runOperation: async () => NOT_STUBBED,search: async () => NOT_STUBBED,...overridesdiff --git a/packages/ee/src/workflows/runtime/index.ts b/packages/ee/src/workflows/runtime/index.tsindex d44c61fc61..62e8904f79 100644--- a/packages/ee/src/workflows/runtime/index.ts+++ b/packages/ee/src/workflows/runtime/index.ts@@ -35,6 +35,7 @@ export type {export {entityValue,fromColumn,+ fromJson,fromLiteral,isNull,listValue,diff --git a/packages/ee/src/workflows/runtime/integration.test.ts b/packages/ee/src/workflows/runtime/integration.test.tsnew file mode 100644index 0000000000..b1a849ce7f--- /dev/null+++ b/packages/ee/src/workflows/runtime/integration.test.ts@@ -0,0 +1,222 @@+// SPDX-License-Identifier: LicenseRef-Carbon-Commercial+// Carbon Enterprise file, licensed only under the Carbon Commercial License+// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.++import { describe, expect, it, vi } from "vitest";+import type {+ CatalogIntegration,+ WorkflowCatalog+} from "../definition/catalog";+import type { IntegrationNode } from "../definition/schema";+import { t } from "../definition/types";+import { createRuntimeContext } from "./fixtures";+import { integrationExecutor } from "./integration";+import type { WorkflowServices } from "./types";++const STEP: CatalogIntegration = {+ id: "integration.google-calendar.create_google_calendar_event",+ inputs: {+ connectionId: { type: t.string, required: true },+ title: { type: t.string, required: true }+ },+ outputs: { result: t.string },+ batchable: false,+ permission: { module: "workflows", action: "update" },+ piece: { name: "google-calendar", action: "create_google_calendar_event" }+};++const node = (+ data: Partial<IntegrationNode["data"]> = {}+): IntegrationNode => ({+ id: "step",+ name: "integration_0",+ type: "integration",+ position: { x: 0, y: 0 },+ data: {+ piece: "google-calendar",+ action: "create_google_calendar_event",+ inputs: {+ connectionId: { kind: "literal", type: t.string, value: "icn_1" },+ title: { kind: "literal", type: t.string, value: "Kickoff" }+ },+ ...data+ }+});++/** A catalog that answers for the one step above and nothing else. */+function catalogWith(step: CatalogIntegration | undefined): WorkflowCatalog {+ const base = createRuntimeContext().catalog;+ return {+ ...base,+ getIntegration: (id) => (id === STEP.id ? step : undefined)+ };+}++describe("integrationExecutor", () => {+ it("runs the piece its catalog entry names and reports the result", async () => {+ const runIntegration = vi.fn(async () => ({+ ok: true as const,+ outputs: {+ result: {+ kind: "primitive" as const,+ of: "string" as const,+ value: "{}"+ }+ }+ }));+ const ctx = createRuntimeContext({ services: { runIntegration } });++ const outcome = await integrationExecutor.execute(node(), {+ ...ctx,+ catalog: catalogWith(STEP)+ });++ // The piece comes off the catalog entry, never off the node's id.+ expect(runIntegration).toHaveBeenCalledWith(STEP.piece, {+ connectionId: { kind: "primitive", of: "string", value: "icn_1" },+ title: { kind: "primitive", of: "string", value: "Kickoff" }+ });+ expect(outcome.status).toBe("Succeeded");+ });++ it("skips rather than fails when the step is no longer offered", async () => {+ const ctx = createRuntimeContext();+ const outcome = await integrationExecutor.execute(node(), {+ ...ctx,+ catalog: catalogWith(undefined)+ });++ expect(outcome).toEqual({+ status: "Skipped",+ reason: "This integration step is no longer available."+ });+ });++ it("gates on the permission its catalog entry carries", () => {+ expect(integrationExecutor.permission(node(), catalogWith(STEP))).toEqual({+ module: "workflows",+ action: "update"+ });+ expect(+ integrationExecutor.permission(node(), catalogWith(undefined))+ ).toBeUndefined();+ });+ describe("record links", () => {+ const LINKED: CatalogIntegration = {+ ...STEP,+ inputs: {+ connectionId: { type: t.string, required: true },+ text: {+ type: t.string,+ required: false,+ links: { format: "slack" }+ },+ body: {+ type: t.string,+ required: false,+ links: {+ format: "html",+ when: { input: "body_type", equals: ["html"] }+ }+ }+ },+ advancedInputs: {+ body_type: {+ type: t.string,+ required: false,+ defaultValue: "plain_text"+ }+ }+ };++ const orderTemplate = {+ kind: "template" as const,+ parts: [+ { kind: "text" as const, text: "See " },+ { kind: "ref" as const, nodeId: "trigger", output: "record", path: [] }+ ]+ };++ const linkedCtx = (runIntegration: WorkflowServices["runIntegration"]) => {+ const base = createRuntimeContext({+ outputs: {+ trigger: {+ record: {+ kind: "entity" as const,+ of: "purchaseOrder",+ id: "po_1",+ row: { purchaseOrderId: "PO000123" }+ }+ }+ },+ services: { runIntegration },+ linkFor: (of: string, id: string) => `https://erp.test/${of}/${id}`+ });+ return { ...base, catalog: catalogWith(LINKED) };+ };++ const run = () => vi.fn(async () => ({ ok: true as const, outputs: {} }));++ it("always links slack-format text", async () => {+ const runIntegration = run();+ await integrationExecutor.execute(+ node({+ inputs: {+ connectionId: { kind: "literal", type: t.string, value: "icn_1" },+ text: orderTemplate+ }+ }),+ linkedCtx(runIntegration)+ );+ expect(runIntegration).toHaveBeenCalledWith(LINKED.piece, {+ connectionId: { kind: "primitive", of: "string", value: "icn_1" },+ text: {+ kind: "primitive",+ of: "string",+ value: "See <https://erp.test/purchaseOrder/po_1|PO000123>"+ }+ });+ });++ it("renders plain text while the gate sibling holds its default", async () => {+ const runIntegration = run();+ await integrationExecutor.execute(+ node({+ inputs: {+ connectionId: { kind: "literal", type: t.string, value: "icn_1" },+ body: orderTemplate+ }+ }),+ linkedCtx(runIntegration)+ );+ expect(runIntegration).toHaveBeenCalledWith(LINKED.piece, {+ connectionId: { kind: "primitive", of: "string", value: "icn_1" },+ body: { kind: "primitive", of: "string", value: "See PO000123" }+ });+ });++ it("renders an html anchor once the author sets the gate sibling", async () => {+ const runIntegration = run();+ await integrationExecutor.execute(+ node({+ inputs: {+ connectionId: { kind: "literal", type: t.string, value: "icn_1" },+ body: orderTemplate,+ body_type: { kind: "literal", type: t.string, value: "html" }+ }+ }),+ linkedCtx(runIntegration)+ );+ expect(runIntegration).toHaveBeenCalledWith(LINKED.piece, {+ connectionId: { kind: "primitive", of: "string", value: "icn_1" },+ body: {+ kind: "primitive",+ of: "string",+ value:+ 'See <a href="https://erp.test/purchaseOrder/po_1">PO000123</a>'+ },+ body_type: { kind: "primitive", of: "string", value: "html" }+ });+ });+ });+});diff --git a/packages/ee/src/workflows/runtime/integration.ts b/packages/ee/src/workflows/runtime/integration.tsnew file mode 100644index 0000000000..9443479932--- /dev/null+++ b/packages/ee/src/workflows/runtime/integration.ts@@ -0,0 +1,55 @@+// SPDX-License-Identifier: LicenseRef-Carbon-Commercial+// Carbon Enterprise file, licensed only under the Carbon Commercial License+// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.++import { integrationStepId } from "../definition/catalog";+import {+ FAILURE_HANDLE,+ type IntegrationNode,+ SUCCESS_HANDLE+} from "../definition/schema";+import { resolveStepInputs } from "./resolve";+import type { NodeExecutor } from "./types";++const GONE = "This integration step is no longer available.";++/**+ * One step of a third-party integration. Deliberately separate from the action+ * executor: which piece it runs comes off its own catalog entry, so neither the+ * action path nor this one has to ask what the other kind is.+ *+ * One item only — batching belongs to the engine, which calls this once per item.+ */+export const integrationExecutor: NodeExecutor<IntegrationNode> = {+ permission: (node, catalog) =>+ catalog.getIntegration(integrationStepId(node.data.piece, node.data.action))+ ?.permission,++ execute: async (node, ctx) => {+ const id = integrationStepId(node.data.piece, node.data.action);+ const step = ctx.catalog.getIntegration(id);+ if (step === undefined) return { status: "Skipped", reason: GONE };++ const resolved = await resolveStepInputs(+ node.data.inputs,+ { ...step.inputs, ...step.advancedInputs },+ ctx+ );+ if (!resolved.ok) return { status: "Skipped", reason: resolved.reason };++ const outcome = await ctx.services.runIntegration(+ step.piece,+ resolved.inputs+ );+ if (!outcome.ok) {+ return { status: "Failed", error: outcome.error, handle: FAILURE_HANDLE };+ }++ return {+ status: "Succeeded",+ outputs: outcome.outputs,+ handle: SUCCESS_HANDLE,+ ...(outcome.summary === undefined ? {} : { summary: outcome.summary })+ };+ }+};diff --git a/packages/ee/src/workflows/runtime/record.test.ts b/packages/ee/src/workflows/runtime/record.test.tsnew file mode 100644index 0000000000..b077d91dc0--- /dev/null+++ b/packages/ee/src/workflows/runtime/record.test.ts@@ -0,0 +1,157 @@+// SPDX-License-Identifier: LicenseRef-Carbon-Commercial+// Carbon Enterprise file, licensed only under the Carbon Commercial License+// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.++import { describe, expect, it } from "vitest";+import { MAX_LIST_ITEMS } from "../definition/schema";+import { t } from "../definition/types";+import { createRuntimeContext } from "./fixtures";+import { resolveRef } from "./resolve";+import type { EntityLoader, RuntimeValue } from "./types";+import { fromColumn } from "./values";++const EVENT = {+ kind: "record" as const,+ fields: {+ summary: t.string,+ startDateTime: t.date,+ organizer: { kind: "record" as const, fields: { email: t.string } }+ }+};++/** Fails the test if anything tries to read a row — records carry their data inline. */+const explodingLoader: EntityLoader = {+ load: async () => {+ throw new Error("the loader must never be reached for a record");+ }+};++function fieldOf(value: RuntimeValue, name: string): RuntimeValue | undefined {+ return value.kind === "record" ? value.fields[name] : undefined;+}++describe("record runtime values", () => {+ describe("fromColumn", () => {+ it("shapes a plain object against the declared fields", () => {+ const value = fromColumn(EVENT, {+ summary: "Standup",+ startDateTime: "2026-08-31T09:00:00.000Z",+ organizer: { email: "[email protected]" }+ });+ expect(fieldOf(value, "summary")).toEqual({+ kind: "primitive",+ of: "string",+ value: "Standup"+ });+ expect(+ fieldOf(fieldOf(value, "organizer") as RuntimeValue, "email")+ ).toEqual({ kind: "primitive", of: "string", value: "[email protected]" });+ });++ // The vendor's schema is unvalidated upstream, so a field it promised but did+ // not send must degrade rather than throw.+ it("turns a field the response omitted into null, not an absent key", () => {+ const value = fromColumn(EVENT, { summary: "Standup" });+ expect(fieldOf(value, "organizer")?.kind).toBe("record");+ // Absence is the canonical null value, not a typed blank.+ expect(fieldOf(value, "startDateTime")).toEqual({+ kind: "primitive",+ of: "null",+ value: null+ });+ });++ // Driven by declared fields, so a vendor cannot smuggle extra data into a+ // typed value — it would otherwise land in the run log unredacted.+ it("drops keys the type does not declare", () => {+ const value = fromColumn(EVENT, {+ summary: "Standup",+ internalToken: "sk-secret"+ });+ expect(value.kind === "record" && "internalToken" in value.fields).toBe(+ false+ );+ });++ it("coerces a wrong-typed field to null rather than passing it through", () => {+ const value = fromColumn(EVENT, { startDateTime: "not a date" });+ expect(fieldOf(value, "startDateTime")).toEqual({+ kind: "primitive",+ of: "null",+ value: null+ });+ });++ it("treats a non-object as a record of nulls", () => {+ for (const raw of [null, undefined, "text", 42, []]) {+ const value = fromColumn(EVENT, raw);+ expect(value.kind).toBe("record");+ expect(fieldOf(value, "summary")).toEqual({+ kind: "primitive",+ of: "null",+ value: null+ });+ }+ });++ it("caps a list of records at MAX_LIST_ITEMS", () => {+ const many = Array.from({ length: MAX_LIST_ITEMS + 25 }, (_, i) => ({+ summary: `Event ${i}`+ }));+ const value = fromColumn(t.list(EVENT), many);+ expect(value.kind === "list" && value.items.length).toBe(MAX_LIST_ITEMS);+ });+ });++ describe("walking a path", () => {+ const outputs = {+ step: { items: fromColumn(EVENT, { organizer: { email: "[email protected]" } }) }+ };++ it("reaches a nested field without touching the loader", async () => {+ const ctx = createRuntimeContext({ outputs });+ const result = await resolveRef(+ {+ kind: "ref",+ nodeId: "step",+ output: "items",+ path: ["organizer", "email"]+ },+ { ...ctx, loader: explodingLoader }+ );+ expect(result).toEqual({+ ok: true,+ value: { kind: "primitive", of: "string", value: "[email protected]" }+ });+ });++ // A declared-but-absent path resolves to nothing rather than failing the step.+ it("resolves an undeclared field to null instead of erroring", async () => {+ const ctx = createRuntimeContext({ outputs });+ const result = await resolveRef(+ { kind: "ref", nodeId: "step", output: "items", path: ["location"] },+ { ...ctx, loader: explodingLoader }+ );+ expect(result).toEqual({+ ok: true,+ value: { kind: "primitive", of: "null", value: null }+ });+ });++ it("stops at null rather than walking past it", async () => {+ const ctx = createRuntimeContext({+ outputs: { step: { items: fromColumn(EVENT, {}) } }+ });+ const result = await resolveRef(+ {+ kind: "ref",+ nodeId: "step",+ output: "items",+ path: ["summary", "deeper"]+ },+ { ...ctx, loader: explodingLoader }+ );+ expect(result.ok).toBe(true);+ });+ });+});diff --git a/packages/ee/src/workflows/runtime/resolve.ts b/packages/ee/src/workflows/runtime/resolve.tsindex 0e1b113922..b0754138b0 100644--- a/packages/ee/src/workflows/runtime/resolve.ts+++ b/packages/ee/src/workflows/runtime/resolve.ts@@ -2,6 +2,8 @@// Carbon Enterprise file, licensed only under the Carbon Commercial License// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.+import type { CatalogInput, LinkFormat } from "../definition/catalog";+import { linkState } from "../definition/links";import type {ItemRef,Pairs,@@ -14,6 +16,7 @@ import {fromColumn,fromLiteral,isNull,+ nullValue,pairsValue,primitiveValue} from "./values";@@ -54,8 +57,9 @@ export function renderValue(value: RuntimeValue): string {if (value.kind === "list") return value.items.map(renderValue).join(", ");if (value.kind === "entity")return pickDisplay(value.row, INLINE_ENTITY_COLUMNS) ?? value.id;- // Rows have no reading as a sentence; nothing writes one into text.- if (value.kind === "pairs") return "";+ // Neither rows nor objects have a reading as a sentence, and `rendersAsText`+ // keeps both out of a template — this is the belt to that suspenders.+ if (value.kind === "pairs" || value.kind === "record") return "";return value.value === null ? "" : String(value.value);}@@ -68,7 +72,12 @@ async function entityText(value: Extract<RuntimeValue, { kind: "entity" }>,ctx: RuntimeContext): Promise<string> {- const columns = ctx.catalog.getEntity(value.of)?.display ?? [];+ // The catalog's own display columns first, then the conventional ones: an entity+ // that declares none still reads by the name it carries rather than by its id.+ const columns = [+ ...(ctx.catalog.getEntity(value.of)?.display ?? []),+ ...INLINE_ENTITY_COLUMNS+ ];return (pickDisplay(value.row, columns) ??pickDisplay(await ctx.loader.load(value.of, value.id), columns) ??@@ -76,33 +85,85 @@ async function entityText();}+const escapeHtml = (raw: string) =>+ raw+ .replaceAll("&", "&")+ .replaceAll("<", "<")+ .replaceAll(">", ">")+ .replaceAll('"', """);++// Slack mrkdwn: `&`, `<`, `>` are the only escapes. Unescaped, a value holding+// `<!channel>` pings the channel and `<url|text>` becomes a link.+const escapeSlack = (raw: string) =>+ raw.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">");++/** How a value that is not a link reads in each dialect. A value is customer data,+ * never markup: in an html body or a Slack message it is escaped, so a customer+ * named `AT&T <Sales>` reads as written. Markdown is Carbon's own notification+ * renderer, which already treats it as text. */+const TEXT_ESCAPERS: Record<LinkFormat, (text: string) => string> = {+ markdown: (text) => text,+ slack: escapeSlack,+ html: escapeHtml+};++/** One entry per destination dialect. A record's NAME is customer data, so each+ * renderer sanitises the label until it cannot break out of its own link; the href+ * is Carbon's own URL from `linkFor`, never user text. */+const LINK_RENDERERS: Record<+ LinkFormat,+ (label: string, href: string) => string+> = {+ // The link matcher's label cannot hold a `]` and honours no backslash escape, so a+ // record named `PO](…)` would end the label early and pick the destination itself.+ // Drop the brackets; a name that is nothing but brackets stays unlinked.+ markdown: (label, href) => {+ const clean = label.replace(/[[\]]/g, "").trim();+ return clean === "" ? label : `[${clean}](${href})`;+ },+ // Slack mrkdwn `<url|label>`: `&`, `<`, `>` are the only escapes and `|` would end+ // the label early, so it is dropped the way markdown drops brackets.+ slack: (label, href) => {+ const clean = escapeSlack(label).replaceAll("|", "");+ return clean.trim() === "" ? escapeSlack(label) : `<${href}|${clean}>`;+ },+ html: (label, href) =>+ `<a href="${escapeHtml(href)}">${escapeHtml(label)}</a>`+};++/** How a template turns a record into a link: where it lives, and in whose dialect. */+export interface RenderOptions {+ linkFor?: (of: string, id: string) => string | null;+ /** Defaults to markdown — the dialect Carbon's own notification renderer reads. */+ format?: LinkFormat;+}+/**- * A record in prose reads as its name, and becomes a markdown link when the caller knows- * where it lives. Every other value renders exactly as `renderValue` does — a LIST of- * records never reaches here, because `rendersAsText` refuses one as a template part.+ * A record in prose reads as its name, and becomes a link when the caller knows+ * where it lives — in the destination's own dialect. Every other value renders+ * as `renderValue` does, escaped for the dialect — a LIST of records never+ * reaches here, because `rendersAsText` refuses one as a template part.*/-async function renderPart(+export async function renderPart(value: RuntimeValue,ctx: RuntimeContext,- linkFor?: (of: string, id: string) => string | null+ options?: RenderOptions): Promise<string> {- if (value.kind !== "entity") return renderValue(value);+ const format = options?.format ?? "markdown";+ const escape = TEXT_ESCAPERS[format];+ if (value.kind !== "entity") return escape(renderValue(value));const text = await entityText(value, ctx);- if (linkFor === undefined || text === "") return text;- const href = linkFor(value.of, value.id);- if (href === null) return text;- // The link matcher's label cannot hold a `]` and honours no backslash escape, so a record- // named `PO](…)` would end the label early and pick the destination itself. Drop the- // brackets; a name that is nothing but brackets stays unlinked.- const label = text.replace(/[[\]]/g, "").trim();- return label === "" ? text : `[${label}](${href})`;+ if (options?.linkFor === undefined || text === "") return escape(text);+ const href = options.linkFor(value.of, value.id);+ if (href === null) return escape(text);+ return LINK_RENDERERS[format](text, href);}/** An unresolvable part fails the whole template; a blank would be a silent lie. */export async function renderTemplate(template: Template,ctx: RuntimeContext,- options?: { linkFor?: (of: string, id: string) => string | null }+ options?: RenderOptions): Promise<Resolution> {const pieces: string[] = [];for (const part of template.parts) {@@ -115,7 +176,7 @@ export async function renderTemplate(? await resolveItem(part, ctx): await resolveRef(part, ctx);if (!resolved.ok) return resolved;- pieces.push(await renderPart(resolved.value, ctx, options?.linkFor));+ pieces.push(await renderPart(resolved.value, ctx, options));}return { ok: true, value: primitiveValue("string", pieces.join("")) };}@@ -165,7 +226,7 @@ export async function resolveItem(}/** A null anywhere along the path ends the walk as null rather than failing. */-async function walk(+export async function walk(start: RuntimeValue,path: string[],ctx: RuntimeContext@@ -175,6 +236,14 @@ async function walk(for (const segment of path) {if (isNull(current)) return { ok: true, value: current };+ // A record holds its data inline, so there is nothing to load. A field the+ // vendor did not send reads as null rather than failing the step — the schema+ // it was declared from is the vendor's, and nothing validates it.+ if (current.kind === "record") {+ current = current.fields[segment] ?? nullValue();+ continue;+ }+if (current.kind !== "entity") {return {ok: false,@@ -208,3 +277,47 @@ async function walk(return { ok: true, value: current };}++/**+ * A step's inputs, resolved for one run of it — shared by the action and the+ * integration executors so the two kinds cannot drift apart. `declared` is every+ * input the step declares.+ *+ * A record in prose becomes a link only where the catalog declares `links` (and+ * its gate holds — see `linkState`) and the engine supplied a resolver; everything+ * else renders as plain text, so a link can never ship to a field that would show+ * it as literal markup (a webhook body, a vendor's plain-text field).+ */+export async function resolveStepInputs(+ inputs: Record<string, ValueOrRef>,+ declared: Record<string, CatalogInput>,+ ctx: RuntimeContext+): Promise<+ | { ok: true; inputs: Record<string, RuntimeValue> }+ | { ok: false; reason: string }+> {+ const resolved: Record<string, RuntimeValue> = {};+ for (const [name, value] of Object.entries(inputs)) {+ const link = linkState(inputs, declared, name);+ const result =+ link.kind === "linked" && value.kind === "template"+ ? await renderTemplate(value, ctx, {+ linkFor: ctx.linkFor,+ format: link.format+ })+ : await resolveValue(value, ctx);+ if (!result.ok) return result;+ // In a batch the one list input stands for the item this turn is on. Only a+ // slot declared single-valued can be that input (`batchCandidates`); a slot+ // declared as a list keeps its list, or a real list input on the same step+ // would be replaced by the item on every turn.+ resolved[name] =+ ctx.item !== undefined &&+ result.value.kind === "list" &&+ declared[name]?.type.kind !== "list"+ ? ctx.item+ : result.value;+ ctx.record?.(name, resolved[name]);+ }+ return { ok: true, inputs: resolved };+}diff --git a/packages/ee/src/workflows/runtime/template.test.ts b/packages/ee/src/workflows/runtime/template.test.tsindex 89cd83a73d..114a444647 100644--- a/packages/ee/src/workflows/runtime/template.test.ts+++ b/packages/ee/src/workflows/runtime/template.test.ts@@ -200,6 +200,91 @@ describe("renderTemplate with a link resolver", () => {});});+ it("renders a slack link, and the label cannot break out of it", async () => {+ const ctx = createRuntimeContext({+ outputs: {+ n1: {+ record: entityValue("purchaseOrder", "po_1", {+ purchaseOrderId: "A|B<C>&D"+ })+ }+ }+ });+ const result = await renderTemplate(+ template(text("See "), ref("record")),+ ctx,+ {+ linkFor: () => "https://erp.test/link",+ format: "slack"+ }+ );++ expect(result).toEqual({+ ok: true,+ value: primitiveValue(+ "string",+ "See <https://erp.test/link|AB<C>&D>"+ )+ });+ });++ it("renders an html anchor with both slots escaped", async () => {+ const ctx = createRuntimeContext({+ outputs: {+ n1: {+ record: entityValue("purchaseOrder", "po_1", {+ purchaseOrderId: 'PO<b>"1"</b>'+ })+ }+ }+ });+ const result = await renderTemplate(template(ref("record")), ctx, {+ linkFor: () => 'https://erp.test/link?a=1&b="2"',+ format: "html"+ });++ expect(result).toEqual({+ ok: true,+ value: primitiveValue(+ "string",+ '<a href="https://erp.test/link?a=1&b="2"">PO<b>"1"</b></a>'+ )+ });+ });++ // Every value is customer data, not only a record's name: in an html body or a+ // Slack message it must not become markup, a link or a mention.+ it("escapes a plain value and an unlinked record in html and slack", async () => {+ const ctx = createRuntimeContext({+ outputs: {+ n1: {+ name: primitiveValue("string", 'AT&T <Sales> "HQ"'),+ record: entityValue("purchaseOrder", "po_1", {+ purchaseOrderId: "<!channel>"+ })+ }+ }+ });+ const parts = template(text("<p>"), ref("name"), text(" "), ref("record"));++ expect(+ await renderTemplate(parts, ctx, { linkFor: () => null, format: "html" })+ ).toEqual({+ ok: true,+ value: primitiveValue(+ "string",+ "<p>AT&T <Sales> "HQ" <!channel>"+ )+ });+ expect(await renderTemplate(parts, ctx, { format: "slack" })).toEqual({+ ok: true,+ value: primitiveValue(+ "string",+ '<p>AT&T <Sales> "HQ" <!channel>'+ )+ });+ });+// An entity with no page in the app: the id still reads, it just is not clickable.it("falls back to the plain id when the resolver returns null", async () => {const ctx = createRuntimeContext({diff --git a/packages/ee/src/workflows/runtime/types.ts b/packages/ee/src/workflows/runtime/types.tsindex 282663e46f..5c0c2302d6 100644--- a/packages/ee/src/workflows/runtime/types.ts+++ b/packages/ee/src/workflows/runtime/types.ts@@ -7,10 +7,12 @@ import type {RequiredPermission,WorkflowCatalog} from "../definition/catalog";+import type { CardRefusal, DataOperation } from "../definition/data-operations";import type { WorkflowNode } from "../definition/schema";import type {Combinator,PrimitiveKind,+ RecordType,ScalarType} from "../definition/types";@@ -24,6 +26,10 @@ export type RuntimeValue =// `row` holds a snapshot the loader cannot produce: "before" shares its id with "after".| { kind: "entity"; of: string; id: string; row?: Record<string, unknown> }| { kind: "list"; of: ScalarType; items: RuntimeValue[] }+ /** An object, with its data in hand. Carries `of` so a walk knows each field's+ * declared type without a catalog lookup — records are structural and registered+ * nowhere. Reading a field never touches the loader. */+ | { kind: "record"; of: RecordType; fields: Record<string, RuntimeValue> }/** Named rows, resolved. Runtime only — nothing declares it as a `ValueType`, so it is* never compared, looped over, or produced as a step output. It exists so a resolved* header set stays recognisable to the log redactor. */@@ -64,6 +70,12 @@ export interface WorkflowServices {actionId: string,inputs: Record<string, RuntimeValue>): Promise<ActionOutcome>;+ /** One step of a third-party integration. Takes the piece and its action off the+ * catalog entry rather than an id, so nothing job-side parses an id's shape. */+ runIntegration(+ piece: { name: string; action: string },+ inputs: Record<string, RuntimeValue>+ ): Promise<ActionOutcome>;runOperation(operationId: string,inputs: Record<string, RuntimeValue>@@ -87,7 +99,7 @@ export interface RuntimeContext {/** Called as each input resolves, so a step can report the values it used even* when the work it hands them to throws. The engine supplies it; tests may omit it. */record?: (key: string, value: RuntimeValue) => void;- /** Turns a record into an absolute URL, for the inputs the catalog marks `linkify`.+ /** Turns a record into an absolute URL, for the inputs the catalog declares `links` on.* Supplied by the engine, which may read ERP_URL — this package never builds a URL,* because it is bundled for the browser and has four runtime dependencies. */linkFor?: (of: string, id: string) => string | null;@@ -103,15 +115,40 @@ export type ClauseEvaluation = {};/** Why a node did what it did. Diagnostics, never node data. */-export type NodeDetail = {- kind: "condition";- paths: Array<{- pathId: string;- combinator: Combinator;- evaluations: ClauseEvaluation[];- taken: boolean;- }>;-};+export type NodeDetail =+ | {+ kind: "condition";+ paths: Array<{+ pathId: string;+ combinator: Combinator;+ evaluations: ClauseEvaluation[];+ taken: boolean;+ }>;+ }+ | {+ /** A data node's chain, one row per operation card, in run order. */+ kind: "data";+ cards: Array<{+ id: string;+ operation: DataOperation;+ /** English, for logs. The run history words a card from `counts` or+ * `refusal` instead. */+ summary: string;+ status: "Succeeded" | "Skipped";+ /** Why a Skipped card could not run, as a code the run history words. */+ refusal?: CardRefusal;+ /** What a Succeeded card's summary says, as numbers, so the run history+ * can word it in the reader's language: items in, items out (filter,+ * pluck), items a filter could not check, and values a flattened pluck+ * produced past the list cap and dropped. */+ counts?: {+ input: number;+ output?: number;+ unresolved?: number;+ dropped?: number;+ };+ }>;+ };export type NodeResult =| {diff --git a/packages/ee/src/workflows/runtime/values.ts b/packages/ee/src/workflows/runtime/values.tsindex 0f7d9615cd..cafe350d81 100644--- a/packages/ee/src/workflows/runtime/values.ts+++ b/packages/ee/src/workflows/runtime/values.ts@@ -2,13 +2,21 @@// Carbon Enterprise file, licensed only under the Carbon Commercial License// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.+import {+ parseAbsolute,+ parseDateTime,+ parseZonedDateTime,+ toZoned+} from "@internationalized/date";import { MAX_LIST_ITEMS } from "../definition/schema";import type {Literal,PrimitiveKind,+ RecordType,ScalarType,ValueType} from "../definition/types";+import { assertNever } from "../definition/types";import type { RuntimeValue } from "./types";export function primitiveValue(@@ -65,44 +73,161 @@ export function isNull(value: RuntimeValue): boolean {return value.kind === "primitive" && value.value === null;}+export function recordValue(+ of: RecordType,+ fields: Record<string, RuntimeValue>+): RuntimeValue {+ return { kind: "record", of, fields };+}+/** Coerces a raw database column value against its catalog type; anything unusable is null. */export function fromColumn(type: ValueType, raw: unknown): RuntimeValue {- if (type.kind === "list") {- if (!Array.isArray(raw)) return { kind: "list", of: type.of, items: [] };- return listValue(- type.of,- raw.map((entry) => fromColumn(type.of, entry))- ).value;- }-- if (raw === null || raw === undefined) return nullValue();-- if (type.kind === "entity") {- return raw === "" ? nullValue() : entityValue(type.of, String(raw));+ switch (type.kind) {+ case "list": {+ if (!Array.isArray(raw)) return { kind: "list", of: type.of, items: [] };+ return listValue(+ type.of,+ raw.map((entry) => fromColumn(type.of, entry))+ ).value;+ }+ case "entity": {+ if (raw === null || raw === undefined) return nullValue();+ return raw === "" ? nullValue() : entityValue(type.of, String(raw));+ }+ case "record": {+ // Driven by the DECLARED fields, not the raw object's keys, so a vendor+ // sending something extra cannot smuggle it into a typed value. A field the+ // response omits becomes null rather than absent, which is what lets a walk+ // into it answer "nothing" instead of failing.+ const source =+ raw !== null && typeof raw === "object" && !Array.isArray(raw)+ ? (raw as Record<string, unknown>)+ : {};+ const fields: Record<string, RuntimeValue> = {};+ for (const [name, fieldType] of Object.entries(type.fields)) {+ fields[name] = fromColumn(fieldType, source[name]);+ }+ return recordValue(type, fields);+ }+ case "primitive": {+ if (raw === null || raw === undefined) return nullValue();+ switch (type.of) {+ case "date": {+ const parsed = new Date(raw as string);+ return Number.isNaN(parsed.getTime())+ ? nullValue()+ : primitiveValue("date", parsed.toISOString());+ }+ case "number": {+ const parsed = Number(raw);+ return Number.isFinite(parsed)+ ? primitiveValue("number", parsed)+ : nullValue();+ }+ case "boolean":+ return primitiveValue("boolean", Boolean(raw));+ case "string":+ return primitiveValue("string", String(raw));+ case "null":+ return nullValue();+ }+ }+ default:+ return assertNever(type);}+}- switch (type.of) {- case "date": {- const parsed = new Date(raw as string);- return Number.isNaN(parsed.getTime())- ? nullValue()- : primitiveValue("date", parsed.toISOString());+/**+ * Coerces vendor JSON (an integration step's response) against its declared type.+ *+ * Strict where `fromColumn` is forgiving: a database column already holds the+ * declared type, but a vendor's response is validated by nobody, so each+ * primitive is checked by `typeof` and anything mistyped is null. `"false"` is+ * not a boolean, an object is not text, and a numeric string is not a number.+ * Text accepts any JSON scalar: an output with no vendor `format` is text, and a+ * numeric id written as text is still that id.+ */+export function fromJson(type: ValueType, raw: unknown): RuntimeValue {+ switch (type.kind) {+ case "list": {+ if (!Array.isArray(raw)) return { kind: "list", of: type.of, items: [] };+ return listValue(+ type.of,+ raw.map((entry) => fromJson(type.of, entry))+ ).value;}- case "number": {- const parsed = Number(raw);- return Number.isFinite(parsed)- ? primitiveValue("number", parsed)+ case "entity":+ return typeof raw === "string" && raw !== ""+ ? entityValue(type.of, raw): nullValue();+ case "record": {+ // Driven by the DECLARED fields, as in `fromColumn`.+ const source =+ raw !== null && typeof raw === "object" && !Array.isArray(raw)+ ? (raw as Record<string, unknown>)+ : {};+ const fields: Record<string, RuntimeValue> = {};+ for (const [name, fieldType] of Object.entries(type.fields)) {+ fields[name] = fromJson(+ fieldType,+ Object.hasOwn(source, name) ? source[name] : undefined+ );+ }+ return recordValue(type, fields);+ }+ case "primitive": {+ switch (type.of) {+ case "date": {+ const iso = typeof raw === "string" ? vendorInstant(raw) : null;+ return iso === null ? nullValue() : primitiveValue("date", iso);+ }+ case "number":+ return typeof raw === "number" && Number.isFinite(raw)+ ? primitiveValue("number", raw)+ : nullValue();+ case "boolean":+ return typeof raw === "boolean"+ ? primitiveValue("boolean", raw)+ : nullValue();+ case "string":+ if (typeof raw === "string") return primitiveValue("string", raw);+ return (typeof raw === "number" && Number.isFinite(raw)) ||+ typeof raw === "boolean"+ ? primitiveValue("string", String(raw))+ : nullValue();+ case "null":+ return nullValue();+ }+ }+ default:+ return assertNever(type);+ }+}++/** A vendor's date or date-time as a UTC ISO instant, or null. Tried in order:+ * a bracketed zone (`…+05:30[Asia/Kolkata]`), an offset or `Z`, then a value+ * with no offset at all (`2026-08-31T09:00`, `2026-08-31`). The last has no+ * zone we could know, so it is read as UTC — never in the server's own zone,+ * which would make the same response mean different instants on different+ * hosts. */+function vendorInstant(raw: string): string | null {+ for (const parse of VENDOR_INSTANT_PARSERS) {+ try {+ return parse(raw);+ } catch {+ // Not this shape; try the next.+ continue;}- case "boolean":- return primitiveValue("boolean", Boolean(raw));- case "string":- return primitiveValue("string", String(raw));- case "null":- return nullValue();}+ return null;}+const VENDOR_INSTANT_PARSERS: readonly ((raw: string) => string)[] = [+ (raw) => parseZonedDateTime(raw).toAbsoluteString(),+ (raw) => parseAbsolute(raw, "UTC").toAbsoluteString(),+ (raw) => toZoned(parseDateTime(raw), "UTC").toAbsoluteString()+];+export function fromLiteral(literal: Literal): RuntimeValue {return fromColumn(literal.type, literal.value);}diff --git a/packages/ee/src/xero/config.tsx b/packages/ee/src/xero/config.tsxindex 8173e34795..4cd089e084 100644--- a/packages/ee/src/xero/config.tsx+++ b/packages/ee/src/xero/config.tsx@@ -3,9 +3,9 @@// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.import { XERO_CLIENT_ID } from "@carbon/auth";-import type { ComponentProps } from "react";import { z } from "zod";import { defineIntegration } from "../fns";+import { pieceLogo } from "../integrations/piece-logo";const coerceBoolean = z.preprocess((v) =>@@ -25,7 +25,7 @@ export const Xero = defineIntegration({active: true,category: "Accounting",providerRole: "accounting" as const,- logo: Logo,+ logo: pieceLogo("xero"),description:"Integrating Carbon with Xero enables you to post transactions from sales invoices and purchase invoices into your existing accounting software, neatly organizing everything in your bookkeeping software.",shortDescription:@@ -105,63 +105,3 @@ export const Xero = defineIntegration({}]});--function Logo(props: ComponentProps<"svg">) {- return (- <svg- {...props}- width="40"- height="40"- viewBox="0 0 40 40"- fill="none"- xmlns="http://www.w3.org/2000/svg"- >- <g clipPath="url(#clip0_1893_3614)">- <mask- id="mask0_1893_3614"- maskUnits="userSpaceOnUse"- x="-9"- y="-9"- width="58"- height="58"- >- <path- d="M-8.80334 -8.84987H48.8393V48.7927H-8.80334V-8.84987Z"- fill="white"- />- </mask>- <g mask="url(#mask0_1893_3614)">- <path- d="M20.0001 39.9237C31.0037 39.9237 39.9238 31.0037 39.9238 20C39.9238 8.99641 31.0037 0.0762529 20.0001 0.0762529C8.99645 0.0762529 0.0762939 8.99641 0.0762939 20C0.0762939 31.0037 8.99645 39.9237 20.0001 39.9237Z"- fill="#F5F5F3"- />- <path- d="M9.61353 19.9424L13.0137 16.5339C13.1264 16.419 13.1893 16.2669 13.1893 16.1055C13.1893 15.7693 12.916 15.4963 12.5798 15.4963C12.416 15.4963 12.2625 15.5605 12.1467 15.6777C12.1464 15.6784 8.74963 19.0732 8.74963 19.0732L5.33735 15.6726C5.22205 15.5589 5.06927 15.4963 4.90727 15.4963C4.57147 15.4963 4.2981 15.7692 4.2981 16.1051C4.2981 16.2689 4.36351 16.4226 4.48091 16.5385L7.88058 19.9377L4.48267 23.342C4.36324 23.4596 4.2981 23.6136 4.2981 23.7782C4.2981 24.1143 4.57147 24.387 4.90727 24.387C5.06954 24.387 5.22246 24.3241 5.33735 24.2091L8.74435 20.8067L12.1384 24.1967C12.2588 24.3212 12.4141 24.3874 12.5798 24.3874C12.9157 24.3874 13.189 24.1143 13.189 23.7782C13.189 23.616 13.1261 23.4636 13.0118 23.3487L9.61353 19.9424Z"- fill="#121212"- />- <path- d="M29.8268 19.9414C29.8268 20.5519 30.3232 21.0484 30.9344 21.0484C31.5441 21.0484 32.0407 20.5519 32.0407 19.9414C32.0407 19.3308 31.5441 18.8343 30.9344 18.8343C30.3232 18.8343 29.8268 19.3308 29.8268 19.9414Z"- fill="#121212"- />- <path- d="M27.7271 19.9419C27.7271 18.1741 29.1652 16.7358 30.9332 16.7358C32.7003 16.7358 34.1388 18.1741 34.1388 19.9419C34.1388 21.7093 32.7003 23.1471 30.9332 23.1471C29.1652 23.1471 27.7271 21.7093 27.7271 19.9419ZM26.4659 19.9419C26.4659 22.4048 28.47 24.4085 30.9332 24.4085C33.3964 24.4085 35.4014 22.4048 35.4014 19.9419C35.4014 17.4788 33.3964 15.4745 30.9332 15.4745C28.47 15.4745 26.4659 17.4788 26.4659 19.9419Z"- fill="#121212"- />- <path- d="M26.1489 15.5509L25.9614 15.5503C25.3988 15.5503 24.8561 15.7278 24.4028 16.0771C24.3431 15.8038 24.0988 15.5981 23.8078 15.5981C23.4729 15.5981 23.2045 15.8665 23.2037 16.2021C23.2037 16.2033 23.2058 23.726 23.2058 23.726C23.2066 24.061 23.4799 24.3333 23.815 24.3333C24.1501 24.3333 24.4232 24.061 24.4241 23.7253C24.4241 23.7238 24.4244 19.099 24.4244 19.099C24.4244 17.5571 24.5654 16.9343 25.8862 16.7693C26.0083 16.7541 26.1411 16.7565 26.1416 16.7565C26.503 16.7441 26.7599 16.4957 26.7599 16.16C26.7599 15.8242 26.4857 15.5509 26.1489 15.5509Z"- fill="#121212"- />- <path- d="M14.4513 19.2065C14.4513 19.1898 14.4525 19.1725 14.4534 19.1553C14.807 17.7571 16.0733 16.7225 17.5814 16.7225C19.1076 16.7225 20.3855 17.7826 20.7211 19.2065H14.4513ZM21.9686 19.0915C21.7061 17.8485 21.0256 16.8276 19.9894 16.1719C18.4747 15.2103 16.4746 15.2635 15.0116 16.3039C13.8182 17.1529 13.1293 18.5417 13.1293 19.9723C13.1293 20.331 13.1725 20.6931 13.2625 21.0495C13.7132 22.8222 15.2371 24.1641 17.0539 24.3865C17.5931 24.4518 18.1179 24.4205 18.6613 24.2798C19.1282 24.1662 19.5801 23.9768 19.9964 23.71C20.4285 23.4322 20.7895 23.0659 21.1392 22.6275C21.1462 22.6194 21.1533 22.6123 21.1604 22.6038C21.403 22.3028 21.358 21.8749 21.0914 21.6706C20.8665 21.4982 20.4889 21.4283 20.1918 21.8088C20.128 21.8997 20.0567 21.9933 19.9783 22.0869C19.7421 22.348 19.449 22.6009 19.0978 22.797C18.6509 23.0358 18.1417 23.1722 17.6003 23.1753C15.8283 23.1556 14.88 21.9186 14.5428 21.0358C14.4839 20.8709 14.4384 20.6999 14.4068 20.5238C14.4027 20.4908 14.3996 20.4591 14.3984 20.4298C14.7647 20.4298 20.7573 20.4288 20.7573 20.4288C21.629 20.4105 22.0982 19.7951 21.9686 19.0915Z"- fill="#121212"- />- </g>- </g>- <defs>- <clipPath id="clip0_1893_3614">- <rect width="40" height="40" fill="white" />- </clipPath>- </defs>- </svg>- );-}diff --git a/packages/env/src/index.ts b/packages/env/src/index.tsindex 63cadd89af..b04c435ca2 100644--- a/packages/env/src/index.ts+++ b/packages/env/src/index.ts@@ -113,6 +113,12 @@ export const ASSEMBLER_STORAGE_PUBLIC_URL = getEnv(export const GOOGLE_PLACES_API_KEY = getEnv("GOOGLE_PLACES_API_KEY");+// Google OAuth app backing workflow integration connections (Google Calendar,+// Gmail). Optional: an unconfigured server lists the piece as unavailable rather+// than failing to boot. The secret and redirect URL are read by name through+// `resolveOAuthApp`, so only the browser-visible client id is exported here.+export const GOOGLE_CLIENT_ID = getEnv("GOOGLE_CLIENT_ID");+const itarEnvironment = getEnv("CONTROLLED_ENVIRONMENT");export const CONTROLLED_ENVIRONMENT = parseBoolean(itarEnvironment, false);@@ -190,9 +196,12 @@ export const CARBON_SLACK_ENABLED = isBrowser: Boolean(SLACK_BOT_TOKEN);export const SLACK_CLIENT_ID = getEnv("SLACK_CLIENT_ID");export const SLACK_CLIENT_SECRET = getEnv("SLACK_CLIENT_SECRET");+/** Where Slack sends the browser back after consent. One consent serves both the+ * Carbon Assistant and workflow steps. The value may still point at the legacy+ * `/api/integrations/slack/oauth` path — that route forwards to+ * `/api/integrations/connections/callback` — so a deployed value keeps working. */export const SLACK_OAUTH_REDIRECT_URL = getEnv("SLACK_OAUTH_REDIRECT_URL");export const SLACK_SIGNING_SECRET = getEnv("SLACK_SIGNING_SECRET");-export const SLACK_STATE_SECRET = getEnv("SLACK_STATE_SECRET");export const SUPABASE_SERVICE_ROLE_KEY = getEnv("SUPABASE_SERVICE_ROLE_KEY");export const SUPABASE_JWT_SECRET = getEnv("SUPABASE_JWT_SECRET");@@ -371,6 +380,9 @@ export function getBrowserEnv() {CONTROLLED_ENVIRONMENT,DEFAULT_LANGUAGE,ERP_URL,+ // The integration card reads it to decide whether Google Calendar can be+ // connected at all; it is a public OAuth client id, never the secret.+ GOOGLE_CLIENT_ID,GOOGLE_PLACES_API_KEY,JIRA_CLIENT_ID,LOG_LEVEL,diff --git a/packages/env/src/schema.ts b/packages/env/src/schema.tsindex f62a585d36..378ef136d0 100644--- a/packages/env/src/schema.ts+++ b/packages/env/src/schema.ts@@ -10,6 +10,7 @@ export type Group =| "email"| "stripe"| "slack"+ | "google"| "xero"| "quickbooks"| "jira"@@ -27,6 +28,7 @@ export const FEATURES = {email: "Email",stripe: "Stripe",slack: "Slack",+ google: "Google",xero: "Xero",quickbooks: "QuickBooks",jira: "Jira",@@ -223,6 +225,24 @@ export const schema = define({description: "Google Places key for address autocomplete",browser: true},+ GOOGLE_CLIENT_ID: {+ group: "google",+ description: "Google OAuth app client id for workflow integrations",+ browser: true,+ needed: true+ },+ GOOGLE_CLIENT_SECRET: {+ group: "google",+ description: "Google OAuth app client secret for workflow integrations",+ secret: true,+ needed: true+ },+ GOOGLE_OAUTH_REDIRECT_URL: {+ group: "google",+ description: "Google OAuth callback URL for workflow integrations",+ type: url,+ needed: true+ },BINDERY_PRESS_API_KEY: {group: "core",description: "Bindery Press API key",@@ -356,11 +376,6 @@ export const schema = define({description: "Slack request signing secret",secret: true},- SLACK_STATE_SECRET: {- group: "slack",- description: "Secret that signs the Slack OAuth state",- secret: true- },SLACK_OAUTH_REDIRECT_URL: {group: "slack",description: "Slack OAuth callback URL",diff --git a/packages/jobs/AGENTS.md b/packages/jobs/AGENTS.mdindex 21b8c585a1..5d03d016dc 100644--- a/packages/jobs/AGENTS.md+++ b/packages/jobs/AGENTS.md@@ -45,6 +45,7 @@ pnpm --filter @carbon/jobs plan:company -- --company <id> --user <id> # MRP +| `./events` | `Events` type || `./inngest` | Inngest client plus workflow dispatch/manual-run server seams; the table-job seams for the ERP: `setTableJobHandlers`, `takeTableJobLock` / `releaseTableJobLock`, `tableExportStorageKey`, `tempStagingStorage`, `TABLE_JOB_PAGE_SIZE` || `./backups` | Import-light backup catalog, scope, and compatibility helpers |+| `./integrations` | **Server-only.** What the ERP needs from the integration pieces: `allowlistEntry` (+ the `AllowlistEntry` type), the OAuth helpers (`resolveOAuthApp`, `buildConsentUrl`, `requiredScopesFor`, `accountLabelFromBody`, `connectionMetadataFrom`), the options provider ids (`CONNECTION_PROVIDER`, `PROPERTY_PROVIDER`), `resolvePieceAuth`, and `getPieceAction` / `getPieceOAuth2Auth`. The catalog scripts import `buildPieceActionDeclarations` (the generator's sixth `buildCatalog` input) from `src/workflows/integrations/catalog.ts` directly. Piece packages bundle Node vendor SDKs — never import this from browser code. See `.claude/rules/workflow-integrations.md` |## Durable Entry Points@@ -88,6 +89,7 @@ pnpm --filter @carbon/jobs plan:company -- --company <id> --user <id> # MRP +- Jobs that post (`tasks/post-transaction.ts`, the Ramp families, the invoice automation in `src/invoicing/automate-invoice.ts`, `recurring-billing`, `revenue-recognition-proposal`, `kanban-level-check`, `tasks/recalculate.ts`) call `posting` / `postingOrThrow` (`@carbon/api/postings.server`): the ERP registers each posting at start (`apps/erp/app/modules/postings.server.ts`), in-process, not over HTTP. A posting with a `client` runs as the caller behind it, else as the system.- `src/inngest/functions/events/sync-tables.ts` is the import-light table→accounting-entity map. `subscriptions-mapping.test.ts` pins it to provider subscriptions/syncers.- `src/inngest/functions/integrations/ramp-sync.ts` owns step ids, ordering, result aggregation, and notification only; changing a family module must preserve that durable public shape.+- `src/workflows/actions/integration.ts` (`runIntegrationAction`) reads the connection and its token with a service-role client scoped by the run's `companyId`: the vault RPCs are service_role only, and the row's RLS asks for `settings_view`, which a workflow author need not have.- `src/table-jobs/` holds what both table jobs share: paging (`paging.ts`), the per-company Redis lock as Lua scripts (`lock.ts`), storage keys (`storage.ts`) and `notifyTableJobUser` with an Inngest event id per outcome (`notify.ts`). `packages/jobs` cannot import `~/modules`, so the ERP fills `TableJobHandlers` with `setTableJobHandlers` in `api+/inngest.ts`. See `.claude/rules/table-csv-export.md` and `.claude/rules/table-infinite-scroll.md`.- `src/workflows/actions/dispatcher.ts` is filled by `apps/erp/app/routes/api+/inngest.ts` with the canonical `callOperation` seam. Missing registration fails cleanly.- `src/workflows/engine/log.ts` redacts secret/token/password/header values before persisting step input.@@ -101,6 +103,7 @@ pnpm --filter @carbon/jobs plan:company -- --company <id> --user <id> # MRP +- `.claude/rules/accounting-sync-handlers.md` — accounting ledger, sweeps, and reconciliation.- `.claude/rules/ramp-integration.md` — Ramp families and correctness contracts.- `.claude/rules/workflow-actions.md` — action implementations and dispatch seam.+- `.claude/rules/workflow-integrations.md` — the piece allowlist, connections, OAuth and the host shim.- `.claude/rules/workflow-engine.md` — owner-scoped execution and run ledger.- `.claude/rules/workflow-matcher.md` — event matching and queued runs.- `.claude/rules/company-backup-restore.md` — backup compatibility and manifests.diff --git a/packages/jobs/manifests/schema.json b/packages/jobs/manifests/schema.jsonindex e897d2d623..8243b1efdb 100644--- a/packages/jobs/manifests/schema.json+++ b/packages/jobs/manifests/schema.json@@ -457,10 +457,10 @@"incompletePickingListPolicy","includeMaterialsOnTraveler","returnPickedMaterialTiming",- "salesRuleNotificationGroup","showCurrencyTrailingZeros","requireMfa","allowLowercaseItemIds",+ "salesRuleNotificationGroup","includeOperationsOnTraveler","requireSupplierContactAndLocation","requireCustomerContactAndLocation",@@ -5494,8 +5494,8 @@"manuallyScheduled","reworkId","assemblyInstructionId",- "readyAt","inspectionDocumentId",+ "readyAt","projectedCompletionAt","jobOperationBatchId"]@@ -7736,6 +7736,7 @@"apiKeyRateLimit","companyIntegration","employeePin",+ "integrationConnection","oauthClient","oauthCode","oauthToken",diff --git a/packages/jobs/package.json b/packages/jobs/package.jsonindex 99e1830fa8..0bc2b89d16 100644--- a/packages/jobs/package.json+++ b/packages/jobs/package.json@@ -1,5 +1,8 @@{"dependencies": {+ "@activepieces/piece-gmail": "0.13.0",+ "@activepieces/piece-google-calendar": "0.10.3",+ "@activepieces/piece-slack": "0.17.9","@ai-sdk/openai": "catalog:","@carbon/api": "workspace:*","@carbon/auth": "workspace:*",@@ -52,6 +55,7 @@".": "./src/index.ts","./backups": "./src/backups/schema.ts","./events": "./src/events.ts",+ "./integrations": "./src/workflows/integrations/index.ts","./inngest": "./src/inngest/index.ts"},"main": "./src/index.ts",diff --git a/packages/jobs/src/backups/schema.ts b/packages/jobs/src/backups/schema.tsindex e275ac877c..2f1fa2eea1 100644--- a/packages/jobs/src/backups/schema.ts+++ b/packages/jobs/src/backups/schema.ts@@ -37,13 +37,17 @@ export const BACKUP_VERSION = 1;* `pushSubscription` holds a browser's push endpoint and its encryption keys:* a device credential that means nothing in another company, and being secret* keeps an in-place restore from bringing back signed-out browsers or wiping- * the current ones.)+ * the current ones. `integrationConnection`'s token lives in the vault, which+ * a backup never carries, under a name built from the company and the row id+ * (`get_connection_secret`); a restored row would read as an Active account+ * with no token behind it, so every step using it would fail.)*/export const SECRET_TABLES = ["apiKey","apiKeyRateLimit","tableChange","companyIntegration",+ "integrationConnection","employeePin","webhook","oauthClient",diff --git a/packages/jobs/src/inngest/functions/integrations/slack-document-sync.ts b/packages/jobs/src/inngest/functions/integrations/slack-document-sync.tsindex 299c57123e..a3abb182b1 100644--- a/packages/jobs/src/inngest/functions/integrations/slack-document-sync.ts+++ b/packages/jobs/src/inngest/functions/integrations/slack-document-sync.ts@@ -4,7 +4,6 @@import { getCarbonServiceRole } from "@carbon/auth/client.server";import type { Database } from "@carbon/database";-import { resolveIntegrationSecrets } from "@carbon/ee";import {type DocumentType,formatAssignmentUpdate,@@ -16,6 +15,7 @@ import {type IssueTaskUpdate,type NonConformanceData} from "@carbon/ee/slack/messages";+import { getSlackWorkspace } from "@carbon/ee/slack.server";import { VERCEL_URL } from "@carbon/env";import { getLogger } from "@carbon/logger";import { WebClient } from "@slack/web-api";@@ -51,26 +51,11 @@ export const slackDocumentCreatedFunction = inngest.createFunction(throw new Error(`${documentType} ${documentId} not found`);}- const { data: integration } = await serviceRole- .from("companyIntegration")- .select("metadata, secretRef")- .eq("id", "slack")- .eq("companyId", companyId)- .single();-- if (!integration?.metadata) {+ const workspace = await getSlackWorkspace(serviceRole, companyId);+ if (workspace === null) {throw new Error("Slack integration not found");}-- const slackToken = (- (await resolveIntegrationSecrets(- serviceRole,- companyId,- "slack",- integration.metadata,- integration.secretRef- )) as any- ).access_token as string;+ const slackToken = workspace.token;const baseUrl = VERCEL_URL || "http://localhost:3000";await postToSlackThread({@@ -128,26 +113,11 @@ export const slackDocumentStatusUpdateFunction = inngest.createFunction(return { success: true, message: "No Slack thread found" };}- const { data: integration } = await serviceRole- .from("companyIntegration")- .select("metadata, secretRef")- .eq("id", "slack")- .eq("companyId", companyId)- .single();-- if (!integration?.metadata) {+ const workspace = await getSlackWorkspace(serviceRole, companyId);+ if (workspace === null) {throw new Error("Slack integration not found");}-- const slackToken = (- (await resolveIntegrationSecrets(- serviceRole,- companyId,- "slack",- integration.metadata,- integration.secretRef- )) as any- ).access_token as string;+ const slackToken = workspace.token;const documentData = await getDocumentData(serviceRole,@@ -228,26 +198,11 @@ export const slackDocumentTaskUpdateFunction = inngest.createFunction(return { success: true, message: "No Slack thread found" };}- const { data: integration } = await serviceRole- .from("companyIntegration")- .select("metadata, secretRef")- .eq("id", "slack")- .eq("companyId", companyId)- .single();-- if (!integration?.metadata) {+ const workspace = await getSlackWorkspace(serviceRole, companyId);+ if (workspace === null) {throw new Error("Slack integration not found");}-- const slackToken = (- (await resolveIntegrationSecrets(- serviceRole,- companyId,- "slack",- integration.metadata,- integration.secretRef- )) as any- ).access_token as string;+ const slackToken = workspace.token;const documentData = await getDocumentData(serviceRole,@@ -325,26 +280,11 @@ export const slackDocumentAssignmentUpdateFunction = inngest.createFunction(return { success: true, message: "No Slack thread found" };}- const { data: integration } = await serviceRole- .from("companyIntegration")- .select("metadata, secretRef")- .eq("id", "slack")- .eq("companyId", companyId)- .single();-- if (!integration?.metadata) {+ const workspace = await getSlackWorkspace(serviceRole, companyId);+ if (workspace === null) {throw new Error("Slack integration not found");}-- const slackToken = (- (await resolveIntegrationSecrets(- serviceRole,- companyId,- "slack",- integration.metadata,- integration.secretRef- )) as any- ).access_token as string;+ const slackToken = workspace.token;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 82f5553956..2fd499f7da 100644--- a/packages/jobs/src/inngest/functions/notifications/notify.ts+++ b/packages/jobs/src/inngest/functions/notifications/notify.ts@@ -4,13 +4,15 @@import { getCarbonServiceRole } from "@carbon/auth/client.server";import { fetchAllByIds } from "@carbon/database";-import { resolveIntegrationSecrets } from "@carbon/ee";import { emailNotificationsEnabled } from "@carbon/ee/email-notifications.server";import {type CompanyIntegration,notifyTaskAssigned} from "@carbon/ee/notifications";-import { getSlackUserIdByCarbonId } from "@carbon/ee/slack.server";+import {+ getSlackUserIdByCarbonId,+ getSlackWorkspace+} from "@carbon/ee/slack.server";import {CONTROLLED_ENVIRONMENT,ERP_URL,@@ -771,29 +773,17 @@ export const notifyFunction = inngest.createFunction(const slackEvents = await step.run("resolve-slack-recipients",async () => {- const { data: integration, error } = await client- .from("companyIntegration")- .select("active, metadata, secretRef")- .eq("companyId", payload.companyId)- .eq("id", "slack")- .maybeSingle();-- if (error) {- console.error("Failed to resolve Slack integration", error);+ // The company's Slack connection (oldest Active); the token comes+ // from the vault through the one sanctioned reader. A workspace that+ // cannot be read is "no Slack", exactly as an uninstalled one was.+ let accessToken: string | undefined;+ try {+ accessToken = (await getSlackWorkspace(client, payload.companyId))+ ?.token;+ } catch (error) {+ console.error("Failed to resolve Slack workspace", error);return [];}- if (!integration?.active) return [];-- // 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 [];const ctaUrl = buildNotificationLink(diff --git a/packages/jobs/src/inngest/functions/notifications/send-slack.ts b/packages/jobs/src/inngest/functions/notifications/send-slack.tsindex a05cbc0ad8..b17ed135af 100644--- a/packages/jobs/src/inngest/functions/notifications/send-slack.ts+++ b/packages/jobs/src/inngest/functions/notifications/send-slack.ts@@ -3,7 +3,7 @@// including ports, remain AGPLv3; serving them over a network requires releasing their source.import { getCarbonServiceRole } from "@carbon/auth/client.server";-import { resolveIntegrationSecrets } from "@carbon/ee";+import { getSlackWorkspace } from "@carbon/ee/slack.server";import { getSlackClient } from "@carbon/lib/slack.server";import { inngest } from "../../client";import { slackDeliveryFailure } from "./delivery-failure";@@ -17,35 +17,22 @@ export const sendSlackFunction = inngest.createFunction(async ({ event, step }) => {const { channel, text, blocks, companyId } = event.data;- const accessToken = await step.run("resolve-slack-token", async () => {- const client = getCarbonServiceRole();- const { data, error } = await client- .from("companyIntegration")- .select("active, metadata, secretRef")- .eq("companyId", companyId)- .eq("id", "slack")- .maybeSingle();- if (error || !data?.active) return 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,- companyId,- "slack",- data.metadata,- data.secretRef- )) as { access_token?: string } | null;- return metadata?.access_token ?? null;- });+ // One step, so the token never becomes a step OUTPUT that Inngest would+ // persist in its run state — it lives only in this closure.+ const result = await step.run("post-message", async () => {+ // The company's own Slack connection. A failed read throws, so the step+ // retries: it must not read as "not linked" and drop the message.+ const accessToken = (+ await getSlackWorkspace(getCarbonServiceRole(), companyId)+ )?.token;- // The channel id only exists in the company's linked workspace, so without- // that workspace's token there is nothing valid to post — the old env-token- // fallback sent the id into Carbon's own workspace (channel_not_found).- if (!accessToken) {- return { success: false, skipped: "slack-integration-not-linked" };- }+ // The channel id only exists in the company's linked workspace, so without+ // that workspace's token there is nothing valid to post — the old env-token+ // fallback sent the id into Carbon's own workspace (channel_not_found).+ if (!accessToken) {+ return { success: false, skipped: "slack-integration-not-linked" };+ }- await step.run("post-message", async () => {// Client is a no-op on localhost — see slack.server.ts.// `retries: 0` because Inngest owns the retry policy here: the SDK's// default is ~10 attempts over ~30 minutes, which would both stall this@@ -63,8 +50,9 @@ export const sendSlackFunction = inngest.createFunction(} catch (err) {throw slackDeliveryFailure(err);}+ return { success: true };});- return { success: true };+ return result;});diff --git a/packages/jobs/src/workflows/actions/integration.test.ts b/packages/jobs/src/workflows/actions/integration.test.tsnew file mode 100644index 0000000000..ad115833ba--- /dev/null+++ b/packages/jobs/src/workflows/actions/integration.test.ts@@ -0,0 +1,430 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import type { Database } from "@carbon/database";+import type { RuntimeValue } from "@carbon/ee/workflows";+import type { SupabaseClient } from "@supabase/supabase-js";+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";+import { redactForLog } from "../engine/ledger";++const COMPANY = "cmp_1";+const CONNECTION = "icn_1";++const resolveConnectionAuth = vi.fn();+const readConnection = vi.fn();+const getPieceAction = vi.fn();++class FakeRevoked extends Error {}+class FakeSecretUnavailable extends Error {}+class FakeRefreshTimeout extends Error {}++const SERVICE_ROLE = vi.hoisted(() => ({ role: "service" }));++vi.mock("@carbon/auth/client.server", () => ({+ getCarbonServiceRole: () =>+ SERVICE_ROLE as unknown as SupabaseClient<Database>+}));++// The OAuth app is looked up by the env var NAMES on the allowlist row, so the+// mock answers `getEnv` rather than exporting fixed constants.+const ENV: Record<string, string> = {+ GOOGLE_CLIENT_ID: "client-id",+ GOOGLE_CLIENT_SECRET: "client-secret",+ GOOGLE_OAUTH_REDIRECT_URL:+ "https://erp.test/api/integrations/connections/callback",+ SLACK_CLIENT_ID: "slack-client-id",+ SLACK_CLIENT_SECRET: "slack-client-secret",+ SLACK_OAUTH_REDIRECT_URL: "https://erp.test/api/integrations/slack/oauth"+};++vi.mock("@carbon/env", () => ({+ getEnv: (name: string) => ENV[name]+}));++// The real `missingScopes` runs — it is part of what this module does.+vi.mock("@carbon/ee/integrations/connections", async (importOriginal) => ({+ ...(await importOriginal<+ typeof import("@carbon/ee/integrations/connections")+ >()),+ ConnectionRevokedError: FakeRevoked,+ ConnectionSecretUnavailableError: FakeSecretUnavailable,+ ConnectionRefreshTimeoutError: FakeRefreshTimeout,+ readConnection: (...args: unknown[]) => readConnection(...args),+ resolveConnectionAuth: (...args: unknown[]) => resolveConnectionAuth(...args)+}));++const { runIntegrationAction } = await import("./integration");++const inputs = (extra: Record<string, RuntimeValue> = {}) => ({+ connectionId: {+ kind: "primitive" as const,+ of: "string" as const,+ value: CONNECTION+ },+ title: {+ kind: "primitive" as const,+ of: "string" as const,+ value: "Kickoff"+ },+ ...extra+});++const run = (+ overrides: Partial<Parameters<typeof runIntegrationAction>[0]> = {}+) =>+ runIntegrationAction(+ {+ companyId: COMPANY,+ pieceName: "google-calendar",+ actionName: "create_google_calendar_event",+ inputs: inputs(),+ ...overrides+ },+ getPieceAction+ );++describe("runIntegrationAction", () => {+ beforeEach(() => {+ readConnection.mockResolvedValue({+ id: CONNECTION,+ pieceName: "google-calendar",+ metadata: {}+ });+ resolveConnectionAuth.mockResolvedValue({ accessToken: "at-1" });+ getPieceAction.mockResolvedValue({+ name: "create_google_calendar_event",+ displayName: "Create Event",+ props: { title: { type: "SHORT_TEXT", required: true } },+ run: async () => ({ id: "evt_1" })+ });+ });++ afterEach(() => {+ vi.clearAllMocks();+ });++ it("checks the connection with the service role, scoped to the run's company", async () => {+ const outcome = await run();+ expect(outcome.ok).toBe(true);+ expect(readConnection).toHaveBeenCalledWith(+ SERVICE_ROLE,+ COMPANY,+ CONNECTION+ );+ });++ it("runs the piece with the fresh token and reports what it made", async () => {+ const outcome = await run();+ expect(outcome.ok).toBe(true);+ if (!outcome.ok) return;+ expect(outcome.outputs.result).toEqual({+ kind: "primitive",+ of: "string",+ value: JSON.stringify({ id: "evt_1" })+ });+ });++ it("passes only the action's own props to the piece", async () => {+ let received: unknown;+ getPieceAction.mockResolvedValue({+ name: "create_google_calendar_event",+ displayName: "Create Event",+ props: { title: { type: "SHORT_TEXT", required: true } },+ run: async (context: { propsValue: unknown }) => {+ received = context.propsValue;+ return "ok";+ }+ });++ await run();+ expect(received).toEqual({ title: "Kickoff" });+ });++ it("refuses when no connection was chosen", async () => {+ const outcome = await run({+ inputs: {+ title: { kind: "primitive", of: "string", value: "Kickoff" }+ }+ });+ expect(outcome).toEqual({+ ok: false,+ error: "This step needs a connection."+ });+ });++ // A Slack workspace connected for the Assistant before the piece existed holds+ // 10 scopes, not 16. Fail before the vendor call, with words that name the fix.+ it("refuses before calling the vendor when the account lacks a required scope", async () => {+ readConnection.mockResolvedValue({+ id: CONNECTION,+ pieceName: "slack",+ metadata: { scopes: "chat:write,commands" }+ });+ const piece = vi.fn(async () => ({ ok: true }));+ getPieceAction.mockResolvedValue({+ name: "send_channel_message",+ displayName: "Send Message To A Channel",+ props: {},+ run: piece+ });+ const outcome = await run({+ pieceName: "slack",+ actionName: "send_channel_message"+ });+ expect(outcome.ok).toBe(false);+ expect(outcome.ok ? "" : outcome.error).toMatch(+ /reconnected .*Accounts → Reconnect/+ );+ expect(piece).not.toHaveBeenCalled();+ expect(resolveConnectionAuth).not.toHaveBeenCalled();+ });++ // The omit exists to keep the user-token path unreachable; a node saved before+ // the omit landed (or posted by hand) must not reopen it.+ it("never sends an omitted prop, even when the node carries a value", async () => {+ readConnection.mockResolvedValue({+ id: CONNECTION,+ pieceName: "slack",+ metadata: {}+ });+ const piece = vi.fn(async (_ctx: unknown) => ({ ok: true }));+ getPieceAction.mockResolvedValue({+ name: "send_channel_message",+ displayName: "Send Message To A Channel",+ props: {+ text: { type: "LONG_TEXT", required: false },+ sendAsBot: { type: "CHECKBOX", required: true, defaultValue: true }+ },+ run: piece+ });+ await run({+ pieceName: "slack",+ actionName: "send_channel_message",+ inputs: inputs({+ sendAsBot: { kind: "primitive", of: "boolean", value: false }+ })+ });+ expect(piece).toHaveBeenCalledTimes(1);+ const ctx = piece.mock.calls[0]?.[0] as {+ propsValue: Record<string, unknown>;+ };+ expect(ctx.propsValue.sendAsBot).toBe(true);+ });++ const pieceThatThrows = (error: unknown) =>+ getPieceAction.mockResolvedValue({+ name: "create_google_calendar_event",+ displayName: "Create Event",+ props: { title: { type: "SHORT_TEXT", required: true } },+ run: async () => {+ throw error;+ }+ });++ // The shape the Activepieces `HttpError` takes: the message embeds the REQUEST+ // body, the vendor's verdict sits on `status` / `responseBody`.+ const httpError = (requestBody: unknown, status: number, body: unknown) =>+ Object.assign(+ new Error(+ JSON.stringify({+ response: { status, body },+ request: { body: requestBody }+ })+ ),+ { status, responseBody: body, requestBody }+ );++ it("maps a Slack scope error to the reconnect copy", async () => {+ pieceThatThrows(+ Object.assign(new Error("An API error occurred: missing_scope"), {+ code: "slack_webapi_platform_error",+ data: { ok: false, error: "missing_scope" }+ })+ );+ const outcome = await run();+ expect(outcome.ok).toBe(false);+ expect(outcome.ok ? "" : outcome.error).toMatch(/needs to be reconnected/);+ });++ it("maps a Google scope refusal to the reconnect copy", async () => {+ pieceThatThrows(+ httpError({ summary: "Kickoff" }, 403, {+ error: {+ code: 403,+ status: "PERMISSION_DENIED",+ errors: [{ reason: "insufficientPermissions" }]+ }+ })+ );+ const outcome = await run();+ expect(outcome.ok ? "" : outcome.error).toMatch(/needs to be reconnected/);+ });++ it("does not read an email body that mentions permissions as a scope error", async () => {+ pieceThatThrows(+ httpError(+ { raw: "Hi, you have insufficient permission to approve this order." },+ 400,+ { error: { code: 400, message: "Invalid To header" } }+ )+ );+ const outcome = await run();+ expect(outcome.ok).toBe(false);+ expect(outcome.ok ? "" : outcome.error).toBe(+ "Google Calendar rejected this: Invalid To header"+ );+ });++ it("never stores the request body a vendor error carries", async () => {+ pieceThatThrows(+ httpError({ attendees: ["[email protected]"] }, 502, "<html>")+ );+ const outcome = await run();+ const error = outcome.ok ? "" : outcome.error;+ expect(error).toBe("Google Calendar rejected this: HTTP 502");+ expect(error).not.toContain("[email protected]");+ });++ it("never stores the request a googleapis response carries", async () => {+ getPieceAction.mockResolvedValue({+ name: "send_email",+ displayName: "Send Email",+ props: {},+ // A GaxiosResponse: `config.data` is the base64 email it sent.+ run: async () => ({+ config: {+ url: "https://gmail.googleapis.com",+ data: "U2VjcmV0IGJvZHk="+ },+ request: { responseURL: "https://gmail.googleapis.com" },+ data: { id: "msg_1", threadId: "thr_1" },+ status: 200+ })+ });+ const outcome = await run();+ if (!outcome.ok) throw new Error("Expected ok");+ const stored = outcome.outputs.result;+ expect(stored?.kind === "primitive" && stored.value).toBe(+ JSON.stringify({ data: { id: "msg_1", threadId: "thr_1" }, status: 200 })+ );+ });++ it("succeeds when the vendor's result cannot be serialized", async () => {+ // The vendor call already happened; reporting it as rejected would invite a+ // re-run that sends the same message twice.+ const circular: Record<string, unknown> = { id: "evt_1" };+ circular.self = circular;+ getPieceAction.mockResolvedValue({+ name: "create_google_calendar_event",+ displayName: "Create Event",+ props: {},+ run: async () => circular+ });+ const outcome = await run();+ expect(outcome.ok).toBe(true);+ if (!outcome.ok) return;+ expect(outcome.outputs.result).toEqual({+ kind: "primitive",+ of: "string",+ value: null+ });+ });++ it("stores no result for a vendor call that returned nothing", async () => {+ getPieceAction.mockResolvedValue({+ name: "create_google_calendar_event",+ displayName: "Create Event",+ props: {},+ run: async () => undefined+ });+ const outcome = await run();+ if (!outcome.ok) throw new Error("Expected ok");+ expect(outcome.outputs.result).toEqual({+ kind: "primitive",+ of: "string",+ value: null+ });+ });++ it("refuses a connection belonging to another piece", async () => {+ readConnection.mockResolvedValue({+ id: CONNECTION,+ pieceName: "slack",+ metadata: {}+ });+ const outcome = await run();+ expect(outcome).toEqual({+ ok: false,+ error: "This step needs a connection."+ });+ });++ it("asks the customer to reconnect when the connection is revoked", async () => {+ resolveConnectionAuth.mockRejectedValue(new FakeRevoked("gone"));+ expect(await run()).toEqual({+ ok: false,+ error: "The Google Calendar connection needs to be reconnected."+ });+ });++ it("asks the customer to reconnect when the token cannot be read", async () => {+ resolveConnectionAuth.mockRejectedValue(new FakeSecretUnavailable("gone"));+ expect(await run()).toEqual({+ ok: false,+ error: "The Google Calendar connection needs to be reconnected."+ });+ });++ it("says to try again when another worker holds the refresh", async () => {+ resolveConnectionAuth.mockRejectedValue(new FakeRefreshTimeout("busy"));+ expect(await run()).toEqual({+ ok: false,+ error: "The Google Calendar connection was busy refreshing. Try again."+ });+ });++ it("reports an unavailable connection for anything else", async () => {+ resolveConnectionAuth.mockRejectedValue(new Error("network"));+ expect(await run()).toEqual({+ ok: false,+ error: "The Google Calendar connection is unavailable."+ });+ });++ it("reports the vendor's own message when the API rejects the call", async () => {+ getPieceAction.mockResolvedValue({+ name: "create_google_calendar_event",+ displayName: "Create Event",+ props: {},+ run: async () => {+ throw new Error("Invalid attendee email");+ }+ });+ expect(await run()).toEqual({+ ok: false,+ error: "Google Calendar rejected this: Invalid attendee email"+ });+ });+});++describe("run-history redaction", () => {+ it("keeps no token out of a step's recorded input", () => {+ const recorded = redactForLog({+ connectionId: CONNECTION,+ access_token: "at-1",+ refresh_token: "rt-1",+ client_secret: "cs-1",+ title: "Kickoff"+ }) as Record<string, unknown>;++ expect(recorded.access_token).toBe("[REDACTED]");+ expect(recorded.refresh_token).toBe("[REDACTED]");+ expect(recorded.client_secret).toBe("[REDACTED]");+ expect(JSON.stringify(recorded)).not.toContain("at-1");+ expect(JSON.stringify(recorded)).not.toContain("rt-1");+ // Ordinary data must survive — over-redaction hides what the log exists to show.+ expect(recorded.title).toBe("Kickoff");+ expect(recorded.connectionId).toBe(CONNECTION);+ });+});diff --git a/packages/jobs/src/workflows/actions/integration.ts b/packages/jobs/src/workflows/actions/integration.tsnew file mode 100644index 0000000000..aabc031b48--- /dev/null+++ b/packages/jobs/src/workflows/actions/integration.ts@@ -0,0 +1,239 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { getCarbonServiceRole } from "@carbon/auth/client.server";+import type { ActionOutcome, RuntimeValue } from "@carbon/ee/workflows";+import { redactForLog } from "../engine/ledger";+import { allowlistEntry } from "../integrations/allowlist";+import { buildPieceContext } from "../integrations/context";+import {+ type PieceAuthFailure,+ resolvePieceAuth+} from "../integrations/piece-auth";+import { projectOutputs } from "../integrations/project";+import { toPropsValue } from "../integrations/properties";+import { getPieceAction } from "../integrations/registry";++const NO_CONNECTION = "This step needs a connection.";+/** A workspace connected before this piece needed a scope. The fix is one click,+ * so the words name it — a bare `missing_scope` reads as a bug report. */+const reconnectCopy = (label: string) =>+ `The ${label} connection needs to be reconnected to grant the permissions this step uses — Settings → Integrations → ${label} → Accounts → Reconnect.`;+/** The codes vendors use for "this token lacks a scope": Slack's Web API+ * (`missing_scope`), OAuth 2.0 (`insufficient_scope`) and Google+ * (`insufficientPermissions`, `ACCESS_TOKEN_SCOPE_INSUFFICIENT`). */+const SCOPE_CODES = new Set([+ "missing_scope",+ "insufficient_scope",+ "insufficientPermissions",+ "ACCESS_TOKEN_SCOPE_INSUFFICIENT"+]);+/** A vendor message is theirs, not ours — keep it short enough to read in a step row. */+const MAX_VENDOR_MESSAGE = 300;++function truncate(message: string): string {+ return message.length <= MAX_VENDOR_MESSAGE+ ? message+ : `${message.slice(0, MAX_VENDOR_MESSAGE)}…`;+}++function isRecord(value: unknown): value is Record<string, unknown> {+ return typeof value === "object" && value !== null;+}++function parsedBody(body: unknown): unknown {+ if (typeof body !== "string") return body;+ try {+ return JSON.parse(body);+ } catch {+ return undefined;+ }+}++/** Read off the vendor's structured error, never its message: an Activepieces+ * `HttpError` message embeds the REQUEST body, so an email that merely says+ * "insufficient permission" read as a scope error. Three shapes reach here:+ * Slack's Web API error (`data.error`), the Activepieces `HttpError`+ * (`responseBody`) and a googleapis `GaxiosError` (`response.data`). */+function isScopeError(cause: unknown): boolean {+ if (!isRecord(cause)) return false;+ const codes: unknown[] = [];+ if (isRecord(cause.data)) codes.push(cause.data.error);+ const response = isRecord(cause.response) ? cause.response : undefined;+ for (const raw of [cause.responseBody, response?.data]) {+ const body = parsedBody(raw);+ if (!isRecord(body)) continue;+ const error = body.error;+ if (!isRecord(error)) {+ codes.push(error);+ continue;+ }+ for (const list of [error.errors, error.details]) {+ if (!Array.isArray(list)) continue;+ for (const entry of list) if (isRecord(entry)) codes.push(entry.reason);+ }+ }+ return codes.some(+ (code) => typeof code === "string" && SCOPE_CODES.has(code)+ );+}++/** The vendor's own words for a failure, read from its RESPONSE: Slack's+ * `data.error`, or the body's `error.message` / `error` / `message`. Never+ * `cause.message` when the error carries a request — an Activepieces `HttpError`+ * message is JSON of the response AND the request, so an email's recipients and+ * body landed in run history. A plain error from our own code keeps its message. */+function vendorMessage(cause: unknown): string {+ if (!isRecord(cause)) return "The step did not complete.";+ if (isRecord(cause.data) && typeof cause.data.error === "string") {+ return cause.data.error;+ }+ const response = isRecord(cause.response) ? cause.response : undefined;+ for (const raw of [cause.responseBody, response?.data]) {+ const body = parsedBody(raw);+ if (!isRecord(body)) continue;+ const { error } = body;+ if (isRecord(error) && typeof error.message === "string") {+ return error.message;+ }+ if (typeof error === "string") {+ return typeof body.error_description === "string"+ ? `${error}: ${body.error_description}`+ : error;+ }+ if (typeof body.message === "string") return body.message;+ }+ const status = cause.status ?? response?.status;+ if (typeof status === "number") return `HTTP ${status}`;+ const carriesRequest =+ "request" in cause || "requestBody" in cause || "config" in cause;+ if (cause instanceof Error && !carriesRequest) return cause.message;+ return "The step did not complete.";+}++/** A googleapis response carries the request it was made with under `config`+ * (the base64 email body included) and `request`; neither is the result. */+function dropTransport(key: string, value: unknown): unknown {+ return key === "config" || key === "request" ? undefined : value;+}++/** The raw result as JSON for the `result` output. Called only after the vendor+ * call returned, so a result that cannot be serialized (circular, BigInt) is+ * `null` — never a failure: the message has already been sent. */+function serializeResult(result: unknown): string | null {+ if (typeof result === "string") return result;+ try {+ const plain = JSON.stringify(result, dropTransport);+ if (plain === undefined) return null;+ return JSON.stringify(redactForLog(JSON.parse(plain))) ?? null;+ } catch {+ return null;+ }+}++function connectionIdFrom(+ inputs: Record<string, RuntimeValue>+): string | undefined {+ const value = inputs.connectionId;+ if (value === undefined || value.kind !== "primitive") return undefined;+ if (value.value === null) return undefined;+ const id = String(value.value).trim();+ return id === "" ? undefined : id;+}++/** What the step row says when the connection cannot act. A busy refresh is+ * transient and a retry fixes it; a revoked or unreadable token needs a person —+ * telling the customer to reconnect in the first case would send them to do work+ * that changes nothing. */+function authFailureCopy(failure: PieceAuthFailure, label: string): string {+ switch (failure.reason) {+ case "no-connection":+ return NO_CONNECTION;+ case "missing-scopes":+ return reconnectCopy(label);+ case "refreshing":+ return `The ${label} connection was busy refreshing. Try again.`;+ case "reconnect":+ return `The ${label} connection needs to be reconnected.`;+ // Ours, not theirs — a missing OAuth app reaches here.+ case "misconfigured":+ case "failed":+ return `The ${label} connection is unavailable.`;+ }+}++export async function runIntegrationAction(+ args: {+ companyId: string;+ pieceName: string;+ actionName: string;+ inputs: Record<string, RuntimeValue>;+ },+ /** A test passes a fake piece instead of the vendor's npm package. */+ loadAction: typeof getPieceAction = getPieceAction+): Promise<ActionOutcome> {+ const { companyId, pieceName, actionName, inputs } = args;+ const label = allowlistEntry(pieceName)?.label ?? pieceName;++ const connectionId = connectionIdFrom(inputs);+ if (connectionId === undefined) return { ok: false, error: NO_CONNECTION };++ // Service role, scoped by the run's `companyId`: RLS on the row asks for+ // `settings_view`, but the builder offers connections to anyone who can edit+ // workflows, so an owner-client read refused an account the author could pick.+ const auth = await resolvePieceAuth(+ getCarbonServiceRole(),+ companyId,+ pieceName,+ connectionId+ );+ if (!auth.ok) return { ok: false, error: authFailureCopy(auth, label) };++ let action: Awaited<ReturnType<typeof getPieceAction>>;+ let propsValue: Record<string, unknown>;+ try {+ action = await loadAction(pieceName, actionName);+ propsValue = toPropsValue(pieceName, actionName, action.props, inputs);+ } catch {+ // Ours, before any vendor call: nothing was sent.+ return { ok: false, error: `The ${label} step is not available.` };+ }++ // Only a throw from the vendor call is the vendor's failure. Everything after it+ // runs once the call has already had its effect, so it must not report a sent+ // message as rejected — a re-run would send it twice.+ let result: unknown;+ try {+ result = await action.run(+ buildPieceContext({+ auth: { access_token: auth.accessToken },+ propsValue+ })+ );+ } catch (cause) {+ // A vendor scope error still reads as "reconnect", not as a bug.+ if (isScopeError(cause)) {+ return { ok: false, error: reconnectCopy(label) };+ }+ return {+ ok: false,+ error: `${label} rejected this: ${truncate(vendorMessage(cause))}`+ };+ }++ return {+ ok: true,+ outputs: {+ ...projectOutputs(action.outputSchema, result, {+ sortItemsBy: allowlistEntry(pieceName)?.sortItemsBy?.[actionName]+ }),+ result: {+ kind: "primitive",+ of: "string",+ value: serializeResult(result)+ }+ },+ summary: `${label}: ${action.displayName} ran.`+ };+}diff --git a/packages/jobs/src/workflows/actions/search.ts b/packages/jobs/src/workflows/actions/search.tsindex 6d019597d0..b3e75e14f2 100644--- a/packages/jobs/src/workflows/actions/search.ts+++ b/packages/jobs/src/workflows/actions/search.ts@@ -20,7 +20,13 @@ import type { SupabaseClient } from "@supabase/supabase-js";/** The scalar a criterion filters by; a list has no single value to compare. */function scalarOf(value: RuntimeValue): string | number | boolean | undefined {if (value.kind === "entity") return value.id;- if (value.kind === "list" || value.kind === "pairs") return undefined;+ if (+ value.kind === "list" ||+ value.kind === "pairs" ||+ value.kind === "record"+ ) {+ return undefined;+ }return value.value === null ? undefined : value.value;}diff --git a/packages/jobs/src/workflows/actions/services.ts b/packages/jobs/src/workflows/actions/services.tsindex 92ed3ad865..37efe8f969 100644--- a/packages/jobs/src/workflows/actions/services.ts+++ b/packages/jobs/src/workflows/actions/services.ts@@ -49,6 +49,22 @@ export function createWorkflowServices(params: {workflowId} = params;+ /** An integration step names its piece on its own catalog entry, so this never+ * parses an id and the action path above never learns what a piece is. */+ async function runIntegration(+ piece: { name: string; action: string },+ inputs: Record<string, RuntimeValue>+ ): Promise<ActionOutcome> {+ // Lazy: `./integration` imports `@carbon/auth`, which validates the server env on load.+ const { runIntegrationAction } = await import("./integration");+ return runIntegrationAction({+ companyId,+ pieceName: piece.name,+ actionName: piece.action,+ inputs+ });+ }+async function runAction(actionId: string,inputs: Record<string, RuntimeValue>@@ -108,6 +124,7 @@ export function createWorkflowServices(params: {return {runAction,+ runIntegration,runOperation: (operationId: string,inputs: Record<string, RuntimeValue>diff --git a/packages/jobs/src/workflows/actions/values.ts b/packages/jobs/src/workflows/actions/values.tsindex 500b77145e..450d2c141a 100644--- a/packages/jobs/src/workflows/actions/values.ts+++ b/packages/jobs/src/workflows/actions/values.ts@@ -14,6 +14,14 @@ export function toPlainValue(value: RuntimeValue): unknown {value.entries.map((e) => [e.name, toPlainValue(e.value)]));}+ if (value.kind === "record") {+ return Object.fromEntries(+ Object.entries(value.fields).map(([name, field]) => [+ name,+ toPlainValue(field)+ ])+ );+ }// A date primitive already carries its ISO string; see runtime `fromColumn`.return value.value;}diff --git a/packages/jobs/src/workflows/engine/batch.test.ts b/packages/jobs/src/workflows/engine/batch.test.tsindex 4f03de8d6f..063e745f00 100644--- a/packages/jobs/src/workflows/engine/batch.test.ts+++ b/packages/jobs/src/workflows/engine/batch.test.ts@@ -43,7 +43,7 @@ vi.mock("./owner", () => ({vi.mock("../actions", () => ({ createWorkflowServices: vi.fn() }));const { executeWorkflowRun } = await import("./execute");-const { loadRunContext } = await import("./log");+const { finishRun, loadRunContext } = await import("./log");const { claimStep, settleStep } = await import("./ledger");const { createWorkflowServices } = await import("../actions");@@ -158,6 +158,7 @@ function withServices(params: {);vi.mocked(createWorkflowServices).mockReturnValue({runAction,+ runIntegration: async () => ({ ok: false as const, error: "not stubbed" }),runOperation: async () => ({ ok: false, error: "not stubbed" }),search});@@ -284,6 +285,11 @@ describe("batch mode", () => {expect(aggregateReason()).toBe("Ran 3 of 3; 1 failed.");// One failed item still marks the run failed; the node itself carried on.expect(result.status).toBe("Failed");+ // ...and the run says why, in the aggregate row's words, not with no error.+ expect(vi.mocked(finishRun).mock.calls.at(-1)?.[1]).toMatchObject({+ status: "Failed",+ error: "Ran 3 of 3; 1 failed."+ });});it("follows the failure handle when every item fails", async () => {@@ -381,6 +387,10 @@ describe("batch mode", () => {? { ok: false, error: "This turn had no item." }: { ok: true, outputs: { record: job } };},+ runIntegration: async () => ({+ ok: false as const,+ error: "not stubbed"+ }),runOperation: async () => ({ ok: false, error: "not stubbed" }),search: async () => ({ok: true,diff --git a/packages/jobs/src/workflows/engine/end-to-end.test.ts b/packages/jobs/src/workflows/engine/end-to-end.test.tsindex b11eeee8c5..a63adab8ed 100644--- a/packages/jobs/src/workflows/engine/end-to-end.test.ts+++ b/packages/jobs/src/workflows/engine/end-to-end.test.ts@@ -106,6 +106,10 @@ interface Stubs {actionId: string,inputs: Record<string, RuntimeValue>) => ActionOutcome;+ runIntegration?: (+ piece: { name: string; action: string },+ inputs: Record<string, RuntimeValue>+ ) => ActionOutcome;runOperation?: (operationId: string,inputs: Record<string, RuntimeValue>@@ -131,6 +135,16 @@ function withServices(stubs: Stubs) {error: "not stubbed"});+ const runIntegration = vi.fn(+ async (+ piece: { name: string; action: string },+ inputs: Record<string, RuntimeValue>+ ): Promise<ActionOutcome> =>+ stubs.runIntegration?.(piece, inputs) ?? {+ ok: false,+ error: "not stubbed"+ }+ );const search = vi.fn(async (): Promise<SearchOutcome> =>stubs.search?.() ?? { ok: false, error: "not stubbed" }@@ -138,10 +152,11 @@ function withServices(stubs: Stubs) {vi.mocked(createWorkflowServices).mockReturnValue({runAction,+ runIntegration,runOperation,search});- return { runAction, runOperation, search };+ return { runAction, runIntegration, runOperation, search };}function callTo(diff --git a/packages/jobs/src/workflows/engine/execute.test.ts b/packages/jobs/src/workflows/engine/execute.test.tsindex 711a06f4f4..969a07769a 100644--- a/packages/jobs/src/workflows/engine/execute.test.ts+++ b/packages/jobs/src/workflows/engine/execute.test.ts@@ -143,6 +143,7 @@ beforeEach(() => {vi.mocked(claimStep).mockResolvedValue({ claimed: true, stepRunId: "s1" });vi.mocked(createWorkflowServices).mockReturnValue({runAction,+ runIntegration: async () => ({ ok: false as const, error: "not stubbed" }),runOperation: async () => ({ ok: false, error: "not stubbed" }),search: async () => ({ ok: false, error: "not stubbed" })});@@ -205,3 +206,45 @@ describe("a second delivery of the same event", () => {expect(runAction).not.toHaveBeenCalled();});});++/**+ * The run row's `error` was hard-coded `null` unless the step CAP was hit, so every+ * ordinary failure — the common case — reached the run page as a bare+ * "Failed at <step>." The reason was sitting in the step row the whole time.+ * A real report: a Google Calendar step failed with "Cannot read properties of+ * undefined (reading 'length')" and the run page showed nothing at all.+ */+describe("a failed run says WHY it failed", () => {+ const VENDOR_ERROR =+ "Google Calendar rejected this: Cannot read properties of undefined (reading 'length')";++ it("carries the failing step's error onto the run", async () => {+ const { step } = harness();+ runAction.mockResolvedValueOnce({+ ok: false,+ error: VENDOR_ERROR+ } as never);++ const result = await executeWorkflowRun({ payload, step, logger });++ expect(result.status).toBe("Failed");+ // The run row is what the run page leads with — not the step row.+ expect(vi.mocked(finishRun).mock.calls.at(-1)?.[1]).toMatchObject({+ status: "Failed",+ error: VENDOR_ERROR+ });+ });++ // A run that genuinely succeeded must not acquire an error from a previous one.+ it("leaves the error null when nothing failed", async () => {+ const { step } = harness();++ const result = await executeWorkflowRun({ payload, step, logger });++ expect(result.status).toBe("Succeeded");+ expect(vi.mocked(finishRun).mock.calls.at(-1)?.[1]).toMatchObject({+ status: "Succeeded",+ error: null+ });+ });+});diff --git a/packages/jobs/src/workflows/engine/execute.ts b/packages/jobs/src/workflows/engine/execute.tsindex 1b1220013a..f7e618c186 100644--- a/packages/jobs/src/workflows/engine/execute.ts+++ b/packages/jobs/src/workflows/engine/execute.ts@@ -33,6 +33,7 @@ import { createWorkflowServices } from "../actions";import {claimStep,failInterruptedSteps,+ INTERRUPTED,type RunLedger,settleStep} from "./ledger";@@ -111,6 +112,11 @@ interface StepOutcome {status: NodeResult["status"];handle: string | null;outputs: Record<string, RuntimeValue> | null;+ /** Why this step failed, carried up so the RUN can say it too. The step row has+ * it either way, but the run page leads with the run's own `error` — without+ * this a failed run read "Failed at <step>." with no reason anywhere above the+ * fold, which is exactly the case someone opens the page to understand. */+ error?: string | null;/** Items that failed inside a batch whose node still succeeded. */failedItems?: number;}@@ -141,7 +147,7 @@ async function contextFor(args: NodeArgs): Promise<RuntimeContext> {outputs: args.outputs,// The one place a workflow value becomes a URL. `/api/link` performs the company// switch before redirecting, so a recipient whose active company differs still- // lands on the right record. Only inputs the catalog marks `linkify` use this.+ // lands on the right record. Only inputs the catalog declares `links` on use this.linkFor: (of: string, id: string) =>buildNotificationLink(NotificationEvent.Workflow,@@ -253,7 +259,8 @@ async function recordStep(return {status: result.status,handle: result.status === "Skipped" ? null : (result.handle ?? null),- outputs: result.status === "Succeeded" ? result.outputs : null+ outputs: result.status === "Succeeded" ? result.outputs : null,+ error: result.status === "Failed" ? result.error : null};}@@ -362,8 +369,14 @@ async function runBatchedNode(recordStep(args, "", async () => aggregate));- // A failed item does not stop the graph, but it must not leave the run green.- return { ...outcome, failedItems: failed };+ // A failed item does not stop the graph, but it must not leave the run green —+ // and the run says why in the words the aggregate row uses ("Ran 3 of 3; 1+ // failed."), not with an empty error.+ return {+ ...outcome,+ failedItems: failed,+ error: outcome.error ?? (failed > 0 ? summary : null)+ };}export async function executeWorkflowRun(params: {@@ -586,6 +599,10 @@ export async function walkWorkflow(params: {let executions = 0;let failed = false;let capped = false;+ /** The FIRST failure's message. First rather than last: the graph continues past+ * a failed step down its failure handle, so a later failure is usually a+ * consequence of this one, and the cause is what the reader needs. */+ let firstError: string | null = null;for (let nodeId = nextNode(state);@@ -626,6 +643,7 @@ export async function walkWorkflow(params: {executions += 1;if (outcome.status === "Failed" || (outcome.failedItems ?? 0) > 0) {failed = true;+ if (firstError === null && outcome.error) firstError = outcome.error;}if (outcome.outputs !== null) outputs[nodeId] = outcome.outputs;advance(state, definition, nodeId, outcome.handle);@@ -637,7 +655,14 @@ export async function walkWorkflow(params: {failed || capped || interrupted > 0? ("Failed" as const): ("Succeeded" as const);- const error = capped ? TOO_MANY_STEPS : null;+ // The cap is about the run as a whole, so it outranks any one step. Otherwise+ // the run reports what actually broke: `error` was hard-coded null here, so+ // every ordinary failure — the common case — reached the run page as "Failed+ // at <step>." with the reason sitting unread in the step row.+ // `finishRun` redacts and caps it as `settleStep` does the step row's.+ const error = capped+ ? TOO_MANY_STEPS+ : (firstError ?? (interrupted > 0 ? INTERRUPTED : null));await ledger.finishRun({ status: settled, error, startedAt });return { status: settled, error };diff --git a/packages/jobs/src/workflows/engine/loader.test.ts b/packages/jobs/src/workflows/engine/loader.test.tsindex c17b2c06c7..0b018cef85 100644--- a/packages/jobs/src/workflows/engine/loader.test.ts+++ b/packages/jobs/src/workflows/engine/loader.test.ts@@ -25,6 +25,7 @@ const trigger = {const noServices = {runAction: async () => ({ ok: false as const, error: "not stubbed" }),+ runIntegration: async () => ({ ok: false as const, error: "not stubbed" }),runOperation: async () => ({ ok: false as const, error: "not stubbed" }),search: async () => ({ ok: false as const, error: "not stubbed" })};diff --git a/packages/jobs/src/workflows/engine/log.ts b/packages/jobs/src/workflows/engine/log.tsindex 94180d2924..68a4007acd 100644--- a/packages/jobs/src/workflows/engine/log.ts+++ b/packages/jobs/src/workflows/engine/log.ts@@ -5,6 +5,7 @@import { datetime } from "@carbon/utils";import { sql } from "kysely";import type { JobDatabase } from "../../db";+import { redactText } from "./ledger";export interface RunContext {run: {@@ -159,8 +160,10 @@ export async function finishRun(.updateTable("workflowRun").set({status: params.status,- statusReason: params.statusReason ?? null,- error: params.error ?? null,+ // Redacted and capped exactly as the step row's are (`settleStep`): the+ // text came from an executor, and a vendor can echo a token into it.+ statusReason: redactText(params.statusReason),+ error: redactText(params.error),completedAt,durationMs})diff --git a/packages/jobs/src/workflows/engine/manual.test.ts b/packages/jobs/src/workflows/engine/manual.test.tsindex 6a064460ef..21b3b24fc8 100644--- a/packages/jobs/src/workflows/engine/manual.test.ts+++ b/packages/jobs/src/workflows/engine/manual.test.ts@@ -164,6 +164,7 @@ beforeEach(() => {stepIds = 0;vi.mocked(createWorkflowServices).mockReturnValue({runAction,+ runIntegration: async () => ({ ok: false as const, error: "not stubbed" }),runOperation: async () => ({ ok: false, error: "not stubbed" }),search: async () => ({ ok: false, error: "not stubbed" })});diff --git a/packages/jobs/src/workflows/integrations/allowlist.ts b/packages/jobs/src/workflows/integrations/allowlist.tsnew file mode 100644index 0000000000..7b645bd12f--- /dev/null+++ b/packages/jobs/src/workflows/integrations/allowlist.ts@@ -0,0 +1,383 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import type { ActivepiecesPiece } from "@carbon/ee/integrations/pieces";+import type { getEnv } from "@carbon/env";++/** A variable `@carbon/env` declares — `getEnv` refuses any other name. */+type EnvName = Parameters<typeof getEnv>[0];++/** What Carbon exposes from a third-party integration piece.+ *+ * Curated on purpose: a usable OAuth integration needs an app we register and get+ * verified with the vendor, so breadth is bounded by that, not by this file. The+ * allowlist — not the piece — decides which actions a workflow can reach.+ *+ * It is the one place the workflow side names a vendor: which env vars hold our OAuth+ * app and how to read back which account authorized are fields on the row below, not+ * branches in shared code. A new vendor still needs its own `defineIntegration` card+ * and its three env vars registered in `@carbon/env` — see the checklist in+ * `.claude/rules/workflow-integrations.md`.+ *+ * **Only OAuth2 pieces are supported.** A piece whose auth is `SECRET_TEXT`,+ * `BASIC_AUTH` or `CUSTOM_AUTH` is refused by `getPieceOAuth2Auth` with an+ * `UnsupportedPieceAuthError` — that is deliberate, not an oversight. Those pieces+ * need a different design end to end (a credential form instead of a consent+ * screen, no callback route, no refresh cycle), so they get their own work rather+ * than a special case bolted onto this path.+ */+/** A reviewed decision about one prop of one action. Written when a piece is+ * allowlisted — which is already a deliberate, human-gated step. */+export interface AllowlistPropOverride {+ /** Keep it out of the ordinary form; it still appears under Advanced. */+ hidden?: boolean;+ /** Drop the prop from the step entirely — neither the form nor Advanced offers it.+ * For props whose non-default value needs a host capability Carbon refuses (send as+ * user, mention the origin flow) or a type Carbon cannot render. A `value` is still+ * sent at run time; a required prop needs one. */+ omit?: boolean;+ /** Sent at RUN time when the node supplies nothing, never stored on the node —+ * so changing our mind here fixes every existing workflow at once. */+ value?: unknown;+ /** Prose the vendor declared as a ShortText (Gmail's email `body`): render the+ * multiline editor with inline variables, as a LongText gets automatically. */+ template?: boolean;+ /** This prose reaches the vendor in a dialect that renders links, so a record+ * dropped in becomes one (`format`) — optionally only while a sibling prop holds+ * one of `equals` (Gmail links only an html body). Reviewed per action like+ * `omit`, and pinned with the version: it asserts how THIS vendor renders text. */+ links?: {+ format: "slack" | "html";+ when?: { input: string; equals: readonly string[] };+ };+}++export interface AllowlistEntry {+ package: string;+ /** The EXACT version, no range prefix — `assertPinnedVersions` holds this and+ * package.json together, so an upstream release can never silently change code we+ * execute against a customer's account. */+ version: string;+ label: string;+ /** Which of the piece's actions we expose — names only. An action's INPUTS are+ * read from the piece's own `props` (`properties.ts`) and its OUTPUTS from its+ * `outputSchema` (`outputs.ts`) at catalog generation; neither is declared here.+ * The `props` block below only OVERRIDES what the piece declares. */+ actions: readonly string[];+ /**+ * The NAMES of the env vars holding Carbon's OAuth app for this vendor — never+ * the values. This module is+ * imported by build-time catalog scripts, which must+ * never carry a secret, and by the browser-safe settings config indirectly.+ */+ oauth: {+ clientIdEnv: EnvName;+ clientSecretEnv: EnvName;+ redirectUrlEnv: EnvName;+ /** Consent endpoint to use instead of the piece's `authUrl` — for a piece that bakes+ * extra requests (Slack's `user_scope=`) into its URL. */+ authUrl?: string;+ /** Scopes to request instead of the piece's full list. Must cover every allowlisted+ * action and the `options()` its dropdowns call. */+ scope?: readonly string[];+ };+ /**+ * How to read back which account authorized, so a company with two connections+ * can tell them apart. Either a field of a GET on the vendor's identity endpoint,+ * or a dot path into the token response itself (Slack returns `team.name`).+ * Optional: a vendor with neither just shows the connection's own name.+ */+ accountLabel?: { url: string; field: string } | { path: string };+ /**+ * Workspace facts to keep on the connection, as `{ metadataKey: tokenResponsePath }`.+ * Slack's token response carries the team, the bot user and the incoming-webhook+ * channel the person picked; the Assistant reads those off the connection. Google+ * records the granted `scope` string, which is what lets `missingScopes` turn a+ * later scope change into "Reconnect needed". Only the listed paths are copied —+ * a token is never among them.+ */+ metadata?: Record<string, string>;+ /** Per-action prop overrides, keyed by action then prop. Only for a vendor+ * default that is WRONG for us — the generic rules in `visibility.ts` handle+ * merely-uninteresting fields with no per-action data. */+ props?: Record<string, Record<string, AllowlistPropOverride>>;+ /** Per-action: sort the list's items earliest first, before the size cap, by+ * the moment at these paths in the vendor's own element (first present wins).+ * For a vendor that returns results in no useful order (Google's events.list+ * groups a recurring series' instances together), the cap would otherwise+ * cut whole event types instead of the far future. */+ sortItemsBy?: Record<string, readonly string[]>;+}++/**+ * WHAT BIT US adding the first three pieces (Google Calendar, Slack, Gmail) — none of+ * them connected on the first try. Read this before adding a fourth; the rule's+ * "Adding a piece" checklist has the steps, this is the why behind each one.+ *+ * 1. `companyIntegration.id` is an FK to `integration.id`, so a card with no+ * `integration` row FAILS the consent callback on its "installed" write — after+ * the token is already in the vault. Every piece needs the one-row migration+ * (the `INSERT INTO "integration"` at the end of+ * `20261026151302_workflow-integration-connections.sql`). Gmail, 2026-09-01.+ * 2. Google canonicalises scopes: request `email` and the token response's `scope`+ * says `https://www.googleapis.com/auth/userinfo.email` (plus an unrequested+ * `openid`). `missingScopes(granted, required)` then never matches, and the+ * account reads "Reconnect needed" the moment it connects. Only ever list the+ * full `https://www.googleapis.com/auth/…` URLs here; never a short alias, even+ * when the piece's own list uses one. Calendar escaped only because its first+ * rows predate scope recording (`metadata: {}` → grants unknown → never flagged).+ * 3. Slack's piece bakes `user_scope=` into its `authUrl` (a personal user token we+ * never use) and asks for 30 bot scopes: override BOTH `authUrl` and `scope`.+ * 4. A required prop WITH a vendor default is hidden from the form but must still be+ * SENT — the piece reads `propsValue.x` unguarded (`event_types.length` crashed).+ * `visibility.ts` does this for you; an `omit` on a required prop needs a `value`.+ * 5. Google issues a refresh token only with `access_type=offline` AND+ * `prompt=consent`, and omits it from refresh responses: `buildConsentUrl` sets+ * both, `resolveConnectionAuth` carries the stored one forward. Do not "simplify".+ * 6. A PostgREST failure is a plain object: `err instanceof Error` is false and+ * `err.message` reads as "" — the callback once logged `name=object detail=` for+ * pitfall 1. Log the JSON of a non-Error, always.+ * 7. The card's "Coming soon" is decided client-side from `window.env`: a new+ * client id must be in `getBrowserEnv()` AND the root loader's hand-built `env`+ * object (`.ai/lessons.md` "A browser-safe env flag isn't live until…").+ * 8. `pnpm-workspace.yaml` `minimumReleaseAge` (3 days) refuses a piece version+ * published this week; pin the previous one and compare the action you expose.+ * 9. A token has ONE reader (`resolveConnectionAuth` / `readConnectionAccessToken`).+ * Reading it off a column or `metadata` returns `undefined` silently — Slack DMs+ * went dark for weeks that way (`.ai/lessons.md` "Secret material is read+ * through ONE reader").+ * 10. `markIntegrationInstalled` inserts-or-reactivates and NEVER rewrites an+ * existing row's `metadata`; a second account on an installed card must not+ * reset settings that are not the callback's to touch.+ * 11. Any vitest file whose import chain reaches `@carbon/auth` needs the server env+ * (`.env.local` sourced) or it fails at IMPORT with "INNGEST_SIGNING_KEY is not+ * set" — mock the sibling module instead (`actions/integration.test.ts` does).+ * 12. A vendor's `ARRAY` prop (To, CC, attendees) is `list<string>`, and the builder+ * used to treat EVERY list as "wire it from an earlier step" — so the To field+ * of an email offered a variable picker and no way to type an address. Lists+ * of plain text are a chip field now — one chip per address (`fields/control.ts`).+ * 13. Vendors declare prose as `ShortText` (Gmail's `body`) and the builder rendered+ * a one-line box. `LongText` maps to `template: true` automatically; a+ * `ShortText` that is really prose needs `template: true` in `props` here.+ * 14. Google's OAuth verification does a STRING MATCH between the scopes an app+ * actually sends in `scope=` and the ones registered on the Cloud Console's Data+ * Access screen — and rejects any scope broader than the calls the app makes.+ * Editing `oauth.scope` for a Google piece is therefore never a code-only change:+ * the Console list must be edited to match exactly, and a scope not demonstrated+ * on video is refused. Pick the narrowest scope that covers each endpoint, and+ * name the endpoint next to it — Calendar's row below does. Sept 2026.+ */+// Keyed by the shared piece-name union rather than string, and NOT Partial:+// a name added to `ActivepiecesPiece` without an entry here refuses to compile,+// as does an entry whose key the union does not know. Runtime piece names come+// from stored node data and go through `allowlistEntry` below instead.+export const PIECE_ALLOWLIST: Record<ActivepiecesPiece, AllowlistEntry> = {+ "google-calendar": {+ package: "@activepieces/piece-google-calendar",+ version: "0.10.3",+ label: "Google Calendar",+ actions: ["create_google_calendar_event", "google_calendar_get_events"],+ oauth: {+ clientIdEnv: "GOOGLE_CLIENT_ID",+ clientSecretEnv: "GOOGLE_CLIENT_SECRET",+ redirectUrlEnv: "GOOGLE_OAUTH_REDIRECT_URL",+ // The piece's own list ends in the alias `email`. Google grants it as+ // `…/auth/userinfo.email`, so a connection made with the alias in the+ // required list reads as "Reconnect needed" forever (pitfall 2 above).+ // Canonical spelling, and the NARROWEST scope per call the two allowlisted+ // actions actually make — Google's OAuth review rejects anything broader+ // (pitfall 14 below):+ // • calendar.events create + list events on ONE calendar+ // (POST/GET /calendars/{id}/events — both actions)+ // • calendar.calendarlist.readonly name the calendars in the picker+ // (GET /users/me/calendarList — the dropdown only).+ // NOT calendar.readonly: that reads every event on every calendar, and the+ // picker only needs their names.+ scope: [+ "https://www.googleapis.com/auth/calendar.events",+ "https://www.googleapis.com/auth/calendar.calendarlist.readonly",+ "https://www.googleapis.com/auth/userinfo.email"+ ]+ },+ accountLabel: {+ url: "https://www.googleapis.com/oauth2/v2/userinfo",+ field: "email"+ },+ // Google reports the granted scopes too; recorded so a future scope change+ // can be detected the same way as Slack's.+ metadata: { scopes: "scope" },+ // events.list without `orderBy` groups a series' expanded instances into one+ // block; chronological is the only order a calendar question means.+ // An all-day event has `start.date` and no `start.dateTime`.+ sortItemsBy: {+ google_calendar_get_events: ["start.dateTime", "start.date"]+ },+ props: {+ google_calendar_get_events: {+ // "Expand Recurring Event?" defaults to FALSE upstream, and an unexpanded+ // recurring event carries the SERIES start date — so a workflow asking for+ // "events tomorrow" silently misses every recurring meeting. Nearly every+ // workflow wants it on, and the vendor's default is simply wrong for us.+ singleEvents: { hidden: true, value: true }+ }+ }+ },+ // One Slack card and one consent serve both the Carbon Assistant and workflow+ // steps; the Assistant reads the oldest Active connection (`getSlackWorkspace`).+ slack: {+ package: "@activepieces/piece-slack",+ version: "0.17.9",+ label: "Slack",+ actions: [+ "send_channel_message",+ "send_direct_message",+ "slack-find-user-by-email",+ "slack-create-channel"+ ],+ oauth: {+ clientIdEnv: "SLACK_CLIENT_ID",+ clientSecretEnv: "SLACK_CLIENT_SECRET",+ redirectUrlEnv: "SLACK_OAUTH_REDIRECT_URL",+ // The piece's own authUrl carries `user_scope=` — a personal user token we never use.+ authUrl: "https://slack.com/oauth/v2/authorize",+ scope: [+ // Assistant: slash commands, issue threads, DMs+ "assistant:write",+ "chat:write.public",+ "commands",+ "files:read",+ "im:history",+ "incoming-webhook", // Slack's channel picker → the Assistant's channel+ "team:read",+ // shared+ "chat:write",+ "users:read", // user dropdown+ "users:read.email", // lookupByEmail+ // workflow steps + dropdowns+ "channels:read", // channel dropdown (conversations.list)+ "groups:read",+ "chat:write.customize", // username / icon props+ "im:write", // DM (conversations.open)+ "channels:manage", // create public channel+ "groups:write" // create private channel+ ]+ },+ accountLabel: { path: "team.name" },+ metadata: {+ team_id: "team.id",+ team_name: "team.name",+ bot_user_id: "bot_user_id",+ channel: "incoming_webhook.channel",+ channel_id: "incoming_webhook.channel_id",+ // NOT `incoming_webhook.url`: a webhook URL is a bearer capability, and+ // metadata is readable by every settings admin.+ scopes: "scope" // the granted bot scopes, one comma-separated string+ },+ props: {+ send_channel_message: {+ // Posted as mrkdwn section blocks by the piece, so <url|label> renders.+ text: { links: { format: "slack" } },+ // `false` sends as the user, which needs `auth.data.authed_user` — a user token+ // we do not request.+ sendAsBot: { omit: true, value: true },+ // Reads the host flow context, which Carbon's shim refuses.+ mentionOriginFlow: { omit: true },+ // FILE / JSON have no Carbon input.+ file: { omit: true },+ blocks: { omit: true }+ },+ send_direct_message: {+ text: { links: { format: "slack" } },+ mentionOriginFlow: { omit: true },+ blocks: { omit: true }+ }+ }+ },+ // Same Google OAuth app as Google Calendar; its own card, consent and connections.+ gmail: {+ package: "@activepieces/piece-gmail",+ version: "0.13.0",+ label: "Gmail",+ actions: ["gmail_send_email"],+ oauth: {+ clientIdEnv: "GOOGLE_CLIENT_ID",+ clientSecretEnv: "GOOGLE_CLIENT_SECRET",+ redirectUrlEnv: "GOOGLE_OAUTH_REDIRECT_URL",+ // SEND-ONLY, deliberately. The piece also asks for gmail.readonly and+ // gmail.compose, which Google classes as RESTRICTED: an app holding them must+ // pass an annual third-party CASA security assessment before anyone outside+ // its test users can consent. gmail.send is merely "sensitive" — the same+ // verification tier the Calendar scopes already need. Adding a read or reply+ // action is therefore a compliance decision, not a one-line edit.+ // Canonical URL, not the alias `email` — see pitfall 2 above.+ scope: [+ "https://www.googleapis.com/auth/gmail.send",+ "https://www.googleapis.com/auth/userinfo.email"+ ]+ },+ accountLabel: {+ url: "https://www.googleapis.com/oauth2/v2/userinfo",+ field: "email"+ },+ metadata: { scopes: "scope" },+ props: {+ gmail_send_email: {+ // The piece declares the email body a ShortText. It is the one field an+ // author writes paragraphs into — and the one that links records, but only+ // as html: the MIME composer emits an html part only when body_type = html,+ // and a plain-text part renders markup literally.+ body: {+ template: true,+ links: {+ format: "html",+ when: { input: "body_type", equals: ["html"] }+ }+ },+ // An array of {data,name} FILE objects; Carbon would send list<string>.+ // Deferred with the rest of attachments (needs a file value type).+ attachments: { omit: true },+ // Resolves the thread through messages.list, which needs gmail.readonly.+ in_reply_to: { omit: true },+ // Required-with-default would land it under Advanced, where switching it+ // on calls drafts.create → gmail.compose → 403. Pinned off and out.+ draft: { omit: true, value: false }+ }+ }+ }+};++/** The allowlist entry for a piece name that arrives as a STRING — a stored+ * workflow node, a route param. The single place the typed record is widened;+ * an unknown name is `undefined` here rather than a compile error, because the+ * data it comes from cannot be compile-time checked. */+export function allowlistEntry(piece: string): AllowlistEntry | undefined {+ // Own keys only: `__proto__` or `toString` must read as an unknown piece.+ return Object.hasOwn(PIECE_ALLOWLIST, piece)+ ? (PIECE_ALLOWLIST as Record<string, AllowlistEntry>)[piece]+ : undefined;+}++/**+ * Refuses a row whose `version` disagrees with the installed dependency, or whose+ * dependency carries a range. Run by the catalog check — without it `version` would+ * be a comment, since the pin that decides which code runs lives in package.json.+ */+export function assertPinnedVersions(+ dependencies: Record<string, string>+): void {+ const problems: string[] = [];++ for (const [pieceName, entry] of Object.entries(PIECE_ALLOWLIST)) {+ const installed = dependencies[entry.package];+ if (installed === undefined) {+ problems.push(`${pieceName}: ${entry.package} is not a dependency.`);+ } else if (installed !== entry.version) {+ problems.push(+ `${pieceName}: the allowlist says ${entry.package}@${entry.version}, package.json says ${installed}.`+ );+ }+ }++ if (problems.length > 0) throw new Error(problems.join("\n"));+}diff --git a/packages/jobs/src/workflows/integrations/catalog.test.ts b/packages/jobs/src/workflows/integrations/catalog.test.tsnew file mode 100644index 0000000000..3d4c89de62--- /dev/null+++ b/packages/jobs/src/workflows/integrations/catalog.test.ts@@ -0,0 +1,113 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { describe, expect, it } from "vitest";+import { buildPieceActionDeclarations } from "./catalog";+import { toValueType, UnmappablePropertyError } from "./properties";++describe("buildPieceActionDeclarations (slack)", () => {+ it("emits the four allowlisted slack steps with omitted props absent", async () => {+ const all = await buildPieceActionDeclarations();+ const ids = Object.keys(all).filter((id) =>+ id.startsWith("integration.slack.")+ );+ expect(ids.sort()).toEqual([+ "integration.slack.send_channel_message",+ "integration.slack.send_direct_message",+ "integration.slack.slack-create-channel",+ "integration.slack.slack-find-user-by-email"+ ]);++ const send = all["integration.slack.send_channel_message"]!;+ expect(Object.keys(send.inputs).sort()).toEqual(+ [+ "connectionId",+ "channel",+ "text",+ "threadTs",+ "username",+ "profilePicture",+ "iconEmoji",+ "replyBroadcast",+ "unfurlLinks"+ ].sort()+ );+ expect(send.advancedInputs).toBeUndefined();+ for (const gone of [+ "info",+ "file",+ "blocks",+ "sendAsBot",+ "mentionOriginFlow"+ ]) {+ expect(send.inputs).not.toHaveProperty(gone);+ }+ expect(send.inputs.channel!.options?.provider).toBe("integration.property");+ // Slack's "Message" is a LongText: the multiline editor.+ expect(send.inputs.text!.template).toBe(true);+ // Posted as mrkdwn blocks, so a record can be a real <url|label> link.+ expect(send.inputs.text!.links).toEqual({ format: "slack" });+ expect(send.outputs).toHaveProperty("count");+ expect(send.outputs).toHaveProperty("result");++ const dm = all["integration.slack.send_direct_message"]!;+ expect(dm.inputs.text!.links).toEqual({ format: "slack" });+ expect(dm.inputs).not.toHaveProperty("blocks");+ expect(dm.inputs).not.toHaveProperty("mentionOriginFlow");+ expect(dm.inputs.userId!.options?.provider).toBe("integration.property");+ });++ // Omission is explicit. A merely hidden (or untouched) unmappable prop still refuses,+ // so nothing is dropped from a form silently.+ it("still refuses an unmappable prop that was not omitted", () => {+ expect(() =>+ toValueType("p", "a", "blocks", { type: "JSON", required: false })+ ).toThrow(UnmappablePropertyError);+ });+});++describe("buildPieceActionDeclarations (gmail)", () => {+ it("emits the one send step with the send-only prop set", async () => {+ const all = await buildPieceActionDeclarations();+ const ids = Object.keys(all).filter((id) =>+ id.startsWith("integration.gmail.")+ );+ expect(ids).toEqual(["integration.gmail.gmail_send_email"]);++ const send = all["integration.gmail.gmail_send_email"]!;+ expect(Object.keys(send.inputs).sort()).toEqual(+ [+ "connectionId",+ "receiver",+ "cc",+ "bcc",+ "subject",+ "body",+ "reply_to",+ "sender_name",+ "from"+ ].sort()+ );+ // Required with a vendor default: hidden, still reachable, sent as plain_text.+ expect(Object.keys(send.advancedInputs ?? {})).toEqual(["body_type"]);+ for (const gone of ["attachments", "in_reply_to", "draft"]) {+ expect(send.inputs).not.toHaveProperty(gone);+ expect(send.advancedInputs ?? {}).not.toHaveProperty(gone);+ }+ expect(send.inputs.receiver!.type).toEqual({+ kind: "list",+ of: { kind: "primitive", of: "string" }+ });+ // The body is a ShortText upstream; the allowlist says it is prose.+ expect(send.inputs.body!.template).toBe(true);+ // Links only in an html body; the subject never links.+ expect(send.inputs.body!.links).toEqual({+ format: "html",+ when: { input: "body_type", equals: ["html"] }+ });+ expect(send.inputs.subject!.links).toBeUndefined();+ expect(send.outputs).toHaveProperty("count");+ expect(send.outputs).toHaveProperty("result");+ });+});diff --git a/packages/jobs/src/workflows/integrations/catalog.ts b/packages/jobs/src/workflows/integrations/catalog.tsnew file mode 100644index 0000000000..6631fe7884--- /dev/null+++ b/packages/jobs/src/workflows/integrations/catalog.ts@@ -0,0 +1,140 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import {+ type ActionInputLike,+ type IntegrationDeclarationLike,+ integrationStepId+} from "@carbon/ee/workflows";+import { PIECE_ALLOWLIST } from "./allowlist";+import { CONNECTION_INPUT, CONNECTION_PROVIDER } from "./options";+import { describeOutputs, UnmappableOutputError } from "./outputs";+import { toValueType, vendorText } from "./properties";+import { getPieceActions } from "./registry";+import { assertHiddenPropIsSatisfied, visibilityOf } from "./visibility";++/** Turns the allowlist into workflow integration-step declarations, one per exposed+ * piece action. Read at BUILD time by scripts/generate-workflow-catalog.ts — the list+ * is static under a curated allowlist, so it belongs in the committed catalog rather+ * than a per-company runtime lookup. It is emitted as its OWN catalog: an integration+ * step is a distinct node kind, not an action. */++export async function buildPieceActionDeclarations(): Promise<+ Record<string, IntegrationDeclarationLike>+> {+ const declarations: Record<string, IntegrationDeclarationLike> = {};++ for (const [pieceName, entry] of Object.entries(PIECE_ALLOWLIST)) {+ const actions = await getPieceActions(pieceName);++ for (const [actionName, action] of Object.entries(actions)) {+ const inputs: IntegrationDeclarationLike["inputs"] = {+ // Always first: which of the company's connections to act as. It is an+ // ordinary fetched-choices input — the builder has no notion of a+ // connection, only of an input whose values come from a provider.+ [CONNECTION_INPUT]: {+ type: { kind: "primitive", of: "string" },+ required: true,+ label: "connection",+ options: {+ provider: CONNECTION_PROVIDER,+ params: { piece: pieceName }+ }+ }+ };++ // Hidden inputs are emitted SEPARATELY rather than flagged in place: every+ // `required` check and the validator itself iterate `inputs`, so a+ // hidden-but-present required input would have the validator demand a field+ // the author was never shown.+ const advancedInputs: IntegrationDeclarationLike["inputs"] = {};++ for (const [propName, property] of Object.entries(action.props)) {+ const override = entry.props?.[actionName]?.[propName];+ const visibility = visibilityOf(property, override);+ assertHiddenPropIsSatisfied(+ pieceName,+ actionName,+ propName,+ property,+ visibility+ );+ // Omitted props are not part of the step: nothing to render, so nothing to+ // map — an unmappable type is only ever an error for a prop a person would see.+ if (!visibility.show && visibility.omit === true) continue;++ const declared: ActionInputLike = {+ ...toValueType(pieceName, actionName, propName, property),+ // Prose: a ShortText the allowlist knows better about. A vendor's+ // LongText is already one.+ ...(override?.template === true ? { template: true } : {}),+ ...(override?.links === undefined ? {} : { links: override.links })+ };++ if (visibility.show) inputs[propName] = declared;+ // A hidden input is never REQUIRED of the author — it is satisfied by a+ // pinned value or the piece's own default — but it stays editable under+ // Advanced for anyone who needs it.+ else {+ advancedInputs[propName] = {+ ...declared,+ required: false,+ // The EFFECTIVE default — an allowlist pin beats the piece's own —+ // so an untouched Advanced toggle displays what the run will send.+ ...(visibility.value !== undefined+ ? {+ defaultValue:+ visibility.value as ActionInputLike["defaultValue"]+ }+ : {})+ };+ }+ }++ // An action that does not describe what it returns is REFUSED, not exposed+ // with an opaque blob: the author would wire it up, see one `result` string,+ // and only discover at run time that nothing can read it. Coverage is+ // all-or-nothing per piece, so this fails when the piece is allowlisted —+ // never in front of a customer.+ if (action.outputSchema === undefined) {+ throw new UnmappableOutputError(pieceName, actionName);+ }++ const declared = Object.fromEntries(+ Object.entries(describeOutputs(action.outputSchema)).map(+ ([name, { type }]) => [name, type]+ )+ );+ for (const reserved of ["count", "result"]) {+ if (reserved in declared) {+ throw new Error(+ `${pieceName}.${actionName} declares an output named "${reserved}", which Carbon adds itself.`+ );+ }+ }++ declarations[integrationStepId(pieceName, actionName)] = {+ // The display name is vendor prose, spliced into a `msg` template like+ // every other piece string, so it is made safe the same way.+ label: `${entry.label}: ${vendorText(action.displayName)}`,+ permission: { module: "workflows", action: "update" },+ inputs,+ ...(Object.keys(advancedInputs).length === 0 ? {} : { advancedInputs }),+ outputs: {+ ...declared,+ // `compare` has no "is empty" operator on a list, so "did anything come+ // back?" would otherwise be inexpressible.+ count: { kind: "primitive", of: "number" },+ // The raw JSON. Kept so every already-saved workflow reading `result`+ // still works, and so a field the schema missed stays reachable.+ result: { kind: "primitive", of: "string" }+ },+ batchable: false,+ piece: { name: pieceName, action: actionName, label: entry.label }+ };+ }+ }++ return declarations;+}diff --git a/packages/jobs/src/workflows/integrations/context.ts b/packages/jobs/src/workflows/integrations/context.tsnew file mode 100644index 0000000000..355dbec1b3--- /dev/null+++ b/packages/jobs/src/workflows/integrations/context.ts@@ -0,0 +1,56 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++/**+ * The host shim a piece's `run()` receives.+ *+ * A piece declares far more context than an action normally uses — `store`,+ * `connections`, `project`, `flows`, `step`, `files`. The spike showed stubs are+ * enough for the actions Carbon exposes, so every stub THROWS rather than+ * returning empty: a piece that genuinely needs one must fail loudly in+ * development instead of misbehaving in production.+ */++function unavailable(what: string): never {+ throw new Error(+ `This integration step used ${what}, which Carbon does not provide.`+ );+}++export function buildPieceContext(args: {+ auth: unknown;+ propsValue: Record<string, unknown>;+}): Record<string, unknown> {+ return {+ auth: args.auth,+ propsValue: args.propsValue,+ store: {+ get: () => unavailable("shared storage"),+ put: () => unavailable("shared storage"),+ delete: () => unavailable("shared storage")+ },+ connections: {+ get: () => unavailable("another connection")+ },+ project: {+ id: "carbon",+ externalId: () => unavailable("a project id")+ },+ flows: {+ current: { id: "carbon", version: { id: "carbon" } },+ list: () => unavailable("the flow list")+ },+ step: { name: "carbon" },+ files: {+ write: () => unavailable("file storage")+ },+ // Getters, not empty strings: a piece reading one of these would otherwise send+ // "" to the vendor and fail there instead of here.+ get server(): never {+ return unavailable("the host server URL");+ },+ run: { id: "carbon", stop: () => unavailable("run control") },+ generateResumeUrl: () => unavailable("a resume URL")+ };+}diff --git a/packages/jobs/src/workflows/integrations/index.ts b/packages/jobs/src/workflows/integrations/index.tsnew file mode 100644index 0000000000..216338dbdf--- /dev/null+++ b/packages/jobs/src/workflows/integrations/index.ts@@ -0,0 +1,18 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++/** Server-only. Piece packages bundle Node vendor SDKs — never import this+ * subpath from browser code. */+export type { AllowlistEntry } from "./allowlist";+export { allowlistEntry } from "./allowlist";+export {+ accountLabelFromBody,+ buildConsentUrl,+ connectionMetadataFrom,+ requiredScopesFor,+ resolveOAuthApp+} from "./oauth";+export { CONNECTION_PROVIDER, PROPERTY_PROVIDER } from "./options";+export { resolvePieceAuth } from "./piece-auth";+export { getPieceAction, getPieceOAuth2Auth } from "./registry";diff --git a/packages/jobs/src/workflows/integrations/oauth.test.ts b/packages/jobs/src/workflows/integrations/oauth.test.tsnew file mode 100644index 0000000000..29a836ed11--- /dev/null+++ b/packages/jobs/src/workflows/integrations/oauth.test.ts@@ -0,0 +1,251 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { describe, expect, it, vi } from "vitest";++// Read by NAME off the allowlist row, so the mock is a bag of env vars rather+// than fixed exports — that indirection is the thing under test.+const ENV: Record<string, string | undefined> = {+ GOOGLE_CLIENT_ID: "client-id",+ GOOGLE_CLIENT_SECRET: "client-secret",+ GOOGLE_OAUTH_REDIRECT_URL:+ "https://erp.test/api/integrations/connections/callback"+};++vi.mock("@carbon/env", () => ({+ getEnv: (name: string) => ENV[name]+}));++const {+ accountLabelFromBody,+ buildConsentUrl,+ connectionMetadataFrom,+ requiredScopesFor,+ resolveOAuthApp+} = await import("./oauth");+const { PIECE_ALLOWLIST } = await import("./allowlist");+const { getPieceOAuth2Auth } = await import("./registry");++describe("resolveOAuthApp", () => {+ it("reads the app from the env vars the allowlist row names", () => {+ expect(resolveOAuthApp("google-calendar")).toEqual({+ clientId: "client-id",+ clientSecret: "client-secret",+ redirectUrl: "https://erp.test/api/integrations/connections/callback"+ });+ });++ it("refuses a piece that is not allowlisted", () => {+ expect(() => resolveOAuthApp("notion")).toThrow(+ "No OAuth app is configured for notion."+ );+ });++ it("refuses when the server has not configured the app", () => {+ ENV.GOOGLE_CLIENT_SECRET = undefined;+ try {+ // A half-configured vendor must fail here, not send the customer to a+ // consent screen that cannot come back.+ expect(() => resolveOAuthApp("google-calendar")).toThrow(+ "No OAuth app is configured for google-calendar."+ );+ } finally {+ ENV.GOOGLE_CLIENT_SECRET = "client-secret";+ }+ });+});++describe("buildConsentUrl", () => {+ const app = { clientId: "c", redirectUrl: "https://erp.test/cb" };+ const oauth = {+ clientIdEnv: "GOOGLE_CLIENT_ID",+ clientSecretEnv: "GOOGLE_CLIENT_SECRET",+ redirectUrlEnv: "GOOGLE_OAUTH_REDIRECT_URL"+ } as const;++ it("uses the piece's own authUrl and scope when the row overrides nothing", () => {+ const url = new URL(+ buildConsentUrl({+ entry: { oauth },+ auth: { authUrl: "https://v.example/auth?x=1", scope: ["a", "b"] },+ app,+ state: "s"+ })+ );+ expect(url.origin + url.pathname).toBe("https://v.example/auth");+ expect(url.searchParams.get("x")).toBe("1");+ expect(url.searchParams.get("scope")).toBe("a b");+ expect(url.searchParams.get("client_id")).toBe("c");+ expect(url.searchParams.get("redirect_uri")).toBe("https://erp.test/cb");+ expect(url.searchParams.get("state")).toBe("s");+ });++ // Slack's piece bakes a user-token request into its URL; the override drops it.+ it("lets the row replace the authUrl and the scope", () => {+ const url = new URL(+ buildConsentUrl({+ entry: {+ oauth: {+ ...oauth,+ authUrl: "https://slack.com/oauth/v2/authorize",+ scope: ["chat:write"]+ }+ },+ auth: {+ authUrl:+ "https://slack.com/oauth/v2/authorize?user_scope=search:read",+ scope: ["chat:write", "channels:manage"]+ },+ app,+ state: "s"+ })+ );+ expect(url.searchParams.has("user_scope")).toBe(false);+ expect(url.searchParams.get("scope")).toBe("chat:write");+ });++ it("asks Slack for the sixteen bot scopes and no user token", async () => {+ const url = new URL(+ buildConsentUrl({+ entry: PIECE_ALLOWLIST.slack!,+ auth: await getPieceOAuth2Auth("slack"),+ app,+ state: "s"+ })+ );+ expect(url.searchParams.has("user_scope")).toBe(false);+ const scopes = url.searchParams.get("scope")!.split(" ");+ expect(new Set(scopes).size).toBe(16);+ expect(scopes).toContain("chat:write.public");+ expect(scopes).toContain("incoming-webhook");+ expect(scopes).toContain("channels:read");+ });++ it("asks Google for send-only Gmail scopes, offline, with forced consent", async () => {+ const url = new URL(+ buildConsentUrl({+ entry: PIECE_ALLOWLIST.gmail!,+ auth: await getPieceOAuth2Auth("gmail"),+ app,+ state: "s"+ })+ );+ expect(url.origin + url.pathname).toBe(+ "https://accounts.google.com/o/oauth2/auth"+ );+ expect(url.searchParams.get("scope")).toBe(+ "https://www.googleapis.com/auth/gmail.send https://www.googleapis.com/auth/userinfo.email"+ );+ expect(url.searchParams.get("access_type")).toBe("offline");+ expect(url.searchParams.get("prompt")).toBe("consent");+ });+});++describe("connection metadata", () => {+ const body = {+ ok: true,+ access_token: "xoxb-1",+ scope: "chat:write,commands",+ bot_user_id: "U1",+ team: { id: "T1", name: "Acme" },+ incoming_webhook: {+ channel: "#ops",+ channel_id: "C1",+ url: "https://hooks.slack.com/x",+ configuration_url: "https://acme.slack.com/services/B1"+ }+ };++ it("picks exactly the declared paths, never the token", () => {+ const picked = connectionMetadataFrom(PIECE_ALLOWLIST.slack!, body);+ expect(picked).toEqual({+ team_id: "T1",+ team_name: "Acme",+ bot_user_id: "U1",+ channel: "#ops",+ channel_id: "C1",+ scopes: "chat:write,commands"+ });+ expect(picked).not.toHaveProperty("access_token");+ // A webhook URL lets anyone post to the channel — never on a row admins can read.+ expect(picked).not.toHaveProperty("webhook_url");+ });++ it("omits paths the response does not carry", () => {+ const { incoming_webhook: _omitted, ...withoutWebhook } = body;+ const picked = connectionMetadataFrom(+ PIECE_ALLOWLIST.slack!,+ withoutWebhook+ );+ for (const gone of ["channel", "channel_id"]) {+ expect(picked).not.toHaveProperty(gone);+ }+ expect(picked.team_id).toBe("T1");+ });++ it("is empty for a row that declares nothing", () => {+ expect(connectionMetadataFrom({ metadata: undefined }, body)).toEqual({});+ });++ it("reads the account label off the response only when the row says so", () => {+ expect(accountLabelFromBody(PIECE_ALLOWLIST.slack!, body)).toBe("Acme");+ expect(+ accountLabelFromBody(PIECE_ALLOWLIST["google-calendar"]!, body)+ ).toBeNull();+ });+});++describe("requiredScopesFor", () => {+ it("is the row's override when it has one", async () => {+ const scopes = await requiredScopesFor("slack");+ expect(new Set(scopes).size).toBe(16);+ expect(scopes).toContain("channels:read");+ });++ // Pitfall 14: Google's OAuth review refuses a scope broader than the calls the+ // app makes, so Calendar asks for LESS than its piece does — the exact three, and+ // canonically spelled (pitfall 2) so granted-vs-required matches.+ it("asks for Calendar's three narrowest scopes, not the piece's broader list", async () => {+ expect([...(await requiredScopesFor("google-calendar"))].sort()).toEqual([+ "https://www.googleapis.com/auth/calendar.calendarlist.readonly",+ "https://www.googleapis.com/auth/calendar.events",+ "https://www.googleapis.com/auth/userinfo.email"+ ]);+ });++ // The piece asks for `calendar.readonly` — every event on every calendar — where+ // the only call we make it for is the picker's `calendarList`. Requesting it would+ // fail verification, so the override must stay strictly narrower.+ it("never inherits the piece's calendar.readonly", async () => {+ const pieceScopes = (await getPieceOAuth2Auth("google-calendar")).scope;+ expect(pieceScopes).toContain(+ "https://www.googleapis.com/auth/calendar.readonly"+ );+ expect(await requiredScopesFor("google-calendar")).not.toContain(+ "https://www.googleapis.com/auth/calendar.readonly"+ );+ });++ // Pitfall 2 in allowlist.ts: a short alias never matches what Google reports as+ // granted, so the account would read "Reconnect needed" from its first second.+ it("never lists a Google scope alias on any row", async () => {+ for (const piece of Object.keys(PIECE_ALLOWLIST)) {+ for (const scope of await requiredScopesFor(piece)) {+ expect(["email", "profile", "openid"]).not.toContain(scope);+ }+ }+ });++ it("is empty for a piece that is not allowlisted", async () => {+ expect(await requiredScopesFor("nope")).toEqual([]);+ });++ it("is send-only for gmail, never the piece's restricted scopes", async () => {+ const scopes = await requiredScopesFor("gmail");+ expect(scopes).toEqual([+ "https://www.googleapis.com/auth/gmail.send",+ "https://www.googleapis.com/auth/userinfo.email"+ ]);+ });+});diff --git a/packages/jobs/src/workflows/integrations/oauth.ts b/packages/jobs/src/workflows/integrations/oauth.tsnew file mode 100644index 0000000000..f7667ebc24--- /dev/null+++ b/packages/jobs/src/workflows/integrations/oauth.ts@@ -0,0 +1,131 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import type { OAuth2RefreshConfig } from "@carbon/ee/integrations/connections";+import { getPath } from "@carbon/ee/integrations/secrets";+import { getEnv } from "@carbon/env";+import { type AllowlistEntry, allowlistEntry } from "./allowlist";+import { getPieceOAuth2Auth } from "./registry";+import type { OAuth2AuthDeclaration } from "./types";++/** The OAuth app credentials belong to Carbon, not to the piece: the piece knows+ * the vendor's URLs and scopes, we know the app we registered with that vendor. */++export interface PieceOAuthApp {+ clientId: string;+ clientSecret: string;+ redirectUrl: string;+}++/**+ * Carbon's OAuth app for one piece, read by the env var NAMES on its allowlist row.+ *+ * Looked up dynamically rather than imported as constants, because the set of+ * vendors is data. `getEnv` is the sanctioned accessor; this module is server-only,+ * so it always resolves against `process.env`.+ *+ * Throws when the server has no app configured for the piece. That is the whole+ * point of the refusal: a half-configured vendor must fail here rather than send a+ * customer to a consent screen that cannot come back.+ */+export function resolveOAuthApp(pieceName: string): PieceOAuthApp {+ const entry = allowlistEntry(pieceName);+ if (entry === undefined) {+ throw new Error(`No OAuth app is configured for ${pieceName}.`);+ }++ const clientId = getEnv(entry.oauth.clientIdEnv);+ const clientSecret = getEnv(entry.oauth.clientSecretEnv);+ const redirectUrl = getEnv(entry.oauth.redirectUrlEnv);++ if (!clientId || !clientSecret || !redirectUrl) {+ throw new Error(`No OAuth app is configured for ${pieceName}.`);+ }++ return { clientId, clientSecret, redirectUrl };+}++export async function buildRefreshConfig(+ pieceName: string+): Promise<OAuth2RefreshConfig> {+ const auth = await getPieceOAuth2Auth(pieceName);+ const { clientId, clientSecret } = resolveOAuthApp(pieceName);+ return { tokenUrl: auth.tokenUrl, clientId, clientSecret };+}++/**+ * The vendor consent URL. The piece supplies `authUrl` and `scope`; an allowlist row+ * may override either — Slack's piece bakes `user_scope=` into its URL and asks for+ * 30 bot scopes; the row lists exactly the scopes Carbon uses.+ */+export function buildConsentUrl(args: {+ entry: Pick<AllowlistEntry, "oauth">;+ auth: Pick<OAuth2AuthDeclaration, "authUrl" | "scope">;+ app: Pick<PieceOAuthApp, "clientId" | "redirectUrl">;+ state: string;+}): string {+ const url = new URL(args.entry.oauth.authUrl ?? args.auth.authUrl);+ url.searchParams.set("client_id", args.app.clientId);+ url.searchParams.set("redirect_uri", args.app.redirectUrl);+ url.searchParams.set("response_type", "code");+ url.searchParams.set(+ "scope",+ (args.entry.oauth.scope ?? args.auth.scope).join(" ")+ );+ // Without both of these Google returns no refresh token on a re-authorization.+ // Slack ignores them.+ url.searchParams.set("access_type", "offline");+ url.searchParams.set("prompt", "consent");+ url.searchParams.set("state", args.state);+ return url.toString();+}++/** The scopes a connection for this piece must hold — exactly what `buildConsentUrl`+ * requests, so "reconnect" always grants what the check demands. */+export async function requiredScopesFor(+ pieceName: string+): Promise<readonly string[]> {+ const entry = allowlistEntry(pieceName);+ if (entry === undefined) return [];+ return entry.oauth.scope ?? (await getPieceOAuth2Auth(pieceName)).scope;+}++/** A scalar at a dot path in a token response, or undefined. */+function scalarAt(+ body: Record<string, unknown>,+ path: string+): string | number | boolean | undefined {+ const value = getPath(body, path);+ return typeof value === "string" ||+ typeof value === "number" ||+ typeof value === "boolean"+ ? value+ : undefined;+}++/** The connection's metadata, picked from the token response by the row's declared+ * paths. Absent or non-scalar paths are omitted; nothing undeclared is copied. */+export function connectionMetadataFrom(+ entry: Pick<AllowlistEntry, "metadata">,+ body: Record<string, unknown>+): Record<string, unknown> {+ const picked: Record<string, unknown> = {};+ for (const [key, path] of Object.entries(entry.metadata ?? {})) {+ const value = scalarAt(body, path);+ if (value !== undefined) picked[key] = value;+ }+ return picked;+}++/** The account label when the row reads it off the token response; null otherwise+ * (the callback then falls back to the vendor identity endpoint, if declared). */+export function accountLabelFromBody(+ entry: Pick<AllowlistEntry, "accountLabel">,+ body: Record<string, unknown>+): string | null {+ const label = entry.accountLabel;+ if (label === undefined || !("path" in label)) return null;+ const value = scalarAt(body, label.path);+ return typeof value === "string" && value.length > 0 ? value : null;+}diff --git a/packages/jobs/src/workflows/integrations/options.ts b/packages/jobs/src/workflows/integrations/options.tsnew file mode 100644index 0000000000..7f8267725c--- /dev/null+++ b/packages/jobs/src/workflows/integrations/options.ts@@ -0,0 +1,23 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++/** The two options providers integration actions name, and the input every one of+ * them depends on.+ *+ * These strings are the whole contract between the committed catalog and the app's+ * options registry (`apps/erp/app/modules/workflows/workflows.service.ts`).+ * The builder never reads them — it forwards whatever `provider` an input names —+ * so adding a provider for Carbon's own data touches the registry and nothing here.+ */++/** Which of the company's connections the step acts as. Declared in `@carbon/workflows`+ * because the builder reads it too — it must know whether an app is connected before it+ * can offer any of that app's steps. */+export { INTEGRATION_CONNECTION_INPUT as CONNECTION_INPUT } from "@carbon/ee/workflows";++/** Lists the company's connections for one piece. */+export const CONNECTION_PROVIDER = "integration.connection";++/** Runs one piece property's own `options()` against a chosen connection. */+export const PROPERTY_PROVIDER = "integration.property";diff --git a/packages/jobs/src/workflows/integrations/outputs.test.ts b/packages/jobs/src/workflows/integrations/outputs.test.tsnew file mode 100644index 0000000000..a312cce6d5--- /dev/null+++ b/packages/jobs/src/workflows/integrations/outputs.test.ts@@ -0,0 +1,266 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { t } from "@carbon/ee/workflows";+import { describe, expect, it } from "vitest";+import { describeOutputs, readField } from "./outputs";+import type { PieceOutputSchema } from "./types";++/** Verbatim from `@activepieces/[email protected]`'s+ * `google_calendar_get_events.outputSchema`. Copied rather than imported so the+ * mapping is pinned against a known shape — a piece upgrade that changes it should+ * fail this test loudly, which is the whole point of the version pin. */+/** The type half of `describeOutputs`, which is what the catalog emits. */+function typesOf(schema: PieceOutputSchema) {+ return Object.fromEntries(+ Object.entries(describeOutputs(schema)).map(([name, { type }]) => [+ name,+ type+ ])+ );+}++const GET_EVENTS: PieceOutputSchema = {+ fields: [+ { key: "status", label: "Status Code" },+ { key: "summary", label: "Calendar Summary", value: "body.summary" },+ { key: "timeZone", label: "Time Zone", value: "body.timeZone" },+ {+ key: "updated",+ label: "Updated",+ value: "body.updated",+ format: "datetime"+ },+ {+ key: "items",+ label: "Events",+ value: "body.items",+ labelKey: "summary",+ listItems: [+ { key: "summary", label: "Title" },+ { key: "id", label: "Event ID" },+ { key: "htmlLink", label: "Event Link", format: "url" },+ {+ key: "startDateTime",+ label: "Start",+ value: "start.dateTime",+ format: "datetime"+ },+ {+ key: "organizerEmail",+ label: "Organizer Email",+ value: "organizer.email",+ format: "email"+ }+ ]+ }+ ]+};++/** From `create_google_calendar_event` — the `children` (nested object) case. */+const CREATE_EVENT: PieceOutputSchema = {+ fields: [+ { key: "summary", label: "Title" },+ { key: "htmlLink", label: "Event Link", format: "url" },+ {+ key: "start",+ label: "Start",+ children: [+ { key: "dateTime", label: "Start Time", format: "datetime" },+ { key: "timeZone", label: "Time Zone" }+ ]+ }+ ]+};++describe("describeOutputs types", () => {+ it("maps an array field to a list of records", () => {+ const types = typesOf(GET_EVENTS);+ expect(types.items).toEqual(+ t.list({+ kind: "record",+ fields: {+ summary: t.string,+ id: t.string,+ htmlLink: t.string,+ startDateTime: t.date,+ organizerEmail: t.string+ }+ })+ );+ });++ it("maps children to a nested record", () => {+ const types = typesOf(CREATE_EVENT);+ expect(types.start).toEqual(+ t.record({ dateTime: t.date, timeZone: t.string })+ );+ });++ // `format` is a display hint upstream, so this is OUR reading of it. url/email/+ // image/filesize are all text — only these three change the type.+ it("reads only datetime, number and boolean as non-text", () => {+ const types = typesOf({+ fields: [+ { key: "a", label: "A", format: "datetime" },+ { key: "b", label: "B", format: "number" },+ { key: "c", label: "C", format: "boolean" },+ { key: "d", label: "D", format: "url" },+ { key: "e", label: "E", format: "email" },+ { key: "f", label: "F", format: "filesize" },+ { key: "g", label: "G" }+ ]+ });+ expect(types).toEqual({+ a: t.date,+ b: t.number,+ c: t.boolean,+ d: t.string,+ e: t.string,+ f: t.string,+ g: t.string+ });+ });++ // The vendor is declaring the keys cannot be enumerated. Inventing a field name+ // would be exactly the lie this mapper exists to avoid.+ it("omits a dynamicKey field rather than guessing its shape", () => {+ const types = typesOf({+ fields: [+ { key: "row", label: "Row" },+ { key: "values", label: "Values", dynamicKey: true }+ ]+ });+ expect(types).toEqual({ row: t.string });+ expect("values" in types).toBe(false);+ });++ // `list.of` accepts only a scalar, so an array inside an array is unrepresentable.+ // Dropping the inner one keeps the outer list usable instead of refusing the action.+ it("drops an array nested inside an array", () => {+ const types = typesOf({+ fields: [+ {+ key: "events",+ label: "Events",+ listItems: [+ { key: "id", label: "Id" },+ {+ key: "attendees",+ label: "Attendees",+ listItems: [{ key: "email", label: "Email" }]+ }+ ]+ }+ ]+ });+ expect(types.events).toEqual(+ t.list({ kind: "record", fields: { id: t.string } })+ );+ });++ it("omits a container whose every field is unmappable", () => {+ const types = typesOf({+ fields: [+ {+ key: "opaque",+ label: "Opaque",+ children: [{ key: "k", label: "K", dynamicKey: true }]+ }+ ]+ });+ expect(types).toEqual({});+ });+});++describe("readField", () => {+ const field = (name: string) => {+ const found = describeOutputs(GET_EVENTS)[name];+ if (found === undefined) throw new Error(`no output ${name}`);+ return found.field;+ };+ const response = {+ status: 200,+ body: {+ summary: "Work",+ items: [+ {+ summary: "Standup",+ start: { dateTime: "2026-08-31T09:00:00Z" },+ organizer: { email: "[email protected]" }+ }+ ]+ }+ };++ it("reads a remapped field, and the key when there is no remap", () => {+ expect(readField(field("summary"), response)).toBe("Work");+ expect(readField(field("status"), response)).toBe(200);+ });++ it("rebuilds each list element keyed as its type names it", () => {+ expect(readField(field("items"), response)).toEqual([+ {+ summary: "Standup",+ id: undefined,+ htmlLink: undefined,+ startDateTime: "2026-08-31T09:00:00Z",+ organizerEmail: "[email protected]"+ }+ ]);+ });++ // Remaps used to be honoured one level deep only: a `children` field read its+ // fields by key, so a remapped child was always null.+ it("honours a remap at any depth", () => {+ const outputs = describeOutputs({+ fields: [+ {+ key: "event",+ label: "Event",+ value: "body.event",+ children: [+ { key: "startsAt", label: "Starts", value: "start.dateTime" },+ {+ key: "organizer",+ label: "Organizer",+ children: [{ key: "mail", label: "Mail", value: "email" }]+ }+ ]+ }+ ]+ });+ const event = outputs.event;+ if (event === undefined) throw new Error("no event output");+ expect(+ readField(event.field, {+ body: {+ event: {+ start: { dateTime: "2026-08-31T09:00:00Z" },+ organizer: { email: "[email protected]" }+ }+ }+ })+ ).toEqual({+ startsAt: "2026-08-31T09:00:00Z",+ organizer: { mail: "[email protected]" }+ });+ });++ it("returns undefined rather than throwing on a missing branch", () => {+ expect(readField(field("summary"), null)).toBeUndefined();+ expect(readField(field("summary"), "text")).toBeUndefined();+ expect(readField(field("summary"), { body: 1 })).toBeUndefined();+ });++ it("carries no output for a dropped dynamicKey field", () => {+ const paths = describeOutputs({+ fields: [+ { key: "row", label: "Row" },+ { key: "values", label: "Values", dynamicKey: true }+ ]+ });+ expect(Object.keys(paths)).toEqual(["row"]);+ });+});diff --git a/packages/jobs/src/workflows/integrations/outputs.ts b/packages/jobs/src/workflows/integrations/outputs.tsnew file mode 100644index 0000000000..f997957f7c--- /dev/null+++ b/packages/jobs/src/workflows/integrations/outputs.ts@@ -0,0 +1,137 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { getPath } from "@carbon/ee/integrations/secrets";+import { t, type ValueType } from "@carbon/ee/workflows";+import type { PieceOutputField, PieceOutputSchema } from "./types";++/** Translates a piece's declared output into Carbon's value vocabulary, and records+ * where in the real response each declared field is read from.+ *+ * The mirror of `properties.ts`, which does the same for the input side. Both refuse+ * rather than degrade — a half-described action must never reach a customer's canvas.+ */++export class UnmappableOutputError extends Error {+ constructor(piece: string, action: string) {+ super(+ `${piece}.${action} declares no outputSchema, so Carbon cannot describe what it returns.`+ );+ this.name = "UnmappableOutputError";+ }+}++/** `format` is a DISPLAY hint upstream, not a type — so this is our reading of it,+ * and every mapped value still degrades to null at run time when it disagrees. */+function primitiveFor(format: string | undefined): ValueType {+ switch (format) {+ case "datetime":+ return t.date;+ case "number":+ return t.number;+ case "boolean":+ return t.boolean;+ // url / email / image / filesize are all text with a rendering hint attached.+ default:+ return t.string;+ }+}++/**+ * A field's Carbon type, or `undefined` when it has none we can offer.+ *+ * `nested` is what stops a list of lists: `list.of` accepts only a scalar, so an+ * array INSIDE an array has no representation. Rather than throwing — which would+ * refuse a whole action over one field — the inner array is dropped, and the raw+ * `result` output remains the way to reach it.+ */+function typeOf(+ field: PieceOutputField,+ nested: boolean+): ValueType | undefined {+ // The vendor is saying the keys here vary per account and cannot be enumerated.+ // Inventing names for them would be exactly the lie this mapper exists to avoid.+ if (field.dynamicKey === true) return undefined;++ if (field.listItems !== undefined) {+ if (nested) return undefined;+ const fields = shapeOf(field.listItems, true);+ return fields === undefined+ ? undefined+ : t.list({ kind: "record", fields });+ }++ if (field.children !== undefined) {+ const fields = shapeOf(field.children, nested);+ return fields === undefined ? undefined : t.record(fields);+ }++ return primitiveFor(field.format);+}++/** The field map for one container, or `undefined` when nothing in it is mappable. */+function shapeOf(+ fields: readonly PieceOutputField[],+ nested: boolean+): Record<string, ValueType> | undefined {+ const shape: Record<string, ValueType> = {};+ for (const field of fields) {+ const type = typeOf(field, nested);+ if (type !== undefined) shape[field.key] = type;+ }+ return Object.keys(shape).length === 0 ? undefined : shape;+}++/** One declared output: its Carbon type, and the declared field it is read by. */+export interface OutputDescription {+ type: ValueType;+ field: PieceOutputField;+}++/**+ * The step's declared outputs, keyed as the author will see them, each with the+ * field that says where it lives in the real response.+ */+export function describeOutputs(+ schema: PieceOutputSchema+): Record<string, OutputDescription> {+ const outputs: Record<string, OutputDescription> = {};+ for (const field of schema.fields) {+ const type = typeOf(field, false);+ if (type !== undefined) outputs[field.key] = { type, field };+ }+ return outputs;+}++/**+ * A declared field's value, read from its own path (`value`, else `key`) inside+ * its container and rebuilt keyed as the type names it — at every depth, so a+ * remapped field inside `children` or `listItems` lands where its type says.+ *+ * A field the type dropped (a `dynamicKey`, a list inside a list) is still read+ * here, but it never reaches a step: `fromJson` walks only the declared fields.+ */+export function readField(+ field: PieceOutputField,+ container: unknown+): unknown {+ const raw = getPath(container, field.value ?? field.key);+ const { listItems, children } = field;+ if (listItems !== undefined) {+ return Array.isArray(raw)+ ? raw.map((item) => readFields(listItems, item))+ : raw;+ }+ if (children !== undefined) return readFields(children, raw);+ return raw;+}++function readFields(+ fields: readonly PieceOutputField[],+ container: unknown+): Record<string, unknown> {+ return Object.fromEntries(+ fields.map((field) => [field.key, readField(field, container)])+ );+}diff --git a/packages/jobs/src/workflows/integrations/piece-auth.ts b/packages/jobs/src/workflows/integrations/piece-auth.tsnew file mode 100644index 0000000000..4a1a4ca4a8--- /dev/null+++ b/packages/jobs/src/workflows/integrations/piece-auth.ts@@ -0,0 +1,96 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import type { Database } from "@carbon/database";+// The deep subpath, not the `@carbon/ee` root: that barrel pulls in integration+// config files whose `msg` macro is untransformed outside a Vite build.+import {+ ConnectionRefreshTimeoutError,+ ConnectionRevokedError,+ ConnectionSecretUnavailableError,+ missingScopes,+ type OAuth2RefreshConfig,+ readConnection,+ resolveConnectionAuth+} from "@carbon/ee/integrations/connections";+import type { SupabaseClient } from "@supabase/supabase-js";+import { buildRefreshConfig, requiredScopesFor } from "./oauth";++/** Why a connection cannot act for a piece right now. Each caller words it. */+export type PieceAuthFailure =+ /** Not this company's connection, or another piece's. */+ | { reason: "no-connection" }+ /** Usable, but predates a scope the piece now needs. */+ | { reason: "missing-scopes" }+ /** Another caller holds the refresh claim — transient, a retry fixes it. */+ | { reason: "refreshing" }+ /** Revoked, or its token cannot be read — a person must reconnect it. */+ | { reason: "reconnect" }+ /** The piece's OAuth app could not be loaded: ours, not the account's. */+ | { reason: "misconfigured"; cause: unknown }+ /** Anything else the token refresh threw. */+ | { reason: "failed"; cause: unknown };++export type PieceAuth =+ | { ok: true; accessToken: string }+ | ({ ok: false } & PieceAuthFailure);++/**+ * The access token a piece runs with, through one connection — the ONE copy of+ * "read the row, check it is this piece's, check its scopes, refresh it", shared+ * by the step runner and the builder's property options so the two cannot drift.+ *+ * `serviceClient` must be the service role: the vault RPCs are granted to it+ * alone, and the row's RLS asks for `settings_view`, which a workflow author+ * need not have. Every query is scoped by `companyId`, which the caller takes+ * from the run or the request — never from the definition. A failed row read+ * throws rather than reading as "no connection".+ */+export async function resolvePieceAuth(+ serviceClient: SupabaseClient<Database>,+ companyId: string,+ pieceName: string,+ connectionId: string+): Promise<PieceAuth> {+ const owned = await readConnection(serviceClient, companyId, connectionId);+ if (owned === null || owned.pieceName !== pieceName) {+ return { ok: false, reason: "no-connection" };+ }++ // Deterministic first: an under-scoped account fails here, without a vendor+ // call and without partial side effects.+ if (missingScopes(owned, await requiredScopesFor(pieceName)).length > 0) {+ return { ok: false, reason: "missing-scopes" };+ }++ // Apart from the refresh below: a missing package or an unset OAuth env var+ // has nothing to do with the account, and reconnecting cannot fix it.+ let oauth: OAuth2RefreshConfig;+ try {+ oauth = await buildRefreshConfig(pieceName);+ } catch (cause) {+ return { ok: false, reason: "misconfigured", cause };+ }++ try {+ const { accessToken } = await resolveConnectionAuth(+ serviceClient,+ companyId,+ connectionId,+ oauth+ );+ return { ok: true, accessToken };+ } catch (cause) {+ if (cause instanceof ConnectionRefreshTimeoutError) {+ return { ok: false, reason: "refreshing" };+ }+ if (+ cause instanceof ConnectionRevokedError ||+ cause instanceof ConnectionSecretUnavailableError+ ) {+ return { ok: false, reason: "reconnect" };+ }+ return { ok: false, reason: "failed", cause };+ }+}diff --git a/packages/jobs/src/workflows/integrations/pieces.d.ts b/packages/jobs/src/workflows/integrations/pieces.d.tsnew file mode 100644index 0000000000..8c08eb936a--- /dev/null+++ b/packages/jobs/src/workflows/integrations/pieces.d.ts@@ -0,0 +1,9 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++// The piece packages ship JavaScript only. `registry.ts` finds the piece by shape+// (`looksLikeAPiece`), so nothing needs more than "a module".+declare module "@activepieces/piece-gmail";+declare module "@activepieces/piece-google-calendar";+declare module "@activepieces/piece-slack";diff --git a/packages/jobs/src/workflows/integrations/project.test.ts b/packages/jobs/src/workflows/integrations/project.test.tsnew file mode 100644index 0000000000..eaa527db26--- /dev/null+++ b/packages/jobs/src/workflows/integrations/project.test.ts@@ -0,0 +1,338 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { MAX_LIST_ITEMS } from "@carbon/ee/workflows";+import { describe, expect, it } from "vitest";+import { projectOutputs } from "./project";+import type { PieceOutputSchema } from "./types";++/** The `get_events` shape: a remapped list, with per-element remapped reads. */+const GET_EVENTS: PieceOutputSchema = {+ fields: [+ { key: "status", label: "Status Code", format: "number" },+ { key: "summary", label: "Calendar Summary", value: "body.summary" },+ {+ key: "items",+ label: "Events",+ value: "body.items",+ listItems: [+ { key: "summary", label: "Title" },+ {+ key: "startDateTime",+ label: "Start",+ value: "start.dateTime",+ format: "datetime"+ },+ {+ key: "organizerEmail",+ label: "Organizer",+ value: "organizer.email",+ format: "email"+ }+ ]+ }+ ]+};++/** What `run()` actually resolves to: the HTTP envelope, not a bare body. */+function response(items: unknown[]) {+ return { status: 200, body: { summary: "Machine shop", items } };+}++const ONE_EVENT = {+ summary: "Standup",+ start: { dateTime: "2026-08-31T09:00:00.000Z" },+ organizer: { email: "[email protected]" }+};++function items(outputs: Record<string, unknown>) {+ return (outputs.items as { items: unknown[] }).items;+}++describe("projectOutputs", () => {+ it("reads envelope, body and per-element remapped paths", () => {+ const outputs = projectOutputs(GET_EVENTS, response([ONE_EVENT]));++ expect(outputs.status).toEqual({+ kind: "primitive",+ of: "number",+ value: 200+ });+ expect(outputs.summary).toEqual({+ kind: "primitive",+ of: "string",+ value: "Machine shop"+ });++ const [first] = items(outputs) as { fields: Record<string, unknown> }[];+ expect(first?.fields.summary).toEqual({+ kind: "primitive",+ of: "string",+ value: "Standup"+ });+ expect(first?.fields.organizerEmail).toEqual({+ kind: "primitive",+ of: "string",+ value: "[email protected]"+ });+ expect(first?.fields.startDateTime).toEqual({+ kind: "primitive",+ of: "date",+ value: "2026-08-31T09:00:00.000Z"+ });+ });++ it("counts the returned items", () => {+ expect(+ projectOutputs(GET_EVENTS, response([ONE_EVENT, ONE_EVENT])).count+ ).toEqual({ kind: "primitive", of: "number", value: 2 });+ });++ // The condition node has no "is empty" operator on a list, so this number is the+ // only way an author can branch on "did anything come back?".+ it("counts an empty list as zero", () => {+ expect(projectOutputs(GET_EVENTS, response([])).count).toEqual({+ kind: "primitive",+ of: "number",+ value: 0+ });+ });++ it("counts a single-object response as one", () => {+ const outputs = projectOutputs(+ { fields: [{ key: "id", label: "Id" }] },+ { id: "evt_1" }+ );+ expect(outputs.count).toEqual({+ kind: "primitive",+ of: "number",+ value: 1+ });+ });++ // The schema is the vendor's and nothing validates it — every one of these would+ // be a failed workflow step if projection insisted the response match.+ describe("when the response disagrees with the schema", () => {+ it("nulls a field the vendor omitted", () => {+ const outputs = projectOutputs(+ GET_EVENTS,+ response([{ summary: "Standup" }])+ );+ const [first] = items(outputs) as { fields: Record<string, unknown> }[];+ expect(first?.fields.organizerEmail).toEqual({+ kind: "primitive",+ of: "null",+ value: null+ });+ });++ it("nulls a field of the wrong type instead of passing it through", () => {+ const outputs = projectOutputs(+ GET_EVENTS,+ response([{ ...ONE_EVENT, start: { dateTime: "not a date" } }])+ );+ const [first] = items(outputs) as { fields: Record<string, unknown> }[];+ expect(first?.fields.startDateTime).toEqual({+ kind: "primitive",+ of: "null",+ value: null+ });+ });++ // Vendor JSON is checked by `typeof`, never coerced: `Boolean("false")` is+ // true and `String({})` is "[object Object]", both of which used to land here.+ it("nulls a string where a boolean or number was declared", () => {+ const outputs = projectOutputs(+ {+ fields: [+ { key: "done", label: "Done", format: "boolean" },+ { key: "size", label: "Size", format: "number" }+ ]+ },+ { done: "false", size: "42" }+ );+ expect(outputs.done).toEqual({+ kind: "primitive",+ of: "null",+ value: null+ });+ expect(outputs.size).toEqual({+ kind: "primitive",+ of: "null",+ value: null+ });+ });++ it("nulls an object where text was declared, and keeps a numeric id", () => {+ const outputs = projectOutputs(+ {+ fields: [+ { key: "name", label: "Name" },+ { key: "id", label: "Id" }+ ]+ },+ { name: { first: "Sam" }, id: 1234 }+ );+ expect(outputs.name).toEqual({+ kind: "primitive",+ of: "null",+ value: null+ });+ expect(outputs.id).toEqual({+ kind: "primitive",+ of: "string",+ value: "1234"+ });+ });++ it("reads an offset-less vendor time as UTC, never as server time", () => {+ const outputs = projectOutputs(+ GET_EVENTS,+ response([{ ...ONE_EVENT, start: { dateTime: "2026-08-31T09:00:00" } }])+ );+ const [first] = items(outputs) as { fields: Record<string, unknown> }[];+ expect(first?.fields.startDateTime).toEqual({+ kind: "primitive",+ of: "date",+ value: "2026-08-31T09:00:00.000Z"+ });+ });++ it("treats a missing list as empty rather than throwing", () => {+ const outputs = projectOutputs(GET_EVENTS, { status: 200 });+ expect(items(outputs)).toEqual([]);+ expect(outputs.count).toEqual({+ kind: "primitive",+ of: "number",+ value: 0+ });+ });++ it("treats a non-array where a list was declared as empty", () => {+ const outputs = projectOutputs(GET_EVENTS, response("nope" as never));+ expect(items(outputs)).toEqual([]);+ });++ it("survives a response of an entirely unexpected shape", () => {+ for (const raw of [null, undefined, "text", 42, []]) {+ const outputs = projectOutputs(GET_EVENTS, raw);+ expect(outputs.count).toBeDefined();+ expect(items(outputs)).toEqual([]);+ }+ });+ });++ it("caps a long list at MAX_LIST_ITEMS", () => {+ const many = Array.from({ length: MAX_LIST_ITEMS + 40 }, () => ONE_EVENT);+ const outputs = projectOutputs(GET_EVENTS, response(many));+ expect(items(outputs)).toHaveLength(MAX_LIST_ITEMS);+ // `count` reports what the VENDOR returned, not what survived the cap — an+ // author checking "more than 100?" needs the real number.+ expect(outputs.count).toEqual({+ kind: "primitive",+ of: "number",+ value: MAX_LIST_ITEMS + 40+ });+ });++ it("still reports a count when the action declares no schema", () => {+ expect(projectOutputs(undefined, { anything: true }).count).toBeDefined();+ });++ it("sorts the items chronologically before the cap when asked", () => {+ // Google's events.list groups a recurring series' instances into one block;+ // unsorted, the cap cut whole event types instead of the far future.+ const many = [+ { summary: "Demo Day", start: { dateTime: "2026-09-04T14:00:00Z" } },+ { summary: "Demo Day", start: { dateTime: "2026-09-11T14:00:00Z" } },+ { summary: "Standup", start: { dateTime: "2026-09-07T09:00:00Z" } },+ { summary: "No start", start: {} }+ ];+ const outputs = projectOutputs(GET_EVENTS, response(many), {+ sortItemsBy: ["start.dateTime", "start.date"]+ });+ const rows = items(outputs);+ expect(+ rows.map(+ (row) => (row as { fields: Record<string, unknown> }).fields.summary+ )+ ).toBeDefined();+ const starts = rows.map(+ (row) =>+ (row as { fields: Record<string, { value: unknown }> }).fields+ .startDateTime?.value ?? null+ );+ expect(starts.slice(0, 3)).toEqual([+ "2026-09-04T14:00:00.000Z",+ "2026-09-07T09:00:00.000Z",+ "2026-09-11T14:00:00.000Z"+ ]);+ // The row with no start sinks to the end rather than leading the list.+ expect(starts[3]).toBeNull();+ });++ it("sorts by the moment, and keeps all-day events ahead of the cap", () => {+ const many = [+ // 08:00 in Los Angeles is 15:00 UTC.+ { summary: "West", start: { dateTime: "2026-09-04T08:00:00-07:00" } },+ // 09:00 in India is 03:30 UTC, so it comes first despite reading later.+ { summary: "East", start: { dateTime: "2026-09-04T09:00:00+05:30" } },+ ...Array.from({ length: MAX_LIST_ITEMS }, () => ({+ summary: "Later",+ start: { dateTime: "2026-12-01T09:00:00Z" }+ })),+ { summary: "Holiday", start: { date: "2026-09-05" } }+ ];+ const outputs = projectOutputs(GET_EVENTS, response(many), {+ sortItemsBy: ["start.dateTime", "start.date"]+ });+ const titles = items(outputs).map(+ (row) =>+ (row as { fields: Record<string, { value: unknown }> }).fields.summary+ ?.value+ );+ expect(titles.slice(0, 4)).toEqual(["East", "West", "Holiday", "Later"]);+ });++ it("counts the biggest declared list, not whichever came first in the schema", () => {+ // An empty list declared ahead of the real one reported zero purely on key+ // order — the author's "did anything come back?" answered wrong.+ const schema: PieceOutputSchema = {+ fields: [+ {+ key: "warnings",+ label: "Warnings",+ listItems: [{ key: "m", label: "M" }]+ },+ { key: "items", label: "Events", listItems: [{ key: "m", label: "M" }] }+ ]+ };+ const outputs = projectOutputs(schema, {+ warnings: [],+ items: [{ m: "a" }, { m: "b" }]+ });+ expect(outputs.count).toEqual({+ kind: "primitive",+ of: "number",+ value: 2+ });+ });++ it("counts nothing when the response could not be shaped at all", () => {+ // The catch-all reported 1, so a projection failure read as "one item came+ // back" to every downstream step. A getter that throws is the only way to+ // reach it — reading a path itself degrades rather than raising.+ const hostile = {+ get body() {+ throw new Error("vendor sent something unreadable");+ }+ };+ const outputs = projectOutputs(GET_EVENTS, hostile);+ expect(outputs.count).toEqual({+ kind: "primitive",+ of: "number",+ value: 0+ });+ });+});diff --git a/packages/jobs/src/workflows/integrations/project.ts b/packages/jobs/src/workflows/integrations/project.tsnew file mode 100644index 0000000000..fdcb03688f--- /dev/null+++ b/packages/jobs/src/workflows/integrations/project.ts@@ -0,0 +1,115 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { getPath } from "@carbon/ee/integrations/secrets";+import { fromJson, type RuntimeValue } from "@carbon/ee/workflows";+import { getLogger } from "@carbon/logger";+import { describeOutputs, readField } from "./outputs";+import type { PieceOutputSchema } from "./types";++const logger = getLogger("jobs", "workflows", "integrations");++/** Shapes a vendor's response into the outputs the catalog declared for the step.+ *+ * Deliberately forgiving. `outputSchema` is vendor-authored and validated by nobody+ * — upstream's own `run()` returns `Promise<unknown | void>` — so a response that+ * disagrees with it must degrade field by field, never fail a step that really did+ * call the vendor. The raw JSON stays available on `result` regardless.+ */+export function projectOutputs(+ schema: PieceOutputSchema | undefined,+ response: unknown,+ options: {+ /** Sort each list's rows, earliest first, BEFORE the size cap — so the cap+ * cuts the tail of the ordering, never a whole category the vendor happened+ * to return last. Paths into the vendor's own element, first present wins+ * (Google: `start.dateTime`, else an all-day event's `start.date`). */+ sortItemsBy?: readonly string[];+ } = {}+): Record<string, RuntimeValue> {+ if (schema === undefined) return { count: countOf(undefined) };++ try {+ const outputs: Record<string, RuntimeValue> = {};+ let listed: unknown[] | undefined;++ for (const [name, { type, field }] of Object.entries(+ describeOutputs(schema)+ )) {+ // Every level is read from its own declared path, so a remapped+ // `start.dateTime` lands on the element rather than the response root.+ const value = readField(field, response);++ if (type.kind === "list") {+ const items = Array.isArray(value) ? value : [];+ // The BIGGEST declared list, not whichever the schema happened to name+ // first: a response with an empty `warnings` beside ten real `items`+ // reported zero purely because of key order.+ if (listed === undefined || items.length > listed.length)+ listed = items;+ // `fromJson` caps the list, after the sort. The sort reads the vendor's+ // elements, which line up one to one with the projected rows.+ const raw = getPath(response, field.value ?? field.key);+ outputs[name] = fromJson(+ type,+ sortRows(items, Array.isArray(raw) ? raw : [], options.sortItemsBy)+ );+ continue;+ }++ outputs[name] = fromJson(type, value);+ }++ outputs.count = countOf(listed);+ return outputs;+ } catch (cause) {+ // Shaping is a convenience over the raw result; losing it must never lose the+ // call that already happened.+ logger.warn("Could not project an integration response", {+ message: cause instanceof Error ? cause.message : ""+ });+ // Nothing was shaped, so nothing is known to have come back.+ return { count: countOf([]) };+ }+}++/** Earliest first by the moment each vendor element names at `paths`; rows with+ * none sink to the end. Compared as instants, not as text: `09:00+05:30` is+ * before `08:00-07:00`, and an all-day `2026-09-05` reads as that day's start.+ * Equal keys keep vendor order (the sort is stable). */+function sortRows(+ rows: unknown[],+ raw: unknown[],+ paths: readonly string[] | undefined+): unknown[] {+ if (paths === undefined || paths.length === 0) return rows;+ const momentOf = (index: number) => {+ for (const path of paths) {+ const value = getPath(raw[index], path);+ if (typeof value !== "string" || value === "") continue;+ const moment = Date.parse(value);+ if (!Number.isNaN(moment)) return moment;+ }+ return null;+ };+ const moments = rows.map((_, index) => momentOf(index));+ return rows+ .map((row, index) => ({ row, moment: moments[index] ?? null }))+ .sort((a, b) => {+ if (a.moment === b.moment) return 0;+ if (a.moment === null) return 1;+ if (b.moment === null) return -1;+ return a.moment - b.moment;+ })+ .map(({ row }) => row);+}++/** How many items came back: a list's length, else 1 for a single response. */+function countOf(items: unknown[] | undefined): RuntimeValue {+ return {+ kind: "primitive",+ of: "number",+ value: items === undefined ? 1 : items.length+ };+}diff --git a/packages/jobs/src/workflows/integrations/properties.test.ts b/packages/jobs/src/workflows/integrations/properties.test.tsnew file mode 100644index 0000000000..60b12a7bc0--- /dev/null+++ b/packages/jobs/src/workflows/integrations/properties.test.ts@@ -0,0 +1,199 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import type { RuntimeValue } from "@carbon/ee/workflows";+import { describe, expect, it } from "vitest";+import {+ toPropsValue,+ toValueType,+ UnmappablePropertyError+} from "./properties";+import { getPieceAction } from "./registry";+import type { PieceProperty } from "./types";++const map = (property: PieceProperty, name = "field") =>+ toValueType(+ "google-calendar",+ "create_google_calendar_event",+ name,+ property+ );++describe("toValueType", () => {+ // The generator splices these into msg`` literals and refuses a backtick or `${`.+ it("straightens backticks and template markers in vendor prose", () => {+ const mapped = toValueType("p", "a", "threadTs", {+ type: "SHORT_TEXT",+ required: false,+ displayName: "Thread `ts`",+ description: ["use `ts` or $", "{x}"].join("")+ });+ expect(mapped.label).toBe("Thread 'ts'");+ expect(mapped.description).toBe("use 'ts' or $ {x}");+ });++ // A lone backslash would start an escape inside the msg`` literal; doubled, the+ // template reads back exactly the one the vendor wrote.+ it("doubles a backslash in vendor prose", () => {+ const mapped = toValueType("p", "a", "path", {+ type: "SHORT_TEXT",+ required: false,+ displayName: "C:\\new"+ });+ expect(mapped.label).toBe("C:\\\\new");+ });++ it("maps the text, number, boolean, date and list kinds", () => {+ expect(map({ type: "SHORT_TEXT", required: true }).type).toEqual({+ kind: "primitive",+ of: "string"+ });+ expect(map({ type: "LONG_TEXT" }).type).toEqual({+ kind: "primitive",+ of: "string"+ });+ // A LongText is prose: the multiline editor, not a one-line box.+ expect(map({ type: "LONG_TEXT" }).template).toBe(true);+ expect(map({ type: "SHORT_TEXT" }).template).toBeUndefined();+ expect(map({ type: "NUMBER" }).type).toEqual({+ kind: "primitive",+ of: "number"+ });+ expect(map({ type: "CHECKBOX" }).type).toEqual({+ kind: "primitive",+ of: "boolean"+ });+ expect(map({ type: "DATE_TIME" }).type).toEqual({+ kind: "primitive",+ of: "date"+ });+ // A DateTime is a moment: the builder renders a date AND time picker and+ // stores a full ISO instant, so the piece is not left to read a bare day in+ // the worker's timezone.+ expect(map({ type: "DATE_TIME" }).precision).toBe("datetime");+ expect(map({ type: "SHORT_TEXT" }).precision).toBeUndefined();+ expect(map({ type: "ARRAY" }).type).toEqual({+ kind: "list",+ of: { kind: "primitive", of: "string" }+ });+ });++ it("carries the real send_notifications choices off the installed piece", async () => {+ const action = await getPieceAction(+ "google-calendar",+ "create_google_calendar_event"+ );+ const mapped = map(action.props.send_notifications!, "send_notifications");+ expect(mapped.choices).toEqual(["all", "externalOnly", "none"]);+ expect(mapped.options).toBeUndefined();+ });++ it("points a vendor-backed dropdown at the property provider", async () => {+ const action = await getPieceAction(+ "google-calendar",+ "create_google_calendar_event"+ );+ const mapped = map(action.props.calendar_id!, "calendar_id");+ expect(mapped.options).toEqual({+ provider: "integration.property",+ params: {+ piece: "google-calendar",+ action: "create_google_calendar_event",+ prop: "calendar_id"+ },+ dependsOn: ["connectionId"]+ });+ expect(mapped.choices).toBeUndefined();+ expect(mapped.required).toBe(true);+ });++ it("maps a static multi-select to a list of text with its choices", async () => {+ const action = await getPieceAction(+ "google-calendar",+ "google_calendar_get_events"+ );+ const mapped = toValueType(+ "google-calendar",+ "google_calendar_get_events",+ "event_types",+ action.props.event_types!+ );+ expect(mapped.type).toEqual({+ kind: "list",+ of: { kind: "primitive", of: "string" }+ });+ expect(mapped.choices?.length).toBeGreaterThan(0);+ });++ it("refuses a kind Carbon cannot represent, naming all three", () => {+ try {+ map({ type: "OBJECT" }, "extra");+ expect.unreachable("OBJECT should not map");+ } catch (error) {+ expect(error).toBeInstanceOf(UnmappablePropertyError);+ const message = (error as Error).message;+ expect(message).toContain("google-calendar");+ expect(message).toContain("create_google_calendar_event");+ expect(message).toContain("extra");+ }+ });+});++describe("toPropsValue", () => {+ it("never sends a MARKDOWN prop — it is help text, not a field", () => {+ const props = {+ info: { type: "MARKDOWN", required: false },+ text: { type: "LONG_TEXT", required: false }+ } as const;+ const value = toPropsValue("p", "a", props as never, {+ info: { kind: "primitive", of: "string", value: "x" } as never,+ text: { kind: "primitive", of: "string", value: "hi" } as never+ });+ expect(value).toEqual({ text: "hi" });+ });++ it("round-trips the create-event inputs and omits what is absent", async () => {+ const action = await getPieceAction(+ "google-calendar",+ "create_google_calendar_event"+ );+ const inputs: Record<string, RuntimeValue> = {+ calendar_id: { kind: "primitive", of: "string", value: "primary" },+ title: { kind: "primitive", of: "string", value: "Kickoff" },+ start_date_time: {+ kind: "primitive",+ of: "date",+ value: "2026-09-01T10:00:00Z"+ },+ attendees: {+ kind: "list",+ of: { kind: "primitive", of: "string" },+ items: [{ kind: "primitive", of: "string", value: "[email protected]" }]+ },+ create_meet_link: { kind: "primitive", of: "boolean", value: true },+ // Not a prop of this action — must not reach the piece.+ connectionId: { kind: "primitive", of: "string", value: "icn_1" },+ // Present but empty: pieces branch on undefined, so this is omitted.+ location: { kind: "primitive", of: "string", value: null }+ };++ expect(+ toPropsValue(+ "google-calendar",+ "create_google_calendar_event",+ action.props,+ inputs+ )+ ).toEqual({+ calendar_id: "primary",+ title: "Kickoff",+ start_date_time: "2026-09-01T10:00:00Z",+ attendees: ["[email protected]"],+ create_meet_link: true,+ // Required with a vendor default, so hidden — and sent, since the piece+ // never applies its own default.+ send_notifications: "all"+ });+ });+});diff --git a/packages/jobs/src/workflows/integrations/properties.ts b/packages/jobs/src/workflows/integrations/properties.tsnew file mode 100644index 0000000000..743d3a31e9--- /dev/null+++ b/packages/jobs/src/workflows/integrations/properties.ts@@ -0,0 +1,178 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import type {+ ActionInputLike,+ OptionsSource,+ RuntimeValue,+ ValueType+} from "@carbon/ee/workflows";+import { toPlainValue } from "../actions/values";+import { allowlistEntry } from "./allowlist";+import { CONNECTION_INPUT, PROPERTY_PROVIDER } from "./options";+import type { PieceProperty } from "./types";+import { staticOptions, visibilityOf } from "./visibility";++/** Translates a piece's form-fields-as-data into Carbon's input vocabulary, and+ * resolved Carbon values back into the plain object a piece's `run()` expects. */++export class UnmappablePropertyError extends Error {+ constructor(piece: string, action: string, property: string, type: string) {+ super(+ `Property "${property}" on ${piece}.${action} is a ${type}, which Carbon cannot represent.`+ );+ this.name = "UnmappablePropertyError";+ }+}++const STRING: ValueType = { kind: "primitive", of: "string" };+const NUMBER: ValueType = { kind: "primitive", of: "number" };+const BOOLEAN: ValueType = { kind: "primitive", of: "boolean" };+const DATE: ValueType = { kind: "primitive", of: "date" };+const STRING_LIST: ValueType = {+ kind: "list",+ of: { kind: "primitive", of: "string" }+};++function staticChoices(property: PieceProperty): readonly string[] | undefined {+ return staticOptions(property)?.map((option) => String(option.value));+}++/** A dropdown only the vendor can fill, so it is fetched against a chosen connection. */+function fetched(piece: string, action: string, name: string): OptionsSource {+ return {+ provider: PROPERTY_PROVIDER,+ params: { piece, action, prop: name },+ dependsOn: [CONNECTION_INPUT]+ };+}++/** One piece property as a declared step input. */+export function toValueType(+ piece: string,+ action: string,+ name: string,+ property: PieceProperty+): ActionInputLike {+ const base = {+ required: property.required === true,+ label: vendorText(property.displayName ?? name),+ // The piece's own pre-fill, carried so the builder can seed it as a stored+ // value. `!== undefined`, never truthiness: `false` is the whole point for a+ // checkbox — dropped, an OFF toggle silently meant "vendor decides".+ ...(property.defaultValue === undefined+ ? {}+ : {+ defaultValue: property.defaultValue as ActionInputLike["defaultValue"]+ }),+ // The piece's own explanation of the field, for the builder's ⓘ tooltip.+ ...(property.description === undefined+ ? {}+ : { description: vendorText(property.description) })+ };++ switch (property.type) {+ case "SHORT_TEXT":+ return { ...base, type: STRING };+ // A vendor's LongText is a message body or a description: rendered as the+ // multiline editor Carbon's own prose inputs use, or Slack's "Message" and a+ // calendar description arrive as one-line boxes.+ case "LONG_TEXT":+ return { ...base, type: STRING, template: true };+ case "NUMBER":+ return { ...base, type: NUMBER };+ case "CHECKBOX":+ return { ...base, type: BOOLEAN };+ // The vendor said DATE_TIME, not DATE. Dropping the time here is what left+ // Google Calendar's "Start date time of the event" with a date-only picker,+ // and made the value an underspecified instant the piece then read in the+ // WORKER's timezone.+ case "DATE_TIME":+ return { ...base, type: DATE, precision: "datetime" };+ case "ARRAY":+ return { ...base, type: STRING_LIST };+ case "STATIC_DROPDOWN":+ return { ...base, type: STRING, choices: staticChoices(property) ?? [] };+ case "STATIC_MULTI_SELECT_DROPDOWN":+ return {+ ...base,+ type: STRING_LIST,+ choices: staticChoices(property) ?? []+ };+ case "DROPDOWN":+ return { ...base, type: STRING, options: fetched(piece, action, name) };+ case "MULTI_SELECT_DROPDOWN":+ return {+ ...base,+ type: STRING_LIST,+ options: fetched(piece, action, name)+ };+ default:+ // OBJECT / JSON / FILE / DYNAMIC / MARKDOWN and anything new. Fails the+ // generator loudly: a half-described action must never be emitted.+ throw new UnmappablePropertyError(piece, action, name, property.type);+ }+}++/** Vendor prose is spliced verbatim into a `msg` template literal by the+ * generator, which refuses a backtick, `${` or a lone backslash+ * (`assertLabelIsSafe`). Slack writes "`1710304378.475129`" in a description. A+ * backslash is doubled, so the template reads it back as the one the vendor wrote. */+export function vendorText(text: string): string {+ return text+ .replaceAll("\\", "\\\\")+ .replaceAll("`", "'")+ .replaceAll("${", "$ {");+}++/**+ * Resolved Carbon inputs -> the piece's `propsValue`, for one action. One pass over+ * the piece's props, so a prop the action no longer declares is never sent.+ *+ * - An omitted prop (allowlist `omit`, or display-only) takes its pin and nothing+ * else: the catalog never offered it, so a node value for it is stale or+ * hand-posted.+ * - Otherwise a node value wins — an author who opened Advanced and set it+ * deliberately must not be overridden by our default — and the pin fills in+ * only where the node supplied nothing.+ *+ * A pin is a hidden prop's value (`visibilityOf`), or a shown prop's allowlist+ * `value`. Merged HERE rather than stored on the node, so changing a pin fixes+ * every saved workflow at once; a piece applies neither a pin nor its own+ * `defaultValue` for itself. An absent optional input is omitted rather than sent+ * as null: pieces branch on `undefined`.+ */+export function toPropsValue(+ piece: string,+ action: string,+ props: Record<string, PieceProperty>,+ inputs: Record<string, RuntimeValue>+): Record<string, unknown> {+ const overrides = allowlistEntry(piece)?.props?.[action] ?? {};+ const propsValue: Record<string, unknown> = {};++ for (const [name, property] of Object.entries(props)) {+ const visibility = visibilityOf(property, overrides[name]);+ const pin = visibility.show ? overrides[name]?.value : visibility.value;++ const omitted = !visibility.show && visibility.omit === true;+ const input = omitted ? undefined : inputs[name];+ const plain = input === undefined ? undefined : toPlainValue(input);+ // An emptied multi-select is "nothing chosen", not "send an empty list": the+ // piece reads a required list unguarded, so it falls back to the pin exactly+ // as an absent input does — omitting it is what crashed the vendor.+ if (+ plain === null ||+ plain === undefined ||+ (Array.isArray(plain) && plain.length === 0)+ ) {+ if (pin !== undefined) propsValue[name] = pin;+ continue;+ }++ propsValue[name] = plain;+ }++ return propsValue;+}diff --git a/packages/jobs/src/workflows/integrations/registry.test.ts b/packages/jobs/src/workflows/integrations/registry.test.tsnew file mode 100644index 0000000000..b417e2da6d--- /dev/null+++ b/packages/jobs/src/workflows/integrations/registry.test.ts@@ -0,0 +1,130 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { describe, expect, it } from "vitest";+import { allowlistEntry, PIECE_ALLOWLIST } from "./allowlist";+import {+ getPieceAction,+ getPieceActions,+ getPieceOAuth2Auth,+ loadPiece,+ UnknownPieceActionError,+ UnknownPieceError+} from "./registry";++describe("piece registry", () => {+ it("loads the installed piece by shape", async () => {+ const piece = await loadPiece("google-calendar");+ expect(typeof piece.actions).toBe("function");+ expect(Object.keys(piece.actions()).length).toBeGreaterThan(0);+ });++ it("resolves an allowlisted action", async () => {+ const action = await getPieceAction(+ "google-calendar",+ "create_google_calendar_event"+ );+ expect(action.displayName).toBe("Create Event");+ expect(action.props.title?.type).toBe("SHORT_TEXT");+ });++ it("exposes only the allowlisted actions", async () => {+ const actions = await getPieceActions("google-calendar");+ expect(Object.keys(actions).sort()).toEqual(+ [...PIECE_ALLOWLIST["google-calendar"]!.actions].sort()+ );+ });++ it("refuses an action the piece has but the allowlist does not", async () => {+ // A real action on the piece — the allowlist, not the piece, is the gate.+ await expect(+ getPieceAction("google-calendar", "custom_api_call")+ ).rejects.toBeInstanceOf(UnknownPieceActionError);+ });++ it("refuses an unknown piece", async () => {+ await expect(getPieceAction("notion", "post")).rejects.toBeInstanceOf(+ UnknownPieceError+ );+ });++ it("returns the OAuth2 member when the piece offers several auth shapes", async () => {+ const auth = await getPieceOAuth2Auth("google-calendar");+ expect(auth.authUrl).toBe("https://accounts.google.com/o/oauth2/auth");+ expect(auth.tokenUrl).toBe("https://oauth2.googleapis.com/token");+ expect(auth.scope).toContain(+ "https://www.googleapis.com/auth/calendar.events"+ );+ });+});++describe("slack", () => {+ it("loads the piece", async () => {+ const piece = await loadPiece("slack");+ expect(Object.keys(piece.actions())).toContain("send_channel_message");+ });++ it("exposes exactly the allowlisted actions", async () => {+ const actions = await getPieceActions("slack");+ expect(Object.keys(actions).sort()).toEqual(+ [...PIECE_ALLOWLIST.slack!.actions].sort()+ );+ });++ it("refuses an action the piece has but the allowlist does not", async () => {+ await expect(getPieceAction("slack", "custom_api_call")).rejects.toThrow();+ });++ // The piece's own consent URL asks for a personal user token as well — the reason+ // the allowlist row overrides `authUrl` and `scope`.+ it("finds the OAuth2 auth, whose authUrl bakes in user scopes", async () => {+ const auth = await getPieceOAuth2Auth("slack");+ expect(auth.tokenUrl).toBe("https://slack.com/api/oauth.v2.access");+ expect(auth.authUrl).toContain("user_scope=");+ });+});++describe("gmail", () => {+ it("loads the piece", async () => {+ const piece = await loadPiece("gmail");+ expect(Object.keys(piece.actions())).toContain("gmail_send_email");+ });++ it("exposes exactly the one allowlisted action", async () => {+ const actions = await getPieceActions("gmail");+ expect(Object.keys(actions)).toEqual(["gmail_send_email"]);+ });++ it("refuses the read and reply actions the piece has but the allowlist does not", async () => {+ await expect(+ getPieceAction("gmail", "gmail_search_email")+ ).rejects.toThrow();+ await expect(+ getPieceAction("gmail", "gmail_reply_to_thread")+ ).rejects.toThrow();+ await expect(getPieceAction("gmail", "send_email")).rejects.toThrow();+ });++ // The piece offers OAuth2 and a service-account CustomAuth; only the former is ours.+ it("finds the OAuth2 auth, whose scope list includes restricted scopes we do not request", async () => {+ const auth = await getPieceOAuth2Auth("gmail");+ expect(auth.tokenUrl).toBe("https://oauth2.googleapis.com/token");+ expect(auth.scope).toContain(+ "https://www.googleapis.com/auth/gmail.readonly"+ );+ });+});++describe("allowlistEntry", () => {+ it("finds an allowlisted piece", () => {+ expect(allowlistEntry("google-calendar")?.label).toBe("Google Calendar");+ });++ it.each(["__proto__", "constructor", "toString", "not-a-piece"])(+ "treats %s as an unknown piece",+ (piece) => {+ expect(allowlistEntry(piece)).toBeUndefined();+ }+ );+});diff --git a/packages/jobs/src/workflows/integrations/registry.ts b/packages/jobs/src/workflows/integrations/registry.tsnew file mode 100644index 0000000000..98bfffe621--- /dev/null+++ b/packages/jobs/src/workflows/integrations/registry.ts@@ -0,0 +1,130 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++/// <reference path="./pieces.d.ts" />+import type { ActivepiecesPiece } from "@carbon/ee/integrations/pieces";+import { allowlistEntry } from "./allowlist";+import type { OAuth2AuthDeclaration, Piece, PieceAction } from "./types";++/** The ONLY module allowed to import a piece package. Pieces bundle Node-only vendor+ * SDKs, so nothing else may pull them into a graph that reaches the browser — and+ * `@carbon/workflows` compiles for the browser at ES2019. */++export class UnknownPieceError extends Error {+ constructor(name: string) {+ super(`"${name}" is not an available integration.`);+ this.name = "UnknownPieceError";+ }+}++export class UnknownPieceActionError extends Error {+ constructor(piece: string, action: string) {+ super(`"${action}" is not an available action on "${piece}".`);+ this.name = "UnknownPieceActionError";+ }+}++export class UnsupportedPieceAuthError extends Error {+ constructor(piece: string) {+ super(`"${piece}" does not offer an OAuth2 connection.`);+ this.name = "UnsupportedPieceAuthError";+ }+}++// Literal specifiers, not `import(entry.package)`: Vercel only copies into the+// serverless function the packages it can see imported, and a specifier held in a+// variable is invisible to it.+const PIECE_LOADERS: Record<+ ActivepiecesPiece,+ () => Promise<Record<string, unknown>>+> = {+ gmail: () => import("@activepieces/piece-gmail"),+ "google-calendar": () => import("@activepieces/piece-google-calendar"),+ slack: () => import("@activepieces/piece-slack")+};++const loaded = new Map<string, Piece>();++function looksLikeAPiece(value: unknown): value is Piece {+ return (+ typeof value === "object" &&+ value !== null &&+ "auth" in value &&+ typeof (value as Piece).actions === "function"+ );+}++export async function loadPiece(name: string): Promise<Piece> {+ const cached = loaded.get(name);+ if (cached !== undefined) return cached;++ const entry = allowlistEntry(name);+ if (entry === undefined) throw new UnknownPieceError(name);++ const module = await PIECE_LOADERS[name as ActivepiecesPiece]();+ // Find the piece by shape, not by export name — a future piece may name it differently.+ const piece = Object.values(module).find(looksLikeAPiece);+ if (piece === undefined) {+ throw new UnknownPieceError(name);+ }++ loaded.set(name, piece);+ return piece;+}++export async function getPieceActions(+ name: string+): Promise<Record<string, PieceAction>> {+ const entry = allowlistEntry(name);+ if (entry === undefined) throw new UnknownPieceError(name);++ const piece = await loadPiece(name);+ const all = piece.actions();+ const exposed: Record<string, PieceAction> = {};+ for (const action of entry.actions) {+ const found = all[action];+ if (found === undefined) throw new UnknownPieceActionError(name, action);+ exposed[action] = found;+ }+ return exposed;+}++export async function getPieceAction(+ name: string,+ action: string+): Promise<PieceAction> {+ // The allowlist decides what we expose, not the piece — `getPieceActions` is+ // that list. Own keys only: an action named `constructor` is not an action.+ const exposed = await getPieceActions(name);+ const found = Object.hasOwn(exposed, action) ? exposed[action] : undefined;+ if (found === undefined) throw new UnknownPieceActionError(name, action);+ return found;+}++/**+ * The piece's OAuth2 auth declaration — the vendor's URLs and scopes.+ *+ * **OAuth2 only, deliberately.** A piece authenticating with `SECRET_TEXT`,+ * `BASIC_AUTH` or `CUSTOM_AUTH` (an API key, a username and password) is refused+ * here rather than supported halfway. Those need a different design end to end: a+ * credential form in place of a consent screen, no callback route, and no refresh+ * cycle — none of which this path has. Adding one is its own piece of work, not a+ * branch in this function. See the header comment on `allowlist.ts`.+ */+export async function getPieceOAuth2Auth(+ name: string+): Promise<OAuth2AuthDeclaration> {+ const piece = await loadPiece(name);+ // A piece may offer several auth shapes (Google Calendar exposes OAUTH2 and+ // CUSTOM_AUTH). v1 supports OAuth2 only.+ const candidates = Array.isArray(piece.auth) ? piece.auth : [piece.auth];+ const oauth = candidates.find(+ (candidate: unknown) =>+ typeof candidate === "object" &&+ candidate !== null &&+ (candidate as { type?: string }).type === "OAUTH2"+ );+ if (oauth === undefined) throw new UnsupportedPieceAuthError(name);+ return oauth as OAuth2AuthDeclaration;+}diff --git a/packages/jobs/src/workflows/integrations/types.ts b/packages/jobs/src/workflows/integrations/types.tsnew file mode 100644index 0000000000..7fa55ab756--- /dev/null+++ b/packages/jobs/src/workflows/integrations/types.ts@@ -0,0 +1,94 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++/** Structural shapes for the bits of an Activepieces piece Carbon actually reads.+ *+ * Declared here rather than imported from `@activepieces/pieces-framework`: the piece+ * packages bundle their framework, so it is not an installable dependency of ours. */++export type PiecePropertyType =+ | "SHORT_TEXT"+ | "LONG_TEXT"+ | "NUMBER"+ | "CHECKBOX"+ | "DATE_TIME"+ | "ARRAY"+ | "STATIC_DROPDOWN"+ | "STATIC_MULTI_SELECT_DROPDOWN"+ | "DROPDOWN"+ | "MULTI_SELECT_DROPDOWN"+ | (string & {});++export interface PieceOption {+ label: string;+ value: unknown;+}++export interface PieceProperty {+ type: PiecePropertyType;+ displayName?: string;+ description?: string;+ required?: boolean;+ defaultValue?: unknown;+ options?:+ | { options: readonly PieceOption[] }+ | ((...args: never[]) => unknown);+ refreshers?: readonly string[];+}++/**+ * One field of an action's declared output.+ *+ * Presentation metadata upstream — the Activepieces docs scope `outputSchema` to+ * "a friendly, labelled presentation ... without changing the expression paths used+ * in automations", `run()` returns `Promise<unknown | void>`, and nothing validates+ * a response against it. So it is good enough to OFFER an author paths and labels+ * at build time, and never good enough to enforce a shape at run time.+ */+export interface PieceOutputField {+ key: string;+ label: string;+ /** Dotted path to read from, relative to the container. Absent means read `key`. */+ value?: string;+ /** A display hint (`datetime`, `number`, `boolean`, `url`, `email`, …), not a type. */+ format?: string;+ /** Present when this field is a nested object. */+ children?: readonly PieceOutputField[];+ /** Present when this field is an array; describes ONE element. */+ listItems?: readonly PieceOutputField[];+ labelKey?: string;+ /** The vendor declaring that keys here vary per account and cannot be listed. */+ dynamicKey?: boolean;+}++export interface PieceOutputSchema {+ fields: readonly PieceOutputField[];+ itemLabel?: string;+}++export interface PieceAction {+ name: string;+ displayName: string;+ description?: string;+ props: Record<string, PieceProperty>;+ run: (context: unknown) => Promise<unknown>;+ /** Optional upstream: ~8% of pieces declare it, and coverage is all-or-nothing+ * per piece. `buildPieceActionDeclarations` refuses an action without one. */+ outputSchema?: PieceOutputSchema;+}++export interface OAuth2AuthDeclaration {+ type: "OAUTH2";+ authUrl: string;+ tokenUrl: string;+ scope: readonly string[];+ pkce?: boolean;+ required?: boolean;+}++export interface Piece {+ displayName?: string;+ auth?: unknown;+ actions: () => Record<string, PieceAction>;+}diff --git a/packages/jobs/src/workflows/integrations/visibility.test.ts b/packages/jobs/src/workflows/integrations/visibility.test.tsnew file mode 100644index 0000000000..8364ccc0ba--- /dev/null+++ b/packages/jobs/src/workflows/integrations/visibility.test.ts@@ -0,0 +1,350 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { describe, expect, it } from "vitest";+import { toPropsValue } from "./properties";+import type { PieceProperty } from "./types";+import { assertHiddenPropIsSatisfied, visibilityOf } from "./visibility";++const prop = (over: Partial<PieceProperty> = {}): PieceProperty => ({+ type: "SHORT_TEXT",+ required: false,+ ...over+});++describe("visibilityOf", () => {+ it("shows an ordinary optional prop", () => {+ expect(visibilityOf(prop(), undefined)).toEqual({ show: true });+ });++ it("shows a required prop the vendor gave no default", () => {+ expect(visibilityOf(prop({ required: true }), undefined)).toEqual({+ show: true+ });+ });++ // Nothing for a person to decide — but the value still has to be SENT. A piece's+ // `defaultValue` pre-fills its own form and is never applied at run time, so+ // hiding this prop without carrying the default handed the vendor `undefined`.+ it("hides a required prop that already has a default, and sends that default", () => {+ expect(+ visibilityOf(prop({ required: true, defaultValue: "all" }), undefined)+ ).toEqual({ show: false, value: "all" });+ });++ // An OPTIONAL prop with a default is still a real choice — the author may want+ // the non-default. Only the required-and-defaulted case is pure ceremony.+ it("still shows an optional prop that has a default", () => {+ expect(visibilityOf(prop({ defaultValue: "all" }), undefined)).toEqual({+ show: true+ });+ });++ it("hides a dropdown with only one possible answer, and sends that answer", () => {+ const single = prop({+ type: "STATIC_DROPDOWN",+ options: { options: [{ label: "Only", value: "only" }] }+ });+ // Hiding it without the value made a REQUIRED prop of this shape fail catalog+ // generation outright, for a case the code already knows the answer to.+ expect(visibilityOf(single, undefined)).toEqual({+ show: false,+ value: "only"+ });++ const two = prop({+ type: "STATIC_DROPDOWN",+ options: {+ options: [+ { label: "A", value: "a" },+ { label: "B", value: "b" }+ ]+ }+ });+ expect(visibilityOf(two, undefined)).toEqual({ show: true });+ });++ it("carries an override's pinned value", () => {+ expect(+ visibilityOf(prop({ type: "CHECKBOX" }), { hidden: true, value: true })+ ).toEqual({ show: false, value: true });+ });++ // An override that does not say `hidden` must not accidentally hide anything.+ it("ignores an override that hides nothing", () => {+ expect(visibilityOf(prop(), { value: true })).toEqual({ show: true });+ });+});++describe("assertHiddenPropIsSatisfied", () => {+ const ok =+ (+ property: PieceProperty,+ visibility: Parameters<typeof assertHiddenPropIsSatisfied>[4]+ ) =>+ () =>+ assertHiddenPropIsSatisfied("p", "a", "n", property, visibility);++ // The failure this guard exists for: hide a required field, send nothing for it,+ // and the vendor call goes out incomplete — failing in front of a customer.+ it("refuses a required prop hidden with nothing to send", () => {+ expect(ok(prop({ required: true }), { show: false })).toThrow(+ /required but hidden/+ );+ });++ it("accepts a required prop satisfied by a pinned value", () => {+ expect(+ ok(prop({ required: true }), { show: false, value: true })+ ).not.toThrow();+ });++ // A default is NOT self-applying, so it satisfies this only once it is carried+ // as the value to send. Hidden, required, and nothing to send is still refused+ // even when the vendor declared a default — that combination is what reached a+ // customer as an unreadable crash inside the piece.+ it("accepts a required prop whose default is carried as the value", () => {+ expect(+ ok(prop({ required: true, defaultValue: "all" }), {+ show: false,+ value: "all"+ })+ ).not.toThrow();+ });++ it("refuses a required prop hidden with nothing to send, default or not", () => {+ expect(+ ok(prop({ required: true, defaultValue: "all" }), { show: false })+ ).toThrow(/required but hidden/);+ });++ it("accepts a hidden optional prop with nothing to send", () => {+ expect(ok(prop(), { show: false })).not.toThrow();+ });++ it("never complains about a visible prop", () => {+ expect(ok(prop({ required: true }), { show: true })).not.toThrow();+ });+});++describe("toPropsValue pins", () => {+ const bool = (value: boolean) => ({+ kind: "primitive" as const,+ of: "boolean" as const,+ value+ });++ it("reads the real allowlist entry", () => {+ expect(+ toPropsValue(+ "google-calendar",+ "google_calendar_get_events",+ { singleEvents: prop({ type: "CHECKBOX" }) },+ {}+ )+ ).toEqual({ singleEvents: true });+ });++ it("pins gmail's draft flag off even though the prop is omitted from the form", () => {+ expect(+ toPropsValue(+ "gmail",+ "gmail_send_email",+ {+ draft: prop({ type: "CHECKBOX", required: true, defaultValue: true })+ },+ {}+ )+ ).toEqual({ draft: false });+ });++ it("is empty for an action or piece with no overrides", () => {+ const props = { search: prop() };+ expect(+ toPropsValue("google-calendar", "create_google_calendar_event", props, {})+ ).toEqual({});+ expect(toPropsValue("nope", "nope", props, {})).toEqual({});+ });++ /**+ * The exact shape that failed a real run. Google Calendar's get-events declares+ * `event_types` required WITH a default, so we hid it — and sent nothing. The+ * piece does `event_types.length` straight off `propsValue` and died with+ * "Cannot read properties of undefined (reading 'length')", naming a field the+ * author had never seen.+ */+ it("sends a hidden required prop's vendor default, not undefined", () => {+ const props = {+ event_types: prop({+ type: "STATIC_MULTI_SELECT_DROPDOWN",+ required: true,+ defaultValue: ["default", "focusTime", "outOfOffice"]+ }),+ singleEvents: prop({ type: "CHECKBOX" }),+ search: prop()+ };++ const sent = toPropsValue(+ "google-calendar",+ "google_calendar_get_events",+ props,+ {}+ );++ expect(sent.event_types).toEqual(["default", "focusTime", "outOfOffice"]);+ // The allowlist's own pin still applies alongside it.+ expect(sent.singleEvents).toBe(true);+ // A visible prop is the author's to fill and must never be pinned.+ expect("search" in sent).toBe(false);+ });++ it("never pins an optional prop's default — that is still the author's choice", () => {+ const props = { search: prop({ defaultValue: "everything" }) };+ expect(+ toPropsValue("google-calendar", "create_google_calendar_event", props, {})+ ).toEqual({});+ });++ // The Advanced section exists so an author CAN override us; a pin that beat a+ // deliberate choice would make that section a lie.+ it("lets a node value win over the pin", () => {+ expect(+ toPropsValue(+ "google-calendar",+ "google_calendar_get_events",+ { singleEvents: prop({ type: "CHECKBOX" }) },+ { singleEvents: bool(false) }+ )+ ).toEqual({ singleEvents: false });+ });++ it("falls back to the pin when the node's value resolved to nothing", () => {+ expect(+ toPropsValue(+ "google-calendar",+ "google_calendar_get_events",+ { singleEvents: prop({ type: "CHECKBOX" }) },+ { singleEvents: { kind: "primitive", of: "null", value: null } }+ )+ ).toEqual({ singleEvents: true });+ });++ it("never invents a prop the action does not declare", () => {+ expect(+ toPropsValue(+ "google-calendar",+ "google_calendar_get_events",+ { search: prop() },+ {}+ )+ ).toEqual({});+ });++ it("falls back to the pin when a multi-select was emptied", () => {+ // Deselecting every option is "nothing chosen", not "send []" — a required+ // list prop read unguarded by the piece is exactly what crashed the vendor.+ const props = {+ eventTypes: prop({+ type: "STATIC_MULTI_SELECT_DROPDOWN",+ required: true,+ defaultValue: ["default"]+ })+ };+ const inputs = {+ eventTypes: {+ kind: "list" as const,+ of: { kind: "primitive" as const, of: "string" as const },+ items: []+ }+ };+ expect(toPropsValue("nope", "nope", props, inputs)).toEqual({+ eventTypes: ["default"]+ });+ });+});++describe("omit", () => {+ it("omits a prop the allowlist says to, carrying any pin", () => {+ expect(visibilityOf(prop(), { omit: true })).toEqual({+ show: false,+ omit: true+ });+ expect(+ visibilityOf(+ prop({ type: "CHECKBOX", required: true, defaultValue: true }),+ { omit: true, value: true }+ )+ ).toEqual({ show: false, omit: true, value: true });+ });++ // Activepieces `Property.MarkDown` is a paragraph of help text, not a field.+ it("omits a MARKDOWN prop with no override at all", () => {+ expect(visibilityOf(prop({ type: "MARKDOWN" }), undefined)).toEqual({+ show: false,+ omit: true+ });+ });++ it("still refuses a required prop omitted with nothing to send", () => {+ const required = prop({ type: "CHECKBOX", required: true });+ expect(() =>+ assertHiddenPropIsSatisfied("p", "a", "sendAsBot", required, {+ show: false,+ omit: true+ })+ ).toThrow("omitted with no value");+ expect(() =>+ assertHiddenPropIsSatisfied("p", "a", "sendAsBot", required, {+ show: false,+ omit: true,+ value: true+ })+ ).not.toThrow();+ });++ it("pins an omitted prop's value from the real slack row", () => {+ const sendAsBot = prop({+ type: "CHECKBOX",+ required: true,+ defaultValue: true+ });+ expect(+ toPropsValue("slack", "send_channel_message", { sendAsBot }, {})+ ).toEqual({ sendAsBot: true });+ expect(+ toPropsValue(+ "slack",+ "send_direct_message",+ { sendAsBot: prop({ type: "CHECKBOX" }) },+ {}+ )+ ).toEqual({});+ });++ // The omit exists to make the user-token path unreachable; a stale node value+ // for `sendAsBot` must not reopen it.+ it("drops a stale node value for an omitted or MARKDOWN prop but still sends the pin", () => {+ const props = {+ info: prop({ type: "MARKDOWN" }),+ channel: prop({ type: "DROPDOWN", required: true }),+ sendAsBot: prop({ type: "CHECKBOX", required: true, defaultValue: true }),+ blocks: prop({ type: "JSON" }),+ text: prop({ type: "LONG_TEXT" })+ };+ const text = (value: string) => ({+ kind: "primitive" as const,+ of: "string" as const,+ value+ });+ expect(+ toPropsValue("slack", "send_channel_message", props, {+ info: text("help"),+ channel: text("C1"),+ sendAsBot: { kind: "primitive", of: "boolean", value: false },+ blocks: text("[]"),+ text: text("hi")+ })+ ).toEqual({ channel: "C1", sendAsBot: true, text: "hi" });+ });+});diff --git a/packages/jobs/src/workflows/integrations/visibility.ts b/packages/jobs/src/workflows/integrations/visibility.tsnew file mode 100644index 0000000000..bab269f3fd--- /dev/null+++ b/packages/jobs/src/workflows/integrations/visibility.ts@@ -0,0 +1,112 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import type { AllowlistPropOverride } from "./allowlist";+import type { PieceOption, PieceProperty } from "./types";++/**+ * Which of a piece's props a person actually sees.+ *+ * A vendor writes props for its OWN builder, so an action arrives carrying API+ * trivia beside the two or three fields that are a real business decision. The+ * rules below are generic — they cost nothing per action and apply to every piece+ * we ever add. The allowlist's per-action overrides are the rare exception, for a+ * default that is WRONG for us rather than merely uninteresting.+ *+ * Nothing is ever lost: a hidden input is emitted as `advancedInputs` and rendered+ * in the node's Advanced section, so being wrong here costs a click, not a release.+ */++export type Visibility =+ | { show: true }+ /** Hidden, and this value is merged in at run time. */+ | { show: false; omit?: false; value?: unknown }+ /** Not part of the step at all — neither the form nor Advanced. */+ | { show: false; omit: true; value?: unknown };++/** A dropdown's options when the piece lists them statically; undefined for a+ * fetched dropdown, or anything else. The one reading of `property.options`. */+export function staticOptions(+ property: PieceProperty+): readonly PieceOption[] | undefined {+ const options = property.options;+ if (typeof options !== "object" || options === null) return undefined;+ return Array.isArray(options.options) ? options.options : undefined;+}++/** The one value a single-option dropdown can hold, or undefined when it has more+ * (or fewer) than one. There is nothing to decide, so the field is hidden — but the+ * value still has to be SENT, exactly as a required default is. */+function singleChoiceValue(property: PieceProperty): unknown {+ const list = staticOptions(property);+ if (list === undefined || list.length !== 1) return undefined;+ const only: unknown = list[0];+ return typeof only === "object" && only !== null && "value" in only+ ? only.value+ : undefined;+}++export function visibilityOf(+ property: PieceProperty,+ override: AllowlistPropOverride | undefined+): Visibility {+ // Tier 2 — a reviewed decision for this exact action.+ // Display-only: Activepieces `Property.MarkDown` renders text and never collects a+ // value, so there is no input to offer.+ if (property.type === "MARKDOWN") return { show: false, omit: true };+ if (override?.omit === true) {+ return override.value === undefined+ ? { show: false, omit: true }+ : { show: false, omit: true, value: override.value };+ }+ if (override?.hidden === true) {+ return override.value === undefined+ ? { show: false }+ : { show: false, value: override.value };+ }++ // Tier 1 — generic, derived, no per-action data.+ // Required with a default the vendor already chose: nothing for a person to+ // decide, so hide it — but SEND the default rather than omitting the prop.+ // `defaultValue` is what a piece pre-fills its own FORM with; nothing applies it+ // at run time, and `run()` destructures `propsValue` and uses the field directly.+ // Omitting it handed Google Calendar's get-events `event_types: undefined` and it+ // died on `event_types.length` — an unreadable vendor crash for a field the+ // author was never shown.+ if (property.required === true && property.defaultValue !== undefined) {+ return { show: false, value: property.defaultValue };+ }+ // A dropdown with exactly one option decides itself. Hiding it WITHOUT the value+ // hard-failed catalog generation for any required prop of this shape, for a case+ // the code already knows the answer to.+ const only = singleChoiceValue(property);+ if (only !== undefined) return { show: false, value: only };++ return { show: true };+}++/**+ * A required prop hidden with no value to send — from us OR from the piece — would+ * make the vendor call go out incomplete and fail in front of a customer. Refuse at+ * build time instead.+ */+export function assertHiddenPropIsSatisfied(+ piece: string,+ action: string,+ name: string,+ property: PieceProperty,+ visibility: Visibility+): void {+ if (visibility.show) return;+ if (property.required !== true) return;+ // The VALUE is the only thing that satisfies this. A `defaultValue` used to+ // count on its own, on the assumption the piece would apply it — it does not,+ // so that let a hidden required prop reach the vendor as `undefined`.+ // `visibilityOf` now carries the default through as the value, so a prop that+ // has one still passes here, by actually sending it.+ if (visibility.value !== undefined) return;+ throw new Error(+ `${piece}.${action}.${name} is required but hidden or omitted with no value to send.`+ );+}diff --git a/packages/jobs/src/workflows/retention.test.ts b/packages/jobs/src/workflows/retention.test.tsindex 90be100d54..08c16aed72 100644--- a/packages/jobs/src/workflows/retention.test.ts+++ b/packages/jobs/src/workflows/retention.test.ts@@ -44,6 +44,50 @@ describe("compactForLog", () => {expect(result["…"]).toContain("5 more keys");});+ it("shrinks a record by its fields and drops the declared type", () => {+ const record = {+ kind: "record",+ // `of` is the declared TYPE, not data — keeping it would roughly double the+ // stored payload and bury the values a reader actually wants.+ of: {+ kind: "record",+ fields: { summary: { kind: "primitive", of: "string" } }+ },+ fields: {+ summary: { kind: "primitive", of: "string", value: "Standup" },+ organizer: {+ kind: "record",+ of: { kind: "record", fields: {} },+ fields: {+ email: { kind: "primitive", of: "string", value: "[email protected]" }+ }+ }+ }+ };+ const result = compactForLog(record) as Record<string, unknown>;+ expect(result.of).toBeUndefined();+ const fields = result.fields as Record<string, unknown>;+ expect(fields.summary).toEqual({+ kind: "primitive",+ of: "string",+ value: "Standup"+ });+ // Nested records shrink the same way, so `of` cannot survive one level down.+ expect((fields.organizer as Record<string, unknown>).of).toBeUndefined();+ });++ it("caps a record at 20 fields and marks the remainder", () => {+ const fields: Record<string, unknown> = {};+ for (let i = 0; i < 25; i++) {+ fields[`f${i}`] = { kind: "primitive", of: "number", value: i };+ }+ const result = compactForLog({ kind: "record", of: {}, fields }) as {+ fields: Record<string, unknown>;+ };+ expect(Object.keys(result.fields)).toHaveLength(21);+ expect(result.fields["…"]).toContain("5 more keys");+ });+it("strips the inline row from an entity RuntimeValue", () => {const entity = {kind: "entity",diff --git a/packages/jobs/src/workflows/retention.ts b/packages/jobs/src/workflows/retention.tsindex 2aa6617062..c54147dd11 100644--- a/packages/jobs/src/workflows/retention.ts+++ b/packages/jobs/src/workflows/retention.ts@@ -34,6 +34,19 @@ export function compactForLog(value: unknown, depth = 0): unknown {if (record.kind === "entity") {return { kind: record.kind, of: record.of, id: record.id };}+ // An object shrinks by its FIELDS. Its `of` is the declared type, not data —+ // left to the generic branch it would be compacted as a nested payload and+ // roughly double what the log keeps, while burying the values a reader wants.+ if (+ record.kind === "record" &&+ record.fields !== null &&+ typeof record.fields === "object"+ ) {+ return {+ kind: "record",+ fields: compactKeys(record.fields as Record<string, unknown>, depth)+ };+ }// Named rows shrink like a list: cap the entries, recurse into each value.if (record.kind === "pairs" && Array.isArray(record.entries)) {const rows = record.entries as Record<string, unknown>[];@@ -55,16 +68,25 @@ export function compactForLog(value: unknown, depth = 0): unknown {]};}- const entries = Object.entries(record);- const kept: Record<string, unknown> = {};- for (const [key, entry] of entries.slice(0, MAX_OBJECT_KEYS)) {- kept[key] = compactForLog(entry, depth + 1);- }- if (entries.length > MAX_OBJECT_KEYS) {- kept["…"] = `${entries.length - MAX_OBJECT_KEYS} more keys`;- }- return kept;+ return compactKeys(record, depth);}return value;}++/** An object's first MAX_OBJECT_KEYS keys, each compacted, plus a marker for the+ * rest. Shared by a plain object and a record value's fields. */+function compactKeys(+ source: Record<string, unknown>,+ depth: number+): Record<string, unknown> {+ const entries = Object.entries(source);+ const kept: Record<string, unknown> = {};+ for (const [key, entry] of entries.slice(0, MAX_OBJECT_KEYS)) {+ kept[key] = compactForLog(entry, depth + 1);+ }+ if (entries.length > MAX_OBJECT_KEYS) {+ kept["…"] = `${entries.length - MAX_OBJECT_KEYS} more keys`;+ }+ return kept;+}diff --git a/packages/locale/locales/de/erp.po b/packages/locale/locales/de/erp.poindex a3ad6f3e50..b9fa3e0c21 100644--- a/packages/locale/locales/de/erp.po+++ b/packages/locale/locales/de/erp.po@@ -269,6 +269,10 @@ msgstr "{0} Rechnungen wurden in Ihrem vorherigen System fakturiert und werden nmsgid "{0} is {1}, not Draft or Planned"msgstr ""+#. placeholder {0}: integration.name+msgid "{0} isn't installed yet. There's nothing to configure — install it to connect an account."+msgstr "{0} ist noch nicht installiert. Es gibt nichts zu konfigurieren – installieren Sie es, um ein Konto zu verbinden."+#. placeholder {0}: data.quantitymsgid "{0} items marked as picked"msgstr ""@@ -481,6 +485,12 @@ msgstr "{alreadyPlannedItemCount} übersprungene Teile — sie haben bereits offmsgid "{apOverduePct}% of payables"msgstr "{apOverduePct}% der Verbindlichkeiten"+msgid "{appName} is connected, but needs to be reconnected before workflow steps can use it."+msgstr "{appName} ist verbunden, muss aber erneut verbunden werden, bevor Workflow-Schritte es verwenden können."++msgid "{appName} isn't connected yet. Connect an account before this step can do anything."+msgstr "{appName} ist noch nicht verbunden. Verbinden Sie ein Konto, bevor dieser Schritt etwas tun kann."+msgid "{arOverduePct}% of receivables"msgstr "{arOverduePct}% der Forderungen"@@ -594,6 +604,9 @@ msgstr "{inserted} eingefügt, {updated} aktualisiert, {0} benötigen Behebung,msgid "{jobsMissingStorageUnit, plural, one {# open job has materials with no storage unit} other {# open jobs have materials with no storage unit}}"msgstr "{jobsMissingStorageUnit, plural, one {# offener Fertigungsauftrag hat Materialien ohne Lagereinheit} other {# offene Fertigungsaufträge haben Materialien ohne Lagereinheit}}"+msgid "{kept, plural, one {Took # value.} other {Took # values.}}"+msgstr "{kept, plural, one {# Wert übernommen.} other {# Werte übernommen.}}"+msgid "{label} is used by documents, journals or default accounts, so it cannot be deleted."msgstr "{label} wird von Dokumenten, Buchungssätzen oder Standardkonten verwendet, daher kann es nicht gelöscht werden."@@ -746,6 +759,9 @@ msgstr "{state} · synchronisiert {syncedAgo}"msgid "{termMonths, plural, one {# month} other {# months}}"msgstr "{termMonths, plural, one {# Monat} other {# Monate}}"+msgid "{total, plural, one {Joined # value.} other {Joined # values.}}"+msgstr "{total, plural, one {# Wert zusammengefügt.} other {# Werte zusammengefügt.}}"+msgid "{total} phases to get your company live on Carbon. Each one ends at a checkpoint."msgstr "{total} Phasen, um Ihr Unternehmen auf Carbon live zu schalten. Jede endet an einem Checkpoint."@@ -1651,6 +1667,9 @@ msgstr "Ein Benutzer erfasst das Verfallsdatum für jede Charge oder Seriennummemsgid "A variable charge — mileage overage, damage, delivery, cleaning — is billed on the agreement's next invoice."msgstr "Eine variable Gebühr – Kilometerüberschuss, Schaden, Lieferung, Reinigung – wird auf der nächsten Rechnung des Vertrags abgerechnet."+msgid "A workspace can be connected to one Carbon company only. Disconnect it there first, or connect a different workspace."+msgstr "Ein Arbeitsbereich kann nur mit einem Carbon-Unternehmen verbunden werden. Trennen Sie ihn zuerst dort oder verbinden Sie einen anderen Arbeitsbereich."+msgid "ABA"msgstr "ABA"@@ -1672,6 +1691,9 @@ msgstr "Über"msgid "About (notification)"msgstr "Über (Benachrichtigung)"+msgid "About this field"+msgstr "Über dieses Feld"+msgid "Absent"msgstr "Abwesend"@@ -1838,6 +1860,9 @@ msgstr ""msgid "Accounts receivable for amounts owed by customers"msgstr "Forderungen aus Lieferungen und Leistungen für Beträge, die Kunden schulden."+msgid "Accounts your workflows can act as. Add one for each account a workflow step should use."+msgstr "Konten, die Ihre Workflows verwenden können. Fügen Sie eines für jedes Konto hinzu, das ein Workflow-Schritt verwenden soll."+msgid "Accrual"msgstr "Abgrenzung"@@ -2055,6 +2080,9 @@ msgstr "Einen Schritt oder eine Frage hinzufügen"msgid "Add Ability"msgstr "Qualifikation hinzufügen"+msgid "Add account"+msgstr "Konto hinzufügen"+msgid "Add Account"msgstr "Konto hinzufügen"@@ -2196,6 +2224,10 @@ msgstr "Monat hinzufügen"msgid "Add Note"msgstr "Notiz hinzufügen"+msgctxt "workflow data step"+msgid "Add operation"+msgstr "Operation hinzufügen"+msgid "Add Operation"msgstr "Operation hinzufügen"@@ -2434,6 +2466,9 @@ msgstr "Zu {nextStatus} übergehen"msgid "Advanced"msgstr "Erweitert"+msgid "Advanced properties"+msgstr "Erweiterte Eigenschaften"+msgid "Affected item not found."msgstr "Betroffenes Element nicht gefunden."@@ -2657,6 +2692,12 @@ msgstr "Beträge zeigen nur die notwendigen Ziffern an."msgid "An ability is a process's qualification. Only processes without one are listed."msgstr "Eine Qualifikation ist eine Qualifikation eines Verfahrens. Nur Verfahren ohne eine werden aufgelistet."+msgid "An account is already called that — pick a different name."+msgstr "Ein Konto hat diesen Namen bereits — wählen Sie einen anderen Namen."++msgid "An account is missing from this list until it is reconnected."+msgstr "Ein Konto fehlt in dieser Liste, bis es erneut verbunden ist."+msgid "An accounting bucket that groups expenses by department or function so the GL can report spend by group, not just by account."msgstr "Ein Buchhaltungs-Container, der Aufwendungen nach Abteilung oder Funktion gruppiert, sodass das Hauptbuch Ausgaben nach Gruppe statt nur nach Konto berichten kann."@@ -2822,6 +2863,9 @@ msgstr "Ein unerwarteter Fehler ist beim Verbinden mit Onshape aufgetreten. Speimsgid "An unexpected error occurred while connecting to Onshape. Try connecting again."msgstr "Bei der Verbindung mit Onshape ist ein unerwarteter Fehler aufgetreten. Versuchen Sie die Verbindung erneut."+msgid "An unexpected error occurred while connecting. Try connecting again."+msgstr "Ein unerwarteter Fehler ist beim Verbinden aufgetreten. Versuchen Sie erneut, sich zu verbinden."+msgid "Analytics"msgstr "Analytik"@@ -2839,9 +2883,6 @@ msgstr "Und {0} weitere — lösen Sie diese auf, um den Rest zu sehen."msgid "And {0} more. Resolve these to see the rest."msgstr "Und {0} weitere. Beheben Sie diese auf, um den Rest zu sehen."-msgid "and {hidden} more"-msgstr "und {hidden} weitere"-msgid "and {remaining} more"msgstr "und {remaining} weitere"@@ -2878,6 +2919,9 @@ msgstr "Jährlicher Satz, mit dem die Miete diskontiert wird"msgid "Annual. Starts from the company's incremental borrowing rate"msgstr "Jährlich. Startet ab dem inkrementellen Kreditzins des Unternehmens"+msgid "Another connection to this integration already has that name. Choose a different one."+msgstr "Eine andere Verbindung zu dieser Integration hat bereits diesen Namen. Wählen Sie einen anderen."+msgid "Another cost center this one rolls up into, letting you nest a sub-department under its parent for hierarchical cost reporting."msgstr "Ein anderes Kostenzentrum, dem dieses untergeordnet ist, was es ermöglicht, eine Unterkostenstelle unter ihrer Muttergesellschaft für hierarchische Kostenberichterstattung zu verschachteln."@@ -2950,6 +2994,9 @@ msgstr "API-Schlüssel für programmgesteuerten Zugriff auf Ihre Carbon-Daten."msgid "API, webhooks, and integrations"msgstr "API, Webhooks und Integrationen"+msgid "App"+msgstr "App"+msgid "Appearance"msgstr "Erscheinungsbild"@@ -3882,6 +3929,9 @@ msgstr "Anhänge konnten nicht geladen werden"msgid "Attempts"msgstr "Versuche"+msgid "Attendees"+msgstr "Teilnehmer"+msgid "Attribute"msgstr "Attribut"@@ -3924,6 +3974,9 @@ msgstr "Authentifikator-App"msgid "Authenticator QR code"msgstr "Authentifizierungs-QR-Code"+msgid "Authorization was refused. Try connecting again."+msgstr "Die Autorisierung wurde abgelehnt. Versuchen Sie erneut, sich zu verbinden."+msgid "Authorized overtime on top of the shift"msgstr "Genehmigte Überstunden zusätzlich zur Schicht"@@ -3984,6 +4037,9 @@ msgstr "Automatische Aktualisierungen und Sicherungen"msgid "Automatic, prorated consumption of a job's untracked materials when output is reported — tracked materials are issued manually."msgstr "Automatischer, anteiliger Verbrauch der ungespurten Materialien eines Auftrags, wenn die Leistung gemeldet wird — verfolgte Materialien werden manuell ausgegeben."+msgid "Automatically create a Google Meet video conference link for this event"+msgstr "Automatisch einen Google Meet Videokonferenzlink für dieses Event erstellen"+msgid "Automatically release the job when the kanban is scanned"msgstr "Den Auftrag automatisch freigeben, wenn der Kanban gescannt wird"@@ -4193,6 +4249,9 @@ msgstr "Rückzugebende Lose"msgid "Batching"msgstr "Losbildung"+msgid "BCC Email"+msgstr "BCC E-Mail"+msgid "Becomes"msgstr "Wird zu"@@ -4370,6 +4429,12 @@ msgstr "Tafel"msgid "Body"msgstr "Text"+msgid "Body for the email you want to send"+msgstr "Text der E-Mail, die Sie senden möchten"++msgid "Body Type"+msgstr "Textformat"+msgid "BoM"msgstr "BoM"@@ -4427,6 +4492,9 @@ msgstr "Breadcrumb-Navigation"msgid "Bring in your parts, BOMs, Bill of Process, and costing — with Carbon's import tools, CSV, or LLM help."msgstr "Importieren Sie Ihre Teile, BOMs, Arbeitsgangliste und Kalkulation — mit Carbons Importwerkzeugen, CSV oder LLM-Hilfe."+msgid "Broadcast reply to channel"+msgstr "Antwort an Kanal ausstrahlen"+msgid "Browse library"msgstr "Bibliothek durchsuchen"@@ -4513,6 +4581,9 @@ msgstr ""msgid "By accepting the invite, you agree to the <0>Terms of Service</0> and <1>Privacy Policy</1>."msgstr "Durch Annahme der Einladung stimmen Sie den <0>Nutzungsbedingungen</0> und der <1>Datenschutzrichtlinie</1> zu."+msgid "By default it'll be 30 min post start time"+msgstr "Standardmäßig 30 Minuten nach der Startzeit"+msgid "By dimension"msgstr "Nach Dimension"@@ -4881,6 +4952,9 @@ msgstr "Verursachender Durchlauf: "msgid "CC"msgstr "CC"+msgid "CC Email"+msgstr "CC E-Mail"+msgid "Centralized Billing Address"msgstr "Zentralisierte Rechnungsadresse"@@ -4998,6 +5072,12 @@ msgstr "Das Ändern aktualisiert die Teile-ID"msgid "Changing type resets this item's draft edits."msgstr "Das Ändern des Typs setzt die Entwurfsbearbeitungen dieses Elements zurück."+msgid "Channel"+msgstr "Kanal"++msgid "Channel Name"+msgstr "Kanalname"+msgid "Characteristic"msgstr "Merkmal"@@ -5078,6 +5158,9 @@ msgstr "Checkpoint ·"msgid "Checkpoints"msgstr "Kontrollpunkte"+msgid "Choose {named} first."+msgstr "Wählen Sie zuerst {named}."+msgid "Choose a backup"msgstr "Wählen Sie eine Sicherung"@@ -5333,6 +5416,9 @@ msgstr "Rüsten einklappen"msgid "Collapse subtree"msgstr "Teilbaum einklappen"+msgid "Color"+msgstr "Farbe"+#. placeholder {0}: index + 1msgid "Column {0} of {count}"msgstr "Spalte {0} von {count}"@@ -5594,6 +5680,9 @@ msgstr "Konfigurieren Sie die Standardkonten, die für verschiedene Transaktionsmsgid "Configure the start months for your fiscal and tax years"msgstr "Konfigurieren Sie die Startmonate für Ihre Geschäfts- und Steuerjahre"+msgid "Configure the steps above first."+msgstr "Konfigurieren Sie zuerst die obigen Schritte."+msgid "Configure when purchased item costs should be updated from supplier transactions."msgstr "Konfigurieren Sie, wann die Kosten gekaufter Artikel aus Lieferantentransaktionen aktualisiert werden sollen."@@ -5690,6 +5779,9 @@ msgstr "Konfliktgrund"msgid "Connect"msgstr "Verbinden"+msgid "Connect {appName}"+msgstr "{appName} verbinden"+msgid "Connect Carbon to your accounting, project management, and CAD tools and much more."msgstr "Verbinden Sie Carbon mit Ihren Buchhaltungs-, Projektmanagement- und CAD-Tools und vielem mehr."@@ -5717,9 +5809,18 @@ msgstr "Verbinden Sie die externen Tools, die Ihr Unternehmen bereits nutzt"msgid "Connect your identity provider by pasting either its metadata URL or its raw metadata XML — exactly one of the two."msgstr "Verbinden Sie Ihren Identitätsanbieter, indem Sie entweder seine Metadaten-URL oder sein Rohmetadaten-XML einfügen — genau eins von beiden."+msgid "Connected before workflows needed extra permissions. Reconnect to grant them — everything else keeps working meanwhile."+msgstr "Verbunden vor Workflows benötigte zusätzliche Berechtigungen. Verbinden Sie erneut, um diese zu gewähren — alles andere funktioniert unterdessen weiter."+msgid "Connected to"msgstr "Verbunden mit"+msgid "Connection"+msgstr "Verbindung"++msgid "Connection name"+msgstr "Verbindungsname"+msgid "Console Mode"msgstr "Konsolenmodus"@@ -6336,6 +6437,12 @@ msgstr "Konnte {0} nicht freigeben: {1}"msgid "Could not save"msgstr "Konnte nicht gespeichert werden"+msgid "Couldn't check whether {appName} is connected."+msgstr "Es konnte nicht geprüft werden, ob {appName} verbunden ist."++msgid "Couldn't complete the connection"+msgstr "Verbindung konnte nicht abgeschlossen werden"+msgid "Couldn't complete the Onshape connection"msgstr "Die Onshape-Verbindung konnte nicht abgeschlossen werden"@@ -6351,12 +6458,18 @@ msgstr "Weitere Zeilen konnten nicht geladen werden"msgid "Couldn't load related documents. Refresh before creating a new one to avoid duplicates."msgstr "Konnte zugehörige Dokumente nicht laden. Aktualisieren Sie den Bereich, bevor Sie ein neues Dokument erstellen, um Duplikate zu vermeiden."+msgid "Couldn't load the choices for this field."+msgstr "Die Auswahlmöglichkeiten für dieses Feld konnten nicht geladen werden."+msgid "Couldn't load the provider's dimension targets — check the connection and reload."msgstr "Die Dimensionsziele des Providers konnten nicht geladen werden — überprüfen Sie die Verbindung und laden Sie neu."msgid "Couldn't reschedule the job. Please try again."msgstr "Der Auftrag konnte nicht umgeplant werden. Bitte versuchen Sie es erneut."+msgid "Couldn't save the connection"+msgstr "Verbindung konnte nicht gespeichert werden"+msgid "Couldn't save the Onshape connection"msgstr "Die Onshape-Verbindung konnte nicht gespeichert werden"@@ -6366,6 +6479,12 @@ msgstr "Konnte die Onshape Government-Verbindung nicht speichern"msgid "Couldn't save the Ramp connection"msgstr "Die Ramp-Verbindung konnte nicht gespeichert werden"+msgid "Couldn't start the {name} connection"+msgstr "Die {name}-Verbindung konnte nicht gestartet werden"++msgid "Couldn't start the authorization."+msgstr "Die Autorisierung konnte nicht gestartet werden."+msgid "Count"msgstr "Anzahl"@@ -6375,6 +6494,12 @@ msgstr "Zählverlauf"msgid "Count ID"msgstr "Zählung-ID"+msgid "Count items"+msgstr "Artikel zählen"++msgid "Counted {total}."+msgstr "{total} gezählt."+msgid "Counted Qty"msgstr "Gezählte Menge"@@ -6479,6 +6604,9 @@ msgstr "Vertrag erstellen"msgid "Create Forecast"msgstr "Prognose erstellen"+msgid "Create Google Meet Link"+msgstr "Erstellen Sie einen Google Meet-Link"+msgid "Create Issue"msgstr "Problem erstellen"@@ -7116,6 +7244,9 @@ msgstr "Datum"msgid "Date Acquired"msgstr "Erwerbungsdatum"+msgid "Date and time"+msgstr "Datum und Uhrzeit"+msgid "Date Calibrated"msgstr "Kalibrierungsdatum"@@ -7125,6 +7256,9 @@ msgstr "Fälligkeitsdatum"msgid "Date Due"msgstr "Fälligkeitsdatum"+msgid "Date from"+msgstr "Datum von"+msgid "Date issued"msgstr "Ausstellungsdatum"@@ -7137,6 +7271,9 @@ msgstr "Zahlungsdatum"msgid "Date Paid"msgstr "Zahlungsdatum"+msgid "Date to"+msgstr "Datum bis"+msgid "Dates"msgstr "Daten"@@ -8006,6 +8143,9 @@ msgstr "Änderungsbeschreibung"msgid "Description of Issue"msgstr "Problembeschreibung"+msgid "Description of the event. You can use HTML tags here."+msgstr "Beschreibung des Events. Sie können hier HTML-Tags verwenden."+msgid "Detach"msgstr "Trennen"@@ -8111,6 +8251,9 @@ msgstr "Verworfen"msgid "Disconnect"msgstr "Trennen"+msgid "Disconnected"+msgstr "Getrennt"+msgid "Discontinuation date"msgstr "Einstellungsdatum"@@ -9071,6 +9214,9 @@ msgstr "E-Mail"msgid "Email Address"msgstr "E-Mail-Adresse"+msgid "Email address to set as the \"Reply-To\" header"+msgstr "E-Mail-Adresse, die als \"Antwort an\"-Header gesetzt werden soll"+msgid "Email Domains"msgstr "E-Mail-Domänen"@@ -9086,6 +9232,9 @@ msgstr "E-Mail versendet"msgid "Emails"msgstr "E-Mails"+msgid "Emails of the attendees (guests)"+msgstr "E-Mails der Teilnehmer (Gäste)"+msgid "Emoji"msgstr "Emoji"@@ -9155,6 +9304,9 @@ msgstr "Aktivieren Sie digitale Angebote für Ihr Unternehmen. Dies ermöglichtmsgid "Enable in Settings"msgstr "In Einstellungen aktivieren"+msgid "Enable link unfurling for this message"+msgstr "Link-Entfaltung für diese Nachricht aktivieren"+msgid "Enable notifications when a sales rule violation is blocked or acknowledged on a quote, sales order, or sales invoice."msgstr "Aktivieren Sie Benachrichtigungen, wenn eine Verletzung einer Verkaufsregel auf einem Angebot, Kundenauftrag oder einer Ausgangsrechnung blockiert oder bestätigt wird."@@ -9236,6 +9388,9 @@ msgstr "Ende"msgid "End Date"msgstr "Enddatum"+msgid "End date time of the event"+msgstr "Enddatum und -uhrzeit des Events"+msgid "End Line"msgstr "Position beenden"@@ -9568,6 +9723,9 @@ msgstr ""msgid "Event Type"msgstr "Ereignistyp"+msgid "Event types"+msgstr "Ereignistypen"+msgid "Events"msgstr "Ereignisse"@@ -9746,6 +9904,9 @@ msgstr "Position ausklappen"msgid "Expand Machine"msgstr "Maschine ausklappen"+msgid "Expand Recurring Event?"+msgstr "Wiederkehrende Ereignisse erweitern?"+msgid "Expand row"msgstr "Zeile ausklappen"@@ -10584,6 +10745,9 @@ msgstr "Beheben Sie diese in den Dateien, dann laden Sie sie erneut hoch."msgid "Fix these jobs before releasing"msgstr "Beheben Sie diese Fertigungsaufträge vor der Freigabe"+msgid "Fix this"+msgstr "Das beheben"+msgid "Fixed"msgstr "Fest"@@ -11052,6 +11216,12 @@ msgstr "Sachkontoabstimmung"msgid "GL Tie-Out"msgstr "Sachkontoabstimmung"+msgid "Gmail"+msgstr "Gmail"++msgid "Gmail: Send Email"+msgstr "Gmail: E-Mail senden"+msgid "Go live right the first time — with our team alongside you"msgstr "Starten Sie richtig beim ersten Mal — mit unserem Team an Ihrer Seite"@@ -11107,6 +11277,15 @@ msgstr "Guten Abend, {name}."msgid "Good morning, {name}."msgstr "Guten Morgen, {name}."+msgid "Google Calendar"+msgstr "Google Kalender"++msgid "Google Calendar: Create Event"+msgstr "Google Calendar: Ereignis erstellen"++msgid "Google Calendar: Get all Events"+msgstr "Google Calendar: Alle Ereignisse abrufen"+msgid "Google Places API key not configured"msgstr "Google Places API-Schlüssel nicht konfiguriert"@@ -11167,6 +11346,15 @@ msgstr "Garantierter Restwert"msgid "Guaranteed Residual Value"msgstr "Garantierter Restwert"+msgid "Guests can invite others"+msgstr "Gäste können andere einladen"++msgid "Guests can modify"+msgstr "Gäste können ändern"++msgid "Guests can see other guests"+msgstr "Gäste können andere Gäste sehen"+msgid "Guided"msgstr "Geführt"@@ -11518,6 +11706,9 @@ msgstr "IBAN"msgid "IC Transaction"msgstr "Intercompany-Transaktion"+msgid "Icon Emoji"+msgstr "Icon-Emoji"+msgid "Id"msgstr "ID"@@ -12282,6 +12473,9 @@ msgstr "liegt am oder nach"msgid "is on or before"msgstr "liegt am oder vor"+msgid "Is Private?"+msgstr "Ist privat?"+msgid "Is supplier org group"msgstr "Ist Lieferantenorganisationsgruppe"@@ -12354,6 +12548,9 @@ msgstr ""msgid "It is coming soon. Contact Carbon to have it set up for your company."msgstr "Sie ist bald verfügbar. Wenden Sie sich an Carbon, um sie für Ihr Unternehmen einrichten zu lassen."+msgid "It was removed after this page loaded. Reload the page and try again."+msgstr "Es wurde entfernt, nachdem diese Seite geladen wurde. Laden Sie die Seite neu und versuchen Sie es erneut."+msgid "It will stop running until you publish a version again. Nothing is deleted."msgstr "Es wird nicht mehr ausgeführt, bis Sie erneut eine Version veröffentlichen. Nichts wird gelöscht."@@ -12550,6 +12747,9 @@ msgstr "Fertigungsaufträge, die diesen Artikel auf ihrer Stückliste haben"msgid "Join {0}"msgstr "Treten Sie {0} bei"+msgid "Join into text"+msgstr "In Text einbinden"+msgid "Journal"msgstr "Buchungssatz"@@ -12616,6 +12816,9 @@ msgstr "Behalte bestehende Preise, nur neue Artikel hinzufügen"msgid "Keep Line"msgstr "Position behalten"+msgid "Keep matching items"+msgstr "Übereinstimmende Artikel behalten"+msgid "Keep navigation open"msgstr "Navigation geöffnet lassen"@@ -12634,6 +12837,12 @@ msgstr "Weiter kommissionieren"msgid "Keeps orders, quotes, and settings behind a second check"msgstr "Schützt Bestellungen, Angebote und Einstellungen durch eine zweite Überprüfung"+msgid "Kept {kept} of {total}; {unresolved} could not be checked."+msgstr "{kept} von {total} behalten; {unresolved} konnten nicht geprüft werden."++msgid "Kept {kept} of {total}."+msgstr "{kept} von {total} behalten."+msgid "Key"msgstr "Schlüssel"@@ -14875,6 +15084,9 @@ msgstr "Kein Zugriff"msgid "No accounts are mapped yet"msgstr "Noch keine Konten zugeordnet"+msgid "No accounts connected yet."+msgstr "Noch keine Konten verbunden."+msgid "No accounts match your search"msgstr "Keine Konten stimmen mit Ihrer Suche überein"@@ -14930,6 +15142,9 @@ msgstr "Noch keine Anlagen. Fügen Sie jede Anlage hinzu, die das Leasing abdeckmsgid "No attachments."msgstr "Keine Anhänge."+msgid "No authorization code was returned"+msgstr "Es wurde kein Autorisierungscode zurückgegeben"+msgid "No available filters"msgstr "Keine verfügbaren Filter"@@ -15130,6 +15345,9 @@ msgstr "Kein Fehlerpfad — der Durchlauf stoppt hier und ist als fehlgeschlagenmsgid "No fair value entered, counts as not met"msgstr "Kein beizulegender Zeitwert eingegeben, wird als nicht erfüllt gezählt"+msgid "No field was chosen to take."+msgstr "Es wurde kein Feld zum Nehmen ausgewählt."+msgid "No fields found."msgstr "Keine Felder gefunden."@@ -15250,6 +15468,9 @@ msgstr "Keine übereinstimmenden Lagerplätze"msgid "No matching operations"msgstr "Keine entsprechenden Arbeitsgänge"+msgid "No matching time"+msgstr "Keine passende Uhrzeit"+msgid "No materials"msgstr "Keine Materialien"@@ -15765,6 +15986,9 @@ msgstr "Nichts"msgid "Nothing at this location matches \"{0}\"."msgstr "Nichts an diesem Ort stimmt mit \"{0}\" überein."+msgid "Nothing can work on this result."+msgstr "Nichts kann an diesem Ergebnis arbeiten."+msgid "Nothing completed in MES yet"msgstr "In MES noch nichts abgeschlossen"@@ -15798,6 +16022,9 @@ msgstr "Nichts geplant — fügen Sie unten eine Station hinzu."msgid "Nothing selected yet"msgstr "Noch nichts ausgewählt"+msgid "Nothing to choose yet - <0>set one up in Settings</0>."+msgstr "Noch nichts zu wählen - <0>richten Sie einen in den Einstellungen ein</0>."+msgid "Nothing to post for this period."msgstr "Nichts zum Buchen in diesem Zeitraum."@@ -16008,6 +16235,9 @@ msgstr "1 {0} entspricht wie vielen {1}?"msgid "One firing of a workflow, recorded step by step with the values each step used and produced, acting throughout with the permissions of the workflow's owner."msgstr "Ein Workflow-Durchlauf, aufgezeichnet Schritt für Schritt mit den Werten, die jeder Schritt verwendet und erzeugt, ausgeführt mit den Berechtigungen des Verantwortlichen des Workflows."+msgid "One of your {appName} accounts needs to be reconnected before workflow steps can use it."+msgstr "Eines Ihrer {appName}-Konten muss erneut verbunden werden, bevor Workflow-Schritte es verwenden können."+msgid "One or more quantities cannot meet this date"msgstr "Eine oder mehrere Mengen können diesen Termin nicht erfüllen"@@ -16131,6 +16361,9 @@ msgstr "Öffnen"msgid "Open ({paymentCurrency})"msgstr "Offen ({paymentCurrency})"+msgid "Open {appName} accounts"+msgstr "{appName}-Konten öffnen"+msgid "Open a change notice"msgstr "Öffnen Sie eine Änderungsmitteilung"@@ -16320,6 +16553,10 @@ msgstr "Arbeitsgang"msgid "Operation"msgstr "Betrieb"+msgctxt "workflow data step"+msgid "Operation"+msgstr "Operation"+msgid "Operation batch"msgstr "Arbeitsgang-Los"@@ -17129,6 +17366,9 @@ msgstr "Wählen Sie einen Kunden, einen Kundentyp oder Alle Kunden aus, um derenmsgid "Pick a date or leave blank to clear it."msgstr "Wählen Sie ein Datum oder lassen Sie es leer, um es zu löschen."+msgid "Pick a field…"+msgstr "Wählen Sie ein Feld…"+msgid "Pick a list variable…"msgstr "Wählen Sie eine Listenvariable…"@@ -17818,6 +18058,9 @@ msgstr "Produktion: Shop-Floor-App und Planung"msgid "Profile"msgstr "Profil"+msgid "Profile Picture"+msgstr "Profilbild"+msgid "Profit Percent"msgstr "Gewinnprozent"@@ -17928,6 +18171,9 @@ msgstr "Weisen Sie den Besitz jeder E-Mail-Domäne mit einem DNS-TXT-Datensatz nmsgid "Provide process knowledge and inputs"msgstr "Prozesswissen und Eingaben bereitstellen"+msgid "Provide the ts (timestamp) or link value of the **parent** message to make this message a reply. Do not use the ts value of the reply itself; use its parent instead. For example '1710304378.475129'.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the 'Copy link' option."+msgstr "Geben Sie den ts (Zeitstempel) oder Linkwert der **übergeordneten** Nachricht an, um diese Nachricht als Antwort zu machen. Verwenden Sie nicht den ts-Wert der Antwort selbst; verwenden Sie stattdessen den übergeordneten Wert. Beispiel: '1710304378.475129'. Alternativ können Sie den Nachrichtenlink leicht erhalten, indem Sie neben der übergeordneten Nachricht auf die drei Punkte klicken und die Option 'Link kopieren' wählen."+msgid "Provide these URLs to your identity provider (Okta, Entra ID, Google Workspace, etc.) when registering Carbon as a SAML application."msgstr "Stellen Sie diese URLs Ihrem Identitätsanbieter (Okta, Entra ID, Google Workspace, usw.) zur Verfügung, wenn Sie Carbon als SAML-Anwendung registrieren."@@ -18731,6 +18977,9 @@ msgstr "Wareneingangsmengen beginnen bei null"msgid "Received quantity not yet credited. The credit memo is created as a draft."msgstr "Empfangene Menge noch nicht kreditiert. Das Gutschriftenmemo wird als Entwurf erstellt."+msgid "Receiver Email (To)"+msgstr "Empfänger-E-Mail (An)"+msgid "Receives the invoice email"msgstr "Erhält die Rechnungs-E-Mail"@@ -18788,6 +19037,21 @@ msgstr "Abstimmung einer Bestellung gegen das, was eingegangen und fakturiert wumsgid "Reconfigure"msgstr "Erneut konfigurieren"+msgid "Reconnect"+msgstr "Erneut verbinden"++msgid "Reconnect {appName}"+msgstr "{appName} erneut verbinden"++msgid "Reconnect it"+msgstr "Erneut verbinden"++msgid "Reconnect needed"+msgstr "Erneute Verbindung erforderlich"++msgid "Reconnect with the account this connection already uses, or use Add account to connect the other one."+msgstr "Verbinden Sie erneut mit dem Konto, das diese Verbindung bereits verwendet, oder verbinden Sie das andere über „Konto hinzufügen“."+msgid "Record"msgstr "Aufnahme"@@ -18833,9 +19097,16 @@ msgstr "Aufzeichnungen"msgid "Records and posted journals are being sent to and received from this provider."msgstr "Datensätze und gebuchte Buchungssätze werden von diesem Anbieter gesendet und empfangen."+msgid "Records here appear as plain text — {appLabel} doesn't support links in this field."+msgstr "Einträge hier werden als Nur-Text angezeigt – {appLabel} unterstützt keine Links in diesem Feld."+msgid "Records moved"msgstr "Datensätze umgelagert"+#. placeholder {0}: notice.params.equals+msgid "Records will be plain text. Set {siblingLabel} to {0} (under Advanced) to turn them into links."+msgstr "Einträge werden Nur-Text sein. Setzen Sie {siblingLabel} auf {0} (unter Erweiterte Einstellungen), um sie in Links zu konvertieren."+msgid "Recost"msgstr "Neu bewerten"@@ -19182,6 +19453,10 @@ msgstr "Entfernen Sie die empfangenen Seriennummern und Chargennummern aus dem Bmsgid "Remove this item"msgstr "Diesen Artikel entfernen"+msgctxt "workflow data step"+msgid "Remove this operation"+msgstr "Diese Operation entfernen"+msgid "Remove this storage type from all referencing storage units and delete it. This cannot be undone."msgstr "Entfernen Sie diesen Speichertyp aus allen referenzierenden Lagereinheiten und löschen Sie ihn. Dies kann nicht rückgängig gemacht werden."@@ -19216,6 +19491,9 @@ msgstr "Umbenennen"msgid "Rename Workflow"msgstr "Workflow umbenennen"+msgid "Renamed"+msgstr "Umbenannt"+msgid "Rendering label preview..."msgstr "Label-Vorschau wird gerendert..."@@ -19381,6 +19659,12 @@ msgstr "Beschaffungsart"msgid "Replies to emailed invoices go here, and it's copied on each one."msgstr "Antworten auf per E-Mail verschickte Rechnungen werden hier erfasst und auf jeder kopiert."+msgid "Reply to Thread (Thread Message Link/Timestamp)"+msgstr "Auf Nachrichtenstrang antworten (Nachrichtenstrang-Link/Zeitstempel)"++msgid "Reply-To Email"+msgstr "Antwort-an-E-Mail"+msgid "Report"msgstr "Bericht"@@ -19925,6 +20209,9 @@ msgstr "Einladung widerrufen"msgid "Revoke Invites"msgstr "Einladungen widerrufen"+msgid "Revoked"+msgstr "Widerrufen"+msgid "Rework"msgstr "Nacharbeit"@@ -20699,6 +20986,9 @@ msgstr "Lieferantenteile durchsuchen"msgid "Search suppliers..."msgstr "Lieferanten durchsuchen..."+msgid "Search Term"+msgstr "Suchbegriff"+msgid "Search tools..."msgstr "Werkzeuge durchsuchen..."@@ -20800,6 +21090,9 @@ msgstr "Wählen Sie zunächst eine Form aus, um verfügbare Optionen anzuzeigen"msgid "Select a step to hide parts on it."msgstr "Wählen Sie einen Schritt aus, um Teile darauf auszublenden."+msgid "Select a step…"+msgstr "Wählen Sie einen Schritt…"+msgid "Select a substance and shape first to see available options"msgstr "Wählen Sie zunächst einen Stoff und eine Form aus, um verfügbare Optionen anzuzeigen"@@ -20818,6 +21111,9 @@ msgstr "Alle auswählen"msgid "Select an action…"msgstr "Aktion auswählen…"+msgid "Select an app…"+msgstr "Wählen Sie eine App…"+msgid "Select an assignee"msgstr "Einen Bearbeiter auswählen"@@ -20842,6 +21138,9 @@ msgstr "Vorgang auswählen…"msgid "Select an option"msgstr "Wählen Sie eine Option"+msgid "Select an option…"+msgstr "Wählen Sie eine Option…"+msgid "Select at least one item to accept the quote"msgstr "Wählen Sie mindestens einen Artikel, um das Angebot anzunehmen"@@ -20875,6 +21174,9 @@ msgstr "Mitarbeiter auswählen"msgid "Select Employee Type"msgstr "Mitarbeitertyp auswählen"+msgid "Select event types"+msgstr "Ereignistypen auswählen"+msgid "Select field"msgstr "Feld auswählen"@@ -21026,6 +21328,9 @@ msgstr "Einladung senden"msgid "Send Invites"msgstr "Einladungen senden"+msgid "Send Notifications"+msgstr "Benachrichtigungen senden"+msgid "Send RFQ to Suppliers"msgstr "RFQ an Lieferanten senden"@@ -21035,6 +21340,12 @@ msgstr "An Carbon senden"msgid "Send Via"msgstr "Senden über"+msgid "Sender Email"+msgstr "Absender-E-Mail"++msgid "Sender Name"+msgstr "Absendername"+msgid "Sending defective units back to an earlier operation to be corrected instead of scrapping them."msgstr "Defekte Einheiten zur Korrektur an einen früheren Arbeitsschritt zurückschicken, anstatt sie zu verschrotten."@@ -21802,6 +22113,18 @@ msgstr ""msgid "Slack"msgstr "Slack"+msgid "Slack: Create Channel"+msgstr "Slack: Kanal erstellen"++msgid "Slack: Find User by Email"+msgstr "Slack: Benutzer nach E-Mail finden"++msgid "Slack: Send Message To A Channel"+msgstr "Slack: Nachricht an einen Kanal senden"++msgid "Slack: Send Message To A User"+msgstr "Slack: Nachricht an einen Benutzer senden"+msgid "Slice asset activity by location, item, or any dimension"msgstr "Teile die Vermögensaktivität nach Standort, Artikel oder einer beliebigen Dimension auf"@@ -22041,6 +22364,9 @@ msgstr "Startdatum"msgid "Start Date"msgstr "Startdatum"+msgid "Start date time of the event"+msgstr "Startdatum und -uhrzeit des Ereignisses"+msgid "Start Expiration"msgstr "Verfallsdatum starten"@@ -22855,6 +23181,9 @@ msgstr "Tags"msgid "Tailor this hub for the customer. Changes apply live for everyone viewing it. Never shown to the customer here."msgstr "Passen Sie diesen Hub für den Kunden an. Änderungen werden live für alle angewendet, die ihn anzeigen. Wird dem Kunden hier nie angezeigt."+msgid "Take one field from every item"+msgstr "Ein Feld von jedem Element nehmen"+msgid "Take out of service"msgstr "Außer Betrieb nehmen"@@ -22868,6 +23197,12 @@ msgstr "Eigentümerschaft übernehmen"msgid "Take Ownership: {0}"msgstr "Eigentümerschaft übernehmen: {0}"+msgid "Take the first item"+msgstr "Das erste Element nehmen"++msgid "Take the last item"+msgstr "Das letzte Element nehmen"+msgid "Take the shortest remaining shelf life across the materials consumed to make this item. Use when the product's expiry depends on its ingredients."msgstr "Berücksichtigen Sie die kürzeste verbleibende Haltbarkeit der verbrauchten Werkstoffe zur Herstellung dieses Artikels. Verwenden Sie dies, wenn der Verfall des Produkts von seinen Inhaltsstoffen abhängt."@@ -23115,11 +23450,8 @@ msgstr ""msgid "Test run"msgstr "Testlauf"-msgid "Test run — results are not saved to the Runs page"-msgstr "Testlauf — Ergebnisse werden nicht auf der Seite „Läufe“ gespeichert"--msgid "Test runs are not saved. Close this panel and the result is gone."-msgstr "Testläufe werden nicht gespeichert. Schließen Sie dieses Fenster und das Ergebnis ist verschwunden."+msgid "Test runs are saved to the run history, marked as tests."+msgstr "Testläufe werden im Ausführungsverlauf gespeichert und als Test markiert."msgid "Test Value"msgstr "Testwert"@@ -23127,9 +23459,36 @@ msgstr "Testwert"msgid "Text size"msgstr "Textgröße"+msgid "That account is still being reconnected. Try again in a moment."+msgstr "Dieses Konto wird noch verbunden. Versuchen Sie es in einem Moment erneut."++msgid "That account no longer exists"+msgstr "Dieses Konto existiert nicht mehr"++msgid "That connection name is already used"+msgstr "Dieser Verbindungsname wird bereits verwendet"++msgid "That field holds a list of its own. Turn on flattening to take it."+msgstr "Dieses Feld enthält selbst eine Liste. Aktivieren Sie das Abflachen, um es zu nehmen."++msgid "That field holds several values, so they are combined into one list."+msgstr "Dieses Feld enthält mehrere Werte, daher werden sie zu einer Liste kombiniert."++msgid "That integration is not available"+msgstr "Diese Integration ist nicht verfügbar"++msgid "That list was empty."+msgstr "Diese Liste war leer."+msgid "That name is already used by another step."msgstr "Dieser Name wird bereits von einem anderen Schritt verwendet."+msgid "That workspace is connected to another company"+msgstr "Dieser Arbeitsbereich ist mit einem anderen Unternehmen verbunden"++msgid "That's a different account"+msgstr "Das ist ein anderes Konto"+#. placeholder {0}: i18n._(step.title)msgid "The \"{0}\" phase checks itself off once all of its tasks in the project plan are done."msgstr "Die Phase „{0}\" wird automatisch abgeschlossen, sobald alle ihre Aufgaben im Projektplan erledigt sind."@@ -23143,6 +23502,9 @@ msgstr "Die Phase „{0}\" ist abgeschlossen – ihr Kontrollpunkt „{1}\" wurdmsgid "The {0} phases to go live, each ending at a checkpoint. Tick off each task as you complete it."msgstr "Die {0} Phasen bis zur Live-Schaltung, jede endet an einem Checkpoint. Markieren Sie jede Aufgabe, wenn Sie sie abgeschlossen haben."+msgid "The {appName} account this step uses is not available — it was disconnected or needs to be reconnected."+msgstr "Das {appName}-Konto, das dieser Schritt verwendet, ist nicht verfügbar – es wurde getrennt oder muss erneut verbunden werden."+msgid "The accent color used across Carbon."msgstr "Die in Carbon verwendete Akzentfarbe."@@ -23158,6 +23520,9 @@ msgstr "Die Konten, auf die Carbon automatisch bucht"msgid "The action that copies a saved method (its materials, operations, and work instructions) onto a job or quote line."msgstr "Die Aktion, die eine gespeicherte Methode (ihre Werkstoffe, Arbeitsgänge und Arbeitsanweisungen) auf einen Fertigungsauftrag oder eine Angebotsposition kopiert."+msgid "The address must be listed in your GMail account's settings"+msgstr "Die Adresse muss in den Einstellungen Ihres GMail-Kontos aufgeführt sein"+msgid "The allowed values for a list-type attribute; users pick from these rather than free-typing."msgstr "Die zulässigen Werte für ein listenartiges Attribut; Benutzer wählen aus diesen anstelle von frei tippseln."@@ -23179,6 +23544,9 @@ msgstr "Der Vermögenswert wechselt in seine Betriebsklasse und wird ab dem Inbemsgid "The asset would have a negative cost. Check the purchase price."msgstr "Das Anlagegut hätte negative Kosten. Überprüfen Sie den Kaufpreis."+msgid "The authorization took too long or came back altered. Start the connection again from this page."+msgstr "Die Autorisierung hat zu lange gedauert oder wurde verändert zurückgegeben. Starten Sie die Verbindung erneut von dieser Seite aus."+msgid "The authorization was refused in Onshape. Save the integration settings to try again."msgstr "Die Autorisierung wurde in Onshape verweigert. Speichern Sie die Integrationseinstellungen, um es erneut zu versuchen."@@ -23188,6 +23556,9 @@ msgstr "Die Autorisierung wurde in Onshape abgelehnt. Versuchen Sie die Verbindumsgid "The authorization was refused in Ramp. Try connecting again."msgstr "Die Autorisierung wurde in Ramp verweigert. Versuchen Sie erneut, die Verbindung herzustellen."+msgid "The authorization was rejected"+msgstr "Die Autorisierung wurde abgelehnt"+msgid "The average cost of the item. Changing it needs permission to edit parts."msgstr "Die durchschnittlichen Kosten des Artikels. Um es zu ändern, benötigen Sie die Berechtigung zum Bearbeiten von Teilen."@@ -23291,6 +23662,12 @@ msgstr "Das Unternehmen hat bereits einen gebuchten Eröffnungsbuchungssatz."msgid "The company has no account defaults."msgstr "Das Unternehmen hat keine Kontostandardwerte."+msgid "The connection could not be verified"+msgstr "Die Verbindung konnte nicht überprüft werden"++msgid "The connection was refused"+msgstr "Die Verbindung wurde abgelehnt"+msgid "The contract cannot be cancelled then"msgstr "Der Vertrag kann dann nicht storniert werden"@@ -23556,6 +23933,9 @@ msgstr "Die HTTPS-Adresse, an die der Webhook-Schritt eines Workflows sendet —msgid "The human-readable document number (like J000001 or ECO-000001) minted from a sequence and stored on the record, distinct from its internal id."msgstr "Die lesbare Dokumentnummer (wie J000001 oder ECO-000001), die aus einem Nummernkreis generiert und im Datensatz gespeichert wird, unterschiedlich von seiner internen ID."+msgid "The icon emoji of the bot"+msgstr "Das Symbol-Emoji des Bots"+msgid "The identifier the customer uses for this part on their POs; Carbon resolves it to our internal Part ID on order import."msgstr "Die Kennung, die der Kunde für diesen Teil in seinen POs verwendet; Carbon löst sie beim Bestellimport auf unsere interne Teil-ID auf."@@ -23577,6 +23957,9 @@ msgstr "Die Incoterms-Regel (FOB, DAP, EXW, CIF, ...), die regelt, wer Fracht bemsgid "The Incoterm rule (FOB, DAP, EXW, CIF, …) that governs who pays freight, who bears risk, and where the transfer of title occurs on shipments to this customer."msgstr "Die Incoterms-Regel (FOB, DAP, EXW, CIF, ...), die regelt, wer Fracht bezahlt, wer Risiko trägt und wo der Eigentumstitel bei Lieferungen an diesen Kunden auftritt."+msgid "The integration authorized the connection but saving it failed. Try connecting again."+msgstr "Die Integration autorisierte die Verbindung, aber das Speichern ist fehlgeschlagen. Versuchen Sie erneut, eine Verbindung herzustellen."+msgid "The inventory cost recognized when a shipment posts, valued by the item's costing method."msgstr "Die Bestandskosten, die bei einer Lieferbuchung anerkannt werden, bewertet nach der Kalkulationsmethode des Artikels."@@ -23592,6 +23975,15 @@ msgstr "Der Artikel, den jeder Fertigungsauftrag produziert – erforderlich, ummsgid "The item's rental rate"msgstr "Der Mietpreis des Artikels"+msgid "The items in that list have no field by that name."+msgstr "Die Elemente dieser Liste haben kein Feld mit diesem Namen."++msgid "The items in that list have no fields to take."+msgstr "Die Einträge in dieser Liste haben keine Felder zum Auswählen."++msgid "The items in that list have no reading as text."+msgstr "Die Elemente dieser Liste lassen sich nicht als Text lesen."+msgid "the job hours due that day (a due-date basis, not the day the work runs), with overdue work in Past due."msgstr "die Arbeitsstunden fällig an diesem Tag (basierend auf dem Fälligkeitsdatum, nicht dem Tag der Ausführung), mit überfälligen Arbeiten unter Überfällig."@@ -23885,6 +24277,9 @@ msgstr "Die Verfahrensanweisung, die Techniker befolgen, wenn diese Instandhaltumsgid "The processes this work center can run; appears in process-pickers when scheduling operations, and limits which jobs can route through this work center."msgstr "Die Verfahren, die dieser Arbeitsplatz ausführen kann; erscheint in Verfahren-Auswahlfeldern beim Planen von Arbeitsgängen und begrenzt, welche Fertigungsaufträge über diesen Arbeitsplatz laufen können."+msgid "The profile picture of the bot"+msgstr "Das Profilbild des Bots"+msgid "The provider offers no dimension targets. Enable the feature in the provider first (e.g. tracking categories, class tracking, or fields)."msgstr "Der Provider bietet keine Dimensionsziele. Aktivieren Sie die Funktion zuerst beim Provider (z. B. Tracking-Kategorien, Klassenverfolgung oder Felder)."@@ -23986,12 +24381,12 @@ msgstr "In der Antwort von Onshape fehlten erforderliche Parameter. Versuchen Simsgid "The response from Ramp was missing required parameters. Try connecting again."msgstr "In der Antwort von Ramp fehlten erforderliche Parameter. Versuchen Sie erneut, die Verbindung herzustellen."+msgid "The response was missing required parameters. Try connecting again."+msgstr "Die Antwort fehlten erforderliche Parameter. Versuchen Sie erneut, eine Verbindung herzustellen."+msgid "The restore job reported this error."msgstr "Der Wiederherstellungsvorgang hat diesen Fehler gemeldet."-msgid "The result will not appear on the Runs page."-msgstr "Das Ergebnis wird nicht auf der Seite Ausführungen angezeigt."-msgid "The revision number of the part"msgstr "Die Revisionsnummer des Teils"@@ -24139,6 +24534,9 @@ msgstr "Das System, das ein Unternehmen zur Verwaltung der Anmeldungen seiner Pemsgid "The system passes every in-scope acceptance test in your configured system, with your data; the data is validated; and you sign off. Then go-live."msgstr "Das System besteht jeden relevanten Akzeptanztest in Ihrem konfigurierten System mit Ihren Daten; die Daten werden validiert; und Sie geben die Freigabe. Dann Go-live."+msgid "The text of your message. When using Block Kit blocks, this is used as a fallback for notifications."+msgstr "Der Text Ihrer Nachricht. Bei Verwendung von Block Kit Blöcken wird dies als Fallback für Benachrichtigungen verwendet."+msgid "The thread linking a sales RFQ, its quote, and the resulting sales order — a join, not a document with its own status."msgstr "Der Strang, der eine Verkaufs-Anfrage, ihr Angebot und den resultierenden Kundenauftrag verbindet – ein Join, kein Dokument mit eigenem Status."@@ -24220,6 +24618,9 @@ msgstr ""msgid "The US tax depreciation system with IRS property-class tables, run as a separate tax schedule alongside the book schedule."msgstr "Das US-Steuersystem für Abschreibung mit IRS-Anlageklassen-Tabellen, das als separater Steuerstundungsplan neben dem Handelsabschreibungsplan läuft."+msgid "The username of the bot"+msgstr "Der Benutzername des Bots"+msgid "The users in this group; group-scoped permissions and notifications apply to each member, and users may belong to multiple groups (effective permissions are the union)."msgstr "Die Benutzer in dieser Gruppe; Berechtigungen und Benachrichtigungen mit Gruppengültigkeitsbereich gelten für jedes Mitglied, und Benutzer können mehreren Gruppen angehören (effektive Berechtigungen sind die Vereinigung)."@@ -24352,6 +24753,11 @@ msgstr "Sie sind nicht in Ihrem Kontenplan enthalten, aber Dokumente oder Buchunmsgid "this ability"msgstr "diese Qualifikation"+msgid "This account has stopped working. Reconnect it — workflow steps using it will fail until you do."+msgstr "Dieses Konto funktioniert nicht mehr. Verbinden Sie es erneut – Workflow-Schritte, die es verwenden, schlagen fehl, bis Sie dies tun."++msgid "This account needs to be reconnected."+msgstr "Dieses Konto muss erneut verbunden werden."msgid "This action cannot run on this list."msgstr ""@@ -24384,6 +24790,9 @@ msgstr "Dies kann später nicht mehr geändert werden — {integrationName} erlamsgid "This cannot be undone."msgstr "Dies kann nicht rückgängig gemacht werden."+msgid "This Carbon instance is missing its OAuth credentials for this integration. Ask an administrator to set them."+msgstr "Dieser Carbon-Instance fehlen die OAuth-Anmeldedaten für diese Integration. Bitten Sie einen Administrator, diese festzulegen."+msgid "This Carbon instance is missing its Onshape OAuth credentials. Ask an administrator to set them."msgstr "Dieser Carbon-Instanz fehlen die Onshape-OAuth-Anmeldedaten. Bitten Sie einen Administrator, sie einzurichten."@@ -24442,15 +24851,21 @@ msgstr "Diese Information ist für alle Benutzer sichtbar. Seien Sie daher vorsimsgid "this inspection plan"msgstr "dieser Prüfplan"+msgid "This integration can't be connected on this Carbon instance."+msgstr "Diese Integration kann auf dieser Carbon-Instanz nicht verbunden werden."+msgid "This integration isn't available yet"msgstr "Diese Integration ist noch nicht verfügbar"+msgid "This integration isn't configured"+msgstr "Diese Integration ist nicht konfiguriert"+#. placeholder {0}: company?.name ?? "Carbon"msgid "This invitation to join {0} has expired. You can request a new invite to be sent to your email."msgstr "Diese Einladung zum Beitritt zu {0} ist abgelaufen. Sie können eine neue Einladung anfordern, die an Ihre E-Mail gesendet wird."msgid "This invoice has no usable due date — choose one for Stripe."-msgstr "Diese Rechnung hat kein verwendbares Fälligkeitsdatum – wählen Sie eines für Stripe aus."+msgstr "Diese Rechnung hat kein verwendbares Fälligkeitsdatum — wählen Sie eines für Stripe."msgid "This invoice will be billed to the Stripe customer already linked to this Carbon customer. To change its details, edit it in the Stripe dashboard."msgstr "Diese Rechnung wird dem Stripe-Kunden in Rechnung gestellt, der bereits mit diesem Carbon-Kunden verknüpft ist. Um die Details zu ändern, bearbeiten Sie sie im Stripe-Dashboard."@@ -24627,6 +25042,9 @@ msgstr "Diese Arbeitsstation läuft befähigungsgesteuerte Arbeit – sie läuftmsgid "This station runs work with no ability requirement; operators assigned on the manning board shape available labor."msgstr "Diese Station führt Arbeiten ohne Qualifikationsanforderung durch; Werker, die auf der Besetzungstafel zugewiesen sind, bestimmen das verfügbare Personal."+msgid "This step expected a list."+msgstr "Dieser Schritt hat eine Liste erwartet."+msgid "This step is part of it"msgstr "Dieser Schritt ist Teil davon"@@ -24817,6 +25235,9 @@ msgstr "knapp"msgid "Tightened"msgstr "Verschärft"+msgid "Time"+msgstr "Uhrzeit"+msgid "Time and dollar utilization of the rental fleet by asset and class"msgstr "Zeit- und Kostenauslastung der Leihflotte nach Anlage und Klasse"@@ -24862,6 +25283,9 @@ msgstr "Zu sich hin kippen"msgid "Title"msgstr "Titel"+msgid "Title of the event"+msgstr "Titel des Ereignisses"+msgid "Title passes to the customer when the term ends."msgstr "Das Eigentum geht auf den Kunden über, wenn die Vertragslaufzeit endet."@@ -24967,6 +25391,14 @@ msgstr "Toleranz (Tage)"msgid "Tomorrow"msgstr "Morgen"+msgid "Took {took} values; kept the first {kept}."+msgstr "{took} Werte übernommen; die ersten {kept} behalten."++msgid "Took the first of {total}."+msgstr "Das erste von {total} übernommen."++msgid "Took the last of {total}."+msgstr "Das letzte von {total} übernommen."msgid "Too many exports and bulk actions are running right now. Try again in a few minutes."msgstr "Gerade laufen zu viele Exporte und Massenaktionen. Versuchen Sie es in ein paar Minuten erneut."@@ -25298,6 +25730,9 @@ msgstr "Auslöser"msgid "Try a different name."msgstr "Versuchen Sie einen anderen Namen."+msgid "Try again"+msgstr "Versuchen Sie es erneut"+msgid "Tuesday"msgstr "Dienstag"@@ -25368,6 +25803,9 @@ msgstr "Geben Sie <0>\"{confirmPhrase}\"</0> ein, um fortzufahren."msgid "Type a message..."msgstr "Geben Sie eine Nachricht ein..."+msgid "Type a value and press Enter…"+msgstr "Geben Sie einen Wert ein und drücken Sie die Eingabetaste…"+msgid "Type an email and press Enter to add an external recipient"msgstr "Geben Sie eine E-Mail ein und drücken Sie die Eingabetaste, um einen externen Empfänger hinzuzufügen"@@ -25449,6 +25887,9 @@ msgstr "Noch ausstehende Zahlungen ohne Diskontierung, nach Geschäftsjahr, abzmsgid "Undo"msgstr "Rückgängig machen"+msgid "Unfurl Links"+msgstr "Links erweitern"+msgid "Ungroup"msgstr "Gruppierung aufheben"@@ -25598,7 +26039,7 @@ msgid "Unposted Documents"msgstr "Unveröffentlichte Dokumente"msgid "Unpublish"-msgstr "Veröffentlichung aufheben"+msgstr "Veröffentlichung rückgängig machen"msgid "Unpublish {name}?"msgstr "Veröffentlichung von {name} aufheben?"@@ -25969,6 +26410,9 @@ msgstr "Benutzerberechtigungen"msgid "User roles"msgstr "Benutzerrollen"+msgid "Username"+msgstr "Benutzername"+msgid "users"msgstr "Benutzer"@@ -26753,6 +27197,9 @@ msgstr "Wenn aktiviert, gilt diese Preisübersteuerung für entsprechende Auftrmsgid "When on, this rule fires for every target of its type. Assignment rows are ignored but preserved."msgstr "Wenn aktiviert, wird diese Regel für jedes Ziel ihres Typs ausgelöst. Zuordnungszeilen werden ignoriert, aber beibehalten."+msgid "When replying to a thread, also make the message visible to everyone in the channel (only applicable when Thread Timestamp is provided)"+msgstr "Wenn Sie auf einen Nachrichtenstrang antworten, machen Sie die Nachricht auch für alle im Kanal sichtbar (nur applicable, wenn Nachrichtenstrang-Zeitstempel bereitgestellt wird)"+msgid "When supplier responses are expected back; suppliers see this date on the RFQ portal and Carbon stops accepting late responses after it (configurable)."msgstr "Wann Lieferantenreaktionen erwartet werden; Lieferanten sehen dieses Datum auf dem RFQ-Portal und Carbon akzeptiert keine späten Antworten danach (konfigurierbar)."@@ -26924,6 +27371,9 @@ msgstr "Ob diese Arbeit die Produktion blockiert (Ausfall), sie beeinträchtigtmsgid "Whether to Add the selected permissions on top of what each user already has, or Update by replacing each user's permission set wholesale with the selection below."msgstr "Ob die ausgewählten Berechtigungen zu den bestehenden Berechtigungen jedes Benutzers hinzufügen oder die Berechtigungssätze aller Benutzer durch die folgende Auswahl ersetzen."+msgid "Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves."+msgstr "Ob wiederkehrende Ereignisse in Einzeltermine aufgelöst werden, sodass nur einmalige Ereignisse und Termine wiederkehrender Ereignisse zurückgegeben werden, nicht aber die zugrunde liegenden wiederkehrenden Ereignisse selbst."+msgid "Which document drives each inspection flow for this item."msgstr "Welches Dokument steuert den Prüfungsablauf für diesen Artikel?"@@ -27227,6 +27677,9 @@ msgstr "Du gehörst mehr als einem Unternehmen an. Wähle aus, wo du arbeiten mmsgid "You can change the UI style any time through the theme setting"msgstr "Sie können den UI-Stil jederzeit über die Design-Einstellung ändern"+msgid "You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.'"+msgstr "Sie können die Kanal-ID abrufen, indem Sie mit der rechten Maustaste auf den Kanal klicken und „Kanaldetails anzeigen\" wählen."+msgid "You can only see this key once. Store it safely."msgstr "Du kannst diesen Schlüssel nur einmal sehen. Speichere ihn sicher."@@ -27278,6 +27731,9 @@ msgstr "Du führst"msgid "You name a project owner with decision authority"msgstr "Sie benennen einen Projektverantwortlichen mit Entscheidungsbefugnis"+msgid "You need permission to edit workflows to load these choices."+msgstr "Sie benötigen die Berechtigung zum Bearbeiten von Workflows, um diese Auswahl zu laden."+msgid "You received this item"msgstr "Sie haben diesen Artikel erhalten"diff --git a/packages/locale/locales/de/mes.po b/packages/locale/locales/de/mes.poindex 23625db3c0..efaf177e4b 100644--- a/packages/locale/locales/de/mes.po+++ b/packages/locale/locales/de/mes.po@@ -113,6 +113,9 @@ msgstr "Eine vorherige Fertigstellung wurde nicht abgeschlossen. Ein erneuter Vemsgid "About"msgstr "Über"+msgid "About this field"+msgstr "Über dieses Feld"+msgid "Accept"msgstr "Annehmen"@@ -1234,6 +1237,9 @@ msgstr "Keine Instandhaltung für heute geplant"msgid "No matches. Type to create one."msgstr "Keine Übereinstimmungen. Geben Sie etwas ein, um einen zu erstellen."+msgid "No matching time"+msgstr "Keine passende Uhrzeit"+msgid "No materials"msgstr "Keine Materialien"@@ -2144,6 +2150,9 @@ msgstr "Vorschaubild"msgid "Tick the jobs this was done for."msgstr "Markieren Sie die Fertigungsaufträge, für die dies erledigt wurde."+msgid "Time"+msgstr "Uhrzeit"+msgid "Time and cost split across jobs proportionally to quantity."msgstr "Zeit und Kosten werden proportional zur Menge auf die Fertigungsaufträge verteilt."diff --git a/packages/locale/locales/en/erp.po b/packages/locale/locales/en/erp.poindex eb92408860..998fc49cde 100644--- a/packages/locale/locales/en/erp.po+++ b/packages/locale/locales/en/erp.po@@ -269,6 +269,10 @@ msgstr "{0} invoices were billed in your previous system and are not drafted agamsgid "{0} is {1}, not Draft or Planned"msgstr "{0} is {1}, not Draft or Planned"+#. placeholder {0}: integration.name+msgid "{0} isn't installed yet. There's nothing to configure — install it to connect an account."+msgstr "{0} isn't installed yet. There's nothing to configure — install it to connect an account."+#. placeholder {0}: data.quantitymsgid "{0} items marked as picked"msgstr "{0} items marked as picked"@@ -481,6 +485,12 @@ msgstr "{alreadyPlannedItemCount} parts skipped — they already have open jobs"msgid "{apOverduePct}% of payables"msgstr "{apOverduePct}% of payables"+msgid "{appName} is connected, but needs to be reconnected before workflow steps can use it."+msgstr "{appName} is connected, but needs to be reconnected before workflow steps can use it."++msgid "{appName} isn't connected yet. Connect an account before this step can do anything."+msgstr "{appName} isn't connected yet. Connect an account before this step can do anything."+msgid "{arOverduePct}% of receivables"msgstr "{arOverduePct}% of receivables"@@ -594,6 +604,9 @@ msgstr "{inserted} inserted, {updated} updated, {0} need fixing, {1} skipped."msgid "{jobsMissingStorageUnit, plural, one {# open job has materials with no storage unit} other {# open jobs have materials with no storage unit}}"msgstr "{jobsMissingStorageUnit, plural, one {# open job has materials with no storage unit} other {# open jobs have materials with no storage unit}}"+msgid "{kept, plural, one {Took # value.} other {Took # values.}}"+msgstr "{kept, plural, one {Took # value.} other {Took # values.}}"+msgid "{label} is used by documents, journals or default accounts, so it cannot be deleted."msgstr "{label} is used by documents, journals or default accounts, so it cannot be deleted."@@ -746,6 +759,9 @@ msgstr "{state} · synced {syncedAgo}"msgid "{termMonths, plural, one {# month} other {# months}}"msgstr "{termMonths, plural, one {# month} other {# months}}"+msgid "{total, plural, one {Joined # value.} other {Joined # values.}}"+msgstr "{total, plural, one {Joined # value.} other {Joined # values.}}"+msgid "{total} phases to get your company live on Carbon. Each one ends at a checkpoint."msgstr "{total} phases to get your company live on Carbon. Each one ends at a checkpoint."@@ -1651,6 +1667,9 @@ msgstr "A user records the expiry date on each batch or serial when the goods armsgid "A variable charge — mileage overage, damage, delivery, cleaning — is billed on the agreement's next invoice."msgstr "A variable charge — mileage overage, damage, delivery, cleaning — is billed on the agreement's next invoice."+msgid "A workspace can be connected to one Carbon company only. Disconnect it there first, or connect a different workspace."+msgstr "A workspace can be connected to one Carbon company only. Disconnect it there first, or connect a different workspace."+msgid "ABA"msgstr "ABA"@@ -1672,6 +1691,9 @@ msgstr "About"msgid "About (notification)"msgstr "About (notification)"+msgid "About this field"+msgstr "About this field"+msgid "Absent"msgstr "Absent"@@ -1838,6 +1860,9 @@ msgstr "Accounts receivable billing address updated"msgid "Accounts receivable for amounts owed by customers"msgstr "Accounts receivable for amounts owed by customers"+msgid "Accounts your workflows can act as. Add one for each account a workflow step should use."+msgstr "Accounts your workflows can act as. Add one for each account a workflow step should use."+msgid "Accrual"msgstr "Accrual"@@ -2055,6 +2080,9 @@ msgstr "Add a step or question"msgid "Add Ability"msgstr "Add Ability"+msgid "Add account"+msgstr "Add account"+msgid "Add Account"msgstr "Add Account"@@ -2196,6 +2224,10 @@ msgstr "Add Month"msgid "Add Note"msgstr "Add Note"+msgctxt "workflow data step"+msgid "Add operation"+msgstr "Add operation"+msgid "Add Operation"msgstr "Add Operation"@@ -2434,6 +2466,9 @@ msgstr "Advance to {nextStatus}"msgid "Advanced"msgstr "Advanced"+msgid "Advanced properties"+msgstr "Advanced properties"+msgid "Affected item not found."msgstr "Affected item not found."@@ -2657,6 +2692,12 @@ msgstr "Amounts show only the digits that carry value."msgid "An ability is a process's qualification. Only processes without one are listed."msgstr "An ability is a process's qualification. Only processes without one are listed."+msgid "An account is already called that — pick a different name."+msgstr "An account is already called that — pick a different name."++msgid "An account is missing from this list until it is reconnected."+msgstr "An account is missing from this list until it is reconnected."+msgid "An accounting bucket that groups expenses by department or function so the GL can report spend by group, not just by account."msgstr "An accounting bucket that groups expenses by department or function so the GL can report spend by group, not just by account."@@ -2822,6 +2863,9 @@ msgstr "An unexpected error occurred while connecting to Onshape. Save the integmsgid "An unexpected error occurred while connecting to Onshape. Try connecting again."msgstr "An unexpected error occurred while connecting to Onshape. Try connecting again."+msgid "An unexpected error occurred while connecting. Try connecting again."+msgstr "An unexpected error occurred while connecting. Try connecting again."+msgid "Analytics"msgstr "Analytics"@@ -2839,9 +2883,6 @@ msgstr "And {0} more — resolve these to see the rest."msgid "And {0} more. Resolve these to see the rest."msgstr "And {0} more. Resolve these to see the rest."-msgid "and {hidden} more"-msgstr "and {hidden} more"-msgid "and {remaining} more"msgstr "and {remaining} more"@@ -2878,6 +2919,9 @@ msgstr "Annual rate the rent is discounted at"msgid "Annual. Starts from the company's incremental borrowing rate"msgstr "Annual. Starts from the company's incremental borrowing rate"+msgid "Another connection to this integration already has that name. Choose a different one."+msgstr "Another connection to this integration already has that name. Choose a different one."+msgid "Another cost center this one rolls up into, letting you nest a sub-department under its parent for hierarchical cost reporting."msgstr "Another cost center this one rolls up into, letting you nest a sub-department under its parent for hierarchical cost reporting."@@ -2950,6 +2994,9 @@ msgstr "API keys for programmatic access to your Carbon data."msgid "API, webhooks, and integrations"msgstr "API, webhooks, and integrations"+msgid "App"+msgstr "App"+msgid "Appearance"msgstr "Appearance"@@ -3882,6 +3929,9 @@ msgstr "Attachments could not be loaded"msgid "Attempts"msgstr "Attempts"+msgid "Attendees"+msgstr "Attendees"+msgid "Attribute"msgstr "Attribute"@@ -3924,6 +3974,9 @@ msgstr "Authenticator app"msgid "Authenticator QR code"msgstr "Authenticator QR code"+msgid "Authorization was refused. Try connecting again."+msgstr "Authorization was refused. Try connecting again."+msgid "Authorized overtime on top of the shift"msgstr "Authorized overtime on top of the shift"@@ -3984,6 +4037,9 @@ msgstr "Automatic updates and backups"msgid "Automatic, prorated consumption of a job's untracked materials when output is reported — tracked materials are issued manually."msgstr "Automatic, prorated consumption of a job's untracked materials when output is reported — tracked materials are issued manually."+msgid "Automatically create a Google Meet video conference link for this event"+msgstr "Automatically create a Google Meet video conference link for this event"+msgid "Automatically release the job when the kanban is scanned"msgstr "Automatically release the job when the kanban is scanned"@@ -4193,6 +4249,9 @@ msgstr "Batches to return"msgid "Batching"msgstr "Batching"+msgid "BCC Email"+msgstr "BCC Email"+msgid "Becomes"msgstr "Becomes"@@ -4370,6 +4429,12 @@ msgstr "Board"msgid "Body"msgstr "Body"+msgid "Body for the email you want to send"+msgstr "Body for the email you want to send"++msgid "Body Type"+msgstr "Body Type"+msgid "BoM"msgstr "BoM"@@ -4427,6 +4492,9 @@ msgstr "Breadcrumb"msgid "Bring in your parts, BOMs, Bill of Process, and costing — with Carbon's import tools, CSV, or LLM help."msgstr "Bring in your parts, BOMs, Bill of Process, and costing — with Carbon's import tools, CSV, or LLM help."+msgid "Broadcast reply to channel"+msgstr "Broadcast reply to channel"+msgid "Browse library"msgstr "Browse library"@@ -4513,6 +4581,9 @@ msgstr "By <0>{0}</0>, <1>{1}</1>"msgid "By accepting the invite, you agree to the <0>Terms of Service</0> and <1>Privacy Policy</1>."msgstr "By accepting the invite, you agree to the <0>Terms of Service</0> and <1>Privacy Policy</1>."+msgid "By default it'll be 30 min post start time"+msgstr "By default it'll be 30 min post start time"+msgid "By dimension"msgstr "By dimension"@@ -4881,6 +4952,9 @@ msgstr "Causing run: "msgid "CC"msgstr "CC"+msgid "CC Email"+msgstr "CC Email"+msgid "Centralized Billing Address"msgstr "Centralized Billing Address"@@ -4998,6 +5072,12 @@ msgstr "Changing this will update the part ID"msgid "Changing type resets this item's draft edits."msgstr "Changing type resets this item's draft edits."+msgid "Channel"+msgstr "Channel"++msgid "Channel Name"+msgstr "Channel Name"+msgid "Characteristic"msgstr "Characteristic"@@ -5078,6 +5158,9 @@ msgstr "Checkpoint ·"msgid "Checkpoints"msgstr "Checkpoints"+msgid "Choose {named} first."+msgstr "Choose {named} first."+msgid "Choose a backup"msgstr "Choose a backup"@@ -5333,6 +5416,9 @@ msgstr "Collapse Setup"msgid "Collapse subtree"msgstr "Collapse subtree"+msgid "Color"+msgstr "Color"+#. placeholder {0}: index + 1msgid "Column {0} of {count}"msgstr "Column {0} of {count}"@@ -5594,6 +5680,9 @@ msgstr "Configure the default accounts used for various transaction types acrossmsgid "Configure the start months for your fiscal and tax years"msgstr "Configure the start months for your fiscal and tax years"+msgid "Configure the steps above first."+msgstr "Configure the steps above first."+msgid "Configure when purchased item costs should be updated from supplier transactions."msgstr "Configure when purchased item costs should be updated from supplier transactions."@@ -5690,6 +5779,9 @@ msgstr "Conflict reason"msgid "Connect"msgstr "Connect"+msgid "Connect {appName}"+msgstr "Connect {appName}"+msgid "Connect Carbon to your accounting, project management, and CAD tools and much more."msgstr "Connect Carbon to your accounting, project management, and CAD tools and much more."@@ -5717,9 +5809,18 @@ msgstr "Connect the outside tools your company already runs on"msgid "Connect your identity provider by pasting either its metadata URL or its raw metadata XML — exactly one of the two."msgstr "Connect your identity provider by pasting either its metadata URL or its raw metadata XML — exactly one of the two."+msgid "Connected before workflows needed extra permissions. Reconnect to grant them — everything else keeps working meanwhile."+msgstr "Connected before workflows needed extra permissions. Reconnect to grant them — everything else keeps working meanwhile."+msgid "Connected to"msgstr "Connected to"+msgid "Connection"+msgstr "Connection"++msgid "Connection name"+msgstr "Connection name"+msgid "Console Mode"msgstr "Console Mode"@@ -6336,6 +6437,12 @@ msgstr "Could not release {0}: {1}"msgid "Could not save"msgstr "Could not save"+msgid "Couldn't check whether {appName} is connected."+msgstr "Couldn't check whether {appName} is connected."++msgid "Couldn't complete the connection"+msgstr "Couldn't complete the connection"+msgid "Couldn't complete the Onshape connection"msgstr "Couldn't complete the Onshape connection"@@ -6351,12 +6458,18 @@ msgstr "Couldn't load more rows"msgid "Couldn't load related documents. Refresh before creating a new one to avoid duplicates."msgstr "Couldn't load related documents. Refresh before creating a new one to avoid duplicates."+msgid "Couldn't load the choices for this field."+msgstr "Couldn't load the choices for this field."+msgid "Couldn't load the provider's dimension targets — check the connection and reload."msgstr "Couldn't load the provider's dimension targets — check the connection and reload."msgid "Couldn't reschedule the job. Please try again."msgstr "Couldn't reschedule the job. Please try again."+msgid "Couldn't save the connection"+msgstr "Couldn't save the connection"+msgid "Couldn't save the Onshape connection"msgstr "Couldn't save the Onshape connection"@@ -6366,6 +6479,12 @@ msgstr "Couldn't save the Onshape Government connection"msgid "Couldn't save the Ramp connection"msgstr "Couldn't save the Ramp connection"+msgid "Couldn't start the {name} connection"+msgstr "Couldn't start the {name} connection"++msgid "Couldn't start the authorization."+msgstr "Couldn't start the authorization."+msgid "Count"msgstr "Count"@@ -6375,6 +6494,12 @@ msgstr "Count History"msgid "Count ID"msgstr "Count ID"+msgid "Count items"+msgstr "Count items"++msgid "Counted {total}."+msgstr "Counted {total}."+msgid "Counted Qty"msgstr "Counted Qty"@@ -6479,6 +6604,9 @@ msgstr "Create Contract"msgid "Create Forecast"msgstr "Create Forecast"+msgid "Create Google Meet Link"+msgstr "Create Google Meet Link"+msgid "Create Issue"msgstr "Create Issue"@@ -7116,6 +7244,9 @@ msgstr "Date"msgid "Date Acquired"msgstr "Date Acquired"+msgid "Date and time"+msgstr "Date and time"+msgid "Date Calibrated"msgstr "Date Calibrated"@@ -7125,6 +7256,9 @@ msgstr "Date due"msgid "Date Due"msgstr "Date Due"+msgid "Date from"+msgstr "Date from"+msgid "Date issued"msgstr "Date issued"@@ -7137,6 +7271,9 @@ msgstr "Date paid"msgid "Date Paid"msgstr "Date Paid"+msgid "Date to"+msgstr "Date to"+msgid "Dates"msgstr "Dates"@@ -8006,6 +8143,9 @@ msgstr "Description of Change"msgid "Description of Issue"msgstr "Description of Issue"+msgid "Description of the event. You can use HTML tags here."+msgstr "Description of the event. You can use HTML tags here."+msgid "Detach"msgstr "Detach"@@ -8111,6 +8251,9 @@ msgstr "Discarded"msgid "Disconnect"msgstr "Disconnect"+msgid "Disconnected"+msgstr "Disconnected"+msgid "Discontinuation date"msgstr "Discontinuation date"@@ -9071,6 +9214,9 @@ msgstr "Email"msgid "Email Address"msgstr "Email Address"+msgid "Email address to set as the \"Reply-To\" header"+msgstr "Email address to set as the \"Reply-To\" header"+msgid "Email Domains"msgstr "Email Domains"@@ -9086,6 +9232,9 @@ msgstr "Emailed"msgid "Emails"msgstr "Emails"+msgid "Emails of the attendees (guests)"+msgstr "Emails of the attendees (guests)"+msgid "Emoji"msgstr "Emoji"@@ -9155,6 +9304,9 @@ msgstr "Enable digital quotes for your company. This will allow you to send digimsgid "Enable in Settings"msgstr "Enable in Settings"+msgid "Enable link unfurling for this message"+msgstr "Enable link unfurling for this message"+msgid "Enable notifications when a sales rule violation is blocked or acknowledged on a quote, sales order, or sales invoice."msgstr "Enable notifications when a sales rule violation is blocked or acknowledged on a quote, sales order, or sales invoice."@@ -9236,6 +9388,9 @@ msgstr "End"msgid "End Date"msgstr "End Date"+msgid "End date time of the event"+msgstr "End date time of the event"+msgid "End Line"msgstr "End Line"@@ -9568,6 +9723,9 @@ msgstr "Event stopped"msgid "Event Type"msgstr "Event Type"+msgid "Event types"+msgstr "Event types"+msgid "Events"msgstr "Events"@@ -9746,6 +9904,9 @@ msgstr "Expand line"msgid "Expand Machine"msgstr "Expand Machine"+msgid "Expand Recurring Event?"+msgstr "Expand Recurring Event?"+msgid "Expand row"msgstr "Expand row"@@ -10584,6 +10745,9 @@ msgstr "Fix these in the files, then upload them again"msgid "Fix these jobs before releasing"msgstr "Fix these jobs before releasing"+msgid "Fix this"+msgstr "Fix this"+msgid "Fixed"msgstr "Fixed"@@ -11052,6 +11216,12 @@ msgstr "GL tie-out"msgid "GL Tie-Out"msgstr "GL Tie-Out"+msgid "Gmail"+msgstr "Gmail"++msgid "Gmail: Send Email"+msgstr "Gmail: Send Email"+msgid "Go live right the first time — with our team alongside you"msgstr "Go live right the first time — with our team alongside you"@@ -11107,6 +11277,15 @@ msgstr "Good evening, {name}."msgid "Good morning, {name}."msgstr "Good morning, {name}."+msgid "Google Calendar"+msgstr "Google Calendar"++msgid "Google Calendar: Create Event"+msgstr "Google Calendar: Create Event"++msgid "Google Calendar: Get all Events"+msgstr "Google Calendar: Get all Events"+msgid "Google Places API key not configured"msgstr "Google Places API key not configured"@@ -11167,6 +11346,15 @@ msgstr "Guaranteed Residual"msgid "Guaranteed Residual Value"msgstr "Guaranteed Residual Value"+msgid "Guests can invite others"+msgstr "Guests can invite others"++msgid "Guests can modify"+msgstr "Guests can modify"++msgid "Guests can see other guests"+msgstr "Guests can see other guests"+msgid "Guided"msgstr "Guided"@@ -11518,6 +11706,9 @@ msgstr "IBAN"msgid "IC Transaction"msgstr "IC Transaction"+msgid "Icon Emoji"+msgstr "Icon Emoji"+msgid "Id"msgstr "Id"@@ -12282,6 +12473,9 @@ msgstr "is on or after"msgid "is on or before"msgstr "is on or before"+msgid "Is Private?"+msgstr "Is Private?"+msgid "Is supplier org group"msgstr "Is supplier org group"@@ -12354,6 +12548,9 @@ msgstr "It could not start. Try again."msgid "It is coming soon. Contact Carbon to have it set up for your company."msgstr "It is coming soon. Contact Carbon to have it set up for your company."+msgid "It was removed after this page loaded. Reload the page and try again."+msgstr "It was removed after this page loaded. Reload the page and try again."+msgid "It will stop running until you publish a version again. Nothing is deleted."msgstr "It will stop running until you publish a version again. Nothing is deleted."@@ -12550,6 +12747,9 @@ msgstr "Jobs that have this item on their bill of materials"msgid "Join {0}"msgstr "Join {0}"+msgid "Join into text"+msgstr "Join into text"+msgid "Journal"msgstr "Journal"@@ -12616,6 +12816,9 @@ msgstr "Keep existing pricing, only add new items"msgid "Keep Line"msgstr "Keep Line"+msgid "Keep matching items"+msgstr "Keep matching items"+msgid "Keep navigation open"msgstr "Keep navigation open"@@ -12634,6 +12837,12 @@ msgstr "Keep picking"msgid "Keeps orders, quotes, and settings behind a second check"msgstr "Keeps orders, quotes, and settings behind a second check"+msgid "Kept {kept} of {total}; {unresolved} could not be checked."+msgstr "Kept {kept} of {total}; {unresolved} could not be checked."++msgid "Kept {kept} of {total}."+msgstr "Kept {kept} of {total}."+msgid "Key"msgstr "Key"@@ -14875,6 +15084,9 @@ msgstr "No Access"msgid "No accounts are mapped yet"msgstr "No accounts are mapped yet"+msgid "No accounts connected yet."+msgstr "No accounts connected yet."+msgid "No accounts match your search"msgstr "No accounts match your search"@@ -14930,6 +15142,9 @@ msgstr "No assets yet. Add each asset the lease covers, with what it pays for itmsgid "No attachments."msgstr "No attachments."+msgid "No authorization code was returned"+msgstr "No authorization code was returned"+msgid "No available filters"msgstr "No available filters"@@ -15130,6 +15345,9 @@ msgstr "No failure path — the run stops here and is marked failed"msgid "No fair value entered, counts as not met"msgstr "No fair value entered, counts as not met"+msgid "No field was chosen to take."+msgstr "No field was chosen to take."+msgid "No fields found."msgstr "No fields found."@@ -15250,6 +15468,9 @@ msgstr "No matching bins"msgid "No matching operations"msgstr "No matching operations"+msgid "No matching time"+msgstr "No matching time"+msgid "No materials"msgstr "No materials"@@ -15765,6 +15986,9 @@ msgstr "Nothing"msgid "Nothing at this location matches \"{0}\"."msgstr "Nothing at this location matches \"{0}\"."+msgid "Nothing can work on this result."+msgstr "Nothing can work on this result."+msgid "Nothing completed in MES yet"msgstr "Nothing completed in MES yet"@@ -15798,6 +16022,9 @@ msgstr "Nothing scheduled — add a station below."msgid "Nothing selected yet"msgstr "Nothing selected yet"+msgid "Nothing to choose yet - <0>set one up in Settings</0>."+msgstr "Nothing to choose yet - <0>set one up in Settings</0>."+msgid "Nothing to post for this period."msgstr "Nothing to post for this period."@@ -16008,6 +16235,9 @@ msgstr "One {0} is equal to how many {1}?"msgid "One firing of a workflow, recorded step by step with the values each step used and produced, acting throughout with the permissions of the workflow's owner."msgstr "One firing of a workflow, recorded step by step with the values each step used and produced, acting throughout with the permissions of the workflow's owner."+msgid "One of your {appName} accounts needs to be reconnected before workflow steps can use it."+msgstr "One of your {appName} accounts needs to be reconnected before workflow steps can use it."+msgid "One or more quantities cannot meet this date"msgstr "One or more quantities cannot meet this date"@@ -16131,6 +16361,9 @@ msgstr "Open"msgid "Open ({paymentCurrency})"msgstr "Open ({paymentCurrency})"+msgid "Open {appName} accounts"+msgstr "Open {appName} accounts"+msgid "Open a change notice"msgstr "Open a change notice"@@ -16320,6 +16553,10 @@ msgstr "operation"msgid "Operation"msgstr "Operation"+msgctxt "workflow data step"+msgid "Operation"+msgstr "Operation"+msgid "Operation batch"msgstr "Operation batch"@@ -17129,6 +17366,9 @@ msgstr "Pick a customer, a customer type, or All Customers to view their pricingmsgid "Pick a date or leave blank to clear it."msgstr "Pick a date or leave blank to clear it."+msgid "Pick a field…"+msgstr "Pick a field…"+msgid "Pick a list variable…"msgstr "Pick a list variable…"@@ -17818,6 +18058,9 @@ msgstr "Production: shop-floor app and scheduling"msgid "Profile"msgstr "Profile"+msgid "Profile Picture"+msgstr "Profile Picture"+msgid "Profit Percent"msgstr "Profit Percent"@@ -17928,6 +18171,9 @@ msgstr "Prove ownership of each email domain with a DNS TXT record before it canmsgid "Provide process knowledge and inputs"msgstr "Provide process knowledge and inputs"+msgid "Provide the ts (timestamp) or link value of the **parent** message to make this message a reply. Do not use the ts value of the reply itself; use its parent instead. For example '1710304378.475129'.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the 'Copy link' option."+msgstr "Provide the ts (timestamp) or link value of the **parent** message to make this message a reply. Do not use the ts value of the reply itself; use its parent instead. For example '1710304378.475129'.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the 'Copy link' option."+msgid "Provide these URLs to your identity provider (Okta, Entra ID, Google Workspace, etc.) when registering Carbon as a SAML application."msgstr "Provide these URLs to your identity provider (Okta, Entra ID, Google Workspace, etc.) when registering Carbon as a SAML application."@@ -18731,6 +18977,9 @@ msgstr "Received quantities start at zero"msgid "Received quantity not yet credited. The credit memo is created as a draft."msgstr "Received quantity not yet credited. The credit memo is created as a draft."+msgid "Receiver Email (To)"+msgstr "Receiver Email (To)"+msgid "Receives the invoice email"msgstr "Receives the invoice email"@@ -18788,6 +19037,21 @@ msgstr "Reconciling a purchase order against what was received and invoiced —msgid "Reconfigure"msgstr "Reconfigure"+msgid "Reconnect"+msgstr "Reconnect"++msgid "Reconnect {appName}"+msgstr "Reconnect {appName}"++msgid "Reconnect it"+msgstr "Reconnect it"++msgid "Reconnect needed"+msgstr "Reconnect needed"++msgid "Reconnect with the account this connection already uses, or use Add account to connect the other one."+msgstr "Reconnect with the account this connection already uses, or use Add account to connect the other one."+msgid "Record"msgstr "Record"@@ -18833,9 +19097,16 @@ msgstr "Records"msgid "Records and posted journals are being sent to and received from this provider."msgstr "Records and posted journals are being sent to and received from this provider."+msgid "Records here appear as plain text — {appLabel} doesn't support links in this field."+msgstr "Records here appear as plain text — {appLabel} doesn't support links in this field."+msgid "Records moved"msgstr "Records moved"+#. placeholder {0}: notice.params.equals+msgid "Records will be plain text. Set {siblingLabel} to {0} (under Advanced) to turn them into links."+msgstr "Records will be plain text. Set {siblingLabel} to {0} (under Advanced) to turn them into links."+msgid "Recost"msgstr "Recost"@@ -19182,6 +19453,10 @@ msgstr "Remove the received serial and batch numbers from stock"msgid "Remove this item"msgstr "Remove this item"+msgctxt "workflow data step"+msgid "Remove this operation"+msgstr "Remove this operation"+msgid "Remove this storage type from all referencing storage units and delete it. This cannot be undone."msgstr "Remove this storage type from all referencing storage units and delete it. This cannot be undone."@@ -19216,6 +19491,9 @@ msgstr "Rename"msgid "Rename Workflow"msgstr "Rename Workflow"+msgid "Renamed"+msgstr "Renamed"+msgid "Rendering label preview..."msgstr "Rendering label preview..."@@ -19381,6 +19659,12 @@ msgstr "Replenishment System"msgid "Replies to emailed invoices go here, and it's copied on each one."msgstr "Replies to emailed invoices go here, and it's copied on each one."+msgid "Reply to Thread (Thread Message Link/Timestamp)"+msgstr "Reply to Thread (Thread Message Link/Timestamp)"++msgid "Reply-To Email"+msgstr "Reply-To Email"+msgid "Report"msgstr "Report"@@ -19925,6 +20209,9 @@ msgstr "Revoke Invite"msgid "Revoke Invites"msgstr "Revoke Invites"+msgid "Revoked"+msgstr "Revoked"+msgid "Rework"msgstr "Rework"@@ -20699,6 +20986,9 @@ msgstr "Search supplier parts"msgid "Search suppliers..."msgstr "Search suppliers..."+msgid "Search Term"+msgstr "Search Term"+msgid "Search tools..."msgstr "Search tools..."@@ -20800,6 +21090,9 @@ msgstr "Select a shape first to see available options"msgid "Select a step to hide parts on it."msgstr "Select a step to hide parts on it."+msgid "Select a step…"+msgstr "Select a step…"+msgid "Select a substance and shape first to see available options"msgstr "Select a substance and shape first to see available options"@@ -20818,6 +21111,9 @@ msgstr "Select all"msgid "Select an action…"msgstr "Select an action…"+msgid "Select an app…"+msgstr "Select an app…"+msgid "Select an assignee"msgstr "Select an assignee"@@ -20842,6 +21138,9 @@ msgstr "Select an operation…"msgid "Select an option"msgstr "Select an option"+msgid "Select an option…"+msgstr "Select an option…"+msgid "Select at least one item to accept the quote"msgstr "Select at least one item to accept the quote"@@ -20875,6 +21174,9 @@ msgstr "Select Employee"msgid "Select Employee Type"msgstr "Select Employee Type"+msgid "Select event types"+msgstr "Select event types"+msgid "Select field"msgstr "Select field"@@ -21026,6 +21328,9 @@ msgstr "Send Invite"msgid "Send Invites"msgstr "Send Invites"+msgid "Send Notifications"+msgstr "Send Notifications"+msgid "Send RFQ to Suppliers"msgstr "Send RFQ to Suppliers"@@ -21035,6 +21340,12 @@ msgstr "Send to Carbon"msgid "Send Via"msgstr "Send Via"+msgid "Sender Email"+msgstr "Sender Email"++msgid "Sender Name"+msgstr "Sender Name"+msgid "Sending defective units back to an earlier operation to be corrected instead of scrapping them."msgstr "Sending defective units back to an earlier operation to be corrected instead of scrapping them."@@ -21802,6 +22113,18 @@ msgstr "Skipped sync operation"msgid "Slack"msgstr "Slack"+msgid "Slack: Create Channel"+msgstr "Slack: Create Channel"++msgid "Slack: Find User by Email"+msgstr "Slack: Find User by Email"++msgid "Slack: Send Message To A Channel"+msgstr "Slack: Send Message To A Channel"++msgid "Slack: Send Message To A User"+msgstr "Slack: Send Message To A User"+msgid "Slice asset activity by location, item, or any dimension"msgstr "Slice asset activity by location, item, or any dimension"@@ -22041,6 +22364,9 @@ msgstr "Start date"msgid "Start Date"msgstr "Start Date"+msgid "Start date time of the event"+msgstr "Start date time of the event"+msgid "Start Expiration"msgstr "Start Expiration"@@ -22855,6 +23181,9 @@ msgstr "Tags"msgid "Tailor this hub for the customer. Changes apply live for everyone viewing it. Never shown to the customer here."msgstr "Tailor this hub for the customer. Changes apply live for everyone viewing it. Never shown to the customer here."+msgid "Take one field from every item"+msgstr "Take one field from every item"+msgid "Take out of service"msgstr "Take out of service"@@ -22868,6 +23197,12 @@ msgstr "Take Ownership"msgid "Take Ownership: {0}"msgstr "Take Ownership: {0}"+msgid "Take the first item"+msgstr "Take the first item"++msgid "Take the last item"+msgstr "Take the last item"+msgid "Take the shortest remaining shelf life across the materials consumed to make this item. Use when the product's expiry depends on its ingredients."msgstr "Take the shortest remaining shelf life across the materials consumed to make this item. Use when the product's expiry depends on its ingredients."@@ -23115,11 +23450,8 @@ msgstr "Test label sent to printer"msgid "Test run"msgstr "Test run"-msgid "Test run — results are not saved to the Runs page"-msgstr "Test run — results are not saved to the Runs page"--msgid "Test runs are not saved. Close this panel and the result is gone."-msgstr "Test runs are not saved. Close this panel and the result is gone."+msgid "Test runs are saved to the run history, marked as tests."+msgstr "Test runs are saved to the run history, marked as tests."msgid "Test Value"msgstr "Test Value"@@ -23127,9 +23459,36 @@ msgstr "Test Value"msgid "Text size"msgstr "Text size"+msgid "That account is still being reconnected. Try again in a moment."+msgstr "That account is still being reconnected. Try again in a moment."++msgid "That account no longer exists"+msgstr "That account no longer exists"++msgid "That connection name is already used"+msgstr "That connection name is already used"++msgid "That field holds a list of its own. Turn on flattening to take it."+msgstr "That field holds a list of its own. Turn on flattening to take it."++msgid "That field holds several values, so they are combined into one list."+msgstr "That field holds several values, so they are combined into one list."++msgid "That integration is not available"+msgstr "That integration is not available"++msgid "That list was empty."+msgstr "That list was empty."+msgid "That name is already used by another step."msgstr "That name is already used by another step."+msgid "That workspace is connected to another company"+msgstr "That workspace is connected to another company"++msgid "That's a different account"+msgstr "That's a different account"+#. placeholder {0}: i18n._(step.title)msgid "The \"{0}\" phase checks itself off once all of its tasks in the project plan are done."msgstr "The \"{0}\" phase checks itself off once all of its tasks in the project plan are done."@@ -23143,6 +23502,9 @@ msgstr "The \"{0}\" phase is done — its \"{1}\" checkpoint has been passed."msgid "The {0} phases to go live, each ending at a checkpoint. Tick off each task as you complete it."msgstr "The {0} phases to go live, each ending at a checkpoint. Tick off each task as you complete it."+msgid "The {appName} account this step uses is not available — it was disconnected or needs to be reconnected."+msgstr "The {appName} account this step uses is not available — it was disconnected or needs to be reconnected."+msgid "The accent color used across Carbon."msgstr "The accent color used across Carbon."@@ -23158,6 +23520,9 @@ msgstr "The accounts Carbon posts to automatically"msgid "The action that copies a saved method (its materials, operations, and work instructions) onto a job or quote line."msgstr "The action that copies a saved method (its materials, operations, and work instructions) onto a job or quote line."+msgid "The address must be listed in your GMail account's settings"+msgstr "The address must be listed in your GMail account's settings"+msgid "The allowed values for a list-type attribute; users pick from these rather than free-typing."msgstr "The allowed values for a list-type attribute; users pick from these rather than free-typing."@@ -23179,6 +23544,9 @@ msgstr "The asset moves into its in-service class and starts depreciating from tmsgid "The asset would have a negative cost. Check the purchase price."msgstr "The asset would have a negative cost. Check the purchase price."+msgid "The authorization took too long or came back altered. Start the connection again from this page."+msgstr "The authorization took too long or came back altered. Start the connection again from this page."+msgid "The authorization was refused in Onshape. Save the integration settings to try again."msgstr "The authorization was refused in Onshape. Save the integration settings to try again."@@ -23188,6 +23556,9 @@ msgstr "The authorization was refused in Onshape. Try connecting again."msgid "The authorization was refused in Ramp. Try connecting again."msgstr "The authorization was refused in Ramp. Try connecting again."+msgid "The authorization was rejected"+msgstr "The authorization was rejected"+msgid "The average cost of the item. Changing it needs permission to edit parts."msgstr "The average cost of the item. Changing it needs permission to edit parts."@@ -23291,6 +23662,12 @@ msgstr "The company already has a posted opening balance journal."msgid "The company has no account defaults."msgstr "The company has no account defaults."+msgid "The connection could not be verified"+msgstr "The connection could not be verified"++msgid "The connection was refused"+msgstr "The connection was refused"+msgid "The contract cannot be cancelled then"msgstr "The contract cannot be cancelled then"@@ -23556,6 +23933,9 @@ msgstr "The https address a workflow's webhook step posts to — plain http, redmsgid "The human-readable document number (like J000001 or ECO-000001) minted from a sequence and stored on the record, distinct from its internal id."msgstr "The human-readable document number (like J000001 or ECO-000001) minted from a sequence and stored on the record, distinct from its internal id."+msgid "The icon emoji of the bot"+msgstr "The icon emoji of the bot"+msgid "The identifier the customer uses for this part on their POs; Carbon resolves it to our internal Part ID on order import."msgstr "The identifier the customer uses for this part on their POs; Carbon resolves it to our internal Part ID on order import."@@ -23577,6 +23957,9 @@ msgstr "The Incoterm rule (FOB, DAP, EXW, CIF, …) that governs who pays freighmsgid "The Incoterm rule (FOB, DAP, EXW, CIF, …) that governs who pays freight, who bears risk, and where the transfer of title occurs on shipments to this customer."msgstr "The Incoterm rule (FOB, DAP, EXW, CIF, …) that governs who pays freight, who bears risk, and where the transfer of title occurs on shipments to this customer."+msgid "The integration authorized the connection but saving it failed. Try connecting again."+msgstr "The integration authorized the connection but saving it failed. Try connecting again."+msgid "The inventory cost recognized when a shipment posts, valued by the item's costing method."msgstr "The inventory cost recognized when a shipment posts, valued by the item's costing method."@@ -23592,6 +23975,15 @@ msgstr "The item each job produces — require it to match to merge output lots"msgid "The item's rental rate"msgstr "The item's rental rate"+msgid "The items in that list have no field by that name."+msgstr "The items in that list have no field by that name."++msgid "The items in that list have no fields to take."+msgstr "The items in that list have no fields to take."++msgid "The items in that list have no reading as text."+msgstr "The items in that list have no reading as text."+msgid "the job hours due that day (a due-date basis, not the day the work runs), with overdue work in Past due."msgstr "the job hours due that day (a due-date basis, not the day the work runs), with overdue work in Past due."@@ -23885,6 +24277,9 @@ msgstr "The procedure technicians follow when this maintenance is performed; repmsgid "The processes this work center can run; appears in process-pickers when scheduling operations, and limits which jobs can route through this work center."msgstr "The processes this work center can run; appears in process-pickers when scheduling operations, and limits which jobs can route through this work center."+msgid "The profile picture of the bot"+msgstr "The profile picture of the bot"+msgid "The provider offers no dimension targets. Enable the feature in the provider first (e.g. tracking categories, class tracking, or fields)."msgstr "The provider offers no dimension targets. Enable the feature in the provider first (e.g. tracking categories, class tracking, or fields)."@@ -23986,12 +24381,12 @@ msgstr "The response from Onshape was missing required parameters. Try connectinmsgid "The response from Ramp was missing required parameters. Try connecting again."msgstr "The response from Ramp was missing required parameters. Try connecting again."+msgid "The response was missing required parameters. Try connecting again."+msgstr "The response was missing required parameters. Try connecting again."+msgid "The restore job reported this error."msgstr "The restore job reported this error."-msgid "The result will not appear on the Runs page."-msgstr "The result will not appear on the Runs page."-msgid "The revision number of the part"msgstr "The revision number of the part"@@ -24139,6 +24534,9 @@ msgstr "The system a company uses to manage its people's logins — Okta, Entramsgid "The system passes every in-scope acceptance test in your configured system, with your data; the data is validated; and you sign off. Then go-live."msgstr "The system passes every in-scope acceptance test in your configured system, with your data; the data is validated; and you sign off. Then go-live."+msgid "The text of your message. When using Block Kit blocks, this is used as a fallback for notifications."+msgstr "The text of your message. When using Block Kit blocks, this is used as a fallback for notifications."+msgid "The thread linking a sales RFQ, its quote, and the resulting sales order — a join, not a document with its own status."msgstr "The thread linking a sales RFQ, its quote, and the resulting sales order — a join, not a document with its own status."@@ -24220,6 +24618,9 @@ msgstr "The upload of <0>{name}</0> stopped at {stopped}%. Drop the same file agmsgid "The US tax depreciation system with IRS property-class tables, run as a separate tax schedule alongside the book schedule."msgstr "The US tax depreciation system with IRS property-class tables, run as a separate tax schedule alongside the book schedule."+msgid "The username of the bot"+msgstr "The username of the bot"+msgid "The users in this group; group-scoped permissions and notifications apply to each member, and users may belong to multiple groups (effective permissions are the union)."msgstr "The users in this group; group-scoped permissions and notifications apply to each member, and users may belong to multiple groups (effective permissions are the union)."@@ -24352,6 +24753,11 @@ msgstr "They are not in your chart, but documents or journals use them. Pick themsgid "this ability"msgstr "this ability"+msgid "This account has stopped working. Reconnect it — workflow steps using it will fail until you do."+msgstr "This account has stopped working. Reconnect it — workflow steps using it will fail until you do."++msgid "This account needs to be reconnected."+msgstr "This account needs to be reconnected."msgid "This action cannot run on this list."msgstr "This action cannot run on this list."@@ -24384,6 +24790,9 @@ msgstr "This cannot be changed later — {integrationName} allows only one connemsgid "This cannot be undone."msgstr "This cannot be undone."+msgid "This Carbon instance is missing its OAuth credentials for this integration. Ask an administrator to set them."+msgstr "This Carbon instance is missing its OAuth credentials for this integration. Ask an administrator to set them."+msgid "This Carbon instance is missing its Onshape OAuth credentials. Ask an administrator to set them."msgstr "This Carbon instance is missing its Onshape OAuth credentials. Ask an administrator to set them."@@ -24442,9 +24851,15 @@ msgstr "This information will be visible to all users, so be careful what you shmsgid "this inspection plan"msgstr "this inspection plan"+msgid "This integration can't be connected on this Carbon instance."+msgstr "This integration can't be connected on this Carbon instance."+msgid "This integration isn't available yet"msgstr "This integration isn't available yet"+msgid "This integration isn't configured"+msgstr "This integration isn't configured"+#. placeholder {0}: company?.name ?? "Carbon"msgid "This invitation to join {0} has expired. You can request a new invite to be sent to your email."msgstr "This invitation to join {0} has expired. You can request a new invite to be sent to your email."@@ -24627,6 +25042,9 @@ msgstr "This station runs ability-gated work — it only runs while a qualifiedmsgid "This station runs work with no ability requirement; operators assigned on the manning board shape available labor."msgstr "This station runs work with no ability requirement; operators assigned on the manning board shape available labor."+msgid "This step expected a list."+msgstr "This step expected a list."+msgid "This step is part of it"msgstr "This step is part of it"@@ -24817,6 +25235,9 @@ msgstr "tight"msgid "Tightened"msgstr "Tightened"+msgid "Time"+msgstr "Time"+msgid "Time and dollar utilization of the rental fleet by asset and class"msgstr "Time and dollar utilization of the rental fleet by asset and class"@@ -24862,6 +25283,9 @@ msgstr "Tip toward you"msgid "Title"msgstr "Title"+msgid "Title of the event"+msgstr "Title of the event"+msgid "Title passes to the customer when the term ends."msgstr "Title passes to the customer when the term ends."@@ -24967,6 +25391,14 @@ msgstr "Tolerance (days)"msgid "Tomorrow"msgstr "Tomorrow"+msgid "Took {took} values; kept the first {kept}."+msgstr "Took {took} values; kept the first {kept}."++msgid "Took the first of {total}."+msgstr "Took the first of {total}."++msgid "Took the last of {total}."+msgstr "Took the last of {total}."msgid "Too many exports and bulk actions are running right now. Try again in a few minutes."msgstr "Too many exports and bulk actions are running right now. Try again in a few minutes."@@ -25298,6 +25730,9 @@ msgstr "Triggers"msgid "Try a different name."msgstr "Try a different name."+msgid "Try again"+msgstr "Try again"+msgid "Tuesday"msgstr "Tuesday"@@ -25368,6 +25803,9 @@ msgstr "Type <0>\"{confirmPhrase}\"</0> to continue."msgid "Type a message..."msgstr "Type a message..."+msgid "Type a value and press Enter…"+msgstr "Type a value and press Enter…"+msgid "Type an email and press Enter to add an external recipient"msgstr "Type an email and press Enter to add an external recipient"@@ -25449,6 +25887,9 @@ msgstr "Undiscounted payments still to come, by fiscal year, less the interest tmsgid "Undo"msgstr "Undo"+msgid "Unfurl Links"+msgstr "Unfurl Links"+msgid "Ungroup"msgstr "Ungroup"@@ -25969,6 +26410,9 @@ msgstr "User Permissions"msgid "User roles"msgstr "User roles"+msgid "Username"+msgstr "Username"+msgid "users"msgstr "users"@@ -26753,6 +27197,9 @@ msgstr "When on, this price override applies to matching orders; turning off witmsgid "When on, this rule fires for every target of its type. Assignment rows are ignored but preserved."msgstr "When on, this rule fires for every target of its type. Assignment rows are ignored but preserved."+msgid "When replying to a thread, also make the message visible to everyone in the channel (only applicable when Thread Timestamp is provided)"+msgstr "When replying to a thread, also make the message visible to everyone in the channel (only applicable when Thread Timestamp is provided)"+msgid "When supplier responses are expected back; suppliers see this date on the RFQ portal and Carbon stops accepting late responses after it (configurable)."msgstr "When supplier responses are expected back; suppliers see this date on the RFQ portal and Carbon stops accepting late responses after it (configurable)."@@ -26924,6 +27371,9 @@ msgstr "Whether this work blocks production (Down), degrades it (Impact), is onmsgid "Whether to Add the selected permissions on top of what each user already has, or Update by replacing each user's permission set wholesale with the selection below."msgstr "Whether to Add the selected permissions on top of what each user already has, or Update by replacing each user's permission set wholesale with the selection below."+msgid "Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves."+msgstr "Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves."+msgid "Which document drives each inspection flow for this item."msgstr "Which document drives each inspection flow for this item."@@ -27227,6 +27677,9 @@ msgstr "You belong to more than one company. Pick where to work."msgid "You can change the UI style any time through the theme setting"msgstr "You can change the UI style any time through the theme setting"+msgid "You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.'"+msgstr "You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.'"+msgid "You can only see this key once. Store it safely."msgstr "You can only see this key once. Store it safely."@@ -27281,6 +27734,9 @@ msgstr "You lead"msgid "You name a project owner with decision authority"msgstr "You name a project owner with decision authority"+msgid "You need permission to edit workflows to load these choices."+msgstr "You need permission to edit workflows to load these choices."+msgid "You received this item"msgstr "You received this item"diff --git a/packages/locale/locales/en/mes.po b/packages/locale/locales/en/mes.poindex 566e8905b9..dee8d72553 100644--- a/packages/locale/locales/en/mes.po+++ b/packages/locale/locales/en/mes.po@@ -113,6 +113,9 @@ msgstr "A previous completion did not finish. Retrying resumes the remaining stemsgid "About"msgstr "About"+msgid "About this field"+msgstr "About this field"+msgid "Accept"msgstr "Accept"@@ -1234,6 +1237,9 @@ msgstr "No maintenance scheduled for today"msgid "No matches. Type to create one."msgstr "No matches. Type to create one."+msgid "No matching time"+msgstr "No matching time"+msgid "No materials"msgstr "No materials"@@ -2144,6 +2150,9 @@ msgstr "Thumbnail"msgid "Tick the jobs this was done for."msgstr "Tick the jobs this was done for."+msgid "Time"+msgstr "Time"+msgid "Time and cost split across jobs proportionally to quantity."msgstr "Time and cost split across jobs proportionally to quantity."diff --git a/packages/locale/locales/es/erp.po b/packages/locale/locales/es/erp.poindex 15b87345da..d46c1caeef 100644--- a/packages/locale/locales/es/erp.po+++ b/packages/locale/locales/es/erp.po@@ -269,6 +269,10 @@ msgstr "{0} facturas se facturaron en su sistema anterior y no se vuelven a genemsgid "{0} is {1}, not Draft or Planned"msgstr ""+#. placeholder {0}: integration.name+msgid "{0} isn't installed yet. There's nothing to configure — install it to connect an account."+msgstr "{0} aún no está instalado. No hay nada que configurar — instálalo para conectar una cuenta."+#. placeholder {0}: data.quantitymsgid "{0} items marked as picked"msgstr ""@@ -481,6 +485,12 @@ msgstr "{alreadyPlannedItemCount} piezas omitidas — ya tienen órdenes de trabmsgid "{apOverduePct}% of payables"msgstr "{apOverduePct}% de cuentas por pagar"+msgid "{appName} is connected, but needs to be reconnected before workflow steps can use it."+msgstr "{appName} está conectado, pero debe volver a conectarse antes de que los pasos del flujo de trabajo puedan usarlo."++msgid "{appName} isn't connected yet. Connect an account before this step can do anything."+msgstr "{appName} aún no está conectado. Conecta una cuenta antes de que este paso pueda hacer algo."+msgid "{arOverduePct}% of receivables"msgstr "{arOverduePct}% de cuentas por cobrar"@@ -594,6 +604,9 @@ msgstr "{inserted} insertados, {updated} actualizados, {0} necesitan correcciónmsgid "{jobsMissingStorageUnit, plural, one {# open job has materials with no storage unit} other {# open jobs have materials with no storage unit}}"msgstr "{jobsMissingStorageUnit, plural, one {# orden de trabajo abierta tiene materiales sin unidad de almacenamiento} other {# órdenes de trabajo abiertas tienen materiales sin unidad de almacenamiento}}"+msgid "{kept, plural, one {Took # value.} other {Took # values.}}"+msgstr "{kept, plural, one {Se tomó # valor.} other {Se tomaron # valores.}}"+msgid "{label} is used by documents, journals or default accounts, so it cannot be deleted."msgstr "{label} se utiliza en documentos, asientos o cuentas predeterminadas, por lo que no se puede eliminar."@@ -746,6 +759,9 @@ msgstr "{state} · sincronizado {syncedAgo}"msgid "{termMonths, plural, one {# month} other {# months}}"msgstr "{termMonths, plural, one {# mes} other {# meses}}"+msgid "{total, plural, one {Joined # value.} other {Joined # values.}}"+msgstr "{total, plural, one {Se unió # valor.} other {Se unieron # valores.}}"+msgid "{total} phases to get your company live on Carbon. Each one ends at a checkpoint."msgstr "{total} fases para poner tu empresa en vivo en Carbon. Cada una termina en un punto de control."@@ -1651,6 +1667,9 @@ msgstr "Un usuario registra la fecha de caducidad en cada lote de producción omsgid "A variable charge — mileage overage, damage, delivery, cleaning — is billed on the agreement's next invoice."msgstr "Un cargo variable — sobrecargo de millaje, daño, entrega, limpieza — se factura en la próxima factura del acuerdo."+msgid "A workspace can be connected to one Carbon company only. Disconnect it there first, or connect a different workspace."+msgstr "Un espacio de trabajo solo puede conectarse a una empresa de Carbon. Desconéctelo allí primero o conecte otro espacio de trabajo."+msgid "ABA"msgstr "ABA"@@ -1672,6 +1691,9 @@ msgstr "Acerca de"msgid "About (notification)"msgstr "Acerca de (notificación)"+msgid "About this field"+msgstr "Acerca de este campo"+msgid "Absent"msgstr "Ausente"@@ -1838,6 +1860,9 @@ msgstr ""msgid "Accounts receivable for amounts owed by customers"msgstr "Cuentas por cobrar para montos adeudados por clientes."+msgid "Accounts your workflows can act as. Add one for each account a workflow step should use."+msgstr "Cuentas como las que tus flujos de trabajo pueden actuar. Añade una para cada cuenta que un paso del flujo de trabajo deba usar."+msgid "Accrual"msgstr "Devengamiento"@@ -2055,6 +2080,9 @@ msgstr "Agregar un paso o pregunta"msgid "Add Ability"msgstr "Agregar Habilidad"+msgid "Add account"+msgstr "Agregar cuenta"+msgid "Add Account"msgstr "Agregar Cuenta"@@ -2196,6 +2224,10 @@ msgstr "Agregar mes"msgid "Add Note"msgstr "Agregar Nota"+msgctxt "workflow data step"+msgid "Add operation"+msgstr "Añadir operación"+msgid "Add Operation"msgstr "Agregar Operación"@@ -2434,6 +2466,9 @@ msgstr "Avanzar a {nextStatus}"msgid "Advanced"msgstr "Avanzado"+msgid "Advanced properties"+msgstr "Propiedades avanzadas"+msgid "Affected item not found."msgstr "Elemento afectado no encontrado."@@ -2657,6 +2692,12 @@ msgstr "Los montos muestran solo los dígitos que tienen valor."msgid "An ability is a process's qualification. Only processes without one are listed."msgstr "Una habilidad es la calificación de un proceso. Solo se enumeran los procesos sin una."+msgid "An account is already called that — pick a different name."+msgstr "Ya existe una cuenta con ese nombre. Elige un nombre diferente."++msgid "An account is missing from this list until it is reconnected."+msgstr "Falta una cuenta de esta lista hasta que se vuelva a conectar."+msgid "An accounting bucket that groups expenses by department or function so the GL can report spend by group, not just by account."msgstr "Un cubo de Contabilidad que agrupa Gastos por Departamento o función para que el Libro mayor pueda reportar gasto por grupo, no solo por Cuenta contable."@@ -2822,6 +2863,9 @@ msgstr "Ocurrió un error inesperado al conectar con Onshape. Guarde la configurmsgid "An unexpected error occurred while connecting to Onshape. Try connecting again."msgstr "Se produjo un error inesperado al conectar con Onshape. Vuelve a intentar la conexión."+msgid "An unexpected error occurred while connecting. Try connecting again."+msgstr "Se produjo un error inesperado al conectar. Intenta conectar de nuevo."+msgid "Analytics"msgstr "Análisis"@@ -2839,9 +2883,6 @@ msgstr "Y {0} más — resuelva estos para ver el resto."msgid "And {0} more. Resolve these to see the rest."msgstr "Y {0} más. Resuelve estos para ver el resto."-msgid "and {hidden} more"-msgstr "y {hidden} más"-msgid "and {remaining} more"msgstr "y {remaining} más"@@ -2878,6 +2919,9 @@ msgstr "Tasa anual a la cual se descuenta la renta"msgid "Annual. Starts from the company's incremental borrowing rate"msgstr "Anual. Comienza desde la tasa de endeudamiento incremental de la empresa."+msgid "Another connection to this integration already has that name. Choose a different one."+msgstr "Otra conexión a esta integración ya tiene ese nombre. Elige uno diferente."+msgid "Another cost center this one rolls up into, letting you nest a sub-department under its parent for hierarchical cost reporting."msgstr "Otro centro de costos al que este se agrupa, permitiéndole anidar un subcentro de costos bajo su principal para reportes de costos jerárquicos."@@ -2950,6 +2994,9 @@ msgstr "Claves API para acceso programático a tus datos de Carbon."msgid "API, webhooks, and integrations"msgstr "API, webhooks e integraciones"+msgid "App"+msgstr "Aplicación"+msgid "Appearance"msgstr "Apariencia"@@ -3882,6 +3929,9 @@ msgstr "No se pudieron cargar los adjuntos"msgid "Attempts"msgstr "Intentos"+msgid "Attendees"+msgstr "Asistentes"+msgid "Attribute"msgstr "Atributo"@@ -3924,6 +3974,9 @@ msgstr "Aplicación de autenticación"msgid "Authenticator QR code"msgstr "Código QR del autenticador"+msgid "Authorization was refused. Try connecting again."+msgstr "La autorización fue rechazada. Intenta conectar de nuevo."+msgid "Authorized overtime on top of the shift"msgstr "Horas extra autorizadas además del turno"@@ -3984,6 +4037,9 @@ msgstr "Actualizaciones y copias de seguridad automáticas"msgid "Automatic, prorated consumption of a job's untracked materials when output is reported — tracked materials are issued manually."msgstr "Consumo automático prorrateado de materiales no rastreados de un trabajo cuando se reporta la salida — los materiales rastreados se emiten manualmente."+msgid "Automatically create a Google Meet video conference link for this event"+msgstr "Crear automáticamente un enlace de videoconferencia de Google Meet para este evento"+msgid "Automatically release the job when the kanban is scanned"msgstr "Liberar automáticamente el trabajo cuando se escanea el kanban"@@ -4193,6 +4249,9 @@ msgstr "Lotes de producción a retornar"msgid "Batching"msgstr "Lote de producción"+msgid "BCC Email"+msgstr "Email CCO"+msgid "Becomes"msgstr "Se convierte en"@@ -4370,6 +4429,12 @@ msgstr "Tablero"msgid "Body"msgstr "Cuerpo"+msgid "Body for the email you want to send"+msgstr "Cuerpo del email que deseas enviar"++msgid "Body Type"+msgstr "Tipo de cuerpo"+msgid "BoM"msgstr "BoM"@@ -4427,6 +4492,9 @@ msgstr "Migas de pan"msgid "Bring in your parts, BOMs, Bill of Process, and costing — with Carbon's import tools, CSV, or LLM help."msgstr "Traiga sus piezas, BOMs, lista de operaciones y costeo — con herramientas de importación de Carbon, CSV o ayuda de LLM."+msgid "Broadcast reply to channel"+msgstr "Respuesta de difusión al canal"+msgid "Browse library"msgstr "Examinar biblioteca"@@ -4513,6 +4581,9 @@ msgstr ""msgid "By accepting the invite, you agree to the <0>Terms of Service</0> and <1>Privacy Policy</1>."msgstr "Al aceptar la invitación, aceptas los <0>Términos de Servicio</0> y la <1>Política de Privacidad</1>."+msgid "By default it'll be 30 min post start time"+msgstr "Por defecto serán 30 min después de la hora de inicio"+msgid "By dimension"msgstr "Por dimensión"@@ -4881,6 +4952,9 @@ msgstr "Ejecución causante: "msgid "CC"msgstr "CC"+msgid "CC Email"+msgstr "Email CC"+msgid "Centralized Billing Address"msgstr "Dirección de Facturación Centralizada"@@ -4998,6 +5072,12 @@ msgstr "Cambiar esto actualizará el ID de la pieza"msgid "Changing type resets this item's draft edits."msgstr "Cambiar el tipo restablece los borradores editados de este elemento."+msgid "Channel"+msgstr "Canal"++msgid "Channel Name"+msgstr "Nombre del canal"+msgid "Characteristic"msgstr "Característica"@@ -5078,6 +5158,9 @@ msgstr "Punto de control ·"msgid "Checkpoints"msgstr "Puntos de control"+msgid "Choose {named} first."+msgstr "Elige {named} primero."+msgid "Choose a backup"msgstr "Elige una copia de seguridad"@@ -5333,6 +5416,9 @@ msgstr "Contraer preparación"msgid "Collapse subtree"msgstr "Contraer subárbol"+msgid "Color"+msgstr "Color"+#. placeholder {0}: index + 1msgid "Column {0} of {count}"msgstr "Columna {0} de {count}"@@ -5594,6 +5680,9 @@ msgstr "Configura las cuentas predeterminadas utilizadas para varios tipos de trmsgid "Configure the start months for your fiscal and tax years"msgstr "Configure los meses de inicio de sus años fiscales e impositivos"+msgid "Configure the steps above first."+msgstr "Configura primero los pasos anteriores."+msgid "Configure when purchased item costs should be updated from supplier transactions."msgstr "Configura cuándo se deben actualizar los costos de artículos comprados a partir de transacciones de proveedores."@@ -5690,6 +5779,9 @@ msgstr "Razón del conflicto"msgid "Connect"msgstr "Conectar"+msgid "Connect {appName}"+msgstr "Conectar {appName}"+msgid "Connect Carbon to your accounting, project management, and CAD tools and much more."msgstr "Conecta Carbon a tus herramientas de contabilidad, gestión de proyectos, CAD y mucho más."@@ -5717,9 +5809,18 @@ msgstr "Conecta las herramientas externas que tu empresa ya utiliza"msgid "Connect your identity provider by pasting either its metadata URL or its raw metadata XML — exactly one of the two."msgstr "Conecte su proveedor de identidad pegando su URL de metadatos o su XML de metadatos sin procesar — exactamente uno de los dos."+msgid "Connected before workflows needed extra permissions. Reconnect to grant them — everything else keeps working meanwhile."+msgstr "La conexión anterior de flujos de trabajo necesitaba permisos adicionales. Vuelve a conectar para otorgarlos. Todo lo demás seguirá funcionando mientras tanto."+msgid "Connected to"msgstr "Conectado a"+msgid "Connection"+msgstr "Conexión"++msgid "Connection name"+msgstr "Nombre de la conexión"+msgid "Console Mode"msgstr "Modo de Consola"@@ -6336,6 +6437,12 @@ msgstr "No se pudo liberar {0}: {1}"msgid "Could not save"msgstr "No se pudo guardar"+msgid "Couldn't check whether {appName} is connected."+msgstr "No se pudo comprobar si {appName} está conectado."++msgid "Couldn't complete the connection"+msgstr "No se pudo completar la conexión"+msgid "Couldn't complete the Onshape connection"msgstr "No se pudo completar la conexión con Onshape"@@ -6351,12 +6458,18 @@ msgstr "No se pudieron cargar más filas"msgid "Couldn't load related documents. Refresh before creating a new one to avoid duplicates."msgstr "No se pudieron cargar los documentos relacionados. Actualice antes de crear uno nuevo para evitar duplicados."+msgid "Couldn't load the choices for this field."+msgstr "No se pudieron cargar las opciones para este campo."+msgid "Couldn't load the provider's dimension targets — check the connection and reload."msgstr "No se pudo cargar los destinos de dimensión del proveedor — comprueba la conexión y recarga."msgid "Couldn't reschedule the job. Please try again."msgstr "No se pudo reprogramar el trabajo. Por favor, inténtelo de nuevo."+msgid "Couldn't save the connection"+msgstr "No se pudo guardar la conexión"+msgid "Couldn't save the Onshape connection"msgstr "No se pudo guardar la conexión con Onshape"@@ -6366,6 +6479,12 @@ msgstr "No se pudo guardar la conexión con Onshape Government"msgid "Couldn't save the Ramp connection"msgstr "No se pudo guardar la conexión con Ramp"+msgid "Couldn't start the {name} connection"+msgstr "No se pudo iniciar la conexión con {name}"++msgid "Couldn't start the authorization."+msgstr "No se pudo iniciar la autorización."+msgid "Count"msgstr "Cantidad"@@ -6375,6 +6494,12 @@ msgstr "Historial de Conteo"msgid "Count ID"msgstr "ID de Conteo"+msgid "Count items"+msgstr "Contar artículos"++msgid "Counted {total}."+msgstr "Se contaron {total}."+msgid "Counted Qty"msgstr "Cantidad Contada"@@ -6479,6 +6604,9 @@ msgstr "Crear contrato"msgid "Create Forecast"msgstr "Crear pronóstico"+msgid "Create Google Meet Link"+msgstr "Crear enlace de Google Meet"+msgid "Create Issue"msgstr "Crear Problema"@@ -7116,6 +7244,9 @@ msgstr "Fecha"msgid "Date Acquired"msgstr "Fecha de Adquisición"+msgid "Date and time"+msgstr "Fecha y hora"+msgid "Date Calibrated"msgstr "Fecha Calibrada"@@ -7125,6 +7256,9 @@ msgstr "Fecha de vencimiento"msgid "Date Due"msgstr "Fecha de Vencimiento"+msgid "Date from"+msgstr "Fecha desde"+msgid "Date issued"msgstr "Fecha de emisión"@@ -7137,6 +7271,9 @@ msgstr "Fecha de pago"msgid "Date Paid"msgstr "Fecha Pagada"+msgid "Date to"+msgstr "Fecha hasta"+msgid "Dates"msgstr "Fechas"@@ -8006,6 +8143,9 @@ msgstr "Descripción del Cambio"msgid "Description of Issue"msgstr "Descripción del Problema"+msgid "Description of the event. You can use HTML tags here."+msgstr "Descripción del evento. Puedes usar etiquetas HTML aquí."+msgid "Detach"msgstr "Desvincular"@@ -8111,6 +8251,9 @@ msgstr "Descartado"msgid "Disconnect"msgstr "Desconectar"+msgid "Disconnected"+msgstr "Desconectado"+msgid "Discontinuation date"msgstr "Fecha de descontinuación"@@ -9071,6 +9214,9 @@ msgstr "Correo electrónico"msgid "Email Address"msgstr "Dirección de Correo Electrónico"+msgid "Email address to set as the \"Reply-To\" header"+msgstr "Dirección de email para establecer como encabezado \"Responder a\""+msgid "Email Domains"msgstr "Dominios de correo electrónico"@@ -9086,6 +9232,9 @@ msgstr "Enviado por correo electrónico"msgid "Emails"msgstr "Correos electrónicos"+msgid "Emails of the attendees (guests)"+msgstr "Emails de los asistentes (invitados)"+msgid "Emoji"msgstr "Emoji"@@ -9155,6 +9304,9 @@ msgstr "Habilita cotizaciones digitales para tu empresa. Esto te permitirá envimsgid "Enable in Settings"msgstr "Habilitar en Configuración"+msgid "Enable link unfurling for this message"+msgstr "Habilitar la expansión de enlace para este mensaje"+msgid "Enable notifications when a sales rule violation is blocked or acknowledged on a quote, sales order, or sales invoice."msgstr "Habilite notificaciones cuando una infracción de regla de ventas sea bloqueada o confirmada en una cotización, un pedido de venta o una factura de venta."@@ -9236,6 +9388,9 @@ msgstr "Fin"msgid "End Date"msgstr "Fecha de Fin"+msgid "End date time of the event"+msgstr "Fecha y hora de finalización del evento"+msgid "End Line"msgstr "Finalizar línea"@@ -9568,6 +9723,9 @@ msgstr ""msgid "Event Type"msgstr "Tipo de Evento"+msgid "Event types"+msgstr "Tipos de evento"+msgid "Events"msgstr "Eventos"@@ -9746,6 +9904,9 @@ msgstr "Expandir línea"msgid "Expand Machine"msgstr "Expandir máquina"+msgid "Expand Recurring Event?"+msgstr "¿Expandir eventos recurrentes?"+msgid "Expand row"msgstr "Expandir fila"@@ -10584,6 +10745,9 @@ msgstr "Corrija estos en los archivos, luego vuelva a subirlos"msgid "Fix these jobs before releasing"msgstr "Arregle estas órdenes de trabajo antes de liberar"+msgid "Fix this"+msgstr "Corregir esto"+msgid "Fixed"msgstr "Fijo"@@ -11052,6 +11216,12 @@ msgstr "Cuadre del Libro mayor"msgid "GL Tie-Out"msgstr "Cuadre del Libro Mayor"+msgid "Gmail"+msgstr "Gmail"++msgid "Gmail: Send Email"+msgstr "Gmail: Enviar email"+msgid "Go live right the first time — with our team alongside you"msgstr "Activa en el primer intento — con nuestro equipo a tu lado"@@ -11107,6 +11277,15 @@ msgstr "Buenas noches, {name}."msgid "Good morning, {name}."msgstr "Buenos días, {name}."+msgid "Google Calendar"+msgstr "Google Calendar"++msgid "Google Calendar: Create Event"+msgstr "Google Calendar: Crear evento"++msgid "Google Calendar: Get all Events"+msgstr "Google Calendar: Obtener todos los eventos"+msgid "Google Places API key not configured"msgstr "Clave de API de Google Places no configurada"@@ -11167,6 +11346,15 @@ msgstr "Residual garantizado"msgid "Guaranteed Residual Value"msgstr "Valor residual garantizado"+msgid "Guests can invite others"+msgstr "Los invitados pueden invitar a otros"++msgid "Guests can modify"+msgstr "Los invitados pueden modificar"++msgid "Guests can see other guests"+msgstr "Los invitados pueden ver a otros invitados"+msgid "Guided"msgstr "Guiado"@@ -11518,6 +11706,9 @@ msgstr "IBAN"msgid "IC Transaction"msgstr "Transacción intercompañía"+msgid "Icon Emoji"+msgstr "Emoji de icono"+msgid "Id"msgstr "Id"@@ -12282,6 +12473,9 @@ msgstr "está en o después de"msgid "is on or before"msgstr "está en o antes de"+msgid "Is Private?"+msgstr "¿Es privado?"+msgid "Is supplier org group"msgstr "Es grupo de organización de proveedor"@@ -12354,6 +12548,9 @@ msgstr ""msgid "It is coming soon. Contact Carbon to have it set up for your company."msgstr "Estará disponible pronto. Contacta con Carbon para que la configuren para tu empresa."+msgid "It was removed after this page loaded. Reload the page and try again."+msgstr "Se eliminó después de que se cargara esta página. Recargue la página e intente de nuevo."+msgid "It will stop running until you publish a version again. Nothing is deleted."msgstr "Se detendrá hasta que publique una Versión nuevamente. Nada se elimina."@@ -12550,6 +12747,9 @@ msgstr "Órdenes de trabajo que tienen este artículo en su lista de materiales"msgid "Join {0}"msgstr "Unirse a {0}"+msgid "Join into text"+msgstr "Unirse al texto"+msgid "Journal"msgstr "Asiento"@@ -12616,6 +12816,9 @@ msgstr "Mantener fijación de precios existente, solo agregar artículos nuevos"msgid "Keep Line"msgstr "Mantener línea"+msgid "Keep matching items"+msgstr "Mantener artículos coincidentes"+msgid "Keep navigation open"msgstr "Mantener navegación abierta"@@ -12634,6 +12837,12 @@ msgstr "Continuar picking"msgid "Keeps orders, quotes, and settings behind a second check"msgstr "Mantiene órdenes, cotizaciones y configuración tras una segunda verificación"+msgid "Kept {kept} of {total}; {unresolved} could not be checked."+msgstr "Se conservaron {kept} de {total}; {unresolved} no se pudieron comprobar."++msgid "Kept {kept} of {total}."+msgstr "Se conservaron {kept} de {total}."+msgid "Key"msgstr "Clave"@@ -14875,6 +15084,9 @@ msgstr "Sin acceso"msgid "No accounts are mapped yet"msgstr "Aún no hay cuentas asignadas"+msgid "No accounts connected yet."+msgstr "Sin cuentas conectadas aún."+msgid "No accounts match your search"msgstr "No hay cuentas que coincidan con tu búsqueda"@@ -14930,6 +15142,9 @@ msgstr "Sin activos aún. Agregue cada activo que cubre el arrendamiento, con lomsgid "No attachments."msgstr "Sin adjuntos."+msgid "No authorization code was returned"+msgstr "No se devolvió código de autorización"+msgid "No available filters"msgstr "No hay filtros disponibles"@@ -15130,6 +15345,9 @@ msgstr "Sin ruta de error: la ejecución se detiene aquí y se marca como fallidmsgid "No fair value entered, counts as not met"msgstr "Sin valor razonable ingresado, se cuenta como no cumplido"+msgid "No field was chosen to take."+msgstr "No se eligió ningún campo para tomar."+msgid "No fields found."msgstr "No se encontraron campos."@@ -15250,6 +15468,9 @@ msgstr "Sin contenedores coincidentes"msgid "No matching operations"msgstr "Sin operaciones coincidentes"+msgid "No matching time"+msgstr "Ninguna hora coincide"+msgid "No materials"msgstr "Sin materiales"@@ -15765,6 +15986,9 @@ msgstr "Nada"msgid "Nothing at this location matches \"{0}\"."msgstr "Nada en esta ubicación coincide con \"{0}\"."+msgid "Nothing can work on this result."+msgstr "Nada puede trabajar sobre este resultado."+msgid "Nothing completed in MES yet"msgstr "Aún no se ha completado nada en MES"@@ -15798,6 +16022,9 @@ msgstr "Nada programado — agrega una estación a continuación."msgid "Nothing selected yet"msgstr "Nada seleccionado aún"+msgid "Nothing to choose yet - <0>set one up in Settings</0>."+msgstr "Nada para elegir aún - <0>configura uno en Configuración</0>."+msgid "Nothing to post for this period."msgstr "Nada que contabilizar para este período."@@ -16008,6 +16235,9 @@ msgstr "¿A cuántos {1} equivale 1 {0}?"msgid "One firing of a workflow, recorded step by step with the values each step used and produced, acting throughout with the permissions of the workflow's owner."msgstr "Una ejecución de un flujo de trabajo, registrada paso a paso con los valores que cada paso usó y produjo, actuando en todo momento con los permisos del propietario del flujo de trabajo."+msgid "One of your {appName} accounts needs to be reconnected before workflow steps can use it."+msgstr "Una de tus cuentas de {appName} debe volver a conectarse antes de que los pasos del flujo de trabajo puedan usarla."+msgid "One or more quantities cannot meet this date"msgstr "Una o más cantidades no pueden cumplir esta fecha"@@ -16131,6 +16361,9 @@ msgstr "Abrir"msgid "Open ({paymentCurrency})"msgstr "Abierto ({paymentCurrency})"+msgid "Open {appName} accounts"+msgstr "Abrir cuentas de {appName}"+msgid "Open a change notice"msgstr "Abrir un aviso de cambio"@@ -16320,6 +16553,10 @@ msgstr "operación"msgid "Operation"msgstr "Operación"+msgctxt "workflow data step"+msgid "Operation"+msgstr "Operación"+msgid "Operation batch"msgstr "Operación de lote de producción"@@ -17129,6 +17366,9 @@ msgstr "Seleccione un cliente, un tipo de cliente o Todos los clientes para vermsgid "Pick a date or leave blank to clear it."msgstr "Elige una fecha o déjala en blanco para borrarla."+msgid "Pick a field…"+msgstr "Selecciona un campo…"+msgid "Pick a list variable…"msgstr "Elige una variable de lista…"@@ -17818,6 +18058,9 @@ msgstr "Producción: aplicación de planta y programación"msgid "Profile"msgstr "Perfil"+msgid "Profile Picture"+msgstr "Foto de perfil"+msgid "Profit Percent"msgstr "Porcentaje de Ganancia"@@ -17928,6 +18171,9 @@ msgstr "Demuestra la propiedad de cada dominio de correo electrónico con un regmsgid "Provide process knowledge and inputs"msgstr "Proporcionar conocimiento del proceso e información"+msgid "Provide the ts (timestamp) or link value of the **parent** message to make this message a reply. Do not use the ts value of the reply itself; use its parent instead. For example '1710304378.475129'.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the 'Copy link' option."+msgstr "Proporciona el ts (timestamp) o el valor del enlace del mensaje **principal** para hacer que este mensaje sea una respuesta. No uses el valor de ts de la respuesta en sí; utiliza el del mensaje principal. Por ejemplo, '1710304378.475129'. Alternativamente, puedes obtener fácilmente el enlace del mensaje haciendo clic en los tres puntos al lado del mensaje principal y seleccionando la opción \"Copiar enlace\"."+msgid "Provide these URLs to your identity provider (Okta, Entra ID, Google Workspace, etc.) when registering Carbon as a SAML application."msgstr "Proporcione estas URL a su proveedor de identidad (Okta, Entra ID, Google Workspace, etc.) al registrar Carbon como una aplicación SAML."@@ -18731,6 +18977,9 @@ msgstr "Las cantidades recibidas comienzan en cero"msgid "Received quantity not yet credited. The credit memo is created as a draft."msgstr "La Cantidad recibida aún no ha sido acreditada. La Nota de crédito se crea como Borrador."+msgid "Receiver Email (To)"+msgstr "Email del destinatario (Para)"+msgid "Receives the invoice email"msgstr "Recibe el correo de la factura"@@ -18788,6 +19037,21 @@ msgstr "Conciliación de una orden de compra contra lo que se recibió y se factmsgid "Reconfigure"msgstr "Reconfigurar"+msgid "Reconnect"+msgstr "Volver a conectar"++msgid "Reconnect {appName}"+msgstr "Volver a conectar {appName}"++msgid "Reconnect it"+msgstr "Vuelve a conectarlo"++msgid "Reconnect needed"+msgstr "Se requiere reconectar"++msgid "Reconnect with the account this connection already uses, or use Add account to connect the other one."+msgstr "Vuelve a conectar con la cuenta que ya usa esta conexión, o usa Agregar cuenta para conectar la otra."+msgid "Record"msgstr "Registro"@@ -18833,9 +19097,16 @@ msgstr "Registros"msgid "Records and posted journals are being sent to and received from this provider."msgstr "Los registros y asientos contabilizados se están enviando y recibiendo desde este proveedor."+msgid "Records here appear as plain text — {appLabel} doesn't support links in this field."+msgstr "Los registros aquí aparecen como texto plano — {appLabel} no admite enlaces en este campo."+msgid "Records moved"msgstr "Registros movidos"+#. placeholder {0}: notice.params.equals+msgid "Records will be plain text. Set {siblingLabel} to {0} (under Advanced) to turn them into links."+msgstr "Los registros serán texto plano. Establezca {siblingLabel} en {0} (en Opciones avanzadas) para convertirlos en enlaces."+msgid "Recost"msgstr "Recalcular costo"@@ -19182,6 +19453,10 @@ msgstr "Quitar los números de serie y de lote de producción recibidos de las emsgid "Remove this item"msgstr "Quitar este artículo"+msgctxt "workflow data step"+msgid "Remove this operation"+msgstr "Quitar esta operación"+msgid "Remove this storage type from all referencing storage units and delete it. This cannot be undone."msgstr "Quitar este tipo de almacenamiento de todas las unidades de almacenamiento que lo referencian y eliminarlo. No se puede deshacer."@@ -19216,6 +19491,9 @@ msgstr "Renombrar"msgid "Rename Workflow"msgstr "Renombrar flujo de trabajo"+msgid "Renamed"+msgstr "Renombrado"+msgid "Rendering label preview..."msgstr "Renderizando vista previa de etiqueta..."@@ -19381,6 +19659,12 @@ msgstr "Sistema de reposición"msgid "Replies to emailed invoices go here, and it's copied on each one."msgstr "Las respuestas a las facturas enviadas por correo van aquí, y se copian en cada una."+msgid "Reply to Thread (Thread Message Link/Timestamp)"+msgstr "Responder al hilo (Enlace del mensaje/Marca de tiempo del hilo)"++msgid "Reply-To Email"+msgstr "Correo de respuesta"+msgid "Report"msgstr "Informe"@@ -19925,6 +20209,9 @@ msgstr "Revocar Invitación"msgid "Revoke Invites"msgstr "Revocar Invitaciones"+msgid "Revoked"+msgstr "Revocado"+msgid "Rework"msgstr "Retrabajo"@@ -20699,6 +20986,9 @@ msgstr "Buscar piezas de proveedor"msgid "Search suppliers..."msgstr "Buscar proveedores..."+msgid "Search Term"+msgstr "Término de búsqueda"+msgid "Search tools..."msgstr "Buscar herramientas..."@@ -20800,6 +21090,9 @@ msgstr "Selecciona primero una forma para ver las opciones disponibles"msgid "Select a step to hide parts on it."msgstr "Seleccione un paso para ocultar piezas en él."+msgid "Select a step…"+msgstr "Selecciona un paso…"+msgid "Select a substance and shape first to see available options"msgstr "Selecciona primero una sustancia y una forma para ver las opciones disponibles"@@ -20818,6 +21111,9 @@ msgstr "Seleccionar todo"msgid "Select an action…"msgstr "Seleccionar una acción…"+msgid "Select an app…"+msgstr "Selecciona una aplicación…"+msgid "Select an assignee"msgstr "Seleccionar un asignado"@@ -20842,6 +21138,9 @@ msgstr "Seleccionar una operación…"msgid "Select an option"msgstr "Selecciona una opción"+msgid "Select an option…"+msgstr "Selecciona una opción…"+msgid "Select at least one item to accept the quote"msgstr "Selecciona al menos un artículo para aceptar la cotización"@@ -20875,6 +21174,9 @@ msgstr "Seleccionar Empleado"msgid "Select Employee Type"msgstr "Seleccionar Tipo de Empleado"+msgid "Select event types"+msgstr "Seleccionar tipos de evento"+msgid "Select field"msgstr "Seleccionar campo"@@ -20988,7 +21290,7 @@ msgid "Self Managed"msgstr "Autogestionado"msgid "Self-hosted or managed"-msgstr "Autohospedado o gestionado"+msgstr "Auto-hospedado o administrado"msgid "Self-onboarding"msgstr "Incorporación automática"@@ -21026,6 +21328,9 @@ msgstr "Enviar Invitación"msgid "Send Invites"msgstr "Enviar invitaciones"+msgid "Send Notifications"+msgstr "Enviar notificaciones"+msgid "Send RFQ to Suppliers"msgstr "Enviar RFQ a Proveedores"@@ -21035,6 +21340,12 @@ msgstr "Enviar a Carbon"msgid "Send Via"msgstr "Enviar por"+msgid "Sender Email"+msgstr "Correo del remitente"++msgid "Sender Name"+msgstr "Nombre del remitente"+msgid "Sending defective units back to an earlier operation to be corrected instead of scrapping them."msgstr "Envío de unidades defectuosas a una operación anterior para ser corregidas en lugar de desechadas."@@ -21802,6 +22113,18 @@ msgstr ""msgid "Slack"msgstr "Slack"+msgid "Slack: Create Channel"+msgstr "Slack: Crear canal"++msgid "Slack: Find User by Email"+msgstr "Slack: Buscar usuario por correo"++msgid "Slack: Send Message To A Channel"+msgstr "Slack: Enviar mensaje a un canal"++msgid "Slack: Send Message To A User"+msgstr "Slack: Enviar mensaje a un usuario"+msgid "Slice asset activity by location, item, or any dimension"msgstr "Dividir actividad de activos por ubicación, artículo o cualquier dimensión"@@ -22041,6 +22364,9 @@ msgstr "Fecha de inicio"msgid "Start Date"msgstr "Fecha de Inicio"+msgid "Start date time of the event"+msgstr "Fecha y hora de inicio del evento"+msgid "Start Expiration"msgstr "Iniciar Vencimiento"@@ -22855,6 +23181,9 @@ msgstr "Etiquetas"msgid "Tailor this hub for the customer. Changes apply live for everyone viewing it. Never shown to the customer here."msgstr "Personaliza este hub para el cliente. Los cambios se aplican en vivo para todos los que lo visualizan. Nunca se muestra al cliente aquí."+msgid "Take one field from every item"+msgstr "Tomar un campo de cada artículo"+msgid "Take out of service"msgstr "Sacar de servicio"@@ -22868,6 +23197,12 @@ msgstr "Asumir la propiedad"msgid "Take Ownership: {0}"msgstr "Asumir la propiedad: {0}"+msgid "Take the first item"+msgstr "Tomar el primer artículo"++msgid "Take the last item"+msgstr "Tomar el último artículo"+msgid "Take the shortest remaining shelf life across the materials consumed to make this item. Use when the product's expiry depends on its ingredients."msgstr "Toma la vida de anaquel más corta restante entre los artículos consumidos para fabricar este artículo. Usa esto cuando la caducidad del producto depende de sus ingredientes."@@ -23115,11 +23450,8 @@ msgstr ""msgid "Test run"msgstr "Ejecución de prueba"-msgid "Test run — results are not saved to the Runs page"-msgstr "Ejecución de prueba — los resultados no se guardan en la página de Ejecuciones"--msgid "Test runs are not saved. Close this panel and the result is gone."-msgstr "Las ejecuciones de prueba no se guardan. Cierra este panel y el resultado desaparece."+msgid "Test runs are saved to the run history, marked as tests."+msgstr "Las ejecuciones de prueba se guardan en el historial de ejecución, marcadas como pruebas."msgid "Test Value"msgstr "Valor de Prueba"@@ -23127,9 +23459,36 @@ msgstr "Valor de Prueba"msgid "Text size"msgstr "Tamaño de texto"+msgid "That account is still being reconnected. Try again in a moment."+msgstr "Esa cuenta aún se está reconectando. Intente de nuevo en un momento."++msgid "That account no longer exists"+msgstr "Esa cuenta ya no existe"++msgid "That connection name is already used"+msgstr "Ese nombre de conexión ya se está usando"++msgid "That field holds a list of its own. Turn on flattening to take it."+msgstr "Ese campo contiene su propia lista. Activa el aplanado para tomarlo."++msgid "That field holds several values, so they are combined into one list."+msgstr "Ese campo contiene varios valores, por lo que se combinan en una lista."++msgid "That integration is not available"+msgstr "Esa integración no está disponible"++msgid "That list was empty."+msgstr "Esa lista estaba vacía."+msgid "That name is already used by another step."msgstr "Ese nombre ya está siendo utilizado por otro paso."+msgid "That workspace is connected to another company"+msgstr "Ese espacio de trabajo está conectado a otra empresa"++msgid "That's a different account"+msgstr "Esa es otra cuenta"+#. placeholder {0}: i18n._(step.title)msgid "The \"{0}\" phase checks itself off once all of its tasks in the project plan are done."msgstr "La fase \"{0}\" se marca como completada una vez que todas sus tareas en el plan del proyecto estén hechas."@@ -23143,6 +23502,9 @@ msgstr "La fase \"{0}\" está hecha — su punto de control \"{1}\" ha sido supemsgid "The {0} phases to go live, each ending at a checkpoint. Tick off each task as you complete it."msgstr "Los {0} fases para lanzamiento, cada una terminando en un punto de control. Marca cada tarea conforme la completes."+msgid "The {appName} account this step uses is not available — it was disconnected or needs to be reconnected."+msgstr "La cuenta de {appName} que utiliza este paso no está disponible — se desconectó o necesita reconectarse."+msgid "The accent color used across Carbon."msgstr "El color de acento utilizado en todo Carbon."@@ -23158,6 +23520,9 @@ msgstr "Las cuentas a las que Carbon publica automáticamente"msgid "The action that copies a saved method (its materials, operations, and work instructions) onto a job or quote line."msgstr "La acción que copia un método guardado (sus materiales, operaciones e instrucciones de trabajo) en una línea de trabajo o cotización."+msgid "The address must be listed in your GMail account's settings"+msgstr "La dirección debe estar incluida en la configuración de su cuenta de Gmail"+msgid "The allowed values for a list-type attribute; users pick from these rather than free-typing."msgstr "Los valores permitidos para un atributo de tipo lista; los usuarios eligen entre estos en lugar de escribir libremente."@@ -23179,6 +23544,9 @@ msgstr "El activo entra en su clase en servicio y comienza a depreciarse desde lmsgid "The asset would have a negative cost. Check the purchase price."msgstr "El activo tendría un costo negativo. Verifique el precio de compra."+msgid "The authorization took too long or came back altered. Start the connection again from this page."+msgstr "La autorización tardó demasiado o regresó alterada. Comienza la conexión nuevamente desde esta página."+msgid "The authorization was refused in Onshape. Save the integration settings to try again."msgstr "La autorización fue rechazada en Onshape. Guarde la configuración de integración e intente de nuevo."@@ -23188,6 +23556,9 @@ msgstr "La autorización se rechazó en Onshape. Vuelve a intentar la conexión.msgid "The authorization was refused in Ramp. Try connecting again."msgstr "La autorización se rechazó en Ramp. Vuelve a intentar la conexión."+msgid "The authorization was rejected"+msgstr "La autorización fue rechazada"+msgid "The average cost of the item. Changing it needs permission to edit parts."msgstr "El costo promedio del Artículo. Cambiar esto requiere Permiso para editar Piezas."@@ -23291,6 +23662,12 @@ msgstr "La empresa ya tiene un asiento de apertura contabilizado."msgid "The company has no account defaults."msgstr "La Empresa no tiene valores predeterminados de cuenta."+msgid "The connection could not be verified"+msgstr "La conexión no pudo verificarse"++msgid "The connection was refused"+msgstr "La conexión fue rechazada"+msgid "The contract cannot be cancelled then"msgstr "El contrato no puede cancelarse entonces"@@ -23556,6 +23933,9 @@ msgstr "La dirección https a la que publica un paso de webhook de flujo de trabmsgid "The human-readable document number (like J000001 or ECO-000001) minted from a sequence and stored on the record, distinct from its internal id."msgstr "El número de documento legible por humanos (como J000001 o ECO-000001) generado a partir de una secuencia y almacenado en el registro, distinto de su id interno."+msgid "The icon emoji of the bot"+msgstr "El emoji de icono del bot"+msgid "The identifier the customer uses for this part on their POs; Carbon resolves it to our internal Part ID on order import."msgstr "El identificador que el cliente usa para esta parte en sus POs; Carbon lo resuelve a nuestro ID de parte interno en la importación de pedidos."@@ -23577,6 +23957,9 @@ msgstr "La regla de Incoterms (FOB, DAP, EXW, CIF, ...) que rige quién paga elmsgid "The Incoterm rule (FOB, DAP, EXW, CIF, …) that governs who pays freight, who bears risk, and where the transfer of title occurs on shipments to this customer."msgstr "La regla de Incoterms (FOB, DAP, EXW, CIF, ...) que rige quién paga el flete, quién asume el riesgo y dónde se produce la transferencia de título en envíos a este cliente."+msgid "The integration authorized the connection but saving it failed. Try connecting again."+msgstr "La integración autorizó la conexión pero falló al guardarla. Intenta conectar de nuevo."+msgid "The inventory cost recognized when a shipment posts, valued by the item's costing method."msgstr "El costo de inventario reconocido cuando se registra un envío, valorado por el método de costeo del artículo."@@ -23592,6 +23975,15 @@ msgstr "El artículo que cada orden de trabajo produce — requiere que coincidamsgid "The item's rental rate"msgstr "La tarifa de renta del artículo"+msgid "The items in that list have no field by that name."+msgstr "Los elementos de esa lista no tienen ningún campo con ese nombre."++msgid "The items in that list have no fields to take."+msgstr "Los artículos de esa lista no tienen campos para tomar."++msgid "The items in that list have no reading as text."+msgstr "Los elementos de esa lista no se pueden leer como texto."+msgid "the job hours due that day (a due-date basis, not the day the work runs), with overdue work in Past due."msgstr "las horas de Orden de trabajo vencidas ese día (una base de fecha de vencimiento, no el día que se ejecuta el trabajo), con trabajo Atrasado en Pasado vencido."@@ -23885,6 +24277,9 @@ msgstr "El procedimiento que siguen los técnicos cuando se realiza este mantenimsgid "The processes this work center can run; appears in process-pickers when scheduling operations, and limits which jobs can route through this work center."msgstr "Los procesos que puede ejecutar este centro de trabajo; aparece en selectores de procesos cuando se programan operaciones, y limita qué órdenes de trabajo pueden enrutar a través de este centro de trabajo."+msgid "The profile picture of the bot"+msgstr "La foto de perfil del bot"+msgid "The provider offers no dimension targets. Enable the feature in the provider first (e.g. tracking categories, class tracking, or fields)."msgstr "El proveedor no ofrece destinos de dimensión. Habilita la función en el proveedor primero (p. ej. categorías de seguimiento, seguimiento de clases o campos)."@@ -23986,12 +24381,12 @@ msgstr "La respuesta de Onshape no incluía los parámetros requeridos. Vuelve amsgid "The response from Ramp was missing required parameters. Try connecting again."msgstr "La respuesta de Ramp no incluía los parámetros requeridos. Vuelve a intentar la conexión."+msgid "The response was missing required parameters. Try connecting again."+msgstr "La respuesta no contiene los parámetros requeridos. Intenta conectar de nuevo."+msgid "The restore job reported this error."msgstr "El trabajo de restauración reportó este error."-msgid "The result will not appear on the Runs page."-msgstr "El resultado no aparecerá en la página Ejecuciones."-msgid "The revision number of the part"msgstr "El número de revisión de la pieza"@@ -24139,6 +24534,9 @@ msgstr "El sistema que una empresa utiliza para administrar los inicios de sesimsgid "The system passes every in-scope acceptance test in your configured system, with your data; the data is validated; and you sign off. Then go-live."msgstr "El sistema pasa todas las pruebas de aceptación dentro del alcance en tu sistema configurado, con tus datos; los datos se validan; y das tu aprobación. Luego, lanzamiento."+msgid "The text of your message. When using Block Kit blocks, this is used as a fallback for notifications."+msgstr "El texto de su mensaje. Al usar bloques de Block Kit, esto se utiliza como alternativa para notificaciones."+msgid "The thread linking a sales RFQ, its quote, and the resulting sales order — a join, not a document with its own status."msgstr "La conexión que vincula una RFQ de ventas, su cotización, y el pedido de venta resultante — una unión, no un documento con su propio estado."@@ -24220,6 +24618,9 @@ msgstr ""msgid "The US tax depreciation system with IRS property-class tables, run as a separate tax schedule alongside the book schedule."msgstr "El sistema de depreciación fiscal de EE.UU. con tablas de clase de propiedad del IRS, ejecutado como un programa fiscal separado junto al programa contable."+msgid "The username of the bot"+msgstr "El nombre de usuario del bot"+msgid "The users in this group; group-scoped permissions and notifications apply to each member, and users may belong to multiple groups (effective permissions are the union)."msgstr "Los usuarios en este grupo; los permisos y notificaciones con alcance de grupo se aplican a cada miembro, y los usuarios pueden pertenecer a varios grupos (los permisos efectivos son la unión)."@@ -24352,6 +24753,11 @@ msgstr "No están en tu plan de cuentas, pero los documentos o asientos los utilmsgid "this ability"msgstr "esta habilidad"+msgid "This account has stopped working. Reconnect it — workflow steps using it will fail until you do."+msgstr "Esta cuenta ha dejado de funcionar. Reconéctela — los pasos del flujo de trabajo que la utilizan fallarán hasta que lo haga."++msgid "This account needs to be reconnected."+msgstr "Esta cuenta necesita ser reconectada."msgid "This action cannot run on this list."msgstr ""@@ -24384,6 +24790,9 @@ msgstr "Esto no se puede cambiar más tarde — {integrationName} permite solo umsgid "This cannot be undone."msgstr "Esto no se puede deshacer."+msgid "This Carbon instance is missing its OAuth credentials for this integration. Ask an administrator to set them."+msgstr "Esta instancia de Carbon no tiene sus credenciales de OAuth para esta integración. Pídele a un administrador que las configure."+msgid "This Carbon instance is missing its Onshape OAuth credentials. Ask an administrator to set them."msgstr "Esta instancia de Carbon no tiene credenciales OAuth de Onshape. Pide a un administrador que las configure."@@ -24442,9 +24851,15 @@ msgstr "Esta información será visible para todos los usuarios, así que ten cumsgid "this inspection plan"msgstr "este plan de inspección"+msgid "This integration can't be connected on this Carbon instance."+msgstr "Esta integración no se puede conectar en esta instancia de Carbon."+msgid "This integration isn't available yet"msgstr "Esta integración aún no está disponible"+msgid "This integration isn't configured"+msgstr "Esta integración no está configurada"+#. placeholder {0}: company?.name ?? "Carbon"msgid "This invitation to join {0} has expired. You can request a new invite to be sent to your email."msgstr "Esta invitación para unirse a {0} ha vencido. Puedes solicitar que se envíe una nueva invitación a tu correo electrónico."@@ -24627,6 +25042,9 @@ msgstr "Esta estación ejecuta trabajo protegido por habilidad — solo se ejecumsgid "This station runs work with no ability requirement; operators assigned on the manning board shape available labor."msgstr "Esta estación ejecuta trabajo sin requisito de habilidad; los operarios asignados en el tablero de personal moldean la mano de obra disponible."+msgid "This step expected a list."+msgstr "Este paso esperaba una lista."+msgid "This step is part of it"msgstr "Este paso es parte de él"@@ -24817,6 +25235,9 @@ msgstr "ajustado"msgid "Tightened"msgstr "Rigurosa"+msgid "Time"+msgstr "Hora"+msgid "Time and dollar utilization of the rental fleet by asset and class"msgstr "Utilización de tiempo y dólares de la flota de alquiler por activo y clase"@@ -24862,6 +25283,9 @@ msgstr "Inclinar acercándose"msgid "Title"msgstr "Título"+msgid "Title of the event"+msgstr "Título del evento"+msgid "Title passes to the customer when the term ends."msgstr "El título se transfiere al cliente cuando termina el plazo."@@ -24967,6 +25391,14 @@ msgstr "Tolerancia (días)"msgid "Tomorrow"msgstr "Mañana"+msgid "Took {took} values; kept the first {kept}."+msgstr "Se tomaron {took} valores; se conservaron los primeros {kept}."++msgid "Took the first of {total}."+msgstr "Se tomó el primero de {total}."++msgid "Took the last of {total}."+msgstr "Se tomó el último de {total}."msgid "Too many exports and bulk actions are running right now. Try again in a few minutes."msgstr "Hay demasiadas exportaciones y acciones masivas en curso. Inténtelo de nuevo en unos minutos."@@ -25298,6 +25730,9 @@ msgstr "Disparadores"msgid "Try a different name."msgstr "Intenta un nombre diferente."+msgid "Try again"+msgstr "Intente de nuevo"+msgid "Tuesday"msgstr "Martes"@@ -25368,6 +25803,9 @@ msgstr "Escriba <0>\"{confirmPhrase}\"</0> para continuar."msgid "Type a message..."msgstr "Escribe un mensaje..."+msgid "Type a value and press Enter…"+msgstr "Escriba un valor y presione Intro…"+msgid "Type an email and press Enter to add an external recipient"msgstr "Escribe un correo electrónico y presiona Intro para agregar un destinatario externo"@@ -25449,6 +25887,9 @@ msgstr "Pagos sin descuento aún por venir, por ejercicio fiscal, menos el intermsgid "Undo"msgstr "Deshacer"+msgid "Unfurl Links"+msgstr "Desplegar enlaces"+msgid "Ungroup"msgstr "Desagrupar"@@ -25969,6 +26410,9 @@ msgstr "Permisos de Usuario"msgid "User roles"msgstr "Roles de usuario"+msgid "Username"+msgstr "Nombre de usuario"+msgid "users"msgstr "usuarios"@@ -26753,6 +27197,9 @@ msgstr "Cuando está activado, esta sobrescritura de precio se aplica a los pedimsgid "When on, this rule fires for every target of its type. Assignment rows are ignored but preserved."msgstr "Cuando está activado, esta regla se dispara para cada objetivo de su tipo. Las filas de asignación se ignoran pero se conservan."+msgid "When replying to a thread, also make the message visible to everyone in the channel (only applicable when Thread Timestamp is provided)"+msgstr "Al responder a un hilo, también haga visible el mensaje a todos en el canal (solo aplicable cuando se proporciona la marca de tiempo del hilo)"+msgid "When supplier responses are expected back; suppliers see this date on the RFQ portal and Carbon stops accepting late responses after it (configurable)."msgstr "Cuándo se espera que respondan los proveedores; los proveedores ven esta fecha en el portal RFQ y Carbon deja de aceptar respuestas tardías después de ella (configurable)."@@ -26924,6 +27371,9 @@ msgstr "Si este trabajo bloquea la producción (Paro), la degrada (Impacto), estmsgid "Whether to Add the selected permissions on top of what each user already has, or Update by replacing each user's permission set wholesale with the selection below."msgstr "Si se Agregan los permisos seleccionados además de lo que cada usuario ya tiene, o se Actualizan reemplazando el conjunto de permisos de cada usuario con la selección a continuación."+msgid "Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves."+msgstr "Indica si los eventos recurrentes se expanden en instancias y solo se devuelven eventos únicos e instancias de eventos recurrentes, pero no los eventos recurrentes subyacentes."+msgid "Which document drives each inspection flow for this item."msgstr "Qué documento conduce cada flujo de inspección para este artículo."@@ -27227,6 +27677,9 @@ msgstr "Perteneces a más de una empresa. Elige dónde trabajar."msgid "You can change the UI style any time through the theme setting"msgstr "Puedes cambiar el estilo de la interfaz en cualquier momento a través la configuración de tema"+msgid "You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.'"+msgstr "Puede obtener el ID del canal haciendo clic derecho en el canal y seleccionando \"Ver detalles del canal\"."+msgid "You can only see this key once. Store it safely."msgstr "Solo puedes ver esta clave una vez. Guárdala de forma segura."@@ -27278,6 +27731,9 @@ msgstr "Tú diriges"msgid "You name a project owner with decision authority"msgstr "Designa un propietario del proyecto con autoridad para tomar decisiones"+msgid "You need permission to edit workflows to load these choices."+msgstr "Necesitas permiso para editar flujos de trabajo para cargar estas opciones."+msgid "You received this item"msgstr "Recibiste este artículo"diff --git a/packages/locale/locales/es/mes.po b/packages/locale/locales/es/mes.poindex 20012bcfb4..39f0021d7e 100644--- a/packages/locale/locales/es/mes.po+++ b/packages/locale/locales/es/mes.po@@ -113,6 +113,9 @@ msgstr "Una finalización anterior no se completó. Reintentar reanuda los pasosmsgid "About"msgstr "Acerca de"+msgid "About this field"+msgstr "Acerca de este campo"+msgid "Accept"msgstr "Aceptar"@@ -1234,6 +1237,9 @@ msgstr "No hay mantenimiento programado para hoy"msgid "No matches. Type to create one."msgstr "Sin coincidencias. Escribe para crear una."+msgid "No matching time"+msgstr "Ninguna hora coincide"+msgid "No materials"msgstr "Sin materiales"@@ -2144,6 +2150,9 @@ msgstr "Miniatura"msgid "Tick the jobs this was done for."msgstr "Marca las órdenes de trabajo para las que se hizo esto."+msgid "Time"+msgstr "Hora"+msgid "Time and cost split across jobs proportionally to quantity."msgstr "El tiempo y el costo se distribuyen entre las órdenes de trabajo proporcionalmente a la cantidad."diff --git a/packages/locale/locales/fr/erp.po b/packages/locale/locales/fr/erp.poindex 96d5e7a0cb..c627a3b6df 100644--- a/packages/locale/locales/fr/erp.po+++ b/packages/locale/locales/fr/erp.po@@ -269,6 +269,10 @@ msgstr "{0} factures ont été facturées dans votre système précédent et nemsgid "{0} is {1}, not Draft or Planned"msgstr ""+#. placeholder {0}: integration.name+msgid "{0} isn't installed yet. There's nothing to configure — install it to connect an account."+msgstr "{0} n'est pas encore installé. Il n'y a rien à configurer — installez-le pour connecter un compte."+#. placeholder {0}: data.quantitymsgid "{0} items marked as picked"msgstr ""@@ -481,6 +485,12 @@ msgstr "{alreadyPlannedItemCount} pièces ignorées – elles ont déjà des ordmsgid "{apOverduePct}% of payables"msgstr "{apOverduePct}% des dettes fournisseurs"+msgid "{appName} is connected, but needs to be reconnected before workflow steps can use it."+msgstr "{appName} est connecté, mais doit être reconnecté avant que les étapes du flux de travail puissent l'utiliser."++msgid "{appName} isn't connected yet. Connect an account before this step can do anything."+msgstr "{appName} n'est pas encore connecté. Connectez un compte avant que cette étape ne puisse faire quoi que ce soit."+msgid "{arOverduePct}% of receivables"msgstr "{arOverduePct}% des créances clients"@@ -594,6 +604,9 @@ msgstr "{inserted} insérés, {updated} mis à jour, {0} nécessitent correctionmsgid "{jobsMissingStorageUnit, plural, one {# open job has materials with no storage unit} other {# open jobs have materials with no storage unit}}"msgstr "{jobsMissingStorageUnit, plural, one {# ordre de fabrication ouvert a des matériaux sans unité de stockage} other {# ordres de fabrication ouverts ont des matériaux sans unité de stockage}}"+msgid "{kept, plural, one {Took # value.} other {Took # values.}}"+msgstr "{kept, plural, one {# valeur prise.} other {# valeurs prises.}}"+msgid "{label} is used by documents, journals or default accounts, so it cannot be deleted."msgstr "{label} est utilisé par des documents, des écritures ou des comptes par défaut, il ne peut donc pas être supprimé."@@ -746,6 +759,9 @@ msgstr "{state} · synchronisé {syncedAgo}"msgid "{termMonths, plural, one {# month} other {# months}}"msgstr "{termMonths, plural, one {# mois} other {# mois}}"+msgid "{total, plural, one {Joined # value.} other {Joined # values.}}"+msgstr "{total, plural, one {# valeur jointe.} other {# valeurs jointes.}}"+msgid "{total} phases to get your company live on Carbon. Each one ends at a checkpoint."msgstr "{total} phases pour mettre votre société en direct sur Carbon. Chacune se termine à un point de contrôle."@@ -1217,7 +1233,7 @@ msgid "A Make to Order component whose parts are issued together into the parentmsgstr "Un composant de fabrication à la commande dont les pièces sont émises ensemble dans l'ordre de fabrication parent – sans fabrication séparée."msgid "A managed cloud-hosted version of Carbon"-msgstr "Une version gérée de Carbon hébergée en nuage."+msgstr "Une version cloud hébergée de Carbon"msgid "A managed version with all the advanced features"msgstr "Une version managée avec toutes les fonctionnalités avancées"@@ -1651,6 +1667,9 @@ msgstr "Un Utilisateur enregistre la date de Péremption pour chaque Lot de prodmsgid "A variable charge — mileage overage, damage, delivery, cleaning — is billed on the agreement's next invoice."msgstr "Une charge variable — dépassement de kilométrage, dommages, livraison, nettoyage — est facturée sur la prochaine facture de l'accord."+msgid "A workspace can be connected to one Carbon company only. Disconnect it there first, or connect a different workspace."+msgstr "Un espace de travail ne peut être connecté qu'à une seule société Carbon. Déconnectez-le d'abord de celle-ci, ou connectez un autre espace de travail."+msgid "ABA"msgstr "ABA"@@ -1672,6 +1691,9 @@ msgstr "À propos"msgid "About (notification)"msgstr "À propos (notification)"+msgid "About this field"+msgstr "À propos de ce champ"+msgid "Absent"msgstr "Absent"@@ -1838,6 +1860,9 @@ msgstr ""msgid "Accounts receivable for amounts owed by customers"msgstr "Comptes débiteurs pour les montants dus par les clients."+msgid "Accounts your workflows can act as. Add one for each account a workflow step should use."+msgstr "Les comptes qui peuvent être utilisés par vos workflows. Ajoutez-en un pour chaque compte qu'une étape de workflow doit utiliser."+msgid "Accrual"msgstr "Produit constaté d'avance"@@ -2055,6 +2080,9 @@ msgstr "Ajouter une étape ou une question"msgid "Add Ability"msgstr "Ajouter une Compétence"+msgid "Add account"+msgstr "Ajouter un compte"+msgid "Add Account"msgstr "Ajouter un compte"@@ -2196,6 +2224,10 @@ msgstr "Ajouter un mois"msgid "Add Note"msgstr "Ajouter une note"+msgctxt "workflow data step"+msgid "Add operation"+msgstr "Ajouter une opération"+msgid "Add Operation"msgstr "Ajouter une opération"@@ -2434,6 +2466,9 @@ msgstr "Avancer vers {nextStatus}"msgid "Advanced"msgstr "Avancé"+msgid "Advanced properties"+msgstr "Propriétés avancées"+msgid "Affected item not found."msgstr "Article affecté non trouvé."@@ -2657,6 +2692,12 @@ msgstr "Les montants n'affichent que les chiffres qui ont une valeur."msgid "An ability is a process's qualification. Only processes without one are listed."msgstr "Une compétence est la qualification d'un procédé. Seuls les procédés sans qualification sont répertoriés."+msgid "An account is already called that — pick a different name."+msgstr "Un compte porte déjà ce nom — choisissez un nom différent."++msgid "An account is missing from this list until it is reconnected."+msgstr "Un compte manque de cette liste jusqu'à ce qu'il soit reconnecté."+msgid "An accounting bucket that groups expenses by department or function so the GL can report spend by group, not just by account."msgstr "Un groupement comptable qui regroupe les charges par département ou fonction afin que le grand livre puisse signaler les dépenses par groupe, et pas seulement par compte."@@ -2822,6 +2863,9 @@ msgstr "Une erreur inattendue s'est produite lors de la connexion à Onshape. Enmsgid "An unexpected error occurred while connecting to Onshape. Try connecting again."msgstr "Une erreur inattendue s'est produite lors de la connexion à Onshape. Réessayez de vous connecter."+msgid "An unexpected error occurred while connecting. Try connecting again."+msgstr "Une erreur inattendue s'est produite lors de la connexion. Essayez de vous reconnecter."+msgid "Analytics"msgstr "Analyse"@@ -2839,9 +2883,6 @@ msgstr "Et {0} de plus — résolvez ceux-ci pour voir le reste."msgid "And {0} more. Resolve these to see the rest."msgstr "Et {0} autres. Résolvez-les pour voir le reste."-msgid "and {hidden} more"-msgstr "et {hidden} plus"-msgid "and {remaining} more"msgstr "et {remaining} autres"@@ -2878,6 +2919,9 @@ msgstr "Taux annuel auquel le loyer est actualisé"msgid "Annual. Starts from the company's incremental borrowing rate"msgstr "Annuel. Commence à partir du taux d'emprunt supplémentaire de la Société."+msgid "Another connection to this integration already has that name. Choose a different one."+msgstr "Une autre connexion à cette intégration porte déjà ce nom. Choisissez un nom différent."+msgid "Another cost center this one rolls up into, letting you nest a sub-department under its parent for hierarchical cost reporting."msgstr "Un autre centre de coûts auquel celui-ci se rapporte, vous permettant d'imbriquer un sous-centre de coûts sous son supérieur pour des rapports de coûts hiérarchiques."@@ -2948,6 +2992,9 @@ msgid "API keys for programmatic access to your Carbon data."msgstr "Clés API pour un accès programmatique à vos données Carbon."msgid "API, webhooks, and integrations"+msgstr "API, webhooks et intégrations"++msgid "App"msgstr "API, Webhooks et Intégrations"msgid "Appearance"@@ -3882,6 +3929,9 @@ msgstr "Les pièces jointes n'ont pas pu être chargées"msgid "Attempts"msgstr "Tentatives"+msgid "Attendees"+msgstr "Participants"+msgid "Attribute"msgstr "Attribut"@@ -3924,6 +3974,9 @@ msgstr "Application d'authentification"msgid "Authenticator QR code"msgstr "Code QR de l'authentificateur"+msgid "Authorization was refused. Try connecting again."+msgstr "L'autorisation a été refusée. Essayez de vous reconnecter."+msgid "Authorized overtime on top of the shift"msgstr "Heures supplémentaires autorisées en plus de l'Équipe"@@ -3984,6 +4037,9 @@ msgstr "Mises à jour automatiques et sauvegardes"msgid "Automatic, prorated consumption of a job's untracked materials when output is reported — tracked materials are issued manually."msgstr "Consommation automatique au prorata des matériaux non tracés d'un travail lors du signalement de la production — les matériaux tracés sont émis manuellement."+msgid "Automatically create a Google Meet video conference link for this event"+msgstr "Créer automatiquement un lien de vidéoconférence Google Meet pour cet événement"+msgid "Automatically release the job when the kanban is scanned"msgstr "Lancer automatiquement l'ordre de fabrication lorsque le kanban est scanné"@@ -4193,6 +4249,9 @@ msgstr "Lots de production à retourner"msgid "Batching"msgstr "Regroupement en lots"+msgid "BCC Email"+msgstr "BCC E-mail"+msgid "Becomes"msgstr "Devient"@@ -4370,6 +4429,12 @@ msgstr "Tableau"msgid "Body"msgstr "Corps"+msgid "Body for the email you want to send"+msgstr "Contenu de l'e-mail que vous souhaitez envoyer"++msgid "Body Type"+msgstr "Type de corps"+msgid "BoM"msgstr "BoM"@@ -4427,6 +4492,9 @@ msgstr "Fil d'Ariane"msgid "Bring in your parts, BOMs, Bill of Process, and costing — with Carbon's import tools, CSV, or LLM help."msgstr "Apportez vos pièces, BOMs, Listes des opérations et calcul des coûts — avec les outils d'importation de Carbon, CSV ou aide LLM."+msgid "Broadcast reply to channel"+msgstr "Répondre à la chaîne"+msgid "Browse library"msgstr "Parcourir la bibliothèque"@@ -4513,6 +4581,9 @@ msgstr ""msgid "By accepting the invite, you agree to the <0>Terms of Service</0> and <1>Privacy Policy</1>."msgstr "En acceptant l'invitation, vous acceptez les <0>Conditions d'utilisation</0> et la <1>Politique de confidentialité</1>."+msgid "By default it'll be 30 min post start time"+msgstr "Par défaut, ce sera 30 minutes après l'heure de début"+msgid "By dimension"msgstr "Par Axe analytique"@@ -4881,6 +4952,9 @@ msgstr "Exécution causale : "msgid "CC"msgstr "CC"+msgid "CC Email"+msgstr "CC E-mail"+msgid "Centralized Billing Address"msgstr "Adresse de facturation centralisée"@@ -4998,6 +5072,12 @@ msgstr "Modifier ceci mettra à jour l'ID de pièce"msgid "Changing type resets this item's draft edits."msgstr "Modifier le type réinitialise les brouillons de cet article."+msgid "Channel"+msgstr "Canal"++msgid "Channel Name"+msgstr "Nom du canal"+msgid "Characteristic"msgstr "Caractéristique"@@ -5078,6 +5158,9 @@ msgstr "Point de contrôle ·"msgid "Checkpoints"msgstr "Points de contrôle"+msgid "Choose {named} first."+msgstr "Choisissez {named} d'abord."+msgid "Choose a backup"msgstr "Choisir une sauvegarde"@@ -5333,6 +5416,9 @@ msgstr "Réduire la configuration"msgid "Collapse subtree"msgstr "Réduire le sous-arbre"+msgid "Color"+msgstr "Couleur"+#. placeholder {0}: index + 1msgid "Column {0} of {count}"msgstr "Colonne {0} sur {count}"@@ -5594,6 +5680,9 @@ msgstr "Configurez les comptes par défaut utilisés pour différents types de tmsgid "Configure the start months for your fiscal and tax years"msgstr "Configurer les mois de début de vos exercices comptables et fiscaux"+msgid "Configure the steps above first."+msgstr "Configurez d'abord les étapes ci-dessus."+msgid "Configure when purchased item costs should be updated from supplier transactions."msgstr "Configurez quand les coûts des articles achetés doivent être mis à jour à partir des transactions des fournisseurs."@@ -5690,6 +5779,9 @@ msgstr "Motif du conflit"msgid "Connect"msgstr "Se connecter"+msgid "Connect {appName}"+msgstr "Connecter {appName}"+msgid "Connect Carbon to your accounting, project management, and CAD tools and much more."msgstr "Connectez Carbon à vos outils de comptabilité, de gestion de projet, de CAO et bien d'autres."@@ -5717,9 +5809,18 @@ msgstr "Connectez les outils externes que votre société utilise déjà"msgid "Connect your identity provider by pasting either its metadata URL or its raw metadata XML — exactly one of the two."msgstr "Connectez votre fournisseur d'identité en collant soit son URL de métadonnées, soit son XML de métadonnées brutes — exactement l'un des deux."+msgid "Connected before workflows needed extra permissions. Reconnect to grant them — everything else keeps working meanwhile."+msgstr "Connecté avant que les workflows n'aient besoin de permissions supplémentaires. Reconnectez-vous pour les accorder — tout le reste continue de fonctionner en attendant."+msgid "Connected to"msgstr "Connecté à"+msgid "Connection"+msgstr "Connexion"++msgid "Connection name"+msgstr "Nom de la connexion"+msgid "Console Mode"msgstr "Mode Console"@@ -6336,6 +6437,12 @@ msgstr "Impossible de lancer {0} : {1}"msgid "Could not save"msgstr "N'a pas pu enregistrer"+msgid "Couldn't check whether {appName} is connected."+msgstr "Impossible de vérifier si {appName} est connecté."++msgid "Couldn't complete the connection"+msgstr "Impossible de finaliser la connexion"+msgid "Couldn't complete the Onshape connection"msgstr "Impossible d'établir la connexion Onshape"@@ -6351,12 +6458,18 @@ msgstr "Impossible de charger d'autres lignes"msgid "Couldn't load related documents. Refresh before creating a new one to avoid duplicates."msgstr "Impossible de charger les documents associés. Actualisez avant de créer un nouveau pour éviter les doublons."+msgid "Couldn't load the choices for this field."+msgstr "Impossible de charger les choix pour ce champ."+msgid "Couldn't load the provider's dimension targets — check the connection and reload."msgstr "Impossible de charger les cibles de l'Axe analytique du fournisseur — vérifiez la connexion et rechargez."msgid "Couldn't reschedule the job. Please try again."msgstr "Impossible de reprogrammer le travail. Veuillez réessayer."+msgid "Couldn't save the connection"+msgstr "Impossible d'enregistrer la connexion"+msgid "Couldn't save the Onshape connection"msgstr "Impossible d'enregistrer la connexion Onshape"@@ -6366,6 +6479,12 @@ msgstr "Impossible d'enregistrer la connexion à Onshape Government"msgid "Couldn't save the Ramp connection"msgstr "Impossible d’enregistrer la connexion Ramp"+msgid "Couldn't start the {name} connection"+msgstr "Impossible de démarrer la connexion {name}"++msgid "Couldn't start the authorization."+msgstr "Impossible de démarrer l'autorisation."+msgid "Count"msgstr "Nombre"@@ -6375,6 +6494,12 @@ msgstr "Historique des comptages"msgid "Count ID"msgstr "ID de comptage"+msgid "Count items"+msgstr "Compter les articles"++msgid "Counted {total}."+msgstr "Total compté : {total}."+msgid "Counted Qty"msgstr "Quantité comptée"@@ -6479,6 +6604,9 @@ msgstr "Créer un contrat"msgid "Create Forecast"msgstr "Créer une prévision"+msgid "Create Google Meet Link"+msgstr "Créer un lien Google Meet"+msgid "Create Issue"msgstr "Créer un problème"@@ -7116,6 +7244,9 @@ msgstr "Date"msgid "Date Acquired"msgstr "Date d'acquisition"+msgid "Date and time"+msgstr "Date et heure"+msgid "Date Calibrated"msgstr "Date d'étalonnage"@@ -7125,6 +7256,9 @@ msgstr "Date d'échéance"msgid "Date Due"msgstr "Date d'échéance"+msgid "Date from"+msgstr "Date du"+msgid "Date issued"msgstr "Date d'émission"@@ -7137,6 +7271,9 @@ msgstr "Date de paiement"msgid "Date Paid"msgstr "Date de paiement"+msgid "Date to"+msgstr "Date au"+msgid "Dates"msgstr "Dates"@@ -8006,6 +8143,9 @@ msgstr "Description du changement"msgid "Description of Issue"msgstr "Description du problème"+msgid "Description of the event. You can use HTML tags here."+msgstr "Description de l'événement. Vous pouvez utiliser des balises HTML ici."+msgid "Detach"msgstr "Détacher"@@ -8111,6 +8251,9 @@ msgstr "Rejeté"msgid "Disconnect"msgstr "Déconnecter"+msgid "Disconnected"+msgstr "Déconnecté"+msgid "Discontinuation date"msgstr "Date d'arrêt"@@ -9071,6 +9214,9 @@ msgstr "E-mail"msgid "Email Address"msgstr "Adresse e-mail"+msgid "Email address to set as the \"Reply-To\" header"+msgstr "Adresse e-mail à définir comme en-tête « Répondre à »"+msgid "Email Domains"msgstr "Domaines de messagerie"@@ -9086,6 +9232,9 @@ msgstr "Envoyé par e-mail"msgid "Emails"msgstr "E-mails"+msgid "Emails of the attendees (guests)"+msgstr "Adresses e-mail des participants (invités)"+msgid "Emoji"msgstr "Emoji"@@ -9155,6 +9304,9 @@ msgstr "Activez les devis numériques pour votre société. Cela vous permettramsgid "Enable in Settings"msgstr "Activer dans les paramètres"+msgid "Enable link unfurling for this message"+msgstr "Activer le dépliage des liens pour ce message"+msgid "Enable notifications when a sales rule violation is blocked or acknowledged on a quote, sales order, or sales invoice."msgstr "Activez les notifications lorsqu'une violation de règle de vente est bloquée ou confirmée sur un devis, une commande client ou une facture de vente."@@ -9236,6 +9388,9 @@ msgstr "Fin"msgid "End Date"msgstr "Date de fin"+msgid "End date time of the event"+msgstr "Date et heure de fin de l'événement"+msgid "End Line"msgstr "Terminer la ligne"@@ -9568,6 +9723,9 @@ msgstr ""msgid "Event Type"msgstr "Type d'événement"+msgid "Event types"+msgstr "Types d'événement"+msgid "Events"msgstr "Événements"@@ -9746,6 +9904,9 @@ msgstr "Développer la ligne"msgid "Expand Machine"msgstr "Développer Machine"+msgid "Expand Recurring Event?"+msgstr "Développer les événements récurrents ?"+msgid "Expand row"msgstr "Développer la ligne"@@ -10584,6 +10745,9 @@ msgstr "Corrigez-les dans les fichiers, puis téléversez-les à nouveau"msgid "Fix these jobs before releasing"msgstr "Corrigez ces ordres de fabrication avant de lancer"+msgid "Fix this"+msgstr "Corriger cela"+msgid "Fixed"msgstr "Fixe"@@ -11052,6 +11216,12 @@ msgstr "Rapprochement du grand livre"msgid "GL Tie-Out"msgstr "Rapprochement du grand livre"+msgid "Gmail"+msgstr "Gmail"++msgid "Gmail: Send Email"+msgstr "Gmail : Envoyer un e-mail"+msgid "Go live right the first time — with our team alongside you"msgstr "Lancez-vous correctement du premier coup — avec notre équipe à vos côtés"@@ -11107,6 +11277,15 @@ msgstr "Bonsoir, {name}."msgid "Good morning, {name}."msgstr "Bonjour, {name}."+msgid "Google Calendar"+msgstr "Google Agenda"++msgid "Google Calendar: Create Event"+msgstr "Google Calendar : Créer un événement"++msgid "Google Calendar: Get all Events"+msgstr "Google Calendar : Obtenir tous les événements"+msgid "Google Places API key not configured"msgstr "Clé API Google Places non configurée"@@ -11167,6 +11346,15 @@ msgstr "Résiduel garanti"msgid "Guaranteed Residual Value"msgstr "Valeur résiduelle garantie"+msgid "Guests can invite others"+msgstr "Les invités peuvent inviter d'autres personnes"++msgid "Guests can modify"+msgstr "Les invités peuvent modifier"++msgid "Guests can see other guests"+msgstr "Les invités peuvent voir les autres invités"+msgid "Guided"msgstr "Guidé"@@ -11518,6 +11706,9 @@ msgstr "IBAN"msgid "IC Transaction"msgstr "Transaction intersociétés"+msgid "Icon Emoji"+msgstr "Emoji d'icône"+msgid "Id"msgstr "Id"@@ -12282,6 +12473,9 @@ msgstr "est le ou après"msgid "is on or before"msgstr "est le ou avant"+msgid "Is Private?"+msgstr "Privé ?"+msgid "Is supplier org group"msgstr "Est un groupe d'organisation fournisseur"@@ -12354,6 +12548,9 @@ msgstr ""msgid "It is coming soon. Contact Carbon to have it set up for your company."msgstr "Elle sera bientôt disponible. Contactez Carbon pour la faire configurer pour votre entreprise."+msgid "It was removed after this page loaded. Reload the page and try again."+msgstr "Il a été supprimé après le chargement de cette page. Rechargez la page et réessayez."+msgid "It will stop running until you publish a version again. Nothing is deleted."msgstr "Elle s'arrêtera d'être exécutée jusqu'à ce que vous publiiez une nouvelle version. Rien n'est supprimé."@@ -12550,6 +12747,9 @@ msgstr "Ordres de fabrication qui ont cet article sur leur nomenclature"msgid "Join {0}"msgstr "Rejoindre {0}"+msgid "Join into text"+msgstr "Joindre au texte"+msgid "Journal"msgstr "Écriture"@@ -12616,6 +12816,9 @@ msgstr "Conserver la tarification existante, ajouter uniquement les nouveaux artmsgid "Keep Line"msgstr "Conserver la ligne"+msgid "Keep matching items"+msgstr "Conserver les articles correspondants"+msgid "Keep navigation open"msgstr "Garder la navigation ouverte"@@ -12634,6 +12837,12 @@ msgstr "Continuer le prélèvement"msgid "Keeps orders, quotes, and settings behind a second check"msgstr "Garde les commandes, les devis et les paramètres derrière une deuxième vérification"+msgid "Kept {kept} of {total}; {unresolved} could not be checked."+msgstr "{kept} sur {total} conservés ; {unresolved} n'ont pas pu être vérifiés."++msgid "Kept {kept} of {total}."+msgstr "{kept} sur {total} conservés."+msgid "Key"msgstr "Clé"@@ -14875,6 +15084,9 @@ msgstr "Aucun accès"msgid "No accounts are mapped yet"msgstr "Aucun compte n'est encore mappé"+msgid "No accounts connected yet."+msgstr "Aucun compte connecté pour le moment."+msgid "No accounts match your search"msgstr "Aucun compte ne correspond à votre recherche"@@ -14930,6 +15142,9 @@ msgstr "Pas encore d'actifs. Ajoutez chaque actif couvert par le contrat, avec lmsgid "No attachments."msgstr "Aucune pièce jointe."+msgid "No authorization code was returned"+msgstr "Aucun code d'autorisation n'a été retourné"+msgid "No available filters"msgstr "Aucun filtre disponible"@@ -15130,6 +15345,9 @@ msgstr "Aucun chemin d'échec — l'exécution s'arrête ici et est marquée commsgid "No fair value entered, counts as not met"msgstr "Aucune valeur équitable entrée, compte comme non satisfait"+msgid "No field was chosen to take."+msgstr "Aucun champ à prendre n'a été choisi."+msgid "No fields found."msgstr "Aucun champ trouvé."@@ -15250,6 +15468,9 @@ msgstr "Aucun casier correspondant"msgid "No matching operations"msgstr "Aucune opération correspondante"+msgid "No matching time"+msgstr "Aucune heure correspondante"+msgid "No materials"msgstr "Aucun matériau"@@ -15765,6 +15986,9 @@ msgstr "Rien"msgid "Nothing at this location matches \"{0}\"."msgstr "Rien à cet emplacement ne correspond à \"{0}\"."+msgid "Nothing can work on this result."+msgstr "Rien ne peut fonctionner sur ce résultat."+msgid "Nothing completed in MES yet"msgstr "Rien n'a encore été terminé dans MES"@@ -15798,6 +16022,9 @@ msgstr "Rien de programmé — ajoutez une station ci-dessous."msgid "Nothing selected yet"msgstr "Aucune sélection pour le moment"+msgid "Nothing to choose yet - <0>set one up in Settings</0>."+msgstr "Rien à choisir pour le moment - <0>configurez-en un dans Paramètres</0>."+msgid "Nothing to post for this period."msgstr "Rien à comptabiliser pour cette période."@@ -16008,6 +16235,9 @@ msgstr "1 {0} équivaut à combien de {1} ?"msgid "One firing of a workflow, recorded step by step with the values each step used and produced, acting throughout with the permissions of the workflow's owner."msgstr "Une exécution d'un workflow, enregistrée étape par étape avec les valeurs que chaque étape a utilisées et produites, agissant tout au long avec les autorisations du propriétaire du workflow."+msgid "One of your {appName} accounts needs to be reconnected before workflow steps can use it."+msgstr "L'un de vos comptes {appName} doit être reconnecté avant que les étapes du flux de travail puissent l'utiliser."+msgid "One or more quantities cannot meet this date"msgstr "Une ou plusieurs quantités ne peuvent pas respecter cette date"@@ -16131,6 +16361,9 @@ msgstr "Ouvrir"msgid "Open ({paymentCurrency})"msgstr "Ouvert ({paymentCurrency})"+msgid "Open {appName} accounts"+msgstr "Ouvrir les comptes {appName}"+msgid "Open a change notice"msgstr "Ouvrir un avis de modification"@@ -16320,6 +16553,10 @@ msgstr "opération"msgid "Operation"msgstr "Opération"+msgctxt "workflow data step"+msgid "Operation"+msgstr "Opération"+msgid "Operation batch"msgstr "Lot de production d'opération"@@ -17129,6 +17366,9 @@ msgstr "Choisissez un client, un type de client ou Tous les clients pour affichemsgid "Pick a date or leave blank to clear it."msgstr "Choisissez une date ou laissez vide pour l'effacer."+msgid "Pick a field…"+msgstr "Sélectionner un champ…"+msgid "Pick a list variable…"msgstr "Choisir une variable de liste…"@@ -17818,6 +18058,9 @@ msgstr "Production : application d'atelier et planification"msgid "Profile"msgstr "Profil"+msgid "Profile Picture"+msgstr "Photo de profil"+msgid "Profit Percent"msgstr "Pourcentage de profit"@@ -17928,6 +18171,9 @@ msgstr "Prouvez la propriété de chaque domaine de messagerie avec un enregistrmsgid "Provide process knowledge and inputs"msgstr "Fournir les connaissances et les données du processus"+msgid "Provide the ts (timestamp) or link value of the **parent** message to make this message a reply. Do not use the ts value of the reply itself; use its parent instead. For example '1710304378.475129'.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the 'Copy link' option."+msgstr "Fournissez la valeur ts (timestamp) ou le lien du message **parent** pour faire de ce message une réponse. N'utilisez pas la valeur ts de la réponse elle-même ; utilisez plutôt celle de son parent. Par exemple « 1710304378.475129 ». Vous pouvez également facilement obtenir le lien du message en cliquant sur les trois points à côté du message parent et en sélectionnant l'option « Copier le lien »."+msgid "Provide these URLs to your identity provider (Okta, Entra ID, Google Workspace, etc.) when registering Carbon as a SAML application."msgstr "Fournissez ces URL à votre fournisseur d'identité (Okta, Entra ID, Google Workspace, etc.) lors de l'enregistrement de Carbon en tant qu'application SAML."@@ -18731,6 +18977,9 @@ msgstr "Les quantités reçues commencent à zéro"msgid "Received quantity not yet credited. The credit memo is created as a draft."msgstr "Quantité reçue non encore facturisée. L'avoir est créé en tant que brouillon."+msgid "Receiver Email (To)"+msgstr "E-mail du destinataire (À)"+msgid "Receives the invoice email"msgstr "Reçoit l'e-mail de facture"@@ -18788,6 +19037,21 @@ msgstr "Rapprochement d'un bon de commande par rapport à ce qui a été reçu emsgid "Reconfigure"msgstr "Reconfigurer"+msgid "Reconnect"+msgstr "Reconnecter"++msgid "Reconnect {appName}"+msgstr "Reconnecter {appName}"++msgid "Reconnect it"+msgstr "Le reconnecter"++msgid "Reconnect needed"+msgstr "Reconnexion nécessaire"++msgid "Reconnect with the account this connection already uses, or use Add account to connect the other one."+msgstr "Reconnectez-vous avec le compte que cette connexion utilise déjà, ou utilisez Ajouter un compte pour connecter l'autre."+msgid "Record"msgstr "Enregistrer"@@ -18833,9 +19097,16 @@ msgstr "Enregistrements"msgid "Records and posted journals are being sent to and received from this provider."msgstr "Les enregistrements et les écritures comptabilisées sont envoyés à et reçus de ce fournisseur."+msgid "Records here appear as plain text — {appLabel} doesn't support links in this field."+msgstr "Les enregistrements ici s'affichent en texte brut — {appLabel} ne supporte pas les liens dans ce champ."+msgid "Records moved"msgstr "Enregistrements déplacés"+#. placeholder {0}: notice.params.equals+msgid "Records will be plain text. Set {siblingLabel} to {0} (under Advanced) to turn them into links."+msgstr "Les enregistrements seront du texte brut. Définissez {siblingLabel} à {0} (sous Avancé) pour les transformer en liens."+msgid "Recost"msgstr "Réévaluer le coût"@@ -19182,6 +19453,10 @@ msgstr "Retirer les numéros de série et de lot reçus du stock"msgid "Remove this item"msgstr "Retirer cet article"+msgctxt "workflow data step"+msgid "Remove this operation"+msgstr "Supprimer cette opération"+msgid "Remove this storage type from all referencing storage units and delete it. This cannot be undone."msgstr "Retirer ce type de stockage de toutes les unités de stockage qui le référencent et le supprimer. Cela ne peut pas être annulé."@@ -19216,6 +19491,9 @@ msgstr "Renommer"msgid "Rename Workflow"msgstr "Renommer le flux de travail"+msgid "Renamed"+msgstr "Renommé"+msgid "Rendering label preview..."msgstr "Rendu de l'aperçu de l'étiquette..."@@ -19381,6 +19659,12 @@ msgstr "Mode d'approvisionnement"msgid "Replies to emailed invoices go here, and it's copied on each one."msgstr "Les réponses aux factures par e-mail vont ici et elle est copiée sur chaque message."+msgid "Reply to Thread (Thread Message Link/Timestamp)"+msgstr "Répondre au fil de discussion (Lien/Horodatage du message)"++msgid "Reply-To Email"+msgstr "Email Répondre à"+msgid "Report"msgstr "Rapport"@@ -19925,6 +20209,9 @@ msgstr "Révoquer l'invitation"msgid "Revoke Invites"msgstr "Révoquer les invitations"+msgid "Revoked"+msgstr "Révoqué"+msgid "Rework"msgstr "Retouche"@@ -20699,6 +20986,9 @@ msgstr "Rechercher des pièces fournisseur"msgid "Search suppliers..."msgstr "Rechercher des fournisseurs..."+msgid "Search Term"+msgstr "Terme de recherche"+msgid "Search tools..."msgstr "Rechercher des outils..."@@ -20800,6 +21090,9 @@ msgstr "Sélectionnez d'abord une forme pour voir les options disponibles"msgid "Select a step to hide parts on it."msgstr "Sélectionnez une étape pour masquer des pièces sur celle-ci."+msgid "Select a step…"+msgstr "Sélectionnez une étape…"+msgid "Select a substance and shape first to see available options"msgstr "Sélectionnez d'abord une substance et une forme pour voir les options disponibles"@@ -20818,6 +21111,9 @@ msgstr "Sélectionner tout"msgid "Select an action…"msgstr "Sélectionner une action…"+msgid "Select an app…"+msgstr "Sélectionnez une application…"+msgid "Select an assignee"msgstr "Sélectionner un assigné"@@ -20842,6 +21138,9 @@ msgstr "Sélectionner une opération…"msgid "Select an option"msgstr "Sélectionner une option"+msgid "Select an option…"+msgstr "Sélectionnez une option…"+msgid "Select at least one item to accept the quote"msgstr "Sélectionnez au moins un article pour accepter le devis"@@ -20875,6 +21174,9 @@ msgstr "Sélectionner un employé"msgid "Select Employee Type"msgstr "Sélectionner le type d'employé"+msgid "Select event types"+msgstr "Sélectionner les types d'événement"+msgid "Select field"msgstr "Sélectionner un champ"@@ -21026,6 +21328,9 @@ msgstr "Envoyer une invitation"msgid "Send Invites"msgstr "Envoyer les invitations"+msgid "Send Notifications"+msgstr "Envoyer des notifications"+msgid "Send RFQ to Suppliers"msgstr "Envoyer l'appel d'offres aux fournisseurs"@@ -21035,6 +21340,12 @@ msgstr "Envoyer à Carbon"msgid "Send Via"msgstr "Envoyer via"+msgid "Sender Email"+msgstr "Email de l'expéditeur"++msgid "Sender Name"+msgstr "Nom de l'expéditeur"+msgid "Sending defective units back to an earlier operation to be corrected instead of scrapping them."msgstr "Renvoi des unités défectueuses à une opération antérieure pour correction au lieu d'être mises au rebut."@@ -21802,6 +22113,18 @@ msgstr ""msgid "Slack"msgstr "Slack"+msgid "Slack: Create Channel"+msgstr "Slack : Créer un canal"++msgid "Slack: Find User by Email"+msgstr "Slack : Trouver un utilisateur par email"++msgid "Slack: Send Message To A Channel"+msgstr "Slack : Envoyer un message à un canal"++msgid "Slack: Send Message To A User"+msgstr "Slack : Envoyer un message à un utilisateur"+msgid "Slice asset activity by location, item, or any dimension"msgstr "Ventiler l'activité des immobilisations par site, article ou axe analytique"@@ -22041,6 +22364,9 @@ msgstr "Date de début"msgid "Start Date"msgstr "Date de début"+msgid "Start date time of the event"+msgstr "Date et heure de début de l'événement"+msgid "Start Expiration"msgstr "Démarrer l'expiration"@@ -22855,6 +23181,9 @@ msgstr "Étiquettes"msgid "Tailor this hub for the customer. Changes apply live for everyone viewing it. Never shown to the customer here."msgstr "Personnalisez ce hub pour le client. Les modifications s'appliquent en direct pour tous ceux qui le consultent. Jamais affiché au client ici."+msgid "Take one field from every item"+msgstr "Prendre un champ de chaque article"+msgid "Take out of service"msgstr "Retirer du service"@@ -22868,6 +23197,12 @@ msgstr "Assumer la propriété"msgid "Take Ownership: {0}"msgstr "Assumer la propriété : {0}"+msgid "Take the first item"+msgstr "Prendre le premier article"++msgid "Take the last item"+msgstr "Prendre le dernier article"+msgid "Take the shortest remaining shelf life across the materials consumed to make this item. Use when the product's expiry depends on its ingredients."msgstr "Prendre la durée de conservation la plus courte parmi les matières consommées pour fabriquer cet article. Utilisez-le lorsque la péremption du produit dépend de ses ingrédients."@@ -23115,11 +23450,8 @@ msgstr ""msgid "Test run"msgstr "Exécution de test"-msgid "Test run — results are not saved to the Runs page"-msgstr "Exécution de test — les résultats ne sont pas enregistrés sur la page Exécutions"--msgid "Test runs are not saved. Close this panel and the result is gone."-msgstr "Les exécutions de test ne sont pas enregistrées. Fermer ce panneau et le résultat disparaît."+msgid "Test runs are saved to the run history, marked as tests."+msgstr "Les exécutions de test sont enregistrées dans l'historique des exécutions, marquées comme tests."msgid "Test Value"msgstr "Valeur de test"@@ -23127,9 +23459,36 @@ msgstr "Valeur de test"msgid "Text size"msgstr "Taille du texte"+msgid "That account is still being reconnected. Try again in a moment."+msgstr "Ce compte est en cours de reconnexion. Réessayez dans un instant."++msgid "That account no longer exists"+msgstr "Ce compte n'existe plus"++msgid "That connection name is already used"+msgstr "Ce nom de connexion est déjà utilisé"++msgid "That field holds a list of its own. Turn on flattening to take it."+msgstr "Ce champ contient sa propre liste. Activez l'aplatissement pour le prendre."++msgid "That field holds several values, so they are combined into one list."+msgstr "Ce champ contient plusieurs valeurs, elles sont donc combinées en une seule liste."++msgid "That integration is not available"+msgstr "Cette intégration n'est pas disponible"++msgid "That list was empty."+msgstr "Cette liste était vide."+msgid "That name is already used by another step."msgstr "Ce nom est déjà utilisé par une autre étape."+msgid "That workspace is connected to another company"+msgstr "Cet espace de travail est connecté à une autre société"++msgid "That's a different account"+msgstr "C'est un autre compte"+#. placeholder {0}: i18n._(step.title)msgid "The \"{0}\" phase checks itself off once all of its tasks in the project plan are done."msgstr "La phase « {0} » se valide automatiquement une fois que toutes ses tâches du plan de projet sont terminées."@@ -23143,6 +23502,9 @@ msgstr "La phase « {0} » est faite — son point de contrôle « {1} » a étmsgid "The {0} phases to go live, each ending at a checkpoint. Tick off each task as you complete it."msgstr "Les {0} phases pour le lancement, chacune se terminant à un point de contrôle. Cochez chaque tâche au fur et à mesure que vous la terminez."+msgid "The {appName} account this step uses is not available — it was disconnected or needs to be reconnected."+msgstr "Le compte {appName} utilisé par cette étape n'est pas disponible — il a été déconnecté ou doit être reconnecté."+msgid "The accent color used across Carbon."msgstr "La couleur d'accent utilisée dans Carbon."@@ -23158,6 +23520,9 @@ msgstr "Les comptes sur lesquels Carbon enregistre automatiquement"msgid "The action that copies a saved method (its materials, operations, and work instructions) onto a job or quote line."msgstr "L'action qui copie une méthode enregistrée (ses matières, opérations et modes opératoires) sur un ordre de fabrication ou une ligne de devis."+msgid "The address must be listed in your GMail account's settings"+msgstr "L'adresse doit être listée dans les paramètres de votre compte GMail"+msgid "The allowed values for a list-type attribute; users pick from these rather than free-typing."msgstr "Les valeurs autorisées pour un attribut de type liste; les utilisateurs choisissent parmi ceux-ci plutôt que de taper librement."@@ -23179,6 +23544,9 @@ msgstr "L'actif passe dans sa classe en service et commence à se déprécier àmsgid "The asset would have a negative cost. Check the purchase price."msgstr "L'immobilisation aurait un coût négatif. Vérifiez le prix d'achat."+msgid "The authorization took too long or came back altered. Start the connection again from this page."+msgstr "L'autorisation a pris trop de temps ou est revenue altérée. Relancez la connexion à partir de cette page."+msgid "The authorization was refused in Onshape. Save the integration settings to try again."msgstr "L'autorisation a été refusée dans Onshape. Enregistrez les paramètres d'intégration pour réessayer."@@ -23188,6 +23556,9 @@ msgstr "L'autorisation a été refusée dans Onshape. Réessayez de vous connectmsgid "The authorization was refused in Ramp. Try connecting again."msgstr "L’autorisation a été refusée dans Ramp. Essayez de vous reconnecter."+msgid "The authorization was rejected"+msgstr "L'autorisation a été rejetée"+msgid "The average cost of the item. Changing it needs permission to edit parts."msgstr "Le coût moyen de l'article. Le modifier nécessite l'autorisation de modifier les pièces."@@ -23291,6 +23662,12 @@ msgstr "La société a déjà une écriture comptabilisée de bilan d'ouverture.msgid "The company has no account defaults."msgstr "La société n'a pas de paramètres de compte par défaut."+msgid "The connection could not be verified"+msgstr "La connexion n'a pas pu être vérifiée"++msgid "The connection was refused"+msgstr "La connexion a été refusée"+msgid "The contract cannot be cancelled then"msgstr "Le contrat ne peut pas être annulé à ce moment"@@ -23556,6 +23933,9 @@ msgstr "L'adresse https à laquelle une étape webhook du flux de travail envoiemsgid "The human-readable document number (like J000001 or ECO-000001) minted from a sequence and stored on the record, distinct from its internal id."msgstr "Le numéro de document lisible (comme J000001 ou ECO-000001) généré à partir d'une séquence et stocké dans l'enregistrement, distinct de son ID interne."+msgid "The icon emoji of the bot"+msgstr "L'emoji icône du bot"+msgid "The identifier the customer uses for this part on their POs; Carbon resolves it to our internal Part ID on order import."msgstr "L'identifiant que le client utilise pour cette pièce sur ses POs; Carbon le résout à notre ID de pièce interne lors de l'importation de commandes."@@ -23577,6 +23957,9 @@ msgstr "La règle Incoterms (FOB, DAP, EXW, CIF, ...) qui gouverne qui paie le fmsgid "The Incoterm rule (FOB, DAP, EXW, CIF, …) that governs who pays freight, who bears risk, and where the transfer of title occurs on shipments to this customer."msgstr "La règle Incoterms (FOB, DAP, EXW, CIF, ...) qui gouverne qui paie le fret, qui assume le risque et où le transfert de propriété se produit sur les expéditions vers ce client."+msgid "The integration authorized the connection but saving it failed. Try connecting again."+msgstr "L'intégration a autorisé la connexion mais son enregistrement a échoué. Essayez de vous reconnecter."+msgid "The inventory cost recognized when a shipment posts, valued by the item's costing method."msgstr "Le coût reconnu lors de la comptabilisation d'une expédition, évalué selon la méthode de calcul des coûts de l'article."@@ -23592,6 +23975,15 @@ msgstr "L'article que chaque ordre de fabrication produit — exiger qu'il corremsgid "The item's rental rate"msgstr "Le tarif de location de l'article"+msgid "The items in that list have no field by that name."+msgstr "Les éléments de cette liste n'ont aucun champ portant ce nom."++msgid "The items in that list have no fields to take."+msgstr "Les articles de cette liste n'ont aucun champ à prendre."++msgid "The items in that list have no reading as text."+msgstr "Les éléments de cette liste ne peuvent pas être lus comme du texte."+msgid "the job hours due that day (a due-date basis, not the day the work runs), with overdue work in Past due."msgstr "les heures de travail dues ce jour-là (selon la date d'échéance, pas le jour où le travail s'exécute), avec le travail en retard en Retard."@@ -23885,6 +24277,9 @@ msgstr "La procédure que les techniciens suivent lors de l'exécution de cettemsgid "The processes this work center can run; appears in process-pickers when scheduling operations, and limits which jobs can route through this work center."msgstr "Les procédés que ce poste de travail peut exécuter ; apparaît dans les sélecteurs de procédés lors de la planification des opérations et limite les ordres de fabrication qui peuvent être routés par ce poste de travail."+msgid "The profile picture of the bot"+msgstr "La photo de profil du bot"+msgid "The provider offers no dimension targets. Enable the feature in the provider first (e.g. tracking categories, class tracking, or fields)."msgstr "Le fournisseur n'offre pas de cibles de dimension. Activez d'abord la fonctionnalité chez le fournisseur (par exemple, catégories de suivi, suivi des classes ou champs)."@@ -23986,12 +24381,12 @@ msgstr "La réponse d'Onshape ne contenait pas les paramètres requis. Réessayemsgid "The response from Ramp was missing required parameters. Try connecting again."msgstr "La réponse de Ramp ne contenait pas les paramètres requis. Essayez de vous reconnecter."+msgid "The response was missing required parameters. Try connecting again."+msgstr "La réponse contenait des paramètres obligatoires manquants. Essayez de vous reconnecter."+msgid "The restore job reported this error."msgstr "Le travail de restauration a signalé cette erreur."-msgid "The result will not appear on the Runs page."-msgstr "Le résultat n'apparaîtra pas sur la page Exécutions."-msgid "The revision number of the part"msgstr "Le numéro de révision de la pièce"@@ -24139,6 +24534,9 @@ msgstr "Le système qu'une société utilise pour gérer les identifiants de conmsgid "The system passes every in-scope acceptance test in your configured system, with your data; the data is validated; and you sign off. Then go-live."msgstr "Le système réussit tous les tests d'acceptation dans le périmètre de votre système configuré, avec vos données ; les données sont validées ; et vous donnez votre approbation. Ensuite, passage en production."+msgid "The text of your message. When using Block Kit blocks, this is used as a fallback for notifications."+msgstr "Le texte de votre message. Lors de l'utilisation de blocs Block Kit, celui-ci est utilisé comme solution de secours pour les notifications."+msgid "The thread linking a sales RFQ, its quote, and the resulting sales order — a join, not a document with its own status."msgstr "Le fil qui lie une RFQ de vente, son devis et la commande client résultante - une jointure, pas un document avec son propre statut."@@ -24220,6 +24618,9 @@ msgstr ""msgid "The US tax depreciation system with IRS property-class tables, run as a separate tax schedule alongside the book schedule."msgstr "Le système d'amortissement fiscal américain avec des tables de classe de propriété IRS, exécuté comme un planning fiscal distinct aux côtés du planning comptable."+msgid "The username of the bot"+msgstr "Le nom d'utilisateur du bot"+msgid "The users in this group; group-scoped permissions and notifications apply to each member, and users may belong to multiple groups (effective permissions are the union)."msgstr "Les utilisateurs de ce groupe ; les autorisations et notifications de portée groupe s'appliquent à chaque membre, et les utilisateurs peuvent appartenir à plusieurs groupes (les autorisations effectives sont l'union)."@@ -24352,6 +24753,11 @@ msgstr "Ils ne figurent pas dans votre plan comptable, mais des documents ou desmsgid "this ability"msgstr "cette compétence"+msgid "This account has stopped working. Reconnect it — workflow steps using it will fail until you do."+msgstr "Ce compte a cessé de fonctionner. Reconnectez-le — les étapes du workflow qui l'utilisent échoueront jusqu'à ce que vous le fassiez."++msgid "This account needs to be reconnected."+msgstr "Ce compte doit être reconnecté."msgid "This action cannot run on this list."msgstr ""@@ -24384,6 +24790,9 @@ msgstr "Cela ne peut pas être modifié ultérieurement — {integrationName} n'msgid "This cannot be undone."msgstr "Cela ne peut pas être annulé."+msgid "This Carbon instance is missing its OAuth credentials for this integration. Ask an administrator to set them."+msgstr "Cette instance de Carbon manque ses identifiants OAuth pour cette intégration. Demandez à un administrateur de les configurer."+msgid "This Carbon instance is missing its Onshape OAuth credentials. Ask an administrator to set them."msgstr "Cette instance Carbon n'a pas d'identifiants OAuth Onshape. Demandez à un administrateur de les configurer."@@ -24442,9 +24851,15 @@ msgstr "Ces informations seront visibles à tous les utilisateurs, soyez prudentmsgid "this inspection plan"msgstr "ce plan de contrôle"+msgid "This integration can't be connected on this Carbon instance."+msgstr "Cette intégration ne peut pas être connectée sur cette instance Carbon."+msgid "This integration isn't available yet"msgstr "Cette intégration n'est pas encore disponible"+msgid "This integration isn't configured"+msgstr "Cette intégration n'est pas configurée"+#. placeholder {0}: company?.name ?? "Carbon"msgid "This invitation to join {0} has expired. You can request a new invite to be sent to your email."msgstr "Cette invitation pour rejoindre {0} a expiré. Vous pouvez demander une nouvelle invitation à envoyer à votre e-mail."@@ -24627,6 +25042,9 @@ msgstr "Cette station exécute du travail soumis à gating d'aptitude — elle nmsgid "This station runs work with no ability requirement; operators assigned on the manning board shape available labor."msgstr "Cette station exécute un travail sans exigence de compétence ; les opérateurs assignés sur le tableau d'affectation façonnent la main-d'œuvre disponible."+msgid "This step expected a list."+msgstr "Cette étape attendait une liste."+msgid "This step is part of it"msgstr "Cette étape en fait partie"@@ -24817,6 +25235,9 @@ msgstr "serré"msgid "Tightened"msgstr "Renforcé"+msgid "Time"+msgstr "Heure"+msgid "Time and dollar utilization of the rental fleet by asset and class"msgstr "Utilisation en temps et en dollars de la flotte de location par actif et classe"@@ -24862,6 +25283,9 @@ msgstr "Basculer vers vous"msgid "Title"msgstr "Titre"+msgid "Title of the event"+msgstr "Titre de l'événement"+msgid "Title passes to the customer when the term ends."msgstr "La propriété passe au client lorsque la durée se termine."@@ -24967,6 +25391,14 @@ msgstr "Tolérance (jours)"msgid "Tomorrow"msgstr "Demain"+msgid "Took {took} values; kept the first {kept}."+msgstr "{took} valeurs prises ; les {kept} premières conservées."++msgid "Took the first of {total}."+msgstr "Premier élément pris sur {total}."++msgid "Took the last of {total}."+msgstr "Dernier élément pris sur {total}."msgid "Too many exports and bulk actions are running right now. Try again in a few minutes."msgstr "Trop d'exports et d'actions groupées sont en cours. Réessayez dans quelques minutes."@@ -25298,6 +25730,9 @@ msgstr "Déclencheurs"msgid "Try a different name."msgstr "Essayez un nom différent."+msgid "Try again"+msgstr "Réessayer"+msgid "Tuesday"msgstr "Mardi"@@ -25368,6 +25803,9 @@ msgstr "Tapez <0>\"{confirmPhrase}\"</0> pour continuer."msgid "Type a message..."msgstr "Tapez un message..."+msgid "Type a value and press Enter…"+msgstr "Tapez une valeur et appuyez sur Entrée…"+msgid "Type an email and press Enter to add an external recipient"msgstr "Tapez un e-mail et appuyez sur Entrée pour ajouter un destinataire externe"@@ -25449,6 +25887,9 @@ msgstr "Paiements non actualisés à venir, par exercice comptable, moins les inmsgid "Undo"msgstr "Annuler"+msgid "Unfurl Links"+msgstr "Déployer les liens"+msgid "Ungroup"msgstr "Dégrouper"@@ -25969,6 +26410,9 @@ msgstr "Autorisations utilisateur"msgid "User roles"msgstr "Rôles utilisateur"+msgid "Username"+msgstr "Nom d'utilisateur"+msgid "users"msgstr "utilisateurs"@@ -26753,6 +27197,9 @@ msgstr "Quand activé, cette substitution de prix s'applique aux commandes corremsgid "When on, this rule fires for every target of its type. Assignment rows are ignored but preserved."msgstr "Lorsqu'elle est activée, cette règle s'applique à chaque cible de son type. Les lignes d'affectation sont ignorées mais conservées."+msgid "When replying to a thread, also make the message visible to everyone in the channel (only applicable when Thread Timestamp is provided)"+msgstr "Lors de la réponse à un fil de discussion, rendez également le message visible à tous les utilisateurs du canal (applicable uniquement si l'horodatage du fil est fourni)"+msgid "When supplier responses are expected back; suppliers see this date on the RFQ portal and Carbon stops accepting late responses after it (configurable)."msgstr "Quand les réponses des fournisseurs sont attendues ; les fournisseurs voient cette date sur le portail RFQ et Carbon cesse d'accepter les réponses tardives après celle-ci (configurable)."@@ -26924,6 +27371,9 @@ msgstr "Si ce travail bloque la production (Baisse), la dégrade (Impact), se simsgid "Whether to Add the selected permissions on top of what each user already has, or Update by replacing each user's permission set wholesale with the selection below."msgstr "S'il faut ajouter les autorisations sélectionnées en plus de celles que chaque utilisateur possède déjà, ou mettre à jour en remplaçant entièrement l'ensemble d'autorisations de chaque utilisateur par la sélection ci-dessous."+msgid "Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves."+msgstr "Indique s'il faut développer les événements récurrents en occurrences et ne renvoyer que les événements ponctuels et les occurrences d'événements récurrents, sans les événements récurrents sous-jacents eux-mêmes."+msgid "Which document drives each inspection flow for this item."msgstr "Quel document pilote chaque flux de contrôle pour cet article."@@ -27227,6 +27677,9 @@ msgstr "Vous appartenez à plus d'une société. Choisissez où travailler."msgid "You can change the UI style any time through the theme setting"msgstr "Vous pouvez modifier le style de l'interface utilisateur à tout moment via les paramètres de thème"+msgid "You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.'"+msgstr "Vous pouvez obtenir l'ID du canal en cliquant avec le bouton droit sur le canal et en sélectionnant 'Afficher les détails du canal.'"+msgid "You can only see this key once. Store it safely."msgstr "Vous ne pouvez voir cette clé qu'une seule fois. Conservez-la en sécurité."@@ -27278,6 +27731,9 @@ msgstr "Vous menez"msgid "You name a project owner with decision authority"msgstr "Vous nommez un propriétaire de projet avec autorité décisionnelle."+msgid "You need permission to edit workflows to load these choices."+msgstr "Vous devez avoir l'autorisation de modifier les flux de travail pour charger ces choix."+msgid "You received this item"msgstr "Vous avez reçu cet article"diff --git a/packages/locale/locales/fr/mes.po b/packages/locale/locales/fr/mes.poindex 42b8f11883..2e58373c5e 100644--- a/packages/locale/locales/fr/mes.po+++ b/packages/locale/locales/fr/mes.po@@ -113,6 +113,9 @@ msgstr "Un traitement précédent ne s'est pas terminé. Recommencer reprend lesmsgid "About"msgstr "À propos"+msgid "About this field"+msgstr "À propos de ce champ"+msgid "Accept"msgstr "Accepter"@@ -1234,6 +1237,9 @@ msgstr "Aucune maintenance planifiée pour aujourd'hui"msgid "No matches. Type to create one."msgstr "Aucune correspondance. Tapez pour en créer une."+msgid "No matching time"+msgstr "Aucune heure correspondante"+msgid "No materials"msgstr "Aucun matériau"@@ -2144,6 +2150,9 @@ msgstr "Miniature"msgid "Tick the jobs this was done for."msgstr "Cochez les ordres de fabrication pour lesquels c'est effectué."+msgid "Time"+msgstr "Heure"+msgid "Time and cost split across jobs proportionally to quantity."msgstr "Le temps et le coût sont répartis entre les ordres de fabrication proportionnellement à la quantité."diff --git a/packages/locale/locales/hi/erp.po b/packages/locale/locales/hi/erp.poindex 8d71910ca9..c9c49f6ddb 100644--- a/packages/locale/locales/hi/erp.po+++ b/packages/locale/locales/hi/erp.po@@ -269,6 +269,10 @@ msgstr "{0} चालान आपकी पिछली प्रणालीmsgid "{0} is {1}, not Draft or Planned"msgstr ""+#. placeholder {0}: integration.name+msgid "{0} isn't installed yet. There's nothing to configure — install it to connect an account."+msgstr "{0} अभी इंस्टॉल नहीं किया गया है। कोई कॉन्फ़िगर नहीं करने के लिए है — इसे इंस्टॉल करें एक खाता कनेक्ट करने के लिए।"+#. placeholder {0}: data.quantitymsgid "{0} items marked as picked"msgstr ""@@ -481,6 +485,12 @@ msgstr "{alreadyPlannedItemCount} पार्ट्स छोड़ा गयmsgid "{apOverduePct}% of payables"msgstr "{apOverduePct}% देय राशि का"+msgid "{appName} is connected, but needs to be reconnected before workflow steps can use it."+msgstr "{appName} जुड़ा हुआ है, लेकिन वर्कफ़्लो चरणों द्वारा इसका उपयोग करने से पहले इसे फिर से जोड़ा जाना चाहिए।"++msgid "{appName} isn't connected yet. Connect an account before this step can do anything."+msgstr "{appName} अभी कनेक्ट नहीं किया गया है। इस चरण से पहले एक खाता कनेक्ट करें कुछ भी कर सकता है।"+msgid "{arOverduePct}% of receivables"msgstr "प्राप्य राशि का {arOverduePct}%"@@ -594,6 +604,9 @@ msgstr "{inserted} सम्मिलित किया गया, {updated}msgid "{jobsMissingStorageUnit, plural, one {# open job has materials with no storage unit} other {# open jobs have materials with no storage unit}}"msgstr "{jobsMissingStorageUnit, plural, one {# खुले जॉब में भंडारण इकाई के बिना सामग्री है} other {# खुले जॉब में भंडारण इकाई के बिना सामग्री हैं}}"+msgid "{kept, plural, one {Took # value.} other {Took # values.}}"+msgstr "{kept, plural, one {# मान लिया गया।} other {# मान लिए गए।}}"+msgid "{label} is used by documents, journals or default accounts, so it cannot be deleted."msgstr "{label} को दस्तावेज़, जर्नल या डिफ़ॉल्ट खातों द्वारा उपयोग किया जाता है, इसलिए इसे हटाया नहीं जा सकता।"@@ -746,6 +759,9 @@ msgstr "{state} · {syncedAgo} सिंक हुआ"msgid "{termMonths, plural, one {# month} other {# months}}"msgstr "{termMonths, plural, one {# महीना} other {# महीने}}"+msgid "{total, plural, one {Joined # value.} other {Joined # values.}}"+msgstr "{total, plural, one {# मान जोड़ा गया।} other {# मान जोड़े गए।}}"+msgid "{total} phases to get your company live on Carbon. Each one ends at a checkpoint."msgstr "आपकी कंपनी को Carbon पर लाइव करने के लिए {total} चरण। प्रत्येक एक चेकपॉइंट पर समाप्त होता है।"@@ -1651,6 +1667,9 @@ msgstr "एक उपयोगकर्ता प्रत्येक बैचmsgid "A variable charge — mileage overage, damage, delivery, cleaning — is billed on the agreement's next invoice."msgstr "एक परिवर्तनीय शुल्क — माइलेज अधिकता, क्षति, डिलीवरी, सफाई — समझौते के अगले चालान पर बिल किया जाता है।"+msgid "A workspace can be connected to one Carbon company only. Disconnect it there first, or connect a different workspace."+msgstr "एक वर्कस्पेस केवल एक Carbon कंपनी से कनेक्ट किया जा सकता है। पहले उसे वहाँ से डिस्कनेक्ट करें, या कोई दूसरा वर्कस्पेस कनेक्ट करें।"+msgid "ABA"msgstr "ABA"@@ -1672,6 +1691,9 @@ msgstr "के बारे में"msgid "About (notification)"msgstr "के बारे में (सूचना)"+msgid "About this field"+msgstr "इस फ़ील्ड के बारे में"+msgid "Absent"msgstr "अनुपस्थित"@@ -1838,6 +1860,9 @@ msgstr ""msgid "Accounts receivable for amounts owed by customers"msgstr "ग्राहकों द्वारा देय राशियों के लिए प्राप्य खाते।"+msgid "Accounts your workflows can act as. Add one for each account a workflow step should use."+msgstr "खाते जिन के रूप में आपके वर्कफ़्लो कार्य कर सकते हैं। प्रत्येक खाते के लिए एक जोड़ें जो एक वर्कफ़्लो चरण को उपयोग करना चाहिए।"+msgid "Accrual"msgstr "उपार्जन"@@ -2055,6 +2080,9 @@ msgstr "एक चरण या प्रश्न जोड़ें"msgid "Add Ability"msgstr "कौशल जोड़ें"+msgid "Add account"+msgstr "खाता जोड़ें"+msgid "Add Account"msgstr "खाता जोड़ें"@@ -2196,6 +2224,10 @@ msgstr "महीना जोड़ें"msgid "Add Note"msgstr "नोट जोड़ें"+msgctxt "workflow data step"+msgid "Add operation"+msgstr "ऑपरेशन जोड़ें"+msgid "Add Operation"msgstr "ऑपरेशन जोड़ें"@@ -2434,6 +2466,9 @@ msgstr "{nextStatus} को आगे बढ़ाएं"msgid "Advanced"msgstr "उन्नत"+msgid "Advanced properties"+msgstr "उन्नत गुण"+msgid "Affected item not found."msgstr "प्रभावित आइटम नहीं मिला।"@@ -2657,6 +2692,12 @@ msgstr "राशियां केवल मूल्य ले जानेmsgid "An ability is a process's qualification. Only processes without one are listed."msgstr "कौशल एक प्रक्रिया की योग्यता है। केवल बिना कौशल की प्रक्रियाएं सूचीबद्ध हैं।"+msgid "An account is already called that — pick a different name."+msgstr "एक खाता पहले से ही उसी नाम से जाना जाता है — एक अलग नाम चुनें।"++msgid "An account is missing from this list until it is reconnected."+msgstr "एक खाता इस सूची से तब तक अनुपलब्ध है जब तक इसे फिर से नहीं जोड़ा जाता।"+msgid "An accounting bucket that groups expenses by department or function so the GL can report spend by group, not just by account."msgstr "एक लेखांकन बकेट जो विभाग या कार्य द्वारा व्यय को समूहित करता है ताकि सामान्य खाता बही समूह द्वारा व्यय की रिपोर्ट कर सकें, केवल खाता द्वारा नहीं।"@@ -2822,6 +2863,9 @@ msgstr "Onshape से कनेक्ट करते समय एक अपmsgid "An unexpected error occurred while connecting to Onshape. Try connecting again."msgstr "Onshape से कनेक्ट करते समय एक अनपेक्षित त्रुटि हुई। दोबारा कनेक्ट करने का प्रयास करें।"+msgid "An unexpected error occurred while connecting. Try connecting again."+msgstr "कनेक्ट करते समय एक अप्रत्याशित त्रुटि हुई। फिर से कनेक्ट करने का प्रयास करें।"+msgid "Analytics"msgstr "विश्लेषण"@@ -2839,9 +2883,6 @@ msgstr "और {0} अधिक — बाकी देखने के लिmsgid "And {0} more. Resolve these to see the rest."msgstr "और {0} अधिक। शेष देखने के लिए इन्हें हल करें।"-msgid "and {hidden} more"-msgstr "और {hidden} अधिक"-msgid "and {remaining} more"msgstr "और {remaining} अधिक"@@ -2878,6 +2919,9 @@ msgstr "वार्षिक दर जिस पर किराया छूmsgid "Annual. Starts from the company's incremental borrowing rate"msgstr "वार्षिक। कंपनी की वृद्धिशील उधार दर से शुरू होता है"+msgid "Another connection to this integration already has that name. Choose a different one."+msgstr "इस एकीकरण के लिए एक और कनेक्शन पहले से ही उस नाम के साथ है। एक अलग चुनें।"+msgid "Another cost center this one rolls up into, letting you nest a sub-department under its parent for hierarchical cost reporting."msgstr "एक अन्य लागत केंद्र जिसमें यह रोल हो जाता है, आपको एक उप-लागत केंद्र को इसके मूल के अंतर्गत घोंसले के लिए सक्षम करता है जो पदानुक्रमित लागत रिपोर्टिंग के लिए।"@@ -2948,6 +2992,9 @@ msgid "API keys for programmatic access to your Carbon data."msgstr "आपके Carbon डेटा के लिए प्रोग्रामेटिक एक्सेस के लिए API कुंजियाँ।"msgid "API, webhooks, and integrations"+msgstr "API, webhooks, और एकीकरण"++msgid "App"msgstr "API, वेबहुक, और एकीकरण"msgid "Appearance"@@ -3882,6 +3929,9 @@ msgstr "अनुलग्नक लोड नहीं किए जा सकmsgid "Attempts"msgstr "प्रयास"+msgid "Attendees"+msgstr "उपस्थिति"+msgid "Attribute"msgstr "विशेषता"@@ -3924,6 +3974,9 @@ msgstr "ऑथेंटिकेटर ऐप"msgid "Authenticator QR code"msgstr "प्रमाणकर्ता QR कोड"+msgid "Authorization was refused. Try connecting again."+msgstr "प्राधिकरण को अस्वीकार कर दिया गया। फिर से कनेक्ट करने का प्रयास करें।"+msgid "Authorized overtime on top of the shift"msgstr "शिफ्ट के अतिरिक्त अधिकृत ओवरटाइम"@@ -3984,6 +4037,9 @@ msgstr "स्वचालित अपडेट और बैकअप"msgid "Automatic, prorated consumption of a job's untracked materials when output is reported — tracked materials are issued manually."msgstr "आउटपुट की रिपोर्ट करते समय एक कार्य की गैर-ट्रैक की गई सामग्री की स्वचालित, आनुपातिक खपत — ट्रैक की गई सामग्री को मैन्युअल रूप से जारी किया जाता है।"+msgid "Automatically create a Google Meet video conference link for this event"+msgstr "इस ईवेंट के लिए स्वचालित रूप से Google Meet वीडियो कॉन्फ़्रेंस लिंक बनाएँ"+msgid "Automatically release the job when the kanban is scanned"msgstr "कानबान स्कैन किए जाने पर जॉब को स्वचालित रूप से जारी करें"@@ -4193,6 +4249,9 @@ msgstr "वापस करने के लिए बैच"msgid "Batching"msgstr "बैचिंग"+msgid "BCC Email"+msgstr "बीसीसी ईमेल"+msgid "Becomes"msgstr "बन जाता है"@@ -4370,6 +4429,12 @@ msgstr "बोर्ड"msgid "Body"msgstr "निकाय"+msgid "Body for the email you want to send"+msgstr "आप जो ईमेल भेजना चाहते हैं उसका निकाय"++msgid "Body Type"+msgstr "बॉडी प्रकार"+msgid "BoM"msgstr "BoM"@@ -4427,6 +4492,9 @@ msgstr "ब्रेडक्रम्ब"msgid "Bring in your parts, BOMs, Bill of Process, and costing — with Carbon's import tools, CSV, or LLM help."msgstr "अपने पार्ट्स, BOM, प्रक्रिया सूची, और लागत निर्धारण लाएं — Carbon के आयात उपकरण, CSV, या LLM सहायता के साथ।"+msgid "Broadcast reply to channel"+msgstr "चैनल को प्रसारित प्रतिक्रिया"+msgid "Browse library"msgstr "लाइब्रेरी ब्राउज़ करें"@@ -4513,6 +4581,9 @@ msgstr ""msgid "By accepting the invite, you agree to the <0>Terms of Service</0> and <1>Privacy Policy</1>."msgstr "आमंत्रण स्वीकार करके, आप <0>सेवा की शर्तें</0> और <1>गोपनीयता नीति</1> से सहमत हैं।"+msgid "By default it'll be 30 min post start time"+msgstr "डिफ़ॉल्ट रूप से यह शुरुआत के समय के 30 मिनट बाद होगा"+msgid "By dimension"msgstr "आयाम द्वारा"@@ -4881,6 +4952,9 @@ msgstr "कारण बनने वाला रन: "msgid "CC"msgstr "CC"+msgid "CC Email"+msgstr "सीसी ईमेल"+msgid "Centralized Billing Address"msgstr "केंद्रीकृत बिलिंग पता"@@ -4998,6 +5072,12 @@ msgstr "इसे बदलने से पार्ट ID अपडेट हmsgid "Changing type resets this item's draft edits."msgstr "प्रकार बदलने से इस आइटम की ड्राफ्ट संपादन रीसेट हो जाती है।"+msgid "Channel"+msgstr "चैनल"++msgid "Channel Name"+msgstr "चैनल नाम"+msgid "Characteristic"msgstr "विशेषता"@@ -5078,6 +5158,9 @@ msgstr "चेकपॉइंट ·"msgid "Checkpoints"msgstr "चेकपॉइंट्स"+msgid "Choose {named} first."+msgstr "पहले {named} चुनें।"+msgid "Choose a backup"msgstr "एक बैकअप चुनें"@@ -5333,6 +5416,9 @@ msgstr "सेटअप को संक्षिप्त करें"msgid "Collapse subtree"msgstr "सबट्री को संक्षिप्त करें"+msgid "Color"+msgstr "रंग"+#. placeholder {0}: index + 1msgid "Column {0} of {count}"msgstr "स्तंभ {0} में से {count}"@@ -5594,6 +5680,9 @@ msgstr "विभिन्न लेनदेन प्रकारों केmsgid "Configure the start months for your fiscal and tax years"msgstr "अपने वित्तीय और कर वर्षों के लिए शुरुआती महीनों को कॉन्फ़िगर करें"+msgid "Configure the steps above first."+msgstr "पहले उपरोक्त चरणों को कॉन्फ़िगर करें।"+msgid "Configure when purchased item costs should be updated from supplier transactions."msgstr "खरीदी गई वस्तु की लागत को आपूर्तिकर्ता लेनदेन से कब अपडेट किया जाना चाहिए, इसे कॉन्फ़िगर करें।"@@ -5690,6 +5779,9 @@ msgstr "संघर्ष कारण"msgid "Connect"msgstr "कनेक्ट करें"+msgid "Connect {appName}"+msgstr "{appName} कनेक्ट करें"+msgid "Connect Carbon to your accounting, project management, and CAD tools and much more."msgstr "Carbon को अपने लेखांकन, परियोजना प्रबंधन, और CAD उपकरणों और बहुत कुछ से जोड़ें।"@@ -5717,9 +5809,18 @@ msgstr "उन बाहरी उपकरणों को कनेक्टmsgid "Connect your identity provider by pasting either its metadata URL or its raw metadata XML — exactly one of the two."msgstr "अपने आइडेंटिटी प्रदाता को जोड़ें इसके मेटाडेटा URL या इसके कच्चे मेटाडेटा XML को पेस्ट करके — इन दोनों में से केवल एक।"+msgid "Connected before workflows needed extra permissions. Reconnect to grant them — everything else keeps working meanwhile."+msgstr "वर्कफ़्लो से पहले जुड़ने के लिए अतिरिक्त अनुमतियों की आवश्यकता थी। उन्हें प्रदान करने के लिए फिर से जोड़ें — इस बीच सब कुछ काम करता रहेगा।"+msgid "Connected to"msgstr "को जोड़ा गया"+msgid "Connection"+msgstr "कनेक्शन"++msgid "Connection name"+msgstr "कनेक्शन का नाम"+msgid "Console Mode"msgstr "कंसोल मोड"@@ -6336,6 +6437,12 @@ msgstr "जारी नहीं कर सके {0}: {1}"msgid "Could not save"msgstr "सहेज नहीं सके"+msgid "Couldn't check whether {appName} is connected."+msgstr "यह जाँच नहीं की जा सकी कि {appName} कनेक्ट है या नहीं।"++msgid "Couldn't complete the connection"+msgstr "कनेक्शन को पूरा नहीं कर सका"+msgid "Couldn't complete the Onshape connection"msgstr "Onshape कनेक्शन पूरा नहीं हो सका"@@ -6351,12 +6458,18 @@ msgstr "और पंक्तियाँ लोड नहीं हो सकmsgid "Couldn't load related documents. Refresh before creating a new one to avoid duplicates."msgstr "संबंधित दस्तावेज़ लोड नहीं किए जा सके। डुप्लिकेट से बचने के लिए एक नया बनाने से पहले रीफ़्रेश करें।"+msgid "Couldn't load the choices for this field."+msgstr "इस फ़ील्ड के लिए विकल्प लोड नहीं किए जा सके।"+msgid "Couldn't load the provider's dimension targets — check the connection and reload."msgstr "प्रदाता के आयाम लक्ष्य लोड नहीं कर सके — कनेक्शन जांचें और फिर से लोड करें।"msgid "Couldn't reschedule the job. Please try again."msgstr "कार्य पुनर्निर्धारित नहीं हो सका। कृपया पुनः प्रयास करें।"+msgid "Couldn't save the connection"+msgstr "कनेक्शन को सहेज नहीं सका"+msgid "Couldn't save the Onshape connection"msgstr "Onshape कनेक्शन सहेजा नहीं जा सका"@@ -6366,6 +6479,12 @@ msgstr "Onshape Government कनेक्शन को सहेजा नहmsgid "Couldn't save the Ramp connection"msgstr "Ramp कनेक्शन को सहेजा नहीं जा सका"+msgid "Couldn't start the {name} connection"+msgstr "{name} कनेक्शन शुरू नहीं किया जा सका"++msgid "Couldn't start the authorization."+msgstr "प्राधिकरण शुरू नहीं किया जा सका।"+msgid "Count"msgstr "गिनती"@@ -6375,6 +6494,12 @@ msgstr "गणना इतिहास"msgid "Count ID"msgstr "गणना आईडी"+msgid "Count items"+msgstr "आइटम गिनें"++msgid "Counted {total}."+msgstr "{total} गिने गए।"+msgid "Counted Qty"msgstr "गिनी गई मात्रा"@@ -6479,6 +6604,9 @@ msgstr "अनुबंध बनाएँ"msgid "Create Forecast"msgstr "पूर्वानुमान बनाएं"+msgid "Create Google Meet Link"+msgstr "Google Meet लिंक बनाएं"+msgid "Create Issue"msgstr "समस्या बनाएं"@@ -7116,6 +7244,9 @@ msgstr "तारीख"msgid "Date Acquired"msgstr "अधिग्रहण की तारीख"+msgid "Date and time"+msgstr "दिनांक और समय"+msgid "Date Calibrated"msgstr "अंशांकन की तारीख"@@ -7125,6 +7256,9 @@ msgstr "देय तारीख"msgid "Date Due"msgstr "देय तारीख"+msgid "Date from"+msgstr "तारीख से"+msgid "Date issued"msgstr "जारी करने की तारीख"@@ -7137,6 +7271,9 @@ msgstr "भुगतान की तारीख"msgid "Date Paid"msgstr "भुगतान की तारीख"+msgid "Date to"+msgstr "तारीख को"+msgid "Dates"msgstr "तारीखें"@@ -8006,6 +8143,9 @@ msgstr "परिवर्तन का विवरण"msgid "Description of Issue"msgstr "समस्या का विवरण"+msgid "Description of the event. You can use HTML tags here."+msgstr "ईवेंट का विवरण। आप यहाँ HTML टैग का उपयोग कर सकते हैं।"+msgid "Detach"msgstr "अलग करें"@@ -8111,6 +8251,9 @@ msgstr "छोड़ा गया"msgid "Disconnect"msgstr "डिस्कनेक्ट करें"+msgid "Disconnected"+msgstr "डिस्कनेक्ट किया गया"+msgid "Discontinuation date"msgstr "बंद करने की तारीख"@@ -9071,6 +9214,9 @@ msgstr "ईमेल"msgid "Email Address"msgstr "ईमेल पता"+msgid "Email address to set as the \"Reply-To\" header"+msgstr "\"प्रतिक्रिया देने के लिए\" हेडर के रूप में सेट करने के लिए ईमेल पता"+msgid "Email Domains"msgstr "ईमेल डोमेन"@@ -9086,6 +9232,9 @@ msgstr "ईमेल किया गया"msgid "Emails"msgstr "ईमेल"+msgid "Emails of the attendees (guests)"+msgstr "प्रतिभागियों (मेहमानों) के ईमेल"+msgid "Emoji"msgstr "इमोजी"@@ -9155,6 +9304,9 @@ msgstr "अपनी कंपनी के लिए डिजिटल उदmsgid "Enable in Settings"msgstr "सेटिंग्स में सक्षम करें"+msgid "Enable link unfurling for this message"+msgstr "इस संदेश के लिए लिंक अनफर्लिंग सक्षम करें"+msgid "Enable notifications when a sales rule violation is blocked or acknowledged on a quote, sales order, or sales invoice."msgstr "जब किसी उद्धरण, विक्रय आदेश या विक्रय चालान पर विक्रय नियम उल्लंघन अवरुद्ध या स्वीकृत किया जाता है, तो सूचनाएँ सक्षम करें।"@@ -9236,6 +9388,9 @@ msgstr "अंत"msgid "End Date"msgstr "अंतिम तारीख"+msgid "End date time of the event"+msgstr "इवेंट का समाप्ति तारीख समय"+msgid "End Line"msgstr "पंक्ति समाप्त करें"@@ -9568,6 +9723,9 @@ msgstr ""msgid "Event Type"msgstr "ईवेंट प्रकार"+msgid "Event types"+msgstr "ईवेंट प्रकार"+msgid "Events"msgstr "घटनाएं"@@ -9746,6 +9904,9 @@ msgstr "पंक्ति को विस्तृत करें"msgid "Expand Machine"msgstr "मशीन का विस्तार करें"+msgid "Expand Recurring Event?"+msgstr "आवर्ती ईवेंट विस्तारित करें?"+msgid "Expand row"msgstr "पंक्ति का विस्तार करें"@@ -10584,6 +10745,9 @@ msgstr "इन्हें फ़ाइलों में ठीक करेmsgid "Fix these jobs before releasing"msgstr "जारी करने से पहले इन जॉब्स को ठीक करें"+msgid "Fix this"+msgstr "इसे ठीक करें"+msgid "Fixed"msgstr "निश्चित"@@ -11052,6 +11216,12 @@ msgstr "सामान्य खाता बही समन्वय"msgid "GL Tie-Out"msgstr "सामान्य खाता बही समन्वय"+msgid "Gmail"+msgstr "Gmail"++msgid "Gmail: Send Email"+msgstr "Gmail: ईमेल भेजें"+msgid "Go live right the first time — with our team alongside you"msgstr "पहली बार ही सही तरीके से लाइव जाएं — हमारी टीम आपके साथ है"@@ -11107,6 +11277,15 @@ msgstr "शाम की शुभकामनाएं, {name}।"msgid "Good morning, {name}."msgstr "सुबह की शुभकामनाएं, {name}।"+msgid "Google Calendar"+msgstr "Google Calendar"++msgid "Google Calendar: Create Event"+msgstr "Google Calendar: इवेंट बनाएं"++msgid "Google Calendar: Get all Events"+msgstr "Google Calendar: सभी इवेंट प्राप्त करें"+msgid "Google Places API key not configured"msgstr "Google Places API कुंजी कॉन्फ़िगर नहीं की गई"@@ -11167,6 +11346,15 @@ msgstr "गारंटीकृत अवशेष"msgid "Guaranteed Residual Value"msgstr "गारंटीकृत अवशिष्ट मूल्य"+msgid "Guests can invite others"+msgstr "अतिथि दूसरों को आमंत्रित कर सकते हैं"++msgid "Guests can modify"+msgstr "अतिथि संशोधन कर सकते हैं"++msgid "Guests can see other guests"+msgstr "अतिथि अन्य अतिथियों को देख सकते हैं"+msgid "Guided"msgstr "निर्देशित"@@ -11518,6 +11706,9 @@ msgstr "IBAN"msgid "IC Transaction"msgstr "अंतरकंपनी लेनदेन"+msgid "Icon Emoji"+msgstr "आइकन इमोजी"+msgid "Id"msgstr "आईडी"@@ -12282,6 +12473,9 @@ msgstr "पर या उसके बाद है"msgid "is on or before"msgstr "पर या उससे पहले है"+msgid "Is Private?"+msgstr "क्या यह निजी है?"+msgid "Is supplier org group"msgstr "आपूर्तिकर्ता संगठन समूह है"@@ -12354,6 +12548,9 @@ msgstr ""msgid "It is coming soon. Contact Carbon to have it set up for your company."msgstr "यह जल्द ही आ रहा है। इसे अपनी कंपनी के लिए सेट अप करवाने के लिए Carbon से संपर्क करें।"+msgid "It was removed after this page loaded. Reload the page and try again."+msgstr "इस पृष्ठ के लोड होने के बाद इसे हटा दिया गया। पृष्ठ पुनः लोड करें और फिर से कोशिश करें।"+msgid "It will stop running until you publish a version again. Nothing is deleted."msgstr "यह तब तक चलना बंद कर देगा जब तक आप फिर से एक संस्करण प्रकाशित नहीं करते। कुछ भी हटाया नहीं गया है।"@@ -12550,6 +12747,9 @@ msgstr "जॉब जिनकी सामग्री सूची मेंmsgid "Join {0}"msgstr "{0} में शामिल हों"+msgid "Join into text"+msgstr "पाठ में शामिल हों"+msgid "Journal"msgstr "जर्नल"@@ -12616,6 +12816,9 @@ msgstr "मौजूदा मूल्य निर्धारण रखेंmsgid "Keep Line"msgstr "पंक्ति रखें"+msgid "Keep matching items"+msgstr "मेल खाने वाले आइटम रखें"+msgid "Keep navigation open"msgstr "नेविगेशन खुला रखें"@@ -12634,6 +12837,12 @@ msgstr "पिकिंग जारी रखें"msgid "Keeps orders, quotes, and settings behind a second check"msgstr "ऑर्डर, कोट्स और सेटिंग्स को एक दूसरी जांच के पीछे रखता है"+msgid "Kept {kept} of {total}; {unresolved} could not be checked."+msgstr "{total} में से {kept} रखे गए; {unresolved} की जाँच नहीं की जा सकी।"++msgid "Kept {kept} of {total}."+msgstr "{total} में से {kept} रखे गए।"+msgid "Key"msgstr "कुंजी"@@ -14875,6 +15084,9 @@ msgstr "कोई एक्सेस नहीं"msgid "No accounts are mapped yet"msgstr "अभी तक कोई खाता मैप नहीं किया गया है"+msgid "No accounts connected yet."+msgstr "अभी तक कोई खाता जुड़ा नहीं है।"+msgid "No accounts match your search"msgstr "कोई खाता आपकी खोज से मेल नहीं खाता"@@ -14930,6 +15142,9 @@ msgstr "अभी कोई संपत्ति नहीं है। पटmsgid "No attachments."msgstr "कोई अनुलग्नक नहीं।"+msgid "No authorization code was returned"+msgstr "कोई प्राधिकरण कोड नहीं लौटाया गया"+msgid "No available filters"msgstr "कोई उपलब्ध फ़िल्टर नहीं"@@ -15130,6 +15345,9 @@ msgstr "कोई विफलता पथ नहीं — रन यहांmsgid "No fair value entered, counts as not met"msgstr "कोई उचित मूल्य दर्ज नहीं किया गया, पूरा नहीं माना जाता है"+msgid "No field was chosen to take."+msgstr "लेने के लिए कोई फ़ील्ड नहीं चुना गया।"+msgid "No fields found."msgstr "कोई फ़ील्ड नहीं मिला।"@@ -15250,6 +15468,9 @@ msgstr "कोई मिलान बिन नहीं"msgid "No matching operations"msgstr "कोई मेल खाने वाला ऑपरेशन नहीं"+msgid "No matching time"+msgstr "कोई मेल खाता समय नहीं"+msgid "No materials"msgstr "कोई सामग्री नहीं"@@ -15765,6 +15986,9 @@ msgstr "कुछ नहीं"msgid "Nothing at this location matches \"{0}\"."msgstr "इस स्थान पर कुछ भी \"{0}\" से मेल नहीं खाता।"+msgid "Nothing can work on this result."+msgstr "इस परिणाम पर कुछ नहीं कर सकता।"+msgid "Nothing completed in MES yet"msgstr "MES में अभी तक कुछ भी पूर्ण नहीं हुआ"@@ -15798,6 +16022,9 @@ msgstr "कुछ भी शेड्यूल नहीं किया गयmsgid "Nothing selected yet"msgstr "अभी कुछ नहीं चुना गया"+msgid "Nothing to choose yet - <0>set one up in Settings</0>."+msgstr "अभी तक कुछ भी चुनने के लिए नहीं है - <0>Settings में एक सेट करें</0>।"+msgid "Nothing to post for this period."msgstr "इस अवधि के लिए कोई पोस्ट नहीं है।"@@ -16008,6 +16235,9 @@ msgstr "1 {0} कितने {1} के बराबर है?"msgid "One firing of a workflow, recorded step by step with the values each step used and produced, acting throughout with the permissions of the workflow's owner."msgstr "एक वर्कफ़्लो का एक निष्पादन, चरण दर चरण रिकॉर्ड किया गया जिसमें प्रत्येक चरण द्वारा उपयोग किए गए और उत्पादित मान शामिल हैं, वर्कफ़्लो के स्वामी की अनुमतियों के साथ पूरे समय कार्य करते हुए।"+msgid "One of your {appName} accounts needs to be reconnected before workflow steps can use it."+msgstr "आपके {appName} खातों में से एक को वर्कफ़्लो चरणों द्वारा इसका उपयोग करने से पहले फिर से जोड़ा जाना चाहिए।"+msgid "One or more quantities cannot meet this date"msgstr "एक या अधिक मात्रा इस तारीख को पूरी नहीं कर सकती है"@@ -16131,6 +16361,9 @@ msgstr "खोलें"msgid "Open ({paymentCurrency})"msgstr "खुला ({paymentCurrency})"+msgid "Open {appName} accounts"+msgstr "{appName} खाते खोलें"+msgid "Open a change notice"msgstr "एक परिवर्तन सूचना खोलें"@@ -16320,6 +16553,10 @@ msgstr "ऑपरेशन"msgid "Operation"msgstr "ऑपरेशन"+msgctxt "workflow data step"+msgid "Operation"+msgstr "ऑपरेशन"+msgid "Operation batch"msgstr "ऑपरेशन बैच"@@ -17129,6 +17366,9 @@ msgstr "कोई ग्राहक, ग्राहक प्रकार, यmsgid "Pick a date or leave blank to clear it."msgstr "एक तारीख चुनें या इसे साफ करने के लिए खाली छोड़ें।"+msgid "Pick a field…"+msgstr "एक फ़ील्ड चुनें…"+msgid "Pick a list variable…"msgstr "एक लिस्ट वेरिएबल चुनें…"@@ -17818,6 +18058,9 @@ msgstr "उत्पादन: शॉप-फ्लोर ऐप और शेडmsgid "Profile"msgstr "प्रोफ़ाइल"+msgid "Profile Picture"+msgstr "प्रोफ़ाइल चित्र"+msgid "Profit Percent"msgstr "लाभ प्रतिशत"@@ -17928,6 +18171,9 @@ msgstr "SAML SSO साइन-इन को रूट करने से पहmsgid "Provide process knowledge and inputs"msgstr "प्रक्रिया ज्ञान और इनपुट प्रदान करें"+msgid "Provide the ts (timestamp) or link value of the **parent** message to make this message a reply. Do not use the ts value of the reply itself; use its parent instead. For example '1710304378.475129'.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the 'Copy link' option."+msgstr "इस संदेश को एक प्रतिक्रिया बनाने के लिए **मूल** संदेश का ts (टाइमस्टैम्प) या लिंक मान प्रदान करें। प्रतिक्रिया के ts मान का उपयोग न करें; इसके बजाय इसके मूल का उपयोग करें। उदाहरण के लिए '1710304378.475129'। वैकल्पिक रूप से, आप मूल संदेश के आगे तीन बिंदुओं पर क्लिक करके और 'लिंक कॉपी करें' विकल्प का चयन करके आसानी से संदेश लिंक प्राप्त कर सकते हैं।"+msgid "Provide these URLs to your identity provider (Okta, Entra ID, Google Workspace, etc.) when registering Carbon as a SAML application."msgstr "Carbon को SAML एप्लिकेशन के रूप में पंजीकृत करते समय इन URLs को अपने आइडेंटिटी प्रदाता (Okta, Entra ID, Google Workspace, आदि) को प्रदान करें।"@@ -18731,6 +18977,9 @@ msgstr "प्राप्त मात्रा शून्य से शुmsgid "Received quantity not yet credited. The credit memo is created as a draft."msgstr "प्राप्त मात्रा अभी तक जमा नहीं की गई। क्रेडिट नोट को ड्राफ्ट के रूप में बनाया गया है।"+msgid "Receiver Email (To)"+msgstr "प्राप्तकर्ता ईमेल (को)"+msgid "Receives the invoice email"msgstr "चालान ईमेल प्राप्त करता है"@@ -18788,6 +19037,21 @@ msgstr "एक क्रय आदेश को जो प्राप्त औmsgid "Reconfigure"msgstr "फिर से कॉन्फ़िगर करें"+msgid "Reconnect"+msgstr "फिर से जोड़ें"++msgid "Reconnect {appName}"+msgstr "{appName} को फिर से जोड़ें"++msgid "Reconnect it"+msgstr "इसे फिर से जोड़ें"++msgid "Reconnect needed"+msgstr "पुनः कनेक्ट करने की आवश्यकता है"++msgid "Reconnect with the account this connection already uses, or use Add account to connect the other one."+msgstr "इस कनेक्शन द्वारा पहले से उपयोग किए जा रहे खाते से फिर से कनेक्ट करें, या दूसरे खाते को कनेक्ट करने के लिए खाता जोड़ें का उपयोग करें।"+msgid "Record"msgstr "रिकॉर्ड करें"@@ -18833,9 +19097,16 @@ msgstr "रिकॉर्ड"msgid "Records and posted journals are being sent to and received from this provider."msgstr "रिकॉर्ड और पोस्ट किए गए जर्नल इस प्रदाता को भेजे जा रहे हैं और प्राप्त किए जा रहे हैं।"+msgid "Records here appear as plain text — {appLabel} doesn't support links in this field."+msgstr "{appLabel} इस फ़ील्ड में लिंक्स का समर्थन नहीं करता है — यहां के रिकॉर्ड सादे पाठ के रूप में दिखाई देंगे।"+msgid "Records moved"msgstr "रिकॉर्ड स्थानांतरित किए गए"+#. placeholder {0}: notice.params.equals+msgid "Records will be plain text. Set {siblingLabel} to {0} (under Advanced) to turn them into links."+msgstr "रिकॉर्ड सादे पाठ होंगे। उन्हें लिंक्स में बदलने के लिए {siblingLabel} को {0} पर सेट करें (Advanced के अंतर्गत)।"+msgid "Recost"msgstr "लागत पुनः निर्धारित करें"@@ -19182,6 +19453,10 @@ msgstr "प्राप्त सीरियल और बैच नंबरmsgid "Remove this item"msgstr "इस आइटम को निकालें"+msgctxt "workflow data step"+msgid "Remove this operation"+msgstr "यह ऑपरेशन हटाएं"+msgid "Remove this storage type from all referencing storage units and delete it. This cannot be undone."msgstr "इस भंडारण प्रकार को सभी संदर्भित भंडारण इकाइयों से निकालें और इसे हटाएँ। यह पूर्ववत नहीं किया जा सकता।"@@ -19216,6 +19491,9 @@ msgstr "नाम बदलें"msgid "Rename Workflow"msgstr "वर्कफ़्लो का नाम बदलें"+msgid "Renamed"+msgstr "नाम बदला गया"+msgid "Rendering label preview..."msgstr "लेबल पूर्वावलोकन प्रस्तुत किया जा रहा है..."@@ -19381,6 +19659,12 @@ msgstr "पुनःपूर्ति प्रणाली"msgid "Replies to emailed invoices go here, and it's copied on each one."msgstr "ईमेल किए गए चालानों के जवाब यहां आते हैं, और यह प्रत्येक पर कॉपी किया जाता है।"+msgid "Reply to Thread (Thread Message Link/Timestamp)"+msgstr "थ्रेड का जवाब दें (थ्रेड संदेश लिंक/टाइमस्टैम्प)"++msgid "Reply-To Email"+msgstr "जवाब-प्रेषक ईमेल"+msgid "Report"msgstr "रिपोर्ट"@@ -19925,6 +20209,9 @@ msgstr "आमंत्रण रद्द करें"msgid "Revoke Invites"msgstr "आमंत्रण रद्द करें"+msgid "Revoked"+msgstr "रद्द किया गया"+msgid "Rework"msgstr "पुनः कार्य"@@ -20699,6 +20986,9 @@ msgstr "आपूर्तिकर्ता पार्ट्स को खोmsgid "Search suppliers..."msgstr "आपूर्तिकर्ताओं को खोजें..."+msgid "Search Term"+msgstr "खोज शब्द"+msgid "Search tools..."msgstr "उपकरण खोजें..."@@ -20800,6 +21090,9 @@ msgstr "उपलब्ध विकल्प देखने के लिएmsgid "Select a step to hide parts on it."msgstr "एक चरण चुनें और उस पर पार्ट्स को छिपाएं।"+msgid "Select a step…"+msgstr "एक कदम चुनें…"+msgid "Select a substance and shape first to see available options"msgstr "उपलब्ध विकल्प देखने के लिए पहले एक पदार्थ और आकार चुनें"@@ -20818,6 +21111,9 @@ msgstr "सभी का चयन करें"msgid "Select an action…"msgstr "एक क्रिया चुनें…"+msgid "Select an app…"+msgstr "एक ऐप चुनें…"+msgid "Select an assignee"msgstr "एक असाइनी चुनें"@@ -20842,6 +21138,9 @@ msgstr "एक संचालन चुनें…"msgid "Select an option"msgstr "एक विकल्प चुनें"+msgid "Select an option…"+msgstr "एक विकल्प चुनें…"+msgid "Select at least one item to accept the quote"msgstr "कोटेशन स्वीकार करने के लिए कम से कम एक आइटम चुनें"@@ -20875,6 +21174,9 @@ msgstr "कर्मचारी चुनें"msgid "Select Employee Type"msgstr "कर्मचारी प्रकार चुनें"+msgid "Select event types"+msgstr "ईवेंट प्रकार चुनें"+msgid "Select field"msgstr "फ़ील्ड चुनें"@@ -21026,6 +21328,9 @@ msgstr "आमंत्रण भेजें"msgid "Send Invites"msgstr "आमंत्रण भेजें"+msgid "Send Notifications"+msgstr "सूचनाएं भेजें"+msgid "Send RFQ to Suppliers"msgstr "आपूर्तिकर्ताओं को RFQ भेजें"@@ -21035,6 +21340,12 @@ msgstr "Carbon को भेजें"msgid "Send Via"msgstr "के माध्यम से भेजें"+msgid "Sender Email"+msgstr "भेजने वाले का ईमेल"++msgid "Sender Name"+msgstr "भेजने वाले का नाम"+msgid "Sending defective units back to an earlier operation to be corrected instead of scrapping them."msgstr "दोषपूर्ण इकाइयों को उन्हें स्क्रैप करने के बजाय सुधारने के लिए पहली ऑपरेशन में वापस भेजना।"@@ -21802,6 +22113,18 @@ msgstr ""msgid "Slack"msgstr "Slack"+msgid "Slack: Create Channel"+msgstr "Slack: चैनल बनाएँ"++msgid "Slack: Find User by Email"+msgstr "Slack: ईमेल से उपयोगकर्ता खोजें"++msgid "Slack: Send Message To A Channel"+msgstr "Slack: किसी चैनल को संदेश भेजें"++msgid "Slack: Send Message To A User"+msgstr "Slack: किसी उपयोगकर्ता को संदेश भेजें"+msgid "Slice asset activity by location, item, or any dimension"msgstr "स्थान, आइटम, या किसी भी आयाम द्वारा संपत्ति गतिविधि को स्लाइस करें"@@ -22041,6 +22364,9 @@ msgstr "प्रारंभ तिथि"msgid "Start Date"msgstr "प्रारंभ तिथि"+msgid "Start date time of the event"+msgstr "इवेंट का प्रारंभ तारीख समय"+msgid "Start Expiration"msgstr "समाप्ति शुरू करें"@@ -22331,7 +22657,7 @@ msgid "Stripe Due Date"msgstr "Stripe नियत तिथि"msgid "Stripe emails the invoice to the customer, so an address is required. This will also be saved to the contact in Carbon."-msgstr "Stripe ग्राहक को चालान ईमेल करता है, इसलिए एक पता आवश्यक है। यह Carbon में संपर्क के लिए भी सहेजा जाएगा।"+msgstr "Stripe ग्राहक को चालान ईमेल करता है, इसलिए एक पता आवश्यक है। यह Carbon में संपर्क को भी सहेजा जाएगा।"msgid "Stripe emails the invoices to the customer, so an address is required. It is also saved to the contract's invoice contact in Carbon, if it has one."msgstr "Stripe ग्राहक को चालान भेजता है, इसलिए एक पता आवश्यक है। यह Carbon में अनुबंध के चालान संपर्क में भी सहेजा जाता है, यदि इसके पास एक है।"@@ -22855,6 +23181,9 @@ msgstr "टैग"msgid "Tailor this hub for the customer. Changes apply live for everyone viewing it. Never shown to the customer here."msgstr "इस हब को ग्राहक के लिए अनुकूलित करें। परिवर्तन सभी के लिए लाइव लागू होते हैं जो इसे देख रहे हैं। ग्राहक को यहां कभी नहीं दिखाया जाता है।"+msgid "Take one field from every item"+msgstr "हर आइटम से एक फ़ील्ड लें"+msgid "Take out of service"msgstr "सेवा से बाहर निकालें"@@ -22868,6 +23197,12 @@ msgstr "स्वामित्व लें"msgid "Take Ownership: {0}"msgstr "स्वामित्व लें: {0}"+msgid "Take the first item"+msgstr "पहला आइटम लें"++msgid "Take the last item"+msgstr "अंतिम आइटम लें"+msgid "Take the shortest remaining shelf life across the materials consumed to make this item. Use when the product's expiry depends on its ingredients."msgstr "इस आइटम को बनाने के लिए उपयोग की गई सामग्रियों में सबसे कम शेष शेल्फ लाइफ लें। जब उत्पाद की समाप्ति तारीख इसकी सामग्री पर निर्भर करती है तो उपयोग करें।"@@ -23115,11 +23450,8 @@ msgstr ""msgid "Test run"msgstr "परीक्षण चलाएं"-msgid "Test run — results are not saved to the Runs page"-msgstr "परीक्षण चलाएं — परिणाम रन पृष्ठ पर सहेजे नहीं जाते हैं"--msgid "Test runs are not saved. Close this panel and the result is gone."-msgstr "परीक्षण चलाएं सहेजे नहीं जाते। इस पैनल को बंद करें और परिणाम चला जाता है।"+msgid "Test runs are saved to the run history, marked as tests."+msgstr "परीक्षण रन, रन इतिहास में परीक्षण के रूप में चिह्नित होकर सहेजे जाते हैं।"msgid "Test Value"msgstr "परीक्षण मान"@@ -23127,9 +23459,36 @@ msgstr "परीक्षण मान"msgid "Text size"msgstr "पाठ आकार"+msgid "That account is still being reconnected. Try again in a moment."+msgstr "वह खाता अभी भी पुनः कनेक्ट किया जा रहा है। एक पल में फिर से कोशिश करें।"++msgid "That account no longer exists"+msgstr "वह खाता अब मौजूद नहीं है"++msgid "That connection name is already used"+msgstr "वह कनेक्शन नाम पहले से उपयोग किया जा रहा है"++msgid "That field holds a list of its own. Turn on flattening to take it."+msgstr "उस फ़ील्ड में अपनी एक सूची है। इसे लेने के लिए फ़्लैटनिंग चालू करें।"++msgid "That field holds several values, so they are combined into one list."+msgstr "उस फ़ील्ड में कई मान हैं, इसलिए उन्हें एक सूची में मिलाया जाता है।"++msgid "That integration is not available"+msgstr "वह एकीकरण उपलब्ध नहीं है"++msgid "That list was empty."+msgstr "वह सूची खाली थी।"+msgid "That name is already used by another step."msgstr "वह नाम पहले से ही एक अन्य चरण द्वारा उपयोग किया जा रहा है।"+msgid "That workspace is connected to another company"+msgstr "वह वर्कस्पेस किसी दूसरी कंपनी से कनेक्ट है"++msgid "That's a different account"+msgstr "यह एक अलग खाता है"+#. placeholder {0}: i18n._(step.title)msgid "The \"{0}\" phase checks itself off once all of its tasks in the project plan are done."msgstr "चरण \"{0}\" अपने आप को बंद कर देता है जब इसके प्रोजेक्ट योजना में सभी कार्य पूर्ण हो जाते हैं।"@@ -23143,6 +23502,9 @@ msgstr "यह \"{0}\" चरण पूर्ण हो गया — इसकmsgid "The {0} phases to go live, each ending at a checkpoint. Tick off each task as you complete it."msgstr "{0} चरणों को लाइव करने के लिए, प्रत्येक एक चेकपॉइंट पर समाप्त होता है। जैसे ही आप प्रत्येक कार्य को पूरा करते हैं, उसे टिक करें।"+msgid "The {appName} account this step uses is not available — it was disconnected or needs to be reconnected."+msgstr "यह चरण जिस {appName} खाते का उपयोग करता है वह उपलब्ध नहीं है — यह डिस्कनेक्ट किया गया था या पुनः कनेक्ट किए जाने की आवश्यकता है।"+msgid "The accent color used across Carbon."msgstr "Carbon में उपयोग किए जाने वाले हाइलाइट रंग।"@@ -23158,6 +23520,9 @@ msgstr "वे खाते जो Carbon स्वचालित रूप सmsgid "The action that copies a saved method (its materials, operations, and work instructions) onto a job or quote line."msgstr "किसी सहेजी गई विधि (इसकी सामग्री, ऑपरेशन और कार्य निर्देश) को किसी जॉब या कोटेशन पंक्ति पर प्रतिलिपि करने की कार्रवाई।"+msgid "The address must be listed in your GMail account's settings"+msgstr "पता आपके GMail खाते की सेटिंग्स में सूचीबद्ध होना चाहिए"+msgid "The allowed values for a list-type attribute; users pick from these rather than free-typing."msgstr "एक सूची-प्रकार की विशेषता के लिए अनुमत मान; उपयोगकर्ता स्वतंत्र रूप से टाइप करने के बजाय इन में से चुनते हैं।"@@ -23179,6 +23544,9 @@ msgstr "संपत्ति अपनी सेवा-में कक्षmsgid "The asset would have a negative cost. Check the purchase price."msgstr "संपत्ति की नकारात्मक लागत होगी। खरीद मूल्य की जाँच करें।"+msgid "The authorization took too long or came back altered. Start the connection again from this page."+msgstr "प्राधिकरण में बहुत लंबा समय लगा या यह बदला हुआ वापस आ गया। इस पृष्ठ से कनेक्शन फिर से शुरू करें।"+msgid "The authorization was refused in Onshape. Save the integration settings to try again."msgstr "Onshape में प्राधिकरण को अस्वीकार कर दिया गया था। एकीकरण सेटिंग्स को सहेजने का प्रयास करें।"@@ -23188,6 +23556,9 @@ msgstr "Onshape में प्राधिकरण अस्वीकारmsgid "The authorization was refused in Ramp. Try connecting again."msgstr "Ramp में प्राधिकरण अस्वीकार कर दिया गया। दोबारा कनेक्ट करने का प्रयास करें।"+msgid "The authorization was rejected"+msgstr "प्राधिकरण को अस्वीकार कर दिया गया"+msgid "The average cost of the item. Changing it needs permission to edit parts."msgstr "आइटम की औसत लागत। इसे बदलने के लिए पार्ट्स संपादित करने की अनुमति की आवश्यकता है।"@@ -23291,6 +23662,12 @@ msgstr "कंपनी के पास पहले से एक पोस्msgid "The company has no account defaults."msgstr "कंपनी के पास कोई खाता डिफ़ॉल्ट नहीं है।"+msgid "The connection could not be verified"+msgstr "कनेक्शन को सत्यापित नहीं किया जा सका"++msgid "The connection was refused"+msgstr "कनेक्शन अस्वीकार किया गया"+msgid "The contract cannot be cancelled then"msgstr "अनुबंध को तब रद्द नहीं किया जा सकता"@@ -23556,6 +23933,9 @@ msgstr "वह https पता जहाँ वर्कफ़्लो काmsgid "The human-readable document number (like J000001 or ECO-000001) minted from a sequence and stored on the record, distinct from its internal id."msgstr "मानव-पठनीय दस्तावेज़ संख्या (जैसे J000001 या ECO-000001) जो एक अनुक्रम से बनाई गई है और रिकॉर्ड पर संग्रहीत है, इसके आंतरिक id से अलग।"+msgid "The icon emoji of the bot"+msgstr "बॉट का आइकन इमोजी"+msgid "The identifier the customer uses for this part on their POs; Carbon resolves it to our internal Part ID on order import."msgstr "वह पहचानकर्ता जिसे ग्राहक अपने PO पर इस पार्ट के लिए उपयोग करता है; Carbon इसे ऑर्डर आयात पर हमारी आंतरिक Part ID में हल करता है।"@@ -23577,6 +23957,9 @@ msgstr "इनकोटर्म नियम (FOB, DAP, EXW, CIF, …) जोmsgid "The Incoterm rule (FOB, DAP, EXW, CIF, …) that governs who pays freight, who bears risk, and where the transfer of title occurs on shipments to this customer."msgstr "इनकोटर्म नियम (FOB, DAP, EXW, CIF, …) जो निर्धारित करता है कि कौन माल भाड़ा भुगतान करता है, कौन जोखिम वहन करता है, और इस ग्राहक को शिपमेंट पर मालिकाना हक का स्थानांतरण कहाँ होता है।"+msgid "The integration authorized the connection but saving it failed. Try connecting again."+msgstr "एकीकरण ने कनेक्शन को अधिकृत किया लेकिन इसे सहेजने में विफल रहा। फिर से कनेक्ट करने का प्रयास करें।"+msgid "The inventory cost recognized when a shipment posts, valued by the item's costing method."msgstr "शिपमेंट पोस्ट होने पर मान्यता दी गई इन्वेंटरी लागत, जिसका मूल्यांकन आइटम की लागत निर्धारण विधि के द्वारा किया गया है।"@@ -23592,6 +23975,15 @@ msgstr "प्रत्येक जॉब द्वारा उत्पादmsgid "The item's rental rate"msgstr "आइटम की किराये की दर"+msgid "The items in that list have no field by that name."+msgstr "उस सूची के आइटम में उस नाम का कोई फ़ील्ड नहीं है।"++msgid "The items in that list have no fields to take."+msgstr "उस सूची में आइटम्स के पास लेने के लिए कोई फ़ील्ड नहीं हैं।"++msgid "The items in that list have no reading as text."+msgstr "उस सूची के आइटम को टेक्स्ट के रूप में नहीं पढ़ा जा सकता।"+msgid "the job hours due that day (a due-date basis, not the day the work runs), with overdue work in Past due."msgstr "उस दिन देय नौकरी के घंटे (देय तारीख आधार पर, वह दिन नहीं जब काम चलता है), अतिदेय कार्य पिछली देय में।"@@ -23885,6 +24277,9 @@ msgstr "कार्यविधि जिसका पालन तकनीशmsgid "The processes this work center can run; appears in process-pickers when scheduling operations, and limits which jobs can route through this work center."msgstr "प्रक्रियाएँ जो यह वर्क सेंटर चला सकता है; ऑपरेशन शेड्यूल करते समय प्रक्रिया-पिकर में दिखाई देता है, और यह सीमित करता है कि कौन से जॉब इस वर्क सेंटर के माध्यम से रूट हो सकते हैं।"+msgid "The profile picture of the bot"+msgstr "बॉट की प्रोफ़ाइल चित्र"+msgid "The provider offers no dimension targets. Enable the feature in the provider first (e.g. tracking categories, class tracking, or fields)."msgstr "प्रदाता कोई आयाम लक्ष्य प्रदान नहीं करता है। पहले प्रदाता में सुविधा सक्षम करें (जैसे ट्रैकिंग श्रेणियां, कक्षा ट्रैकिंग, या फ़ील्ड)।"@@ -23986,12 +24381,12 @@ msgstr "Onshape की प्रतिक्रिया में आवश्msgid "The response from Ramp was missing required parameters. Try connecting again."msgstr "Ramp से मिले उत्तर में आवश्यक पैरामीटर मौजूद नहीं थे। दोबारा कनेक्ट करने का प्रयास करें।"+msgid "The response was missing required parameters. Try connecting again."+msgstr "प्रतिक्रिया में आवश्यक पैरामीटर गायब थे। फिर से कनेक्ट करने का प्रयास करें।"+msgid "The restore job reported this error."msgstr "पुनर्स्थापन जॉब ने इस त्रुटि की रिपोर्ट की।"-msgid "The result will not appear on the Runs page."-msgstr "परिणाम Runs page पर प्रदर्शित नहीं होगा।"-msgid "The revision number of the part"msgstr "पार्ट की रिवीजन संख्या"@@ -24139,6 +24534,9 @@ msgstr "वह प्रणाली जिसका उपयोग कंपmsgid "The system passes every in-scope acceptance test in your configured system, with your data; the data is validated; and you sign off. Then go-live."msgstr "सिस्टम आपके कॉन्फ़िगर किए गए सिस्टम में हर इन-स्कोप स्वीकृति परीक्षा पास करता है, आपके डेटा के साथ; डेटा सत्यापित है; और आप साइन ऑफ करते हैं। फिर लाइव जाएं।"+msgid "The text of your message. When using Block Kit blocks, this is used as a fallback for notifications."+msgstr "आपके संदेश का पाठ। Block Kit ब्लॉक्स का उपयोग करते समय, इसका उपयोग सूचनाओं के लिए फॉलबैक के रूप में किया जाता है।"+msgid "The thread linking a sales RFQ, its quote, and the resulting sales order — a join, not a document with its own status."msgstr "बिक्री RFQ, इसके कोटेशन, और परिणामी विक्रय आदेश को जोड़ने वाली श्रृंखला — एक संबंध, अपनी स्थिति के साथ एक दस्तावेज़ नहीं।"@@ -24220,6 +24618,9 @@ msgstr ""msgid "The US tax depreciation system with IRS property-class tables, run as a separate tax schedule alongside the book schedule."msgstr "अमेरिकी कर मूल्यह्रास प्रणाली IRS संपत्ति-वर्ग तालिकाओं के साथ, पुस्तक अनुसूची के साथ एक अलग कर अनुसूची के रूप में चलाई जाती है।"+msgid "The username of the bot"+msgstr "बॉट का उपयोगकर्ता नाम"+msgid "The users in this group; group-scoped permissions and notifications apply to each member, and users may belong to multiple groups (effective permissions are the union)."msgstr "इस समूह में उपयोगकर्ता; समूह-scoped अनुमतियां और सूचनाएं प्रत्येक सदस्य पर लागू होती हैं, और उपयोगकर्ता कई समूहों से संबंधित हो सकते हैं (प्रभावी अनुमतियां संघ हैं)।"@@ -24352,6 +24753,11 @@ msgstr "ये आपके चार्ट में नहीं हैं,msgid "this ability"msgstr "यह कौशल"+msgid "This account has stopped working. Reconnect it — workflow steps using it will fail until you do."+msgstr "यह खाता काम करना बंद कर गया है। इसे पुनः कनेक्ट करें — इसका उपयोग करने वाले वर्कफ़्लो चरण तब तक विफल होंगे।"++msgid "This account needs to be reconnected."+msgstr "इस खाते को पुनः कनेक्ट किए जाने की आवश्यकता है।"msgid "This action cannot run on this list."msgstr ""@@ -24384,6 +24790,9 @@ msgstr "यह बाद में नहीं बदला जा सकताmsgid "This cannot be undone."msgstr "इसे पूर्ववत नहीं किया जा सकता है।"+msgid "This Carbon instance is missing its OAuth credentials for this integration. Ask an administrator to set them."+msgstr "यह Carbon उदाहरण इस एकीकरण के लिए अपने OAuth क्रेडेंशियल गायब हैं। व्यवस्थापक को उन्हें सेट करने के लिए कहें।"+msgid "This Carbon instance is missing its Onshape OAuth credentials. Ask an administrator to set them."msgstr "इस Carbon इंस्टेंस में Onshape OAuth क्रेडेंशियल नहीं हैं। किसी व्यवस्थापक से उन्हें सेट करने के लिए कहें।"@@ -24442,9 +24851,15 @@ msgstr "यह जानकारी सभी उपयोगकर्ताओmsgid "this inspection plan"msgstr "इस निरीक्षण योजना"+msgid "This integration can't be connected on this Carbon instance."+msgstr "यह एकीकरण इस Carbon इंस्टेंस पर कनेक्ट नहीं किया जा सकता।"+msgid "This integration isn't available yet"msgstr "यह एकीकरण अभी उपलब्ध नहीं है"+msgid "This integration isn't configured"+msgstr "यह एकीकरण कॉन्फ़िगर नहीं किया गया है"+#. placeholder {0}: company?.name ?? "Carbon"msgid "This invitation to join {0} has expired. You can request a new invite to be sent to your email."msgstr "यह आमंत्रण {0} में शामिल होने के लिए समाप्त हो गया है। आप अपने ईमेल पर भेजने के लिए नया आमंत्रण का अनुरोध कर सकते हैं।"@@ -24627,6 +25042,9 @@ msgstr "यह स्टेशन कौशल-गेटेड कार्यmsgid "This station runs work with no ability requirement; operators assigned on the manning board shape available labor."msgstr "यह स्टेशन कोई कौशल आवश्यकता के बिना काम चलाता है; मैनिंग बोर्ड पर असाइन किए गए ऑपरेटर उपलब्ध श्रम को आकार देते हैं।"+msgid "This step expected a list."+msgstr "इस चरण को एक सूची की अपेक्षा थी।"+msgid "This step is part of it"msgstr "यह चरण इसका हिस्सा है"@@ -24817,6 +25235,9 @@ msgstr "तंग"msgid "Tightened"msgstr "कठोर"+msgid "Time"+msgstr "समय"+msgid "Time and dollar utilization of the rental fleet by asset and class"msgstr "संपत्ति और वर्ग द्वारा किराया बेड़े का समय और डॉलर उपयोग"@@ -24862,6 +25283,9 @@ msgstr "अपनी ओर झुकाएँ"msgid "Title"msgstr "शीर्षक"+msgid "Title of the event"+msgstr "घटना का शीर्षक"+msgid "Title passes to the customer when the term ends."msgstr "अवधि समाप्त होने पर शीर्षक ग्राहक को हस्तांतरित हो जाता है।"@@ -24967,6 +25391,14 @@ msgstr "सहनशीलता (दिन)"msgid "Tomorrow"msgstr "कल"+msgid "Took {took} values; kept the first {kept}."+msgstr "{took} मान लिए गए; पहले {kept} रखे गए।"++msgid "Took the first of {total}."+msgstr "{total} में से पहला लिया गया।"++msgid "Took the last of {total}."+msgstr "{total} में से अंतिम लिया गया।"msgid "Too many exports and bulk actions are running right now. Try again in a few minutes."msgstr "अभी बहुत सारे एक्सपोर्ट और बल्क एक्शन चल रहे हैं। कुछ मिनट बाद फिर से कोशिश करें।"@@ -25298,6 +25730,9 @@ msgstr "ट्रिगर"msgid "Try a different name."msgstr "एक अलग नाम आज़माएँ।"+msgid "Try again"+msgstr "फिर से कोशिश करें"+msgid "Tuesday"msgstr "मंगलवार"@@ -25368,6 +25803,9 @@ msgstr "जारी रखने के लिए <0>\"{confirmPhrase}\"</0>msgid "Type a message..."msgstr "एक संदेश लिखें..."+msgid "Type a value and press Enter…"+msgstr "एक मान दर्ज करें और Enter दबाएँ…"+msgid "Type an email and press Enter to add an external recipient"msgstr "एक ईमेल टाइप करें और एक बाहरी प्राप्तकर्ता जोड़ने के लिए Enter दबाएं"@@ -25449,6 +25887,9 @@ msgstr "अभी भी आने वाले बिना छूट केmsgid "Undo"msgstr "पूर्ववत करें"+msgid "Unfurl Links"+msgstr "लिंक्स को विस्तृत करें"+msgid "Ungroup"msgstr "समूह हटाएं"@@ -25598,7 +26039,7 @@ msgid "Unposted Documents"msgstr "अपोस्ट किए गए दस्तावेज़"msgid "Unpublish"-msgstr "अप्रकाशित करें"+msgstr "प्रकाशन रद्द करें"msgid "Unpublish {name}?"msgstr "{name} को प्रकाशन रद्द करें?"@@ -25969,6 +26410,9 @@ msgstr "उपयोगकर्ता अनुमतियां"msgid "User roles"msgstr "उपयोगकर्ता भूमिकाएं"+msgid "Username"+msgstr "उपयोगकर्ता नाम"+msgid "users"msgstr "उपयोगकर्ता"@@ -26753,6 +27197,9 @@ msgstr "जब सक्षम हो, तो यह मूल्य ओवरmsgid "When on, this rule fires for every target of its type. Assignment rows are ignored but preserved."msgstr "जब चालू हो, तो यह नियम अपने प्रकार के प्रत्येक लक्ष्य के लिए सक्रिय होता है। असाइनमेंट पंक्तियों को अनदेखा किया जाता है लेकिन संरक्षित रखा जाता है।"+msgid "When replying to a thread, also make the message visible to everyone in the channel (only applicable when Thread Timestamp is provided)"+msgstr "किसी थ्रेड का जवाब देते समय, संदेश को चैनल में सभी के लिए दृश्यमान भी बनाएँ (केवल तब लागू होता है जब थ्रेड टाइमस्टैम्प प्रदान किया जाता है)"+msgid "When supplier responses are expected back; suppliers see this date on the RFQ portal and Carbon stops accepting late responses after it (configurable)."msgstr "जब आपूर्तिकर्ता प्रतिक्रिया की उम्मीद की जाती है; आपूर्तिकर्ता आरएफक्यू पोर्टल पर यह तारीख देखते हैं और कार्बन इसके बाद देर से प्रतिक्रिया स्वीकार नहीं करता है (कॉन्फ़िगर करने योग्य)।"@@ -26924,6 +27371,9 @@ msgstr "यह कार्य उत्पादन को अवरुद्msgid "Whether to Add the selected permissions on top of what each user already has, or Update by replacing each user's permission set wholesale with the selection below."msgstr "क्या जोड़ें चयनित अनुमतियों को प्रत्येक उपयोगकर्ता के पास पहले से है उसके ऊपर, या अपडेट करें प्रत्येक उपयोगकर्ता की अनुमति सेट को नीचे चयन के साथ थोक में प्रतिस्थापित करके।"+msgid "Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves."+msgstr "क्या आवर्ती ईवेंट को अलग-अलग इंस्टेंस में विस्तारित करना है और केवल एकल ईवेंट तथा आवर्ती ईवेंट के इंस्टेंस लौटाने हैं, मूल आवर्ती ईवेंट नहीं।"+msgid "Which document drives each inspection flow for this item."msgstr "कौन सा दस्तावेज़ इस आइटम के लिए प्रत्येक निरीक्षण प्रवाह को चलाता है।"@@ -27227,6 +27677,9 @@ msgstr "आप एक से अधिक कंपनी से संबंधmsgid "You can change the UI style any time through the theme setting"msgstr "आप किसी भी समय थीम सेटिंग के माध्यम से UI शैली को बदल सकते हैं"+msgid "You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.'"+msgstr "आप चैनल पर राइट-क्लिक करके और 'चैनल विवरण देखें' का चयन करके चैनल ID प्राप्त कर सकते हैं।"+msgid "You can only see this key once. Store it safely."msgstr "आप इस कुंजी को केवल एक बार देख सकते हैं। इसे सुरक्षित रूप से संग्रहीत करें।"@@ -27281,6 +27734,9 @@ msgstr "आप नेतृत्व करते हैं"msgid "You name a project owner with decision authority"msgstr "आप निर्णय लेने के अधिकार वाले परियोजना स्वामी का नाम देते हैं"+msgid "You need permission to edit workflows to load these choices."+msgstr "इन विकल्पों को लोड करने के लिए आपको वर्कफ़्लो संपादित करने की अनुमति चाहिए।"+msgid "You received this item"msgstr "आपने यह आइटम प्राप्त किया"diff --git a/packages/locale/locales/hi/mes.po b/packages/locale/locales/hi/mes.poindex be276b784e..350f40e845 100644--- a/packages/locale/locales/hi/mes.po+++ b/packages/locale/locales/hi/mes.po@@ -113,6 +113,9 @@ msgstr "एक पिछला समापन पूरा नहीं हुmsgid "About"msgstr "के बारे में"+msgid "About this field"+msgstr "इस फ़ील्ड के बारे में"+msgid "Accept"msgstr "स्वीकार करें"@@ -1234,6 +1237,9 @@ msgstr "आज के लिए कोई रखरखाव निर्धाmsgid "No matches. Type to create one."msgstr "कोई मेल नहीं। एक बनाने के लिए टाइप करें।"+msgid "No matching time"+msgstr "कोई मेल खाता समय नहीं"+msgid "No materials"msgstr "कोई सामग्री नहीं"@@ -2144,6 +2150,9 @@ msgstr "थंबनेल"msgid "Tick the jobs this was done for."msgstr "उन जॉब्स को चेक करें जिनके लिए यह किया गया था।"+msgid "Time"+msgstr "समय"+msgid "Time and cost split across jobs proportionally to quantity."msgstr "समय और लागत मात्रा के अनुपात में जॉब में विभाजित है।"diff --git a/packages/locale/locales/it/erp.po b/packages/locale/locales/it/erp.poindex f6e73ca6bb..7455546b36 100644--- a/packages/locale/locales/it/erp.po+++ b/packages/locale/locales/it/erp.po@@ -269,6 +269,10 @@ msgstr "{0} fatture sono state fatturate nel vostro sistema precedente e non venmsgid "{0} is {1}, not Draft or Planned"msgstr ""+#. placeholder {0}: integration.name+msgid "{0} isn't installed yet. There's nothing to configure — install it to connect an account."+msgstr "{0} non è ancora installato. Non c'è nulla da configurare — installalo per connettere un account."+#. placeholder {0}: data.quantitymsgid "{0} items marked as picked"msgstr ""@@ -481,6 +485,12 @@ msgstr "{alreadyPlannedItemCount} componenti saltati — hanno già ordini di prmsgid "{apOverduePct}% of payables"msgstr "{apOverduePct}% dei debiti"+msgid "{appName} is connected, but needs to be reconnected before workflow steps can use it."+msgstr "{appName} è collegato, ma deve essere ricollegato prima che i passaggi del flusso di lavoro possano utilizzarlo."++msgid "{appName} isn't connected yet. Connect an account before this step can do anything."+msgstr "{appName} non è ancora connesso. Connetti un account prima che questo passaggio possa fare qualsiasi cosa."+msgid "{arOverduePct}% of receivables"msgstr "{arOverduePct}% dei crediti"@@ -594,6 +604,9 @@ msgstr "{inserted} inseriti, {updated} aggiornati, {0} richiedono correzione, {1msgid "{jobsMissingStorageUnit, plural, one {# open job has materials with no storage unit} other {# open jobs have materials with no storage unit}}"msgstr "{jobsMissingStorageUnit, plural, one {# ordine di produzione aperto ha materiali senza unità di stoccaggio} other {# ordini di produzione aperti hanno materiali senza unità di stoccaggio}}"+msgid "{kept, plural, one {Took # value.} other {Took # values.}}"+msgstr "{kept, plural, one {Preso # valore.} other {Presi # valori.}}"+msgid "{label} is used by documents, journals or default accounts, so it cannot be deleted."msgstr "{label} è utilizzato da Documenti, Prima nota o conti predefiniti, quindi non può essere eliminato."@@ -746,6 +759,9 @@ msgstr "{state} · sincronizzato {syncedAgo}"msgid "{termMonths, plural, one {# month} other {# months}}"msgstr "{termMonths, plural, one {# mese} other {# mesi}}"+msgid "{total, plural, one {Joined # value.} other {Joined # values.}}"+msgstr "{total, plural, one {Unito # valore.} other {Uniti # valori.}}"+msgid "{total} phases to get your company live on Carbon. Each one ends at a checkpoint."msgstr "{total} fasi per mettere la tua azienda online su Carbon. Ognuna termina a un checkpoint."@@ -1651,6 +1667,9 @@ msgstr "Un utente registra la data di scadenza su ogni lotto o numero seriale qumsgid "A variable charge — mileage overage, damage, delivery, cleaning — is billed on the agreement's next invoice."msgstr "Un addebito variabile — chilometraggio in eccesso, danno, consegna, pulizia — viene fatturato sulla prossima fattura del contratto."+msgid "A workspace can be connected to one Carbon company only. Disconnect it there first, or connect a different workspace."+msgstr "Uno spazio di lavoro può essere connesso a una sola azienda Carbon. Disconnettilo prima da lì oppure connetti un altro spazio di lavoro."+msgid "ABA"msgstr "ABA"@@ -1672,6 +1691,9 @@ msgstr "Informazioni"msgid "About (notification)"msgstr "Informazioni (notifica)"+msgid "About this field"+msgstr "Informazioni su questo campo"+msgid "Absent"msgstr "Assente"@@ -1838,6 +1860,9 @@ msgstr ""msgid "Accounts receivable for amounts owed by customers"msgstr "Crediti verso clienti per importi dovuti dai clienti."+msgid "Accounts your workflows can act as. Add one for each account a workflow step should use."+msgstr "Account come i tuoi flussi di lavoro possono agire. Aggiungi uno per ogni account che un passaggio del flusso di lavoro dovrebbe utilizzare."+msgid "Accrual"msgstr "Rateo"@@ -2055,6 +2080,9 @@ msgstr "Aggiungi un passo o una domanda"msgid "Add Ability"msgstr "Aggiungi Competenza"+msgid "Add account"+msgstr "Aggiungi account"+msgid "Add Account"msgstr "Aggiungi Conto"@@ -2196,6 +2224,10 @@ msgstr "Aggiungi Mese"msgid "Add Note"msgstr "Aggiungi Nota"+msgctxt "workflow data step"+msgid "Add operation"+msgstr "Aggiungi operazione"+msgid "Add Operation"msgstr "Aggiungi Operazione"@@ -2434,6 +2466,9 @@ msgstr "Procedi a {nextStatus}"msgid "Advanced"msgstr "Avanzate"+msgid "Advanced properties"+msgstr "Proprietà avanzate"+msgid "Affected item not found."msgstr "Elemento interessato non trovato."@@ -2657,6 +2692,12 @@ msgstr "Gli importi mostrano solo le cifre significative."msgid "An ability is a process's qualification. Only processes without one are listed."msgstr "Una competenza è la qualificazione di un processo. Solo i processi senza una sono elencati."+msgid "An account is already called that — pick a different name."+msgstr "Un account ha già quel nome — scegli un nome diverso."++msgid "An account is missing from this list until it is reconnected."+msgstr "Un account non compare in questo elenco finché non viene ricollegato."+msgid "An accounting bucket that groups expenses by department or function so the GL can report spend by group, not just by account."msgstr "Un bucket di contabilità che raggruppa le spese per reparto o funzione in modo che la Contabilità generale possa riportare le spese per gruppo, non solo per conto."@@ -2822,6 +2863,9 @@ msgstr "Si è verificato un errore imprevisto durante la connessione a Onshape.msgid "An unexpected error occurred while connecting to Onshape. Try connecting again."msgstr "Si è verificato un errore inatteso durante la connessione a Onshape. Riprova a connetterti."+msgid "An unexpected error occurred while connecting. Try connecting again."+msgstr "Si è verificato un errore imprevisto durante la connessione. Prova a connetterti di nuovo."+msgid "Analytics"msgstr "Analitiche"@@ -2839,9 +2883,6 @@ msgstr "E {0} altri — risolvi questi per visualizzare il resto."msgid "And {0} more. Resolve these to see the rest."msgstr "E {0} altri. Risolvi questi per vedere il resto."-msgid "and {hidden} more"-msgstr "e {hidden} altri"-msgid "and {remaining} more"msgstr "e {remaining} altri"@@ -2878,6 +2919,9 @@ msgstr "Tasso annuale di sconto applicato al noleggio"msgid "Annual. Starts from the company's incremental borrowing rate"msgstr "Annuale. Inizia dal tasso di prestito incrementale dell'azienda"+msgid "Another connection to this integration already has that name. Choose a different one."+msgstr "Un'altra connessione a questa integrazione ha già quel nome. Scegli uno diverso."+msgid "Another cost center this one rolls up into, letting you nest a sub-department under its parent for hierarchical cost reporting."msgstr "Un altro centro di costo in cui questa aggregazione, permettendoti di annidare un sottocenter di costo sotto il suo padre per il reporting del costo gerarchico."@@ -2950,6 +2994,9 @@ msgstr "Chiavi API per l'accesso programmatico ai tuoi dati Carbon."msgid "API, webhooks, and integrations"msgstr "API, webhook e integrazioni"+msgid "App"+msgstr "App"+msgid "Appearance"msgstr "Aspetto"@@ -3882,6 +3929,9 @@ msgstr "Impossibile caricare gli allegati"msgid "Attempts"msgstr "Tentativi"+msgid "Attendees"+msgstr "Partecipanti"+msgid "Attribute"msgstr "Attributo"@@ -3924,6 +3974,9 @@ msgstr "App autenticatore"msgid "Authenticator QR code"msgstr "Codice QR autenticatore"+msgid "Authorization was refused. Try connecting again."+msgstr "L'autorizzazione è stata rifiutata. Prova a connetterti di nuovo."+msgid "Authorized overtime on top of the shift"msgstr "Straordinario autorizzato oltre il turno"@@ -3984,6 +4037,9 @@ msgstr "Aggiornamenti e backup automatici"msgid "Automatic, prorated consumption of a job's untracked materials when output is reported — tracked materials are issued manually."msgstr "Consumo automatico e proporzionato dei materiali non tracciati di un lavoro quando viene segnalata l'uscita — i materiali tracciati vengono emessi manualmente."+msgid "Automatically create a Google Meet video conference link for this event"+msgstr "Crea automaticamente un collegamento a una videoconferenza Google Meet per questo evento"+msgid "Automatically release the job when the kanban is scanned"msgstr "Rilascia automaticamente il lavoro quando il kanban viene scansionato"@@ -4193,6 +4249,9 @@ msgstr "Lotti di produzione da restituire"msgid "Batching"msgstr "Raggruppamento in Lotti"+msgid "BCC Email"+msgstr "BCC Email"+msgid "Becomes"msgstr "Diventa"@@ -4370,6 +4429,12 @@ msgstr "Lavagna"msgid "Body"msgstr "Corpo"+msgid "Body for the email you want to send"+msgstr "Corpo dell'email che desideri inviare"++msgid "Body Type"+msgstr "Tipo di corpo"+msgid "BoM"msgstr "BoM"@@ -4427,6 +4492,9 @@ msgstr "Breadcrumb"msgid "Bring in your parts, BOMs, Bill of Process, and costing — with Carbon's import tools, CSV, or LLM help."msgstr "Importa i tuoi componenti, BOM, lista delle operazioni e calcolo dei costi — con gli strumenti di importazione di Carbon, CSV o aiuto LLM."+msgid "Broadcast reply to channel"+msgstr "Rispondi al canale con broadcast"+msgid "Browse library"msgstr "Sfoglia libreria"@@ -4513,6 +4581,9 @@ msgstr ""msgid "By accepting the invite, you agree to the <0>Terms of Service</0> and <1>Privacy Policy</1>."msgstr "Accettando l'invito, accetti i <0>Termini di Servizio</0> e l'<1>Informativa sulla Privacy</1>."+msgid "By default it'll be 30 min post start time"+msgstr "Per impostazione predefinita, sarà 30 minuti dopo l'ora di inizio"+msgid "By dimension"msgstr "Per dimensione"@@ -4881,6 +4952,9 @@ msgstr "Esecuzione causante: "msgid "CC"msgstr "CC"+msgid "CC Email"+msgstr "CC Email"+msgid "Centralized Billing Address"msgstr "Indirizzo di Fatturazione Centralizzato"@@ -4998,6 +5072,12 @@ msgstr "Modificare questo aggiornerà l'ID della parte"msgid "Changing type resets this item's draft edits."msgstr "Cambiare il tipo ripristina le modifiche in bozza di questo elemento."+msgid "Channel"+msgstr "Canale"++msgid "Channel Name"+msgstr "Nome canale"+msgid "Characteristic"msgstr "Caratteristica"@@ -5078,6 +5158,9 @@ msgstr "Checkpoint ·"msgid "Checkpoints"msgstr "Checkpoint"+msgid "Choose {named} first."+msgstr "Scegli {named} per primo."+msgid "Choose a backup"msgstr "Scegli un backup"@@ -5333,6 +5416,9 @@ msgstr "Comprimi preparazione"msgid "Collapse subtree"msgstr "Comprimi sottostruttura"+msgid "Color"+msgstr "Colore"+#. placeholder {0}: index + 1msgid "Column {0} of {count}"msgstr "Colonna {0} di {count}"@@ -5594,6 +5680,9 @@ msgstr "Configura gli account predefiniti utilizzati per vari tipi di transazionmsgid "Configure the start months for your fiscal and tax years"msgstr "Configura i mesi di inizio per gli anni fiscali e tributari"+msgid "Configure the steps above first."+msgstr "Configura prima i passaggi precedenti."+msgid "Configure when purchased item costs should be updated from supplier transactions."msgstr "Configura quando i costi degli articoli acquistati devono essere aggiornati dalle transazioni dei fornitori."@@ -5690,6 +5779,9 @@ msgstr "Motivo del conflitto"msgid "Connect"msgstr "Connetti"+msgid "Connect {appName}"+msgstr "Connetti {appName}"+msgid "Connect Carbon to your accounting, project management, and CAD tools and much more."msgstr "Connetti Carbon ai tuoi strumenti di contabilità, gestione dei progetti, CAD e molto altro."@@ -5717,9 +5809,18 @@ msgstr "Collega gli strumenti esterni su cui la tua azienda è già in esecuzionmsgid "Connect your identity provider by pasting either its metadata URL or its raw metadata XML — exactly one of the two."msgstr "Connetti il tuo provider di identità incollando l'URL dei metadati o il file XML dei metadati grezzo — esattamente uno dei due."+msgid "Connected before workflows needed extra permissions. Reconnect to grant them — everything else keeps working meanwhile."+msgstr "Collegato prima che i flussi di lavoro necessitassero autorizzazioni aggiuntive. Ricollega per concederle — tutto il resto continua a funzionare nel frattempo."+msgid "Connected to"msgstr "Connesso a"+msgid "Connection"+msgstr "Connessione"++msgid "Connection name"+msgstr "Nome della connessione"+msgid "Console Mode"msgstr "Modalità Console"@@ -6336,6 +6437,12 @@ msgstr "Non è stato possibile rilasciare {0}: {1}"msgid "Could not save"msgstr "Impossibile salvare"+msgid "Couldn't check whether {appName} is connected."+msgstr "Impossibile verificare se {appName} è connesso."++msgid "Couldn't complete the connection"+msgstr "Non è stato possibile completare la connessione"+msgid "Couldn't complete the Onshape connection"msgstr "Impossibile completare la connessione a Onshape"@@ -6351,12 +6458,18 @@ msgstr "Impossibile caricare altre righe"msgid "Couldn't load related documents. Refresh before creating a new one to avoid duplicates."msgstr "Impossibile caricare i documenti correlati. Aggiorna prima di crearne uno nuovo per evitare duplicati."+msgid "Couldn't load the choices for this field."+msgstr "Impossibile caricare le scelte per questo campo."+msgid "Couldn't load the provider's dimension targets — check the connection and reload."msgstr "Impossibile caricare i target di dimensione del provider — verifica la connessione e ricarica."msgid "Couldn't reschedule the job. Please try again."msgstr "Impossibile ripianificare il lavoro. Riprova."+msgid "Couldn't save the connection"+msgstr "Non è stato possibile salvare la connessione"+msgid "Couldn't save the Onshape connection"msgstr "Impossibile salvare la connessione a Onshape"@@ -6366,6 +6479,12 @@ msgstr "Impossibile salvare la connessione Onshape Government"msgid "Couldn't save the Ramp connection"msgstr "Non è stato possibile salvare la connessione Ramp"+msgid "Couldn't start the {name} connection"+msgstr "Impossibile avviare la connessione a {name}"++msgid "Couldn't start the authorization."+msgstr "Impossibile avviare l'autorizzazione."+msgid "Count"msgstr "Conteggio"@@ -6375,6 +6494,12 @@ msgstr "Cronologia dei conteggi"msgid "Count ID"msgstr "ID Conteggio"+msgid "Count items"+msgstr "Conta articoli"++msgid "Counted {total}."+msgstr "Contati {total}."+msgid "Counted Qty"msgstr "Qtà Conteggiata"@@ -6479,6 +6604,9 @@ msgstr "Crea contratto"msgid "Create Forecast"msgstr "Crea previsione"+msgid "Create Google Meet Link"+msgstr "Crea il link Google Meet"+msgid "Create Issue"msgstr "Crea Problema"@@ -7116,6 +7244,9 @@ msgstr "Data"msgid "Date Acquired"msgstr "Data di acquisizione"+msgid "Date and time"+msgstr "Data e ora"+msgid "Date Calibrated"msgstr "Data Calibrata"@@ -7125,6 +7256,9 @@ msgstr "Data di scadenza"msgid "Date Due"msgstr "Data di scadenza"+msgid "Date from"+msgstr "Data da"+msgid "Date issued"msgstr "Data di emissione"@@ -7137,6 +7271,9 @@ msgstr "Data pagamento"msgid "Date Paid"msgstr "Data Pagamento"+msgid "Date to"+msgstr "Data fino a"+msgid "Dates"msgstr "Date"@@ -8006,6 +8143,9 @@ msgstr "Descrizione della Modifica"msgid "Description of Issue"msgstr "Descrizione del Problema"+msgid "Description of the event. You can use HTML tags here."+msgstr "Descrizione dell'evento. Puoi usare i tag HTML qui."+msgid "Detach"msgstr "Scollega"@@ -8111,6 +8251,9 @@ msgstr "Scartato"msgid "Disconnect"msgstr "Disconnetti"+msgid "Disconnected"+msgstr "Disconnesso"+msgid "Discontinuation date"msgstr "Data di interruzione"@@ -9071,6 +9214,9 @@ msgstr "Email"msgid "Email Address"msgstr "Indirizzo Email"+msgid "Email address to set as the \"Reply-To\" header"+msgstr "Indirizzo email da impostare come intestazione «Rispondi a»"+msgid "Email Domains"msgstr "Domini Email"@@ -9086,6 +9232,9 @@ msgstr "Inviato per email"msgid "Emails"msgstr "Email"+msgid "Emails of the attendees (guests)"+msgstr "Email dei partecipanti (ospiti)"+msgid "Emoji"msgstr "Emoji"@@ -9155,6 +9304,9 @@ msgstr "Abilita le quotazioni digitali per la tua azienda. Questo ti permetteràmsgid "Enable in Settings"msgstr "Abilita nelle Impostazioni"+msgid "Enable link unfurling for this message"+msgstr "Abilita lo svolgimento dei collegamenti per questo messaggio"+msgid "Enable notifications when a sales rule violation is blocked or acknowledged on a quote, sales order, or sales invoice."msgstr "Abilita le notifiche quando una violazione di una regola di vendita viene bloccata o confermata su un preventivo, un ordine di vendita o una fattura di vendita."@@ -9236,6 +9388,9 @@ msgstr "Fine"msgid "End Date"msgstr "Data di fine"+msgid "End date time of the event"+msgstr "Ora della data di fine dell'evento"+msgid "End Line"msgstr "Termina riga"@@ -9568,6 +9723,9 @@ msgstr ""msgid "Event Type"msgstr "Tipo di Evento"+msgid "Event types"+msgstr "Tipi di evento"+msgid "Events"msgstr "Eventi"@@ -9746,6 +9904,9 @@ msgstr "Espandi riga"msgid "Expand Machine"msgstr "Espandi macchina"+msgid "Expand Recurring Event?"+msgstr "Espandere gli eventi ricorrenti?"+msgid "Expand row"msgstr "Espandi riga"@@ -10584,6 +10745,9 @@ msgstr "Correggi questi nei file, quindi caricali di nuovo"msgid "Fix these jobs before releasing"msgstr "Correggi questi ordini di produzione prima di rilasciarli"+msgid "Fix this"+msgstr "Correggi questo"+msgid "Fixed"msgstr "Fisso"@@ -11052,6 +11216,12 @@ msgstr "Riconciliazione della contabilità generale"msgid "GL Tie-Out"msgstr "Riconciliazione della Contabilità Generale"+msgid "Gmail"+msgstr "Gmail"++msgid "Gmail: Send Email"+msgstr "Gmail: Invia email"+msgid "Go live right the first time — with our team alongside you"msgstr "Vai in produzione al primo tentativo — con il nostro team al tuo fianco"@@ -11107,6 +11277,15 @@ msgstr "Buonasera, {name}."msgid "Good morning, {name}."msgstr "Buongiorno, {name}."+msgid "Google Calendar"+msgstr "Google Calendar"++msgid "Google Calendar: Create Event"+msgstr "Google Calendar: Crea evento"++msgid "Google Calendar: Get all Events"+msgstr "Google Calendar: Ottieni tutti gli eventi"+msgid "Google Places API key not configured"msgstr "Chiave API di Google Places non configurata"@@ -11167,6 +11346,15 @@ msgstr "Residuale garantito"msgid "Guaranteed Residual Value"msgstr "Valore residuo garantito"+msgid "Guests can invite others"+msgstr "Gli ospiti possono invitare altri"++msgid "Guests can modify"+msgstr "Gli ospiti possono modificare"++msgid "Guests can see other guests"+msgstr "Gli ospiti possono vedere altri ospiti"+msgid "Guided"msgstr "Guidato"@@ -11518,6 +11706,9 @@ msgstr "IBAN"msgid "IC Transaction"msgstr "Transazione interaziendale"+msgid "Icon Emoji"+msgstr "Emoji icona"+msgid "Id"msgstr "ID"@@ -12282,6 +12473,9 @@ msgstr "è dal"msgid "is on or before"msgstr "è fino al"+msgid "Is Private?"+msgstr "È privato?"+msgid "Is supplier org group"msgstr "È gruppo organizzativo fornitore"@@ -12354,6 +12548,9 @@ msgstr ""msgid "It is coming soon. Contact Carbon to have it set up for your company."msgstr "Sarà disponibile presto. Contatta Carbon per farla configurare per la tua azienda."+msgid "It was removed after this page loaded. Reload the page and try again."+msgstr "È stato rimosso dopo il caricamento di questa pagina. Ricarica la pagina e riprova."+msgid "It will stop running until you publish a version again. Nothing is deleted."msgstr "Si interromperà fino a quando non pubblichi di nuovo una versione. Nulla viene eliminato."@@ -12550,6 +12747,9 @@ msgstr "Ordini di produzione che hanno questo articolo nella loro distinta base"msgid "Join {0}"msgstr "Unisciti a {0}"+msgid "Join into text"+msgstr "Unisci nel testo"+msgid "Journal"msgstr "Prima nota"@@ -12616,6 +12816,9 @@ msgstr "Mantieni la determinazione dei prezzi esistente, aggiungi solo nuovi artmsgid "Keep Line"msgstr "Mantieni riga"+msgid "Keep matching items"+msgstr "Mantieni articoli corrispondenti"+msgid "Keep navigation open"msgstr "Mantieni navigazione aperta"@@ -12634,6 +12837,12 @@ msgstr "Continua il prelievo"msgid "Keeps orders, quotes, and settings behind a second check"msgstr "Mantiene ordini, offerte e impostazioni dietro un secondo controllo"+msgid "Kept {kept} of {total}; {unresolved} could not be checked."+msgstr "Mantenuti {kept} su {total}; {unresolved} non verificabili."++msgid "Kept {kept} of {total}."+msgstr "Mantenuti {kept} su {total}."+msgid "Key"msgstr "Chiave"@@ -14875,6 +15084,9 @@ msgstr "Nessun accesso"msgid "No accounts are mapped yet"msgstr "Nessun conto ancora mappato"+msgid "No accounts connected yet."+msgstr "Nessun account connesso ancora."+msgid "No accounts match your search"msgstr "Nessun account corrisponde alla tua ricerca"@@ -14930,6 +15142,9 @@ msgstr "Nessun bene ancora. Aggiungi ogni bene coperto dalla locazione, con il smsgid "No attachments."msgstr "Nessun allegato."+msgid "No authorization code was returned"+msgstr "Nessun codice di autorizzazione è stato restituito"+msgid "No available filters"msgstr "Nessun filtro disponibile"@@ -15130,6 +15345,9 @@ msgstr "Nessun percorso di errore — l'esecuzione si ferma qui ed è contrassegmsgid "No fair value entered, counts as not met"msgstr "Nessun valore equo inserito, conta come non soddisfatto"+msgid "No field was chosen to take."+msgstr "Non è stato scelto alcun campo da prendere."+msgid "No fields found."msgstr "Nessun campo trovato."@@ -15250,6 +15468,9 @@ msgstr "Nessun contenitore corrisponde"msgid "No matching operations"msgstr "Nessuna operazione corrispondente"+msgid "No matching time"+msgstr "Nessun orario corrispondente"+msgid "No materials"msgstr "Nessun materiale"@@ -15765,6 +15986,9 @@ msgstr "Niente"msgid "Nothing at this location matches \"{0}\"."msgstr "Nulla in questa posizione corrisponde a \"{0}\"."+msgid "Nothing can work on this result."+msgstr "Niente può operare su questo risultato."+msgid "Nothing completed in MES yet"msgstr "Nulla ancora completato in MES"@@ -15798,6 +16022,9 @@ msgstr "Niente programmato — aggiungi una stazione di seguito."msgid "Nothing selected yet"msgstr "Niente selezionato ancora"+msgid "Nothing to choose yet - <0>set one up in Settings</0>."+msgstr "Niente da scegliere ancora - <0>configura uno in Impostazioni</0>."+msgid "Nothing to post for this period."msgstr "Niente da registrare per questo periodo."@@ -16008,6 +16235,9 @@ msgstr "1 {0} equivale a quanti {1}?"msgid "One firing of a workflow, recorded step by step with the values each step used and produced, acting throughout with the permissions of the workflow's owner."msgstr "Un'esecuzione di un flusso di lavoro, registrata passo dopo passo con i valori che ogni passo ha utilizzato e prodotto, agendo con le autorizzazioni del proprietario del flusso di lavoro."+msgid "One of your {appName} accounts needs to be reconnected before workflow steps can use it."+msgstr "Uno dei tuoi account {appName} deve essere ricollegato prima che i passaggi del flusso di lavoro possano utilizzarlo."+msgid "One or more quantities cannot meet this date"msgstr "Una o più quantità non possono rispettare questa data"@@ -16131,6 +16361,9 @@ msgstr "Apri"msgid "Open ({paymentCurrency})"msgstr "Aperto ({paymentCurrency})"+msgid "Open {appName} accounts"+msgstr "Apri account {appName}"+msgid "Open a change notice"msgstr "Apri un avviso di modifica"@@ -16320,6 +16553,10 @@ msgstr "operazione"msgid "Operation"msgstr "Operazione"+msgctxt "workflow data step"+msgid "Operation"+msgstr "Operazione"+msgid "Operation batch"msgstr "Lotto di Operazioni"@@ -17129,6 +17366,9 @@ msgstr "Scegli un cliente, un tipo di cliente o Tutti i clienti per visualizzaremsgid "Pick a date or leave blank to clear it."msgstr "Scegli una data o lascia vuoto per cancellarla."+msgid "Pick a field…"+msgstr "Scegli un campo…"+msgid "Pick a list variable…"msgstr "Scegli una variabile di elenco…"@@ -17818,6 +18058,9 @@ msgstr "Produzione: app shop-floor e pianificazione"msgid "Profile"msgstr "Profilo"+msgid "Profile Picture"+msgstr "Foto del profilo"+msgid "Profit Percent"msgstr "Percentuale di profitto"@@ -17928,6 +18171,9 @@ msgstr "Prova la proprietà di ogni dominio di posta elettronica con un record Tmsgid "Provide process knowledge and inputs"msgstr "Fornisci conoscenze e input del processo"+msgid "Provide the ts (timestamp) or link value of the **parent** message to make this message a reply. Do not use the ts value of the reply itself; use its parent instead. For example '1710304378.475129'.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the 'Copy link' option."+msgstr "Fornisci il valore ts (timestamp) o il collegamento del messaggio **genitore** per fare di questo messaggio una risposta. Non usare il valore ts della risposta stessa; usa il genitore invece. Ad esempio «1710304378.475129». In alternativa, puoi facilmente ottenere il collegamento del messaggio facendo clic sui tre punti accanto al messaggio genitore e selezionando l'opzione «Copia collegamento»."+msgid "Provide these URLs to your identity provider (Okta, Entra ID, Google Workspace, etc.) when registering Carbon as a SAML application."msgstr "Fornisci questi URL al tuo provider di identità (Okta, Entra ID, Google Workspace, ecc.) quando registri Carbon come applicazione SAML."@@ -18731,6 +18977,9 @@ msgstr "Le quantità ricevute iniziano a zero"msgid "Received quantity not yet credited. The credit memo is created as a draft."msgstr "Quantità ricevuta non ancora accreditata. La nota di credito è creata come bozza."+msgid "Receiver Email (To)"+msgstr "Email destinatario (A)"+msgid "Receives the invoice email"msgstr "Riceve l'email della fattura"@@ -18788,6 +19037,21 @@ msgstr "Riconciliazione di un ordine di acquisto rispetto a ciò che è stato rimsgid "Reconfigure"msgstr "Riconfigura"+msgid "Reconnect"+msgstr "Ricollega"++msgid "Reconnect {appName}"+msgstr "Ricollega {appName}"++msgid "Reconnect it"+msgstr "Ricollega"++msgid "Reconnect needed"+msgstr "Riconnessione necessaria"++msgid "Reconnect with the account this connection already uses, or use Add account to connect the other one."+msgstr "Riconnettiti con l'account che questa connessione usa già, oppure usa Aggiungi account per collegare l'altro."+msgid "Record"msgstr "Registra"@@ -18833,9 +19097,16 @@ msgstr "Registri"msgid "Records and posted journals are being sent to and received from this provider."msgstr "I record e le prime note registrate vengono inviate e ricevute da questo provider."+msgid "Records here appear as plain text — {appLabel} doesn't support links in this field."+msgstr "I record qui appaiono come testo semplice — {appLabel} non supporta i link in questo campo."+msgid "Records moved"msgstr "Registrazioni spostate"+#. placeholder {0}: notice.params.equals+msgid "Records will be plain text. Set {siblingLabel} to {0} (under Advanced) to turn them into links."+msgstr "I record saranno testo semplice. Imposta {siblingLabel} a {0} (sotto Avanzate) per trasformarli in link."+msgid "Recost"msgstr "Ricalcola il costo"@@ -19182,6 +19453,10 @@ msgstr "Rimuovi i numeri di serie e di lotto di produzione ricevuti dalla giacenmsgid "Remove this item"msgstr "Rimuovi questo articolo"+msgctxt "workflow data step"+msgid "Remove this operation"+msgstr "Rimuovi questa operazione"+msgid "Remove this storage type from all referencing storage units and delete it. This cannot be undone."msgstr "Rimuovi questo tipo di stoccaggio da tutte le unità di stoccaggio che lo referenziano ed eliminalo. Questa azione non può essere annullata."@@ -19216,6 +19491,9 @@ msgstr "Rinomina"msgid "Rename Workflow"msgstr "Rinomina Workflow"+msgid "Renamed"+msgstr "Rinominato"+msgid "Rendering label preview..."msgstr "Rendering dell'anteprima dell'etichetta..."@@ -19381,6 +19659,12 @@ msgstr "Sistema di approvvigionamento"msgid "Replies to emailed invoices go here, and it's copied on each one."msgstr "Le risposte alle fatture inviate via e-mail vanno qui e vengono copiate su ciascuna."+msgid "Reply to Thread (Thread Message Link/Timestamp)"+msgstr "Rispondi al thread (Link messaggio/Timestamp del thread)"++msgid "Reply-To Email"+msgstr "Email per le risposte"+msgid "Report"msgstr "Rapporto"@@ -19925,6 +20209,9 @@ msgstr "Revoca Invito"msgid "Revoke Invites"msgstr "Revoca inviti"+msgid "Revoked"+msgstr "Revocato"+msgid "Rework"msgstr "Rilavorazione"@@ -20699,6 +20986,9 @@ msgstr "Cerca componenti fornitori"msgid "Search suppliers..."msgstr "Cerca fornitori..."+msgid "Search Term"+msgstr "Termine di ricerca"+msgid "Search tools..."msgstr "Cerca strumenti…"@@ -20800,6 +21090,9 @@ msgstr "Seleziona prima una forma per visualizzare le opzioni disponibili"msgid "Select a step to hide parts on it."msgstr "Seleziona un passo per nascondere i componenti su di esso."+msgid "Select a step…"+msgstr "Seleziona un passaggio…"+msgid "Select a substance and shape first to see available options"msgstr "Seleziona prima una sostanza e una forma per visualizzare le opzioni disponibili"@@ -20818,6 +21111,9 @@ msgstr "Seleziona tutto"msgid "Select an action…"msgstr "Seleziona un'azione…"+msgid "Select an app…"+msgstr "Seleziona un'app…"+msgid "Select an assignee"msgstr "Seleziona un assegnatario"@@ -20842,6 +21138,9 @@ msgstr "Seleziona un'operazione…"msgid "Select an option"msgstr "Seleziona un'opzione"+msgid "Select an option…"+msgstr "Seleziona un'opzione…"+msgid "Select at least one item to accept the quote"msgstr "Seleziona almeno un articolo per accettare l'offerta"@@ -20875,6 +21174,9 @@ msgstr "Seleziona Dipendente"msgid "Select Employee Type"msgstr "Seleziona Tipo di Dipendente"+msgid "Select event types"+msgstr "Seleziona i tipi di evento"+msgid "Select field"msgstr "Seleziona campo"@@ -20988,7 +21290,7 @@ msgid "Self Managed"msgstr "Gestito autonomamente"msgid "Self-hosted or managed"-msgstr "Self-hosted o gestito"+msgstr "Auto-ospitato o gestito"msgid "Self-onboarding"msgstr "Auto-onboarding"@@ -21026,6 +21328,9 @@ msgstr "Invia Invito"msgid "Send Invites"msgstr "Invia inviti"+msgid "Send Notifications"+msgstr "Invia notifiche"+msgid "Send RFQ to Suppliers"msgstr "Invia RFQ ai Fornitori"@@ -21035,6 +21340,12 @@ msgstr "Invia a Carbon"msgid "Send Via"msgstr "Invia tramite"+msgid "Sender Email"+msgstr "Email del mittente"++msgid "Sender Name"+msgstr "Nome del mittente"+msgid "Sending defective units back to an earlier operation to be corrected instead of scrapping them."msgstr "Invio di unità difettose a un'operazione precedente per la correzione anziché lo scarto."@@ -21802,6 +22113,18 @@ msgstr ""msgid "Slack"msgstr "Slack"+msgid "Slack: Create Channel"+msgstr "Slack: Crea canale"++msgid "Slack: Find User by Email"+msgstr "Slack: Trova utente per email"++msgid "Slack: Send Message To A Channel"+msgstr "Slack: Invia messaggio a un canale"++msgid "Slack: Send Message To A User"+msgstr "Slack: Invia messaggio a un utente"+msgid "Slice asset activity by location, item, or any dimension"msgstr "Suddividi l'attività dei cespiti per ubicazione, articolo o qualsiasi dimensione"@@ -22041,6 +22364,9 @@ msgstr "Data di inizio"msgid "Start Date"msgstr "Data di inizio"+msgid "Start date time of the event"+msgstr "Data e ora di inizio dell'evento"+msgid "Start Expiration"msgstr "Inizio Scadenza"@@ -22331,7 +22657,7 @@ msgid "Stripe Due Date"msgstr "Data di scadenza Stripe"msgid "Stripe emails the invoice to the customer, so an address is required. This will also be saved to the contact in Carbon."-msgstr "Stripe invia l'email della fattura al cliente, quindi è richiesto un indirizzo. Questo sarà anche salvato al contatto in Carbon."+msgstr "Stripe invia la fattura al cliente via email, quindi è richiesto un indirizzo. Questo sarà salvato anche al contatto in Carbon."msgid "Stripe emails the invoices to the customer, so an address is required. It is also saved to the contract's invoice contact in Carbon, if it has one."msgstr "Stripe invia le fatture al cliente, quindi un indirizzo è richiesto. Viene salvato anche al contatto di fatturazione del contratto in Carbon, se ce ne è uno."@@ -22855,6 +23181,9 @@ msgstr "Etichette"msgid "Tailor this hub for the customer. Changes apply live for everyone viewing it. Never shown to the customer here."msgstr "Personalizza questo hub per il cliente. Le modifiche si applicano in tempo reale per tutti coloro che lo visualizzano. Non viene mai mostrato al cliente qui."+msgid "Take one field from every item"+msgstr "Prendi un campo da ogni articolo"+msgid "Take out of service"msgstr "Mettere fuori servizio"@@ -22868,6 +23197,12 @@ msgstr "Assumi la proprietà"msgid "Take Ownership: {0}"msgstr "Assumi la proprietà: {0}"+msgid "Take the first item"+msgstr "Prendi il primo articolo"++msgid "Take the last item"+msgstr "Prendi l'ultimo articolo"+msgid "Take the shortest remaining shelf life across the materials consumed to make this item. Use when the product's expiry depends on its ingredients."msgstr "Prendi la durata di conservazione rimanente più breve tra i materiali consumati per realizzare questo articolo. Utilizza quando la scadenza del prodotto dipende dai suoi ingredienti."@@ -23115,11 +23450,8 @@ msgstr ""msgid "Test run"msgstr "Esecuzione di prova"-msgid "Test run — results are not saved to the Runs page"-msgstr "Esecuzione di prova — i risultati non vengono salvati nella pagina Esecuzioni"--msgid "Test runs are not saved. Close this panel and the result is gone."-msgstr "Le esecuzioni di prova non vengono salvate. Chiudi questo pannello e il risultato se ne andrà."+msgid "Test runs are saved to the run history, marked as tests."+msgstr "Le esecuzioni di prova vengono salvate nella cronologia di esecuzione, contrassegnate come test."msgid "Test Value"msgstr "Valore di Test"@@ -23127,9 +23459,36 @@ msgstr "Valore di Test"msgid "Text size"msgstr "Dimensione testo"+msgid "That account is still being reconnected. Try again in a moment."+msgstr "Quell'account è ancora in corso di riconnessione. Riprova tra poco."++msgid "That account no longer exists"+msgstr "Quell'account non esiste più"++msgid "That connection name is already used"+msgstr "Quel nome di connessione è già utilizzato"++msgid "That field holds a list of its own. Turn on flattening to take it."+msgstr "Quel campo contiene una propria lista. Attiva l'appiattimento per prenderlo."++msgid "That field holds several values, so they are combined into one list."+msgstr "Quel campo contiene più valori, quindi vengono combinati in un unico elenco."++msgid "That integration is not available"+msgstr "Quell'integrazione non è disponibile"++msgid "That list was empty."+msgstr "Quell'elenco era vuoto."+msgid "That name is already used by another step."msgstr "Quel nome è già utilizzato da un altro passaggio."+msgid "That workspace is connected to another company"+msgstr "Quello spazio di lavoro è connesso a un'altra azienda"++msgid "That's a different account"+msgstr "È un account diverso"+#. placeholder {0}: i18n._(step.title)msgid "The \"{0}\" phase checks itself off once all of its tasks in the project plan are done."msgstr "La fase \"{0}\" si contrassegna come fatta una volta che tutte le sue attività nel piano di progetto sono fatte."@@ -23143,6 +23502,9 @@ msgstr "La fase \"{0}\" è fatta — il suo checkpoint \"{1}\" è stato superatomsgid "The {0} phases to go live, each ending at a checkpoint. Tick off each task as you complete it."msgstr "I {0} fasi per andare live, ognuna che termina a un checkpoint. Spunta ogni attività mentre la completi."+msgid "The {appName} account this step uses is not available — it was disconnected or needs to be reconnected."+msgstr "L'account {appName} utilizzato da questo passo non è disponibile — è stato disconnesso o deve essere riconnesso."+msgid "The accent color used across Carbon."msgstr "Il colore di accento utilizzato in Carbon."@@ -23158,6 +23520,9 @@ msgstr "I conti su cui Carbon registra automaticamente"msgid "The action that copies a saved method (its materials, operations, and work instructions) onto a job or quote line."msgstr "L'azione che copia un metodo salvato (i suoi materiali, operazioni e istruzioni di lavoro) su un ordine di produzione o su una riga offerta."+msgid "The address must be listed in your GMail account's settings"+msgstr "L'indirizzo deve essere elencato nelle impostazioni del tuo account Gmail"+msgid "The allowed values for a list-type attribute; users pick from these rather than free-typing."msgstr "I valori consentiti per un attributo di tipo elenco; gli utenti scelgono tra questi anziché digitare liberamente."@@ -23179,6 +23544,9 @@ msgstr "L'asset si sposta nella sua classe in servizio e inizia l'ammortamento dmsgid "The asset would have a negative cost. Check the purchase price."msgstr "L'immobilizzazione avrebbe un costo negativo. Verificare il prezzo di acquisto."+msgid "The authorization took too long or came back altered. Start the connection again from this page."+msgstr "L'autorizzazione ha impiegato troppo tempo o è tornata alterata. Avvia di nuovo la connessione da questa pagina."+msgid "The authorization was refused in Onshape. Save the integration settings to try again."msgstr "L'autorizzazione è stata rifiutata in Onshape. Salva le impostazioni di integrazione per riprovare."@@ -23188,6 +23556,9 @@ msgstr "L'autorizzazione è stata rifiutata in Onshape. Riprova a connetterti."msgid "The authorization was refused in Ramp. Try connecting again."msgstr "L'autorizzazione è stata rifiutata in Ramp. Prova a connetterti di nuovo."+msgid "The authorization was rejected"+msgstr "L'autorizzazione è stata rifiutata"+msgid "The average cost of the item. Changing it needs permission to edit parts."msgstr "Il costo medio dell'articolo. Modificarlo richiede l'autorizzazione di modificare i componenti."@@ -23291,6 +23662,12 @@ msgstr "L'azienda ha già una prima nota di apertura registrata."msgid "The company has no account defaults."msgstr "L'azienda non ha account predefiniti."+msgid "The connection could not be verified"+msgstr "La connessione non ha potuto essere verificata"++msgid "The connection was refused"+msgstr "La connessione è stata rifiutata"+msgid "The contract cannot be cancelled then"msgstr "Il contratto non può essere annullato allora"@@ -23556,6 +23933,9 @@ msgstr "L'indirizzo https a cui il passaggio webhook di un flusso di lavoro invimsgid "The human-readable document number (like J000001 or ECO-000001) minted from a sequence and stored on the record, distinct from its internal id."msgstr "Il numero di documento leggibile dall'uomo (come J000001 o ECO-000001) generato da una sequenza e memorizzato nel record, distinto dal suo id interno."+msgid "The icon emoji of the bot"+msgstr "L'emoji dell'icona del bot"+msgid "The identifier the customer uses for this part on their POs; Carbon resolves it to our internal Part ID on order import."msgstr "L'identificatore che il cliente utilizza per questa parte nei loro ordini di acquisto; Carbon lo risolve al nostro ID parte interno all'importazione dell'ordine."@@ -23577,6 +23957,9 @@ msgstr "La regola Incoterms (FOB, DAP, EXW, CIF, ...) che governa chi paga il trmsgid "The Incoterm rule (FOB, DAP, EXW, CIF, …) that governs who pays freight, who bears risk, and where the transfer of title occurs on shipments to this customer."msgstr "La regola Incoterms (FOB, DAP, EXW, CIF, ...) che governa chi paga il trasporto, chi assume il rischio e dove avviene il trasferimento del titolo nelle spedizioni verso questo cliente."+msgid "The integration authorized the connection but saving it failed. Try connecting again."+msgstr "L'integrazione ha autorizzato la connessione ma il salvataggio non è riuscito. Prova a connetterti di nuovo."+msgid "The inventory cost recognized when a shipment posts, valued by the item's costing method."msgstr "Il costo dell'inventario riconosciuto quando una spedizione viene registrata, valutato in base al metodo di calcolo dei costi dell'articolo."@@ -23592,6 +23975,15 @@ msgstr "L'articolo che ogni ordine di produzione produce — richiedi che corrismsgid "The item's rental rate"msgstr "La tariffa di noleggio dell'articolo"+msgid "The items in that list have no field by that name."+msgstr "Gli elementi di quella lista non hanno un campo con quel nome."++msgid "The items in that list have no fields to take."+msgstr "Gli articoli di quel elenco non hanno campi da prendere."++msgid "The items in that list have no reading as text."+msgstr "Gli elementi di quella lista non possono essere letti come testo."+msgid "the job hours due that day (a due-date basis, not the day the work runs), with overdue work in Past due."msgstr "le ore di ordine di produzione dovute quel giorno (sulla base della scadenza, non il giorno in cui il lavoro viene eseguito), con il lavoro in ritardo in Scaduto."@@ -23885,6 +24277,9 @@ msgstr "La procedura che i tecnici seguono quando viene eseguita questa manutenzmsgid "The processes this work center can run; appears in process-pickers when scheduling operations, and limits which jobs can route through this work center."msgstr "I processi che questo centro di lavoro può eseguire; appare nelle selezioni di processo durante la pianificazione delle operazioni e limita quali ordini di produzione possono instradare attraverso questo centro di lavoro."+msgid "The profile picture of the bot"+msgstr "L'immagine del profilo del bot"+msgid "The provider offers no dimension targets. Enable the feature in the provider first (e.g. tracking categories, class tracking, or fields)."msgstr "Il provider non offre target di dimensione. Abilita prima la funzione nel provider (ad es. categorie di tracciamento, tracciamento di classe o campi)."@@ -23986,12 +24381,12 @@ msgstr "Nella risposta di Onshape mancavano i parametri richiesti. Riprova a conmsgid "The response from Ramp was missing required parameters. Try connecting again."msgstr "Nella risposta di Ramp mancavano dei parametri obbligatori. Prova a connetterti di nuovo."+msgid "The response was missing required parameters. Try connecting again."+msgstr "La risposta mancava di parametri obbligatori. Prova a connetterti di nuovo."+msgid "The restore job reported this error."msgstr "Il lavoro di ripristino ha segnalato questo errore."-msgid "The result will not appear on the Runs page."-msgstr "Il risultato non apparirà nella pagina Esecuzioni."-msgid "The revision number of the part"msgstr "Il numero di revisione della parte"@@ -24139,6 +24534,9 @@ msgstr "Il sistema che un'azienda utilizza per gestire gli accessi dei suoi dipemsgid "The system passes every in-scope acceptance test in your configured system, with your data; the data is validated; and you sign off. Then go-live."msgstr "Il sistema supera ogni test di accettazione in ambito nel tuo sistema configurato, con i tuoi dati; i dati sono convalidati; e tu firmi. Quindi vai in diretta."+msgid "The text of your message. When using Block Kit blocks, this is used as a fallback for notifications."+msgstr "Il testo del tuo messaggio. Quando usi i blocchi Block Kit, viene utilizzato come fallback per le notifiche."+msgid "The thread linking a sales RFQ, its quote, and the resulting sales order — a join, not a document with its own status."msgstr "Il thread che collega una RFQ di vendita, il suo preventivo e l'ordine di vendita risultante - un join, non un documento con il proprio stato."@@ -24220,6 +24618,9 @@ msgstr ""msgid "The US tax depreciation system with IRS property-class tables, run as a separate tax schedule alongside the book schedule."msgstr "Il sistema di ammortamento fiscale US con tabelle di classificazione della proprietà IRS, eseguito come programma fiscale separato insieme al programma contabile."+msgid "The username of the bot"+msgstr "Il nome utente del bot"+msgid "The users in this group; group-scoped permissions and notifications apply to each member, and users may belong to multiple groups (effective permissions are the union)."msgstr "Gli utenti in questo gruppo; i permessi e le notifiche con ambito di gruppo si applicano a ogni membro e gli utenti possono appartenere a più gruppi (le autorizzazioni effettive sono l'unione)."@@ -24352,6 +24753,11 @@ msgstr "Non sono nel tuo Piano dei conti, ma Documenti o Prima nota li utilizzanmsgid "this ability"msgstr "questa competenza"+msgid "This account has stopped working. Reconnect it — workflow steps using it will fail until you do."+msgstr "Questo account ha smesso di funzionare. Riconnettilo — i passaggi del flusso di lavoro che lo utilizzano avranno esito negativo fino a quando non lo farai."++msgid "This account needs to be reconnected."+msgstr "Questo account deve essere riconnesso."msgid "This action cannot run on this list."msgstr ""@@ -24384,6 +24790,9 @@ msgstr "Non può essere modificato in seguito — {integrationName} consente unmsgid "This cannot be undone."msgstr "Questo non può essere annullato."+msgid "This Carbon instance is missing its OAuth credentials for this integration. Ask an administrator to set them."+msgstr "Questa istanza di Carbon non ha le credenziali OAuth per questa integrazione. Chiedi a un amministratore di configurarle."+msgid "This Carbon instance is missing its Onshape OAuth credentials. Ask an administrator to set them."msgstr "A questa istanza di Carbon mancano le credenziali OAuth di Onshape. Chiedi a un amministratore di configurarle."@@ -24442,9 +24851,15 @@ msgstr "Queste informazioni saranno visibili a tutti gli utenti, quindi fai attemsgid "this inspection plan"msgstr "questo piano di controllo"+msgid "This integration can't be connected on this Carbon instance."+msgstr "Questa integrazione non può essere connessa su questa istanza di Carbon."+msgid "This integration isn't available yet"msgstr "Questa integrazione non è ancora disponibile"+msgid "This integration isn't configured"+msgstr "Questa integrazione non è configurata"+#. placeholder {0}: company?.name ?? "Carbon"msgid "This invitation to join {0} has expired. You can request a new invite to be sent to your email."msgstr "Questo invito per unirti a {0} è scaduto. Puoi richiedere un nuovo invito da inviare alla tua email."@@ -24627,6 +25042,9 @@ msgstr "Questa stazione esegue lavoro controllato dalle competenze — viene esemsgid "This station runs work with no ability requirement; operators assigned on the manning board shape available labor."msgstr "Questa stazione esegue lavori senza requisito di competenza; gli operatori assegnati sulla plancia di organico modellano la manodopera disponibile."+msgid "This step expected a list."+msgstr "Questo passaggio si aspettava una lista."+msgid "This step is part of it"msgstr "Questo passo fa parte di esso"@@ -24817,6 +25235,9 @@ msgstr "stretto"msgid "Tightened"msgstr "Rinforzato"+msgid "Time"+msgstr "Ora"+msgid "Time and dollar utilization of the rental fleet by asset and class"msgstr "Utilizzo temporale e in denaro della flotta di noleggio per cespite e classe"@@ -24862,6 +25283,9 @@ msgstr "Inclina verso di te"msgid "Title"msgstr "Titolo"+msgid "Title of the event"+msgstr "Titolo dell'evento"+msgid "Title passes to the customer when the term ends."msgstr "Il titolo passa al cliente quando il termine termina."@@ -24967,6 +25391,14 @@ msgstr "Tolleranza (giorni)"msgid "Tomorrow"msgstr "Domani"+msgid "Took {took} values; kept the first {kept}."+msgstr "Presi {took} valori; mantenuti i primi {kept}."++msgid "Took the first of {total}."+msgstr "Preso il primo di {total}."++msgid "Took the last of {total}."+msgstr "Preso l'ultimo di {total}."msgid "Too many exports and bulk actions are running right now. Try again in a few minutes."msgstr "Ci sono troppe esportazioni e azioni di massa in corso. Riprova tra qualche minuto."@@ -25298,6 +25730,9 @@ msgstr "Trigger"msgid "Try a different name."msgstr "Prova un nome diverso."+msgid "Try again"+msgstr "Riprova"+msgid "Tuesday"msgstr "Martedì"@@ -25368,6 +25803,9 @@ msgstr "Digita <0>\"{confirmPhrase}\"</0> per continuare."msgid "Type a message..."msgstr "Digita un messaggio..."+msgid "Type a value and press Enter…"+msgstr "Digita un valore e premi Invio…"+msgid "Type an email and press Enter to add an external recipient"msgstr "Digita un'email e premi Invio per aggiungere un destinatario esterno"@@ -25449,6 +25887,9 @@ msgstr "Pagamenti non scontati ancora da venire, per esercizio fiscale, meno glimsgid "Undo"msgstr "Annulla"+msgid "Unfurl Links"+msgstr "Espandi i link"+msgid "Ungroup"msgstr "Separa"@@ -25969,6 +26410,9 @@ msgstr "Autorizzazioni utente"msgid "User roles"msgstr "Ruoli utente"+msgid "Username"+msgstr "Nome utente"+msgid "users"msgstr "utenti"@@ -26753,6 +27197,9 @@ msgstr "Quando attivo, questa forzatura di prezzo si applica agli ordini corrispmsgid "When on, this rule fires for every target of its type. Assignment rows are ignored but preserved."msgstr "Quando attivato, questa regola si attiva per ogni target del suo tipo. Le righe di assegnazione vengono ignorate ma conservate."+msgid "When replying to a thread, also make the message visible to everyone in the channel (only applicable when Thread Timestamp is provided)"+msgstr "Quando rispondi a un thread, rendi il messaggio visibile a tutti nel canale (applicabile solo quando è fornito il timestamp del thread)"+msgid "When supplier responses are expected back; suppliers see this date on the RFQ portal and Carbon stops accepting late responses after it (configurable)."msgstr "Quando si prevede che i fornitori rispondano; i fornitori vedono questa data sul portale RFQ e Carbon smette di accettare risposte tardive dopo di essa (configurabile)."@@ -26924,6 +27371,9 @@ msgstr "Se questo lavoro blocca la produzione (Basso), la degrada (Impatto), èmsgid "Whether to Add the selected permissions on top of what each user already has, or Update by replacing each user's permission set wholesale with the selection below."msgstr "Se le autorizzazioni selezionate vengono Aggiunte sopra ciò che ogni utente ha già, o Aggiornate sostituendo il set di autorizzazioni di ogni utente con la selezione di seguito."+msgid "Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves."+msgstr "Indica se espandere gli eventi ricorrenti in singole istanze e restituire solo eventi singoli e istanze di eventi ricorrenti, ma non gli eventi ricorrenti sottostanti."+msgid "Which document drives each inspection flow for this item."msgstr "Quale documento guida ogni flusso di controllo per questo articolo."@@ -27227,6 +27677,9 @@ msgstr "Appartieni a più di un'azienda. Scegli dove lavorare."msgid "You can change the UI style any time through the theme setting"msgstr "Puoi cambiare lo stile dell'interfaccia in qualsiasi momento attraverso le impostazioni del tema"+msgid "You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.'"+msgstr "Puoi ottenere l'ID del canale facendo clic con il pulsante destro del mouse sul canale e selezionando \"Visualizza dettagli canale\"."+msgid "You can only see this key once. Store it safely."msgstr "Puoi visualizzare questa chiave solo una volta. Conservala in modo sicuro."@@ -27278,6 +27731,9 @@ msgstr "Tu guidi"msgid "You name a project owner with decision authority"msgstr "Nomina un responsabile del progetto con autorità decisionale"+msgid "You need permission to edit workflows to load these choices."+msgstr "Serve l'autorizzazione a modificare i flussi di lavoro per caricare queste opzioni."+msgid "You received this item"msgstr "Hai ricevuto questo articolo"diff --git a/packages/locale/locales/it/mes.po b/packages/locale/locales/it/mes.poindex 6879a0838a..503451dba2 100644--- a/packages/locale/locales/it/mes.po+++ b/packages/locale/locales/it/mes.po@@ -113,6 +113,9 @@ msgstr "Un completamento precedente non è terminato. Riprovare riprende i passamsgid "About"msgstr "Informazioni"+msgid "About this field"+msgstr "Informazioni su questo campo"+msgid "Accept"msgstr "Accetta"@@ -1234,6 +1237,9 @@ msgstr "Nessuna manutenzione programmata per oggi"msgid "No matches. Type to create one."msgstr "Nessuna corrispondenza. Digita per crearne una."+msgid "No matching time"+msgstr "Nessun orario corrispondente"+msgid "No materials"msgstr "Nessun materiale"@@ -2144,6 +2150,9 @@ msgstr "Miniatura"msgid "Tick the jobs this was done for."msgstr "Seleziona gli ordini di produzione per i quali è stato fatto questo."+msgid "Time"+msgstr "Ora"+msgid "Time and cost split across jobs proportionally to quantity."msgstr "Tempo e costo ripartiti tra gli ordini di produzione in proporzione alla quantità."diff --git a/packages/locale/locales/ja/erp.po b/packages/locale/locales/ja/erp.poindex 72756bf559..17cce2d934 100644--- a/packages/locale/locales/ja/erp.po+++ b/packages/locale/locales/ja/erp.po@@ -269,6 +269,10 @@ msgstr "{0}件の請求書は前のシステムで請求済みであり、再度msgid "{0} is {1}, not Draft or Planned"msgstr ""+#. placeholder {0}: integration.name+msgid "{0} isn't installed yet. There's nothing to configure — install it to connect an account."+msgstr "{0}はまだインストールされていません。設定することはできません—アカウントに接続するためにインストールしてください。"+#. placeholder {0}: data.quantitymsgid "{0} items marked as picked"msgstr ""@@ -481,6 +485,12 @@ msgstr "{alreadyPlannedItemCount}個の部品はスキップ済 — 既に進行msgid "{apOverduePct}% of payables"msgstr "{apOverduePct}%の買掛金"+msgid "{appName} is connected, but needs to be reconnected before workflow steps can use it."+msgstr "{appName}は接続されていますが、ワークフロー ステップで使用する前に再接続が必要です。"++msgid "{appName} isn't connected yet. Connect an account before this step can do anything."+msgstr "{appName}はまだ接続されていません。このステップが機能する前にアカウントを接続してください。"+msgid "{arOverduePct}% of receivables"msgstr "{arOverduePct}%の売掛金"@@ -594,6 +604,9 @@ msgstr "{inserted} 件が挿入されました、{updated} 件が更新されまmsgid "{jobsMissingStorageUnit, plural, one {# open job has materials with no storage unit} other {# open jobs have materials with no storage unit}}"msgstr "{jobsMissingStorageUnit, plural, one {#個のオープン製造指図に保管ユニットがない材料があります} other {#個のオープン製造指図に保管ユニットがない材料があります}}"+msgid "{kept, plural, one {Took # value.} other {Took # values.}}"+msgstr "{kept, plural, other {# 件の値を取得しました。}}"+msgid "{label} is used by documents, journals or default accounts, so it cannot be deleted."msgstr "{label} はドキュメント、仕訳、またはデフォルトアカウントで使用されているため、削除できません。"@@ -746,6 +759,9 @@ msgstr "{state} · {syncedAgo} に同期"msgid "{termMonths, plural, one {# month} other {# months}}"msgstr "{termMonths, plural, one {# ヶ月} other {# ヶ月}}"+msgid "{total, plural, one {Joined # value.} other {Joined # values.}}"+msgstr "{total, plural, other {# 件の値を結合しました。}}"+msgid "{total} phases to get your company live on Carbon. Each one ends at a checkpoint."msgstr "あなたの会社を Carbon に本格運用するまでの {total} つのフェーズがあります。それぞれがチェックポイントで終わります。"@@ -1217,7 +1233,7 @@ msgid "A Make to Order component whose parts are issued together into the parentmsgstr "部品が親ジョブに一緒に出庫される受注生産部品。別途製造なし。"msgid "A managed cloud-hosted version of Carbon"-msgstr "Carbonのマネージド クラウド ホスト版"+msgstr "Carbon のマネージドクラウドホスト版"msgid "A managed version with all the advanced features"msgstr "すべての高度な機能を備えた管理版"@@ -1651,6 +1667,9 @@ msgstr "ユーザーは商品受取時に各バッチまたはシリアルの使msgid "A variable charge — mileage overage, damage, delivery, cleaning — is billed on the agreement's next invoice."msgstr "変動料金(走行距離超過、損傷、配送、清掃など)は契約の次の請求書に計上されます。"+msgid "A workspace can be connected to one Carbon company only. Disconnect it there first, or connect a different workspace."+msgstr "ワークスペースは1つのCarbon会社にのみ接続できます。先にそちらで切断するか、別のワークスペースを接続してください。"+msgid "ABA"msgstr "ABA"@@ -1672,6 +1691,9 @@ msgstr "について"msgid "About (notification)"msgstr "について(通知)"+msgid "About this field"+msgstr "このフィールドについて"+msgid "Absent"msgstr "不在"@@ -1838,6 +1860,9 @@ msgstr ""msgid "Accounts receivable for amounts owed by customers"msgstr "得意先から支払われるべき金額の売掛金"+msgid "Accounts your workflows can act as. Add one for each account a workflow step should use."+msgstr "ワークフローが動作するアカウント。ワークフロー ステップが使用する各アカウントに対して 1 つ追加してください。"+msgid "Accrual"msgstr "未請求売上"@@ -2055,6 +2080,9 @@ msgstr "ステップまたは質問を追加"msgid "Add Ability"msgstr "スキルを追加"+msgid "Add account"+msgstr "アカウントを追加"+msgid "Add Account"msgstr "勘定科目を追加"@@ -2196,6 +2224,10 @@ msgstr "月を追加"msgid "Add Note"msgstr "メモを追加"+msgctxt "workflow data step"+msgid "Add operation"+msgstr "処理を追加"+msgid "Add Operation"msgstr "操作を追加"@@ -2434,6 +2466,9 @@ msgstr "{nextStatus}に進む"msgid "Advanced"msgstr "詳細"+msgid "Advanced properties"+msgstr "詳細プロパティ"+msgid "Affected item not found."msgstr "影響を受けるアイテムが見つかりません。"@@ -2657,6 +2692,12 @@ msgstr "金額は値を持つ桁のみを表示します。"msgid "An ability is a process's qualification. Only processes without one are listed."msgstr "スキルは工法の適格条件です。適格条件のない工法のみが表示されます。"+msgid "An account is already called that — pick a different name."+msgstr "そのアカウント名は既に使用されています。別の名前を選択してください。"++msgid "An account is missing from this list until it is reconnected."+msgstr "このリストにアカウントがない場合、再接続されるまでここに表示されません。"+msgid "An accounting bucket that groups expenses by department or function so the GL can report spend by group, not just by account."msgstr "部門または機能ごとに費用をグループ化する会計カテゴリで、総勘定元帳がアカウントだけでなくグループごとの支出を報告できます。"@@ -2822,6 +2863,9 @@ msgstr "Onshapeへの接続中に予期しないエラーが発生しましたmsgid "An unexpected error occurred while connecting to Onshape. Try connecting again."msgstr "Onshape への接続中に予期しないエラーが発生しました。もう一度接続してください。"+msgid "An unexpected error occurred while connecting. Try connecting again."+msgstr "接続中に予期しないエラーが発生しました。もう一度接続してみてください。"+msgid "Analytics"msgstr "分析"@@ -2839,9 +2883,6 @@ msgstr "さらに{0}件あります。これらを解決して残りを表示しmsgid "And {0} more. Resolve these to see the rest."msgstr "ほか {0} 件。これらを解決して残りを表示してください。"-msgid "and {hidden} more"-msgstr "そして{hidden}個以上"-msgid "and {remaining} more"msgstr "そして{remaining}件以上"@@ -2878,6 +2919,9 @@ msgstr "レンタル料が割引される年間レート"msgid "Annual. Starts from the company's incremental borrowing rate"msgstr "年間。会社の増分借入金利から開始します"+msgid "Another connection to this integration already has that name. Choose a different one."+msgstr "この統合への別の接続がすでにその名前を持っています。別の名前を選択してください。"+msgid "Another cost center this one rolls up into, letting you nest a sub-department under its parent for hierarchical cost reporting."msgstr "このコストセンターがロールアップされる別の原価センター。親の下に部門をネストさせて、階層的なコスト報告を実現します"@@ -2948,6 +2992,9 @@ msgid "API keys for programmatic access to your Carbon data."msgstr "Carbonデータへのプログラマティックアクセス用のAPIキー。"msgid "API, webhooks, and integrations"+msgstr "API、ウェブフック、統合"++msgid "App"msgstr "API、Webhook、および連携"msgid "Appearance"@@ -3882,6 +3929,9 @@ msgstr "添付ファイルを読み込めませんでした"msgid "Attempts"msgstr "試行"+msgid "Attendees"+msgstr "参加者"+msgid "Attribute"msgstr "属性"@@ -3924,6 +3974,9 @@ msgstr "認証器アプリ"msgid "Authenticator QR code"msgstr "認証器QRコード"+msgid "Authorization was refused. Try connecting again."+msgstr "認可が拒否されました。もう一度接続してみてください。"+msgid "Authorized overtime on top of the shift"msgstr "シフトを超えた認可残業"@@ -3984,6 +4037,9 @@ msgstr "自動更新とバックアップ"msgid "Automatic, prorated consumption of a job's untracked materials when output is reported — tracked materials are issued manually."msgstr "出力が報告されるとジョブの追跡されていない材料の自動的な比例消費。追跡された材料は手動で発行されます。"+msgid "Automatically create a Google Meet video conference link for this event"+msgstr "このイベントのGoogle Meetビデオ会議リンクを自動作成する"+msgid "Automatically release the job when the kanban is scanned"msgstr "かんばんがスキャンされたときに自動的に製造指図をリリース"@@ -4193,6 +4249,9 @@ msgstr "返品するバッチ"msgid "Batching"msgstr "バッチ処理"+msgid "BCC Email"+msgstr "BCC メール"+msgid "Becomes"msgstr "変更後"@@ -4370,6 +4429,12 @@ msgstr "ボード"msgid "Body"msgstr "本文"+msgid "Body for the email you want to send"+msgstr "送信するメールの本文"++msgid "Body Type"+msgstr "本文の種類"+msgid "BoM"msgstr "BoM"@@ -4427,6 +4492,9 @@ msgstr "パンくずリスト"msgid "Bring in your parts, BOMs, Bill of Process, and costing — with Carbon's import tools, CSV, or LLM help."msgstr "部品、BOM、工程表、原価計算をインポート — Carbonのツール、CSV、LLM支援で。"+msgid "Broadcast reply to channel"+msgstr "チャネルへの返信をブロードキャスト"+msgid "Browse library"msgstr "ライブラリを参照"@@ -4513,6 +4581,9 @@ msgstr ""msgid "By accepting the invite, you agree to the <0>Terms of Service</0> and <1>Privacy Policy</1>."msgstr "招待を受け入れることで、<0>利用規約</0>および<1>プライバシーポリシー</1>に同意するものとします。"+msgid "By default it'll be 30 min post start time"+msgstr "デフォルトでは開始時刻の30分後になります"+msgid "By dimension"msgstr "ディメンション別"@@ -4881,6 +4952,9 @@ msgstr "実行を引き起こす:"msgid "CC"msgstr "CC"+msgid "CC Email"+msgstr "CC メール"+msgid "Centralized Billing Address"msgstr "一元化された請求先住所"@@ -4998,6 +5072,12 @@ msgstr "これを変更するとパーツIDが更新されます"msgid "Changing type resets this item's draft edits."msgstr "タイプを変更すると、この品目の下書き編集がリセットされます。"+msgid "Channel"+msgstr "チャネル"++msgid "Channel Name"+msgstr "チャネル名"+msgid "Characteristic"msgstr "特性"@@ -5078,6 +5158,9 @@ msgstr "チェックポイント ·"msgid "Checkpoints"msgstr "チェックポイント"+msgid "Choose {named} first."+msgstr "まず {named} を選択してください。"+msgid "Choose a backup"msgstr "バックアップを選択"@@ -5333,6 +5416,9 @@ msgstr "段取りを折りたたむ"msgid "Collapse subtree"msgstr "サブツリーを折りたたむ"+msgid "Color"+msgstr "色"+#. placeholder {0}: index + 1msgid "Column {0} of {count}"msgstr "列 {0}/{count}"@@ -5594,6 +5680,9 @@ msgstr "様々なトランザクションタイプに使用されるデフォルmsgid "Configure the start months for your fiscal and tax years"msgstr "会計年度と税務年度の開始月を設定します"+msgid "Configure the steps above first."+msgstr "まず上記のステップを設定してください。"+msgid "Configure when purchased item costs should be updated from supplier transactions."msgstr "仕入先取引から購買品目の原価を更新する時期を構成"@@ -5690,6 +5779,9 @@ msgstr "紛争の理由"msgid "Connect"msgstr "接続"+msgid "Connect {appName}"+msgstr "{appName} に接続"+msgid "Connect Carbon to your accounting, project management, and CAD tools and much more."msgstr "Carbonを会計、プロジェクト管理、CADツールなど、さまざまなツールに接続できます。"@@ -5717,9 +5809,18 @@ msgstr "会社がすでに実行している外部ツールに接続"msgid "Connect your identity provider by pasting either its metadata URL or its raw metadata XML — exactly one of the two."msgstr "IDプロバイダーのメタデータURLまたは生のメタデータXMLを貼り付けて接続します。どちらか一つだけを入力してください。"+msgid "Connected before workflows needed extra permissions. Reconnect to grant them — everything else keeps working meanwhile."+msgstr "ワークフローが追加の権限を必要とする前に接続されました。これらを付与するために再接続してください。その間、他のすべては動作し続けます。"+msgid "Connected to"msgstr "接続先"+msgid "Connection"+msgstr "接続"++msgid "Connection name"+msgstr "接続名"+msgid "Console Mode"msgstr "コンソールモード"@@ -6336,6 +6437,12 @@ msgstr "{0}をリリースできませんでした: {1}"msgid "Could not save"msgstr "保存できませんでした"+msgid "Couldn't check whether {appName} is connected."+msgstr "{appName} が接続されているか確認できませんでした。"++msgid "Couldn't complete the connection"+msgstr "接続を完了できませんでした"+msgid "Couldn't complete the Onshape connection"msgstr "Onshape 接続を完了できませんでした"@@ -6351,12 +6458,18 @@ msgstr "これ以上の行を読み込めませんでした"msgid "Couldn't load related documents. Refresh before creating a new one to avoid duplicates."msgstr "関連ドキュメントを読み込めませんでした。新しいものを作成する前に更新して、重複を回避してください。"+msgid "Couldn't load the choices for this field."+msgstr "このフィールドの選択肢を読み込めませんでした。"+msgid "Couldn't load the provider's dimension targets — check the connection and reload."msgstr "プロバイダーのディメンションターゲットを読み込めませんでした。接続を確認して再度読み込んでください。"msgid "Couldn't reschedule the job. Please try again."msgstr "ジョブを再スケジュールできませんでした。もう一度お試しください。"+msgid "Couldn't save the connection"+msgstr "接続を保存できませんでした"+msgid "Couldn't save the Onshape connection"msgstr "Onshape 接続を保存できませんでした"@@ -6366,6 +6479,12 @@ msgstr "Onshape Government接続を保存できませんでした"msgid "Couldn't save the Ramp connection"msgstr "Ramp 接続を保存できませんでした"+msgid "Couldn't start the {name} connection"+msgstr "{name} の接続を開始できませんでした"++msgid "Couldn't start the authorization."+msgstr "認可を開始できませんでした。"+msgid "Count"msgstr "数"@@ -6375,6 +6494,12 @@ msgstr "カウント履歴"msgid "Count ID"msgstr "カウントID"+msgid "Count items"+msgstr "品目をカウント"++msgid "Counted {total}."+msgstr "{total} 件をカウントしました。"+msgid "Counted Qty"msgstr "計数数量"@@ -6479,6 +6604,9 @@ msgstr "契約を作成"msgid "Create Forecast"msgstr "予測を作成"+msgid "Create Google Meet Link"+msgstr "Google Meet リンクを作成"+msgid "Create Issue"msgstr "問題を作成"@@ -7116,6 +7244,9 @@ msgstr "日付"msgid "Date Acquired"msgstr "取得日"+msgid "Date and time"+msgstr "日時"+msgid "Date Calibrated"msgstr "キャリブレーション日"@@ -7125,6 +7256,9 @@ msgstr "期限"msgid "Date Due"msgstr "支払期日"+msgid "Date from"+msgstr "開始日"+msgid "Date issued"msgstr "発行日"@@ -7137,6 +7271,9 @@ msgstr "支払日"msgid "Date Paid"msgstr "支払日"+msgid "Date to"+msgstr "終了日"+msgid "Dates"msgstr "日付"@@ -8006,6 +8143,9 @@ msgstr "変更の説明"msgid "Description of Issue"msgstr "問題の説明"+msgid "Description of the event. You can use HTML tags here."+msgstr "イベントの説明。ここではHTMLタグを使用できます。"+msgid "Detach"msgstr "リンク解除"@@ -8111,6 +8251,9 @@ msgstr "破棄されました"msgid "Disconnect"msgstr "切断"+msgid "Disconnected"+msgstr "切断しました"+msgid "Discontinuation date"msgstr "廃止日"@@ -9071,6 +9214,9 @@ msgstr "メール"msgid "Email Address"msgstr "メールアドレス"+msgid "Email address to set as the \"Reply-To\" header"+msgstr "「返信先」ヘッダーとして設定するメールアドレス"+msgid "Email Domains"msgstr "メールドメイン"@@ -9086,6 +9232,9 @@ msgstr "メール送信済"msgid "Emails"msgstr "メール"+msgid "Emails of the attendees (guests)"+msgstr "参加者(ゲスト)のメールアドレス"+msgid "Emoji"msgstr "絵文字"@@ -9155,6 +9304,9 @@ msgstr "会社のデジタル見積を有効にします。これにより、デmsgid "Enable in Settings"msgstr "設定で有効にする"+msgid "Enable link unfurling for this message"+msgstr "このメッセージのリンク展開を有効にする"+msgid "Enable notifications when a sales rule violation is blocked or acknowledged on a quote, sales order, or sales invoice."msgstr "見積、受注、または売上請求書で販売ルール違反がブロックまたは承認されたときに通知を有効にします。"@@ -9236,6 +9388,9 @@ msgstr "終了"msgid "End Date"msgstr "終了日"+msgid "End date time of the event"+msgstr "イベントの終了日時"+msgid "End Line"msgstr "明細を終了"@@ -9568,6 +9723,9 @@ msgstr ""msgid "Event Type"msgstr "イベントタイプ"+msgid "Event types"+msgstr "イベントタイプ"+msgid "Events"msgstr "イベント"@@ -9746,6 +9904,9 @@ msgstr "明細を展開する"msgid "Expand Machine"msgstr "機械を展開"+msgid "Expand Recurring Event?"+msgstr "繰返しイベントを展開しますか?"+msgid "Expand row"msgstr "行を展開"@@ -10584,6 +10745,9 @@ msgstr "ファイルで修正してから、再度アップロードしてくだmsgid "Fix these jobs before releasing"msgstr "リリースする前にこれらの製造指図を修正してください"+msgid "Fix this"+msgstr "これを修正"+msgid "Fixed"msgstr "固定"@@ -11052,6 +11216,12 @@ msgstr "GL試算表"msgid "GL Tie-Out"msgstr "GL試算表"+msgid "Gmail"+msgstr "Gmail"++msgid "Gmail: Send Email"+msgstr "Gmail: メール送信"+msgid "Go live right the first time — with our team alongside you"msgstr "初回から正しく本番運用を開始 — 当社チームがサポートします"@@ -11107,6 +11277,15 @@ msgstr "こんばんは、{name}さん。"msgid "Good morning, {name}."msgstr "おはようございます、{name}さん。"+msgid "Google Calendar"+msgstr "Google カレンダー"++msgid "Google Calendar: Create Event"+msgstr "Google Calendar: イベントを作成"++msgid "Google Calendar: Get all Events"+msgstr "Google Calendar: すべてのイベントを取得"+msgid "Google Places API key not configured"msgstr "Google Places APIキーが設定されていません"@@ -11167,6 +11346,15 @@ msgstr "保証残価"msgid "Guaranteed Residual Value"msgstr "保証残存価額"+msgid "Guests can invite others"+msgstr "ゲストは他の人を招待できます"++msgid "Guests can modify"+msgstr "ゲストは変更できます"++msgid "Guests can see other guests"+msgstr "ゲストは他のゲストを見ることができます"+msgid "Guided"msgstr "ガイド付き"@@ -11518,6 +11706,9 @@ msgstr "IBAN"msgid "IC Transaction"msgstr "企業間取引"+msgid "Icon Emoji"+msgstr "アイコン絵文字"+msgid "Id"msgstr "ID"@@ -12282,6 +12473,9 @@ msgstr "〜以降である"msgid "is on or before"msgstr "〜以前である"+msgid "Is Private?"+msgstr "非公開ですか?"+msgid "Is supplier org group"msgstr "仕入先組織グループです"@@ -12354,6 +12548,9 @@ msgstr ""msgid "It is coming soon. Contact Carbon to have it set up for your company."msgstr "近日公開予定です。会社向けに設定するには Carbon にお問い合わせください。"+msgid "It was removed after this page loaded. Reload the page and try again."+msgstr "このページの読み込み後に削除されました。ページを再度読み込んで、もう一度お試しください。"+msgid "It will stop running until you publish a version again. Nothing is deleted."msgstr "バージョンを再度公開するまで実行は停止します。削除されるものはありません。"@@ -12550,6 +12747,9 @@ msgstr "この品目が部品表に含まれる製造指図"msgid "Join {0}"msgstr "{0}に参加"+msgid "Join into text"+msgstr "テキストに参加"+msgid "Journal"msgstr "仕訳"@@ -12616,6 +12816,9 @@ msgstr "既存の価格設定を保持し、新しい品目のみを追加"msgid "Keep Line"msgstr "明細を維持"+msgid "Keep matching items"+msgstr "一致する品目を保持"+msgid "Keep navigation open"msgstr "ナビゲーションを開いたままにする"@@ -12634,6 +12837,12 @@ msgstr "ピッキングを続ける"msgid "Keeps orders, quotes, and settings behind a second check"msgstr "注文、見積、設定を2段階認証で保護します"+msgid "Kept {kept} of {total}; {unresolved} could not be checked."+msgstr "{total} 件中 {kept} 件を保持しました。{unresolved} 件は確認できませんでした。"++msgid "Kept {kept} of {total}."+msgstr "{total} 件中 {kept} 件を保持しました。"+msgid "Key"msgstr "キー"@@ -14875,6 +15084,9 @@ msgstr "アクセスなし"msgid "No accounts are mapped yet"msgstr "まだマッピングされた勘定はありません"+msgid "No accounts connected yet."+msgstr "まだアカウントが接続されていません。"+msgid "No accounts match your search"msgstr "検索に一致するアカウントがありません"@@ -14930,6 +15142,9 @@ msgstr "まだ資産がありません。リースがカバーする各資産をmsgid "No attachments."msgstr "添付ファイルがありません。"+msgid "No authorization code was returned"+msgstr "認可コードが返されませんでした"+msgid "No available filters"msgstr "利用可能な絞り込みはありません"@@ -15130,6 +15345,9 @@ msgstr "失敗パスなし — 実行がここで停止し失敗とマークさmsgid "No fair value entered, counts as not met"msgstr "公正価値が入力されていません。未達と見なされます。"+msgid "No field was chosen to take."+msgstr "取得するフィールドが選択されていません。"+msgid "No fields found."msgstr "フィールドが見つかりません。"@@ -15250,6 +15468,9 @@ msgstr "一致するビンがありません"msgid "No matching operations"msgstr "一致する工程がありません"+msgid "No matching time"+msgstr "一致する時刻がありません"+msgid "No materials"msgstr "物料がありません"@@ -15765,6 +15986,9 @@ msgstr "なし"msgid "Nothing at this location matches \"{0}\"."msgstr "この場所には\"{0}\"に一致するものはありません。"+msgid "Nothing can work on this result."+msgstr "この結果に対して何も実行できません。"+msgid "Nothing completed in MES yet"msgstr "MESでまだ何も完了していません"@@ -15798,6 +16022,9 @@ msgstr "スケジュールがありません。以下にステーションを追msgid "Nothing selected yet"msgstr "まだ選択されていません"+msgid "Nothing to choose yet - <0>set one up in Settings</0>."+msgstr "まだ選ぶものがありません - <0>設定で設定してください</0>。"+msgid "Nothing to post for this period."msgstr "この期間の転記対象がありません。"@@ -16008,6 +16235,9 @@ msgstr "1 {0} は何 {1} に相当しますか?"msgid "One firing of a workflow, recorded step by step with the values each step used and produced, acting throughout with the permissions of the workflow's owner."msgstr "ワークフローの1回の実行。各ステップが使用および生成した値を含めてステップバイステップで記録され、全体を通じてワークフロー責任者の権限で実行されます。"+msgid "One of your {appName} accounts needs to be reconnected before workflow steps can use it."+msgstr "ワークフロー ステップで使用する前に、{appName}アカウントの1つを再接続する必要があります。"+msgid "One or more quantities cannot meet this date"msgstr "1つ以上の数量がこの日付に対応できません"@@ -16131,6 +16361,9 @@ msgstr "開く"msgid "Open ({paymentCurrency})"msgstr "オープン({paymentCurrency})"+msgid "Open {appName} accounts"+msgstr "{appName}アカウントを開く"+msgid "Open a change notice"msgstr "変更通知を開く"@@ -16320,6 +16553,10 @@ msgstr "工程"msgid "Operation"msgstr "操作"+msgctxt "workflow data step"+msgid "Operation"+msgstr "処理"+msgid "Operation batch"msgstr "工程バッチ"@@ -17129,6 +17366,9 @@ msgstr "得意先、得意先タイプ、または「すべての得意先」をmsgid "Pick a date or leave blank to clear it."msgstr "日付を選択するか、空白のままにしてクリアしてください。"+msgid "Pick a field…"+msgstr "フィールドを選択…"+msgid "Pick a list variable…"msgstr "リスト変数を選択..."@@ -17818,6 +18058,9 @@ msgstr "生産: ショップフロアアプリとスケジューリング"msgid "Profile"msgstr "プロフィール"+msgid "Profile Picture"+msgstr "プロフィール画像"+msgid "Profit Percent"msgstr "利益パーセント"@@ -17928,6 +18171,9 @@ msgstr "SAML SSO サインインをルーティングする前に、DNS TXTレmsgid "Provide process knowledge and inputs"msgstr "プロセスの知識と入力を提供する"+msgid "Provide the ts (timestamp) or link value of the **parent** message to make this message a reply. Do not use the ts value of the reply itself; use its parent instead. For example '1710304378.475129'.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the 'Copy link' option."+msgstr "このメッセージを返信にするには、親メッセージのts(タイムスタンプ)またはリンク値を指定します。返信自体のts値は使用しないでください。代わりに親メッセージのものを使用してください。例えば「1710304378.475129」。または、親メッセージの横にある3つのドットをクリックして「リンクをコピー」オプションを選択することで、メッセージリンクを簡単に取得できます。"+msgid "Provide these URLs to your identity provider (Okta, Entra ID, Google Workspace, etc.) when registering Carbon as a SAML application."msgstr "CarbonをSAMLアプリケーションとして登録する際に、これらのURLをIDプロバイダー(Okta、Entra ID、Google Workspaceなど)に提供してください。"@@ -18731,6 +18977,9 @@ msgstr "受け取り数量はゼロから開始します"msgid "Received quantity not yet credited. The credit memo is created as a draft."msgstr "入荷数量がまだクレジットされていません。クレジットメモは下書きとして作成されます"+msgid "Receiver Email (To)"+msgstr "受信者メール(宛先)"+msgid "Receives the invoice email"msgstr "請求書メールを受け取ります"@@ -18788,6 +19037,21 @@ msgstr "発注書を受け取られたものと請求済のものと照合するmsgid "Reconfigure"msgstr "再構成"+msgid "Reconnect"+msgstr "再接続"++msgid "Reconnect {appName}"+msgstr "{appName}を再接続"++msgid "Reconnect it"+msgstr "これを再接続"++msgid "Reconnect needed"+msgstr "再接続が必要です"++msgid "Reconnect with the account this connection already uses, or use Add account to connect the other one."+msgstr "この接続がすでに使用しているアカウントで再接続するか、「アカウントを追加」でもう一方を接続してください。"+msgid "Record"msgstr "記録"@@ -18833,9 +19097,16 @@ msgstr "記録"msgid "Records and posted journals are being sent to and received from this provider."msgstr "レコードと転記済仕訳がこのプロバイダーとの間で送受信されています。"+msgid "Records here appear as plain text — {appLabel} doesn't support links in this field."+msgstr "このフィールドのレコードはプレーンテキストとして表示されます — {appLabel} はこのフィールドのリンクに対応していません。"+msgid "Records moved"msgstr "レコードが移動しました。"+#. placeholder {0}: notice.params.equals+msgid "Records will be plain text. Set {siblingLabel} to {0} (under Advanced) to turn them into links."+msgstr "レコードはプレーンテキストになります。{siblingLabel} を {0} に設定する(詳細設定下)とリンクに変換できます。"+msgid "Recost"msgstr "原価を再査定"@@ -19182,6 +19453,10 @@ msgstr "受け入れたシリアル番号とバッチ番号を在庫から除去msgid "Remove this item"msgstr "このアイテムを除去"+msgctxt "workflow data step"+msgid "Remove this operation"+msgstr "この処理を削除"+msgid "Remove this storage type from all referencing storage units and delete it. This cannot be undone."msgstr "この保管タイプをすべての参照する保管ユニットから除去して削除する。これは元に戻せません。"@@ -19216,6 +19491,9 @@ msgstr "名前を変更"msgid "Rename Workflow"msgstr "ワークフロー名を変更"+msgid "Renamed"+msgstr "名前を変更しました"+msgid "Rendering label preview..."msgstr "ラベルプレビューをレンダリング中..."@@ -19381,6 +19659,12 @@ msgstr "調達方式"msgid "Replies to emailed invoices go here, and it's copied on each one."msgstr "メール請求書への返信がここに表示され、各メールにコピーされます。"+msgid "Reply to Thread (Thread Message Link/Timestamp)"+msgstr "スレッドに返信 (スレッドメッセージリンク/タイムスタンプ)"++msgid "Reply-To Email"+msgstr "返信先メールアドレス"+msgid "Report"msgstr "レポート"@@ -19925,6 +20209,9 @@ msgstr "招待を取り消す"msgid "Revoke Invites"msgstr "招待を取り消す"+msgid "Revoked"+msgstr "取り消し済み"+msgid "Rework"msgstr "手直し"@@ -20699,6 +20986,9 @@ msgstr "仕入先部品を検索"msgid "Search suppliers..."msgstr "仕入先を検索..."+msgid "Search Term"+msgstr "検索語句"+msgid "Search tools..."msgstr "ツールを検索..."@@ -20800,6 +21090,9 @@ msgstr "形状を先に選択すると、利用可能なオプションが表示msgid "Select a step to hide parts on it."msgstr "ステップを選択して、その上の部品を非表示にします"+msgid "Select a step…"+msgstr "ステップを選択…"+msgid "Select a substance and shape first to see available options"msgstr "物質と形状を先に選択すると、利用可能なオプションが表示されます。"@@ -20818,6 +21111,9 @@ msgstr "すべて選択"msgid "Select an action…"msgstr "アクションを選択…"+msgid "Select an app…"+msgstr "アプリを選択…"+msgid "Select an assignee"msgstr "担当者を選択"@@ -20842,6 +21138,9 @@ msgstr "操作を選択…"msgid "Select an option"msgstr "オプションを選択"+msgid "Select an option…"+msgstr "オプションを選択…"+msgid "Select at least one item to accept the quote"msgstr "見積を承諾するには最低でも1つの品目を選択してください"@@ -20875,6 +21174,9 @@ msgstr "従業員を選択"msgid "Select Employee Type"msgstr "従業員タイプを選択"+msgid "Select event types"+msgstr "イベントタイプを選択"+msgid "Select field"msgstr "フィールドを選択"@@ -21026,6 +21328,9 @@ msgstr "招待を送信"msgid "Send Invites"msgstr "招待を送信"+msgid "Send Notifications"+msgstr "通知を送信"+msgid "Send RFQ to Suppliers"msgstr "仕入先に見積依頼を送信"@@ -21035,6 +21340,12 @@ msgstr "Carbon に送信"msgid "Send Via"msgstr "経由で送信"+msgid "Sender Email"+msgstr "送信者メールアドレス"++msgid "Sender Name"+msgstr "送信者名"+msgid "Sending defective units back to an earlier operation to be corrected instead of scrapping them."msgstr "不良ユニットをスクラップするのではなく、以前の操作に戻して修正する。"@@ -21802,6 +22113,18 @@ msgstr ""msgid "Slack"msgstr "Slack"+msgid "Slack: Create Channel"+msgstr "Slack: チャネルを作成"++msgid "Slack: Find User by Email"+msgstr "Slack: メールアドレスでユーザーを検索"++msgid "Slack: Send Message To A Channel"+msgstr "Slack: チャネルにメッセージを送信"++msgid "Slack: Send Message To A User"+msgstr "Slack: ユーザーにメッセージを送信"+msgid "Slice asset activity by location, item, or any dimension"msgstr "資産活動を場所、品目、または任意のディメンション別に表示"@@ -22041,6 +22364,9 @@ msgstr "開始日"msgid "Start Date"msgstr "開始日"+msgid "Start date time of the event"+msgstr "イベントの開始日時"+msgid "Start Expiration"msgstr "有効期限開始"@@ -22855,6 +23181,9 @@ msgstr "タグ"msgid "Tailor this hub for the customer. Changes apply live for everyone viewing it. Never shown to the customer here."msgstr "このハブを得意先用にカスタマイズしてください。変更はそれを表示している全員にリアルタイムで適用されます。ここで得意先には表示されません。"+msgid "Take one field from every item"+msgstr "各品目から 1 つのフィールドを取得"+msgid "Take out of service"msgstr "稼働を停止"@@ -22868,6 +23197,12 @@ msgstr "所有権を取得"msgid "Take Ownership: {0}"msgstr "所有権を取得: {0}"+msgid "Take the first item"+msgstr "最初の品目を取得"++msgid "Take the last item"+msgstr "最後の品目を取得"+msgid "Take the shortest remaining shelf life across the materials consumed to make this item. Use when the product's expiry depends on its ingredients."msgstr "このアイテムを製造するために消費される材料全体で最短の保存期間を使用してください。製品の使用期限がその成分に依存する場合に使用してください。"@@ -23115,11 +23450,8 @@ msgstr ""msgid "Test run"msgstr "テストラン"-msgid "Test run — results are not saved to the Runs page"-msgstr "テストラン —結果は「ラン」ページに保存されません"--msgid "Test runs are not saved. Close this panel and the result is gone."-msgstr "テストランは保存されません。このパネルを閉じると結果は消えます。"+msgid "Test runs are saved to the run history, marked as tests."+msgstr "テストランはテストとして記録され、実行履歴に保存されます。"msgid "Test Value"msgstr "テスト値"@@ -23127,9 +23459,36 @@ msgstr "テスト値"msgid "Text size"msgstr "テキストサイズ"+msgid "That account is still being reconnected. Try again in a moment."+msgstr "そのアカウントはまだ再接続中です。もう少し待ってからもう一度お試しください。"++msgid "That account no longer exists"+msgstr "そのアカウントはもう存在しません"++msgid "That connection name is already used"+msgstr "その接続名はすでに使用されています"++msgid "That field holds a list of its own. Turn on flattening to take it."+msgstr "そのフィールド自体がリストです。取得するにはフラット化をオンにしてください。"++msgid "That field holds several values, so they are combined into one list."+msgstr "そのフィールドは複数の値を保持しているため、1 つのリストに結合されます。"++msgid "That integration is not available"+msgstr "その連携は利用できません"++msgid "That list was empty."+msgstr "そのリストは空でした。"+msgid "That name is already used by another step."msgstr "その名前は別のステップで既に使用されています。"+msgid "That workspace is connected to another company"+msgstr "そのワークスペースは別の会社に接続されています"++msgid "That's a different account"+msgstr "別のアカウントです"+#. placeholder {0}: i18n._(step.title)msgid "The \"{0}\" phase checks itself off once all of its tasks in the project plan are done."msgstr "「{0}」フェーズは、プロジェクトプランのすべてのタスクが完了すると自動的にチェックオフされます。"@@ -23143,6 +23502,9 @@ msgstr "「{0}」フェーズが完了しました — その「{1}」チェッmsgid "The {0} phases to go live, each ending at a checkpoint. Tick off each task as you complete it."msgstr "{0}個のフェーズをリリースするまで進め、各フェーズはチェックポイントで終了します。完了したタスクをチェックオフしてください。"+msgid "The {appName} account this step uses is not available — it was disconnected or needs to be reconnected."+msgstr "このステップで使用する {appName} アカウントは利用不可能です — 切断されたか、再接続が必要です。"+msgid "The accent color used across Carbon."msgstr "Carbon全体で使用するアクセントカラー。"@@ -23158,6 +23520,9 @@ msgstr "Carbonが自動的に転記するアカウント"msgid "The action that copies a saved method (its materials, operations, and work instructions) onto a job or quote line."msgstr "保存された製法(その材料、工程、および作業手順書)をジョブまたは見積明細にコピーするアクション。"+msgid "The address must be listed in your GMail account's settings"+msgstr "そのアドレスは Gmail アカウントの設定に登録されている必要があります"+msgid "The allowed values for a list-type attribute; users pick from these rather than free-typing."msgstr "リスト型属性の許可された値。ユーザーは自由入力ではなくこれらの中から選択します。"@@ -23179,6 +23544,9 @@ msgstr "資産が使用中クラスに移動され、使用開始日から減価msgid "The asset would have a negative cost. Check the purchase price."msgstr "資産の原価がマイナスになります。購買価格を確認してください。"+msgid "The authorization took too long or came back altered. Start the connection again from this page."+msgstr "認可に時間がかかりすぎるか、変更されて戻ってきました。このページから接続を再度開始してください。"+msgid "The authorization was refused in Onshape. Save the integration settings to try again."msgstr "Onshapeで認可が拒否されました。連携設定を保存して再度試してください。"@@ -23188,6 +23556,9 @@ msgstr "Onshape で認可が拒否されました。もう一度接続してくmsgid "The authorization was refused in Ramp. Try connecting again."msgstr "Ramp で認可が拒否されました。もう一度接続してください。"+msgid "The authorization was rejected"+msgstr "認可が拒否されました"+msgid "The average cost of the item. Changing it needs permission to edit parts."msgstr "品目の平均原価。変更するには部品を編集する権限が必要です。"@@ -23291,6 +23662,12 @@ msgstr "会社には既に転記済の期首残高仕訳があります。"msgid "The company has no account defaults."msgstr "会社に勘定科目のデフォルト設定がありません。"+msgid "The connection could not be verified"+msgstr "接続を検証できませんでした"++msgid "The connection was refused"+msgstr "接続が拒否されました"+msgid "The contract cannot be cancelled then"msgstr "その場合、契約をキャンセルすることはできません。"@@ -23556,6 +23933,9 @@ msgstr "ワークフローのWebhookステップが投稿するhttpsアドレスmsgid "The human-readable document number (like J000001 or ECO-000001) minted from a sequence and stored on the record, distinct from its internal id."msgstr "採番から生成された、人間が読める文書番号(J000001やECO-000001など)で、レコードに保存されています。内部IDとは異なります。"+msgid "The icon emoji of the bot"+msgstr "ボットのアイコン絵文字"+msgid "The identifier the customer uses for this part on their POs; Carbon resolves it to our internal Part ID on order import."msgstr "得意先が発注書で使用するこの部品の識別子。Carbonは発注書のインポート時にそれを社内の部品IDに解決します。"@@ -23577,6 +23957,9 @@ msgstr "この仕入先からの出荷に関するインコタームズルールmsgid "The Incoterm rule (FOB, DAP, EXW, CIF, …) that governs who pays freight, who bears risk, and where the transfer of title occurs on shipments to this customer."msgstr "この得意先への出荷時に誰が運送費を支払い、誰がリスクを負い、所有権の転送がどこで行われるかを管理するインコタームズルール(FOB、DAP、EXW、CIF、…)。"+msgid "The integration authorized the connection but saving it failed. Try connecting again."+msgstr "統合は接続を認可しましたが、保存に失敗しました。再度接続してみてください。"+msgid "The inventory cost recognized when a shipment posts, valued by the item's costing method."msgstr "出荷が転記されるときに認識されるインベントリコスト。品目の原価計算方法で評価されます。"@@ -23592,6 +23975,15 @@ msgstr "各製造指図が生産する品目 — 出力ロットをマージすmsgid "The item's rental rate"msgstr "品目のレンタル料金"+msgid "The items in that list have no field by that name."+msgstr "そのリストの項目には、その名前のフィールドがありません。"++msgid "The items in that list have no fields to take."+msgstr "そのリストの品目には取得するフィールドがありません。"++msgid "The items in that list have no reading as text."+msgstr "そのリストの項目はテキストとして読み取れません。"+msgid "the job hours due that day (a due-date basis, not the day the work runs), with overdue work in Past due."msgstr "その日に期限切れになるジョブの時間(作業が実行される日ではなく、期限日ベース)、期限超過の作業は「期限超過」に表示されます。"@@ -23885,6 +24277,9 @@ msgstr "この保全が実施されるときに技術者が従う手順書。スmsgid "The processes this work center can run; appears in process-pickers when scheduling operations, and limits which jobs can route through this work center."msgstr "この作業区が実行できる工法。工程のスケジュール時にプロセスピッカーに表示され、この作業区を経由できる製造指図を制限します。"+msgid "The profile picture of the bot"+msgstr "ボットのプロフィール画像"+msgid "The provider offers no dimension targets. Enable the feature in the provider first (e.g. tracking categories, class tracking, or fields)."msgstr "プロバイダーはディメンションターゲットを提供していません。最初にプロバイダーで機能を有効にしてください(例:追跡カテゴリ、クラス追跡、またはフィールド)。"@@ -23986,12 +24381,12 @@ msgstr "Onshape からの応答に必須パラメーターが含まれていまmsgid "The response from Ramp was missing required parameters. Try connecting again."msgstr "Ramp からの応答に必須パラメーターが含まれていませんでした。もう一度接続してください。"+msgid "The response was missing required parameters. Try connecting again."+msgstr "レスポンスに必要なパラメータが不足しています。再度接続してみてください。"+msgid "The restore job reported this error."msgstr "復元ジョブがこのエラーを報告しました。"-msgid "The result will not appear on the Runs page."-msgstr "結果は実行ページに表示されません。"-msgid "The revision number of the part"msgstr "部品のリビジョン番号"@@ -24139,6 +24534,9 @@ msgstr "会社が人員のログインを管理するシステム — Oktaまたmsgid "The system passes every in-scope acceptance test in your configured system, with your data; the data is validated; and you sign off. Then go-live."msgstr "システムは、設定されたシステム内のすべてのスコープ内受け入れテストに合格し、データが検証され、サインオフされます。その後、本番環境に移行します。"+msgid "The text of your message. When using Block Kit blocks, this is used as a fallback for notifications."+msgstr "メッセージのテキスト。Block Kit ブロックを使用する場合、これは通知のフォールバックとして使用されます。"+msgid "The thread linking a sales RFQ, its quote, and the resulting sales order — a join, not a document with its own status."msgstr "販売見積依頼、その見積、および結果の受注をリンクするスレッド — 独自ステータスを持つ文書ではなく、結合です。"@@ -24220,6 +24618,9 @@ msgstr ""msgid "The US tax depreciation system with IRS property-class tables, run as a separate tax schedule alongside the book schedule."msgstr "米国の税務減価償却制度で、IRS固定資産分類表を使用し、帳簿的減価償却スケジュールと並行して別税務スケジュールとして実行されます。"+msgid "The username of the bot"+msgstr "ボットのユーザー名"+msgid "The users in this group; group-scoped permissions and notifications apply to each member, and users may belong to multiple groups (effective permissions are the union)."msgstr "このグループのユーザー。グループスコープの権限と通知は各メンバーに適用され、ユーザーは複数のグループに属することができます(有効な権限は組合です)。"@@ -24352,6 +24753,11 @@ msgstr "これらは勘定科目表にありませんが、ドキュメントまmsgid "this ability"msgstr "このスキル"+msgid "This account has stopped working. Reconnect it — workflow steps using it will fail until you do."+msgstr "このアカウントは動作を停止しています。再接続してください — それまでこれを使用するワークフローステップは失敗します。"++msgid "This account needs to be reconnected."+msgstr "このアカウントは再接続する必要があります。"msgid "This action cannot run on this list."msgstr ""@@ -24384,6 +24790,9 @@ msgstr "これは後で変更することはできません — {integrationNamemsgid "This cannot be undone."msgstr "これは元に戻せません。"+msgid "This Carbon instance is missing its OAuth credentials for this integration. Ask an administrator to set them."+msgstr "このCarbonインスタンスには、この統合のOAuth認証情報がありません。管理者に設定するよう依頼してください。"+msgid "This Carbon instance is missing its Onshape OAuth credentials. Ask an administrator to set them."msgstr "この Carbon インスタンスには Onshape の OAuth 認証情報がありません。管理者に設定を依頼してください。"@@ -24442,9 +24851,15 @@ msgstr "この情報はすべてのユーザーに表示されるため、共有msgid "this inspection plan"msgstr "この検査計画"+msgid "This integration can't be connected on this Carbon instance."+msgstr "この連携はこのCarbonインスタンスでは接続できません。"+msgid "This integration isn't available yet"msgstr "この連携はまだご利用いただけません"+msgid "This integration isn't configured"+msgstr "この統合は設定されていません"+#. placeholder {0}: company?.name ?? "Carbon"msgid "This invitation to join {0} has expired. You can request a new invite to be sent to your email."msgstr "この{0}への参加への招待は期限切れです。新しい招待をメールで送信されるようにリクエストできます。"@@ -24627,6 +25042,9 @@ msgstr "このステーションはスキル制限のある作業を実行しまmsgid "This station runs work with no ability requirement; operators assigned on the manning board shape available labor."msgstr "このステーションはスキル要求事項がない作業を実行します。マニング ボード上に割り当てられた作業者は、利用可能な労務を形作ります。"+msgid "This step expected a list."+msgstr "このステップにはリストが必要です。"+msgid "This step is part of it"msgstr "このステップはその一部です。"@@ -24817,6 +25235,9 @@ msgstr "逼迫"msgid "Tightened"msgstr "きつい検査"+msgid "Time"+msgstr "時刻"+msgid "Time and dollar utilization of the rental fleet by asset and class"msgstr "資産クラス別のレンタル資産の時間・金額利用率"@@ -24862,6 +25283,9 @@ msgstr "手前に傾ける"msgid "Title"msgstr "タイトル"+msgid "Title of the event"+msgstr "イベントのタイトル"+msgid "Title passes to the customer when the term ends."msgstr "契約期間が終了すると、所有権が得意先に移転します。"@@ -24967,6 +25391,14 @@ msgstr "許容値(日)"msgid "Tomorrow"msgstr "明日"+msgid "Took {took} values; kept the first {kept}."+msgstr "{took} 件の値を取得し、最初の {kept} 件を保持しました。"++msgid "Took the first of {total}."+msgstr "{total} 件中の最初の項目を取得しました。"++msgid "Took the last of {total}."+msgstr "{total} 件中の最後の項目を取得しました。"msgid "Too many exports and bulk actions are running right now. Try again in a few minutes."msgstr "現在、実行中のエクスポートと一括操作が多すぎます。数分後にもう一度お試しください。"@@ -25298,6 +25730,9 @@ msgstr "トリガー"msgid "Try a different name."msgstr "別の名前を試してください。"+msgid "Try again"+msgstr "もう一度お試しください"+msgid "Tuesday"msgstr "火曜日"@@ -25368,6 +25803,9 @@ msgstr "続行するには <0>\"{confirmPhrase}\"</0> と入力してくださmsgid "Type a message..."msgstr "メッセージを入力..."+msgid "Type a value and press Enter…"+msgstr "値を入力して Enter キーを押してください…"+msgid "Type an email and press Enter to add an external recipient"msgstr "メールを入力して Enter キーを押し、社外受取人を追加します"@@ -25449,6 +25887,9 @@ msgstr "今後の割引前支払額(会計年度ごと)から、残りの月msgid "Undo"msgstr "元に戻す"+msgid "Unfurl Links"+msgstr "リンクを展開"+msgid "Ungroup"msgstr "グループ解除"@@ -25969,6 +26410,9 @@ msgstr "ユーザー権限"msgid "User roles"msgstr "ユーザーロール"+msgid "Username"+msgstr "ユーザー名"+msgid "users"msgstr "ユーザー"@@ -26753,6 +27197,9 @@ msgstr "オンの場合、この価格上書きは一致する注文に適用さmsgid "When on, this rule fires for every target of its type. Assignment rows are ignored but preserved."msgstr "オンの場合、このルールはそのタイプのすべてのターゲットに対して発火します。割り当て行は無視されますが保持されます。"+msgid "When replying to a thread, also make the message visible to everyone in the channel (only applicable when Thread Timestamp is provided)"+msgstr "スレッドに返信するときは、メッセージをチャネル内の全員に表示させます(スレッドタイムスタンプが指定されている場合のみ適用)"+msgid "When supplier responses are expected back; suppliers see this date on the RFQ portal and Carbon stops accepting late responses after it (configurable)."msgstr "仕入先の回答が返信予定の日付。仕入先は見積依頼ポータルでこの日付を確認できます。Carbonはこの日付後の遅い回答の受け入れを中止します(設定可能)。"@@ -26924,6 +27371,9 @@ msgstr "この作業が生産をブロックする(ダウン)か、性能をmsgid "Whether to Add the selected permissions on top of what each user already has, or Update by replacing each user's permission set wholesale with the selection below."msgstr "選択した権限を各ユーザーが既に持っているものに追加するか、または各ユーザーの権限セット全体を下記の選択で置き換えて更新するかどうか。"+msgid "Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves."+msgstr "繰返しイベントを個々のインスタンスに展開するかどうか。展開すると、単発のイベントと繰返しイベントのインスタンスのみを返し、元の繰返しイベント自体は返しません。"+msgid "Which document drives each inspection flow for this item."msgstr "どの文書がこの品目の各検査フローを駆動するか。"@@ -27227,6 +27677,9 @@ msgstr "複数の会社に属しています。作業する会社を選択してmsgid "You can change the UI style any time through the theme setting"msgstr "テーマ設定からいつでもUIスタイルを変更できます"+msgid "You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.'"+msgstr "チャネルを右クリックして「チャネルの詳細を表示」を選択することでチャネル ID を取得できます。"+msgid "You can only see this key once. Store it safely."msgstr "このキーは一度だけ表示されます。安全に保管してください。"@@ -27278,6 +27731,9 @@ msgstr "あなたがリード"msgid "You name a project owner with decision authority"msgstr "意思決定権を持つプロジェクト責任者を指名します"+msgid "You need permission to edit workflows to load these choices."+msgstr "これらの選択肢を読み込むには、ワークフローの編集権限が必要です。"+msgid "You received this item"msgstr "あなたがこのアイテムを受け取りました"diff --git a/packages/locale/locales/ja/mes.po b/packages/locale/locales/ja/mes.poindex 4297b721c2..098e257759 100644--- a/packages/locale/locales/ja/mes.po+++ b/packages/locale/locales/ja/mes.po@@ -113,6 +113,9 @@ msgstr "前回の完了は終了しませんでした。再試行により残りmsgid "About"msgstr "バージョン情報"+msgid "About this field"+msgstr "このフィールドについて"+msgid "Accept"msgstr "承諾"@@ -1234,6 +1237,9 @@ msgstr "本日の保全予定はありません。"msgid "No matches. Type to create one."msgstr "一致するものがありません。入力して新しく作成してください。"+msgid "No matching time"+msgstr "一致する時刻がありません"+msgid "No materials"msgstr "材料なし"@@ -2144,6 +2150,9 @@ msgstr "サムネイル"msgid "Tick the jobs this was done for."msgstr "これが完了した製造指図をチェック"+msgid "Time"+msgstr "時刻"+msgid "Time and cost split across jobs proportionally to quantity."msgstr "時間と原価が数量に比例して製造指図全体に分配されます。"diff --git a/packages/locale/locales/ko/erp.po b/packages/locale/locales/ko/erp.poindex aba4dd525c..bf469ecebb 100644--- a/packages/locale/locales/ko/erp.po+++ b/packages/locale/locales/ko/erp.po@@ -269,6 +269,10 @@ msgstr "{0}개 송장이 이전 시스템에서 청구되었으며 다시 초안msgid "{0} is {1}, not Draft or Planned"msgstr ""+#. placeholder {0}: integration.name+msgid "{0} isn't installed yet. There's nothing to configure — install it to connect an account."+msgstr "{0}은(는) 아직 설치되지 않았습니다. 설정할 항목이 없습니다 — 설치하여 계정을 연결하세요."+#. placeholder {0}: data.quantitymsgid "{0} items marked as picked"msgstr ""@@ -481,6 +485,12 @@ msgstr "{alreadyPlannedItemCount}개 부품 건너뜀 — 이미 미결 작업msgid "{apOverduePct}% of payables"msgstr "매입채무의 {apOverduePct}%"+msgid "{appName} is connected, but needs to be reconnected before workflow steps can use it."+msgstr "{appName}은(는) 연결되어 있지만 워크플로 단계에서 사용하기 전에 다시 연결해야 합니다."++msgid "{appName} isn't connected yet. Connect an account before this step can do anything."+msgstr "{appName}이(가) 아직 연결되지 않았습니다. 이 단계를 진행하기 전에 계정을 연결하세요."+msgid "{arOverduePct}% of receivables"msgstr "매출채권의 {arOverduePct}%"@@ -594,6 +604,9 @@ msgstr "{inserted}개 추가, {updated}개 업데이트, {0}개 수정 필요, {msgid "{jobsMissingStorageUnit, plural, one {# open job has materials with no storage unit} other {# open jobs have materials with no storage unit}}"msgstr "{jobsMissingStorageUnit, plural, one {# 개의 미결 작업 지시에 보관 단위가 없는 자재가 있습니다} other {# 개의 미결 작업 지시에 보관 단위가 없는 자재가 있습니다}}"+msgid "{kept, plural, one {Took # value.} other {Took # values.}}"+msgstr "{kept, plural, other {값 #개를 가져왔습니다.}}"+msgid "{label} is used by documents, journals or default accounts, so it cannot be deleted."msgstr "{label}은(는) 문서, 전표 또는 기본 계정에서 사용 중이므로 삭제할 수 없습니다."@@ -746,6 +759,9 @@ msgstr "{state} · {syncedAgo} 동기화됨"msgid "{termMonths, plural, one {# month} other {# months}}"msgstr "{termMonths, plural, one {# 개월} other {# 개월}}"+msgid "{total, plural, one {Joined # value.} other {Joined # values.}}"+msgstr "{total, plural, other {값 #개를 결합했습니다.}}"+msgid "{total} phases to get your company live on Carbon. Each one ends at a checkpoint."msgstr "회사를 Carbon에 가동시키기 위한 {total}개 단계. 각 단계는 체크포인트에서 종료됩니다."@@ -1651,6 +1667,9 @@ msgstr "사용자는 상품을 수령할 때 각 배치 또는 시리얼의 유msgid "A variable charge — mileage overage, damage, delivery, cleaning — is billed on the agreement's next invoice."msgstr "변동 요금(마일리지 초과, 손상, 배송, 청소)은 계약의 다음 송장에 청구됩니다."+msgid "A workspace can be connected to one Carbon company only. Disconnect it there first, or connect a different workspace."+msgstr "작업 공간은 하나의 Carbon 회사에만 연결할 수 있습니다. 먼저 해당 회사에서 연결을 해제하거나 다른 작업 공간을 연결하세요."+msgid "ABA"msgstr "ABA"@@ -1672,6 +1691,9 @@ msgstr "정보"msgid "About (notification)"msgstr "정보 (알림)"+msgid "About this field"+msgstr "이 필드에 대해"+msgid "Absent"msgstr "부재중"@@ -1838,6 +1860,9 @@ msgstr ""msgid "Accounts receivable for amounts owed by customers"msgstr "고객이 지급할 금액에 대한 매출채권"+msgid "Accounts your workflows can act as. Add one for each account a workflow step should use."+msgstr "워크플로우가 사용할 수 있는 계정입니다. 워크플로우 단계가 사용할 각 계정에 대해 하나씩 추가하세요."+msgid "Accrual"msgstr "당기발생"@@ -2055,6 +2080,9 @@ msgstr "단계 또는 질문 추가"msgid "Add Ability"msgstr "역량 추가"+msgid "Add account"+msgstr "계정 추가"+msgid "Add Account"msgstr "계정 추가"@@ -2196,6 +2224,10 @@ msgstr "월 추가"msgid "Add Note"msgstr "메모 추가"+msgctxt "workflow data step"+msgid "Add operation"+msgstr "작업 추가"+msgid "Add Operation"msgstr "공정작업 추가"@@ -2434,6 +2466,9 @@ msgstr "{nextStatus}로 진행"msgid "Advanced"msgstr "고급"+msgid "Advanced properties"+msgstr "고급 속성"+msgid "Affected item not found."msgstr "영향받는 항목을 찾을 수 없습니다."@@ -2657,6 +2692,12 @@ msgstr "금액은 값을 나타내는 자릿수만 표시합니다."msgid "An ability is a process's qualification. Only processes without one are listed."msgstr "역량은 공법의 자격입니다. 역량이 없는 공법만 나열됩니다."+msgid "An account is already called that — pick a different name."+msgstr "이미 그런 이름의 계정이 있습니다 — 다른 이름을 선택하세요."++msgid "An account is missing from this list until it is reconnected."+msgstr "이 목록에서 계정이 누락되어 있으며 다시 연결할 때까지 누락된 상태입니다."+msgid "An accounting bucket that groups expenses by department or function so the GL can report spend by group, not just by account."msgstr "부서나 기능별로 비용을 그룹화하여 총계정원장이 계정뿐 아니라 그룹별로도 지출을 보고할 수 있게 하는 회계 버킷입니다."@@ -2822,6 +2863,9 @@ msgstr "Onshape 연동 중 예상치 못한 오류가 발생했습니다. 연동msgid "An unexpected error occurred while connecting to Onshape. Try connecting again."msgstr "Onshape에 연결하는 중 예기치 않은 오류가 발생했습니다. 다시 연결해 보세요."+msgid "An unexpected error occurred while connecting. Try connecting again."+msgstr "연결 중 예상치 못한 오류가 발생했습니다. 다시 연결해보세요."+msgid "Analytics"msgstr "분석"@@ -2839,9 +2883,6 @@ msgstr "그리고 {0}건 더 — 이를 해결하면 나머지를 볼 수 있습msgid "And {0} more. Resolve these to see the rest."msgstr "{0}개 더. 이들을 해결하면 나머지를 볼 수 있습니다."-msgid "and {hidden} more"-msgstr "및 {hidden}개 더"-msgid "and {remaining} more"msgstr "외 {remaining}개"@@ -2878,6 +2919,9 @@ msgstr "렌트가 할인되는 연간 요율"msgid "Annual. Starts from the company's incremental borrowing rate"msgstr "연간. 회사의 증분 차입 이율부터 시작합니다."+msgid "Another connection to this integration already has that name. Choose a different one."+msgstr "이 통합의 다른 연결이 이미 해당 이름을 가지고 있습니다. 다른 이름을 선택하세요."+msgid "Another cost center this one rolls up into, letting you nest a sub-department under its parent for hierarchical cost reporting."msgstr "이 원가 센터가 롤업되는 다른 원가 센터로, 계층적 원가 보고를 위해 부서를 상위 항목 아래에 중첩시킬 수 있게 함"@@ -2948,6 +2992,9 @@ msgid "API keys for programmatic access to your Carbon data."msgstr "Carbon 데이터에 프로그래밍 방식으로 접근하기 위한 API 키입니다."msgid "API, webhooks, and integrations"+msgstr "API, 웹훅 및 통합"++msgid "App"msgstr "API, 웹훅 및 연동"msgid "Appearance"@@ -3882,6 +3929,9 @@ msgstr "첨부 파일을 로드할 수 없습니다"msgid "Attempts"msgstr "시도"+msgid "Attendees"+msgstr "참석자"+msgid "Attribute"msgstr "속성"@@ -3924,6 +3974,9 @@ msgstr "인증 앱"msgid "Authenticator QR code"msgstr "인증자 QR 코드"+msgid "Authorization was refused. Try connecting again."+msgstr "인증이 거부되었습니다. 다시 연결해보세요."+msgid "Authorized overtime on top of the shift"msgstr "교대조 위의 허가된 초과근무"@@ -3984,6 +4037,9 @@ msgstr "자동 업데이트 및 백업"msgid "Automatic, prorated consumption of a job's untracked materials when output is reported — tracked materials are issued manually."msgstr "출력이 보고될 때 작업 지시의 추적되지 않는 자재의 자동 배분 소모 — 추적되는 자재는 수동으로 발급됩니다."+msgid "Automatically create a Google Meet video conference link for this event"+msgstr "이 이벤트에 대해 Google Meet 화상 회의 링크를 자동으로 생성합니다."+msgid "Automatically release the job when the kanban is scanned"msgstr "칸반이 스캔될 때 작업 지시를 자동으로 릴리스합니다"@@ -4193,6 +4249,9 @@ msgstr "반품할 배치"msgid "Batching"msgstr "배치 처리"+msgid "BCC Email"+msgstr "숨은 참조 이메일"+msgid "Becomes"msgstr "변환"@@ -4370,6 +4429,12 @@ msgstr "보드"msgid "Body"msgstr "본문"+msgid "Body for the email you want to send"+msgstr "보낼 이메일의 본문"++msgid "Body Type"+msgstr "본문 유형"+msgid "BoM"msgstr "BOM"@@ -4427,6 +4492,9 @@ msgstr "이동 경로"msgid "Bring in your parts, BOMs, Bill of Process, and costing — with Carbon's import tools, CSV, or LLM help."msgstr "부품, BOM, 공정 목록 및 원가 계산을 가져오기 — Carbon의 가져오기 도구, CSV 또는 LLM 도움을 사용합니다."+msgid "Broadcast reply to channel"+msgstr "채널에 답변 브로드캐스트"+msgid "Browse library"msgstr "라이브러리 둘러보기"@@ -4513,6 +4581,9 @@ msgstr ""msgid "By accepting the invite, you agree to the <0>Terms of Service</0> and <1>Privacy Policy</1>."msgstr "초대를 수락하면 <0>서비스 약관</0> 및 <1>개인정보 처리방침</1>에 동의하는 것으로 간주됩니다."+msgid "By default it'll be 30 min post start time"+msgstr "기본적으로 시작 시간 후 30분입니다."+msgid "By dimension"msgstr "차원별"@@ -4881,6 +4952,9 @@ msgstr "원인 실행: "msgid "CC"msgstr "참조"+msgid "CC Email"+msgstr "참조 이메일"+msgid "Centralized Billing Address"msgstr "통합 청구 주소"@@ -4998,6 +5072,12 @@ msgstr "이를 변경하면 품목 ID가 업데이트됩니다"msgid "Changing type resets this item's draft edits."msgstr "유형을 변경하면 이 항목의 초안 편집이 재설정됩니다."+msgid "Channel"+msgstr "채널"++msgid "Channel Name"+msgstr "채널 이름"+msgid "Characteristic"msgstr "특성"@@ -5078,6 +5158,9 @@ msgstr "체크포인트 ·"msgid "Checkpoints"msgstr "체크포인트"+msgid "Choose {named} first."+msgstr "먼저 {named}을(를) 선택하세요."+msgid "Choose a backup"msgstr "백업 선택"@@ -5333,6 +5416,9 @@ msgstr "셋업 접기"msgid "Collapse subtree"msgstr "하위 트리 접기"+msgid "Color"+msgstr "색상"+#. placeholder {0}: index + 1msgid "Column {0} of {count}"msgstr "열 {0}/{count}"@@ -5594,6 +5680,9 @@ msgstr "시스템 전반의 다양한 거래 유형에 사용되는 기본 계msgid "Configure the start months for your fiscal and tax years"msgstr "재정 연도 및 세금 연도의 시작월 구성"+msgid "Configure the steps above first."+msgstr "먼저 위의 단계를 설정하세요."+msgid "Configure when purchased item costs should be updated from supplier transactions."msgstr "공급업체 거래로부터 구매 품목 원가를 언제 업데이트할지 설정하세요."@@ -5690,6 +5779,9 @@ msgstr "충돌 이유"msgid "Connect"msgstr "연결"+msgid "Connect {appName}"+msgstr "{appName} 연결"+msgid "Connect Carbon to your accounting, project management, and CAD tools and much more."msgstr "Carbon을 회계, 프로젝트 관리, CAD 도구 등과 연동하세요."@@ -5717,9 +5809,18 @@ msgstr "회사에서 이미 사용 중인 외부 도구 연결"msgid "Connect your identity provider by pasting either its metadata URL or its raw metadata XML — exactly one of the two."msgstr "메타데이터 URL 또는 원본 메타데이터 XML 중 정확히 하나를 붙여넣어 자격 증명 공급자를 연결합니다."+msgid "Connected before workflows needed extra permissions. Reconnect to grant them — everything else keeps working meanwhile."+msgstr "워크플로가 필요하기 전에 연결되었으므로 추가 권한이 필요합니다. 다시 연결하여 부여하세요 — 그 사이에 다른 모든 것은 계속 작동합니다."+msgid "Connected to"msgstr "연결 대상"+msgid "Connection"+msgstr "연결"++msgid "Connection name"+msgstr "연결 이름"+msgid "Console Mode"msgstr "콘솔 모드"@@ -6336,6 +6437,12 @@ msgstr "{0}을 릴리스할 수 없음: {1}"msgid "Could not save"msgstr "저장할 수 없습니다"+msgid "Couldn't check whether {appName} is connected."+msgstr "{appName}이(가) 연결되어 있는지 확인할 수 없습니다."++msgid "Couldn't complete the connection"+msgstr "연결을 완료할 수 없습니다"+msgid "Couldn't complete the Onshape connection"msgstr "Onshape 연결을 완료할 수 없습니다"@@ -6351,12 +6458,18 @@ msgstr "행을 더 불러오지 못했습니다"msgid "Couldn't load related documents. Refresh before creating a new one to avoid duplicates."msgstr "관련 문서를 로드할 수 없습니다. 새 문서를 생성하기 전에 새로고침하여 복제를 피하십시오."+msgid "Couldn't load the choices for this field."+msgstr "이 필드의 선택 항목을 로드할 수 없습니다."+msgid "Couldn't load the provider's dimension targets — check the connection and reload."msgstr "제공자의 차원 대상을 로드할 수 없습니다 — 연결을 확인하고 다시 로드하세요."msgid "Couldn't reschedule the job. Please try again."msgstr "작업 일정을 변경할 수 없습니다. 다시 시도하세요."+msgid "Couldn't save the connection"+msgstr "연결을 저장할 수 없습니다"+msgid "Couldn't save the Onshape connection"msgstr "Onshape 연결을 저장할 수 없습니다"@@ -6366,6 +6479,12 @@ msgstr "Onshape Government 연동을 저장할 수 없습니다."msgid "Couldn't save the Ramp connection"msgstr "Ramp 연결을 저장할 수 없습니다"+msgid "Couldn't start the {name} connection"+msgstr "{name} 연결을 시작할 수 없습니다"++msgid "Couldn't start the authorization."+msgstr "인증을 시작할 수 없습니다."+msgid "Count"msgstr "실사"@@ -6375,6 +6494,12 @@ msgstr "재고조사 이력"msgid "Count ID"msgstr "실사 ID"+msgid "Count items"+msgstr "품목 수 계산"++msgid "Counted {total}."+msgstr "{total}개를 셌습니다."+msgid "Counted Qty"msgstr "실사 수량"@@ -6479,6 +6604,9 @@ msgstr "계약 생성"msgid "Create Forecast"msgstr "예측 생성"+msgid "Create Google Meet Link"+msgstr "Google Meet 링크 만들기"+msgid "Create Issue"msgstr "이슈 생성"@@ -7116,6 +7244,9 @@ msgstr "날짜"msgid "Date Acquired"msgstr "취득일"+msgid "Date and time"+msgstr "날짜 및 시간"+msgid "Date Calibrated"msgstr "교정일"@@ -7125,6 +7256,9 @@ msgstr "만기일"msgid "Date Due"msgstr "만기일"+msgid "Date from"+msgstr "시작 날짜"+msgid "Date issued"msgstr "발행일"@@ -7137,6 +7271,9 @@ msgstr "결제일"msgid "Date Paid"msgstr "지급일"+msgid "Date to"+msgstr "종료 날짜"+msgid "Dates"msgstr "날짜"@@ -8006,6 +8143,9 @@ msgstr "변경 설명"msgid "Description of Issue"msgstr "이슈 설명"+msgid "Description of the event. You can use HTML tags here."+msgstr "이벤트의 설명입니다. 여기서 HTML 태그를 사용할 수 있습니다."+msgid "Detach"msgstr "분리"@@ -8111,6 +8251,9 @@ msgstr "폐기됨"msgid "Disconnect"msgstr "연결 해제"+msgid "Disconnected"+msgstr "연결 해제됨"+msgid "Discontinuation date"msgstr "중단 날짜"@@ -9071,6 +9214,9 @@ msgstr "이메일"msgid "Email Address"msgstr "이메일 주소"+msgid "Email address to set as the \"Reply-To\" header"+msgstr "\"답장\" 헤더로 설정할 이메일 주소"+msgid "Email Domains"msgstr "이메일 도메인"@@ -9086,6 +9232,9 @@ msgstr "이메일 발송됨"msgid "Emails"msgstr "이메일"+msgid "Emails of the attendees (guests)"+msgstr "참석자(게스트)의 이메일 주소"+msgid "Emoji"msgstr "이모지"@@ -9155,6 +9304,9 @@ msgstr "회사의 디지털 견적서를 활성화하세요. 이렇게 하면msgid "Enable in Settings"msgstr "설정에서 활성화"+msgid "Enable link unfurling for this message"+msgstr "이 메시지에 대해 링크 펼치기 사용"+msgid "Enable notifications when a sales rule violation is blocked or acknowledged on a quote, sales order, or sales invoice."msgstr "견적, 수주 또는 매출 송장에서 판매 규칙 위반이 차단되거나 승인될 때 알림을 활성화합니다."@@ -9236,6 +9388,9 @@ msgstr "종료"msgid "End Date"msgstr "종료일"+msgid "End date time of the event"+msgstr "이벤트의 종료 날짜 및 시간"+msgid "End Line"msgstr "라인 종료"@@ -9568,6 +9723,9 @@ msgstr ""msgid "Event Type"msgstr "이벤트 유형"+msgid "Event types"+msgstr "이벤트 유형"+msgid "Events"msgstr "이벤트"@@ -9746,6 +9904,9 @@ msgstr "라인 펼치기"msgid "Expand Machine"msgstr "기계 펼치기"+msgid "Expand Recurring Event?"+msgstr "반복 이벤트를 펼치시겠습니까?"+msgid "Expand row"msgstr "행 펼치기"@@ -10584,6 +10745,9 @@ msgstr "파일에서 수정한 후 다시 업로드합니다."msgid "Fix these jobs before releasing"msgstr "릴리스하기 전에 이 작업 지시들을 수정하세요"+msgid "Fix this"+msgstr "이를 수정하세요."+msgid "Fixed"msgstr "고정"@@ -11052,6 +11216,12 @@ msgstr "총계정원장 대사"msgid "GL Tie-Out"msgstr "총계정원장 대사"+msgid "Gmail"+msgstr "Gmail"++msgid "Gmail: Send Email"+msgstr "Gmail: 이메일 보내기"+msgid "Go live right the first time — with our team alongside you"msgstr "저희 팀과 함께 첫 시도에 성공적으로 도입하세요"@@ -11107,6 +11277,15 @@ msgstr "{name}님, 좋은 저녁입니다."msgid "Good morning, {name}."msgstr "{name}님, 좋은 아침입니다."+msgid "Google Calendar"+msgstr "Google Calendar"++msgid "Google Calendar: Create Event"+msgstr "Google Calendar: 이벤트 만들기"++msgid "Google Calendar: Get all Events"+msgstr "Google Calendar: 모든 이벤트 가져오기"+msgid "Google Places API key not configured"msgstr "Google Places API 키가 설정되지 않았습니다"@@ -11167,6 +11346,15 @@ msgstr "보증 잔존가액"msgid "Guaranteed Residual Value"msgstr "보증된 잔존가액"+msgid "Guests can invite others"+msgstr "게스트가 다른 사용자를 초대할 수 있음"++msgid "Guests can modify"+msgstr "게스트가 수정할 수 있음"++msgid "Guests can see other guests"+msgstr "게스트가 다른 게스트를 볼 수 있음"+msgid "Guided"msgstr "가이드형"@@ -11518,6 +11706,9 @@ msgstr "IBAN"msgid "IC Transaction"msgstr "회사 간 거래"+msgid "Icon Emoji"+msgstr "아이콘 이모지"+msgid "Id"msgstr "Id"@@ -12282,6 +12473,9 @@ msgstr "이상"msgid "is on or before"msgstr "이하"+msgid "Is Private?"+msgstr "비공개인가요?"+msgid "Is supplier org group"msgstr "공급업체 조직 그룹입니다"@@ -12354,6 +12548,9 @@ msgstr ""msgid "It is coming soon. Contact Carbon to have it set up for your company."msgstr "곧 제공될 예정입니다. 회사에 설정하려면 Carbon에 문의하세요."+msgid "It was removed after this page loaded. Reload the page and try again."+msgstr "이 페이지를 불러온 후 삭제되었습니다. 페이지를 새로고침하고 다시 시도하세요."+msgid "It will stop running until you publish a version again. Nothing is deleted."msgstr "다시 버전을 게시할 때까지 실행이 중지됩니다. 삭제된 내용은 없습니다."@@ -12550,6 +12747,9 @@ msgstr "자재 명세서에 이 품목이 있는 작업 지시"msgid "Join {0}"msgstr "{0} 참여"+msgid "Join into text"+msgstr "텍스트에 참여"+msgid "Journal"msgstr "전표"@@ -12616,6 +12816,9 @@ msgstr "기존 가격 책정을 유지하고 새 품목만 추가합니다."msgid "Keep Line"msgstr "라인 유지"+msgid "Keep matching items"+msgstr "일치하는 품목 유지"+msgid "Keep navigation open"msgstr "탐색 열어 두기"@@ -12634,6 +12837,12 @@ msgstr "피킹 유지"msgid "Keeps orders, quotes, and settings behind a second check"msgstr "주문, 견적 및 설정을 이중 확인으로 보호합니다"+msgid "Kept {kept} of {total}; {unresolved} could not be checked."+msgstr "{total}개 중 {kept}개를 유지했습니다. {unresolved}개는 확인할 수 없습니다."++msgid "Kept {kept} of {total}."+msgstr "{total}개 중 {kept}개를 유지했습니다."+msgid "Key"msgstr "키"@@ -14875,6 +15084,9 @@ msgstr "접근 권한 없음"msgid "No accounts are mapped yet"msgstr "아직 매핑된 계정이 없습니다"+msgid "No accounts connected yet."+msgstr "아직 연결된 계정이 없습니다."+msgid "No accounts match your search"msgstr "검색과 일치하는 계정이 없습니다"@@ -14930,6 +15142,9 @@ msgstr "아직 자산이 없습니다. 리스가 포함하는 각 자산과 그msgid "No attachments."msgstr "첨부 파일이 없습니다."+msgid "No authorization code was returned"+msgstr "인증 코드가 반환되지 않음"+msgid "No available filters"msgstr "사용 가능한 필터가 없습니다"@@ -15130,6 +15345,9 @@ msgstr "실패 경로 없음 — 실행이 여기서 중지되고 실패로 표msgid "No fair value entered, counts as not met"msgstr "공정 가치를 입력하지 않음, 충족되지 않은 것으로 간주"+msgid "No field was chosen to take."+msgstr "가져올 필드가 선택되지 않았습니다."+msgid "No fields found."msgstr "필드가 없습니다."@@ -15250,6 +15468,9 @@ msgstr "일치하는 빈이 없습니다"msgid "No matching operations"msgstr "일치하는 공정이 없습니다"+msgid "No matching time"+msgstr "일치하는 시간 없음"+msgid "No materials"msgstr "자재 없음"@@ -15765,6 +15986,9 @@ msgstr "없음"msgid "Nothing at this location matches \"{0}\"."msgstr "이 위치에서 \"{0}\"와 일치하는 항목이 없습니다."+msgid "Nothing can work on this result."+msgstr "이 결과에 대해 아무것도 수행할 수 없습니다."+msgid "Nothing completed in MES yet"msgstr "MES에서 아직 완료된 항목이 없습니다"@@ -15798,6 +16022,9 @@ msgstr "일정이 없습니다 — 아래에서 스테이션을 추가하세요.msgid "Nothing selected yet"msgstr "아직 선택된 항목이 없습니다"+msgid "Nothing to choose yet - <0>set one up in Settings</0>."+msgstr "아직 선택할 항목이 없습니다 - <0>설정에서 설정하세요</0>."+msgid "Nothing to post for this period."msgstr "이 기간에 전기할 것이 없습니다."@@ -16008,6 +16235,9 @@ msgstr "1 {0}은(는) 몇 {1}입니까?"msgid "One firing of a workflow, recorded step by step with the values each step used and produced, acting throughout with the permissions of the workflow's owner."msgstr "워크플로의 한 번 실행으로, 각 단계가 사용하고 생성한 값을 단계별로 기록하며 워크플로 책임자의 권한으로 전체적으로 작동합니다."+msgid "One of your {appName} accounts needs to be reconnected before workflow steps can use it."+msgstr "워크플로 단계에서 사용하기 전에 {appName} 계정 중 하나를 다시 연결해야 합니다."+msgid "One or more quantities cannot meet this date"msgstr "하나 이상의 수량이 이 날짜를 충족할 수 없습니다"@@ -16131,6 +16361,9 @@ msgstr "열림"msgid "Open ({paymentCurrency})"msgstr "미결 ({paymentCurrency})"+msgid "Open {appName} accounts"+msgstr "{appName} 계정 열기"+msgid "Open a change notice"msgstr "변경 통지 열기"@@ -16320,6 +16553,10 @@ msgstr "공정"msgid "Operation"msgstr "공정작업"+msgctxt "workflow data step"+msgid "Operation"+msgstr "작업"+msgid "Operation batch"msgstr "공정 배치"@@ -17129,6 +17366,9 @@ msgstr "가격을 보려면 고객, 고객 유형 또는 모든 고객을 선택msgid "Pick a date or leave blank to clear it."msgstr "날짜를 선택하거나 비워두어 지우세요."+msgid "Pick a field…"+msgstr "필드를 선택하세요…"+msgid "Pick a list variable…"msgstr "목록 변수 선택…"@@ -17818,6 +18058,9 @@ msgstr "생산: 현장 앱 및 스케줄링"msgid "Profile"msgstr "프로필"+msgid "Profile Picture"+msgstr "프로필 사진"+msgid "Profit Percent"msgstr "수익률"@@ -17928,6 +18171,9 @@ msgstr "이메일 도메인 소유권을 DNS TXT 레코드로 증명한 후 SAMLmsgid "Provide process knowledge and inputs"msgstr "공정 지식과 의견을 제공하세요"+msgid "Provide the ts (timestamp) or link value of the **parent** message to make this message a reply. Do not use the ts value of the reply itself; use its parent instead. For example '1710304378.475129'.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the 'Copy link' option."+msgstr "이 메시지를 답변으로 만들려면 **상위** 메시지의 ts(타임스탬프) 또는 링크 값을 제공하세요. 답변 자체의 ts 값을 사용하지 마세요. 대신 상위 항목을 사용하세요. 예: '1710304378.475129'. 또는 상위 메시지 옆의 세 점을 클릭하고 '링크 복사' 옵션을 선택하여 메시지 링크를 쉽게 얻을 수 있습니다."+msgid "Provide these URLs to your identity provider (Okta, Entra ID, Google Workspace, etc.) when registering Carbon as a SAML application."msgstr "Carbon을 SAML 애플리케이션으로 등록할 때 이러한 URL을 자격 증명 공급자(Okta, Entra ID, Google Workspace 등)에 제공하세요."@@ -18731,6 +18977,9 @@ msgstr "입고 수량은 0에서 시작합니다"msgid "Received quantity not yet credited. The credit memo is created as a draft."msgstr "수신한 수량이 아직 대변처리되지 않았습니다. 대변전표가 초안으로 생성됩니다."+msgid "Receiver Email (To)"+msgstr "수신자 이메일 (받는 사람)"+msgid "Receives the invoice email"msgstr "송장 이메일을 수신합니다."@@ -18788,6 +19037,21 @@ msgstr "발주서를 입고 및 송장 발행된 내용과 대조하기 — Carbmsgid "Reconfigure"msgstr "재설정"+msgid "Reconnect"+msgstr "다시 연결"++msgid "Reconnect {appName}"+msgstr "{appName} 다시 연결"++msgid "Reconnect it"+msgstr "다시 연결하세요."++msgid "Reconnect needed"+msgstr "재연결 필요"++msgid "Reconnect with the account this connection already uses, or use Add account to connect the other one."+msgstr "이 연결이 이미 사용하는 계정으로 다시 연결하거나, 계정 추가로 다른 계정을 연결하세요."+msgid "Record"msgstr "기록"@@ -18833,9 +19097,16 @@ msgstr "레코드"msgid "Records and posted journals are being sent to and received from this provider."msgstr "기록 및 전기된 전표가 이 공급자에게 송수신되고 있습니다."+msgid "Records here appear as plain text — {appLabel} doesn't support links in this field."+msgstr "여기의 레코드들은 일반 텍스트로 표시됩니다 — {appLabel}은(는) 이 필드에서 링크를 지원하지 않습니다."+msgid "Records moved"msgstr "레코드 이동"+#. placeholder {0}: notice.params.equals+msgid "Records will be plain text. Set {siblingLabel} to {0} (under Advanced) to turn them into links."+msgstr "레코드는 일반 텍스트입니다. {siblingLabel}을(를) {0}(으)로 설정(고급에서)하면 링크로 변환할 수 있습니다."+msgid "Recost"msgstr "원가 재계산"@@ -19182,6 +19453,10 @@ msgstr "수령한 일련번호 및 배치 번호를 재고에서 제거"msgid "Remove this item"msgstr "이 항목 제거"+msgctxt "workflow data step"+msgid "Remove this operation"+msgstr "이 작업 제거"+msgid "Remove this storage type from all referencing storage units and delete it. This cannot be undone."msgstr "이 저장소 유형을 모든 참조 보관 단위에서 제거하고 삭제합니다. 이는 실행 취소할 수 없습니다."@@ -19216,6 +19491,9 @@ msgstr "이름 바꾸기"msgid "Rename Workflow"msgstr "워크플로우 이름 바꾸기"+msgid "Renamed"+msgstr "이름 변경됨"+msgid "Rendering label preview..."msgstr "라벨 미리보기 생성 중..."@@ -19381,6 +19659,12 @@ msgstr "조달 방식"msgid "Replies to emailed invoices go here, and it's copied on each one."msgstr "이메일로 발송한 송장에 대한 회신이 여기에 표시되며 각 송장에 복사됩니다."+msgid "Reply to Thread (Thread Message Link/Timestamp)"+msgstr "스레드에 회신(스레드 메시지 링크/타임스탬프)"++msgid "Reply-To Email"+msgstr "회신 주소"+msgid "Report"msgstr "보고서"@@ -19925,6 +20209,9 @@ msgstr "초대 취소"msgid "Revoke Invites"msgstr "초대 취소"+msgid "Revoked"+msgstr "취소됨"+msgid "Rework"msgstr "재작업"@@ -20699,6 +20986,9 @@ msgstr "공급업체 부품 검색"msgid "Search suppliers..."msgstr "공급업체 검색..."+msgid "Search Term"+msgstr "검색어"+msgid "Search tools..."msgstr "도구 검색..."@@ -20800,6 +21090,9 @@ msgstr "먼저 형태를 선택하여 가용 옵션을 확인하세요."msgid "Select a step to hide parts on it."msgstr "부품을 숨길 단계를 선택하세요."+msgid "Select a step…"+msgstr "단계 선택…"+msgid "Select a substance and shape first to see available options"msgstr "먼저 재질과 형태를 선택하여 가용 옵션을 확인하세요."@@ -20818,6 +21111,9 @@ msgstr "전체 선택"msgid "Select an action…"msgstr "작업 선택…"+msgid "Select an app…"+msgstr "앱 선택…"+msgid "Select an assignee"msgstr "담당자 선택"@@ -20842,6 +21138,9 @@ msgstr "작업 선택…"msgid "Select an option"msgstr "옵션 선택"+msgid "Select an option…"+msgstr "옵션 선택…"+msgid "Select at least one item to accept the quote"msgstr "견적서를 수락하려면 최소 하나의 품목을 선택하세요"@@ -20875,6 +21174,9 @@ msgstr "직원 선택"msgid "Select Employee Type"msgstr "직원 유형 선택"+msgid "Select event types"+msgstr "이벤트 유형 선택"+msgid "Select field"msgstr "필드 선택"@@ -20988,7 +21290,7 @@ msgid "Self Managed"msgstr "자체 관리"msgid "Self-hosted or managed"-msgstr "자체 호스팅 또는 관리형"+msgstr "자체 호스팅 또는 관리됨"msgid "Self-onboarding"msgstr "자체 온보딩"@@ -21026,6 +21328,9 @@ msgstr "초대 보내기"msgid "Send Invites"msgstr "초대 보내기"+msgid "Send Notifications"+msgstr "알림 보내기"+msgid "Send RFQ to Suppliers"msgstr "공급업체에 RFQ 전송"@@ -21035,6 +21340,12 @@ msgstr "Carbon에 보내기"msgid "Send Via"msgstr "전송 방법"+msgid "Sender Email"+msgstr "보낸이 이메일"++msgid "Sender Name"+msgstr "보낸이 이름"+msgid "Sending defective units back to an earlier operation to be corrected instead of scrapping them."msgstr "불량 유닛을 폐기하는 대신 이전 공정작업으로 되돌려 수정하는 것입니다."@@ -21802,6 +22113,18 @@ msgstr ""msgid "Slack"msgstr "Slack"+msgid "Slack: Create Channel"+msgstr "Slack: 채널 만들기"++msgid "Slack: Find User by Email"+msgstr "Slack: 이메일로 사용자 찾기"++msgid "Slack: Send Message To A Channel"+msgstr "Slack: 채널로 메시지 전송"++msgid "Slack: Send Message To A User"+msgstr "Slack: 사용자에게 메시지 전송"+msgid "Slice asset activity by location, item, or any dimension"msgstr "위치, 품목 또는 모든 차원별 자산 활동 분석"@@ -22041,6 +22364,9 @@ msgstr "시작일"msgid "Start Date"msgstr "시작일"+msgid "Start date time of the event"+msgstr "이벤트의 시작 날짜/시간"+msgid "Start Expiration"msgstr "유효기한 시작"@@ -22325,7 +22651,7 @@ msgid "Stripe"msgstr "Stripe"msgid "Stripe already has a customer with this email"-msgstr "Stripe에 이미 이 이메일을 가진 고객이 있습니다"+msgstr "Stripe에 이미 이 이메일 주소로 고객이 있습니다"msgid "Stripe Due Date"msgstr "스트라이프 마감일"@@ -22855,6 +23181,9 @@ msgstr "태그"msgid "Tailor this hub for the customer. Changes apply live for everyone viewing it. Never shown to the customer here."msgstr "이 허브를 고객에 맞게 조정하세요. 변경 사항은 이를 보는 모든 사람에게 즉시 적용됩니다. 이 화면은 고객에게 표시되지 않습니다."+msgid "Take one field from every item"+msgstr "각 항목에서 하나의 필드 가져오기"+msgid "Take out of service"msgstr "서비스 중지"@@ -22868,6 +23197,12 @@ msgstr "소유권 취득"msgid "Take Ownership: {0}"msgstr "소유권 취득: {0}"+msgid "Take the first item"+msgstr "첫 번째 항목 가져오기"++msgid "Take the last item"+msgstr "마지막 항목 가져오기"+msgid "Take the shortest remaining shelf life across the materials consumed to make this item. Use when the product's expiry depends on its ingredients."msgstr "이 품목을 만드는 데 소비되는 자재 중 가장 짧은 보존 기간을 사용합니다. 제품의 유통기한이 재료에 따라 결정될 때 사용합니다."@@ -23115,11 +23450,8 @@ msgstr ""msgid "Test run"msgstr "테스트 실행"-msgid "Test run — results are not saved to the Runs page"-msgstr "테스트 실행 - 결과가 실행 페이지에 저장되지 않습니다"--msgid "Test runs are not saved. Close this panel and the result is gone."-msgstr "테스트 실행은 저장되지 않습니다. 이 패널을 닫으면 결과가 사라집니다."+msgid "Test runs are saved to the run history, marked as tests."+msgstr "테스트 실행은 테스트로 표시되어 실행 이력에 저장됩니다."msgid "Test Value"msgstr "테스트 값"@@ -23127,9 +23459,36 @@ msgstr "테스트 값"msgid "Text size"msgstr "글자 크기"+msgid "That account is still being reconnected. Try again in a moment."+msgstr "해당 계정이 여전히 재연결 중입니다. 잠시 후 다시 시도하세요."++msgid "That account no longer exists"+msgstr "해당 계정이 더 이상 존재하지 않습니다"++msgid "That connection name is already used"+msgstr "해당 연결 이름은 이미 사용 중입니다"++msgid "That field holds a list of its own. Turn on flattening to take it."+msgstr "해당 필드에는 자체 목록이 있습니다. 가져오려면 평탄화를 켜세요."++msgid "That field holds several values, so they are combined into one list."+msgstr "해당 필드는 여러 값을 가지고 있으므로 하나의 목록으로 결합됩니다."++msgid "That integration is not available"+msgstr "해당 연동을 사용할 수 없습니다"++msgid "That list was empty."+msgstr "목록이 비어 있었습니다."+msgid "That name is already used by another step."msgstr "해당 이름은 이미 다른 단계에서 사용 중입니다."+msgid "That workspace is connected to another company"+msgstr "해당 작업 공간은 다른 회사에 연결되어 있습니다"++msgid "That's a different account"+msgstr "다른 계정입니다"+#. placeholder {0}: i18n._(step.title)msgid "The \"{0}\" phase checks itself off once all of its tasks in the project plan are done."msgstr "\"{0}\" 단계는 프로젝트 계획의 모든 작업이 완료되면 자동으로 완료 처리됩니다."@@ -23143,6 +23502,9 @@ msgstr "\"{0}\" 단계가 완료되었습니다 — \"{1}\" 체크포인트를msgid "The {0} phases to go live, each ending at a checkpoint. Tick off each task as you complete it."msgstr "도입까지 {0}단계이며, 각 단계는 체크포인트로 마무리됩니다. 완료한 작업은 체크 표시하세요."+msgid "The {appName} account this step uses is not available — it was disconnected or needs to be reconnected."+msgstr "이 단계에서 사용하는 {appName} 계정을 사용할 수 없습니다 — 연결이 끊어졌거나 재연결이 필요합니다."+msgid "The accent color used across Carbon."msgstr "Carbon 전체에서 사용하는 강조 색상"@@ -23158,6 +23520,9 @@ msgstr "Carbon이 자동으로 전기하는 계정"msgid "The action that copies a saved method (its materials, operations, and work instructions) onto a job or quote line."msgstr "저장된 방법(자재, 공정 및 작업 표준서)을 작업 지시 또는 견적 라인에 복사하는 동작입니다."+msgid "The address must be listed in your GMail account's settings"+msgstr "주소는 GMail 계정 설정에 나열되어야 합니다"+msgid "The allowed values for a list-type attribute; users pick from these rather than free-typing."msgstr "목록형 속성에 허용되는 값으로, 사용자는 직접 입력하는 대신 이 중에서 선택합니다."@@ -23179,6 +23544,9 @@ msgstr "자산이 사용 중인 분류로 이동하고 사용 개시 일자부msgid "The asset would have a negative cost. Check the purchase price."msgstr "자산의 원가가 음수가 될 것입니다. 구입 가격을 확인하세요."+msgid "The authorization took too long or came back altered. Start the connection again from this page."+msgstr "인증이 너무 오래 걸렸거나 변경되어 돌아왔습니다. 이 페이지에서 연결을 다시 시작하세요."+msgid "The authorization was refused in Onshape. Save the integration settings to try again."msgstr "Onshape에서 인증이 거부되었습니다. 연동 설정을 저장하여 다시 시도하세요."@@ -23188,6 +23556,9 @@ msgstr "Onshape에서 인증이 거부되었습니다. 다시 연결해 보세msgid "The authorization was refused in Ramp. Try connecting again."msgstr "Ramp에서 인증이 거부되었습니다. 다시 연결해 보세요."+msgid "The authorization was rejected"+msgstr "인증이 거부되었습니다"+msgid "The average cost of the item. Changing it needs permission to edit parts."msgstr "품목의 평균 원가입니다. 변경하려면 부품을 편집할 권한이 필요합니다."@@ -23291,6 +23662,12 @@ msgstr "회사에 이미 전기된 개시잔액 전표가 있습니다."msgid "The company has no account defaults."msgstr "회사에 계정 기본값이 없습니다."+msgid "The connection could not be verified"+msgstr "연결을 확인할 수 없습니다"++msgid "The connection was refused"+msgstr "연결이 거부되었습니다"+msgid "The contract cannot be cancelled then"msgstr "그때는 계약을 취소할 수 없습니다."@@ -23556,6 +23933,9 @@ msgstr "워크플로우의 웹훅 단계가 게시하는 https 주소입니다.msgid "The human-readable document number (like J000001 or ECO-000001) minted from a sequence and stored on the record, distinct from its internal id."msgstr "채번 규칙에서 발행되고 레코드에 저장된 사람이 읽을 수 있는 문서 번호(예: J000001 또는 ECO-000001)로, 내부 ID와 구별됩니다."+msgid "The icon emoji of the bot"+msgstr "봇의 아이콘 이모지"+msgid "The identifier the customer uses for this part on their POs; Carbon resolves it to our internal Part ID on order import."msgstr "고객이 발주서에서 이 부품에 사용하는 식별자이며, Carbon은 주문 가져오기 시 이를 내부 부품 ID로 확인합니다."@@ -23577,6 +23957,9 @@ msgstr "이 공급업체로부터의 출하에서 운송비 지불자, 리스크msgid "The Incoterm rule (FOB, DAP, EXW, CIF, …) that governs who pays freight, who bears risk, and where the transfer of title occurs on shipments to this customer."msgstr "이 고객으로의 출하에서 운송비 지불자, 리스크 부담자 및 소유권 이전 지점을 결정하는 인코텀즈 규칙(FOB, DAP, EXW, CIF, …)입니다."+msgid "The integration authorized the connection but saving it failed. Try connecting again."+msgstr "통합이 연결을 승인했지만 저장하지 못했습니다. 다시 연결해 보세요."+msgid "The inventory cost recognized when a shipment posts, valued by the item's costing method."msgstr "출하가 전기될 때 인식되는 재고 원가로, 품목의 원가 계산 방법에 따라 평가됩니다."@@ -23592,6 +23975,15 @@ msgstr "각 작업 지시가 생산하는 품목 — 출력 로트를 병합하msgid "The item's rental rate"msgstr "품목의 임차료"+msgid "The items in that list have no field by that name."+msgstr "해당 목록의 항목에는 그 이름의 필드가 없습니다."++msgid "The items in that list have no fields to take."+msgstr "해당 목록의 항목에는 가져올 필드가 없습니다."++msgid "The items in that list have no reading as text."+msgstr "해당 목록의 항목은 텍스트로 읽을 수 없습니다."+msgid "the job hours due that day (a due-date basis, not the day the work runs), with overdue work in Past due."msgstr "그 날에 마감될 작업 지시 시간(작업이 실행되는 날이 아닌 마감일 기준)이며, 기한 초과 작업은 기한 초과 섹션에 표시됩니다."@@ -23885,6 +24277,9 @@ msgstr "이 유지보수가 수행될 때 기술자가 따르는 절차서로,msgid "The processes this work center can run; appears in process-pickers when scheduling operations, and limits which jobs can route through this work center."msgstr "이 작업장이 실행할 수 있는 공법으로, 공정 일정 시 공법 선택기에 표시되며, 이 작업장을 통해 라우팅할 수 있는 작업 지시를 제한합니다."+msgid "The profile picture of the bot"+msgstr "봇의 프로필 사진"+msgid "The provider offers no dimension targets. Enable the feature in the provider first (e.g. tracking categories, class tracking, or fields)."msgstr "제공자가 차원 대상을 제공하지 않습니다. 먼저 제공자에서 기능을 활성화하세요(예: 추적 카테고리, 클래스 추적 또는 필드)."@@ -23986,12 +24381,12 @@ msgstr "Onshape의 응답에 필수 매개변수가 없습니다. 다시 연결msgid "The response from Ramp was missing required parameters. Try connecting again."msgstr "Ramp 응답에 필수 매개변수가 없습니다. 다시 연결해 보세요."+msgid "The response was missing required parameters. Try connecting again."+msgstr "응답에 필수 매개변수가 누락되었습니다. 다시 연결해 보세요."+msgid "The restore job reported this error."msgstr "복원 작업이 이 오류를 보고했습니다."-msgid "The result will not appear on the Runs page."-msgstr "결과는 실행 페이지에 나타나지 않습니다."-msgid "The revision number of the part"msgstr "품목의 리비전 번호"@@ -24139,6 +24534,9 @@ msgstr "회사가 인원의 로그인을 관리하기 위해 사용하는 시스msgid "The system passes every in-scope acceptance test in your configured system, with your data; the data is validated; and you sign off. Then go-live."msgstr "설정된 시스템에서 귀사 데이터로 범위 내 모든 인수 테스트를 통과하고, 데이터가 검증되며, 귀사가 최종 승인합니다. 그다음 실제 가동을 시작합니다."+msgid "The text of your message. When using Block Kit blocks, this is used as a fallback for notifications."+msgstr "메시지의 텍스트입니다. Block Kit 블록을 사용할 때 알림의 폴백으로 사용됩니다."+msgid "The thread linking a sales RFQ, its quote, and the resulting sales order — a join, not a document with its own status."msgstr "영업 견적 요청, 그 견적서, 그리고 결과 수주를 연결하는 스레드입니다. 자체 상태가 있는 문서가 아니라 조인입니다."@@ -24220,6 +24618,9 @@ msgstr ""msgid "The US tax depreciation system with IRS property-class tables, run as a separate tax schedule alongside the book schedule."msgstr "미국 세금 감가상각 시스템으로, IRS 자산 클래스 테이블과 함께 별도의 세금 스케줄로 실행됩니다."+msgid "The username of the bot"+msgstr "봇의 사용자명"+msgid "The users in this group; group-scoped permissions and notifications apply to each member, and users may belong to multiple groups (effective permissions are the union)."msgstr "이 그룹에 속한 사용자입니다. 그룹 범위의 권한과 알림이 각 구성원에게 적용되며, 사용자는 여러 그룹에 속할 수 있습니다(유효 권한은 합집합입니다)."@@ -24352,6 +24753,11 @@ msgstr "이들은 귀사의 계정과목표에 없지만 문서 또는 전표에msgid "this ability"msgstr "이 역량"+msgid "This account has stopped working. Reconnect it — workflow steps using it will fail until you do."+msgstr "이 계정이 작동을 멈췄습니다. 재연결하세요 — 워크플로 단계가 실패할 때까지."++msgid "This account needs to be reconnected."+msgstr "이 계정을 재연결해야 합니다."msgid "This action cannot run on this list."msgstr ""@@ -24384,6 +24790,9 @@ msgstr "이후에는 변경할 수 없습니다 — {integrationName}은(는)msgid "This cannot be undone."msgstr "이 작업을 취소할 수 없습니다."+msgid "This Carbon instance is missing its OAuth credentials for this integration. Ask an administrator to set them."+msgstr "이 Carbon 인스턴스는 이 통합을 위한 OAuth 자격증명이 누락되었습니다. 관리자에게 설정해달라고 요청하세요."+msgid "This Carbon instance is missing its Onshape OAuth credentials. Ask an administrator to set them."msgstr "이 Carbon 인스턴스에 Onshape OAuth 자격 증명이 없습니다. 관리자에게 설정을 요청하세요."@@ -24442,9 +24851,15 @@ msgstr "이 정보는 모든 사용자에게 표시되므로 공유할 내용을msgid "this inspection plan"msgstr "이 검사 계획"+msgid "This integration can't be connected on this Carbon instance."+msgstr "이 Carbon 인스턴스에서는 이 연동을 연결할 수 없습니다."+msgid "This integration isn't available yet"msgstr "이 연동은 아직 사용할 수 없습니다"+msgid "This integration isn't configured"+msgstr "이 통합이 구성되지 않았습니다"+#. placeholder {0}: company?.name ?? "Carbon"msgid "This invitation to join {0} has expired. You can request a new invite to be sent to your email."msgstr "이 {0}에 가입하라는 초대가 만료되었습니다. 새 초대를 이메일로 보내달라고 요청할 수 있습니다."@@ -24627,6 +25042,9 @@ msgstr "이 작업장은 역량 게이트 작업을 실행합니다 — 자격msgid "This station runs work with no ability requirement; operators assigned on the manning board shape available labor."msgstr "이 스테이션은 역량 요구사항이 없는 작업을 실행합니다. 인력 배치 보드에서 할당된 작업자는 가용 노무를 형성합니다."+msgid "This step expected a list."+msgstr "이 단계에는 목록이 필요합니다."+msgid "This step is part of it"msgstr "이 단계는 그것의 일부입니다"@@ -24817,6 +25235,9 @@ msgstr "빠듯함"msgid "Tightened"msgstr "까다로운 검사"+msgid "Time"+msgstr "시간"+msgid "Time and dollar utilization of the rental fleet by asset and class"msgstr "자산 및 클래스별 임차 자산의 시간 및 달러 이용률"@@ -24862,6 +25283,9 @@ msgstr "몸 쪽으로 기울이기"msgid "Title"msgstr "제목"+msgid "Title of the event"+msgstr "이벤트의 제목"+msgid "Title passes to the customer when the term ends."msgstr "약관이 종료되면 소유권이 고객에게 이전됩니다."@@ -24967,6 +25391,14 @@ msgstr "허용치 (일)"msgid "Tomorrow"msgstr "내일"+msgid "Took {took} values; kept the first {kept}."+msgstr "값 {took}개를 가져왔고 처음 {kept}개를 유지했습니다."++msgid "Took the first of {total}."+msgstr "{total}개 중 첫 번째를 가져왔습니다."++msgid "Took the last of {total}."+msgstr "{total}개 중 마지막을 가져왔습니다."msgid "Too many exports and bulk actions are running right now. Try again in a few minutes."msgstr "현재 실행 중인 내보내기와 일괄 작업이 너무 많습니다. 몇 분 후에 다시 시도하세요."@@ -25298,6 +25730,9 @@ msgstr "트리거"msgid "Try a different name."msgstr "다른 이름을 시도하세요."+msgid "Try again"+msgstr "다시 시도"+msgid "Tuesday"msgstr "화요일"@@ -25368,6 +25803,9 @@ msgstr "계속하려면 <0>\"{confirmPhrase}\"</0>를 입력하세요."msgid "Type a message..."msgstr "메시지를 입력하세요..."+msgid "Type a value and press Enter…"+msgstr "값을 입력하고 Enter를 누르세요…"+msgid "Type an email and press Enter to add an external recipient"msgstr "이메일을 입력하고 Enter 키를 눌러 외부 수신자를 추가하세요"@@ -25449,6 +25887,9 @@ msgstr "남은 개월이 부과할 이자를 제외한, 아직 올 할인되지msgid "Undo"msgstr "실행 취소"+msgid "Unfurl Links"+msgstr "링크 펼치기"+msgid "Ungroup"msgstr "그룹 해제"@@ -25969,6 +26410,9 @@ msgstr "사용자 권한"msgid "User roles"msgstr "사용자 역할"+msgid "Username"+msgstr "사용자명"+msgid "users"msgstr "사용자"@@ -26753,6 +27197,9 @@ msgstr "켜면 이 가격 재정의가 일치하는 주문에 적용됩니다.msgid "When on, this rule fires for every target of its type. Assignment rows are ignored but preserved."msgstr "켜면 이 규칙이 해당 유형의 모든 대상에 대해 적용됩니다. 배정 행은 무시되지만 보존됩니다."+msgid "When replying to a thread, also make the message visible to everyone in the channel (only applicable when Thread Timestamp is provided)"+msgstr "스레드에 회신할 때 채널의 모든 사람이 메시지를 볼 수 있도록 합니다(스레드 타임스탬프가 제공된 경우에만 적용)"+msgid "When supplier responses are expected back; suppliers see this date on the RFQ portal and Carbon stops accepting late responses after it (configurable)."msgstr "공급업체 응답이 도착할 것으로 예상되는 시점입니다. 공급업체는 RFQ 포털에서 이 날짜를 확인하며, Carbon은 이 날짜 이후의 지연 응답을 받지 않습니다(설정 가능)."@@ -26924,6 +27371,9 @@ msgstr "이 작업이 생산을 차단(Down)하는지, 성능을 저하(영향)msgid "Whether to Add the selected permissions on top of what each user already has, or Update by replacing each user's permission set wholesale with the selection below."msgstr "선택한 권한을 각 사용자가 이미 가진 권한에 추가할지(추가), 아래 선택 항목으로 각 사용자의 권한 세트를 완전히 교체할지(업데이트) 여부입니다."+msgid "Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves."+msgstr "반복 이벤트를 개별 인스턴스로 펼쳐, 기본 반복 이벤트 자체는 제외하고 일회성 이벤트와 반복 이벤트의 인스턴스만 반환할지 여부입니다."+msgid "Which document drives each inspection flow for this item."msgstr "이 항목에 대한 각 검사 흐름을 운영하는 문서입니다."@@ -27227,6 +27677,9 @@ msgstr "둘 이상의 회사에 속해 있습니다. 작업할 회사를 선택msgid "You can change the UI style any time through the theme setting"msgstr "테마 설정을 통해 언제든지 UI 스타일을 변경할 수 있습니다"+msgid "You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.'"+msgstr "채널을 마우스 오른쪽 버튼으로 클릭하고 '채널 세부정보 보기'를 선택하여 채널 ID를 얻을 수 있습니다."+msgid "You can only see this key once. Store it safely."msgstr "이 키는 한 번만 확인할 수 있습니다. 안전하게 보관하세요."@@ -27278,6 +27731,9 @@ msgstr "귀사가 주도"msgid "You name a project owner with decision authority"msgstr "의사결정 권한이 있는 프로젝트 책임자를 지정합니다"+msgid "You need permission to edit workflows to load these choices."+msgstr "이 선택 항목을 불러오려면 워크플로우 편집 권한이 필요합니다."+msgid "You received this item"msgstr "이 품목을 입고받았습니다"diff --git a/packages/locale/locales/ko/mes.po b/packages/locale/locales/ko/mes.poindex e40e55bd6d..9ee0175d71 100644--- a/packages/locale/locales/ko/mes.po+++ b/packages/locale/locales/ko/mes.po@@ -113,6 +113,9 @@ msgstr "이전 완료가 완료되지 않았습니다. 다시 시도하면 남msgid "About"msgstr "정보"+msgid "About this field"+msgstr "이 필드에 대해"+msgid "Accept"msgstr "수락"@@ -1234,6 +1237,9 @@ msgstr "오늘 예정된 유지보수가 없습니다"msgid "No matches. Type to create one."msgstr "일치항목이 없습니다. 입력하여 새로 만드세요."+msgid "No matching time"+msgstr "일치하는 시간 없음"+msgid "No materials"msgstr "자재 없음"@@ -2144,6 +2150,9 @@ msgstr "썸네일"msgid "Tick the jobs this was done for."msgstr "이것이 수행된 작업 지시를 체크하세요."+msgid "Time"+msgstr "시간"+msgid "Time and cost split across jobs proportionally to quantity."msgstr "시간과 원가는 수량에 비례하여 작업 지시 간에 배분됩니다."diff --git a/packages/locale/locales/pl/erp.po b/packages/locale/locales/pl/erp.poindex dfce196eef..71bfe70d32 100644--- a/packages/locale/locales/pl/erp.po+++ b/packages/locale/locales/pl/erp.po@@ -269,6 +269,10 @@ msgstr "{0} faktur zostało zafakturowanych w poprzednim systemie i nie są twormsgid "{0} is {1}, not Draft or Planned"msgstr ""+#. placeholder {0}: integration.name+msgid "{0} isn't installed yet. There's nothing to configure — install it to connect an account."+msgstr "{0} nie jest jeszcze zainstalowany. Nie ma nic do skonfigurowania — zainstaluj go, aby połączyć konto."+#. placeholder {0}: data.quantitymsgid "{0} items marked as picked"msgstr ""@@ -481,6 +485,12 @@ msgstr "{alreadyPlannedItemCount} części pominięto — już mają otwarte zlemsgid "{apOverduePct}% of payables"msgstr "{apOverduePct}% zobowiązań"+msgid "{appName} is connected, but needs to be reconnected before workflow steps can use it."+msgstr "{appName} jest połączony, ale musi zostać ponownie połączony zanim kroki Przepływu pracy będą mogły go używać."++msgid "{appName} isn't connected yet. Connect an account before this step can do anything."+msgstr "{appName} nie jest jeszcze połączony. Przed wykonaniem tego kroku połącz konto."+msgid "{arOverduePct}% of receivables"msgstr "{arOverduePct}% należności"@@ -594,6 +604,9 @@ msgstr "{inserted} wstawiono, {updated} zaktualizowano, {0} wymagają naprawy, {msgid "{jobsMissingStorageUnit, plural, one {# open job has materials with no storage unit} other {# open jobs have materials with no storage unit}}"msgstr "{jobsMissingStorageUnit, plural, one {# otwarte zlecenie produkcyjne ma materiały bez jednostki magazynowej} other {# otwarte zlecenia produkcyjne mają materiały bez jednostki magazynowej}}"+msgid "{kept, plural, one {Took # value.} other {Took # values.}}"+msgstr "{kept, plural, one {Pobrano # wartość.} few {Pobrano # wartości.} many {Pobrano # wartości.} other {Pobrano # wartości.}}"+msgid "{label} is used by documents, journals or default accounts, so it cannot be deleted."msgstr "{label} jest używany w dokumentach, dowodach księgowych lub domyślnych kontach, dlatego nie można go usunąć."@@ -746,6 +759,9 @@ msgstr "{state} · zsynchronizowano {syncedAgo}"msgid "{termMonths, plural, one {# month} other {# months}}"msgstr "{termMonths, plural, one {# miesiąc} other {# miesięcy}}"+msgid "{total, plural, one {Joined # value.} other {Joined # values.}}"+msgstr "{total, plural, one {Połączono # wartość.} few {Połączono # wartości.} many {Połączono # wartości.} other {Połączono # wartości.}}"+msgid "{total} phases to get your company live on Carbon. Each one ends at a checkpoint."msgstr "{total} faz do uruchomienia Twojej firmy na Carbon. Każda kończy się punktem kontrolnym."@@ -1651,6 +1667,9 @@ msgstr "Użytkownik notuje termin ważności dla każdej partii produkcyjnej lubmsgid "A variable charge — mileage overage, damage, delivery, cleaning — is billed on the agreement's next invoice."msgstr "Zmienna opłata — przejazd nadmiarowy, uszkodzenie, dostawa, czyszczenie — jest rozliczana na następnej fakturze umowy."+msgid "A workspace can be connected to one Carbon company only. Disconnect it there first, or connect a different workspace."+msgstr "Przestrzeń roboczą można połączyć tylko z jedną firmą w Carbon. Najpierw ją tam rozłącz albo połącz inną przestrzeń roboczą."+msgid "ABA"msgstr "ABA"@@ -1672,6 +1691,9 @@ msgstr "O mnie"msgid "About (notification)"msgstr "Informacje (powiadomienie)"+msgid "About this field"+msgstr "Informacje o tym polu"+msgid "Absent"msgstr "Nieobecny"@@ -1838,6 +1860,9 @@ msgstr ""msgid "Accounts receivable for amounts owed by customers"msgstr "Należności za kwoty należne od klientów"+msgid "Accounts your workflows can act as. Add one for each account a workflow step should use."+msgstr "Konta, na których mogą działać Twoje przepływy pracy. Dodaj jedno dla każdego konta, które powinien użyć krok przepływu pracy."+msgid "Accrual"msgstr "Naliczenie"@@ -2055,6 +2080,9 @@ msgstr "Dodaj krok lub pytanie"msgid "Add Ability"msgstr "Dodaj Umiejętność"+msgid "Add account"+msgstr "Dodaj konto"+msgid "Add Account"msgstr "Dodaj konto"@@ -2196,6 +2224,10 @@ msgstr "Dodaj miesiąc"msgid "Add Note"msgstr "Dodaj notatkę"+msgctxt "workflow data step"+msgid "Add operation"+msgstr "Dodaj operację"+msgid "Add Operation"msgstr "Dodaj operację"@@ -2434,6 +2466,9 @@ msgstr "Przejdź do {nextStatus}"msgid "Advanced"msgstr "Zaawansowane"+msgid "Advanced properties"+msgstr "Zaawansowane właściwości"+msgid "Affected item not found."msgstr "Element dotknięty zmianą nie został znaleziony."@@ -2657,6 +2692,12 @@ msgstr "Kwoty pokazują tylko cyfry, które mają wartość."msgid "An ability is a process's qualification. Only processes without one are listed."msgstr "Umiejętność to kwalifikacja procesu. Wyświetlane są tylko procesy bez niej."+msgid "An account is already called that — pick a different name."+msgstr "Konto o tej nazwie już istnieje — wybierz inną nazwę."++msgid "An account is missing from this list until it is reconnected."+msgstr "Konto brakuje z tej listy do czasu ponownego połączenia."+msgid "An accounting bucket that groups expenses by department or function so the GL can report spend by group, not just by account."msgstr "Kategoria księgowości, która grupuje wydatki według działu lub funkcji, aby Księga główna mogła raportować wydatki według grupy, a nie tylko według konta."@@ -2822,6 +2863,9 @@ msgstr "Podczas łączenia się z Onshape wystąpił nieoczekiwany błąd. Zapismsgid "An unexpected error occurred while connecting to Onshape. Try connecting again."msgstr "Podczas łączenia z Onshape wystąpił nieoczekiwany błąd. Spróbuj połączyć się ponownie."+msgid "An unexpected error occurred while connecting. Try connecting again."+msgstr "Podczas łączenia wystąpił nieoczekiwany błąd. Spróbuj połączyć się ponownie."+msgid "Analytics"msgstr "Analityka"@@ -2839,9 +2883,6 @@ msgstr "I {0} więcej — rozwiąż te, aby zobaczyć resztę."msgid "And {0} more. Resolve these to see the rest."msgstr "I {0} więcej. Rozwiąż te, aby zobaczyć resztę."-msgid "and {hidden} more"-msgstr "i {hidden} więcej"-msgid "and {remaining} more"msgstr "i {remaining} więcej"@@ -2878,6 +2919,9 @@ msgstr "Roczna stawka, po której czynsz jest dyskontowany"msgid "Annual. Starts from the company's incremental borrowing rate"msgstr "Rocznie. Zaczyna się od przyrostowej stopy oprocentowania firmy."+msgid "Another connection to this integration already has that name. Choose a different one."+msgstr "Inne połączenie tej integracji ma już tę nazwę. Wybierz inną."+msgid "Another cost center this one rolls up into, letting you nest a sub-department under its parent for hierarchical cost reporting."msgstr "Inne miejsce powstawania kosztów, w które się to sumuje, pozwalające na zagnieżdżenie podrzędnego działu pod jego jednostką nadrzędną dla hierarchicznego raportowania kosztów."@@ -2948,6 +2992,9 @@ msgid "API keys for programmatic access to your Carbon data."msgstr "Klucze API do programowego dostępu do danych Carbon."msgid "API, webhooks, and integrations"+msgstr "API, webhooki i integracje"++msgid "App"msgstr "API, webhooks i integracje"msgid "Appearance"@@ -3882,6 +3929,9 @@ msgstr "Nie można załadować załączników"msgid "Attempts"msgstr "Próby"+msgid "Attendees"+msgstr "Uczestnicy"+msgid "Attribute"msgstr "Atrybut"@@ -3924,6 +3974,9 @@ msgstr "Aplikacja Authenticator"msgid "Authenticator QR code"msgstr "Kod QR authenticatora"+msgid "Authorization was refused. Try connecting again."+msgstr "Autoryzacja została odrzucona. Spróbuj połączyć się ponownie."+msgid "Authorized overtime on top of the shift"msgstr "Autoryzowane nadgodziny na dodatek do zmiany"@@ -3984,6 +4037,9 @@ msgstr "Automatyczne aktualizacje i kopie zapasowe"msgid "Automatic, prorated consumption of a job's untracked materials when output is reported — tracked materials are issued manually."msgstr "Automatyczne, proporcjonalne zużycie materiałów nieparowanych pracy po zgłoszeniu wydajności — materiały śledzone są wydawane ręcznie."+msgid "Automatically create a Google Meet video conference link for this event"+msgstr "Automatycznie utwórz link do konferencji Google Meet dla tego zdarzenia"+msgid "Automatically release the job when the kanban is scanned"msgstr "Automatycznie zwolnij zadanie po zeskanowaniu kanban"@@ -4193,6 +4249,9 @@ msgstr "Partie do zwrotu"msgid "Batching"msgstr "Tworzenie Partii Produkcyjnych"+msgid "BCC Email"+msgstr "E-mail UDW"+msgid "Becomes"msgstr "Staje się"@@ -4370,6 +4429,12 @@ msgstr "Tablica"msgid "Body"msgstr "Treść"+msgid "Body for the email you want to send"+msgstr "Treść wiadomości e-mail, którą chcesz wysłać"++msgid "Body Type"+msgstr "Typ treści"+msgid "BoM"msgstr "BoM"@@ -4427,6 +4492,9 @@ msgstr "Nawigacja"msgid "Bring in your parts, BOMs, Bill of Process, and costing — with Carbon's import tools, CSV, or LLM help."msgstr "Wprowadź swoje części, BOMy, Listy operacji i kalkulacje kosztów — za pomocą narzędzi importu Carbon, CSV lub pomocy LLM."+msgid "Broadcast reply to channel"+msgstr "Wyślij odpowiedź na kanał"+msgid "Browse library"msgstr "Przeglądaj bibliotekę"@@ -4513,6 +4581,9 @@ msgstr ""msgid "By accepting the invite, you agree to the <0>Terms of Service</0> and <1>Privacy Policy</1>."msgstr "Akceptując zaproszenie, zgadzasz się na <0>Warunki Usługi</0> i <1>Politykę Prywatności</1>."+msgid "By default it'll be 30 min post start time"+msgstr "Domyślnie będzie to 30 minut po czasie rozpoczęcia"+msgid "By dimension"msgstr "Wg wymiaru"@@ -4881,6 +4952,9 @@ msgstr "Powodujący przebieg: "msgid "CC"msgstr "DW"+msgid "CC Email"+msgstr "E-mail DW"+msgid "Centralized Billing Address"msgstr "Scentralizowany adres rozliczeniowy"@@ -4998,6 +5072,12 @@ msgstr "Zmiana tego zaktualizuje identyfikator części"msgid "Changing type resets this item's draft edits."msgstr "Zmiana typu resetuje zmiany wersji roboczej tego artykułu."+msgid "Channel"+msgstr "Kanał"++msgid "Channel Name"+msgstr "Nazwa kanału"+msgid "Characteristic"msgstr "Charakterystyka"@@ -5078,6 +5158,9 @@ msgstr "Punkt kontrolny ·"msgid "Checkpoints"msgstr "Punkty kontrolne"+msgid "Choose {named} first."+msgstr "Najpierw wybierz {named}."+msgid "Choose a backup"msgstr "Wybierz kopię zapasową"@@ -5333,6 +5416,9 @@ msgstr "Zwiń Setup"msgid "Collapse subtree"msgstr "Zwiń poddrzewo"+msgid "Color"+msgstr "Kolor"+#. placeholder {0}: index + 1msgid "Column {0} of {count}"msgstr "Kolumna {0} z {count}"@@ -5594,6 +5680,9 @@ msgstr "Skonfiguruj domyślne konta używane dla różnych typów transakcji w cmsgid "Configure the start months for your fiscal and tax years"msgstr "Skonfiguruj miesiące rozpoczęcia dla lat obrachunkowych i podatkowych"+msgid "Configure the steps above first."+msgstr "Najpierw skonfiguruj kroki powyżej."+msgid "Configure when purchased item costs should be updated from supplier transactions."msgstr "Skonfiguruj, kiedy koszty zakupionych pozycji powinny być aktualizowane z transakcji dostawcy."@@ -5690,6 +5779,9 @@ msgstr "Powód konfliktu"msgid "Connect"msgstr "Połącz"+msgid "Connect {appName}"+msgstr "Połącz {appName}"+msgid "Connect Carbon to your accounting, project management, and CAD tools and much more."msgstr "Połącz Carbon ze swoimi narzędziami księgowości, zarządzania projektami, CAD i wieloma innymi."@@ -5717,9 +5809,18 @@ msgstr "Połącz zewnętrzne narzędzia, które Twoja firma już wykorzystuje"msgid "Connect your identity provider by pasting either its metadata URL or its raw metadata XML — exactly one of the two."msgstr "Połącz dostawcę tożsamości, wklejając adres URL jego metadanych lub surowy kod XML metadanych — dokładnie jeden z nich."+msgid "Connected before workflows needed extra permissions. Reconnect to grant them — everything else keeps working meanwhile."+msgstr "Połączone przed Przepływami pracy wymagały dodatkowych uprawnień. Ponownie połącz, aby je przyznać — wszystko inne będzie działać w międzyczasie."+msgid "Connected to"msgstr "Połączono z"+msgid "Connection"+msgstr "Połączenie"++msgid "Connection name"+msgstr "Nazwa połączenia"+msgid "Console Mode"msgstr "Tryb konsoli"@@ -6336,6 +6437,12 @@ msgstr "Nie można było zwolnić {0}: {1}"msgid "Could not save"msgstr "Nie można było zapisać"+msgid "Couldn't check whether {appName} is connected."+msgstr "Nie można sprawdzić, czy {appName} jest połączony."++msgid "Couldn't complete the connection"+msgstr "Nie można ukończyć połączenia"+msgid "Couldn't complete the Onshape connection"msgstr "Nie udało się ukończyć połączenia z Onshape"@@ -6351,12 +6458,18 @@ msgstr "Nie udało się wczytać kolejnych wierszy"msgid "Couldn't load related documents. Refresh before creating a new one to avoid duplicates."msgstr "Nie można załadować powiązanych dokumentów. Odśwież przed utworzeniem nowego, aby uniknąć duplikatów."+msgid "Couldn't load the choices for this field."+msgstr "Nie można było załadować opcji dla tego pola."+msgid "Couldn't load the provider's dimension targets — check the connection and reload."msgstr "Nie udało się załadować celów wymiarów dostawcy — sprawdź połączenie i przeładuj stronę."msgid "Couldn't reschedule the job. Please try again."msgstr "Nie można przeplanować zadania. Spróbuj ponownie."+msgid "Couldn't save the connection"+msgstr "Nie można zapisać połączenia"+msgid "Couldn't save the Onshape connection"msgstr "Nie udało się zapisać połączenia z Onshape"@@ -6366,6 +6479,12 @@ msgstr "Nie udało się zapisać połączenia Onshape Government"msgid "Couldn't save the Ramp connection"msgstr "Nie udało się zapisać połączenia z Ramp"+msgid "Couldn't start the {name} connection"+msgstr "Nie można rozpocząć połączenia z {name}"++msgid "Couldn't start the authorization."+msgstr "Nie można rozpocząć autoryzacji."+msgid "Count"msgstr "Liczba"@@ -6375,6 +6494,12 @@ msgstr "Historia Liczenia"msgid "Count ID"msgstr "ID Liczenia"+msgid "Count items"+msgstr "Policz elementy"++msgid "Counted {total}."+msgstr "Policzono: {total}."+msgid "Counted Qty"msgstr "Zliczona ilość"@@ -6479,6 +6604,9 @@ msgstr "Utwórz umowę"msgid "Create Forecast"msgstr "Utwórz prognozę"+msgid "Create Google Meet Link"+msgstr "Utwórz link do Google Meet"+msgid "Create Issue"msgstr "Utwórz problem"@@ -7116,6 +7244,9 @@ msgstr "Data"msgid "Date Acquired"msgstr "Data nabycia"+msgid "Date and time"+msgstr "Data i godzina"+msgid "Date Calibrated"msgstr "Data kalibracji"@@ -7125,6 +7256,9 @@ msgstr "Data wymagalności"msgid "Date Due"msgstr "Data wymagalności"+msgid "Date from"+msgstr "Data od"+msgid "Date issued"msgstr "Data wydania"@@ -7137,6 +7271,9 @@ msgstr "Data płatności"msgid "Date Paid"msgstr "Data zapłaty"+msgid "Date to"+msgstr "Data do"+msgid "Dates"msgstr "Daty"@@ -8006,6 +8143,9 @@ msgstr "Opis Zmiany"msgid "Description of Issue"msgstr "Opis problemu"+msgid "Description of the event. You can use HTML tags here."+msgstr "Opis zdarzenia. Tutaj możesz używać znaczników HTML."+msgid "Detach"msgstr "Odłącz"@@ -8111,6 +8251,9 @@ msgstr "Odrzucono"msgid "Disconnect"msgstr "Rozłącz"+msgid "Disconnected"+msgstr "Rozłączono"+msgid "Discontinuation date"msgstr "Data wycofania"@@ -9071,6 +9214,9 @@ msgstr "E-mail"msgid "Email Address"msgstr "Adres e-mail"+msgid "Email address to set as the \"Reply-To\" header"+msgstr "Adres e-mail do ustawienia jako nagłówek \"Odpowiedź do\""+msgid "Email Domains"msgstr "Domeny e-mail"@@ -9086,6 +9232,9 @@ msgstr "Wysłane e-mailem"msgid "Emails"msgstr "Wiadomości e-mail"+msgid "Emails of the attendees (guests)"+msgstr "Adresy e-mail uczestników (gości)"+msgid "Emoji"msgstr "Emoji"@@ -9155,6 +9304,9 @@ msgstr "Włącz cyfrowe oferty dla swojej firmy. Umożliwi to wysyłanie cyfrowymsgid "Enable in Settings"msgstr "Włącz w Ustawieniach"+msgid "Enable link unfurling for this message"+msgstr "Włącz rozwijanie linków dla tej wiadomości"+msgid "Enable notifications when a sales rule violation is blocked or acknowledged on a quote, sales order, or sales invoice."msgstr "Włącz powiadomienia, gdy naruszenie reguły sprzedaży zostanie zablokowane lub potwierdzone na ofercie, zamówieniu sprzedaży lub fakturze sprzedaży."@@ -9236,6 +9388,9 @@ msgstr "Koniec"msgid "End Date"msgstr "Data końcowa"+msgid "End date time of the event"+msgstr "Data i godzina zakończenia zdarzenia"+msgid "End Line"msgstr "Zakończ pozycję"@@ -9568,6 +9723,9 @@ msgstr ""msgid "Event Type"msgstr "Typ zdarzenia"+msgid "Event types"+msgstr "Typy zdarzeń"+msgid "Events"msgstr "Zdarzenia"@@ -9746,6 +9904,9 @@ msgstr "Rozwiń pozycję"msgid "Expand Machine"msgstr "Rozwiń Maszynę"+msgid "Expand Recurring Event?"+msgstr "Rozwinąć zdarzenia cykliczne?"+msgid "Expand row"msgstr "Rozwiń wiersz"@@ -10584,6 +10745,9 @@ msgstr "Napraw to w plikach, a następnie prześlij je ponownie"msgid "Fix these jobs before releasing"msgstr "Napraw te zlecenia produkcyjne przed zwolnieniem"+msgid "Fix this"+msgstr "Napraw to"+msgid "Fixed"msgstr "Stałe"@@ -11052,6 +11216,12 @@ msgstr "Wyrównanie Księgi głównej"msgid "GL Tie-Out"msgstr "Wyrównanie Księgi Głównej"+msgid "Gmail"+msgstr "Gmail"++msgid "Gmail: Send Email"+msgstr "Gmail: Wyślij e-mail"+msgid "Go live right the first time — with our team alongside you"msgstr "Wdrażaj bez błędów za pierwszym razem — z naszym zespołem u boku"@@ -11107,6 +11277,15 @@ msgstr "Dobrego wieczoru, {name}."msgid "Good morning, {name}."msgstr "Dzień dobry, {name}."+msgid "Google Calendar"+msgstr "Google Calendar"++msgid "Google Calendar: Create Event"+msgstr "Google Calendar: Utwórz zdarzenie"++msgid "Google Calendar: Get all Events"+msgstr "Google Calendar: Pobierz wszystkie zdarzenia"+msgid "Google Places API key not configured"msgstr "Klucz API Google Places nie jest skonfigurowany"@@ -11167,6 +11346,15 @@ msgstr "Gwarantowana wartość resztkowa"msgid "Guaranteed Residual Value"msgstr "Gwarantowana wartość rezydualna"+msgid "Guests can invite others"+msgstr "Goście mogą zapraszać innych"++msgid "Guests can modify"+msgstr "Goście mogą modyfikować"++msgid "Guests can see other guests"+msgstr "Goście mogą widzieć innych gości"+msgid "Guided"msgstr "Wspomagane"@@ -11518,6 +11706,9 @@ msgstr "IBAN"msgid "IC Transaction"msgstr "Transakcja międzyfirmowa"+msgid "Icon Emoji"+msgstr "Emoji ikony"+msgid "Id"msgstr "Id"@@ -12282,6 +12473,9 @@ msgstr "jest na lub po"msgid "is on or before"msgstr "jest na lub przed"+msgid "Is Private?"+msgstr "Czy prywatne?"+msgid "Is supplier org group"msgstr "Czy jest grupą organizacyjną dostawcy"@@ -12354,6 +12548,9 @@ msgstr ""msgid "It is coming soon. Contact Carbon to have it set up for your company."msgstr "Wkrótce będzie dostępna. Skontaktuj się z Carbon, aby skonfigurować ją dla Twojej firmy."+msgid "It was removed after this page loaded. Reload the page and try again."+msgstr "Usunięto to po załadowaniu tej strony. Odśwież stronę i spróbuj ponownie."+msgid "It will stop running until you publish a version again. Nothing is deleted."msgstr "To przestanie działać, dopóki nie opublikujesz wersji ponownie. Nic nie jest usunięte."@@ -12550,6 +12747,9 @@ msgstr "Zlecenia produkcyjne, które mają ten artykuł na swojej liście materimsgid "Join {0}"msgstr "Dołącz do {0}"+msgid "Join into text"+msgstr "Dołącz do tekstu"+msgid "Journal"msgstr "Dowód księgowy"@@ -12616,6 +12816,9 @@ msgstr "Zachowaj istniejące ceny, dodaj tylko nowe artykuły"msgid "Keep Line"msgstr "Zachowaj pozycję"+msgid "Keep matching items"+msgstr "Zachowaj pasujące elementy"+msgid "Keep navigation open"msgstr "Pozostaw nawigację otwartą"@@ -12634,6 +12837,12 @@ msgstr "Zachowaj kompletację"msgid "Keeps orders, quotes, and settings behind a second check"msgstr "Utrzymuje zamówienia, oferty i ustawienia za drugą weryfikacją"+msgid "Kept {kept} of {total}; {unresolved} could not be checked."+msgstr "Zachowano {kept} z {total}; nie można było sprawdzić: {unresolved}."++msgid "Kept {kept} of {total}."+msgstr "Zachowano {kept} z {total}."+msgid "Key"msgstr "Klucz"@@ -14875,6 +15084,9 @@ msgstr "Brak dostępu"msgid "No accounts are mapped yet"msgstr "Żadne konto nie jest jeszcze zmapowane"+msgid "No accounts connected yet."+msgstr "Żadne konta nie są jeszcze połączone."+msgid "No accounts match your search"msgstr "Żadne konta nie pasują do Twojego wyszukiwania"@@ -14930,6 +15142,9 @@ msgstr "Jeszcze brak aktyw. Dodaj każde aktywo, które leasing obejmuje, z infomsgid "No attachments."msgstr "Brak załączników."+msgid "No authorization code was returned"+msgstr "Nie zwrócono kodu autoryzacji"+msgid "No available filters"msgstr "Brak dostępnych filtrów"@@ -15130,6 +15345,9 @@ msgstr "Brak ścieżki niepowodzenia — przebieg zatrzymuje się tutaj i jest omsgid "No fair value entered, counts as not met"msgstr "Nie wprowadzono wartości godziwej, liczy się jako niespełnione"+msgid "No field was chosen to take."+msgstr "Nie wybrano pola do pobrania."+msgid "No fields found."msgstr "Nie znaleziono pól."@@ -15250,6 +15468,9 @@ msgstr "Brak pasujących pojemników"msgid "No matching operations"msgstr "Brak zgodnych operacji"+msgid "No matching time"+msgstr "Brak pasującej godziny"+msgid "No materials"msgstr "Brak materiałów"@@ -15765,6 +15986,9 @@ msgstr "Nic"msgid "Nothing at this location matches \"{0}\"."msgstr "Nic w tej lokalizacji nie pasuje do \"{0}\"."+msgid "Nothing can work on this result."+msgstr "Nic nie może działać na tym wyniku."+msgid "Nothing completed in MES yet"msgstr "W MES nic jeszcze nie ukończono"@@ -15798,6 +16022,9 @@ msgstr "Nic nie zaplanowano — dodaj stanowisko poniżej."msgid "Nothing selected yet"msgstr "Nic nie wybrano"+msgid "Nothing to choose yet - <0>set one up in Settings</0>."+msgstr "Nic jeszcze do wyboru - <0>skonfiguruj w Ustawieniach</0>."+msgid "Nothing to post for this period."msgstr "Nic do zaksięgowania w tym okresie."@@ -16008,6 +16235,9 @@ msgstr "1 {0} to ile {1}?"msgid "One firing of a workflow, recorded step by step with the values each step used and produced, acting throughout with the permissions of the workflow's owner."msgstr "Jedno wykonanie przepływu pracy, zarejestrowane krok po kroku z wartościami, które każdy krok użył i wygenerował, działając z uprawnieniami właściciela przepływu pracy."+msgid "One of your {appName} accounts needs to be reconnected before workflow steps can use it."+msgstr "Jedno z twoich kont {appName} musi zostać ponownie połączone zanim kroki Przepływu pracy będą mogły je używać."+msgid "One or more quantities cannot meet this date"msgstr "Jedna lub więcej ilości nie może spełnić tego terminu"@@ -16131,6 +16361,9 @@ msgstr "Otwórz"msgid "Open ({paymentCurrency})"msgstr "Otwarte ({paymentCurrency})"+msgid "Open {appName} accounts"+msgstr "Otwórz konta {appName}"+msgid "Open a change notice"msgstr "Otwórz zawiadomienie o zmianie"@@ -16320,6 +16553,10 @@ msgstr "operacja"msgid "Operation"msgstr "Operacja"+msgctxt "workflow data step"+msgid "Operation"+msgstr "Operacja"+msgid "Operation batch"msgstr "Partia operacji"@@ -17129,6 +17366,9 @@ msgstr "Wybierz klienta, typ klienta lub Wszyscy klienci, aby wyświetlić ich cmsgid "Pick a date or leave blank to clear it."msgstr "Wybierz datę lub pozostaw puste pole, aby je wyczyścić."+msgid "Pick a field…"+msgstr "Wybierz pole…"+msgid "Pick a list variable…"msgstr "Wybierz zmienną listy…"@@ -17818,6 +18058,9 @@ msgstr "Produkcja: aplikacja hali produkcyjnej i planowanie"msgid "Profile"msgstr "Profil"+msgid "Profile Picture"+msgstr "Zdjęcie profilowe"+msgid "Profit Percent"msgstr "Procent Zysku"@@ -17928,6 +18171,9 @@ msgstr "Udowodnij własność każdej domeny e-mail za pomocą rekordu TXT DNS,msgid "Provide process knowledge and inputs"msgstr "Udostępnij wiedzę procesową i dane wejściowe"+msgid "Provide the ts (timestamp) or link value of the **parent** message to make this message a reply. Do not use the ts value of the reply itself; use its parent instead. For example '1710304378.475129'.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the 'Copy link' option."+msgstr "Podaj wartość ts (znacznik czasu) lub link **wiadomości nadrzędnej**, aby uczynić tę wiadomość odpowiedzią. Nie używaj wartości ts samej odpowiedzi; zamiast tego użyj jej rodzica. Na przykład '1710304378.475129'. Alternatywnie możesz łatwo uzyskać link do wiadomości, klikając na trzy kropki obok wiadomości nadrzędnej i wybierając opcję 'Skopiuj link'."+msgid "Provide these URLs to your identity provider (Okta, Entra ID, Google Workspace, etc.) when registering Carbon as a SAML application."msgstr "Podaj te adresy URL dostawcy tożsamości (Okta, Entra ID, Google Workspace, itp.) podczas rejestracji Carbon jako aplikacji SAML."@@ -18731,6 +18977,9 @@ msgstr "Ilości przyjęte zaczynają się od zera."msgid "Received quantity not yet credited. The credit memo is created as a draft."msgstr "Ilość otrzymana nie została jeszcze zaakceptowana. Faktura korygująca jest tworzona jako wersja robocza."+msgid "Receiver Email (To)"+msgstr "E-mail odbiorcy (Do)"+msgid "Receives the invoice email"msgstr "Odbiera wiadomość e-mail z fakturą"@@ -18788,6 +19037,21 @@ msgstr "Uzgadnianie zamówienia zakupu z tym, co zostało przyjęte i zafakturowmsgid "Reconfigure"msgstr "Rekonfiguruj"+msgid "Reconnect"+msgstr "Ponownie połącz"++msgid "Reconnect {appName}"+msgstr "Ponownie połącz {appName}"++msgid "Reconnect it"+msgstr "Ponownie je połącz"++msgid "Reconnect needed"+msgstr "Wymagane ponowne połączenie"++msgid "Reconnect with the account this connection already uses, or use Add account to connect the other one."+msgstr "Połącz ponownie kontem, którego to połączenie już używa, albo użyj opcji Dodaj konto, aby połączyć drugie."+msgid "Record"msgstr "Nagrywaj"@@ -18833,9 +19097,16 @@ msgstr "Rekordy"msgid "Records and posted journals are being sent to and received from this provider."msgstr "Rekordy i zaksięgowane dowody księgowe są wysyłane do i odbierane z tego dostawcy."+msgid "Records here appear as plain text — {appLabel} doesn't support links in this field."+msgstr "Rekordy tutaj pojawiają się jako zwykły tekst — {appLabel} nie obsługuje linków w tym polu."+msgid "Records moved"msgstr "Rekordy przeniesione"+#. placeholder {0}: notice.params.equals+msgid "Records will be plain text. Set {siblingLabel} to {0} (under Advanced) to turn them into links."+msgstr "Rekordy będą zwykłym tekstem. Ustaw {siblingLabel} na {0} (w Opcje zaawansowane), aby zmienić je na linki."+msgid "Recost"msgstr "Przelicz koszt"@@ -19182,6 +19453,10 @@ msgstr "Usuń z listy otrzymane numery seryjne i partie produktów ze zapasu"msgid "Remove this item"msgstr "Usuń ten artykuł"+msgctxt "workflow data step"+msgid "Remove this operation"+msgstr "Usuń tę operację"+msgid "Remove this storage type from all referencing storage units and delete it. This cannot be undone."msgstr "Usuń ten typ magazynowania ze wszystkich jednostek magazynowych, które go wykorzystują, i go usuń. Tej operacji nie można cofnąć."@@ -19216,6 +19491,9 @@ msgstr "Zmień nazwę"msgid "Rename Workflow"msgstr "Zmień nazwę przepływu pracy"+msgid "Renamed"+msgstr "Zmieniono nazwę"+msgid "Rendering label preview..."msgstr "Renderowanie podglądu etykiety..."@@ -19381,6 +19659,12 @@ msgstr "System uzupełniania zapasów"msgid "Replies to emailed invoices go here, and it's copied on each one."msgstr "Odpowiedzi na wysłane faktury trafiają tutaj i są kopiowane na każdej z nich."+msgid "Reply to Thread (Thread Message Link/Timestamp)"+msgstr "Odpowiedź w wątku (Link wiadomości wątku/Znacznik czasu)"++msgid "Reply-To Email"+msgstr "Email Odpowiedź do"+msgid "Report"msgstr "Raport"@@ -19925,6 +20209,9 @@ msgstr "Cofnij zaproszenie"msgid "Revoke Invites"msgstr "Odwołaj zaproszenia"+msgid "Revoked"+msgstr "Unieważnione"+msgid "Rework"msgstr "Poprawka"@@ -20699,6 +20986,9 @@ msgstr "Szukaj części dostawcy"msgid "Search suppliers..."msgstr "Szukaj dostawców..."+msgid "Search Term"+msgstr "Wyszukiwany termin"+msgid "Search tools..."msgstr "Wyszukaj narzędzia..."@@ -20800,6 +21090,9 @@ msgstr "Najpierw wybierz kształt, aby zobaczyć dostępne opcje"msgid "Select a step to hide parts on it."msgstr "Wybierz krok, aby ukryć na nim części."+msgid "Select a step…"+msgstr "Wybierz krok…"+msgid "Select a substance and shape first to see available options"msgstr "Najpierw wybierz substancję i kształt, aby zobaczyć dostępne opcje"@@ -20818,6 +21111,9 @@ msgstr "Zaznacz wszystko"msgid "Select an action…"msgstr "Wybierz akcję…"+msgid "Select an app…"+msgstr "Wybierz aplikację…"+msgid "Select an assignee"msgstr "Wybierz osobę przypisaną"@@ -20842,6 +21138,9 @@ msgstr "Wybierz operację…"msgid "Select an option"msgstr "Wybierz opcję"+msgid "Select an option…"+msgstr "Wybierz opcję…"+msgid "Select at least one item to accept the quote"msgstr "Wybierz co najmniej jeden artykuł, aby zaakceptować ofertę"@@ -20875,6 +21174,9 @@ msgstr "Wybierz pracownika"msgid "Select Employee Type"msgstr "Wybierz typ pracownika"+msgid "Select event types"+msgstr "Wybierz typy zdarzeń"+msgid "Select field"msgstr "Wybierz pole"@@ -21026,6 +21328,9 @@ msgstr "Wyślij zaproszenie"msgid "Send Invites"msgstr "Wyślij zaproszenia"+msgid "Send Notifications"+msgstr "Wysyłaj powiadomienia"+msgid "Send RFQ to Suppliers"msgstr "Wyślij zapytanie ofertowe do dostawców"@@ -21035,6 +21340,12 @@ msgstr "Wyślij do Carbon"msgid "Send Via"msgstr "Wyślij przez"+msgid "Sender Email"+msgstr "Email nadawcy"++msgid "Sender Name"+msgstr "Nazwa nadawcy"+msgid "Sending defective units back to an earlier operation to be corrected instead of scrapping them."msgstr "Odesłanie uszkodzonych jednostek do wcześniejszej operacji do poprawy zamiast ich złomowania."@@ -21802,6 +22113,18 @@ msgstr ""msgid "Slack"msgstr "Slack"+msgid "Slack: Create Channel"+msgstr "Slack: Utwórz kanał"++msgid "Slack: Find User by Email"+msgstr "Slack: Znajdź użytkownika po adresie email"++msgid "Slack: Send Message To A Channel"+msgstr "Slack: Wyślij wiadomość na kanał"++msgid "Slack: Send Message To A User"+msgstr "Slack: Wyślij wiadomość użytkownikowi"+msgid "Slice asset activity by location, item, or any dimension"msgstr "Podziel aktywność aktywów według lokalizacji, pozycji lub dowolnego wymiaru"@@ -22041,6 +22364,9 @@ msgstr "Data rozpoczęcia"msgid "Start Date"msgstr "Data rozpoczęcia"+msgid "Start date time of the event"+msgstr "Czas rozpoczęcia zdarzenia"+msgid "Start Expiration"msgstr "Rozpocznij wygaśnięcie"@@ -22331,7 +22657,7 @@ msgid "Stripe Due Date"msgstr "Pasek daty terminu"msgid "Stripe emails the invoice to the customer, so an address is required. This will also be saved to the contact in Carbon."-msgstr "Stripe wysyła fakturę do klienta pocztą e-mail, więc wymagany jest adres. Zostanie również zapisany w kontakcie w Carbon."+msgstr "Stripe wysyła fakturę do klienta, więc wymagany jest adres. Zostanie on również zapisany w kontakcie w Carbon."msgid "Stripe emails the invoices to the customer, so an address is required. It is also saved to the contract's invoice contact in Carbon, if it has one."msgstr "Stripe wysyła faktury do klienta, dlatego wymagany jest adres. Jest on również zapisywany w kontakcie do fakturowania umowy w Carbon, jeśli istnieje."@@ -22855,6 +23181,9 @@ msgstr "Tagi"msgid "Tailor this hub for the customer. Changes apply live for everyone viewing it. Never shown to the customer here."msgstr "Dostosuj ten hub dla klienta. Zmiany są stosowane na żywo dla wszystkich go przeglądających. Nigdy nie jest pokazywane klientowi tutaj."+msgid "Take one field from every item"+msgstr "Weź jedno pole z każdego artykułu"+msgid "Take out of service"msgstr "Wycofaj z eksploatacji"@@ -22868,6 +23197,12 @@ msgstr "Przejmij prawo własności"msgid "Take Ownership: {0}"msgstr "Przejmij prawo własności: {0}"+msgid "Take the first item"+msgstr "Weź pierwszy artykuł"++msgid "Take the last item"+msgstr "Weź ostatni artykuł"+msgid "Take the shortest remaining shelf life across the materials consumed to make this item. Use when the product's expiry depends on its ingredients."msgstr "Weź najkrótszy pozostały okres przydatności spośród materiałów zużytych do utworzenia tego artykułu. Użyj, gdy termin ważności produktu zależy od jego składników."@@ -23115,11 +23450,8 @@ msgstr ""msgid "Test run"msgstr "Test uruchomienia"-msgid "Test run — results are not saved to the Runs page"-msgstr "Test uruchomienia — wyniki nie są zapisywane na stronie Uruchomienia"--msgid "Test runs are not saved. Close this panel and the result is gone."-msgstr "Testy uruchomienia nie są zapisywane. Zamknij ten panel, a wynik zniknie."+msgid "Test runs are saved to the run history, marked as tests."+msgstr "Uruchomienia testowe są zapisywane w historii przebiegów i oznaczane jako testy."msgid "Test Value"msgstr "Wartość testowa"@@ -23127,9 +23459,36 @@ msgstr "Wartość testowa"msgid "Text size"msgstr "Rozmiar tekstu"+msgid "That account is still being reconnected. Try again in a moment."+msgstr "To konto jest wciąż ponownie łączone. Spróbuj ponownie za moment."++msgid "That account no longer exists"+msgstr "To konto już nie istnieje"++msgid "That connection name is already used"+msgstr "Ta nazwa połączenia jest już używana"++msgid "That field holds a list of its own. Turn on flattening to take it."+msgstr "To pole zawiera własną listę. Włącz spłaszczanie, aby je pobrać."++msgid "That field holds several values, so they are combined into one list."+msgstr "To pole zawiera wiele wartości, dlatego są łączone w jedną listę."++msgid "That integration is not available"+msgstr "Ta integracja jest niedostępna"++msgid "That list was empty."+msgstr "Ta lista była pusta."+msgid "That name is already used by another step."msgstr "Ta nazwa jest już używana przez inny krok."+msgid "That workspace is connected to another company"+msgstr "Ta przestrzeń robocza jest połączona z inną firmą"++msgid "That's a different account"+msgstr "To inne konto"+#. placeholder {0}: i18n._(step.title)msgid "The \"{0}\" phase checks itself off once all of its tasks in the project plan are done."msgstr "Faza \"{0}\" oznacza się jako gotowa, gdy wszystkie jej zadania w planie projektu są gotowe."@@ -23143,6 +23502,9 @@ msgstr "Faza \"{0}\" jest gotowa — jej punkt kontrolny \"{1}\" został zaliczomsgid "The {0} phases to go live, each ending at a checkpoint. Tick off each task as you complete it."msgstr "Fazy {0} przed wdrożeniem, każda kończąca się punktem kontrolnym. Zaznaczaj każde zadanie po jego ukończeniu."+msgid "The {appName} account this step uses is not available — it was disconnected or needs to be reconnected."+msgstr "Konto {appName} używane przez ten krok jest niedostępne — zostało rozłączone lub wymaga ponownego połączenia."+msgid "The accent color used across Carbon."msgstr "Kolor akcentu używany w aplikacji Carbon."@@ -23158,6 +23520,9 @@ msgstr "Konta, na które Carbon automatycznie księguje"msgid "The action that copies a saved method (its materials, operations, and work instructions) onto a job or quote line."msgstr "Czynność kopiowania zapisanej metody (jej materiałów, operacji i instrukcji roboczych) na zlecenie produkcyjne lub pozycję oferty."+msgid "The address must be listed in your GMail account's settings"+msgstr "Adres musi być wymieniony w ustawieniach konta GMail"+msgid "The allowed values for a list-type attribute; users pick from these rather than free-typing."msgstr "Dozwolone wartości dla atrybutu typu lista; użytkownicy wybierają z nich zamiast pisać swobodnie."@@ -23179,6 +23544,9 @@ msgstr "Zasób przechodzi do swojej klasy w użytku i zaczyna się amortyzowaćmsgid "The asset would have a negative cost. Check the purchase price."msgstr "Składnik aktywów miałby ujemny koszt. Sprawdź cenę zakupu."+msgid "The authorization took too long or came back altered. Start the connection again from this page."+msgstr "Autoryzacja trwała zbyt długo lub wróciła zmieniona. Uruchom ponownie połączenie z tej strony."+msgid "The authorization was refused in Onshape. Save the integration settings to try again."msgstr "Autoryzacja została odmówiona w Onshape. Zapisz ustawienia integracji i spróbuj ponownie."@@ -23188,6 +23556,9 @@ msgstr "Autoryzacja została odrzucona w Onshape. Spróbuj połączyć się ponomsgid "The authorization was refused in Ramp. Try connecting again."msgstr "Autoryzacja została odrzucona w Ramp. Spróbuj połączyć się ponownie."+msgid "The authorization was rejected"+msgstr "Autoryzacja została odrzucona"+msgid "The average cost of the item. Changing it needs permission to edit parts."msgstr "Średni koszt artykułu. Zmiana wymaga uprawnienia do edycji części."@@ -23291,6 +23662,12 @@ msgstr "Firma ma już zaksięgowany dowód księgowy saldo otwarcia."msgid "The company has no account defaults."msgstr "Firma nie ma skonfigurowanych domyślnych kont."+msgid "The connection could not be verified"+msgstr "Nie można było zweryfikować połączenia"++msgid "The connection was refused"+msgstr "Połączenie zostało odrzucone"+msgid "The contract cannot be cancelled then"msgstr "Umowa nie może być wówczas anulowana"@@ -23556,6 +23933,9 @@ msgstr "Adres https, do którego krok webhooku przepływu pracy wysyła — zwykmsgid "The human-readable document number (like J000001 or ECO-000001) minted from a sequence and stored on the record, distinct from its internal id."msgstr "Czytelny dla człowieka numer dokumentu (np. J000001 lub ECO-000001) wyrażony z numeracji i przechowywany w rekordzie, różny od jego wewnętrznego identyfikatora."+msgid "The icon emoji of the bot"+msgstr "Emoji ikony bota"+msgid "The identifier the customer uses for this part on their POs; Carbon resolves it to our internal Part ID on order import."msgstr "Identyfikator, który klient używa dla tej części na swoich PO; Carbon rozwiązuje to do naszego wewnętrznego identyfikatora części przy imporcie zamówienia."@@ -23577,6 +23957,9 @@ msgstr "Reguła Incoterm (FOB, DAP, EXW, CIF, ...), która określa, kto płacimsgid "The Incoterm rule (FOB, DAP, EXW, CIF, …) that governs who pays freight, who bears risk, and where the transfer of title occurs on shipments to this customer."msgstr "Reguła Incoterm (FOB, DAP, EXW, CIF, ...), która określa, kto płaci transport, kto ponosi ryzyko i gdzie następuje przeniesienie własności na wysyłkach do tego klienta."+msgid "The integration authorized the connection but saving it failed. Try connecting again."+msgstr "Integracja autoryzowała połączenie, ale zapisanie go nie powiodło się. Spróbuj ponownie nawiązać połączenie."+msgid "The inventory cost recognized when a shipment posts, valued by the item's costing method."msgstr "Koszt zapasów uznany, gdy wysyłka się zaksięgowuje, wyceniony metodą kalkulacji kosztów artykułu."@@ -23592,6 +23975,15 @@ msgstr "Artykuł, który każde zlecenie produkcyjne wytwarza — wymagaj jego dmsgid "The item's rental rate"msgstr "Stawka wynajmu artykułu"+msgid "The items in that list have no field by that name."+msgstr "Elementy tej listy nie mają pola o tej nazwie."++msgid "The items in that list have no fields to take."+msgstr "Artykuły na tej liście nie mają pól do pobrania."++msgid "The items in that list have no reading as text."+msgstr "Elementów tej listy nie da się odczytać jako tekstu."+msgid "the job hours due that day (a due-date basis, not the day the work runs), with overdue work in Past due."msgstr "godziny zadania należne tego dnia (na podstawie terminu, nie dnia wykonania), z zalegającymi pracami w Zalegające."@@ -23885,6 +24277,9 @@ msgstr "Procedura, którą technicy stosują podczas wykonywania tego utrzymaniamsgid "The processes this work center can run; appears in process-pickers when scheduling operations, and limits which jobs can route through this work center."msgstr "Procesy, które może wykonać to stanowisko robocze; pojawia się w selectorach procesów podczas planowania operacji i ogranicza, które zlecenia produkcyjne mogą przejść przez to stanowisko robocze."+msgid "The profile picture of the bot"+msgstr "Zdjęcie profilowe bota"+msgid "The provider offers no dimension targets. Enable the feature in the provider first (e.g. tracking categories, class tracking, or fields)."msgstr "Dostawca nie oferuje celów wymiarów. Najpierw włącz funkcję u dostawcy (np. kategorie śledzenia, śledzenie klasy lub pola)."@@ -23986,12 +24381,12 @@ msgstr "W odpowiedzi z Onshape brakowało wymaganych parametrów. Spróbuj połmsgid "The response from Ramp was missing required parameters. Try connecting again."msgstr "W odpowiedzi z Ramp brakowało wymaganych parametrów. Spróbuj połączyć się ponownie."+msgid "The response was missing required parameters. Try connecting again."+msgstr "W odpowiedzi brakuje wymaganych parametrów. Spróbuj ponownie nawiązać połączenie."+msgid "The restore job reported this error."msgstr "Zadanie przywrócenia zgłosiło ten błąd."-msgid "The result will not appear on the Runs page."-msgstr "Wynik nie pojawi się na stronie Uruchomienia."-msgid "The revision number of the part"msgstr "Numer rewizji części"@@ -24139,6 +24534,9 @@ msgstr "System, którego firma używa do zarządzania logowaniem pracownikówmsgid "The system passes every in-scope acceptance test in your configured system, with your data; the data is validated; and you sign off. Then go-live."msgstr "System przechodzi każdy test akceptacyjny w zakresie w Twoim skonfigurowanym systemie, z Twoimi danymi; dane są zweryfikowane; i podpisujesz. Następnie uruchamiasz się na żywo."+msgid "The text of your message. When using Block Kit blocks, this is used as a fallback for notifications."+msgstr "Tekst twojej wiadomości. W przypadku korzystania z bloków Block Kit jest to używane jako opcja rezerwowa dla powiadomień."+msgid "The thread linking a sales RFQ, its quote, and the resulting sales order — a join, not a document with its own status."msgstr "Wątek, który łączy RFQ sprzedaży, jej wycenę i wynikające z tego zamówienie sprzedaży - połączenie, a nie dokument ze swoim statusem."@@ -24220,6 +24618,9 @@ msgstr ""msgid "The US tax depreciation system with IRS property-class tables, run as a separate tax schedule alongside the book schedule."msgstr "Amerykański system amortyzacji podatkowej z tabelami klas mienia IRS, uruchamiany jako oddzielny harmonogram podatkowy obok harmonogramu księgi."+msgid "The username of the bot"+msgstr "Nazwa użytkownika bota"+msgid "The users in this group; group-scoped permissions and notifications apply to each member, and users may belong to multiple groups (effective permissions are the union)."msgstr "Użytkownicy w tej grupie; uprawnienia i powiadomienia o zakresie grupy stosuje się do każdego członka, a użytkownicy mogą należeć do wielu grup (uprawnienia efektywne są unią)."@@ -24352,6 +24753,11 @@ msgstr "Nie znajdują się w Twoim planie kont, ale są używane w dokumentach lmsgid "this ability"msgstr "ta umiejętność"+msgid "This account has stopped working. Reconnect it — workflow steps using it will fail until you do."+msgstr "To konto przestało działać. Połącz je ponownie — kroki przepływu pracy go używające będą się nie powieść, aż to zrobisz."++msgid "This account needs to be reconnected."+msgstr "To konto musi być ponownie połączone."msgid "This action cannot run on this list."msgstr ""@@ -24384,6 +24790,9 @@ msgstr "Nie można tego zmienić później — {integrationName} pozwala na połmsgid "This cannot be undone."msgstr "Tego nie można cofnąć."+msgid "This Carbon instance is missing its OAuth credentials for this integration. Ask an administrator to set them."+msgstr "Ta instancja Carbon nie ma poświadczeń OAuth dla tej integracji. Poproś administratora, aby je ustawił."+msgid "This Carbon instance is missing its Onshape OAuth credentials. Ask an administrator to set them."msgstr "Ta instancja Carbon nie ma danych uwierzytelniających OAuth Onshape. Poproś administratora o ich ustawienie."@@ -24442,9 +24851,15 @@ msgstr "Te informacje będą widoczne dla wszystkich użytkowników, więc uważmsgid "this inspection plan"msgstr "ten plan kontroli"+msgid "This integration can't be connected on this Carbon instance."+msgstr "Tej integracji nie można połączyć w tej instancji Carbon."+msgid "This integration isn't available yet"msgstr "Ta integracja nie jest jeszcze dostępna"+msgid "This integration isn't configured"+msgstr "Ta integracja nie jest skonfigurowana"+#. placeholder {0}: company?.name ?? "Carbon"msgid "This invitation to join {0} has expired. You can request a new invite to be sent to your email."msgstr "To zaproszenie do dołączenia do {0} wygasło. Możesz poprosić o wysłanie nowego zaproszenia na Twoją wiadomość e-mail."@@ -24627,6 +25042,9 @@ msgstr "To stanowisko robocze wykonuje pracę ograniczoną do uprawnień — dzimsgid "This station runs work with no ability requirement; operators assigned on the manning board shape available labor."msgstr "To stanowisko wykonuje pracę bez wymagań umiejętności; operatorzy przypisani na tablicy obsady kształtują dostępną robociznę."+msgid "This step expected a list."+msgstr "Ten krok oczekiwał listy."+msgid "This step is part of it"msgstr "Ten krok jest jego częścią"@@ -24817,6 +25235,9 @@ msgstr "ciasne"msgid "Tightened"msgstr "Obostrzona"+msgid "Time"+msgstr "Godzina"+msgid "Time and dollar utilization of the rental fleet by asset and class"msgstr "Czasowe i pieniężne wykorzystanie floty wynajmu wg zasobu i klasy"@@ -24862,6 +25283,9 @@ msgstr "Przechyl do siebie"msgid "Title"msgstr "Tytuł"+msgid "Title of the event"+msgstr "Tytuł zdarzenia"+msgid "Title passes to the customer when the term ends."msgstr "Tytuł przechodzi do klienta po zakończeniu okresu."@@ -24967,6 +25391,14 @@ msgstr "Tolerancja (dni)"msgid "Tomorrow"msgstr "Jutro"+msgid "Took {took} values; kept the first {kept}."+msgstr "Pobrano wartości: {took}; zachowano pierwsze {kept}."++msgid "Took the first of {total}."+msgstr "Pobrano pierwszy z {total}."++msgid "Took the last of {total}."+msgstr "Pobrano ostatni z {total}."msgid "Too many exports and bulk actions are running right now. Try again in a few minutes."msgstr "Trwa zbyt wiele eksportów i działań zbiorczych. Spróbuj ponownie za kilka minut."@@ -25298,6 +25730,9 @@ msgstr "Wyzwalacze"msgid "Try a different name."msgstr "Spróbuj innej nazwy."+msgid "Try again"+msgstr "Spróbuj ponownie"+msgid "Tuesday"msgstr "Wtorek"@@ -25368,6 +25803,9 @@ msgstr "Wpisz <0>\"{confirmPhrase}\"</0> aby kontynuować."msgid "Type a message..."msgstr "Wpisz wiadomość..."+msgid "Type a value and press Enter…"+msgstr "Wpisz wartość i naciśnij Enter…"+msgid "Type an email and press Enter to add an external recipient"msgstr "Wpisz adres e-mail i naciśnij Enter, aby dodać zewnętrznego odbiorcy"@@ -25449,6 +25887,9 @@ msgstr "Płatności bez dyskonta, które jeszcze przyjdą, wg roku obrachunkowegmsgid "Undo"msgstr "Cofnij"+msgid "Unfurl Links"+msgstr "Rozwiń linki"+msgid "Ungroup"msgstr "Rozgrupuj"@@ -25969,6 +26410,9 @@ msgstr "Uprawnienia użytkownika"msgid "User roles"msgstr "Role użytkownika"+msgid "Username"+msgstr "Nazwa użytkownika"+msgid "users"msgstr "użytkownicy"@@ -26753,6 +27197,9 @@ msgstr "Gdy włączone, to nadpisanie ceny dotyczy zgodnych zleceń; wyłączenimsgid "When on, this rule fires for every target of its type. Assignment rows are ignored but preserved."msgstr "Gdy włączone, ta reguła uruchamia się dla każdego celu tego typu. Wiersze przypisania są ignorowane, ale zachowywane."+msgid "When replying to a thread, also make the message visible to everyone in the channel (only applicable when Thread Timestamp is provided)"+msgstr "Odpowiadając w wątku, wyświetl również wiadomość wszystkim w kanale (dotyczy tylko wtedy, gdy podano znacznik czasu wątku)"+msgid "When supplier responses are expected back; suppliers see this date on the RFQ portal and Carbon stops accepting late responses after it (configurable)."msgstr "Kiedy oczekuje się odpowiedzi dostawców; dostawcy widzą tę datę w portalu RFQ, a Carbon przestaje akceptować spóźnione odpowiedzi po niej (konfigurowanej)."@@ -26924,6 +27371,9 @@ msgstr "Czy ta praca blokuje produkcję (W dół), ją degraduje (Wpływ), znajdmsgid "Whether to Add the selected permissions on top of what each user already has, or Update by replacing each user's permission set wholesale with the selection below."msgstr "Czy wybrane uprawnienia są Dodawane do tego, co każdy użytkownik już ma, czy Aktualizowane poprzez zastąpienie zestawu uprawnień każdego użytkownika poniższą selekcją."+msgid "Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves."+msgstr "Określa, czy rozwijać zdarzenia cykliczne na pojedyncze wystąpienia i zwracać tylko zdarzenia jednorazowe oraz wystąpienia zdarzeń cyklicznych, bez samych bazowych zdarzeń cyklicznych."+msgid "Which document drives each inspection flow for this item."msgstr "Który dokument kieruje każdym przepływem kontroli dla tego produktu."@@ -27227,6 +27677,9 @@ msgstr "Należysz do więcej niż jednej firmy. Wybierz, gdzie chcesz pracować.msgid "You can change the UI style any time through the theme setting"msgstr "Możesz zmienić styl interfejsu użytkownika w dowolnym momencie za pośrednictwem ustawień motywu"+msgid "You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.'"+msgstr "Możesz uzyskać ID kanału, klikając prawym przyciskiem myszy na kanał i wybierając „Wyświetl szczegóły kanału\"."+msgid "You can only see this key once. Store it safely."msgstr "Możesz zobaczyć ten klucz tylko raz. Przechowuj go bezpiecznie."@@ -27278,6 +27731,9 @@ msgstr "Ty prowadzisz"msgid "You name a project owner with decision authority"msgstr "Wyznaczasz właściciela projektu z uprawnieniami decyzyjnymi"+msgid "You need permission to edit workflows to load these choices."+msgstr "Aby wczytać te opcje, potrzebujesz uprawnienia do edycji przepływów pracy."+msgid "You received this item"msgstr "Otrzymałeś ten przedmiot"diff --git a/packages/locale/locales/pl/mes.po b/packages/locale/locales/pl/mes.poindex 3df5540221..413dd42288 100644--- a/packages/locale/locales/pl/mes.po+++ b/packages/locale/locales/pl/mes.po@@ -113,6 +113,9 @@ msgstr "Poprzednie zakończenie nie zostało ukończone. Ponowienie wznawia pozomsgid "About"msgstr "O programie"+msgid "About this field"+msgstr "O tym polu"+msgid "Accept"msgstr "Zaakceptuj"@@ -1234,6 +1237,9 @@ msgstr "Brak zaplanowanego utrzymania ruchu na dziś"msgid "No matches. Type to create one."msgstr "Brak wyników. Wpisz, aby utworzyć nowy."+msgid "No matching time"+msgstr "Brak pasującej godziny"+msgid "No materials"msgstr "Brak materiałów"@@ -2144,6 +2150,9 @@ msgstr "Miniatura"msgid "Tick the jobs this was done for."msgstr "Zaznacz zlecenia produkcyjne, dla których to zostało wykonane."+msgid "Time"+msgstr "Godzina"+msgid "Time and cost split across jobs proportionally to quantity."msgstr "Czas i koszt rozdzielone na zlecenia produkcyjne proporcjonalnie do ilości."diff --git a/packages/locale/locales/pt/erp.po b/packages/locale/locales/pt/erp.poindex 4d03957b9c..53a30b00e0 100644--- a/packages/locale/locales/pt/erp.po+++ b/packages/locale/locales/pt/erp.po@@ -269,6 +269,10 @@ msgstr "{0} faturas foram faturadas em seu sistema anterior e não são criadasmsgid "{0} is {1}, not Draft or Planned"msgstr ""+#. placeholder {0}: integration.name+msgid "{0} isn't installed yet. There's nothing to configure — install it to connect an account."+msgstr "{0} ainda não está instalado. Não há nada para configurar — instale-o para conectar uma conta."+#. placeholder {0}: data.quantitymsgid "{0} items marked as picked"msgstr ""@@ -481,6 +485,12 @@ msgstr "{alreadyPlannedItemCount} peças ignoradas — elas já têm ordens de pmsgid "{apOverduePct}% of payables"msgstr "{apOverduePct}% de contas a pagar"+msgid "{appName} is connected, but needs to be reconnected before workflow steps can use it."+msgstr "{appName} está conectado, mas precisa ser reconectado antes que as etapas do fluxo de trabalho possam usá-lo."++msgid "{appName} isn't connected yet. Connect an account before this step can do anything."+msgstr "{appName} ainda não está conectado. Conecte uma conta antes que esta etapa possa fazer algo."+msgid "{arOverduePct}% of receivables"msgstr "{arOverduePct}% de contas a receber"@@ -594,6 +604,9 @@ msgstr "{inserted} inseridos, {updated} atualizados, {0} precisam de correção,msgid "{jobsMissingStorageUnit, plural, one {# open job has materials with no storage unit} other {# open jobs have materials with no storage unit}}"msgstr "{jobsMissingStorageUnit, plural, one {# ordem de produção aberta tem materiais sem unidade de armazenamento} other {# ordens de produção abertas têm materiais sem unidade de armazenamento}}"+msgid "{kept, plural, one {Took # value.} other {Took # values.}}"+msgstr "{kept, plural, one {# valor obtido.} other {# valores obtidos.}}"+msgid "{label} is used by documents, journals or default accounts, so it cannot be deleted."msgstr "{label} é utilizado por documentos, diários ou contas padrão, portanto não pode ser excluído."@@ -746,6 +759,9 @@ msgstr "{state} · sincronizado {syncedAgo}"msgid "{termMonths, plural, one {# month} other {# months}}"msgstr "{termMonths, plural, one {# mês} other {# meses}}"+msgid "{total, plural, one {Joined # value.} other {Joined # values.}}"+msgstr "{total, plural, one {# valor unido.} other {# valores unidos.}}"+msgid "{total} phases to get your company live on Carbon. Each one ends at a checkpoint."msgstr "{total} fases para colocar sua empresa ao vivo no Carbon. Cada uma termina em um checkpoint."@@ -1651,6 +1667,9 @@ msgstr "Um usuário registra a validade em cada lote de produção ou serial quamsgid "A variable charge — mileage overage, damage, delivery, cleaning — is billed on the agreement's next invoice."msgstr "Uma cobrança variável — excesso de quilometragem, dano, entrega, limpeza — é faturada na próxima fatura do contrato."+msgid "A workspace can be connected to one Carbon company only. Disconnect it there first, or connect a different workspace."+msgstr "Um espaço de trabalho pode ser conectado a apenas uma empresa do Carbon. Desconecte-o lá primeiro ou conecte outro espaço de trabalho."+msgid "ABA"msgstr "ABA"@@ -1672,6 +1691,9 @@ msgstr "Sobre"msgid "About (notification)"msgstr "Sobre (notificação)"+msgid "About this field"+msgstr "Sobre este campo"+msgid "Absent"msgstr "Ausente"@@ -1838,6 +1860,9 @@ msgstr ""msgid "Accounts receivable for amounts owed by customers"msgstr "Contas a receber para valores devidos pelos clientes."+msgid "Accounts your workflows can act as. Add one for each account a workflow step should use."+msgstr "Contas que suas automações podem usar. Adicione uma para cada conta que uma etapa de automação deve usar."+msgid "Accrual"msgstr "Acréscimo"@@ -2055,6 +2080,9 @@ msgstr "Adicionar uma etapa ou pergunta"msgid "Add Ability"msgstr "Adicionar Habilidade"+msgid "Add account"+msgstr "Adicionar conta"+msgid "Add Account"msgstr "Adicionar Conta"@@ -2196,6 +2224,10 @@ msgstr "Adicionar Mês"msgid "Add Note"msgstr "Adicionar Observação"+msgctxt "workflow data step"+msgid "Add operation"+msgstr "Adicionar operação"+msgid "Add Operation"msgstr "Adicionar Operação"@@ -2434,6 +2466,9 @@ msgstr "Avançar para {nextStatus}"msgid "Advanced"msgstr "Avançado"+msgid "Advanced properties"+msgstr "Propriedades avançadas"+msgid "Affected item not found."msgstr "Item afetado não encontrado."@@ -2657,6 +2692,12 @@ msgstr "Os valores mostram apenas os dígitos que têm valor."msgid "An ability is a process's qualification. Only processes without one are listed."msgstr "Uma habilidade é a qualificação de um processo. Apenas processos sem uma são listados."+msgid "An account is already called that — pick a different name."+msgstr "Uma conta já tem esse nome — escolha um nome diferente."++msgid "An account is missing from this list until it is reconnected."+msgstr "Uma conta está ausente desta lista até que seja reconectada."+msgid "An accounting bucket that groups expenses by department or function so the GL can report spend by group, not just by account."msgstr "Um grupo contábil que agrupa despesas por departamento ou função para que a Razão possa relatar gasto por grupo, não apenas por conta."@@ -2822,6 +2863,9 @@ msgstr "Um erro inesperado ocorreu ao conectar ao Onshape. Salve as configuraçmsgid "An unexpected error occurred while connecting to Onshape. Try connecting again."msgstr "Ocorreu um erro inesperado ao conectar ao Onshape. Tente conectar novamente."+msgid "An unexpected error occurred while connecting. Try connecting again."+msgstr "Ocorreu um erro inesperado ao conectar. Tente conectar novamente."+msgid "Analytics"msgstr "Análises"@@ -2839,9 +2883,6 @@ msgstr "E {0} mais — resolva estes para ver o resto."msgid "And {0} more. Resolve these to see the rest."msgstr "E {0} mais. Resolva estes para ver o resto."-msgid "and {hidden} more"-msgstr "e {hidden} mais"-msgid "and {remaining} more"msgstr "e {remaining} mais"@@ -2878,6 +2919,9 @@ msgstr "Taxa anual com a qual o aluguel é descontado"msgid "Annual. Starts from the company's incremental borrowing rate"msgstr "Anual. Começa a partir da taxa de empréstimo incremental da empresa."+msgid "Another connection to this integration already has that name. Choose a different one."+msgstr "Outra conexão para esta integração já tem esse nome. Escolha um diferente."+msgid "Another cost center this one rolls up into, letting you nest a sub-department under its parent for hierarchical cost reporting."msgstr "Outro centro de custo ao qual este agrega, permitindo aninhar um subcentro de custo sob seu pai para relatórios de custo hierárquicos."@@ -2950,6 +2994,9 @@ msgstr "Chaves de API para acesso programático aos seus dados do Carbon."msgid "API, webhooks, and integrations"msgstr "API, webhooks e integrações"+msgid "App"+msgstr "App"+msgid "Appearance"msgstr "Aparência"@@ -3882,6 +3929,9 @@ msgstr "Não foi possível carregar os anexos"msgid "Attempts"msgstr "Tentativas"+msgid "Attendees"+msgstr "Participantes"+msgid "Attribute"msgstr "Atributo"@@ -3924,6 +3974,9 @@ msgstr "Aplicação Autenticadora"msgid "Authenticator QR code"msgstr "Código QR do autenticador"+msgid "Authorization was refused. Try connecting again."+msgstr "A autorização foi recusada. Tente conectar novamente."+msgid "Authorized overtime on top of the shift"msgstr "Horas extras autorizadas além do turno"@@ -3984,6 +4037,9 @@ msgstr "Atualizações automáticas e backups"msgid "Automatic, prorated consumption of a job's untracked materials when output is reported — tracked materials are issued manually."msgstr "Consumo automático e rateado de materiais não rastreados de um trabalho quando a saída é relatada — os materiais rastreados são emitidos manualmente."+msgid "Automatically create a Google Meet video conference link for this event"+msgstr "Criar automaticamente um link de videoconferência do Google Meet para este evento"+msgid "Automatically release the job when the kanban is scanned"msgstr "Liberar automaticamente o trabalho quando o kanban é digitalizado"@@ -4193,6 +4249,9 @@ msgstr "Lotes de produção a devolver"msgid "Batching"msgstr "Lotes de Produção"+msgid "BCC Email"+msgstr "Email com cópia oculta"+msgid "Becomes"msgstr "Torna-se"@@ -4370,6 +4429,12 @@ msgstr "Quadro"msgid "Body"msgstr "Corpo"+msgid "Body for the email you want to send"+msgstr "Corpo do email que você deseja enviar"++msgid "Body Type"+msgstr "Tipo de corpo"+msgid "BoM"msgstr "BoM"@@ -4427,6 +4492,9 @@ msgstr "Migalha de pão"msgid "Bring in your parts, BOMs, Bill of Process, and costing — with Carbon's import tools, CSV, or LLM help."msgstr "Traga suas peças, BOMs, listas de operações e custeio — com as ferramentas de importação do Carbon, CSV ou ajuda de LLM."+msgid "Broadcast reply to channel"+msgstr "Transmitir resposta para o canal"+msgid "Browse library"msgstr "Procurar biblioteca"@@ -4513,6 +4581,9 @@ msgstr ""msgid "By accepting the invite, you agree to the <0>Terms of Service</0> and <1>Privacy Policy</1>."msgstr "Ao aceitar o convite, você concorda com os <0>Termos de Serviço</0> e a <1>Política de Privacidade</1>."+msgid "By default it'll be 30 min post start time"+msgstr "Por padrão, será 30 minutos após o horário de início"+msgid "By dimension"msgstr "Por dimensão"@@ -4881,6 +4952,9 @@ msgstr "Execução causadora: "msgid "CC"msgstr "CC"+msgid "CC Email"+msgstr "Email com cópia"+msgid "Centralized Billing Address"msgstr "Endereço de Cobrança Centralizado"@@ -4998,6 +5072,12 @@ msgstr "Alterar isto atualizará o ID da peça"msgid "Changing type resets this item's draft edits."msgstr "Alterar o tipo redefine as edições em rascunho deste item."+msgid "Channel"+msgstr "Canal"++msgid "Channel Name"+msgstr "Nome do canal"+msgid "Characteristic"msgstr "Característica"@@ -5078,6 +5158,9 @@ msgstr "Checkpoint ·"msgid "Checkpoints"msgstr "Pontos de Verificação"+msgid "Choose {named} first."+msgstr "Escolha {named} primeiro."+msgid "Choose a backup"msgstr "Escolher um backup"@@ -5333,6 +5416,9 @@ msgstr "Recolher Configuração"msgid "Collapse subtree"msgstr "Recolher subárvore"+msgid "Color"+msgstr "Cor"+#. placeholder {0}: index + 1msgid "Column {0} of {count}"msgstr "Coluna {0} de {count}"@@ -5594,6 +5680,9 @@ msgstr "Configure as contas padrão usadas para vários tipos de transação emmsgid "Configure the start months for your fiscal and tax years"msgstr "Configurar os meses iniciais para seus anos fiscais e de impostos"+msgid "Configure the steps above first."+msgstr "Configure as etapas acima primeiro."+msgid "Configure when purchased item costs should be updated from supplier transactions."msgstr "Configure quando os custos dos itens comprados devem ser atualizados a partir das transações do fornecedor."@@ -5690,6 +5779,9 @@ msgstr "Motivo do conflito"msgid "Connect"msgstr "Conectar"+msgid "Connect {appName}"+msgstr "Conectar {appName}"+msgid "Connect Carbon to your accounting, project management, and CAD tools and much more."msgstr "Conecte o Carbon às suas ferramentas de contabilidade, gerenciamento de projetos, CAD e muito mais."@@ -5717,9 +5809,18 @@ msgstr "Conecte as ferramentas externas que sua empresa já utiliza"msgid "Connect your identity provider by pasting either its metadata URL or its raw metadata XML — exactly one of the two."msgstr "Conecte seu provedor de identidade colando seu URL de metadados ou seu XML de metadados brutos — exatamente um dos dois."+msgid "Connected before workflows needed extra permissions. Reconnect to grant them — everything else keeps working meanwhile."+msgstr "Conectado antes de fluxos de trabalho precisarem de permissões extras. Reconecte para concedê-las — tudo o mais continua funcionando enquanto isso."+msgid "Connected to"msgstr "Conectado a"+msgid "Connection"+msgstr "Conexão"++msgid "Connection name"+msgstr "Nome da conexão"+msgid "Console Mode"msgstr "Modo Console"@@ -6336,6 +6437,12 @@ msgstr "Não foi possível liberar {0}: {1}"msgid "Could not save"msgstr "Não foi possível salvar"+msgid "Couldn't check whether {appName} is connected."+msgstr "Não foi possível verificar se {appName} está conectado."++msgid "Couldn't complete the connection"+msgstr "Não foi possível concluir a conexão"+msgid "Couldn't complete the Onshape connection"msgstr "Não foi possível concluir a conexão com o Onshape"@@ -6351,12 +6458,18 @@ msgstr "Não foi possível carregar mais linhas"msgid "Couldn't load related documents. Refresh before creating a new one to avoid duplicates."msgstr "Não foi possível carregar os documentos relacionados. Atualize antes de criar um novo para evitar duplicatas."+msgid "Couldn't load the choices for this field."+msgstr "Não foi possível carregar as opções para este campo."+msgid "Couldn't load the provider's dimension targets — check the connection and reload."msgstr "Não foi possível carregar os alvos de dimensão do provedor — verifique a conexão e recarregue."msgid "Couldn't reschedule the job. Please try again."msgstr "Não foi possível reagendar o trabalho. Por favor, tente novamente."+msgid "Couldn't save the connection"+msgstr "Não foi possível salvar a conexão"+msgid "Couldn't save the Onshape connection"msgstr "Não foi possível salvar a conexão com o Onshape"@@ -6366,6 +6479,12 @@ msgstr "Não foi possível salvar a conexão com Onshape Government"msgid "Couldn't save the Ramp connection"msgstr "Não foi possível salvar a conexão com o Ramp"+msgid "Couldn't start the {name} connection"+msgstr "Não foi possível iniciar a conexão com {name}"++msgid "Couldn't start the authorization."+msgstr "Não foi possível iniciar a autorização."+msgid "Count"msgstr "Contagem"@@ -6375,6 +6494,12 @@ msgstr "Histórico de Contagem"msgid "Count ID"msgstr "ID de Contagem"+msgid "Count items"+msgstr "Contar itens"++msgid "Counted {total}."+msgstr "Contados: {total}."+msgid "Counted Qty"msgstr "Qtd. Contada"@@ -6479,6 +6604,9 @@ msgstr "Criar Contrato"msgid "Create Forecast"msgstr "Criar Previsão"+msgid "Create Google Meet Link"+msgstr "Criar link do Google Meet"+msgid "Create Issue"msgstr "Criar Problema"@@ -7116,6 +7244,9 @@ msgstr "Data"msgid "Date Acquired"msgstr "Data de Aquisição"+msgid "Date and time"+msgstr "Data e hora"+msgid "Date Calibrated"msgstr "Data Calibrada"@@ -7125,6 +7256,9 @@ msgstr "Data de vencimento"msgid "Date Due"msgstr "Data de Vencimento"+msgid "Date from"+msgstr "Data de"+msgid "Date issued"msgstr "Data de emissão"@@ -7137,6 +7271,9 @@ msgstr "Data de pagamento"msgid "Date Paid"msgstr "Data de Pagamento"+msgid "Date to"+msgstr "Data até"+msgid "Dates"msgstr "Datas"@@ -8006,6 +8143,9 @@ msgstr "Descrição da Alteração"msgid "Description of Issue"msgstr "Descrição do Problema"+msgid "Description of the event. You can use HTML tags here."+msgstr "Descrição do evento. Você pode usar tags HTML aqui."+msgid "Detach"msgstr "Desconectar"@@ -8111,6 +8251,9 @@ msgstr "Descartado"msgid "Disconnect"msgstr "Desconectar"+msgid "Disconnected"+msgstr "Desconectado"+msgid "Discontinuation date"msgstr "Data de descontinuação"@@ -9071,6 +9214,9 @@ msgstr "Email"msgid "Email Address"msgstr "Endereço de Email"+msgid "Email address to set as the \"Reply-To\" header"+msgstr "Endereço de email para definir como cabeçalho \"Responder para\""+msgid "Email Domains"msgstr "Domínios de Email"@@ -9086,6 +9232,9 @@ msgstr "Enviado por e-mail"msgid "Emails"msgstr "E-mails"+msgid "Emails of the attendees (guests)"+msgstr "Emails dos participantes (convidados)"+msgid "Emoji"msgstr "Emoji"@@ -9155,6 +9304,9 @@ msgstr "Ative cotações digitais para sua empresa. Isso permitirá que você enmsgid "Enable in Settings"msgstr "Ativar nas Configurações"+msgid "Enable link unfurling for this message"+msgstr "Ativar expansão de links para esta mensagem"+msgid "Enable notifications when a sales rule violation is blocked or acknowledged on a quote, sales order, or sales invoice."msgstr "Ative notificações quando uma violação de regra de venda for bloqueada ou confirmada em uma cotação, pedido de venda ou fatura de venda."@@ -9236,6 +9388,9 @@ msgstr "Fim"msgid "End Date"msgstr "Data Final"+msgid "End date time of the event"+msgstr "Hora da data de término do evento"+msgid "End Line"msgstr "Encerrar linha"@@ -9568,6 +9723,9 @@ msgstr ""msgid "Event Type"msgstr "Tipo de Evento"+msgid "Event types"+msgstr "Tipos de evento"+msgid "Events"msgstr "Eventos"@@ -9746,6 +9904,9 @@ msgstr "Expandir linha"msgid "Expand Machine"msgstr "Expandir Máquina"+msgid "Expand Recurring Event?"+msgstr "Expandir eventos recorrentes?"+msgid "Expand row"msgstr "Expandir linha"@@ -10584,6 +10745,9 @@ msgstr "Corrija isso nos arquivos, em seguida, envie os arquivos novamente."msgid "Fix these jobs before releasing"msgstr "Corrija essas ordens de produção antes de liberar"+msgid "Fix this"+msgstr "Corrija isto"+msgid "Fixed"msgstr "Fixo"@@ -11052,6 +11216,12 @@ msgstr "Reconciliação da Razão"msgid "GL Tie-Out"msgstr "Reconciliação da Razão"+msgid "Gmail"+msgstr "Gmail"++msgid "Gmail: Send Email"+msgstr "Gmail: Enviar email"+msgid "Go live right the first time — with our team alongside you"msgstr "Ative-se corretamente na primeira vez — com nossa equipe ao seu lado"@@ -11107,6 +11277,15 @@ msgstr "Boa noite, {name}."msgid "Good morning, {name}."msgstr "Bom dia, {name}."+msgid "Google Calendar"+msgstr "Google Agenda"++msgid "Google Calendar: Create Event"+msgstr "Google Calendar: Criar Evento"++msgid "Google Calendar: Get all Events"+msgstr "Google Calendar: Obter todos os Eventos"+msgid "Google Places API key not configured"msgstr "Chave da API do Google Places não configurada"@@ -11167,6 +11346,15 @@ msgstr "Residual Garantido"msgid "Guaranteed Residual Value"msgstr "Valor residual garantido"+msgid "Guests can invite others"+msgstr "Convidados podem convidar outros"++msgid "Guests can modify"+msgstr "Convidados podem modificar"++msgid "Guests can see other guests"+msgstr "Convidados podem ver outros convidados"+msgid "Guided"msgstr "Orientado"@@ -11518,6 +11706,9 @@ msgstr "IBAN"msgid "IC Transaction"msgstr "Transação intercompanhia"+msgid "Icon Emoji"+msgstr "Emoji de ícone"+msgid "Id"msgstr "Id"@@ -12282,6 +12473,9 @@ msgstr "é em ou após"msgid "is on or before"msgstr "é em ou antes"+msgid "Is Private?"+msgstr "É privado?"+msgid "Is supplier org group"msgstr "É grupo de organização de fornecedor"@@ -12354,6 +12548,9 @@ msgstr ""msgid "It is coming soon. Contact Carbon to have it set up for your company."msgstr "Ela estará disponível em breve. Entre em contato com a Carbon para configurá-la para sua empresa."+msgid "It was removed after this page loaded. Reload the page and try again."+msgstr "Ele foi removido depois que esta página foi carregada. Recarregue a página e tente novamente."+msgid "It will stop running until you publish a version again. Nothing is deleted."msgstr "Ele parará de ser executado até que você publique uma versão novamente. Nada é excluído."@@ -12550,6 +12747,9 @@ msgstr "Ordens de produção que têm este item em sua lista de materiais"msgid "Join {0}"msgstr "Juntar-se a {0}"+msgid "Join into text"+msgstr "Unir ao texto"+msgid "Journal"msgstr "Diário"@@ -12616,6 +12816,9 @@ msgstr "Manter precificação existente, apenas adicionar itens novos"msgid "Keep Line"msgstr "Manter linha"+msgid "Keep matching items"+msgstr "Manter itens correspondentes"+msgid "Keep navigation open"msgstr "Manter navegação aberta"@@ -12634,6 +12837,12 @@ msgstr "Manter separação"msgid "Keeps orders, quotes, and settings behind a second check"msgstr "Mantém pedidos, cotações e configurações atrás de uma segunda verificação"+msgid "Kept {kept} of {total}; {unresolved} could not be checked."+msgstr "{kept} de {total} mantidos; {unresolved} não puderam ser verificados."++msgid "Kept {kept} of {total}."+msgstr "{kept} de {total} mantidos."+msgid "Key"msgstr "Chave"@@ -14875,6 +15084,9 @@ msgstr "Sem Acesso"msgid "No accounts are mapped yet"msgstr "Nenhuma conta mapeada ainda"+msgid "No accounts connected yet."+msgstr "Nenhuma conta conectada ainda."+msgid "No accounts match your search"msgstr "Nenhuma conta corresponde à sua pesquisa"@@ -14930,6 +15142,9 @@ msgstr "Nenhum ativo ainda. Adicione cada ativo que o arrendamento cobre, com omsgid "No attachments."msgstr "Sem anexos."+msgid "No authorization code was returned"+msgstr "Nenhum código de autorização foi retornado"+msgid "No available filters"msgstr "Nenhum filtro disponível"@@ -15130,6 +15345,9 @@ msgstr "Nenhum caminho de falha — a execução para aqui e é marcada como falmsgid "No fair value entered, counts as not met"msgstr "Nenhum valor justo inserido, conta como não atendido"+msgid "No field was chosen to take."+msgstr "Nenhum campo foi escolhido para pegar."+msgid "No fields found."msgstr "Nenhum campo encontrado."@@ -15250,6 +15468,9 @@ msgstr "Nenhum compartimento correspondente"msgid "No matching operations"msgstr "Nenhuma operação correspondente"+msgid "No matching time"+msgstr "Nenhum horário correspondente"+msgid "No materials"msgstr "Sem materiais"@@ -15765,6 +15986,9 @@ msgstr "Nada"msgid "Nothing at this location matches \"{0}\"."msgstr "Nada neste local corresponde a \"{0}\"."+msgid "Nothing can work on this result."+msgstr "Nada pode trabalhar neste resultado."+msgid "Nothing completed in MES yet"msgstr "Nada concluído no MES ainda"@@ -15798,6 +16022,9 @@ msgstr "Nada agendado — adicione uma estação abaixo."msgid "Nothing selected yet"msgstr "Nenhum selecionado ainda"+msgid "Nothing to choose yet - <0>set one up in Settings</0>."+msgstr "Nada para escolher ainda - <0>configure um nas Configurações</0>."+msgid "Nothing to post for this period."msgstr "Nada a contabilizar para este período."@@ -16008,6 +16235,9 @@ msgstr "1 {0} equivale a quantos {1}?"msgid "One firing of a workflow, recorded step by step with the values each step used and produced, acting throughout with the permissions of the workflow's owner."msgstr "Uma execução de um fluxo de trabalho, registrada passo a passo com os valores que cada etapa usou e produziu, agindo sempre com as permissões do proprietário do fluxo de trabalho."+msgid "One of your {appName} accounts needs to be reconnected before workflow steps can use it."+msgstr "Uma das suas contas {appName} precisa ser reconectada antes que as etapas do fluxo de trabalho possam usá-la."+msgid "One or more quantities cannot meet this date"msgstr "Uma ou mais quantidades não podem atender esta data"@@ -16131,6 +16361,9 @@ msgstr "Abrir"msgid "Open ({paymentCurrency})"msgstr "Aberto ({paymentCurrency})"+msgid "Open {appName} accounts"+msgstr "Abrir contas do {appName}"+msgid "Open a change notice"msgstr "Abrir um aviso de alteração"@@ -16320,6 +16553,10 @@ msgstr "operação"msgid "Operation"msgstr "Operação"+msgctxt "workflow data step"+msgid "Operation"+msgstr "Operação"+msgid "Operation batch"msgstr "Lote de operação"@@ -17129,6 +17366,9 @@ msgstr "Escolha um cliente, um tipo de cliente ou Todos os clientes para visualimsgid "Pick a date or leave blank to clear it."msgstr "Escolha uma data ou deixe em branco para limpar."+msgid "Pick a field…"+msgstr "Selecione um campo…"+msgid "Pick a list variable…"msgstr "Escolha uma variável de lista…"@@ -17818,6 +18058,9 @@ msgstr "Produção: app de chão de fábrica e agendamento"msgid "Profile"msgstr "Perfil"+msgid "Profile Picture"+msgstr "Foto de perfil"+msgid "Profit Percent"msgstr "Percentual de Lucro"@@ -17928,6 +18171,9 @@ msgstr "Comprove a propriedade de cada domínio de email com um registro TXT demsgid "Provide process knowledge and inputs"msgstr "Forneça conhecimento do processo e entradas"+msgid "Provide the ts (timestamp) or link value of the **parent** message to make this message a reply. Do not use the ts value of the reply itself; use its parent instead. For example '1710304378.475129'.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the 'Copy link' option."+msgstr "Forneça o valor de ts (timestamp) ou link da mensagem **pai** para fazer desta mensagem uma resposta. Não use o valor de ts da resposta em si; use seu pai em vez disso. Por exemplo, \"1710304378.475129\". Como alternativa, você pode obter facilmente o link da mensagem clicando nos três pontos ao lado da mensagem pai e selecionando a opção \"Copiar link\"."+msgid "Provide these URLs to your identity provider (Okta, Entra ID, Google Workspace, etc.) when registering Carbon as a SAML application."msgstr "Forneça esses URLs ao seu provedor de identidade (Okta, Entra ID, Google Workspace, etc.) ao registrar o Carbon como uma aplicação SAML."@@ -18731,6 +18977,9 @@ msgstr "Quantidades recebidas começam em zero"msgid "Received quantity not yet credited. The credit memo is created as a draft."msgstr "Quantidade recebida ainda não creditada. A nota de crédito é criada como rascunho."+msgid "Receiver Email (To)"+msgstr "Email do destinatário (Para)"+msgid "Receives the invoice email"msgstr "Recebe o email da fatura"@@ -18788,6 +19037,21 @@ msgstr "Reconciliação de um pedido de compra contra o que foi recebido e faturmsgid "Reconfigure"msgstr "Reconfigurar"+msgid "Reconnect"+msgstr "Reconectar"++msgid "Reconnect {appName}"+msgstr "Reconectar {appName}"++msgid "Reconnect it"+msgstr "Reconectá-lo"++msgid "Reconnect needed"+msgstr "Reconexão necessária"++msgid "Reconnect with the account this connection already uses, or use Add account to connect the other one."+msgstr "Reconecte com a conta que esta conexão já usa ou use Adicionar conta para conectar a outra."+msgid "Record"msgstr "Gravar"@@ -18833,9 +19097,16 @@ msgstr "Registros"msgid "Records and posted journals are being sent to and received from this provider."msgstr "Registros e diários contabilizados estão sendo enviados e recebidos deste provedor."+msgid "Records here appear as plain text — {appLabel} doesn't support links in this field."+msgstr "Os registros aqui aparecem como texto simples — {appLabel} não oferece suporte a links neste campo."+msgid "Records moved"msgstr "Registros movidos"+#. placeholder {0}: notice.params.equals+msgid "Records will be plain text. Set {siblingLabel} to {0} (under Advanced) to turn them into links."+msgstr "Os registros serão texto simples. Defina {siblingLabel} como {0} (em Avançado) para convertê-los em links."+msgid "Recost"msgstr "Recalcular Custo"@@ -19182,6 +19453,10 @@ msgstr "Remover os números de série e lote recebidos do estoque"msgid "Remove this item"msgstr "Remover este item"+msgctxt "workflow data step"+msgid "Remove this operation"+msgstr "Remover esta operação"+msgid "Remove this storage type from all referencing storage units and delete it. This cannot be undone."msgstr "Remova este tipo de armazenamento de todas as unidades de armazenamento que o referenciam e o exclua. Isto não pode ser desfeito."@@ -19216,6 +19491,9 @@ msgstr "Renomear"msgid "Rename Workflow"msgstr "Renomear Fluxo de Trabalho"+msgid "Renamed"+msgstr "Renomeado"+msgid "Rendering label preview..."msgstr "Renderizando visualização de etiqueta..."@@ -19381,6 +19659,12 @@ msgstr "Sistema de reposição"msgid "Replies to emailed invoices go here, and it's copied on each one."msgstr "As respostas para faturas enviadas por email vão aqui e é copiada em cada uma."+msgid "Reply to Thread (Thread Message Link/Timestamp)"+msgstr "Responder ao Tópico (Link/Carimbo de Data e Hora da Mensagem do Tópico)"++msgid "Reply-To Email"+msgstr "Email de Resposta"+msgid "Report"msgstr "Relatório"@@ -19925,6 +20209,9 @@ msgstr "Revogar Convite"msgid "Revoke Invites"msgstr "Revogar Convites"+msgid "Revoked"+msgstr "Revogado"+msgid "Rework"msgstr "Retrabalho"@@ -20699,6 +20986,9 @@ msgstr "Pesquisar peças de fornecedor"msgid "Search suppliers..."msgstr "Pesquisar fornecedores..."+msgid "Search Term"+msgstr "Termo de Pesquisa"+msgid "Search tools..."msgstr "Pesquisar ferramentas..."@@ -20800,6 +21090,9 @@ msgstr "Selecione uma forma primeiro para ver as opções disponíveis"msgid "Select a step to hide parts on it."msgstr "Selecione uma etapa para ocultar peças nela."+msgid "Select a step…"+msgstr "Selecione uma etapa…"+msgid "Select a substance and shape first to see available options"msgstr "Selecione uma substância e forma primeiro para ver as opções disponíveis"@@ -20818,6 +21111,9 @@ msgstr "Selecionar tudo"msgid "Select an action…"msgstr "Selecionar uma ação…"+msgid "Select an app…"+msgstr "Selecione um aplicativo…"+msgid "Select an assignee"msgstr "Selecione um designado"@@ -20842,6 +21138,9 @@ msgstr "Selecionar uma operação…"msgid "Select an option"msgstr "Selecione uma opção"+msgid "Select an option…"+msgstr "Selecione uma opção…"+msgid "Select at least one item to accept the quote"msgstr "Selecione pelo menos um Item para aceitar o Orçamento"@@ -20875,6 +21174,9 @@ msgstr "Selecionar Funcionário"msgid "Select Employee Type"msgstr "Selecionar Tipo de Funcionário"+msgid "Select event types"+msgstr "Selecionar tipos de evento"+msgid "Select field"msgstr "Selecionar campo"@@ -21026,6 +21328,9 @@ msgstr "Enviar Convite"msgid "Send Invites"msgstr "Enviar Convites"+msgid "Send Notifications"+msgstr "Enviar notificações"+msgid "Send RFQ to Suppliers"msgstr "Enviar RFQ para Fornecedores"@@ -21035,6 +21340,12 @@ msgstr "Enviar para Carbon"msgid "Send Via"msgstr "Enviar Via"+msgid "Sender Email"+msgstr "Email do Remetente"++msgid "Sender Name"+msgstr "Nome do Remetente"+msgid "Sending defective units back to an earlier operation to be corrected instead of scrapping them."msgstr "Envio de unidades com defeito de volta para uma operação anterior para correção em vez de sucata."@@ -21802,6 +22113,18 @@ msgstr ""msgid "Slack"msgstr "Slack"+msgid "Slack: Create Channel"+msgstr "Slack: Criar Canal"++msgid "Slack: Find User by Email"+msgstr "Slack: Encontrar Usuário por Email"++msgid "Slack: Send Message To A Channel"+msgstr "Slack: Enviar Mensagem para um Canal"++msgid "Slack: Send Message To A User"+msgstr "Slack: Enviar Mensagem para um Usuário"+msgid "Slice asset activity by location, item, or any dimension"msgstr "Dividir atividade de ativos por localização, item ou qualquer dimensão"@@ -22041,6 +22364,9 @@ msgstr "Data de início"msgid "Start Date"msgstr "Data de Início"+msgid "Start date time of the event"+msgstr "Data e hora de início do evento"+msgid "Start Expiration"msgstr "Iniciar Expiração"@@ -22855,6 +23181,9 @@ msgstr "Etiquetas"msgid "Tailor this hub for the customer. Changes apply live for everyone viewing it. Never shown to the customer here."msgstr "Personalize este hub para o cliente. As alterações são aplicadas em tempo real para todos que o visualizam. Nunca é mostrado ao cliente aqui."+msgid "Take one field from every item"+msgstr "Pegar um campo de cada item"+msgid "Take out of service"msgstr "Retirar de Serviço"@@ -22868,6 +23197,12 @@ msgstr "Tomar posse"msgid "Take Ownership: {0}"msgstr "Tomar posse: {0}"+msgid "Take the first item"+msgstr "Pegar o primeiro item"++msgid "Take the last item"+msgstr "Pegar o último item"+msgid "Take the shortest remaining shelf life across the materials consumed to make this item. Use when the product's expiry depends on its ingredients."msgstr "Usar a vida de prateleira restante mais curta entre os materiais consumidos para fabricar este item. Use quando a validade do produto depende de seus ingredientes."@@ -23115,11 +23450,8 @@ msgstr ""msgid "Test run"msgstr "Execução de teste"-msgid "Test run — results are not saved to the Runs page"-msgstr "Execução de teste — os resultados não são salvos na página de Execuções"--msgid "Test runs are not saved. Close this panel and the result is gone."-msgstr "As execuções de teste não são salvas. Feche este painel e o resultado desaparecerá."+msgid "Test runs are saved to the run history, marked as tests."+msgstr "As execuções de teste são salvas no histórico de execução, marcadas como testes."msgid "Test Value"msgstr "Valor de Teste"@@ -23127,9 +23459,36 @@ msgstr "Valor de Teste"msgid "Text size"msgstr "Tamanho do texto"+msgid "That account is still being reconnected. Try again in a moment."+msgstr "Essa conta ainda está sendo reconectada. Tente novamente em um momento."++msgid "That account no longer exists"+msgstr "Essa conta não existe mais"++msgid "That connection name is already used"+msgstr "Esse nome de conexão já está em uso"++msgid "That field holds a list of its own. Turn on flattening to take it."+msgstr "Esse campo contém uma lista própria. Ative o achatamento para pegá-lo."++msgid "That field holds several values, so they are combined into one list."+msgstr "Esse campo contém vários valores, então eles são combinados em uma lista."++msgid "That integration is not available"+msgstr "Essa integração não está disponível"++msgid "That list was empty."+msgstr "Essa lista estava vazia."+msgid "That name is already used by another step."msgstr "Esse nome já está sendo usado por outra etapa."+msgid "That workspace is connected to another company"+msgstr "Esse espaço de trabalho está conectado a outra empresa"++msgid "That's a different account"+msgstr "Essa é outra conta"+#. placeholder {0}: i18n._(step.title)msgid "The \"{0}\" phase checks itself off once all of its tasks in the project plan are done."msgstr "A fase \"{0}\" marca-se como concluída assim que todas as suas tarefas no plano do projeto forem concluídas."@@ -23143,6 +23502,9 @@ msgstr "A fase \"{0}\" está concluída — seu ponto de verificação \"{1}\" fmsgid "The {0} phases to go live, each ending at a checkpoint. Tick off each task as you complete it."msgstr "Os {0} fases para entrar em produção, cada uma terminando em um ponto de verificação. Marque cada tarefa conforme a concluir."+msgid "The {appName} account this step uses is not available — it was disconnected or needs to be reconnected."+msgstr "A conta {appName} que esta etapa usa não está disponível — foi desconectada ou precisa ser reconectada."+msgid "The accent color used across Carbon."msgstr "A cor de destaque usada em todo o Carbon."@@ -23158,6 +23520,9 @@ msgstr "As contas que o Carbon publica automaticamente"msgid "The action that copies a saved method (its materials, operations, and work instructions) onto a job or quote line."msgstr "A ação que copia um método salvo (seus materiais, operações e instruções de trabalho) para uma ordem de produção ou linha do orçamento."+msgid "The address must be listed in your GMail account's settings"+msgstr "O endereço deve estar listado nas configurações de sua conta Gmail"+msgid "The allowed values for a list-type attribute; users pick from these rather than free-typing."msgstr "Os valores permitidos para um atributo do tipo lista; os usuários escolhem entre eles em vez de digitar livremente."@@ -23179,6 +23544,9 @@ msgstr "O ativo entra em sua classe de serviço e começa a ser depreciado a parmsgid "The asset would have a negative cost. Check the purchase price."msgstr "O ativo teria um custo negativo. Verifique o preço de compra."+msgid "The authorization took too long or came back altered. Start the connection again from this page."+msgstr "A autorização demorou muito ou retornou alterada. Inicie a conexão novamente nesta página."+msgid "The authorization was refused in Onshape. Save the integration settings to try again."msgstr "A autorização foi recusada no Onshape. Salve as configurações de integração para tentar novamente."@@ -23188,6 +23556,9 @@ msgstr "A autorização foi recusada no Onshape. Tente conectar novamente."msgid "The authorization was refused in Ramp. Try connecting again."msgstr "A autorização foi recusada no Ramp. Tente conectar novamente."+msgid "The authorization was rejected"+msgstr "A autorização foi rejeitada"+msgid "The average cost of the item. Changing it needs permission to edit parts."msgstr "O custo médio do item. Alterá-lo requer permissão para editar peças."@@ -23291,6 +23662,12 @@ msgstr "A empresa já possui um diário de abertura contabilizado."msgid "The company has no account defaults."msgstr "A empresa não tem padrões de conta."+msgid "The connection could not be verified"+msgstr "A conexão não pôde ser verificada"++msgid "The connection was refused"+msgstr "A conexão foi recusada"+msgid "The contract cannot be cancelled then"msgstr "O contrato não pode ser cancelado então"@@ -23556,6 +23933,9 @@ msgstr "O endereço https para o qual uma etapa webhook de fluxo de trabalho pubmsgid "The human-readable document number (like J000001 or ECO-000001) minted from a sequence and stored on the record, distinct from its internal id."msgstr "O número de documento legível (como J000001 ou ECO-000001) criado a partir de uma sequência e armazenado no registro, distinto de sua id interna."+msgid "The icon emoji of the bot"+msgstr "O emoji de ícone do bot"+msgid "The identifier the customer uses for this part on their POs; Carbon resolves it to our internal Part ID on order import."msgstr "O identificador que o cliente usa para essa parte nos POs; Carbon o resolve para nosso ID de parte interno na importação de pedidos."@@ -23577,6 +23957,9 @@ msgstr "A regra Incoterm (FOB, DAP, EXW, CIF, …) que governa quem paga o fretemsgid "The Incoterm rule (FOB, DAP, EXW, CIF, …) that governs who pays freight, who bears risk, and where the transfer of title occurs on shipments to this customer."msgstr "A regra Incoterm (FOB, DAP, EXW, CIF, …) que governa quem paga o frete, quem assume o risco e onde ocorre a transferência de propriedade em remessas para este cliente."+msgid "The integration authorized the connection but saving it failed. Try connecting again."+msgstr "A integração autorizou a conexão, mas falhou ao salvá-la. Tente conectar novamente."+msgid "The inventory cost recognized when a shipment posts, valued by the item's costing method."msgstr "O custo de inventário reconhecido quando uma remessa é registrada, avaliado pelo método de custeio do item."@@ -23592,6 +23975,15 @@ msgstr "O item que cada ordem de produção produz — exija que corresponda parmsgid "The item's rental rate"msgstr "A taxa de aluguel do item"+msgid "The items in that list have no field by that name."+msgstr "Os itens dessa lista não têm nenhum campo com esse nome."++msgid "The items in that list have no fields to take."+msgstr "Os itens nessa lista não têm campos para pegar."++msgid "The items in that list have no reading as text."+msgstr "Os itens dessa lista não podem ser lidos como texto."+msgid "the job hours due that day (a due-date basis, not the day the work runs), with overdue work in Past due."msgstr "as horas de trabalho devidas naquele dia (com base na data de vencimento, não no dia em que o trabalho é executado), com trabalho atrasado em Vencido."@@ -23885,6 +24277,9 @@ msgstr "O procedimento que os técnicos seguem quando essa manutenção é execumsgid "The processes this work center can run; appears in process-pickers when scheduling operations, and limits which jobs can route through this work center."msgstr "Os processos que este centro de trabalho pode executar; aparecem em seletores de processo ao agendar operações e limitam quais ordens de produção podem passar por este centro de trabalho."+msgid "The profile picture of the bot"+msgstr "A foto de perfil do bot"+msgid "The provider offers no dimension targets. Enable the feature in the provider first (e.g. tracking categories, class tracking, or fields)."msgstr "O provedor não oferece alvos de dimensão. Habilite o recurso no provedor primeiro (por exemplo, categorias de rastreamento, rastreamento de classe ou campos)."@@ -23986,12 +24381,12 @@ msgstr "A resposta do Onshape não incluía os parâmetros necessários. Tente cmsgid "The response from Ramp was missing required parameters. Try connecting again."msgstr "A resposta do Ramp não incluía os parâmetros necessários. Tente conectar novamente."+msgid "The response was missing required parameters. Try connecting again."+msgstr "A resposta estava faltando parâmetros obrigatórios. Tente conectar novamente."+msgid "The restore job reported this error."msgstr "O trabalho de restauração informou este erro."-msgid "The result will not appear on the Runs page."-msgstr "O resultado não aparecerá na página de Execuções."-msgid "The revision number of the part"msgstr "O número de revisão da peça"@@ -24139,6 +24534,9 @@ msgstr "O sistema que uma empresa usa para gerenciar os logins de suas pessoasmsgid "The system passes every in-scope acceptance test in your configured system, with your data; the data is validated; and you sign off. Then go-live."msgstr "O sistema passa em todos os testes de aceitação no escopo do seu sistema configurado, com seus dados; os dados são validados; e você assina. Depois, entre em operação."+msgid "The text of your message. When using Block Kit blocks, this is used as a fallback for notifications."+msgstr "O texto da sua mensagem. Ao usar blocos do Block Kit, isso é usado como fallback para notificações."+msgid "The thread linking a sales RFQ, its quote, and the resulting sales order — a join, not a document with its own status."msgstr "A ligação conectando um RFQ de vendas, seu orçamento e o pedido de venda resultante — uma conexão, não um documento com seu próprio status."@@ -24220,6 +24618,9 @@ msgstr ""msgid "The US tax depreciation system with IRS property-class tables, run as a separate tax schedule alongside the book schedule."msgstr "O sistema de depreciação fiscal dos EUA com tabelas de classe de propriedade do IRS, executado como um calendário fiscal separado ao lado do calendário contábil."+msgid "The username of the bot"+msgstr "O nome de usuário do bot"+msgid "The users in this group; group-scoped permissions and notifications apply to each member, and users may belong to multiple groups (effective permissions are the union)."msgstr "Os usuários neste grupo; permissões e notificações com escopo de grupo se aplicam a cada membro, e usuários podem pertencer a vários grupos (permissões efetivas são a união)."@@ -24352,6 +24753,11 @@ msgstr "Elas não estão em seu plano de contas, mas documentos ou diários as umsgid "this ability"msgstr "esta habilidade"+msgid "This account has stopped working. Reconnect it — workflow steps using it will fail until you do."+msgstr "Esta conta parou de funcionar. Reconecte-a — as etapas de fluxo de trabalho que a usam falharão até que você faça isso."++msgid "This account needs to be reconnected."+msgstr "Esta conta precisa ser reconectada."msgid "This action cannot run on this list."msgstr ""@@ -24384,6 +24790,9 @@ msgstr "Isto não pode ser alterado depois — {integrationName} permite apenasmsgid "This cannot be undone."msgstr "Isto não pode ser desfeito."+msgid "This Carbon instance is missing its OAuth credentials for this integration. Ask an administrator to set them."+msgstr "Esta instância do Carbon está faltando as credenciais OAuth para esta integração. Peça a um administrador para configurá-las."+msgid "This Carbon instance is missing its Onshape OAuth credentials. Ask an administrator to set them."msgstr "Esta instância do Carbon não tem credenciais OAuth do Onshape. Peça a um administrador para configurá-las."@@ -24442,9 +24851,15 @@ msgstr "Estas informações serão visíveis para todos os usuários, portanto,msgid "this inspection plan"msgstr "este plano de inspeção"+msgid "This integration can't be connected on this Carbon instance."+msgstr "Esta integração não pode ser conectada nesta instância do Carbon."+msgid "This integration isn't available yet"msgstr "Esta integração ainda não está disponível"+msgid "This integration isn't configured"+msgstr "Esta integração não está configurada"+#. placeholder {0}: company?.name ?? "Carbon"msgid "This invitation to join {0} has expired. You can request a new invite to be sent to your email."msgstr "Este convite para se juntar a {0} está vencido. Você pode solicitar um novo convite para ser enviado para seu email."@@ -24627,6 +25042,9 @@ msgstr "Esta estação executa trabalho com requisitos de habilidade — ela funmsgid "This station runs work with no ability requirement; operators assigned on the manning board shape available labor."msgstr "Esta estação executa trabalho sem requisito de habilidade; operadores atribuídos no quadro de pessoal moldam a mão de obra disponível."+msgid "This step expected a list."+msgstr "Esta etapa esperava uma lista."+msgid "This step is part of it"msgstr "Esta etapa é parte disso"@@ -24666,7 +25084,7 @@ msgid "This version cannot be opened"msgstr "Esta versão não pode ser aberta"msgid "This version is published"-msgstr "Esta versão é publicada."+msgstr "Esta versão foi publicada"msgid "This version is published. Create a new version to edit."msgstr "Esta versão está publicada. Crie uma nova versão para editar."@@ -24817,6 +25235,9 @@ msgstr "apertado"msgid "Tightened"msgstr "Severa"+msgid "Time"+msgstr "Hora"+msgid "Time and dollar utilization of the rental fleet by asset and class"msgstr "Utilização de tempo e dólar da frota de aluguel por ativo e classe"@@ -24862,6 +25283,9 @@ msgstr "Inclinar em sua direção"msgid "Title"msgstr "Título"+msgid "Title of the event"+msgstr "Título do evento"+msgid "Title passes to the customer when the term ends."msgstr "O título passa para o cliente quando o prazo termina."@@ -24967,6 +25391,14 @@ msgstr "Tolerância (dias)"msgid "Tomorrow"msgstr "Amanhã"+msgid "Took {took} values; kept the first {kept}."+msgstr "{took} valores obtidos; os primeiros {kept} foram mantidos."++msgid "Took the first of {total}."+msgstr "Obtido o primeiro de {total}."++msgid "Took the last of {total}."+msgstr "Obtido o último de {total}."msgid "Too many exports and bulk actions are running right now. Try again in a few minutes."msgstr "Há muitas exportações e ações em massa em andamento. Tente novamente em alguns minutos."@@ -25298,6 +25730,9 @@ msgstr "Acionadores"msgid "Try a different name."msgstr "Tente um nome diferente."+msgid "Try again"+msgstr "Tente novamente"+msgid "Tuesday"msgstr "Terça-feira"@@ -25368,6 +25803,9 @@ msgstr "Digite <0>\"{confirmPhrase}\"</0> para continuar."msgid "Type a message..."msgstr "Digite uma mensagem..."+msgid "Type a value and press Enter…"+msgstr "Digite um valor e pressione Enter…"+msgid "Type an email and press Enter to add an external recipient"msgstr "Digite um email e pressione Enter para adicionar um destinatário externo"@@ -25449,6 +25887,9 @@ msgstr "Pagamentos sem desconto ainda por vir, por ano fiscal, menos os juros qumsgid "Undo"msgstr "Desfazer"+msgid "Unfurl Links"+msgstr "Desdobrar Links"+msgid "Ungroup"msgstr "Desagrupar"@@ -25969,6 +26410,9 @@ msgstr "Permissões de Usuário"msgid "User roles"msgstr "Funções do usuário"+msgid "Username"+msgstr "Nome de usuário"+msgid "users"msgstr "usuários"@@ -26753,6 +27197,9 @@ msgstr "Quando ativado, esta sobrescrita de preço se aplica aos pedidos correspmsgid "When on, this rule fires for every target of its type. Assignment rows are ignored but preserved."msgstr "Quando ativado, esta regra é acionada para cada alvo do seu tipo. As linhas de atribuição são ignoradas, mas preservadas."+msgid "When replying to a thread, also make the message visible to everyone in the channel (only applicable when Thread Timestamp is provided)"+msgstr "Ao responder a um tópico, também tornar a mensagem visível para todos no canal (aplicável apenas quando o Carimbo de Data e Hora do Tópico é fornecido)"+msgid "When supplier responses are expected back; suppliers see this date on the RFQ portal and Carbon stops accepting late responses after it (configurable)."msgstr "Quando se espera que os fornecedores respondam; os fornecedores veem esta data no portal RFQ e a Carbon para de aceitar respostas tardias depois dela (configurável)."@@ -26924,6 +27371,9 @@ msgstr "Se este trabalho bloqueia a produção (Parada), a degrada (Impacto), esmsgid "Whether to Add the selected permissions on top of what each user already has, or Update by replacing each user's permission set wholesale with the selection below."msgstr "Se as permissões selecionadas forem Adicionadas ao que cada usuário já possui, ou Atualizadas substituindo o conjunto de permissões de cada usuário pela seleção abaixo."+msgid "Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves."+msgstr "Define se os eventos recorrentes são expandidos em instâncias, retornando apenas eventos únicos e instâncias de eventos recorrentes, mas não os próprios eventos recorrentes subjacentes."+msgid "Which document drives each inspection flow for this item."msgstr "Qual documento conduz cada fluxo de inspeção para este item."@@ -27227,6 +27677,9 @@ msgstr "Você pertence a mais de uma empresa. Escolha onde trabalhar."msgid "You can change the UI style any time through the theme setting"msgstr "Você pode alterar o estilo da interface a qualquer momento através da configuração de tema"+msgid "You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.'"+msgstr "Você pode obter o ID do Canal clicando com o botão direito no canal e selecionando \"Visualizar Detalhes do Canal\"."+msgid "You can only see this key once. Store it safely."msgstr "Você só pode ver esta chave uma vez. Guarde-a com segurança."@@ -27278,6 +27731,9 @@ msgstr "Você lidera"msgid "You name a project owner with decision authority"msgstr "Você nomeia um responsável pelo projeto com autoridade de decisão"+msgid "You need permission to edit workflows to load these choices."+msgstr "Você precisa de permissão para editar fluxos de trabalho para carregar estas opções."+msgid "You received this item"msgstr "Você recebeu este item"diff --git a/packages/locale/locales/pt/mes.po b/packages/locale/locales/pt/mes.poindex 7343a11f2d..b4d5d828d2 100644--- a/packages/locale/locales/pt/mes.po+++ b/packages/locale/locales/pt/mes.po@@ -113,6 +113,9 @@ msgstr "Uma conclusão anterior não foi concluída. Tentar novamente retoma asmsgid "About"msgstr "Sobre"+msgid "About this field"+msgstr "Sobre este campo"+msgid "Accept"msgstr "Aceitar"@@ -1234,6 +1237,9 @@ msgstr "Nenhuma manutenção programada para hoje"msgid "No matches. Type to create one."msgstr "Nenhuma correspondência. Digite para criar uma."+msgid "No matching time"+msgstr "Nenhum horário correspondente"+msgid "No materials"msgstr "Nenhum material"@@ -2144,6 +2150,9 @@ msgstr "Miniatura"msgid "Tick the jobs this was done for."msgstr "Marque as ordens de produção para as quais isso foi feito."+msgid "Time"+msgstr "Hora"+msgid "Time and cost split across jobs proportionally to quantity."msgstr "Tempo e custo divididos entre as ordens de produção na proporção da quantidade."diff --git a/packages/locale/locales/ru/erp.po b/packages/locale/locales/ru/erp.poindex 8952d7849a..c9fea99380 100644--- a/packages/locale/locales/ru/erp.po+++ b/packages/locale/locales/ru/erp.po@@ -269,6 +269,10 @@ msgstr "{0} счета-фактур были выставлены в вашейmsgid "{0} is {1}, not Draft or Planned"msgstr ""+#. placeholder {0}: integration.name+msgid "{0} isn't installed yet. There's nothing to configure — install it to connect an account."+msgstr "{0} еще не установлена. Нечего конфигурировать — установите ее, чтобы подключить учетную запись."+#. placeholder {0}: data.quantitymsgid "{0} items marked as picked"msgstr ""@@ -481,6 +485,12 @@ msgstr "{alreadyPlannedItemCount} деталей пропущено — у ниmsgid "{apOverduePct}% of payables"msgstr "{apOverduePct}% кредиторской задолженности"+msgid "{appName} is connected, but needs to be reconnected before workflow steps can use it."+msgstr "{appName} подключен, но требует переподключения перед тем, как этапы рабочего процесса смогут его использовать."++msgid "{appName} isn't connected yet. Connect an account before this step can do anything."+msgstr "{appName} еще не подключена. Подключите учетную запись перед тем, как этот шаг сможет что-то сделать."+msgid "{arOverduePct}% of receivables"msgstr "{arOverduePct}% дебиторской задолженности"@@ -594,6 +604,9 @@ msgstr "{inserted} вставлено, {updated} обновлено, {0} треmsgid "{jobsMissingStorageUnit, plural, one {# open job has materials with no storage unit} other {# open jobs have materials with no storage unit}}"msgstr "{jobsMissingStorageUnit, plural, one {# открытый производственный заказ имеет материалы без единицы хранения} other {# открытых производственных заказов имеют материалы без единиц хранения}}"+msgid "{kept, plural, one {Took # value.} other {Took # values.}}"+msgstr "{kept, plural, one {Взято # значение.} few {Взято # значения.} many {Взято # значений.} other {Взято # значения.}}"+msgid "{label} is used by documents, journals or default accounts, so it cannot be deleted."msgstr "{label} используется документами, операциями или учетными записями по умолчанию, поэтому не может быть удалена."@@ -746,6 +759,9 @@ msgstr "{state} · синхронизировано {syncedAgo}"msgid "{termMonths, plural, one {# month} other {# months}}"msgstr "{termMonths, plural, one {# месяц} few {# месяца} many {# месяцев} other {# месяцев}}"+msgid "{total, plural, one {Joined # value.} other {Joined # values.}}"+msgstr "{total, plural, one {Объединено # значение.} few {Объединено # значения.} many {Объединено # значений.} other {Объединено # значения.}}"+msgid "{total} phases to get your company live on Carbon. Each one ends at a checkpoint."msgstr "{total} этапов для запуска вашей организации на Carbon. Каждый завершается контрольной точкой."@@ -1651,6 +1667,9 @@ msgstr "Пользователь записывает срок годностиmsgid "A variable charge — mileage overage, damage, delivery, cleaning — is billed on the agreement's next invoice."msgstr "Переменная плата — превышение пробега, повреждение, доставка, уборка — выставляется счетом по следующей счет-фактуре договора."+msgid "A workspace can be connected to one Carbon company only. Disconnect it there first, or connect a different workspace."+msgstr "Рабочее пространство можно подключить только к одной организации Carbon. Сначала отключите его там или подключите другое рабочее пространство."+msgid "ABA"msgstr "ABA"@@ -1672,6 +1691,9 @@ msgstr "О программе"msgid "About (notification)"msgstr "О (уведомление)"+msgid "About this field"+msgstr "Об этом поле"+msgid "Absent"msgstr "Отсутствует"@@ -1838,6 +1860,9 @@ msgstr ""msgid "Accounts receivable for amounts owed by customers"msgstr "Дебиторская задолженность за суммы, причитающиеся от покупателей"+msgid "Accounts your workflows can act as. Add one for each account a workflow step should use."+msgstr "Учетные записи, от имени которых могут действовать ваши рабочие процессы. Добавьте одну для каждой учетной записи, которую должен использовать шаг рабочего процесса."+msgid "Accrual"msgstr "Начисление"@@ -2055,6 +2080,9 @@ msgstr "Добавить шаг или вопрос"msgid "Add Ability"msgstr "Добавить навык"+msgid "Add account"+msgstr "Добавить учетную запись"+msgid "Add Account"msgstr "Добавить счет"@@ -2196,6 +2224,10 @@ msgstr "Добавить месяц"msgid "Add Note"msgstr "Добавить примечание"+msgctxt "workflow data step"+msgid "Add operation"+msgstr "Добавить операцию"+msgid "Add Operation"msgstr "Добавить операцию"@@ -2434,6 +2466,9 @@ msgstr "Перейти к {nextStatus}"msgid "Advanced"msgstr "Дополнительно"+msgid "Advanced properties"+msgstr "Дополнительные свойства"+msgid "Affected item not found."msgstr "Затронутый элемент не найден."@@ -2657,6 +2692,12 @@ msgstr "Суммы отображают только значащие цифрыmsgid "An ability is a process's qualification. Only processes without one are listed."msgstr "Навык — это квалификация процесса. Отображаются только процессы без него."+msgid "An account is already called that — pick a different name."+msgstr "Учетная запись уже имеет такое имя — выберите другое имя."++msgid "An account is missing from this list until it is reconnected."+msgstr "Учетная запись отсутствует в этом списке до переподключения."+msgid "An accounting bucket that groups expenses by department or function so the GL can report spend by group, not just by account."msgstr "Бухгалтерская группа, которая группирует расходы по отделам или функциям, позволяя главной книге отчитываться по группам, а не только по счетам."@@ -2822,6 +2863,9 @@ msgstr "Во время подключения к Onshape произошла нmsgid "An unexpected error occurred while connecting to Onshape. Try connecting again."msgstr "При подключении к Onshape произошла непредвиденная ошибка. Повторите попытку подключения."+msgid "An unexpected error occurred while connecting. Try connecting again."+msgstr "При подключении произошла непредвиденная ошибка. Попробуйте подключиться снова."+msgid "Analytics"msgstr "Аналитика"@@ -2839,9 +2883,6 @@ msgstr "И {0} ещё — разрешите эти, чтобы увидетьmsgid "And {0} more. Resolve these to see the rest."msgstr "И еще {0}. Разрешите эти проблемы, чтобы увидеть остальное."-msgid "and {hidden} more"-msgstr "и {hidden} еще"-msgid "and {remaining} more"msgstr "и ещё {remaining}"@@ -2878,6 +2919,9 @@ msgstr "Годовая ставка, по которой аренда дискоmsgid "Annual. Starts from the company's incremental borrowing rate"msgstr "Ежегодно. Начинается с дополнительной ставки заимствования организации"+msgid "Another connection to this integration already has that name. Choose a different one."+msgstr "Другое подключение к этой интеграции уже имеет это имя. Выберите другое."+msgid "Another cost center this one rolls up into, letting you nest a sub-department under its parent for hierarchical cost reporting."msgstr "Еще один центр затрат, в который входит этот, позволяя вложить подразделение под его родительский центр затрат для иерархической отчетности по затратам."@@ -2950,6 +2994,9 @@ msgstr "API-ключи для программного доступа к вашmsgid "API, webhooks, and integrations"msgstr "API, вебхуки и интеграции"+msgid "App"+msgstr "Приложение"+msgid "Appearance"msgstr "Внешний вид"@@ -3882,6 +3929,9 @@ msgstr "Не удалось загрузить вложения"msgid "Attempts"msgstr "Попытки"+msgid "Attendees"+msgstr "Участники"+msgid "Attribute"msgstr "Атрибут"@@ -3924,6 +3974,9 @@ msgstr "Приложение-аутентификатор"msgid "Authenticator QR code"msgstr "QR-код аутентификатора"+msgid "Authorization was refused. Try connecting again."+msgstr "Авторизация отклонена. Попробуйте подключиться снова."+msgid "Authorized overtime on top of the shift"msgstr "Разрешена переработка поверх смены"@@ -3984,6 +4037,9 @@ msgstr "Автоматическое обновление и резервноеmsgid "Automatic, prorated consumption of a job's untracked materials when output is reported — tracked materials are issued manually."msgstr "Автоматическое пропорциональное потребление материалов задания, не отслеживаемых при отчетности о выходе — отслеживаемые материалы выпускаются вручную."+msgid "Automatically create a Google Meet video conference link for this event"+msgstr "Автоматически создать видеоконференцию Google Meet для этого события"+msgid "Automatically release the job when the kanban is scanned"msgstr "Автоматически запустить в работу производственный заказ при сканировании канбана"@@ -4193,6 +4249,9 @@ msgstr "Серии для возврата"msgid "Batching"msgstr "Объединение в серии"+msgid "BCC Email"+msgstr "Скрытая копия"+msgid "Becomes"msgstr "Становится"@@ -4370,6 +4429,12 @@ msgstr "Доска"msgid "Body"msgstr "Тело"+msgid "Body for the email you want to send"+msgstr "Текст письма, которое вы хотите отправить"++msgid "Body Type"+msgstr "Тип тела"+msgid "BoM"msgstr "BoM"@@ -4427,6 +4492,9 @@ msgstr "Навигационная цепочка"msgid "Bring in your parts, BOMs, Bill of Process, and costing — with Carbon's import tools, CSV, or LLM help."msgstr "Импортируйте ваши детали, BOM, перечень операций и калькуляцию — используя инструменты импорта Carbon, CSV или помощь LLM."+msgid "Broadcast reply to channel"+msgstr "Отправить ответ в канал"+msgid "Browse library"msgstr "Обзор библиотеки"@@ -4513,6 +4581,9 @@ msgstr ""msgid "By accepting the invite, you agree to the <0>Terms of Service</0> and <1>Privacy Policy</1>."msgstr "Принимая приглашение, вы соглашаетесь с <0>Условиями обслуживания</0> и <1>Политикой конфиденциальности</1>."+msgid "By default it'll be 30 min post start time"+msgstr "По умолчанию это будет через 30 минут после начала"+msgid "By dimension"msgstr "По измерению"@@ -4881,6 +4952,9 @@ msgstr "Запуск-причина: "msgid "CC"msgstr "CC"+msgid "CC Email"+msgstr "Копия"+msgid "Centralized Billing Address"msgstr "Централизованный адрес выставления счетов"@@ -4998,6 +5072,12 @@ msgstr "Изменение этого обновит ID детали"msgid "Changing type resets this item's draft edits."msgstr "Изменение типа сбрасывает черновые редактирования этого элемента."+msgid "Channel"+msgstr "Канал"++msgid "Channel Name"+msgstr "Имя канала"+msgid "Characteristic"msgstr "Характеристика"@@ -5078,6 +5158,9 @@ msgstr "Контрольная точка ·"msgid "Checkpoints"msgstr "Контрольные точки"+msgid "Choose {named} first."+msgstr "Сначала выберите {named}."+msgid "Choose a backup"msgstr "Выберите резервную копию"@@ -5333,6 +5416,9 @@ msgstr "Свернуть настройку"msgid "Collapse subtree"msgstr "Свернуть поддерево"+msgid "Color"+msgstr "Цвет"+#. placeholder {0}: index + 1msgid "Column {0} of {count}"msgstr "Столбец {0} из {count}"@@ -5594,6 +5680,9 @@ msgstr "Настройте учетные записи по умолчанию,msgid "Configure the start months for your fiscal and tax years"msgstr "Настройте месяцы начала вашего финансового и налогового годов"+msgid "Configure the steps above first."+msgstr "Сначала настройте шаги выше."+msgid "Configure when purchased item costs should be updated from supplier transactions."msgstr "Установить, когда себестоимость закупленной номенклатуры должна обновляться из транзакций поставщика."@@ -5690,6 +5779,9 @@ msgstr "Причина конфликта"msgid "Connect"msgstr "Подключиться"+msgid "Connect {appName}"+msgstr "Подключить {appName}"+msgid "Connect Carbon to your accounting, project management, and CAD tools and much more."msgstr "Подключите Carbon к своим инструментам бухгалтерского учета, управления проектами, CAD и многому другому."@@ -5717,9 +5809,18 @@ msgstr "Подключить внешние инструменты, которыmsgid "Connect your identity provider by pasting either its metadata URL or its raw metadata XML — exactly one of the two."msgstr "Подключите вашего поставщика удостоверений, вставив либо URL его метаданных, либо его необработанный XML-файл метаданных — ровно один из двух."+msgid "Connected before workflows needed extra permissions. Reconnect to grant them — everything else keeps working meanwhile."+msgstr "Соединение до рабочих процессов требовало дополнительных разрешений. Переподключитесь, чтобы предоставить их — остальное продолжит работать."+msgid "Connected to"msgstr "Подключено к"+msgid "Connection"+msgstr "Подключение"++msgid "Connection name"+msgstr "Имя подключения"+msgid "Console Mode"msgstr "Режим консоли"@@ -6336,6 +6437,12 @@ msgstr "Не удалось запустить в работу {0}: {1}"msgid "Could not save"msgstr "Не удалось сохранить"+msgid "Couldn't check whether {appName} is connected."+msgstr "Не удалось проверить, подключено ли приложение {appName}."++msgid "Couldn't complete the connection"+msgstr "Не удалось завершить подключение"+msgid "Couldn't complete the Onshape connection"msgstr "Не удалось завершить подключение к Onshape"@@ -6351,12 +6458,18 @@ msgstr "Не удалось загрузить больше строк"msgid "Couldn't load related documents. Refresh before creating a new one to avoid duplicates."msgstr "Не удалось загрузить связанные документы. Обновите страницу перед созданием нового, чтобы избежать дублирования."+msgid "Couldn't load the choices for this field."+msgstr "Не удалось загрузить варианты для этого поля."+msgid "Couldn't load the provider's dimension targets — check the connection and reload."msgstr "Не удалось загрузить целевые значения измерений поставщика — проверьте соединение и перезагрузите."msgid "Couldn't reschedule the job. Please try again."msgstr "Не удалось перепланировать задание. Пожалуйста, попробуйте еще раз."+msgid "Couldn't save the connection"+msgstr "Не удалось сохранить подключение"+msgid "Couldn't save the Onshape connection"msgstr "Не удалось сохранить подключение к Onshape"@@ -6366,6 +6479,12 @@ msgstr "Не удалось сохранить подключение Onshape Gomsgid "Couldn't save the Ramp connection"msgstr "Не удалось сохранить подключение к Ramp"+msgid "Couldn't start the {name} connection"+msgstr "Не удалось начать подключение к {name}"++msgid "Couldn't start the authorization."+msgstr "Не удалось начать авторизацию."+msgid "Count"msgstr "Количество"@@ -6375,6 +6494,12 @@ msgstr "История подсчета"msgid "Count ID"msgstr "ID подсчета"+msgid "Count items"+msgstr "Подсчет элементов"++msgid "Counted {total}."+msgstr "Подсчитано: {total}."+msgid "Counted Qty"msgstr "Подсчитанное кол-во"@@ -6479,6 +6604,9 @@ msgstr "Создать контракт"msgid "Create Forecast"msgstr "Создать прогноз"+msgid "Create Google Meet Link"+msgstr "Создать ссылку Google Meet"+msgid "Create Issue"msgstr "Создать проблему"@@ -7116,6 +7244,9 @@ msgstr "Дата"msgid "Date Acquired"msgstr "Дата приобретения"+msgid "Date and time"+msgstr "Дата и время"+msgid "Date Calibrated"msgstr "Дата калибровки"@@ -7125,6 +7256,9 @@ msgstr "Дата срока"msgid "Date Due"msgstr "Дата платежа"+msgid "Date from"+msgstr "Дата от"+msgid "Date issued"msgstr "Дата выдачи"@@ -7137,6 +7271,9 @@ msgstr "Дата оплаты"msgid "Date Paid"msgstr "Дата оплаты"+msgid "Date to"+msgstr "Дата до"+msgid "Dates"msgstr "Даты"@@ -8006,6 +8143,9 @@ msgstr "Описание изменения"msgid "Description of Issue"msgstr "Описание проблемы"+msgid "Description of the event. You can use HTML tags here."+msgstr "Описание события. Здесь можно использовать теги HTML."+msgid "Detach"msgstr "Отключить"@@ -8111,6 +8251,9 @@ msgstr "Отклонено"msgid "Disconnect"msgstr "Отключить"+msgid "Disconnected"+msgstr "Отключено"+msgid "Discontinuation date"msgstr "Дата прекращения"@@ -9071,6 +9214,9 @@ msgstr "Электронная почта"msgid "Email Address"msgstr "Адрес электронной почты"+msgid "Email address to set as the \"Reply-To\" header"+msgstr "Адрес электронной почты для установки в качестве заголовка «Ответить»"+msgid "Email Domains"msgstr "Домены электронной почты"@@ -9086,6 +9232,9 @@ msgstr "Отправлено по электронной почте"msgid "Emails"msgstr "Письма"+msgid "Emails of the attendees (guests)"+msgstr "Адреса электронной почты участников (гостей)"+msgid "Emoji"msgstr "Эмодзи"@@ -9155,6 +9304,9 @@ msgstr "Включить цифровые коммерческие предлоmsgid "Enable in Settings"msgstr "Включить в настройках"+msgid "Enable link unfurling for this message"+msgstr "Включить развертывание ссылок для этого сообщения"+msgid "Enable notifications when a sales rule violation is blocked or acknowledged on a quote, sales order, or sales invoice."msgstr "Включите уведомления, когда нарушение правила продаж блокируется или подтверждается в предложении, заказе покупателя или счете-фактуре выданном."@@ -9236,6 +9388,9 @@ msgstr "Завершение"msgid "End Date"msgstr "Дата окончания"+msgid "End date time of the event"+msgstr "Время окончания события"+msgid "End Line"msgstr "Завершить строку"@@ -9568,6 +9723,9 @@ msgstr ""msgid "Event Type"msgstr "Тип события"+msgid "Event types"+msgstr "Типы событий"+msgid "Events"msgstr "События"@@ -9746,6 +9904,9 @@ msgstr "Развернуть строку"msgid "Expand Machine"msgstr "Развернуть Станок"+msgid "Expand Recurring Event?"+msgstr "Развернуть повторяющиеся события?"+msgid "Expand row"msgstr "Развернуть строку"@@ -10584,6 +10745,9 @@ msgstr "Исправьте ошибки в файлах, затем загрузmsgid "Fix these jobs before releasing"msgstr "Исправьте эти производственные заказы перед запуском"+msgid "Fix this"+msgstr "Исправить это"+msgid "Fixed"msgstr "Фиксированный"@@ -11052,6 +11216,12 @@ msgstr "Выверка главной книги"msgid "GL Tie-Out"msgstr "Выверка главной книги"+msgid "Gmail"+msgstr "Gmail"++msgid "Gmail: Send Email"+msgstr "Gmail: отправить письмо"+msgid "Go live right the first time — with our team alongside you"msgstr "Запустите систему с первой попытки — с нашей командой рядом с вами"@@ -11107,6 +11277,15 @@ msgstr "Добрый вечер, {name}."msgid "Good morning, {name}."msgstr "Доброе утро, {name}."+msgid "Google Calendar"+msgstr "Google Календарь"++msgid "Google Calendar: Create Event"+msgstr "Google Calendar: создать событие"++msgid "Google Calendar: Get all Events"+msgstr "Google Calendar: получить все события"+msgid "Google Places API key not configured"msgstr "API-ключ Google Places не настроен"@@ -11167,6 +11346,15 @@ msgstr "Гарантированная остаточная стоимость"msgid "Guaranteed Residual Value"msgstr "Гарантированная ликвидационная стоимость"+msgid "Guests can invite others"+msgstr "Гости могут приглашать других"++msgid "Guests can modify"+msgstr "Гости могут редактировать"++msgid "Guests can see other guests"+msgstr "Гости могут видеть других гостей"+msgid "Guided"msgstr "Управляемый"@@ -11518,6 +11706,9 @@ msgstr "IBAN"msgid "IC Transaction"msgstr "Межкомпанийная операция"+msgid "Icon Emoji"+msgstr "Значок Emoji"+msgid "Id"msgstr "ID"@@ -12282,6 +12473,9 @@ msgstr "находится на или после"msgid "is on or before"msgstr "находится на или до"+msgid "Is Private?"+msgstr "Приватное?"+msgid "Is supplier org group"msgstr "Является группой организаций поставщиков"@@ -12354,6 +12548,9 @@ msgstr ""msgid "It is coming soon. Contact Carbon to have it set up for your company."msgstr "Скоро она станет доступна. Свяжитесь с Carbon, чтобы её настроили для вашей компании."+msgid "It was removed after this page loaded. Reload the page and try again."+msgstr "Его удалили после загрузки этой страницы. Перезагрузите страницу и попробуйте снова."+msgid "It will stop running until you publish a version again. Nothing is deleted."msgstr "Он перестанет работать, пока вы не опубликуете версию снова. Ничего не удаляется."@@ -12550,6 +12747,9 @@ msgstr "Производственные заказы, у которых этаmsgid "Join {0}"msgstr "Присоединиться к {0}"+msgid "Join into text"+msgstr "Присоединиться к тексту"+msgid "Journal"msgstr "Операция"@@ -12616,6 +12816,9 @@ msgstr "Сохранить существующее ценообразованиmsgid "Keep Line"msgstr "Оставить строку"+msgid "Keep matching items"+msgstr "Сохранить соответствующие элементы"+msgid "Keep navigation open"msgstr "Не сворачивать навигацию"@@ -12634,6 +12837,12 @@ msgstr "Сохранить отбор"msgid "Keeps orders, quotes, and settings behind a second check"msgstr "Требует дополнительную проверку для заказов, коммерческих предложений и настроек"+msgid "Kept {kept} of {total}; {unresolved} could not be checked."+msgstr "Оставлено {kept} из {total}; не удалось проверить: {unresolved}."++msgid "Kept {kept} of {total}."+msgstr "Оставлено {kept} из {total}."+msgid "Key"msgstr "Ключ"@@ -14875,6 +15084,9 @@ msgstr "Нет доступа"msgid "No accounts are mapped yet"msgstr "Сопоставленных счетов пока нет"+msgid "No accounts connected yet."+msgstr "Пока не подключено никаких аккаунтов."+msgid "No accounts match your search"msgstr "Ни один счет не соответствует вашему поиску"@@ -14930,6 +15142,9 @@ msgstr "Нет активов. Добавьте каждый актив, на кmsgid "No attachments."msgstr "Нет вложений."+msgid "No authorization code was returned"+msgstr "Код авторизации не был возвращен"+msgid "No available filters"msgstr "Нет доступных фильтров"@@ -15130,6 +15345,9 @@ msgstr "Нет пути отказа — выполнение останавлиmsgid "No fair value entered, counts as not met"msgstr "Не введена справедливая стоимость, считается невыполненным"+msgid "No field was chosen to take."+msgstr "Не выбрано поле для извлечения."+msgid "No fields found."msgstr "Поля не найдены."@@ -15250,6 +15468,9 @@ msgstr "Нет подходящих ячеек"msgid "No matching operations"msgstr "Нет совпадающих операций"+msgid "No matching time"+msgstr "Нет подходящего времени"+msgid "No materials"msgstr "Нет материалов"@@ -15765,6 +15986,9 @@ msgstr "Ничего"msgid "Nothing at this location matches \"{0}\"."msgstr "В этом месте нет ничего, соответствующего \"{0}\"."+msgid "Nothing can work on this result."+msgstr "Ничего не может работать с этим результатом."+msgid "Nothing completed in MES yet"msgstr "В MES пока ничего не завершено"@@ -15798,6 +16022,9 @@ msgstr "Ничего не запланировано — добавьте рабmsgid "Nothing selected yet"msgstr "Ничего не выбрано"+msgid "Nothing to choose yet - <0>set one up in Settings</0>."+msgstr "Пока нечего выбирать - <0>установите в Параметрах</0>."+msgid "Nothing to post for this period."msgstr "Нечего проводить за этот период."@@ -16008,6 +16235,9 @@ msgstr "1 {0} — это сколько {1}?"msgid "One firing of a workflow, recorded step by step with the values each step used and produced, acting throughout with the permissions of the workflow's owner."msgstr "Одно выполнение рабочего процесса, записанное пошагово со значениями, использованными и созданными каждым шагом, выполняющееся с правами доступа владельца рабочего процесса."+msgid "One of your {appName} accounts needs to be reconnected before workflow steps can use it."+msgstr "Один из ваших аккаунтов {appName} требует переподключения перед тем, как этапы рабочего процесса смогут его использовать."+msgid "One or more quantities cannot meet this date"msgstr "Одно или несколько количеств не могут соответствовать этой дате"@@ -16131,6 +16361,9 @@ msgstr "Открыть"msgid "Open ({paymentCurrency})"msgstr "Открыто ({paymentCurrency})"+msgid "Open {appName} accounts"+msgstr "Открыть аккаунты {appName}"+msgid "Open a change notice"msgstr "Открыть Извещение об изменении"@@ -16320,6 +16553,10 @@ msgstr "операция"msgid "Operation"msgstr "Операция"+msgctxt "workflow data step"+msgid "Operation"+msgstr "Операция"+msgid "Operation batch"msgstr "Серия операций"@@ -17129,6 +17366,9 @@ msgstr "Выберите покупателя, тип покупателя илmsgid "Pick a date or leave blank to clear it."msgstr "Выберите дату или оставьте пустым, чтобы очистить."+msgid "Pick a field…"+msgstr "Выберите поле…"+msgid "Pick a list variable…"msgstr "Выберите переменную списка…"@@ -17818,6 +18058,9 @@ msgstr "Производство: приложение для цеха и плаmsgid "Profile"msgstr "Профиль"+msgid "Profile Picture"+msgstr "Фотография профиля"+msgid "Profit Percent"msgstr "Процент прибыли"@@ -17928,6 +18171,9 @@ msgstr "Докажите владение каждым доменом электmsgid "Provide process knowledge and inputs"msgstr "Предоставить знания о процессе и входные данные"+msgid "Provide the ts (timestamp) or link value of the **parent** message to make this message a reply. Do not use the ts value of the reply itself; use its parent instead. For example '1710304378.475129'.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the 'Copy link' option."+msgstr "Укажите ts (временную метку) или значение ссылки сообщения-**родителя**, чтобы сделать это сообщение ответом. Не используйте значение ts самого ответа; используйте вместо этого его родителя. Например, «1710304378.475129». Кроме того, вы можете легко получить ссылку на сообщение, щелкнув на три точки рядом с сообщением-родителем и выбрав опцию «Копировать ссылку»."+msgid "Provide these URLs to your identity provider (Okta, Entra ID, Google Workspace, etc.) when registering Carbon as a SAML application."msgstr "Предоставьте эти URL вашему поставщику удостоверений (Okta, Entra ID, Google Workspace и т. д.) при регистрации Carbon в качестве приложения SAML."@@ -18731,6 +18977,9 @@ msgstr "Полученные количества начинаются с нулmsgid "Received quantity not yet credited. The credit memo is created as a draft."msgstr "Полученное количество еще не зачислено. Кредит-нота создана как черновик."+msgid "Receiver Email (To)"+msgstr "Электронная почта получателя (Кому)"+msgid "Receives the invoice email"msgstr "Получает письмо со счетом-фактурой"@@ -18788,6 +19037,21 @@ msgstr "Сверка заказа поставщику с полученнымиmsgid "Reconfigure"msgstr "Переконфигурировать"+msgid "Reconnect"+msgstr "Переподключить"++msgid "Reconnect {appName}"+msgstr "Переподключить {appName}"++msgid "Reconnect it"+msgstr "Переподключить это"++msgid "Reconnect needed"+msgstr "Требуется переподключение"++msgid "Reconnect with the account this connection already uses, or use Add account to connect the other one."+msgstr "Переподключитесь с учетной записью, которую уже использует это подключение, или подключите другую через «Добавить учетную запись»."+msgid "Record"msgstr "Записать"@@ -18833,9 +19097,16 @@ msgstr "Записи"msgid "Records and posted journals are being sent to and received from this provider."msgstr "Записи и проведенные операции отправляются и получаются от этого поставщика."+msgid "Records here appear as plain text — {appLabel} doesn't support links in this field."+msgstr "Записи здесь отображаются в виде простого текста — {appLabel} не поддерживает ссылки в этом поле."+msgid "Records moved"msgstr "Записи перемещены"+#. placeholder {0}: notice.params.equals+msgid "Records will be plain text. Set {siblingLabel} to {0} (under Advanced) to turn them into links."+msgstr "Записи будут обычным текстом. Установите {siblingLabel} на {0} (в разделе Дополнительно), чтобы превратить их в ссылки."+msgid "Recost"msgstr "Переоценить"@@ -19182,6 +19453,10 @@ msgstr "Убрать полученные серийные номера и ноmsgid "Remove this item"msgstr "Убрать этот элемент"+msgctxt "workflow data step"+msgid "Remove this operation"+msgstr "Удалить эту операцию"+msgid "Remove this storage type from all referencing storage units and delete it. This cannot be undone."msgstr "Удалите этот тип хранения из всех ссылающихся единиц хранения и удалите его. Это невозможно отменить."@@ -19216,6 +19491,9 @@ msgstr "Переименовать"msgid "Rename Workflow"msgstr "Переименовать рабочий процесс"+msgid "Renamed"+msgstr "Переименовано"+msgid "Rendering label preview..."msgstr "Отрисовка предпросмотра этикетки..."@@ -19381,6 +19659,12 @@ msgstr "Способ пополнения"msgid "Replies to emailed invoices go here, and it's copied on each one."msgstr "Ответы на отправленные счета-фактуры отображаются здесь и копируются в каждый счет."+msgid "Reply to Thread (Thread Message Link/Timestamp)"+msgstr "Ответить в тему (ссылка/временная метка сообщения темы)"++msgid "Reply-To Email"+msgstr "Email для ответа"+msgid "Report"msgstr "Отчет"@@ -19925,6 +20209,9 @@ msgstr "Отозвать приглашение"msgid "Revoke Invites"msgstr "Отозвать приглашения"+msgid "Revoked"+msgstr "Отозвано"+msgid "Rework"msgstr "Доработка"@@ -20699,6 +20986,9 @@ msgstr "Поиск деталей поставщика"msgid "Search suppliers..."msgstr "Поиск поставщиков..."+msgid "Search Term"+msgstr "Поисковый термин"+msgid "Search tools..."msgstr "Поиск инструментов..."@@ -20800,6 +21090,9 @@ msgstr "Сначала выберите форму, чтобы увидеть дmsgid "Select a step to hide parts on it."msgstr "Выберите шаг, чтобы скрыть на нем детали."+msgid "Select a step…"+msgstr "Выберите шаг…"+msgid "Select a substance and shape first to see available options"msgstr "Сначала выберите вещество и форму, чтобы увидеть доступные варианты"@@ -20818,6 +21111,9 @@ msgstr "Выбрать все"msgid "Select an action…"msgstr "Выберите действие…"+msgid "Select an app…"+msgstr "Выберите приложение…"+msgid "Select an assignee"msgstr "Выберите исполнителя"@@ -20842,6 +21138,9 @@ msgstr "Выберите операцию…"msgid "Select an option"msgstr "Выберите опцию"+msgid "Select an option…"+msgstr "Выберите опцию…"+msgid "Select at least one item to accept the quote"msgstr "Выберите по крайней мере одну номенклатуру, чтобы принять коммерческое предложение"@@ -20875,6 +21174,9 @@ msgstr "Выберите сотрудника"msgid "Select Employee Type"msgstr "Выберите тип сотрудника"+msgid "Select event types"+msgstr "Выберите типы событий"+msgid "Select field"msgstr "Выберите поле"@@ -20988,7 +21290,7 @@ msgid "Self Managed"msgstr "Самоуправляемый"msgid "Self-hosted or managed"-msgstr "Локальная установка или облачная"+msgstr "Самостоятельно размещенный или управляемый"msgid "Self-onboarding"msgstr "Самостоятельное подключение"@@ -21026,6 +21328,9 @@ msgstr "Отправить приглашение"msgid "Send Invites"msgstr "Отправить приглашения"+msgid "Send Notifications"+msgstr "Отправлять уведомления"+msgid "Send RFQ to Suppliers"msgstr "Отправить РФП поставщикам"@@ -21035,6 +21340,12 @@ msgstr "Отправить в Carbon"msgid "Send Via"msgstr "Отправить через"+msgid "Sender Email"+msgstr "Email отправителя"++msgid "Sender Name"+msgstr "Имя отправителя"+msgid "Sending defective units back to an earlier operation to be corrected instead of scrapping them."msgstr "Отправка дефектных единиц на более раннюю операцию для исправления вместо их утилизации."@@ -21802,6 +22113,18 @@ msgstr ""msgid "Slack"msgstr "Slack"+msgid "Slack: Create Channel"+msgstr "Slack: создать канал"++msgid "Slack: Find User by Email"+msgstr "Slack: найти пользователя по email"++msgid "Slack: Send Message To A Channel"+msgstr "Slack: отправить сообщение в канал"++msgid "Slack: Send Message To A User"+msgstr "Slack: отправить сообщение пользователю"+msgid "Slice asset activity by location, item, or any dimension"msgstr "Разбить активность активов по местоположению, товару или любому измерению"@@ -22041,6 +22364,9 @@ msgstr "Дата начала"msgid "Start Date"msgstr "Дата начала"+msgid "Start date time of the event"+msgstr "Время начала события"+msgid "Start Expiration"msgstr "Начало истечения"@@ -22855,6 +23181,9 @@ msgstr "Теги"msgid "Tailor this hub for the customer. Changes apply live for everyone viewing it. Never shown to the customer here."msgstr "Настройте этот центр для покупателя. Изменения применяются в реальном времени для всех, кто его просматривает. Никогда не показывается покупателю здесь."+msgid "Take one field from every item"+msgstr "Взять одно поле из каждой номенклатуры"+msgid "Take out of service"msgstr "Вывести из эксплуатации"@@ -22868,6 +23197,12 @@ msgstr "Принять собственность"msgid "Take Ownership: {0}"msgstr "Принять собственность: {0}"+msgid "Take the first item"+msgstr "Взять первую номенклатуру"++msgid "Take the last item"+msgstr "Взять последнюю номенклатуру"+msgid "Take the shortest remaining shelf life across the materials consumed to make this item. Use when the product's expiry depends on its ingredients."msgstr "Возьмите кратчайший оставшийся срок хранения из всей используемой номенклатуры для производства этой номенклатуры. Используйте, когда срок годности продукта зависит от его компонентов."@@ -23115,11 +23450,8 @@ msgstr ""msgid "Test run"msgstr "Тестовый запуск"-msgid "Test run — results are not saved to the Runs page"-msgstr "Тестовый запуск — результаты не сохраняются на странице Запусков"--msgid "Test runs are not saved. Close this panel and the result is gone."-msgstr "Тестовые запуски не сохраняются. Закройте эту панель и результат исчезнет."+msgid "Test runs are saved to the run history, marked as tests."+msgstr "Тестовые запуски сохраняются в истории запусков с пометкой «тест»."msgid "Test Value"msgstr "Тестовое значение"@@ -23127,9 +23459,36 @@ msgstr "Тестовое значение"msgid "Text size"msgstr "Размер текста"+msgid "That account is still being reconnected. Try again in a moment."+msgstr "Этот аккаунт все еще переподключается. Повторите попытку через мгновение."++msgid "That account no longer exists"+msgstr "Этот аккаунт больше не существует"++msgid "That connection name is already used"+msgstr "Это имя соединения уже используется"++msgid "That field holds a list of its own. Turn on flattening to take it."+msgstr "Это поле само содержит список. Включите выравнивание, чтобы извлечь его."++msgid "That field holds several values, so they are combined into one list."+msgstr "Это поле содержит несколько значений, поэтому они объединяются в один список."++msgid "That integration is not available"+msgstr "Эта интеграция недоступна"++msgid "That list was empty."+msgstr "Этот список был пуст."+msgid "That name is already used by another step."msgstr "Это имя уже используется другим шагом."+msgid "That workspace is connected to another company"+msgstr "Это рабочее пространство подключено к другой организации"++msgid "That's a different account"+msgstr "Это другая учетная запись"+#. placeholder {0}: i18n._(step.title)msgid "The \"{0}\" phase checks itself off once all of its tasks in the project plan are done."msgstr "Фаза «{0}» помечается как завершенная, когда все её задачи в плане проекта выполнены."@@ -23143,6 +23502,9 @@ msgstr "Фаза «{0}» завершена — её контрольная тоmsgid "The {0} phases to go live, each ending at a checkpoint. Tick off each task as you complete it."msgstr "Фазы {0} до запуска, каждая заканчивается контрольной точкой. Отмечайте каждую задачу по мере её выполнения."+msgid "The {appName} account this step uses is not available — it was disconnected or needs to be reconnected."+msgstr "Аккаунт {appName}, используемый на этом шаге, недоступен — он был отключен или требует переподключения."+msgid "The accent color used across Carbon."msgstr "Цвет акцента, используемый во всём Carbon."@@ -23158,6 +23520,9 @@ msgstr "Счета, на которые Carbon автоматически проmsgid "The action that copies a saved method (its materials, operations, and work instructions) onto a job or quote line."msgstr "Действие копирования сохраненного метода (его материалы, операции и рабочие инструкции) на производственный заказ или строку предложения."+msgid "The address must be listed in your GMail account's settings"+msgstr "Адрес должен быть указан в настройках вашего аккаунта GMail"+msgid "The allowed values for a list-type attribute; users pick from these rather than free-typing."msgstr "Разрешенные значения для атрибута типа списка; пользователи выбирают из них вместо свободного ввода текста."@@ -23179,6 +23544,9 @@ msgstr "Актив переходит в свой класс в эксплуатmsgid "The asset would have a negative cost. Check the purchase price."msgstr "Основное средство имело бы отрицательную себестоимость. Проверьте цену покупки."+msgid "The authorization took too long or came back altered. Start the connection again from this page."+msgstr "Авторизация заняла слишком много времени или вернулась измененной. Начните соединение заново с этой страницы."+msgid "The authorization was refused in Onshape. Save the integration settings to try again."msgstr "Авторизация была отклонена в Onshape. Сохраните настройки интеграции и попробуйте еще раз."@@ -23188,6 +23556,9 @@ msgstr "Авторизация была отклонена в Onshape. Повтmsgid "The authorization was refused in Ramp. Try connecting again."msgstr "Авторизация была отклонена в Ramp. Попробуйте подключиться снова."+msgid "The authorization was rejected"+msgstr "Авторизация была отклонена"+msgid "The average cost of the item. Changing it needs permission to edit parts."msgstr "Средняя себестоимость номенклатуры. Изменение требует права доступа на редактирование деталей."@@ -23291,6 +23662,12 @@ msgstr "У организации уже есть проведённая опеmsgid "The company has no account defaults."msgstr "У организации нет значений по умолчанию для счета."+msgid "The connection could not be verified"+msgstr "Соединение не удалось проверить"++msgid "The connection was refused"+msgstr "Соединение было отклонено"+msgid "The contract cannot be cancelled then"msgstr "Контракт не может быть отменен тогда"@@ -23556,6 +23933,9 @@ msgstr "HTTPS-адрес, на который шаг вебхука рабочеmsgid "The human-readable document number (like J000001 or ECO-000001) minted from a sequence and stored on the record, distinct from its internal id."msgstr "Удобочитаемый номер документа (например J000001 или ECO-000001), созданный из правила нумерации и сохраненный в записи, отличный от его внутреннего идентификатора."+msgid "The icon emoji of the bot"+msgstr "Значок-эмодзи бота"+msgid "The identifier the customer uses for this part on their POs; Carbon resolves it to our internal Part ID on order import."msgstr "Идентификатор, который покупатель использует для этой детали в своих закупочных заказах; Carbon разрешает его на наш внутренний ID детали при импорте заказа."@@ -23577,6 +23957,9 @@ msgstr "Правило Инкотермс (FOB, DAP, EXW, CIF, …), которmsgid "The Incoterm rule (FOB, DAP, EXW, CIF, …) that governs who pays freight, who bears risk, and where the transfer of title occurs on shipments to this customer."msgstr "Правило Инкотермс (FOB, DAP, EXW, CIF, …), которое определяет, кто платит за доставку, кто несет риск и где происходит передача права собственности при отгрузке этому покупателю."+msgid "The integration authorized the connection but saving it failed. Try connecting again."+msgstr "Интеграция авторизовала соединение, но его сохранение не удалось. Попробуйте подключиться снова."+msgid "The inventory cost recognized when a shipment posts, valued by the item's costing method."msgstr "Себестоимость Запасов, признаваемая при проведении Отгрузки, оцениваемая по методу Калькуляции Номенклатуры."@@ -23592,6 +23975,15 @@ msgstr "Номенклатура, которую производит каждыmsgid "The item's rental rate"msgstr "Ставка аренды номенклатуры"+msgid "The items in that list have no field by that name."+msgstr "У элементов этого списка нет поля с таким именем."++msgid "The items in that list have no fields to take."+msgstr "Номенклатура в этом списке не имеет полей для выборки."++msgid "The items in that list have no reading as text."+msgstr "Элементы этого списка нельзя прочитать как текст."+msgid "the job hours due that day (a due-date basis, not the day the work runs), with overdue work in Past due."msgstr "рабочие часы, подлежащие в этот день (на основе даты срока, не дня выполнения работы), с просроченной работой в разделе «Просроченные»."@@ -23885,6 +24277,9 @@ msgstr "Процедура, которую следуют техники приmsgid "The processes this work center can run; appears in process-pickers when scheduling operations, and limits which jobs can route through this work center."msgstr "Процессы, которые может выполнять этот рабочий центр; отображается в программах выбора процессов при планировании операций и ограничивает, какие производственные заказы могут проходить через этот рабочий центр."+msgid "The profile picture of the bot"+msgstr "Изображение профиля бота"+msgid "The provider offers no dimension targets. Enable the feature in the provider first (e.g. tracking categories, class tracking, or fields)."msgstr "Поставщик не предлагает целевые показатели по измерениям. Сначала включите функцию у поставщика (например, категории отслеживания, отслеживание класса или поля)."@@ -23986,12 +24381,12 @@ msgstr "В ответе Onshape отсутствовали обязательнmsgid "The response from Ramp was missing required parameters. Try connecting again."msgstr "В ответе Ramp отсутствовали обязательные параметры. Попробуйте подключиться снова."+msgid "The response was missing required parameters. Try connecting again."+msgstr "В ответе отсутствовали требуемые параметры. Попробуйте подключиться снова."+msgid "The restore job reported this error."msgstr "Задача восстановления сообщила об этой ошибке."-msgid "The result will not appear on the Runs page."-msgstr "Результат не появится на странице Запусков."-msgid "The revision number of the part"msgstr "Номер ревизии детали."@@ -24139,6 +24534,9 @@ msgstr "Система, которую Организация используеmsgid "The system passes every in-scope acceptance test in your configured system, with your data; the data is validated; and you sign off. Then go-live."msgstr "Система проходит все тесты приемки в области охвата в вашей настроенной системе с вашими данными; данные проверяются; и вы подписываете акт. Затем переход в боевую эксплуатацию."+msgid "The text of your message. When using Block Kit blocks, this is used as a fallback for notifications."+msgstr "Текст вашего сообщения. При использовании блоков Block Kit это используется как резервный вариант для уведомлений."+msgid "The thread linking a sales RFQ, its quote, and the resulting sales order — a join, not a document with its own status."msgstr "Цепь, связывающая запрос цен продаж, его коммерческое предложение и результирующий заказ покупателя — соединение, а не документ со своим собственным статусом."@@ -24220,6 +24618,9 @@ msgstr ""msgid "The US tax depreciation system with IRS property-class tables, run as a separate tax schedule alongside the book schedule."msgstr "Американская система налоговой амортизации с таблицами категорий имущества IRS, работающая как отдельный налоговый график вместе с графиком книг."+msgid "The username of the bot"+msgstr "Имя пользователя бота"+msgid "The users in this group; group-scoped permissions and notifications apply to each member, and users may belong to multiple groups (effective permissions are the union)."msgstr "Пользователи в этой группе; права доступа и уведомления уровня группы применяются к каждому члену, и пользователи могут принадлежать к нескольким группам (эффективные права доступа — объединение)."@@ -24352,6 +24753,11 @@ msgstr "Их нет в вашем плане счетов, но документmsgid "this ability"msgstr "этот навык"+msgid "This account has stopped working. Reconnect it — workflow steps using it will fail until you do."+msgstr "Этот аккаунт перестал работать. Переподключите его — шаги рабочего процесса, использующие его, будут сбоить, пока вы этого не сделаете."++msgid "This account needs to be reconnected."+msgstr "Этот аккаунт требует переподключения."msgid "This action cannot run on this list."msgstr ""@@ -24384,6 +24790,9 @@ msgstr "Это нельзя изменить позже — {integrationName} пmsgid "This cannot be undone."msgstr "Это действие невозможно отменить."+msgid "This Carbon instance is missing its OAuth credentials for this integration. Ask an administrator to set them."+msgstr "Этому экземпляру Carbon не хватает учетных данных OAuth для этой интеграции. Попросите администратора установить их."+msgid "This Carbon instance is missing its Onshape OAuth credentials. Ask an administrator to set them."msgstr "В этом экземпляре Carbon отсутствуют учётные данные OAuth для Onshape. Попросите администратора настроить их."@@ -24442,9 +24851,15 @@ msgstr "Эта информация будет видна всем пользоmsgid "this inspection plan"msgstr "этот план контроля"+msgid "This integration can't be connected on this Carbon instance."+msgstr "Эту интеграцию нельзя подключить в этом экземпляре Carbon."+msgid "This integration isn't available yet"msgstr "Эта интеграция пока недоступна"+msgid "This integration isn't configured"+msgstr "Эта интеграция не настроена"+#. placeholder {0}: company?.name ?? "Carbon"msgid "This invitation to join {0} has expired. You can request a new invite to be sent to your email."msgstr "Приглашение присоединиться к {0} истекло. Вы можете запросить отправку нового приглашения на вашу электронную почту."@@ -24627,6 +25042,9 @@ msgstr "Эта станция выполняет работу, требующуmsgid "This station runs work with no ability requirement; operators assigned on the manning board shape available labor."msgstr "Эта станция выполняет работу без требований навыков; операторы, назначенные на таблицу назначений, формируют доступный труд."+msgid "This step expected a list."+msgstr "Этот шаг ожидал список."+msgid "This step is part of it"msgstr "Этот шаг является его частью"@@ -24817,6 +25235,9 @@ msgstr "плотно"msgid "Tightened"msgstr "Усиленный"+msgid "Time"+msgstr "Время"+msgid "Time and dollar utilization of the rental fleet by asset and class"msgstr "Использование арендного парка по времени и стоимости по активам и классам"@@ -24862,6 +25283,9 @@ msgstr "Наклонить к себе"msgid "Title"msgstr "Название"+msgid "Title of the event"+msgstr "Название события"+msgid "Title passes to the customer when the term ends."msgstr "Право собственности переходит к покупателю по окончании срока."@@ -24967,6 +25391,14 @@ msgstr "Допуск (дней)"msgid "Tomorrow"msgstr "Завтра"+msgid "Took {took} values; kept the first {kept}."+msgstr "Взято значений: {took}; оставлены первые {kept}."++msgid "Took the first of {total}."+msgstr "Взят первый из {total}."++msgid "Took the last of {total}."+msgstr "Взят последний из {total}."msgid "Too many exports and bulk actions are running right now. Try again in a few minutes."msgstr "Сейчас выполняется слишком много экспортов и массовых действий. Повторите попытку через несколько минут."@@ -25298,6 +25730,9 @@ msgstr "Триггеры"msgid "Try a different name."msgstr "Попробуйте другое имя."+msgid "Try again"+msgstr "Повторить попытку"+msgid "Tuesday"msgstr "Вторник"@@ -25368,6 +25803,9 @@ msgstr "Введите <0>«{confirmPhrase}»</0> для продолжения.msgid "Type a message..."msgstr "Введите сообщение..."+msgid "Type a value and press Enter…"+msgstr "Введите значение и нажмите Enter…"+msgid "Type an email and press Enter to add an external recipient"msgstr "Введите адрес электронной почты и нажмите Enter, чтобы добавить внешнего получателя"@@ -25449,6 +25887,9 @@ msgstr "Недисконтированные платежи, которые ещmsgid "Undo"msgstr "Отменить"+msgid "Unfurl Links"+msgstr "Развернуть ссылки"+msgid "Ungroup"msgstr "Разгруппировать"@@ -25969,6 +26410,9 @@ msgstr "Права доступа пользователя"msgid "User roles"msgstr "Роли пользователей"+msgid "Username"+msgstr "Имя пользователя"+msgid "users"msgstr "пользователи"@@ -26753,6 +27197,9 @@ msgstr "Если включено, это переопределение ценmsgid "When on, this rule fires for every target of its type. Assignment rows are ignored but preserved."msgstr "Когда включено, это правило срабатывает для каждой цели его типа. Строки назначения игнорируются, но сохраняются."+msgid "When replying to a thread, also make the message visible to everyone in the channel (only applicable when Thread Timestamp is provided)"+msgstr "При ответе в теме сделайте сообщение видимым для всех в канале (применяется только если указана временная метка темы)"+msgid "When supplier responses are expected back; suppliers see this date on the RFQ portal and Carbon stops accepting late responses after it (configurable)."msgstr "Когда ожидается ответ поставщиков; поставщики видят эту дату на портале RFQ, и Carbon перестает принимать поздние ответы после нее (настраивается)."@@ -26924,6 +27371,9 @@ msgstr "Блокирует ли эта работа производство (Вmsgid "Whether to Add the selected permissions on top of what each user already has, or Update by replacing each user's permission set wholesale with the selection below."msgstr "Добавить выбранные права доступа поверх того, что уже имеет каждый пользователь, или Обновить, заменив набор прав доступа каждого пользователя полностью выбором ниже."+msgid "Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves."+msgstr "Разворачивать ли повторяющиеся события в отдельные экземпляры и возвращать только разовые события и экземпляры повторяющихся событий, без самих исходных повторяющихся событий."+msgid "Which document drives each inspection flow for this item."msgstr "Какой документ определяет каждый процесс контроля для этого элемента."@@ -27227,6 +27677,9 @@ msgstr "Вы принадлежите более чем одной органиmsgid "You can change the UI style any time through the theme setting"msgstr "Вы можете изменить стиль интерфейса в любое время через настройку темы"+msgid "You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.'"+msgstr "Вы можете получить ID канала, щелкнув правой кнопкой мыши на канале и выбрав «Просмотр сведений канала»."+msgid "You can only see this key once. Store it safely."msgstr "Вы можете увидеть этот ключ только один раз. Сохраните его в безопасном месте."@@ -27278,6 +27731,9 @@ msgstr "Вы ведете"msgid "You name a project owner with decision authority"msgstr "Вы назначаете ответственного проекта с правом принятия решений"+msgid "You need permission to edit workflows to load these choices."+msgstr "Чтобы загрузить эти варианты, нужно разрешение на редактирование рабочих процессов."+msgid "You received this item"msgstr "Вы получили этот товар"diff --git a/packages/locale/locales/ru/mes.po b/packages/locale/locales/ru/mes.poindex 9fe7db7a39..86b999381b 100644--- a/packages/locale/locales/ru/mes.po+++ b/packages/locale/locales/ru/mes.po@@ -113,6 +113,9 @@ msgstr "Предыдущее выполнение не завершилось.msgid "About"msgstr "О системе"+msgid "About this field"+msgstr "О данном поле"+msgid "Accept"msgstr "Принять"@@ -1234,6 +1237,9 @@ msgstr "На сегодня техобслуживание не запланирmsgid "No matches. Type to create one."msgstr "Совпадений не найдено. Введите текст для создания."+msgid "No matching time"+msgstr "Нет подходящего времени"+msgid "No materials"msgstr "Нет материалов"@@ -2144,6 +2150,9 @@ msgstr "Миниатюра"msgid "Tick the jobs this was done for."msgstr "Отметьте производственные заказы, для которых это было сделано."+msgid "Time"+msgstr "Время"+msgid "Time and cost split across jobs proportionally to quantity."msgstr "Время и себестоимость распределяются между производственными заказами пропорционально количеству."diff --git a/packages/locale/locales/tr/erp.po b/packages/locale/locales/tr/erp.poindex 37e6789398..5fc7b3cf53 100644--- a/packages/locale/locales/tr/erp.po+++ b/packages/locale/locales/tr/erp.po@@ -269,6 +269,10 @@ msgstr "{0} fatura önceki sisteminizde faturalandırıldı ve tekrar taslak olamsgid "{0} is {1}, not Draft or Planned"msgstr ""+#. placeholder {0}: integration.name+msgid "{0} isn't installed yet. There's nothing to configure — install it to connect an account."+msgstr "{0} henüz yüklenmedi. Yapılandırmak için hiçbir şey yok — bir hesabı bağlamak için yükleyin."+#. placeholder {0}: data.quantitymsgid "{0} items marked as picked"msgstr ""@@ -481,6 +485,12 @@ msgstr "{alreadyPlannedItemCount} parça atlandı — bunların zaten açık işmsgid "{apOverduePct}% of payables"msgstr "{apOverduePct}% borçlar"+msgid "{appName} is connected, but needs to be reconnected before workflow steps can use it."+msgstr "{appName} bağlı, ancak iş akışı adımları bunu kullanmadan önce yeniden bağlanması gerekiyor."++msgid "{appName} isn't connected yet. Connect an account before this step can do anything."+msgstr "{appName} henüz bağlanmadı. Bu adımın bir şey yapabilmesi için önce bir hesabı bağlayın."+msgid "{arOverduePct}% of receivables"msgstr "{arOverduePct}% alacakların"@@ -594,6 +604,9 @@ msgstr "{inserted} eklendi, {updated} güncellendi, {0} düzeltme gerekli, {1} amsgid "{jobsMissingStorageUnit, plural, one {# open job has materials with no storage unit} other {# open jobs have materials with no storage unit}}"msgstr "{jobsMissingStorageUnit, plural, one {# açık iş emirinin depolama birimi olmayan malzemeleri var} other {# açık iş emirlerinin depolama birimi olmayan malzemeleri var}}"+msgid "{kept, plural, one {Took # value.} other {Took # values.}}"+msgstr "{kept, plural, one {# değer alındı.} other {# değer alındı.}}"+msgid "{label} is used by documents, journals or default accounts, so it cannot be deleted."msgstr "{label} belgeler, muhasebe fişleri veya varsayılan hesaplar tarafından kullanıldığından silinemez."@@ -746,6 +759,9 @@ msgstr "{state} · {syncedAgo} eşitlendi"msgid "{termMonths, plural, one {# month} other {# months}}"msgstr "{termMonths, plural, one {# ay} other {# ay}}"+msgid "{total, plural, one {Joined # value.} other {Joined # values.}}"+msgstr "{total, plural, one {# değer birleştirildi.} other {# değer birleştirildi.}}"+msgid "{total} phases to get your company live on Carbon. Each one ends at a checkpoint."msgstr "{total} aşama şirketinizi Carbon'da canlı hale getirmek için. Her biri bir kontrol noktasında sona erer."@@ -1217,7 +1233,7 @@ msgid "A Make to Order component whose parts are issued together into the parentmsgstr "Siparişe göre üretim bileşeni, parçaları ana iş emrine birlikte verilen — ayrı yapı yoktur."msgid "A managed cloud-hosted version of Carbon"-msgstr "Carbon'ın yönetilen bulut barındırılan sürümü"+msgstr "Carbon'un yönetilen bulut barındırmalı versiyonu"msgid "A managed version with all the advanced features"msgstr "Tüm gelişmiş özellikleri içeren yönetilen bir sürüm"@@ -1651,6 +1667,9 @@ msgstr "Kullanıcı, mallar alındığında her parti veya seri için son kullanmsgid "A variable charge — mileage overage, damage, delivery, cleaning — is billed on the agreement's next invoice."msgstr "Değişken bir ücret — kilometre fazlası, hasar, teslimat, temizlik — sözleşmenin bir sonraki faturasında faturalandırılır."+msgid "A workspace can be connected to one Carbon company only. Disconnect it there first, or connect a different workspace."+msgstr "Bir çalışma alanı yalnızca bir Carbon şirketine bağlanabilir. Önce oradaki bağlantıyı kesin veya farklı bir çalışma alanı bağlayın."+msgid "ABA"msgstr "ABA"@@ -1672,6 +1691,9 @@ msgstr "Hakkında"msgid "About (notification)"msgstr "Hakkında (bildirim)"+msgid "About this field"+msgstr "Bu alan hakkında"+msgid "Absent"msgstr "Devamsız"@@ -1838,6 +1860,9 @@ msgstr ""msgid "Accounts receivable for amounts owed by customers"msgstr "Müşteriler tarafından borçlu olunan tutarlar için alacak hesapları."+msgid "Accounts your workflows can act as. Add one for each account a workflow step should use."+msgstr "İş akışlarınızın hareket edebileceği hesaplar. İş akışı adımının kullanması gereken her hesap için bir tane ekleyin."+msgid "Accrual"msgstr "Tahakkuk"@@ -2055,6 +2080,9 @@ msgstr "Bir adım veya soru ekle"msgid "Add Ability"msgstr "Yetkinlik Ekle"+msgid "Add account"+msgstr "Hesap ekle"+msgid "Add Account"msgstr "Hesap Ekle"@@ -2196,6 +2224,10 @@ msgstr "Ay Ekle"msgid "Add Note"msgstr "Not Ekle"+msgctxt "workflow data step"+msgid "Add operation"+msgstr "İşlem ekle"+msgid "Add Operation"msgstr "İşlem Ekle"@@ -2434,6 +2466,9 @@ msgstr "{nextStatus} konumuna geç"msgid "Advanced"msgstr "Gelişmiş"+msgid "Advanced properties"+msgstr "Gelişmiş özellikler"+msgid "Affected item not found."msgstr "Etkilenen öğe bulunamadı."@@ -2657,6 +2692,12 @@ msgstr "Tutarlar yalnızca değer taşıyan rakamları gösterir."msgid "An ability is a process's qualification. Only processes without one are listed."msgstr "Bir yetkinlik, bir prosesin niteliğidir. Bunun olmadığı prosesler listelenir."+msgid "An account is already called that — pick a different name."+msgstr "Bir hesap zaten bu adla adlandırılmış — farklı bir ad seçin."++msgid "An account is missing from this list until it is reconnected."+msgstr "Hesap yeniden bağlanana kadar bu listeden eksik."+msgid "An accounting bucket that groups expenses by department or function so the GL can report spend by group, not just by account."msgstr "Giderleri departman veya işlev tarafından gruplandıran ve Büyük Defteri harcamaları hesap yerine grup tarafından rapor etmesine izin veren bir muhasebe kategorisi."@@ -2822,6 +2863,9 @@ msgstr "Onshape'e bağlanırken beklenmedik bir hata oluştu. Tekrar denemek içmsgid "An unexpected error occurred while connecting to Onshape. Try connecting again."msgstr "Onshape'e bağlanırken beklenmeyen bir hata oluştu. Yeniden bağlanmayı deneyin."+msgid "An unexpected error occurred while connecting. Try connecting again."+msgstr "Bağlanırken beklenmeyen bir hata oluştu. Tekrar bağlanmayı deneyin."+msgid "Analytics"msgstr "Analitik"@@ -2839,9 +2883,6 @@ msgstr "Ve {0} tane daha — bunları çözmek için geri kalanını görmek içmsgid "And {0} more. Resolve these to see the rest."msgstr "Ve {0} tane daha. Geri kalanını görmek için bunları çözün."-msgid "and {hidden} more"-msgstr "ve {hidden} tane daha"-msgid "and {remaining} more"msgstr "ve daha fazla"@@ -2878,6 +2919,9 @@ msgstr "Kiranın iskonto yapıldığı yıllık oran"msgid "Annual. Starts from the company's incremental borrowing rate"msgstr "Yıllık. Şirketin marjinal borçlanma oranından başlar"+msgid "Another connection to this integration already has that name. Choose a different one."+msgstr "Bu entegrasyon için başka bir bağlantı zaten bu adı taşıyor. Farklı birini seçin."+msgid "Another cost center this one rolls up into, letting you nest a sub-department under its parent for hierarchical cost reporting."msgstr "Bu toplandığı başka bir maliyet merkezi, hiyerarşik maliyet raporlaması için bir alt maliyet merkezini ana kütesinin altında iç içe geçirmenizi sağlar."@@ -2948,6 +2992,9 @@ msgid "API keys for programmatic access to your Carbon data."msgstr "Carbon verilerinize programatik erişim için API anahtarları."msgid "API, webhooks, and integrations"+msgstr "API, webhooks ve entegrasyonlar"++msgid "App"msgstr "API, webhook'lar ve entegrasyonlar"msgid "Appearance"@@ -3882,6 +3929,9 @@ msgstr "Ekler yüklenemedi"msgid "Attempts"msgstr "Denemeler"+msgid "Attendees"+msgstr "Katılımcılar"+msgid "Attribute"msgstr "Öznitelik"@@ -3924,6 +3974,9 @@ msgstr "Kimlik Doğrulayıcı Uygulaması"msgid "Authenticator QR code"msgstr "Doğrulayıcı QR kodu"+msgid "Authorization was refused. Try connecting again."+msgstr "Yetkilendirme reddedildi. Tekrar bağlanmayı deneyin."+msgid "Authorized overtime on top of the shift"msgstr "Vardiyayı çok aşan yetkili fazla mesai"@@ -3984,6 +4037,9 @@ msgstr "Otomatik güncellemeler ve yedeklemeler"msgid "Automatic, prorated consumption of a job's untracked materials when output is reported — tracked materials are issued manually."msgstr "Çıktı raporlandığında bir işin izlenmeyen malzemelerin otomatik, orantılı tüketimi — izlenen malzeme el ile verilir."+msgid "Automatically create a Google Meet video conference link for this event"+msgstr "Bu etkinlik için otomatik olarak bir Google Meet video konferans bağlantısı oluştur"+msgid "Automatically release the job when the kanban is scanned"msgstr "Kanban taranmış olduğunda işi otomatik olarak serbest bırak"@@ -4193,6 +4249,9 @@ msgstr "İade edilecek partiler"msgid "Batching"msgstr "Partileme"+msgid "BCC Email"+msgstr "BCC E-posta"+msgid "Becomes"msgstr "Olur"@@ -4370,6 +4429,12 @@ msgstr "Pano"msgid "Body"msgstr "Gövde"+msgid "Body for the email you want to send"+msgstr "Göndermek istediğiniz e-postanın gövdesi"++msgid "Body Type"+msgstr "Gövde Türü"+msgid "BoM"msgstr "BOM"@@ -4427,6 +4492,9 @@ msgstr "Sayfa Yolu"msgid "Bring in your parts, BOMs, Bill of Process, and costing — with Carbon's import tools, CSV, or LLM help."msgstr "Parçalarınızı, BOM'ları, Operasyon listesini ve maliyetlendirmeyi getirin — Carbon'ın içe aktarma araçları, CSV veya LLM yardımıyla."+msgid "Broadcast reply to channel"+msgstr "Kanala yayın cevabı"+msgid "Browse library"msgstr "Kütüphaneyi göz at"@@ -4513,6 +4581,9 @@ msgstr ""msgid "By accepting the invite, you agree to the <0>Terms of Service</0> and <1>Privacy Policy</1>."msgstr "Davetiyeyi kabul ederek, <0>Hizmet Şartları</0> ve <1>Gizlilik Politikası</1>'na katılırsınız."+msgid "By default it'll be 30 min post start time"+msgstr "Varsayılan olarak başlangıç saatinden 30 dakika sonra olacak"+msgid "By dimension"msgstr "Boyuta göre"@@ -4881,6 +4952,9 @@ msgstr "Neden olan çalıştırma: "msgid "CC"msgstr "Bilgi"+msgid "CC Email"+msgstr "CC E-posta"+msgid "Centralized Billing Address"msgstr "Merkezi Faturalama Adresi"@@ -4998,6 +5072,12 @@ msgstr "Bunu değiştirmek parça kimliğini güncelleyecektir"msgid "Changing type resets this item's draft edits."msgstr "Türü değiştirmek bu öğenin taslak düzenlemelerini sıfırlar."+msgid "Channel"+msgstr "Kanal"++msgid "Channel Name"+msgstr "Kanal Adı"+msgid "Characteristic"msgstr "Özellik"@@ -5078,6 +5158,9 @@ msgstr "Kontrol Noktası ·"msgid "Checkpoints"msgstr "Kontrol Noktaları"+msgid "Choose {named} first."+msgstr "Önce {named} seçin."+msgid "Choose a backup"msgstr "Yedek seçin"@@ -5333,6 +5416,9 @@ msgstr "Kurulumu Daralt"msgid "Collapse subtree"msgstr "Alt ağacı daralt"+msgid "Color"+msgstr "Renk"+#. placeholder {0}: index + 1msgid "Column {0} of {count}"msgstr "Sütun {0} / {count}"@@ -5594,6 +5680,9 @@ msgstr "Sisteminizdeki çeşitli işlem türleri için kullanılan varsayılan hmsgid "Configure the start months for your fiscal and tax years"msgstr "Mali ve vergi yıllarının başlangıç aylarını yapılandırın"+msgid "Configure the steps above first."+msgstr "Önce yukarıdaki adımları yapılandırın."+msgid "Configure when purchased item costs should be updated from supplier transactions."msgstr "Satın alınan ürün maliyetlerinin tedarikçi işlemlerinden ne zaman güncelleneceğini yapılandırın."@@ -5690,6 +5779,9 @@ msgstr "Çatışma nedeni"msgid "Connect"msgstr "Bağlan"+msgid "Connect {appName}"+msgstr "{appName} bağla"+msgid "Connect Carbon to your accounting, project management, and CAD tools and much more."msgstr "Carbon'ı muhasebe, proje yönetimi ve CAD araçlarınızla ve çok daha fazlasıyla bağlayın."@@ -5717,9 +5809,18 @@ msgstr "Şirketinizin zaten kullandığı dış araçları bağlayın"msgid "Connect your identity provider by pasting either its metadata URL or its raw metadata XML — exactly one of the two."msgstr "Kimlik sağlayıcınızı, meta veri URL'sini veya ham meta veri XML'sini yapıştırarak bağlayın — ikisinden tam olarak birini yapıştırın."+msgid "Connected before workflows needed extra permissions. Reconnect to grant them — everything else keeps working meanwhile."+msgstr "İş akışlarından önce bağlanan ek izinler gerekiyordu. Bunları vermek için yeniden bağlanın — diğer her şey arada çalışmaya devam eder."+msgid "Connected to"msgstr "Bağlı"+msgid "Connection"+msgstr "Bağlantı"++msgid "Connection name"+msgstr "Bağlantı adı"+msgid "Console Mode"msgstr "Konsol Modu"@@ -6336,6 +6437,12 @@ msgstr "{0} serbest bırakılamadı: {1}"msgid "Could not save"msgstr "Kaydedilemedi"+msgid "Couldn't check whether {appName} is connected."+msgstr "{appName} uygulamasının bağlı olup olmadığı kontrol edilemedi."++msgid "Couldn't complete the connection"+msgstr "Bağlantı tamamlanamadı"+msgid "Couldn't complete the Onshape connection"msgstr "Onshape bağlantısı tamamlanamadı"@@ -6351,12 +6458,18 @@ msgstr "Daha fazla satır yüklenemedi"msgid "Couldn't load related documents. Refresh before creating a new one to avoid duplicates."msgstr "İlgili belgeler yüklenemedi. Yinelemelerden kaçınmak için yeni bir tane oluşturmadan önce yenileyin."+msgid "Couldn't load the choices for this field."+msgstr "Bu alan için seçenekler yüklenemedi."+msgid "Couldn't load the provider's dimension targets — check the connection and reload."msgstr "Sağlayıcının boyut hedefleri yüklenemedi — bağlantıyı kontrol edin ve sayfayı yeniden yükleyin."msgid "Couldn't reschedule the job. Please try again."msgstr "İş yeniden planlanamadı. Lütfen tekrar deneyin."+msgid "Couldn't save the connection"+msgstr "Bağlantı kaydedilemedi"+msgid "Couldn't save the Onshape connection"msgstr "Onshape bağlantısı kaydedilemedi"@@ -6366,6 +6479,12 @@ msgstr "Onshape Government bağlantısı kaydedilemedi"msgid "Couldn't save the Ramp connection"msgstr "Ramp bağlantısı kaydedilemedi"+msgid "Couldn't start the {name} connection"+msgstr "{name} bağlantısı başlatılamadı"++msgid "Couldn't start the authorization."+msgstr "Yetkilendirme başlatılamadı."+msgid "Count"msgstr "Adet"@@ -6375,6 +6494,12 @@ msgstr "Sayım Geçmişi"msgid "Count ID"msgstr "Sayım Kimliği"+msgid "Count items"+msgstr "Öğeleri say"++msgid "Counted {total}."+msgstr "{total} sayıldı."+msgid "Counted Qty"msgstr "Sayılan Mik."@@ -6479,6 +6604,9 @@ msgstr "Sözleşme Oluştur"msgid "Create Forecast"msgstr "Tahmin Oluştur"+msgid "Create Google Meet Link"+msgstr "Google Meet Bağlantısı Oluştur"+msgid "Create Issue"msgstr "Sorun Oluştur"@@ -7116,6 +7244,9 @@ msgstr "Tarih"msgid "Date Acquired"msgstr "Edinme Tarihi"+msgid "Date and time"+msgstr "Tarih ve saat"+msgid "Date Calibrated"msgstr "Kalibrasyon Tarihi"@@ -7125,6 +7256,9 @@ msgstr "Son tarih"msgid "Date Due"msgstr "Vade Tarihi"+msgid "Date from"+msgstr "Başlangıç tarihi"+msgid "Date issued"msgstr "Yayın tarihi"@@ -7137,6 +7271,9 @@ msgstr "Ödeme tarihi"msgid "Date Paid"msgstr "Ödeme Tarihi"+msgid "Date to"+msgstr "Bitiş tarihi"+msgid "Dates"msgstr "Tarihler"@@ -8006,6 +8143,9 @@ msgstr "Değişiklimin Açıklaması"msgid "Description of Issue"msgstr "Sorun Açıklaması"+msgid "Description of the event. You can use HTML tags here."+msgstr "Etkinliğin açıklaması. Burada HTML etiketleri kullanabilirsiniz."+msgid "Detach"msgstr "Ayır"@@ -8111,6 +8251,9 @@ msgstr "İptal edildi"msgid "Disconnect"msgstr "Bağlantıyı kes"+msgid "Disconnected"+msgstr "Bağlantı kesildi"+msgid "Discontinuation date"msgstr "Kullanımdan kaldırılma tarihi"@@ -9071,6 +9214,9 @@ msgstr "E-posta"msgid "Email Address"msgstr "E-posta Adresi"+msgid "Email address to set as the \"Reply-To\" header"+msgstr "\"Yanıtla\" başlığı olarak ayarlanacak e-posta adresi"+msgid "Email Domains"msgstr "E-posta Etki Alanları"@@ -9086,6 +9232,9 @@ msgstr "E-posta ile gönderildi"msgid "Emails"msgstr "E-posta Adresleri"+msgid "Emails of the attendees (guests)"+msgstr "Katılımcıların e-postaları (misafirler)"+msgid "Emoji"msgstr "Emoji"@@ -9155,6 +9304,9 @@ msgstr "Şirketiniz için dijital teklifleri etkinleştirin. Bu, müşterilerinimsgid "Enable in Settings"msgstr "Ayarlarda Etkinleştir"+msgid "Enable link unfurling for this message"+msgstr "Bu ileti için bağlantı açılmasını etkinleştir"+msgid "Enable notifications when a sales rule violation is blocked or acknowledged on a quote, sales order, or sales invoice."msgstr "Bir teklif, satış siparişi veya satış faturasında bir satış kuralı ihlali engellendiğinde veya onaylandığında bildirimleri etkinleştirin."@@ -9236,6 +9388,9 @@ msgstr "Son"msgid "End Date"msgstr "Bitiş Tarihi"+msgid "End date time of the event"+msgstr "Etkinliğin bitiş tarihi ve saati"+msgid "End Line"msgstr "Satırı sonlandır"@@ -9568,6 +9723,9 @@ msgstr ""msgid "Event Type"msgstr "Olay Türü"+msgid "Event types"+msgstr "Olay türleri"+msgid "Events"msgstr "Etkinlikler"@@ -9746,6 +9904,9 @@ msgstr "Satırı genişlet"msgid "Expand Machine"msgstr "Makineyi Genişlet"+msgid "Expand Recurring Event?"+msgstr "Tekrarlanan Olaylar Genişletilsin mi?"+msgid "Expand row"msgstr "Satırı Genişlet"@@ -10584,6 +10745,9 @@ msgstr "Bunları dosyalarda düzeltin, ardından yeniden yükleyin"msgid "Fix these jobs before releasing"msgstr "Serbest bırakmadan önce bu iş emirlerini düzeltin"+msgid "Fix this"+msgstr "Bunu onar"+msgid "Fixed"msgstr "Sabit"@@ -11052,6 +11216,12 @@ msgstr "Muhasebe mutabakatı"msgid "GL Tie-Out"msgstr "Muhasebe Mutabakatı"+msgid "Gmail"+msgstr "Gmail"++msgid "Gmail: Send Email"+msgstr "Gmail: E-posta Gönder"+msgid "Go live right the first time — with our team alongside you"msgstr "İlk seferde canlı yayına geç — ekibimiz yanınızda"@@ -11107,6 +11277,15 @@ msgstr "İyi akşamlar, {name}."msgid "Good morning, {name}."msgstr "Günaydın, {name}."+msgid "Google Calendar"+msgstr "Google Calendar"++msgid "Google Calendar: Create Event"+msgstr "Google Calendar: Etkinlik Oluştur"++msgid "Google Calendar: Get all Events"+msgstr "Google Calendar: Tüm Etkinlikleri Al"+msgid "Google Places API key not configured"msgstr "Google Yerler API anahtarı yapılandırılmamış"@@ -11167,6 +11346,15 @@ msgstr "Garantili Kalıntı Değer"msgid "Guaranteed Residual Value"msgstr "Garantili Kalıntı Değer"+msgid "Guests can invite others"+msgstr "Konuklar başkalarını davet edebilir"++msgid "Guests can modify"+msgstr "Konuklar değiştirebilir"++msgid "Guests can see other guests"+msgstr "Konuklar diğer konukları görebilir"+msgid "Guided"msgstr "Rehberli"@@ -11518,6 +11706,9 @@ msgstr "IBAN"msgid "IC Transaction"msgstr "Şirketler Arası İşlem"+msgid "Icon Emoji"+msgstr "Simge Emojisi"+msgid "Id"msgstr "Id"@@ -12282,6 +12473,9 @@ msgstr "şu tarihte veya sonrasında"msgid "is on or before"msgstr "şu tarihte veya öncesinde"+msgid "Is Private?"+msgstr "Özel mi?"+msgid "Is supplier org group"msgstr "Tedarikçi kuruluş grubu mu"@@ -12354,6 +12548,9 @@ msgstr ""msgid "It is coming soon. Contact Carbon to have it set up for your company."msgstr "Yakında kullanıma sunulacak. Şirketiniz için kurulması için Carbon ile iletişime geçin."+msgid "It was removed after this page loaded. Reload the page and try again."+msgstr "Bu sayfa yüklendikten sonra kaldırıldı. Sayfayı yeniden yükleyin ve tekrar deneyin."+msgid "It will stop running until you publish a version again. Nothing is deleted."msgstr "Yeniden bir sürüm yayınlayana kadar çalışmayı durdurur. Hiçbir şey silinmez."@@ -12550,6 +12747,9 @@ msgstr "Bu stok kartının ürün ağacında bulunduğu iş emirleri"msgid "Join {0}"msgstr "Join {0}"+msgid "Join into text"+msgstr "Metne katıl"+msgid "Journal"msgstr "Muhasebe fişi"@@ -12616,6 +12816,9 @@ msgstr "Mevcut fiyatlandırmayı koru, yalnızca yeni öğeler ekle"msgid "Keep Line"msgstr "Satırı koru"+msgid "Keep matching items"+msgstr "Eşleşen öğeleri sakla"+msgid "Keep navigation open"msgstr "Gezinmeyi açık tut"@@ -12634,6 +12837,12 @@ msgstr "Toplamaya devam et"msgid "Keeps orders, quotes, and settings behind a second check"msgstr "Siparişleri, teklifleri ve ayarları ikinci bir kontrolün arkasında tutar"+msgid "Kept {kept} of {total}; {unresolved} could not be checked."+msgstr "{total} içinden {kept} tutuldu; {unresolved} kontrol edilemedi."++msgid "Kept {kept} of {total}."+msgstr "{total} içinden {kept} tutuldu."+msgid "Key"msgstr "Anahtar"@@ -14875,6 +15084,9 @@ msgstr "Erişim Yok"msgid "No accounts are mapped yet"msgstr "Henüz eşlenmiş hesap yok"+msgid "No accounts connected yet."+msgstr "Henüz hiçbir hesap bağlanmadı."+msgid "No accounts match your search"msgstr "Aramanızla eşleşen hesap yok"@@ -14930,6 +15142,9 @@ msgstr "Henüz varlık yok. Kiralamadaki her varlığı ve bunun için ödediğimsgid "No attachments."msgstr "Ek ekli değil."+msgid "No authorization code was returned"+msgstr "Yetkilendirme kodu döndürülmedi"+msgid "No available filters"msgstr "Kullanılabilir filtre yok"@@ -15130,6 +15345,9 @@ msgstr "Hata yolu yok — çalıştırma burada durur ve başarısız olarak işmsgid "No fair value entered, counts as not met"msgstr "Adil değer girilmedi, karşılanmadı olarak sayılır"+msgid "No field was chosen to take."+msgstr "Alınacak bir alan seçilmedi."+msgid "No fields found."msgstr "Bul alan bulunamadı."@@ -15250,6 +15468,9 @@ msgstr "Eşleşen göz yok"msgid "No matching operations"msgstr "Eşleşen operasyon yok"+msgid "No matching time"+msgstr "Eşleşen saat yok"+msgid "No materials"msgstr "Malzeme yok"@@ -15765,6 +15986,9 @@ msgstr "Hiçbir şey"msgid "Nothing at this location matches \"{0}\"."msgstr "Bu konumda \"{0}\" ile eşleşen hiçbir şey yok."+msgid "Nothing can work on this result."+msgstr "Bu sonuç üzerinde hiçbir şey çalışamaz."+msgid "Nothing completed in MES yet"msgstr "MES'te henüz hiçbir şey tamamlanmadı"@@ -15798,6 +16022,9 @@ msgstr "Hiçbir şey zamanlanmadı — aşağıya bir istasyon ekleyin."msgid "Nothing selected yet"msgstr "Henüz hiçbir şey seçilmedi"+msgid "Nothing to choose yet - <0>set one up in Settings</0>."+msgstr "Henüz seçilecek bir şey yok - <0>Ayarlar'da birini kurun</0>."+msgid "Nothing to post for this period."msgstr "Bu dönem için muhasebeleştirecek bir şey yok."@@ -16008,6 +16235,9 @@ msgstr "1 {0} kaç {1} eder?"msgid "One firing of a workflow, recorded step by step with the values each step used and produced, acting throughout with the permissions of the workflow's owner."msgstr "Bir iş akışının bir kez çalıştırılması, her adımın kullandığı ve ürettiği değerlerle adım adım kaydedilmiş, iş akışının sahibinin izinleriyle hareket eder."+msgid "One of your {appName} accounts needs to be reconnected before workflow steps can use it."+msgstr "{appName} hesaplarınızdan biri iş akışı adımları bunu kullanmadan önce yeniden bağlanması gerekiyor."+msgid "One or more quantities cannot meet this date"msgstr "Bir veya daha fazla miktar bu tarihi karşılayamıyor"@@ -16131,6 +16361,9 @@ msgstr "Aç"msgid "Open ({paymentCurrency})"msgstr "Açık ({paymentCurrency})"+msgid "Open {appName} accounts"+msgstr "{appName} hesaplarını aç"+msgid "Open a change notice"msgstr "Bir değişiklik bildirisi aç"@@ -16320,6 +16553,10 @@ msgstr "operasyon"msgid "Operation"msgstr "Operasyon"+msgctxt "workflow data step"+msgid "Operation"+msgstr "İşlem"+msgid "Operation batch"msgstr "Operasyon partisi"@@ -17129,6 +17366,9 @@ msgstr "Fiyatlarını görüntülemek için bir müşteri, bir müşteri türümsgid "Pick a date or leave blank to clear it."msgstr "Bir tarih seçin veya temizlemek için boş bırakın."+msgid "Pick a field…"+msgstr "Bir alan seçin…"+msgid "Pick a list variable…"msgstr "Bir liste değişkeni seçin…"@@ -17818,6 +18058,9 @@ msgstr "Üretim: atölye uygulaması ve planlama"msgid "Profile"msgstr "Profil"+msgid "Profile Picture"+msgstr "Profil Resmi"+msgid "Profit Percent"msgstr "Kar Yüzdesi"@@ -17928,6 +18171,9 @@ msgstr "Her bir e-posta etki alanının sahipliğini kanıtlayın - SAML SSO otumsgid "Provide process knowledge and inputs"msgstr "Süreç bilgisi ve girdileri sağlayın"+msgid "Provide the ts (timestamp) or link value of the **parent** message to make this message a reply. Do not use the ts value of the reply itself; use its parent instead. For example '1710304378.475129'.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the 'Copy link' option."+msgstr "Bu mesajı bir yanıt yapmak için **ana** mesajın ts (zaman damgası) veya bağlantı değerini sağlayın. Yanıtın kendisinin ts değerini kullanmayın; bunun yerine ana değerini kullanın. Örneğin '1710304378.475129'. Alternatif olarak, ana mesajın yanında bulunan üç noktaya tıklayarak ve 'Bağlantıyı kopyala' seçeneğini seçerek mesaj bağlantısını kolayca alabilirsiniz."+msgid "Provide these URLs to your identity provider (Okta, Entra ID, Google Workspace, etc.) when registering Carbon as a SAML application."msgstr "Carbon'u bir SAML uygulaması olarak kaydederken bu URL'leri kimlik sağlayıcınıza (Okta, Entra ID, Google Workspace, vb.) sağlayın."@@ -18731,6 +18977,9 @@ msgstr "Alınan miktarlar sıfır ile başlar"msgid "Received quantity not yet credited. The credit memo is created as a draft."msgstr "Alınan Miktar henüz Alacak dekontusunda muhasebeleştirilmedi. Alacak dekontu Taslak olarak oluşturuldu."+msgid "Receiver Email (To)"+msgstr "Alıcı E-posta (Kime)"+msgid "Receives the invoice email"msgstr "Fatura e-postasını alır"@@ -18788,6 +19037,21 @@ msgstr "Satın alma siparişinin alınan ve faturalandırılana karşı uzlaştmsgid "Reconfigure"msgstr "Yeniden Yapılandır"+msgid "Reconnect"+msgstr "Yeniden bağlan"++msgid "Reconnect {appName}"+msgstr "{appName} yeniden bağlan"++msgid "Reconnect it"+msgstr "Yeniden bağlan"++msgid "Reconnect needed"+msgstr "Yeniden bağlantı gerekli"++msgid "Reconnect with the account this connection already uses, or use Add account to connect the other one."+msgstr "Bu bağlantının zaten kullandığı hesapla yeniden bağlanın ya da diğerini bağlamak için Hesap ekle'yi kullanın."+msgid "Record"msgstr "Kayıt"@@ -18833,9 +19097,16 @@ msgstr "Kayıtlar"msgid "Records and posted journals are being sent to and received from this provider."msgstr "Kayıtlar ve muhasebeleştirilmiş muhasebe fişleri bu sağlayıcı ile gönderiliyor ve alınıyor."+msgid "Records here appear as plain text — {appLabel} doesn't support links in this field."+msgstr "Buradaki kayıtlar düz metin olarak görünür — {appLabel} bu alanda bağlantıları desteklemez."+msgid "Records moved"msgstr "Taşınan kayıtlar"+#. placeholder {0}: notice.params.equals+msgid "Records will be plain text. Set {siblingLabel} to {0} (under Advanced) to turn them into links."+msgstr "Kayıtlar düz metin olacaktır. Bunları bağlantılara dönüştürmek için {siblingLabel} öğesini {0} olarak ayarlayın (Gelişmiş seçenekler altında)."+msgid "Recost"msgstr "Maliyeti Yeniden Hesapla"@@ -19182,6 +19453,10 @@ msgstr "Alınan seri numaraları ve parti numaralarını stoktan kaldır"msgid "Remove this item"msgstr "Bu stok kartını kaldır"+msgctxt "workflow data step"+msgid "Remove this operation"+msgstr "Bu işlemi kaldır"+msgid "Remove this storage type from all referencing storage units and delete it. This cannot be undone."msgstr "Bu depolama türünü tüm referans veren depolama birimlerinden kaldırır ve siler. Bu geri alınamaz."@@ -19216,6 +19491,9 @@ msgstr "Yeniden adlandır"msgid "Rename Workflow"msgstr "İş Akışını Yeniden Adlandır"+msgid "Renamed"+msgstr "Yeniden adlandırıldı"+msgid "Rendering label preview..."msgstr "Etiket önizlemesi oluşturuluyor..."@@ -19381,6 +19659,12 @@ msgstr "İkmal Yöntemi"msgid "Replies to emailed invoices go here, and it's copied on each one."msgstr "E-posta ile gönderilen faturalara verilen yanıtlar buraya gelir ve her birine kopyalanır."+msgid "Reply to Thread (Thread Message Link/Timestamp)"+msgstr "İş Akışına Yanıt Ver (İş Akışı İletisi Bağlantısı/Zaman Damgası)"++msgid "Reply-To Email"+msgstr "Yanıtla E-postası"+msgid "Report"msgstr "Rapor"@@ -19925,6 +20209,9 @@ msgstr "Davetlemeyi İptal Et"msgid "Revoke Invites"msgstr "Davetleri İptal Et"+msgid "Revoked"+msgstr "İptal edildi"+msgid "Rework"msgstr "Yeniden İşleme"@@ -20699,6 +20986,9 @@ msgstr "Tedarikçi parçalarını arayın"msgid "Search suppliers..."msgstr "Tedarikçileri ara..."+msgid "Search Term"+msgstr "Arama Terimi"+msgid "Search tools..."msgstr "Araç ara..."@@ -20800,6 +21090,9 @@ msgstr "Kullanılabilir seçenekleri görmek için önce bir şekil seç"msgid "Select a step to hide parts on it."msgstr "Parçaları gizlemek için bir adım seçin."+msgid "Select a step…"+msgstr "Bir adım seçin…"+msgid "Select a substance and shape first to see available options"msgstr "Kullanılabilir seçenekleri görmek için önce bir madde ve şekil seç"@@ -20818,6 +21111,9 @@ msgstr "Tümünü seç"msgid "Select an action…"msgstr "Bir eylem seçin…"+msgid "Select an app…"+msgstr "Bir uygulama seçin…"+msgid "Select an assignee"msgstr "Atanayı seçin"@@ -20842,6 +21138,9 @@ msgstr "Bir işlem seçin…"msgid "Select an option"msgstr "Bir seçenek seçin"+msgid "Select an option…"+msgstr "Bir seçenek seçin…"+msgid "Select at least one item to accept the quote"msgstr "Teklifi kabul etmek için en az bir stok kartı seçin"@@ -20875,6 +21174,9 @@ msgstr "Çalışan Seç"msgid "Select Employee Type"msgstr "Çalışan Türü Seçin"+msgid "Select event types"+msgstr "Olay türlerini seçin"+msgid "Select field"msgstr "Alan seçin"@@ -20988,7 +21290,7 @@ msgid "Self Managed"msgstr "Kendi Yönettiği"msgid "Self-hosted or managed"-msgstr "Kendi barındırılan veya yönetilen"+msgstr "Kendi barındırılı veya yönetilen"msgid "Self-onboarding"msgstr "Kendi kendine katılım"@@ -21026,6 +21328,9 @@ msgstr "Davet Gönder"msgid "Send Invites"msgstr "Davet Gönder"+msgid "Send Notifications"+msgstr "Bildirim Gönder"+msgid "Send RFQ to Suppliers"msgstr "Tedarikçilere RFQ Gönder"@@ -21035,6 +21340,12 @@ msgstr "Carbon'a Gönder"msgid "Send Via"msgstr "Gönderim Yolu"+msgid "Sender Email"+msgstr "Gönderici E-postası"++msgid "Sender Name"+msgstr "Gönderici Adı"+msgid "Sending defective units back to an earlier operation to be corrected instead of scrapping them."msgstr "Hatalı ürünleri hurdalanması yerine, daha önceki bir operasyona düzeltilmesi için geri göndermek."@@ -21802,6 +22113,18 @@ msgstr ""msgid "Slack"msgstr "Slack"+msgid "Slack: Create Channel"+msgstr "Slack: Kanal Oluştur"++msgid "Slack: Find User by Email"+msgstr "Slack: E-postaya Göre Kullanıcı Bul"++msgid "Slack: Send Message To A Channel"+msgstr "Slack: Kanala İleti Gönder"++msgid "Slack: Send Message To A User"+msgstr "Slack: Kullanıcıya İleti Gönder"+msgid "Slice asset activity by location, item, or any dimension"msgstr "Konum, ürün veya herhangi bir boyuta göre varlık aktivitesini böl"@@ -22041,6 +22364,9 @@ msgstr "Başlangıç tarihi"msgid "Start Date"msgstr "Başlangıç Tarihi"+msgid "Start date time of the event"+msgstr "Etkinliğin başlangıç tarihi saati"+msgid "Start Expiration"msgstr "Son Kullanma Başlangıcı"@@ -22855,6 +23181,9 @@ msgstr "Etiketler"msgid "Tailor this hub for the customer. Changes apply live for everyone viewing it. Never shown to the customer here."msgstr "Bu hub'ı müşteri için özelleştirin. Değişiklikler bunu görüntüleyen herkes için canlı olarak uygulanır. Müşteriye burada asla gösterilmez."+msgid "Take one field from every item"+msgstr "Her stok kartından bir alan al"+msgid "Take out of service"msgstr "Hizmetten Çıkart"@@ -22868,6 +23197,12 @@ msgstr "Mülkiyeti Al"msgid "Take Ownership: {0}"msgstr "Mülkiyeti Al: {0}"+msgid "Take the first item"+msgstr "İlk stok kartını al"++msgid "Take the last item"+msgstr "Son stok kartını al"+msgid "Take the shortest remaining shelf life across the materials consumed to make this item. Use when the product's expiry depends on its ingredients."msgstr "Bu öğeyi üretmek için tüketilen malzemelerdeki en kısa kalan raf ömrünü alır. Ürünün son kullanma tarihinin bileşenlerine bağlı olduğu durumlarda kullanılır."@@ -23115,11 +23450,8 @@ msgstr ""msgid "Test run"msgstr "Test çalıştırması"-msgid "Test run — results are not saved to the Runs page"-msgstr "Test çalıştırması — sonuçlar Çalıştırmalar sayfasına kaydedilmez"--msgid "Test runs are not saved. Close this panel and the result is gone."-msgstr "Test çalıştırmaları kaydedilmez. Bu paneli kapatın ve sonuç ortadan kalkar."+msgid "Test runs are saved to the run history, marked as tests."+msgstr "Test çalıştırmaları, test olarak işaretlenip çalıştırma geçmişine kaydedilir."msgid "Test Value"msgstr "Test Değeri"@@ -23127,9 +23459,36 @@ msgstr "Test Değeri"msgid "Text size"msgstr "Metin boyutu"+msgid "That account is still being reconnected. Try again in a moment."+msgstr "Bu hesap yine de yeniden bağlanıyor. Biraz sonra tekrar deneyin."++msgid "That account no longer exists"+msgstr "Bu hesap artık mevcut değil"++msgid "That connection name is already used"+msgstr "Bu bağlantı adı zaten kullanıldı"++msgid "That field holds a list of its own. Turn on flattening to take it."+msgstr "Bu alan kendi listesini içeriyor. Almak için düzleştirmeyi açın."++msgid "That field holds several values, so they are combined into one list."+msgstr "Bu alan birden fazla değer içerir, bu nedenle tek bir listede birleştirilirler."++msgid "That integration is not available"+msgstr "Bu entegrasyon kullanılamıyor"++msgid "That list was empty."+msgstr "Bu liste boştu."+msgid "That name is already used by another step."msgstr "Bu ad başka bir adım tarafından zaten kullanılıyor."+msgid "That workspace is connected to another company"+msgstr "Bu çalışma alanı başka bir şirkete bağlı"++msgid "That's a different account"+msgstr "Bu farklı bir hesap"+#. placeholder {0}: i18n._(step.title)msgid "The \"{0}\" phase checks itself off once all of its tasks in the project plan are done."msgstr "Proje planında tüm görevleri tamamlandığında \"{0}\" aşaması kendini işaretler."@@ -23143,6 +23502,9 @@ msgstr "\"{0}\" aşaması tamamlandı — \"{1}\" denetim noktası geçti."msgid "The {0} phases to go live, each ending at a checkpoint. Tick off each task as you complete it."msgstr "{0} aşamayı canlı yayına almak için, her biri bir kontrol noktasında sona eriyor. Her görevi tamamladıkça işaretleyin."+msgid "The {appName} account this step uses is not available — it was disconnected or needs to be reconnected."+msgstr "Bu adımın kullandığı {appName} hesabı kullanılamıyor — bağlantısı kesildi veya yeniden bağlanması gerekiyor."+msgid "The accent color used across Carbon."msgstr "Carbon'da kullanılan vurgu rengi."@@ -23158,6 +23520,9 @@ msgstr "Carbon'ın otomatik olarak deftere naklettiği hesaplar"msgid "The action that copies a saved method (its materials, operations, and work instructions) onto a job or quote line."msgstr "Kayıtlı bir yöntemi (malzemeleri, operasyonları ve iş talimatlarını) bir iş veya teklif satırına kopyalayan eylem."+msgid "The address must be listed in your GMail account's settings"+msgstr "Adres, GMail hesap ayarlarınızda listelenmelidir"+msgid "The allowed values for a list-type attribute; users pick from these rather than free-typing."msgstr "Bir liste türü özniteliği için izin verilen değerler; kullanıcılar serbest yazma yerine bunların arasından seçer."@@ -23179,6 +23544,9 @@ msgstr "Varlık, hizmet sınıfına geçer ve hizmet tarihinden itibaren amortismsgid "The asset would have a negative cost. Check the purchase price."msgstr "Kıymet negatif bir maliyete sahip olacaktır. Satın alma fiyatını kontrol edin."+msgid "The authorization took too long or came back altered. Start the connection again from this page."+msgstr "Yetkilendirme çok uzun sürdü veya değiştirilmiş olarak geri döndü. Bağlantıyı bu sayfadan yeniden başlatın."+msgid "The authorization was refused in Onshape. Save the integration settings to try again."msgstr "Yetkilendirme Onshape'te reddedildi. Tekrar denemek için entegrasyon ayarlarını kaydedin."@@ -23188,6 +23556,9 @@ msgstr "Yetkilendirme Onshape'te reddedildi. Yeniden bağlanmayı deneyin."msgid "The authorization was refused in Ramp. Try connecting again."msgstr "Yetkilendirme Ramp'te reddedildi. Yeniden bağlanmayı deneyin."+msgid "The authorization was rejected"+msgstr "Yetkilendirme reddedildi"+msgid "The average cost of the item. Changing it needs permission to edit parts."msgstr "Stok kartının ortalama maliyeti. Bunu değiştirmek parçaları düzenleme izni gerektirir."@@ -23291,6 +23662,12 @@ msgstr "Şirket zaten muhasebeleştirilmiş bir açılış bakiyesi muhasebe fimsgid "The company has no account defaults."msgstr "Şirketin hesap varsayılanları yoktur."+msgid "The connection could not be verified"+msgstr "Bağlantı doğrulanamadı"++msgid "The connection was refused"+msgstr "Bağlantı reddedildi"+msgid "The contract cannot be cancelled then"msgstr "Sözleşme o zaman iptal edilemez"@@ -23556,6 +23933,9 @@ msgstr "İş akışının webhook adımının gönderdiği https adresi — düzmsgid "The human-readable document number (like J000001 or ECO-000001) minted from a sequence and stored on the record, distinct from its internal id."msgstr "Bir Numaralandırmadan oluşturulan ve kayıt üzerine saklanan (J000001 veya ECO-000001 gibi) insan tarafından okunabilen Belge numarası, dahili id'sinden farklı."+msgid "The icon emoji of the bot"+msgstr "Botun simge emojisi"+msgid "The identifier the customer uses for this part on their POs; Carbon resolves it to our internal Part ID on order import."msgstr "Müşterinin bu Parça için PO'larında kullandığı tanımlayıcı; Carbon, sipariş içe aktarılırken bunu bizim dahili Parça Kimliğine çözer."@@ -23577,6 +23957,9 @@ msgstr "Bu Tedarikçiden gelen Sevkiyatlarda nakliyeyi kimin ödeyeceğini, riskmsgid "The Incoterm rule (FOB, DAP, EXW, CIF, …) that governs who pays freight, who bears risk, and where the transfer of title occurs on shipments to this customer."msgstr "Bu Müşteriye giden Sevkiyatlarda nakliyeyi kimin ödeyeceğini, riski kimin yükleyeceğini ve mülkiyetin transferinin nerede gerçekleşeceğini yönetebilen Incoterm Kuralı (FOB, DAP, EXW, CIF, …)."+msgid "The integration authorized the connection but saving it failed. Try connecting again."+msgstr "Entegrasyon bağlantıyı yetkilendirdi ancak kaydetmesi başarısız oldu. Tekrar bağlanmayı deneyin."+msgid "The inventory cost recognized when a shipment posts, valued by the item's costing method."msgstr "Bir Sevkiyat muhasebeleştirildiğinde tanınan ve Stok kartının Maliyetlendirme yöntemiyle değerlendirilen Envanter Maliyeti."@@ -23592,6 +23975,15 @@ msgstr "Her iş emrinin ürettiği stok kartı — çıkış lotlarını birleşmsgid "The item's rental rate"msgstr "Stok kartı'nın kiralama oranı"+msgid "The items in that list have no field by that name."+msgstr "Bu listedeki öğelerde bu adda bir alan yok."++msgid "The items in that list have no fields to take."+msgstr "O listedeki stok kartlarının alınacak alanı yok."++msgid "The items in that list have no reading as text."+msgstr "Bu listedeki öğeler metin olarak okunamıyor."+msgid "the job hours due that day (a due-date basis, not the day the work runs), with overdue work in Past due."msgstr "o gün vadesi olan iş saatleri (çalışmanın çalıştığı günü değil, vade tarihine göre), gecikmiş iş Gecikmede."@@ -23885,6 +24277,9 @@ msgstr "Teknikerin bu bakım gerçekleştirildiğinde izlediği prosedür; kronomsgid "The processes this work center can run; appears in process-pickers when scheduling operations, and limits which jobs can route through this work center."msgstr "Bu iş merkezinin çalıştırabileceği prosesler; operasyonları zamanlarken proses seçicilerinde görünür ve hangi iş emirlerinin bu iş merkezinden geçebileceğini sınırlar."+msgid "The profile picture of the bot"+msgstr "Botun profil resmi"+msgid "The provider offers no dimension targets. Enable the feature in the provider first (e.g. tracking categories, class tracking, or fields)."msgstr "Sağlayıcı boyut hedefleri sunmaz. Önce sağlayıcıda özelliği etkinleştirin (örneğin, izleme kategorileri, sınıf izleme veya alanlar)."@@ -23986,12 +24381,12 @@ msgstr "Onshape'ten gelen yanıtta gerekli parametreler eksikti. Yeniden bağlanmsgid "The response from Ramp was missing required parameters. Try connecting again."msgstr "Ramp'ten gelen yanıtta gerekli parametreler eksikti. Yeniden bağlanmayı deneyin."+msgid "The response was missing required parameters. Try connecting again."+msgstr "Yanıt gerekli parametreleri içermiyordu. Tekrar bağlanmayı deneyin."+msgid "The restore job reported this error."msgstr "Geri yükleme işi bu hatayı bildirdi."-msgid "The result will not appear on the Runs page."-msgstr "Sonuç Çalıştırmalar sayfasında görünmeyecektir."-msgid "The revision number of the part"msgstr "Parçanın revizyon numarası"@@ -24139,6 +24534,9 @@ msgstr "Bir Şirketi Personel giriş kimlik doğrulaması için kullandığı Simsgid "The system passes every in-scope acceptance test in your configured system, with your data; the data is validated; and you sign off. Then go-live."msgstr "Sistem, yapılandırılmış sisteminizde kapsamdaki her kabul testini geçer, verilerinizle; veriler doğrulanır; ve siz onay verirsiniz. Ardından canlı yayına geçin."+msgid "The text of your message. When using Block Kit blocks, this is used as a fallback for notifications."+msgstr "İletinizin metni. Block Kit blokları kullanırken, bu bildirimler için yedek olarak kullanılır."+msgid "The thread linking a sales RFQ, its quote, and the resulting sales order — a join, not a document with its own status."msgstr "Satış RFQ'sunu, kendi alıntısını ve ortaya çıkan satış siparişini bağlayan iş parçacığı - bir birleştirme, kendi durumu olan bir belge değildir."@@ -24220,6 +24618,9 @@ msgstr ""msgid "The US tax depreciation system with IRS property-class tables, run as a separate tax schedule alongside the book schedule."msgstr "IRS mülkiyet sınıfı tabloları ile ABD vergi amortisman sistemi, kitap çizelgesi ile birlikte ayrı bir vergi planı olarak çalıştırılır."+msgid "The username of the bot"+msgstr "Botun kullanıcı adı"+msgid "The users in this group; group-scoped permissions and notifications apply to each member, and users may belong to multiple groups (effective permissions are the union)."msgstr "Bu gruptaki kullanıcılar; grup kapsamlı izinler ve bildirimler her üyeye uygulanır ve kullanıcılar birden çok gruba ait olabilir (etkili izinler birleşimdir)."@@ -24352,6 +24753,11 @@ msgstr "Bunlar sizin hesap planınızda değil, ancak belgeler veya muhasebe fimsgid "this ability"msgstr "bu yetkinlik"+msgid "This account has stopped working. Reconnect it — workflow steps using it will fail until you do."+msgstr "Bu hesap çalışmayı durdurdu. Yeniden bağlayın — onu kullanan iş akışı adımları siz yapana kadar başarısız olacaktır."++msgid "This account needs to be reconnected."+msgstr "Bu hesabın yeniden bağlanması gerekiyor."msgid "This action cannot run on this list."msgstr ""@@ -24384,6 +24790,9 @@ msgstr "Bu daha sonra değiştirilemez — {integrationName} yalnızca bir bağlmsgid "This cannot be undone."msgstr "Bu geri alınamaz."+msgid "This Carbon instance is missing its OAuth credentials for this integration. Ask an administrator to set them."+msgstr "Bu Carbon örneği bu entegrasyon için OAuth kimlik bilgilerine sahip değil. Bir yöneticiye bunları ayarlamasını söyleyin."+msgid "This Carbon instance is missing its Onshape OAuth credentials. Ask an administrator to set them."msgstr "Bu Carbon örneğinde Onshape OAuth kimlik bilgileri eksik. Bir yöneticiden bunları ayarlamasını isteyin."@@ -24442,9 +24851,15 @@ msgstr "Bu bilgi tüm kullanıcılara görünür olacak, bu nedenle paylaştığmsgid "this inspection plan"msgstr "bu kontrol planı"+msgid "This integration can't be connected on this Carbon instance."+msgstr "Bu entegrasyon bu Carbon örneğinde bağlanamaz."+msgid "This integration isn't available yet"msgstr "Bu entegrasyon henüz kullanılamıyor"+msgid "This integration isn't configured"+msgstr "Bu entegrasyon yapılandırılmamış"+#. placeholder {0}: company?.name ?? "Carbon"msgid "This invitation to join {0} has expired. You can request a new invite to be sent to your email."msgstr "{0} grubuna katılma davetinizin süresi doldu. Yeni bir davet talebinde bulunabilirsiniz ve bu e-postanıza gönderilir."@@ -24627,6 +25042,9 @@ msgstr "Bu istasyon yetkinlik kapısı geçmeli işleri çalıştırır — yalnmsgid "This station runs work with no ability requirement; operators assigned on the manning board shape available labor."msgstr "Bu istasyon hiçbir Yetkinlik gereksinimi olmaksızın iş çalıştırır; personel panosuna atanan Operatörler mevcut İşçiliği şekillendirir."+msgid "This step expected a list."+msgstr "Bu adım bir liste bekliyordu."+msgid "This step is part of it"msgstr "Bu adım bunun bir parçası"@@ -24666,7 +25084,7 @@ msgid "This version cannot be opened"msgstr "Bu sürüm açılamıyor"msgid "This version is published"-msgstr "Bu sürüm yayınlandı"+msgstr "Bu sürüm yayımlandı"msgid "This version is published. Create a new version to edit."msgstr "Bu sürüm yayınlandı. Düzenlemek için yeni bir sürüm oluşturun."@@ -24817,6 +25235,9 @@ msgstr "dar"msgid "Tightened"msgstr "Sıkılaştırılmış"+msgid "Time"+msgstr "Saat"+msgid "Time and dollar utilization of the rental fleet by asset and class"msgstr "Kiralama filosunun varlık ve sınıf bazında zaman ve dolar kullanım oranı"@@ -24862,6 +25283,9 @@ msgstr "Size doğru eğ"msgid "Title"msgstr "Unvan"+msgid "Title of the event"+msgstr "Olayın başlığı"+msgid "Title passes to the customer when the term ends."msgstr "Mülkiyet, dönem sona erdiğinde müşteri'ye geçer."@@ -24967,6 +25391,14 @@ msgstr "Tolerans (gün)"msgid "Tomorrow"msgstr "Yarın"+msgid "Took {took} values; kept the first {kept}."+msgstr "{took} değer alındı; ilk {kept} tutuldu."++msgid "Took the first of {total}."+msgstr "{total} içinden ilki alındı."++msgid "Took the last of {total}."+msgstr "{total} içinden sonuncusu alındı."msgid "Too many exports and bulk actions are running right now. Try again in a few minutes."msgstr "Şu anda çok fazla dışa aktarma ve toplu işlem çalışıyor. Birkaç dakika sonra tekrar deneyin."@@ -25298,6 +25730,9 @@ msgstr "Tetikleyiciler"msgid "Try a different name."msgstr "Farklı bir ad deneyin."+msgid "Try again"+msgstr "Tekrar deneyin"+msgid "Tuesday"msgstr "Salı"@@ -25368,6 +25803,9 @@ msgstr "Devam etmek için <0>\"{confirmPhrase}\"</0> yazın."msgid "Type a message..."msgstr "Bir mesaj yaz..."+msgid "Type a value and press Enter…"+msgstr "Bir değer yazın ve Enter tuşuna basın…"+msgid "Type an email and press Enter to add an external recipient"msgstr "Harici bir alıcı eklemek için bir e-posta girin ve Enter tuşuna basın"@@ -25449,6 +25887,9 @@ msgstr "Mali yılına göre henüz gelecek iskonto uygulanmamış ödemeler, kalmsgid "Undo"msgstr "Geri Al"+msgid "Unfurl Links"+msgstr "Bağlantıları Aç"+msgid "Ungroup"msgstr "Grubu Ayır"@@ -25969,6 +26410,9 @@ msgstr "Kullanıcı İzinleri"msgid "User roles"msgstr "Kullanıcı rolleri"+msgid "Username"+msgstr "Kullanıcı adı"+msgid "users"msgstr "kullanıcılar"@@ -26753,6 +27197,9 @@ msgstr "Etkinleştirildiğinde, bu fiyat geçersiz kılması eşleşen siparişlmsgid "When on, this rule fires for every target of its type. Assignment rows are ignored but preserved."msgstr "Açıkken bu kural, türündeki her hedef için tetiklenir. Atama satırları yok sayılır ancak korunur."+msgid "When replying to a thread, also make the message visible to everyone in the channel (only applicable when Thread Timestamp is provided)"+msgstr "Bir iş akışına yanıt verirken, iletiyi kanalda herkese de görünür hale getirin (yalnızca İş Akışı Zaman Damgası sağlandığında geçerlidir)"+msgid "When supplier responses are expected back; suppliers see this date on the RFQ portal and Carbon stops accepting late responses after it (configurable)."msgstr "Tedarikçi yanıtlarının ne zaman beklenmesi gerektiği; tedarikçiler RFQ portalında bu tarihi görür ve Carbon bundan sonra geç yanıtları kabul etmeyi durdurur (yapılandırılabilir)."@@ -26924,6 +27371,9 @@ msgstr "Bu işin üretime engel olup olmadığı (Duruş), üretime zarar veripmsgid "Whether to Add the selected permissions on top of what each user already has, or Update by replacing each user's permission set wholesale with the selection below."msgstr "Seçilen izinlerin her kullanıcının zaten sahip olduğu şeylerin üstüne Eklenip Eklenmediği veya her kullanıcının izin setinin aşağıda seçilen kişilerle değiştirilmesi suretiyle Güncelleştirilmesi."+msgid "Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves."+msgstr "Tekrarlanan olayların tek tek örneklere genişletilip genişletilmeyeceği; yalnızca tek seferlik olaylar ve tekrarlanan olayların örnekleri döndürülür, temel tekrarlanan olayların kendisi döndürülmez."+msgid "Which document drives each inspection flow for this item."msgstr "Bu öğe için hangi belgenin her muayene akışını yönettiği."@@ -27227,6 +27677,9 @@ msgstr "Birden fazla şirkete bağlısınız. Nerede çalışmak istediğinizi smsgid "You can change the UI style any time through the theme setting"msgstr "Kullanıcı arayüzü stilini tema ayarları aracılığıyla istediğiniz zaman değiştirebilirsiniz"+msgid "You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.'"+msgstr "Kanal ID'sini kanalı sağ tıklatıp 'Kanal Ayrıntılarını Görüntüle'yi seçerek alabilirsiniz."+msgid "You can only see this key once. Store it safely."msgstr "Bu anahtarı yalnızca bir kez görebilirsiniz. Güvenli bir yerde saklayın."@@ -27278,6 +27731,9 @@ msgstr "Siz yönetiyorsunuz"msgid "You name a project owner with decision authority"msgstr "Bir proje sahibini karar verme yetkisiyle atarsınız"+msgid "You need permission to edit workflows to load these choices."+msgstr "Bu seçenekleri yüklemek için iş akışlarını düzenleme izniniz olmalı."+msgid "You received this item"msgstr "Bu ürünü siz aldınız"diff --git a/packages/locale/locales/tr/mes.po b/packages/locale/locales/tr/mes.poindex b492a9aa9a..6d07064fd7 100644--- a/packages/locale/locales/tr/mes.po+++ b/packages/locale/locales/tr/mes.po@@ -113,6 +113,9 @@ msgstr "Önceki bir tamamlanma işlemi bitmedi. Yeniden deneme kalan adımlarımsgid "About"msgstr "Hakkında"+msgid "About this field"+msgstr "Bu alan hakkında"+msgid "Accept"msgstr "Kabul Et"@@ -1234,6 +1237,9 @@ msgstr "Bugün planlanmış bakım yok"msgid "No matches. Type to create one."msgstr "Eşleşme yok. Bir tane oluşturmak için yazın."+msgid "No matching time"+msgstr "Eşleşen saat yok"+msgid "No materials"msgstr "Malzeme yok"@@ -2144,6 +2150,9 @@ msgstr "Küçük Resim"msgid "Tick the jobs this was done for."msgstr "Bunun için yapılan iş emirlerini işaretleyin."+msgid "Time"+msgstr "Saat"+msgid "Time and cost split across jobs proportionally to quantity."msgstr "Zaman ve maliyet, miktar ile orantılı olarak iş emirleri arasında bölünür."diff --git a/packages/locale/locales/zh/erp.po b/packages/locale/locales/zh/erp.poindex 47d5212000..3c3eb03885 100644--- a/packages/locale/locales/zh/erp.po+++ b/packages/locale/locales/zh/erp.po@@ -269,6 +269,10 @@ msgstr "{0} 张发票已在您的上一个系统中开票,不会再次起草"msgid "{0} is {1}, not Draft or Planned"msgstr ""+#. placeholder {0}: integration.name+msgid "{0} isn't installed yet. There's nothing to configure — install it to connect an account."+msgstr "{0}还未安装。没有需要配置的内容 — 安装它以连接账户。"+#. placeholder {0}: data.quantitymsgid "{0} items marked as picked"msgstr ""@@ -481,6 +485,12 @@ msgstr "{alreadyPlannedItemCount}个零件已跳过——它们已有未结的msgid "{apOverduePct}% of payables"msgstr "应付款项的{apOverduePct}%"+msgid "{appName} is connected, but needs to be reconnected before workflow steps can use it."+msgstr "{appName}已连接,但在工作流步骤使用之前需要重新连接。"++msgid "{appName} isn't connected yet. Connect an account before this step can do anything."+msgstr "{appName}还未连接。在此步骤执行任何操作前,请先连接账户。"+msgid "{arOverduePct}% of receivables"msgstr "应收款项的{arOverduePct}%"@@ -594,6 +604,9 @@ msgstr "已插入{inserted}条,已更新{updated}条,需修复{0}条,已msgid "{jobsMissingStorageUnit, plural, one {# open job has materials with no storage unit} other {# open jobs have materials with no storage unit}}"msgstr "{jobsMissingStorageUnit, plural, one {# 个未结工单的物料没有存储单元} other {# 个未结工单的物料没有存储单元}}"+msgid "{kept, plural, one {Took # value.} other {Took # values.}}"+msgstr "{kept, plural, other {已取 # 个值。}}"+msgid "{label} is used by documents, journals or default accounts, so it cannot be deleted."msgstr "{label} 被文档、凭证或默认账户使用,因此无法删除。"@@ -746,6 +759,9 @@ msgstr "{state} · {syncedAgo} 已同步"msgid "{termMonths, plural, one {# month} other {# months}}"msgstr "{termMonths, plural, one {# 个月} other {# 个月}}"+msgid "{total, plural, one {Joined # value.} other {Joined # values.}}"+msgstr "{total, plural, other {已合并 # 个值。}}"+msgid "{total} phases to get your company live on Carbon. Each one ends at a checkpoint."msgstr "{total}个阶段使贵公司在Carbon中正式启用。每个阶段都在一个检查点处结束。"@@ -1651,6 +1667,9 @@ msgstr "用户在收货时记录每个生产批次或序列号的有效期。当msgid "A variable charge — mileage overage, damage, delivery, cleaning — is billed on the agreement's next invoice."msgstr "可变费用(如里程超额、损害、交付、清洁)在协议的下一份发票上计费。"+msgid "A workspace can be connected to one Carbon company only. Disconnect it there first, or connect a different workspace."+msgstr "一个工作区只能连接到一家 Carbon 公司。请先在那里断开连接,或连接其他工作区。"+msgid "ABA"msgstr "ABA"@@ -1672,6 +1691,9 @@ msgstr "关于"msgid "About (notification)"msgstr "关于(通知)"+msgid "About this field"+msgstr "关于此字段"+msgid "Absent"msgstr "缺席"@@ -1838,6 +1860,9 @@ msgstr ""msgid "Accounts receivable for amounts owed by customers"msgstr "客户应付金额的应收账款。"+msgid "Accounts your workflows can act as. Add one for each account a workflow step should use."+msgstr "您的工作流可以用来执行操作的账户。为每个工作流步骤应该使用的账户添加一个。"+msgid "Accrual"msgstr "应计"@@ -2055,6 +2080,9 @@ msgstr "添加步骤或问题"msgid "Add Ability"msgstr "添加能力"+msgid "Add account"+msgstr "添加账户"+msgid "Add Account"msgstr "添加账户"@@ -2196,6 +2224,10 @@ msgstr "添加月份"msgid "Add Note"msgstr "添加备注"+msgctxt "workflow data step"+msgid "Add operation"+msgstr "添加操作"+msgid "Add Operation"msgstr "添加操作"@@ -2434,6 +2466,9 @@ msgstr "推进到{nextStatus}"msgid "Advanced"msgstr "高级"+msgid "Advanced properties"+msgstr "高级属性"+msgid "Affected item not found."msgstr "未找到受影响的项目。"@@ -2657,6 +2692,12 @@ msgstr "金额仅显示有价值的数字。"msgid "An ability is a process's qualification. Only processes without one are listed."msgstr "技能是工艺的资格要求。仅列出没有该资格的工艺。"+msgid "An account is already called that — pick a different name."+msgstr "已存在同名账户——请选择其他名称。"++msgid "An account is missing from this list until it is reconnected."+msgstr "在重新连接之前,此列表中缺少一个账户。"+msgid "An accounting bucket that groups expenses by department or function so the GL can report spend by group, not just by account."msgstr "一个会计分类,按部门或职能对费用进行分组,以便总账可以按组而不仅按账户报告支出"@@ -2822,6 +2863,9 @@ msgstr "连接到 Onshape 时出现意外错误。保存集成设置以重试。msgid "An unexpected error occurred while connecting to Onshape. Try connecting again."msgstr "连接 Onshape 时发生意外错误。请重新连接。"+msgid "An unexpected error occurred while connecting. Try connecting again."+msgstr "连接时发生意外错误。请尝试重新连接。"+msgid "Analytics"msgstr "分析"@@ -2839,9 +2883,6 @@ msgstr "还有 {0} 份 — 解决这些以查看其余部分。"msgid "And {0} more. Resolve these to see the rest."msgstr "还有{0}个。解决这些以查看其余部分。"-msgid "and {hidden} more"-msgstr "以及{hidden}个更多"-msgid "and {remaining} more"msgstr "和 {remaining} 个更多"@@ -2878,6 +2919,9 @@ msgstr "租赁折扣的年费率"msgid "Annual. Starts from the company's incremental borrowing rate"msgstr "每年。从公司的增量借款利率开始"+msgid "Another connection to this integration already has that name. Choose a different one."+msgstr "此集成的另一个连接已具有该名称。请选择不同的名称。"+msgid "Another cost center this one rolls up into, letting you nest a sub-department under its parent for hierarchical cost reporting."msgstr "该成本中心所归属的另一个成本中心,允许您在其父级下嵌套子成本中心,以进行分层成本报告。"@@ -2948,6 +2992,9 @@ msgid "API keys for programmatic access to your Carbon data."msgstr "API密钥用于以编程方式访问您的Carbon数据。"msgid "API, webhooks, and integrations"+msgstr "API、Webhooks 和集成"++msgid "App"msgstr "API、Webhook 和集成"msgid "Appearance"@@ -3882,6 +3929,9 @@ msgstr "无法加载附件"msgid "Attempts"msgstr "尝试次数"+msgid "Attendees"+msgstr "参与者"+msgid "Attribute"msgstr "属性"@@ -3924,6 +3974,9 @@ msgstr "身份验证器应用"msgid "Authenticator QR code"msgstr "身份验证器二维码"+msgid "Authorization was refused. Try connecting again."+msgstr "授权被拒绝。请尝试重新连接。"+msgid "Authorized overtime on top of the shift"msgstr "班次之外的授权加班"@@ -3984,6 +4037,9 @@ msgstr "自动更新和备份"msgid "Automatic, prorated consumption of a job's untracked materials when output is reported — tracked materials are issued manually."msgstr "报告输出时,工单未跟踪原材料的自动、按比例消耗—已跟踪的原材料需手动发放。"+msgid "Automatically create a Google Meet video conference link for this event"+msgstr "为此事件自动创建Google Meet视频会议链接"+msgid "Automatically release the job when the kanban is scanned"msgstr "扫描看板时自动下达工单"@@ -4193,6 +4249,9 @@ msgstr "待退货的生产批次"msgid "Batching"msgstr "分批"+msgid "BCC Email"+msgstr "抄送(BCC)电子邮件"+msgid "Becomes"msgstr "变为"@@ -4370,6 +4429,12 @@ msgstr "看板"msgid "Body"msgstr "正文"+msgid "Body for the email you want to send"+msgstr "要发送的电子邮件正文"++msgid "Body Type"+msgstr "正文类型"+msgid "BoM"msgstr "物料清单"@@ -4427,6 +4492,9 @@ msgstr "面包屑"msgid "Bring in your parts, BOMs, Bill of Process, and costing — with Carbon's import tools, CSV, or LLM help."msgstr "导入您的零件、BOM、工序清单和成本核算—使用 Carbon 的导入工具、CSV 或 LLM 帮助。"+msgid "Broadcast reply to channel"+msgstr "广播回复至频道"+msgid "Browse library"msgstr "浏览库"@@ -4513,6 +4581,9 @@ msgstr ""msgid "By accepting the invite, you agree to the <0>Terms of Service</0> and <1>Privacy Policy</1>."msgstr "通过接受邀请,您同意<0>服务条款</0>和<1>隐私政策</1>。"+msgid "By default it'll be 30 min post start time"+msgstr "默认情况下,它将在开始时间后30分钟"+msgid "By dimension"msgstr "按维度"@@ -4881,6 +4952,9 @@ msgstr "导致运行:"msgid "CC"msgstr "抄送"+msgid "CC Email"+msgstr "抄送(CC)电子邮件"+msgid "Centralized Billing Address"msgstr "集中式账单地址"@@ -4998,6 +5072,12 @@ msgstr "更改此项将更新零件ID"msgid "Changing type resets this item's draft edits."msgstr "更改类型将重置此项目的草稿编辑。"+msgid "Channel"+msgstr "频道"++msgid "Channel Name"+msgstr "频道名称"+msgid "Characteristic"msgstr "特性"@@ -5078,6 +5158,9 @@ msgstr "检查点 ·"msgid "Checkpoints"msgstr "检查点"+msgid "Choose {named} first."+msgstr "请先选择 {named}。"+msgid "Choose a backup"msgstr "选择备份"@@ -5333,6 +5416,9 @@ msgstr "收起换型"msgid "Collapse subtree"msgstr "折叠子树"+msgid "Color"+msgstr "颜色"+#. placeholder {0}: index + 1msgid "Column {0} of {count}"msgstr "第{0}列,共{count}列"@@ -5594,6 +5680,9 @@ msgstr "配置用于系统中各种交易类型的默认账户"msgid "Configure the start months for your fiscal and tax years"msgstr "配置您的财政年度和税务年度的开始月份"+msgid "Configure the steps above first."+msgstr "请先配置上述步骤。"+msgid "Configure when purchased item costs should be updated from supplier transactions."msgstr "配置何时应从供应商交易更新采购项目成本。"@@ -5690,6 +5779,9 @@ msgstr "冲突原因"msgid "Connect"msgstr "连接"+msgid "Connect {appName}"+msgstr "连接 {appName}"+msgid "Connect Carbon to your accounting, project management, and CAD tools and much more."msgstr "将 Carbon 连接到您的会计、项目管理和 CAD 工具等更多应用。"@@ -5717,9 +5809,18 @@ msgstr "连接您的公司已在使用的外部工具"msgid "Connect your identity provider by pasting either its metadata URL or its raw metadata XML — exactly one of the two."msgstr "通过粘贴身份提供商的元数据 URL 或原始元数据 XML(两者中恰好一个)来连接您的身份提供商。"+msgid "Connected before workflows needed extra permissions. Reconnect to grant them — everything else keeps working meanwhile."+msgstr "工作流连接之前需要额外权限。重新连接以授予权限——同时其他一切保持正常。"+msgid "Connected to"msgstr "连接到"+msgid "Connection"+msgstr "连接"++msgid "Connection name"+msgstr "连接名称"+msgid "Console Mode"msgstr "控制台模式"@@ -6336,6 +6437,12 @@ msgstr "无法下达{0}:{1}"msgid "Could not save"msgstr "无法保存"+msgid "Couldn't check whether {appName} is connected."+msgstr "无法检查 {appName} 是否已连接。"++msgid "Couldn't complete the connection"+msgstr "无法完成连接"+msgid "Couldn't complete the Onshape connection"msgstr "无法完成 Onshape 连接"@@ -6351,12 +6458,18 @@ msgstr "无法加载更多行"msgid "Couldn't load related documents. Refresh before creating a new one to avoid duplicates."msgstr "无法加载相关文档。创建新文档前请刷新以避免重复。"+msgid "Couldn't load the choices for this field."+msgstr "无法加载此字段的选项。"+msgid "Couldn't load the provider's dimension targets — check the connection and reload."msgstr "无法加载提供商的维度目标 — 检查连接并重新加载。"msgid "Couldn't reschedule the job. Please try again."msgstr "无法重新安排作业。请重试。"+msgid "Couldn't save the connection"+msgstr "无法保存连接"+msgid "Couldn't save the Onshape connection"msgstr "无法保存 Onshape 连接"@@ -6366,6 +6479,12 @@ msgstr "无法保存 Onshape Government 连接"msgid "Couldn't save the Ramp connection"msgstr "无法保存 Ramp 连接"+msgid "Couldn't start the {name} connection"+msgstr "无法启动 {name} 连接"++msgid "Couldn't start the authorization."+msgstr "无法启动授权。"+msgid "Count"msgstr "数量"@@ -6375,6 +6494,12 @@ msgstr "计数历史记录"msgid "Count ID"msgstr "盘点ID"+msgid "Count items"+msgstr "计数物料"++msgid "Counted {total}."+msgstr "已计数 {total} 个。"+msgid "Counted Qty"msgstr "已计数数量"@@ -6479,6 +6604,9 @@ msgstr "创建合约"msgid "Create Forecast"msgstr "创建预测"+msgid "Create Google Meet Link"+msgstr "创建 Google Meet 链接"+msgid "Create Issue"msgstr "创建问题"@@ -7116,6 +7244,9 @@ msgstr "日期"msgid "Date Acquired"msgstr "获取日期"+msgid "Date and time"+msgstr "日期和时间"+msgid "Date Calibrated"msgstr "校准日期"@@ -7125,6 +7256,9 @@ msgstr "到期日期"msgid "Date Due"msgstr "到期日期"+msgid "Date from"+msgstr "开始日期"+msgid "Date issued"msgstr "发行日期"@@ -7137,6 +7271,9 @@ msgstr "支付日期"msgid "Date Paid"msgstr "支付日期"+msgid "Date to"+msgstr "截止日期"+msgid "Dates"msgstr "日期"@@ -8006,6 +8143,9 @@ msgstr "变更说明"msgid "Description of Issue"msgstr "问题描述"+msgid "Description of the event. You can use HTML tags here."+msgstr "事件的描述。您可以在此处使用HTML标签。"+msgid "Detach"msgstr "分离"@@ -8111,6 +8251,9 @@ msgstr "已放弃"msgid "Disconnect"msgstr "断开连接"+msgid "Disconnected"+msgstr "已断开连接"+msgid "Discontinuation date"msgstr "停用日期"@@ -9071,6 +9214,9 @@ msgstr "电子邮件"msgid "Email Address"msgstr "电子邮件地址"+msgid "Email address to set as the \"Reply-To\" header"+msgstr "设置为\"回复-至\"标题的电子邮件地址"+msgid "Email Domains"msgstr "电子邮件域"@@ -9086,6 +9232,9 @@ msgstr "已发邮件"msgid "Emails"msgstr "电子邮件"+msgid "Emails of the attendees (guests)"+msgstr "与会者(客人)的电子邮件"+msgid "Emoji"msgstr "表情符号"@@ -9155,6 +9304,9 @@ msgstr "为您的公司启用数字报价。这将允许您向客户发送数字msgid "Enable in Settings"msgstr "在设置中启用"+msgid "Enable link unfurling for this message"+msgstr "为此消息启用链接展开"+msgid "Enable notifications when a sales rule violation is blocked or acknowledged on a quote, sales order, or sales invoice."msgstr "当销售规则违规在报价、销售订单或销售发票上被阻止或确认时,启用通知。"@@ -9236,6 +9388,9 @@ msgstr "结束"msgid "End Date"msgstr "结束日期"+msgid "End date time of the event"+msgstr "活动的结束日期时间"+msgid "End Line"msgstr "结束行"@@ -9568,6 +9723,9 @@ msgstr ""msgid "Event Type"msgstr "事件类型"+msgid "Event types"+msgstr "事件类型"+msgid "Events"msgstr "事件"@@ -9746,6 +9904,9 @@ msgstr "展开行"msgid "Expand Machine"msgstr "展开机器"+msgid "Expand Recurring Event?"+msgstr "展开循环事件?"+msgid "Expand row"msgstr "展开行"@@ -10584,6 +10745,9 @@ msgstr "在文件中修复这些问题,然后重新上传"msgid "Fix these jobs before releasing"msgstr "在下达前修复这些工单"+msgid "Fix this"+msgstr "修复此问题"+msgid "Fixed"msgstr "固定"@@ -11052,6 +11216,12 @@ msgstr "总账对账"msgid "GL Tie-Out"msgstr "总账对账"+msgid "Gmail"+msgstr "Gmail"++msgid "Gmail: Send Email"+msgstr "Gmail: 发送电子邮件"+msgid "Go live right the first time — with our team alongside you"msgstr "第一次就上线成功 — 我们的团队陪伴您"@@ -11107,6 +11277,15 @@ msgstr "晚上好,{name}。"msgid "Good morning, {name}."msgstr "早上好,{name}。"+msgid "Google Calendar"+msgstr "Google日历"++msgid "Google Calendar: Create Event"+msgstr "Google 日历:创建事件"++msgid "Google Calendar: Get all Events"+msgstr "Google 日历:获取所有事件"+msgid "Google Places API key not configured"msgstr "Google Places API密钥未配置"@@ -11167,6 +11346,15 @@ msgstr "保证残值"msgid "Guaranteed Residual Value"msgstr "保证残值"+msgid "Guests can invite others"+msgstr "嘉宾可以邀请其他人"++msgid "Guests can modify"+msgstr "嘉宾可以修改"++msgid "Guests can see other guests"+msgstr "嘉宾可以看到其他嘉宾"+msgid "Guided"msgstr "引导式"@@ -11518,6 +11706,9 @@ msgstr "IBAN"msgid "IC Transaction"msgstr "公司间交易"+msgid "Icon Emoji"+msgstr "图标表情符号"+msgid "Id"msgstr "ID"@@ -12282,6 +12473,9 @@ msgstr "在...或之后"msgid "is on or before"msgstr "在...或之前"+msgid "Is Private?"+msgstr "是否为私密?"+msgid "Is supplier org group"msgstr "是供应商组织组"@@ -12354,6 +12548,9 @@ msgstr ""msgid "It is coming soon. Contact Carbon to have it set up for your company."msgstr "即将推出。请联系 Carbon 为您的公司进行设置。"+msgid "It was removed after this page loaded. Reload the page and try again."+msgstr "此页面加载后它已被删除。请重新加载页面并重试。"+msgid "It will stop running until you publish a version again. Nothing is deleted."msgstr "它将停止运行,直到您再次发布版本。不会删除任何内容。"@@ -12550,6 +12747,9 @@ msgstr "物料清单中包含此物料的工单"msgid "Join {0}"msgstr "加入 {0}"+msgid "Join into text"+msgstr "加入文本"+msgid "Journal"msgstr "凭证"@@ -12616,6 +12816,9 @@ msgstr "保留现有定价,仅添加新物料"msgid "Keep Line"msgstr "保留行"+msgid "Keep matching items"+msgstr "保留匹配的物料"+msgid "Keep navigation open"msgstr "保持导航展开"@@ -12634,6 +12837,12 @@ msgstr "继续拣货"msgid "Keeps orders, quotes, and settings behind a second check"msgstr "让订单、报价单和设置受到第二道检查的保护"+msgid "Kept {kept} of {total}; {unresolved} could not be checked."+msgstr "保留了 {total} 个中的 {kept} 个;{unresolved} 个无法检查。"++msgid "Kept {kept} of {total}."+msgstr "保留了 {total} 个中的 {kept} 个。"+msgid "Key"msgstr "钥匙"@@ -14875,6 +15084,9 @@ msgstr "无权限"msgid "No accounts are mapped yet"msgstr "尚无已映射的科目"+msgid "No accounts connected yet."+msgstr "尚未连接任何账户。"+msgid "No accounts match your search"msgstr "没有账户与您的搜索匹配"@@ -14930,6 +15142,9 @@ msgstr "还无资产。添加租赁涵盖的每项资产及其付款。"msgid "No attachments."msgstr "没有附件。"+msgid "No authorization code was returned"+msgstr "未返回授权代码"+msgid "No available filters"msgstr "没有可用的筛选器"@@ -15130,6 +15345,9 @@ msgstr "无失败路径 — 运行在此停止并标记为失败"msgid "No fair value entered, counts as not met"msgstr "未输入公允价值,视为不符合"+msgid "No field was chosen to take."+msgstr "未选择要提取的字段。"+msgid "No fields found."msgstr "未找到字段。"@@ -15250,6 +15468,9 @@ msgstr "没有匹配的料箱"msgid "No matching operations"msgstr "没有匹配的操作"+msgid "No matching time"+msgstr "没有匹配的时间"+msgid "No materials"msgstr "无物料"@@ -15765,6 +15986,9 @@ msgstr "无"msgid "Nothing at this location matches \"{0}\"."msgstr "此位置处没有与\"{0}\"匹配的内容。"+msgid "Nothing can work on this result."+msgstr "无法对此结果进行操作。"+msgid "Nothing completed in MES yet"msgstr "MES中尚未完成任何内容"@@ -15798,6 +16022,9 @@ msgstr "未安排任何事项——在下方添加工位。"msgid "Nothing selected yet"msgstr "尚未选择任何内容"+msgid "Nothing to choose yet - <0>set one up in Settings</0>."+msgstr "还没有可选择的内容 - <0>在设置中设置一个</0>。"+msgid "Nothing to post for this period."msgstr "此期间无内容待过账。"@@ -16008,6 +16235,9 @@ msgstr "1 {0} 等于多少 {1}?"msgid "One firing of a workflow, recorded step by step with the values each step used and produced, acting throughout with the permissions of the workflow's owner."msgstr "一次工作流执行,逐步记录每个步骤使用和产生的值,始终以工作流负责人的权限行动。"+msgid "One of your {appName} accounts needs to be reconnected before workflow steps can use it."+msgstr "您的一个{appName}账户需要重新连接,工作流步骤才能使用它。"+msgid "One or more quantities cannot meet this date"msgstr "一个或多个数量无法满足此日期"@@ -16131,6 +16361,9 @@ msgstr "未结"msgid "Open ({paymentCurrency})"msgstr "未结 ({paymentCurrency})"+msgid "Open {appName} accounts"+msgstr "打开{appName}账户"+msgid "Open a change notice"msgstr "打开变更通知"@@ -16320,6 +16553,10 @@ msgstr "工序"msgid "Operation"msgstr "操作"+msgctxt "workflow data step"+msgid "Operation"+msgstr "操作"+msgid "Operation batch"msgstr "工序生产批次"@@ -17129,6 +17366,9 @@ msgstr "选择一个客户、一种客户类型或“所有客户”以查看其msgid "Pick a date or leave blank to clear it."msgstr "选择一个日期或留空以清除它。"+msgid "Pick a field…"+msgstr "选择字段…"+msgid "Pick a list variable…"msgstr "选择一个列表变量…"@@ -17818,6 +18058,9 @@ msgstr "生产:车间应用和排程"msgid "Profile"msgstr "个人资料"+msgid "Profile Picture"+msgstr "个人资料图片"+msgid "Profit Percent"msgstr "利润百分比"@@ -17928,6 +18171,9 @@ msgstr "在路由 SAML SSO 登录前,通过 DNS TXT 记录证明每个电子msgid "Provide process knowledge and inputs"msgstr "提供流程知识和输入"+msgid "Provide the ts (timestamp) or link value of the **parent** message to make this message a reply. Do not use the ts value of the reply itself; use its parent instead. For example '1710304378.475129'.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the 'Copy link' option."+msgstr "提供**父**消息的ts(时间戳)或链接值以使此消息成为回复。不要使用回复本身的ts值;改用其父消息。例如\"1710304378.475129\"。或者,您可以通过单击父消息旁边的三个点并选择\"复制链接\"选项来轻松获取消息链接。"+msgid "Provide these URLs to your identity provider (Okta, Entra ID, Google Workspace, etc.) when registering Carbon as a SAML application."msgstr "在将 Carbon 注册为 SAML 应用程序时,将这些 URL 提供给您的身份提供商(Okta、Entra ID、Google Workspace 等)。"@@ -18731,6 +18977,9 @@ msgstr "收货数量从零开始"msgid "Received quantity not yet credited. The credit memo is created as a draft."msgstr "已收到的数量尚未进行贷项。贷项通知单已创建为草稿。"+msgid "Receiver Email (To)"+msgstr "收件人电子邮件(收件人)"+msgid "Receives the invoice email"msgstr "接收发票邮件"@@ -18788,6 +19037,21 @@ msgstr "将采购订单与已收货和已开票的内容进行对账——在Carmsgid "Reconfigure"msgstr "重新配置"+msgid "Reconnect"+msgstr "重新连接"++msgid "Reconnect {appName}"+msgstr "重新连接{appName}"++msgid "Reconnect it"+msgstr "重新连接它"++msgid "Reconnect needed"+msgstr "需要重新连接"++msgid "Reconnect with the account this connection already uses, or use Add account to connect the other one."+msgstr "请使用此连接已在使用的账户重新连接,或使用“添加账户”连接另一个账户。"+msgid "Record"msgstr "录音"@@ -18833,9 +19097,16 @@ msgstr "记录"msgid "Records and posted journals are being sent to and received from this provider."msgstr "记录和已过账凭证正在从此提供商发送和接收。"+msgid "Records here appear as plain text — {appLabel} doesn't support links in this field."+msgstr "此处的记录显示为纯文本 — {appLabel} 不支持该字段中的链接。"+msgid "Records moved"msgstr "记录已移动"+#. placeholder {0}: notice.params.equals+msgid "Records will be plain text. Set {siblingLabel} to {0} (under Advanced) to turn them into links."+msgstr "记录将显示为纯文本。在「高级」下设置 {siblingLabel} 为 {0} 以将其转换为链接。"+msgid "Recost"msgstr "重新核算成本"@@ -19182,6 +19453,10 @@ msgstr "从库存中移除已收货的序列号和批次号"msgid "Remove this item"msgstr "移除此物料"+msgctxt "workflow data step"+msgid "Remove this operation"+msgstr "删除此操作"+msgid "Remove this storage type from all referencing storage units and delete it. This cannot be undone."msgstr "从所有引用此存储类型的存储单元中移除它并将其删除。此操作无法撤销。"@@ -19216,6 +19491,9 @@ msgstr "重命名"msgid "Rename Workflow"msgstr "重命名工作流"+msgid "Renamed"+msgstr "已重命名"+msgid "Rendering label preview..."msgstr "正在渲染标签预览..."@@ -19381,6 +19659,12 @@ msgstr "补货方式"msgid "Replies to emailed invoices go here, and it's copied on each one."msgstr "对已发送发票的电子邮件回复将显示在此,并复制到每份发票。"+msgid "Reply to Thread (Thread Message Link/Timestamp)"+msgstr "回复线程(线程消息链接/时间戳)"++msgid "Reply-To Email"+msgstr "回复电子邮件"+msgid "Report"msgstr "报告"@@ -19925,6 +20209,9 @@ msgstr "撤销邀请"msgid "Revoke Invites"msgstr "撤销邀请"+msgid "Revoked"+msgstr "已撤销"+msgid "Rework"msgstr "返工"@@ -20699,6 +20986,9 @@ msgstr "搜索供应商零件"msgid "Search suppliers..."msgstr "搜索供应商..."+msgid "Search Term"+msgstr "搜索词"+msgid "Search tools..."msgstr "搜索工具..."@@ -20800,6 +21090,9 @@ msgstr "请先选择形状以查看可用选项"msgid "Select a step to hide parts on it."msgstr "选择一个步骤以隐藏其上的零件。"+msgid "Select a step…"+msgstr "选择一个步骤…"+msgid "Select a substance and shape first to see available options"msgstr "请先选择物质和形状以查看可用选项"@@ -20818,6 +21111,9 @@ msgstr "全选"msgid "Select an action…"msgstr "选择一个操作…"+msgid "Select an app…"+msgstr "选择一个应用…"+msgid "Select an assignee"msgstr "选择经办人"@@ -20842,6 +21138,9 @@ msgstr "选择一个操作…"msgid "Select an option"msgstr "选择一个选项"+msgid "Select an option…"+msgstr "选择一个选项…"+msgid "Select at least one item to accept the quote"msgstr "选择至少一个物料来接受报价单"@@ -20875,6 +21174,9 @@ msgstr "选择员工"msgid "Select Employee Type"msgstr "选择员工类型"+msgid "Select event types"+msgstr "选择事件类型"+msgid "Select field"msgstr "选择字段"@@ -21026,6 +21328,9 @@ msgstr "发送邀请"msgid "Send Invites"msgstr "发送邀请"+msgid "Send Notifications"+msgstr "发送通知"+msgid "Send RFQ to Suppliers"msgstr "向供应商发送询价单"@@ -21035,6 +21340,12 @@ msgstr "发送至 Carbon"msgid "Send Via"msgstr "通过以下方式发送"+msgid "Sender Email"+msgstr "发件人电子邮件"++msgid "Sender Name"+msgstr "发件人名称"+msgid "Sending defective units back to an earlier operation to be corrected instead of scrapping them."msgstr "将有缺陷的单位送回较早的操作进行更正,而不是报废。"@@ -21802,6 +22113,18 @@ msgstr ""msgid "Slack"msgstr "Slack"+msgid "Slack: Create Channel"+msgstr "Slack:创建频道"++msgid "Slack: Find User by Email"+msgstr "Slack:通过电子邮件查找用户"++msgid "Slack: Send Message To A Channel"+msgstr "Slack:向频道发送消息"++msgid "Slack: Send Message To A User"+msgstr "Slack:向用户发送消息"+msgid "Slice asset activity by location, item, or any dimension"msgstr "按位置、项目或任何维度细分资产活动"@@ -22041,6 +22364,9 @@ msgstr "开始日期"msgid "Start Date"msgstr "开始日期"+msgid "Start date time of the event"+msgstr "事件的开始日期时间"+msgid "Start Expiration"msgstr "开始过期"@@ -22331,7 +22657,7 @@ msgid "Stripe Due Date"msgstr "Stripe 到期日期"msgid "Stripe emails the invoice to the customer, so an address is required. This will also be saved to the contact in Carbon."-msgstr "Stripe 将发票通过电子邮件发送给客户,因此需要地址。这也将保存到 Carbon 中的联系人。"+msgstr "Stripe 向客户发送发票电子邮件,因此需要地址。这也将保存到 Carbon 中的联系人。"msgid "Stripe emails the invoices to the customer, so an address is required. It is also saved to the contract's invoice contact in Carbon, if it has one."msgstr "Stripe将发票通过电子邮件发送给客户,因此需要地址。如果合同有发票联系人,它也会保存到Carbon中。"@@ -22855,6 +23181,9 @@ msgstr "标签"msgid "Tailor this hub for the customer. Changes apply live for everyone viewing it. Never shown to the customer here."msgstr "为客户定制此中心。更改对所有查看者实时生效。永远不会向客户显示此内容。"+msgid "Take one field from every item"+msgstr "从每个物料中获取一个字段"+msgid "Take out of service"msgstr "停用"@@ -22868,6 +23197,12 @@ msgstr "取得所有权"msgid "Take Ownership: {0}"msgstr "取得所有权:{0}"+msgid "Take the first item"+msgstr "获取第一个物料"++msgid "Take the last item"+msgstr "获取最后一个物料"+msgid "Take the shortest remaining shelf life across the materials consumed to make this item. Use when the product's expiry depends on its ingredients."msgstr "采用制造此物料所消耗的原材料中最短的保质期。当产品的有效期取决于其成分时使用。"@@ -23115,11 +23450,8 @@ msgstr ""msgid "Test run"msgstr "测试运行"-msgid "Test run — results are not saved to the Runs page"-msgstr "测试运行 — 结果不会保存到运行页面"--msgid "Test runs are not saved. Close this panel and the result is gone."-msgstr "测试运行不会保存。关闭此面板,结果就消失了。"+msgid "Test runs are saved to the run history, marked as tests."+msgstr "测试运行会保存到运行历史记录中,并标记为测试。"msgid "Test Value"msgstr "测试值"@@ -23127,9 +23459,36 @@ msgstr "测试值"msgid "Text size"msgstr "文本大小"+msgid "That account is still being reconnected. Try again in a moment."+msgstr "该帐户仍在重新连接中。请稍后再试。"++msgid "That account no longer exists"+msgstr "该账户已不存在"++msgid "That connection name is already used"+msgstr "该连接名称已被使用"++msgid "That field holds a list of its own. Turn on flattening to take it."+msgstr "该字段本身是一个列表。请开启展平以提取它。"++msgid "That field holds several values, so they are combined into one list."+msgstr "该字段包含多个值,因此它们被合并为一个列表。"++msgid "That integration is not available"+msgstr "该集成不可用"++msgid "That list was empty."+msgstr "该列表为空。"+msgid "That name is already used by another step."msgstr "该名称已被另一个步骤使用。"+msgid "That workspace is connected to another company"+msgstr "该工作区已连接到另一家公司"++msgid "That's a different account"+msgstr "这是另一个账户"+#. placeholder {0}: i18n._(step.title)msgid "The \"{0}\" phase checks itself off once all of its tasks in the project plan are done."msgstr "\"{0}\"阶段在项目计划中的所有任务完成后会自动标记为完成。"@@ -23143,6 +23502,9 @@ msgstr "\"{0}\"阶段已完成——其\"{1}\"检查点已通过。"msgid "The {0} phases to go live, each ending at a checkpoint. Tick off each task as you complete it."msgstr "达成上线的{0}个阶段,每个阶段以检查点结束。当您完成每个任务时,将其勾选。"+msgid "The {appName} account this step uses is not available — it was disconnected or needs to be reconnected."+msgstr "此步骤使用的 {appName} 帐户不可用 — 它已断开连接或需要重新连接。"+msgid "The accent color used across Carbon."msgstr "整个 Carbon 中使用的强调色"@@ -23158,6 +23520,9 @@ msgstr "Carbon 自动记账的账户"msgid "The action that copies a saved method (its materials, operations, and work instructions) onto a job or quote line."msgstr "将保存的方法(其原材料、工序和作业指导书)复制到工单或报价行的操作。"+msgid "The address must be listed in your GMail account's settings"+msgstr "该地址必须在您的 GMail 帐户设置中列出"+msgid "The allowed values for a list-type attribute; users pick from these rather than free-typing."msgstr "列表类型属性的允许值;用户从这些值中选择而不是自由输入。"@@ -23179,6 +23544,9 @@ msgstr "资产进入其在用资产类别,并从在用日期开始折旧。"msgid "The asset would have a negative cost. Check the purchase price."msgstr "资产成本为负数。请检查购买价格。"+msgid "The authorization took too long or came back altered. Start the connection again from this page."+msgstr "授权耗时过长或被修改。请从此页面重新开始连接。"+msgid "The authorization was refused in Onshape. Save the integration settings to try again."msgstr "授权在 Onshape 中被拒绝。保存集成设置以重试。"@@ -23188,6 +23556,9 @@ msgstr "授权在 Onshape 中被拒绝。请重新连接。"msgid "The authorization was refused in Ramp. Try connecting again."msgstr "授权在 Ramp 中被拒绝。请重新连接。"+msgid "The authorization was rejected"+msgstr "授权被拒绝"+msgid "The average cost of the item. Changing it needs permission to edit parts."msgstr "物料的平均成本。修改此项需要编辑零件的权限。"@@ -23291,6 +23662,12 @@ msgstr "公司已有一份已过账的期初余额凭证。"msgid "The company has no account defaults."msgstr "公司没有账户默认值。"+msgid "The connection could not be verified"+msgstr "无法验证连接"++msgid "The connection was refused"+msgstr "连接被拒绝"+msgid "The contract cannot be cancelled then"msgstr "该合同不能被取消。"@@ -23556,6 +23933,9 @@ msgstr "工作流的 Webhook 步骤过账至的 https 地址——拒绝纯 httpmsgid "The human-readable document number (like J000001 or ECO-000001) minted from a sequence and stored on the record, distinct from its internal id."msgstr "从编号规则生成并存储在记录上的可读文件编号(如 J000001 或 ECO-000001),与其内部 id 不同。"+msgid "The icon emoji of the bot"+msgstr "机器人的图标表情符号"+msgid "The identifier the customer uses for this part on their POs; Carbon resolves it to our internal Part ID on order import."msgstr "客户在其采购单上用于此零件的标识符;Carbon在订单导入时将其解析为我们的内部零件ID。"@@ -23577,6 +23957,9 @@ msgstr "贸易术语规则(FOB、DAP、EXW、CIF 等),规定在来自此msgid "The Incoterm rule (FOB, DAP, EXW, CIF, …) that governs who pays freight, who bears risk, and where the transfer of title occurs on shipments to this customer."msgstr "贸易术语规则(FOB、DAP、EXW、CIF 等),规定在发往此客户的发货中谁支付运费、谁承担风险以及所有权转让发生的地点。"+msgid "The integration authorized the connection but saving it failed. Try connecting again."+msgstr "集成已授权连接,但保存失败。请尝试重新连接。"+msgid "The inventory cost recognized when a shipment posts, valued by the item's costing method."msgstr "发货过账时确认的库存管理成本,按物料的成本核算方法计值。"@@ -23592,6 +23975,15 @@ msgstr "每个工单生产的物料 — 要求其匹配以合并输出批次"msgid "The item's rental rate"msgstr "该物料的租赁费率"+msgid "The items in that list have no field by that name."+msgstr "该列表中的项目没有该名称的字段。"++msgid "The items in that list have no fields to take."+msgstr "该列表中的物料没有可提取的字段。"++msgid "The items in that list have no reading as text."+msgstr "该列表中的项目无法读取为文本。"+msgid "the job hours due that day (a due-date basis, not the day the work runs), with overdue work in Past due."msgstr "该天到期的任务小时数(以截止日期为基础,而不是工作运行的日期),逾期工作在逾期中。"@@ -23885,6 +24277,9 @@ msgstr "技术人员执行此维护时遵循的程序文件;在已生成排程msgid "The processes this work center can run; appears in process-pickers when scheduling operations, and limits which jobs can route through this work center."msgstr "此工作中心可以运行的工艺;在排程工序时显示在工艺选择器中,并限制哪些工单可以通过此工作中心。"+msgid "The profile picture of the bot"+msgstr "机器人的个人资料图片"+msgid "The provider offers no dimension targets. Enable the feature in the provider first (e.g. tracking categories, class tracking, or fields)."msgstr "提供商不提供维度目标。首先在提供商中启用该功能(例如跟踪类别、类跟踪或字段)。"@@ -23986,12 +24381,12 @@ msgstr "Onshape 的响应缺少必需的参数。请重新连接。"msgid "The response from Ramp was missing required parameters. Try connecting again."msgstr "Ramp 的响应缺少必需的参数。请重新连接。"+msgid "The response was missing required parameters. Try connecting again."+msgstr "响应缺少必需的参数。请尝试重新连接。"+msgid "The restore job reported this error."msgstr "恢复工作报告了此错误。"-msgid "The result will not appear on the Runs page."-msgstr "结果不会出现在运行页面上。"-msgid "The revision number of the part"msgstr "零件的修订版号"@@ -24139,6 +24534,9 @@ msgstr "公司用来管理员工登录的系统——Okta、Entra ID 或 Googlemsgid "The system passes every in-scope acceptance test in your configured system, with your data; the data is validated; and you sign off. Then go-live."msgstr "系统在您配置的系统中通过了每个范围内的验收测试,使用您的数据;数据已验证;您签署确认。然后上线。"+msgid "The text of your message. When using Block Kit blocks, this is used as a fallback for notifications."+msgstr "您的消息文本。使用 Block Kit 块时,这用作通知的备选方案。"+msgid "The thread linking a sales RFQ, its quote, and the resulting sales order — a join, not a document with its own status."msgstr "连接销售询价单、其报价和生成的销售订单的线索——一个关联关系,而不是具有自己状态的文件。"@@ -24220,6 +24618,9 @@ msgstr ""msgid "The US tax depreciation system with IRS property-class tables, run as a separate tax schedule alongside the book schedule."msgstr "美国税务折旧系统,包含国税局资产等级表,作为独立的税务计划与账簿计划并行运行。"+msgid "The username of the bot"+msgstr "机器人的用户名"+msgid "The users in this group; group-scoped permissions and notifications apply to each member, and users may belong to multiple groups (effective permissions are the union)."msgstr "此组中的用户;组范围的权限和通知适用于每个成员,用户可以属于多个组(有效权限是并集)。"@@ -24352,6 +24753,11 @@ msgstr "这些账户不在你的会计科目表中,但文档或凭证使用了msgid "this ability"msgstr "此能力"+msgid "This account has stopped working. Reconnect it — workflow steps using it will fail until you do."+msgstr "此帐户已停止工作。重新连接它 — 使用它的工作流步骤将失败,直到您这样做。"++msgid "This account needs to be reconnected."+msgstr "此帐户需要重新连接。"msgid "This action cannot run on this list."msgstr ""@@ -24384,6 +24790,9 @@ msgstr "这无法在之后更改 — {integrationName} 仅允许一个连接的msgid "This cannot be undone."msgstr "此操作无法撤销。"+msgid "This Carbon instance is missing its OAuth credentials for this integration. Ask an administrator to set them."+msgstr "此 Carbon 实例缺少此集成的 OAuth 凭证。请要求管理员设置。"+msgid "This Carbon instance is missing its Onshape OAuth credentials. Ask an administrator to set them."msgstr "此 Carbon 实例缺少 Onshape 的 OAuth 凭据。请让管理员进行设置。"@@ -24442,9 +24851,15 @@ msgstr "此信息将对所有用户可见,请谨慎分享。"msgid "this inspection plan"msgstr "这个检验计划"+msgid "This integration can't be connected on this Carbon instance."+msgstr "此集成无法在此 Carbon 实例上连接。"+msgid "This integration isn't available yet"msgstr "此集成尚不可用"+msgid "This integration isn't configured"+msgstr "此集成未配置"+#. placeholder {0}: company?.name ?? "Carbon"msgid "This invitation to join {0} has expired. You can request a new invite to be sent to your email."msgstr "加入 {0} 的邀请已过期。您可以请求将新邀请发送到您的电子邮件。"@@ -24627,6 +25042,9 @@ msgstr "此工作中心运行需要特定技能的工作 — 仅当具有资格msgid "This station runs work with no ability requirement; operators assigned on the manning board shape available labor."msgstr "该站运行无技能要求的工作;人员配备板上分配的操作员塑造可用人工。"+msgid "This step expected a list."+msgstr "此步骤需要一个列表。"+msgid "This step is part of it"msgstr "此步骤是其中的一部分"@@ -24817,6 +25235,9 @@ msgstr "紧张"msgid "Tightened"msgstr "加严检验"+msgid "Time"+msgstr "时间"+msgid "Time and dollar utilization of the rental fleet by asset and class"msgstr "按资产和类别统计的租赁设备的时间和成本利用率"@@ -24862,6 +25283,9 @@ msgstr "向靠近你的方向倾斜"msgid "Title"msgstr "标题"+msgid "Title of the event"+msgstr "事件标题"+msgid "Title passes to the customer when the term ends."msgstr "期限结束时,所有权转移给客户。"@@ -24967,6 +25391,14 @@ msgstr "容差(天)"msgid "Tomorrow"msgstr "明天"+msgid "Took {took} values; kept the first {kept}."+msgstr "已取 {took} 个值;保留了前 {kept} 个。"++msgid "Took the first of {total}."+msgstr "已取 {total} 个中的第一个。"++msgid "Took the last of {total}."+msgstr "已取 {total} 个中的最后一个。"msgid "Too many exports and bulk actions are running right now. Try again in a few minutes."msgstr "当前正在运行的导出和批量操作过多。请几分钟后重试。"@@ -25298,6 +25730,9 @@ msgstr "触发器"msgid "Try a different name."msgstr "请尝试其他名称。"+msgid "Try again"+msgstr "重试"+msgid "Tuesday"msgstr "星期二"@@ -25368,6 +25803,9 @@ msgstr "输入 <0>\"{confirmPhrase}\"</0> 以继续。"msgid "Type a message..."msgstr "输入消息..."+msgid "Type a value and press Enter…"+msgstr "输入值并按 Enter 键…"+msgid "Type an email and press Enter to add an external recipient"msgstr "输入电子邮件并按 Enter 键以添加外部收件人"@@ -25449,6 +25887,9 @@ msgstr "仍待支付的未折现支付额,按会计年度列示,扣除剩余msgid "Undo"msgstr "撤销"+msgid "Unfurl Links"+msgstr "展开链接"+msgid "Ungroup"msgstr "取消分组"@@ -25969,6 +26410,9 @@ msgstr "用户权限"msgid "User roles"msgstr "用户角色"+msgid "Username"+msgstr "用户名"+msgid "users"msgstr "用户"@@ -26753,6 +27197,9 @@ msgstr "打开时,此价格覆盖适用于匹配的订单;关闭但不删除msgid "When on, this rule fires for every target of its type. Assignment rows are ignored but preserved."msgstr "启用时,此规则对其类型的每个目标都会触发。分配行被忽略但保留。"+msgid "When replying to a thread, also make the message visible to everyone in the channel (only applicable when Thread Timestamp is provided)"+msgstr "回复线程时,还应使消息对频道中的所有人可见(仅在提供线程时间戳时适用)"+msgid "When supplier responses are expected back; suppliers see this date on the RFQ portal and Carbon stops accepting late responses after it (configurable)."msgstr "何时预期供应商回复;供应商在RFQ门户上看到该日期,Carbon在之后停止接受迟到的回复(可配置)。"@@ -26924,6 +27371,9 @@ msgstr "此工作是否阻止生产(停机)、降低生产(影响)、处msgid "Whether to Add the selected permissions on top of what each user already has, or Update by replacing each user's permission set wholesale with the selection below."msgstr "是否将选定的权限添加到每个用户已有的权限之上,或通过将每个用户的权限集替换为下面的选择来更新。"+msgid "Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves."+msgstr "是否将循环事件展开为单个实例,并只返回一次性事件和循环事件的实例,而不返回底层循环事件本身。"+msgid "Which document drives each inspection flow for this item."msgstr "哪份文件驱动此物料的每个检验流程。"@@ -27227,6 +27677,9 @@ msgstr "您属于多个公司。选择在哪个公司工作。"msgid "You can change the UI style any time through the theme setting"msgstr "您可以随时通过主题设置更改UI样式"+msgid "You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.'"+msgstr "您可以通过右键单击该频道并选择「查看频道详情」来获取频道 ID。"+msgid "You can only see this key once. Store it safely."msgstr "您只能看到此密钥一次。请妥善保管。"@@ -27281,6 +27734,9 @@ msgstr "你主导"msgid "You name a project owner with decision authority"msgstr "你指定一个具有决定权的项目负责人"+msgid "You need permission to edit workflows to load these choices."+msgstr "您需要编辑工作流的权限才能加载这些选项。"+msgid "You received this item"msgstr "您收到了此项目"diff --git a/packages/locale/locales/zh/mes.po b/packages/locale/locales/zh/mes.poindex ac7b143dbe..1f5a3c5123 100644--- a/packages/locale/locales/zh/mes.po+++ b/packages/locale/locales/zh/mes.po@@ -113,6 +113,9 @@ msgstr "之前的完成未完成。重试会恢复剩余步骤 — 数量不会msgid "About"msgstr "关于"+msgid "About this field"+msgstr "关于此字段"+msgid "Accept"msgstr "接受"@@ -1234,6 +1237,9 @@ msgstr "今天没有计划的维护"msgid "No matches. Type to create one."msgstr "没有匹配项。输入以创建一个。"+msgid "No matching time"+msgstr "没有匹配的时间"+msgid "No materials"msgstr "没有原材料"@@ -2144,6 +2150,9 @@ msgstr "缩略图"msgid "Tick the jobs this was done for."msgstr "标记完成此项工作的工单。"+msgid "Time"+msgstr "时间"+msgid "Time and cost split across jobs proportionally to quantity."msgstr "时间和成本按数量比例分配到各个工作中。"diff --git a/packages/react/src/Date/DateTimePicker.tsx b/packages/react/src/Date/DateTimePicker.tsxindex 444daa1a5a..3c1a55d65f 100644--- a/packages/react/src/Date/DateTimePicker.tsx+++ b/packages/react/src/Date/DateTimePicker.tsx@@ -3,6 +3,7 @@// including ports, remain AGPLv3; serving them over a network requires releasing their source.import type { DateValue } from "@internationalized/date";+import { useLingui } from "@lingui/react/macro";import { useDatePicker } from "@react-aria/datepicker";import { useDatePickerState } from "@react-stately/datepicker";import type { DatePickerProps } from "@react-types/datepicker";@@ -25,7 +26,8 @@ import { Tooltip, TooltipContent, TooltipTrigger } from "../Tooltip";import { FieldButton } from "./components/Button";import { Calendar } from "./components/Calendar";import DateField from "./components/DateField";-import TimeField from "./TimePicker";+import { dateTimePickerOptions } from "./dateTimePickerOptions";+import { TimeCombobox } from "./TimeCombobox";const dateTimePickerFieldVariants = cva("flex w-full px-4", {variants: {@@ -49,13 +51,19 @@ const DateTimePicker = (helperText?: string;}) => {+ const { t } = useLingui();+ const timeOptions = dateTimePickerOptions(props.hourCycle);+const state = useDatePickerState({...props,+ ...timeOptions,shouldCloseOnSelect: false});const ref = useRef<HTMLDivElement>(null);+ // The same options must reach `useDatePicker`, not just the state: it builds+ // `fieldProps`, so without them the visible field ignores what the state says.const { groupProps, fieldProps, buttonProps, dialogProps, calendarProps } =- useDatePicker(props, state, ref);+ useDatePicker({ ...props, ...timeOptions }, state, ref);return (<Popover open={state.isOpen} onOpenChange={state.setOpen}>@@ -128,15 +136,15 @@ const DateTimePicker = (</HStack><PopoverContent align="end" {...dialogProps}><Calendar {...calendarProps} />- <TimeField- label="Time"- value={state.timeValue}- onChange={- state.setTimeValue as (- value: import("@react-types/datepicker").TimeValue | null- ) => void- }- />+ <div className="pt-3">+ <TimeCombobox+ value={state.timeValue}+ onChange={state.setTimeValue}+ isDisabled={props.isDisabled}+ hour24={props.hourCycle === 24}+ aria-label={t`Time`}+ />+ </div>{props.inline && (<PopoverFooter><Button onClick={() => state.setValue(null)} variant="secondary">diff --git a/packages/react/src/Date/TimeCombobox.tsx b/packages/react/src/Date/TimeCombobox.tsxnew file mode 100644index 0000000000..67ea77daf3--- /dev/null+++ b/packages/react/src/Date/TimeCombobox.tsx@@ -0,0 +1,223 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { formatTimeOfDay, parseTypedTime } from "@carbon/utils";+import { Time } from "@internationalized/date";+import { Trans } from "@lingui/react/macro";+import { useLocale } from "@react-aria/i18n";+import type { TimeValue } from "@react-types/datepicker";+import { useMemo, useState } from "react";+import {+ Command,+ CommandEmpty,+ CommandGroup,+ CommandInputTextField,+ CommandItem,+ CommandList+} from "../Command";+import { cn } from "../utils/cn";++/** How far apart the suggested times are. Quarter hours is what calendar apps+ * offer: half hours miss the :15 and :45 people actually book. */+const STEP_MINUTES = 15;++/** Only the wall-clock fields are read. `TimeValue` is a union — react-stately+ * hands back a `CalendarDateTime` once a date is also set, and a bare `Time`+ * only in the transient time-before-date state — so this deliberately accepts+ * the narrowest shape both share rather than pretending it is always a `Time`. */+function toTimeString(time: { hour: number; minute: number }) {+ return `${String(time.hour).padStart(2, "0")}:${String(time.minute).padStart(2, "0")}`;+}++function useTimeOptions(locale: string, hour24: boolean) {+ return useMemo(() => {+ const options: { value: string; label: string; time: Time }[] = [];+ // Counted as hour/minute rather than dividing a minute total: the numeric+ // standard bans raw rounding, and there is nothing to round here anyway.+ for (let hour = 0; hour < 24; hour++) {+ for (let minute = 0; minute < 60; minute += STEP_MINUTES) {+ const time = new Time(hour, minute);+ const value = toTimeString(time);+ options.push({+ value,+ label: formatTimeOfDay(value, locale, hour24),+ time+ });+ }+ }+ return options;+ }, [locale, hour24]);+}++type TimeComboboxProps = {+ value: TimeValue | null;+ onChange: (value: TimeValue) => void;+ isDisabled?: boolean;+ /** Show and accept a 24-hour clock ("15:30") instead of the locale's. */+ hour24?: boolean;+ "aria-label"?: string;+ className?: string;+};++/**+ * A time field a person can TYPE into, with a list of quarter hours to pick.+ *+ * Replaces the segmented spinner (`TimePicker`), where every digit had to be+ * tabbed through and there was nothing to choose from. Free text is held while+ * focused and interpreted when the person is done — on blur or Enter. Text that+ * is not a time reverts to the last good value rather than being clamped into a+ * plausible wrong one: a silently corrected time is a meeting at the wrong hour+ * that nobody notices.+ *+ * Built on `Command` (cmdk) rather than a hand-rolled list so arrow-key+ * navigation, `aria-activedescendant` and the option roles come from the same+ * place every other Carbon picker gets them.+ *+ * There is deliberately no way to clear from here: the caller's `onChange` is+ * react-stately's `setTimeValue`, and passing it `null` while a date is set+ * emits no change at all — the field would blank and then silently snap back.+ * Clearing belongs to whatever owns the whole date-time value.+ */+export const TimeCombobox = ({+ value,+ onChange,+ isDisabled = false,+ hour24 = false,+ "aria-label": ariaLabel,+ className+}: TimeComboboxProps) => {+ const { locale } = useLocale();+ const options = useTimeOptions(locale, hour24);++ const committed = value+ ? formatTimeOfDay(toTimeString(value), locale, hour24)+ : "";+ const [draft, setDraft] = useState("");+ const [isOpen, setOpen] = useState(false);+ const [isEditing, setEditing] = useState(false);++ // What was typed is shown only while editing; otherwise the value itself is.+ // So a value set elsewhere (the calendar, a reset) shows at once, but is never+ // yanked out from under someone mid-edit. Focus seeds the draft from it.+ const shown = isEditing ? draft : committed;++ /** Interpret what was typed. Anything unreadable — including empty — reverts. */+ const commit = () => {+ setEditing(false);+ setOpen(false);+ const parsed = parseTypedTime(shown);+ if (!parsed) return;+ onChange(parsed);+ };++ const choose = (time: Time) => {+ setEditing(false);+ setOpen(false);+ onChange(time);+ };++ // Narrows to what the text could still become: "15" shows the 15:00 quarters,+ // "15:3" shows 15:30. Labels may be zero-padded, so a single-digit hour is+ // matched unpadded too. A draft that parses also matches its own formatted+ // form, so "1530" finds 15:30 and "3pm" lands on 15:00 in either clock.+ const visible = useMemo(() => {+ const text = draft.trim().toLowerCase();+ if (!text || !isEditing) return options;+ const parsed = parseTypedTime(text);+ const parsedValue = parsed ? toTimeString(parsed) : null;+ return options.filter((option) => {+ const label = option.label.toLowerCase();+ return (+ label.startsWith(text) ||+ label.replace(/^0/, "").startsWith(text) ||+ option.value.startsWith(text) ||+ option.value === parsedValue+ );+ });+ }, [draft, isEditing, options]);++ const activeValue = value ? toTimeString(value) : null;++ return (+ <div className={cn("relative w-full", className)}>+ {/* cmdk owns filtering by default; ours is time-aware, so it is off. */}+ <Command shouldFilter={false} className="bg-transparent overflow-visible">+ <CommandInputTextField+ value={shown}+ onValueChange={(next) => {+ setEditing(true);+ setOpen(true);+ setDraft(next);+ }}+ // Opened by typing or ArrowDown, never by focus alone: this sits+ // inside the date picker's own popover, and opening on focus threw a+ // 96-row list over the calendar as soon as the field was tabbed into.+ onKeyDown={(event) => {+ if (event.key === "Enter") {+ event.preventDefault();+ commit();+ return;+ }+ if (event.key === "Escape") {+ // Abandon the edit rather than commit it.+ event.preventDefault();+ setEditing(false);+ setOpen(false);+ return;+ }+ if (event.key === "Tab") {+ setOpen(false);+ return;+ }+ if (event.key === "ArrowDown" && !isOpen) setOpen(true);+ }}+ onFocus={() => {+ setDraft(committed);+ setEditing(true);+ }}+ onBlur={commit}+ isDisabled={isDisabled}+ autoComplete="off"+ placeholder={formatTimeOfDay("09:00", locale, hour24)}+ aria-label={ariaLabel}+ className="tabular-nums"+ />+ {isOpen && (+ <CommandList+ // Rendered in flow rather than a portal: the only consumer is the+ // date picker's popover, and a portalled list inside a Drawer hits+ // the scroll-lock problem in .claude/rules/conventions-ui.md.+ className="absolute w-full top-10 z-50 rounded-md border bg-popover text-popover-foreground shadow-md p-1 max-h-52"+ >+ <CommandEmpty>+ <Trans>No matching time</Trans>+ </CommandEmpty>+ <CommandGroup>+ {visible.map((option) => (+ <CommandItem+ key={option.value}+ value={option.value}+ className={cn(+ "cursor-pointer tabular-nums",+ option.value === activeValue && "font-medium"+ )}+ onSelect={() => choose(option.time)}+ // Keeps focus in the input, so its blur cannot commit the+ // half-typed draft before the click selects this option.+ // `onSelect` commits the choice: committing here too called+ // `onChange` twice for one click.+ onMouseDown={(event) => event.preventDefault()}+ >+ {option.label}+ </CommandItem>+ ))}+ </CommandGroup>+ </CommandList>+ )}+ </Command>+ </div>+ );+};++export default TimeCombobox;diff --git a/packages/react/src/Date/dateTimePickerOptions.ts b/packages/react/src/Date/dateTimePickerOptions.tsnew file mode 100644index 0000000000..a2cda1778f--- /dev/null+++ b/packages/react/src/Date/dateTimePickerOptions.ts@@ -0,0 +1,23 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++/**+ * What `DateTimePicker` passes to `useDatePickerState` and `useDatePicker`.+ * `granularity` is pinned, `hourCycle` is the caller's choice.+ *+ * react-stately DERIVES granularity from the value, so an EMPTY picker falls back+ * to "day" and its `hasTime` is false — picking a date then commits a bare+ * CalendarDate, silently discarding a time already entered. Pinning "minute" is a+ * bug fix and applies to every caller.+ *+ * The clock is NOT a bug fix: a timecard or a maintenance start time is an ordinary+ * local-habit field where an en-US user expects AM/PM. Only callers that need an+ * unambiguous wall clock ask for `hourCycle={24}`.+ */+export function dateTimePickerOptions(hourCycle?: 12 | 24) {+ return {+ granularity: "minute",+ ...(hourCycle ? { hourCycle } : {})+ } as const;+}diff --git a/packages/react/src/Date/index.ts b/packages/react/src/Date/index.tsindex 3b917ba233..a46e535bab 100644--- a/packages/react/src/Date/index.ts+++ b/packages/react/src/Date/index.ts@@ -6,6 +6,14 @@ import { Calendar } from "./components/Calendar";import DatePicker from "./DatePicker";import DateRangePicker from "./DateRangePicker";import DateTimePicker from "./DateTimePicker";+import { TimeCombobox } from "./TimeCombobox";import TimePicker from "./TimePicker";-export { Calendar, DatePicker, DateRangePicker, DateTimePicker, TimePicker };+export {+ Calendar,+ DatePicker,+ DateRangePicker,+ DateTimePicker,+ TimeCombobox,+ TimePicker+};diff --git a/packages/react/src/LabelWithHelp.tsx b/packages/react/src/LabelWithHelp.tsxindex 37902f4f6c..57e4d25b40 100644--- a/packages/react/src/LabelWithHelp.tsx+++ b/packages/react/src/LabelWithHelp.tsx@@ -13,6 +13,9 @@ import { cn } from "./utils/cn";type LabelWithHelpProps = {termId: TermId | undefined;+ /** Free-text fallback for the ⓘ hover when no glossary term exists — e.g. a+ * third-party vendor's own field description. Ignored when `termId` is set. */+ text?: string;children: ReactNode;className?: string;/** Delay (ms) before the help popup opens on hover. */@@ -28,6 +31,7 @@ type LabelWithHelpProps = {export function LabelWithHelp({termId,+ text,children,className,tooltipDelayDuration = 200,@@ -35,13 +39,14 @@ export function LabelWithHelp({}: LabelWithHelpProps) {// Hooks must run unconditionally — call useLingui before any early return.const { t, i18n } = useLingui();- if (termId === undefined) return <>{children}</>;- const entry = getEntry(termId);+ if (termId === undefined && text === undefined) return <>{children}</>;+ const entry = termId === undefined ? undefined : getEntry(termId);- const translatedTerm = i18n._(entry.term);- const translatedDefinition = i18n._(entry.definition);+ const translatedTerm = entry === undefined ? "" : i18n._(entry.term);+ const translatedDefinition =+ entry === undefined ? (text ?? "") : i18n._(entry.definition);const learnMoreUrl =- entry.href === undefined ? undefined : docUrl(entry.href);+ entry?.href === undefined ? undefined : docUrl(entry.href);const isInline = variant === "inline";// HoverCard (not Tooltip): the popup contains an interactive "Learn more"@@ -54,7 +59,11 @@ export function LabelWithHelp({<buttontype="button"tabIndex={-1}- aria-label={t`What is ${translatedTerm}?`}+ aria-label={+ entry === undefined+ ? t`About this field`+ : t`What is ${translatedTerm}?`+ }className={cn("inline-flex items-center justify-center rounded-full text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",// Stacked labels sit above a form control: the 20px button is 4pxdiff --git a/packages/react/src/__tests__/DateTimePickerState.test.tsx b/packages/react/src/__tests__/DateTimePickerState.test.tsxnew file mode 100644index 0000000000..ad3291cf51--- /dev/null+++ b/packages/react/src/__tests__/DateTimePickerState.test.tsx@@ -0,0 +1,106 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++/**+ * Pins the two `useDatePickerState` settings `DateTimePicker` passes, because+ * both fix real bugs that are invisible in a type check and easy to "clean up".+ *+ * react-stately DERIVES granularity from the value, so an EMPTY picker defaults+ * to "day" and its `hasTime` is false. In that state picking a date commits a+ * bare CalendarDate, which is how "set the time, then pick the date, and the+ * time is gone" happened.+ *+ * The vitest env is `node` (no jsdom), so the hook is exercised by rendering a+ * probe component with `renderToStaticMarkup` and driving its setters after.+ */+import type { DateValue } from "@internationalized/date";+import { CalendarDate, Time } from "@internationalized/date";+import { useDatePickerState } from "@react-stately/datepicker";+import type { ReactNode } from "react";+import { renderToStaticMarkup } from "react-dom/server";+import { describe, expect, it, vi } from "vitest";+import { dateTimePickerOptions } from "../Date/dateTimePickerOptions";+import { TimeCombobox } from "../Date/TimeCombobox";++// The Lingui macro is compiled by the app build, not by vitest.+vi.mock("@lingui/react/macro", () => ({+ Trans: ({ children }: { children: ReactNode }) => children+}));++/** The hook with the options DateTimePicker passes, or without them. */+function stateFor(+ pinned: boolean,+ onChange: (value: DateValue | null) => void = () => {}+) {+ let captured: ReturnType<typeof useDatePickerState> | undefined;+ const Probe = () => {+ captured = useDatePickerState({+ value: null,+ onChange,+ ...(pinned ? dateTimePickerOptions() : {}),+ shouldCloseOnSelect: false+ });+ return null;+ };+ renderToStaticMarkup(<Probe />);+ if (!captured) throw new Error("probe did not render");+ return captured;+}++describe("DateTimePicker state settings", () => {+ it("without a pinned granularity, an empty picker is date-only", () => {+ const state = stateFor(false);+ // The upstream default that caused the bug — asserted so the reason the pin+ // exists stays visible if someone ever removes it.+ expect(state.granularity).toBe("day");+ expect(state.hasTime).toBe(false);+ });++ it("pinning granularity keeps an EMPTY picker a date-and-time picker", () => {+ const state = stateFor(true);+ expect(state.granularity).toBe("minute");+ expect(state.hasTime).toBe(true);+ });++ // The clock is the CALLER's choice: only fields that need an unambiguous wall+ // clock ask for 24-hour. Timecards and maintenance keep their locale's.+ it("leaves the clock to the locale unless a caller asks for 24-hour", () => {+ expect(dateTimePickerOptions()).toEqual({ granularity: "minute" });+ expect(dateTimePickerOptions(24)).toEqual({+ granularity: "minute",+ hourCycle: 24+ });+ });++ it("does not commit a bare date once granularity is pinned", () => {+ let fromDateOnly: DateValue | null = null;+ stateFor(false, (value) => {+ fromDateOnly = value;+ }).setDateValue(new CalendarDate(2026, 9, 10));+ // A CalendarDate has no `hour`: this is the commit that dropped the time.+ expect(fromDateOnly).not.toBeNull();+ expect("hour" in (fromDateOnly as unknown as object)).toBe(false);++ let fromPinned: DateValue | null = null;+ stateFor(true, (value) => {+ fromPinned = value;+ }).setDateValue(new CalendarDate(2026, 9, 10));+ // Deferred rather than committed, precisely so the date can be paired with+ // the time on close instead of overwriting it. (`dateValue` itself holds the+ // pending date in React state, which a server render never flushes, so the+ // absence of a commit is what is assertable here.)+ expect(fromPinned).toBeNull();+ });+});++describe("TimeCombobox", () => {+ // The draft is only seeded on focus, so until someone edits, what the field+ // shows must be derived from the value itself.+ it("shows the given time before any edit", () => {+ const html = renderToStaticMarkup(+ <TimeCombobox value={new Time(15, 30)} onChange={vi.fn()} hour24 />+ );+ expect(html).toContain('value="15:30"');+ });+});diff --git a/packages/react/src/index.tsx b/packages/react/src/index.tsxindex 64a4bb10a5..30e06bc300 100644--- a/packages/react/src/index.tsx+++ b/packages/react/src/index.tsx@@ -122,6 +122,7 @@ import {DatePicker,DateRangePicker,DateTimePicker,+ TimeCombobox,TimePicker} from "./Date";import type { DateTimeProps } from "./DateTime";@@ -758,6 +759,7 @@ export {Tfoot,Th,Thead,+ TimeCombobox,TimePicker,Toaster,Toggle,diff --git a/packages/utils/src/date.test.ts b/packages/utils/src/date.test.tsindex e12b0c8d50..c561ed53e6 100644--- a/packages/utils/src/date.test.ts+++ b/packages/utils/src/date.test.ts@@ -8,7 +8,8 @@ import {formatPreciseDuration,formatRelativeCalendarDays,formatTimeOfDay,- getTimeZoneOffsetLabel+ getTimeZoneOffsetLabel,+ parseTypedTime} from "./date";describe("formatRelativeCalendarDays", () => {@@ -65,6 +66,17 @@ describe("formatTimeOfDay", () => {expect(formatTimeOfDay(null)).toBe("");expect(formatTimeOfDay("not-a-time", "en-US")).toBe("not-a-time");});++ // Opt-in: a field where a dropped AM/PM would be a wrong meeting reads "15:30".+ it("forces a 24-hour clock when asked", () => {+ expect(formatTimeOfDay("15:30:00", "en-US", true)).toBe("15:30");+ expect(formatTimeOfDay("08:00:00", "en-US", true)).toBe("08:00");+ expect(formatTimeOfDay("00:00", "en-US", true)).toBe("00:00");+ expect(formatTimeOfDay("12:00", "en-US", true)).toBe("12:00");+ expect(formatTimeOfDay("23:59", "en-US", true)).toBe("23:59");+ // Unchanged without the flag.+ expect(formatTimeOfDay("15:30:00", "en-US")).toBe("3:30 PM");+ });});describe("formatDateTimeInZone", () => {@@ -174,3 +186,63 @@ describe("formatPreciseDuration", () => {expect(text).toBe("0 seconds");});});++describe("parseTypedTime", () => {+ const hhmm = (input: string) => {+ const time = parseTypedTime(input);+ return time ? `${time.hour}:${String(time.minute).padStart(2, "0")}` : null;+ };++ it("reads a bare hour as 24-hour", () => {+ expect(hhmm("3")).toBe("3:00");+ expect(hhmm("15")).toBe("15:00");+ expect(hhmm("0")).toBe("0:00");+ });++ it("reads an am/pm marker however it is written", () => {+ expect(hhmm("3p")).toBe("15:00");+ expect(hhmm("3pm")).toBe("15:00");+ expect(hhmm("3 pm")).toBe("15:00");+ expect(hhmm("3 p.m.")).toBe("15:00");+ expect(hhmm("3PM")).toBe("15:00");+ expect(hhmm("3am")).toBe("3:00");+ });++ // Midnight and noon are where 12-hour clocks are most often gotten wrong.+ it("handles the 12 o'clock hours", () => {+ expect(hhmm("12am")).toBe("0:00");+ expect(hhmm("12pm")).toBe("12:00");+ expect(hhmm("12:30am")).toBe("0:30");+ expect(hhmm("12:30pm")).toBe("12:30");+ });++ it("reads separated and packed digits", () => {+ expect(hhmm("3:07")).toBe("3:07");+ expect(hhmm("3.07")).toBe("3:07");+ expect(hhmm("15:30")).toBe("15:30");+ expect(hhmm("1530")).toBe("15:30");+ expect(hhmm("930")).toBe("9:30");+ expect(hhmm("3:07pm")).toBe("15:07");+ });++ it("ignores surrounding whitespace", () => {+ expect(hhmm(" 3:07 pm ")).toBe("15:07");+ });++ // Refused, never clamped: a silently corrected time is a wrong meeting.+ it("refuses what is not a time", () => {+ expect(parseTypedTime("25:00")).toBeNull();+ expect(parseTypedTime("3:75")).toBeNull();+ expect(parseTypedTime("24:00")).toBeNull();+ expect(parseTypedTime("13pm")).toBeNull();+ expect(parseTypedTime("0pm")).toBeNull();+ expect(parseTypedTime("abc")).toBeNull();+ expect(parseTypedTime("")).toBeNull();+ expect(parseTypedTime(" ")).toBeNull();+ expect(parseTypedTime("3:")).toBeNull();+ expect(parseTypedTime("12345")).toBeNull();+ // One minute digit is ambiguous (3:05 or 3:30?), so it is not guessed.+ expect(parseTypedTime("3.5")).toBeNull();+ expect(parseTypedTime("3:5")).toBeNull();+ });+});diff --git a/packages/utils/src/date.ts b/packages/utils/src/date.tsindex 323189e312..bb7c6f8bc9 100644--- a/packages/utils/src/date.ts+++ b/packages/utils/src/date.ts@@ -8,6 +8,7 @@ import {parseAbsolute,parseDate,parseTime,+ Time,toCalendarDateTime,toZoned} from "@internationalized/date";@@ -220,15 +221,23 @@ export function formatRelativeCalendarDays(// as a localized short time ("8:00 AM"). These carry no date or timezone, so// there is nothing to convert — the value is anchored to a fixed UTC instant// purely so `Intl` can format it, and formatted back in UTC to avoid any shift.-export function formatTimeOfDay(value?: string | null, locale?: string) {+export function formatTimeOfDay(+ value?: string | null,+ locale?: string,+ /** Force a 24-hour clock ("15:30") regardless of what the locale prefers.+ * For fields where an unambiguous wall clock matters more than local habit —+ * an en-US locale would otherwise render "3:30 PM". */+ hour24?: boolean+) {if (!value) return "";try {const t = parseTime(value);const anchor = new Date(Date.UTC(2000, 0, 1, t.hour, t.minute, t.second));return new Intl.DateTimeFormat(locale || DEFAULT_LOCALE, {- hour: "numeric",+ hour: hour24 ? "2-digit" : "numeric",minute: "2-digit",- timeZone: "UTC"+ timeZone: "UTC",+ ...(hour24 ? { hourCycle: "h23" } : {})}).format(anchor);} catch {return value;@@ -278,3 +287,64 @@ export function formatPreciseDuration(}).format(segments);return { text, direction };}++/**+ * A time a person typed, read leniently. Returns a `Time`, or `null` when the+ * text is not a time at all — the caller reverts rather than storing a guess.+ *+ * Deliberately generous about what it accepts, because the whole point is that+ * someone can type rather than tab through segments: `3`, `3p`, `3 pm`, `3:07pm`,+ * `15:30`, `1530` and `9.45` all land. It is strict about what it REJECTS —+ * `25:00`, `3:75` and `abc` are null, never silently clamped, since a clamped+ * time is a wrong meeting nobody notices. Minutes after a separator take two+ * digits: `3.5` could mean 3:05 or 3:30, so it is refused rather than guessed.+ *+ * 12-hour is inferred only from an explicit am/pm marker. A bare `3` is 03:00,+ * matching what the ISO-ish text says; `3p` is what a person types for 3 PM.+ */+export function parseTypedTime(input: string): Time | null {+ const text = input.trim().toLowerCase();+ if (!text) return null;++ // The am/pm marker may be attached ("3pm"), spaced ("3 pm") or dotted ("3 p.m.").+ // Captured as its own group so the hour digits are never eaten with it.+ const meridiem = /^(.*?)\s*([ap])\.?\s*m?\.?$/.exec(text);+ const marker = meridiem?.[2];+ const body = (meridiem ? meridiem[1]! : text).replace(/[.\s]+$/, "").trim();+ if (!body) return null;++ let hour: number;+ let minute = 0;++ // "3:07" / "3.07" / "3 07" — an explicit separator, then two minute digits.+ const separated = /^(\d{1,2})[:.\s](\d{2})$/.exec(body);+ // "1530" / "930" — a bare digit run, read from the right so "930" is 9:30.+ const packed = /^(\d{3,4})$/.exec(body);+ const bare = /^(\d{1,2})$/.exec(body);++ if (separated) {+ hour = Number(separated[1]);+ minute = Number(separated[2]);+ } else if (packed) {+ const digits = packed[1]!;+ hour = Number(digits.slice(0, digits.length - 2));+ minute = Number(digits.slice(-2));+ } else if (bare) {+ hour = Number(bare[1]);+ } else {+ return null;+ }++ if (minute > 59) return null;++ if (marker) {+ // A 12-hour clock has no hour 0 and no hour 13+: "0pm" and "13pm" are typos,+ // not times, so they are refused rather than wrapped into something plausible.+ if (hour < 1 || hour > 12) return null;+ if (marker === "p" && hour !== 12) hour += 12;+ if (marker === "a" && hour === 12) hour = 0;+ }++ if (hour > 23) return null;+ return new Time(hour, minute);+}diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 854c8332e4..f63ab6ff70 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -2585,6 +2585,9 @@ importers:'@slack/oauth':specifier: 3.0.5version: 3.0.5+ '@slack/types':+ specifier: 2.20.1+ version: 2.20.1'@slack/web-api':specifier: 'catalog:'version: 7.10.0@@ -2877,6 +2880,15 @@ importers:packages/jobs:dependencies:+ '@activepieces/piece-gmail':+ specifier: 0.13.0+ version: 0.13.0+ '@activepieces/piece-google-calendar':+ specifier: 0.10.3+ version: 0.10.3+ '@activepieces/piece-slack':+ specifier: 0.17.9+ version: 0.17.9'@ai-sdk/openai':specifier: 'catalog:'version: 4.0.78([email protected])@@ -4180,6 +4192,15 @@ importers:packages:+ '@activepieces/[email protected]':+ resolution: {integrity: sha512-G7pcZ+CFBidd2JKQU6sxfb2/N938dX2damdYaz+HU9C10eZxWlFEtJiMsjykbV8clWoTKMQ+Zxs4jVn1Q4EpSw==}++ '@activepieces/[email protected]':+ resolution: {integrity: sha512-F3wdJU1J6MagKgqrskCHCuFg6g1NMNiwtoi647vl1HZ7LJXnBrm83WnPum6ewm8mjfFUMKcADfylSuZu8ExyTA==}++ '@activepieces/[email protected]':+ resolution: {integrity: sha512-cdw5jr7yweGFBVkoSTw3WKUcF6tIVFTNFcT0t1Cp8MER0P4eAj/+BAnvC104ki6/q5Pm4FdXxJQHwEu5f47Azw==}+'@ai-sdk/[email protected]':resolution: {integrity: sha512-YSzjlko7JvuiyQFmI9RN1tNZdEiZxc+6xld/0tq/VkJaHpEzGAb1yiNxxvmYVcjvfu/PcvCxAAYXmTYQQ63IHQ==}engines: {node: '>=18'}@@ -16937,6 +16958,12 @@ packages:snapshots:+ '@activepieces/[email protected]': {}++ '@activepieces/[email protected]': {}++ '@activepieces/[email protected]': {}+'@ai-sdk/[email protected]([email protected])':dependencies:'@ai-sdk/provider': 1.1.3diff --git a/scripts/check-workflow-catalog.ts b/scripts/check-workflow-catalog.tsindex 2e6b3e60ce..ac79db8e4c 100644--- a/scripts/check-workflow-catalog.ts+++ b/scripts/check-workflow-catalog.ts@@ -11,10 +11,13 @@ import assert from "node:assert/strict";import { execFileSync } from "node:child_process";import fs from "node:fs";import path from "node:path";+import { assertPinnedVersions } from "../packages/jobs/src/workflows/integrations/allowlist";+import { buildPieceActionDeclarations } from "../packages/jobs/src/workflows/integrations/catalog";import schema from "../packages/database/src/swagger-docs-schema";import { WORKFLOW_ACTIONS } from "../packages/ee/src/workflows/catalog/actions";import {WORKFLOW_ACTION_CATALOG,+ WORKFLOW_INTEGRATION_CATALOG,WORKFLOW_OPERATION_CATALOG} from "../packages/ee/src/workflows/catalog/actions.generated";import { buildCatalog, validateCatalogInputs } from "../packages/ee/src/workflows/catalog/build";@@ -39,250 +42,293 @@ const TOOL_METADATA_FILE = path.join("apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json");-const failures: string[] = [];-const fail = (message: string) => failures.push(message);+async function main(): Promise<void> {+ // The generator feeds buildCatalog the same two maps, so the staleness check+ // compares like with like. An UnmappablePropertyError here fails the check, which+ // is the point: the committed catalog could not have been regenerated either.+ const INTEGRATION_STEPS = await buildPieceActionDeclarations();-// `git grep` searches the index, so build output and dependencies are excluded-// without a skip-list.-const raised = new Map<string, string[]>();-const grep = execFileSync(- "git",- [- "grep",- "-hoE",- String.raw`raiseMoment\(\s*"[^"]+"`,- "--",- "apps/**/*.ts",- "apps/**/*.tsx",- "packages/**/*.ts",- "packages/**/*.tsx",- ":!**/*.test.ts",- ":!**/*.test.tsx"- ],- { cwd: ROOT, encoding: "utf8" }-);--for (const line of grep.split("\n")) {- const key = /raiseMoment\(\s*"([^"]+)"/.exec(line)?.[1];- if (key === undefined) continue;- raised.set(key, [...(raised.get(key) ?? []), line]);-}+ const failures: string[] = [];+ const fail = (message: string) => failures.push(message);-for (const key of Object.keys(WORKFLOW_MOMENTS)) {- if (!raised.has(key)) {- fail(- `Moment "${key}" is declared but never raised. A customer could subscribe to a trigger that can never fire — add a raiseMoment("${key}", …) call at the place that performs the action, or remove the declaration.`- );+ // The allowlist names an exact version; package.json is what actually installs.+ try {+ const jobsPackage = JSON.parse(+ fs.readFileSync(path.join(ROOT, "packages/jobs/package.json"), "utf8")+ ) as { dependencies?: Record<string, string> };+ assertPinnedVersions(jobsPackage.dependencies ?? {});+ } catch (err) {+ fail((err as Error).message);}-}-for (const key of raised.keys()) {- if (!(key in WORKFLOW_MOMENTS)) {- fail(- `raiseMoment("${key}") names a moment that is not declared in packages/ee/src/workflows/catalog/moments.ts.`- );- }-}+ // `git grep` searches the index, so build output and dependencies are excluded+ // without a skip-list.+ const raised = new Map<string, string[]>();+ const grep = execFileSync(+ "git",+ [+ "grep",+ "-hoE",+ String.raw`raiseMoment\(\s*"[^"]+"`,+ "--",+ "apps/**/*.ts",+ "apps/**/*.tsx",+ "packages/**/*.ts",+ "packages/**/*.tsx",+ ":!**/*.test.ts",+ ":!**/*.test.tsx"+ ],+ { cwd: ROOT, encoding: "utf8" }+ );-// The CE leaf `@carbon/workflows-core` mirrors each moment's output KEY NAMES —-// `MomentPayload<K>` derives from `MOMENT_OUTPUT_KEYS`, and the engine re-exports-// the leaf's `MomentKey`/`MomentPayload`, so a drift between the two is invisible-// to the type checker. This is the invariant that keeps them honest.-const leafMoments = MOMENT_OUTPUT_KEYS as Record<string, readonly string[]>;-for (const key of Object.keys(WORKFLOW_MOMENTS)) {- const engineKeys = Object.keys(- WORKFLOW_MOMENTS[key as keyof typeof WORKFLOW_MOMENTS].outputs- ).sort();- const leafKeys = leafMoments[key];- if (!leafKeys) {- fail(- `Moment "${key}" is in WORKFLOW_MOMENTS but missing from MOMENT_OUTPUT_KEYS in @carbon/workflows-core — add it (with the same output keys) so MomentPayload stays correct.`- );- continue;+ for (const line of grep.split("\n")) {+ const key = /raiseMoment\(\s*"([^"]+)"/.exec(line)?.[1];+ if (key === undefined) continue;+ raised.set(key, [...(raised.get(key) ?? []), line]);}- if (engineKeys.join(",") !== [...leafKeys].sort().join(",")) {- fail(- `Moment "${key}" output keys drifted: WORKFLOW_MOMENTS has [${engineKeys}] but @carbon/workflows-core MOMENT_OUTPUT_KEYS has [${[...leafKeys].sort()}]. Update packages/workflows-core/src/moments.ts to match.`- );- }-}-for (const key of Object.keys(leafMoments)) {- if (!(key in WORKFLOW_MOMENTS)) {- fail(- `Moment "${key}" is in @carbon/workflows-core MOMENT_OUTPUT_KEYS but not declared in WORKFLOW_MOMENTS — remove it from packages/workflows-core/src/moments.ts.`- );- }-}-// A `buildCatalog` throw reads as a stack trace, so the same problems are-// collected here first and reported in plain English.-for (const problem of validateCatalogInputs(- WORKFLOW_ENTITY_REGISTRY,- WORKFLOW_MOMENTS,- WORKFLOW_ACTIONS,- WORKFLOW_OPERATIONS,- schema-)) {- fail(problem);-}--type ToolMeta = {- name: string;- schema?: { required?: string[]; properties?: Record<string, unknown> };-};--const tools = new Map<string, ToolMeta>(- (- JSON.parse(fs.readFileSync(TOOL_METADATA_FILE, "utf8")) as {- tools: ToolMeta[];+ for (const key of Object.keys(WORKFLOW_MOMENTS)) {+ if (!raised.has(key)) {+ fail(+ `Moment "${key}" is declared but never raised. A customer could subscribe to a trigger that can never fire — add a raiseMoment("${key}", …) call at the place that performs the action, or remove the declaration.`+ );}- ).tools.map((tool) => [tool.name, tool])-);--/** An action sends its inputs flat, as the operation's top-level fields. */-function requiredParamsOf(tool: ToolMeta): string[] {- return tool.schema?.required ?? [];-}+ }-for (const [id, declaration] of Object.entries(WORKFLOW_ACTIONS)) {- const call = (declaration as { call?: string }).call;- if (call === undefined) continue;- const tool = tools.get(call);- if (tool === undefined) {- fail(- `Action "${id}" calls "${call}", which is not a tool in tool-metadata.json. Run pnpm run generate:mcp.`- );- continue;+ for (const key of raised.keys()) {+ if (!(key in WORKFLOW_MOMENTS)) {+ fail(+ `raiseMoment("${key}") names a moment that is not declared in packages/ee/src/workflows/catalog/moments.ts.`+ );+ }}- // Only inputs the builder forces are guaranteed to arrive. Counting optional- // ones would repeat the shape of the bug this exists to catch.- const inputs = (declaration as { inputs: Record<string, { required: boolean }> })- .inputs;- const supplied = new Set(- Object.entries(inputs)- .filter(([, spec]) => spec.required)- .map(([name]) => name)- );- const missing = requiredParamsOf(tool).filter((p) => !supplied.has(p));- if (missing.length > 0) {- fail(- `Action "${id}" calls "${call}", which requires ${missing- .map((p) => `"${p}"`)- .join(", ")} — not declared as an input.`- );+ // The CE leaf `@carbon/workflows-core` mirrors each moment's output KEY NAMES —+ // `MomentPayload<K>` derives from `MOMENT_OUTPUT_KEYS`, and the engine re-exports+ // the leaf's `MomentKey`/`MomentPayload`, so a drift between the two is invisible+ // to the type checker. This is the invariant that keeps them honest.+ const leafMoments = MOMENT_OUTPUT_KEYS as Record<string, readonly string[]>;+ for (const key of Object.keys(WORKFLOW_MOMENTS)) {+ const engineKeys = Object.keys(+ WORKFLOW_MOMENTS[key as keyof typeof WORKFLOW_MOMENTS].outputs+ ).sort();+ const leafKeys = leafMoments[key];+ if (!leafKeys) {+ fail(+ `Moment "${key}" is in WORKFLOW_MOMENTS but missing from MOMENT_OUTPUT_KEYS in @carbon/workflows-core — add it (with the same output keys) so MomentPayload stays correct.`+ );+ continue;+ }+ if (engineKeys.join(",") !== [...leafKeys].sort().join(",")) {+ fail(+ `Moment "${key}" output keys drifted: WORKFLOW_MOMENTS has [${engineKeys}] but @carbon/workflows-core MOMENT_OUTPUT_KEYS has [${[...leafKeys].sort()}]. Update packages/workflows-core/src/moments.ts to match.`+ );+ }}- // Inputs go out flat, so each must be a top-level field of the operation;- // anything else passes validation unread.- const fields = tool.schema?.properties ?? {};- const unread = Object.keys(inputs).filter((name) => !(name in fields));- if (unread.length > 0) {- fail(- `Action "${id}" calls "${call}", which has no field ${unread- .map((p) => `"${p}"`)- .join(", ")} — the operation would never read it.`- );+ for (const key of Object.keys(leafMoments)) {+ if (!(key in WORKFLOW_MOMENTS)) {+ fail(+ `Moment "${key}" is in @carbon/workflows-core MOMENT_OUTPUT_KEYS but not declared in WORKFLOW_MOMENTS — remove it from packages/workflows-core/src/moments.ts.`+ );+ }}-}-// Compares data, not file text, so formatting can never make this flap.-if (failures.length === 0) {- const rebuilt = buildCatalog(+ // A `buildCatalog` throw reads as a stack trace, so the same problems are+ // collected here first and reported in plain English.+ for (const problem of validateCatalogInputs(WORKFLOW_ENTITY_REGISTRY,WORKFLOW_MOMENTS,WORKFLOW_ACTIONS,WORKFLOW_OPERATIONS,- schema- );- const stale =- "The committed catalog is out of date. Run `pnpm run generate:workflow-catalog` and commit the result.";-- try {- assert.deepStrictEqual(WORKFLOW_EVENTS, rebuilt.events);- } catch {- const committed = new Set(Object.keys(WORKFLOW_EVENTS));- const fresh = new Set(Object.keys(rebuilt.events));- const missing = [...fresh].filter((id) => !committed.has(id));- const extra = [...committed].filter((id) => !fresh.has(id));- fail(- `${stale}${missing.length ? ` Missing: ${missing.join(", ")}.` : ""}${- extra.length ? ` No longer generated: ${extra.join(", ")}.` : ""- }${!missing.length && !extra.length ? " An event's outputs, permission or match changed." : ""}`- );+ schema,+ INTEGRATION_STEPS+ )) {+ fail(problem);}- try {- assert.deepStrictEqual(WORKFLOW_ENTITIES, rebuilt.entities);- } catch {- fail(`${stale} An entity's generated properties changed.`);- }+ type ToolMeta = {+ name: string;+ schema?: { required?: string[]; properties?: Record<string, unknown> };+ };- try {- assert.deepStrictEqual(WORKFLOW_ACTION_CATALOG, rebuilt.actions);- } catch {- const committed = new Set(Object.keys(WORKFLOW_ACTION_CATALOG));- const fresh = new Set(Object.keys(rebuilt.actions));- const missing = [...fresh].filter((id) => !committed.has(id));- const extra = [...committed].filter((id) => !fresh.has(id));- fail(- `${stale}${missing.length ? ` Missing action: ${missing.join(", ")}.` : ""}${- extra.length ? ` No longer generated: ${extra.join(", ")}.` : ""- }${!missing.length && !extra.length ? " An action's inputs, outputs or permission changed." : ""}`- );- }+ const tools = new Map<string, ToolMeta>(+ (+ JSON.parse(fs.readFileSync(TOOL_METADATA_FILE, "utf8")) as {+ tools: ToolMeta[];+ }+ ).tools.map((tool) => [tool.name, tool])+ );- try {- assert.deepStrictEqual(WORKFLOW_OPERATION_CATALOG, rebuilt.operations);- } catch {- fail(`${stale} An operation's entity, inputs or output changed.`);+ /** An action sends its inputs flat, as the operation's top-level fields. */+ function requiredParamsOf(tool: ToolMeta): string[] {+ return tool.schema?.required ?? [];}- try {- assert.deepStrictEqual(WORKFLOW_FIELD_HELP, rebuilt.help);- } catch {- fail(`${stale} A field's glossary help term changed.`);- }+ for (const [id, declaration] of Object.entries(WORKFLOW_ACTIONS)) {+ const call = (declaration as { call?: string }).call;+ if (call === undefined) continue;+ const tool = tools.get(call);+ if (tool === undefined) {+ fail(+ `Action "${id}" calls "${call}", which is not a tool in tool-metadata.json. Run pnpm run generate:mcp.`+ );+ continue;+ }- // Read as text, not imported: the untransformed `msg` macro throws in plain Node.- const labelSource = fs.readFileSync(LABELS_FILE, "utf8");- // Biome drops the quotes around a key that is a valid identifier.- const labelIds = new Set(- [...labelSource.matchAll(/^ {2}"?([^":\s]+)"?:\s*msg`/gm)].map((m) => m[1])- );- for (const id of Object.keys(rebuilt.labels)) {- if (!labelIds.has(id)) fail(`${stale} "${id}" has no label.`);- }- for (const id of labelIds) {- if (id !== undefined && !(id in rebuilt.labels)) {+ // Only inputs the builder forces are guaranteed to arrive. Counting optional+ // ones would repeat the shape of the bug this exists to catch.+ const inputs = (declaration as { inputs: Record<string, { required: boolean }> })+ .inputs;+ const supplied = new Set(+ Object.entries(inputs)+ .filter(([, spec]) => spec.required)+ .map(([name]) => name)+ );+ const missing = requiredParamsOf(tool).filter((p) => !supplied.has(p));+ if (missing.length > 0) {fail(- `${stale} Label "${id}" no longer matches an event, action or operation.`+ `Action "${id}" calls "${call}", which requires ${missing+ .map((p) => `"${p}"`)+ .join(", ")} — not declared as an input.`+ );+ }+ // Inputs go out flat, so each must be a top-level field of the operation;+ // anything else passes validation unread.+ const fields = tool.schema?.properties ?? {};+ const unread = Object.keys(inputs).filter((name) => !(name in fields));+ if (unread.length > 0) {+ fail(+ `Action "${id}" calls "${call}", which has no field ${unread+ .map((p) => `"${p}"`)+ .join(", ")} — the operation would never read it.`);}}- // Check every entity and property has a label.- for (const [entityName, properties] of Object.entries(rebuilt.entities)) {- if (!rebuilt.labels[`entity.${entityName}`]) {- fail(`${entityName} has no label. Run pnpm run generate:workflow-catalog.`);+ // Compares data, not file text, so formatting can never make this flap.+ if (failures.length === 0) {+ const rebuilt = buildCatalog(+ WORKFLOW_ENTITY_REGISTRY,+ WORKFLOW_MOMENTS,+ WORKFLOW_ACTIONS,+ WORKFLOW_OPERATIONS,+ schema,+ INTEGRATION_STEPS+ );+ const stale =+ "The committed catalog is out of date. Run `pnpm run generate:workflow-catalog` and commit the result.";++ /** One generated map against a fresh build: on drift, name what is missing,+ * what is no longer generated, or — when the keys agree — what changed. */+ const compareMap = (+ noun: string,+ committed: Record<string, unknown>,+ fresh: Record<string, unknown>,+ changed: string+ ) => {+ try {+ assert.deepStrictEqual(committed, fresh);+ } catch {+ const missing = Object.keys(fresh).filter((id) => !(id in committed));+ const extra = Object.keys(committed).filter((id) => !(id in fresh));+ fail(+ `${stale}${missing.length ? ` Missing ${noun}: ${missing.join(", ")}.` : ""}${+ extra.length ? ` No longer generated: ${extra.join(", ")}.` : ""+ }${!missing.length && !extra.length ? ` ${changed}` : ""}`+ );+ }+ };++ compareMap(+ "event",+ WORKFLOW_EVENTS,+ rebuilt.events,+ "An event's outputs, permission or match changed."+ );++ try {+ assert.deepStrictEqual(WORKFLOW_ENTITIES, rebuilt.entities);+ } catch {+ fail(`${stale} An entity's generated properties changed.`);+ }++ compareMap(+ "action",+ WORKFLOW_ACTION_CATALOG,+ rebuilt.actions,+ "An action's inputs, outputs or permission changed."+ );+ compareMap(+ "integration step",+ WORKFLOW_INTEGRATION_CATALOG,+ rebuilt.integrations,+ "An integration step's inputs, outputs or permission changed."+ );++ try {+ assert.deepStrictEqual(WORKFLOW_OPERATION_CATALOG, rebuilt.operations);+ } catch {+ fail(`${stale} An operation's entity, inputs or output changed.`);+ }++ try {+ assert.deepStrictEqual(WORKFLOW_FIELD_HELP, rebuilt.help);+ } catch {+ fail(`${stale} A field's glossary help term changed.`);+ }++ // Read as text, not imported: the untransformed `msg` macro throws in plain Node.+ const labelSource = fs.readFileSync(LABELS_FILE, "utf8");+ // Biome drops the quotes around a key that is a valid identifier. A label+ // never holds a backtick (`assertLabelIsSafe`), so the text ends at the next.+ const committedLabels = new Map(+ [+ ...labelSource.matchAll(/^ {2}"?([^":\s]+)"?:\s*msg`([^`]*)`/gm)+ ].map((m) => [m[1] ?? "", m[2] ?? ""])+ );+ for (const [id, text] of Object.entries(rebuilt.labels)) {+ const committed = committedLabels.get(id);+ if (committed === undefined) fail(`${stale} "${id}" has no label.`);+ else if (committed !== text) fail(`${stale} The label of "${id}" changed.`);+ }+ for (const id of committedLabels.keys()) {+ if (!(id in rebuilt.labels)) {+ fail(+ `${stale} Label "${id}" no longer matches an event, action or operation.`+ );+ }}- for (const [column] of Object.entries(properties)) {- if (!rebuilt.labels[`entity.${entityName}.${column}`]) {- fail(`${entityName}.${column} has no label. Run pnpm run generate:workflow-catalog.`);++ // Check every entity and property has a label.+ for (const [entityName, properties] of Object.entries(rebuilt.entities)) {+ if (!rebuilt.labels[`entity.${entityName}`]) {+ fail(`${entityName} has no label. Run pnpm run generate:workflow-catalog.`);+ }+ for (const [column] of Object.entries(properties)) {+ if (!rebuilt.labels[`entity.${entityName}.${column}`]) {+ fail(`${entityName}.${column} has no label. Run pnpm run generate:workflow-catalog.`);+ }}}}-}-if (failures.length > 0) {- console.error("check-workflow-catalog FAILED\n");- for (const message of failures) console.error(` • ${message}\n`);- process.exit(1);+ if (failures.length > 0) {+ console.error("check-workflow-catalog FAILED\n");+ for (const message of failures) console.error(` • ${message}\n`);+ process.exit(1);+ }++ console.log(+ `check-workflow-catalog: ok — ${Object.keys(WORKFLOW_EVENTS).length} events, ${+ Object.keys(WORKFLOW_MOMENTS).length+ } moments raised, ${Object.keys(WORKFLOW_ENTITIES).length} entities, ${+ Object.keys(WORKFLOW_ACTION_CATALOG).length+ } actions, ${+ Object.keys(WORKFLOW_INTEGRATION_CATALOG).length+ } integration steps, ${+ Object.keys(WORKFLOW_OPERATION_CATALOG).length+ } operations`+ );}-console.log(- `check-workflow-catalog: ok — ${Object.keys(WORKFLOW_EVENTS).length} events, ${- Object.keys(WORKFLOW_MOMENTS).length- } moments raised, ${Object.keys(WORKFLOW_ENTITIES).length} entities, ${- Object.keys(WORKFLOW_ACTION_CATALOG).length- } actions, ${Object.keys(WORKFLOW_OPERATION_CATALOG).length} operations`-);+void main();diff --git a/scripts/generate-workflow-catalog.ts b/scripts/generate-workflow-catalog.tsindex ef9ab2524e..9aabff8f7c 100644--- a/scripts/generate-workflow-catalog.ts+++ b/scripts/generate-workflow-catalog.ts@@ -4,8 +4,9 @@/*** Builds events.generated.ts, actions.generated.ts, labels.generated.ts and- * help.generated.ts from entities.ts, moments.ts, actions.ts, operations.ts and- * the database swagger schema. Run: pnpm run generate:workflow-catalog+ * help.generated.ts from entities.ts, moments.ts, actions.ts, operations.ts, the+ * integration piece allowlist and the database swagger schema.+ * Run: pnpm run generate:workflow-catalog** Labels are a separate file because `msg` is a build-time macro that throws when* plain Node imports it. Emitted source is unformatted; the script pipes it@@ -13,6 +14,7 @@*/import fs from "node:fs";import path from "node:path";+import { buildPieceActionDeclarations } from "../packages/jobs/src/workflows/integrations/catalog";import schema from "../packages/database/src/swagger-docs-schema";import { WORKFLOW_ACTIONS } from "../packages/ee/src/workflows/catalog/actions";import { buildCatalog } from "../packages/ee/src/workflows/catalog/build";@@ -36,72 +38,85 @@ function sorted<T>(record: Record<string, T>): Record<string, T> {);}-const built = buildCatalog(- WORKFLOW_ENTITY_REGISTRY,- WORKFLOW_MOMENTS,- WORKFLOW_ACTIONS,- WORKFLOW_OPERATIONS,- schema-);+async function main(): Promise<void> {+ // An UnmappablePropertyError here is deliberate: it exits non-zero, naming the+ // piece, action and property, and writes no files.+ const integrationSteps = await buildPieceActionDeclarations();++ const built = buildCatalog(+ WORKFLOW_ENTITY_REGISTRY,+ WORKFLOW_MOMENTS,+ WORKFLOW_ACTIONS,+ WORKFLOW_OPERATIONS,+ schema,+ integrationSteps+ );-const events = [- HEADER,- `import type { BuiltEvent } from "./build";`,- `import type { ValueType } from "../definition/types";`,- ``,- `export type { BuiltEvent as GeneratedEvent };`,- ``,- `export const WORKFLOW_EVENTS: Record<string, BuiltEvent> = ${JSON.stringify(sorted(built.events))};`,- ``,- `export const WORKFLOW_ENTITIES: Record<string, Record<string, ValueType>> = ${JSON.stringify(sorted(built.entities))};`,- ``,- `export const WORKFLOW_ENTITY_ENUMS: Record<string, Record<string, readonly string[]>> = ${JSON.stringify(sorted(built.enums))};`,- ``-].join("\n");+ const events = [+ HEADER,+ `import type { BuiltEvent } from "./build";`,+ `import type { ValueType } from "../definition/types";`,+ ``,+ `export type { BuiltEvent as GeneratedEvent };`,+ ``,+ `export const WORKFLOW_EVENTS: Record<string, BuiltEvent> = ${JSON.stringify(sorted(built.events))};`,+ ``,+ `export const WORKFLOW_ENTITIES: Record<string, Record<string, ValueType>> = ${JSON.stringify(sorted(built.entities))};`,+ ``,+ `export const WORKFLOW_ENTITY_ENUMS: Record<string, Record<string, readonly string[]>> = ${JSON.stringify(sorted(built.enums))};`,+ ``+ ].join("\n");-const actions = [- HEADER,- `import type { BuiltAction, BuiltOperation } from "./build";`,- ``,- `export const WORKFLOW_ACTION_CATALOG: Record<string, BuiltAction> = ${JSON.stringify(sorted(built.actions))};`,- ``,- `export const WORKFLOW_OPERATION_CATALOG: Record<string, BuiltOperation> = ${JSON.stringify(sorted(built.operations))};`,- ``-].join("\n");+ const actions = [+ HEADER,+ `import type { BuiltAction, BuiltIntegration, BuiltOperation } from "./build";`,+ ``,+ `export const WORKFLOW_ACTION_CATALOG: Record<string, BuiltAction> = ${JSON.stringify(sorted(built.actions))};`,+ ``,+ `export const WORKFLOW_INTEGRATION_CATALOG: Record<string, BuiltIntegration> = ${JSON.stringify(sorted(built.integrations))};`,+ ``,+ `export const WORKFLOW_OPERATION_CATALOG: Record<string, BuiltOperation> = ${JSON.stringify(sorted(built.operations))};`,+ ``+ ].join("\n");-const labels = [- HEADER,- `import type { MessageDescriptor } from "@lingui/core";`,- `import { msg } from "@lingui/core/macro";`,- ``,- `export const WORKFLOW_LABELS: Record<string, MessageDescriptor> = {`,- // A literal template per id, so Lingui's extractor sees each message.- Object.entries(sorted(built.labels))- .map(([id, label]) => ` ${JSON.stringify(id)}: msg\`${label}\``)- .join(",\n"),- `};`,- ``-].join("\n");+ const labels = [+ HEADER,+ `import type { MessageDescriptor } from "@lingui/core";`,+ `import { msg } from "@lingui/core/macro";`,+ ``,+ `export const WORKFLOW_LABELS: Record<string, MessageDescriptor> = {`,+ // A literal template per id, so Lingui's extractor sees each message.+ Object.entries(sorted(built.labels))+ .map(([id, label]) => ` ${JSON.stringify(id)}: msg\`${label}\``)+ .join(",\n"),+ `};`,+ ``+ ].join("\n");-// A plain object, not a macro file — so unlike labels this one is safe to import-// from plain Node, which check-workflow-catalog.ts relies on.-const help = [- HEADER,- `import type { TermId } from "@carbon/content/glossary";`,- ``,- `export const WORKFLOW_FIELD_HELP: Record<string, TermId> = ${JSON.stringify(sorted(built.help))};`,- ``-].join("\n");+ // A plain object, not a macro file — so unlike labels this one is safe to import+ // from plain Node, which check-workflow-catalog.ts relies on.+ const help = [+ HEADER,+ `import type { TermId } from "@carbon/content/glossary";`,+ ``,+ `export const WORKFLOW_FIELD_HELP: Record<string, TermId> = ${JSON.stringify(sorted(built.help))};`,+ ``+ ].join("\n");-fs.writeFileSync(path.join(CATALOG_DIR, "events.generated.ts"), events);-fs.writeFileSync(path.join(CATALOG_DIR, "actions.generated.ts"), actions);-fs.writeFileSync(path.join(CATALOG_DIR, "labels.generated.ts"), labels);-fs.writeFileSync(path.join(CATALOG_DIR, "help.generated.ts"), help);+ fs.writeFileSync(path.join(CATALOG_DIR, "events.generated.ts"), events);+ fs.writeFileSync(path.join(CATALOG_DIR, "actions.generated.ts"), actions);+ fs.writeFileSync(path.join(CATALOG_DIR, "labels.generated.ts"), labels);+ fs.writeFileSync(path.join(CATALOG_DIR, "help.generated.ts"), help);-console.log(- `generate-workflow-catalog: ${Object.keys(built.events).length} events, ${- Object.keys(built.entities).length- } entities, ${Object.keys(built.actions).length} actions, ${- Object.keys(built.operations).length- } operations, ${Object.keys(built.help).length} help terms`-);+ console.log(+ `generate-workflow-catalog: ${Object.keys(built.events).length} events, ${+ Object.keys(built.entities).length+ } entities, ${Object.keys(built.actions).length} actions, ${+ Object.keys(built.integrations).length+ } integration steps, ${Object.keys(built.operations).length} operations, ${+ Object.keys(built.help).length+ } help terms`+ );+}++void main();diff --git a/sst.config.ts b/sst.config.tsindex c01759fcde..4377a29e71 100644--- a/sst.config.ts+++ b/sst.config.ts@@ -71,6 +71,9 @@ export default $config({SYSTEM_STATUS_URL: process.env.SYSTEM_STATUS_URL,ERP_URL: process.env.URL_ERP ? `https://${process.env.URL_ERP}` : "https://itar.carbon.ms",EXCHANGE_RATES_API_KEY: process.env.EXCHANGE_RATES_API_KEY,+ GOOGLE_CLIENT_ID: process.env.GOOGLE_CLIENT_ID,+ GOOGLE_CLIENT_SECRET: process.env.GOOGLE_CLIENT_SECRET,+ GOOGLE_OAUTH_REDIRECT_URL: process.env.GOOGLE_OAUTH_REDIRECT_URL,GOOGLE_PLACES_API_KEY: process.env.GOOGLE_PLACES_API_KEY,INNGEST_BASE_URL: process.env.INNGEST_BASE_URL,INNGEST_EVENT_KEY: process.env.INNGEST_EVENT_KEY,@@ -109,7 +112,6 @@ export default $config({SLACK_CLIENT_SECRET: process.env.SLACK_CLIENT_SECRET,SLACK_OAUTH_REDIRECT_URL: process.env.SLACK_OAUTH_REDIRECT_URL,SLACK_SIGNING_SECRET: process.env.SLACK_SIGNING_SECRET,- SLACK_STATE_SECRET: process.env.SLACK_STATE_SECRET,STRIPE_BYPASS_COMPANY_IDS: process.env.STRIPE_BYPASS_COMPANY_IDS,STRIPE_SECRET_KEY: process.env.STRIPE_SECRET_KEY,STRIPE_WEBHOOK_SECRET: process.env.STRIPE_WEBHOOK_SECRET,