The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Move twenty-partners app to twentyhq/twenty-eng (#26161)
Mariee47832128fb4
diff --git a/packages/twenty-apps/internal/twenty-partners/.env.example b/packages/twenty-apps/internal/twenty-partners/.env.exampledeleted file mode 100644index 2996471ae63..00000000000--- a/packages/twenty-apps/internal/twenty-partners/.env.example+++ /dev/null@@ -1,6 +0,0 @@-# Credentials for integration tests (vitest.config.ts) and seed scripts-# (vitest.seed.config.ts). Copy this file to .env.local and fill in the key.-# Get an API key from the Twenty UI: Settings -> APIs & Webhooks.-# .env.local is gitignored; never commit a real key.-TWENTY_API_URL=http://localhost:2020-TWENTY_API_KEY=diff --git a/packages/twenty-apps/internal/twenty-partners/.gitignore b/packages/twenty-apps/internal/twenty-partners/.gitignoredeleted file mode 100644index fa1744219fe..00000000000--- a/packages/twenty-apps/internal/twenty-partners/.gitignore+++ /dev/null@@ -1,49 +0,0 @@-# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.--# dependencies-/node_modules-/.pnp-.pnp.*-.yarn--# codegen-generated--# testing-/coverage--# dev-/dist/--.twenty--# production-/build--# misc-.DS_Store--# internal planning docs-docs/superpowers/-**/docs/superpowers/-*.pem--# debug-npm-debug.log*-yarn-debug.log*-yarn-error.log*-.pnpm-debug.log*--# env files (can opt-in for committing if needed)-.env*-!.env.example--# typescript-*.tsbuildinfo-*.d.ts--# local graphify index (never commit — run `graphify update .` locally)-graphify-out/--.superpowers/-docs/diff --git a/packages/twenty-apps/internal/twenty-partners/.nvmrc b/packages/twenty-apps/internal/twenty-partners/.nvmrcdeleted file mode 100644index 341cb50613a..00000000000--- a/packages/twenty-apps/internal/twenty-partners/.nvmrc+++ /dev/null@@ -1 +0,0 @@-24.5.0diff --git a/packages/twenty-apps/internal/twenty-partners/.oxlintrc.json b/packages/twenty-apps/internal/twenty-partners/.oxlintrc.jsondeleted file mode 100644index 2c2035b0fe3..00000000000--- a/packages/twenty-apps/internal/twenty-partners/.oxlintrc.json+++ /dev/null@@ -1,58 +0,0 @@-{- "$schema": "./node_modules/oxlint/configuration_schema.json",- "extends": ["../../.oxlintrc.base.json"],- "plugins": ["react", "typescript", "import", "unicorn"],- "categories": {- "correctness": "off"- },- "ignorePatterns": ["node_modules", "dist"],- "rules": {- "func-style": ["error", "declaration", { "allowArrowFunctions": true }],- "no-console": "off",- "no-control-regex": "off",- "no-debugger": "error",- "no-duplicate-imports": "error",- "no-undef": "off",- "no-unused-vars": "off",- "no-redeclare": "off",- "import/no-duplicates": "error",- "typescript/no-redeclare": "error",- "typescript/ban-ts-comment": "error",- "typescript/consistent-type-imports": [- "error",- {- "prefer": "type-imports",- "fixStyle": "inline-type-imports"- }- ],- "typescript/explicit-function-return-type": "off",- "typescript/explicit-module-boundary-types": "off",- "typescript/no-empty-object-type": [- "error",- {- "allowInterfaces": "with-single-extends"- }- ],- "typescript/no-empty-function": "off",- "typescript/no-explicit-any": "off",- "typescript/no-unused-vars": [- "warn",- {- "vars": "all",- "varsIgnorePattern": "^_",- "args": "after-used",- "argsIgnorePattern": "^_"- }- ],- "react/no-unescaped-entities": "off",- "react/prop-types": "off",- "react/jsx-key": "off",- "react/display-name": "off",- "react/jsx-uses-react": "off",- "react/react-in-jsx-scope": "off",- "react/jsx-no-useless-fragment": "off",- "react/jsx-props-no-spreading": ["error", { "explicitSpread": "ignore" }],- "react-hooks/rules-of-hooks": "error",- "react-hooks/exhaustive-deps": "warn"- }-}diff --git a/packages/twenty-apps/internal/twenty-partners/.yarnrc.yml b/packages/twenty-apps/internal/twenty-partners/.yarnrc.ymldeleted file mode 100644index 3186f3f0795..00000000000--- a/packages/twenty-apps/internal/twenty-partners/.yarnrc.yml+++ /dev/null@@ -1 +0,0 @@-nodeLinker: node-modulesdiff --git a/packages/twenty-apps/internal/twenty-partners/AGENTS.md b/packages/twenty-apps/internal/twenty-partners/AGENTS.mddeleted file mode 100644index cd8500cb939..00000000000--- a/packages/twenty-apps/internal/twenty-partners/AGENTS.md+++ /dev/null@@ -1,149 +0,0 @@-# Architecture — twenty-partners--Vertical-slice modules, one folder per domain. Adapted from `twentyhq/twenty-eng`-(the largest Twenty SDK app), which migrated flat → modular as it grew. Repo-wide-conventions (kebab-case files, named exports, no `any`, `types` over `interface`,-short `//` comments) live in the root `CLAUDE.md` and still apply — this file only-adds the partners-specific structure.--> **Status:** migration complete — every domain lives under `src/modules/`. The only-> top-level `src/` entries left are `constants/universal-identifiers.ts`, `scripts/`,-> `roles/`, `skills/`, `workflows/`, `__tests__/`, and the two root config files. Add new-> code to a domain module, never a flat top-level `src/<primitive>/` folder.--## Layout--```-src/- application-config.ts # app + application variables — unchanged- default-role.ts # unchanged- constants/universal-identifiers.ts # ⚠️ MUST NOT MOVE (see Invariants)- scripts/ # ⚠️ MUST NOT MOVE — seed/purge/rls/slugify- roles/ # app-wide RLS — stays at root (spans every object)- skills/ # bundled Claude skills — unchanged- workflows/ # bundled workflows — unchanged- __tests__/helpers/ # shared test setup (client, fixtures, cleanup)- modules/- shared/ # cross-cutting: secret-guard (http/), find-or-create, paginate,- # utils, front-components, cross-domain nav folders- <domain>/ # partner · application · opportunity · … (large domains add a <feature>/ tier)- <name>.logic-function.ts # thin SDK entrypoints — sit at the domain/feature root, NOT in a subfolder- objects/ fields/ view-fields/ views/ navigation-menu-items/ page-layouts/ # declarations- constants/ # value lists + declaration UUID maps (NOT types)- services/ # business logic (testable)- graphql/{queries,mutations}/ # the only place raw queries/mutations live- connector/ # OUTBOUND third-party API per folder (<name>.connector.ts · config · types)- mappers/ utils/ types/ front-components/-```--A domain is a self-contained slice: its declarations (`objects`, `fields`, `views`, …)-**and** its logic (`logic-functions` → `services` → `graphql`/`connector`) live together.-Adding a feature means adding a folder, not scattering files across ten flat piles.--**Feature tier for large domains:** when a domain holds several distinct features, insert a-`<feature>/` level — `modules/<domain>/<feature>/<primitive>/` (the twenty-eng standard,-e.g. `modules/code-build/build-task/services/`). It keeps `graphql/` and `services/` from-becoming flat piles. Partner uses `partner/{self-service,marketplace,application-intake,-directory}/…`; opportunity uses `opportunity/{intake,matching}/…`. A small single-feature-domain (application) may keep `<domain>/<primitive>/` directly.--## The dependency rule (the one that matters — never import upward)--```-logic-functions → services → { graphql, connector, mappers } → shared · utils · types-```--- **Entrypoints (`*.logic-function.ts`, at the domain/feature root)** — SDK entrypoint- ONLY. Parse input, call one service, return. No business logic, no raw GraphQL, no- external HTTP. >~40 lines means it's doing a service's job — extract it.-- **`services/`** — all business logic. Testable, no SDK/transport coupling. Must **not**- import a `logic-function`.-- **`graphql/`** — the ONLY place raw queries/mutations live (named typed operations,- not inline `client.query(...)`).-- **`connector/`** — the ONLY place **outbound** third-party APIs are called; one folder- per API (`<name>.connector.ts` / `config.ts` / `types.ts`). **Inbound webhooks are NOT connectors** —- a webhook the app *receives* is an ordinary `logic-functions/` entrypoint guarded by the- shared secret-guard util. (Today the one real connector is Discord; TFT/client-brief/- partner-application are inbound.)-- Never import **logic** sideways between domains — share via `modules/shared/`. (A relation- field naturally referencing its target object's ID constant is a schema reference, not a- logic dependency — that cross-module import is allowed.)--## Naming--`<name>.<primitive>.ts` — e.g. `submit-application.logic-function.ts`,-`resolve-candidacy.service.ts`, `partner.object.ts`. Files are kebab-case (no PascalCase,-even for React components: `profile-picture-upload.tsx`).--Tests co-locate with their subject and split by kind: `<name>.test.ts` = unit (mocked-client, fast, no infra); `<name>.integration-test.ts` = real workspace (needs a live-server + global setup; excluded by tsconfig). The split is a selectable vitest **project**-(`--project unit`), not a file-count mandate — one `vitest.config.ts` with two projects is-preferred. Don't rename a mocked unit test to `.integration-test.ts`. Shared test setup-lives in `src/__tests__/helpers/`.--## Invariants (moving code must not break these)--- The set of `universalIdentifier` UUIDs must stay **byte-identical** across a move —- the SDK tracks primitives by identifier, not path, so a pure `git mv` is safe but a- changed/dropped UUID re-registers or orphans an object.-- **Do not move** `src/constants/universal-identifiers.ts` — the env-toolkit rewrites it- by path per bundle.-- **Do not move** `src/scripts/*` — `package.json` invokes them by path.-- **Keep importers of `src/constants/universal-identifiers.ts` pointing at the root file** —- don't relocate its UUID exports into a module.-- **Never split a relation across domains with a dangling ID import.** Paired relation- fields export/import each other's field-ID constant; keep both sides of a relation in one- domain, or hoist the shared ID into `shared/`.-- One domain per commit when migrating (`git mv` only, imports fixed in the same commit).--## Application review playbook--The Matching Admin Workspace playbook is a standalone page in-`src/modules/partner/application-intake/` (front-component + page layout +-nav item). It must stay in lockstep with real behaviour. When you change any-of the following, update the playbook in the same change:--- Website form fields that land on Partner-- The Partner Applications view (filter, columns, sort)-- `validationStage` values used as the review decision-- Intake side effects the reviewer needs to know (Discord on create;- welcome email on `VALIDATED`, linked from- `WELCOME_EMAIL_WORKFLOW_URL`)-- Marketplace ranking bonuses in- `packages/twenty-website/src/partners-marketplace/completeness-score.ts`- (case study, cover, introduction, service, picture, calendar, rate,- category, ghost rule)--Facts on the page come from the same constants the view and intake use. Do-not leave stale steps. Do not keep a second copy on twenty.com or in a Note.--## Opportunity process playbooks--How to process (Matching Admin) and How to apply (Partner Workspace) are-standalone pages under `src/modules/opportunity/how-to-process/`. They must-stay in lockstep with real operator behaviour. Update the matching page and-its copy test in the same change when you change any of:--- Intake (marketplace brief already Listed + Discord; Twenty Internal- unlisted; `/twenty-lead-brief` writes Design Doc URL)-- Listing (`Listed` flip → Discord; daily digest; Open Briefs membership)-- Intro (`Intro Sent At` turns Listed off; Invited applications)-- Win (set Partner → Won / Declined; Backup stays; unassign reopens Won- to Applied; Deals stages New → Screening → Meeting → Proposal → Customer)-- Apply (Open Briefs listed-only; pitch minimum; one pitch; state meaning)-- Bundled skills (`twenty-lead-brief`, `twenty-partner-shortlist`,- `twenty-partner-intro`): local run, expected output, GitHub URL of- `SKILL.md`-- Match via MCP: the operator can ask the agent to write CRM changes--Pages stay operator language. Skill names, slash triggers, and GitHub URLs-of those bundled skills are allowed on How to process. Open Briefs and-My Applications links are required on How to apply. Do not open Apply-from the standalone page — Apply is pinned on the brief record.--## Where does new code go?--External API call → `connector/`. Raw query/mutation → `graphql/`. Any logic →-`services/`. New SDK trigger/function → a thin `*.logic-function.ts` at the domain/feature-root that calls a service. Shared across domains → `modules/shared/`.diff --git a/packages/twenty-apps/internal/twenty-partners/CLAUDE.md b/packages/twenty-apps/internal/twenty-partners/CLAUDE.mddeleted file mode 100644index 43c994c2d36..00000000000--- a/packages/twenty-apps/internal/twenty-partners/CLAUDE.md+++ /dev/null@@ -1 +0,0 @@diff --git a/packages/twenty-apps/internal/twenty-partners/README.md b/packages/twenty-apps/internal/twenty-partners/README.mddeleted file mode 100644index 1516dcefe53..00000000000--- a/packages/twenty-apps/internal/twenty-partners/README.md+++ /dev/null@@ -1,27 +0,0 @@-# Twenty Partners--Turns the CRM into the operating system for the Twenty partner program: intake partner-eligible deals, match them to vetted marketplace partners, and track the matching pipeline end-to-end.--## What's inside--- **Partner object** — slug, status, availability, served geographies, languages spoken, deployment expertise, Calendly link, and last-match timestamp.-- **Opportunity extensions** — match status, design-doc status, intro and relance timestamps, and a relation to the matched partner.-- **Automatic matching** — when an opportunity is set to auto-match, the longest-idle available partner is assigned and the deal is marked matched; if none is available it is handed off for manual matching with an explanatory note.-- **Views** — a waiting-for-match queue, a matching-funnel overview grouped by status, the partner index, and a log of matched deals, all surfaced in the sidebar.--## Match status pipeline--`matchStatus` follows the deal lifecycle:--| Status | Meaning |-| --- | --- |-| `TO_BE_MATCHED` | Default — deal entered, awaiting assignment |-| `MANUAL_MATCH` | Needs a human to pick a partner |-| `AUTO_MATCH` | Triggers automatic partner assignment |-| `MATCHED` | Partner assigned |-| `INTRODUCED_TO_A_PARTNER` | Customer intro sent |-| `WORKING_WITH_A_PARTNER` | Engagement underway |-| `IMPLEMENTING` | Active implementation |-| `WON` | Deal closed won |-| `RECONNECT_LATER` | Paused — reconnect in future |-| `LOST` | Deal closed lost |diff --git a/packages/twenty-apps/internal/twenty-partners/package.json b/packages/twenty-apps/internal/twenty-partners/package.jsondeleted file mode 100644index acb6c9d7ae8..00000000000--- a/packages/twenty-apps/internal/twenty-partners/package.json+++ /dev/null@@ -1,47 +0,0 @@-{- "name": "twenty-partners",- "version": "1.8.4",- "license": "MIT",- "engines": {- "node": "^24.5.0",- "npm": "please-use-yarn",- "yarn": ">=4.0.2",- "twenty": ">=2.31.0"- },- "keywords": [],- "packageManager": "[email protected]",- "scripts": {- "twenty": "twenty",- "lint": "oxlint -c .oxlintrc.json .",- "lint:fix": "oxlint --fix -c .oxlintrc.json .",- "test": "vitest run",- "test:unit": "vitest run --project unit",- "test:integration": "vitest run --project integration",- "test:watch": "vitest",- "seed": "tsx src/scripts/seed.ts",- "seed:prod": "ENV_FILE=.env.prod tsx src/scripts/seed.ts",- "purge": "tsx src/scripts/purge-soft-deleted.ts",- "purge:prod": "ENV_FILE=.env.prod tsx src/scripts/purge-soft-deleted.ts",- "rls:configure": "tsx src/scripts/configure-partner-rls.ts",- "rls:configure:prod": "ENV_FILE=.env.prod tsx src/scripts/configure-partner-rls.ts"- },- "dependencies": {- "react-markdown": "^10.1.0",- "twenty-client-sdk": "2.31.0",- "twenty-sdk": "2.31.0",- "zod": "^4.1.11"- },- "devDependencies": {- "@types/node": "^24.7.2",- "@types/react": "^19.0.0",- "@types/react-dom": "^19",- "dotenv": "^16.0.0",- "oxlint": "^0.16.0",- "react": "^19.0.0",- "react-dom": "^19.0.0",- "tsx": "^4.0.0",- "typescript": "^5.9.3",- "vite-tsconfig-paths": "^4.2.1",- "vitest": "^4.0.0"- }-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/__tests__/00-seed-partners.integration-test.ts b/packages/twenty-apps/internal/twenty-partners/src/__tests__/00-seed-partners.integration-test.tsdeleted file mode 100644index 5a1063f9aae..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/__tests__/00-seed-partners.integration-test.ts+++ /dev/null@@ -1,74 +0,0 @@-// Seed file: ensures at least one ACTIVE + AVAILABLE partner exists before-// the matching integration tests run. Idempotent — skips if already seeded.-import { CoreApiClient } from 'twenty-client-sdk/core';-import { beforeAll, describe, it } from 'vitest';--describe('seed: marketplace partners', () => {- let client: CoreApiClient;-- beforeAll(() => {- client = new CoreApiClient();- });-- it('ensures at least one ACTIVE AVAILABLE partner exists', async () => {- const existingResult = await client.query({- partners: {- __args: {- filter: { validationStage: { eq: 'VALIDATED' }, availability: { eq: 'AVAILABLE' } },- first: 1,- },- edges: { node: { id: true } },- },- } as any);-- const existing = (existingResult as any).partners.edges;- if (existing.length > 0) {- console.log('[seed] partner already exists, skipping');- return;- }-- const PARTNERS = [- {- slug: 'nine-dots-ventures',- name: 'Nine Dots Ventures',- introduction: 'Boutique CRM implementer specialising in real-estate workflows.',- calendlyLink: 'https://calendly.com/placeholder',- deploymentExpertise: ['CLOUD', 'SELF_HOST'],- servedGeos: ['EUROPE', 'MENA'],- languagesSpoken: ['ENGLISH', 'FRENCH'],- },- {- slug: 'elevate-consulting',- name: 'Elevate Consulting',- introduction: 'Revenue-operations partner for B2B SaaS teams.',- calendlyLink: 'https://calendly.com/placeholder',- deploymentExpertise: ['CLOUD'],- servedGeos: ['US', 'LATAM'],- languagesSpoken: ['ENGLISH', 'SPANISH'],- },- ];-- for (const p of PARTNERS) {- const r = await client.mutation({- createPartner: {- __args: {- data: {- name: p.name,- slug: p.slug,- introduction: p.introduction,- calendarLink: { primaryLinkUrl: p.calendlyLink },- deploymentExpertise: p.deploymentExpertise,- region: p.servedGeos,- languagesSpoken: p.languagesSpoken,- validationStage: 'VALIDATED',- availability: 'AVAILABLE',- },- },- id: true,- name: true,- },- } as any);- console.log('[seed] created', (r as any).createPartner.name);- }- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/__tests__/global-setup.ts b/packages/twenty-apps/internal/twenty-partners/src/__tests__/global-setup.tsdeleted file mode 100644index 76d5993737c..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/__tests__/global-setup.ts+++ /dev/null@@ -1,87 +0,0 @@-import * as fs from 'fs';-import * as os from 'os';-import * as path from 'path';--import { appDevOnce, appUninstall } from 'twenty-sdk/cli';--const APP_PATH = process.cwd();-const CONFIG_DIR = path.join(os.homedir(), '.twenty');--function validateEnv(): { apiUrl: string; apiKey: string } {- const apiUrl = process.env.TWENTY_API_URL;- const apiKey = process.env.TWENTY_API_KEY;-- if (!apiUrl || !apiKey) {- throw new Error(- 'TWENTY_API_URL and TWENTY_API_KEY must be set.\n' +- 'Start a local server: yarn twenty server start\n' +- 'Or set them in vitest env config.',- );- }-- return { apiUrl, apiKey };-}--async function checkServer(apiUrl: string) {- let response: Response;-- try {- response = await fetch(`${apiUrl}/healthz`);- } catch {- throw new Error(- `Twenty server is not reachable at ${apiUrl}. ` +- 'Make sure the server is running before executing integration tests.',- );- }-- if (!response.ok) {- throw new Error(`Server at ${apiUrl} returned ${response.status}`);- }-}--function writeConfig(apiUrl: string, apiKey: string) {- const payload = JSON.stringify(- {- remotes: {- local: { apiUrl, apiKey, accessToken: apiKey },- },- defaultRemote: 'local',- },- null,- 2,- );-- fs.mkdirSync(CONFIG_DIR, { recursive: true });- fs.writeFileSync(path.join(CONFIG_DIR, 'config.test.json'), payload);-}--export async function setup() {- const { apiUrl, apiKey } = validateEnv();-- await checkServer(apiUrl);-- writeConfig(apiUrl, apiKey);-- await appUninstall({ appPath: APP_PATH }).catch(() => {});-- const result = await appDevOnce({- appPath: APP_PATH,- onProgress: (message: string) => console.log(`[dev] ${message}`),- });-- if (!result.success) {- throw new Error(- `Dev sync failed: ${result.error?.message ?? 'Unknown error'}`,- );- }-}--export async function teardown() {- const uninstallResult = await appUninstall({ appPath: APP_PATH });-- if (!uninstallResult.success) {- console.warn(- `App uninstall failed: ${uninstallResult.error?.message ?? 'Unknown error'}`,- );- }-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/__tests__/rate-limit-retry.setup.ts b/packages/twenty-apps/internal/twenty-partners/src/__tests__/rate-limit-retry.setup.tsdeleted file mode 100644index aaf6d4fd8fd..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/__tests__/rate-limit-retry.setup.ts+++ /dev/null@@ -1,56 +0,0 @@-import { CoreApiClient } from 'twenty-client-sdk/core';--// Integration tests authenticate with the workspace API key, which the server-// rate-limits per workspace (API_RATE_LIMITING_LONG_LIMIT requests per window).-// The full suite issues more API calls than one window allows, so later calls-// would fail with "Limit reached". The server refuses a throttled request-// without consuming a token and its bucket refills continuously, so waiting-// briefly frees a token. Transparently retry rate-limited SDK calls after a-// short delay — patching the client prototype once covers every test.--const RATE_LIMIT_MAX_RETRIES = 30;-const RATE_LIMIT_RETRY_DELAY_MS = 700;--const sleep = (ms: number): Promise<void> =>- new Promise((resolve) => setTimeout(resolve, ms));--const isRateLimitError = (error: unknown): boolean => {- const message = error instanceof Error ? error.message : String(error);- return /limit reached|tokens per/i.test(message);-};--type AsyncMethod = (...args: unknown[]) => Promise<unknown>;--const RATE_LIMIT_PATCHED = Symbol.for('twenty-partners.rateLimitRetryPatched');--const patchMethod = (methodName: 'query' | 'mutation' | 'uploadFile'): void => {- const prototype = CoreApiClient.prototype as unknown as Record<- string,- AsyncMethod- >;- const original = prototype[methodName];- if (typeof original !== 'function') return;-- prototype[methodName] = async function rateLimitRetry(...args: unknown[]) {- let attempt = 0;- for (;;) {- try {- return await original.apply(this, args);- } catch (error) {- if (!isRateLimitError(error) || attempt >= RATE_LIMIT_MAX_RETRIES) {- throw error;- }- attempt += 1;- await sleep(RATE_LIMIT_RETRY_DELAY_MS);- }- }- };-};--const clientConstructor = CoreApiClient as unknown as Record<symbol, boolean>;-if (!clientConstructor[RATE_LIMIT_PATCHED]) {- patchMethod('query');- patchMethod('mutation');- patchMethod('uploadFile');- clientConstructor[RATE_LIMIT_PATCHED] = true;-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/__tests__/schema.integration-test.ts b/packages/twenty-apps/internal/twenty-partners/src/__tests__/schema.integration-test.tsdeleted file mode 100644index 31007e28e95..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/__tests__/schema.integration-test.ts+++ /dev/null@@ -1,46 +0,0 @@-import { CoreApiClient } from 'twenty-client-sdk/core';-import { MetadataApiClient } from 'twenty-client-sdk/metadata';-import { APPLICATION_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { describe, expect, it } from 'vitest';--describe('App installation', () => {- it('should find the installed app in the applications list', async () => {- const client = new MetadataApiClient();-- const result = await client.query({- findManyApplications: {- id: true,- name: true,- universalIdentifier: true,- },- });-- const app = result.findManyApplications.find(- (a: { universalIdentifier: string }) =>- a.universalIdentifier === APPLICATION_UNIVERSAL_IDENTIFIER,- );-- expect(app).toBeDefined();- });-});--describe('CoreApiClient', () => {- it('should support CRUD on standard objects', async () => {- const client = new CoreApiClient();-- const created = await client.mutation({- createNote: {- __args: { data: { title: 'Integration test note' } },- id: true,- },- });- expect(created.createNote.id).toBeDefined();-- await client.mutation({- destroyNote: {- __args: { id: created.createNote.id },- id: true,- },- });- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/application-config.ts b/packages/twenty-apps/internal/twenty-partners/src/application-config.tsdeleted file mode 100644index 14ecf228e6b..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/application-config.ts+++ /dev/null@@ -1,33 +0,0 @@-import { defineApplication } from 'twenty-sdk/define';--import {- APP_DESCRIPTION,- APP_DISPLAY_NAME,- APPLICATION_UNIVERSAL_IDENTIFIER,-} from 'src/constants/universal-identifiers';--export default defineApplication({- universalIdentifier: APPLICATION_UNIVERSAL_IDENTIFIER,- displayName: APP_DISPLAY_NAME,- description: APP_DESCRIPTION,- applicationVariables: {- PARTNER_APPLICATION_SECRET: {- universalIdentifier: '2026a052-9f01-4d18-b6a7-31c3a5b1c7d2',- description:- "Shared secret required in the X-Application-Secret header on POST /partner-applications. Must match the website route's PARTNER_APPLICATION_SECRET env var. Set per-workspace in Settings → Apps → Twenty Partners → Variables.",- isSecret: true,- },- DISCORD_WEBHOOK_URL: {- universalIdentifier: '7056c98a-e7e1-4dba-8a40-b578f30b3479',- description:- 'Discord incoming webhook URL. When set, a notification is posted to this channel each time the application form creates a new Partner, each time the public marketplace form submits a client brief (brief details, contact name and company, and the referring partner), and each time a brief is hand-listed on the marketplace. Leave empty to disable all three. Set per-workspace in Settings → Apps → Twenty Partners → Variables.',- isSecret: true,- },- PARTNER_APP_FRONTEND_URL: {- universalIdentifier: '746e7bd8-8934-414e-95f5-cc266a624616',- description:- 'Workspace front-end base URL (e.g. https://partners.twenty.com), used to build the clickable Partner and Opportunity record links in Discord notifications. When empty, notifications are still sent but carry no links. Set per-workspace in Settings → Apps → Twenty Partners → Variables.',- isSecret: false,- },- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/constants/universal-identifiers.ts b/packages/twenty-apps/internal/twenty-partners/src/constants/universal-identifiers.tsdeleted file mode 100644index e0c392fc0c9..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/constants/universal-identifiers.ts+++ /dev/null@@ -1,78 +0,0 @@-export const APP_DISPLAY_NAME = 'Twenty partners';-export const APP_DESCRIPTION = '';-export const APPLICATION_UNIVERSAL_IDENTIFIER = 'e662fc1f-02c1-41ff-b8ba-c95a447b3965';-export const DEFAULT_ROLE_UNIVERSAL_IDENTIFIER = 'ee18c3f3-ebe7-4c56-ad6d-aad555cc32db';-export const PARTNER_OBJECT_UNIVERSAL_IDENTIFIER = '39101b39-1c16-4148-9e82-45dc271bb90d';-export const PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER = '65172140-d377-41c1-a2ae-190e96fb79dd';-export const PARTNER_LINK_OBJECT_UNIVERSAL_IDENTIFIER =- '91c1bf51-f977-4ca5-9974-954fe23d1c1c';-export const PARTNER_SERVICE_OBJECT_UNIVERSAL_IDENTIFIER =- 'cc953277-db73-45c5-9e6d-3967f9b7756f';-export const PARTNERS_NAV_UNIVERSAL_IDENTIFIER = '3fe15ab5-e38b-4914-af17-2270b210aeb2';-export const POST_INSTALL_FN_UNIVERSAL_IDENTIFIER = 'f92bad2e-5905-4757-96ee-af9869d4ca0c';-export const ON_PARTNER_APPLICATION_CREATED_FN_UNIVERSAL_IDENTIFIER = '43888cce-a2aa-4100-afbc-59a4f978ce53';-export const ON_PARTNER_LINK_CREATED_FN_UNIVERSAL_IDENTIFIER = 'a80a85f8-e32b-429e-82e9-b71cb5da54cd';-export const ON_PARTNER_SERVICE_CREATED_FN_UNIVERSAL_IDENTIFIER = '20129ceb-981e-43da-a25d-0ff6fbe52060';-export const ON_PARTNER_CONTENT_CREATED_FN_UNIVERSAL_IDENTIFIER = '18d0f329-d4a6-4b82-87ea-b78aa1a73e47';-export const ON_WORKSPACE_MEMBER_CREATED_FN_UNIVERSAL_IDENTIFIER = '30c0857b-acd9-4362-b50c-4557d18a13b0';-export const ON_OPPORTUNITY_INTRO_SENT_FN_UNIVERSAL_IDENTIFIER = 'c55a14db-e8ed-4d08-963a-65c44b50bee9';-export const ON_OPPORTUNITY_LISTED_FN_UNIVERSAL_IDENTIFIER = 'ebbb2911-57e5-4edd-bd93-4a28939115c0';-export const INTRO_SENT_AT_FIELD_UNIVERSAL_IDENTIFIER = 'fcf39b0c-0547-415e-806d-b238131ad7cc';--// Roles (Task 2)-export const PARTNER_ROLE_UNIVERSAL_IDENTIFIER = 'c3c1dc2e-1a08-4de5-abb7-2139b3d99343';--// Opportunity pipeline views + nav (simplified to partner presence; UIDs reused-// from the previous matching views so they update in place rather than re-create).-export const OPPORTUNITIES_NO_PARTNER_VIEW_UNIVERSAL_IDENTIFIER = 'fe11e738-6bf3-4714-929c-51c76a3fd050';-// Fresh id (the old matches-overview id '5a8fd51a…' kept its stale KANBAN type +-// view groups on re-sync; a new id forces a clean TABLE recreate).-export const OPPORTUNITIES_WITH_PARTNER_VIEW_UNIVERSAL_IDENTIFIER = '053449b0-3d13-400d-afc2-6182a75b6dff';-export const OPPORTUNITIES_NO_PARTNER_NAV_UNIVERSAL_IDENTIFIER = '00be7449-8927-47c8-a6a1-212d9106587f';-export const OPPORTUNITIES_WITH_PARTNER_NAV_UNIVERSAL_IDENTIFIER = '0cf349c9-fcbf-40f8-8e91-142c02bbde9c';-// Kanban board of with-partner opportunities, grouped by match status.-export const OPPORTUNITIES_WITH_PARTNER_BOARD_VIEW_UNIVERSAL_IDENTIFIER = 'a426c594-513d-4252-808f-3cf26d5532b9';-export const OPPORTUNITIES_WITH_PARTNER_BOARD_NAV_UNIVERSAL_IDENTIFIER = '3226b314-15e5-4182-89fe-b33d341f5684';--// Page layout (Task 6)-export const PARTNER_RECORD_PAGE_UNIVERSAL_IDENTIFIER = 'a888b39e-d64a-48ba-a044-d8cb685fad74';--// All Opportunities view + nav-export const ALL_OPPORTUNITIES_VIEW_UNIVERSAL_IDENTIFIER = '6ce1300b-6e91-4c28-83bb-6f692dbc7a98';-export const ALL_OPPORTUNITIES_NAV_UNIVERSAL_IDENTIFIER = '37944f52-cbe5-4814-a1e6-be5b21425870';--// Partner views + nav (harmonization)-export const PARTNER_APPLICATIONS_VIEW_UNIVERSAL_IDENTIFIER = 'b57a84ed-d7c1-420d-b0eb-348db0dac612';-export const VALIDATED_PARTNERS_VIEW_UNIVERSAL_IDENTIFIER = '13cca6a7-b9f1-4103-b011-ea2e39430899';-export const PARTNER_CONTENT_VIEW_UNIVERSAL_IDENTIFIER = 'd9db705c-795a-4a14-b891-6201149510b3';-export const PARTNER_APPLICATIONS_NAV_UNIVERSAL_IDENTIFIER = '13e2334a-6b1e-4080-8c74-d11109990cc1';-export const VALIDATED_PARTNERS_NAV_UNIVERSAL_IDENTIFIER = '6aed30c6-d80f-4ac6-aab0-db5bc59e5c4b';-export const PARTNER_CONTENT_NAV_UNIVERSAL_IDENTIFIER = '3543723d-80c1-466a-ac35-86f7b284917b';--export const MY_SERVICES_VIEW_UNIVERSAL_IDENTIFIER =- '04d85f9e-342b-4887-bbee-4d52b1dd5cb3';-export const MY_SERVICES_NAV_UNIVERSAL_IDENTIFIER =- '3cd81fb0-e6b9-4669-90d9-caf3ca6e8841';--export const MY_LINKS_VIEW_UNIVERSAL_IDENTIFIER =- '40def5de-e90a-4542-8512-2b63bae248dc';-export const MY_LINKS_NAV_UNIVERSAL_IDENTIFIER =- 'bd7b422c-0201-4bef-9170-0a415150d29b';--export const MY_CASE_STUDIES_VIEW_UNIVERSAL_IDENTIFIER =- 'e7c4a9b2-1d3f-4e5a-9b6c-8d7e6f5a4b3c';-export const MY_CASE_STUDIES_NAV_UNIVERSAL_IDENTIFIER =- 'f8d5b0c3-2e41-5f6b-8c7d-9e8f7a6b5c4d';--// Opportunity record page (standard side panel Fields widget) — view-field UIDs-// reused from the former custom FIELDS_WIDGET view so sync updates in place.-export const OPPORTUNITY_RECORD_PAGE_IS_LISTED_VIEW_FIELD_UNIVERSAL_IDENTIFIER =- '5f8c539e-82df-4db6-af05-d4c4f9b262b1';-export const OPPORTUNITY_RECORD_PAGE_NEED_VIEW_FIELD_UNIVERSAL_IDENTIFIER =- 'd44a8293-f9c5-41f6-9e08-85441475a1ce';-export const OPPORTUNITY_RECORD_PAGE_REQUIREMENTS_VIEW_FIELD_UNIVERSAL_IDENTIFIER =- '3a97a3ce-ecfd-417f-8518-120899f1111e';-export const OPPORTUNITY_RECORD_PAGE_PARTNER_VIEW_FIELD_UNIVERSAL_IDENTIFIER =- 'd186d83a-2f6b-4693-b7eb-abc47d110ae8';-export const OPPORTUNITY_RECORD_PAGE_APPLICATIONS_VIEW_FIELD_UNIVERSAL_IDENTIFIER =- '5c286d5d-c849-4210-ba55-7a2e7dc28ff1';diff --git a/packages/twenty-apps/internal/twenty-partners/src/default-role.ts b/packages/twenty-apps/internal/twenty-partners/src/default-role.tsdeleted file mode 100644index f8bd809d1b7..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/default-role.ts+++ /dev/null@@ -1,17 +0,0 @@-import { defineApplicationRole } from 'twenty-sdk/define';--import {- APP_DISPLAY_NAME,- DEFAULT_ROLE_UNIVERSAL_IDENTIFIER,-} from 'src/constants/universal-identifiers';--export default defineApplicationRole({- universalIdentifier: DEFAULT_ROLE_UNIVERSAL_IDENTIFIER,- label: `${APP_DISPLAY_NAME} default function role`,- description: `${APP_DISPLAY_NAME} default function role`,- canBeAssignedToUsers: false,- canReadAllObjectRecords: true,- canUpdateAllObjectRecords: true,- canSoftDeleteAllObjectRecords: true,- canDestroyAllObjectRecords: false,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/__tests__/on-application-created.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/__tests__/on-application-created.test.tsdeleted file mode 100644index e1e0d117c40..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/__tests__/on-application-created.test.ts+++ /dev/null@@ -1,341 +0,0 @@-import { beforeEach, describe, expect, it, vi } from 'vitest';--const { queryMock, mutationMock } = vi.hoisted(() => ({- queryMock: vi.fn(),- mutationMock: vi.fn(),-}));--vi.mock('twenty-client-sdk/core', () => ({- CoreApiClient: vi.fn(function () {- return { query: queryMock, mutation: mutationMock };- }),-}));--import { handler } from '../on-application-created.logic-function';--const MEMBER_ID = 'aaaaaaaa-1111-1111-1111-111111111111';-const PARTNER_ID = 'bbbbbbbb-2222-2222-2222-222222222222';-const APPLICATION_ID = 'cccccccc-3333-3333-3333-333333333333';-const OPPORTUNITY_ID = 'dddddddd-4444-4444-4444-444444444444';-const EXISTING_APPLICATION_ID = 'eeeeeeee-5555-5555-5555-555555555555';--const event = (after: Record<string, unknown>) =>- ({ properties: { after } }) as never;--describe('on-application-created', () => {- beforeEach(() => {- queryMock.mockReset();- mutationMock.mockReset();- mutationMock.mockResolvedValue({ updateApplication: { id: APPLICATION_ID } });- });-- it('does not stamp when the admin-created row already carries partnerUser and has no opportunity', async () => {- const result = await handler(- event({- id: APPLICATION_ID,- partnerId: PARTNER_ID,- partnerUserId: MEMBER_ID,- }),- );- expect(result).toEqual({});- expect(queryMock).not.toHaveBeenCalled();- expect(mutationMock).not.toHaveBeenCalled();- });-- it('grants opportunity visibility on an apply row that already has partnerUser', async () => {- queryMock- .mockResolvedValueOnce({- opportunities: {- edges: [- { node: { id: OPPORTUNITY_ID, applicantPartnerUserIds: null } },- ],- },- })- .mockResolvedValueOnce({- opportunities: {- edges: [- {- node: {- id: OPPORTUNITY_ID,- applicantPartnerUserIds: [MEMBER_ID],- },- },- ],- },- });-- const result = await handler(- event({- id: APPLICATION_ID,- partnerId: PARTNER_ID,- partnerUserId: MEMBER_ID,- opportunityId: OPPORTUNITY_ID,- }),- );-- expect(result).toEqual({});- expect(mutationMock).toHaveBeenCalledTimes(1);- expect(mutationMock).toHaveBeenCalledWith({- updateOpportunity: {- __args: {- id: OPPORTUNITY_ID,- data: { applicantPartnerUserIds: [MEMBER_ID] },- },- id: true,- },- });- });-- it('stamps partnerUser from the partner on an admin-created row', async () => {- queryMock.mockResolvedValue({- partners: { edges: [{ node: { id: PARTNER_ID, partnerUserId: MEMBER_ID } }] },- });-- const result = await handler(- event({ id: APPLICATION_ID, partnerId: PARTNER_ID }),- );-- expect(result).toEqual({ stamped: MEMBER_ID });- expect(mutationMock).toHaveBeenCalledTimes(1);- const args = mutationMock.mock.calls[0][0].updateApplication.__args;- expect(args.id).toBe(APPLICATION_ID);- expect(args.data).toEqual({ partnerUserId: MEMBER_ID });- });-- it('stamps partnerUser and grants opportunity visibility on an invite with an opportunity', async () => {- queryMock- .mockResolvedValueOnce({- partners: {- edges: [{ node: { id: PARTNER_ID, partnerUserId: MEMBER_ID } }],- },- })- .mockResolvedValueOnce({- opportunities: {- edges: [- { node: { id: OPPORTUNITY_ID, applicantPartnerUserIds: null } },- ],- },- })- .mockResolvedValueOnce({- opportunities: {- edges: [- {- node: {- id: OPPORTUNITY_ID,- applicantPartnerUserIds: [MEMBER_ID],- },- },- ],- },- });-- const result = await handler(- event({- id: APPLICATION_ID,- partnerId: PARTNER_ID,- opportunityId: OPPORTUNITY_ID,- }),- );-- expect(result).toEqual({ stamped: MEMBER_ID });-- const stampCall = mutationMock.mock.calls.find(- (mutationCall) => mutationCall[0].updateApplication,- )?.[0];- expect(stampCall.updateApplication.__args.data).toEqual({- partnerUserId: MEMBER_ID,- });-- const grantCall = mutationMock.mock.calls.find(- (mutationCall) => mutationCall[0].updateOpportunity,- )?.[0];- expect(grantCall).toEqual({- updateOpportunity: {- __args: {- id: OPPORTUNITY_ID,- data: { applicantPartnerUserIds: [MEMBER_ID] },- },- id: true,- },- });- });-- it('leaves an admin-created row alone when the partner has no member', async () => {- queryMock.mockResolvedValue({- partners: { edges: [{ node: { id: PARTNER_ID, partnerUserId: null } }] },- });-- const result = await handler(- event({ id: APPLICATION_ID, partnerId: PARTNER_ID }),- );-- expect(result).toEqual({ skipped: true, reason: 'partner_has_no_user' });- expect(mutationMock).not.toHaveBeenCalled();- });-- it('leaves an admin-created row alone when the partner row is absent', async () => {- queryMock.mockResolvedValue({ partners: { edges: [] } });-- const result = await handler(event({ id: APPLICATION_ID, partnerId: PARTNER_ID }));-- expect(result).toEqual({ skipped: true, reason: 'partner_has_no_user' });- expect(mutationMock).not.toHaveBeenCalled();- });-- it('resolves the candidacy when the self-apply row already carries partnerUser', async () => {- queryMock.mockResolvedValue({- partners: { edges: [{ node: { id: PARTNER_ID } }] },- });-- const result = await handler(- event({- id: APPLICATION_ID,- partnerUserId: MEMBER_ID,- createdBy: { workspaceMemberId: MEMBER_ID },- }),- );-- expect(result).toEqual({ applied: true, partnerId: PARTNER_ID });- const args = mutationMock.mock.calls[0][0].updateApplication.__args;- expect(args.data.partnerId).toBe(PARTNER_ID);- expect(args.data.state).toBe('APPLIED');- });-- it('does nothing when createdBy.workspaceMemberId is missing', async () => {- const result = await handler(- event({ id: APPLICATION_ID, createdBy: {} }),- );- expect(result).toEqual({});- expect(queryMock).not.toHaveBeenCalled();- expect(mutationMock).not.toHaveBeenCalled();- });-- it('does nothing when the member maps to no Partner', async () => {- queryMock.mockResolvedValue({ partners: { edges: [] } });-- const result = await handler(- event({- id: APPLICATION_ID,- createdBy: { workspaceMemberId: MEMBER_ID },- }),- );- expect(result).toEqual({});- expect(queryMock).toHaveBeenCalledTimes(1);- expect(mutationMock).not.toHaveBeenCalled();- });-- it('updates application with partnerId on the happy path', async () => {- queryMock.mockResolvedValue({- partners: { edges: [{ node: { id: PARTNER_ID } }] },- });-- const result = await handler(- event({- id: APPLICATION_ID,- createdBy: { workspaceMemberId: MEMBER_ID },- }),- );-- expect(result).toEqual({ applied: true, partnerId: PARTNER_ID });- expect(queryMock).toHaveBeenCalledTimes(1);- expect(mutationMock).toHaveBeenCalledTimes(1);- const call = mutationMock.mock.calls[0][0];- const args = call.updateApplication.__args;- expect(args.id).toBe(APPLICATION_ID);- expect(args.data.partnerId).toBe(PARTNER_ID);- expect(args.data.partnerUserId).toBe(MEMBER_ID);- expect(args.data.state).toBe('APPLIED');- });-- it('stamps normally when no duplicate exists for the same opportunity and partner', async () => {- queryMock- .mockResolvedValueOnce({- partners: { edges: [{ node: { id: PARTNER_ID } }] },- })- .mockResolvedValueOnce({ applications: { edges: [] } })- .mockResolvedValueOnce({- opportunities: {- edges: [- { node: { id: OPPORTUNITY_ID, applicantPartnerUserIds: null } },- ],- },- })- .mockResolvedValueOnce({- opportunities: {- edges: [- {- node: {- id: OPPORTUNITY_ID,- applicantPartnerUserIds: [MEMBER_ID],- },- },- ],- },- });-- const result = await handler(- event({- id: APPLICATION_ID,- opportunityId: OPPORTUNITY_ID,- createdBy: { workspaceMemberId: MEMBER_ID },- }),- );-- expect(result).toEqual({ applied: true, partnerId: PARTNER_ID });-- const call = mutationMock.mock.calls.find(- (mutationCall) => mutationCall[0].updateApplication,- )?.[0];- expect(call.updateApplication.__args.id).toBe(APPLICATION_ID);- expect(call.updateApplication.__args.data.partnerId).toBe(PARTNER_ID);- expect(call.updateApplication.__args.data.partnerUserId).toBe(MEMBER_ID);- expect(call.updateApplication.__args.data.state).toBe('APPLIED');-- const grantCall = mutationMock.mock.calls.find(- (mutationCall) => mutationCall[0].updateOpportunity,- )?.[0];- expect(grantCall).toEqual({- updateOpportunity: {- __args: {- id: OPPORTUNITY_ID,- data: { applicantPartnerUserIds: [MEMBER_ID] },- },- id: true,- },- });- });-- it('soft-deletes a duplicate application and keeps the existing one', async () => {- queryMock- .mockResolvedValueOnce({- partners: { edges: [{ node: { id: PARTNER_ID } }] },- })- .mockResolvedValueOnce({- applications: { edges: [{ node: { id: EXISTING_APPLICATION_ID } }] },- });- mutationMock.mockResolvedValue({- deleteApplication: { id: APPLICATION_ID },- });-- const result = await handler(- event({- id: APPLICATION_ID,- opportunityId: OPPORTUNITY_ID,- createdBy: { workspaceMemberId: MEMBER_ID },- }),- );-- expect(result).toEqual({- duplicate: true,- keptExisting: EXISTING_APPLICATION_ID,- });- expect(queryMock).toHaveBeenCalledTimes(2);- expect(mutationMock).toHaveBeenCalledTimes(1);- expect(mutationMock.mock.calls[0][0].deleteApplication.__args.id).toBe(- APPLICATION_ID,- );- expect(- mutationMock.mock.calls.find((call) => call[0].updateApplication),- ).toBeUndefined();- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/__tests__/on-application-set-name.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/__tests__/on-application-set-name.test.tsdeleted file mode 100644index e98a3d6828c..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/__tests__/on-application-set-name.test.ts+++ /dev/null@@ -1,69 +0,0 @@-import { beforeEach, describe, expect, it, vi } from 'vitest';--const { queryMock, mutationMock } = vi.hoisted(() => ({- queryMock: vi.fn(),- mutationMock: vi.fn(),-}));--vi.mock('twenty-client-sdk/core', () => ({- CoreApiClient: vi.fn(function () {- return { query: queryMock, mutation: mutationMock };- }),-}));--import { handler } from '../on-application-set-name.logic-function';--const event = (after: Record<string, unknown>, updatedFields: string[]) =>- ({ properties: { after, updatedFields } }) as never;--describe('on-application-set-name', () => {- beforeEach(() => {- queryMock.mockReset();- mutationMock.mockReset();- mutationMock.mockResolvedValue({ updateApplication: { id: 'a1' } });- });-- it('labels the application from partner + opportunity names', async () => {- queryMock.mockResolvedValue({- applications: {- edges: [- {- node: {- id: 'a1',- partner: { name: 'Acme Partners' },- opportunity: { name: 'Q3 Renewal' },- },- },- ],- },- });-- await handler(event({ id: 'a1' }, ['partnerId']));-- expect(mutationMock).toHaveBeenCalledWith({- updateApplication: {- __args: { id: 'a1', data: { name: 'Acme Partners · Q3 Renewal' } },- id: true,- },- });- });-- it('ignores updates that touch neither relation', async () => {- await handler(event({ id: 'a1' }, ['pitch']));- expect(queryMock).not.toHaveBeenCalled();- expect(mutationMock).not.toHaveBeenCalled();- });-- it('falls back to the placeholder label when the application row is absent', async () => {- queryMock.mockResolvedValue({ applications: { edges: [] } });-- await handler(event({ id: 'a1' }, ['partnerId']));-- expect(mutationMock).toHaveBeenCalledWith({- updateApplication: {- __args: { id: 'a1', data: { name: 'Unassigned · No brief' } },- id: true,- },- });- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/__tests__/apply-to-brief.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/__tests__/apply-to-brief.test.tsdeleted file mode 100644index 1943ff6adce..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/__tests__/apply-to-brief.test.ts+++ /dev/null@@ -1,321 +0,0 @@-import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';--const { queryMock, mutationMock, metadataQueryMock } = vi.hoisted(() => ({- queryMock: vi.fn(),- mutationMock: vi.fn(),- metadataQueryMock: vi.fn(),-}));--vi.mock('twenty-client-sdk/core', () => ({- CoreApiClient: vi.fn(function () {- return { query: queryMock, mutation: mutationMock };- }),-}));--vi.mock('twenty-client-sdk/metadata', () => ({- MetadataApiClient: vi.fn(function () {- return { query: metadataQueryMock };- }),-}));--import { MIN_PITCH_LENGTH } from 'src/modules/application/apply/constants/apply-to-brief.constants';-import { applyToBrief } from 'src/modules/application/apply/services/apply-to-brief.service';--const USER_ID = 'user-1';-const WORKSPACE_ID = 'workspace-1';-const WORKSPACE_MEMBER_ID = 'member-1';-const PARTNER_ID = 'partner-1';-const PARTNER_NAME = 'Acme Partners';-const OPPORTUNITY_ID = 'opportunity-1';-const AUTHORIZATION = 'Bearer caller-token';--const APP_TOKEN = `header.${Buffer.from(- JSON.stringify({ workspaceId: WORKSPACE_ID }),-).toString('base64url')}.sig`;--type QueryResponses = {- workspaceMembers?: unknown;- partners?: unknown;- opportunities?: unknown;- applications?: unknown;-};--const defaultResponses = (): QueryResponses => ({- workspaceMembers: { edges: [{ node: { id: WORKSPACE_MEMBER_ID } }] },- partners: { edges: [{ node: { id: PARTNER_ID, name: PARTNER_NAME } }] },- opportunities: {- edges: [- { node: { id: OPPORTUNITY_ID, name: 'Q3 Renewal', isListed: true } },- ],- },- applications: { edges: [] },-});--const respondWith = (overrides: QueryResponses = {}) => {- const responses = { ...defaultResponses(), ...overrides };- queryMock.mockImplementation((selection: Record<string, unknown>) => {- const key = Object.keys(selection)[0] as keyof QueryResponses;- return Promise.resolve({ [key as string]: responses[key] });- });-};--const pitchOf = (length: number) => 'a'.repeat(length);--const event = (- body: unknown,- authorization: string | null = AUTHORIZATION,-) => ({- body,- headers: { authorization: authorization ?? undefined },-});--const validBody = {- opportunityId: OPPORTUNITY_ID,- pitch: pitchOf(MIN_PITCH_LENGTH),-};--describe('applyToBrief', () => {- const originalAppToken = process.env.TWENTY_APP_ACCESS_TOKEN;- afterEach(() => {- if (originalAppToken === undefined)- delete process.env.TWENTY_APP_ACCESS_TOKEN;- else process.env.TWENTY_APP_ACCESS_TOKEN = originalAppToken;- });-- beforeEach(() => {- queryMock.mockReset();- mutationMock.mockReset();- metadataQueryMock.mockReset();- process.env.TWENTY_APP_ACCESS_TOKEN = APP_TOKEN;- metadataQueryMock.mockResolvedValue({- currentUser: { id: USER_ID, currentWorkspace: { id: WORKSPACE_ID } },- });- mutationMock.mockResolvedValue({- createApplication: { id: 'application-1' },- });- respondWith();- });-- it('refuses an unauthenticated caller without creating anything', async () => {- const result = await applyToBrief(event(validBody, null));-- expect(result).toEqual({ ok: false, reason: 'UNAUTHENTICATED' });- expect(mutationMock).not.toHaveBeenCalled();- });-- it('refuses a caller with no partner without creating anything', async () => {- respondWith({ partners: { edges: [] } });-- const result = await applyToBrief(event(validBody));-- expect(result).toEqual({ ok: false, reason: 'NO_PARTNER' });- expect(mutationMock).not.toHaveBeenCalled();- });-- it('refuses a token minted in another workspace without creating anything', async () => {- metadataQueryMock.mockResolvedValue({- currentUser: { id: USER_ID, currentWorkspace: { id: 'workspace-other' } },- });-- const result = await applyToBrief(event(validBody));-- expect(result).toEqual({ ok: false, reason: 'UNAUTHENTICATED' });- expect(mutationMock).not.toHaveBeenCalled();- });-- it('refuses a brief that is not listed without creating anything', async () => {- respondWith({- opportunities: {- edges: [- { node: { id: OPPORTUNITY_ID, name: 'Q3 Renewal', isListed: false } },- ],- },- });-- const result = await applyToBrief(event(validBody));-- expect(result).toEqual({ ok: false, reason: 'BRIEF_NOT_OPEN' });- expect(mutationMock).not.toHaveBeenCalled();- });-- it('refuses a brief that does not exist without creating anything', async () => {- respondWith({ opportunities: { edges: [] } });-- const result = await applyToBrief(event(validBody));-- expect(result).toEqual({ ok: false, reason: 'BRIEF_NOT_OPEN' });- expect(mutationMock).not.toHaveBeenCalled();- });-- it('refuses a body without an opportunityId without creating anything', async () => {- const result = await applyToBrief(- event({ pitch: pitchOf(MIN_PITCH_LENGTH) }),- );-- expect(result).toEqual({ ok: false, reason: 'BAD_REQUEST' });- expect(mutationMock).not.toHaveBeenCalled();- });-- it('refuses a pitch one character below the minimum after trim', async () => {- const pitch = ` ${pitchOf(MIN_PITCH_LENGTH - 1)} `;-- const result = await applyToBrief(- event({ opportunityId: OPPORTUNITY_ID, pitch }),- );-- expect(result).toEqual({ ok: false, reason: 'PITCH_TOO_SHORT' });- expect(mutationMock).not.toHaveBeenCalled();- });-- it('refuses an existing application that already carries a pitch', async () => {- respondWith({- applications: {- edges: [- {- node: {- id: 'existing-application',- pitch: 'a real pitch',- state: 'APPLIED',- },- },- ],- },- });-- const result = await applyToBrief(event(validBody));-- expect(result).toEqual({ ok: false, reason: 'ALREADY_APPLIED' });- expect(mutationMock).not.toHaveBeenCalled();- });-- it.each([['INTRODUCED'], ['WON'], ['DECLINED']])(- 'refuses to fill the pitch of a pitchless row already decided at %s',- async (state) => {- respondWith({- applications: {- edges: [{ node: { id: 'decided-application', pitch: null, state } }],- },- });-- const result = await applyToBrief(event(validBody));-- expect(result).toEqual({ ok: false, reason: 'BRIEF_NOT_OPEN' });- expect(mutationMock).not.toHaveBeenCalled();- },- );-- it.each([['INVITED'], ['APPLIED'], ['BACKUP']])(- 'fills the pitch of a pitchless row still in the running at %s',- async (state) => {- respondWith({- applications: {- edges: [{ node: { id: 'live-application', pitch: null, state } }],- },- });-- const result = await applyToBrief(event(validBody));-- expect(result).toEqual({ ok: true, applicationId: 'live-application' });- },- );-- it.each([- ['null', null],- ['whitespace only', ' \n '],- ])(- 'fills the pitch of an existing row whose pitch is %s',- async (_label, pitch) => {- respondWith({- applications: {- edges: [- { node: { id: 'invited-application', pitch, state: 'INVITED' } },- ],- },- });- const submittedPitch = ` ${pitchOf(MIN_PITCH_LENGTH)} `;-- const result = await applyToBrief(- event({ opportunityId: OPPORTUNITY_ID, pitch: submittedPitch }),- );-- expect(result).toEqual({- ok: true,- applicationId: 'invited-application',- });- expect(mutationMock).toHaveBeenCalledTimes(1);- expect(mutationMock).toHaveBeenCalledWith({- updateApplication: {- __args: {- id: 'invited-application',- data: { pitch: submittedPitch.trim() },- },- id: true,- },- });-- const data = mutationMock.mock.calls[0][0].updateApplication.__args.data;- expect(Object.keys(data)).toEqual(['pitch']);- expect(data).not.toHaveProperty('state');- },- );-- it('creates the application once with the five derived fields', async () => {- const pitch = ` ${pitchOf(MIN_PITCH_LENGTH + 20)} `;-- const result = await applyToBrief(- event({ opportunityId: OPPORTUNITY_ID, pitch }),- );-- expect(result).toEqual({ ok: true, applicationId: 'application-1' });- expect(mutationMock).toHaveBeenCalledTimes(1);- expect(mutationMock).toHaveBeenCalledWith({- createApplication: {- __args: {- data: {- opportunityId: OPPORTUNITY_ID,- partnerId: PARTNER_ID,- partnerUserId: WORKSPACE_MEMBER_ID,- pitch: pitch.trim(),- name: 'Acme Partners · Q3 Renewal',- },- },- id: true,- },- });- });-- it('accepts a pitch of exactly the minimum length', async () => {- const result = await applyToBrief(- event({- opportunityId: OPPORTUNITY_ID,- pitch: pitchOf(MIN_PITCH_LENGTH),- }),- );-- expect(result).toEqual({ ok: true, applicationId: 'application-1' });- expect(mutationMock).toHaveBeenCalledTimes(1);- });-- it('never reads partnerId or partnerUserId from the request body', async () => {- await applyToBrief(- event({- ...validBody,- partnerId: 'spoofed-partner',- partnerUserId: 'spoofed-member',- }),- );-- expect(mutationMock).toHaveBeenCalledWith(- expect.objectContaining({- createApplication: expect.objectContaining({- __args: {- data: expect.objectContaining({- partnerId: PARTNER_ID,- partnerUserId: WORKSPACE_MEMBER_ID,- }),- },- }),- }),- );- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/apply-to-brief.logic-function.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/apply-to-brief.logic-function.tsdeleted file mode 100644index 9ede9f0831e..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/apply-to-brief.logic-function.ts+++ /dev/null@@ -1,30 +0,0 @@-import { defineLogicFunction, type RoutePayload } from 'twenty-sdk/define';--import { APPLY_TO_BRIEF_FUNCTION_ID } from 'src/modules/application/apply/constants/apply-to-brief.constants';-import { applyToBrief } from 'src/modules/application/apply/services/apply-to-brief.service';-import { type ApplyToBriefResult } from 'src/modules/application/apply/types/apply-to-brief.types';--export const handler = (- event: Pick<RoutePayload<unknown>, 'body' | 'headers'>,-): Promise<ApplyToBriefResult> => applyToBrief(event);--export default defineLogicFunction({- universalIdentifier: APPLY_TO_BRIEF_FUNCTION_ID,- name: 'apply-to-brief',- description:- 'Creates an Application for the calling partner on a listed brief.',- // Six sequential round trips behind a cold isolate start: a first invocation measured- // 47s wall on a local dev server, so 20s killed it before the first query returned.- timeoutSeconds: 60,- handler,- httpRouteTriggerSettings: {- path: '/apply-to-brief',- httpMethod: 'POST',- // isAuthRequired would make the server mint a token carrying the caller's user claims,- // and the executor intersects the caller's role with the app role — the Partner role- // denies Application writes, so the create would be refused. The function verifies the- // forwarded header itself instead, and keeps an app-only token for the write.- isAuthRequired: false,- forwardedRequestHeaders: ['authorization'],- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/command-menu-items/apply-to-brief.command-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/command-menu-items/apply-to-brief.command-menu-item.tsdeleted file mode 100644index 45d52a52f73..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/command-menu-items/apply-to-brief.command-menu-item.ts+++ /dev/null@@ -1,21 +0,0 @@-import {- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,- defineCommandMenuItem,-} from 'twenty-sdk/define';--import {- APPLY_TO_BRIEF_COMMAND_MENU_ITEM_ID,- APPLY_TO_BRIEF_FRONT_COMPONENT_ID,-} from 'src/modules/application/apply/constants/apply-to-brief.constants';--export default defineCommandMenuItem({- universalIdentifier: APPLY_TO_BRIEF_COMMAND_MENU_ITEM_ID,- label: 'Apply to this brief',- shortLabel: 'Apply to this opportunity',- icon: 'IconSend',- isPinned: true,- availabilityType: 'RECORD_SELECTION',- availabilityObjectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- frontComponentUniversalIdentifier: APPLY_TO_BRIEF_FRONT_COMPONENT_ID,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/constants/apply-to-brief.constants.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/constants/apply-to-brief.constants.tsdeleted file mode 100644index 45dfc66fd82..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/constants/apply-to-brief.constants.ts+++ /dev/null@@ -1,12 +0,0 @@-export const APPLY_TO_BRIEF_FRONT_COMPONENT_ID =- '54f96b09-3c98-4d3c-815a-3f95a2e42527';-export const APPLY_TO_BRIEF_FUNCTION_ID =- '38fb146a-abe0-495f-8e20-1ebe99a9926a';-export const APPLY_TO_BRIEF_COMMAND_MENU_ITEM_ID =- 'e4668652-9212-4794-ab07-3514c1d0d829';-export const MIN_PITCH_LENGTH = 100;--// The states an existing row may still receive a pitch in. BACKUP belongs here: it is a-// standing shortlist set before the introduction, which is why the outcome cascade also-// leaves it alone. INTRODUCED, WON and DECLINED are decided.-export const PITCHABLE_STATES = ['APPLIED', 'INVITED', 'BACKUP'] as const;diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/front-components/apply-to-brief.front-component.tsx b/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/front-components/apply-to-brief.front-component.tsxdeleted file mode 100644index 71abb70972d..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/front-components/apply-to-brief.front-component.tsx+++ /dev/null@@ -1,179 +0,0 @@-import { useCallback, useState, type CSSProperties } from 'react';-import { defineFrontComponent } from 'twenty-sdk/define';-import {- enqueueSnackbar,- openSidePanelPage,- AppPath,- useFrontComponentExecutionContext,- type FrontComponentExecutionContext,-} from 'twenty-sdk/front-component';--import {- APPLY_TO_BRIEF_FRONT_COMPONENT_ID,- MIN_PITCH_LENGTH,-} from 'src/modules/application/apply/constants/apply-to-brief.constants';-import {- GENERIC_APPLY_FAILURE_MESSAGE,- getRefusalMessage,-} from 'src/modules/application/apply/front-components/apply-to-brief/refusal-message';-import { type ApplyToBriefResult } from 'src/modules/application/apply/types/apply-to-brief.types';-import { callAppRoute } from 'src/modules/shared/front-components/call-app-route';-import { COLORS, FONT } from 'src/modules/shared/front-components/palette';--const pageStyle: CSSProperties = {- fontFamily: FONT,- color: COLORS.fg,- maxWidth: '100%',- padding: '20px 24px',- display: 'flex',- flexDirection: 'column',- gap: 12,-};-const titleStyle: CSSProperties = { fontSize: 16, fontWeight: 700, margin: 0 };-const labelStyle: CSSProperties = {- fontSize: 12.5,- color: COLORS.muted,- lineHeight: 1.5,-};-const textareaStyle: CSSProperties = {- width: '100%',- boxSizing: 'border-box',- minHeight: 180,- padding: 12,- borderRadius: 8,- border: `1px solid ${COLORS.border}`,- background: COLORS.surface,- color: COLORS.fg,- fontSize: 14,- fontFamily: FONT,- lineHeight: 1.5,- outline: 'none',- resize: 'vertical',-};-const counterStyle: CSSProperties = { fontSize: 12, color: COLORS.muted };-const errorStyle: CSSProperties = { fontSize: 13, color: COLORS.danger };-const footerStyle: CSSProperties = {- display: 'flex',- justifyContent: 'flex-end',-};-const buttonStyle: CSSProperties = {- height: 36,- padding: '0 18px',- borderRadius: 8,- border: 'none',- background: COLORS.accent,- color: '#fff',- fontSize: 13.5,- fontWeight: 650,- fontFamily: FONT,- cursor: 'pointer',-};-const disabledButtonStyle: CSSProperties = {- ...buttonStyle,- opacity: 0.5,- cursor: 'not-allowed',-};--// `recordId` is deprecated and only covers a renderer that sends no selection.-const selectBriefId = (- context: FrontComponentExecutionContext,-): string | null => context.selectedRecordIds[0] ?? context.recordId;--const ApplyToBrief = () => {- const briefId = useFrontComponentExecutionContext(selectBriefId);- const [pitch, setPitch] = useState('');- const [isSubmitting, setIsSubmitting] = useState(false);- const [errorMessage, setErrorMessage] = useState<string | null>(null);-- const pitchLength = pitch.trim().length;- const isPitchLongEnough = pitchLength >= MIN_PITCH_LENGTH;-- const apply = useCallback(async () => {- if (!briefId) return;- setIsSubmitting(true);- setErrorMessage(null);- try {- const result = (await callAppRoute('/apply-to-brief', {- opportunityId: briefId,- pitch,- })) as ApplyToBriefResult;-- if (result.ok) {- await enqueueSnackbar({- message: 'Application sent',- variant: 'success',- });- await openSidePanelPage({- to: AppPath.RecordShowPage,- params: {- objectNameSingular: 'application',- objectRecordId: result.applicationId,- },- resetNavigationStack: true,- });- } else {- setErrorMessage(getRefusalMessage(result.reason));- }- } catch {- setErrorMessage(GENERIC_APPLY_FAILURE_MESSAGE);- } finally {- setIsSubmitting(false);- }- }, [briefId, pitch]);-- if (!briefId) {- return <div style={pageStyle}>Open a brief to apply.</div>;- }-- return (- <div style={pageStyle}>- <h1 style={titleStyle}>Apply to this brief</h1>-- <label htmlFor="apply-pitch" style={labelStyle}>- Tell the client why your team fits this brief. Twenty introduces up to 2- partners per brief, so an application is not a guarantee of an- introduction.- </label>-- <textarea- id="apply-pitch"- style={textareaStyle}- value={pitch}- onChange={(event) => setPitch(event.target.value)}- placeholder="Describe the relevant work you have done…"- disabled={isSubmitting}- />-- <div style={counterStyle}>- {pitchLength} / {MIN_PITCH_LENGTH} characters minimum- </div>-- {errorMessage && (- <div role="alert" style={errorStyle}>- {errorMessage}- </div>- )}-- <div style={footerStyle}>- <button- style={- isPitchLongEnough && !isSubmitting- ? buttonStyle- : disabledButtonStyle- }- onClick={() => void apply()}- disabled={!isPitchLongEnough || isSubmitting}- >- {isSubmitting ? 'Sending…' : 'Send application'}- </button>- </div>- </div>- );-};--export default defineFrontComponent({- universalIdentifier: APPLY_TO_BRIEF_FRONT_COMPONENT_ID,- name: 'Apply to Brief',- description: 'Side panel for a partner to pitch on an open brief.',- component: ApplyToBrief,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/front-components/apply-to-brief/refusal-message.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/front-components/apply-to-brief/refusal-message.test.tsdeleted file mode 100644index 85fac123796..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/front-components/apply-to-brief/refusal-message.test.ts+++ /dev/null@@ -1,36 +0,0 @@-import { describe, expect, it } from 'vitest';--import {- GENERIC_APPLY_FAILURE_MESSAGE,- getRefusalMessage,-} from './refusal-message';--describe('getRefusalMessage', () => {- it('maps every known reason to its own plain sentence', () => {- expect(getRefusalMessage('UNAUTHENTICATED')).toBe(- 'Sign in again to apply.',- );- expect(getRefusalMessage('NO_PARTNER')).toBe(- 'This account is not linked to a partner.',- );- expect(getRefusalMessage('BAD_REQUEST')).toBe(- 'Reopen this brief and try again.',- );- expect(getRefusalMessage('BRIEF_NOT_OPEN')).toBe(- 'This brief is no longer open for applications.',- );- expect(getRefusalMessage('PITCH_TOO_SHORT')).toBe(- 'Add a little more detail before you apply.',- );- expect(getRefusalMessage('ALREADY_APPLIED')).toBe(- 'You have already applied to this brief.',- );- });-- it('falls back to the generic sentence for an unknown reason', () => {- expect(getRefusalMessage('SOMETHING_NEW')).toBe(- GENERIC_APPLY_FAILURE_MESSAGE,- );- expect(getRefusalMessage('')).toBe(GENERIC_APPLY_FAILURE_MESSAGE);- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/front-components/apply-to-brief/refusal-message.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/front-components/apply-to-brief/refusal-message.tsdeleted file mode 100644index 083cbb48ba5..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/front-components/apply-to-brief/refusal-message.ts+++ /dev/null@@ -1,22 +0,0 @@-import { type ApplyRefusalReason } from 'src/modules/application/apply/types/apply-to-brief.types';--export const GENERIC_APPLY_FAILURE_MESSAGE =- 'Could not send your application. Try again.';--const REFUSAL_MESSAGES: Record<ApplyRefusalReason, string> = {- UNAUTHENTICATED: 'Sign in again to apply.',- NO_PARTNER: 'This account is not linked to a partner.',- BAD_REQUEST: 'Reopen this brief and try again.',- BRIEF_NOT_OPEN: 'This brief is no longer open for applications.',- PITCH_TOO_SHORT: 'Add a little more detail before you apply.',- ALREADY_APPLIED: 'You have already applied to this brief.',-};--const isApplyRefusalReason = (reason: string): reason is ApplyRefusalReason =>- reason in REFUSAL_MESSAGES;--// The route may add a reason the front component does not know yet, so never index blindly.-export const getRefusalMessage = (reason: string): string =>- isApplyRefusalReason(reason)- ? REFUSAL_MESSAGES[reason]- : GENERIC_APPLY_FAILURE_MESSAGE;diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/graphql/mutations/create-application.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/graphql/mutations/create-application.tsdeleted file mode 100644index 409bef9f070..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/graphql/mutations/create-application.ts+++ /dev/null@@ -1,10 +0,0 @@-import { type CoreApiClient, type CoreSchema } from 'twenty-client-sdk/core';--export function createApplication(- client: CoreApiClient,- data: CoreSchema.ApplicationCreateInput,-) {- return client.mutation({- createApplication: { __args: { data }, id: true },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/graphql/queries/find-opportunity-for-apply.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/graphql/queries/find-opportunity-for-apply.tsdeleted file mode 100644index 50124232926..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/graphql/queries/find-opportunity-for-apply.ts+++ /dev/null@@ -1,15 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--// List form on purpose: the single-record read throws `Record not found` for an unknown id,-// which would hide a missing brief behind the generic failure message.-export function findOpportunityForApply(- client: CoreApiClient,- opportunityId: string,-) {- return client.query({- opportunities: {- __args: { filter: { id: { eq: opportunityId } }, first: 1 },- edges: { node: { id: true, name: true, isListed: true } },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/services/apply-to-brief.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/services/apply-to-brief.service.tsdeleted file mode 100644index 510661d8899..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/services/apply-to-brief.service.ts+++ /dev/null@@ -1,94 +0,0 @@-import { type RoutePayload } from 'twenty-sdk/define';-import { z } from 'zod';--import {- MIN_PITCH_LENGTH,- PITCHABLE_STATES,-} from 'src/modules/application/apply/constants/apply-to-brief.constants';-import { createApplication } from 'src/modules/application/apply/graphql/mutations/create-application';-import { findOpportunityForApply } from 'src/modules/application/apply/graphql/queries/find-opportunity-for-apply';-import { type ApplyToBriefResult } from 'src/modules/application/apply/types/apply-to-brief.types';-import { updateApplication } from 'src/modules/application/graphql/mutations/update-application';-import { findDuplicateApplication } from 'src/modules/application/graphql/queries/find-duplicate-application';-import { buildApplicationName } from 'src/modules/application/utils/build-application-name';-import {- buildAppClient,- errorResponse,- failureResponse,- resolvePartnerFromForwardedToken,-} from 'src/modules/shared/http/resolve-partner-from-request.service';-import { isNonEmptyString } from 'src/modules/shared/utils/is-non-empty-string.util';--const applyToBriefSchema = z.object({- opportunityId: z.string().min(1),- pitch: z.string(),-});--export const applyToBrief = async (- event: Pick<RoutePayload<unknown>, 'body' | 'headers'>,-): Promise<ApplyToBriefResult> => {- const resolved = await resolvePartnerFromForwardedToken(event);- if ('error' in resolved) return errorResponse(resolved.error);-- const parsed = applyToBriefSchema.safeParse(event.body);- if (!parsed.success) return errorResponse('BAD_REQUEST');-- const { opportunityId, pitch } = parsed.data;-- try {- const client = buildAppClient();-- const briefs = await findOpportunityForApply(client, opportunityId);- const brief = briefs.opportunities?.edges?.[0]?.node;- if (!brief || brief.isListed !== true)- return errorResponse('BRIEF_NOT_OPEN');-- const trimmedPitch = pitch.trim();- if (trimmedPitch.length < MIN_PITCH_LENGTH)- return errorResponse('PITCH_TOO_SHORT');-- const duplicates = await findDuplicateApplication(- client,- opportunityId,- resolved.partnerId,- );- const existing = duplicates.applications?.edges?.[0]?.node;- if (existing?.id) {- if (isNonEmptyString(existing.pitch))- return errorResponse('ALREADY_APPLIED');-- // Fill the pitch in place and leave the state alone — an INVITED row records that- // Twenty pushed this brief at the partner. Guard on the state rather than on the- // brief being listed: the WON/DECLINED cascade fires on Opportunity.partner, which- // is not coupled to isListed, so a decided row can still sit under a listed brief.- if (!PITCHABLE_STATES.some((state) => state === existing.state)) {- return errorResponse('BRIEF_NOT_OPEN');- }-- await updateApplication(client, existing.id, { pitch: trimmedPitch });- return { ok: true, applicationId: existing.id };- }-- // on-application-set-name fires on application.updated only, so an insert that already- // carries partnerId never triggers it — the label must be written here.- const created = await createApplication(client, {- opportunityId,- partnerId: resolved.partnerId,- partnerUserId: resolved.workspaceMemberId,- pitch: trimmedPitch,- name: buildApplicationName(resolved.partnerName, brief.name),- });-- const applicationId = created.createApplication?.id;- if (!isNonEmptyString(applicationId)) {- return failureResponse(- 'apply-to-brief',- new Error('createApplication returned no id'),- );- }-- return { ok: true, applicationId };- } catch (err) {- return failureResponse('apply-to-brief', err);- }-};diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/types/apply-to-brief.types.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/types/apply-to-brief.types.tsdeleted file mode 100644index 3aa01dbbdf0..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/apply/types/apply-to-brief.types.ts+++ /dev/null@@ -1,12 +0,0 @@-export type ApplyRefusalReason =- | 'UNAUTHENTICATED'- | 'NO_PARTNER'- | 'BAD_REQUEST'- | 'BRIEF_NOT_OPEN'- | 'PITCH_TOO_SHORT'- | 'ALREADY_APPLIED';--// `reason` widens to string because failureResponse answers with a sentence, not a code.-export type ApplyToBriefResult =- | { ok: true; applicationId: string }- | { ok: false; reason: ApplyRefusalReason | string };diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/fields/applications-as-partner-user-on-workspace-member.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/fields/applications-as-partner-user-on-workspace-member.field.tsdeleted file mode 100644index 329866802b6..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/fields/applications-as-partner-user-on-workspace-member.field.ts+++ /dev/null@@ -1,27 +0,0 @@-import {- FieldType,- RelationType,- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,- defineField,-} from 'twenty-sdk/define';--import {- APPLICATIONS_AS_PARTNER_USER_FIELD_ID,- APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- APPLICATION_PARTNER_USER_FIELD_ID,-} from 'src/modules/application/objects/application.object';--export default defineField({- universalIdentifier: APPLICATIONS_AS_PARTNER_USER_FIELD_ID,- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.workspaceMember.universalIdentifier,- type: FieldType.RELATION,- name: 'partnerApplications',- label: 'Partner Applications',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier:- APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- relationTargetFieldMetadataUniversalIdentifier:- APPLICATION_PARTNER_USER_FIELD_ID,- universalSettings: { relationType: RelationType.ONE_TO_MANY },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/fields/applications-on-partner.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/fields/applications-on-partner.field.tsdeleted file mode 100644index 7cf1b7cb2ae..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/fields/applications-on-partner.field.ts+++ /dev/null@@ -1,21 +0,0 @@-import { FieldType, RelationType, defineField } from 'twenty-sdk/define';--import { PARTNER_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import {- APPLICATIONS_ON_PARTNER_FIELD_ID,- APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- APPLICATION_PARTNER_FIELD_ID,-} from 'src/modules/application/objects/application.object';--export default defineField({- universalIdentifier: APPLICATIONS_ON_PARTNER_FIELD_ID,- objectUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- type: FieldType.RELATION,- name: 'applications',- label: 'Applications',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier:- APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- relationTargetFieldMetadataUniversalIdentifier: APPLICATION_PARTNER_FIELD_ID,- universalSettings: { relationType: RelationType.ONE_TO_MANY },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/graphql/mutations/delete-application.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/graphql/mutations/delete-application.tsdeleted file mode 100644index 2cd27db96c7..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/graphql/mutations/delete-application.ts+++ /dev/null@@ -1,10 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--export function deleteApplication(client: CoreApiClient, id: string) {- return client.mutation({- deleteApplication: {- __args: { id },- id: true,- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/graphql/mutations/update-application.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/graphql/mutations/update-application.tsdeleted file mode 100644index df19f247838..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/graphql/mutations/update-application.ts+++ /dev/null@@ -1,11 +0,0 @@-import { type CoreApiClient, type CoreSchema } from 'twenty-client-sdk/core';--export function updateApplication(- client: CoreApiClient,- id: string,- data: CoreSchema.ApplicationUpdateInput,-) {- return client.mutation({- updateApplication: { __args: { id, data }, id: true },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/graphql/queries/find-application-with-relations.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/graphql/queries/find-application-with-relations.tsdeleted file mode 100644index 8ee0b0dff32..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/graphql/queries/find-application-with-relations.ts+++ /dev/null@@ -1,17 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--// List form on purpose: the single-record read throws `Record not found` for an unknown id.-export function findApplicationWithRelations(client: CoreApiClient, id: string) {- return client.query({- applications: {- __args: { filter: { id: { eq: id } }, first: 1 },- edges: {- node: {- id: true,- partner: { name: true },- opportunity: { name: true },- },- },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/graphql/queries/find-duplicate-application.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/graphql/queries/find-duplicate-application.tsdeleted file mode 100644index 2057319ccb9..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/graphql/queries/find-duplicate-application.ts+++ /dev/null@@ -1,20 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--export function findDuplicateApplication(- client: CoreApiClient,- opportunityId: string,- partnerId: string,-) {- return client.query({- applications: {- __args: {- filter: {- opportunityId: { eq: opportunityId },- partnerId: { eq: partnerId },- },- first: 1,- },- edges: { node: { id: true, pitch: true, state: true } },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/navigation-menu-items/applications-by-opportunity.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/navigation-menu-items/applications-by-opportunity.navigation-menu-item.tsdeleted file mode 100644index 3bcdab075cc..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/navigation-menu-items/applications-by-opportunity.navigation-menu-item.ts+++ /dev/null@@ -1,12 +0,0 @@-import { NavigationMenuItemType, defineNavigationMenuItem } from 'twenty-sdk/define';--import { APPLICATIONS_BY_OPPORTUNITY_VIEW_UNIVERSAL_IDENTIFIER } from 'src/modules/application/views/applications-by-opportunity.view';--export default defineNavigationMenuItem({- universalIdentifier: 'e80057bf-9b46-4502-8ccd-b25870ec293c',- type: NavigationMenuItemType.VIEW,- icon: 'IconTargetArrow',- position: 6,- folderUniversalIdentifier: '0b2e499a-ae74-45e0-af08-243e19fc56aa',- viewUniversalIdentifier: APPLICATIONS_BY_OPPORTUNITY_VIEW_UNIVERSAL_IDENTIFIER,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/navigation-menu-items/applications-review.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/navigation-menu-items/applications-review.navigation-menu-item.tsdeleted file mode 100644index e14e78193fe..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/navigation-menu-items/applications-review.navigation-menu-item.ts+++ /dev/null@@ -1,12 +0,0 @@-import { NavigationMenuItemType, defineNavigationMenuItem } from 'twenty-sdk/define';--import { APPLICATIONS_REVIEW_VIEW_UNIVERSAL_IDENTIFIER } from 'src/modules/application/views/applications-review.view';--export default defineNavigationMenuItem({- universalIdentifier: 'fcf7e5e8-9ec2-4f08-898a-39e51a2787d0',- type: NavigationMenuItemType.VIEW,- icon: 'IconUserPlus',- position: 4,- folderUniversalIdentifier: '0b2e499a-ae74-45e0-af08-243e19fc56aa',- viewUniversalIdentifier: APPLICATIONS_REVIEW_VIEW_UNIVERSAL_IDENTIFIER,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/navigation-menu-items/my-applications.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/navigation-menu-items/my-applications.navigation-menu-item.tsdeleted file mode 100644index 6f1b9ceabc0..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/navigation-menu-items/my-applications.navigation-menu-item.ts+++ /dev/null@@ -1,17 +0,0 @@-import {- NavigationMenuItemType,- defineNavigationMenuItem,-} from 'twenty-sdk/define';--import { MY_APPLICATIONS_VIEW_UNIVERSAL_IDENTIFIER } from 'src/modules/application/views/my-applications.view';--import { PARTNER_WORKSPACE_FOLDER_UNIVERSAL_IDENTIFIER } from 'src/modules/shared/navigation-menu-items/partner-workspace-folder.navigation-menu-item';--export default defineNavigationMenuItem({- universalIdentifier: '71c418f0-5761-4797-830a-2cae6d4bdd49',- type: NavigationMenuItemType.VIEW,- icon: 'IconSend',- position: 2,- folderUniversalIdentifier: PARTNER_WORKSPACE_FOLDER_UNIVERSAL_IDENTIFIER,- viewUniversalIdentifier: MY_APPLICATIONS_VIEW_UNIVERSAL_IDENTIFIER,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/navigation-menu-items/pipeline.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/navigation-menu-items/pipeline.navigation-menu-item.tsdeleted file mode 100644index 192cf403ca9..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/navigation-menu-items/pipeline.navigation-menu-item.ts+++ /dev/null@@ -1,15 +0,0 @@-import {- NavigationMenuItemType,- defineNavigationMenuItem,-} from 'twenty-sdk/define';--import { PIPELINE_VIEW_UNIVERSAL_IDENTIFIER } from 'src/modules/application/views/pipeline.view';--export default defineNavigationMenuItem({- universalIdentifier: 'ae1632fc-c53c-4a27-8e07-ad1f3a2d08b9',- type: NavigationMenuItemType.VIEW,- icon: 'IconLayoutKanban',- position: 3,- folderUniversalIdentifier: '0b2e499a-ae74-45e0-af08-243e19fc56aa',- viewUniversalIdentifier: PIPELINE_VIEW_UNIVERSAL_IDENTIFIER,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/objects/application.object.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/objects/application.object.tsdeleted file mode 100644index ea1ea99f84f..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/objects/application.object.ts+++ /dev/null@@ -1,169 +0,0 @@-import {- FieldType,- OnDeleteAction,- RelationType,- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,- defineObject,-} from 'twenty-sdk/define';--import { PARTNER_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';--export const APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER =- 'f17ec4d0-00c5-4137-9c8b-5507934d80cf';--export const APPLICATION_NAME_FIELD_ID = '51ff5f75-9df2-485f-8852-22484ae0cc3e';-export const APPLICATION_OPPORTUNITY_FIELD_ID =- '8aba48ca-1bfb-4141-b64d-b23d7f5fc41f';-export const APPLICATIONS_ON_OPPORTUNITY_FIELD_ID =- '4a6ce47b-a56b-4b21-81f4-83021fb0e09d';-export const APPLICATION_PARTNER_FIELD_ID =- '2ab5b079-fef3-452c-b4c0-a32ca1709157';-export const APPLICATIONS_ON_PARTNER_FIELD_ID =- 'e36002c5-f71b-4048-953a-79f68baba4e2';-export const APPLICATION_PARTNER_USER_FIELD_ID =- '2895bcbb-df5a-4faa-af70-097729c1dd01';-export const APPLICATIONS_AS_PARTNER_USER_FIELD_ID =- '1010f214-ab3f-43aa-a19e-d351bddc2d61';-export const APPLICATION_STATE_FIELD_ID =- 'c686db4f-f0e9-41a0-bdb3-3b4024ff59b6';-export const APPLICATION_PITCH_FIELD_ID =- '0a6cd9c9-e1e9-4315-8356-b72077443805';--export default defineObject({- universalIdentifier: APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- nameSingular: 'application',- namePlural: 'applications',- labelSingular: 'Application',- labelPlural: 'Applications',- description: 'A partner in play on an opportunity-brief — invited or applied',- icon: 'IconSend',- isSearchable: false,- labelIdentifierFieldMetadataUniversalIdentifier: APPLICATION_NAME_FIELD_ID,- fields: [- {- universalIdentifier: APPLICATION_NAME_FIELD_ID,- type: FieldType.TEXT,- name: 'name',- label: 'Name',- icon: 'IconTag',- defaultValue: "''",- },- {- universalIdentifier: APPLICATION_OPPORTUNITY_FIELD_ID,- type: FieldType.RELATION,- name: 'opportunity',- label: 'Opportunity',- icon: 'IconTargetArrow',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- relationTargetFieldMetadataUniversalIdentifier:- APPLICATIONS_ON_OPPORTUNITY_FIELD_ID,- universalSettings: {- relationType: RelationType.MANY_TO_ONE,- onDelete: OnDeleteAction.SET_NULL,- joinColumnName: 'opportunityId',- },- },- {- universalIdentifier: APPLICATION_PARTNER_FIELD_ID,- type: FieldType.RELATION,- name: 'partner',- label: 'Partner',- icon: 'IconBuildingStore',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier:- PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- relationTargetFieldMetadataUniversalIdentifier:- APPLICATIONS_ON_PARTNER_FIELD_ID,- universalSettings: {- relationType: RelationType.MANY_TO_ONE,- onDelete: OnDeleteAction.SET_NULL,- joinColumnName: 'partnerId',- },- },- {- universalIdentifier: APPLICATION_PARTNER_USER_FIELD_ID,- type: FieldType.RELATION,- name: 'partnerUser',- label: 'Partner User',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.workspaceMember- .universalIdentifier,- relationTargetFieldMetadataUniversalIdentifier:- APPLICATIONS_AS_PARTNER_USER_FIELD_ID,- universalSettings: {- relationType: RelationType.MANY_TO_ONE,- onDelete: OnDeleteAction.SET_NULL,- joinColumnName: 'partnerUserId',- },- },- {- // Candidacy funnel. WON is set ONLY by on-opportunity-partner-won (Task 3) — a locked- // mirror of Opportunity.partner, never a user-set value.- universalIdentifier: APPLICATION_STATE_FIELD_ID,- type: FieldType.SELECT,- name: 'state',- label: 'State',- icon: 'IconProgressCheck',- isNullable: false,- // Self-apply is the primary path → default APPLIED so a partner who applies never sees a- // misleading "Invited" flicker while on-application-created (async) stamps the candidacy.- // Admin invites are a manual action that explicitly sets INVITED.- defaultValue: "'APPLIED'",- options: [- {- id: '7f9d5ae7-64be-4269-8fab-3cfeaf352bcb',- value: 'APPLIED',- label: 'Applied',- position: 0,- color: 'blue',- },- {- id: '2ce94524-4ac3-4a4a-a87c-5c9841eced7c',- value: 'INVITED',- label: 'Invited',- position: 1,- color: 'gray',- },- {- id: 'e4e3d579-17ef-4ef8-b9be-54f7d361ad51',- value: 'INTRODUCED',- label: 'Introduced',- position: 2,- color: 'purple',- },- {- id: '66ff342c-577b-4a84-bbdc-4ffbfa0bdd0e',- value: 'WON',- label: 'Won',- position: 3,- color: 'green',- },- {- id: '83846e19-5008-4f06-b62d-7a1f0dad23e2',- value: 'DECLINED',- label: 'Declined',- position: 4,- color: 'red',- },- {- id: '124f7e81-39b4-47cc-83f7-7dfb81ea751d',- value: 'BACKUP',- label: 'Backup',- position: 5,- color: 'orange',- },- ],- },- {- universalIdentifier: APPLICATION_PITCH_FIELD_ID,- type: FieldType.TEXT,- name: 'pitch',- label: 'Pitch',- icon: 'IconMessage',- isNullable: true,- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/on-application-created.logic-function.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/on-application-created.logic-function.tsdeleted file mode 100644index 3a6d5d98d7a..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/on-application-created.logic-function.ts+++ /dev/null@@ -1,23 +0,0 @@-import { CoreApiClient, type CoreSchema } from 'twenty-client-sdk/core';-import {- type DatabaseEventPayload,- defineLogicFunction,- type ObjectRecordCreateEvent,-} from 'twenty-sdk/define';--import { resolveCandidacy } from 'src/modules/application/services/resolve-candidacy.service';--const ON_APPLICATION_CREATED_FN_ID = '0e055a1c-b8b3-4572-89f3-e76e37bc3f9e';--export const handler = async (- payload: DatabaseEventPayload<ObjectRecordCreateEvent<CoreSchema.Application>>,-): Promise<Record<string, unknown>> =>- resolveCandidacy(new CoreApiClient(), payload.properties.after);--export default defineLogicFunction({- universalIdentifier: ON_APPLICATION_CREATED_FN_ID,- name: 'on-application-created',- timeoutSeconds: 15,- handler,- databaseEventTriggerSettings: { eventName: 'application.created' },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/on-application-set-name.logic-function.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/on-application-set-name.logic-function.tsdeleted file mode 100644index 464f06c2cde..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/on-application-set-name.logic-function.ts+++ /dev/null@@ -1,39 +0,0 @@-import { CoreApiClient, type CoreSchema } from 'twenty-client-sdk/core';-import {- type DatabaseEventPayload,- defineLogicFunction,- type ObjectRecordUpdateEvent,-} from 'twenty-sdk/define';--import { findApplicationWithRelations } from 'src/modules/application/graphql/queries/find-application-with-relations';-import { updateApplication } from 'src/modules/application/graphql/mutations/update-application';-import { buildApplicationName } from 'src/modules/application/utils/build-application-name';--const ON_APPLICATION_SET_NAME_FN_ID = '8f123b54-a7c5-42d3-8049-a240930257a7';--// Re-label an Application "<partner> · <opportunity>" whenever either relation changes.-export const handler = async (- payload: DatabaseEventPayload<ObjectRecordUpdateEvent<CoreSchema.Application>>,-): Promise<Record<string, unknown>> => {- const { after, updatedFields } = payload.properties;- const touchedRelation = updatedFields?.includes('partnerId') || updatedFields?.includes('opportunityId');- if (!touchedRelation) return {};- const id = after?.id;- if (!id) return {};- const client = new CoreApiClient();- const result = await findApplicationWithRelations(client, id);- const application = result.applications?.edges?.[0]?.node;-- const name = buildApplicationName(application?.partner?.name, application?.opportunity?.name);-- await updateApplication(client, id, { name });- return { labelled: name };-};--export default defineLogicFunction({- universalIdentifier: ON_APPLICATION_SET_NAME_FN_ID,- name: 'on-application-set-name',- timeoutSeconds: 15,- handler,- databaseEventTriggerSettings: { eventName: 'application.updated' },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/page-layouts/application.page-layout.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/page-layouts/application.page-layout.tsdeleted file mode 100644index d8613789e0d..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/page-layouts/application.page-layout.ts+++ /dev/null@@ -1,49 +0,0 @@-import { PageLayoutTabLayoutMode, definePageLayout } from 'twenty-sdk/define';--import { APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/modules/application/objects/application.object';-import { APPLICATION_RECORD_PAGE_FIELDS_VIEW_ID } from 'src/modules/application/views/application-record-page-fields.view';--// Application is a custom (app-owned) object, so we fully control its record page (unlike the-// standard Opportunity). The Fields widget points at the FIELDS_WIDGET view so the opportunity +-// partner relations show in the side panel.-export default definePageLayout({- universalIdentifier: '7280910c-a409-4afc-9dac-ae9a8b3ca244',- name: 'Default Application Layout',- type: 'RECORD_PAGE',- objectUniversalIdentifier: APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- tabs: [- {- universalIdentifier: '14270284-dbd2-4d03-b9cd-a8e78c325394',- title: 'Home',- position: 10,- icon: 'IconHome',- layoutMode: PageLayoutTabLayoutMode.VERTICAL_LIST,- widgets: [- {- universalIdentifier: '7f4a57f9-44f8-4fa4-bcdb-b25055c33db0',- title: 'Fields',- type: 'FIELDS',- configuration: {- configurationType: 'FIELDS',- viewUniversalIdentifier: APPLICATION_RECORD_PAGE_FIELDS_VIEW_ID,- },- },- ],- },- {- universalIdentifier: '8f09a425-95ce-44a3-92af-7b37a1842851',- title: 'Timeline',- position: 20,- icon: 'IconTimelineEvent',- layoutMode: PageLayoutTabLayoutMode.VERTICAL_LIST,- widgets: [- {- universalIdentifier: '3e9acb85-9445-40d5-9c65-57461df8483c',- title: 'Timeline',- type: 'TIMELINE',- configuration: { configurationType: 'TIMELINE' },- },- ],- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/services/resolve-candidacy.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/services/resolve-candidacy.service.tsdeleted file mode 100644index 60444dba899..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/services/resolve-candidacy.service.ts+++ /dev/null@@ -1,80 +0,0 @@-import type { CoreApiClient, CoreSchema } from 'twenty-client-sdk/core';-import type {- DatabaseEventPayload,- ObjectRecordCreateEvent,-} from 'twenty-sdk/define';--import { findDuplicateApplication } from 'src/modules/application/graphql/queries/find-duplicate-application';-import { deleteApplication } from 'src/modules/application/graphql/mutations/delete-application';-import { updateApplication } from 'src/modules/application/graphql/mutations/update-application';-import { findPartnerByMember } from 'src/modules/shared/graphql/queries/find-partner-by-member';-import { getPartnerOwner } from 'src/modules/shared/graphql/queries/get-partner-owner';-import { grantOpportunityVisibility } from 'src/modules/shared/services/grant-opportunity-visibility.service';--type ApplicationCreatedProperties = DatabaseEventPayload<- ObjectRecordCreateEvent<CoreSchema.Application>->['properties'];--// The app route POST /apply-to-brief creates the Application with partnerId and-// partnerUserId already set, so this service skips the candidacy stamp and only grants-// opportunity read access. It still serves the admin path: an invite or an import sets-// partnerId but no partnerUserId, and this service stamps the partner's user so RLS-// doesn't hide the row from its own partner. The createdBy-based self-apply branch below-// is a fallback for rows created by a member without a partner set.-export async function resolveCandidacy(- client: CoreApiClient,- after: ApplicationCreatedProperties['after'],-): Promise<Record<string, unknown>> {- const applicationId = after?.id;- if (!applicationId) return {};-- const opportunityId = after.opportunityId;-- // Admin path (invite/import): without partnerUser, RLS hides the row from its own partner.- if (after.partnerId) {- if (after.partnerUserId) {- await grantOpportunityVisibility(client, opportunityId, [- after.partnerUserId,- ]);- return {};- }-- const ownerRes = await getPartnerOwner(client, after.partnerId);- const partnerUserId = ownerRes.partners?.edges?.[0]?.node?.partnerUserId;- if (!partnerUserId) return { skipped: true, reason: 'partner_has_no_user' };-- await updateApplication(client, applicationId, { partnerUserId });- await grantOpportunityVisibility(client, opportunityId, [partnerUserId]);- return { stamped: partnerUserId };- }-- const memberId = after.createdBy?.workspaceMemberId;- if (!memberId) return {}; // no member actor (system/import) — not a self-apply-- const partnerRes = await findPartnerByMember(client, memberId);- const partnerId = partnerRes.partners?.edges?.[0]?.node?.id;- if (!partnerId) return {}; // creator isn't a partner (e.g. admin) — leave it-- if (opportunityId) {- const existingRes = await findDuplicateApplication(client, opportunityId, partnerId);- const existingId = existingRes.applications?.edges?.find(- (edge) => edge.node?.id && edge.node.id !== applicationId,- )?.node?.id;- if (existingId) {- // No grant here on purpose: the kept row's own member holds it. A second member of- // the same partner never sees the first member's application either (partnerUser IS me).- await deleteApplication(client, applicationId);- return { duplicate: true, keptExisting: existingId };- }- }- // ponytail: dedupe by (opportunity, partner) above; two near-simultaneous creates could still both pass before either stamps — acceptable.-- await updateApplication(client, applicationId, {- partnerId,- partnerUserId: memberId,- state: 'APPLIED',- });- await grantOpportunityVisibility(client, opportunityId, [memberId]);-- return { applied: true, partnerId };-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/utils/__tests__/build-application-name.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/utils/__tests__/build-application-name.test.tsdeleted file mode 100644index 16326a72507..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/utils/__tests__/build-application-name.test.ts+++ /dev/null@@ -1,23 +0,0 @@-import { describe, expect, it } from 'vitest';--import { buildApplicationName } from 'src/modules/application/utils/build-application-name';--describe('buildApplicationName', () => {- it('joins both names with the separator', () => {- expect(buildApplicationName('Acme Partners', 'Q3 Renewal')).toBe('Acme Partners · Q3 Renewal');- });-- it('falls back to Unassigned when the partner name is missing', () => {- expect(buildApplicationName(null, 'Q3 Renewal')).toBe('Unassigned · Q3 Renewal');- expect(buildApplicationName(undefined, 'Q3 Renewal')).toBe('Unassigned · Q3 Renewal');- });-- it('falls back to No brief when the opportunity name is missing', () => {- expect(buildApplicationName('Acme Partners', null)).toBe('Acme Partners · No brief');- expect(buildApplicationName('Acme Partners', undefined)).toBe('Acme Partners · No brief');- });-- it('falls back to both defaults when both names are missing', () => {- expect(buildApplicationName(null, undefined)).toBe('Unassigned · No brief');- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/utils/build-application-name.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/utils/build-application-name.tsdeleted file mode 100644index 8781a5814f9..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/utils/build-application-name.ts+++ /dev/null@@ -1,8 +0,0 @@-export const buildApplicationName = (- partnerName: string | null | undefined,- opportunityName: string | null | undefined,-): string => {- const resolvedPartnerName = partnerName ?? 'Unassigned';- const resolvedOpportunityName = opportunityName ?? 'No brief';- return `${resolvedPartnerName} · ${resolvedOpportunityName}`;-};diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/views/application-record-page-fields.view.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/views/application-record-page-fields.view.tsdeleted file mode 100644index 2516d738f30..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/views/application-record-page-fields.view.ts+++ /dev/null@@ -1,48 +0,0 @@-import { ViewType, defineView } from 'twenty-sdk/define';--import {- APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- APPLICATION_OPPORTUNITY_FIELD_ID,- APPLICATION_PARTNER_FIELD_ID,- APPLICATION_PITCH_FIELD_ID,- APPLICATION_STATE_FIELD_ID,-} from 'src/modules/application/objects/application.object';--export const APPLICATION_RECORD_PAGE_FIELDS_VIEW_ID =- 'e004c2ff-462a-45d4-8a77-071dcf093879';--// FIELDS_WIDGET view backing the Application record page side panel. Relation fields-// (opportunity, partner) only render in the fields widget when an explicit view marks them-// visible — this is that view.-export default defineView({- universalIdentifier: APPLICATION_RECORD_PAGE_FIELDS_VIEW_ID,- name: 'Application Record Page Fields',- objectUniversalIdentifier: APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- type: ViewType.FIELDS_WIDGET,- fields: [- {- universalIdentifier: '44793f47-5d06-43fa-9d33-23ec7602ecfc',- fieldMetadataUniversalIdentifier: APPLICATION_OPPORTUNITY_FIELD_ID,- position: 0,- isVisible: true,- },- {- universalIdentifier: '7d7ef49a-6d30-44de-b4eb-bb77d93b8982',- fieldMetadataUniversalIdentifier: APPLICATION_PARTNER_FIELD_ID,- position: 1,- isVisible: true,- },- {- universalIdentifier: 'd0278990-928c-4660-ac27-3abca0e52a5e',- fieldMetadataUniversalIdentifier: APPLICATION_STATE_FIELD_ID,- position: 2,- isVisible: true,- },- {- universalIdentifier: '28e0642b-76eb-4d41-83de-b84f07b3aad9',- fieldMetadataUniversalIdentifier: APPLICATION_PITCH_FIELD_ID,- position: 3,- isVisible: true,- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/views/applications-by-opportunity.view.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/views/applications-by-opportunity.view.tsdeleted file mode 100644index 7ca84a21860..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/views/applications-by-opportunity.view.ts+++ /dev/null@@ -1,60 +0,0 @@-import { ViewSortDirection, ViewType, defineView } from 'twenty-sdk/define';--import {- APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- APPLICATION_OPPORTUNITY_FIELD_ID,- APPLICATION_PARTNER_FIELD_ID,- APPLICATION_PITCH_FIELD_ID,- APPLICATION_STATE_FIELD_ID,-} from 'src/modules/application/objects/application.object';--export const APPLICATIONS_BY_OPPORTUNITY_VIEW_UNIVERSAL_IDENTIFIER =- 'db489249-284d-41b1-8537-71a655389cb7';--// Relation fields cannot drive TABLE group-by in Twenty (only SELECT + static-// groups[]). Sort by opportunity so applicants cluster per brief instead.-export default defineView({- universalIdentifier: APPLICATIONS_BY_OPPORTUNITY_VIEW_UNIVERSAL_IDENTIFIER,- name: 'Applications by Opportunity',- icon: 'IconTargetArrow',- objectUniversalIdentifier: APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- type: ViewType.TABLE,- position: 4,- fields: [- {- universalIdentifier: '1b6984aa-4011-4b77-8121-9f4d987a2e07',- fieldMetadataUniversalIdentifier: APPLICATION_OPPORTUNITY_FIELD_ID,- position: 0,- isVisible: true,- size: 200,- },- {- universalIdentifier: 'f57b1dd2-f415-4c01-8f0a-d55b941b23c7',- fieldMetadataUniversalIdentifier: APPLICATION_PARTNER_FIELD_ID,- position: 1,- isVisible: true,- size: 200,- },- {- universalIdentifier: '612db8df-a809-4557-add4-1802a434efb2',- fieldMetadataUniversalIdentifier: APPLICATION_STATE_FIELD_ID,- position: 2,- isVisible: true,- size: 140,- },- {- universalIdentifier: 'ba53baa3-4db7-466e-a066-0d9156bc0a82',- fieldMetadataUniversalIdentifier: APPLICATION_PITCH_FIELD_ID,- position: 3,- isVisible: true,- size: 280,- },- ],- sorts: [- {- universalIdentifier: 'ce31ed78-cd7a-410a-8d95-2e10c846d765',- fieldMetadataUniversalIdentifier: APPLICATION_OPPORTUNITY_FIELD_ID,- direction: ViewSortDirection.ASC,- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/views/applications-on-partner-widget.view.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/views/applications-on-partner-widget.view.test.tsdeleted file mode 100644index 5a78e7917d2..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/views/applications-on-partner-widget.view.test.ts+++ /dev/null@@ -1,68 +0,0 @@-import { describe, expect, it } from 'vitest';-import { ViewFilterOperand, ViewType } from 'twenty-sdk/define';--import {- APPLICATION_PARTNER_FIELD_ID,- APPLICATION_STATE_FIELD_ID,-} from 'src/modules/application/objects/application.object';-import { APPLICATIONS_WIDGET_VIEW_UNIVERSAL_IDENTIFIER } from 'src/modules/application/views/applications-widget.view';--import applicationsOnPartnerWidgetView, {- APPLICATIONS_ON_PARTNER_WIDGET_VIEW_UNIVERSAL_IDENTIFIER,-} from './applications-on-partner-widget.view';--const parseFilterValue = (value: unknown) =>- typeof value === 'string' ? JSON.parse(value) : value;--describe('applications-on-partner-widget.view', () => {- it('uses a stable UUID distinct from the opportunity widget view', () => {- expect(APPLICATIONS_ON_PARTNER_WIDGET_VIEW_UNIVERSAL_IDENTIFIER).toBe(- '22d162c7-404a-4f09-92c9-790d3c33a733',- );- expect(applicationsOnPartnerWidgetView.config.universalIdentifier).toBe(- APPLICATIONS_ON_PARTNER_WIDGET_VIEW_UNIVERSAL_IDENTIFIER,- );- expect(APPLICATIONS_ON_PARTNER_WIDGET_VIEW_UNIVERSAL_IDENTIFIER).not.toBe(- APPLICATIONS_WIDGET_VIEW_UNIVERSAL_IDENTIFIER,- );- });-- it('is a TABLE_WIDGET named for the partner parent', () => {- expect(applicationsOnPartnerWidgetView.success).toBe(true);- expect(applicationsOnPartnerWidgetView.config.type).toBe(- ViewType.TABLE_WIDGET,- );- expect(applicationsOnPartnerWidgetView.config.name).toBe(- 'Applications on Partner Widget',- );- });-- it('scopes rows with partner IS current record', () => {- const filters = applicationsOnPartnerWidgetView.config.filters ?? [];-- expect(filters).toHaveLength(1);-- const partnerFilter = filters[0];-- expect(partnerFilter.fieldMetadataUniversalIdentifier).toBe(- APPLICATION_PARTNER_FIELD_ID,- );- expect(partnerFilter.operand).toBe(ViewFilterOperand.IS);- expect(parseFilterValue(partnerFilter.value)).toEqual({- selectedRecordIds: [],- isCurrentRecordSelected: true,- });- });-- it('does not filter by application state', () => {- const filters = applicationsOnPartnerWidgetView.config.filters ?? [];-- expect(- filters.some(- (filter) =>- filter.fieldMetadataUniversalIdentifier ===- APPLICATION_STATE_FIELD_ID,- ),- ).toBe(false);- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/views/applications-on-partner-widget.view.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/views/applications-on-partner-widget.view.tsdeleted file mode 100644index 75f0dcfbce6..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/views/applications-on-partner-widget.view.ts+++ /dev/null@@ -1,54 +0,0 @@-import { ViewFilterOperand, ViewType, defineView } from 'twenty-sdk/define';--import {- APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- APPLICATION_OPPORTUNITY_FIELD_ID,- APPLICATION_PARTNER_FIELD_ID,- APPLICATION_STATE_FIELD_ID,-} from 'src/modules/application/objects/application.object';--export const APPLICATIONS_ON_PARTNER_WIDGET_VIEW_UNIVERSAL_IDENTIFIER =- '22d162c7-404a-4f09-92c9-790d3c33a733';--// TABLE_WIDGET rather than TABLE so this view stays out of the record index view pickers.-export default defineView({- universalIdentifier: APPLICATIONS_ON_PARTNER_WIDGET_VIEW_UNIVERSAL_IDENTIFIER,- name: 'Applications on Partner Widget',- icon: 'IconSend',- objectUniversalIdentifier: APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- type: ViewType.TABLE_WIDGET,- fields: [- {- universalIdentifier: 'd9d4571b-5d73-4a84-ad82-e1e6fb730bc2',- fieldMetadataUniversalIdentifier: APPLICATION_PARTNER_FIELD_ID,- position: 0,- isVisible: true,- size: 220,- },- {- universalIdentifier: '607be829-a697-41f8-8fe6-a2515ba20f91',- fieldMetadataUniversalIdentifier: APPLICATION_OPPORTUNITY_FIELD_ID,- position: 1,- isVisible: true,- size: 220,- },- {- universalIdentifier: 'eb9a5b92-c697-41bf-83a9-bf0780eb4b51',- fieldMetadataUniversalIdentifier: APPLICATION_STATE_FIELD_ID,- position: 2,- isVisible: true,- size: 140,- },- ],- filters: [- {- universalIdentifier: '1fc71ed2-319c-4267-b997-033056653d70',- fieldMetadataUniversalIdentifier: APPLICATION_PARTNER_FIELD_ID,- operand: ViewFilterOperand.IS,- value: {- selectedRecordIds: [],- isCurrentRecordSelected: true,- },- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/views/applications-review.view.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/views/applications-review.view.tsdeleted file mode 100644index 8fa150ef02f..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/views/applications-review.view.ts+++ /dev/null@@ -1,105 +0,0 @@-import { ViewSortDirection, ViewType, defineView } from 'twenty-sdk/define';--import {- APPLICATION_NAME_FIELD_ID,- APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- APPLICATION_OPPORTUNITY_FIELD_ID,- APPLICATION_PARTNER_FIELD_ID,- APPLICATION_PITCH_FIELD_ID,- APPLICATION_STATE_FIELD_ID,-} from 'src/modules/application/objects/application.object';--export const APPLICATIONS_REVIEW_VIEW_UNIVERSAL_IDENTIFIER =- 'cc652ba3-23e8-4e0e-a616-c9fa50b702a0';--export default defineView({- universalIdentifier: APPLICATIONS_REVIEW_VIEW_UNIVERSAL_IDENTIFIER,- name: 'Applications',- icon: 'IconUserPlus',- objectUniversalIdentifier: APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- type: ViewType.TABLE,- position: 2,- mainGroupByFieldMetadataUniversalIdentifier: APPLICATION_STATE_FIELD_ID,- groups: [- {- universalIdentifier: '332125fd-b69f-4bb8-b33d-a07ead1ca051',- fieldValue: 'APPLIED',- position: 0,- isVisible: true,- },- {- universalIdentifier: '90af09ea-806b-446a-9816-91dd878eb485',- fieldValue: 'INVITED',- position: 1,- isVisible: true,- },- {- universalIdentifier: 'e16ad28d-27aa-454f-b9f3-ab35697e0856',- fieldValue: 'INTRODUCED',- position: 2,- isVisible: true,- },- {- universalIdentifier: 'f122dd3d-e660-44da-b250-73cbdc6a1135',- fieldValue: 'WON',- position: 3,- isVisible: true,- },- {- universalIdentifier: '22074627-0b0b-4d6d-a377-1cf34cf7bc6c',- fieldValue: 'DECLINED',- position: 4,- isVisible: true,- },- {- universalIdentifier: '274c32e1-d149-45ce-9f48-94fa7a42c77a',- fieldValue: 'BACKUP',- position: 5,- isVisible: true,- },- ],- fields: [- {- universalIdentifier: 'e91b83e8-a774-4057-9068-892463de7366',- fieldMetadataUniversalIdentifier: APPLICATION_NAME_FIELD_ID,- position: 0,- isVisible: true,- size: 220,- },- {- universalIdentifier: 'db3ed5b7-468a-468f-a3b6-c482773a7bc1',- fieldMetadataUniversalIdentifier: APPLICATION_OPPORTUNITY_FIELD_ID,- position: 1,- isVisible: true,- size: 200,- },- {- universalIdentifier: '0142b9ed-3f9c-4697-ab3f-9240c7812b4d',- fieldMetadataUniversalIdentifier: APPLICATION_PARTNER_FIELD_ID,- position: 2,- isVisible: true,- size: 200,- },- {- universalIdentifier: 'a2317ac0-1086-44c5-8f3a-c8a7d9f8edcf',- fieldMetadataUniversalIdentifier: APPLICATION_STATE_FIELD_ID,- position: 3,- isVisible: true,- size: 140,- },- {- universalIdentifier: '36a138d6-09dc-4ed9-8517-6b20778f5836',- fieldMetadataUniversalIdentifier: APPLICATION_PITCH_FIELD_ID,- position: 4,- isVisible: true,- size: 280,- },- ],- sorts: [- {- universalIdentifier: '2ea53941-c791-4684-b328-c3787292dbf4',- fieldMetadataUniversalIdentifier: APPLICATION_STATE_FIELD_ID,- direction: ViewSortDirection.ASC,- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/views/applications-widget.view.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/views/applications-widget.view.test.tsdeleted file mode 100644index 796b2a00ce3..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/views/applications-widget.view.test.ts+++ /dev/null@@ -1,62 +0,0 @@-import { describe, expect, it } from 'vitest';-import { ViewFilterOperand, ViewType } from 'twenty-sdk/define';--import {- APPLICATION_OPPORTUNITY_FIELD_ID,- APPLICATION_STATE_FIELD_ID,-} from 'src/modules/application/objects/application.object';--import applicationsWidgetView, {- APPLICATIONS_WIDGET_VIEW_UNIVERSAL_IDENTIFIER,-} from './applications-widget.view';--const parseFilterValue = (value: unknown) =>- typeof value === 'string' ? JSON.parse(value) : value;--describe('applications-widget.view', () => {- it('keeps the existing universal identifier so sync updates in place', () => {- expect(APPLICATIONS_WIDGET_VIEW_UNIVERSAL_IDENTIFIER).toBe(- 'cbaf92ec-c1a2-41c2-b471-cc131b060e4e',- );- expect(applicationsWidgetView.config.universalIdentifier).toBe(- APPLICATIONS_WIDGET_VIEW_UNIVERSAL_IDENTIFIER,- );- });-- it('is a TABLE_WIDGET named for the opportunity parent', () => {- expect(applicationsWidgetView.success).toBe(true);- expect(applicationsWidgetView.config.type).toBe(ViewType.TABLE_WIDGET);- expect(applicationsWidgetView.config.name).toBe(- 'Applications on Opportunity Widget',- );- });-- it('scopes rows with opportunity IS current record', () => {- const filters = applicationsWidgetView.config.filters ?? [];-- expect(filters).toHaveLength(1);-- const opportunityFilter = filters[0];-- expect(opportunityFilter.fieldMetadataUniversalIdentifier).toBe(- APPLICATION_OPPORTUNITY_FIELD_ID,- );- expect(opportunityFilter.operand).toBe(ViewFilterOperand.IS);- expect(parseFilterValue(opportunityFilter.value)).toEqual({- selectedRecordIds: [],- isCurrentRecordSelected: true,- });- });-- it('does not filter by application state', () => {- const filters = applicationsWidgetView.config.filters ?? [];-- expect(- filters.some(- (filter) =>- filter.fieldMetadataUniversalIdentifier ===- APPLICATION_STATE_FIELD_ID,- ),- ).toBe(false);- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/views/applications-widget.view.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/views/applications-widget.view.tsdeleted file mode 100644index 1243f3d2238..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/views/applications-widget.view.ts+++ /dev/null@@ -1,54 +0,0 @@-import { ViewFilterOperand, ViewType, defineView } from 'twenty-sdk/define';--import {- APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- APPLICATION_OPPORTUNITY_FIELD_ID,- APPLICATION_PARTNER_FIELD_ID,- APPLICATION_STATE_FIELD_ID,-} from 'src/modules/application/objects/application.object';--export const APPLICATIONS_WIDGET_VIEW_UNIVERSAL_IDENTIFIER =- 'cbaf92ec-c1a2-41c2-b471-cc131b060e4e';--// TABLE_WIDGET rather than TABLE so this view stays out of the record index view pickers.-export default defineView({- universalIdentifier: APPLICATIONS_WIDGET_VIEW_UNIVERSAL_IDENTIFIER,- name: 'Applications on Opportunity Widget',- icon: 'IconSend',- objectUniversalIdentifier: APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- type: ViewType.TABLE_WIDGET,- fields: [- {- universalIdentifier: '644e184f-82ec-4762-bc04-8c9998c2784f',- fieldMetadataUniversalIdentifier: APPLICATION_PARTNER_FIELD_ID,- position: 0,- isVisible: true,- size: 220,- },- {- universalIdentifier: '0b009608-bbf4-4b2f-b2c1-533be28abc76',- fieldMetadataUniversalIdentifier: APPLICATION_OPPORTUNITY_FIELD_ID,- position: 1,- isVisible: true,- size: 220,- },- {- universalIdentifier: '7fd677f5-01b9-4bef-9e9f-02ecb2e69eb3',- fieldMetadataUniversalIdentifier: APPLICATION_STATE_FIELD_ID,- position: 2,- isVisible: true,- size: 140,- },- ],- filters: [- {- universalIdentifier: 'df46abe6-a328-4a60-b658-e0866af03319',- fieldMetadataUniversalIdentifier: APPLICATION_OPPORTUNITY_FIELD_ID,- operand: ViewFilterOperand.IS,- value: {- selectedRecordIds: [],- isCurrentRecordSelected: true,- },- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/views/my-applications.view.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/views/my-applications.view.tsdeleted file mode 100644index a8eedfced89..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/views/my-applications.view.ts+++ /dev/null@@ -1,45 +0,0 @@-import { ViewType, defineView } from 'twenty-sdk/define';--import {- APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- APPLICATION_OPPORTUNITY_FIELD_ID,- APPLICATION_PITCH_FIELD_ID,- APPLICATION_STATE_FIELD_ID,-} from 'src/modules/application/objects/application.object';--export const MY_APPLICATIONS_VIEW_UNIVERSAL_IDENTIFIER =- 'cba45e02-b3a7-420f-ace5-5e2773076080';--// Partner-facing list of the partner's own candidacies on opportunity briefs.-// partner sees only their own rows once B7 RLS lands; unfiltered pre-B7.-export default defineView({- universalIdentifier: MY_APPLICATIONS_VIEW_UNIVERSAL_IDENTIFIER,- name: 'My Applications',- icon: 'IconSend',- objectUniversalIdentifier: APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- type: ViewType.TABLE,- position: 0,- fields: [- {- universalIdentifier: 'fe004e19-5aee-4716-aa6f-3d27cdc52ae2',- fieldMetadataUniversalIdentifier: APPLICATION_OPPORTUNITY_FIELD_ID,- position: 0,- isVisible: true,- size: 200,- },- {- universalIdentifier: '9cf77b15-fdd6-4123-bdbf-a50e422417c2',- fieldMetadataUniversalIdentifier: APPLICATION_STATE_FIELD_ID,- position: 1,- isVisible: true,- size: 140,- },- {- universalIdentifier: '321a7f6c-0207-47c2-860f-706eaa5c2fa9',- fieldMetadataUniversalIdentifier: APPLICATION_PITCH_FIELD_ID,- position: 2,- isVisible: true,- size: 280,- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/application/views/pipeline.view.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/application/views/pipeline.view.tsdeleted file mode 100644index e2bfd65cde1..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/application/views/pipeline.view.ts+++ /dev/null@@ -1,87 +0,0 @@-import { ViewType, defineView } from 'twenty-sdk/define';--import {- APPLICATION_NAME_FIELD_ID,- APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- APPLICATION_OPPORTUNITY_FIELD_ID,- APPLICATION_PARTNER_FIELD_ID,- APPLICATION_PITCH_FIELD_ID,- APPLICATION_STATE_FIELD_ID,-} from 'src/modules/application/objects/application.object';--export const PIPELINE_VIEW_UNIVERSAL_IDENTIFIER =- 'aff718b3-9f2b-42c4-9f03-8710624a8f53';--export default defineView({- universalIdentifier: PIPELINE_VIEW_UNIVERSAL_IDENTIFIER,- name: 'Pipeline',- icon: 'IconLayoutKanban',- objectUniversalIdentifier: APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- position: 3,- type: ViewType.KANBAN,- mainGroupByFieldMetadataUniversalIdentifier: APPLICATION_STATE_FIELD_ID,- groups: [- {- universalIdentifier: 'f83ea54b-9123-4bac-9f70-f6ccae30a32e',- fieldValue: 'APPLIED',- position: 0,- isVisible: true,- },- {- universalIdentifier: '28d99cbc-27d0-41d6-9389-8cc4f900ffaf',- fieldValue: 'INVITED',- position: 1,- isVisible: true,- },- {- universalIdentifier: 'e37b029a-87c2-48dd-b0af-31692c61a8d0',- fieldValue: 'INTRODUCED',- position: 2,- isVisible: true,- },- {- universalIdentifier: '1454e5fe-742d-4ee4-9ac9-6e900db47c42',- fieldValue: 'BACKUP',- position: 3,- isVisible: true,- },- {- universalIdentifier: '811f5481-17d4-4f02-a72d-1ba68ba1b7b4',- fieldValue: 'WON',- position: 4,- isVisible: true,- },- {- universalIdentifier: '7b5eb05e-c07d-4c56-a20a-baaf262f7359',- fieldValue: 'DECLINED',- position: 5,- isVisible: true,- },- ],- fields: [- {- universalIdentifier: '9bd43629-07ff-4e4b-b9d5-d9fec80a6f12',- fieldMetadataUniversalIdentifier: APPLICATION_NAME_FIELD_ID,- position: 0,- isVisible: true,- },- {- universalIdentifier: '8b8f3084-bf14-428e-add5-9d2501b13c7d',- fieldMetadataUniversalIdentifier: APPLICATION_OPPORTUNITY_FIELD_ID,- position: 1,- isVisible: true,- },- {- universalIdentifier: '42ea9d40-c568-459e-9a39-367c0f07e384',- fieldMetadataUniversalIdentifier: APPLICATION_PARTNER_FIELD_ID,- position: 2,- isVisible: true,- },- {- universalIdentifier: 'a6052de9-961f-4323-9f73-0406c6c26283',- fieldMetadataUniversalIdentifier: APPLICATION_PITCH_FIELD_ID,- position: 3,- isVisible: true,- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/constants/opportunity-stage-options.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/constants/opportunity-stage-options.tsdeleted file mode 100644index bc9c31359a5..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/constants/opportunity-stage-options.ts+++ /dev/null@@ -1,58 +0,0 @@-export const OPPORTUNITY_STAGE_FIELD_UNIVERSAL_IDENTIFIER =- '20202020-6f76-477d-8551-28cd65b2b4b9';--/** Stock Opportunity.stage options plus partners archival stages. */-export const OPPORTUNITY_STAGE_OPTIONS = [- {- id: '20202020-8e01-4afd-9c39-d2063097587a',- value: 'NEW',- label: 'New',- position: 0,- color: 'red',- },- {- id: '20202020-e685-4671-ac32-26d304dacb6e',- value: 'SCREENING',- label: 'Screening',- position: 1,- color: 'purple',- },- {- id: '20202020-dde9-4acc-b5ca-f6531a8ecb4a',- value: 'MEETING',- label: 'Meeting',- position: 2,- color: 'sky',- },- {- id: '20202020-696e-4f6b-91bc-f413e9b2f654',- value: 'PROPOSAL',- label: 'Proposal',- position: 3,- color: 'turquoise',- },- {- id: '20202020-0bb5-4a6f-a8b2-774bbad21104',- value: 'CUSTOMER',- label: 'Customer',- position: 4,- color: 'yellow',- },- {- id: 'f3a8c2d1-9e4b-4f7a-8c3d-2b1e0f9a8c7d',- value: 'DONE',- label: 'Done',- position: 5,- color: 'green',- },- {- id: 'e7d6c5b4-a3f2-4e1d-9c0b-8a7f6e5d4c3b',- value: 'DEAD',- label: 'Dead',- position: 6,- color: 'gray',- },-] as const;--export type OpportunityStageValue =- (typeof OPPORTUNITY_STAGE_OPTIONS)[number]['value'];diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/applications-on-opportunity.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/applications-on-opportunity.field.tsdeleted file mode 100644index 10720406326..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/applications-on-opportunity.field.ts+++ /dev/null@@ -1,27 +0,0 @@-import {- FieldType,- RelationType,- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,- defineField,-} from 'twenty-sdk/define';--import {- APPLICATIONS_ON_OPPORTUNITY_FIELD_ID,- APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- APPLICATION_OPPORTUNITY_FIELD_ID,-} from 'src/modules/application/objects/application.object';--export default defineField({- universalIdentifier: APPLICATIONS_ON_OPPORTUNITY_FIELD_ID,- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- type: FieldType.RELATION,- name: 'applications',- label: 'Applications',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier:- APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- relationTargetFieldMetadataUniversalIdentifier:- APPLICATION_OPPORTUNITY_FIELD_ID,- universalSettings: { relationType: RelationType.ONE_TO_MANY },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunities-as-partner-user-on-workspace-member.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunities-as-partner-user-on-workspace-member.field.tsdeleted file mode 100644index 1694df0a491..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunities-as-partner-user-on-workspace-member.field.ts+++ /dev/null@@ -1,17 +0,0 @@-import { FieldType, RelationType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--import { OPPORTUNITIES_AS_PARTNER_USER_FIELD_ID, PARTNER_USER_ON_OPPORTUNITY_FIELD_ID } from './partner-user-on-opportunity.field';--export default defineField({- universalIdentifier: OPPORTUNITIES_AS_PARTNER_USER_FIELD_ID,- objectUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.workspaceMember.universalIdentifier,- type: FieldType.RELATION,- name: 'opportunitiesAsPartnerUser',- label: 'Opportunities (as partner user)',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- relationTargetFieldMetadataUniversalIdentifier: PARTNER_USER_ON_OPPORTUNITY_FIELD_ID,- universalSettings: {- relationType: RelationType.ONE_TO_MANY,- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunities-on-partner.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunities-on-partner.field.tsdeleted file mode 100644index 3a88674b3b3..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunities-on-partner.field.ts+++ /dev/null@@ -1,18 +0,0 @@-import { FieldType, RelationType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--import { PARTNER_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { OPPORTUNITIES_ON_PARTNER_FIELD_ID, PARTNER_ON_OPPORTUNITY_FIELD_ID } from './partner-on-opportunity.field';--export default defineField({- universalIdentifier: OPPORTUNITIES_ON_PARTNER_FIELD_ID,- objectUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- type: FieldType.RELATION,- name: 'opportunities',- label: 'Opportunities',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- relationTargetFieldMetadataUniversalIdentifier: PARTNER_ON_OPPORTUNITY_FIELD_ID,- universalSettings: {- relationType: RelationType.ONE_TO_MANY,- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-applicant-partner-user-ids.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-applicant-partner-user-ids.field.tsdeleted file mode 100644index 7fa6ad2bdd3..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-applicant-partner-user-ids.field.ts+++ /dev/null@@ -1,27 +0,0 @@-import {- FieldType,- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,- defineField,-} from 'twenty-sdk/define';--export const OPPORTUNITY_APPLICANT_PARTNER_USER_IDS_FIELD_ID =- '223ec774-6cd6-4c19-8f32-308faa6b80b1';--// RLS cannot join Opportunity → Application, so applicant member ids live on the-// opportunity. After unlist, (partnerUser IS me) OR (isListed) is not enough.-// The list is append-only and stamped from the Application create event: deleting an-// application does not revoke, and an opportunity linked after creation is not granted.-export default defineField({- universalIdentifier: OPPORTUNITY_APPLICANT_PARTNER_USER_IDS_FIELD_ID,- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- type: FieldType.ARRAY,- name: 'applicantPartnerUserIds',- // Named as ids because that is what it renders. Applications is the readable list.- label: 'Applicant Member IDs',- description:- 'Internal RLS allowlist of workspace member ids. Read Applications for the applicants themselves. The app maintains this list — editing it by hand grants or removes partner access to the brief.',- icon: 'IconLock',- isNullable: true,- isUIEditable: false,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-design-doc-status.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-design-doc-status.field.tsdeleted file mode 100644index 11866bcabaa..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-design-doc-status.field.ts+++ /dev/null@@ -1,17 +0,0 @@-import { FieldType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--export const OPPORTUNITY_DESIGN_DOC_STATUS_FIELD_ID = 'cc6b8a59-f860-493f-8b9a-f138c078fbf1';--export default defineField({- universalIdentifier: OPPORTUNITY_DESIGN_DOC_STATUS_FIELD_ID,- objectUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- type: FieldType.SELECT,- name: 'designDocStatus',- label: 'Design Doc Status',- defaultValue: "'DRAFT'",- options: [- { id: '1901c790-22af-4149-a792-09374d67acfd', value: 'DRAFT', label: 'Draft', position: 0, color: 'gray' },- { id: '02cbe191-cc96-4b42-9d8e-f85cd47bed24', value: 'DONE', label: 'Done', position: 1, color: 'green' },- { id: '943e1389-12cd-4605-8066-db27ba68a50a', value: 'SHARED_WITH_PARTNER', label: 'Shared with Partner', position: 2, color: 'blue' },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-design-doc-url.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-design-doc-url.field.tsdeleted file mode 100644index e8897ad09d6..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-design-doc-url.field.ts+++ /dev/null@@ -1,12 +0,0 @@-import { FieldType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--export const OPPORTUNITY_DESIGN_DOC_URL_FIELD_ID = '37e5428c-6c8c-4616-b626-f0ea1caa443d';--export default defineField({- universalIdentifier: OPPORTUNITY_DESIGN_DOC_URL_FIELD_ID,- objectUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- type: FieldType.LINKS,- name: 'designDocUrl',- label: 'Design Doc URL',- isNullable: true,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-hosting-type.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-hosting-type.field.tsdeleted file mode 100644index 1b54a18b842..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-hosting-type.field.ts+++ /dev/null@@ -1,16 +0,0 @@-import { FieldType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--export const OPPORTUNITY_HOSTING_TYPE_FIELD_ID = '7ac7517f-bbca-4b4c-8996-6f864f71219b';--export default defineField({- universalIdentifier: OPPORTUNITY_HOSTING_TYPE_FIELD_ID,- objectUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- type: FieldType.SELECT,- name: 'hostingType',- label: 'Hosting Type',- isNullable: true,- options: [- { id: '42c108d7-a874-4d1f-be4c-e87edd08f3c7', value: 'CLOUD', label: 'Cloud', position: 0, color: 'sky' },- { id: '0fe995f4-42de-4160-96af-b3e7d542dfdd', value: 'SELF_HOSTING', label: 'Self-hosting', position: 1, color: 'purple' },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-intro-sent-at.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-intro-sent-at.field.tsdeleted file mode 100644index acc5097d840..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-intro-sent-at.field.ts+++ /dev/null@@ -1,11 +0,0 @@-import { INTRO_SENT_AT_FIELD_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { FieldType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--export default defineField({- universalIdentifier: INTRO_SENT_AT_FIELD_UNIVERSAL_IDENTIFIER,- objectUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- type: FieldType.DATE_TIME,- name: 'introSentAt',- label: 'Intro Sent At',- isNullable: true,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-is-listed.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-is-listed.field.tsdeleted file mode 100644index c48d3607d4c..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-is-listed.field.ts+++ /dev/null@@ -1,21 +0,0 @@-import {- FieldType,- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,- defineField,-} from 'twenty-sdk/define';--export const OPPORTUNITY_IS_LISTED_FIELD_ID =- '0384ac3e-7aaa-4f32-bc6c-a6de8ebdd6c3';--// Marketplace flag: a listed brief is visible to all partners via RLS. Applicants stay-// visible after unlist through applicantPartnerUserIds (see partner.role.ts).-export default defineField({- universalIdentifier: OPPORTUNITY_IS_LISTED_FIELD_ID,- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- type: FieldType.BOOLEAN,- name: 'isListed',- label: 'Listed',- icon: 'IconBuildingStore',- isNullable: true,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-lost-reason.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-lost-reason.field.tsdeleted file mode 100644index 15a9ed78329..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-lost-reason.field.ts+++ /dev/null@@ -1,12 +0,0 @@-import { FieldType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--export const OPPORTUNITY_LOST_REASON_FIELD_ID = '834e233d-b171-409e-825f-77ac49b0f19d';--export default defineField({- universalIdentifier: OPPORTUNITY_LOST_REASON_FIELD_ID,- objectUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- type: FieldType.TEXT,- name: 'lostReason',- label: 'Lost Reason',- isNullable: true,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-need.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-need.field.tsdeleted file mode 100644index 27d3d4a08fd..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-need.field.ts+++ /dev/null@@ -1,19 +0,0 @@-import {- FieldType,- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,- defineField,-} from 'twenty-sdk/define';--export const OPPORTUNITY_NEED_FIELD_ID =- 'fce63509-40c6-43e4-9def-d532c29cc0b8';--export default defineField({- universalIdentifier: OPPORTUNITY_NEED_FIELD_ID,- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- type: FieldType.TEXT,- name: 'need',- label: 'Need',- icon: 'IconTargetArrow',- isNullable: true,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-number-of-seats.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-number-of-seats.field.tsdeleted file mode 100644index 8160cdb8a86..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-number-of-seats.field.ts+++ /dev/null@@ -1,12 +0,0 @@-import { FieldType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--export const OPPORTUNITY_NUMBER_OF_SEATS_FIELD_ID = '90c683ec-2365-4533-a187-7b9ae162b753';--export default defineField({- universalIdentifier: OPPORTUNITY_NUMBER_OF_SEATS_FIELD_ID,- objectUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- type: FieldType.NUMBER,- name: 'numberOfSeats',- label: 'Number of Seats',- isNullable: true,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-requirements.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-requirements.field.tsdeleted file mode 100644index 2780b1621c1..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-requirements.field.ts+++ /dev/null@@ -1,19 +0,0 @@-import {- FieldType,- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,- defineField,-} from 'twenty-sdk/define';--export const OPPORTUNITY_REQUIREMENTS_FIELD_ID =- '68a8e0f1-6b68-4f99-9bad-9a78c21fc56d';--export default defineField({- universalIdentifier: OPPORTUNITY_REQUIREMENTS_FIELD_ID,- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- type: FieldType.TEXT,- name: 'requirements',- label: 'Requirements',- icon: 'IconListCheck',- isNullable: true,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-subscription-frequency.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-subscription-frequency.field.tsdeleted file mode 100644index a9741c2144d..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-subscription-frequency.field.ts+++ /dev/null@@ -1,16 +0,0 @@-import { FieldType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--export const OPPORTUNITY_SUBSCRIPTION_FREQUENCY_FIELD_ID = '59d5de53-202f-4913-a417-8a08970d87cc';--export default defineField({- universalIdentifier: OPPORTUNITY_SUBSCRIPTION_FREQUENCY_FIELD_ID,- objectUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- type: FieldType.SELECT,- name: 'subscriptionFrequency',- label: 'Subscription Frequency',- isNullable: true,- options: [- { id: 'e53a9ebb-11d6-40de-93f2-6bcb6ab7141c', value: 'MONTHLY', label: 'Monthly', position: 0, color: 'blue' },- { id: '6eca9f01-f891-4c9d-bef6-9238c8e67392', value: 'ANNUAL', label: 'Annual', position: 1, color: 'green' },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-subscription-type.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-subscription-type.field.tsdeleted file mode 100644index 0a8f4afa5cc..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-subscription-type.field.ts+++ /dev/null@@ -1,17 +0,0 @@-import { FieldType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--export const OPPORTUNITY_SUBSCRIPTION_TYPE_FIELD_ID = 'a58214e9-38f9-4faf-8927-09b3980fd8c3';--export default defineField({- universalIdentifier: OPPORTUNITY_SUBSCRIPTION_TYPE_FIELD_ID,- objectUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- type: FieldType.SELECT,- name: 'subscriptionType',- label: 'Subscription Type',- isNullable: true,- options: [- { id: '6d91b477-5bf1-4f5c-8aef-577b6c21fe45', value: 'PRO', label: 'Pro', position: 0, color: 'blue' },- { id: '7b64f281-3445-4429-a5f0-af9484dff8b4', value: 'ORG', label: 'Org', position: 1, color: 'green' },- { id: 'bf202f8f-caf9-45bf-a80c-65b344b2798d', value: 'ENT', label: 'Enterprise', position: 2, color: 'purple' },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-tft-id.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-tft-id.field.tsdeleted file mode 100644index 9622291076b..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-tft-id.field.ts+++ /dev/null@@ -1,12 +0,0 @@-import { FieldType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--export const OPPORTUNITY_TFT_ID_FIELD_ID = '2e3e1d04-2719-4e0d-9a6b-ec73acf896c5';--export default defineField({- universalIdentifier: OPPORTUNITY_TFT_ID_FIELD_ID,- objectUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- type: FieldType.TEXT,- name: 'tftOpportunityId',- label: 'TfT Opportunity ID',- isNullable: true,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-use-case.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-use-case.field.tsdeleted file mode 100644index 2d2336d9cea..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/opportunity-use-case.field.ts+++ /dev/null@@ -1,12 +0,0 @@-import { FieldType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--export const OPPORTUNITY_USE_CASE_FIELD_ID = '1bc57f52-a621-4243-ae3e-05c3f504b90c';--export default defineField({- universalIdentifier: OPPORTUNITY_USE_CASE_FIELD_ID,- objectUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- type: FieldType.TEXT,- name: 'useCase',- label: 'Use Case',- isNullable: true,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/partner-on-opportunity.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/partner-on-opportunity.field.tsdeleted file mode 100644index 5c1248796f3..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/partner-on-opportunity.field.ts+++ /dev/null@@ -1,23 +0,0 @@-import { FieldType, OnDeleteAction, RelationType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--import { PARTNER_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';--export const PARTNER_ON_OPPORTUNITY_FIELD_ID = 'd9eeacaa-2f9e-44cc-b5f6-5e1526256d49';-export const OPPORTUNITIES_ON_PARTNER_FIELD_ID = '8c04a5d4-c423-487e-bd78-7142a75b2896';--export default defineField({- universalIdentifier: PARTNER_ON_OPPORTUNITY_FIELD_ID,- objectUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- type: FieldType.RELATION,- name: 'partner',- label: 'Partner',- icon: 'IconBuildingStore',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- relationTargetFieldMetadataUniversalIdentifier: OPPORTUNITIES_ON_PARTNER_FIELD_ID,- universalSettings: {- relationType: RelationType.MANY_TO_ONE,- onDelete: OnDeleteAction.SET_NULL,- joinColumnName: 'partnerId',- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/partner-user-on-opportunity.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/partner-user-on-opportunity.field.tsdeleted file mode 100644index a045a626dac..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/partner-user-on-opportunity.field.ts+++ /dev/null@@ -1,20 +0,0 @@-import { FieldType, OnDeleteAction, RelationType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--export const PARTNER_USER_ON_OPPORTUNITY_FIELD_ID = '7022a40a-a954-4e6b-96b8-1faff0919ec0';-export const OPPORTUNITIES_AS_PARTNER_USER_FIELD_ID = 'b03a26e8-6d9d-4d70-930b-2006929c9869';--export default defineField({- universalIdentifier: PARTNER_USER_ON_OPPORTUNITY_FIELD_ID,- objectUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- type: FieldType.RELATION,- name: 'partnerUser',- label: 'Partner User',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.workspaceMember.universalIdentifier,- relationTargetFieldMetadataUniversalIdentifier: OPPORTUNITIES_AS_PARTNER_USER_FIELD_ID,- universalSettings: {- relationType: RelationType.MANY_TO_ONE,- onDelete: OnDeleteAction.SET_NULL,- joinColumnName: 'partnerUserId',- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/referred-by-partner-on-opportunity.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/referred-by-partner-on-opportunity.field.tsdeleted file mode 100644index 1251ed54c29..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/referred-by-partner-on-opportunity.field.ts+++ /dev/null@@ -1,25 +0,0 @@-import { FieldType, OnDeleteAction, RelationType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--import { PARTNER_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';--export const REFERRED_BY_PARTNER_ON_OPPORTUNITY_FIELD_ID = '70fb45ca-8be9-418c-b8f8-ce91da3676d0';-export const REFERRED_OPPORTUNITIES_ON_PARTNER_FIELD_ID = '85bd7d91-c38c-468f-bdb0-60883761ee24';--// Whose public profile page the brief was submitted from — not who works the deal-// (that is `partner`).-export default defineField({- universalIdentifier: REFERRED_BY_PARTNER_ON_OPPORTUNITY_FIELD_ID,- objectUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- type: FieldType.RELATION,- name: 'referredByPartner',- label: 'Referred by',- icon: 'IconShare',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- relationTargetFieldMetadataUniversalIdentifier: REFERRED_OPPORTUNITIES_ON_PARTNER_FIELD_ID,- universalSettings: {- relationType: RelationType.MANY_TO_ONE,- onDelete: OnDeleteAction.SET_NULL,- joinColumnName: 'referredByPartnerId',- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/referred-opportunities-on-partner.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/referred-opportunities-on-partner.field.tsdeleted file mode 100644index b85d23f892b..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/fields/referred-opportunities-on-partner.field.ts+++ /dev/null@@ -1,18 +0,0 @@-import { FieldType, RelationType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--import { PARTNER_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { REFERRED_BY_PARTNER_ON_OPPORTUNITY_FIELD_ID, REFERRED_OPPORTUNITIES_ON_PARTNER_FIELD_ID } from './referred-by-partner-on-opportunity.field';--export default defineField({- universalIdentifier: REFERRED_OPPORTUNITIES_ON_PARTNER_FIELD_ID,- objectUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- type: FieldType.RELATION,- name: 'referredOpportunities',- label: 'Referred opportunities',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- relationTargetFieldMetadataUniversalIdentifier: REFERRED_BY_PARTNER_ON_OPPORTUNITY_FIELD_ID,- universalSettings: {- relationType: RelationType.ONE_TO_MANY,- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/admin-copy.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/admin-copy.test.tsdeleted file mode 100644index 0896e570f95..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/admin-copy.test.ts+++ /dev/null@@ -1,103 +0,0 @@-import { readFileSync } from 'node:fs';-import { dirname, resolve } from 'node:path';-import { fileURLToPath } from 'node:url';--import { describe, expect, it } from 'vitest';--import {- DEAL_BOARD_STAGE_LABELS,- DISCORD_CHAT_URL,- HOW_TO_PROCESS_BODY_LINKS,- HOW_TO_PROCESS_STEPS,-} from './admin-copy';--const APPLICATION_OBJECT_SOURCE = readFileSync(- resolve(- dirname(fileURLToPath(import.meta.url)),- '../../../application/objects/application.object.ts',- ),- 'utf8',-);--describe('HOW_TO_PROCESS_STEPS', () => {- it('uses Deals-board stage labels from OPPORTUNITY_STAGE_OPTIONS', () => {- const expected = ['New', 'Screening', 'Meeting', 'Proposal', 'Customer'];-- expect(DEAL_BOARD_STAGE_LABELS).toEqual(expected);-- const winnerStep = HOW_TO_PROCESS_STEPS.find((step) => step.num === '06');- expect(winnerStep?.body).toContain(expected.join(' → '));- });-- it('states the six automations the operator must not double-do', () => {- const text = HOW_TO_PROCESS_STEPS.map((step) =>- [step.body, step.note, ...(step.bullets ?? [])].join('\n'),- ).join('\n');-- expect(text).toMatch(/already Listed/i);- expect(text).toMatch(/Discord/i);- expect(text).toMatch(/Twenty Internal/);- expect(text).not.toMatch(/\bTFT\b/);- expect(text).toMatch(/daily digest/i);- expect(text).toMatch(/Intro Sent At/i);- expect(text).toMatch(/Listed.*off/i);- expect(text).toMatch(/keep it in My Applications/i);- expect(text).toMatch(/Won/i);- expect(text).toMatch(/Declined/i);- expect(text).toMatch(/Backup stays/i);- });-- it('uses Application state labels from application.object.ts', () => {- for (const label of ['Applied', 'Invited', 'Won', 'Declined', 'Backup']) {- expect(APPLICATION_OBJECT_SOURCE).toContain(`label: '${label}'`);- }-- const matchStep = HOW_TO_PROCESS_STEPS.find((step) => step.num === '04');- expect(matchStep?.pills?.join(' ')).toMatch(/Applied/);- expect(matchStep?.pills?.join(' ')).toMatch(/Invited/);- });-- it('names each skill, says run locally, and points at GitHub', () => {- const prepareStep = HOW_TO_PROCESS_STEPS.find((step) => step.num === '02');- const matchStep = HOW_TO_PROCESS_STEPS.find((step) => step.num === '04');- const introStep = HOW_TO_PROCESS_STEPS.find((step) => step.num === '05');- const leadBrief = prepareStep?.skills?.[0];- const shortlist = matchStep?.skills?.[0];- const intro = introStep?.skills?.[0];-- expect(prepareStep?.body).toMatch(/Design Doc URL/);- expect(prepareStep?.body).not.toMatch(/run locally/i);- expect(leadBrief?.name).toBe('twenty-lead-brief');- expect(leadBrief?.trigger).toBe('/twenty-lead-brief');- expect(leadBrief?.githubUrl).toContain(- 'src/skills/twenty-lead-brief/SKILL.md',- );- expect(leadBrief?.outputs.join('\n')).toMatch(/Design Doc URL/);- expect(leadBrief?.outputs.join('\n')).toMatch(/partner-match-criteria/);-- expect(matchStep?.body).toContain('/twenty-partner-shortlist');- expect(matchStep?.body).toContain('/twenty-lead-brief');- expect(matchStep?.body).toContain('/twenty-partner-intro');- expect(matchStep?.body).toMatch(/MCP/);- expect(matchStep?.body).toMatch(/changes in the CRM/i);- expect(shortlist?.name).toBe('twenty-partner-shortlist');- expect(shortlist?.githubUrl).toContain(- 'src/skills/twenty-partner-shortlist/SKILL.md',- );-- expect(introStep?.body).toContain('/twenty-partner-intro');- expect(intro?.name).toBe('twenty-partner-intro');- expect(intro?.githubUrl).toContain(- 'src/skills/twenty-partner-intro/SKILL.md',- );- });-- it('links Discord', () => {- expect(HOW_TO_PROCESS_BODY_LINKS).toEqual([- { label: 'Discord', href: DISCORD_CHAT_URL },- ]);- expect(DISCORD_CHAT_URL).toBe(- 'https://discord.com/channels/1130383047699738754/1513506376595538032',- );- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/admin-copy.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/admin-copy.tsdeleted file mode 100644index 6960032dd18..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/admin-copy.ts+++ /dev/null@@ -1,70 +0,0 @@-import { OPPORTUNITY_STAGE_OPTIONS } from 'src/modules/opportunity/constants/opportunity-stage-options';-import {- PLAYBOOK_SKILL_INTRO,- PLAYBOOK_SKILL_LEAD_BRIEF,- PLAYBOOK_SKILL_SHORTLIST,-} from 'src/modules/opportunity/how-to-process/constants/playbook-skills';-import { type PlaybookStep } from 'src/modules/opportunity/how-to-process/types/playbook-step.type';-import { type PlaybookLink } from 'src/modules/opportunity/how-to-process/utils/playbook-nav';--export const DISCORD_CHAT_URL =- 'https://discord.com/channels/1130383047699738754/1513506376595538032';--export const HOW_TO_PROCESS_KICKER = 'Playbook';-export const HOW_TO_PROCESS_TITLE = 'How to process';-export const HOW_TO_PROCESS_LEDE =- 'This is the path from a new deal to a winner. Each step says what you do, then what the app does.';--export const HOW_TO_PROCESS_BODY_LINKS: readonly PlaybookLink[] = [- { label: 'Discord', href: DISCORD_CHAT_URL },-];--export const DEAL_BOARD_STAGE_LABELS = OPPORTUNITY_STAGE_OPTIONS.filter(- (option) => option.value !== 'DONE' && option.value !== 'DEAD',-).map((option) => option.label);--const DEAL_STAGE_PATH = DEAL_BOARD_STAGE_LABELS.join(' → ');--export const HOW_TO_PROCESS_STEPS: PlaybookStep[] = [- {- num: '01',- heading: 'Where the deal comes from',- body: 'Three intakes. Treat each one differently.',- bullets: [- 'Marketplace brief — already Listed. Discord gets a ping on submit. Do not list it again.',- 'Twenty Internal — not listed. You list it later.',- 'Sales call — /twenty-lead-brief writes the Opportunity and the Design Doc URL.',- ],- },- {- num: '02',- heading: 'Prepare the brief',- body: 'Fill Need, Requirements, and Design Doc URL from the skill output. Do not intro without the doc. Partner mail carries that link.',- skills: [PLAYBOOK_SKILL_LEAD_BRIEF],- },- {- num: '03',- heading: 'List, or do not',- body: 'Turn Listed on when partners may see the brief. Open Briefs then shows the row. Discord pings on that flip. A daily digest mails validated partners. Do not also mail the whole directory.',- note: 'A marketplace brief is already Listed. Do not list twice.',- },- {- num: '04',- heading: 'Match',- body: 'Briefs to Match is the queue with no Partner yet. You can do all of this through MCP. Ask the agent to make the changes in the CRM. Skills are also available: /twenty-partner-shortlist, or wait for applications. /twenty-lead-brief is available if the brief is still thin. /twenty-partner-intro is available once you name the partners.',- pills: ['Applied — the partner came in', 'Invited — you pushed them'],- skills: [PLAYBOOK_SKILL_SHORTLIST],- },- {- num: '05',- heading: 'Intro',- body: 'After you name the partners, /twenty-partner-intro creates Invited rows and sets Intro Sent At. The app then turns Listed off. Turning Listed off removes the brief from Open Briefs, but applied and invited partners keep it in My Applications.',- note: 'Do not send a second wave unless you mean to. Unlisting is not a way to hide the brief from the partners who already applied.',- skills: [PLAYBOOK_SKILL_INTRO],- },- {- num: '06',- heading: 'Pick the winner',- body: `Set Partner on the Opportunity. The winner Application goes to Won. The others go to Declined. Backup stays. Clear Partner and only Won returns to Applied. Move the deal on Deals: ${DEAL_STAGE_PATH}.`,- },-];diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/agents-lockstep.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/agents-lockstep.test.tsdeleted file mode 100644index 17a86433cb7..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/agents-lockstep.test.ts+++ /dev/null@@ -1,26 +0,0 @@-import { readFileSync } from 'node:fs';-import { dirname, resolve } from 'node:path';-import { fileURLToPath } from 'node:url';--import { describe, expect, it } from 'vitest';--const AGENTS_MD = readFileSync(- resolve(dirname(fileURLToPath(import.meta.url)), '../../../../../AGENTS.md'),- 'utf8',-);--describe('AGENTS.md opportunity playbooks', () => {- it('requires lockstep updates for How to process and How to apply', () => {- expect(AGENTS_MD).toContain('How to process');- expect(AGENTS_MD).toContain('How to apply');- expect(AGENTS_MD).toContain('lockstep');- expect(AGENTS_MD).toContain('Open Briefs');- expect(AGENTS_MD).toContain('My Applications');- expect(AGENTS_MD).toMatch(/operator language/i);- expect(AGENTS_MD).toContain('twenty-lead-brief');- expect(AGENTS_MD).toContain('GitHub');- expect(AGENTS_MD).toContain('Twenty Internal');- expect(AGENTS_MD).toContain('MCP');- expect(AGENTS_MD).toMatch(/Do not open Apply/);- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/how-to-process.constants.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/how-to-process.constants.tsdeleted file mode 100644index ed68377e65c..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/how-to-process.constants.ts+++ /dev/null@@ -1,19 +0,0 @@-export const HOW_TO_PROCESS_FRONT_COMPONENT_ID =- '1fb20c84-f25e-4e6e-ac26-ac973fe45c03';-export const HOW_TO_PROCESS_PAGE_LAYOUT_ID =- '0fcc49da-fd43-4f96-9b61-9bf32bd7e18b';-export const HOW_TO_PROCESS_PAGE_TAB_ID =- '56b8edd7-5d3b-4928-be03-96969bb3670e';-export const HOW_TO_PROCESS_PAGE_WIDGET_ID =- '756fc44b-9a05-41fa-a171-2148ab1536c4';-export const HOW_TO_PROCESS_NAV_ITEM_ID =- '23a068ec-8f9f-496e-9b58-22aae5348682';--export const HOW_TO_APPLY_FRONT_COMPONENT_ID =- '3770f0a4-408c-42cf-ac80-fe1752b40625';-export const HOW_TO_APPLY_PAGE_LAYOUT_ID =- 'a35eb9dd-c828-4bad-8bfb-986e1c9e9cde';-export const HOW_TO_APPLY_PAGE_TAB_ID = '8ec88001-040c-474a-af00-372d87a51501';-export const HOW_TO_APPLY_PAGE_WIDGET_ID =- '3ceda86c-e3ab-447c-9be6-b4a692c3d71a';-export const HOW_TO_APPLY_NAV_ITEM_ID = 'b8d751cf-978c-4291-89cb-478d639a8539';diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/partner-copy.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/partner-copy.test.tsdeleted file mode 100644index 3577021eef2..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/partner-copy.test.ts+++ /dev/null@@ -1,57 +0,0 @@-import { describe, expect, it } from 'vitest';--import {- MIN_PITCH_LENGTH,- PITCHABLE_STATES,-} from 'src/modules/application/apply/constants/apply-to-brief.constants';--import {- HOW_TO_APPLY_BODY_LINKS,- HOW_TO_APPLY_HEADER_LINKS,- HOW_TO_APPLY_STEPS,-} from './partner-copy';--describe('HOW_TO_APPLY_STEPS', () => {- it('uses MIN_PITCH_LENGTH for the pitch rule', () => {- const applyStep = HOW_TO_APPLY_STEPS.find((step) => step.num === '02');- expect(applyStep?.body).toContain(String(MIN_PITCH_LENGTH));- });-- it('states one application, pitch not editable, and Won/Declined are not partner-set', () => {- const text = HOW_TO_APPLY_STEPS.map((step) =>- [step.body, step.note, ...(step.bullets ?? [])].join('\n'),- ).join('\n');-- expect(text).toMatch(/one application per brief/i);- expect(text).toMatch(/cannot edit/i);- expect(text).toMatch(/Won/);- expect(text).toMatch(/Declined/);- expect(text).toMatch(/do not set those/i);- expect(text).toMatch(/My Applications still shows the brief/i);- });-- it('names unpitchable states as the complement of PITCHABLE_STATES', () => {- const applyStep = HOW_TO_APPLY_STEPS.find((step) => step.num === '02');-- expect([...PITCHABLE_STATES].sort()).toEqual([- 'APPLIED',- 'BACKUP',- 'INVITED',- ]);- expect(applyStep?.note).toContain('Introduced');- expect(applyStep?.note).toContain('Won');- expect(applyStep?.note).toContain('Declined');- expect(applyStep?.note).toMatch(/cannot take a pitch/i);- });-- it('links Open Briefs and My Applications at the top, not Apply', () => {- expect(HOW_TO_APPLY_HEADER_LINKS).toEqual([- { label: 'Open Briefs', action: 'openBriefs' },- { label: 'My Applications', action: 'myApplications' },- ]);- expect(HOW_TO_APPLY_BODY_LINKS).toBe(HOW_TO_APPLY_HEADER_LINKS);-- const applyStep = HOW_TO_APPLY_STEPS.find((step) => step.num === '02');- expect(applyStep?.body).toMatch(/Apply at the top/i);- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/partner-copy.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/partner-copy.tsdeleted file mode 100644index e0dae9a586b..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/partner-copy.ts+++ /dev/null@@ -1,35 +0,0 @@-import { MIN_PITCH_LENGTH } from 'src/modules/application/apply/constants/apply-to-brief.constants';-import { type PlaybookStep } from 'src/modules/opportunity/how-to-process/types/playbook-step.type';-import { type PlaybookLink } from 'src/modules/opportunity/how-to-process/utils/playbook-nav';--export const HOW_TO_APPLY_KICKER = 'Playbook';-export const HOW_TO_APPLY_TITLE = 'How to apply';-export const HOW_TO_APPLY_LEDE =- 'Open Briefs is the live marketplace. Apply is pinned at the top of each brief. Twenty picks the winner.';--export const HOW_TO_APPLY_HEADER_LINKS: readonly PlaybookLink[] = [- { label: 'Open Briefs', action: 'openBriefs' },- { label: 'My Applications', action: 'myApplications' },-];--export const HOW_TO_APPLY_BODY_LINKS = HOW_TO_APPLY_HEADER_LINKS;--export const HOW_TO_APPLY_STEPS: PlaybookStep[] = [- {- num: '01',- heading: 'Open Briefs',- body: 'Open Briefs is the live marketplace. A row is here only when Twenty has listed the brief. If it is gone, the brief is closed or already in intro.',- },- {- num: '02',- heading: 'Apply',- body: `Open the brief. Use Apply at the top of the record. Write a pitch of at least ${MIN_PITCH_LENGTH} characters. The pitch is set once. You cannot edit it later. One application per brief. A second apply is rejected.`,- note: 'If Twenty already invited you, Apply fills the pitch on that row. The state stays Invited or Backup. Introduced, Won, and Declined cannot take a pitch.',- },- {- num: '03',- heading: 'What happens next',- body: 'Your row lands in My Applications as Applied. Twenty may also invite you. Then the row is Invited. After an intro, wait for Twenty. Do not chase the client unless Twenty asks. Won or Declined is set when Twenty picks the Partner. You do not set those yourself.',- note: 'A listed brief can still have a decided row. Listing and the winner field are not the same thing. My Applications still shows the brief after it leaves Open Briefs.',- },-];diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/playbook-skills.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/playbook-skills.test.tsdeleted file mode 100644index 8ad562246af..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/playbook-skills.test.ts+++ /dev/null@@ -1,25 +0,0 @@-import { existsSync } from 'node:fs';-import { dirname, resolve } from 'node:path';-import { fileURLToPath } from 'node:url';--import { describe, expect, it } from 'vitest';--import { PLAYBOOK_SKILLS } from './playbook-skills';--const SKILLS_ROOT = resolve(- dirname(fileURLToPath(import.meta.url)),- '../../../../skills',-);--describe('PLAYBOOK_SKILLS', () => {- it('points each GitHub URL at a SKILL.md that exists in this app', () => {- for (const skill of PLAYBOOK_SKILLS) {- expect(existsSync(resolve(SKILLS_ROOT, skill.name, 'SKILL.md'))).toBe(- true,- );- expect(skill.githubUrl).toBe(- `https://github.com/twentyhq/twenty/blob/main/packages/twenty-apps/internal/twenty-partners/src/skills/${skill.name}/SKILL.md`,- );- }- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/playbook-skills.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/playbook-skills.tsdeleted file mode 100644index 99da16dca2f..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/constants/playbook-skills.ts+++ /dev/null@@ -1,49 +0,0 @@-const SKILL_GITHUB_BASE =- 'https://github.com/twentyhq/twenty/blob/main/packages/twenty-apps/internal/twenty-partners/src/skills';--export type PlaybookSkill = {- name: string;- trigger: string;- githubUrl: string;- outputs: readonly string[];-};--export const PLAYBOOK_SKILL_LEAD_BRIEF: PlaybookSkill = {- name: 'twenty-lead-brief',- trigger: '/twenty-lead-brief',- githubUrl: `${SKILL_GITHUB_BASE}/twenty-lead-brief/SKILL.md`,- outputs: [- 'A qualification summary in the conversation',- 'A partner brief — paste it into a Google Doc',- 'partner-match-criteria.md for the match step',- 'The Opportunity, with Design Doc URL set to that Doc',- ],-};--export const PLAYBOOK_SKILL_SHORTLIST: PlaybookSkill = {- name: 'twenty-partner-shortlist',- trigger: '/twenty-partner-shortlist',- githubUrl: `${SKILL_GITHUB_BASE}/twenty-partner-shortlist/SKILL.md`,- outputs: [- 'A shortlist with a reason for each name',- 'partner-shortlist.md in the lead folder',- 'No CRM write — you review, then intro',- ],-};--export const PLAYBOOK_SKILL_INTRO: PlaybookSkill = {- name: 'twenty-partner-intro',- trigger: '/twenty-partner-intro',- githubUrl: `${SKILL_GITHUB_BASE}/twenty-partner-intro/SKILL.md`,- outputs: [- 'Invited application rows for the names you picked',- 'Intro Sent At on the Opportunity',- 'Gmail drafts that carry the Design Doc URL',- ],-};--export const PLAYBOOK_SKILLS: readonly PlaybookSkill[] = [- PLAYBOOK_SKILL_LEAD_BRIEF,- PLAYBOOK_SKILL_SHORTLIST,- PLAYBOOK_SKILL_INTRO,-];diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/how-to-apply.front-component.tsx b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/how-to-apply.front-component.tsxdeleted file mode 100644index 725e39b16f0..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/how-to-apply.front-component.tsx+++ /dev/null@@ -1,31 +0,0 @@-import { defineFrontComponent } from 'twenty-sdk/define';--import { HOW_TO_APPLY_FRONT_COMPONENT_ID } from 'src/modules/opportunity/how-to-process/constants/how-to-process.constants';-import {- HOW_TO_APPLY_BODY_LINKS,- HOW_TO_APPLY_HEADER_LINKS,- HOW_TO_APPLY_KICKER,- HOW_TO_APPLY_LEDE,- HOW_TO_APPLY_STEPS,- HOW_TO_APPLY_TITLE,-} from 'src/modules/opportunity/how-to-process/constants/partner-copy';-import { PlaybookArticle } from 'src/modules/opportunity/how-to-process/front-components/playbook-article';--const HowToApply = () => (- <PlaybookArticle- kicker={HOW_TO_APPLY_KICKER}- title={HOW_TO_APPLY_TITLE}- lede={HOW_TO_APPLY_LEDE}- steps={HOW_TO_APPLY_STEPS}- headerLinks={HOW_TO_APPLY_HEADER_LINKS}- bodyLinks={HOW_TO_APPLY_BODY_LINKS}- />-);--export default defineFrontComponent({- universalIdentifier: HOW_TO_APPLY_FRONT_COMPONENT_ID,- name: 'How to apply',- description:- 'Partner playbook for Open Briefs and apply in Partner Workspace.',- component: HowToApply,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/how-to-process.front-component.tsx b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/how-to-process.front-component.tsxdeleted file mode 100644index 629feab072f..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/how-to-process.front-component.tsx+++ /dev/null@@ -1,31 +0,0 @@-import { defineFrontComponent } from 'twenty-sdk/define';--import {- HOW_TO_PROCESS_BODY_LINKS,- HOW_TO_PROCESS_KICKER,- HOW_TO_PROCESS_LEDE,- HOW_TO_PROCESS_STEPS,- HOW_TO_PROCESS_TITLE,-} from 'src/modules/opportunity/how-to-process/constants/admin-copy';-import { HOW_TO_PROCESS_FRONT_COMPONENT_ID } from 'src/modules/opportunity/how-to-process/constants/how-to-process.constants';-import { PLAYBOOK_SKILLS } from 'src/modules/opportunity/how-to-process/constants/playbook-skills';-import { PlaybookArticle } from 'src/modules/opportunity/how-to-process/front-components/playbook-article';--const HowToProcess = () => (- <PlaybookArticle- kicker={HOW_TO_PROCESS_KICKER}- title={HOW_TO_PROCESS_TITLE}- lede={HOW_TO_PROCESS_LEDE}- steps={HOW_TO_PROCESS_STEPS}- bodyLinks={HOW_TO_PROCESS_BODY_LINKS}- skills={PLAYBOOK_SKILLS}- />-);--export default defineFrontComponent({- universalIdentifier: HOW_TO_PROCESS_FRONT_COMPONENT_ID,- name: 'How to process',- description:- 'Admin playbook for the opportunity path in Matching Admin Workspace.',- component: HowToProcess,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/playbook-article.tsx b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/playbook-article.tsxdeleted file mode 100644index 5b948c4071e..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/playbook-article.tsx+++ /dev/null@@ -1,100 +0,0 @@-import { type PlaybookSkill } from 'src/modules/opportunity/how-to-process/constants/playbook-skills';-import { PlaybookMarkedText } from 'src/modules/opportunity/how-to-process/front-components/playbook-marked-text';-import { PlaybookNavLink } from 'src/modules/opportunity/how-to-process/front-components/playbook-nav-link';-import { PlaybookSkillBlock } from 'src/modules/opportunity/how-to-process/front-components/playbook-skill-block';-import { type PlaybookStep } from 'src/modules/opportunity/how-to-process/types/playbook-step.type';-import { type PlaybookLink } from 'src/modules/opportunity/how-to-process/utils/playbook-nav';-import { PLAYBOOK_STYLES as styles } from 'src/modules/shared/front-components/playbook-styles';--type PlaybookArticleProps = {- kicker: string;- title: string;- lede: string;- steps: PlaybookStep[];- headerLinks?: ReadonlyArray<PlaybookLink>;- bodyLinks?: ReadonlyArray<PlaybookLink>;- skills?: ReadonlyArray<PlaybookSkill>;-};--export const PlaybookArticle = ({- kicker,- title,- lede,- steps,- headerLinks,- bodyLinks = [],- skills = [],-}: PlaybookArticleProps) => (- <div style={styles.root}>- <article style={styles.article}>- <p style={styles.kicker}>{kicker}</p>- <h1 style={styles.title}>{title}</h1>- <p style={headerLinks !== undefined ? styles.ledeWithLinks : styles.lede}>- <PlaybookMarkedText text={lede} links={bodyLinks} skills={skills} />- </p>- {headerLinks !== undefined ? (- <nav style={styles.headerLinkRow}>- {headerLinks.map((link) => (- <PlaybookNavLink key={link.label} link={link}>- {link.label}- </PlaybookNavLink>- ))}- </nav>- ) : null}- {steps.map((step, index) => (- <section- key={step.num}- style={index === steps.length - 1 ? styles.lastStep : styles.step}- >- <div style={styles.num}>{step.num}</div>- <div>- <h2 style={styles.heading}>{step.heading}</h2>- <p style={styles.body}>- <PlaybookMarkedText- text={step.body}- links={bodyLinks}- skills={skills}- />- </p>- {step.pills !== undefined ? (- <div style={styles.pillRow}>- {step.pills.map((pill) => (- <span key={pill} style={styles.pill}>- {pill}- </span>- ))}- </div>- ) : null}- {step.bullets !== undefined ? (- <ul style={styles.list}>- {step.bullets.map((bullet) => (- <li key={bullet}>- <PlaybookMarkedText- text={bullet}- links={bodyLinks}- skills={skills}- />- </li>- ))}- </ul>- ) : null}- {step.skills !== undefined- ? step.skills.map((skill) => (- <PlaybookSkillBlock key={skill.name} skill={skill} />- ))- : null}- {step.note !== undefined ? (- <p style={styles.note}>- <PlaybookMarkedText- text={step.note}- links={bodyLinks}- skills={skills}- />- </p>- ) : null}- </div>- </section>- ))}- </article>- </div>-);diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/playbook-marked-text.tsx b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/playbook-marked-text.tsxdeleted file mode 100644index 443000fe864..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/playbook-marked-text.tsx+++ /dev/null@@ -1,45 +0,0 @@-import { type PlaybookSkill } from 'src/modules/opportunity/how-to-process/constants/playbook-skills';-import { PlaybookNavLink } from 'src/modules/opportunity/how-to-process/front-components/playbook-nav-link';-import { type PlaybookLink } from 'src/modules/opportunity/how-to-process/utils/playbook-nav';-import { splitPlaybookMarks } from 'src/modules/opportunity/how-to-process/utils/split-playbook-marks';-import { PLAYBOOK_STYLES as styles } from 'src/modules/shared/front-components/playbook-styles';--type PlaybookMarkedTextProps = {- text: string;- links?: ReadonlyArray<PlaybookLink>;- skills?: ReadonlyArray<PlaybookSkill>;-};--export const PlaybookMarkedText = ({- text,- links = [],- skills = [],-}: PlaybookMarkedTextProps) => (- <>- {splitPlaybookMarks(text, { links, skills }).map((mark, index) => {- if (mark.kind === 'skill') {- return (- <a- key={`${mark.value}-${index}`}- href={mark.githubUrl}- target="_blank"- rel="noreferrer"- style={styles.link}- >- <code style={styles.code}>{mark.value}</code>- </a>- );- }-- if (mark.kind === 'link') {- return (- <PlaybookNavLink key={`${mark.value}-${index}`} link={mark.link}>- {mark.value}- </PlaybookNavLink>- );- }-- return <span key={`text-${index}`}>{mark.value}</span>;- })}- </>-);diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/playbook-nav-link.tsx b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/playbook-nav-link.tsxdeleted file mode 100644index 1110d3fd096..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/playbook-nav-link.tsx+++ /dev/null@@ -1,32 +0,0 @@-import {- type PlaybookLink,- runPlaybookNav,-} from 'src/modules/opportunity/how-to-process/utils/playbook-nav';-import { PLAYBOOK_STYLES as styles } from 'src/modules/shared/front-components/playbook-styles';--type PlaybookNavLinkProps = {- link: PlaybookLink;- children: string;-};--export const PlaybookNavLink = ({ link, children }: PlaybookNavLinkProps) => {- if ('action' in link) {- return (- <button- type="button"- style={styles.linkButton}- onClick={() => {- void runPlaybookNav(link.action);- }}- >- {children}- </button>- );- }-- return (- <a href={link.href} target="_blank" rel="noreferrer" style={styles.link}>- {children}- </a>- );-};diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/playbook-skill-block.tsx b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/playbook-skill-block.tsxdeleted file mode 100644index 09c942ee8e5..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/front-components/playbook-skill-block.tsx+++ /dev/null@@ -1,29 +0,0 @@-import { type PlaybookSkill } from 'src/modules/opportunity/how-to-process/constants/playbook-skills';-import { PLAYBOOK_STYLES as styles } from 'src/modules/shared/front-components/playbook-styles';--type PlaybookSkillBlockProps = {- skill: PlaybookSkill;-};--export const PlaybookSkillBlock = ({ skill }: PlaybookSkillBlockProps) => (- <div style={styles.skill}>- <p style={styles.skillKicker}>Run locally</p>- <p style={styles.body}>- <code style={styles.code}>{skill.trigger}</code>- {' · '}- <a- href={skill.githubUrl}- target="_blank"- rel="noreferrer"- style={styles.link}- >- View on GitHub- </a>- </p>- <ul style={styles.skillOutputs}>- {skill.outputs.map((output) => (- <li key={output}>{output}</li>- ))}- </ul>- </div>-);diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/navigation-menu-items/how-to-apply.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/navigation-menu-items/how-to-apply.navigation-menu-item.tsdeleted file mode 100644index 59d90251188..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/navigation-menu-items/how-to-apply.navigation-menu-item.ts+++ /dev/null@@ -1,20 +0,0 @@-import {- NavigationMenuItemType,- defineNavigationMenuItem,-} from 'twenty-sdk/define';--import {- HOW_TO_APPLY_NAV_ITEM_ID,- HOW_TO_APPLY_PAGE_LAYOUT_ID,-} from 'src/modules/opportunity/how-to-process/constants/how-to-process.constants';-import { PARTNER_WORKSPACE_FOLDER_UNIVERSAL_IDENTIFIER } from 'src/modules/shared/navigation-menu-items/partner-workspace-folder.navigation-menu-item';--export default defineNavigationMenuItem({- universalIdentifier: HOW_TO_APPLY_NAV_ITEM_ID,- name: 'How to apply',- type: NavigationMenuItemType.PAGE_LAYOUT,- icon: 'IconListCheck',- position: 0,- folderUniversalIdentifier: PARTNER_WORKSPACE_FOLDER_UNIVERSAL_IDENTIFIER,- pageLayoutUniversalIdentifier: HOW_TO_APPLY_PAGE_LAYOUT_ID,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/navigation-menu-items/how-to-process.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/navigation-menu-items/how-to-process.navigation-menu-item.tsdeleted file mode 100644index 2a0f7c4884a..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/navigation-menu-items/how-to-process.navigation-menu-item.ts+++ /dev/null@@ -1,19 +0,0 @@-import {- NavigationMenuItemType,- defineNavigationMenuItem,-} from 'twenty-sdk/define';--import {- HOW_TO_PROCESS_NAV_ITEM_ID,- HOW_TO_PROCESS_PAGE_LAYOUT_ID,-} from 'src/modules/opportunity/how-to-process/constants/how-to-process.constants';--export default defineNavigationMenuItem({- universalIdentifier: HOW_TO_PROCESS_NAV_ITEM_ID,- name: 'How to process',- type: NavigationMenuItemType.PAGE_LAYOUT,- icon: 'IconListCheck',- position: 10,- folderUniversalIdentifier: '0b2e499a-ae74-45e0-af08-243e19fc56aa',- pageLayoutUniversalIdentifier: HOW_TO_PROCESS_PAGE_LAYOUT_ID,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/page-layouts/how-to-apply.page-layout.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/page-layouts/how-to-apply.page-layout.tsdeleted file mode 100644index 70e002f2896..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/page-layouts/how-to-apply.page-layout.ts+++ /dev/null@@ -1,34 +0,0 @@-import { PageLayoutTabLayoutMode, definePageLayout } from 'twenty-sdk/define';--import {- HOW_TO_APPLY_FRONT_COMPONENT_ID,- HOW_TO_APPLY_PAGE_LAYOUT_ID,- HOW_TO_APPLY_PAGE_TAB_ID,- HOW_TO_APPLY_PAGE_WIDGET_ID,-} from 'src/modules/opportunity/how-to-process/constants/how-to-process.constants';--export default definePageLayout({- universalIdentifier: HOW_TO_APPLY_PAGE_LAYOUT_ID,- name: 'How to apply',- type: 'STANDALONE_PAGE',- tabs: [- {- universalIdentifier: HOW_TO_APPLY_PAGE_TAB_ID,- title: 'How to apply',- position: 0,- icon: 'IconListCheck',- layoutMode: PageLayoutTabLayoutMode.CANVAS,- widgets: [- {- universalIdentifier: HOW_TO_APPLY_PAGE_WIDGET_ID,- title: 'How to apply',- type: 'FRONT_COMPONENT',- configuration: {- configurationType: 'FRONT_COMPONENT',- frontComponentUniversalIdentifier: HOW_TO_APPLY_FRONT_COMPONENT_ID,- },- },- ],- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/page-layouts/how-to-process.page-layout.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/page-layouts/how-to-process.page-layout.tsdeleted file mode 100644index f4163a8d769..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/page-layouts/how-to-process.page-layout.ts+++ /dev/null@@ -1,35 +0,0 @@-import { PageLayoutTabLayoutMode, definePageLayout } from 'twenty-sdk/define';--import {- HOW_TO_PROCESS_FRONT_COMPONENT_ID,- HOW_TO_PROCESS_PAGE_LAYOUT_ID,- HOW_TO_PROCESS_PAGE_TAB_ID,- HOW_TO_PROCESS_PAGE_WIDGET_ID,-} from 'src/modules/opportunity/how-to-process/constants/how-to-process.constants';--export default definePageLayout({- universalIdentifier: HOW_TO_PROCESS_PAGE_LAYOUT_ID,- name: 'How to process',- type: 'STANDALONE_PAGE',- tabs: [- {- universalIdentifier: HOW_TO_PROCESS_PAGE_TAB_ID,- title: 'How to process',- position: 0,- icon: 'IconListCheck',- layoutMode: PageLayoutTabLayoutMode.CANVAS,- widgets: [- {- universalIdentifier: HOW_TO_PROCESS_PAGE_WIDGET_ID,- title: 'How to process',- type: 'FRONT_COMPONENT',- configuration: {- configurationType: 'FRONT_COMPONENT',- frontComponentUniversalIdentifier:- HOW_TO_PROCESS_FRONT_COMPONENT_ID,- },- },- ],- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/types/playbook-step.type.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/types/playbook-step.type.tsdeleted file mode 100644index 37bf111bb68..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/types/playbook-step.type.ts+++ /dev/null@@ -1,11 +0,0 @@-import { type PlaybookSkill } from 'src/modules/opportunity/how-to-process/constants/playbook-skills';--export type PlaybookStep = {- num: string;- heading: string;- body: string;- bullets?: string[];- pills?: string[];- note?: string;- skills?: readonly PlaybookSkill[];-};diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/utils/playbook-nav.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/utils/playbook-nav.test.tsdeleted file mode 100644index b8e18ba7f79..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/utils/playbook-nav.test.ts+++ /dev/null@@ -1,18 +0,0 @@-import { readFileSync } from 'node:fs';-import { dirname, resolve } from 'node:path';-import { fileURLToPath } from 'node:url';--import { describe, expect, it } from 'vitest';--const PLAYBOOK_NAV_SOURCE = readFileSync(- resolve(dirname(fileURLToPath(import.meta.url)), './playbook-nav.ts'),- 'utf8',-);--describe('runPlaybookNav', () => {- it('does not open Apply from a standalone playbook page', () => {- expect(PLAYBOOK_NAV_SOURCE).not.toContain('APPLY_TO_BRIEF');- expect(PLAYBOOK_NAV_SOURCE).not.toContain('openSidePanelPage');- expect(PLAYBOOK_NAV_SOURCE).not.toMatch(/'apply'/);- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/utils/playbook-nav.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/utils/playbook-nav.tsdeleted file mode 100644index 966ab8872a2..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/utils/playbook-nav.ts+++ /dev/null@@ -1,31 +0,0 @@-import { AppPath, navigate } from 'twenty-sdk/front-component';--import { MY_APPLICATIONS_VIEW_UNIVERSAL_IDENTIFIER } from 'src/modules/application/views/my-applications.view';-import { OPEN_BRIEFS_VIEW_UNIVERSAL_IDENTIFIER } from 'src/modules/opportunity/views/open-briefs.view';--export type PlaybookNavAction = 'openBriefs' | 'myApplications';--export type PlaybookLink =- | { label: string; href: string }- | { label: string; action: PlaybookNavAction };--export const runPlaybookNav = async (action: PlaybookNavAction) => {- switch (action) {- case 'openBriefs': {- await navigate(- AppPath.RecordIndexPage,- { objectNamePlural: 'opportunities' },- { viewId: OPEN_BRIEFS_VIEW_UNIVERSAL_IDENTIFIER },- );- return;- }- case 'myApplications': {- await navigate(- AppPath.RecordIndexPage,- { objectNamePlural: 'applications' },- { viewId: MY_APPLICATIONS_VIEW_UNIVERSAL_IDENTIFIER },- );- return;- }- }-};diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/utils/split-playbook-marks.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/utils/split-playbook-marks.test.tsdeleted file mode 100644index 28e8f101daf..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/utils/split-playbook-marks.test.ts+++ /dev/null@@ -1,101 +0,0 @@-import { describe, expect, it } from 'vitest';--import { PLAYBOOK_SKILL_LEAD_BRIEF } from 'src/modules/opportunity/how-to-process/constants/playbook-skills';-import { splitPlaybookMarks } from 'src/modules/opportunity/how-to-process/utils/split-playbook-marks';--describe('splitPlaybookMarks', () => {- it('wraps skill triggers as GitHub-linked code tokens with leftover text', () => {- const marks = splitPlaybookMarks('Run /twenty-lead-brief locally.', {- skills: [PLAYBOOK_SKILL_LEAD_BRIEF],- });-- expect(marks).toEqual([- { kind: 'text', value: 'Run ' },- {- kind: 'skill',- value: '/twenty-lead-brief',- githubUrl: PLAYBOOK_SKILL_LEAD_BRIEF.githubUrl,- },- { kind: 'text', value: ' locally.' },- ]);- });-- it('prefers the longer skill trigger over the skill name', () => {- const marks = splitPlaybookMarks(- 'twenty-lead-brief vs /twenty-lead-brief',- { skills: [PLAYBOOK_SKILL_LEAD_BRIEF] },- );-- expect(marks).toEqual([- {- kind: 'skill',- value: 'twenty-lead-brief',- githubUrl: PLAYBOOK_SKILL_LEAD_BRIEF.githubUrl,- },- { kind: 'text', value: ' vs ' },- {- kind: 'skill',- value: '/twenty-lead-brief',- githubUrl: PLAYBOOK_SKILL_LEAD_BRIEF.githubUrl,- },- ]);- });-- it('does not treat Applied as Apply', () => {- const marks = splitPlaybookMarks('lands as Applied.', {- links: [{ label: 'Apply', action: 'openBriefs' }],- });-- expect(marks).toEqual([{ kind: 'text', value: 'lands as Applied.' }]);- });-- it('links Open Briefs and My Applications labels', () => {- const openBriefs = {- label: 'Open Briefs',- action: 'openBriefs' as const,- };- const myApplications = {- label: 'My Applications',- action: 'myApplications' as const,- };-- const marks = splitPlaybookMarks('See Open Briefs and My Applications.', {- links: [openBriefs, myApplications],- });-- expect(marks).toEqual([- { kind: 'text', value: 'See ' },- { kind: 'link', value: 'Open Briefs', link: openBriefs },- { kind: 'text', value: ' and ' },- { kind: 'link', value: 'My Applications', link: myApplications },- { kind: 'text', value: '.' },- ]);- });-- it('links href terms', () => {- const discord = {- label: 'Discord',- href: 'https://discord.com/channels/1130383047699738754/1513506376595538032',- };-- expect(- splitPlaybookMarks('Ping Discord after list.', { links: [discord] }),- ).toEqual([- { kind: 'text', value: 'Ping ' },- { kind: 'link', value: 'Discord', link: discord },- { kind: 'text', value: ' after list.' },- ]);- });-- it('returns a single text mark when there are no terms or no matches', () => {- expect(splitPlaybookMarks('')).toEqual([{ kind: 'text', value: '' }]);- expect(splitPlaybookMarks('nothing to mark')).toEqual([- { kind: 'text', value: 'nothing to mark' },- ]);- expect(- splitPlaybookMarks('nothing to mark', {- skills: [PLAYBOOK_SKILL_LEAD_BRIEF],- }),- ).toEqual([{ kind: 'text', value: 'nothing to mark' }]);- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/utils/split-playbook-marks.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/utils/split-playbook-marks.tsdeleted file mode 100644index b063c2a791f..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/how-to-process/utils/split-playbook-marks.ts+++ /dev/null@@ -1,90 +0,0 @@-import { type PlaybookSkill } from 'src/modules/opportunity/how-to-process/constants/playbook-skills';-import { type PlaybookLink } from 'src/modules/opportunity/how-to-process/utils/playbook-nav';--export type PlaybookMark =- | { kind: 'text'; value: string }- | { kind: 'skill'; value: string; githubUrl: string }- | { kind: 'link'; value: string; link: PlaybookLink };--type SplitPlaybookMarksOptions = {- links?: ReadonlyArray<PlaybookLink>;- skills?: ReadonlyArray<PlaybookSkill>;-};--const escapeRegExp = (value: string): string =>- value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');--export const splitPlaybookMarks = (- text: string,- options: SplitPlaybookMarksOptions = {},-): PlaybookMark[] => {- const links = options.links ?? [];- const skills = options.skills ?? [];- const terms = [- ...skills.flatMap((skill) => [- {- kind: 'skill' as const,- value: skill.trigger,- githubUrl: skill.githubUrl,- },- {- kind: 'skill' as const,- value: skill.name,- githubUrl: skill.githubUrl,- },- ]),- ...links.map((link) => ({- kind: 'link' as const,- value: link.label,- link,- })),- ].sort((left, right) => right.value.length - left.value.length);-- if (terms.length === 0) {- return [{ kind: 'text', value: text }];- }-- const pattern = new RegExp(- `(${terms- .map((term) => {- const escaped = escapeRegExp(term.value);- return term.kind === 'link' ? `\\b${escaped}\\b` : escaped;- })- .join('|')})`,- 'g',- );-- const marks: PlaybookMark[] = [];- let lastIndex = 0;-- for (const match of text.matchAll(pattern)) {- const matched = match[1];- const index = match.index ?? 0;-- if (index > lastIndex) {- marks.push({ kind: 'text', value: text.slice(lastIndex, index) });- }-- const term = terms.find((candidate) => candidate.value === matched);-- if (term?.kind === 'skill') {- marks.push({- kind: 'skill',- value: matched,- githubUrl: term.githubUrl,- });- } else if (term?.kind === 'link') {- marks.push({ kind: 'link', value: matched, link: term.link });- } else {- marks.push({ kind: 'text', value: matched });- }-- lastIndex = index + matched.length;- }-- if (lastIndex < text.length) {- marks.push({ kind: 'text', value: text.slice(lastIndex) });- }-- return marks;-};diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/graphql/mutations/create-opportunity.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/graphql/mutations/create-opportunity.tsdeleted file mode 100644index 4482fa66a67..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/graphql/mutations/create-opportunity.ts+++ /dev/null@@ -1,10 +0,0 @@-import type { CoreApiClient, CoreSchema } from 'twenty-client-sdk/core';--export function createOpportunity(- client: CoreApiClient,- data: CoreSchema.OpportunityCreateInput,-) {- return client.mutation({- createOpportunity: { __args: { data }, id: true },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/graphql/queries/find-opportunity-by-dedupe-key.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/graphql/queries/find-opportunity-by-dedupe-key.tsdeleted file mode 100644index 10913ca9d69..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/graphql/queries/find-opportunity-by-dedupe-key.ts+++ /dev/null@@ -1,13 +0,0 @@-import type { CoreApiClient, CoreSchema } from 'twenty-client-sdk/core';--export function findOpportunityByDedupeKey(- client: CoreApiClient,- filter: CoreSchema.OpportunityFilterInput,-) {- return client.query({- opportunities: {- __args: { filter, first: 1 },- edges: { node: { id: true } },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/graphql/queries/find-partner-id-by-slug.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/graphql/queries/find-partner-id-by-slug.tsdeleted file mode 100644index dd524b1ea93..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/graphql/queries/find-partner-id-by-slug.ts+++ /dev/null@@ -1,12 +0,0 @@-import type { CoreApiClient } from 'twenty-client-sdk/core';--// Slug-only: a partner who referred a brief stays the referrer even if they-// later go unavailable or lose validation.-export function findPartnerIdBySlug(client: CoreApiClient, slug: string) {- return client.query({- partners: {- __args: { filter: { slug: { eq: slug } }, first: 1 },- edges: { node: { id: true, name: true } },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/import-opportunity-from-tft.logic-function.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/import-opportunity-from-tft.logic-function.tsdeleted file mode 100644index 1a89975babf..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/import-opportunity-from-tft.logic-function.ts+++ /dev/null@@ -1,36 +0,0 @@-import { defineLogicFunction } from 'twenty-sdk/define';--import {- APPLICATION_SECRET_HEADER,- readSecretGuardedEvent,-} from 'src/modules/shared/http/read-secret-guarded-event';-import { importOpportunityFromTftSchema } from 'src/modules/opportunity/intake/mappers/import-opportunity-from-tft.mapper';-import {- importOpportunityFromTft,- type ImportOpportunityFromTftResult,-} from 'src/modules/opportunity/intake/services/import-opportunity-from-tft.service';--export const IMPORT_OPPORTUNITY_FROM_TFT_LOGIC_FUNCTION_ID =- '4c220eaf-a23f-4af2-8d69-38a6c460019f';--// isAuthRequired only accepts user JWTs, not API keys; guard with the shared secret.-export const handler = async (event: unknown): Promise<ImportOpportunityFromTftResult> => {- const guard = readSecretGuardedEvent(event, importOpportunityFromTftSchema);- if (!guard.ok) return { ok: false, reason: guard.reason };- return importOpportunityFromTft(guard.input);-};--export default defineLogicFunction({- universalIdentifier: IMPORT_OPPORTUNITY_FROM_TFT_LOGIC_FUNCTION_ID,- name: 'import-opportunity-from-tft',- description:- 'Receive one opportunity pushed from the TFT workspace and create it in partners (find-or-create company + contact, idempotent on tftOpportunityId).',- timeoutSeconds: 15,- handler,- httpRouteTriggerSettings: {- path: '/opportunities',- httpMethod: 'POST',- isAuthRequired: false,- forwardedRequestHeaders: [APPLICATION_SECRET_HEADER],- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/import-opportunity-from-tft.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/import-opportunity-from-tft.test.tsdeleted file mode 100644index 8d306cefd15..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/import-opportunity-from-tft.test.ts+++ /dev/null@@ -1,147 +0,0 @@-import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';--// Mock the codegen client BEFORE importing the handler. vi.hoisted lets the-// factory reference the mocks safely despite hoisting.-const { queryMock, mutationMock } = vi.hoisted(() => ({- queryMock: vi.fn(),- mutationMock: vi.fn(),-}));-vi.mock('twenty-client-sdk/core', () => ({- CoreApiClient: class {- query = queryMock;- mutation = mutationMock;- },-}));--import { handler } from './import-opportunity-from-tft.logic-function';-import { type ImportOpportunityFromTftInput } from './mappers/import-opportunity-from-tft.mapper';--const SECRET = 'test-secret-abc123';--const baseInput = (- overrides: Partial<ImportOpportunityFromTftInput> = {},-): ImportOpportunityFromTftInput => ({- tftOpportunityId: 'tft-opp-1',- name: 'Acme rollout',- amountMicros: 5000000,- currencyCode: 'EUR',- closeDate: '2026-07-01T00:00:00.000Z',- stage: 'MEETING',- company: { name: 'Acme', domain: 'acme.com' },- pointOfContact: { email: '[email protected]', firstName: 'Ada', lastName: 'Lovelace' },- ...overrides,-});--const authedEvent = (input: ImportOpportunityFromTftInput) => ({- body: input,- headers: { 'x-application-secret': SECRET },-});--beforeEach(() => {- queryMock.mockReset();- mutationMock.mockReset();- process.env.PARTNER_APPLICATION_SECRET = SECRET;-});--afterEach(() => {- delete process.env.PARTNER_APPLICATION_SECRET;-});--describe('import-opportunity-from-tft handler', () => {- it('rejects a wrong/missing secret without touching the client', async () => {- const result = await handler({ body: baseInput(), headers: {} });- expect(result).toEqual({ ok: false, reason: 'unauthorized' });- expect(queryMock).not.toHaveBeenCalled();- expect(mutationMock).not.toHaveBeenCalled();- });-- it('is idempotent: an existing tftOpportunityId returns created:false and creates nothing', async () => {- queryMock.mockResolvedValueOnce({- opportunities: { edges: [{ node: { id: 'existing-opp' } }] },- });-- const result = await handler(authedEvent(baseInput()));-- expect(result).toEqual({ ok: true, created: false, id: 'existing-opp' });- expect(mutationMock).not.toHaveBeenCalled();- });-- it('creates the opportunity with mapped fields + resolved company/contact', async () => {- queryMock- .mockResolvedValueOnce({ opportunities: { edges: [] } }) // dedup miss- .mockResolvedValueOnce({ companies: { edges: [] } }) // company miss- .mockResolvedValueOnce({ people: { edges: [] } }); // contact miss- mutationMock- .mockResolvedValueOnce({ createCompany: { id: 'company-1' } })- .mockResolvedValueOnce({ createPerson: { id: 'person-1' } })- .mockResolvedValueOnce({ createOpportunity: { id: 'opp-1' } });-- const result = await handler(- authedEvent(baseInput({ useCase: 'Migrate from HubSpot, ~30 sales users' })),- );-- expect(result).toEqual({ ok: true, created: true, id: 'opp-1' });-- const createOppCall = mutationMock.mock.calls.find(- ([arg]) => 'createOpportunity' in arg,- );- expect(createOppCall?.[0].createOpportunity.__args.data).toEqual({- name: 'Acme rollout',- tftOpportunityId: 'tft-opp-1',- amount: { amountMicros: 5000000, currencyCode: 'EUR' },- closeDate: '2026-07-01T00:00:00.000Z',- stage: 'MEETING',- need: 'Migrate from HubSpot, ~30 sales users',- companyId: 'company-1',- pointOfContactId: 'person-1',- });- });-- it('drops null amountMicros/closeDate instead of failing validation', async () => {- queryMock- .mockResolvedValueOnce({ opportunities: { edges: [] } })- .mockResolvedValueOnce({ companies: { edges: [] } })- .mockResolvedValueOnce({ people: { edges: [] } });- mutationMock- .mockResolvedValueOnce({ createCompany: { id: 'company-1' } })- .mockResolvedValueOnce({ createPerson: { id: 'person-1' } })- .mockResolvedValueOnce({ createOpportunity: { id: 'opp-1' } });-- const body = { ...baseInput(), amountMicros: null, closeDate: null };- const result = await handler({- body,- headers: { 'x-application-secret': SECRET },- });-- expect(result).toEqual({ ok: true, created: true, id: 'opp-1' });- const data = mutationMock.mock.calls.find(- ([arg]) => 'createOpportunity' in arg,- )?.[0].createOpportunity.__args.data;- expect(data).not.toHaveProperty('amount');- expect(data).not.toHaveProperty('closeDate');- });-- it('drops null useCase instead of failing validation', async () => {- queryMock- .mockResolvedValueOnce({ opportunities: { edges: [] } })- .mockResolvedValueOnce({ companies: { edges: [] } })- .mockResolvedValueOnce({ people: { edges: [] } });- mutationMock- .mockResolvedValueOnce({ createCompany: { id: 'company-1' } })- .mockResolvedValueOnce({ createPerson: { id: 'person-1' } })- .mockResolvedValueOnce({ createOpportunity: { id: 'opp-1' } });-- const body = { ...baseInput(), useCase: null };- const result = await handler({- body,- headers: { 'x-application-secret': SECRET },- });-- expect(result).toEqual({ ok: true, created: true, id: 'opp-1' });- const data = mutationMock.mock.calls.find(- ([arg]) => 'createOpportunity' in arg,- )?.[0].createOpportunity.__args.data;- expect(data).not.toHaveProperty('need');- expect(data).not.toHaveProperty('useCase');- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/mappers/brief-embed.mapper.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/mappers/brief-embed.mapper.test.tsdeleted file mode 100644index 852a1ff90fc..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/mappers/brief-embed.mapper.test.ts+++ /dev/null@@ -1,109 +0,0 @@-import { describe, expect, it } from 'vitest';--import { buildBriefEmbed } from './brief-embed.mapper';--const input = {- firstName: 'Jane',- lastName: 'Smith',- email: '[email protected]',- companyName: 'Northwind Ltd',- need: 'Migrate 40 seats off HubSpot',-};--const fieldNamed = (embed: Record<string, unknown>, name: string) =>- (embed.fields as { name: string; value: string }[]).find((f) => f.name === name);--describe('buildBriefEmbed', () => {- it('puts the need in the description and links the record', () => {- const embed = buildBriefEmbed(- { opportunityId: 'opp-1', input, referringPartner: null },- 'https://partners.twenty.com',- );- expect(embed.title).toBe('New client brief');- expect(embed.description).toBe('Migrate 40 seats off HubSpot');- expect(embed.url).toBe('https://partners.twenty.com/object/opportunity/opp-1');- });-- it('links the referring partner record when one resolved', () => {- const embed = buildBriefEmbed(- { opportunityId: 'opp-1', input, referringPartner: { id: 'p-9', name: 'Acme Consulting' } },- 'https://partners.twenty.com',- );- expect(fieldNamed(embed, 'Referred by')?.value).toBe(- '[Acme Consulting](https://partners.twenty.com/object/partner/p-9)',- );- });-- it('falls back to the listing label when no partner referred it', () => {- const embed = buildBriefEmbed(- { opportunityId: 'opp-1', input, referringPartner: null },- 'https://partners.twenty.com',- );- expect(fieldNamed(embed, 'Referred by')?.value).toBe('Marketplace listing');- });-- it('degrades the partner link to plain text when no frontend url is set', () => {- const embed = buildBriefEmbed(- { opportunityId: 'opp-1', input, referringPartner: { id: 'p-9', name: 'Acme Consulting' } },- undefined,- );- expect(fieldNamed(embed, 'Referred by')?.value).toBe('Acme Consulting');- expect(embed.url).toBeUndefined();- });-- it('never emits the submitter email', () => {- const embed = buildBriefEmbed(- { opportunityId: 'opp-1', input, referringPartner: null },- 'https://partners.twenty.com',- );- expect(JSON.stringify(embed)).not.toContain('[email protected]');- });-- it('truncates a long need and a long requirements block', () => {- const embed = buildBriefEmbed(- {- opportunityId: 'opp-1',- input: { ...input, need: 'n'.repeat(900), requirements: 'r'.repeat(900) },- referringPartner: null,- },- 'https://partners.twenty.com',- );- expect((embed.description as string).length).toBe(600);- expect((embed.description as string).endsWith('…')).toBe(true);- expect(fieldNamed(embed, 'Requirements')?.value.length).toBe(300);- });-- it('truncates oversized inline values from the public form', () => {- const embed = buildBriefEmbed(- {- opportunityId: 'opp-1',- input: { ...input, country: 'c'.repeat(2000), companyName: 'x'.repeat(2000) },- referringPartner: { id: 'p-9', name: 'n'.repeat(2000) },- },- 'https://partners.twenty.com',- );- const values = (embed.fields as { value: string }[]).map((f) => f.value);- expect(Math.max(...values.map((v) => v.length))).toBeLessThanOrEqual(1024);- expect(fieldNamed(embed, 'Country')?.value.length).toBe(256);- expect(fieldNamed(embed, 'Company')?.value.length).toBe(256);- });-- it('omits absent optional fields', () => {- const embed = buildBriefEmbed(- { opportunityId: 'opp-1', input, referringPartner: null },- 'https://partners.twenty.com',- );- expect(fieldNamed(embed, 'Hosting')).toBeUndefined();- expect(fieldNamed(embed, 'Budget')).toBeUndefined();- expect(fieldNamed(embed, 'Requirements')).toBeUndefined();- });-- it('pads each inline row to three columns so rows never reflow', () => {- const embed = buildBriefEmbed(- { opportunityId: 'opp-1', input: { ...input, seatCount: '40' }, referringPartner: null },- 'https://partners.twenty.com',- );- const inlineRun = (embed.fields as { inline?: boolean }[]).filter((f) => f.inline === true);- expect(inlineRun.length % 3).toBe(0);- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/mappers/brief-embed.mapper.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/mappers/brief-embed.mapper.tsdeleted file mode 100644index 1d8b7a5c7d1..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/mappers/brief-embed.mapper.ts+++ /dev/null@@ -1,105 +0,0 @@-import { TWENTY_BLUE } from 'src/modules/shared/connector/discord/config';-import {- inlineField,- truncate,- trimTrailingSlash,-} from 'src/modules/shared/connector/discord/embed-text.util';-import { type DiscordField } from 'src/modules/shared/connector/discord/types';-import { type SubmitClientBriefInput } from 'src/modules/opportunity/intake/mappers/build-requirements-text.mapper';-import { type ReferringPartner } from 'src/modules/opportunity/intake/services/submit-client-brief.service';-import { isNonEmptyString } from 'src/modules/shared/utils/is-non-empty-string.util';--export type BriefForEmbed = {- opportunityId: string;- input: SubmitClientBriefInput;- referringPartner: ReferringPartner | null;-};--const NEED_MAX = 600;-const REQUIREMENTS_MAX = 300;-const PARTNER_NAME_MAX = 100;-const NO_PARTNER_LABEL = 'Marketplace listing';-const SPACER: DiscordField = { name: '', value: '', inline: true };--const HOSTING_LABEL: Record<'CLOUD' | 'SELF_HOSTING', string> = {- CLOUD: 'Cloud',- SELF_HOSTING: 'Self-hosting',-};--// Discord packs three inline fields per row, so a group with fewer than three-// would pull the next group's fields up into its row. Pad every group to three.-const pushInlineRow = (target: DiscordField[], row: DiscordField[]): void => {- if (row.length === 0) return;- target.push(...row);- for (let index = row.length; index < 3; index += 1) target.push(SPACER);-};--const buildReferredBy = (- partner: ReferringPartner | null,- baseUrl: string | null,-): string => {- if (partner === null) return NO_PARTNER_LABEL;- const name = truncate(partner.name, PARTNER_NAME_MAX);- return baseUrl === null- ? name- : `[${name}](${baseUrl}/object/partner/${partner.id})`;-};--export function buildBriefEmbed(- brief: BriefForEmbed,- frontendUrl: string | undefined,-): Record<string, unknown> {- const { input, referringPartner } = brief;- const baseUrl = isNonEmptyString(frontendUrl)- ? trimTrailingSlash(frontendUrl)- : null;- const fields: DiscordField[] = [];-- fields.push({- name: 'Referred by',- value: buildReferredBy(referringPartner, baseUrl),- });-- const contact = [input.firstName, input.lastName]- .filter(isNonEmptyString)- .join(' ')- .trim();- pushInlineRow(fields, [- ...inlineField('Contact', contact),- ...inlineField('Company', input.companyName),- ]);-- pushInlineRow(fields, [- ...inlineField(- 'Hosting',- input.hostingType && HOSTING_LABEL[input.hostingType],- ),- ...inlineField('Seats', input.seatCount),- ...inlineField('Country', input.country),- ]);-- pushInlineRow(fields, [- ...inlineField('Languages', input.languages?.join(', ')),- ...inlineField('Timeline', input.timeline),- ...inlineField('Budget', input.budgetRange),- ]);-- if (isNonEmptyString(input.requirements)) {- fields.push({- name: 'Requirements',- value: truncate(input.requirements.trim(), REQUIREMENTS_MAX),- });- }-- const embed: Record<string, unknown> = {- title: 'New client brief',- description: truncate(input.need.trim(), NEED_MAX),- color: TWENTY_BLUE,- timestamp: new Date().toISOString(),- fields,- };- if (baseUrl !== null) {- embed.url = `${baseUrl}/object/opportunity/${brief.opportunityId}`;- }- return embed;-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/mappers/build-brief-name.mapper.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/mappers/build-brief-name.mapper.test.tsdeleted file mode 100644index ee248619b51..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/mappers/build-brief-name.mapper.test.ts+++ /dev/null@@ -1,16 +0,0 @@-import { describe, expect, it } from 'vitest';--import { buildBriefName } from './build-brief-name.mapper';--describe('buildBriefName', () => {- it('names the brief after the need', () => {- expect(buildBriefName(' Migrate from HubSpot ')).toBe(- 'Migrate from HubSpot — marketplace brief',- );- });-- it('shortens a long need', () => {- const name = buildBriefName(`${'a'.repeat(59)} ${'b'.repeat(40)}`);- expect(name).toBe(`${'a'.repeat(59)}… — marketplace brief`);- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/mappers/build-brief-name.mapper.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/mappers/build-brief-name.mapper.tsdeleted file mode 100644index c94359a937e..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/mappers/build-brief-name.mapper.ts+++ /dev/null@@ -1,13 +0,0 @@-const MAX_NEED_LENGTH = 60;--const MARKETPLACE_BRIEF_NAME_SUFFIX = '— marketplace brief';--// Listed briefs are visible to every partner, so the name must not carry the prospect's company.-export function buildBriefName(need: string): string {- const trimmedNeed = need.trim();- const shortNeed =- trimmedNeed.length > MAX_NEED_LENGTH- ? `${trimmedNeed.slice(0, MAX_NEED_LENGTH).trimEnd()}…`- : trimmedNeed;- return `${shortNeed} ${MARKETPLACE_BRIEF_NAME_SUFFIX}`;-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/mappers/build-requirements-text.mapper.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/mappers/build-requirements-text.mapper.tsdeleted file mode 100644index 72f5dccf0ab..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/mappers/build-requirements-text.mapper.ts+++ /dev/null@@ -1,44 +0,0 @@-import { z } from 'zod';--import { isNonEmptyString } from 'src/modules/shared/utils/is-non-empty-string.util';--export const submitClientBriefSchema = z.object({- firstName: z.string().trim().min(1),- lastName: z.string(),- email: z.string().trim().email(),- companyName: z.string().trim().min(1),- need: z.string().trim().min(1),- requirements: z.string().optional(),- hostingType: z.enum(['CLOUD', 'SELF_HOSTING']).optional(),- country: z.string().optional(),- languages: z.array(z.string()).optional(),- seatCount: z.string().optional(),- timeline: z.string().optional(),- budgetRange: z.string().optional(),- partnerSlug: z.string().trim().regex(/^[a-z0-9-]+$/).max(100).optional(),-});--export type SubmitClientBriefInput = z.infer<typeof submitClientBriefSchema>;--const HOSTING_LABEL: Record<'CLOUD' | 'SELF_HOSTING', string> = {- CLOUD: 'Cloud',- SELF_HOSTING: 'Self-hosting',-};--export function buildRequirementsText(input: SubmitClientBriefInput): string | null {- const base = isNonEmptyString(input.requirements) ? input.requirements.trim() : '';- const bullets: string[] = [];- if (input.hostingType !== undefined) {- bullets.push(`• Hosting: ${HOSTING_LABEL[input.hostingType]}`);- }- if (isNonEmptyString(input.seatCount)) bullets.push(`• Seats: ${input.seatCount.trim()}`);- if (isNonEmptyString(input.country)) bullets.push(`• Country: ${input.country.trim()}`);- if (input.languages !== undefined && input.languages.length > 0) {- bullets.push(`• Languages: ${input.languages.join(', ')}`);- }- if (isNonEmptyString(input.timeline)) bullets.push(`• Timeline: ${input.timeline.trim()}`);- if (isNonEmptyString(input.budgetRange)) bullets.push(`• Budget: ${input.budgetRange.trim()}`);- if (bullets.length === 0) return base.length > 0 ? base : null;- const block = `---\nAdditional context:\n${bullets.join('\n')}`;- return base ? `${base}\n\n${block}` : block;-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/mappers/import-opportunity-from-tft.mapper.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/mappers/import-opportunity-from-tft.mapper.tsdeleted file mode 100644index bddc1e59628..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/mappers/import-opportunity-from-tft.mapper.ts+++ /dev/null@@ -1,75 +0,0 @@-import { type CoreSchema } from 'twenty-client-sdk/core';-import { z } from 'zod';--import { isNonEmptyString } from 'src/modules/shared/utils/is-non-empty-string.util';--// TFT POSTs `null` for empty fields; treat null as "field absent".-const dropNulls = (value: unknown): unknown =>- value === null- ? undefined- : Array.isArray(value)- ? value.map(dropNulls)- : typeof value === 'object'- ? Object.fromEntries(- Object.entries(value).map(([key, val]) => [key, dropNulls(val)]),- )- : value;--// Request contract — the JSON the TFT workflow POSTs.-export const importOpportunityFromTftSchema = z.preprocess(dropNulls, z.object({- tftOpportunityId: z.string().optional(),- name: z.string().trim().min(1),- amountMicros: z.number().optional(),- currencyCode: z.string().optional(),- closeDate: z.string().optional(),- stage: z.string().optional(),- useCase: z.string().optional(),- company: z- .object({- name: z.string().optional(),- domain: z.string().optional(),- })- .optional(),- pointOfContact: z- .object({- email: z.string().optional(),- firstName: z.string().optional(),- lastName: z.string().optional(),- })- .optional(),-}));--export type ImportOpportunityFromTftInput = z.infer<- typeof importOpportunityFromTftSchema->;--export function mapToOpportunityCreateInput(- input: ImportOpportunityFromTftInput,- refs: { companyId: string | undefined; pointOfContactId: string | undefined },-): CoreSchema.OpportunityCreateInput {- const name = input.name.trim();- const tftOpportunityId = isNonEmptyString(input.tftOpportunityId)- ? input.tftOpportunityId.trim()- : undefined;-- const opportunityData: CoreSchema.OpportunityCreateInput = { name };- if (tftOpportunityId !== undefined) opportunityData.tftOpportunityId = tftOpportunityId;- if (input.amountMicros !== undefined) {- opportunityData.amount = {- amountMicros: input.amountMicros,- currencyCode: input.currencyCode ?? 'USD',- };- }- if (isNonEmptyString(input.closeDate)) opportunityData.closeDate = input.closeDate;- if (isNonEmptyString(input.stage)) {- opportunityData.stage = input.stage as CoreSchema.OpportunityStageEnum;- }- if (isNonEmptyString(input.useCase)) {- opportunityData.need = input.useCase.trim();- }- if (refs.companyId !== undefined) opportunityData.companyId = refs.companyId;- if (refs.pointOfContactId !== undefined) {- opportunityData.pointOfContactId = refs.pointOfContactId;- }- return opportunityData;-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/services/import-opportunity-from-tft.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/services/import-opportunity-from-tft.service.tsdeleted file mode 100644index 5c216c82d4e..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/services/import-opportunity-from-tft.service.ts+++ /dev/null@@ -1,119 +0,0 @@-import { CoreApiClient, type CoreSchema } from 'twenty-client-sdk/core';--import {- findCompanyIdByExactName,- findPersonIdByPrimaryEmail,-} from 'src/modules/shared/services/find-or-create-company-and-person.service';-import { isNonEmptyString } from 'src/modules/shared/utils/is-non-empty-string.util';-import { createOpportunity } from 'src/modules/opportunity/intake/graphql/mutations/create-opportunity';-import { findOpportunityByDedupeKey } from 'src/modules/opportunity/intake/graphql/queries/find-opportunity-by-dedupe-key';-import {- type ImportOpportunityFromTftInput,- mapToOpportunityCreateInput,-} from 'src/modules/opportunity/intake/mappers/import-opportunity-from-tft.mapper';--export type ImportOpportunityFromTftResult =- | { ok: true; created: boolean; id: string }- | { ok: false; reason: string };--// Find by exact name, else create. Keeps its own create path (TFT sends a domain and may omit-// the name), so the shared find-or-create helper — name-only — cannot express it.-async function findOrCreateCompanyId(- client: CoreApiClient,- company: ImportOpportunityFromTftInput['company'],-): Promise<string | undefined> {- const name = isNonEmptyString(company?.name) ? company.name.trim() : undefined;- const domain = isNonEmptyString(company?.domain) ? company.domain.trim() : undefined;- if (name === undefined && domain === undefined) return undefined;-- if (name !== undefined) {- const existing = await findCompanyIdByExactName(client, name);- if (existing !== undefined) return existing;- }-- const companyData: CoreSchema.CompanyCreateInput = { name: name ?? domain! };- if (domain !== undefined) companyData.domainName = { primaryLinkUrl: domain };-- const result = await client.mutation({- createCompany: { __args: { data: companyData }, id: true },- });- const id = result.createCompany?.id;- if (id === undefined) throw new Error('createCompany did not return an id');- return id;-}--// Find by primary email, else create — name-only contacts can't be deduped.-async function findOrCreatePersonId(- client: CoreApiClient,- pointOfContact: ImportOpportunityFromTftInput['pointOfContact'],- companyId: string | undefined,-): Promise<string | undefined> {- const email = isNonEmptyString(pointOfContact?.email)- ? pointOfContact.email.trim()- : undefined;- const firstName = isNonEmptyString(pointOfContact?.firstName)- ? pointOfContact.firstName.trim()- : '';- const lastName = isNonEmptyString(pointOfContact?.lastName)- ? pointOfContact.lastName.trim()- : '';- if (email === undefined && firstName === '' && lastName === '') return undefined;-- if (email !== undefined) {- const existing = await findPersonIdByPrimaryEmail(client, email);- if (existing !== undefined) return existing;- }-- const personData: CoreSchema.PersonCreateInput = { name: { firstName, lastName } };- if (email !== undefined) personData.emails = { primaryEmail: email };- if (companyId !== undefined) personData.companyId = companyId;-- const result = await client.mutation({- createPerson: { __args: { data: personData }, id: true },- });- const id = result.createPerson?.id;- if (id === undefined) throw new Error('createPerson did not return an id');- return id;-}--// Manual one-way copy of one Opportunity from the TFT workspace into partners; idempotent on-// tftOpportunityId (name as a fallback for manual calls).-export async function importOpportunityFromTft(- input: ImportOpportunityFromTftInput,-): Promise<ImportOpportunityFromTftResult> {- try {- const client = new CoreApiClient();- const name = input.name.trim();- const tftOpportunityId = isNonEmptyString(input.tftOpportunityId)- ? input.tftOpportunityId.trim()- : undefined;-- const dedupeFilter: CoreSchema.OpportunityFilterInput =- tftOpportunityId !== undefined- ? { tftOpportunityId: { eq: tftOpportunityId } }- : { name: { eq: name } };- const existing = await findOpportunityByDedupeKey(client, dedupeFilter);- const existingId = existing.opportunities?.edges?.[0]?.node?.id;- if (existingId !== undefined) return { ok: true, created: false, id: existingId };-- const companyId = await findOrCreateCompanyId(client, input.company);- const pointOfContactId = await findOrCreatePersonId(- client,- input.pointOfContact,- companyId,- );-- const opportunityData = mapToOpportunityCreateInput(input, {- companyId,- pointOfContactId,- });-- const result = await createOpportunity(client, opportunityData);- const id = result.createOpportunity?.id;- if (id === undefined) throw new Error('createOpportunity did not return an id');-- return { ok: true, created: true, id };- } catch (err) {- return { ok: false, reason: err instanceof Error ? err.message : String(err) };- }-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/services/notify-client-brief.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/services/notify-client-brief.service.tsdeleted file mode 100644index 12608f52dec..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/services/notify-client-brief.service.ts+++ /dev/null@@ -1,20 +0,0 @@-import { DISCORD_WEBHOOK_ENV_VAR } from 'src/modules/shared/connector/discord/config';-import { postWebhook } from 'src/modules/shared/connector/discord/discord.connector';-import { buildBriefEmbed, type BriefForEmbed } from 'src/modules/opportunity/intake/mappers/brief-embed.mapper';-import { isNonEmptyString } from 'src/modules/shared/utils/is-non-empty-string.util';--// Tighter than the trigger-driven default: this runs inside the visitor's-// request, so a hung webhook must not eat the function's 15s budget.-const BRIEF_WEBHOOK_TIMEOUT_MS = 3000;--export async function notifyClientBrief(brief: BriefForEmbed): Promise<void> {- const webhookUrl = process.env[DISCORD_WEBHOOK_ENV_VAR];- if (!isNonEmptyString(webhookUrl)) return;-- try {- const embed = buildBriefEmbed(brief, process.env.PARTNER_APP_FRONTEND_URL);- await postWebhook(webhookUrl, { embeds: [embed] }, 'submit-client-brief', BRIEF_WEBHOOK_TIMEOUT_MS);- } catch {- // Best-effort: a Discord failure must never fail a submitted brief.- }-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/services/submit-client-brief.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/services/submit-client-brief.service.tsdeleted file mode 100644index c2ea1fbc7ca..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/services/submit-client-brief.service.ts+++ /dev/null@@ -1,89 +0,0 @@-import { CoreApiClient, type CoreSchema } from 'twenty-client-sdk/core';--import {- findOrCreateCompanyByName,- findOrCreatePersonByEmail,-} from 'src/modules/shared/services/find-or-create-company-and-person.service';-import { createOpportunity } from 'src/modules/opportunity/intake/graphql/mutations/create-opportunity';-import { buildBriefName } from 'src/modules/opportunity/intake/mappers/build-brief-name.mapper';-import { findPartnerIdBySlug } from 'src/modules/opportunity/intake/graphql/queries/find-partner-id-by-slug';-import {- buildRequirementsText,- type SubmitClientBriefInput,-} from 'src/modules/opportunity/intake/mappers/build-requirements-text.mapper';-import { notifyClientBrief } from 'src/modules/opportunity/intake/services/notify-client-brief.service';--export type SubmitClientBriefResult =- | { ok: true; opportunityId: string }- | { ok: false; reason: string };--export type ReferringPartner = { id: string; name: string };--async function resolveReferringPartner(- client: CoreApiClient,- slug: string | undefined,-): Promise<ReferringPartner | null> {- if (slug === undefined) return null;- const result = await findPartnerIdBySlug(client, slug);- const node = result.partners?.edges?.[0]?.node;- if (node === undefined) {- console.warn(`submit-client-brief: no partner for slug "${slug}"`);- return null;- }- return { id: node.id, name: node.name };-}--export async function submitClientBrief(- input: SubmitClientBriefInput,-): Promise<SubmitClientBriefResult> {- try {- const client = new CoreApiClient();- const name = buildBriefName(input.need);- const requirements = buildRequirementsText(input);-- const companyId = await findOrCreateCompanyByName(- client,- input.companyName,- );- const pointOfContactId = await findOrCreatePersonByEmail(client, {- email: input.email,- firstName: input.firstName,- lastName: input.lastName,- companyId,- });- const referringPartner = await resolveReferringPartner(- client,- input.partnerSlug,- );-- const opportunityData: CoreSchema.OpportunityCreateInput = {- name,- need: input.need,- isListed: true,- stage: 'NEW',- companyId,- pointOfContactId,- };- if (requirements !== null) {- opportunityData.requirements = requirements;- }- if (referringPartner !== null) {- opportunityData.referredByPartnerId = referringPartner.id;- }-- const result = await createOpportunity(client, opportunityData);- const opportunityId = result.createOpportunity?.id;- if (opportunityId === undefined) {- throw new Error('createOpportunity did not return an id');- }-- await notifyClientBrief({ opportunityId, input, referringPartner });-- return { ok: true, opportunityId };- } catch (err) {- return {- ok: false,- reason: err instanceof Error ? err.message : String(err),- };- }-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/submit-client-brief.integration-test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/submit-client-brief.integration-test.tsdeleted file mode 100644index 5661b8d6080..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/submit-client-brief.integration-test.ts+++ /dev/null@@ -1,137 +0,0 @@-import { CoreApiClient } from 'twenty-client-sdk/core';-import { afterEach, beforeAll, describe, expect, it } from 'vitest';--import { handler } from './submit-client-brief.logic-function';-import { type SubmitClientBriefInput } from './mappers/build-requirements-text.mapper';--const TEST_SECRET = 'test-secret-abc123';-process.env.PARTNER_APPLICATION_SECRET = TEST_SECRET;--const client = new CoreApiClient();--const baseInput = (- overrides: Partial<SubmitClientBriefInput> = {},-): SubmitClientBriefInput => ({- firstName: 'Jane',- lastName: 'Smith',- email: `jane.brief.${Date.now()}@example.com`,- companyName: `Acme Brief Co ${Date.now()}`,- need: 'Set up CRM pipelines for sales',- ...overrides,-});--const authedEvent = (input: SubmitClientBriefInput) => ({- body: input,- headers: { 'x-application-secret': TEST_SECRET },-});--const createdOpportunityIds: string[] = [];-const createdPersonIds: string[] = [];-const createdCompanyIds: string[] = [];--async function cleanup(): Promise<void> {- for (const id of createdOpportunityIds.splice(0)) {- await client- .mutation({ destroyOpportunity: { __args: { id }, id: true } })- .catch(() => {});- }- for (const id of createdPersonIds.splice(0)) {- await client- .mutation({ destroyPerson: { __args: { id }, id: true } })- .catch(() => {});- }- for (const id of createdCompanyIds.splice(0)) {- await client- .mutation({ destroyCompany: { __args: { id }, id: true } })- .catch(() => {});- }-}--async function trackCreatedOpportunity(opportunityId: string): Promise<void> {- createdOpportunityIds.push(opportunityId);-- const fetched = await client.query({- opportunity: {- __args: { filter: { id: { eq: opportunityId } } },- company: { id: true },- pointOfContact: { id: true },- },- });-- if (fetched.opportunity?.company?.id)- createdCompanyIds.push(fetched.opportunity.company.id);- if (fetched.opportunity?.pointOfContact?.id) {- createdPersonIds.push(fetched.opportunity.pointOfContact.id);- }-}--afterEach(async () => {- await cleanup();-});--beforeAll(async () => {- await client.query({- opportunities: { __args: { first: 1 }, edges: { node: { id: true } } },- });-});--describe('submit-client-brief handler', () => {- it('returns unauthorized without secret', async () => {- const result = await handler({ body: baseInput(), headers: {} });- expect(result).toEqual({ ok: false, reason: 'unauthorized' });- });-- it('creates a listed opportunity with marketplace brief name suffix', async () => {- const input = baseInput({- requirements: 'French UI',- hostingType: 'CLOUD',- seatCount: '~30',- });- const result = await handler(authedEvent(input));- expect(result.ok).toBe(true);- if (!result.ok) return;-- await trackCreatedOpportunity(result.opportunityId);-- const fetched = await client.query({- opportunity: {- __args: { filter: { id: { eq: result.opportunityId } } },- id: true,- name: true,- need: true,- requirements: true,- isListed: true,- stage: true,- company: { id: true, name: true },- pointOfContact: { id: true, emails: { primaryEmail: true } },- },- });-- const opp = fetched.opportunity;- expect(opp?.name).toBe(`${input.need} — marketplace brief`);- expect(opp?.name).not.toContain(input.companyName);- expect(opp?.need).toBe(input.need);- expect(opp?.requirements).toContain('French UI');- expect(opp?.requirements).toContain('Additional context:');- expect(opp?.isListed).toBe(true);- expect(opp?.stage).toBe('NEW');- expect(opp?.company?.name).toBe(input.companyName);- expect(opp?.pointOfContact?.emails?.primaryEmail).toBe(input.email);- });-- it('creates a second opportunity for the same company with different need', async () => {- const companyName = `Repeat Co ${Date.now()}`;- const email = `repeat.${Date.now()}@example.com`;- const first = await handler(- authedEvent(baseInput({ companyName, email, need: 'Project A' })),- );- const second = await handler(- authedEvent(baseInput({ companyName, email, need: 'Project B' })),- );- expect(first.ok && second.ok).toBe(true);- if (!first.ok || !second.ok) return;- expect(first.opportunityId).not.toBe(second.opportunityId);- await trackCreatedOpportunity(first.opportunityId);- await trackCreatedOpportunity(second.opportunityId);- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/submit-client-brief.logic-function.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/submit-client-brief.logic-function.tsdeleted file mode 100644index 31406a0cb7b..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/submit-client-brief.logic-function.ts+++ /dev/null@@ -1,34 +0,0 @@-import { defineLogicFunction } from 'twenty-sdk/define';--import {- APPLICATION_SECRET_HEADER,- readSecretGuardedEvent,-} from 'src/modules/shared/http/read-secret-guarded-event';-import { submitClientBriefSchema } from 'src/modules/opportunity/intake/mappers/build-requirements-text.mapper';-import {- submitClientBrief,- type SubmitClientBriefResult,-} from 'src/modules/opportunity/intake/services/submit-client-brief.service';--export const SUBMIT_CLIENT_BRIEF_LOGIC_FUNCTION_ID =- 'a8f3c2e1-9b4d-4a7f-8c6e-1d2f3a4b5c6d';--export const handler = async (event: unknown): Promise<SubmitClientBriefResult> => {- const guard = readSecretGuardedEvent(event, submitClientBriefSchema);- if (!guard.ok) return { ok: false, reason: guard.reason };- return submitClientBrief(guard.input);-};--export default defineLogicFunction({- universalIdentifier: SUBMIT_CLIENT_BRIEF_LOGIC_FUNCTION_ID,- name: 'submit-client-brief',- description: 'Create a listed Opportunity from the public marketplace brief form.',- timeoutSeconds: 15,- handler,- httpRouteTriggerSettings: {- path: '/client-briefs',- httpMethod: 'POST',- isAuthRequired: false,- forwardedRequestHeaders: [APPLICATION_SECRET_HEADER],- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/submit-client-brief.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/submit-client-brief.test.tsdeleted file mode 100644index f4d835142c6..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/intake/submit-client-brief.test.ts+++ /dev/null@@ -1,77 +0,0 @@-import { describe, expect, it } from 'vitest';--import {- buildRequirementsText,- submitClientBriefSchema,-} from './mappers/build-requirements-text.mapper';--const base = {- firstName: 'Jane',- lastName: 'Smith',- email: '[email protected]',- companyName: 'Acme Real Estate',- need: 'Migrate from HubSpot',-};--describe('buildRequirementsText', () => {- it('returns null when no requirements or context fields', () => {- expect(buildRequirementsText(base)).toBeNull();- });-- it('returns only base requirements when no context', () => {- expect(buildRequirementsText({ ...base, requirements: 'Must go live Q4' })).toBe(- 'Must go live Q4',- );- });-- it('appends additional context block when context fields present', () => {- const text = buildRequirementsText({- ...base,- requirements: 'French UI',- hostingType: 'CLOUD',- seatCount: '~30',- country: 'France',- });- expect(text).toContain('French UI');- expect(text).toContain('Additional context:');- expect(text).toContain('• Hosting: Cloud');- expect(text).toContain('• Seats: ~30');- expect(text).toContain('• Country: France');- });-- it('omits empty context bullets', () => {- const text = buildRequirementsText({ ...base, hostingType: 'SELF_HOSTING' });- expect(text).toContain('• Hosting: Self-hosting');- expect(text).not.toContain('• Seats:');- });-});--describe('submitClientBriefSchema partnerSlug', () => {- it('accepts a well-formed slug', () => {- expect(- submitClientBriefSchema.safeParse({ ...base, partnerSlug: 'acme-consulting' }).success,- ).toBe(true);- });-- it('accepts a payload with no slug at all', () => {- expect(submitClientBriefSchema.safeParse(base).success).toBe(true);- });-- it('rejects a slug with unsupported characters', () => {- expect(- submitClientBriefSchema.safeParse({ ...base, partnerSlug: 'Acme Consulting!' }).success,- ).toBe(false);- });-- it('keeps partnerSlug out of the requirements text', () => {- const withoutSlug = buildRequirementsText({ ...base, requirements: 'French UI', seatCount: '~30' });- const withSlug = buildRequirementsText({- ...base,- requirements: 'French UI',- seatCount: '~30',- partnerSlug: 'acme-consulting',- });- expect(withSlug).toBe(withoutSlug);- expect(withSlug).not.toContain('acme-consulting');- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/mutations/update-application-state.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/mutations/update-application-state.tsdeleted file mode 100644index 63b22ce7217..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/mutations/update-application-state.ts+++ /dev/null@@ -1,7 +0,0 @@-import type { CoreApiClient } from 'twenty-client-sdk/core';--export function updateApplicationState(client: CoreApiClient, id: string, state: string) {- return client.mutation({- updateApplication: { __args: { id, data: { state } }, id: true },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/mutations/update-company-partner-user.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/mutations/update-company-partner-user.tsdeleted file mode 100644index 52958439b32..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/mutations/update-company-partner-user.ts+++ /dev/null@@ -1,11 +0,0 @@-import type { CoreApiClient } from 'twenty-client-sdk/core';--export function updateCompanyPartnerUser(- client: CoreApiClient,- companyId: string,- partnerUserId: string | null,-) {- return client.mutation({- updateCompany: { __args: { id: companyId, data: { partnerUserId } }, id: true },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/mutations/update-opportunity-is-listed.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/mutations/update-opportunity-is-listed.tsdeleted file mode 100644index 8a9cad21ac3..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/mutations/update-opportunity-is-listed.ts+++ /dev/null@@ -1,14 +0,0 @@-import type { CoreApiClient } from 'twenty-client-sdk/core';--export function updateOpportunityIsListed(- client: CoreApiClient,- opportunityId: string,- isListed: boolean,-) {- return client.mutation({- updateOpportunity: {- __args: { id: opportunityId, data: { isListed } },- id: true,- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/mutations/update-opportunity-partner-user.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/mutations/update-opportunity-partner-user.tsdeleted file mode 100644index e355697e854..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/mutations/update-opportunity-partner-user.ts+++ /dev/null@@ -1,11 +0,0 @@-import type { CoreApiClient } from 'twenty-client-sdk/core';--export function updateOpportunityPartnerUser(- client: CoreApiClient,- opportunityId: string,- partnerUserId: string | null,-) {- return client.mutation({- updateOpportunity: { __args: { id: opportunityId, data: { partnerUserId } }, id: true },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/mutations/update-person-partner-user.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/mutations/update-person-partner-user.tsdeleted file mode 100644index aaeb0bab9cc..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/mutations/update-person-partner-user.ts+++ /dev/null@@ -1,11 +0,0 @@-import type { CoreApiClient } from 'twenty-client-sdk/core';--export function updatePersonPartnerUser(- client: CoreApiClient,- id: string,- partnerUserId: string | null,-) {- return client.mutation({- updatePerson: { __args: { id, data: { partnerUserId } }, id: true },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/queries/find-opportunity-still-using-company.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/queries/find-opportunity-still-using-company.tsdeleted file mode 100644index 1ebf8722089..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/queries/find-opportunity-still-using-company.ts+++ /dev/null@@ -1,26 +0,0 @@-import type { CoreApiClient } from 'twenty-client-sdk/core';--export function findOpportunityStillUsingCompany(- client: CoreApiClient,- params: {- companyId: string;- removedPartnerId: string | null | undefined;- removedMemberId: string;- },-) {- const { companyId, removedPartnerId, removedMemberId } = params;- return client.query({- opportunities: {- __args: {- filter: {- companyId: { eq: companyId },- ...(removedPartnerId- ? { partnerId: { eq: removedPartnerId } }- : { partnerUserId: { eq: removedMemberId } }),- },- first: 1,- },- edges: { node: { id: true } },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/queries/get-listed-brief-details.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/queries/get-listed-brief-details.tsdeleted file mode 100644index 4d45a4a67c9..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/queries/get-listed-brief-details.ts+++ /dev/null@@ -1,24 +0,0 @@-import type { CoreApiClient } from 'twenty-client-sdk/core';--// List form on purpose: the single-record read throws `Record not found` for an unknown id.-export function getListedBriefDetails(- client: CoreApiClient,- opportunityId: string,-) {- return client.query({- opportunities: {- __args: { filter: { id: { eq: opportunityId } }, first: 1 },- edges: {- node: {- id: true,- name: true,- need: true,- requirements: true,- company: { name: true },- pointOfContact: { name: { firstName: true, lastName: true } },- referredByPartner: { name: true },- },- },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/queries/get-opportunity-cascade-fields.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/queries/get-opportunity-cascade-fields.tsdeleted file mode 100644index 1876d13c36a..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/queries/get-opportunity-cascade-fields.ts+++ /dev/null@@ -1,11 +0,0 @@-import type { CoreApiClient } from 'twenty-client-sdk/core';--// List form on purpose: the single-record read throws `Record not found` for an unknown id.-export function getOpportunityCascadeFields(client: CoreApiClient, opportunityId: string) {- return client.query({- opportunities: {- __args: { filter: { id: { eq: opportunityId } }, first: 1 },- edges: { node: { id: true, partnerUserId: true, companyId: true } },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/queries/list-applications-by-opportunity.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/queries/list-applications-by-opportunity.tsdeleted file mode 100644index 68400daa752..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/queries/list-applications-by-opportunity.ts+++ /dev/null@@ -1,21 +0,0 @@-import type { CoreApiClient } from 'twenty-client-sdk/core';--const APPLICATIONS_PAGE_SIZE = 200;--export function listApplicationsByOpportunity(- client: CoreApiClient,- opportunityId: string,- after?: string,-) {- return client.query({- applications: {- __args: {- filter: { opportunityId: { eq: opportunityId } },- first: APPLICATIONS_PAGE_SIZE,- ...(after ? { after } : {}),- },- edges: { node: { id: true, partnerId: true, state: true } },- pageInfo: { hasNextPage: true, endCursor: true },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/queries/list-people-by-filter.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/queries/list-people-by-filter.tsdeleted file mode 100644index c811bde65cf..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/graphql/queries/list-people-by-filter.ts+++ /dev/null@@ -1,17 +0,0 @@-import type { CoreApiClient, CoreSchema } from 'twenty-client-sdk/core';--const PEOPLE_PAGE_SIZE = 200;--export function listPeopleByFilter(- client: CoreApiClient,- filter: CoreSchema.PersonFilterInput,- after?: string,-) {- return client.query({- people: {- __args: { filter, first: PEOPLE_PAGE_SIZE, ...(after ? { after } : {}) },- edges: { node: { id: true } },- pageInfo: { hasNextPage: true, endCursor: true },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/on-opportunity-intro-sent.logic-function.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/on-opportunity-intro-sent.logic-function.tsdeleted file mode 100644index 341a6155848..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/on-opportunity-intro-sent.logic-function.ts+++ /dev/null@@ -1,34 +0,0 @@-import { CoreApiClient, type CoreSchema } from 'twenty-client-sdk/core';-import {- type DatabaseEventPayload,- defineLogicFunction,- type ObjectRecordUpdateEvent,-} from 'twenty-sdk/define';--import { ON_OPPORTUNITY_INTRO_SENT_FN_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { updateOpportunityIsListed } from 'src/modules/opportunity/matching/graphql/mutations/update-opportunity-is-listed';--export const handler = async (- payload: DatabaseEventPayload<- ObjectRecordUpdateEvent<CoreSchema.Opportunity>- >,-): Promise<Record<string, unknown>> => {- const { after, updatedFields } = payload.properties;- if (!updatedFields?.includes('introSentAt') || !after?.id) return {};- if (!after.introSentAt)- return { skipped: true, reason: 'intro_sent_at_cleared' };-- await updateOpportunityIsListed(new CoreApiClient(), after.id, false);- return { unlisted: true, opportunityId: after.id };-};--export default defineLogicFunction({- universalIdentifier: ON_OPPORTUNITY_INTRO_SENT_FN_UNIVERSAL_IDENTIFIER,- name: 'on-opportunity-intro-sent',- timeoutSeconds: 15,- handler,- databaseEventTriggerSettings: {- eventName: 'opportunity.updated',- updatedFields: ['introSentAt'],- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/on-opportunity-intro-sent.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/on-opportunity-intro-sent.test.tsdeleted file mode 100644index cca2e034ea2..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/on-opportunity-intro-sent.test.ts+++ /dev/null@@ -1,55 +0,0 @@-import { beforeEach, describe, expect, it, vi } from 'vitest';--const { mutationMock } = vi.hoisted(() => ({- mutationMock: vi.fn(),-}));-vi.mock('twenty-client-sdk/core', () => ({- CoreApiClient: vi.fn(function () {- return { mutation: mutationMock };- }),-}));--import { handler } from './on-opportunity-intro-sent.logic-function';--const OPP = 'aaaaaaaa-0000-0000-0000-000000000001';--const event = (after: Record<string, unknown>, updatedFields: string[]) =>- ({ properties: { after, updatedFields } }) as never;--describe('on-opportunity-intro-sent', () => {- beforeEach(() => {- mutationMock.mockReset();- mutationMock.mockResolvedValue({ updateOpportunity: { id: OPP } });- });-- it('sets isListed to false when introSentAt goes from empty to a date', async () => {- const result = await handler(- event({ id: OPP, introSentAt: '2026-08-19T00:00:00.000Z' }, [- 'introSentAt',- ]),- );- expect(mutationMock).toHaveBeenCalledWith({- updateOpportunity: {- __args: { id: OPP, data: { isListed: false } },- id: true,- },- });- expect(result).toEqual({ unlisted: true, opportunityId: OPP });- });-- it('writes nothing when introSentAt is cleared', async () => {- const result = await handler(- event({ id: OPP, introSentAt: null }, ['introSentAt']),- );- expect(mutationMock).not.toHaveBeenCalled();- expect(result).toEqual({ skipped: true, reason: 'intro_sent_at_cleared' });- });-- it('returns without writing when the payload carries no record id', async () => {- const result = await handler(- event({ introSentAt: '2026-08-19T00:00:00.000Z' }, ['introSentAt']),- );- expect(mutationMock).not.toHaveBeenCalled();- expect(result).toEqual({});- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/on-opportunity-listed.logic-function.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/on-opportunity-listed.logic-function.tsdeleted file mode 100644index d1643b5ec42..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/on-opportunity-listed.logic-function.ts+++ /dev/null@@ -1,37 +0,0 @@-import { type CoreSchema } from 'twenty-client-sdk/core';-import {- type DatabaseEventPayload,- defineLogicFunction,- type ObjectRecordUpdateEvent,-} from 'twenty-sdk/define';--import { ON_OPPORTUNITY_LISTED_FN_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { notifyListedBrief } from 'src/modules/opportunity/matching/services/notify-listed-brief.service';--// The public form is NOT this function's job: form briefs are born listed and never-// flip, so the in-route ping covers them. This covers hand-listing and imports.-export const handler = async (- payload: DatabaseEventPayload<- ObjectRecordUpdateEvent<CoreSchema.Opportunity>- >,-): Promise<Record<string, unknown>> => {- const { before, after, updatedFields } = payload.properties;- if (!updatedFields?.includes('isListed') || !after?.id) return {};- if (before?.isListed || !after.isListed) {- return { skipped: true, reason: 'not_a_listing_flip' };- }-- const notified = await notifyListedBrief(after.id);- return { notified, opportunityId: after.id };-};--export default defineLogicFunction({- universalIdentifier: ON_OPPORTUNITY_LISTED_FN_UNIVERSAL_IDENTIFIER,- name: 'on-opportunity-listed',- timeoutSeconds: 15,- handler,- databaseEventTriggerSettings: {- eventName: 'opportunity.updated',- updatedFields: ['isListed'],- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/on-opportunity-listed.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/on-opportunity-listed.test.tsdeleted file mode 100644index 74ced692c26..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/on-opportunity-listed.test.ts+++ /dev/null@@ -1,76 +0,0 @@-import { beforeEach, describe, expect, it, vi } from 'vitest';--const { notifyMock } = vi.hoisted(() => ({ notifyMock: vi.fn() }));-vi.mock(- 'src/modules/opportunity/matching/services/notify-listed-brief.service',- () => ({- notifyListedBrief: notifyMock,- }),-);--import { handler } from './on-opportunity-listed.logic-function';--const OPP = 'aaaaaaaa-0000-0000-0000-000000000001';--const event = (- before: Record<string, unknown>,- after: Record<string, unknown>,- updatedFields: string[] = ['isListed'],-) => ({ properties: { before, after, updatedFields } }) as never;--describe('on-opportunity-listed', () => {- beforeEach(() => {- notifyMock.mockReset();- notifyMock.mockResolvedValue(true);- });-- it('notifies when isListed flips from false to true', async () => {- const result = await handler(- event({ id: OPP, isListed: false }, { id: OPP, isListed: true }),- );- expect(notifyMock).toHaveBeenCalledWith(OPP);- expect(result).toEqual({ notified: true, opportunityId: OPP });- });-- it('reports notified: false when the ping did not go out', async () => {- notifyMock.mockResolvedValue(false);- const result = await handler(- event({ id: OPP, isListed: false }, { id: OPP, isListed: true }),- );- expect(result).toEqual({ notified: false, opportunityId: OPP });- });-- it('stays silent when isListed flips to false', async () => {- const result = await handler(- event({ id: OPP, isListed: true }, { id: OPP, isListed: false }),- );- expect(notifyMock).not.toHaveBeenCalled();- expect(result).toEqual({ skipped: true, reason: 'not_a_listing_flip' });- });-- it('stays silent when isListed was already true', async () => {- const result = await handler(- event({ id: OPP, isListed: true }, { id: OPP, isListed: true }),- );- expect(notifyMock).not.toHaveBeenCalled();- expect(result).toEqual({ skipped: true, reason: 'not_a_listing_flip' });- });-- it('returns without notifying when the payload carries no record id', async () => {- const result = await handler(- event({ isListed: false }, { isListed: true }),- );- expect(notifyMock).not.toHaveBeenCalled();- expect(result).toEqual({});- });-- it('returns without notifying when isListed is not in updatedFields', async () => {- const result = await handler(- event({ id: OPP, isListed: true }, { id: OPP, isListed: true }, [- 'stage',- ]),- );- expect(notifyMock).not.toHaveBeenCalled();- expect(result).toEqual({});- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/on-opportunity-partner-assigned.integration-test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/on-opportunity-partner-assigned.integration-test.tsdeleted file mode 100644index 93b03efbd32..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/on-opportunity-partner-assigned.integration-test.ts+++ /dev/null@@ -1,273 +0,0 @@-import { CoreApiClient } from 'twenty-client-sdk/core';-import { afterEach, beforeEach, describe, expect, it } from 'vitest';--import onOpportunityPartnerAssigned from './on-opportunity-partner-assigned.logic-function';--// The SDK wraps the handler in a ValidationResult; the fn is on config.handler.-const handler = onOpportunityPartnerAssigned.config.handler;--function requireId(id: string | null | undefined, what: string): string {- if (!id) throw new Error(`${what} returned no id`);- return id;-}--async function getWorkspaceMemberId(client: CoreApiClient): Promise<string> {- const r = await client.query({- workspaceMembers: {- __args: { first: 1 },- edges: { node: { id: true } },- },- });- const memberId = r.workspaceMembers?.edges?.[0]?.node?.id;- if (!memberId) throw new Error('No workspace members found — cannot run test');- return memberId;-}--async function createPartner(client: CoreApiClient, memberId: string): Promise<string> {- const r = await client.mutation({- createPartner: {- __args: {- data: {- name: `[test-rls] partner ${Date.now()}`,- slug: `test-rls-${Date.now()}`,- partnerUserId: memberId,- },- },- id: true,- },- });- return requireId(r.createPartner?.id, 'createPartner');-}--async function destroyPartner(client: CoreApiClient, id: string) {- await client.mutation({ destroyPartner: { __args: { id }, id: true } }).catch(() => {});-}--async function createCompany(client: CoreApiClient, name: string): Promise<string> {- const r = await client.mutation({- createCompany: { __args: { data: { name } }, id: true },- });- return requireId(r.createCompany?.id, 'createCompany');-}--async function destroyCompany(client: CoreApiClient, id: string) {- await client.mutation({ destroyCompany: { __args: { id }, id: true } }).catch(() => {});-}--async function createPerson(client: CoreApiClient, companyId: string): Promise<string> {- const r = await client.mutation({- createPerson: {- __args: { data: { name: { firstName: 'Test', lastName: `RLS-${Date.now()}` }, companyId } },- id: true,- },- });- return requireId(r.createPerson?.id, 'createPerson');-}--async function destroyPerson(client: CoreApiClient, id: string) {- await client.mutation({ destroyPerson: { __args: { id }, id: true } }).catch(() => {});-}--async function createOpportunity(- client: CoreApiClient,- name: string,- companyId: string,-): Promise<string> {- const r = await client.mutation({- createOpportunity: { __args: { data: { name, companyId } }, id: true },- });- return requireId(r.createOpportunity?.id, 'createOpportunity');-}--async function destroyOpportunity(client: CoreApiClient, id: string) {- await client.mutation({ destroyOpportunity: { __args: { id }, id: true } }).catch(() => {});-}--async function getOpportunityPartnerUserId(- client: CoreApiClient,- id: string,-): Promise<string | null> {- const r = await client.query({- opportunity: {- __args: { filter: { id: { eq: id } } },- id: true,- partnerUserId: true,- },- });- return r.opportunity?.partnerUserId ?? null;-}--async function getCompanyPartnerUserId(- client: CoreApiClient,- id: string,-): Promise<string | null> {- const r = await client.query({- company: {- __args: { filter: { id: { eq: id } } },- id: true,- partnerUserId: true,- },- });- return r.company?.partnerUserId ?? null;-}--async function getPersonPartnerUserId(- client: CoreApiClient,- id: string,-): Promise<string | null> {- const r = await client.query({- person: {- __args: { filter: { id: { eq: id } } },- id: true,- partnerUserId: true,- },- });- return r.person?.partnerUserId ?? null;-}--// Invoke the handler directly against a live workspace to assert its cascade logic and-// resulting DB state deterministically, without depending on the event bus. The trigger-// wiring (opportunity.updated → fires) is covered separately by app sync + manual E2E.-describe('on-opportunity-partner-assigned', () => {- let client: CoreApiClient;-- // Track created record IDs for cleanup — order matters for FK constraints.- const createdOpportunityIds: string[] = [];- const createdPersonIds: string[] = [];- const createdCompanyIds: string[] = [];- const createdPartnerIds: string[] = [];-- beforeEach(() => {- client = new CoreApiClient();- });-- afterEach(async () => {- // Destroy in reverse FK order.- for (const id of createdOpportunityIds) await destroyOpportunity(client, id);- createdOpportunityIds.length = 0;-- for (const id of createdPersonIds) await destroyPerson(client, id);- createdPersonIds.length = 0;-- for (const id of createdCompanyIds) await destroyCompany(client, id);- createdCompanyIds.length = 0;-- for (const id of createdPartnerIds) await destroyPartner(client, id);- createdPartnerIds.length = 0;- });-- it('returns {} without any mutations when partnerId is not in updatedFields', async () => {- const result = await handler({- properties: { updatedFields: ['name'], after: { id: 'fake-id' } },- });-- expect(result).toEqual({});- });-- it('clears partnerUser on the opportunity, company, and people when the partner is removed (unassignment)', async () => {- const memberId = await getWorkspaceMemberId(client);- const partnerId = await createPartner(client, memberId);- createdPartnerIds.push(partnerId);- const companyId = await createCompany(client, `[test-rls] company ${Date.now()}`);- createdCompanyIds.push(companyId);- const personId = await createPerson(client, companyId);- createdPersonIds.push(personId);- const oppId = await createOpportunity(client, `[test-rls] opp ${Date.now()}`, companyId);- createdOpportunityIds.push(oppId);-- // Assign first so the opportunity + company + person have partnerUser stamped.- await handler({- properties: { updatedFields: ['partnerId'], after: { id: oppId, partnerId, companyId } },- });- expect(await getOpportunityPartnerUserId(client, oppId)).toBe(memberId);- expect(await getCompanyPartnerUserId(client, companyId)).toBe(memberId);- expect(await getPersonPartnerUserId(client, personId)).toBe(memberId);-- // Now unassign: partnerId set to null. No other opportunity uses this company for the- // member, so the company + person should be cleared too. `before` carries the removed- // partnerId so the handler can decide on the source of truth.- const result = await handler({- properties: {- updatedFields: ['partnerId'],- before: { id: oppId, partnerId, partnerUserId: memberId, companyId },- after: { id: oppId, partnerId: null, companyId },- },- });-- expect(result.cascaded).toBe(true);- expect(result.cleared).toBe(true);- expect(await getOpportunityPartnerUserId(client, oppId)).toBeNull();- expect(await getCompanyPartnerUserId(client, companyId)).toBeNull();- expect(await getPersonPartnerUserId(client, personId)).toBeNull();- });-- it('stamps partnerUserId on opportunity, company, and people when partner is assigned', async () => {- const memberId = await getWorkspaceMemberId(client);- const partnerId = await createPartner(client, memberId);- createdPartnerIds.push(partnerId);- const companyId = await createCompany(client, `[test-rls] company ${Date.now()}`);- createdCompanyIds.push(companyId);- const personId = await createPerson(client, companyId);- createdPersonIds.push(personId);- const oppId = await createOpportunity(client, `[test-rls] opp ${Date.now()}`, companyId);- createdOpportunityIds.push(oppId);-- const result = await handler({- properties: { updatedFields: ['partnerId'], after: { id: oppId, partnerId, companyId } },- });-- expect(result.cascaded).toBe(true);- expect(result.partnerUserId).toBe(memberId);- expect(await getOpportunityPartnerUserId(client, oppId)).toBe(memberId);- expect(await getCompanyPartnerUserId(client, companyId)).toBe(memberId);- expect(await getPersonPartnerUserId(client, personId)).toBe(memberId);- });-- it('stamps partnerUserId on opportunity and returns cascaded: true when no companyId is present', async () => {- const memberId = await getWorkspaceMemberId(client);- const partnerId = await createPartner(client, memberId);- createdPartnerIds.push(partnerId);-- // Opportunity with no linked company, so there is no company/people cascade.- const r = await client.mutation({- createOpportunity: {- __args: { data: { name: `[test-rls] no-company opp ${Date.now()}` } },- id: true,- },- });- const oppId = requireId(r.createOpportunity?.id, 'createOpportunity');- createdOpportunityIds.push(oppId);-- const result = await handler({- properties: { updatedFields: ['partnerId'], after: { id: oppId, partnerId } },- });-- expect(result.cascaded).toBe(true);- expect(result.partnerUserId).toBe(memberId);- expect(await getOpportunityPartnerUserId(client, oppId)).toBe(memberId);- });-- it('returns { cascaded: false, reason: "partner_has_no_user" } when partner.partnerUserId is null', async () => {- // Create a partner WITHOUT a partnerUserId.- const r = await client.mutation({- createPartner: {- __args: {- data: {- name: `[test-rls] no-user partner ${Date.now()}`,- slug: `test-rls-nouser-${Date.now()}`,- },- },- id: true,- },- });- const noUserPartnerId = requireId(r.createPartner?.id, 'createPartner');- createdPartnerIds.push(noUserPartnerId);-- const result = await handler({- properties: { updatedFields: ['partnerId'], after: { id: 'fake-opp-id', partnerId: noUserPartnerId } },- });-- expect(result.cascaded).toBe(false);- expect(result.reason).toBe('partner_has_no_user');- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/on-opportunity-partner-assigned.logic-function.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/on-opportunity-partner-assigned.logic-function.tsdeleted file mode 100644index ece2c68cf89..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/on-opportunity-partner-assigned.logic-function.ts+++ /dev/null@@ -1,25 +0,0 @@-import { CoreApiClient, type CoreSchema } from 'twenty-client-sdk/core';-import {- type DatabaseEventPayload,- defineLogicFunction,- type ObjectRecordUpdateEvent,-} from 'twenty-sdk/define';--import { propagatePartnerUser } from 'src/modules/opportunity/matching/services/propagate-partner-user.service';--const handler = async (- payload: DatabaseEventPayload<ObjectRecordUpdateEvent<CoreSchema.Opportunity>>,-): Promise<Record<string, unknown>> => {- const { after, before, updatedFields } = payload.properties;- if (!updatedFields?.includes('partnerId') || !after?.id) return {};- return propagatePartnerUser(new CoreApiClient(), { opportunityId: after.id, before, after });-};--export default defineLogicFunction({- // UNCHANGED — kept inline (not in universal-identifiers.ts, which is bundle-local).- universalIdentifier: 'd7e4a4e6-9142-4597-adcf-6fb83c0f042d',- name: 'on-opportunity-partner-assigned',- timeoutSeconds: 15,- handler,- databaseEventTriggerSettings: { eventName: 'opportunity.updated' },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/on-opportunity-partner-won.logic-function.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/on-opportunity-partner-won.logic-function.tsdeleted file mode 100644index a1884f04d87..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/on-opportunity-partner-won.logic-function.ts+++ /dev/null@@ -1,27 +0,0 @@-import { CoreApiClient, type CoreSchema } from 'twenty-client-sdk/core';-import {- type DatabaseEventPayload,- defineLogicFunction,- type ObjectRecordUpdateEvent,-} from 'twenty-sdk/define';--import { syncApplicationOutcomes } from 'src/modules/opportunity/matching/services/sync-application-outcomes.service';--export const handler = async (- payload: DatabaseEventPayload<ObjectRecordUpdateEvent<CoreSchema.Opportunity>>,-): Promise<Record<string, unknown>> => {- const { after, updatedFields } = payload.properties;- if (!updatedFields?.includes('partnerId') || !after?.id) return {};- return syncApplicationOutcomes(new CoreApiClient(), {- opportunityId: after.id,- newPartnerId: after.partnerId ?? null,- });-};--export default defineLogicFunction({- universalIdentifier: '683f407e-e7a0-435d-a380-e51e536770f8',- name: 'on-opportunity-partner-won',- timeoutSeconds: 15,- handler,- databaseEventTriggerSettings: { eventName: 'opportunity.updated' },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/on-opportunity-partner-won.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/on-opportunity-partner-won.test.tsdeleted file mode 100644index 3c9bee1f851..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/on-opportunity-partner-won.test.ts+++ /dev/null@@ -1,120 +0,0 @@-import { beforeEach, describe, expect, it, vi } from 'vitest';--const { queryMock, mutationMock } = vi.hoisted(() => ({- queryMock: vi.fn(),- mutationMock: vi.fn(),-}));-vi.mock('twenty-client-sdk/core', () => ({- CoreApiClient: vi.fn(function () {- return { query: queryMock, mutation: mutationMock };- }),-}));--import { handler } from './on-opportunity-partner-won.logic-function';--const OPP = 'aaaaaaaa-0000-0000-0000-000000000001';-const P_WIN = 'bbbbbbbb-0000-0000-0000-000000000001';-const P_OTHER = 'bbbbbbbb-0000-0000-0000-000000000002';--const event = (after: Record<string, unknown>, updatedFields: string[]) =>- ({ properties: { after, updatedFields } }) as never;--const apps = (...nodes: Array<Record<string, unknown>>) => ({- applications: { edges: nodes.map((node) => ({ node })) },-});--const stateUpdates = () =>- mutationMock.mock.calls.map((c) => {- const a = c[0].updateApplication.__args;- return { id: a.id, state: a.data.state };- });--describe('on-opportunity-partner-won cascade', () => {- beforeEach(() => {- queryMock.mockReset();- mutationMock.mockReset();- mutationMock.mockResolvedValue({ updateApplication: { id: 'x' } });- });-- it('ignores updates that do not touch partnerId', async () => {- const result = await handler(- event({ id: OPP, partnerId: P_WIN }, ['stage']),- );- expect(result).toEqual({});- expect(queryMock).not.toHaveBeenCalled();- });-- it('on assign: winner -> WON, every other contender -> DECLINED', async () => {- queryMock.mockResolvedValue(- apps(- { id: 'app-win', partnerId: P_WIN, state: 'APPLIED' },- { id: 'app-other', partnerId: P_OTHER, state: 'APPLIED' },- { id: 'app-declined', partnerId: 'p3', state: 'DECLINED' },- ),- );- await handler(event({ id: OPP, partnerId: P_WIN }, ['partnerId']));- const updates = stateUpdates();- expect(updates).toContainEqual({ id: 'app-win', state: 'WON' });- expect(updates).toContainEqual({ id: 'app-other', state: 'DECLINED' });- expect(updates.find((u) => u.id === 'app-declined')).toBeUndefined();- });-- it('on assign: a losing BACKUP keeps its shortlist state', async () => {- queryMock.mockResolvedValue(- apps(- { id: 'app-win', partnerId: P_WIN, state: 'APPLIED' },- { id: 'app-bk', partnerId: P_OTHER, state: 'BACKUP' },- ),- );- await handler(event({ id: OPP, partnerId: P_WIN }, ['partnerId']));- const updates = stateUpdates();- expect(updates).toContainEqual({ id: 'app-win', state: 'WON' });- expect(updates.find((u) => u.id === 'app-bk')).toBeUndefined();- });-- it('on assign: a winner sitting at BACKUP still moves to WON', async () => {- queryMock.mockResolvedValue(- apps({ id: 'app-win-was-backup', partnerId: P_WIN, state: 'BACKUP' }),- );- await handler(event({ id: OPP, partnerId: P_WIN }, ['partnerId']));- expect(stateUpdates()).toContainEqual({- id: 'app-win-was-backup',- state: 'WON',- });- });-- it('on assign: a winner sitting at DECLINED still moves to WON (no longer frozen)', async () => {- queryMock.mockResolvedValue(- apps({ id: 'app-win-was-declined', partnerId: P_WIN, state: 'DECLINED' }),- );- await handler(event({ id: OPP, partnerId: P_WIN }, ['partnerId']));- const updates = stateUpdates();- expect(updates).toContainEqual({- id: 'app-win-was-declined',- state: 'WON',- });- });-- it('on unassign: only WON -> APPLIED; DECLINED and BACKUP untouched', async () => {- queryMock.mockResolvedValue(- apps(- { id: 'app-win', partnerId: P_WIN, state: 'WON' },- { id: 'app-declined', partnerId: P_OTHER, state: 'DECLINED' },- { id: 'app-bk', partnerId: 'p3', state: 'BACKUP' },- ),- );- await handler(event({ id: OPP, partnerId: null }, ['partnerId']));- const updates = stateUpdates();- expect(updates).toContainEqual({ id: 'app-win', state: 'APPLIED' });- expect(updates.find((u) => u.id === 'app-declined')).toBeUndefined();- expect(updates.find((u) => u.id === 'app-bk')).toBeUndefined();- });-- it('does not rewrite an app already in its target state', async () => {- queryMock.mockResolvedValue(- apps({ id: 'app-win', partnerId: P_WIN, state: 'WON' }),- );- await handler(event({ id: OPP, partnerId: P_WIN }, ['partnerId']));- expect(stateUpdates().find((u) => u.id === 'app-win')).toBeUndefined();- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/services/notify-listed-brief.service.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/services/notify-listed-brief.service.test.tsdeleted file mode 100644index b6002e5ed09..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/services/notify-listed-brief.service.test.ts+++ /dev/null@@ -1,96 +0,0 @@-import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';--const { queryMock, postWebhookMock } = vi.hoisted(() => ({- queryMock: vi.fn(),- postWebhookMock: vi.fn(),-}));-vi.mock('twenty-client-sdk/core', () => ({- CoreApiClient: vi.fn(function () {- return { query: queryMock };- }),-}));-vi.mock('src/modules/shared/connector/discord/discord.connector', () => ({- postWebhook: postWebhookMock,-}));--import { notifyListedBrief } from './notify-listed-brief.service';--const OPP = 'aaaaaaaa-0000-0000-0000-000000000001';--const briefResult = (node: Record<string, unknown> | undefined) => ({- opportunities: { edges: node === undefined ? [] : [{ node }] },-});--describe('notifyListedBrief', () => {- beforeEach(() => {- vi.stubEnv('DISCORD_WEBHOOK_URL', 'https://discord.test/hook');- vi.stubEnv('PARTNER_APP_FRONTEND_URL', 'https://crm.test/');- queryMock.mockReset();- postWebhookMock.mockReset();- postWebhookMock.mockResolvedValue(true);- });- afterEach(() => vi.unstubAllEnvs());-- it('posts one embed built from the record', async () => {- queryMock.mockResolvedValue(- briefResult({- id: OPP,- name: 'Acme — marketplace brief',- need: 'Migrate 40 seats to Twenty',- requirements: 'Hosting: Cloud\nSeats: 40',- company: { name: 'Acme' },- pointOfContact: { name: { firstName: 'Jane', lastName: 'Doe' } },- referredByPartner: { name: 'Meridian Craft' },- }),- );- await notifyListedBrief(OPP);- expect(postWebhookMock).toHaveBeenCalledTimes(1);- const [url, payload, label] = postWebhookMock.mock.calls[0];- expect(url).toBe('https://discord.test/hook');- expect(label).toBe('notify-listed-brief');- const embed = payload.embeds[0];- expect(embed.title).toBe('Brief listed on the marketplace');- expect(embed.description).toBe('Migrate 40 seats to Twenty');- expect(embed.url).toBe(`https://crm.test/object/opportunity/${OPP}`);- expect(embed.fields).toEqual([- { name: 'Company', value: 'Acme', inline: true },- { name: 'Contact', value: 'Jane Doe', inline: true },- { name: 'Referred by', value: 'Meridian Craft', inline: true },- { name: 'Requirements', value: 'Hosting: Cloud\nSeats: 40' },- ]);- });-- it('does nothing without a webhook url', async () => {- vi.stubEnv('DISCORD_WEBHOOK_URL', '');- await expect(notifyListedBrief(OPP)).resolves.toBe(false);- expect(queryMock).not.toHaveBeenCalled();- expect(postWebhookMock).not.toHaveBeenCalled();- });-- it('reports false when the opportunity is missing (empty edges)', async () => {- queryMock.mockResolvedValue(briefResult(undefined));- await expect(notifyListedBrief(OPP)).resolves.toBe(false);- expect(postWebhookMock).not.toHaveBeenCalled();- });-- it('swallows a read failure and reports false', async () => {- queryMock.mockRejectedValue(new Error('boom'));- await expect(notifyListedBrief(OPP)).resolves.toBe(false);- });-- it('swallows a webhook failure and reports false', async () => {- queryMock.mockResolvedValue(briefResult({ id: OPP, name: 'n', need: 'x' }));- postWebhookMock.mockRejectedValue(new Error('discord down'));- await expect(notifyListedBrief(OPP)).resolves.toBe(false);- });-- it('omits empty fields and falls back to the name as description', async () => {- queryMock.mockResolvedValue(- briefResult({ id: OPP, name: 'Acme — marketplace brief' }),- );- await notifyListedBrief(OPP);- const embed = postWebhookMock.mock.calls[0][1].embeds[0];- expect(embed.description).toBe('Acme — marketplace brief');- expect(embed.fields).toEqual([]);- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/services/notify-listed-brief.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/services/notify-listed-brief.service.tsdeleted file mode 100644index be79ab1e895..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/services/notify-listed-brief.service.ts+++ /dev/null@@ -1,75 +0,0 @@-import { CoreApiClient } from 'twenty-client-sdk/core';--import {- DISCORD_WEBHOOK_ENV_VAR,- TWENTY_BLUE,-} from 'src/modules/shared/connector/discord/config';-import { postWebhook } from 'src/modules/shared/connector/discord/discord.connector';-import {- inlineField,- truncate,- trimTrailingSlash,-} from 'src/modules/shared/connector/discord/embed-text.util';-import { type DiscordField } from 'src/modules/shared/connector/discord/types';-import { getListedBriefDetails } from 'src/modules/opportunity/matching/graphql/queries/get-listed-brief-details';-import { isNonEmptyString } from 'src/modules/shared/utils/is-non-empty-string.util';--const NEED_MAX = 600;-const REQUIREMENTS_MAX = 300;--export async function notifyListedBrief(- opportunityId: string,-): Promise<boolean> {- const webhookUrl = process.env[DISCORD_WEBHOOK_ENV_VAR];- if (!isNonEmptyString(webhookUrl)) return false;-- try {- const result = await getListedBriefDetails(- new CoreApiClient(),- opportunityId,- );- const brief = result.opportunities?.edges?.[0]?.node;- if (!brief) return false;-- const contact = [- brief.pointOfContact?.name?.firstName,- brief.pointOfContact?.name?.lastName,- ]- .filter(isNonEmptyString)- .join(' ');- const fields: DiscordField[] = [- ...inlineField('Company', brief.company?.name),- ...inlineField('Contact', contact),- ...inlineField('Referred by', brief.referredByPartner?.name),- ];- if (isNonEmptyString(brief.requirements)) {- fields.push({- name: 'Requirements',- value: truncate(brief.requirements.trim(), REQUIREMENTS_MAX),- });- }-- const embed: Record<string, unknown> = {- title: 'Brief listed on the marketplace',- description: isNonEmptyString(brief.need)- ? truncate(brief.need.trim(), NEED_MAX)- : brief.name,- color: TWENTY_BLUE,- timestamp: new Date().toISOString(),- fields,- };- const frontendUrl = process.env.PARTNER_APP_FRONTEND_URL;- if (isNonEmptyString(frontendUrl)) {- embed.url = `${trimTrailingSlash(frontendUrl)}/object/opportunity/${brief.id}`;- }-- return await postWebhook(- webhookUrl,- { embeds: [embed] },- 'notify-listed-brief',- );- } catch {- // Best-effort: a read or Discord failure must never fail the trigger.- return false;- }-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/services/propagate-partner-user.service.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/services/propagate-partner-user.service.test.tsdeleted file mode 100644index 69567de088e..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/services/propagate-partner-user.service.test.ts+++ /dev/null@@ -1,75 +0,0 @@-import { beforeEach, describe, expect, it, vi } from 'vitest';-import { type CoreApiClient } from 'twenty-client-sdk/core';--import { propagatePartnerUser } from './propagate-partner-user.service';--describe('propagatePartnerUser absence branches', () => {- const query = vi.fn();- const mutation = vi.fn();- const client = { query, mutation } as unknown as CoreApiClient;-- // Route each read by the shape of its selection, the way the other service tests do.- const routeQueries = (overrides: Record<string, unknown> = {}) => {- query.mockImplementation((selection: Record<string, unknown>) => {- const key = Object.keys(selection)[0] as string;- if (key in overrides) return Promise.resolve({ [key]: overrides[key] });- if (key === 'people') return Promise.resolve({ people: { edges: [] } });- return Promise.resolve({ [key]: { edges: [] } });- });- };-- beforeEach(() => {- query.mockReset();- mutation.mockReset();- mutation.mockResolvedValue({});- routeQueries();- });-- it('clears the opportunity when the cascade read finds no opportunity row', async () => {- const result = await propagatePartnerUser(client, {- opportunityId: 'opportunity-1',- before: { partnerId: 'partner-1' } as never,- after: {} as never,- });-- expect(result).toEqual({ cascaded: true, cleared: true });- expect(mutation).toHaveBeenCalledWith({- updateOpportunity: {- __args: { id: 'opportunity-1', data: { partnerUserId: null } },- id: true,- },- });- });-- it('reports partner_has_no_user when the partner row is absent', async () => {- const result = await propagatePartnerUser(client, {- opportunityId: 'opportunity-1',- before: {} as never,- after: { partnerId: 'partner-1' } as never,- });-- expect(result).toEqual({ cascaded: false, reason: 'partner_has_no_user' });- expect(mutation).not.toHaveBeenCalled();- });-- it('stamps the company when the company row is absent', async () => {- routeQueries({- partners: { edges: [{ node: { id: 'partner-1', partnerUserId: 'member-1' } }] },- companies: { edges: [] },- });-- const result = await propagatePartnerUser(client, {- opportunityId: 'opportunity-1',- before: {} as never,- after: { partnerId: 'partner-1', companyId: 'company-1' } as never,- });-- expect(result).toEqual({ cascaded: true, partnerUserId: 'member-1' });- expect(mutation).toHaveBeenCalledWith({- updateCompany: {- __args: { id: 'company-1', data: { partnerUserId: 'member-1' } },- id: true,- },- });- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/services/propagate-partner-user.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/services/propagate-partner-user.service.tsdeleted file mode 100644index bc1a11cf1ec..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/services/propagate-partner-user.service.ts+++ /dev/null@@ -1,148 +0,0 @@-import type { CoreApiClient, CoreSchema } from 'twenty-client-sdk/core';-import type {- DatabaseEventPayload,- ObjectRecordUpdateEvent,-} from 'twenty-sdk/define';--import { collectAll } from 'src/modules/shared/utils/paginate.util';-import { getCompanyPartnerUser } from 'src/modules/shared/graphql/queries/get-company-partner-user';-import { getOpportunityCascadeFields } from 'src/modules/opportunity/matching/graphql/queries/get-opportunity-cascade-fields';-import { getPartnerOwner } from 'src/modules/shared/graphql/queries/get-partner-owner';-import { findOpportunityStillUsingCompany } from 'src/modules/opportunity/matching/graphql/queries/find-opportunity-still-using-company';-import { listPeopleByFilter } from 'src/modules/opportunity/matching/graphql/queries/list-people-by-filter';-import { updateCompanyPartnerUser } from 'src/modules/opportunity/matching/graphql/mutations/update-company-partner-user';-import { updateOpportunityPartnerUser } from 'src/modules/opportunity/matching/graphql/mutations/update-opportunity-partner-user';-import { updatePersonPartnerUser } from 'src/modules/opportunity/matching/graphql/mutations/update-person-partner-user';--type OpportunityUpdateProperties = DatabaseEventPayload<- ObjectRecordUpdateEvent<CoreSchema.Opportunity>->['properties'];--async function collectPeopleIds(- client: CoreApiClient,- filter: CoreSchema.PersonFilterInput,-): Promise<string[]> {- const nodes = await collectAll(async (after) => {- const page = await listPeopleByFilter(client, filter, after);- return page.people;- });- return nodes.map((node) => node.id).filter((id): id is string => Boolean(id));-}--// Set (or clear, with null) partnerUser on each Person, attempting all of them even if some-// fail. Returns the failure count so the caller can force a retry rather than silently-// leaving a partial stamp.-async function setPeoplePartnerUser(- client: CoreApiClient,- personIds: string[],- partnerUserId: string | null,-): Promise<number> {- const results = await Promise.allSettled(- personIds.map((id) => updatePersonPartnerUser(client, id, partnerUserId)),- );- return results.filter((result) => result.status === 'rejected').length;-}--// On opportunity.updated when partnerId changes, propagate partnerUser (the assigned-// Partner's workspace member) across the deal so RLS visibility tracks the assignment:-// assign stamps it onto the Opportunity + linked Company + People; unassign clears it,-// keeping the Company/People if the same Partner still has another opportunity on that-// Company. Runs under the app identity, so its writes bypass partner RLS / field locks.-export async function propagatePartnerUser(- client: CoreApiClient,- params: {- opportunityId: string;- before: OpportunityUpdateProperties['before'];- after: OpportunityUpdateProperties['after'];- },-): Promise<Record<string, unknown>> {- const { opportunityId, before, after } = params;- const partnerId = after?.partnerId;-- // ── Unassign: the partner was removed from the opportunity ───────────────────- if (!partnerId) {- // Resolve who/what to revoke from the event's before-image so a retry (after a partial- // failure below) still has these values even though the opportunity's own partnerUser is- // cleared first. The removed partnerId is the source of truth for "is the company still- // in use". Fall back to reading the not-yet-cleared opportunity if before is incomplete.- let removedMemberId = before?.partnerUserId ?? null;- let companyId = before?.companyId ?? null;- const removedPartnerId = before?.partnerId;-- if (!removedMemberId || !companyId) {- const oppResult = await getOpportunityCascadeFields(client, opportunityId);- const opportunity = oppResult.opportunities?.edges?.[0]?.node;- removedMemberId = removedMemberId ?? opportunity?.partnerUserId ?? null;- companyId = companyId ?? opportunity?.companyId ?? null;- }-- await updateOpportunityPartnerUser(client, opportunityId, null);-- if (!removedMemberId || !companyId) {- return { cascaded: true, cleared: true };- }-- // Keep the company (and its people) if the same Partner still has another opportunity on- // it. Decided on partnerId, not the derived partnerUser stamp (which a prior partial- // cascade may have left unset); fall back to the stamp only if the old partnerId is- // unavailable. The just-cleared opportunity no longer matches either filter.- const stillInUse = await findOpportunityStillUsingCompany(client, {- companyId,- removedPartnerId,- removedMemberId,- });- if ((stillInUse.opportunities?.edges?.length ?? 0) > 0) {- return { cascaded: true, cleared: true, companyKept: true };- }-- // Clear the company (only if it belongs to this member) and every person stamped for them.- const companyResult = await getCompanyPartnerUser(client, companyId);- if (companyResult.companies?.edges?.[0]?.node?.partnerUserId === removedMemberId) {- await updateCompanyPartnerUser(client, companyId, null);- }-- const peopleIds = await collectPeopleIds(client, {- companyId: { eq: companyId },- partnerUserId: { eq: removedMemberId },- });- const failed = await setPeoplePartnerUser(client, peopleIds, null);- if (failed > 0) {- throw new Error(- `on-opportunity-partner-assigned: ${failed} person clear(s) failed — retrying`,- );- }- return { cascaded: true, cleared: true, companyCleared: true };- }-- // ── Assign / reassign ────────────────────────────────────────────────────────- const partnerResult = await getPartnerOwner(client, partnerId);- const partnerUserId = partnerResult.partners?.edges?.[0]?.node?.partnerUserId;- if (!partnerUserId) return { cascaded: false, reason: 'partner_has_no_user' };-- await updateOpportunityPartnerUser(client, opportunityId, partnerUserId);-- const companyId = after?.companyId;- if (!companyId) return { cascaded: true, partnerUserId };-- // Don't clobber a company already owned by a DIFFERENT partner member. The single- // partnerUser column on Company/Person models one owner per company, so reassigning it- // here would steal the company (and its contacts) from the other partner and expose their- // data. Stamp only the opportunity in that case and leave the company/people alone.- const companyResult = await getCompanyPartnerUser(client, companyId);- const companyOwner = companyResult.companies?.edges?.[0]?.node?.partnerUserId;- if (companyOwner && companyOwner !== partnerUserId) {- return { cascaded: true, partnerUserId, companyShared: true };- }-- await updateCompanyPartnerUser(client, companyId, partnerUserId);-- const peopleIds = await collectPeopleIds(client, { companyId: { eq: companyId } });- const failed = await setPeoplePartnerUser(client, peopleIds, partnerUserId);- if (failed > 0) {- throw new Error(- `on-opportunity-partner-assigned: ${failed} person stamp(s) failed — retrying`,- );- }-- return { cascaded: true, partnerUserId };-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/services/sync-application-outcomes.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/services/sync-application-outcomes.service.tsdeleted file mode 100644index 46b0c8cb236..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/matching/services/sync-application-outcomes.service.ts+++ /dev/null@@ -1,47 +0,0 @@-import type { CoreApiClient } from 'twenty-client-sdk/core';--import { collectAll } from 'src/modules/shared/utils/paginate.util';-import { listApplicationsByOpportunity } from 'src/modules/opportunity/matching/graphql/queries/list-applications-by-opportunity';-import { updateApplicationState } from 'src/modules/opportunity/matching/graphql/mutations/update-application-state';--// WON/DECLINED mirror of Opportunity.partner: on assign, winner -> WON and every other-// contender -> DECLINED (a loss); on unassign, only WON re-opens to APPLIED. Runs under the-// app identity, bypassing partner locks.-//-// Two states stay out of the mirror. BACKUP is a standing shortlist set before the-// introduction, so it survives the decision and its reversal. DECLINED is terminal because-// an admin can also set it by hand — reopening it here would undo that call.-export async function syncApplicationOutcomes(- client: CoreApiClient,- params: { opportunityId: string; newPartnerId: string | null },-): Promise<Record<string, unknown>> {- const { opportunityId, newPartnerId } = params;-- const applications = await collectAll(async (after) => {- const page = await listApplicationsByOpportunity(- client,- opportunityId,- after,- );- return page.applications;- });-- const setState = (id: string, state: string) =>- updateApplicationState(client, id, state);-- if (newPartnerId) {- for (const node of applications) {- const isWinner = node.partnerId === newPartnerId;- if (!isWinner && node.state === 'BACKUP') continue;- const target = isWinner ? 'WON' : 'DECLINED';- if (node.state !== target) await setState(node.id, target);- }- const winner = applications.find((node) => node.partnerId === newPartnerId);- return { won: winner?.id ?? null };- }-- for (const node of applications) {- if (node.state === 'WON') await setState(node.id, 'APPLIED');- }- return { won: null, cleared: true };-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/navigation-menu-items/all-opportunities.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/navigation-menu-items/all-opportunities.navigation-menu-item.tsdeleted file mode 100644index 02abaddcdf3..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/navigation-menu-items/all-opportunities.navigation-menu-item.ts+++ /dev/null@@ -1,15 +0,0 @@-import { NavigationMenuItemType, defineNavigationMenuItem } from 'twenty-sdk/define';--import {- ALL_OPPORTUNITIES_NAV_UNIVERSAL_IDENTIFIER,- ALL_OPPORTUNITIES_VIEW_UNIVERSAL_IDENTIFIER,-} from 'src/constants/universal-identifiers';--export default defineNavigationMenuItem({- universalIdentifier: ALL_OPPORTUNITIES_NAV_UNIVERSAL_IDENTIFIER,- type: NavigationMenuItemType.VIEW,- icon: 'IconTargetArrow',- position: 5,- folderUniversalIdentifier: '0b2e499a-ae74-45e0-af08-243e19fc56aa',- viewUniversalIdentifier: ALL_OPPORTUNITIES_VIEW_UNIVERSAL_IDENTIFIER,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/navigation-menu-items/briefs-to-match.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/navigation-menu-items/briefs-to-match.navigation-menu-item.tsdeleted file mode 100644index a760b5ab718..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/navigation-menu-items/briefs-to-match.navigation-menu-item.ts+++ /dev/null@@ -1,12 +0,0 @@-import { NavigationMenuItemType, defineNavigationMenuItem } from 'twenty-sdk/define';--import { BRIEFS_TO_MATCH_VIEW_UNIVERSAL_IDENTIFIER } from 'src/modules/opportunity/views/briefs-to-match.view';--export default defineNavigationMenuItem({- universalIdentifier: 'c46f6b03-ee43-4799-9615-270ad28d2848',- type: NavigationMenuItemType.VIEW,- icon: 'IconUserOff',- position: 0,- folderUniversalIdentifier: '0b2e499a-ae74-45e0-af08-243e19fc56aa',- viewUniversalIdentifier: BRIEFS_TO_MATCH_VIEW_UNIVERSAL_IDENTIFIER,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/navigation-menu-items/deals-board.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/navigation-menu-items/deals-board.navigation-menu-item.tsdeleted file mode 100644index 24e7cad9478..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/navigation-menu-items/deals-board.navigation-menu-item.ts+++ /dev/null@@ -1,12 +0,0 @@-import { NavigationMenuItemType, defineNavigationMenuItem } from 'twenty-sdk/define';--import { DEALS_BOARD_VIEW_UNIVERSAL_IDENTIFIER } from 'src/modules/opportunity/views/deals-board.view';--export default defineNavigationMenuItem({- universalIdentifier: '9e4dde3a-46f1-431c-b682-2e1fa8a5622c',- type: NavigationMenuItemType.VIEW,- icon: 'IconLayoutKanban',- position: 1,- folderUniversalIdentifier: '0b2e499a-ae74-45e0-af08-243e19fc56aa',- viewUniversalIdentifier: DEALS_BOARD_VIEW_UNIVERSAL_IDENTIFIER,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/navigation-menu-items/my-deals.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/navigation-menu-items/my-deals.navigation-menu-item.tsdeleted file mode 100644index a38f97f28ff..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/navigation-menu-items/my-deals.navigation-menu-item.ts+++ /dev/null@@ -1,17 +0,0 @@-import {- NavigationMenuItemType,- defineNavigationMenuItem,-} from 'twenty-sdk/define';--import { MY_DEALS_VIEW_UNIVERSAL_IDENTIFIER } from 'src/modules/opportunity/views/my-deals.view';--import { PARTNER_WORKSPACE_FOLDER_UNIVERSAL_IDENTIFIER } from 'src/modules/shared/navigation-menu-items/partner-workspace-folder.navigation-menu-item';--export default defineNavigationMenuItem({- universalIdentifier: '783d4920-6bf6-4dbf-b705-228ffcc9a7d7',- type: NavigationMenuItemType.VIEW,- icon: 'IconHandshake',- position: 3,- folderUniversalIdentifier: PARTNER_WORKSPACE_FOLDER_UNIVERSAL_IDENTIFIER,- viewUniversalIdentifier: MY_DEALS_VIEW_UNIVERSAL_IDENTIFIER,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/navigation-menu-items/open-briefs.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/navigation-menu-items/open-briefs.navigation-menu-item.tsdeleted file mode 100644index 6985cd91f17..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/navigation-menu-items/open-briefs.navigation-menu-item.ts+++ /dev/null@@ -1,17 +0,0 @@-import {- NavigationMenuItemType,- defineNavigationMenuItem,-} from 'twenty-sdk/define';--import { OPEN_BRIEFS_VIEW_UNIVERSAL_IDENTIFIER } from 'src/modules/opportunity/views/open-briefs.view';--import { PARTNER_WORKSPACE_FOLDER_UNIVERSAL_IDENTIFIER } from 'src/modules/shared/navigation-menu-items/partner-workspace-folder.navigation-menu-item';--export default defineNavigationMenuItem({- universalIdentifier: '1392ad4d-3792-4187-a1c5-ee05815dcfde',- type: NavigationMenuItemType.VIEW,- icon: 'IconBuildingStore',- position: 1,- folderUniversalIdentifier: PARTNER_WORKSPACE_FOLDER_UNIVERSAL_IDENTIFIER,- viewUniversalIdentifier: OPEN_BRIEFS_VIEW_UNIVERSAL_IDENTIFIER,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/page-layouts/opportunity.page-layout.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/page-layouts/opportunity.page-layout.test.tsdeleted file mode 100644index 345b83983f2..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/page-layouts/opportunity.page-layout.test.ts+++ /dev/null@@ -1,28 +0,0 @@-import { describe, expect, it } from 'vitest';--import { APPLICATIONS_ON_OPPORTUNITY_FIELD_ID } from 'src/modules/application/objects/application.object';-import { APPLICATIONS_WIDGET_VIEW_UNIVERSAL_IDENTIFIER } from 'src/modules/application/views/applications-widget.view';--import opportunityPageLayout from './opportunity.page-layout';--describe('opportunity.page-layout', () => {- it('scopes the Partners FIELD TABLE to the opportunity widget view', () => {- const partnersWidget = opportunityPageLayout.config.tabs- .flatMap((tab) => tab.widgets ?? [])- .find((widget) => widget.title === 'Partners');-- expect(partnersWidget).toBeDefined();- expect(partnersWidget?.type).toBe('FIELD');- expect(partnersWidget?.configuration).toMatchObject({- configurationType: 'FIELD',- fieldMetadataId: APPLICATIONS_ON_OPPORTUNITY_FIELD_ID,- fieldDisplayMode: 'TABLE',- viewId: APPLICATIONS_WIDGET_VIEW_UNIVERSAL_IDENTIFIER,- });- expect(- 'nestedRelationFieldMetadataId' in (partnersWidget?.configuration ?? {})- ? partnersWidget?.configuration.nestedRelationFieldMetadataId- : undefined,- ).toBeUndefined();- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/page-layouts/opportunity.page-layout.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/page-layouts/opportunity.page-layout.tsdeleted file mode 100644index b1d83fd97b9..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/page-layouts/opportunity.page-layout.ts+++ /dev/null@@ -1,74 +0,0 @@-import {- PageLayoutTabLayoutMode,- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,- definePageLayout,-} from 'twenty-sdk/define';--import { APPLICATIONS_ON_OPPORTUNITY_FIELD_ID } from 'src/modules/application/objects/application.object';-import { APPLICATIONS_WIDGET_VIEW_UNIVERSAL_IDENTIFIER } from 'src/modules/application/views/applications-widget.view';--const OPPORTUNITY_RECORD_PAGE_FIELDS_VIEW_ID =- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.views- .opportunityRecordPageFields.universalIdentifier;--// Opportunity is a standard object, but we override its record page so the Fields widget-// points at the standard record-page view — extended with app view-fields for brief-// fields plus partner + applications relations in the side panel.-export default definePageLayout({- universalIdentifier: 'cf2c66e4-0a4b-48ce-8669-fdf39dd64148',- name: 'Default Opportunity Layout',- type: 'RECORD_PAGE',- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- tabs: [- {- universalIdentifier: '81985727-42a1-469e-b001-fb74dd1f7112',- title: 'Home',- position: 10,- icon: 'IconHome',- layoutMode: PageLayoutTabLayoutMode.VERTICAL_LIST,- widgets: [- {- universalIdentifier: 'dd849e57-42b8-48bc-afd1-c942baab2bf4',- title: 'Fields',- type: 'FIELDS',- configuration: {- configurationType: 'FIELDS',- viewUniversalIdentifier: OPPORTUNITY_RECORD_PAGE_FIELDS_VIEW_ID,- },- },- {- universalIdentifier: '6d634c81-c1a5-4c8d-9e96-c4bd049327f1',- title: 'Partners',- type: 'FIELD',- configuration: {- configurationType: 'FIELD',- // FIELD + TABLE is scoped only when the bound view filters the inverse- // relation with isCurrentRecordSelected. A RECORD_TABLE widget has no- // parent-record filter and lists every Application in the workspace.- // fieldMetadataId and viewId are typed `string`; sync resolves them- // as universal identifiers.- fieldMetadataId: APPLICATIONS_ON_OPPORTUNITY_FIELD_ID,- fieldDisplayMode: 'TABLE',- viewId: APPLICATIONS_WIDGET_VIEW_UNIVERSAL_IDENTIFIER,- },- },- ],- },- {- universalIdentifier: '92e47687-6446-47d0-a3a7-31a012e2c4cd',- title: 'Timeline',- position: 20,- icon: 'IconTimelineEvent',- layoutMode: PageLayoutTabLayoutMode.VERTICAL_LIST,- widgets: [- {- universalIdentifier: '98c9aac6-5a93-4725-84c7-15c5db445ea3',- title: 'Timeline',- type: 'TIMELINE',- configuration: { configurationType: 'TIMELINE' },- },- ],- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/views/all-opportunities.view.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/views/all-opportunities.view.tsdeleted file mode 100644index 84353089d05..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/views/all-opportunities.view.ts+++ /dev/null@@ -1,54 +0,0 @@-import {- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,- ViewType,- defineView,-} from 'twenty-sdk/define';--import { ALL_OPPORTUNITIES_VIEW_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { OPPORTUNITY_IS_LISTED_FIELD_ID } from 'src/modules/opportunity/fields/opportunity-is-listed.field';-import { PARTNER_ON_OPPORTUNITY_FIELD_ID } from 'src/modules/opportunity/fields/partner-on-opportunity.field';--// All opportunities, every stage. Kept last in the Matching folder.-export default defineView({- universalIdentifier: ALL_OPPORTUNITIES_VIEW_UNIVERSAL_IDENTIFIER,- name: 'All Opportunities',- icon: 'IconTargetArrow',- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- type: ViewType.TABLE,- position: 5,- fields: [- {- universalIdentifier: '62844317-546c-4b65-a292-917bf0b5bfce',- fieldMetadataUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.fields.name- .universalIdentifier,- position: 0,- isVisible: true,- size: 200,- },- {- universalIdentifier: '9f72d1ce-7c39-418c-95cb-480d1b176821',- fieldMetadataUniversalIdentifier: PARTNER_ON_OPPORTUNITY_FIELD_ID,- position: 1,- isVisible: true,- size: 200,- },- {- universalIdentifier: 'aa57f807-48aa-4a63-b939-434342ee4bdd',- fieldMetadataUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.fields.amount- .universalIdentifier,- position: 2,- isVisible: true,- size: 140,- },- {- universalIdentifier: 'be3a28db-152a-48be-ae21-91b175905ce4',- fieldMetadataUniversalIdentifier: OPPORTUNITY_IS_LISTED_FIELD_ID,- position: 3,- isVisible: true,- size: 90,- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/views/briefs-to-match.view.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/views/briefs-to-match.view.tsdeleted file mode 100644index 9f71e8184c6..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/views/briefs-to-match.view.ts+++ /dev/null@@ -1,81 +0,0 @@-import {- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,- ViewFilterOperand,- ViewType,- defineView,-} from 'twenty-sdk/define';--import { OPPORTUNITY_IS_LISTED_FIELD_ID } from 'src/modules/opportunity/fields/opportunity-is-listed.field';-import { OPPORTUNITY_NEED_FIELD_ID } from 'src/modules/opportunity/fields/opportunity-need.field';-import { OPPORTUNITY_REQUIREMENTS_FIELD_ID } from 'src/modules/opportunity/fields/opportunity-requirements.field';-import { PARTNER_ON_OPPORTUNITY_FIELD_ID } from 'src/modules/opportunity/fields/partner-on-opportunity.field';--export const BRIEFS_TO_MATCH_VIEW_UNIVERSAL_IDENTIFIER =- 'cdf316f2-b79b-4d3a-8091-44d90b77cb8c';--const OPPORTUNITY_CREATED_AT_FIELD_ID =- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.fields.createdAt- .universalIdentifier;--export default defineView({- universalIdentifier: BRIEFS_TO_MATCH_VIEW_UNIVERSAL_IDENTIFIER,- name: 'Briefs to Match',- icon: 'IconUserOff',- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- type: ViewType.TABLE,- position: 0,- fields: [- {- universalIdentifier: '1a469b6f-0ee9-41bb-9b4e-4fa917ef41aa',- fieldMetadataUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.fields.name- .universalIdentifier,- position: 0,- isVisible: true,- size: 200,- },- {- universalIdentifier: '006b23b2-0591-4b7c-bec4-f39ef466f76b',- fieldMetadataUniversalIdentifier: OPPORTUNITY_NEED_FIELD_ID,- position: 1,- isVisible: true,- size: 280,- },- {- universalIdentifier: '94c584d6-382f-415e-b021-127339612dd3',- fieldMetadataUniversalIdentifier: OPPORTUNITY_REQUIREMENTS_FIELD_ID,- position: 2,- isVisible: true,- size: 280,- },- {- universalIdentifier: 'd11e3ff9-ef1a-4be6-9970-67a565712433',- fieldMetadataUniversalIdentifier: OPPORTUNITY_CREATED_AT_FIELD_ID,- position: 3,- isVisible: true,- size: 180,- },- {- universalIdentifier: 'b36cb21c-f5d0-4291-bde4-867efafdd689',- fieldMetadataUniversalIdentifier: PARTNER_ON_OPPORTUNITY_FIELD_ID,- position: 4,- isVisible: true,- },- {- universalIdentifier: '91c1c03c-049d-4abb-bc14-b78662117f7c',- fieldMetadataUniversalIdentifier: OPPORTUNITY_IS_LISTED_FIELD_ID,- position: 5,- isVisible: true,- size: 90,- },- ],- filters: [- {- universalIdentifier: '0030e8ec-b20a-41ad-a684-6e7dc42dc4c3',- fieldMetadataUniversalIdentifier: PARTNER_ON_OPPORTUNITY_FIELD_ID,- operand: ViewFilterOperand.IS_EMPTY,- value: '',- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/views/deals-board.view.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/views/deals-board.view.tsdeleted file mode 100644index 25ab42c146a..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/views/deals-board.view.ts+++ /dev/null@@ -1,100 +0,0 @@-import {- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,- ViewType,- defineView,-} from 'twenty-sdk/define';--import { OPPORTUNITY_STAGE_FIELD_UNIVERSAL_IDENTIFIER } from 'src/modules/opportunity/constants/opportunity-stage-options';-import { OPPORTUNITY_IS_LISTED_FIELD_ID } from 'src/modules/opportunity/fields/opportunity-is-listed.field';-import { PARTNER_ON_OPPORTUNITY_FIELD_ID } from 'src/modules/opportunity/fields/partner-on-opportunity.field';-import { APPLICATIONS_ON_OPPORTUNITY_FIELD_ID } from 'src/modules/application/objects/application.object';--export const DEALS_BOARD_VIEW_UNIVERSAL_IDENTIFIER =- '39c3ffbc-e91a-46b9-a9c6-4d186d5b3dcf';--const OPPORTUNITY_STAGE_FIELD_ID = OPPORTUNITY_STAGE_FIELD_UNIVERSAL_IDENTIFIER;--export default defineView({- universalIdentifier: DEALS_BOARD_VIEW_UNIVERSAL_IDENTIFIER,- name: 'Deals',- icon: 'IconLayoutKanban',- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- type: ViewType.KANBAN,- position: 1,- mainGroupByFieldMetadataUniversalIdentifier: OPPORTUNITY_STAGE_FIELD_ID,- groups: [- {- universalIdentifier: '3d9ee938-572f-4b46-a78d-25bd971dab48',- fieldValue: 'NEW',- position: 0,- isVisible: true,- },- {- universalIdentifier: '2253c89d-385e-4207-8e46-b8afb7544d07',- fieldValue: 'SCREENING',- position: 1,- isVisible: true,- },- {- universalIdentifier: 'becb8cf2-56b2-4f1d-8da4-3856c48a6ea4',- fieldValue: 'MEETING',- position: 2,- isVisible: true,- },- {- universalIdentifier: '918de88b-3eae-4f6e-9f75-3341f4567ddf',- fieldValue: 'PROPOSAL',- position: 3,- isVisible: true,- },- {- universalIdentifier: '754dc132-94a3-464b-b524-6ae6b4a50e78',- fieldValue: 'CUSTOMER',- position: 4,- isVisible: true,- },- ],- fields: [- {- universalIdentifier: '98c37e50-cece-4b5c-b83d-225f644a8151',- fieldMetadataUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.fields.name- .universalIdentifier,- position: 0,- isVisible: true,- },- {- universalIdentifier: '94640b9c-020a-4535-affa-e0b3def4cc2f',- fieldMetadataUniversalIdentifier: PARTNER_ON_OPPORTUNITY_FIELD_ID,- position: 1,- isVisible: true,- },- {- universalIdentifier: '5797b801-ce0d-4098-ac9f-f1ad972ebb13',- fieldMetadataUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.fields.amount- .universalIdentifier,- position: 2,- isVisible: false,- },- {- universalIdentifier: '65ddf983-822d-4fd7-97a3-6de34527b8de',- fieldMetadataUniversalIdentifier: OPPORTUNITY_STAGE_FIELD_ID,- position: 3,- isVisible: false,- },- {- universalIdentifier: '48d052c0-b00f-40e7-81fa-d30d01a5e784',- fieldMetadataUniversalIdentifier: APPLICATIONS_ON_OPPORTUNITY_FIELD_ID,- position: 4,- isVisible: true,- },- {- universalIdentifier: '3ec96824-b543-4039-acb4-8e0aff422c90',- fieldMetadataUniversalIdentifier: OPPORTUNITY_IS_LISTED_FIELD_ID,- position: 5,- isVisible: true,- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/views/my-deals.view.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/views/my-deals.view.tsdeleted file mode 100644index 0708752514e..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/views/my-deals.view.ts+++ /dev/null@@ -1,42 +0,0 @@-import {- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,- ViewFilterOperand,- ViewType,- defineView,-} from 'twenty-sdk/define';--import { OPPORTUNITY_STAGE_FIELD_UNIVERSAL_IDENTIFIER } from 'src/modules/opportunity/constants/opportunity-stage-options';-import { PARTNER_ON_OPPORTUNITY_FIELD_ID } from 'src/modules/opportunity/fields/partner-on-opportunity.field';--export const MY_DEALS_VIEW_UNIVERSAL_IDENTIFIER =- '09c9b985-6dce-43ec-a6b3-5e878e1aec74';--const OPPORTUNITY_NAME_FIELD_ID =- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.fields.name- .universalIdentifier;-const OPPORTUNITY_AMOUNT_FIELD_ID = '20202020-583e-4642-8533-db761d5fa82f';--// Partner-facing list of opportunities assigned to the partner (partner relation set).-// RLS still allows listed briefs without a partner; this view scopes to assigned deals only.-export default defineView({- universalIdentifier: MY_DEALS_VIEW_UNIVERSAL_IDENTIFIER,- name: 'My Deals',- icon: 'IconHandshake',- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- type: ViewType.TABLE,- position: 3,- fields: [- { universalIdentifier: '5c936e54-687a-4bf4-a995-1d90c71b337e', fieldMetadataUniversalIdentifier: OPPORTUNITY_NAME_FIELD_ID, position: 0, isVisible: true, size: 200 },- { universalIdentifier: 'c7d850e1-5d95-4097-93a3-02142654a470', fieldMetadataUniversalIdentifier: OPPORTUNITY_STAGE_FIELD_UNIVERSAL_IDENTIFIER, position: 1, isVisible: true, size: 160 },- { universalIdentifier: 'fee39824-5859-433e-8f08-c4b9edecca0a', fieldMetadataUniversalIdentifier: OPPORTUNITY_AMOUNT_FIELD_ID, position: 2, isVisible: true, size: 140 },- ],- filters: [- {- universalIdentifier: '7e2f4a91-3c8d-4b5e-9f01-2a3b4c5d6e7f',- fieldMetadataUniversalIdentifier: PARTNER_ON_OPPORTUNITY_FIELD_ID,- operand: ViewFilterOperand.IS_NOT_EMPTY,- value: '',- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/views/open-briefs.view.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/views/open-briefs.view.tsdeleted file mode 100644index 6d9b1ab3d68..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/opportunity/views/open-briefs.view.ts+++ /dev/null@@ -1,46 +0,0 @@-import {- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,- ViewFilterOperand,- ViewType,- defineView,-} from 'twenty-sdk/define';--import { OPPORTUNITY_IS_LISTED_FIELD_ID } from 'src/modules/opportunity/fields/opportunity-is-listed.field';-import { OPPORTUNITY_NEED_FIELD_ID } from 'src/modules/opportunity/fields/opportunity-need.field';-import { OPPORTUNITY_REQUIREMENTS_FIELD_ID } from 'src/modules/opportunity/fields/opportunity-requirements.field';--export const OPEN_BRIEFS_VIEW_UNIVERSAL_IDENTIFIER =- 'e1f9629d-c490-450e-b3c5-c944aca292eb';--// Marketplace view: all Opportunities that ops have listed for partner browsing.-// Partners see this list and apply via the "Apply" workflow action (B4).-export default defineView({- universalIdentifier: OPEN_BRIEFS_VIEW_UNIVERSAL_IDENTIFIER,- name: 'Open Briefs',- icon: 'IconBuildingStore',- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- type: ViewType.TABLE,- position: 5,- fields: [- // Name- { universalIdentifier: '74595afa-c9c4-45b6-b362-803fb5574fbd', fieldMetadataUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.fields.name.universalIdentifier, position: 0, isVisible: true, size: 200 },- // Need (B1 brief field)- { universalIdentifier: 'a24d52c4-9d0b-4145-a8fb-a4e21e002f58', fieldMetadataUniversalIdentifier: OPPORTUNITY_NEED_FIELD_ID, position: 1, isVisible: true, size: 280 },- // Requirements (B1 brief field)- { universalIdentifier: '8cd4738b-2975-45e0-959b-8e830a8bf3dc', fieldMetadataUniversalIdentifier: OPPORTUNITY_REQUIREMENTS_FIELD_ID, position: 2, isVisible: true, size: 280 },- // Listed flag — visible so ops can verify the filter at a glance- { universalIdentifier: '9720b93b-be90-40ee-89b2-42c04c8e09da', fieldMetadataUniversalIdentifier: OPPORTUNITY_IS_LISTED_FIELD_ID, position: 3, isVisible: true, size: 90 },- ],- filters: [- // Show only opportunities marked as listed (isListed = true).- // BOOLEAN fields use ViewFilterOperand.IS with the string value 'true' —- // the same representation the Twenty frontend stores and reads for boolean IS filters.- {- universalIdentifier: '642be3a1-c0f8-4197-9628-a2d3e25ed624',- fieldMetadataUniversalIdentifier: OPPORTUNITY_IS_LISTED_FIELD_ID,- operand: ViewFilterOperand.IS,- value: 'true',- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/__tests__/derive-deployment-expertise.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/__tests__/derive-deployment-expertise.test.tsdeleted file mode 100644index b326e8e3bd4..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/__tests__/derive-deployment-expertise.test.ts+++ /dev/null@@ -1,16 +0,0 @@-import { describe, expect, it } from 'vitest';--import { deriveDeploymentExpertise } from '../utils/derive-deployment-expertise';--describe('deriveDeploymentExpertise', () => {- it('defaults to CLOUD for everyone', () => {- expect(deriveDeploymentExpertise(undefined)).toEqual(['CLOUD']);- expect(deriveDeploymentExpertise([])).toEqual(['CLOUD']);- expect(deriveDeploymentExpertise(['ADVISORY', 'SUPPORT'])).toEqual(['CLOUD']);- });-- it('adds SELF_HOST when the partner covers HOSTING', () => {- expect(deriveDeploymentExpertise(['HOSTING'])).toEqual(['CLOUD', 'SELF_HOST']);- expect(deriveDeploymentExpertise(['DEVELOPMENT', 'HOSTING'])).toEqual(['CLOUD', 'SELF_HOST']);- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/__tests__/derive-region.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/__tests__/derive-region.test.tsdeleted file mode 100644index 2923f6362f8..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/__tests__/derive-region.test.ts+++ /dev/null@@ -1,29 +0,0 @@-import { describe, expect, it } from 'vitest';--import { PARTNER_COUNTRY_VALUES } from 'src/modules/partner/constants/partner-option-values.constant';-import { COUNTRY_TO_REGION, deriveRegion } from '../utils/derive-region';--describe('deriveRegion', () => {- it('maps representative countries to the right region', () => {- expect(deriveRegion('FRANCE')).toBe('EUROPE');- expect(deriveRegion('UNITED_STATES')).toBe('US');- expect(deriveRegion('CANADA')).toBe('US');- expect(deriveRegion('BRAZIL')).toBe('LATAM');- expect(deriveRegion('SAUDI_ARABIA')).toBe('MENA');- expect(deriveRegion('JAPAN')).toBe('APAC');- expect(deriveRegion('NIGERIA')).toBe('AFRICA');- });-- it('returns null for missing / unknown country', () => {- expect(deriveRegion(undefined)).toBeNull();- expect(deriveRegion(null)).toBeNull();- expect(deriveRegion('ATLANTIS')).toBeNull();- });-- it('covers every accepted country exactly once', () => {- for (const country of PARTNER_COUNTRY_VALUES) {- expect(COUNTRY_TO_REGION[country], `missing region for ${country}`).toBeDefined();- }- expect(Object.keys(COUNTRY_TO_REGION).length).toBe(PARTNER_COUNTRY_VALUES.length);- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/__tests__/map-tally-experience-csv-row.mapper.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/__tests__/map-tally-experience-csv-row.mapper.test.tsdeleted file mode 100644index e969689d41f..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/__tests__/map-tally-experience-csv-row.mapper.test.ts+++ /dev/null@@ -1,176 +0,0 @@-import { describe, expect, it } from 'vitest';--import {- mapMilestoneLabels,- mapTallyExperienceCsvRow,- TWENTY_EXPERIENCE_NOTES_MIN_LENGTH,-} from '../mappers/map-tally-experience-csv-row.mapper';--const VALID_PARTNER_ID = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890';--const longNotes = (suffix = ''): string => {- const base =- 'Built a Twenty workspace for Acme with custom objects, roles, and a sales pipeline. ';- let notes = '';- while (notes.length < TWENTY_EXPERIENCE_NOTES_MIN_LENGTH) {- notes += base;- }- return `${notes}${suffix}`;-};--const validRow = (- overrides: Record<string, string | undefined> = {},-): Record<string, string | undefined> => ({- partnerId: VALID_PARTNER_ID,- "What you've built in Twenty": 'Custom apps, Workflows',- 'Tell us about the implementation': longNotes(),- 'Proof URL': 'https://www.loom.com/share/abc123',- Email: '[email protected]',- ...overrides,-});--describe('mapMilestoneLabels', () => {- it('maps the four canonical Tally labels to enums', () => {- expect(- mapMilestoneLabels(- 'Custom apps, Data models; Workflows\nFront components',- ),- ).toEqual({- ok: true,- milestones: [- 'CUSTOM_APPS',- 'DATA_MODELS',- 'WORKFLOWS',- 'FRONT_COMPONENTS',- ],- });- });-- it('dedupes repeated labels', () => {- expect(mapMilestoneLabels('Workflows, Workflows')).toEqual({- ok: true,- milestones: ['WORKFLOWS'],- });- });-- it('rejects unknown labels without guessing', () => {- expect(mapMilestoneLabels('Custom apps, Integrations')).toEqual({- ok: false,- reason: 'unknown_milestone_label:Integrations',- });- });-- it('rejects empty milestone input', () => {- expect(mapMilestoneLabels(' ')).toEqual({- ok: false,- reason: 'missing_milestones',- });- });-});--describe('mapTallyExperienceCsvRow', () => {- it('maps a valid Tally row to an update intent by partnerId', () => {- const notes = longNotes();- const result = mapTallyExperienceCsvRow(- validRow({ 'Tell us about the implementation': notes }),- );-- expect(result).toEqual({- ok: true,- intent: {- partnerId: VALID_PARTNER_ID,- twentyExperience: ['CUSTOM_APPS', 'WORKFLOWS'],- twentyExperienceNotes: notes.trim(),- twentyExperienceProofLink: 'https://www.loom.com/share/abc123',- },- });- });-- it('never falls back to email when partnerId is missing', () => {- const result = mapTallyExperienceCsvRow(- validRow({ partnerId: undefined, Email: '[email protected]' }),- );-- expect(result).toEqual({ ok: false, reason: 'missing_partner_id' });- });-- it('rejects invalid partnerId format', () => {- const result = mapTallyExperienceCsvRow(- validRow({ partnerId: 'not-a-uuid' }),- );-- expect(result).toEqual({- ok: false,- reason: 'invalid_partner_id',- partnerId: 'not-a-uuid',- });- });-- it('rejects narrative shorter than 200 characters', () => {- const shortNotes = 'Too short for a real implementation narrative.';- const result = mapTallyExperienceCsvRow(- validRow({ 'Tell us about the implementation': shortNotes }),- );-- expect(result).toEqual({- ok: false,- reason: `notes_too_short:${shortNotes.length}`,- partnerId: VALID_PARTNER_ID,- });- });-- it('rejects missing proof URL', () => {- const result = mapTallyExperienceCsvRow(- validRow({ 'Proof URL': undefined }),- );-- expect(result).toEqual({- ok: false,- reason: 'missing_proof_url',- partnerId: VALID_PARTNER_ID,- });- });-- it('rejects non-http(s) proof URLs', () => {- const result = mapTallyExperienceCsvRow(- validRow({ 'Proof URL': 'ftp://files.example.com/case-study' }),- );-- expect(result).toEqual({- ok: false,- reason: 'invalid_proof_url',- partnerId: VALID_PARTNER_ID,- });- });-- it('rejects unknown milestone labels on the row', () => {- const result = mapTallyExperienceCsvRow(- validRow({- "What you've built in Twenty": 'Custom apps, Self-hosting',- }),- );-- expect(result).toEqual({- ok: false,- reason: 'unknown_milestone_label:Self-hosting',- partnerId: VALID_PARTNER_ID,- });- });-- it('resolves Tally-style headers with helper copy via partial match', () => {- const result = mapTallyExperienceCsvRow({- partnerId: VALID_PARTNER_ID,- "What you've built in Twenty (select every area)": 'Data models',- 'Tell us about the implementation — min 200 chars': longNotes('x'),- 'Proof URL (Loom ok)': 'http://example.com/proof',- });-- expect(result.ok).toBe(true);- if (result.ok) {- expect(result.intent.twentyExperience).toEqual(['DATA_MODELS']);- expect(result.intent.twentyExperienceProofLink).toBe(- 'http://example.com/proof',- );- }- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/__tests__/on-partner-application-created.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/__tests__/on-partner-application-created.test.tsdeleted file mode 100644index 538446d2f58..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/__tests__/on-partner-application-created.test.ts+++ /dev/null@@ -1,152 +0,0 @@-import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';--// Mock the codegen client BEFORE importing the handler. vi.hoisted lets the-// factory reference the mock fn safely despite hoisting.-const { queryMock } = vi.hoisted(() => ({ queryMock: vi.fn() }));-vi.mock('twenty-client-sdk/core', () => ({- CoreApiClient: vi.fn(function () {- return { query: queryMock };- }),-}));--import { buildApplicationEmbed } from '../mappers/application-embed.mapper';-import { handler } from '../on-partner-application-created.logic-function';--const PARTNER_ID = '11111111-1111-1111-1111-111111111111';--const partnerQueryResult = {- partners: {- edges: [- {- node: {- id: PARTNER_ID,- name: 'Analytical Engines Ltd',- country: 'FRANCE',- partnerScope: ['ADVISORY', 'SOLUTIONING'],- skills: ['Onboarding', 'Migration'],- languagesSpoken: ['ENGLISH', 'FRENCH'],- persons: {- edges: [- {- node: {- name: { firstName: 'Ada', lastName: 'Lovelace' },- },- },- ],- },- },- },- ],- },-};--// The database event 'after' hydrates the actor composite as a NESTED object-// (after.createdBy.source), confirmed from the live partner.created payload.-const createdEvent = (source: string) =>- ({ properties: { after: { id: PARTNER_ID, createdBy: { source } } } }) as never;--let fetchMock: ReturnType<typeof vi.fn>;--beforeEach(() => {- queryMock.mockReset();- queryMock.mockResolvedValue(partnerQueryResult);- fetchMock = vi.fn().mockResolvedValue({ ok: true, status: 204, text: async () => '' });- vi.stubGlobal('fetch', fetchMock);- process.env.DISCORD_WEBHOOK_URL = 'https://discord.test/webhook';- process.env.PARTNER_APP_FRONTEND_URL = 'https://partners.twenty.com';-});--afterEach(() => {- vi.unstubAllGlobals();- delete process.env.DISCORD_WEBHOOK_URL;- delete process.env.PARTNER_APP_FRONTEND_URL;-});--describe('buildApplicationEmbed', () => {- it('builds a rich embed with a deep link, includes Languages, omits empty fields, and never sends Email or Hourly rate', () => {- const embed = buildApplicationEmbed(- {- id: PARTNER_ID,- name: 'Acme',- country: null, // omitted- partnerScope: [], // omitted- skills: ['Migration'],- languagesSpoken: ['ENGLISH', 'FRENCH'],- applicant: { firstName: 'Ada', lastName: 'Lovelace' },- },- 'https://partners.twenty.com',- );-- expect(embed.title).toBe('New partner application');- expect(embed.url).toBe(`https://partners.twenty.com/object/partner/${PARTNER_ID}`);-- const fieldNames = (embed.fields as Array<{ name: string }>)- .map((f) => f.name)- .filter((n) => n !== ''); // drop layout spacers- // country (null) and partnerScope ([]) omitted; Email and Hourly rate never sent.- expect(fieldNames).toEqual(['Applicant', 'Company', 'Languages', 'Skills']);- expect(fieldNames).not.toContain('Email');- expect(fieldNames).not.toContain('Hourly rate');- });-- it('omits the url when no frontend URL is configured', () => {- const embed = buildApplicationEmbed({ id: PARTNER_ID, name: 'Acme' }, undefined);- expect(embed.url).toBeUndefined();- });-});--describe('on-partner-application-created handler', () => {- it('posts a Discord embed when an APPLICATION-sourced partner is created', async () => {- const result = await handler(createdEvent('APPLICATION'));-- expect(queryMock).toHaveBeenCalledTimes(1);- expect(fetchMock).toHaveBeenCalledTimes(1);-- const [url, init] = fetchMock.mock.calls[0];- expect(url).toBe('https://discord.test/webhook');-- const body = JSON.parse((init as { body: string }).body);- expect(body.embeds[0].title).toBe('New partner application');- expect(body.embeds[0].url).toBe(`https://partners.twenty.com/object/partner/${PARTNER_ID}`);- const fieldNames = body.embeds[0].fields- .map((f: { name: string }) => f.name)- .filter((n: string) => n !== ''); // drop layout spacers- expect(fieldNames).toEqual(['Applicant', 'Company', 'Country', 'Languages', 'Partner scope', 'Skills']);- expect(fieldNames).not.toContain('Email');- expect(fieldNames).not.toContain('Hourly rate');-- expect(result).toEqual({ notified: true });- });-- it('does not post for API-sourced creation (seed/import)', async () => {- const result = await handler(createdEvent('API'));- expect(queryMock).not.toHaveBeenCalled();- expect(fetchMock).not.toHaveBeenCalled();- expect(result).toEqual({});- });-- it('does not post for MANUAL-sourced creation', async () => {- await handler(createdEvent('MANUAL'));- expect(fetchMock).not.toHaveBeenCalled();- });-- it('does not post when DISCORD_WEBHOOK_URL is unset', async () => {- delete process.env.DISCORD_WEBHOOK_URL;- const result = await handler(createdEvent('APPLICATION'));- expect(fetchMock).not.toHaveBeenCalled();- expect(result).toEqual({});- });-- it('never throws when the Discord POST fails', async () => {- fetchMock.mockRejectedValue(new Error('discord down'));- const result = await handler(createdEvent('APPLICATION'));- expect(result).toEqual({ notified: false });- });-- it('reports notified: false on a non-2xx Discord response', async () => {- // fetch resolves on HTTP errors; the handler must not report these as delivered.- fetchMock.mockResolvedValue({ ok: false, status: 404, text: async () => 'Not Found' });- const result = await handler(createdEvent('APPLICATION'));- expect(result).toEqual({ notified: false });- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/__tests__/submit-partner-application.integration-test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/__tests__/submit-partner-application.integration-test.tsdeleted file mode 100644index e50692d672b..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/__tests__/submit-partner-application.integration-test.ts+++ /dev/null@@ -1,429 +0,0 @@-import { CoreApiClient } from 'twenty-client-sdk/core';-import { afterEach, beforeAll, describe, expect, it } from 'vitest';--import {- handler,- type SubmitPartnerApplicationInput,- type SubmitPartnerApplicationResult,-} from '../submit-partner-application.logic-function';--const TEST_SECRET = 'test-secret-abc123';-process.env.PARTNER_APPLICATION_SECRET = TEST_SECRET;--const client = new CoreApiClient();--const baseInput = (- overrides: Partial<SubmitPartnerApplicationInput> = {},-): SubmitPartnerApplicationInput => ({- firstName: 'Ada',- lastName: 'Lovelace',- email: '[email protected]',- companyName: 'Analytical Engines Ltd',- ...overrides,-});--const authedEvent = (input: SubmitPartnerApplicationInput) => ({- body: input,- headers: { 'x-application-secret': TEST_SECRET },-});--const createdPartnerIds: string[] = [];-const createdPersonIds: string[] = [];-const createdCompanyIds: string[] = [];--async function cleanup(): Promise<void> {- for (const id of createdPartnerIds.splice(0)) {- await client- .mutation({ destroyPartner: { __args: { id }, id: true } })- .catch(() => {});- }- for (const id of createdPersonIds.splice(0)) {- await client- .mutation({ destroyPerson: { __args: { id }, id: true } })- .catch(() => {});- }- for (const id of createdCompanyIds.splice(0)) {- await client- .mutation({ destroyCompany: { __args: { id }, id: true } })- .catch(() => {});- }-}--async function trackCreated(- result: SubmitPartnerApplicationResult,-): Promise<void> {- if (!result.ok) return;- createdPartnerIds.push(result.partnerId);- const fetched = await client.query({- partner: {- __args: { filter: { id: { eq: result.partnerId } } },- id: true,- company: { id: true },- persons: { edges: { node: { id: true } } },- },- });- const node = fetched.partner;- if (!node) return;- if (node.company) createdCompanyIds.push(node.company.id);- for (const edge of node.persons?.edges ?? [])- createdPersonIds.push(edge.node.id);-}--beforeAll(async () => {- await client.query({- partners: { __args: { first: 1 }, edges: { node: { id: true } } },- });-});--afterEach(async () => {- await cleanup();-});--describe('submit-partner-application handler — auth', () => {- it('returns unauthorized when the x-application-secret header is missing', async () => {- const result = await handler({- body: baseInput({ email: '[email protected]' }),- headers: {},- });- expect(result.ok).toBe(false);- if (result.ok) return;- expect(result.reason).toBe('unauthorized');- });-- it('returns unauthorized when the x-application-secret header is wrong', async () => {- const result = await handler({- body: baseInput({ email: '[email protected]' }),- headers: { 'x-application-secret': 'nope' },- });- expect(result.ok).toBe(false);- if (result.ok) return;- expect(result.reason).toBe('unauthorized');- });-});--describe('submit-partner-application handler — upsert', () => {- it('creates Company, Person, and Partner on first submission and returns created: true', async () => {- const result = await handler(- authedEvent(- baseInput({- email: '[email protected]',- companyName: 'YC Agency',- }),- ),- );- await trackCreated(result);-- expect(result.ok).toBe(true);- if (!result.ok) return;- expect(result.created).toBe(true);- expect(result.partnerId).toMatch(/^[0-9a-f-]{36}$/);-- const partner = await client.query({- partner: {- __args: { filter: { id: { eq: result.partnerId } } },- id: true,- name: true,- slug: true,- validationStage: true,- superPartner: true,- partnerTier: true,- company: { id: true, name: true },- persons: {- edges: {- node: {- id: true,- name: { firstName: true, lastName: true },- emails: { primaryEmail: true },- },- },- },- },- });- const node = partner.partner;- expect(node?.name).toBe('YC Agency');- expect(node?.slug).toBe('yc-agency');- expect(node?.validationStage).toBe('APPLICATION');- expect(node?.superPartner).toBe(false);- expect(node?.partnerTier).toBe('NEW');- expect(node?.company?.name).toBe('YC Agency');- expect(node?.persons?.edges).toHaveLength(1);- const personNode = node?.persons?.edges?.[0]?.node;- expect(personNode?.emails?.primaryEmail).toBe('[email protected]');- expect(personNode?.name?.firstName).toBe('Ada');- expect(personNode?.name?.lastName).toBe('Lovelace');- });-- it('reuses an existing company for a protocol/www/case domain variant instead of failing on the unique domain index', async () => {- // A company with this domain already exists (e.g. seeded by the TFT import,- // with no Partner/Person attached). Company.domainName is uniquely indexed,- // so a blind createCompany would throw "duplicate entry" and the whole- // submission would 502. The applicant submits a www/case/trailing-slash- // variant of the same real domain — the handler must still reuse the- // existing company via normalized-host matching.- const storedDomain = 'https://reuse-domain-case.example.com';- const submittedVariant = 'https://www.Reuse-Domain-Case.example.com/';- const created = await client.mutation({- createCompany: {- __args: {- data: {- name: 'Pre-existing Co',- domainName: { primaryLinkUrl: storedDomain },- },- },- id: true,- },- });- const existingCompanyId = created.createCompany?.id;- expect(existingCompanyId).toBeDefined();- if (existingCompanyId === undefined) return;- createdCompanyIds.push(existingCompanyId);-- const result = await handler(- authedEvent(- baseInput({- email: '[email protected]',- companyName: 'Applicant Co',- domainName: submittedVariant,- }),- ),- );- await trackCreated(result);-- expect(result.ok).toBe(true);- if (!result.ok) return;- expect(result.created).toBe(true);-- const partner = await client.query({- partner: {- __args: { filter: { id: { eq: result.partnerId } } },- company: { id: true, name: true },- },- });- // Reused the existing company (same id) and left its name untouched.- expect(partner.partner?.company?.id).toBe(existingCompanyId);- expect(partner.partner?.company?.name).toBe('Pre-existing Co');- });-- it('returns created: false and updates fields on resubmission for the same email', async () => {- const first = await handler(- authedEvent(- baseInput({ email: '[email protected]', city: 'London' }),- ),- );- await trackCreated(first);- expect(first.ok).toBe(true);- if (!first.ok) return;-- const second = await handler(- authedEvent(- baseInput({- email: '[email protected]',- city: 'Paris',- partnerScope: ['ADVISORY', 'SOLUTIONING'],- typeOfTeam: 'SOLO',- hourlyRate: 175,- }),- ),- );- expect(second.ok).toBe(true);- if (!second.ok) return;- expect(second.created).toBe(false);- expect(second.partnerId).toBe(first.partnerId);-- const partner = await client.query({- partner: {- __args: { filter: { id: { eq: second.partnerId } } },- id: true,- city: true,- partnerScope: true,- typeOfTeam: true,- hourlyRate: { amountMicros: true, currencyCode: true },- },- });- const node = partner.partner;- expect(node?.city).toBe('Paris');- expect(node?.partnerScope).toEqual(['ADVISORY', 'SOLUTIONING']);- expect(node?.typeOfTeam).toBe('SOLO');- expect(node?.hourlyRate).toEqual({- amountMicros: 175_000_000,- currencyCode: 'USD',- });- });-- it('preserves staff-owned columns (validationStage, superPartner) on resubmission', async () => {- const first = await handler(- authedEvent(baseInput({ email: '[email protected]' })),- );- await trackCreated(first);- expect(first.ok).toBe(true);- if (!first.ok) return;-- await client.mutation({- updatePartner: {- __args: {- id: first.partnerId,- data: { validationStage: 'VALIDATED', superPartner: true },- },- id: true,- },- });-- const second = await handler(- authedEvent(- baseInput({ email: '[email protected]', city: 'Berlin' }),- ),- );- expect(second.ok).toBe(true);- if (!second.ok) return;-- const partner = await client.query({- partner: {- __args: { filter: { id: { eq: second.partnerId } } },- validationStage: true,- superPartner: true,- city: true,- },- });- const node = partner.partner;- expect(node?.validationStage).toBe('VALIDATED');- expect(node?.superPartner).toBe(true);- expect(node?.city).toBe('Berlin');- });-- it('accepts new category values and stores applicationNotes', async () => {- const result = await handler(- authedEvent(- baseInput({- email: '[email protected]',- partnerScope: ['ADVISORY', 'SOLUTIONING'],- applicationNotes: 'Workspace https://app.twenty.com/ws · refs: Acme',- }),- ),- );- expect(result.ok).toBe(true);- if (!result.ok) return;- await trackCreated(result);-- const fetched = await client.query({- partner: {- __args: { filter: { id: { eq: result.partnerId } } },- partnerScope: true,- applicationNotes: true,- },- });- const node = fetched.partner;- expect(node?.partnerScope).toEqual(- expect.arrayContaining(['ADVISORY', 'SOLUTIONING']),- );- expect(node?.applicationNotes).toContain('Acme');- });-- it('rejects a legacy scope value as invalid_input', async () => {- const result = await handler(- authedEvent(- baseInput({ email: '[email protected]', partnerScope: ['APPS'] }),- ),- );- expect(result.ok).toBe(false);- if (result.ok) return;- expect(result.reason).toBe('invalid_input');- });-- it('persists twenty experience fields on create', async () => {- const twentyExperienceNotes =- 'Implemented Twenty for a logistics client: custom apps for shipment intake, ' +- 'data models for carriers and lanes, workflows for exception routing, and a front ' +- 'component for the ops board with daily exception triage.';- const result = await handler(- authedEvent(- baseInput({- email: '[email protected]',- companyName: 'Experience Create Co',- twentyExperience: ['CUSTOM_APPS', 'DATA_MODELS', 'WORKFLOWS'],- twentyExperienceNotes,- twentyExperienceProofLink:- 'https://www.loom.com/share/experience-create',- }),- ),- );- expect(result.ok).toBe(true);- if (!result.ok) return;- await trackCreated(result);-- const fetched = await client.query({- partner: {- __args: { filter: { id: { eq: result.partnerId } } },- twentyExperience: true,- twentyExperienceNotes: true,- twentyExperienceProofLink: { primaryLinkUrl: true },- },- });- const node = fetched.partner;- expect(node?.twentyExperience).toEqual(- expect.arrayContaining(['CUSTOM_APPS', 'DATA_MODELS', 'WORKFLOWS']),- );- expect(node?.twentyExperienceNotes).toBe(twentyExperienceNotes);- expect(node?.twentyExperienceProofLink?.primaryLinkUrl).toBe(- 'https://www.loom.com/share/experience-create',- );- });-- it('persists twenty experience fields on update for the same email', async () => {- const first = await handler(- authedEvent(baseInput({ email: '[email protected]' })),- );- await trackCreated(first);- expect(first.ok).toBe(true);- if (!first.ok) return;-- const twentyExperienceNotes =- 'Updated narrative after resubmit: rebuilt the client data model, added workflows ' +- 'for renewals, and linked a Loom walkthrough of the front components we shipped for ' +- 'broker and ops roles across two workspaces.';- const second = await handler(- authedEvent(- baseInput({- email: '[email protected]',- twentyExperience: ['FRONT_COMPONENTS', 'WORKFLOWS'],- twentyExperienceNotes,- twentyExperienceProofLink:- 'https://github.com/example/twenty-case-study',- }),- ),- );- expect(second.ok).toBe(true);- if (!second.ok) return;- expect(second.created).toBe(false);-- const fetched = await client.query({- partner: {- __args: { filter: { id: { eq: second.partnerId } } },- twentyExperience: true,- twentyExperienceNotes: true,- twentyExperienceProofLink: { primaryLinkUrl: true },- },- });- const node = fetched.partner;- expect(node?.twentyExperience).toEqual(- expect.arrayContaining(['FRONT_COMPONENTS', 'WORKFLOWS']),- );- expect(node?.twentyExperienceNotes).toBe(twentyExperienceNotes);- expect(node?.twentyExperienceProofLink?.primaryLinkUrl).toBe(- 'https://github.com/example/twenty-case-study',- );- });-- it('returns ok: false on malformed input (empty email)', async () => {- const result = await handler(- authedEvent({- firstName: 'Ada',- lastName: 'Lovelace',- email: '',- companyName: 'Analytical Engines Ltd',- }),- );- expect(result.ok).toBe(false);- if (result.ok) return;- expect(result.reason).toBe('invalid_input');- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/__tests__/submit-partner-application.schema.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/__tests__/submit-partner-application.schema.test.tsdeleted file mode 100644index 44de667b922..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/__tests__/submit-partner-application.schema.test.ts+++ /dev/null@@ -1,146 +0,0 @@-import { describe, expect, it } from 'vitest';--import { submitPartnerApplicationSchema } from '../services/submit-partner-application-input.schema';--const base = {- firstName: 'Ada',- lastName: 'Lovelace',- email: '[email protected]',- companyName: 'Analytical Engines',-};--describe('submitPartnerApplicationSchema', () => {- it('accepts a minimal valid application', () => {- expect(submitPartnerApplicationSchema.safeParse(base).success).toBe(true);- });-- it('accepts the new partnerScope categories', () => {- const result = submitPartnerApplicationSchema.safeParse({- ...base,- partnerScope: ['ADVISORY', 'SOLUTIONING', 'HOSTING'],- });- expect(result.success).toBe(true);- });-- it('rejects legacy / unknown partnerScope values', () => {- expect(- submitPartnerApplicationSchema.safeParse({ ...base, partnerScope: ['APPS'] })- .success,- ).toBe(false);- });-- it('rejects an unknown typeOfTeam', () => {- expect(- submitPartnerApplicationSchema.safeParse({ ...base, typeOfTeam: 'FREELANCE' })- .success,- ).toBe(false);- });-- it('rejects an unknown country but accepts a known one with languages', () => {- expect(- submitPartnerApplicationSchema.safeParse({ ...base, country: 'ATLANTIS' })- .success,- ).toBe(false);- expect(- submitPartnerApplicationSchema.safeParse({- ...base,- country: 'FRANCE',- languages: ['ENGLISH', 'FRENCH'],- }).success,- ).toBe(true);- });-- it('requires a non-empty email and companyName', () => {- expect(- submitPartnerApplicationSchema.safeParse({ ...base, email: '' }).success,- ).toBe(false);- expect(- submitPartnerApplicationSchema.safeParse({ ...base, companyName: '' })- .success,- ).toBe(false);- });-- it('accepts optional notes and commercials', () => {- const result = submitPartnerApplicationSchema.safeParse({- ...base,- applicationNotes: 'Looking forward to partnering.',- hourlyRate: 150,- projectBudgetMin: 5000,- skills: ['React', 'PostgreSQL'],- });- expect(result.success).toBe(true);- });-- const validExperienceNotes =- 'Built a custom Twenty app for a property-management client, modeled leases and ' +- 'tenants as data models, automated renewal workflows, and shipped a front component ' +- 'for the broker dashboard with role-based views.';-- it('accepts twenty experience milestones, narrative, and proof link', () => {- const result = submitPartnerApplicationSchema.safeParse({- ...base,- twentyExperience: [- 'CUSTOM_APPS',- 'DATA_MODELS',- 'WORKFLOWS',- 'FRONT_COMPONENTS',- ],- twentyExperienceNotes: validExperienceNotes,- twentyExperienceProofLink: 'https://www.loom.com/share/example',- });- expect(result.success).toBe(true);- });-- it('rejects unknown twentyExperience milestone values', () => {- expect(- submitPartnerApplicationSchema.safeParse({- ...base,- twentyExperience: ['INTEGRATIONS'],- twentyExperienceNotes: validExperienceNotes,- twentyExperienceProofLink: 'https://github.com/example/case',- }).success,- ).toBe(false);- });-- it('rejects twentyExperienceNotes shorter than 200 characters', () => {- expect(- submitPartnerApplicationSchema.safeParse({- ...base,- twentyExperience: ['WORKFLOWS'],- twentyExperienceNotes: 'Too short for a real implementation narrative.',- twentyExperienceProofLink: 'https://www.loom.com/share/example',- }).success,- ).toBe(false);- });-- it('rejects a partial experience triad', () => {- expect(- submitPartnerApplicationSchema.safeParse({- ...base,- twentyExperience: ['WORKFLOWS'],- }).success,- ).toBe(false);- });-- it('rejects a non-http twentyExperienceProofLink', () => {- expect(- submitPartnerApplicationSchema.safeParse({- ...base,- twentyExperience: ['WORKFLOWS'],- twentyExperienceNotes: validExperienceNotes,- twentyExperienceProofLink: 'javascript:alert(1)',- }).success,- ).toBe(false);- });-- it('rejects an empty twentyExperience array when other experience fields are set', () => {- expect(- submitPartnerApplicationSchema.safeParse({- ...base,- twentyExperience: [],- twentyExperienceNotes: validExperienceNotes,- twentyExperienceProofLink: 'https://www.loom.com/share/example',- }).success,- ).toBe(false);- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/constants/how-to-review.constants.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/constants/how-to-review.constants.tsdeleted file mode 100644index bca8b3961d8..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/constants/how-to-review.constants.ts+++ /dev/null@@ -1,11 +0,0 @@-export const HOW_TO_REVIEW_FRONT_COMPONENT_ID =- 'c6470933-a33a-4adc-b9a9-1c8d2759f627';-export const HOW_TO_REVIEW_PAGE_LAYOUT_ID =- '47f57740-c43e-4d1a-95be-b503f696786b';-export const HOW_TO_REVIEW_PAGE_TAB_ID = '33c38f18-4e1c-448e-99f7-728650e7e4cd';-export const HOW_TO_REVIEW_PAGE_WIDGET_ID =- 'a1890015-e45f-4c09-bd9a-714a092cb324';-export const HOW_TO_REVIEW_NAV_ITEM_ID = '3306c356-d4f1-4582-80f0-b38e37b41dc4';--export const WELCOME_EMAIL_WORKFLOW_URL =- 'https://partners.twenty.com/object/workflow/6306ce62-8aa2-4edb-bb8e-033b6524ebef';diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/constants/marketplace-ranking.constant.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/constants/marketplace-ranking.constant.test.tsdeleted file mode 100644index 83650c1f97c..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/constants/marketplace-ranking.constant.test.ts+++ /dev/null@@ -1,55 +0,0 @@-import { readFileSync } from 'node:fs';-import { dirname, resolve } from 'node:path';-import { fileURLToPath } from 'node:url';--import { describe, expect, it } from 'vitest';--import { MARKETPLACE_RANKING } from './marketplace-ranking.constant';--// Read website sources as text: twenty-partners must not import twenty-website.--const PACKAGES_ROOT = resolve(- dirname(fileURLToPath(import.meta.url)),- '../../../../../../../../',-);--const COMPLETENESS_SOURCE = readFileSync(- resolve(- PACKAGES_ROOT,- 'twenty-website/src/partners-marketplace/completeness-score.ts',- ),- 'utf8',-);--const GHOST_SOURCE = readFileSync(- resolve(- PACKAGES_ROOT,- 'twenty-website/src/partners-marketplace/is-ghost-partner.ts',- ),- 'utf8',-);--describe('MARKETPLACE_RANKING', () => {- it('matches the ranking constants in completeness-score.ts and is-ghost-partner.ts', () => {- const completenessAssignments = [- `const MIN_DESCRIPTION_LENGTH = ${MARKETPLACE_RANKING.introductionMinLength}`,- `const MAX_COUNTED_CASE_STUDIES = ${MARKETPLACE_RANKING.maxCountedCaseStudies}`,- `const POINTS_PER_CASE_STUDY = ${MARKETPLACE_RANKING.pointsPerCaseStudy}`,- `const POINTS_PER_CASE_STUDY_COVER = ${MARKETPLACE_RANKING.pointsPerCaseStudyCover}`,- `const POINTS_FOR_INTRODUCTION = ${MARKETPLACE_RANKING.pointsForIntroduction}`,- `const POINTS_FOR_SERVICE = ${MARKETPLACE_RANKING.pointsForService}`,- `const POINTS_FOR_PROFILE_PICTURE = ${MARKETPLACE_RANKING.pointsForProfilePicture}`,- `const POINTS_FOR_CALENDAR_LINK = ${MARKETPLACE_RANKING.pointsForCalendarLink}`,- `const POINTS_FOR_RATE_OR_BUDGET = ${MARKETPLACE_RANKING.pointsForRateOrBudget}`,- `const POINTS_FOR_CATEGORY = ${MARKETPLACE_RANKING.pointsForCategory}`,- ];-- for (const assignment of completenessAssignments) {- expect(COMPLETENESS_SOURCE).toContain(assignment);- }-- expect(GHOST_SOURCE).toContain(- `const GHOST_INTRODUCTION_MAX_LENGTH = ${MARKETPLACE_RANKING.ghostIntroductionMaxLength}`,- );- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/constants/marketplace-ranking.constant.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/constants/marketplace-ranking.constant.tsdeleted file mode 100644index 5a8b1d68cf2..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/constants/marketplace-ranking.constant.ts+++ /dev/null@@ -1,15 +0,0 @@-// Copied from packages/twenty-website/src/partners-marketplace/completeness-score.ts-// and is-ghost-partner.ts. Update both in the same change (see AGENTS.md).-export const MARKETPLACE_RANKING = {- pointsPerCaseStudy: 4,- maxCountedCaseStudies: 3,- pointsPerCaseStudyCover: 1,- introductionMinLength: 120,- pointsForIntroduction: 2,- pointsForService: 2,- pointsForProfilePicture: 1,- pointsForCalendarLink: 1,- pointsForRateOrBudget: 1,- pointsForCategory: 1,- ghostIntroductionMaxLength: 40,-} as const;diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/front-components/how-to-review.front-component.tsx b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/front-components/how-to-review.front-component.tsxdeleted file mode 100644index 12814fb64d9..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/front-components/how-to-review.front-component.tsx+++ /dev/null@@ -1,145 +0,0 @@-import { defineFrontComponent } from 'twenty-sdk/define';--import {- HOW_TO_REVIEW_FRONT_COMPONENT_ID,- WELCOME_EMAIL_WORKFLOW_URL,-} from 'src/modules/partner/application-intake/constants/how-to-review.constants';-import { MARKETPLACE_RANKING } from 'src/modules/partner/application-intake/constants/marketplace-ranking.constant';-import { PLAYBOOK_STYLES as styles } from 'src/modules/shared/front-components/playbook-styles';-import {- CASE_STUDY_BEATS_QUICK_FIELDS,- RANK_ROWS,-} from 'src/modules/partner/application-intake/front-components/how-to-review/rank-rows';--const HowToReview = () => (- <div style={styles.root}>- <article style={styles.article}>- <p style={styles.kicker}>Playbook</p>- <h1 style={styles.title}>Review a partner application</h1>- <p style={styles.lede}>- We list partners we can trust. Trust comes from proof they built a real- thing on Twenty.- </p>-- <section style={styles.step}>- <div style={styles.num}>01</div>- <div>- <h2 style={styles.heading}>What to review</h2>- <p style={styles.body}>- Open <strong>Partner Applications</strong>. Newest first. Read the- form on the record. Nothing else.- </p>- <ul style={styles.list}>- <li>- <strong>Who</strong> — name, country, team type, languages- </li>- <li>- <strong>Cover</strong> — categories, skills- </li>- <li>- <strong>Money</strong> — hourly rate, minimum budget- </li>- </ul>- </div>- </section>-- <section style={styles.trust}>- <div style={styles.num}>02</div>- <div>- <h2 style={styles.heading}>Proof of work — this is the review</h2>- <p style={styles.body}>- We need partners who have built a real thing on Twenty. That is how- we trust them.- </p>- <ul style={styles.list}>- <li>- <strong>Experience areas</strong> — apps, data models, workflows,- front components- </li>- <li>- <strong>Notes</strong> — a real project: who it was for, what they- built- </li>- <li>- <strong>Proof URL</strong> — instance, repo, or video that shows- that work- </li>- </ul>- <p style={styles.note}>- Open the proof yourself. The app does not fetch it. No Twenty work,- thin notes, or a dead proof link → do not list.- </p>- </div>- </section>-- <section style={styles.step}>- <div style={styles.num}>03</div>- <div>- <h2 style={styles.heading}>Set Validation Stage</h2>- <div style={styles.pillRow}>- <span style={styles.pill}>VALIDATED — list them</span>- <span style={styles.pill}>POTENTIAL — keep, do not list</span>- <span style={styles.pill}>REJECTED — no</span>- </div>- <p style={styles.body}>- A change to <strong>VALIDATED</strong> sends the{' '}- <a href={WELCOME_EMAIL_WORKFLOW_URL} style={styles.link}>- welcome email- </a>{' '}- on its own. Do not send a second mail.- </p>- <p style={styles.note}>- The row leaves the queue when the stage is not APPLICATION.- </p>- </div>- </section>-- <section style={styles.lastStep}>- <div style={styles.num}>04</div>- <div>- <h2 style={styles.heading}>They must fill the profile</h2>- <p style={styles.body}>- The welcome mail asks them into the workspace. Marketplace rank uses- a filled profile. A thin profile sits at the bottom — or stays- hidden.- </p>- <p style={styles.bodySpaced}>- Tell them to complete <strong>My Profile</strong> and{' '}- <strong>My Case Studies</strong>. Bonuses from the ranking code:- </p>- <table style={styles.table}>- <thead>- <tr>- <th style={styles.th}>What they add</th>- <th style={styles.thRight}>Bonus</th>- </tr>- </thead>- <tbody>- {RANK_ROWS.map((row) => (- <tr key={row.label}>- <td style={styles.td}>{row.label}</td>- <td style={styles.tdPoints}>{row.points}</td>- </tr>- ))}- </tbody>- </table>- <p style={styles.note}>- Introduction under {MARKETPLACE_RANKING.ghostIntroductionMaxLength}{' '}- characters and no picture → ghost. The directory hides them.- {CASE_STUDY_BEATS_QUICK_FIELDS- ? ' One case study beats picture + calendar + rate together.'- : ''}- </p>- </div>- </section>- </article>- </div>-);--export default defineFrontComponent({- universalIdentifier: HOW_TO_REVIEW_FRONT_COMPONENT_ID,- name: 'How to review',- description:- 'Admin playbook for reviewing partner applications in Matching Admin Workspace.',- component: HowToReview,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/front-components/how-to-review/playbook-styles.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/front-components/how-to-review/playbook-styles.tsdeleted file mode 100644index 06c018ebe30..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/front-components/how-to-review/playbook-styles.ts+++ /dev/null@@ -1,168 +0,0 @@-import { COLORS, FONT } from 'src/modules/shared/front-components/palette';--const MONO = '"Azeret Mono", ui-monospace, monospace';--export const PLAYBOOK_STYLES = {- root: {- display: 'flex',- justifyContent: 'center',- width: '100%',- minHeight: 'calc(100dvh - 56px)',- boxSizing: 'border-box' as const,- padding: 32,- fontFamily: FONT,- color: COLORS.fg,- background: COLORS.bg,- },- article: {- width: '100%',- maxWidth: 720,- },- kicker: {- fontFamily: MONO,- fontSize: 11,- letterSpacing: 1.4,- textTransform: 'uppercase' as const,- color: COLORS.accent,- margin: '0 0 8px',- },- title: {- fontSize: 28,- fontWeight: 500,- letterSpacing: -0.4,- margin: '0 0 8px',- },- lede: {- color: COLORS.muted,- fontSize: 15,- lineHeight: '22px',- margin: '0 0 28px',- },- step: {- display: 'grid',- gridTemplateColumns: '36px 1fr',- gap: 16,- padding: '20px 0',- borderTop: `1px solid ${COLORS.border}`,- },- lastStep: {- display: 'grid',- gridTemplateColumns: '36px 1fr',- gap: 16,- padding: '20px 0',- borderTop: `1px solid ${COLORS.border}`,- borderBottom: `1px solid ${COLORS.border}`,- },- trust: {- display: 'grid',- gridTemplateColumns: '36px 1fr',- gap: 16,- padding: '20px 16px',- margin: '0 -16px',- borderTop: `1px solid ${COLORS.border}`,- background: COLORS.accentSoft,- },- num: {- fontFamily: MONO,- fontSize: 13,- color: COLORS.accent,- paddingTop: 2,- },- heading: {- fontSize: 16,- fontWeight: 500,- margin: '0 0 6px',- },- body: {- margin: 0,- color: COLORS.fg,- fontSize: 14,- lineHeight: '22px',- },- bodySpaced: {- margin: '8px 0 0',- color: COLORS.fg,- fontSize: 14,- lineHeight: '22px',- },- list: {- margin: '8px 0 0',- paddingLeft: 18,- color: COLORS.fg,- fontSize: 14,- lineHeight: '22px',- },- note: {- marginTop: 8,- color: COLORS.muted,- fontSize: 13,- lineHeight: '20px',- },- pillRow: {- display: 'flex',- flexWrap: 'wrap' as const,- gap: 8,- margin: '8px 0',- },- pill: {- display: 'inline-flex',- alignItems: 'center',- fontFamily: MONO,- fontSize: 11,- letterSpacing: 0.4,- textTransform: 'uppercase' as const,- padding: '4px 8px',- borderRadius: 2,- background: COLORS.surfaceAlt,- color: COLORS.muted,- },- table: {- width: '100%',- borderCollapse: 'collapse' as const,- marginTop: 12,- fontSize: 13,- },- th: {- fontFamily: MONO,- fontSize: 10,- letterSpacing: 1.2,- textTransform: 'uppercase' as const,- textAlign: 'left' as const,- color: COLORS.muted,- fontWeight: 500,- padding: '6px 0',- borderBottom: `1px solid ${COLORS.border}`,- },- thRight: {- fontFamily: MONO,- fontSize: 10,- letterSpacing: 1.2,- textTransform: 'uppercase' as const,- textAlign: 'right' as const,- color: COLORS.muted,- fontWeight: 500,- padding: '6px 0',- borderBottom: `1px solid ${COLORS.border}`,- },- td: {- padding: '8px 0',- borderBottom: `1px solid ${COLORS.border}`,- verticalAlign: 'top' as const,- lineHeight: '18px',- },- tdPoints: {- padding: '8px 0 8px 16px',- borderBottom: `1px solid ${COLORS.border}`,- verticalAlign: 'top' as const,- lineHeight: '18px',- fontFamily: MONO,- fontSize: 12,- whiteSpace: 'nowrap' as const,- textAlign: 'right' as const,- color: COLORS.accent,- },- link: {- color: COLORS.accent,- textDecoration: 'underline' as const,- },-} as const;diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/front-components/how-to-review/rank-rows.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/front-components/how-to-review/rank-rows.tsdeleted file mode 100644index a941a664cce..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/front-components/how-to-review/rank-rows.ts+++ /dev/null@@ -1,42 +0,0 @@-import { MARKETPLACE_RANKING } from 'src/modules/partner/application-intake/constants/marketplace-ranking.constant';--export const RANK_ROWS: { label: string; points: string }[] = [- {- label: 'Approved case study',- points: `+${MARKETPLACE_RANKING.pointsPerCaseStudy} each, max ${MARKETPLACE_RANKING.maxCountedCaseStudies}`,- },- {- label: 'Cover image on a counted case study',- points: `+${MARKETPLACE_RANKING.pointsPerCaseStudyCover} each, capped by counted case studies`,- },- {- label: `Introduction, ${MARKETPLACE_RANKING.introductionMinLength}+ characters`,- points: `+${MARKETPLACE_RANKING.pointsForIntroduction}`,- },- {- label: 'At least one service',- points: `+${MARKETPLACE_RANKING.pointsForService}`,- },- {- label: 'Profile picture',- points: `+${MARKETPLACE_RANKING.pointsForProfilePicture}`,- },- {- label: 'Calendar link',- points: `+${MARKETPLACE_RANKING.pointsForCalendarLink}`,- },- {- label: 'Hourly rate or min. budget',- points: `+${MARKETPLACE_RANKING.pointsForRateOrBudget}`,- },- {- label: 'At least one category',- points: `+${MARKETPLACE_RANKING.pointsForCategory}`,- },-];--export const CASE_STUDY_BEATS_QUICK_FIELDS =- MARKETPLACE_RANKING.pointsPerCaseStudy >- MARKETPLACE_RANKING.pointsForProfilePicture +- MARKETPLACE_RANKING.pointsForCalendarLink +- MARKETPLACE_RANKING.pointsForRateOrBudget;diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/graphql/mutations/create-company.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/graphql/mutations/create-company.tsdeleted file mode 100644index 02493952f30..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/graphql/mutations/create-company.ts+++ /dev/null@@ -1,10 +0,0 @@-import type { CoreApiClient, CoreSchema } from 'twenty-client-sdk/core';--export function createCompany(- client: CoreApiClient,- data: CoreSchema.CompanyCreateInput,-) {- return client.mutation({- createCompany: { __args: { data }, id: true },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/graphql/mutations/create-partner.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/graphql/mutations/create-partner.tsdeleted file mode 100644index a1a14104781..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/graphql/mutations/create-partner.ts+++ /dev/null@@ -1,13 +0,0 @@-import type { CoreApiClient, CoreSchema } from 'twenty-client-sdk/core';--export function createPartner(- client: CoreApiClient,- data: CoreSchema.PartnerCreateInput,-) {- return client.mutation({- createPartner: {- __args: { data },- id: true,- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/graphql/mutations/create-person.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/graphql/mutations/create-person.tsdeleted file mode 100644index 2de2930b877..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/graphql/mutations/create-person.ts+++ /dev/null@@ -1,13 +0,0 @@-import type { CoreApiClient, CoreSchema } from 'twenty-client-sdk/core';--export function createPerson(- client: CoreApiClient,- data: CoreSchema.PersonCreateInput,-) {- return client.mutation({- createPerson: {- __args: { data },- id: true,- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/graphql/mutations/update-partner.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/graphql/mutations/update-partner.tsdeleted file mode 100644index 3041b0b825e..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/graphql/mutations/update-partner.ts+++ /dev/null@@ -1,14 +0,0 @@-import type { CoreApiClient, CoreSchema } from 'twenty-client-sdk/core';--export function updatePartner(- client: CoreApiClient,- id: string,- data: CoreSchema.PartnerUpdateInput,-) {- return client.mutation({- updatePartner: {- __args: { id, data },- id: true,- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/graphql/mutations/update-person.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/graphql/mutations/update-person.tsdeleted file mode 100644index 01733fbece9..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/graphql/mutations/update-person.ts+++ /dev/null@@ -1,14 +0,0 @@-import type { CoreApiClient, CoreSchema } from 'twenty-client-sdk/core';--export function updatePerson(- client: CoreApiClient,- id: string,- data: CoreSchema.PersonUpdateInput,-) {- return client.mutation({- updatePerson: {- __args: { id, data },- id: true,- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/graphql/queries/find-companies-by-domain.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/graphql/queries/find-companies-by-domain.tsdeleted file mode 100644index f3450427e3c..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/graphql/queries/find-companies-by-domain.ts+++ /dev/null@@ -1,19 +0,0 @@-import type { CoreApiClient } from 'twenty-client-sdk/core';--export function findCompaniesByDomain(- client: CoreApiClient,- host: string,- cursor: string | null,-) {- return client.query({- companies: {- __args: {- filter: { domainName: { primaryLinkUrl: { ilike: `%${host}%` } } },- first: 20,- ...(cursor !== null ? { after: cursor } : {}),- },- pageInfo: { hasNextPage: true, endCursor: true },- edges: { node: { id: true, domainName: { primaryLinkUrl: true } } },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/graphql/queries/find-partner-for-embed.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/graphql/queries/find-partner-for-embed.tsdeleted file mode 100644index ba828452096..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/graphql/queries/find-partner-for-embed.ts+++ /dev/null@@ -1,27 +0,0 @@-import type { CoreApiClient } from 'twenty-client-sdk/core';--// List form on purpose: the single-record read throws `Record not found` for an unknown id.-export function findPartnerForEmbed(client: CoreApiClient, id: string) {- return client.query({- partners: {- __args: { filter: { id: { eq: id } }, first: 1 },- edges: {- node: {- id: true,- name: true,- country: true,- partnerScope: true,- skills: true,- languagesSpoken: true,- persons: {- edges: {- node: {- name: { firstName: true, lastName: true },- },- },- },- },- },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/graphql/queries/find-person-by-email.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/graphql/queries/find-person-by-email.tsdeleted file mode 100644index de07e6dab3a..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/graphql/queries/find-person-by-email.ts+++ /dev/null@@ -1,18 +0,0 @@-import type { CoreApiClient } from 'twenty-client-sdk/core';--export function findPersonByEmail(client: CoreApiClient, email: string) {- return client.query({- people: {- __args: {- filter: { emails: { primaryEmail: { eq: email } } },- first: 1,- },- edges: {- node: {- id: true,- partner: { id: true, company: { id: true } },- },- },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/mappers/application-embed.mapper.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/mappers/application-embed.mapper.tsdeleted file mode 100644index aa133718033..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/mappers/application-embed.mapper.ts+++ /dev/null@@ -1,73 +0,0 @@-import { isNonEmptyString } from 'src/modules/shared/utils/is-non-empty-string.util';-import { TWENTY_BLUE } from 'src/modules/shared/connector/discord/config';-import { type DiscordField } from 'src/modules/shared/connector/discord/types';--export type PartnerForEmbed = {- id: string;- name?: string | null;- country?: string | null;- partnerScope?: string[] | null;- skills?: string[] | null;- languagesSpoken?: string[] | null;- applicant?: {- firstName?: string | null;- lastName?: string | null;- } | null;-};--// Pure embed builder, exported for unit testing. Empty fields are omitted.-export function buildApplicationEmbed(- partner: PartnerForEmbed,- frontendUrl: string | undefined,-): Record<string, unknown> {- // Discord packs up to 3 inline fields per row. We want two paired rows —- // Applicant | Company, then Country | Languages — followed by two full-width- // rows (Partner scope, Skills). A trailing zero-width inline "spacer" fills- // each paired row to 3 columns so the next group starts on its own line.- const SPACER: DiscordField = { name: '', value: '', inline: true };- const fields: DiscordField[] = [];-- const applicantName = [partner.applicant?.firstName, partner.applicant?.lastName]- .filter(isNonEmptyString)- .join(' ')- .trim();-- const pairedRow1: DiscordField[] = [];- if (isNonEmptyString(applicantName)) {- pairedRow1.push({ name: 'Applicant', value: applicantName, inline: true });- }- if (isNonEmptyString(partner.name)) {- pairedRow1.push({ name: 'Company', value: partner.name.trim(), inline: true });- }-- const pairedRow2: DiscordField[] = [];- if (isNonEmptyString(partner.country)) {- pairedRow2.push({ name: 'Country', value: partner.country, inline: true });- }- if (partner.languagesSpoken && partner.languagesSpoken.length > 0) {- pairedRow2.push({ name: 'Languages', value: partner.languagesSpoken.join(', '), inline: true });- }-- for (const field of pairedRow1) fields.push(field);- if (pairedRow1.length > 0) fields.push(SPACER);- for (const field of pairedRow2) fields.push(field);- if (pairedRow2.length > 0) fields.push(SPACER);-- if (partner.partnerScope && partner.partnerScope.length > 0) {- fields.push({ name: 'Partner scope', value: partner.partnerScope.join(', ') });- }- if (partner.skills && partner.skills.length > 0) {- fields.push({ name: 'Skills', value: partner.skills.join(', ') });- }-- const embed: Record<string, unknown> = {- title: 'New partner application',- color: TWENTY_BLUE,- timestamp: new Date().toISOString(),- fields,- };- if (isNonEmptyString(frontendUrl)) {- embed.url = `${frontendUrl.replace(/\/+$/, '')}/object/partner/${partner.id}`;- }- return embed;-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/mappers/build-partner-fields.mapper.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/mappers/build-partner-fields.mapper.tsdeleted file mode 100644index cc33c839dec..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/mappers/build-partner-fields.mapper.ts+++ /dev/null@@ -1,115 +0,0 @@-import { type CoreSchema } from 'twenty-client-sdk/core';--import { isNonEmptyString } from 'src/modules/shared/utils/is-non-empty-string.util';-import { deriveDeploymentExpertise } from 'src/modules/partner/application-intake/utils/derive-deployment-expertise';-import { deriveRegion } from 'src/modules/partner/application-intake/utils/derive-region';-import { type SubmitPartnerApplicationInput } from 'src/modules/partner/application-intake/services/submit-partner-application-input.schema';-import { slugify } from 'src/scripts/slugify';--function toMicros(- usd: number | undefined,-): { amountMicros: number; currencyCode: 'USD' } | undefined {- if (typeof usd !== 'number' || !Number.isFinite(usd) || usd < 0)- return undefined;- return { amountMicros: Math.round(usd * 1_000_000), currencyCode: 'USD' };-}--function buildApplicationNotes(- input: SubmitPartnerApplicationInput,-): string | null {- return isNonEmptyString(input.applicationNotes)- ? input.applicationNotes.trim()- : null;-}--// Mirrors the subset of Partner{Create,Update}Input this handler writes. The-// enum-typed columns are narrowed from the validated string inputs below.-export type PartnerFieldsForUpsert = {- name: string;- linkedin?: { primaryLinkUrl: string };- website?: { primaryLinkUrl: string };- city?: string;- country?: CoreSchema.PartnerCountryEnum;- languagesSpoken?: CoreSchema.PartnerLanguagesSpokenEnum[];- typeOfTeam?: CoreSchema.PartnerTypeOfTeamEnum;- partnerScope?: CoreSchema.PartnerPartnerScopeEnum[];- skills?: string[];- hourlyRate?: { amountMicros: number; currencyCode: 'USD' };- projectBudgetMin?: { amountMicros: number; currencyCode: 'USD' };- calendarLink?: { primaryLinkUrl: string };- applicationNotes?: string | null;- twentyExperience?: CoreSchema.PartnerTwentyExperienceEnum[];- twentyExperienceNotes?: string;- twentyExperienceProofLink?: { primaryLinkUrl: string };-};--export function buildPartnerFields(- input: SubmitPartnerApplicationInput,-): PartnerFieldsForUpsert {- const fields: PartnerFieldsForUpsert = {- name: input.companyName.trim(),- };- if (isNonEmptyString(input.linkedin))- fields.linkedin = { primaryLinkUrl: input.linkedin.trim() };- if (isNonEmptyString(input.domainName))- fields.website = { primaryLinkUrl: input.domainName.trim() };- if (isNonEmptyString(input.city)) fields.city = input.city.trim();- // validate() has already checked these against the allowed value sets, so- // narrowing the validated strings to their enum types here is sound.- if (input.country !== undefined)- fields.country = input.country as CoreSchema.PartnerCountryEnum;- if (input.languages !== undefined && input.languages.length > 0)- fields.languagesSpoken =- input.languages as CoreSchema.PartnerLanguagesSpokenEnum[];- if (input.typeOfTeam !== undefined)- fields.typeOfTeam = input.typeOfTeam as CoreSchema.PartnerTypeOfTeamEnum;- if (input.partnerScope !== undefined && input.partnerScope.length > 0)- fields.partnerScope =- input.partnerScope as CoreSchema.PartnerPartnerScopeEnum[];- if (input.skills !== undefined && input.skills.length > 0)- fields.skills = input.skills.filter(isNonEmptyString);- const hourly = toMicros(input.hourlyRate);- if (hourly) fields.hourlyRate = hourly;- const min = toMicros(input.projectBudgetMin);- if (min) fields.projectBudgetMin = min;- if (isNonEmptyString(input.calendarLink))- fields.calendarLink = { primaryLinkUrl: input.calendarLink.trim() };- const notes = buildApplicationNotes(input);- if (notes !== null) fields.applicationNotes = notes;- if (- input.twentyExperience !== undefined &&- input.twentyExperience.length > 0- ) {- fields.twentyExperience =- input.twentyExperience as CoreSchema.PartnerTwentyExperienceEnum[];- }- if (isNonEmptyString(input.twentyExperienceNotes)) {- fields.twentyExperienceNotes = input.twentyExperienceNotes.trim();- }- if (isNonEmptyString(input.twentyExperienceProofLink)) {- fields.twentyExperienceProofLink = {- primaryLinkUrl: input.twentyExperienceProofLink.trim(),- };- }- return fields;-}--export function buildPartnerCreateData(- partnerFields: PartnerFieldsForUpsert,- input: SubmitPartnerApplicationInput,- companyId: string,-): CoreSchema.PartnerCreateInput {- const region = deriveRegion(input.country);- return {- ...partnerFields,- slug: slugify(input.companyName),- validationStage: 'APPLICATION',- superPartner: false,- partnerTier: 'NEW',- companyId,- deploymentExpertise: deriveDeploymentExpertise(- input.partnerScope,- ) as CoreSchema.PartnerDeploymentExpertiseEnum[],- ...(region ? { region: [region] as CoreSchema.PartnerRegionEnum[] } : {}),- };-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/mappers/map-tally-experience-csv-row.mapper.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/mappers/map-tally-experience-csv-row.mapper.tsdeleted file mode 100644index 72c1092a62f..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/mappers/map-tally-experience-csv-row.mapper.ts+++ /dev/null@@ -1,219 +0,0 @@-// Pure Tally CSV row → Partner experience update intent.-// Used by the local (uncommitted) raise-bar import ops script.-// Match key is partnerId only — never email.--import { TWENTY_EXPERIENCE_NOTES_MIN_LENGTH } from 'src/modules/partner/constants/partner-option-values.constant';-import { isNonEmptyString } from 'src/modules/shared/utils/is-non-empty-string.util';--export { TWENTY_EXPERIENCE_NOTES_MIN_LENGTH };--export const MILESTONE_LABEL_TO_ENUM = {- 'Custom apps': 'CUSTOM_APPS',- 'Data models': 'DATA_MODELS',- Workflows: 'WORKFLOWS',- 'Front components': 'FRONT_COMPONENTS',-} as const;--export type TwentyExperienceMilestone =- (typeof MILESTONE_LABEL_TO_ENUM)[keyof typeof MILESTONE_LABEL_TO_ENUM];--export type PartnerExperienceUpdateIntent = {- partnerId: string;- twentyExperience: TwentyExperienceMilestone[];- twentyExperienceNotes: string;- twentyExperienceProofLink: string;-};--export type MapTallyExperienceCsvRowResult =- | { ok: true; intent: PartnerExperienceUpdateIntent }- | { ok: false; reason: string; partnerId?: string };--const PARTNER_ID_HEADER_ALIASES = [- 'partnerid',- 'partner id',- 'partner_id',- 'hidden partnerid',-] as const;--const MILESTONES_HEADER_ALIASES = [- "what you've built in twenty",- 'what youve built in twenty',- 'twenty experience',-] as const;--const NOTES_HEADER_ALIASES = [- 'tell us about the implementation',- 'twenty experience notes',-] as const;--const PROOF_HEADER_ALIASES = [- 'proof url',- 'twenty experience proof link',- 'proof link',-] as const;--const PARTNER_ID_UUID_PATTERN =- /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;--const normalizeHeader = (header: string): string =>- header- .trim()- .toLowerCase()- .replace(/[^a-z0-9]+/g, ' ')- .replace(/\s+/g, ' ')- .trim();--export const getTallyExperienceCsvCell = (- row: Record<string, string | undefined | null>,- aliases: readonly string[],-): string | undefined => {- const normalizedEntries = Object.entries(row).map(([header, value]) => [- normalizeHeader(header),- value,- ]);-- for (const alias of aliases) {- const normalizedAlias = normalizeHeader(alias);- for (const [header, value] of normalizedEntries) {- if (header === normalizedAlias && isNonEmptyString(value)) {- return value.trim();- }- }- }-- // Partial match for long Tally titles that include helper copy.- for (const alias of aliases) {- const normalizedAlias = normalizeHeader(alias);- for (const [header, value] of normalizedEntries) {- if (- header.includes(normalizedAlias) &&- isNonEmptyString(value) &&- // Never treat the optional email column as a match/notes/proof cell.- !header.includes('email')- ) {- return value.trim();- }- }- }-- return undefined;-};--export const mapMilestoneLabels = (- rawMilestones: string,-):- | { ok: true; milestones: TwentyExperienceMilestone[] }- | { ok: false; reason: string } => {- const labels = rawMilestones- .split(/[,;\n|]+/)- .map((label) => label.trim())- .filter((label) => label.length > 0);-- if (labels.length === 0) {- return { ok: false, reason: 'missing_milestones' };- }-- const milestones: TwentyExperienceMilestone[] = [];- const seen = new Set<TwentyExperienceMilestone>();-- for (const label of labels) {- const mapped =- MILESTONE_LABEL_TO_ENUM[- label as keyof typeof MILESTONE_LABEL_TO_ENUM- ];-- if (mapped === undefined) {- return { ok: false, reason: `unknown_milestone_label:${label}` };- }-- if (!seen.has(mapped)) {- seen.add(mapped);- milestones.push(mapped);- }- }-- return { ok: true, milestones };-};--const isHttpOrHttpsUrl = (value: string): boolean => {- try {- const url = new URL(value);- return url.protocol === 'http:' || url.protocol === 'https:';- } catch {- return false;- }-};--export const mapTallyExperienceCsvRow = (- row: Record<string, string | undefined | null>,-): MapTallyExperienceCsvRowResult => {- const partnerId = getTallyExperienceCsvCell(row, PARTNER_ID_HEADER_ALIASES);-- if (!isNonEmptyString(partnerId)) {- return { ok: false, reason: 'missing_partner_id' };- }-- if (!PARTNER_ID_UUID_PATTERN.test(partnerId)) {- return {- ok: false,- reason: 'invalid_partner_id',- partnerId,- };- }-- const rawMilestones = getTallyExperienceCsvCell(row, MILESTONES_HEADER_ALIASES);- if (!isNonEmptyString(rawMilestones)) {- return { ok: false, reason: 'missing_milestones', partnerId };- }-- const mappedMilestones = mapMilestoneLabels(rawMilestones);- if (!mappedMilestones.ok) {- return {- ok: false,- reason: mappedMilestones.reason,- partnerId,- };- }-- const twentyExperienceNotes = getTallyExperienceCsvCell(- row,- NOTES_HEADER_ALIASES,- );- if (!isNonEmptyString(twentyExperienceNotes)) {- return { ok: false, reason: 'missing_notes', partnerId };- }-- if (twentyExperienceNotes.length < TWENTY_EXPERIENCE_NOTES_MIN_LENGTH) {- return {- ok: false,- reason: `notes_too_short:${twentyExperienceNotes.length}`,- partnerId,- };- }-- const twentyExperienceProofLink = getTallyExperienceCsvCell(- row,- PROOF_HEADER_ALIASES,- );- if (!isNonEmptyString(twentyExperienceProofLink)) {- return { ok: false, reason: 'missing_proof_url', partnerId };- }-- if (!isHttpOrHttpsUrl(twentyExperienceProofLink)) {- return {- ok: false,- reason: 'invalid_proof_url',- partnerId,- };- }-- return {- ok: true,- intent: {- partnerId,- twentyExperience: mappedMilestones.milestones,- twentyExperienceNotes,- twentyExperienceProofLink,- },- };-};diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/navigation-menu-items/how-to-review.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/navigation-menu-items/how-to-review.navigation-menu-item.tsdeleted file mode 100644index 31c70d8e14c..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/navigation-menu-items/how-to-review.navigation-menu-item.ts+++ /dev/null@@ -1,19 +0,0 @@-import {- NavigationMenuItemType,- defineNavigationMenuItem,-} from 'twenty-sdk/define';--import {- HOW_TO_REVIEW_NAV_ITEM_ID,- HOW_TO_REVIEW_PAGE_LAYOUT_ID,-} from 'src/modules/partner/application-intake/constants/how-to-review.constants';--export default defineNavigationMenuItem({- universalIdentifier: HOW_TO_REVIEW_NAV_ITEM_ID,- name: 'How to review',- type: NavigationMenuItemType.PAGE_LAYOUT,- icon: 'IconListCheck',- position: 11,- folderUniversalIdentifier: '0b2e499a-ae74-45e0-af08-243e19fc56aa',- pageLayoutUniversalIdentifier: HOW_TO_REVIEW_PAGE_LAYOUT_ID,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/navigation-menu-items/partner-applications.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/navigation-menu-items/partner-applications.navigation-menu-item.tsdeleted file mode 100644index 2c8a8317f6f..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/navigation-menu-items/partner-applications.navigation-menu-item.ts+++ /dev/null@@ -1,16 +0,0 @@-import {- NavigationMenuItemType,- defineNavigationMenuItem,-} from 'twenty-sdk/define';--import { PARTNER_APPLICATIONS_NAV_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { PARTNER_APPLICATIONS_VIEW_UNIVERSAL_IDENTIFIER } from 'src/modules/partner/application-intake/views/partner-applications.view';--export default defineNavigationMenuItem({- universalIdentifier: PARTNER_APPLICATIONS_NAV_UNIVERSAL_IDENTIFIER,- type: NavigationMenuItemType.VIEW,- icon: 'IconInbox',- position: 9,- folderUniversalIdentifier: '0b2e499a-ae74-45e0-af08-243e19fc56aa',- viewUniversalIdentifier: PARTNER_APPLICATIONS_VIEW_UNIVERSAL_IDENTIFIER,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/on-partner-application-created.logic-function.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/on-partner-application-created.logic-function.tsdeleted file mode 100644index fb8cc886a2d..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/on-partner-application-created.logic-function.ts+++ /dev/null@@ -1,39 +0,0 @@-import { type CoreSchema } from 'twenty-client-sdk/core';-import {- type DatabaseEventPayload,- defineLogicFunction,- type ObjectRecordCreateEvent,-} from 'twenty-sdk/define';--import { ON_PARTNER_APPLICATION_CREATED_FN_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { DISCORD_WEBHOOK_ENV_VAR } from 'src/modules/shared/connector/discord/config';-import { notifyPartnerApplication } from 'src/modules/partner/application-intake/services/notify-partner-application.service';-import { isNonEmptyString } from 'src/modules/shared/utils/is-non-empty-string.util';--export const handler = async (- payload: DatabaseEventPayload<ObjectRecordCreateEvent<CoreSchema.Partner>>,-): Promise<Record<string, unknown>> => {- const after = payload.properties.after;- if (!after?.id) return {};-- // Form-only: the installed app stamps createdBy.source = 'APPLICATION'.- // Seed/import authenticate via API key (API); the UI is MANUAL — both skipped.- if (after.createdBy?.source !== 'APPLICATION') return {};-- const webhookUrl = process.env[DISCORD_WEBHOOK_ENV_VAR];- if (!isNonEmptyString(webhookUrl)) return {};-- return notifyPartnerApplication(after.id, webhookUrl);-};--export default defineLogicFunction({- universalIdentifier: ON_PARTNER_APPLICATION_CREATED_FN_UNIVERSAL_IDENTIFIER,- name: 'on-partner-application-created',- description:- 'Posts a Discord notification when the partner application form creates a new Partner.',- timeoutSeconds: 10,- handler,- databaseEventTriggerSettings: {- eventName: 'partner.created',- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/page-layouts/how-to-review.page-layout.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/page-layouts/how-to-review.page-layout.tsdeleted file mode 100644index 9d2784749c9..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/page-layouts/how-to-review.page-layout.ts+++ /dev/null@@ -1,34 +0,0 @@-import { PageLayoutTabLayoutMode, definePageLayout } from 'twenty-sdk/define';--import {- HOW_TO_REVIEW_FRONT_COMPONENT_ID,- HOW_TO_REVIEW_PAGE_LAYOUT_ID,- HOW_TO_REVIEW_PAGE_TAB_ID,- HOW_TO_REVIEW_PAGE_WIDGET_ID,-} from 'src/modules/partner/application-intake/constants/how-to-review.constants';--export default definePageLayout({- universalIdentifier: HOW_TO_REVIEW_PAGE_LAYOUT_ID,- name: 'How to review',- type: 'STANDALONE_PAGE',- tabs: [- {- universalIdentifier: HOW_TO_REVIEW_PAGE_TAB_ID,- title: 'How to review',- position: 0,- icon: 'IconListCheck',- layoutMode: PageLayoutTabLayoutMode.CANVAS,- widgets: [- {- universalIdentifier: HOW_TO_REVIEW_PAGE_WIDGET_ID,- title: 'How to review',- type: 'FRONT_COMPONENT',- configuration: {- configurationType: 'FRONT_COMPONENT',- frontComponentUniversalIdentifier: HOW_TO_REVIEW_FRONT_COMPONENT_ID,- },- },- ],- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/services/find-or-create-company.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/services/find-or-create-company.service.tsdeleted file mode 100644index 28cc2dd6eb9..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/services/find-or-create-company.service.ts+++ /dev/null@@ -1,61 +0,0 @@-import type { CoreApiClient, CoreSchema } from 'twenty-client-sdk/core';--import { isNonEmptyString } from 'src/modules/shared/utils/is-non-empty-string.util';-import { createCompany } from 'src/modules/partner/application-intake/graphql/mutations/create-company';-import { findCompaniesByDomain } from 'src/modules/partner/application-intake/graphql/queries/find-companies-by-domain';-import { type SubmitPartnerApplicationInput } from 'src/modules/partner/application-intake/services/submit-partner-application-input.schema';--function normalizeDomainHost(- value: string | null | undefined,-): string | undefined {- if (!isNonEmptyString(value)) return undefined;- const host = value- .trim()- .toLowerCase()- .replace(/^https?:\/\//, '')- .replace(/^www\./, '')- .replace(/[/:?#].*$/, '');- return host.length > 0 ? host : undefined;-}--// ponytail: matches active rows only — soft-deleted companies still hold the unique index; clear those with `yarn purge:prod`.-export async function findOrCreateCompanyId(- client: CoreApiClient,- input: SubmitPartnerApplicationInput,-): Promise<string> {- const domain = isNonEmptyString(input.domainName)- ? input.domainName.trim()- : undefined;- const host = normalizeDomainHost(domain);-- if (host !== undefined) {- // Broad ilike catches every stored URL form (bare, any protocol, paths, www).- // Paginate to exhaustion so the real match is never paged out; client-side- // normalization rejects false positives on each page.- let cursor: string | null = null;- do {- const existing = await findCompaniesByDomain(client, host, cursor);- const match = existing.companies?.edges?.find(- (edge) => normalizeDomainHost(edge.node.domainName?.primaryLinkUrl) === host,- );- if (match !== undefined) {- return match.node.id;- }- const pageInfo = existing.companies?.pageInfo;- cursor = pageInfo?.hasNextPage ? (pageInfo.endCursor ?? null) : null;- } while (cursor !== null);- }-- const companyData: CoreSchema.CompanyCreateInput = {- name: input.companyName.trim(),- };- if (domain !== undefined) {- companyData.domainName = { primaryLinkUrl: domain };- }- const companyResult = await createCompany(client, companyData);- const companyId = companyResult.createCompany?.id;- if (companyId === undefined) {- throw new Error('createCompany did not return an id');- }- return companyId;-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/services/notify-partner-application.service.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/services/notify-partner-application.service.test.tsdeleted file mode 100644index 91c43175d35..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/services/notify-partner-application.service.test.ts+++ /dev/null@@ -1,63 +0,0 @@-import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';--const { queryMock } = vi.hoisted(() => ({ queryMock: vi.fn() }));-vi.mock('twenty-client-sdk/core', () => ({- CoreApiClient: vi.fn(function () {- return { query: queryMock };- }),-}));--import { notifyPartnerApplication } from './notify-partner-application.service';--const PARTNER_ID = '11111111-1111-1111-1111-111111111111';-const WEBHOOK_URL = 'https://discord.test/webhook';--let fetchMock: ReturnType<typeof vi.fn>;--beforeEach(() => {- queryMock.mockReset();- fetchMock = vi.fn().mockResolvedValue({ ok: true, status: 204, text: async () => '' });- vi.stubGlobal('fetch', fetchMock);- process.env.PARTNER_APP_FRONTEND_URL = 'https://partners.twenty.com';-});--afterEach(() => {- vi.unstubAllGlobals();- delete process.env.PARTNER_APP_FRONTEND_URL;-});--describe('notifyPartnerApplication', () => {- it('returns {} and posts nothing when the partner row is absent', async () => {- queryMock.mockResolvedValue({ partners: { edges: [] } });-- const result = await notifyPartnerApplication(PARTNER_ID, WEBHOOK_URL);-- expect(result).toEqual({});- expect(fetchMock).not.toHaveBeenCalled();- });-- it('posts the embed when the partner row is present', async () => {- queryMock.mockResolvedValue({- partners: {- edges: [- {- node: {- id: PARTNER_ID,- name: 'Analytical Engines Ltd',- persons: {- edges: [{ node: { name: { firstName: 'Ada', lastName: 'Lovelace' } } }],- },- },- },- ],- },- });-- const result = await notifyPartnerApplication(PARTNER_ID, WEBHOOK_URL);-- expect(result).toEqual({ notified: true });- expect(fetchMock).toHaveBeenCalledTimes(1);- const body = JSON.parse((fetchMock.mock.calls[0][1] as { body: string }).body);- expect(body.embeds[0].url).toBe(`https://partners.twenty.com/object/partner/${PARTNER_ID}`);- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/services/notify-partner-application.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/services/notify-partner-application.service.tsdeleted file mode 100644index 2807d660da5..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/services/notify-partner-application.service.ts+++ /dev/null@@ -1,50 +0,0 @@-import { CoreApiClient } from 'twenty-client-sdk/core';--import { postWebhook } from 'src/modules/shared/connector/discord/discord.connector';-import { findPartnerForEmbed } from 'src/modules/partner/application-intake/graphql/queries/find-partner-for-embed';-import {- buildApplicationEmbed,- type PartnerForEmbed,-} from 'src/modules/partner/application-intake/mappers/application-embed.mapper';--export async function notifyPartnerApplication(- partnerId: string,- webhookUrl: string,-): Promise<Record<string, unknown>> {- const frontendUrl = process.env.PARTNER_APP_FRONTEND_URL;-- try {- const client = new CoreApiClient();- const res = await findPartnerForEmbed(client, partnerId);-- const node = res.partners?.edges?.[0]?.node;- if (!node) return {};-- const applicantNode = node.persons?.edges?.[0]?.node;- const partnerForEmbed: PartnerForEmbed = {- id: partnerId,- name: node.name,- country: node.country,- partnerScope: node.partnerScope,- skills: node.skills,- languagesSpoken: node.languagesSpoken,- applicant: applicantNode- ? {- firstName: applicantNode.name?.firstName,- lastName: applicantNode.name?.lastName,- }- : null,- };-- const embed = buildApplicationEmbed(partnerForEmbed, frontendUrl);- const delivered = await postWebhook(- webhookUrl,- { embeds: [embed] },- 'on-partner-application-created',- );- return { notified: delivered };- } catch {- // Best-effort: a Discord failure must never fail the trigger.- return { notified: false };- }-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/services/submit-partner-application-input.schema.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/services/submit-partner-application-input.schema.tsdeleted file mode 100644index 407f136ba33..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/services/submit-partner-application-input.schema.ts+++ /dev/null@@ -1,86 +0,0 @@-import { z } from 'zod';--import {- PARTNER_COUNTRY_VALUES,- PARTNER_LANGUAGE_VALUES,- PARTNER_SCOPE_VALUES,- PARTNER_TYPE_OF_TEAM_VALUES,- TWENTY_EXPERIENCE_NOTES_MIN_LENGTH,- TWENTY_EXPERIENCE_VALUES,-} from 'src/modules/partner/constants/partner-option-values.constant';-import { isHttpUrl } from 'src/modules/shared/utils/http-url.util';--// The request contract. zod is the single source of truth: it validates the-// incoming body at runtime and the input type is inferred from it, so the two-// can never drift. Enum-valued fields are constrained to the same option sets-// the Partner object accepts.-export const submitPartnerApplicationSchema = z- .object({- firstName: z.string().trim().min(1),- lastName: z.string(),- email: z.string().trim().min(1),- companyName: z.string().trim().min(1),- domainName: z.string().optional(),- linkedin: z.string().optional(),- city: z.string().optional(),- country: z.enum(PARTNER_COUNTRY_VALUES).optional(),- languages: z.array(z.enum(PARTNER_LANGUAGE_VALUES)).optional(),- typeOfTeam: z.enum(PARTNER_TYPE_OF_TEAM_VALUES).optional(),- partnerScope: z.array(z.enum(PARTNER_SCOPE_VALUES)).optional(),- skills: z.array(z.string()).optional(),- applicationNotes: z.string().optional(),- twentyExperience: z.array(z.enum(TWENTY_EXPERIENCE_VALUES)).optional(),- // Apply narrative floor at the API boundary (defense in depth vs website).- twentyExperienceNotes: z- .string()- .trim()- .min(TWENTY_EXPERIENCE_NOTES_MIN_LENGTH)- .optional(),- twentyExperienceProofLink: z- .string()- .trim()- .refine(isHttpUrl, { message: 'URL must use http or https' })- .optional(),- hourlyRate: z.number().optional(),- projectBudgetMin: z.number().optional(),- calendarLink: z.string().optional(),- })- .superRefine((data, context) => {- const hasMilestones = (data.twentyExperience?.length ?? 0) > 0;- const hasNotes = data.twentyExperienceNotes !== undefined;- const hasProof = data.twentyExperienceProofLink !== undefined;- const anyExperienceSet = hasMilestones || hasNotes || hasProof;-- if (!anyExperienceSet) {- return;- }-- // When any experience field is present, require the full triad (website parity).- if (!hasMilestones) {- context.addIssue({- code: 'custom',- message: 'At least one Twenty experience milestone is required.',- path: ['twentyExperience'],- });- }-- if (!hasNotes) {- context.addIssue({- code: 'custom',- message: `Twenty experience notes must be at least ${TWENTY_EXPERIENCE_NOTES_MIN_LENGTH} characters.`,- path: ['twentyExperienceNotes'],- });- }-- if (!hasProof) {- context.addIssue({- code: 'custom',- message: 'Twenty experience proof link is required.',- path: ['twentyExperienceProofLink'],- });- }- });--export type SubmitPartnerApplicationInput = z.infer<- typeof submitPartnerApplicationSchema->;diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/services/submit-partner-application.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/services/submit-partner-application.service.tsdeleted file mode 100644index 03c827291c5..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/services/submit-partner-application.service.ts+++ /dev/null@@ -1,68 +0,0 @@-import { CoreApiClient } from 'twenty-client-sdk/core';--import { createPartner } from 'src/modules/partner/application-intake/graphql/mutations/create-partner';-import { createPerson } from 'src/modules/partner/application-intake/graphql/mutations/create-person';-import { updatePartner } from 'src/modules/partner/application-intake/graphql/mutations/update-partner';-import { updatePerson } from 'src/modules/partner/application-intake/graphql/mutations/update-person';-import { findPersonByEmail } from 'src/modules/partner/application-intake/graphql/queries/find-person-by-email';-import {- buildPartnerCreateData,- buildPartnerFields,-} from 'src/modules/partner/application-intake/mappers/build-partner-fields.mapper';-import { findOrCreateCompanyId } from 'src/modules/partner/application-intake/services/find-or-create-company.service';-import { type SubmitPartnerApplicationInput } from 'src/modules/partner/application-intake/services/submit-partner-application-input.schema';--export type SubmitPartnerApplicationResult =- | { ok: true; created: boolean; partnerId: string }- | { ok: false; reason: string };--export async function submitPartnerApplication(- input: SubmitPartnerApplicationInput,-): Promise<SubmitPartnerApplicationResult> {- try {- const client = new CoreApiClient();- const email = input.email.trim();- const partnerFields = buildPartnerFields(input);-- const personLookup = await findPersonByEmail(client, email);- const existingEdge = personLookup.people?.edges?.[0]?.node;-- if (existingEdge && existingEdge.partner) {- const partnerId = existingEdge.partner.id;- await updatePartner(client, partnerId, partnerFields);- await updatePerson(client, existingEdge.id, {- name: { firstName: input.firstName.trim(), lastName: input.lastName.trim() },- });- return { ok: true, created: false, partnerId };- }-- const companyId = await findOrCreateCompanyId(client, input);-- const partnerResult = await createPartner(- client,- buildPartnerCreateData(partnerFields, input, companyId),- );- const partnerId = partnerResult.createPartner?.id;- if (partnerId === undefined) {- throw new Error('createPartner did not return an id');- }-- if (existingEdge) {- await updatePerson(client, existingEdge.id, {- partnerId,- name: { firstName: input.firstName.trim(), lastName: input.lastName.trim() },- });- } else {- await createPerson(client, {- name: { firstName: input.firstName.trim(), lastName: input.lastName.trim() },- emails: { primaryEmail: email },- partnerId,- companyId,- });- }-- return { ok: true, created: true, partnerId };- } catch (err) {- return { ok: false, reason: err instanceof Error ? err.message : String(err) };- }-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/submit-partner-application.logic-function.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/submit-partner-application.logic-function.tsdeleted file mode 100644index 5b3d0c013c3..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/submit-partner-application.logic-function.ts+++ /dev/null@@ -1,39 +0,0 @@-import { defineLogicFunction } from 'twenty-sdk/define';--import {- APPLICATION_SECRET_HEADER,- readSecretGuardedEvent,-} from 'src/modules/shared/http/read-secret-guarded-event';-import { submitPartnerApplicationSchema } from 'src/modules/partner/application-intake/services/submit-partner-application-input.schema';-import {- submitPartnerApplication,- type SubmitPartnerApplicationResult,-} from 'src/modules/partner/application-intake/services/submit-partner-application.service';--export type { SubmitPartnerApplicationInput } from 'src/modules/partner/application-intake/services/submit-partner-application-input.schema';-export type { SubmitPartnerApplicationResult } from 'src/modules/partner/application-intake/services/submit-partner-application.service';--export const SUBMIT_PARTNER_APPLICATION_LOGIC_FUNCTION_ID =- '7b1e2c5f-3a14-4f7d-8e91-0b5e2a3c4d76';--export const handler = async (- event: unknown,-): Promise<SubmitPartnerApplicationResult> => {- const guard = readSecretGuardedEvent(event, submitPartnerApplicationSchema);- if (!guard.ok) return { ok: false, reason: guard.reason };- return submitPartnerApplication(guard.input);-};--export default defineLogicFunction({- universalIdentifier: SUBMIT_PARTNER_APPLICATION_LOGIC_FUNCTION_ID,- name: 'submit-partner-application',- description: 'Receive a partner application from the website and idempotently upsert Partner / Person / Company.',- timeoutSeconds: 15,- handler,- httpRouteTriggerSettings: {- path: '/partner-applications',- httpMethod: 'POST',- isAuthRequired: false,- forwardedRequestHeaders: [APPLICATION_SECRET_HEADER],- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/utils/derive-deployment-expertise.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/utils/derive-deployment-expertise.tsdeleted file mode 100644index 9ee892867de..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/utils/derive-deployment-expertise.ts+++ /dev/null@@ -1,11 +0,0 @@-// Everyone uses the cloud by default; covering Hosting & Infrastructure also-// signals self-host capability. Derived server-side on application creation.-export type PartnerDeployment = 'CLOUD' | 'SELF_HOST';--export function deriveDeploymentExpertise(- partnerScope: ReadonlyArray<string> | undefined | null,-): PartnerDeployment[] {- const result: PartnerDeployment[] = ['CLOUD'];- if (partnerScope?.includes('HOSTING')) result.push('SELF_HOST');- return result;-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/utils/derive-region.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/utils/derive-region.tsdeleted file mode 100644index fa6bf077616..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/utils/derive-region.ts+++ /dev/null@@ -1,23 +0,0 @@-// Static country → region lookup. Six regions match the Partner.region options.-// Applied once when an application record is created; admins can override in CRM.-export type PartnerRegion = 'EUROPE' | 'US' | 'LATAM' | 'MENA' | 'APAC' | 'AFRICA';--const REGION_COUNTRIES: Record<PartnerRegion, readonly string[]> = {- EUROPE: ['ALBANIA','ANDORRA','ARMENIA','AUSTRIA','AZERBAIJAN','BELARUS','BELGIUM','BOSNIA_AND_HERZEGOVINA','BULGARIA','CROATIA','CYPRUS','CZECH_REPUBLIC','DENMARK','ESTONIA','FINLAND','FRANCE','GEORGIA','GERMANY','GREECE','HUNGARY','ICELAND','IRELAND','ITALY','KOSOVO','LATVIA','LIECHTENSTEIN','LITHUANIA','LUXEMBOURG','MALTA','MOLDOVA','MONACO','MONTENEGRO','NETHERLANDS','NORTH_MACEDONIA','NORWAY','POLAND','PORTUGAL','ROMANIA','RUSSIA','SAN_MARINO','SERBIA','SLOVAKIA','SLOVENIA','SPAIN','SWEDEN','SWITZERLAND','UKRAINE','UNITED_KINGDOM','VATICAN'],- US: ['CANADA','UNITED_STATES'],- LATAM: ['ANTIGUA_AND_BARBUDA','ARGENTINA','BAHAMAS','BARBADOS','BELIZE','BOLIVIA','BRAZIL','CHILE','COLOMBIA','COSTA_RICA','CUBA','DOMINICA','DOMINICAN_REPUBLIC','ECUADOR','EL_SALVADOR','GRENADA','GUATEMALA','GUYANA','HAITI','HONDURAS','JAMAICA','MEXICO','NICARAGUA','PANAMA','PARAGUAY','PERU','SAINT_KITTS_AND_NEVIS','SAINT_LUCIA','SAINT_VINCENT','SURINAME','TRINIDAD_AND_TOBAGO','URUGUAY','VENEZUELA'],- MENA: ['ALGERIA','BAHRAIN','EGYPT','IRAN','IRAQ','ISRAEL','JORDAN','KUWAIT','LEBANON','LIBYA','MAURITANIA','MOROCCO','OMAN','PALESTINE','QATAR','SAUDI_ARABIA','SUDAN','SYRIA','TUNISIA','TURKEY','UNITED_ARAB_EMIRATES','YEMEN'],- APAC: ['AFGHANISTAN','AUSTRALIA','BANGLADESH','BHUTAN','BRUNEI','CAMBODIA','CHINA','FIJI','INDIA','INDONESIA','JAPAN','KAZAKHSTAN','KIRIBATI','KYRGYZSTAN','LAOS','MALAYSIA','MALDIVES','MARSHALL_ISLANDS','MICRONESIA','MONGOLIA','MYANMAR','NAURU','NEPAL','NEW_ZEALAND','NORTH_KOREA','PAKISTAN','PALAU','PAPUA_NEW_GUINEA','PHILIPPINES','SAMOA','SINGAPORE','SOLOMON_ISLANDS','SOUTH_KOREA','SRI_LANKA','TAIWAN','TAJIKISTAN','THAILAND','TIMOR_LESTE','TONGA','TURKMENISTAN','TUVALU','UZBEKISTAN','VANUATU','VIETNAM'],- AFRICA: ['ANGOLA','BENIN','BOTSWANA','BURKINA_FASO','BURUNDI','CAMEROON','CAPE_VERDE','CENTRAL_AFRICAN_REPUBLIC','CHAD','COMOROS','CONGO','DR_CONGO','DJIBOUTI','EQUATORIAL_GUINEA','ERITREA','ESWATINI','ETHIOPIA','GABON','GAMBIA','GHANA','GUINEA','GUINEA_BISSAU','IVORY_COAST','KENYA','LESOTHO','LIBERIA','MADAGASCAR','MALAWI','MALI','MAURITIUS','MOZAMBIQUE','NAMIBIA','NIGER','NIGERIA','RWANDA','SAO_TOME_AND_PRINCIPE','SENEGAL','SEYCHELLES','SIERRA_LEONE','SOMALIA','SOUTH_AFRICA','SOUTH_SUDAN','TANZANIA','TOGO','UGANDA','ZAMBIA','ZIMBABWE'],-};--export const COUNTRY_TO_REGION: Record<string, PartnerRegion> = Object.fromEntries(- (Object.entries(REGION_COUNTRIES) as [PartnerRegion, readonly string[]][]).flatMap(- ([region, countries]) => countries.map((country) => [country, region]),- ),-);--export function deriveRegion(country: string | undefined | null): PartnerRegion | null {- if (!country) return null;- return COUNTRY_TO_REGION[country] ?? null;-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/views/partner-applications.view.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/views/partner-applications.view.tsdeleted file mode 100644index 5fd3f2cba88..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/application-intake/views/partner-applications.view.ts+++ /dev/null@@ -1,121 +0,0 @@-import {- ViewFilterOperand,- ViewSortDirection,- ViewType,- defineView,- getFieldUniversalIdentifier,-} from 'twenty-sdk/define';--import {- PARTNER_COUNTRY_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_NAME_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_SCOPE_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_TWENTY_EXPERIENCE_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_TWENTY_EXPERIENCE_NOTES_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_TWENTY_EXPERIENCE_PROOF_LINK_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_VALIDATION_STAGE_FIELD_UNIVERSAL_IDENTIFIER,-} from 'src/modules/partner/constants/partner-field-universal-identifiers';-import {- APPLICATION_UNIVERSAL_IDENTIFIER,- PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,-} from 'src/constants/universal-identifiers';-import { PARTNER_USER_ON_PARTNER_FIELD_ID } from 'src/modules/partner/fields/partner-user-on-partner.field';--export const PARTNER_APPLICATIONS_VIEW_UNIVERSAL_IDENTIFIER =- '8d8fc77b-77df-4eeb-9e0c-6409efd30a9c';--// createdAt is a reserved system field auto-created on the partner object; the-// server derives its universal identifier deterministically, so resolve it the-// same way rather than hardcoding a value that would drift.-const PARTNER_CREATED_AT_FIELD_ID = getFieldUniversalIdentifier({- applicationUniversalIdentifier: APPLICATION_UNIVERSAL_IDENTIFIER,- objectUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- name: 'createdAt',-});--export default defineView({- universalIdentifier: PARTNER_APPLICATIONS_VIEW_UNIVERSAL_IDENTIFIER,- name: 'Partner Applications',- icon: 'IconInbox',- objectUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- type: ViewType.TABLE,- position: 2,- fields: [- {- universalIdentifier: 'cc7286fd-b37a-467a-a21a-47140f910137',- fieldMetadataUniversalIdentifier: PARTNER_NAME_FIELD_UNIVERSAL_IDENTIFIER,- position: 0,- isVisible: true,- size: 200,- },- {- universalIdentifier: 'c145da29-b040-4070-a726-562460b315c3',- fieldMetadataUniversalIdentifier:- PARTNER_COUNTRY_FIELD_UNIVERSAL_IDENTIFIER,- position: 1,- isVisible: true,- },- {- universalIdentifier: '88d68442-514d-43a5-b974-8aa22b65cac8',- fieldMetadataUniversalIdentifier:- PARTNER_SCOPE_FIELD_UNIVERSAL_IDENTIFIER,- position: 2,- isVisible: true,- size: 200,- },- {- universalIdentifier: '1bb5fa0a-7724-4b72-812b-494e3cda7e9a',- fieldMetadataUniversalIdentifier:- PARTNER_TWENTY_EXPERIENCE_FIELD_UNIVERSAL_IDENTIFIER,- position: 3,- isVisible: true,- size: 220,- },- {- universalIdentifier: '5f520664-38ba-4151-b1b8-3dfe7b640707',- fieldMetadataUniversalIdentifier:- PARTNER_TWENTY_EXPERIENCE_NOTES_FIELD_UNIVERSAL_IDENTIFIER,- position: 4,- isVisible: true,- size: 280,- },- {- universalIdentifier: '2cb2cbe2-887a-4f7b-8aef-d44af8c4de96',- fieldMetadataUniversalIdentifier:- PARTNER_TWENTY_EXPERIENCE_PROOF_LINK_FIELD_UNIVERSAL_IDENTIFIER,- position: 5,- isVisible: true,- size: 240,- },- {- universalIdentifier: '835c9a7e-72ec-46c5-8d90-39a02998f561',- fieldMetadataUniversalIdentifier: PARTNER_CREATED_AT_FIELD_ID,- position: 6,- isVisible: true,- size: 180,- },- {- universalIdentifier: '0175e169-377c-4ff5-b0f0-c3359cac48d9',- fieldMetadataUniversalIdentifier: PARTNER_USER_ON_PARTNER_FIELD_ID,- position: 7,- isVisible: true,- size: 200,- },- ],- filters: [- {- universalIdentifier: 'a1ef0bcd-6f2c-44fc-ab3d-11df2523a952',- fieldMetadataUniversalIdentifier:- PARTNER_VALIDATION_STAGE_FIELD_UNIVERSAL_IDENTIFIER,- operand: ViewFilterOperand.IS,- value: ['APPLICATION'],- },- ],- sorts: [- {- universalIdentifier: '5224d99e-32f4-4900-8e6c-e01d4979a2bd',- fieldMetadataUniversalIdentifier: PARTNER_CREATED_AT_FIELD_ID,- direction: ViewSortDirection.DESC,- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/constants/partner-country-view-groups.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/constants/partner-country-view-groups.tsdeleted file mode 100644index 938565ee60e..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/constants/partner-country-view-groups.ts+++ /dev/null@@ -1,200 +0,0 @@-// View groups for Partner country SELECT options (used by Partners per Country view).-export const PARTNER_COUNTRY_VIEW_GROUPS = [- { universalIdentifier: 'bec9ce01-82dc-44ea-956c-ec71f98ec9c5', fieldValue: 'AFGHANISTAN', position: 0, isVisible: true },- { universalIdentifier: 'cab68d7f-af98-4053-b74f-39b7f8c85085', fieldValue: 'ALBANIA', position: 1, isVisible: true },- { universalIdentifier: 'f80516ad-0e2b-48a5-b2f1-fe1ee5a3f167', fieldValue: 'ALGERIA', position: 2, isVisible: true },- { universalIdentifier: 'f06c7e69-69ac-4582-9ab7-4f46186881c8', fieldValue: 'ANDORRA', position: 3, isVisible: true },- { universalIdentifier: 'fa2ad275-0e16-4292-bec5-532e024abb5e', fieldValue: 'ANGOLA', position: 4, isVisible: true },- { universalIdentifier: '78ca3412-1aa7-46b6-99ab-674e67cb744e', fieldValue: 'ANTIGUA_AND_BARBUDA', position: 5, isVisible: true },- { universalIdentifier: 'e3b178b4-324a-433e-b115-9c26c25b9319', fieldValue: 'ARGENTINA', position: 6, isVisible: true },- { universalIdentifier: '9aaf859f-7373-467b-b596-80ad083ede41', fieldValue: 'ARMENIA', position: 7, isVisible: true },- { universalIdentifier: 'a6c2e65c-ae98-44f9-863d-ff028a79fbdc', fieldValue: 'AUSTRALIA', position: 8, isVisible: true },- { universalIdentifier: 'ec504505-451e-4754-a563-70ed24df4fc4', fieldValue: 'AUSTRIA', position: 9, isVisible: true },- { universalIdentifier: 'd04dfb9b-2be9-4f39-b6a1-1fbb43d63a85', fieldValue: 'AZERBAIJAN', position: 10, isVisible: true },- { universalIdentifier: '1daede22-9ef5-494d-837f-4aeb49313f27', fieldValue: 'BAHAMAS', position: 11, isVisible: true },- { universalIdentifier: 'ceeb605d-1872-4861-b018-c055e9ffedd6', fieldValue: 'BAHRAIN', position: 12, isVisible: true },- { universalIdentifier: '7e3ddf1b-71e8-4614-b4e5-234e1b382ad4', fieldValue: 'BANGLADESH', position: 13, isVisible: true },- { universalIdentifier: '1c9e2f46-29f5-428d-88f4-e3918a0d2fb4', fieldValue: 'BARBADOS', position: 14, isVisible: true },- { universalIdentifier: 'abc76de1-a845-4cf4-94e7-f7329a2ad9e8', fieldValue: 'BELARUS', position: 15, isVisible: true },- { universalIdentifier: 'eec4351f-bbd7-4db5-bb93-376c6665aeac', fieldValue: 'BELGIUM', position: 16, isVisible: true },- { universalIdentifier: 'a443da7a-0183-491f-9209-3628a6c5b952', fieldValue: 'BELIZE', position: 17, isVisible: true },- { universalIdentifier: 'b571b502-b87f-449c-827c-e9fdc60d90a0', fieldValue: 'BENIN', position: 18, isVisible: true },- { universalIdentifier: '01ea25fc-6396-4139-a684-5f8ad079f88a', fieldValue: 'BHUTAN', position: 19, isVisible: true },- { universalIdentifier: '59e72a15-4a4b-4b9b-a2c2-0ce72749001d', fieldValue: 'BOLIVIA', position: 20, isVisible: true },- { universalIdentifier: '3f09c2bb-e832-4145-b9e2-a7ccd3bb1d80', fieldValue: 'BOSNIA_AND_HERZEGOVINA', position: 21, isVisible: true },- { universalIdentifier: 'a3945b75-964f-4f4a-940e-070dd53f4305', fieldValue: 'BOTSWANA', position: 22, isVisible: true },- { universalIdentifier: '595c7768-9d21-4c8e-a9d6-481e7d680561', fieldValue: 'BRAZIL', position: 23, isVisible: true },- { universalIdentifier: '6119b726-e21a-4488-b510-654f1941fc25', fieldValue: 'BRUNEI', position: 24, isVisible: true },- { universalIdentifier: '413688ac-849f-420e-80d5-c784b9da6c5a', fieldValue: 'BULGARIA', position: 25, isVisible: true },- { universalIdentifier: '7e1424cd-92b6-4f0a-bf1b-539c02c1a4ca', fieldValue: 'BURKINA_FASO', position: 26, isVisible: true },- { universalIdentifier: 'b26dfa82-37f0-4a30-99dd-70048dff75d4', fieldValue: 'BURUNDI', position: 27, isVisible: true },- { universalIdentifier: '33f7faaa-d02c-405d-8008-6612b7eae2ea', fieldValue: 'CAMBODIA', position: 28, isVisible: true },- { universalIdentifier: 'd59d8e89-85b8-44c6-ae18-cbc6c9c6157a', fieldValue: 'CAMEROON', position: 29, isVisible: true },- { universalIdentifier: '238d0439-0abc-4912-879d-c88dac3f25bb', fieldValue: 'CANADA', position: 30, isVisible: true },- { universalIdentifier: '9029f890-d971-4a21-8378-4e7b41e69c59', fieldValue: 'CAPE_VERDE', position: 31, isVisible: true },- { universalIdentifier: 'e8ae400d-33c3-4076-8d43-8c3d196383b2', fieldValue: 'CENTRAL_AFRICAN_REPUBLIC', position: 32, isVisible: true },- { universalIdentifier: '8657ddfa-8720-44db-b023-5f95e2dadea7', fieldValue: 'CHAD', position: 33, isVisible: true },- { universalIdentifier: 'df3b7c7f-864c-4275-9dd9-b75390c4ecb6', fieldValue: 'CHILE', position: 34, isVisible: true },- { universalIdentifier: '43967606-e659-44ff-b41b-2e8f8735e3ba', fieldValue: 'CHINA', position: 35, isVisible: true },- { universalIdentifier: '3241ff55-3a7c-4260-97ee-a161827529e3', fieldValue: 'COLOMBIA', position: 36, isVisible: true },- { universalIdentifier: '6f4b1cd2-bdde-40d3-b6ca-364a35b470cd', fieldValue: 'COMOROS', position: 37, isVisible: true },- { universalIdentifier: '399d2f2c-9607-4115-8d22-b06143f3c654', fieldValue: 'CONGO', position: 38, isVisible: true },- { universalIdentifier: '83b9ebfe-ea23-46e1-a2d9-2ae5c0b0247d', fieldValue: 'DR_CONGO', position: 39, isVisible: true },- { universalIdentifier: '4730c5db-e6b9-4c6e-9840-4650c83f6d15', fieldValue: 'COSTA_RICA', position: 40, isVisible: true },- { universalIdentifier: '6980c7bc-e433-4014-a60a-1b85fe476329', fieldValue: 'CROATIA', position: 41, isVisible: true },- { universalIdentifier: '0487f083-7be7-4f42-9be6-fa264e1fccc1', fieldValue: 'CUBA', position: 42, isVisible: true },- { universalIdentifier: '27978a7a-3b4a-4f76-84a4-cf3fc2d8b9d3', fieldValue: 'CYPRUS', position: 43, isVisible: true },- { universalIdentifier: '63ecd55b-9e2f-4440-9de9-cee767c1a65f', fieldValue: 'CZECH_REPUBLIC', position: 44, isVisible: true },- { universalIdentifier: 'e5237f50-80df-4fa7-be56-3305df24bfa4', fieldValue: 'DENMARK', position: 45, isVisible: true },- { universalIdentifier: 'd3796fbe-f883-4545-b694-6675ed18df48', fieldValue: 'DJIBOUTI', position: 46, isVisible: true },- { universalIdentifier: '463907d1-2e6b-45d4-a95d-384cc1be135a', fieldValue: 'DOMINICA', position: 47, isVisible: true },- { universalIdentifier: '3193e60a-5f96-45a8-9bb1-7f944668e66f', fieldValue: 'DOMINICAN_REPUBLIC', position: 48, isVisible: true },- { universalIdentifier: '454ed601-8ba7-43af-8015-8063582a8ee6', fieldValue: 'ECUADOR', position: 49, isVisible: true },- { universalIdentifier: '946c67d4-3909-4987-a436-f57c22d25c5b', fieldValue: 'EGYPT', position: 50, isVisible: true },- { universalIdentifier: 'cb2ac070-2f7d-4a6f-a5cb-91caa64f02d3', fieldValue: 'EL_SALVADOR', position: 51, isVisible: true },- { universalIdentifier: 'adda54b9-688f-44a8-b0e8-d0090ee92730', fieldValue: 'EQUATORIAL_GUINEA', position: 52, isVisible: true },- { universalIdentifier: '163dffe3-cffe-40d3-be0d-1b656a74e70a', fieldValue: 'ERITREA', position: 53, isVisible: true },- { universalIdentifier: 'ca045699-c53d-4936-863c-92adf9188761', fieldValue: 'ESTONIA', position: 54, isVisible: true },- { universalIdentifier: 'b2c3e590-7f74-42b6-aa76-dd59a486df07', fieldValue: 'ESWATINI', position: 55, isVisible: true },- { universalIdentifier: 'cdde3faf-852b-4cfe-a2e6-227b3c9597a9', fieldValue: 'ETHIOPIA', position: 56, isVisible: true },- { universalIdentifier: '7f18b15c-e259-454e-9d57-3e09ee6b3cae', fieldValue: 'FIJI', position: 57, isVisible: true },- { universalIdentifier: '0c079db6-50f0-4d36-860a-709a5bf0eae4', fieldValue: 'FINLAND', position: 58, isVisible: true },- { universalIdentifier: '626ca163-5891-4008-bfa0-a45622e9f07b', fieldValue: 'FRANCE', position: 59, isVisible: true },- { universalIdentifier: '03775693-fb9a-4669-a483-82602d5f55f3', fieldValue: 'GABON', position: 60, isVisible: true },- { universalIdentifier: 'd3635f3e-6411-477f-8cca-a4d89aa3ac72', fieldValue: 'GAMBIA', position: 61, isVisible: true },- { universalIdentifier: '6ed7108f-f4dd-468e-a0d0-474b18395d35', fieldValue: 'GEORGIA', position: 62, isVisible: true },- { universalIdentifier: 'e46e10d5-2761-423e-9a93-c6ddb6e39bed', fieldValue: 'GERMANY', position: 63, isVisible: true },- { universalIdentifier: 'a291a984-df0f-4ec9-bb18-6e72c56abe6f', fieldValue: 'GHANA', position: 64, isVisible: true },- { universalIdentifier: '03c206fa-ad03-4c9a-8ae9-449bf2f1b41c', fieldValue: 'GREECE', position: 65, isVisible: true },- { universalIdentifier: '3030f50e-93da-404b-b6db-8cc8c95049e7', fieldValue: 'GRENADA', position: 66, isVisible: true },- { universalIdentifier: 'ae0def27-cd71-482d-a7ce-5fa198c07865', fieldValue: 'GUATEMALA', position: 67, isVisible: true },- { universalIdentifier: '7a377c20-4409-4237-8157-5db03d70924a', fieldValue: 'GUINEA', position: 68, isVisible: true },- { universalIdentifier: 'a79e13d5-6fca-44c4-bd32-e92176664d9e', fieldValue: 'GUINEA_BISSAU', position: 69, isVisible: true },- { universalIdentifier: 'dbadd3d2-4c7e-4023-8a42-df52e00e1155', fieldValue: 'GUYANA', position: 70, isVisible: true },- { universalIdentifier: '33808d5a-0ef4-4187-84e8-c54f4bad3b1c', fieldValue: 'HAITI', position: 71, isVisible: true },- { universalIdentifier: '5e67be53-20c4-43e5-9a03-89f2ba62c969', fieldValue: 'HONDURAS', position: 72, isVisible: true },- { universalIdentifier: '46ebb616-55c9-449f-984c-75aade26f78e', fieldValue: 'HUNGARY', position: 73, isVisible: true },- { universalIdentifier: '97edc7d0-e3a2-4bf2-8cba-f69162c5789b', fieldValue: 'ICELAND', position: 74, isVisible: true },- { universalIdentifier: 'f408bb78-90db-4b46-bf0c-b0f42eaf180c', fieldValue: 'INDIA', position: 75, isVisible: true },- { universalIdentifier: '4bafacbc-c78d-476b-8b67-44567087c174', fieldValue: 'INDONESIA', position: 76, isVisible: true },- { universalIdentifier: 'e0713b85-7062-4e98-b907-19c241d5003d', fieldValue: 'IRAN', position: 77, isVisible: true },- { universalIdentifier: '88c211c6-7410-4275-ac91-1fd410cdcc76', fieldValue: 'IRAQ', position: 78, isVisible: true },- { universalIdentifier: '3777a8be-0cb6-4388-a666-d1279ea274a7', fieldValue: 'IRELAND', position: 79, isVisible: true },- { universalIdentifier: '710c5936-b2bf-4327-a612-3468bbd79fcc', fieldValue: 'ISRAEL', position: 80, isVisible: true },- { universalIdentifier: '23c16f00-3cdd-42e6-964f-9fddd25b2977', fieldValue: 'ITALY', position: 81, isVisible: true },- { universalIdentifier: '63d408d9-e9d8-49f5-8f64-be99cd43f152', fieldValue: 'IVORY_COAST', position: 82, isVisible: true },- { universalIdentifier: 'e412b80c-94bd-4615-9020-cd2c881543b4', fieldValue: 'JAMAICA', position: 83, isVisible: true },- { universalIdentifier: '9570bc3f-6fcb-47b1-a5e8-4cfe19eadec0', fieldValue: 'JAPAN', position: 84, isVisible: true },- { universalIdentifier: 'ed7b3c7d-22e7-4089-b2ba-04b9dac5a0d4', fieldValue: 'JORDAN', position: 85, isVisible: true },- { universalIdentifier: 'c784fbb9-f068-45e4-85f9-6201b9f8f4dc', fieldValue: 'KAZAKHSTAN', position: 86, isVisible: true },- { universalIdentifier: '8fa80675-d39a-4eff-819b-fc3a2915ab00', fieldValue: 'KENYA', position: 87, isVisible: true },- { universalIdentifier: '541feab5-3335-420b-9a88-2d5c8af512f3', fieldValue: 'KIRIBATI', position: 88, isVisible: true },- { universalIdentifier: 'f884db4f-ed0a-45b6-ad8e-3ed25e20ee5e', fieldValue: 'KOSOVO', position: 89, isVisible: true },- { universalIdentifier: '516860c7-a95c-4794-9f62-e21e9f2e7c84', fieldValue: 'KUWAIT', position: 90, isVisible: true },- { universalIdentifier: '57c9389c-403b-4e2a-ad1b-d00824796c5b', fieldValue: 'KYRGYZSTAN', position: 91, isVisible: true },- { universalIdentifier: '426f38a5-27fe-47ef-9c68-0e930df028c7', fieldValue: 'LAOS', position: 92, isVisible: true },- { universalIdentifier: 'e7932bb3-f43d-4442-9df8-15e1a5f528d4', fieldValue: 'LATVIA', position: 93, isVisible: true },- { universalIdentifier: '5519dbdc-cc26-435b-8953-100778bf0e89', fieldValue: 'LEBANON', position: 94, isVisible: true },- { universalIdentifier: '05ba6abc-7c6d-4fb9-8a05-7e4582346ce4', fieldValue: 'LESOTHO', position: 95, isVisible: true },- { universalIdentifier: '3056b7c7-e864-40e3-a3cb-8e53dcfe2107', fieldValue: 'LIBERIA', position: 96, isVisible: true },- { universalIdentifier: '5214650d-5039-4190-851e-1a8f8befec0f', fieldValue: 'LIBYA', position: 97, isVisible: true },- { universalIdentifier: '3efd49bf-e1d1-406b-89b8-0fde5e8daf89', fieldValue: 'LIECHTENSTEIN', position: 98, isVisible: true },- { universalIdentifier: 'c3ec85cf-1999-4b09-90d6-df1617720d78', fieldValue: 'LITHUANIA', position: 99, isVisible: true },- { universalIdentifier: '5063c42e-6e66-4288-bfa1-cb53488b1777', fieldValue: 'LUXEMBOURG', position: 100, isVisible: true },- { universalIdentifier: '0e3dfe47-3aa1-43e3-83ba-ec817cff5e5e', fieldValue: 'MADAGASCAR', position: 101, isVisible: true },- { universalIdentifier: 'bfc94100-2383-4d5d-a4e3-2c222865e58b', fieldValue: 'MALAWI', position: 102, isVisible: true },- { universalIdentifier: 'd0bcaf24-c514-407d-9832-3cb5bd4eb096', fieldValue: 'MALAYSIA', position: 103, isVisible: true },- { universalIdentifier: 'ee8c64f2-51d5-40d1-a390-e5662754396a', fieldValue: 'MALDIVES', position: 104, isVisible: true },- { universalIdentifier: '00f9fbc4-c16a-404b-9fef-84e0af27a9e2', fieldValue: 'MALI', position: 105, isVisible: true },- { universalIdentifier: 'ad3bcf45-1d9c-49c7-b632-894a368a96ee', fieldValue: 'MALTA', position: 106, isVisible: true },- { universalIdentifier: '5aee9765-813e-4ddc-b2e5-331c0f28b844', fieldValue: 'MARSHALL_ISLANDS', position: 107, isVisible: true },- { universalIdentifier: 'eddf67e4-2fec-4ca6-8559-94f9e962aa1c', fieldValue: 'MAURITANIA', position: 108, isVisible: true },- { universalIdentifier: 'a5b2fd01-26f6-453a-9204-5698ba9892fc', fieldValue: 'MAURITIUS', position: 109, isVisible: true },- { universalIdentifier: '79535491-7e96-4aea-800f-58fcdc2b301b', fieldValue: 'MEXICO', position: 110, isVisible: true },- { universalIdentifier: 'e0ff2d9d-fb4d-45ef-b630-edc4a3b87aa6', fieldValue: 'MICRONESIA', position: 111, isVisible: true },- { universalIdentifier: '1b90ee06-8216-4845-b86f-d3fda73826bf', fieldValue: 'MOLDOVA', position: 112, isVisible: true },- { universalIdentifier: '006b65d4-aed8-4a4d-b6b4-0288fafa4e3f', fieldValue: 'MONACO', position: 113, isVisible: true },- { universalIdentifier: '93033c57-9254-46a6-8380-7b356d133863', fieldValue: 'MONGOLIA', position: 114, isVisible: true },- { universalIdentifier: '2d67c336-a1c6-4305-a599-50438309dd44', fieldValue: 'MONTENEGRO', position: 115, isVisible: true },- { universalIdentifier: 'c1f2c641-75ea-402f-a6a5-5a436528988d', fieldValue: 'MOROCCO', position: 116, isVisible: true },- { universalIdentifier: '47e96908-62fa-4a87-bacd-d5d91262e3de', fieldValue: 'MOZAMBIQUE', position: 117, isVisible: true },- { universalIdentifier: '331dde1b-b3e4-414b-aaa1-0bb41c790f5e', fieldValue: 'MYANMAR', position: 118, isVisible: true },- { universalIdentifier: '6df3d4a8-f183-43ad-8385-fc33315c1c6b', fieldValue: 'NAMIBIA', position: 119, isVisible: true },- { universalIdentifier: '76e96d43-5efc-4bbf-aa9d-8c7edfe78ef9', fieldValue: 'NAURU', position: 120, isVisible: true },- { universalIdentifier: 'c3ac3737-62f5-4725-b644-203f89ece709', fieldValue: 'NEPAL', position: 121, isVisible: true },- { universalIdentifier: '7a80a0a2-d753-41fb-a257-338a2ae801bd', fieldValue: 'NETHERLANDS', position: 122, isVisible: true },- { universalIdentifier: '91bc37fe-f039-44ed-873b-69ab1d08ae03', fieldValue: 'NEW_ZEALAND', position: 123, isVisible: true },- { universalIdentifier: '5c21b7f4-1685-4c20-bc41-3bbcabfcea07', fieldValue: 'NICARAGUA', position: 124, isVisible: true },- { universalIdentifier: 'e31564c8-4595-40d9-ad27-83ff8ef40a5c', fieldValue: 'NIGER', position: 125, isVisible: true },- { universalIdentifier: 'a2685d3b-ed97-4d89-a195-ba6c5ac391f4', fieldValue: 'NIGERIA', position: 126, isVisible: true },- { universalIdentifier: '29271340-e20f-4cfd-ad80-9c7c5000c9a8', fieldValue: 'NORTH_KOREA', position: 127, isVisible: true },- { universalIdentifier: 'a8cdf067-9b50-41df-bfc3-3162684d3645', fieldValue: 'NORTH_MACEDONIA', position: 128, isVisible: true },- { universalIdentifier: 'ccf9e960-f7ac-4ca3-b533-4ad217b63cf3', fieldValue: 'NORWAY', position: 129, isVisible: true },- { universalIdentifier: '5f2a732b-d24e-4e98-8f36-76b213c3d525', fieldValue: 'OMAN', position: 130, isVisible: true },- { universalIdentifier: 'be838c6a-cfe7-4213-91e1-0465bd77bb68', fieldValue: 'PAKISTAN', position: 131, isVisible: true },- { universalIdentifier: '0d98c911-5cea-48c4-b7e0-2a33f99eda8c', fieldValue: 'PALAU', position: 132, isVisible: true },- { universalIdentifier: '0fae476b-504b-4224-a586-2c718f17315b', fieldValue: 'PALESTINE', position: 133, isVisible: true },- { universalIdentifier: '3affd474-11f7-4c08-a15e-d46e8a645652', fieldValue: 'PANAMA', position: 134, isVisible: true },- { universalIdentifier: '4b5bd270-89ce-4fab-9067-587e60df1ced', fieldValue: 'PAPUA_NEW_GUINEA', position: 135, isVisible: true },- { universalIdentifier: '2c50c6f6-1b98-42df-8cd0-953c8e3bfe69', fieldValue: 'PARAGUAY', position: 136, isVisible: true },- { universalIdentifier: 'c8db5b67-86f3-4ee7-b902-ea7e48048d3f', fieldValue: 'PERU', position: 137, isVisible: true },- { universalIdentifier: '30df30ca-6467-4870-a53b-af489d78ee91', fieldValue: 'PHILIPPINES', position: 138, isVisible: true },- { universalIdentifier: '8279524a-f2e0-46cf-a67f-47cf4ba89929', fieldValue: 'POLAND', position: 139, isVisible: true },- { universalIdentifier: '57beab1e-0055-4b69-b677-b349ed5adf29', fieldValue: 'PORTUGAL', position: 140, isVisible: true },- { universalIdentifier: '0c843bdb-578d-4df5-9e1f-d4821f4ac599', fieldValue: 'QATAR', position: 141, isVisible: true },- { universalIdentifier: '877c29f4-90a9-4790-9a7a-bc88719311ce', fieldValue: 'ROMANIA', position: 142, isVisible: true },- { universalIdentifier: '1ac3228f-4dd0-47c1-86ff-74fcd850734f', fieldValue: 'RUSSIA', position: 143, isVisible: true },- { universalIdentifier: '82237520-5759-4e52-a3ea-e7b4c3d53f99', fieldValue: 'RWANDA', position: 144, isVisible: true },- { universalIdentifier: '5639c663-897f-4276-99dc-8f8f1bd36cc5', fieldValue: 'SAINT_KITTS_AND_NEVIS', position: 145, isVisible: true },- { universalIdentifier: 'ae39a8ed-75a0-4278-9d18-9a7b21ec1aee', fieldValue: 'SAINT_LUCIA', position: 146, isVisible: true },- { universalIdentifier: '2d1c2b6e-de6c-439e-b764-aabfa0b9d708', fieldValue: 'SAINT_VINCENT', position: 147, isVisible: true },- { universalIdentifier: '767ad987-9238-496f-9c91-23ea7f825048', fieldValue: 'SAMOA', position: 148, isVisible: true },- { universalIdentifier: '5bf0b730-456b-4b74-8c86-1c574dcf9c4a', fieldValue: 'SAN_MARINO', position: 149, isVisible: true },- { universalIdentifier: 'fb574fcf-7c32-4286-a588-149fb7febd53', fieldValue: 'SAO_TOME_AND_PRINCIPE', position: 150, isVisible: true },- { universalIdentifier: 'fc8c123a-3976-4b38-a1bd-fa75ffbbea2f', fieldValue: 'SAUDI_ARABIA', position: 151, isVisible: true },- { universalIdentifier: '891a686a-6c35-4940-a9d8-350bf414421f', fieldValue: 'SENEGAL', position: 152, isVisible: true },- { universalIdentifier: '065a6bc6-07da-46b9-ac58-b9fd14b828b2', fieldValue: 'SERBIA', position: 153, isVisible: true },- { universalIdentifier: '0f8160a4-8a95-46a8-902b-d998ea3ddaf7', fieldValue: 'SEYCHELLES', position: 154, isVisible: true },- { universalIdentifier: '9cf38c93-536a-4e6d-a552-e82b4c7c6edf', fieldValue: 'SIERRA_LEONE', position: 155, isVisible: true },- { universalIdentifier: '58607f5c-6ddc-4f8a-a866-7314c145e53a', fieldValue: 'SINGAPORE', position: 156, isVisible: true },- { universalIdentifier: 'd591dc9e-76c4-405f-b548-657d8fe9721a', fieldValue: 'SLOVAKIA', position: 157, isVisible: true },- { universalIdentifier: 'dfcffa17-85b4-4635-99fd-c96ef124531e', fieldValue: 'SLOVENIA', position: 158, isVisible: true },- { universalIdentifier: 'dd65e06e-c4dc-454d-8728-2dcec04d5f80', fieldValue: 'SOLOMON_ISLANDS', position: 159, isVisible: true },- { universalIdentifier: '458f0d37-7905-41bc-93b7-1591072c8d60', fieldValue: 'SOMALIA', position: 160, isVisible: true },- { universalIdentifier: 'e10ec565-6dea-479c-9105-7ebf11522a51', fieldValue: 'SOUTH_AFRICA', position: 161, isVisible: true },- { universalIdentifier: 'c71d7fe0-e000-4180-b943-ceb00f4a8355', fieldValue: 'SOUTH_KOREA', position: 162, isVisible: true },- { universalIdentifier: '073df894-207b-4375-b70c-7289c7a513b9', fieldValue: 'SOUTH_SUDAN', position: 163, isVisible: true },- { universalIdentifier: '746102f0-656d-4cb9-9193-4d8d7855dead', fieldValue: 'SPAIN', position: 164, isVisible: true },- { universalIdentifier: '1fb4d075-f777-4dd8-ba7c-6bd666338656', fieldValue: 'SRI_LANKA', position: 165, isVisible: true },- { universalIdentifier: '74e3afbd-c31d-4580-a815-ccd839b65f8c', fieldValue: 'SUDAN', position: 166, isVisible: true },- { universalIdentifier: 'a7c8fd33-5f0d-43a2-9edc-7c39b70b0a40', fieldValue: 'SURINAME', position: 167, isVisible: true },- { universalIdentifier: '2214a204-60f3-423c-a753-3f7b4748a177', fieldValue: 'SWEDEN', position: 168, isVisible: true },- { universalIdentifier: 'ca7163b9-7c4d-42fe-ad79-c6b2caabf312', fieldValue: 'SWITZERLAND', position: 169, isVisible: true },- { universalIdentifier: 'ab5681cc-703f-4697-9960-b2cb20aafda1', fieldValue: 'SYRIA', position: 170, isVisible: true },- { universalIdentifier: '2f2f947d-7729-4717-bf76-3be0ea0748a8', fieldValue: 'TAIWAN', position: 171, isVisible: true },- { universalIdentifier: '4f33a711-0b6f-4442-9a29-9c02784464cb', fieldValue: 'TAJIKISTAN', position: 172, isVisible: true },- { universalIdentifier: 'e150d07b-efd0-47d5-9fdb-b6c0c0ac72ff', fieldValue: 'TANZANIA', position: 173, isVisible: true },- { universalIdentifier: '5aecbf00-b573-493a-9114-0df621195107', fieldValue: 'THAILAND', position: 174, isVisible: true },- { universalIdentifier: '7cf3c8b6-745a-4f05-9bfb-4adc8593c34d', fieldValue: 'TIMOR_LESTE', position: 175, isVisible: true },- { universalIdentifier: 'd163fc20-fd5c-4020-a748-352698decd64', fieldValue: 'TOGO', position: 176, isVisible: true },- { universalIdentifier: '94599257-2c1e-4d8c-bb13-f749b35c523a', fieldValue: 'TONGA', position: 177, isVisible: true },- { universalIdentifier: '0d6a9601-b360-4539-ac00-a691f15866d0', fieldValue: 'TRINIDAD_AND_TOBAGO', position: 178, isVisible: true },- { universalIdentifier: '8c0ee850-dc66-4237-a94f-c7d9b474b02d', fieldValue: 'TUNISIA', position: 179, isVisible: true },- { universalIdentifier: 'b0bf5dd2-2908-4135-8cc7-c76fc75eec2d', fieldValue: 'TURKEY', position: 180, isVisible: true },- { universalIdentifier: 'e1a09e61-4cf4-42fc-bf1f-67bb5af80ed6', fieldValue: 'TURKMENISTAN', position: 181, isVisible: true },- { universalIdentifier: '81cabf65-f215-432a-a5ca-6e65ed1b2686', fieldValue: 'TUVALU', position: 182, isVisible: true },- { universalIdentifier: 'ca416d97-a9a0-42ed-bb84-e833f10996f3', fieldValue: 'UGANDA', position: 183, isVisible: true },- { universalIdentifier: '458b313d-18e1-4e07-bf65-95e2e3f8a527', fieldValue: 'UKRAINE', position: 184, isVisible: true },- { universalIdentifier: 'cdc5e5bb-04b4-4f43-9fd2-1db7d9f34ce3', fieldValue: 'UNITED_ARAB_EMIRATES', position: 185, isVisible: true },- { universalIdentifier: 'd18fb05d-5dd6-4f1d-9955-037234e01302', fieldValue: 'UNITED_KINGDOM', position: 186, isVisible: true },- { universalIdentifier: '4529bb2e-2bf3-434e-b301-7e23f5c3e7ad', fieldValue: 'UNITED_STATES', position: 187, isVisible: true },- { universalIdentifier: 'a6fda962-38ad-4299-a691-73d2cdc56f4d', fieldValue: 'URUGUAY', position: 188, isVisible: true },- { universalIdentifier: 'a757ba93-8506-42c7-91a7-c470e7c2b5f2', fieldValue: 'UZBEKISTAN', position: 189, isVisible: true },- { universalIdentifier: '0d01c658-5acf-4257-9610-5580cfed2bd2', fieldValue: 'VANUATU', position: 190, isVisible: true },- { universalIdentifier: '4dbd7dca-0a25-4107-ae1f-767e262b0bb5', fieldValue: 'VATICAN', position: 191, isVisible: true },- { universalIdentifier: '10c569d7-e1f2-425f-bff7-dbbc341714df', fieldValue: 'VENEZUELA', position: 192, isVisible: true },- { universalIdentifier: '9feb92da-6868-4dad-9b26-a07500043664', fieldValue: 'VIETNAM', position: 193, isVisible: true },- { universalIdentifier: 'a713fd87-218c-4dea-a34e-20ee55e645d0', fieldValue: 'YEMEN', position: 194, isVisible: true },- { universalIdentifier: '740315fd-282f-40aa-aafe-32b177327c09', fieldValue: 'ZAMBIA', position: 195, isVisible: true },- { universalIdentifier: '26f8df31-6977-4cea-8e2d-11f414a53e62', fieldValue: 'ZIMBABWE', position: 196, isVisible: true },-] as const;diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/constants/partner-field-universal-identifiers.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/constants/partner-field-universal-identifiers.tsdeleted file mode 100644index 5e74fa61d7f..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/constants/partner-field-universal-identifiers.ts+++ /dev/null@@ -1,75 +0,0 @@-/** Partner object field universal identifiers — single source for views and roles. */-export const PARTNER_NAME_FIELD_UNIVERSAL_IDENTIFIER =- 'a0000001-0000-4000-8000-000000000001';--export const PARTNER_SLUG_FIELD_UNIVERSAL_IDENTIFIER =- 'a0000002-0000-4000-8000-000000000002';--export const PARTNER_VALIDATION_STAGE_FIELD_UNIVERSAL_IDENTIFIER =- '2ca9856f-f54a-4326-9ff3-668fd7da0b50';--export const PARTNER_AVAILABILITY_FIELD_UNIVERSAL_IDENTIFIER =- 'a0000004-0000-4000-8000-000000000004';--export const PARTNER_REGION_FIELD_UNIVERSAL_IDENTIFIER =- '560503de-6330-4c1d-af97-a8dee125f2ad';--export const PARTNER_TIER_FIELD_UNIVERSAL_IDENTIFIER =- 'd4fa6461-37b6-49ee-9181-dd482e74a70b';--export const PARTNER_SUPER_PARTNER_FIELD_UNIVERSAL_IDENTIFIER =- '44cc91d2-5da1-4442-aa92-726124351029';--export const PARTNER_PROFILE_PICTURE_FILE_FIELD_UNIVERSAL_IDENTIFIER =- '076b81f2-2398-4ece-a352-d7a6f6a89cae';--export const PARTNER_PROFILE_PICTURE_LEGACY_FIELD_UNIVERSAL_IDENTIFIER =- '40d730e3-2785-45c8-aa5f-cc724b1b08e0';--export const PARTNER_INTRODUCTION_FIELD_UNIVERSAL_IDENTIFIER =- 'a0000009-0000-4000-8000-000000000009';--export const PARTNER_SCOPE_FIELD_UNIVERSAL_IDENTIFIER =- '500021ad-ca42-4fd3-8727-392dd26b722a';--export const PARTNER_SKILLS_FIELD_UNIVERSAL_IDENTIFIER =- '6f260cc0-a860-41e6-ad40-a2ef32ecffbe';--export const PARTNER_DEPLOYMENT_EXPERTISE_FIELD_UNIVERSAL_IDENTIFIER =- 'a0000005-0000-4000-8000-000000000005';--export const PARTNER_LANGUAGES_SPOKEN_FIELD_UNIVERSAL_IDENTIFIER =- 'a0000007-0000-4000-8000-000000000007';--export const PARTNER_TYPE_OF_TEAM_FIELD_UNIVERSAL_IDENTIFIER =- 'a451e557-a488-470a-8b35-6f9b8cfb1a10';--export const PARTNER_COUNTRY_FIELD_UNIVERSAL_IDENTIFIER =- 'a77d7fa6-c398-47db-af0f-036a5c719f20';--export const PARTNER_CITY_FIELD_UNIVERSAL_IDENTIFIER =- '0a1ce916-4df5-469a-b793-30f19e45b38d';--export const PARTNER_HOURLY_RATE_FIELD_UNIVERSAL_IDENTIFIER =- '6a095709-7620-495f-b6e0-790743e412d5';--export const PARTNER_PROJECT_BUDGET_MIN_FIELD_UNIVERSAL_IDENTIFIER =- '243e9808-c070-4163-8603-ded12b03923c';--export const PARTNER_LINKEDIN_FIELD_UNIVERSAL_IDENTIFIER =- '640bbf33-45d7-4174-a862-dbe611ab8d1a';--export const PARTNER_WEBSITE_FIELD_UNIVERSAL_IDENTIFIER =- '111eb60a-6e5b-4d0f-ac0d-31e7e0ddff97';--export const PARTNER_CALENDAR_LINK_FIELD_UNIVERSAL_IDENTIFIER =- 'a0000008-0000-4000-8000-000000000008';--export const PARTNER_TWENTY_EXPERIENCE_FIELD_UNIVERSAL_IDENTIFIER =- 'd8616962-3c4b-475f-a508-a237fffde0b9';--export const PARTNER_TWENTY_EXPERIENCE_NOTES_FIELD_UNIVERSAL_IDENTIFIER =- '7a0b7526-6695-4b47-8835-d31786174fcd';--export const PARTNER_TWENTY_EXPERIENCE_PROOF_LINK_FIELD_UNIVERSAL_IDENTIFIER =- '80e9b14e-450c-467f-9c06-9a84c07c21f0';diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/constants/partner-option-values.constant.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/constants/partner-option-values.constant.tsdeleted file mode 100644index 359b9be1ae8..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/constants/partner-option-values.constant.ts+++ /dev/null@@ -1,23 +0,0 @@-export const PARTNER_COUNTRY_VALUES = [- 'AFGHANISTAN','ALBANIA','ALGERIA','ANDORRA','ANGOLA','ANTIGUA_AND_BARBUDA','ARGENTINA','ARMENIA','AUSTRALIA','AUSTRIA','AZERBAIJAN','BAHAMAS','BAHRAIN','BANGLADESH','BARBADOS','BELARUS','BELGIUM','BELIZE','BENIN','BHUTAN','BOLIVIA','BOSNIA_AND_HERZEGOVINA','BOTSWANA','BRAZIL','BRUNEI','BULGARIA','BURKINA_FASO','BURUNDI','CAMBODIA','CAMEROON','CANADA','CAPE_VERDE','CENTRAL_AFRICAN_REPUBLIC','CHAD','CHILE','CHINA','COLOMBIA','COMOROS','CONGO','DR_CONGO','COSTA_RICA','CROATIA','CUBA','CYPRUS','CZECH_REPUBLIC','DENMARK','DJIBOUTI','DOMINICA','DOMINICAN_REPUBLIC','ECUADOR','EGYPT','EL_SALVADOR','EQUATORIAL_GUINEA','ERITREA','ESTONIA','ESWATINI','ETHIOPIA','FIJI','FINLAND','FRANCE','GABON','GAMBIA','GEORGIA','GERMANY','GHANA','GREECE','GRENADA','GUATEMALA','GUINEA','GUINEA_BISSAU','GUYANA','HAITI','HONDURAS','HUNGARY','ICELAND','INDIA','INDONESIA','IRAN','IRAQ','IRELAND','ISRAEL','ITALY','IVORY_COAST','JAMAICA','JAPAN','JORDAN','KAZAKHSTAN','KENYA','KIRIBATI','KOSOVO','KUWAIT','KYRGYZSTAN','LAOS','LATVIA','LEBANON','LESOTHO','LIBERIA','LIBYA','LIECHTENSTEIN','LITHUANIA','LUXEMBOURG','MADAGASCAR','MALAWI','MALAYSIA','MALDIVES','MALI','MALTA','MARSHALL_ISLANDS','MAURITANIA','MAURITIUS','MEXICO','MICRONESIA','MOLDOVA','MONACO','MONGOLIA','MONTENEGRO','MOROCCO','MOZAMBIQUE','MYANMAR','NAMIBIA','NAURU','NEPAL','NETHERLANDS','NEW_ZEALAND','NICARAGUA','NIGER','NIGERIA','NORTH_KOREA','NORTH_MACEDONIA','NORWAY','OMAN','PAKISTAN','PALAU','PALESTINE','PANAMA','PAPUA_NEW_GUINEA','PARAGUAY','PERU','PHILIPPINES','POLAND','PORTUGAL','QATAR','ROMANIA','RUSSIA','RWANDA','SAINT_KITTS_AND_NEVIS','SAINT_LUCIA','SAINT_VINCENT','SAMOA','SAN_MARINO','SAO_TOME_AND_PRINCIPE','SAUDI_ARABIA','SENEGAL','SERBIA','SEYCHELLES','SIERRA_LEONE','SINGAPORE','SLOVAKIA','SLOVENIA','SOLOMON_ISLANDS','SOMALIA','SOUTH_AFRICA','SOUTH_KOREA','SOUTH_SUDAN','SPAIN','SRI_LANKA','SUDAN','SURINAME','SWEDEN','SWITZERLAND','SYRIA','TAIWAN','TAJIKISTAN','TANZANIA','THAILAND','TIMOR_LESTE','TOGO','TONGA','TRINIDAD_AND_TOBAGO','TUNISIA','TURKEY','TURKMENISTAN','TUVALU','UGANDA','UKRAINE','UNITED_ARAB_EMIRATES','UNITED_KINGDOM','UNITED_STATES','URUGUAY','UZBEKISTAN','VANUATU','VATICAN','VENEZUELA','VIETNAM','YEMEN','ZAMBIA','ZIMBABWE',-] as const;--export const PARTNER_LANGUAGE_VALUES = [- 'ENGLISH','FRENCH','GERMAN','SPANISH','PORTUGUESE','ITALIAN','DUTCH','ARABIC','CHINESE','JAPANESE','RUSSIAN','HINDI',-] as const;--export const PARTNER_SCOPE_VALUES = [- 'ADVISORY','SOLUTIONING','DEVELOPMENT','HOSTING','SUPPORT',-] as const;--export const PARTNER_TYPE_OF_TEAM_VALUES = ['SOLO','AGENCY'] as const;--export const TWENTY_EXPERIENCE_VALUES = [- 'CUSTOM_APPS',- 'DATA_MODELS',- 'WORKFLOWS',- 'FRONT_COMPONENTS',-] as const;--export const TWENTY_EXPERIENCE_NOTES_MIN_LENGTH = 200;-diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/navigation-menu-items/partner-content.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/navigation-menu-items/partner-content.navigation-menu-item.tsdeleted file mode 100644index 33998cb46f0..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/navigation-menu-items/partner-content.navigation-menu-item.ts+++ /dev/null@@ -1,15 +0,0 @@-import { NavigationMenuItemType, defineNavigationMenuItem } from 'twenty-sdk/define';--import {- PARTNER_CONTENT_NAV_UNIVERSAL_IDENTIFIER,- PARTNER_CONTENT_VIEW_UNIVERSAL_IDENTIFIER,-} from 'src/constants/universal-identifiers';--export default defineNavigationMenuItem({- universalIdentifier: PARTNER_CONTENT_NAV_UNIVERSAL_IDENTIFIER,- type: NavigationMenuItemType.VIEW,- icon: 'IconQuote',- position: 4,- folderUniversalIdentifier: '857be3b5-82c6-45f7-b546-e20a8a97be8d',- viewUniversalIdentifier: PARTNER_CONTENT_VIEW_UNIVERSAL_IDENTIFIER,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/navigation-menu-items/partners-folder.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/navigation-menu-items/partners-folder.navigation-menu-item.tsdeleted file mode 100644index aba7ffed0d4..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/navigation-menu-items/partners-folder.navigation-menu-item.ts+++ /dev/null@@ -1,10 +0,0 @@-import { NavigationMenuItemType, defineNavigationMenuItem } from 'twenty-sdk/define';--export default defineNavigationMenuItem({- universalIdentifier: '857be3b5-82c6-45f7-b546-e20a8a97be8d',- type: NavigationMenuItemType.FOLDER,- name: 'Partners',- icon: 'IconBuildingStore',- color: 'purple',- position: -1,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/navigation-menu-items/partners-per-country.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/navigation-menu-items/partners-per-country.navigation-menu-item.tsdeleted file mode 100644index 4bf36ae3aaa..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/navigation-menu-items/partners-per-country.navigation-menu-item.ts+++ /dev/null@@ -1,12 +0,0 @@-import { NavigationMenuItemType, defineNavigationMenuItem } from 'twenty-sdk/define';--import { PARTNERS_PER_COUNTRY_VIEW_UNIVERSAL_IDENTIFIER } from 'src/modules/partner/directory/views/partners-per-country.view';--export default defineNavigationMenuItem({- universalIdentifier: '284df145-0d35-4733-92ea-89aff788d6a9',- type: NavigationMenuItemType.VIEW,- icon: 'IconMap',- position: 2,- folderUniversalIdentifier: '857be3b5-82c6-45f7-b546-e20a8a97be8d',- viewUniversalIdentifier: PARTNERS_PER_COUNTRY_VIEW_UNIVERSAL_IDENTIFIER,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/navigation-menu-items/partners-per-stage.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/navigation-menu-items/partners-per-stage.navigation-menu-item.tsdeleted file mode 100644index c7f201cf9a5..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/navigation-menu-items/partners-per-stage.navigation-menu-item.ts+++ /dev/null@@ -1,12 +0,0 @@-import { NavigationMenuItemType, defineNavigationMenuItem } from 'twenty-sdk/define';--import { PARTNERS_PER_STAGE_VIEW_UNIVERSAL_IDENTIFIER } from 'src/modules/partner/directory/views/partners-per-stage.view';--export default defineNavigationMenuItem({- universalIdentifier: 'fa1d850b-358c-45a4-a0af-a2fb4c06e129',- type: NavigationMenuItemType.VIEW,- icon: 'IconTable',- position: 1,- folderUniversalIdentifier: '857be3b5-82c6-45f7-b546-e20a8a97be8d',- viewUniversalIdentifier: PARTNERS_PER_STAGE_VIEW_UNIVERSAL_IDENTIFIER,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/navigation-menu-items/partners-validated.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/navigation-menu-items/partners-validated.navigation-menu-item.tsdeleted file mode 100644index 6dd0cbbfb7d..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/navigation-menu-items/partners-validated.navigation-menu-item.ts+++ /dev/null@@ -1,12 +0,0 @@-import { NavigationMenuItemType, defineNavigationMenuItem } from 'twenty-sdk/define';--import { PARTNERS_VALIDATED_VIEW_UNIVERSAL_IDENTIFIER } from 'src/modules/partner/directory/views/partners-validated.view';--export default defineNavigationMenuItem({- universalIdentifier: 'c9cbe1b6-7c07-4327-bd7a-018d0ed0db33',- type: NavigationMenuItemType.VIEW,- icon: 'IconCircleCheck',- position: 3,- folderUniversalIdentifier: '857be3b5-82c6-45f7-b546-e20a8a97be8d',- viewUniversalIdentifier: PARTNERS_VALIDATED_VIEW_UNIVERSAL_IDENTIFIER,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/navigation-menu-items/super-partners.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/navigation-menu-items/super-partners.navigation-menu-item.tsdeleted file mode 100644index 8701ce72260..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/navigation-menu-items/super-partners.navigation-menu-item.ts+++ /dev/null@@ -1,15 +0,0 @@-import {- NavigationMenuItemType,- defineNavigationMenuItem,-} from 'twenty-sdk/define';--import { SUPER_PARTNERS_VIEW_UNIVERSAL_IDENTIFIER } from 'src/modules/partner/directory/views/super-partners.view';--export default defineNavigationMenuItem({- universalIdentifier: 'f79c4981-c50a-47f7-8577-35eb46434eb7',- type: NavigationMenuItemType.VIEW,- icon: 'IconStar',- position: 5,- folderUniversalIdentifier: '857be3b5-82c6-45f7-b546-e20a8a97be8d',- viewUniversalIdentifier: SUPER_PARTNERS_VIEW_UNIVERSAL_IDENTIFIER,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/page-layouts/partner-content.page-layout.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/page-layouts/partner-content.page-layout.tsdeleted file mode 100644index 1cca7daa0e3..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/page-layouts/partner-content.page-layout.ts+++ /dev/null@@ -1,46 +0,0 @@-import { PageLayoutTabLayoutMode, definePageLayout } from 'twenty-sdk/define';--import { PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { PARTNER_CONTENT_RECORD_PAGE_FIELDS_VIEW_ID } from 'src/modules/partner/directory/views/partner-content-record-page-fields.view';--export default definePageLayout({- universalIdentifier: '4d1f8ad2-6dcd-4f14-b2bc-3d16bb9dc462',- name: 'Default Partner Content Layout',- type: 'RECORD_PAGE',- objectUniversalIdentifier: PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER,- tabs: [- {- universalIdentifier: '24a33b22-6ef5-4d3f-88c4-a0f6cf43bfff',- title: 'Home',- position: 10,- icon: 'IconHome',- layoutMode: PageLayoutTabLayoutMode.VERTICAL_LIST,- widgets: [- {- universalIdentifier: 'd5833c26-aa65-418d-a359-b420369990f6',- title: 'Fields',- type: 'FIELDS',- configuration: {- configurationType: 'FIELDS',- viewUniversalIdentifier: PARTNER_CONTENT_RECORD_PAGE_FIELDS_VIEW_ID,- },- },- ],- },- {- universalIdentifier: '39292e48-e6df-43df-b1b8-7e367daa382a',- title: 'Timeline',- position: 20,- icon: 'IconTimelineEvent',- layoutMode: PageLayoutTabLayoutMode.VERTICAL_LIST,- widgets: [- {- universalIdentifier: '1d293bf5-f6d4-41c4-a6f6-db7955759f35',- title: 'Timeline',- type: 'TIMELINE',- configuration: { configurationType: 'TIMELINE' },- },- ],- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/page-layouts/partner-link.page-layout.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/page-layouts/partner-link.page-layout.tsdeleted file mode 100644index 3b7c9face66..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/page-layouts/partner-link.page-layout.ts+++ /dev/null@@ -1,46 +0,0 @@-import { PageLayoutTabLayoutMode, definePageLayout } from 'twenty-sdk/define';--import { PARTNER_LINK_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { PARTNER_LINK_RECORD_PAGE_FIELDS_VIEW_ID } from 'src/modules/partner/directory/views/partner-link-record-page-fields.view';--export default definePageLayout({- universalIdentifier: 'e2b44276-babe-4f29-a94d-8fa220fe6483',- name: 'Default Partner Link Layout',- type: 'RECORD_PAGE',- objectUniversalIdentifier: PARTNER_LINK_OBJECT_UNIVERSAL_IDENTIFIER,- tabs: [- {- universalIdentifier: '73c37c28-a229-4209-b55c-3038ecff6c14',- title: 'Home',- position: 10,- icon: 'IconHome',- layoutMode: PageLayoutTabLayoutMode.VERTICAL_LIST,- widgets: [- {- universalIdentifier: 'b0051194-ce2a-46ca-b593-a841404e10e7',- title: 'Fields',- type: 'FIELDS',- configuration: {- configurationType: 'FIELDS',- viewUniversalIdentifier: PARTNER_LINK_RECORD_PAGE_FIELDS_VIEW_ID,- },- },- ],- },- {- universalIdentifier: '443b1720-448e-40a6-a920-a6c18ca5d012',- title: 'Timeline',- position: 20,- icon: 'IconTimelineEvent',- layoutMode: PageLayoutTabLayoutMode.VERTICAL_LIST,- widgets: [- {- universalIdentifier: 'b4f89755-01da-457a-b2a2-63deeba89dc2',- title: 'Timeline',- type: 'TIMELINE',- configuration: { configurationType: 'TIMELINE' },- },- ],- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/page-layouts/partner-service.page-layout.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/page-layouts/partner-service.page-layout.tsdeleted file mode 100644index a4bc2cb8933..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/page-layouts/partner-service.page-layout.ts+++ /dev/null@@ -1,46 +0,0 @@-import { PageLayoutTabLayoutMode, definePageLayout } from 'twenty-sdk/define';--import { PARTNER_SERVICE_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { PARTNER_SERVICE_RECORD_PAGE_FIELDS_VIEW_ID } from 'src/modules/partner/directory/views/partner-service-record-page-fields.view';--export default definePageLayout({- universalIdentifier: '7032692b-63bd-432c-acac-a6e368adbff9',- name: 'Default Partner Service Layout',- type: 'RECORD_PAGE',- objectUniversalIdentifier: PARTNER_SERVICE_OBJECT_UNIVERSAL_IDENTIFIER,- tabs: [- {- universalIdentifier: '7fd356ad-7ab8-4bb7-b507-bc7d93b25c87',- title: 'Home',- position: 10,- icon: 'IconHome',- layoutMode: PageLayoutTabLayoutMode.VERTICAL_LIST,- widgets: [- {- universalIdentifier: 'e7de8b6b-9fba-4215-a40b-de656a46cd7c',- title: 'Fields',- type: 'FIELDS',- configuration: {- configurationType: 'FIELDS',- viewUniversalIdentifier: PARTNER_SERVICE_RECORD_PAGE_FIELDS_VIEW_ID,- },- },- ],- },- {- universalIdentifier: '7810fdf5-6a3c-4dea-9336-1ed25b8b0940',- title: 'Timeline',- position: 20,- icon: 'IconTimelineEvent',- layoutMode: PageLayoutTabLayoutMode.VERTICAL_LIST,- widgets: [- {- universalIdentifier: '87ad1f2b-63f0-4f15-a098-e4bc911feb58',- title: 'Timeline',- type: 'TIMELINE',- configuration: { configurationType: 'TIMELINE' },- },- ],- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/page-layouts/partner.page-layout.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/page-layouts/partner.page-layout.test.tsdeleted file mode 100644index 0812c7c28a0..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/page-layouts/partner.page-layout.test.ts+++ /dev/null@@ -1,35 +0,0 @@-import { describe, expect, it } from 'vitest';--import { APPLICATIONS_ON_PARTNER_FIELD_ID } from 'src/modules/application/objects/application.object';-import { APPLICATIONS_ON_PARTNER_WIDGET_VIEW_UNIVERSAL_IDENTIFIER } from 'src/modules/application/views/applications-on-partner-widget.view';-import { APPLICATIONS_WIDGET_VIEW_UNIVERSAL_IDENTIFIER } from 'src/modules/application/views/applications-widget.view';--import partnerPageLayout from './partner.page-layout';--describe('partner.page-layout', () => {- it('scopes the Briefs FIELD TABLE to the partner widget view', () => {- const briefsWidget = partnerPageLayout.config.tabs- .flatMap((tab) => tab.widgets ?? [])- .find((widget) => widget.title === 'Briefs');-- expect(briefsWidget).toBeDefined();- expect(briefsWidget?.type).toBe('FIELD');- expect(briefsWidget?.configuration).toMatchObject({- configurationType: 'FIELD',- fieldMetadataId: APPLICATIONS_ON_PARTNER_FIELD_ID,- fieldDisplayMode: 'TABLE',- viewId: APPLICATIONS_ON_PARTNER_WIDGET_VIEW_UNIVERSAL_IDENTIFIER,- });- expect(- 'nestedRelationFieldMetadataId' in (briefsWidget?.configuration ?? {})- ? briefsWidget?.configuration.nestedRelationFieldMetadataId- : undefined,- ).toBeUndefined();- });-- it('does not share a view UUID with the opportunity Partners widget', () => {- expect(APPLICATIONS_ON_PARTNER_WIDGET_VIEW_UNIVERSAL_IDENTIFIER).not.toBe(- APPLICATIONS_WIDGET_VIEW_UNIVERSAL_IDENTIFIER,- );- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/page-layouts/partner.page-layout.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/page-layouts/partner.page-layout.tsdeleted file mode 100644index a7525d5a010..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/page-layouts/partner.page-layout.ts+++ /dev/null@@ -1,91 +0,0 @@-import { PageLayoutTabLayoutMode, definePageLayout } from 'twenty-sdk/define';--import { PARTNER_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { APPLICATIONS_ON_PARTNER_FIELD_ID } from 'src/modules/application/objects/application.object';-import { APPLICATIONS_ON_PARTNER_WIDGET_VIEW_UNIVERSAL_IDENTIFIER } from 'src/modules/application/views/applications-on-partner-widget.view';-import { PARTNER_RECORD_PAGE_FIELDS_VIEW_ID } from 'src/modules/partner/directory/views/partner-record-page-fields.view';--// Partner is a custom (app-owned) object, so we fully control its record page. The-// Fields widget points at the FIELDS_WIDGET view so the partnerUser relation shows in-// the side panel.-export default definePageLayout({- universalIdentifier: 'd3257b1c-42eb-4b75-a4db-c966ef946b91',- name: 'Default Partner Layout',- type: 'RECORD_PAGE',- objectUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- tabs: [- {- universalIdentifier: '89b89326-d112-4356-8c62-899fced67fb1',- title: 'Home',- position: 10,- icon: 'IconHome',- layoutMode: PageLayoutTabLayoutMode.VERTICAL_LIST,- widgets: [- {- universalIdentifier: '1811fed7-c97e-4640-900e-0ea4939b1eea',- title: 'Fields',- type: 'FIELDS',- configuration: {- configurationType: 'FIELDS',- viewUniversalIdentifier: PARTNER_RECORD_PAGE_FIELDS_VIEW_ID,- },- },- ],- },- {- universalIdentifier: '3061f017-11ea-4082-99d8-e17ec384c741',- title: 'Briefs',- position: 15,- icon: 'IconBriefcase',- layoutMode: PageLayoutTabLayoutMode.VERTICAL_LIST,- widgets: [- {- universalIdentifier: 'b8e9aae6-d0d8-4902-9031-a7530c70229a',- title: 'Briefs',- type: 'FIELD',- configuration: {- configurationType: 'FIELD',- // FIELD + TABLE is scoped only when the bound view filters the inverse- // relation with isCurrentRecordSelected. A RECORD_TABLE widget has no- // parent-record filter and lists every Application in the workspace.- // fieldMetadataId and viewId are typed `string`; sync resolves them- // as universal identifiers.- fieldMetadataId: APPLICATIONS_ON_PARTNER_FIELD_ID,- fieldDisplayMode: 'TABLE',- viewId: APPLICATIONS_ON_PARTNER_WIDGET_VIEW_UNIVERSAL_IDENTIFIER,- },- },- ],- },- {- universalIdentifier: '2f59d88d-d07b-4a34-9e95-c8c6eea2522b',- title: 'Timeline',- position: 20,- icon: 'IconTimelineEvent',- layoutMode: PageLayoutTabLayoutMode.VERTICAL_LIST,- widgets: [- {- universalIdentifier: '38372f08-6b5b-4e87-aa0d-d515d72f5a5d',- title: 'Timeline',- type: 'TIMELINE',- configuration: { configurationType: 'TIMELINE' },- },- ],- },- {- universalIdentifier: '451827fd-bde3-49fd-9ac5-f44ebb2de41b',- title: 'Notes',- position: 30,- icon: 'IconNotes',- layoutMode: PageLayoutTabLayoutMode.VERTICAL_LIST,- widgets: [- {- universalIdentifier: '53e31a77-642e-49d4-824d-a5cad81b83a5',- title: 'Notes',- type: 'NOTES',- configuration: { configurationType: 'NOTES' },- },- ],- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/views/partner-content-record-page-fields.view.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/views/partner-content-record-page-fields.view.tsdeleted file mode 100644index 6b96edbe482..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/views/partner-content-record-page-fields.view.ts+++ /dev/null@@ -1,74 +0,0 @@-import { ViewType, defineView } from 'twenty-sdk/define';--import { PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { PARTNER_CONTENT_PARTNER_FIELD_ID } from 'src/modules/partner/fields/partner-content-partner.field';-import {- PARTNER_CONTENT_BODY_FIELD_ID,- PARTNER_CONTENT_CASE_STUDY_LINK_FIELD_ID,- PARTNER_CONTENT_CLIENT_NAME_FIELD_ID,- PARTNER_CONTENT_COVER_IMAGE_FIELD_ID,- PARTNER_CONTENT_HEADLINE_FIELD_ID,- PARTNER_CONTENT_NAME_FIELD_ID,- PARTNER_CONTENT_STATUS_FIELD_ID,-} from 'src/modules/partner/objects/partner-content.object';--export const PARTNER_CONTENT_RECORD_PAGE_FIELDS_VIEW_ID =- 'a1b2c3d4-5e6f-4789-a012-3456789abcde';--// FIELDS_WIDGET view backing the Partner Content record page side panel.-export default defineView({- universalIdentifier: PARTNER_CONTENT_RECORD_PAGE_FIELDS_VIEW_ID,- name: 'Partner Content Record Page Fields',- objectUniversalIdentifier: PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER,- type: ViewType.FIELDS_WIDGET,- fields: [- {- universalIdentifier: 'b1f5cf01-b00b-4bd8-9eea-d9367de99ddc',- fieldMetadataUniversalIdentifier: PARTNER_CONTENT_NAME_FIELD_ID,- position: 0,- isVisible: true,- },- {- universalIdentifier: 'bb8fe4da-2a4e-4186-85e9-479ec9f6f456',- fieldMetadataUniversalIdentifier: PARTNER_CONTENT_CLIENT_NAME_FIELD_ID,- position: 1,- isVisible: true,- },- {- universalIdentifier: 'a77fb95d-34ad-4774-8a3c-4315aee80496',- fieldMetadataUniversalIdentifier: PARTNER_CONTENT_HEADLINE_FIELD_ID,- position: 2,- isVisible: true,- },- {- universalIdentifier: '0181ea5a-c230-4d34-92f2-f7ce336e1da3',- fieldMetadataUniversalIdentifier: PARTNER_CONTENT_BODY_FIELD_ID,- position: 3,- isVisible: true,- },- {- universalIdentifier: 'd621d2ab-6aef-48af-9642-ab044a54da23',- fieldMetadataUniversalIdentifier: PARTNER_CONTENT_COVER_IMAGE_FIELD_ID,- position: 4,- isVisible: true,- },- {- universalIdentifier: '3eca37d5-5222-4efe-bacb-2e475b672749',- fieldMetadataUniversalIdentifier: PARTNER_CONTENT_CASE_STUDY_LINK_FIELD_ID,- position: 5,- isVisible: true,- },- {- universalIdentifier: 'c0b717ae-3ffd-4753-bd76-e747afae1fcd',- fieldMetadataUniversalIdentifier: PARTNER_CONTENT_STATUS_FIELD_ID,- position: 6,- isVisible: true,- },- {- universalIdentifier: '18f3aae8-0e1b-4b2d-962d-a45f76a4ce7f',- fieldMetadataUniversalIdentifier: PARTNER_CONTENT_PARTNER_FIELD_ID,- position: 7,- isVisible: true,- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/views/partner-content.view.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/views/partner-content.view.tsdeleted file mode 100644index 2f28302376b..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/views/partner-content.view.ts+++ /dev/null@@ -1,75 +0,0 @@-import { ViewType, defineView } from 'twenty-sdk/define';--import {- PARTNER_CONTENT_VIEW_UNIVERSAL_IDENTIFIER,- PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER,-} from 'src/constants/universal-identifiers';-import {- PARTNER_CONTENT_BODY_FIELD_ID,- PARTNER_CONTENT_CASE_STUDY_LINK_FIELD_ID,- PARTNER_CONTENT_CLIENT_NAME_FIELD_ID,- PARTNER_CONTENT_COVER_IMAGE_FIELD_ID,- PARTNER_CONTENT_HEADLINE_FIELD_ID,- PARTNER_CONTENT_NAME_FIELD_ID,- PARTNER_CONTENT_STATUS_FIELD_ID,- PARTNER_CONTENT_TYPE_FIELD_ID,-} from 'src/modules/partner/objects/partner-content.object';--// Index view for partner content.-export default defineView({- universalIdentifier: PARTNER_CONTENT_VIEW_UNIVERSAL_IDENTIFIER,- name: 'Partner content',- icon: 'IconQuote',- objectUniversalIdentifier: PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER,- type: ViewType.TABLE,- fields: [- {- universalIdentifier: 'ad7b3702-b552-4355-afec-1e1e96d9f3df',- fieldMetadataUniversalIdentifier: PARTNER_CONTENT_NAME_FIELD_ID,- position: 0,- isVisible: true,- },- {- universalIdentifier: 'a9bf3eaa-ec27-4a0a-8df2-e18c8f4239a7',- fieldMetadataUniversalIdentifier: PARTNER_CONTENT_TYPE_FIELD_ID,- position: 1,- isVisible: true,- },- {- universalIdentifier: '9358ce8a-4a1e-478f-b4ef-860d5a2b8e9d',- fieldMetadataUniversalIdentifier: PARTNER_CONTENT_CLIENT_NAME_FIELD_ID,- position: 2,- isVisible: true,- },- {- universalIdentifier: 'f63a8f86-2eb6-4acf-8411-e74f8ab1f944',- fieldMetadataUniversalIdentifier: PARTNER_CONTENT_HEADLINE_FIELD_ID,- position: 3,- isVisible: true,- },- {- universalIdentifier: '5339bd09-3d8e-4fa1-a41d-c70d885f8674',- fieldMetadataUniversalIdentifier: PARTNER_CONTENT_BODY_FIELD_ID,- position: 4,- isVisible: true,- },- {- universalIdentifier: '678a6d18-c68e-4f74-ab73-20f6cc4ca4f1',- fieldMetadataUniversalIdentifier: PARTNER_CONTENT_COVER_IMAGE_FIELD_ID,- position: 5,- isVisible: true,- },- {- universalIdentifier: 'c80a987f-cf89-4228-965d-2b11f4aad8df',- fieldMetadataUniversalIdentifier: PARTNER_CONTENT_CASE_STUDY_LINK_FIELD_ID,- position: 6,- isVisible: true,- },- {- universalIdentifier: '426e0c2d-449d-4a06-860b-0cfe0ed501e6',- fieldMetadataUniversalIdentifier: PARTNER_CONTENT_STATUS_FIELD_ID,- position: 7,- isVisible: true,- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/views/partner-link-record-page-fields.view.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/views/partner-link-record-page-fields.view.tsdeleted file mode 100644index b49e0910bd9..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/views/partner-link-record-page-fields.view.ts+++ /dev/null@@ -1,46 +0,0 @@-import { ViewType, defineView } from 'twenty-sdk/define';--import { PARTNER_LINK_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { PARTNER_LINK_PARTNER_FIELD_ID } from 'src/modules/partner/fields/partner-link-partner.field';-import {- PARTNER_LINK_NAME_FIELD_ID,- PARTNER_LINK_SORT_ORDER_FIELD_ID,- PARTNER_LINK_URL_FIELD_ID,-} from 'src/modules/partner/objects/partner-link.object';--export const PARTNER_LINK_RECORD_PAGE_FIELDS_VIEW_ID =- 'e8d1ba61-45fe-4055-9525-6c8bb68e4e0c';--// FIELDS_WIDGET view backing the Partner Link record page side panel.-export default defineView({- universalIdentifier: PARTNER_LINK_RECORD_PAGE_FIELDS_VIEW_ID,- name: 'Partner Link Record Page Fields',- objectUniversalIdentifier: PARTNER_LINK_OBJECT_UNIVERSAL_IDENTIFIER,- type: ViewType.FIELDS_WIDGET,- fields: [- {- universalIdentifier: '6e637b0a-14fb-4d15-9c6f-2b0746ad6620',- fieldMetadataUniversalIdentifier: PARTNER_LINK_NAME_FIELD_ID,- position: 0,- isVisible: true,- },- {- universalIdentifier: '20b89671-7933-4af4-9634-a254729cc2dd',- fieldMetadataUniversalIdentifier: PARTNER_LINK_URL_FIELD_ID,- position: 1,- isVisible: true,- },- {- universalIdentifier: '0ceaa571-61f3-4d27-8a1b-b10c6f1f3601',- fieldMetadataUniversalIdentifier: PARTNER_LINK_SORT_ORDER_FIELD_ID,- position: 2,- isVisible: true,- },- {- universalIdentifier: '0c996f3f-0184-42ef-976e-c15d84ff7fbf',- fieldMetadataUniversalIdentifier: PARTNER_LINK_PARTNER_FIELD_ID,- position: 3,- isVisible: true,- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/views/partner-record-page-fields.view.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/views/partner-record-page-fields.view.tsdeleted file mode 100644index b47eef3f707..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/views/partner-record-page-fields.view.ts+++ /dev/null@@ -1,248 +0,0 @@-import { ViewType, defineView } from 'twenty-sdk/define';--import {- PARTNER_AVAILABILITY_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_CALENDAR_LINK_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_CITY_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_COUNTRY_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_DEPLOYMENT_EXPERTISE_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_HOURLY_RATE_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_LANGUAGES_SPOKEN_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_LINKEDIN_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_NAME_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_SLUG_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_PROFILE_PICTURE_FILE_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_PROFILE_PICTURE_LEGACY_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_PROJECT_BUDGET_MIN_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_REGION_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_SCOPE_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_SKILLS_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_SUPER_PARTNER_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_TIER_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_TWENTY_EXPERIENCE_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_TWENTY_EXPERIENCE_NOTES_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_TWENTY_EXPERIENCE_PROOF_LINK_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_TYPE_OF_TEAM_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_VALIDATION_STAGE_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_WEBSITE_FIELD_UNIVERSAL_IDENTIFIER,-} from 'src/modules/partner/constants/partner-field-universal-identifiers';-import { PARTNER_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { PARTNER_CONTENTS_ON_PARTNER_FIELD_ID } from 'src/modules/partner/fields/partner-content-partner.field';-import { PARTNER_COMPANY_FIELD_ID } from 'src/modules/partner/fields/partner-company.field';-import { PARTNER_LINKS_ON_PARTNER_FIELD_ID } from 'src/modules/partner/fields/partner-link-partner.field';-import { PARTNER_SERVICES_ON_PARTNER_FIELD_ID } from 'src/modules/partner/fields/partner-service-partner.field';-import { PARTNER_USER_ON_PARTNER_FIELD_ID } from 'src/modules/partner/fields/partner-user-on-partner.field';--export const PARTNER_RECORD_PAGE_FIELDS_VIEW_ID =- 'a10bf4de-0770-4bee-ae04-1ae97aa18254';--// FIELDS_WIDGET view backing the Partner record page side panel. Relation fields-// (partnerLinks, partnerServices, partnerContents, partnerUser, company) only render-// in the fields widget when an explicit view marks them visible — this is that view.-// Validation Stage and Partner Tier stay listed for admins but are read-locked for-// the Partner role (see partner.role.ts), so partners don't see them on My Profile.-// Super partner stays listed and is update-locked only: partners can see it, cannot set it.-// Introduction is omitted here (marketplace bio lives on My Profile / public site);-// Twenty experience fields are first-class for triage.-export default defineView({- universalIdentifier: PARTNER_RECORD_PAGE_FIELDS_VIEW_ID,- name: 'Partner Record Page Fields',- objectUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- type: ViewType.FIELDS_WIDGET,- fields: [- {- universalIdentifier: '1077c424-bbb4-44cd-afec-7170d961574e',- fieldMetadataUniversalIdentifier: PARTNER_NAME_FIELD_UNIVERSAL_IDENTIFIER,- position: 0,- isVisible: true,- },- {- universalIdentifier: '80a10871-2f16-4aa7-90d5-715052201309',- fieldMetadataUniversalIdentifier: PARTNER_SLUG_FIELD_UNIVERSAL_IDENTIFIER,- position: 1,- isVisible: true,- },- {- universalIdentifier: 'c473b085-a043-48e3-8f30-2936667ae93b',- fieldMetadataUniversalIdentifier:- PARTNER_PROFILE_PICTURE_FILE_FIELD_UNIVERSAL_IDENTIFIER,- position: 2,- isVisible: true,- },- {- universalIdentifier: '94bc6866-9a59-442d-9766-e0433420d61a',- fieldMetadataUniversalIdentifier:- PARTNER_PROFILE_PICTURE_LEGACY_FIELD_UNIVERSAL_IDENTIFIER,- position: 3,- isVisible: true,- },- {- universalIdentifier: 'd61ac88b-139a-417d-8767-1db77a44d1a5',- fieldMetadataUniversalIdentifier:- PARTNER_AVAILABILITY_FIELD_UNIVERSAL_IDENTIFIER,- position: 4,- isVisible: true,- },- {- universalIdentifier: '2304f4b9-4faf-4813-8ef7-fb7697d64a92',- fieldMetadataUniversalIdentifier:- PARTNER_SCOPE_FIELD_UNIVERSAL_IDENTIFIER,- position: 5,- isVisible: true,- },- {- universalIdentifier: '6b1e51b9-a032-4223-8880-7b04559696f0',- fieldMetadataUniversalIdentifier:- PARTNER_TWENTY_EXPERIENCE_FIELD_UNIVERSAL_IDENTIFIER,- position: 6,- isVisible: true,- },- {- universalIdentifier: '0228335c-d634-4fed-a104-568cc181f637',- fieldMetadataUniversalIdentifier:- PARTNER_TWENTY_EXPERIENCE_NOTES_FIELD_UNIVERSAL_IDENTIFIER,- position: 7,- isVisible: true,- },- {- universalIdentifier: '567860a8-af4c-4f45-b75b-73ef4d43584e',- fieldMetadataUniversalIdentifier:- PARTNER_TWENTY_EXPERIENCE_PROOF_LINK_FIELD_UNIVERSAL_IDENTIFIER,- position: 8,- isVisible: true,- },- {- universalIdentifier: 'a0c47e12-6435-458a-b608-621bcee57474',- fieldMetadataUniversalIdentifier:- PARTNER_SKILLS_FIELD_UNIVERSAL_IDENTIFIER,- position: 9,- isVisible: true,- },- {- universalIdentifier: 'cbd9d84c-3d71-495c-b412-08c77f2c124c',- fieldMetadataUniversalIdentifier:- PARTNER_DEPLOYMENT_EXPERTISE_FIELD_UNIVERSAL_IDENTIFIER,- position: 10,- isVisible: true,- },- {- universalIdentifier: '42521613-4eeb-4a00-9a25-1d9de793d3c0',- fieldMetadataUniversalIdentifier:- PARTNER_LANGUAGES_SPOKEN_FIELD_UNIVERSAL_IDENTIFIER,- position: 11,- isVisible: true,- },- {- universalIdentifier: '2d595d67-8317-4c67-aeec-fe6e030e4830',- fieldMetadataUniversalIdentifier:- PARTNER_TYPE_OF_TEAM_FIELD_UNIVERSAL_IDENTIFIER,- position: 12,- isVisible: true,- },- {- universalIdentifier: 'a85dc9bc-a5f5-446e-a36c-492f1b6c0035',- fieldMetadataUniversalIdentifier:- PARTNER_REGION_FIELD_UNIVERSAL_IDENTIFIER,- position: 13,- isVisible: true,- },- {- universalIdentifier: '90d11276-1666-4c36-9055-00c4680c3168',- fieldMetadataUniversalIdentifier:- PARTNER_COUNTRY_FIELD_UNIVERSAL_IDENTIFIER,- position: 14,- isVisible: true,- },- {- universalIdentifier: '23f76380-3532-4e84-9115-55d395d6646b',- fieldMetadataUniversalIdentifier: PARTNER_CITY_FIELD_UNIVERSAL_IDENTIFIER,- position: 15,- isVisible: true,- },- {- universalIdentifier: 'cf5e9649-a3e9-4b3f-b746-e701e3db7169',- fieldMetadataUniversalIdentifier:- PARTNER_HOURLY_RATE_FIELD_UNIVERSAL_IDENTIFIER,- position: 16,- isVisible: true,- },- {- universalIdentifier: '388ae22b-956c-4e5a-8b78-6f8cb0105c1a',- fieldMetadataUniversalIdentifier:- PARTNER_PROJECT_BUDGET_MIN_FIELD_UNIVERSAL_IDENTIFIER,- position: 17,- isVisible: true,- },- {- universalIdentifier: '5c8727a3-6e4b-41c7-adf9-530ab6599bf9',- fieldMetadataUniversalIdentifier:- PARTNER_LINKEDIN_FIELD_UNIVERSAL_IDENTIFIER,- position: 18,- isVisible: true,- },- {- universalIdentifier: 'a6ef3c3b-103b-41b7-ba85-9d93a9af3296',- fieldMetadataUniversalIdentifier:- PARTNER_WEBSITE_FIELD_UNIVERSAL_IDENTIFIER,- position: 19,- isVisible: true,- },- {- universalIdentifier: '4bc68141-963f-4e42-8aa4-c081afc613c7',- fieldMetadataUniversalIdentifier:- PARTNER_CALENDAR_LINK_FIELD_UNIVERSAL_IDENTIFIER,- position: 20,- isVisible: true,- },- {- universalIdentifier: '5b51f559-d78c-48df-9347-7929f87ad8d1',- fieldMetadataUniversalIdentifier: PARTNER_LINKS_ON_PARTNER_FIELD_ID,- position: 21,- isVisible: true,- },- {- universalIdentifier: 'fe7a958a-fc56-4e65-8e37-1925014fb1ae',- fieldMetadataUniversalIdentifier: PARTNER_SERVICES_ON_PARTNER_FIELD_ID,- position: 22,- isVisible: true,- },- {- universalIdentifier: '39b34dc8-7daa-4e30-9183-2ce8f035657a',- fieldMetadataUniversalIdentifier: PARTNER_CONTENTS_ON_PARTNER_FIELD_ID,- position: 23,- isVisible: true,- },- {- universalIdentifier: '3487e2ae-0feb-41c4-ad0c-f94dff435015',- fieldMetadataUniversalIdentifier:- PARTNER_VALIDATION_STAGE_FIELD_UNIVERSAL_IDENTIFIER,- position: 24,- isVisible: true,- },- {- universalIdentifier: '971c79e6-381e-4346-86a4-7119de4824be',- fieldMetadataUniversalIdentifier: PARTNER_TIER_FIELD_UNIVERSAL_IDENTIFIER,- position: 25,- isVisible: true,- },- {- universalIdentifier: '70a176f0-c1ff-40c2-ab88-95ad8f964d67',- fieldMetadataUniversalIdentifier:- PARTNER_SUPER_PARTNER_FIELD_UNIVERSAL_IDENTIFIER,- position: 26,- isVisible: true,- },- {- universalIdentifier: 'ec1148d4-01ff-4128-9863-0ac42ea8eb47',- fieldMetadataUniversalIdentifier: PARTNER_USER_ON_PARTNER_FIELD_ID,- position: 27,- isVisible: true,- },- {- universalIdentifier: '3ec293a1-da90-4104-a22e-771c0059e9b5',- fieldMetadataUniversalIdentifier: PARTNER_COMPANY_FIELD_ID,- position: 28,- isVisible: true,- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/views/partner-service-record-page-fields.view.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/views/partner-service-record-page-fields.view.tsdeleted file mode 100644index c1c2437141b..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/views/partner-service-record-page-fields.view.ts+++ /dev/null@@ -1,46 +0,0 @@-import { ViewType, defineView } from 'twenty-sdk/define';--import { PARTNER_SERVICE_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { PARTNER_SERVICE_PARTNER_FIELD_ID } from 'src/modules/partner/fields/partner-service-partner.field';-import {- PARTNER_SERVICE_DESCRIPTION_FIELD_ID,- PARTNER_SERVICE_SORT_ORDER_FIELD_ID,- PARTNER_SERVICE_TITLE_FIELD_ID,-} from 'src/modules/partner/objects/partner-service.object';--export const PARTNER_SERVICE_RECORD_PAGE_FIELDS_VIEW_ID =- '0dfa3e6b-5461-4494-8a5a-ce363617e5a0';--// FIELDS_WIDGET view backing the Partner Service record page side panel.-export default defineView({- universalIdentifier: PARTNER_SERVICE_RECORD_PAGE_FIELDS_VIEW_ID,- name: 'Partner Service Record Page Fields',- objectUniversalIdentifier: PARTNER_SERVICE_OBJECT_UNIVERSAL_IDENTIFIER,- type: ViewType.FIELDS_WIDGET,- fields: [- {- universalIdentifier: '4d042312-363d-4515-870b-4620ef8e7f56',- fieldMetadataUniversalIdentifier: PARTNER_SERVICE_TITLE_FIELD_ID,- position: 0,- isVisible: true,- },- {- universalIdentifier: 'de10bccd-0932-4a16-b1a7-5d8aa039bd46',- fieldMetadataUniversalIdentifier: PARTNER_SERVICE_DESCRIPTION_FIELD_ID,- position: 1,- isVisible: true,- },- {- universalIdentifier: '2d0208c3-41bc-4dc7-9a5b-81b07e1c3647',- fieldMetadataUniversalIdentifier: PARTNER_SERVICE_SORT_ORDER_FIELD_ID,- position: 2,- isVisible: true,- },- {- universalIdentifier: '3863314c-b426-4b0d-aec4-60624338a658',- fieldMetadataUniversalIdentifier: PARTNER_SERVICE_PARTNER_FIELD_ID,- position: 3,- isVisible: true,- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/views/partners-per-country.view.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/views/partners-per-country.view.tsdeleted file mode 100644index 31e3e793394..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/views/partners-per-country.view.ts+++ /dev/null@@ -1,69 +0,0 @@-import {- AggregateOperations,- ViewSortDirection,- ViewType,- defineView,-} from 'twenty-sdk/define';--import { PARTNER_COUNTRY_VIEW_GROUPS } from 'src/modules/partner/constants/partner-country-view-groups';-import {- PARTNER_COUNTRY_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_NAME_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_REGION_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_VALIDATION_STAGE_FIELD_UNIVERSAL_IDENTIFIER,-} from 'src/modules/partner/constants/partner-field-universal-identifiers';-import { PARTNER_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';--export const PARTNERS_PER_COUNTRY_VIEW_UNIVERSAL_IDENTIFIER =- '35ef1b2f-f501-459e-a0e8-2f3d071f002d';--export default defineView({- universalIdentifier: PARTNERS_PER_COUNTRY_VIEW_UNIVERSAL_IDENTIFIER,- name: 'Partners per Country',- icon: 'IconMap',- objectUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- type: ViewType.TABLE,- position: 1,- mainGroupByFieldMetadataUniversalIdentifier:- PARTNER_COUNTRY_FIELD_UNIVERSAL_IDENTIFIER,- kanbanAggregateOperation: AggregateOperations.COUNT,- kanbanAggregateOperationFieldMetadataUniversalIdentifier:- PARTNER_NAME_FIELD_UNIVERSAL_IDENTIFIER,- shouldHideEmptyGroups: true,- groups: [...PARTNER_COUNTRY_VIEW_GROUPS],- fields: [- {- universalIdentifier: '7ba5125f-57ec-41c6-813e-d8d8e59cfe94',- fieldMetadataUniversalIdentifier: PARTNER_NAME_FIELD_UNIVERSAL_IDENTIFIER,- position: 0,- isVisible: true,- size: 200,- },- {- universalIdentifier: '938649bf-bfd5-4a97-a318-e76dbcc217bc',- fieldMetadataUniversalIdentifier: PARTNER_COUNTRY_FIELD_UNIVERSAL_IDENTIFIER,- position: 1,- isVisible: true,- },- {- universalIdentifier: '11680e09-fc3f-46fd-a36a-dc84afc2d0f6',- fieldMetadataUniversalIdentifier: PARTNER_REGION_FIELD_UNIVERSAL_IDENTIFIER,- position: 2,- isVisible: true,- size: 200,- },- {- universalIdentifier: '006255c0-aa2c-4228-b55f-9807b91d9bc1',- fieldMetadataUniversalIdentifier: PARTNER_VALIDATION_STAGE_FIELD_UNIVERSAL_IDENTIFIER,- position: 3,- isVisible: true,- },- ],- sorts: [- {- universalIdentifier: 'b4ba64d8-6279-49a2-a137-3b1e4f710a82',- fieldMetadataUniversalIdentifier: PARTNER_COUNTRY_FIELD_UNIVERSAL_IDENTIFIER,- direction: ViewSortDirection.ASC,- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/views/partners-per-stage.view.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/views/partners-per-stage.view.tsdeleted file mode 100644index 21c58d6dc52..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/views/partners-per-stage.view.ts+++ /dev/null@@ -1,96 +0,0 @@-import { AggregateOperations, ViewType, defineView } from 'twenty-sdk/define';--import {- PARTNER_COUNTRY_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_NAME_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_SCOPE_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_TIER_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_TWENTY_EXPERIENCE_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_VALIDATION_STAGE_FIELD_UNIVERSAL_IDENTIFIER,-} from 'src/modules/partner/constants/partner-field-universal-identifiers';-import { PARTNER_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';--export const PARTNERS_PER_STAGE_VIEW_UNIVERSAL_IDENTIFIER =- 'f3d411ce-eb58-4fab-b7de-c3a6d083855f';--export default defineView({- universalIdentifier: PARTNERS_PER_STAGE_VIEW_UNIVERSAL_IDENTIFIER,- name: 'Partners per Stage',- icon: 'IconTable',- objectUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- type: ViewType.TABLE,- position: 0,- mainGroupByFieldMetadataUniversalIdentifier:- PARTNER_VALIDATION_STAGE_FIELD_UNIVERSAL_IDENTIFIER,- kanbanAggregateOperation: AggregateOperations.COUNT,- kanbanAggregateOperationFieldMetadataUniversalIdentifier:- PARTNER_NAME_FIELD_UNIVERSAL_IDENTIFIER,- groups: [- {- universalIdentifier: 'c914c1ae-b4b8-43ac-97b2-9f2781f81f36',- fieldValue: 'APPLICATION',- position: 0,- isVisible: true,- },- {- universalIdentifier: '4e9ba1e5-dd20-4d09-9843-f8a8216ec0b8',- fieldValue: 'POTENTIAL',- position: 1,- isVisible: true,- },- {- universalIdentifier: '21271ddf-0325-4ef0-adcc-6ea4da2929be',- fieldValue: 'VALIDATED',- position: 2,- isVisible: true,- },- {- universalIdentifier: '55f47258-a19e-49c7-84cc-0ae7f14dac09',- fieldValue: 'FORMER',- position: 3,- isVisible: true,- },- {- universalIdentifier: '1f32f40a-6ca5-4a70-9e47-e9051fdf2cde',- fieldValue: 'REJECTED',- position: 4,- isVisible: true,- },- ],- fields: [- {- universalIdentifier: '98c2a300-72e6-4c97-9177-ddb27476b279',- fieldMetadataUniversalIdentifier: PARTNER_NAME_FIELD_UNIVERSAL_IDENTIFIER,- position: 0,- isVisible: true,- size: 200,- },- {- universalIdentifier: 'f24e637f-9f9c-4012-8a8d-6cf503bf7674',- fieldMetadataUniversalIdentifier: PARTNER_COUNTRY_FIELD_UNIVERSAL_IDENTIFIER,- position: 1,- isVisible: true,- },- {- universalIdentifier: '1009cf66-d3e4-43d1-9041-8c3966ecbdfe',- fieldMetadataUniversalIdentifier: PARTNER_SCOPE_FIELD_UNIVERSAL_IDENTIFIER,- position: 2,- isVisible: true,- size: 200,- },- {- universalIdentifier: 'e9908bdb-bfaa-4c2f-a193-9b25a8a7b1d0',- fieldMetadataUniversalIdentifier:- PARTNER_TWENTY_EXPERIENCE_FIELD_UNIVERSAL_IDENTIFIER,- position: 3,- isVisible: true,- size: 220,- },- {- universalIdentifier: 'ff01c4e3-b5c6-4832-90eb-ad05d8276e60',- fieldMetadataUniversalIdentifier: PARTNER_TIER_FIELD_UNIVERSAL_IDENTIFIER,- position: 4,- isVisible: true,- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/views/partners-validated.view.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/views/partners-validated.view.tsdeleted file mode 100644index 27e335bef9e..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/views/partners-validated.view.ts+++ /dev/null@@ -1,86 +0,0 @@-import { ViewFilterOperand, ViewType, defineView } from 'twenty-sdk/define';--import {- PARTNER_AVAILABILITY_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_NAME_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_REGION_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_SCOPE_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_TIER_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_TWENTY_EXPERIENCE_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_VALIDATION_STAGE_FIELD_UNIVERSAL_IDENTIFIER,-} from 'src/modules/partner/constants/partner-field-universal-identifiers';-import { PARTNER_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { PARTNER_USER_ON_PARTNER_FIELD_ID } from 'src/modules/partner/fields/partner-user-on-partner.field';--// Reuses the retired all-partners view id so the 0.5.x→1.0.0 sync updates the Partner-// object's existing view in place instead of deleting it (Twenty blocks deleting an object's only view).-export const PARTNERS_VALIDATED_VIEW_UNIVERSAL_IDENTIFIER =- '379b11d5-44d5-476b-ba7d-31d5f515c9b4';--export default defineView({- universalIdentifier: PARTNERS_VALIDATED_VIEW_UNIVERSAL_IDENTIFIER,- name: 'Partners Validated',- icon: 'IconCircleCheck',- objectUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- type: ViewType.TABLE,- position: 3,- fields: [- {- // Reuses all-partners' label-identifier viewField id (update in place; its deletion is blocked).- universalIdentifier: '21afcc69-09c5-42eb-a609-26c062de3bd3',- fieldMetadataUniversalIdentifier: PARTNER_NAME_FIELD_UNIVERSAL_IDENTIFIER,- position: 0,- isVisible: true,- size: 200,- },- {- universalIdentifier: 'e41daafb-d157-4730-ae5d-a0305ac12e0e',- fieldMetadataUniversalIdentifier: PARTNER_TIER_FIELD_UNIVERSAL_IDENTIFIER,- position: 1,- isVisible: true,- },- {- universalIdentifier: '60ab0089-7353-4b34-b1d1-747c1e817267',- fieldMetadataUniversalIdentifier: PARTNER_AVAILABILITY_FIELD_UNIVERSAL_IDENTIFIER,- position: 2,- isVisible: true,- },- {- universalIdentifier: 'e301a359-d38b-4ae9-aecb-593f5744f06b',- fieldMetadataUniversalIdentifier: PARTNER_SCOPE_FIELD_UNIVERSAL_IDENTIFIER,- position: 3,- isVisible: true,- size: 200,- },- {- universalIdentifier: '919124f8-46ae-449e-819f-c1b93ec4391e',- fieldMetadataUniversalIdentifier:- PARTNER_TWENTY_EXPERIENCE_FIELD_UNIVERSAL_IDENTIFIER,- position: 4,- isVisible: true,- size: 220,- },- {- universalIdentifier: '0173bc1a-4884-4b58-b12d-77afa1fb1fe1',- fieldMetadataUniversalIdentifier: PARTNER_REGION_FIELD_UNIVERSAL_IDENTIFIER,- position: 5,- isVisible: true,- size: 200,- },- {- universalIdentifier: '866578d7-8a53-4276-bda0-16e657102392',- fieldMetadataUniversalIdentifier: PARTNER_USER_ON_PARTNER_FIELD_ID,- position: 6,- isVisible: true,- size: 200,- },- ],- filters: [- {- universalIdentifier: 'da4ad9b9-57b6-4784-a68b-56426dee3761',- fieldMetadataUniversalIdentifier: PARTNER_VALIDATION_STAGE_FIELD_UNIVERSAL_IDENTIFIER,- operand: ViewFilterOperand.IS,- value: ['VALIDATED'],- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/views/super-partners.view.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/views/super-partners.view.tsdeleted file mode 100644index 5a3cb70ba63..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/directory/views/super-partners.view.ts+++ /dev/null@@ -1,88 +0,0 @@-import { ViewFilterOperand, ViewType, defineView } from 'twenty-sdk/define';--import {- PARTNER_AVAILABILITY_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_NAME_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_REGION_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_SCOPE_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_SUPER_PARTNER_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_TIER_FIELD_UNIVERSAL_IDENTIFIER,-} from 'src/modules/partner/constants/partner-field-universal-identifiers';-import { PARTNER_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { PARTNER_USER_ON_PARTNER_FIELD_ID } from 'src/modules/partner/fields/partner-user-on-partner.field';--export const SUPER_PARTNERS_VIEW_UNIVERSAL_IDENTIFIER =- 'e46cac46-8447-463f-8e8d-51c5eed15740';--export default defineView({- universalIdentifier: SUPER_PARTNERS_VIEW_UNIVERSAL_IDENTIFIER,- name: 'Super partners',- icon: 'IconStar',- objectUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- type: ViewType.TABLE,- position: 4,- fields: [- {- universalIdentifier: '9498fd34-4a80-4458-af20-476150ffbec8',- fieldMetadataUniversalIdentifier: PARTNER_NAME_FIELD_UNIVERSAL_IDENTIFIER,- position: 0,- isVisible: true,- size: 200,- },- {- universalIdentifier: 'f2820fb1-a578-44ce-872c-f8df3470f777',- fieldMetadataUniversalIdentifier:- PARTNER_SUPER_PARTNER_FIELD_UNIVERSAL_IDENTIFIER,- position: 1,- isVisible: true,- size: 90,- },- {- universalIdentifier: 'b947351a-a461-4bc3-a7a9-25e6f0fdd551',- fieldMetadataUniversalIdentifier: PARTNER_TIER_FIELD_UNIVERSAL_IDENTIFIER,- position: 2,- isVisible: true,- },- {- universalIdentifier: '4ca37446-0d4b-4dd2-b964-b431ef4e5e48',- fieldMetadataUniversalIdentifier:- PARTNER_AVAILABILITY_FIELD_UNIVERSAL_IDENTIFIER,- position: 3,- isVisible: true,- },- {- universalIdentifier: '83e5d3e6-38c3-4f56-adeb-2265ec61201f',- fieldMetadataUniversalIdentifier:- PARTNER_SCOPE_FIELD_UNIVERSAL_IDENTIFIER,- position: 4,- isVisible: true,- size: 200,- },- {- universalIdentifier: '98de8562-2d00-4965-8963-872d4e5cdff9',- fieldMetadataUniversalIdentifier:- PARTNER_REGION_FIELD_UNIVERSAL_IDENTIFIER,- position: 5,- isVisible: true,- size: 200,- },- {- universalIdentifier: '3b653e5e-538d-4380-a144-c348b3a01523',- fieldMetadataUniversalIdentifier: PARTNER_USER_ON_PARTNER_FIELD_ID,- position: 6,- isVisible: true,- size: 200,- },- ],- filters: [- // BOOLEAN fields use ViewFilterOperand.IS with the string value 'true' —- // the same representation the Twenty frontend stores and reads for boolean IS filters.- {- universalIdentifier: '783d033a-935b-4a75-bb5a-d578a5aa6d22',- fieldMetadataUniversalIdentifier:- PARTNER_SUPER_PARTNER_FIELD_UNIVERSAL_IDENTIFIER,- operand: ViewFilterOperand.IS,- value: 'true',- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/companies-as-partner-user-on-workspace-member.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/companies-as-partner-user-on-workspace-member.field.tsdeleted file mode 100644index 541080c7e2d..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/companies-as-partner-user-on-workspace-member.field.ts+++ /dev/null@@ -1,17 +0,0 @@-import { FieldType, RelationType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--import { COMPANIES_AS_PARTNER_USER_FIELD_ID, PARTNER_USER_ON_COMPANY_FIELD_ID } from './partner-user-on-company.field';--export default defineField({- universalIdentifier: COMPANIES_AS_PARTNER_USER_FIELD_ID,- objectUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.workspaceMember.universalIdentifier,- type: FieldType.RELATION,- name: 'companiesAsPartnerUser',- label: 'Companies (as partner user)',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.company.universalIdentifier,- relationTargetFieldMetadataUniversalIdentifier: PARTNER_USER_ON_COMPANY_FIELD_ID,- universalSettings: {- relationType: RelationType.ONE_TO_MANY,- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-company.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-company.field.tsdeleted file mode 100644index 4c045570e1c..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-company.field.ts+++ /dev/null@@ -1,22 +0,0 @@-import { FieldType, OnDeleteAction, RelationType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--import { PARTNER_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';--export const PARTNER_COMPANY_FIELD_ID = '2779015b-28fa-4117-8ce1-b0c98cf16de2';-export const PARTNERS_ON_COMPANY_FIELD_ID = '2896d888-a4ab-4c29-bf63-e8bfdbd1924f';--export default defineField({- universalIdentifier: PARTNER_COMPANY_FIELD_ID,- objectUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- type: FieldType.RELATION,- name: 'company',- label: 'Company',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.company.universalIdentifier,- relationTargetFieldMetadataUniversalIdentifier: PARTNERS_ON_COMPANY_FIELD_ID,- universalSettings: {- relationType: RelationType.MANY_TO_ONE,- onDelete: OnDeleteAction.SET_NULL,- joinColumnName: 'companyId',- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-content-customer-company.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-content-customer-company.field.tsdeleted file mode 100644index 4ccc08f96e5..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-content-customer-company.field.ts+++ /dev/null@@ -1,22 +0,0 @@-import { FieldType, OnDeleteAction, RelationType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--import { PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';--export const PARTNER_CONTENT_CUSTOMER_COMPANY_FIELD_ID = 'd448f6be-533f-4c43-a70f-55dc361dcdd7';-export const PARTNER_CONTENTS_ON_COMPANY_FIELD_ID = '941e7707-1b3d-47d4-b13a-45c6628c1b3d';--export default defineField({- universalIdentifier: PARTNER_CONTENT_CUSTOMER_COMPANY_FIELD_ID,- objectUniversalIdentifier: PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER,- type: FieldType.RELATION,- name: 'customerCompany',- label: 'Customer Company',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.company.universalIdentifier,- relationTargetFieldMetadataUniversalIdentifier: PARTNER_CONTENTS_ON_COMPANY_FIELD_ID,- universalSettings: {- relationType: RelationType.MANY_TO_ONE,- onDelete: OnDeleteAction.SET_NULL,- joinColumnName: 'customerCompanyId',- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-content-customer-person.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-content-customer-person.field.tsdeleted file mode 100644index 7570244bcba..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-content-customer-person.field.ts+++ /dev/null@@ -1,22 +0,0 @@-import { FieldType, OnDeleteAction, RelationType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--import { PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';--export const PARTNER_CONTENT_CUSTOMER_PERSON_FIELD_ID = 'f17547be-76aa-4231-bd1a-3f57bb1ae323';-export const PARTNER_CONTENTS_ON_PERSON_FIELD_ID = 'fae42f4e-b054-4267-a761-81a6792f7c12';--export default defineField({- universalIdentifier: PARTNER_CONTENT_CUSTOMER_PERSON_FIELD_ID,- objectUniversalIdentifier: PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER,- type: FieldType.RELATION,- name: 'customerPerson',- label: 'Customer Person',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.person.universalIdentifier,- relationTargetFieldMetadataUniversalIdentifier: PARTNER_CONTENTS_ON_PERSON_FIELD_ID,- universalSettings: {- relationType: RelationType.MANY_TO_ONE,- onDelete: OnDeleteAction.SET_NULL,- joinColumnName: 'customerPersonId',- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-content-partner.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-content-partner.field.tsdeleted file mode 100644index dab923e1315..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-content-partner.field.ts+++ /dev/null@@ -1,22 +0,0 @@-import { FieldType, OnDeleteAction, RelationType, defineField } from 'twenty-sdk/define';--import { PARTNER_OBJECT_UNIVERSAL_IDENTIFIER, PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';--export const PARTNER_CONTENT_PARTNER_FIELD_ID = '1774738e-96a1-43e2-aca4-d3c7cc794c50';-export const PARTNER_CONTENTS_ON_PARTNER_FIELD_ID = 'ac7995f1-7ccf-4607-827b-0788eeacaee0';--export default defineField({- universalIdentifier: PARTNER_CONTENT_PARTNER_FIELD_ID,- objectUniversalIdentifier: PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER,- type: FieldType.RELATION,- name: 'partner',- label: 'Partner',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- relationTargetFieldMetadataUniversalIdentifier: PARTNER_CONTENTS_ON_PARTNER_FIELD_ID,- universalSettings: {- relationType: RelationType.MANY_TO_ONE,- onDelete: OnDeleteAction.SET_NULL,- joinColumnName: 'partnerId',- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-contents-as-partner-user-on-workspace-member.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-contents-as-partner-user-on-workspace-member.field.tsdeleted file mode 100644index 2f84345728e..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-contents-as-partner-user-on-workspace-member.field.ts+++ /dev/null@@ -1,29 +0,0 @@-import {- FieldType,- RelationType,- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,- defineField,-} from 'twenty-sdk/define';--import { PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import {- PARTNER_CONTENTS_AS_PARTNER_USER_FIELD_ID,- PARTNER_USER_ON_PARTNER_CONTENT_FIELD_ID,-} from './partner-user-on-partner-content.field';--export default defineField({- universalIdentifier: PARTNER_CONTENTS_AS_PARTNER_USER_FIELD_ID,- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.workspaceMember.universalIdentifier,- type: FieldType.RELATION,- name: 'partnerContentsAsPartnerUser',- label: 'Partner Content (as partner user)',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier:- PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER,- relationTargetFieldMetadataUniversalIdentifier:- PARTNER_USER_ON_PARTNER_CONTENT_FIELD_ID,- universalSettings: {- relationType: RelationType.ONE_TO_MANY,- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-contents-on-company.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-contents-on-company.field.tsdeleted file mode 100644index 4d8319e9061..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-contents-on-company.field.ts+++ /dev/null@@ -1,18 +0,0 @@-import { FieldType, RelationType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--import { PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { PARTNER_CONTENTS_ON_COMPANY_FIELD_ID, PARTNER_CONTENT_CUSTOMER_COMPANY_FIELD_ID } from './partner-content-customer-company.field';--export default defineField({- universalIdentifier: PARTNER_CONTENTS_ON_COMPANY_FIELD_ID,- objectUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.company.universalIdentifier,- type: FieldType.RELATION,- name: 'partnerContents',- label: 'Partner Content',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier: PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER,- relationTargetFieldMetadataUniversalIdentifier: PARTNER_CONTENT_CUSTOMER_COMPANY_FIELD_ID,- universalSettings: {- relationType: RelationType.ONE_TO_MANY,- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-contents-on-partner.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-contents-on-partner.field.tsdeleted file mode 100644index 6f84ded039e..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-contents-on-partner.field.ts+++ /dev/null@@ -1,18 +0,0 @@-import { FieldType, RelationType, defineField } from 'twenty-sdk/define';--import { PARTNER_OBJECT_UNIVERSAL_IDENTIFIER, PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { PARTNER_CONTENTS_ON_PARTNER_FIELD_ID, PARTNER_CONTENT_PARTNER_FIELD_ID } from './partner-content-partner.field';--export default defineField({- universalIdentifier: PARTNER_CONTENTS_ON_PARTNER_FIELD_ID,- objectUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- type: FieldType.RELATION,- name: 'partnerContents',- label: 'Partner Content',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier: PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER,- relationTargetFieldMetadataUniversalIdentifier: PARTNER_CONTENT_PARTNER_FIELD_ID,- universalSettings: {- relationType: RelationType.ONE_TO_MANY,- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-contents-on-person.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-contents-on-person.field.tsdeleted file mode 100644index 52c652cd9d9..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-contents-on-person.field.ts+++ /dev/null@@ -1,18 +0,0 @@-import { FieldType, RelationType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--import { PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { PARTNER_CONTENTS_ON_PERSON_FIELD_ID, PARTNER_CONTENT_CUSTOMER_PERSON_FIELD_ID } from './partner-content-customer-person.field';--export default defineField({- universalIdentifier: PARTNER_CONTENTS_ON_PERSON_FIELD_ID,- objectUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.person.universalIdentifier,- type: FieldType.RELATION,- name: 'partnerContents',- label: 'Partner Content',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier: PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER,- relationTargetFieldMetadataUniversalIdentifier: PARTNER_CONTENT_CUSTOMER_PERSON_FIELD_ID,- universalSettings: {- relationType: RelationType.ONE_TO_MANY,- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-link-partner.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-link-partner.field.tsdeleted file mode 100644index 5599c69e08a..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-link-partner.field.ts+++ /dev/null@@ -1,27 +0,0 @@-import { FieldType, OnDeleteAction, RelationType, defineField } from 'twenty-sdk/define';--import {- PARTNER_LINK_OBJECT_UNIVERSAL_IDENTIFIER,- PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,-} from 'src/constants/universal-identifiers';--export const PARTNER_LINK_PARTNER_FIELD_ID = 'bae4dda8-8785-4867-a22f-dd66d805d68e';-export const PARTNER_LINKS_ON_PARTNER_FIELD_ID =- '3fdc8a67-3881-43ef-8c43-4fa3ddaa819c';--export default defineField({- universalIdentifier: PARTNER_LINK_PARTNER_FIELD_ID,- objectUniversalIdentifier: PARTNER_LINK_OBJECT_UNIVERSAL_IDENTIFIER,- type: FieldType.RELATION,- name: 'partner',- label: 'Partner',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier:- PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- relationTargetFieldMetadataUniversalIdentifier: PARTNER_LINKS_ON_PARTNER_FIELD_ID,- universalSettings: {- relationType: RelationType.MANY_TO_ONE,- onDelete: OnDeleteAction.SET_NULL,- joinColumnName: 'partnerId',- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-links-as-partner-user-on-workspace-member.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-links-as-partner-user-on-workspace-member.field.tsdeleted file mode 100644index 16c908bc935..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-links-as-partner-user-on-workspace-member.field.ts+++ /dev/null@@ -1,29 +0,0 @@-import {- FieldType,- RelationType,- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,- defineField,-} from 'twenty-sdk/define';--import { PARTNER_LINK_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import {- PARTNER_LINKS_AS_PARTNER_USER_FIELD_ID,- PARTNER_USER_ON_PARTNER_LINK_FIELD_ID,-} from './partner-user-on-partner-link.field';--export default defineField({- universalIdentifier: PARTNER_LINKS_AS_PARTNER_USER_FIELD_ID,- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.workspaceMember.universalIdentifier,- type: FieldType.RELATION,- name: 'partnerLinksAsPartnerUser',- label: 'Partner Links (as partner user)',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier:- PARTNER_LINK_OBJECT_UNIVERSAL_IDENTIFIER,- relationTargetFieldMetadataUniversalIdentifier:- PARTNER_USER_ON_PARTNER_LINK_FIELD_ID,- universalSettings: {- relationType: RelationType.ONE_TO_MANY,- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-links-on-partner.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-links-on-partner.field.tsdeleted file mode 100644index 2fe89381dea..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-links-on-partner.field.ts+++ /dev/null@@ -1,25 +0,0 @@-import { FieldType, RelationType, defineField } from 'twenty-sdk/define';--import {- PARTNER_LINK_OBJECT_UNIVERSAL_IDENTIFIER,- PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,-} from 'src/constants/universal-identifiers';-import {- PARTNER_LINK_PARTNER_FIELD_ID,- PARTNER_LINKS_ON_PARTNER_FIELD_ID,-} from './partner-link-partner.field';--export default defineField({- universalIdentifier: PARTNER_LINKS_ON_PARTNER_FIELD_ID,- objectUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- type: FieldType.RELATION,- name: 'partnerLinks',- label: 'Partner Links',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier:- PARTNER_LINK_OBJECT_UNIVERSAL_IDENTIFIER,- relationTargetFieldMetadataUniversalIdentifier: PARTNER_LINK_PARTNER_FIELD_ID,- universalSettings: {- relationType: RelationType.ONE_TO_MANY,- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-on-person.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-on-person.field.tsdeleted file mode 100644index 55563651e28..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-on-person.field.ts+++ /dev/null@@ -1,22 +0,0 @@-import { FieldType, OnDeleteAction, RelationType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--import { PARTNER_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';--export const PARTNER_ON_PERSON_FIELD_ID = 'b49eeaa3-c7ef-4a5c-8c47-d2c234b5122f';-export const PERSONS_ON_PARTNER_FIELD_ID = '2c0e2035-db52-434b-9706-cd2210009a86';--export default defineField({- universalIdentifier: PARTNER_ON_PERSON_FIELD_ID,- objectUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.person.universalIdentifier,- type: FieldType.RELATION,- name: 'partner',- label: 'Partner',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- relationTargetFieldMetadataUniversalIdentifier: PERSONS_ON_PARTNER_FIELD_ID,- universalSettings: {- relationType: RelationType.MANY_TO_ONE,- onDelete: OnDeleteAction.SET_NULL,- joinColumnName: 'partnerId',- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-profiles-as-user-on-workspace-member.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-profiles-as-user-on-workspace-member.field.tsdeleted file mode 100644index 8dfa54d6d28..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-profiles-as-user-on-workspace-member.field.ts+++ /dev/null@@ -1,18 +0,0 @@-import { FieldType, RelationType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--import { PARTNER_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { PARTNER_PROFILES_AS_USER_FIELD_ID, PARTNER_USER_ON_PARTNER_FIELD_ID } from './partner-user-on-partner.field';--export default defineField({- universalIdentifier: PARTNER_PROFILES_AS_USER_FIELD_ID,- objectUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.workspaceMember.universalIdentifier,- type: FieldType.RELATION,- name: 'partnerProfilesAsUser',- label: 'Partner Profiles (as user)',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- relationTargetFieldMetadataUniversalIdentifier: PARTNER_USER_ON_PARTNER_FIELD_ID,- universalSettings: {- relationType: RelationType.ONE_TO_MANY,- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-service-partner.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-service-partner.field.tsdeleted file mode 100644index 500b096c076..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-service-partner.field.ts+++ /dev/null@@ -1,29 +0,0 @@-import { FieldType, OnDeleteAction, RelationType, defineField } from 'twenty-sdk/define';--import {- PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- PARTNER_SERVICE_OBJECT_UNIVERSAL_IDENTIFIER,-} from 'src/constants/universal-identifiers';--export const PARTNER_SERVICE_PARTNER_FIELD_ID =- 'cc2f1f32-65a0-46df-977f-fffc278b899a';-export const PARTNER_SERVICES_ON_PARTNER_FIELD_ID =- '88ac0831-91d5-4131-823f-3e72de8105b5';--export default defineField({- universalIdentifier: PARTNER_SERVICE_PARTNER_FIELD_ID,- objectUniversalIdentifier: PARTNER_SERVICE_OBJECT_UNIVERSAL_IDENTIFIER,- type: FieldType.RELATION,- name: 'partner',- label: 'Partner',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier:- PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- relationTargetFieldMetadataUniversalIdentifier:- PARTNER_SERVICES_ON_PARTNER_FIELD_ID,- universalSettings: {- relationType: RelationType.MANY_TO_ONE,- onDelete: OnDeleteAction.SET_NULL,- joinColumnName: 'partnerId',- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-services-as-partner-user-on-workspace-member.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-services-as-partner-user-on-workspace-member.field.tsdeleted file mode 100644index bf9b4f12371..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-services-as-partner-user-on-workspace-member.field.ts+++ /dev/null@@ -1,29 +0,0 @@-import {- FieldType,- RelationType,- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,- defineField,-} from 'twenty-sdk/define';--import { PARTNER_SERVICE_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import {- PARTNER_SERVICES_AS_PARTNER_USER_FIELD_ID,- PARTNER_USER_ON_PARTNER_SERVICE_FIELD_ID,-} from './partner-user-on-partner-service.field';--export default defineField({- universalIdentifier: PARTNER_SERVICES_AS_PARTNER_USER_FIELD_ID,- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.workspaceMember.universalIdentifier,- type: FieldType.RELATION,- name: 'partnerServicesAsPartnerUser',- label: 'Partner Services (as partner user)',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier:- PARTNER_SERVICE_OBJECT_UNIVERSAL_IDENTIFIER,- relationTargetFieldMetadataUniversalIdentifier:- PARTNER_USER_ON_PARTNER_SERVICE_FIELD_ID,- universalSettings: {- relationType: RelationType.ONE_TO_MANY,- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-services-on-partner.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-services-on-partner.field.tsdeleted file mode 100644index f2af66c452b..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-services-on-partner.field.ts+++ /dev/null@@ -1,25 +0,0 @@-import { FieldType, RelationType, defineField } from 'twenty-sdk/define';--import {- PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- PARTNER_SERVICE_OBJECT_UNIVERSAL_IDENTIFIER,-} from 'src/constants/universal-identifiers';-import {- PARTNER_SERVICES_ON_PARTNER_FIELD_ID,- PARTNER_SERVICE_PARTNER_FIELD_ID,-} from './partner-service-partner.field';--export default defineField({- universalIdentifier: PARTNER_SERVICES_ON_PARTNER_FIELD_ID,- objectUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- type: FieldType.RELATION,- name: 'partnerServices',- label: 'Partner Services',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier:- PARTNER_SERVICE_OBJECT_UNIVERSAL_IDENTIFIER,- relationTargetFieldMetadataUniversalIdentifier: PARTNER_SERVICE_PARTNER_FIELD_ID,- universalSettings: {- relationType: RelationType.ONE_TO_MANY,- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-user-on-company.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-user-on-company.field.tsdeleted file mode 100644index 01a6206dc8a..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-user-on-company.field.ts+++ /dev/null@@ -1,20 +0,0 @@-import { FieldType, OnDeleteAction, RelationType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--export const PARTNER_USER_ON_COMPANY_FIELD_ID = 'f8f1dbb6-9f9f-4c13-9dab-a19ea6223801';-export const COMPANIES_AS_PARTNER_USER_FIELD_ID = '6235bf5b-9ecf-482f-b8b0-e6ae37659638';--export default defineField({- universalIdentifier: PARTNER_USER_ON_COMPANY_FIELD_ID,- objectUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.company.universalIdentifier,- type: FieldType.RELATION,- name: 'partnerUser',- label: 'Partner User',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.workspaceMember.universalIdentifier,- relationTargetFieldMetadataUniversalIdentifier: COMPANIES_AS_PARTNER_USER_FIELD_ID,- universalSettings: {- relationType: RelationType.MANY_TO_ONE,- onDelete: OnDeleteAction.SET_NULL,- joinColumnName: 'partnerUserId',- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-user-on-partner-content.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-user-on-partner-content.field.tsdeleted file mode 100644index 826a131cc3a..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-user-on-partner-content.field.ts+++ /dev/null@@ -1,32 +0,0 @@-import {- FieldType,- OnDeleteAction,- RelationType,- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,- defineField,-} from 'twenty-sdk/define';--import { PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';--export const PARTNER_USER_ON_PARTNER_CONTENT_FIELD_ID =- '8d77a7c6-bf73-4cb7-8a95-93e32d8556e9';-export const PARTNER_CONTENTS_AS_PARTNER_USER_FIELD_ID =- 'acb4da1d-93fe-4f40-b51f-805b334e4970';--export default defineField({- universalIdentifier: PARTNER_USER_ON_PARTNER_CONTENT_FIELD_ID,- objectUniversalIdentifier: PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER,- type: FieldType.RELATION,- name: 'partnerUser',- label: 'Partner User',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.workspaceMember.universalIdentifier,- relationTargetFieldMetadataUniversalIdentifier:- PARTNER_CONTENTS_AS_PARTNER_USER_FIELD_ID,- universalSettings: {- relationType: RelationType.MANY_TO_ONE,- onDelete: OnDeleteAction.SET_NULL,- joinColumnName: 'partnerUserId',- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-user-on-partner-link.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-user-on-partner-link.field.tsdeleted file mode 100644index 912ddde8233..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-user-on-partner-link.field.ts+++ /dev/null@@ -1,32 +0,0 @@-import {- FieldType,- OnDeleteAction,- RelationType,- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,- defineField,-} from 'twenty-sdk/define';--import { PARTNER_LINK_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';--export const PARTNER_USER_ON_PARTNER_LINK_FIELD_ID =- '294ea3dc-9195-4a2a-8823-18d906f66f83';-export const PARTNER_LINKS_AS_PARTNER_USER_FIELD_ID =- '81a977c0-85fa-4261-953c-f721b1c9604d';--export default defineField({- universalIdentifier: PARTNER_USER_ON_PARTNER_LINK_FIELD_ID,- objectUniversalIdentifier: PARTNER_LINK_OBJECT_UNIVERSAL_IDENTIFIER,- type: FieldType.RELATION,- name: 'partnerUser',- label: 'Partner User',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.workspaceMember.universalIdentifier,- relationTargetFieldMetadataUniversalIdentifier:- PARTNER_LINKS_AS_PARTNER_USER_FIELD_ID,- universalSettings: {- relationType: RelationType.MANY_TO_ONE,- onDelete: OnDeleteAction.SET_NULL,- joinColumnName: 'partnerUserId',- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-user-on-partner-service.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-user-on-partner-service.field.tsdeleted file mode 100644index ad5bfb7637c..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-user-on-partner-service.field.ts+++ /dev/null@@ -1,32 +0,0 @@-import {- FieldType,- OnDeleteAction,- RelationType,- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,- defineField,-} from 'twenty-sdk/define';--import { PARTNER_SERVICE_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';--export const PARTNER_USER_ON_PARTNER_SERVICE_FIELD_ID =- 'e35d5cc8-1217-4676-81b2-51112b716b1c';-export const PARTNER_SERVICES_AS_PARTNER_USER_FIELD_ID =- 'bc7e3a06-d362-4aef-a30b-e8ba0746c781';--export default defineField({- universalIdentifier: PARTNER_USER_ON_PARTNER_SERVICE_FIELD_ID,- objectUniversalIdentifier: PARTNER_SERVICE_OBJECT_UNIVERSAL_IDENTIFIER,- type: FieldType.RELATION,- name: 'partnerUser',- label: 'Partner User',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.workspaceMember.universalIdentifier,- relationTargetFieldMetadataUniversalIdentifier:- PARTNER_SERVICES_AS_PARTNER_USER_FIELD_ID,- universalSettings: {- relationType: RelationType.MANY_TO_ONE,- onDelete: OnDeleteAction.SET_NULL,- joinColumnName: 'partnerUserId',- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-user-on-partner.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-user-on-partner.field.tsdeleted file mode 100644index 8dab5f9dadd..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-user-on-partner.field.ts+++ /dev/null@@ -1,22 +0,0 @@-import { FieldType, OnDeleteAction, RelationType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--import { PARTNER_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';--export const PARTNER_USER_ON_PARTNER_FIELD_ID = '0e49f2e4-1e45-433d-bf49-79acc0b06d0e';-export const PARTNER_PROFILES_AS_USER_FIELD_ID = 'c0791b65-802f-4ae0-85e0-5434459214f1';--export default defineField({- universalIdentifier: PARTNER_USER_ON_PARTNER_FIELD_ID,- objectUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- type: FieldType.RELATION,- name: 'partnerUser',- label: 'Partner User',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.workspaceMember.universalIdentifier,- relationTargetFieldMetadataUniversalIdentifier: PARTNER_PROFILES_AS_USER_FIELD_ID,- universalSettings: {- relationType: RelationType.MANY_TO_ONE,- onDelete: OnDeleteAction.SET_NULL,- joinColumnName: 'partnerUserId',- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-user-on-person.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-user-on-person.field.tsdeleted file mode 100644index c6768fa0c0f..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partner-user-on-person.field.ts+++ /dev/null@@ -1,20 +0,0 @@-import { FieldType, OnDeleteAction, RelationType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--export const PARTNER_USER_ON_PERSON_FIELD_ID = '2fc8b812-b7f9-49f2-829a-050be7ee1e5e';-export const PERSONS_AS_PARTNER_USER_FIELD_ID = '94d17fac-3d32-4b13-9fb3-a671d4bf9c46';--export default defineField({- universalIdentifier: PARTNER_USER_ON_PERSON_FIELD_ID,- objectUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.person.universalIdentifier,- type: FieldType.RELATION,- name: 'partnerUser',- label: 'Partner User',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.workspaceMember.universalIdentifier,- relationTargetFieldMetadataUniversalIdentifier: PERSONS_AS_PARTNER_USER_FIELD_ID,- universalSettings: {- relationType: RelationType.MANY_TO_ONE,- onDelete: OnDeleteAction.SET_NULL,- joinColumnName: 'partnerUserId',- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partners-on-company.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partners-on-company.field.tsdeleted file mode 100644index f326e29ad85..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/partners-on-company.field.ts+++ /dev/null@@ -1,18 +0,0 @@-import { FieldType, RelationType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--import { PARTNER_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { PARTNERS_ON_COMPANY_FIELD_ID, PARTNER_COMPANY_FIELD_ID } from './partner-company.field';--export default defineField({- universalIdentifier: PARTNERS_ON_COMPANY_FIELD_ID,- objectUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.company.universalIdentifier,- type: FieldType.RELATION,- name: 'partners',- label: 'Partners',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- relationTargetFieldMetadataUniversalIdentifier: PARTNER_COMPANY_FIELD_ID,- universalSettings: {- relationType: RelationType.ONE_TO_MANY,- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/person-discord.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/person-discord.field.tsdeleted file mode 100644index 86f3dec2ef0..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/person-discord.field.ts+++ /dev/null@@ -1,10 +0,0 @@-import { FieldType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--export default defineField({- universalIdentifier: 'c6862035-bf2e-42ea-86c4-bf46636f7859',- objectUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.person.universalIdentifier,- type: FieldType.TEXT,- name: 'discord',- label: 'Discord',- isNullable: true,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/persons-as-partner-user-on-workspace-member.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/persons-as-partner-user-on-workspace-member.field.tsdeleted file mode 100644index 97a45a93ff1..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/persons-as-partner-user-on-workspace-member.field.ts+++ /dev/null@@ -1,17 +0,0 @@-import { FieldType, RelationType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--import { PARTNER_USER_ON_PERSON_FIELD_ID, PERSONS_AS_PARTNER_USER_FIELD_ID } from './partner-user-on-person.field';--export default defineField({- universalIdentifier: PERSONS_AS_PARTNER_USER_FIELD_ID,- objectUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.workspaceMember.universalIdentifier,- type: FieldType.RELATION,- name: 'personsAsPartnerUser',- label: 'People (as partner user)',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.person.universalIdentifier,- relationTargetFieldMetadataUniversalIdentifier: PARTNER_USER_ON_PERSON_FIELD_ID,- universalSettings: {- relationType: RelationType.ONE_TO_MANY,- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/persons-on-partner.field.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/persons-on-partner.field.tsdeleted file mode 100644index c93b4a01971..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/fields/persons-on-partner.field.ts+++ /dev/null@@ -1,18 +0,0 @@-import { FieldType, RelationType, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, defineField } from 'twenty-sdk/define';--import { PARTNER_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { PARTNER_ON_PERSON_FIELD_ID, PERSONS_ON_PARTNER_FIELD_ID } from './partner-on-person.field';--export default defineField({- universalIdentifier: PERSONS_ON_PARTNER_FIELD_ID,- objectUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- type: FieldType.RELATION,- name: 'persons',- label: 'Persons',- isNullable: true,- relationTargetObjectMetadataUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.person.universalIdentifier,- relationTargetFieldMetadataUniversalIdentifier: PARTNER_ON_PERSON_FIELD_ID,- universalSettings: {- relationType: RelationType.ONE_TO_MANY,- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/__tests__/marketplace-api.integration-test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/__tests__/marketplace-api.integration-test.tsdeleted file mode 100644index be655ecfea5..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/__tests__/marketplace-api.integration-test.ts+++ /dev/null@@ -1,156 +0,0 @@-import { CoreApiClient } from 'twenty-client-sdk/core';-import { beforeAll, describe, expect, it } from 'vitest';--import { handler as getPartnerBySlug } from 'src/modules/partner/marketplace/get-partner-by-slug.logic-function';-import { handler as listAvailablePartners } from 'src/modules/partner/marketplace/list-available-partners.logic-function';--const client = new CoreApiClient();-const KNOWN_SLUG = 'nine-dots-ventures';--async function ensureMarketplacePartnerExists(): Promise<void> {- const existing = await client.query({- partners: {- __args: { filter: { slug: { eq: KNOWN_SLUG } }, first: 1 },- edges: {- node: {- id: true,- validationStage: true,- availability: true,- superPartner: true,- },- },- },- });-- const node = existing.partners?.edges?.[0]?.node;-- if (node) {- if (- node.validationStage === 'VALIDATED' &&- node.availability === 'AVAILABLE' &&- node.superPartner === true- ) {- return;- }-- await client.mutation({- updatePartner: {- __args: {- id: node.id,- data: {- validationStage: 'VALIDATED',- availability: 'AVAILABLE',- superPartner: true,- },- },- id: true,- },- });-- return;- }-- await client.mutation({- createPartner: {- __args: {- data: {- name: 'Nine Dots Ventures',- slug: KNOWN_SLUG,- introduction:- '## About Nine Dots\n\nMarketplace integration test partner.',- calendarLink: { primaryLinkUrl: 'https://calendly.com/placeholder' },- validationStage: 'VALIDATED',- availability: 'AVAILABLE',- superPartner: true,- },- },- id: true,- },- });-}--beforeAll(async () => {- await client.query({- partners: { __args: { first: 1 }, edges: { node: { id: true } } },- });- await ensureMarketplacePartnerExists();-});--describe('list-available-partners handler', () => {- it('returns validated available partners with plain introduction excerpts', async () => {- const result = await listAvailablePartners();-- expect(result.ok).toBe(true);- if (!result.ok) {- return;- }-- expect(result.count).toBeGreaterThan(0);- expect(Array.isArray(result.partners)).toBe(true);-- const partner = result.partners.find((entry) => entry.slug === KNOWN_SLUG);- expect(partner).toBeDefined();- if (!partner) {- return;- }-- expect(partner.name.length).toBeGreaterThan(0);- expect(partner.introduction.length).toBeGreaterThan(0);- expect(partner.introduction).not.toMatch(/^##\s/m);- expect(['ADVANCED', 'INTERMEDIATE', 'NEW', null]).toContain(- partner.partnerTier,- );- expect(partner.superPartner).toBe(true);- expect(partner.serviceCount).toBeGreaterThanOrEqual(0);- expect(partner.approvedCaseStudyCount).toBeGreaterThanOrEqual(0);- expect(partner.approvedCaseStudyWithCoverCount).toBeLessThanOrEqual(- partner.approvedCaseStudyCount,- );- expect(partner.rotationKey).toMatch(/^[a-f0-9]{64}$/);- expect('projectBudgetTypical' in partner).toBe(false);- expect('profileLinks' in partner).toBe(false);- expect('services' in partner).toBe(false);- expect('portfolio' in partner).toBe(false);- });-});--describe('get-partner-by-slug handler', () => {- it('returns NOT_FOUND for an unknown slug', async () => {- const result = await getPartnerBySlug({- queryStringParameters: { slug: `missing-partner-${Date.now()}` },- });-- expect(result).toEqual({ ok: false, reason: 'NOT_FOUND' });- });-- it('returns profile payload with markdown introduction and nested collections', async () => {- const result = await getPartnerBySlug({- queryStringParameters: { slug: KNOWN_SLUG },- });-- expect(result.ok).toBe(true);- if (!result.ok) {- return;- }-- const { partner } = result;- expect(partner.slug).toBe(KNOWN_SLUG);- expect(partner.introduction.length).toBeGreaterThan(0);- expect(partner.superPartner).toBe(true);- expect('projectBudgetTypical' in partner).toBe(true);- expect(Array.isArray(partner.profileLinks)).toBe(true);- expect(Array.isArray(partner.services)).toBe(true);- expect(Array.isArray(partner.portfolio)).toBe(true);-- for (const service of partner.services) {- expect(typeof service.title).toBe('string');- expect(typeof service.description).toBe('string');- }-- for (const item of partner.portfolio) {- expect(typeof item.client).toBe('string');- expect(typeof item.title).toBe('string');- expect(typeof item.body).toBe('string');- }- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/get-partner-by-slug.logic-function.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/get-partner-by-slug.logic-function.tsdeleted file mode 100644index 2c270bffec3..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/get-partner-by-slug.logic-function.ts+++ /dev/null@@ -1,22 +0,0 @@-import { defineLogicFunction } from 'twenty-sdk/define';--import { getPartnerBySlug } from 'src/modules/partner/marketplace/services/get-partner-by-slug.service';--export const GET_PARTNER_BY_SLUG_LOGIC_FUNCTION_ID =- '5e3e7b88-2cf2-4f56-9a4a-46c4c1d6b0bb';--export const handler = getPartnerBySlug;--export default defineLogicFunction({- universalIdentifier: GET_PARTNER_BY_SLUG_LOGIC_FUNCTION_ID,- name: 'get-partner-by-slug',- description:- 'Returns a single VALIDATED + AVAILABLE partner by slug, or NOT_FOUND.',- timeoutSeconds: 10,- handler,- httpRouteTriggerSettings: {- path: '/partner-by-slug',- httpMethod: 'GET',- isAuthRequired: false,- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/graphql/queries/get-partner-by-slug.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/graphql/queries/get-partner-by-slug.tsdeleted file mode 100644index 3105698fd12..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/graphql/queries/get-partner-by-slug.ts+++ /dev/null@@ -1,76 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--// CoreApiClient is codegenerated from the synced workspace schema, so the-// selection is strictly typed and the response shape derives from it.-export const queryPartnerBySlug = (client: CoreApiClient, slug: string) =>- client.query({- partners: {- __args: {- filter: {- slug: { eq: slug },- validationStage: { eq: 'VALIDATED' },- availability: { eq: 'AVAILABLE' },- },- first: 1,- },- edges: {- node: {- id: true,- name: true,- slug: true,- superPartner: true,- introduction: true,- languagesSpoken: true,- deploymentExpertise: true,- partnerScope: true,- region: true,- calendarLink: { primaryLinkUrl: true },- hourlyRate: { amountMicros: true, currencyCode: true },- projectBudgetMin: { amountMicros: true, currencyCode: true },- linkedin: { primaryLinkUrl: true },- website: { primaryLinkUrl: true },- partnerLinks: {- edges: {- node: {- url: { primaryLinkUrl: true },- sortOrder: true,- position: true,- },- },- },- partnerServices: {- edges: {- node: {- title: true,- description: true,- sortOrder: true,- position: true,- },- },- },- partnerContents: {- edges: {- node: {- contentType: true,- status: true,- clientName: true,- headline: true,- body: { markdown: true },- coverImage: { url: true },- coverImageUrl: true,- caseStudyLink: { primaryLinkUrl: true },- position: true,- },- },- },- // profilePicture is the legacy LINKS url; profilePictureFile is the- // new FILES upload (its items expose `url`). Display prefers the file.- profilePicture: { primaryLinkUrl: true },- profilePictureFile: { url: true },- skills: true,- city: true,- country: true,- },- },- },- });diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/graphql/queries/list-available-partners.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/graphql/queries/list-available-partners.tsdeleted file mode 100644index 2ca9421d4dd..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/graphql/queries/list-available-partners.ts+++ /dev/null@@ -1,64 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--// CoreApiClient is codegenerated from the synced workspace schema, so the query-// selection is strictly typed. Keep the fetch in one place and derive the-// response shape from it, so the HTTP contract can never drift from what we-// actually ask the API for.-export const queryAvailablePartners = (client: CoreApiClient) =>- client.query({- partners: {- __args: {- filter: {- validationStage: { eq: 'VALIDATED' },- availability: { eq: 'AVAILABLE' },- slug: { neq: '' },- },- orderBy: [{ name: 'AscNullsLast' }],- first: 100,- },- edges: {- node: {- id: true,- name: true,- slug: true,- introduction: true,- languagesSpoken: true,- deploymentExpertise: true,- partnerTier: true,- superPartner: true,- partnerScope: true,- region: true,- calendarLink: { primaryLinkUrl: true },- hourlyRate: { amountMicros: true, currencyCode: true },- projectBudgetMin: { amountMicros: true, currencyCode: true },- linkedin: { primaryLinkUrl: true },- website: { primaryLinkUrl: true },- // profilePicture is the legacy LINKS url; profilePictureFile is the- // new FILES upload (its items expose `url`). Display prefers the file.- profilePicture: { primaryLinkUrl: true },- profilePictureFile: { url: true },- skills: true,- city: true,- country: true,- // The server ignores nested relation arguments and caps every- // relation read at QUERY_MAX_RECORDS_FROM_RELATION (60), unordered.- // A partner holding more than 60 contents would report a truncated- // case-study count. Read these at the root and group by partner if- // any partner ever approaches that.- partnerServices: {- edges: { node: { id: true } },- },- partnerContents: {- edges: {- node: {- contentType: true,- status: true,- coverImage: { url: true },- coverImageUrl: true,- },- },- },- },- },- },- });diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/list-available-partners.logic-function.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/list-available-partners.logic-function.tsdeleted file mode 100644index e24d99b07bb..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/list-available-partners.logic-function.ts+++ /dev/null@@ -1,21 +0,0 @@-import { defineLogicFunction } from 'twenty-sdk/define';--import { listAvailablePartners } from 'src/modules/partner/marketplace/services/list-available-partners.service';--export const LIST_AVAILABLE_PARTNERS_LOGIC_FUNCTION_ID =- '0f91164f-f492-41e8-9bb0-481be5a3d5b9';--export const handler = listAvailablePartners;--export default defineLogicFunction({- universalIdentifier: LIST_AVAILABLE_PARTNERS_LOGIC_FUNCTION_ID,- name: 'list-available-partners',- description: 'Returns all partners with validationStage=VALIDATED and availability=AVAILABLE.',- timeoutSeconds: 10,- handler,- httpRouteTriggerSettings: {- path: '/partners',- httpMethod: 'GET',- isAuthRequired: false,- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/mappers/map-partner-for-marketplace.mapper.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/mappers/map-partner-for-marketplace.mapper.test.tsdeleted file mode 100644index 69b983a1d9c..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/mappers/map-partner-for-marketplace.mapper.test.ts+++ /dev/null@@ -1,306 +0,0 @@-import { describe, expect, it } from 'vitest';--import { mapPartnerForMarketplace } from './map-partner-for-marketplace.mapper';--const makeNode = () => ({- name: 'Nine Dots Ventures',- slug: 'nine-dots-ventures',- introduction: '## About\n\n**Senior** implementation partner.',- languagesSpoken: ['ENGLISH'],- deploymentExpertise: ['CRM_IMPLEMENTATION'],- partnerScope: ['IMPLEMENTATION'],- region: ['EUROPE'],- calendarLink: { primaryLinkUrl: 'https://cal.example.com' },- hourlyRate: { amountMicros: 150_000_000, currencyCode: 'USD' },- projectBudgetMin: { amountMicros: 1_000_000_000, currencyCode: 'USD' },- linkedin: { primaryLinkUrl: 'https://linkedin.com/company/nine-dots' },- website: { primaryLinkUrl: 'https://ninedots.example.com' },- profilePicture: { primaryLinkUrl: 'https://images.example.com/legacy.png' },- profilePictureFile: [{ url: 'https://images.example.com/uploaded.png' }],- skills: ['Salesforce', 'HubSpot'],- city: 'Paris',- country: 'France',- superPartner: false,- partnerLinks: {- edges: [] as Array<{- node: {- url: { primaryLinkUrl: string | null } | null;- sortOrder: number | null;- position: number | null;- };- }>,- },- partnerServices: {- edges: [] as Array<{- node: {- title: string | null;- description: string | null;- sortOrder: number | null;- position: number | null;- };- }>,- },- partnerContents: {- edges: [] as Array<{- node: {- contentType: string | readonly string[] | null;- status: string | null;- clientName: string | null;- headline: string | null;- body: { markdown: string | null } | null;- coverImage?: ReadonlyArray<{ url?: string | null } | null> | null;- coverImageUrl?: string | null;- caseStudyLink: { primaryLinkUrl: string | null } | null;- position: number | null;- };- }>,- },-});--describe('mapPartnerForMarketplace', () => {- it('maps list detail introduction from markdown as a plain excerpt', () => {- const node = makeNode();- node.introduction = `### Delivery partner\n\n${'A'.repeat(260)}\n\n- Platform migration`;-- const mapped = mapPartnerForMarketplace(node, 'list');-- expect(mapped.introduction.length).toBe(220);- expect(mapped.introduction).toContain('Delivery partner');- expect(mapped.introduction).not.toContain('###');- expect(mapped.introduction).not.toContain('- ');- expect('projectBudgetTypical' in mapped).toBe(false);- expect('profileLinks' in mapped).toBe(false);- expect('services' in mapped).toBe(false);- expect('portfolio' in mapped).toBe(false);- });-- it('keeps the full markdown introduction in profile detail', () => {- const node = makeNode();- node.introduction =- '## About us\n\n**Bold statement** with [link](https://example.com).';-- const mapped = mapPartnerForMarketplace(node, 'profile');-- expect(mapped.introduction).toBe(- '## About us\n\n**Bold statement** with [link](https://example.com).',- );- });-- it('aliases projectBudgetTypical from projectBudgetMin in profile detail', () => {- const node = makeNode();-- const mapped = mapPartnerForMarketplace(node, 'profile');-- expect(mapped.projectBudgetTypical).toEqual(node.projectBudgetMin);- });-- it('merges and deduplicates profile links from PartnerLink, website, and linkedin', () => {- const node = makeNode();- node.partnerLinks.edges = [- {- node: {- url: { primaryLinkUrl: 'https://example.com/community' },- sortOrder: 2,- position: 2,- },- },- {- node: {- url: { primaryLinkUrl: 'https://ninedots.example.com' },- sortOrder: 1,- position: 1,- },- },- ];-- const mapped = mapPartnerForMarketplace(node, 'profile');-- expect(mapped.profileLinks).toEqual([- { primaryLinkUrl: 'https://ninedots.example.com' },- { primaryLinkUrl: 'https://example.com/community' },- { primaryLinkUrl: 'https://linkedin.com/company/nine-dots' },- ]);- });-- it('maps only approved case studies into portfolio entries', () => {- const node = makeNode();- node.partnerContents.edges = [- {- node: {- contentType: ['CASE_STUDY'],- status: 'APPROVED',- clientName: 'Acme Corp',- headline: 'CRM migration',- body: { markdown: 'Moved 12 teams to Twenty.' },- coverImage: [{ url: 'https://images.example.com/case-study.png' }],- caseStudyLink: { primaryLinkUrl: 'https://example.com/case-study' },- position: 1,- },- },- {- node: {- contentType: ['CASE_STUDY'],- status: 'IN_REVIEW',- clientName: 'Hidden Client',- headline: 'Draft project',- body: { markdown: 'Should not be returned.' },- coverImage: [{ url: 'https://images.example.com/draft.png' }],- caseStudyLink: { primaryLinkUrl: 'https://example.com/draft' },- position: 2,- },- },- {- node: {- contentType: ['BLOG'],- status: 'APPROVED',- clientName: 'Content marketing',- headline: 'Blog post',- body: { markdown: 'Not a case study.' },- coverImage: [{ url: 'https://images.example.com/blog.png' }],- caseStudyLink: { primaryLinkUrl: 'https://example.com/blog' },- position: 3,- },- },- ];-- const mapped = mapPartnerForMarketplace(node, 'profile');-- expect(mapped.portfolio).toEqual([- {- client: 'Acme Corp',- title: 'CRM migration',- body: 'Moved 12 teams to Twenty.',- imageUrl: 'https://images.example.com/case-study.png',- link: 'https://example.com/case-study',- },- ]);- });-- it('falls back to the uploaded file when coverImageUrl is the TEXT default', () => {- const node = makeNode();- node.partnerContents.edges = [- {- node: {- contentType: ['CASE_STUDY'],- status: 'APPROVED',- clientName: 'Acme Corp',- headline: 'CRM migration',- body: { markdown: 'Moved 12 teams to Twenty.' },- coverImageUrl: '',- coverImage: [{ url: 'https://file.example.com/cover.png' }],- caseStudyLink: { primaryLinkUrl: 'https://example.com/case-study' },- position: 1,- },- },- ];-- expect(- mapPartnerForMarketplace(node, 'profile').portfolio[0].imageUrl,- ).toBe('https://file.example.com/cover.png');- });-- it('prefers the pasted coverImageUrl over the uploaded coverImage file in portfolio', () => {- const node = makeNode();- node.partnerContents.edges = [- {- node: {- contentType: ['CASE_STUDY'],- status: 'APPROVED',- clientName: 'Acme Corp',- headline: 'CRM migration',- body: { markdown: 'Moved 12 teams to Twenty.' },- coverImageUrl: 'https://paste.example.com/cover.png',- coverImage: [{ url: 'https://file.example.com/cover.png' }],- caseStudyLink: { primaryLinkUrl: 'https://example.com/case-study' },- position: 1,- },- },- ];-- expect(- mapPartnerForMarketplace(node, 'profile').portfolio[0].imageUrl,- ).toBe('https://paste.example.com/cover.png');- });-- it('falls back to the coverImage file url when coverImageUrl is absent', () => {- const node = makeNode();- node.partnerContents.edges = [- {- node: {- contentType: ['CASE_STUDY'],- status: 'APPROVED',- clientName: 'Acme Corp',- headline: 'CRM migration',- body: { markdown: 'Moved 12 teams to Twenty.' },- coverImageUrl: null,- coverImage: [{ url: 'https://file.example.com/cover.png' }],- caseStudyLink: { primaryLinkUrl: 'https://example.com/case-study' },- position: 1,- },- },- ];-- expect(- mapPartnerForMarketplace(node, 'profile').portfolio[0].imageUrl,- ).toBe('https://file.example.com/cover.png');- });-- it('sorts services by sortOrder ascending with nulls last', () => {- const node = makeNode();- node.partnerServices.edges = [- {- node: {- title: 'RevOps coaching',- description: 'Cross-team alignment and reporting.',- position: 3,- },- },- {- node: {- title: 'Data migration',- description: 'Historical sync and schema mapping.',- position: 1,- },- },- {- node: {- title: 'Fractional CRM lead',- description: 'Weekly operating cadence support.',- position: null,- },- },- ];-- const mapped = mapPartnerForMarketplace(node, 'profile');-- expect(mapped.services).toEqual([- {- title: 'Data migration',- description: 'Historical sync and schema mapping.',- },- {- title: 'RevOps coaching',- description: 'Cross-team alignment and reporting.',- },- {- title: 'Fractional CRM lead',- description: 'Weekly operating cadence support.',- },- ]);- });-- it('copies superPartner onto list and profile payloads', () => {- const node = makeNode();- node.superPartner = true;-- expect(mapPartnerForMarketplace(node, 'list').superPartner).toBe(true);- expect(mapPartnerForMarketplace(node, 'profile').superPartner).toBe(true);- });-- it('coerces a missing superPartner to false', () => {- const node = makeNode();- delete (node as { superPartner?: boolean }).superPartner;-- expect(mapPartnerForMarketplace(node, 'list').superPartner).toBe(false);- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/mappers/map-partner-for-marketplace.mapper.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/mappers/map-partner-for-marketplace.mapper.tsdeleted file mode 100644index 137bcfc1883..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/mappers/map-partner-for-marketplace.mapper.ts+++ /dev/null@@ -1,268 +0,0 @@-import { type CoreSchema } from 'twenty-client-sdk/core';--import { stripMarkdown } from 'src/modules/shared/utils/strip-markdown.util';--import { isApprovedCaseStudy } from 'src/modules/partner/utils/content-type';-import {- resolveCoverUrl,- resolvePartnerPictureUrl,-} from 'src/modules/partner/utils/profile-picture';--export type MapPartnerDetail = 'list' | 'profile';--type PrimaryLink = { primaryLinkUrl: string | null };-type Money = { amountMicros: number; currencyCode: string } | null;-type FileItemRead = { url?: string | null } | null | undefined;--type PartnerLinkEdge = {- node: {- url: PrimaryLink | null;- sortOrder: number | null;- position: number | null;- };-};--type PartnerServiceEdge = {- node: {- title: string | null;- description: string | null;- sortOrder: number | null;- position: number | null;- };-};--type PartnerContentEdge = {- node: {- contentType: string | readonly string[] | null;- status: string | null;- clientName: string | null;- headline: string | null;- body: { markdown: string | null } | null;- coverImage?: ReadonlyArray<FileItemRead> | null;- coverImageUrl?: string | null;- caseStudyLink: PrimaryLink | null;- position: number | null;- };-};--export type PartnerMarketplaceQueryNode = {- name: string;- slug: string;- introduction: string | null;- languagesSpoken: CoreSchema.Partner['languagesSpoken'];- deploymentExpertise: CoreSchema.Partner['deploymentExpertise'];- partnerScope: CoreSchema.Partner['partnerScope'];- region: CoreSchema.Partner['region'];- calendarLink: PrimaryLink;- hourlyRate: Money;- projectBudgetMin: Money;- linkedin: PrimaryLink;- website: PrimaryLink;- profilePicture: PrimaryLink;- profilePictureFile?: ReadonlyArray<FileItemRead> | null;- skills: string[] | null;- city: string | null;- country: string | null;- superPartner?: boolean | null;- partnerLinks?: { edges: ReadonlyArray<PartnerLinkEdge> } | null;- partnerServices?: { edges: ReadonlyArray<PartnerServiceEdge> } | null;- partnerContents?: { edges: ReadonlyArray<PartnerContentEdge> } | null;-};--export type MarketplaceListPartner = {- name: string;- slug: string;- introduction: string;- languagesSpoken: CoreSchema.Partner['languagesSpoken'];- deploymentExpertise: CoreSchema.Partner['deploymentExpertise'];- partnerScope: CoreSchema.Partner['partnerScope'];- region: CoreSchema.Partner['region'];- calendarLink: PrimaryLink;- hourlyRate: Money;- projectBudgetMin: Money;- linkedin: PrimaryLink;- website: PrimaryLink;- profilePicture: PrimaryLink;- skills: string[] | null;- city: string | null;- country: string | null;- superPartner: boolean;-};--export type MarketplaceProfilePartner = MarketplaceListPartner & {- introduction: string;- projectBudgetTypical: MarketplaceListPartner['projectBudgetMin'];- profileLinks: PrimaryLink[];- services: { title: string; description: string }[];- portfolio: {- client: string;- title: string;- body: string;- imageUrl: string | null;- link: string | null;- }[];-};--const LIST_INTRODUCTION_MAX_LENGTH = 220;--const richTextSource = (node: PartnerMarketplaceQueryNode): string =>- node.introduction?.trim() ?? '';--const toListIntroduction = (node: PartnerMarketplaceQueryNode): string => {- return stripMarkdown(richTextSource(node))- .slice(0, LIST_INTRODUCTION_MAX_LENGTH)- .trim();-};--const toProfileIntroduction = (node: PartnerMarketplaceQueryNode): string =>- richTextSource(node);--const sortOrderValue = (node: {- sortOrder?: number | null;- position?: number | null;-}): number | null => node.sortOrder ?? node.position ?? null;--const sortBySortOrderAscNullsLast = <- T extends { node: { sortOrder?: number | null; position?: number | null } },->(- edges: ReadonlyArray<T>,-): T[] =>- [...edges].sort((left, right) => {- const leftOrder = sortOrderValue(left.node);- const rightOrder = sortOrderValue(right.node);-- if (leftOrder === null && rightOrder === null) {- return 0;- }-- if (leftOrder === null) {- return 1;- }-- if (rightOrder === null) {- return -1;- }-- return leftOrder - rightOrder;- });--const sortByPositionAscNullsLast = <- T extends { node: { position: number | null } },->(- edges: ReadonlyArray<T>,-): T[] =>- [...edges].sort((left, right) => {- if (left.node.position === null && right.node.position === null) {- return 0;- }-- if (left.node.position === null) {- return 1;- }-- if (right.node.position === null) {- return -1;- }-- return left.node.position - right.node.position;- });--const dedupeUrls = (urls: ReadonlyArray<string | null>): string[] => {- const seen = new Set<string>();- const deduped: string[] = [];-- for (const url of urls) {- if (!url || seen.has(url)) {- continue;- }-- seen.add(url);- deduped.push(url);- }-- return deduped;-};--const mapProfileLinks = (node: PartnerMarketplaceQueryNode): PrimaryLink[] => {- const partnerLinkUrls = sortBySortOrderAscNullsLast(- node.partnerLinks?.edges ?? [],- ).map((edge) => edge.node.url?.primaryLinkUrl ?? null);-- const legacyUrls = [- node.website?.primaryLinkUrl ?? null,- node.linkedin?.primaryLinkUrl ?? null,- ];-- return dedupeUrls([...partnerLinkUrls, ...legacyUrls]).map((url) => ({- primaryLinkUrl: url,- }));-};--const mapServices = (- edges: ReadonlyArray<PartnerServiceEdge>,-): Array<{ title: string; description: string }> =>- sortBySortOrderAscNullsLast(edges).map(({ node }) => ({- title: node.title ?? '',- description: node.description ?? '',- }));--const mapPortfolio = (- edges: ReadonlyArray<PartnerContentEdge>,-): MarketplaceProfilePartner['portfolio'] =>- sortByPositionAscNullsLast(edges)- .filter(({ node }) => isApprovedCaseStudy(node))- .map(({ node }) => ({- client: node.clientName ?? '',- title: node.headline ?? '',- body: node.body?.markdown ?? '',- imageUrl: resolveCoverUrl(node.coverImageUrl, node.coverImage),- link: node.caseStudyLink?.primaryLinkUrl ?? null,- }));--const mapBasePartner = (- node: PartnerMarketplaceQueryNode,- detail: MapPartnerDetail,-): MarketplaceListPartner => ({- name: node.name,- slug: node.slug,- introduction:- detail === 'list' ? toListIntroduction(node) : toProfileIntroduction(node),- languagesSpoken: node.languagesSpoken,- deploymentExpertise: node.deploymentExpertise,- partnerScope: node.partnerScope,- region: node.region,- calendarLink: node.calendarLink,- hourlyRate: node.hourlyRate,- projectBudgetMin: node.projectBudgetMin,- linkedin: node.linkedin,- website: node.website,- profilePicture: {- primaryLinkUrl: resolvePartnerPictureUrl(- node.profilePictureFile,- node.profilePicture?.primaryLinkUrl,- ),- },- skills: node.skills,- city: node.city,- country: node.country,- superPartner: node.superPartner === true,-});--export function mapPartnerForMarketplace(- node: PartnerMarketplaceQueryNode,- detail: MapPartnerDetail,-): MarketplaceListPartner | MarketplaceProfilePartner {- const base = mapBasePartner(node, detail);-- if (detail === 'list') {- return base;- }-- return {- ...base,- projectBudgetTypical: base.projectBudgetMin,- profileLinks: mapProfileLinks(node),- services: mapServices(node.partnerServices?.edges ?? []),- portfolio: mapPortfolio(node.partnerContents?.edges ?? []),- };-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/services/get-partner-by-slug.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/services/get-partner-by-slug.service.tsdeleted file mode 100644index b574012a448..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/services/get-partner-by-slug.service.ts+++ /dev/null@@ -1,55 +0,0 @@-import { CoreApiClient } from 'twenty-client-sdk/core';--import { queryPartnerBySlug } from 'src/modules/partner/marketplace/graphql/queries/get-partner-by-slug';-import {- mapPartnerForMarketplace,- type MarketplaceProfilePartner,-} from 'src/modules/partner/marketplace/mappers/map-partner-for-marketplace.mapper';--type PartnerRaw = NonNullable<- Awaited<ReturnType<typeof queryPartnerBySlug>>['partners']->['edges'][number]['node'];--export type GetPartnerBySlugResult =- | { ok: true; partner: MarketplaceProfilePartner }- | { ok: false; reason: 'NOT_FOUND' | string };--const mapProfilePartner = (node: PartnerRaw): MarketplaceProfilePartner => {- const mapped = mapPartnerForMarketplace(node, 'profile');-- if (!('projectBudgetTypical' in mapped)) {- throw new Error(- 'get-partner-by-slug received list payload from profile mapper',- );- }-- return mapped;-};--export const getPartnerBySlug = async (input: {- queryStringParameters?: { slug?: string };-}): Promise<GetPartnerBySlugResult> => {- const slug = input?.queryStringParameters?.slug;- if (typeof slug !== 'string' || slug.length === 0) {- return { ok: false, reason: 'Missing slug query parameter' };- }-- try {- const client = new CoreApiClient();- const result = await queryPartnerBySlug(client, slug);- const rawNode = result.partners?.edges?.[0]?.node;-- if (!rawNode) {- return { ok: false, reason: 'NOT_FOUND' };- }-- const partner = mapProfilePartner(rawNode);-- return { ok: true, partner };- } catch (err) {- return {- ok: false,- reason: err instanceof Error ? err.message : String(err),- };- }-};diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/services/list-available-partners.service.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/services/list-available-partners.service.test.tsdeleted file mode 100644index 6f33eb260ae..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/services/list-available-partners.service.test.ts+++ /dev/null@@ -1,169 +0,0 @@-import { beforeEach, describe, expect, it, vi } from 'vitest';--const { queryAvailablePartnersMock } = vi.hoisted(() => ({- queryAvailablePartnersMock: vi.fn(),-}));--vi.mock('twenty-client-sdk/core', () => ({- CoreApiClient: vi.fn(),-}));--vi.mock(- 'src/modules/partner/marketplace/graphql/queries/list-available-partners',- () => ({ queryAvailablePartners: queryAvailablePartnersMock }),-);--import { listAvailablePartners } from './list-available-partners.service';--describe('listAvailablePartners', () => {- beforeEach(() => {- queryAvailablePartnersMock.mockReset();- });-- it('returns ranking metadata for each partner', async () => {- queryAvailablePartnersMock.mockResolvedValue({- partners: {- edges: [- {- node: {- id: 'partner-1',- name: 'Acme',- slug: 'acme',- introduction: 'A complete implementation partner profile.',- languagesSpoken: ['ENGLISH'],- deploymentExpertise: ['CLOUD'],- partnerTier: 'ADVANCED',- superPartner: true,- partnerScope: ['SOLUTIONING'],- region: ['EUROPE'],- calendarLink: { primaryLinkUrl: 'https://cal.example.com/acme' },- hourlyRate: { amountMicros: 100_000_000, currencyCode: 'USD' },- projectBudgetMin: null,- linkedin: { primaryLinkUrl: null },- website: { primaryLinkUrl: 'https://acme.example.com' },- profilePicture: { primaryLinkUrl: null },- profilePictureFile: [],- skills: ['Migration'],- city: 'Paris',- country: 'France',- partnerServices: {- edges: [- { node: { id: 'service-1' } },- { node: { id: 'service-2' } },- ],- },- partnerContents: {- edges: [- {- node: {- contentType: ['CASE_STUDY'],- status: 'APPROVED',- coverImageUrl: 'https://cdn.example.com/cover.png',- coverImage: [],- },- },- {- node: {- contentType: ['CASE_STUDY'],- status: 'APPROVED',- coverImageUrl: '',- coverImage: [{ url: 'https://cdn.example.com/file.png' }],- },- },- {- node: {- contentType: ['CASE_STUDY'],- status: 'APPROVED',- coverImageUrl: ' ',- coverImage: [],- },- },- {- node: {- contentType: ['CASE_STUDY'],- status: 'IN_REVIEW',- coverImageUrl: 'https://cdn.example.com/draft.png',- coverImage: [],- },- },- {- node: {- contentType: ['BLOG'],- status: 'APPROVED',- coverImageUrl: 'https://cdn.example.com/blog.png',- coverImage: [],- },- },- ],- },- },- },- ],- },- } as never);-- const result = await listAvailablePartners();-- expect(result.ok).toBe(true);- if (!result.ok) return;-- expect(result.partners[0]).toMatchObject({- partnerTier: 'ADVANCED',- superPartner: true,- serviceCount: 2,- approvedCaseStudyCount: 3,- approvedCaseStudyWithCoverCount: 2,- });- expect(result.partners[0].rotationKey).toMatch(/^[a-f0-9]{64}$/);- expect(result.partners[0].rotationKey).not.toContain('partner-1');- });-- it('counts zero for a partner with no services and no contents', async () => {- queryAvailablePartnersMock.mockResolvedValue({- partners: {- edges: [- {- node: {- id: 'partner-2',- name: 'Fresh',- slug: 'fresh',- introduction: '',- languagesSpoken: [],- deploymentExpertise: [],- partnerTier: null,- superPartner: false,- partnerScope: [],- region: [],- calendarLink: { primaryLinkUrl: null },- hourlyRate: null,- projectBudgetMin: null,- linkedin: { primaryLinkUrl: null },- website: { primaryLinkUrl: null },- profilePicture: { primaryLinkUrl: null },- profilePictureFile: [],- skills: [],- city: null,- country: null,- partnerServices: null,- partnerContents: null,- },- },- ],- },- } as never);-- const result = await listAvailablePartners();-- expect(result.ok).toBe(true);- if (!result.ok) return;-- expect(result.partners[0]).toMatchObject({- partnerTier: null,- superPartner: false,- serviceCount: 0,- approvedCaseStudyCount: 0,- approvedCaseStudyWithCoverCount: 0,- });- expect(result.partners[0].rotationKey).toMatch(/^[a-f0-9]{64}$/);- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/services/list-available-partners.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/services/list-available-partners.service.tsdeleted file mode 100644index 85f00ffc321..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/services/list-available-partners.service.ts+++ /dev/null@@ -1,75 +0,0 @@-import { CoreApiClient } from 'twenty-client-sdk/core';--import { queryAvailablePartners } from 'src/modules/partner/marketplace/graphql/queries/list-available-partners';-import {- mapPartnerForMarketplace,- type MarketplaceListPartner,-} from 'src/modules/partner/marketplace/mappers/map-partner-for-marketplace.mapper';-import { isApprovedCaseStudy } from 'src/modules/partner/utils/content-type';-import { resolveCoverUrl } from 'src/modules/partner/utils/profile-picture';-import { createWeeklyRotationKey } from 'src/modules/partner/marketplace/utils/create-weekly-rotation-key';--type AvailablePartnerRaw = NonNullable<- Awaited<ReturnType<typeof queryAvailablePartners>>['partners']->['edges'][number]['node'];--export type MarketplaceRankedListPartner = MarketplaceListPartner & {- partnerTier: AvailablePartnerRaw['partnerTier'];- serviceCount: number;- approvedCaseStudyCount: number;- approvedCaseStudyWithCoverCount: number;- rotationKey: string;-};--export type ListAvailablePartnersResult =- | { ok: true; count: number; partners: MarketplaceRankedListPartner[] }- | { ok: false; reason: string };--const mapListPartner = (- node: AvailablePartnerRaw,- rotationDate: Date,-): MarketplaceRankedListPartner => {- const mapped = mapPartnerForMarketplace(node, 'list');-- if ('projectBudgetTypical' in mapped) {- throw new Error(- 'list-available-partners received profile payload from list mapper',- );- }-- const approvedCaseStudies = (node.partnerContents?.edges ?? []).filter(- ({ node: content }) => isApprovedCaseStudy(content),- );-- return {- ...mapped,- partnerTier: node.partnerTier,- serviceCount: (node.partnerServices?.edges ?? []).length,- approvedCaseStudyCount: approvedCaseStudies.length,- approvedCaseStudyWithCoverCount: approvedCaseStudies.filter(- ({ node: content }) =>- resolveCoverUrl(content.coverImageUrl, content.coverImage) !== null,- ).length,- rotationKey: createWeeklyRotationKey(node.id, rotationDate),- };-};--export const listAvailablePartners = async (): Promise<ListAvailablePartnersResult> => {- try {- const client = new CoreApiClient();- const result = await queryAvailablePartners(client);- // One clock read for the whole response: a request that straddles the UTC- // Monday boundary would otherwise mix keys from two weeks in one sort.- const rotationDate = new Date();- const partners = (result.partners?.edges ?? []).map(({ node }) =>- mapListPartner(node, rotationDate),- );-- return { ok: true, count: partners.length, partners };- } catch (err) {- return {- ok: false,- reason: err instanceof Error ? err.message : String(err),- };- }-};diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/utils/create-weekly-rotation-key.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/utils/create-weekly-rotation-key.test.tsdeleted file mode 100644index c988edcf0fa..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/utils/create-weekly-rotation-key.test.ts+++ /dev/null@@ -1,29 +0,0 @@-import { describe, expect, it } from 'vitest';--import { createWeeklyRotationKey } from './create-weekly-rotation-key';--describe('createWeeklyRotationKey', () => {- it('keeps a partner stable within one UTC week', () => {- expect(- createWeeklyRotationKey('partner-1', new Date('2026-08-17T00:00:00Z')),- ).toBe(- createWeeklyRotationKey('partner-1', new Date('2026-08-23T23:59:59Z')),- );- });-- it('changes at the next UTC Monday', () => {- expect(- createWeeklyRotationKey('partner-1', new Date('2026-08-23T23:59:59Z')),- ).not.toBe(- createWeeklyRotationKey('partner-1', new Date('2026-08-24T00:00:00Z')),- );- });-- it('gives different partners different keys', () => {- const date = new Date('2026-08-19T12:00:00Z');-- expect(createWeeklyRotationKey('partner-1', date)).not.toBe(- createWeeklyRotationKey('partner-2', date),- );- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/utils/create-weekly-rotation-key.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/utils/create-weekly-rotation-key.tsdeleted file mode 100644index 3a60b61e7d6..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/marketplace/utils/create-weekly-rotation-key.ts+++ /dev/null@@ -1,21 +0,0 @@-import { createHash } from 'node:crypto';--const getUtcWeekStart = (date: Date): string => {- const weekStart = new Date(- Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate()),- );- const daysSinceMonday = (weekStart.getUTCDay() + 6) % 7;- weekStart.setUTCDate(weekStart.getUTCDate() - daysSinceMonday);-- return weekStart.toISOString().slice(0, 10);-};--// The date is required: a caller reading the clock per partner would mix keys-// from two weeks whenever a request crosses the UTC Monday boundary.-export const createWeeklyRotationKey = (- partnerId: string,- date: Date,-): string =>- createHash('sha256')- .update(`${partnerId}:${getUtcWeekStart(date)}`)- .digest('hex');diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/objects/partner-content.object.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/objects/partner-content.object.tsdeleted file mode 100644index 875f4cb8431..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/objects/partner-content.object.ts+++ /dev/null@@ -1,155 +0,0 @@-import { FieldType, defineObject } from 'twenty-sdk/define';--import { PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';--export const PARTNER_CONTENT_NAME_FIELD_ID =- '9e688624-83d2-4715-8b18-80492a6de2b6';-export const PARTNER_CONTENT_TYPE_FIELD_ID =- '1d926e6e-6ac1-4d60-ab3d-a73114005692';-export const PARTNER_CONTENT_STATUS_FIELD_ID =- 'a0fe09c4-c1f4-4b96-93c6-d7ec38f1166a';-export const PARTNER_CONTENT_APPROVAL_DATE_FIELD_ID =- 'b52d263e-423e-40b0-b82c-29214597c005';-export const PARTNER_CONTENT_INTERVIEW_FIELD_ID =- 'da7e9094-e2c3-47d3-924f-a1d4d3c717ed';-export const PARTNER_CONTENT_DOCUMENTS_FIELD_ID =- 'f303369e-288c-4a48-9920-c1de0ad9a159';-export const PARTNER_CONTENT_CLIENT_NAME_FIELD_ID =- '3c430cee-c5db-4bd0-8380-a551e6ba4f19';-export const PARTNER_CONTENT_HEADLINE_FIELD_ID =- '48937b8d-b8d6-4424-86f3-4ab18e83e9f5';-export const PARTNER_CONTENT_BODY_FIELD_ID =- 'fca9e56b-a9a6-40dc-a5e0-7a2611d3febb';-export const PARTNER_CONTENT_COVER_IMAGE_FIELD_ID =- '6b1225d3-f666-4c7b-8309-ab95cd5f44ea';-export const PARTNER_CONTENT_COVER_IMAGE_URL_FIELD_ID =- '1d87e6cb-0cbe-4010-96a3-25e891774c5e';-export const PARTNER_CONTENT_CASE_STUDY_LINK_FIELD_ID =- '35e32a90-4df3-4741-b331-77ebdc8fdb80';-export const PARTNER_CONTENT_POSITION_FIELD_ID =- '37e96b80-7387-5254-8be7-028a19cc5a1e';--export default defineObject({- universalIdentifier: PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER,- nameSingular: 'partnerContent',- namePlural: 'partnerContents',- labelSingular: 'Partner Content',- labelPlural: 'Partner Content',- description: 'Marketing content involving a partner: quotes, case studies, logos',- icon: 'IconQuote',- isSearchable: true,- labelIdentifierFieldMetadataUniversalIdentifier: PARTNER_CONTENT_NAME_FIELD_ID,- fields: [- {- universalIdentifier: PARTNER_CONTENT_NAME_FIELD_ID,- type: FieldType.TEXT,- name: 'name',- label: 'Name',- icon: 'IconTag',- defaultValue: "''",- },- {- universalIdentifier: PARTNER_CONTENT_TYPE_FIELD_ID,- type: FieldType.MULTI_SELECT,- name: 'contentType',- label: 'Content Type',- icon: 'IconCategory',- isNullable: true,- options: [- { id: '07f85e5b-0d70-416b-9884-256e469ed532', value: 'CUSTOMER_QUOTE', label: 'Customer quote', position: 0, color: 'blue' },- { id: '108b2358-d04d-4fdc-83df-a5978d39f66f', value: 'CASE_STUDY', label: 'Case study', position: 1, color: 'green' },- { id: 'eb45f371-f93c-4c45-9c8a-f29e1a58b7e4', value: 'PARTNER_QUOTE', label: 'Partner quote', position: 2, color: 'orange' },- { id: '3356c8a0-41cd-47c3-a293-5862138abc1a', value: 'LOGO', label: 'Logo', position: 3, color: 'purple' },- ],- },- {- universalIdentifier: PARTNER_CONTENT_STATUS_FIELD_ID,- type: FieldType.SELECT,- name: 'status',- label: 'Status',- icon: 'IconProgressCheck',- defaultValue: "'WIP'",- options: [- { id: '5d41450b-8efb-41e8-81b7-b534429ec1b4', value: 'WIP', label: 'WIP', position: 0, color: 'gray' },- { id: '6611ae9a-4253-4638-9c47-d8bf2ec54368', value: 'INTERVIEW_SCHEDULED', label: 'Interview scheduled', position: 1, color: 'blue' },- { id: 'ae3d91e4-96ea-4687-b71f-d2d80088f28a', value: 'UNDER_CUSTOMER_PARTNER_REVIEW', label: 'Under review', position: 2, color: 'orange' },- { id: '91fe48a3-7950-4cdd-8c52-8d9b2cc03f0b', value: 'APPROVED', label: 'Approved', position: 3, color: 'green' },- { id: 'fa640b71-862e-4c64-80fa-37ab8b50d254', value: 'REJECTED', label: 'Rejected', position: 4, color: 'red' },- ],- },- {- universalIdentifier: PARTNER_CONTENT_APPROVAL_DATE_FIELD_ID,- type: FieldType.DATE_TIME,- name: 'approvalDate',- label: 'Approval Date',- icon: 'IconCalendarCheck',- isNullable: true,- },- {- universalIdentifier: PARTNER_CONTENT_INTERVIEW_FIELD_ID,- type: FieldType.LINKS,- name: 'interview',- label: 'Interview',- icon: 'IconMicrophone',- isNullable: true,- },- {- universalIdentifier: PARTNER_CONTENT_DOCUMENTS_FIELD_ID,- type: FieldType.FILES,- name: 'documents',- label: 'Documents',- icon: 'IconPaperclip',- isNullable: true,- universalSettings: { maxNumberOfValues: 10 },- },- {- universalIdentifier: PARTNER_CONTENT_CLIENT_NAME_FIELD_ID,- type: FieldType.TEXT,- name: 'clientName',- label: 'Client Name',- icon: 'IconBuilding',- isNullable: true,- },- {- universalIdentifier: PARTNER_CONTENT_HEADLINE_FIELD_ID,- type: FieldType.TEXT,- name: 'headline',- label: 'Headline',- icon: 'IconSparkles',- isNullable: true,- },- {- universalIdentifier: PARTNER_CONTENT_BODY_FIELD_ID,- type: FieldType.RICH_TEXT,- name: 'body',- label: 'Body',- icon: 'IconFileText',- isNullable: true,- },- {- universalIdentifier: PARTNER_CONTENT_COVER_IMAGE_FIELD_ID,- type: FieldType.FILES,- name: 'coverImage',- label: 'Cover Image',- icon: 'IconPhoto',- isNullable: true,- universalSettings: { maxNumberOfValues: 1 },- },- {- universalIdentifier: PARTNER_CONTENT_COVER_IMAGE_URL_FIELD_ID,- type: FieldType.TEXT,- name: 'coverImageUrl',- label: 'Cover Image URL',- icon: 'IconPhoto',- isNullable: true,- },- {- universalIdentifier: PARTNER_CONTENT_CASE_STUDY_LINK_FIELD_ID,- type: FieldType.LINKS,- name: 'caseStudyLink',- label: 'Case Study Link',- icon: 'IconLink',- isNullable: true,- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/objects/partner-link.object.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/objects/partner-link.object.tsdeleted file mode 100644index 8a37353b659..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/objects/partner-link.object.ts+++ /dev/null@@ -1,50 +0,0 @@-import { FieldType, defineObject } from 'twenty-sdk/define';--import { PARTNER_LINK_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';--export const PARTNER_LINK_NAME_FIELD_ID = '15aeb279-e836-491c-84a4-58a6da8685c7';-export const PARTNER_LINK_URL_FIELD_ID = 'e28d8614-f6d4-4da8-8543-4b233b7ec070';-export const PARTNER_LINK_SORT_ORDER_FIELD_ID =- '197a4153-ab7b-4c9b-87ab-3a6d849a0229';-export const PARTNER_LINK_POSITION_FIELD_ID =- 'a770d910-1653-4707-8ab3-b3041fb6527c';--export default defineObject({- universalIdentifier: PARTNER_LINK_OBJECT_UNIVERSAL_IDENTIFIER,- nameSingular: 'partnerLink',- namePlural: 'partnerLinks',- labelSingular: 'Partner Link',- labelPlural: 'Partner Links',- description: 'Curated link shown on a partner profile',- icon: 'IconLink',- isSearchable: true,- labelIdentifierFieldMetadataUniversalIdentifier: PARTNER_LINK_NAME_FIELD_ID,- fields: [- {- universalIdentifier: PARTNER_LINK_NAME_FIELD_ID,- type: FieldType.TEXT,- name: 'name',- label: 'Name',- icon: 'IconTag',- defaultValue: "''",- },- {- universalIdentifier: PARTNER_LINK_URL_FIELD_ID,- type: FieldType.LINKS,- name: 'url',- label: 'URL',- icon: 'IconWorldWww',- isNullable: true,- },- {- // Partner-editable ordering for marketplace profile links. POSITION is system-managed- // and not editable in the UI — partners set sortOrder instead.- universalIdentifier: PARTNER_LINK_SORT_ORDER_FIELD_ID,- type: FieldType.NUMBER,- name: 'sortOrder',- label: 'Sort order',- icon: 'IconSortAscending',- isNullable: true,- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/objects/partner-service.object.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/objects/partner-service.object.tsdeleted file mode 100644index 53a0cc7c9cb..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/objects/partner-service.object.ts+++ /dev/null@@ -1,52 +0,0 @@-import { FieldType, defineObject } from 'twenty-sdk/define';--import { PARTNER_SERVICE_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';--export const PARTNER_SERVICE_TITLE_FIELD_ID =- '31b8e0aa-a254-4d0d-a3db-bb56422f0d69';-export const PARTNER_SERVICE_DESCRIPTION_FIELD_ID =- 'dc1f7fa5-0468-4483-89a2-3da8362df86f';-export const PARTNER_SERVICE_SORT_ORDER_FIELD_ID =- 'dd8a1f0a-9039-4a95-9e29-685c28a44205';-export const PARTNER_SERVICE_POSITION_FIELD_ID =- '1d0ff71b-17da-4260-b8ec-e4e992430547';--export default defineObject({- universalIdentifier: PARTNER_SERVICE_OBJECT_UNIVERSAL_IDENTIFIER,- nameSingular: 'partnerService',- namePlural: 'partnerServices',- labelSingular: 'Partner Service',- labelPlural: 'Partner Services',- description: 'Service offered by a partner',- icon: 'IconTool',- isSearchable: true,- labelIdentifierFieldMetadataUniversalIdentifier: PARTNER_SERVICE_TITLE_FIELD_ID,- fields: [- {- universalIdentifier: PARTNER_SERVICE_TITLE_FIELD_ID,- type: FieldType.TEXT,- name: 'title',- label: 'Title',- icon: 'IconTag',- defaultValue: "''",- },- {- universalIdentifier: PARTNER_SERVICE_DESCRIPTION_FIELD_ID,- type: FieldType.TEXT,- name: 'description',- label: 'Description',- icon: 'IconFileText',- isNullable: true,- },- {- // Partner-editable ordering for marketplace services. POSITION is system-managed- // and not editable in the UI — partners set sortOrder instead.- universalIdentifier: PARTNER_SERVICE_SORT_ORDER_FIELD_ID,- type: FieldType.NUMBER,- name: 'sortOrder',- label: 'Sort order',- icon: 'IconSortAscending',- isNullable: true,- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/objects/partner.object.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/objects/partner.object.tsdeleted file mode 100644index ee3265f17dc..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/objects/partner.object.ts+++ /dev/null@@ -1,2096 +0,0 @@-import { FieldType, defineObject } from 'twenty-sdk/define';--import { PARTNER_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';--export default defineObject({- universalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- nameSingular: 'partner',- namePlural: 'partners',- labelSingular: 'Partner',- labelPlural: 'Partners',- description: 'A certified implementation partner',- icon: 'IconBuildingStore',- isSearchable: true,- labelIdentifierFieldMetadataUniversalIdentifier:- 'a0000001-0000-4000-8000-000000000001',- fields: [- {- universalIdentifier: 'a0000001-0000-4000-8000-000000000001',- type: FieldType.TEXT,- name: 'name',- label: 'Name',- icon: 'IconTag',- defaultValue: "''",- },- {- universalIdentifier: 'a0000002-0000-4000-8000-000000000002',- type: FieldType.TEXT,- name: 'slug',- label: 'Slug',- icon: 'IconLink',- isNullable: true,- },- {- universalIdentifier: '2ca9856f-f54a-4326-9ff3-668fd7da0b50',- type: FieldType.SELECT,- name: 'validationStage',- label: 'Validation Stage',- icon: 'IconProgressCheck',- defaultValue: "'APPLICATION'",- options: [- {- id: '1b4f8b0b-68ec-4c02-a7e6-fbd0cda2f3b9',- value: 'APPLICATION',- label: 'Application',- position: 0,- color: 'gray',- },- {- id: '901181af-b2cb-4052-9ac8-3c84281671f8',- value: 'POTENTIAL',- label: 'Potential partner',- position: 1,- color: 'blue',- },- {- id: '3ebbc425-e5e3-412d-93df-5f70fefa1798',- value: 'VALIDATED',- label: 'Validated partner',- position: 2,- color: 'green',- },- {- id: '3d0ec027-0d51-4df7-932e-13c60d4b4382',- value: 'FORMER',- label: 'Former partner',- position: 3,- color: 'orange',- },- {- id: '19dc4929-735a-4b64-8f57-f34f3eaa3a73',- value: 'REJECTED',- label: 'Rejected',- position: 4,- color: 'red',- },- ],- },- {- universalIdentifier: '44cc91d2-5da1-4442-aa92-726124351029',- type: FieldType.BOOLEAN,- name: 'superPartner',- label: 'Super partner',- description:- 'Admin-only trust flag. Pins the partner at the top of the public marketplace. Partners cannot set this.',- icon: 'IconStar',- defaultValue: false,- },- {- universalIdentifier: 'd4fa6461-37b6-49ee-9181-dd482e74a70b',- type: FieldType.SELECT,- name: 'partnerTier',- label: 'Partner Tier',- icon: 'IconMedal',- isNullable: true,- options: [- {- id: '63806cc0-02a8-4fe9-b2ba-0efe43a33109',- value: 'NEW',- label: 'New',- position: 0,- color: 'gray',- },- {- id: '1ea6f5ba-6a4a-4e64-9b56-11e9ae56c97e',- value: 'INTERMEDIATE',- label: 'Intermediate',- position: 1,- color: 'blue',- },- {- id: 'b44de8b4-caea-4ca6-94cd-fb67221b5fdb',- value: 'ADVANCED',- label: 'Advanced',- position: 2,- color: 'green',- },- ],- },- {- universalIdentifier: '500021ad-ca42-4fd3-8727-392dd26b722a',- type: FieldType.MULTI_SELECT,- name: 'partnerScope',- label: 'Categories',- icon: 'IconListCheck',- isNullable: true,- options: [- {- id: 'b1000001-0000-4000-8000-0000000000a1',- value: 'ADVISORY',- label: 'Advisory & Discovery',- position: 0,- color: 'blue',- },- {- id: 'b1000002-0000-4000-8000-0000000000a2',- value: 'SOLUTIONING',- label: 'Solutioning',- position: 1,- color: 'green',- },- {- id: 'b1000003-0000-4000-8000-0000000000a3',- value: 'DEVELOPMENT',- label: 'Custom Development',- position: 2,- color: 'turquoise',- },- {- id: 'b1000004-0000-4000-8000-0000000000a4',- value: 'HOSTING',- label: 'Hosting & Infrastructure',- position: 3,- color: 'purple',- },- {- id: 'b1000005-0000-4000-8000-0000000000a5',- value: 'SUPPORT',- label: 'Training & Adoption',- position: 4,- color: 'pink',- },- ],- },- {- universalIdentifier: 'a451e557-a488-470a-8b35-6f9b8cfb1a10',- type: FieldType.SELECT,- name: 'typeOfTeam',- label: 'Type of Team',- icon: 'IconUsersGroup',- isNullable: true,- options: [- {- id: '0f59b781-5a81-4025-92ad-4b93b2c62df0',- value: 'SOLO',- label: 'Solo',- position: 0,- color: 'blue',- },- {- id: 'db47bc44-93db-4cbf-8d0f-3057cf01d11e',- value: 'AGENCY',- label: 'Agency',- position: 1,- color: 'green',- },- ],- },- {- universalIdentifier: '6f260cc0-a860-41e6-ad40-a2ef32ecffbe',- type: FieldType.ARRAY,- name: 'skills',- label: 'Skills',- icon: 'IconTags',- isNullable: true,- },- {- universalIdentifier: 'a0000004-0000-4000-8000-000000000004',- type: FieldType.SELECT,- name: 'availability',- label: 'Availability',- icon: 'IconCalendarCheck',- defaultValue: "'AVAILABLE'",- options: [- {- id: '639d74c3-5d38-407b-b0e4-81f3930db451',- value: 'AVAILABLE',- label: 'Available',- position: 0,- color: 'green',- },- {- id: '6a921479-559a-4446-892a-d4a1b5a3abb4',- value: 'UNAVAILABLE',- label: 'Unavailable',- position: 1,- color: 'gray',- },- ],- },- {- universalIdentifier: 'a0000005-0000-4000-8000-000000000005',- type: FieldType.MULTI_SELECT,- name: 'deploymentExpertise',- label: 'Deployment Expertise',- icon: 'IconCloud',- isNullable: true,- options: [- {- id: 'f2f53365-d909-4a97-bb81-efab43f0a17e',- value: 'CLOUD',- label: 'Cloud',- position: 0,- color: 'sky',- },- {- id: '5e47226b-4e60-413f-80ee-b8f1d9ee6ad6',- value: 'SELF_HOST',- label: 'Self-host',- position: 1,- color: 'purple',- },- ],- },- {- universalIdentifier: 'a0000007-0000-4000-8000-000000000007',- type: FieldType.MULTI_SELECT,- name: 'languagesSpoken',- label: 'Languages Spoken',- icon: 'IconLanguage',- isNullable: true,- options: [- {- id: '3fe94a92-5f64-46f4-8697-1a44e06e939f',- value: 'ENGLISH',- label: 'English',- position: 0,- color: 'blue',- },- {- id: 'fdfe8adf-b2f1-4ef9-97c1-449302932698',- value: 'FRENCH',- label: 'French',- position: 1,- color: 'red',- },- {- id: '820c120a-17ba-4e9a-8dd7-9724ac41d7ca',- value: 'GERMAN',- label: 'German',- position: 2,- color: 'yellow',- },- {- id: '28171507-753d-4a8e-b9c2-44c698c2a26b',- value: 'CHINESE',- label: 'Chinese',- position: 3,- color: 'orange',- },- {- id: 'd9111720-26c1-47c3-85bb-a30699737cce',- value: 'SPANISH',- label: 'Spanish',- position: 4,- color: 'green',- },- {- id: '7dbfcb38-4255-4fe8-91dc-ce0686191521',- value: 'ARABIC',- label: 'Arabic',- position: 5,- color: 'sky',- },- {- id: 'd4e0e54b-2c57-498a-9ccc-9cfe64f09a36',- value: 'BENGALI',- label: 'Bengali',- position: 6,- color: 'purple',- },- {- id: '34e765d2-5b03-4a63-a6e6-6c3c75fd8d75',- value: 'CATALAN',- label: 'Catalan',- position: 7,- color: 'pink',- },- {- id: 'b042b1d3-19d6-4094-b53e-85f9727360b1',- value: 'CZECH',- label: 'Czech',- position: 8,- color: 'turquoise',- },- {- id: '0a8ebe74-dcfa-44f5-abde-1af3a8dd8879',- value: 'DANISH',- label: 'Danish',- position: 9,- color: 'gray',- },- {- id: '385e0db5-ab16-4a59-94fd-98921fa367d5',- value: 'DUTCH',- label: 'Dutch',- position: 10,- color: 'blue',- },- {- id: 'f8ec118f-6652-4fe4-a7dc-a77c079f473e',- value: 'FARSI',- label: 'Farsi',- position: 11,- color: 'red',- },- {- id: 'cd58db19-6be6-4deb-8f1b-4cd9bdbcacdf',- value: 'FINNISH',- label: 'Finnish',- position: 12,- color: 'yellow',- },- {- id: 'c20be129-8a93-479c-99f1-89dad2177c0a',- value: 'GREEK',- label: 'Greek',- position: 13,- color: 'orange',- },- {- id: '7faaec05-22d1-4b37-a700-9dc4733effb6',- value: 'HINDI',- label: 'Hindi',- position: 14,- color: 'green',- },- {- id: '3400d7db-312f-4d54-ac19-04a2f6fed6e0',- value: 'INDONESIAN',- label: 'Indonesian',- position: 15,- color: 'sky',- },- {- id: 'd1eb3870-2938-4c87-9596-3980b31df293',- value: 'ITALIAN',- label: 'Italian',- position: 16,- color: 'purple',- },- {- id: '7a854dd9-6c81-4d16-8b76-79b3571638ec',- value: 'JAPANESE',- label: 'Japanese',- position: 17,- color: 'pink',- },- {- id: '51be3b14-195c-45e2-815e-a6591d0946b1',- value: 'KOREAN',- label: 'Korean',- position: 18,- color: 'turquoise',- },- {- id: 'c31168a0-276c-45dc-bd39-a498d39a44d8',- value: 'MALAY',- label: 'Malay',- position: 19,- color: 'gray',- },- {- id: '7719d197-9e91-41d3-a66f-728cfce32c33',- value: 'NORWEGIAN',- label: 'Norwegian',- position: 20,- color: 'blue',- },- {- id: '115c5e11-2462-4371-92ca-c4835649de15',- value: 'POLISH',- label: 'Polish',- position: 21,- color: 'red',- },- {- id: '018e3663-3de8-4110-aceb-48c8083ebb9a',- value: 'PORTUGUESE',- label: 'Portuguese',- position: 22,- color: 'yellow',- },- {- id: 'ca97987f-4f43-43d0-b7a0-490bc566b42f',- value: 'PUNJABI',- label: 'Punjabi',- position: 23,- color: 'orange',- },- {- id: '05215653-4d32-49e2-9ff3-73e66e14d97d',- value: 'ROMANIAN',- label: 'Romanian',- position: 24,- color: 'green',- },- {- id: 'a14e341e-a266-407f-b4c7-936cfa608500',- value: 'RUSSIAN',- label: 'Russian',- position: 25,- color: 'sky',- },- {- id: '1190a9eb-bd06-4d77-ab59-c619f4e2faa3',- value: 'SWAHILI',- label: 'Swahili',- position: 26,- color: 'purple',- },- {- id: '0fedffb0-c0d7-47b7-ac5f-0b166d24d670',- value: 'SWEDISH',- label: 'Swedish',- position: 27,- color: 'pink',- },- {- id: '8205bc44-b2a0-4211-9fe5-1bc64efaa844',- value: 'TAGALOG',- label: 'Tagalog',- position: 28,- color: 'turquoise',- },- {- id: '866b6438-c172-4c72-b69e-b1ca89342526',- value: 'TAMIL',- label: 'Tamil',- position: 29,- color: 'gray',- },- {- id: 'a2c4851b-302b-4420-aff2-6d7dc614fa6c',- value: 'THAI',- label: 'Thai',- position: 30,- color: 'blue',- },- {- id: '0a5672dd-ebe5-48bc-b8ab-7d2bf6a605e2',- value: 'TURKISH',- label: 'Turkish',- position: 31,- color: 'red',- },- {- id: '36324fb0-5ea2-4e9f-845c-ac65b977ab20',- value: 'UKRAINIAN',- label: 'Ukrainian',- position: 32,- color: 'yellow',- },- {- id: 'b1aad243-fc85-4df3-a83e-07796ae01d6c',- value: 'URDU',- label: 'Urdu',- position: 33,- color: 'orange',- },- {- id: '922895f8-3a8a-45b8-a70e-0ae7b0c8ff32',- value: 'VIETNAMESE',- label: 'Vietnamese',- position: 34,- color: 'green',- },- ],- },- {- universalIdentifier: '0a1ce916-4df5-469a-b793-30f19e45b38d',- type: FieldType.TEXT,- name: 'city',- label: 'City',- icon: 'IconMapPin',- isNullable: true,- },- {- universalIdentifier: 'a77d7fa6-c398-47db-af0f-036a5c719f20',- type: FieldType.SELECT,- name: 'country',- label: 'Country',- icon: 'IconFlag',- isNullable: true,- options: [- {- id: '03332728-50b1-49ec-bdec-a938cb97ca74',- value: 'AFGHANISTAN',- label: 'Afghanistan 🇦🇫',- position: 0,- color: 'blue',- },- {- id: 'c39c7baa-6f52-4349-bc28-97b59f2a9a3a',- value: 'ALBANIA',- label: 'Albania 🇦🇱',- position: 1,- color: 'turquoise',- },- {- id: '1bce0427-d693-451a-9a6b-a50c0c502c85',- value: 'ALGERIA',- label: 'Algeria 🇩🇿',- position: 2,- color: 'green',- },- {- id: '634fb580-4f12-4a5b-b43c-5787330d4b60',- value: 'ANDORRA',- label: 'Andorra 🇦🇩',- position: 3,- color: 'sky',- },- {- id: '545797b9-16df-40d5-ab9b-037d3d875263',- value: 'ANGOLA',- label: 'Angola 🇦🇴',- position: 4,- color: 'purple',- },- {- id: '83b58c61-8b0d-42e1-9d4f-9a530ace7899',- value: 'ANTIGUA_AND_BARBUDA',- label: 'Antigua & Barbuda 🇦🇬',- position: 5,- color: 'orange',- },- {- id: '58fd4e0d-b48d-4b22-81d8-de6db6bd22ed',- value: 'ARGENTINA',- label: 'Argentina 🇦🇷',- position: 6,- color: 'yellow',- },- {- id: '7091a2e3-2095-4693-bd53-366df4ba5c75',- value: 'ARMENIA',- label: 'Armenia 🇦🇲',- position: 7,- color: 'red',- },- {- id: '479725e7-f185-46c6-9e8b-605fbbb392f8',- value: 'AUSTRALIA',- label: 'Australia 🇦🇺',- position: 8,- color: 'pink',- },- {- id: 'b7993e1b-5f7d-47b9-a84d-41795160393a',- value: 'AUSTRIA',- label: 'Austria 🇦🇹',- position: 9,- color: 'gray',- },- {- id: 'e2d324df-2baa-49a2-a016-2c7cab0d0e95',- value: 'AZERBAIJAN',- label: 'Azerbaijan 🇦🇿',- position: 10,- color: 'blue',- },- {- id: '87dc4b54-c4f7-4813-a0e4-d2214e659a77',- value: 'BAHAMAS',- label: 'Bahamas 🇧🇸',- position: 11,- color: 'turquoise',- },- {- id: '32149c4f-3319-42a6-a0ca-6afb42bdf3b9',- value: 'BAHRAIN',- label: 'Bahrain 🇧🇭',- position: 12,- color: 'green',- },- {- id: 'c74d1f90-e17f-4e9a-9341-5c6ffda2d3ac',- value: 'BANGLADESH',- label: 'Bangladesh 🇧🇩',- position: 13,- color: 'sky',- },- {- id: '61c2e8c4-06af-4daa-ac52-34f4b47e2aad',- value: 'BARBADOS',- label: 'Barbados 🇧🇧',- position: 14,- color: 'purple',- },- {- id: '1c7dfa46-72e0-4ba3-8af5-3b2d1d46fd4b',- value: 'BELARUS',- label: 'Belarus 🇧🇾',- position: 15,- color: 'orange',- },- {- id: '771258e5-b16f-47d4-aaed-47a4c931b72d',- value: 'BELGIUM',- label: 'Belgium 🇧🇪',- position: 16,- color: 'yellow',- },- {- id: 'f3910b68-3f3f-4afb-9f90-5561376e5098',- value: 'BELIZE',- label: 'Belize 🇧🇿',- position: 17,- color: 'red',- },- {- id: 'b06f1bc7-2058-44fc-b868-631559de7d11',- value: 'BENIN',- label: 'Benin 🇧🇯',- position: 18,- color: 'pink',- },- {- id: 'acff20b8-b865-47de-9049-c660866f5218',- value: 'BHUTAN',- label: 'Bhutan 🇧🇹',- position: 19,- color: 'gray',- },- {- id: 'bee20647-c283-40af-9733-37753e42b464',- value: 'BOLIVIA',- label: 'Bolivia 🇧🇴',- position: 20,- color: 'blue',- },- {- id: '4dd91769-c713-47af-bf48-aed0251115b1',- value: 'BOSNIA_AND_HERZEGOVINA',- label: 'Bosnia & Herzegovina 🇧🇦',- position: 21,- color: 'turquoise',- },- {- id: 'a6997427-007f-42b4-b6ea-892f7ce58dff',- value: 'BOTSWANA',- label: 'Botswana 🇧🇼',- position: 22,- color: 'green',- },- {- id: '3ff1f170-d3f0-4ce6-9490-bfc20aadf470',- value: 'BRAZIL',- label: 'Brazil 🇧🇷',- position: 23,- color: 'sky',- },- {- id: '7b2d6911-4676-433d-93f1-6eca2530d89d',- value: 'BRUNEI',- label: 'Brunei 🇧🇳',- position: 24,- color: 'purple',- },- {- id: '767c72f3-f951-4b00-958d-856d2a8bda7a',- value: 'BULGARIA',- label: 'Bulgaria 🇧🇬',- position: 25,- color: 'orange',- },- {- id: 'e16ce6af-86b0-4448-8008-c5efa2ce3fe9',- value: 'BURKINA_FASO',- label: 'Burkina Faso 🇧🇫',- position: 26,- color: 'yellow',- },- {- id: 'dd7e7b2a-8367-482d-99d4-7877d883c2e3',- value: 'BURUNDI',- label: 'Burundi 🇧🇮',- position: 27,- color: 'red',- },- {- id: 'd9d6eea9-7724-4c65-be48-e861075121f1',- value: 'CAMBODIA',- label: 'Cambodia 🇰🇭',- position: 28,- color: 'pink',- },- {- id: '49178472-0bdd-4797-be6c-e0a1ac6e4147',- value: 'CAMEROON',- label: 'Cameroon 🇨🇲',- position: 29,- color: 'gray',- },- {- id: '849b6361-a83b-48fb-a3e5-2ac6e9089c7f',- value: 'CANADA',- label: 'Canada 🇨🇦',- position: 30,- color: 'blue',- },- {- id: 'ca22a230-01b1-4099-b7c2-29fd3b8d09de',- value: 'CAPE_VERDE',- label: 'Cape Verde 🇨🇻',- position: 31,- color: 'turquoise',- },- {- id: '360bef1e-34a9-4467-9ffe-5ebeb6427711',- value: 'CENTRAL_AFRICAN_REPUBLIC',- label: 'Central African Republic 🇨🇫',- position: 32,- color: 'green',- },- {- id: 'deba0ee2-3027-4646-afc6-24410bf68198',- value: 'CHAD',- label: 'Chad 🇹🇩',- position: 33,- color: 'sky',- },- {- id: 'd0bf04d5-a40c-45f0-8e82-4d5905c00131',- value: 'CHILE',- label: 'Chile 🇨🇱',- position: 34,- color: 'purple',- },- {- id: '60522b37-dded-4f18-a25b-05b51a8c9aa7',- value: 'CHINA',- label: 'China 🇨🇳',- position: 35,- color: 'orange',- },- {- id: '3b2c58f1-4efc-4c0f-9d43-f3a5b5b577cf',- value: 'COLOMBIA',- label: 'Colombia 🇨🇴',- position: 36,- color: 'yellow',- },- {- id: 'cbea73ba-8a9d-47ee-a38b-b7c3d89d3922',- value: 'COMOROS',- label: 'Comoros 🇰🇲',- position: 37,- color: 'red',- },- {- id: '895ed0d4-6a00-482a-840e-44edef034d2b',- value: 'CONGO',- label: 'Congo 🇨🇬',- position: 38,- color: 'pink',- },- {- id: '13db3209-398c-474c-b5f9-269ccf27adc5',- value: 'DR_CONGO',- label: 'DR Congo 🇨🇩',- position: 39,- color: 'gray',- },- {- id: '150c4227-ce67-420b-bb6c-82d5a4fb9c70',- value: 'COSTA_RICA',- label: 'Costa Rica 🇨🇷',- position: 40,- color: 'blue',- },- {- id: 'ad1853e2-753d-4245-b9a7-88a29281ca0a',- value: 'CROATIA',- label: 'Croatia 🇭🇷',- position: 41,- color: 'turquoise',- },- {- id: 'e42cad17-f7ea-450b-8c7f-a0ac0dc31dac',- value: 'CUBA',- label: 'Cuba 🇨🇺',- position: 42,- color: 'green',- },- {- id: '9035a680-5962-48c3-8d79-ee805a2c8b1c',- value: 'CYPRUS',- label: 'Cyprus 🇨🇾',- position: 43,- color: 'sky',- },- {- id: 'facb14c9-40e9-47f6-bc4b-b29178761210',- value: 'CZECH_REPUBLIC',- label: 'Czech Republic 🇨🇿',- position: 44,- color: 'purple',- },- {- id: '47026695-ee4b-47f2-97c1-9d1ea9854cd5',- value: 'DENMARK',- label: 'Denmark 🇩🇰',- position: 45,- color: 'orange',- },- {- id: '335e3877-1f8b-4f2b-a409-ec74596dd779',- value: 'DJIBOUTI',- label: 'Djibouti 🇩🇯',- position: 46,- color: 'yellow',- },- {- id: 'ee17957f-f692-495b-a664-61284fa723f2',- value: 'DOMINICA',- label: 'Dominica 🇩🇲',- position: 47,- color: 'red',- },- {- id: '4114c313-27d7-4f5a-a381-38daca143642',- value: 'DOMINICAN_REPUBLIC',- label: 'Dominican Republic 🇩🇴',- position: 48,- color: 'pink',- },- {- id: 'ffcfae44-e1b7-4739-87dd-0d957062646d',- value: 'ECUADOR',- label: 'Ecuador 🇪🇨',- position: 49,- color: 'gray',- },- {- id: '1f4e8ee4-3be1-42cd-96d4-3e5686dee153',- value: 'EGYPT',- label: 'Egypt 🇪🇬',- position: 50,- color: 'blue',- },- {- id: 'cf98813f-2a7e-4426-b97f-d3f1ac044bb8',- value: 'EL_SALVADOR',- label: 'El Salvador 🇸🇻',- position: 51,- color: 'turquoise',- },- {- id: '0e787d6e-e864-4ee3-b4c7-20fa873e8649',- value: 'EQUATORIAL_GUINEA',- label: 'Equatorial Guinea 🇬🇶',- position: 52,- color: 'green',- },- {- id: 'f68b6554-4ed5-4161-933f-a321b41391ea',- value: 'ERITREA',- label: 'Eritrea 🇪🇷',- position: 53,- color: 'sky',- },- {- id: '7a4387dc-198c-46db-9536-7bc73de4e1b0',- value: 'ESTONIA',- label: 'Estonia 🇪🇪',- position: 54,- color: 'purple',- },- {- id: '7e0fec86-e04f-499c-a814-72ac9b4cc5ce',- value: 'ESWATINI',- label: 'Eswatini 🇸🇿',- position: 55,- color: 'orange',- },- {- id: 'a7768d57-5bf2-401e-a82d-ec36e3f3a419',- value: 'ETHIOPIA',- label: 'Ethiopia 🇪🇹',- position: 56,- color: 'yellow',- },- {- id: '1b9e15c3-4fa5-4cd8-9bfb-8262518665fa',- value: 'FIJI',- label: 'Fiji 🇫🇯',- position: 57,- color: 'red',- },- {- id: '828a6fe2-3c50-4da3-97c9-11f3b80fbb0d',- value: 'FINLAND',- label: 'Finland 🇫🇮',- position: 58,- color: 'pink',- },- {- id: '03a1c597-65cf-440f-a20d-9d6bef0540c2',- value: 'FRANCE',- label: 'France 🇫🇷',- position: 59,- color: 'gray',- },- {- id: 'ab2edd1f-6353-4de8-863f-4b28e774be8e',- value: 'GABON',- label: 'Gabon 🇬🇦',- position: 60,- color: 'blue',- },- {- id: '12a50b82-c2f8-4d0b-b5f4-e52dfe01ba13',- value: 'GAMBIA',- label: 'Gambia 🇬🇲',- position: 61,- color: 'turquoise',- },- {- id: '2adf673e-8367-4eaf-83f0-41199718f0ee',- value: 'GEORGIA',- label: 'Georgia 🇬🇪',- position: 62,- color: 'green',- },- {- id: 'bd61021e-c25b-453e-b0cc-afb3942b063f',- value: 'GERMANY',- label: 'Germany 🇩🇪',- position: 63,- color: 'sky',- },- {- id: '1c45b7ae-9489-4714-b21e-8c717e6599ab',- value: 'GHANA',- label: 'Ghana 🇬🇭',- position: 64,- color: 'purple',- },- {- id: 'cc47d864-cd78-4cdd-a711-d679f0cbc133',- value: 'GREECE',- label: 'Greece 🇬🇷',- position: 65,- color: 'orange',- },- {- id: '2a2c3ca6-611e-49a4-9639-e8f60172c1b3',- value: 'GRENADA',- label: 'Grenada 🇬🇩',- position: 66,- color: 'yellow',- },- {- id: 'da2024e5-a1a0-49ab-8cf0-0d9e3f10ff9d',- value: 'GUATEMALA',- label: 'Guatemala 🇬🇹',- position: 67,- color: 'red',- },- {- id: '086c9969-1911-4aa4-8d67-3abdc12b2ce7',- value: 'GUINEA',- label: 'Guinea 🇬🇳',- position: 68,- color: 'pink',- },- {- id: 'a648d1d3-4d3f-4fc6-a1ea-40f98283df75',- value: 'GUINEA_BISSAU',- label: 'Guinea-Bissau 🇬🇼',- position: 69,- color: 'gray',- },- {- id: 'b567e119-4dcb-4f8a-b012-febe72262d85',- value: 'GUYANA',- label: 'Guyana 🇬🇾',- position: 70,- color: 'blue',- },- {- id: '26801d38-c0e6-468a-8c78-a0aed06c16fd',- value: 'HAITI',- label: 'Haiti 🇭🇹',- position: 71,- color: 'turquoise',- },- {- id: '2e31c5ff-da0a-4c82-b7bc-7a8c18b54f1e',- value: 'HONDURAS',- label: 'Honduras 🇭🇳',- position: 72,- color: 'green',- },- {- id: 'a78bd322-ac40-4ab3-a46f-6204e42b0712',- value: 'HUNGARY',- label: 'Hungary 🇭🇺',- position: 73,- color: 'sky',- },- {- id: '0026e951-225d-4e8c-8e64-289ead339bd3',- value: 'ICELAND',- label: 'Iceland 🇮🇸',- position: 74,- color: 'purple',- },- {- id: 'f5101d7d-9b81-4d2e-a9aa-e20dfab52c58',- value: 'INDIA',- label: 'India 🇮🇳',- position: 75,- color: 'orange',- },- {- id: '11b30046-58f3-42e5-a3e2-5d4761675056',- value: 'INDONESIA',- label: 'Indonesia 🇮🇩',- position: 76,- color: 'yellow',- },- {- id: '7345db23-db33-45cb-b8cc-e4d4a1f1b90e',- value: 'IRAN',- label: 'Iran 🇮🇷',- position: 77,- color: 'red',- },- {- id: '899d0eb1-9f04-4a88-b7f3-351e998b5979',- value: 'IRAQ',- label: 'Iraq 🇮🇶',- position: 78,- color: 'pink',- },- {- id: 'e45e8143-14c1-4184-84db-c11212cb8e25',- value: 'IRELAND',- label: 'Ireland 🇮🇪',- position: 79,- color: 'gray',- },- {- id: 'a208dac3-455e-41ed-9db0-aa7352d420ab',- value: 'ISRAEL',- label: 'Israel 🇮🇱',- position: 80,- color: 'blue',- },- {- id: '4537862d-0565-47a0-8759-ef522996881f',- value: 'ITALY',- label: 'Italy 🇮🇹',- position: 81,- color: 'turquoise',- },- {- id: '988630a1-dd19-476b-a0dc-cf8904ec5f68',- value: 'IVORY_COAST',- label: 'Ivory Coast 🇨🇮',- position: 82,- color: 'green',- },- {- id: '30c755e0-61f2-4590-9969-f3150c3b5aff',- value: 'JAMAICA',- label: 'Jamaica 🇯🇲',- position: 83,- color: 'sky',- },- {- id: '9ca39ab6-e0fb-4bbb-80bc-cbffa48682da',- value: 'JAPAN',- label: 'Japan 🇯🇵',- position: 84,- color: 'purple',- },- {- id: 'f71aefd9-1dc0-4370-8a31-2a329d8ab15d',- value: 'JORDAN',- label: 'Jordan 🇯🇴',- position: 85,- color: 'orange',- },- {- id: '7f230c15-2745-4e78-ab35-8ae5bec7bcc6',- value: 'KAZAKHSTAN',- label: 'Kazakhstan 🇰🇿',- position: 86,- color: 'yellow',- },- {- id: '9e745903-4ac7-432f-bfd2-d0d78e76f3e9',- value: 'KENYA',- label: 'Kenya 🇰🇪',- position: 87,- color: 'red',- },- {- id: 'ee448c0f-8b3b-4666-bbbb-19e8b62ecbcc',- value: 'KIRIBATI',- label: 'Kiribati 🇰🇮',- position: 88,- color: 'pink',- },- {- id: '6de78d0a-7a2b-48bb-97b5-2a86c8bab3b6',- value: 'KOSOVO',- label: 'Kosovo 🇽🇰',- position: 89,- color: 'gray',- },- {- id: '48e160eb-1fdf-4456-99f7-4e97e7d16cfa',- value: 'KUWAIT',- label: 'Kuwait 🇰🇼',- position: 90,- color: 'blue',- },- {- id: '7d318293-6378-4a02-af49-23d48d887a8f',- value: 'KYRGYZSTAN',- label: 'Kyrgyzstan 🇰🇬',- position: 91,- color: 'turquoise',- },- {- id: 'dc540210-83bb-40c5-ab0d-585f4648df1b',- value: 'LAOS',- label: 'Laos 🇱🇦',- position: 92,- color: 'green',- },- {- id: 'fe2c5828-330f-45b8-991c-180723d5bed6',- value: 'LATVIA',- label: 'Latvia 🇱🇻',- position: 93,- color: 'sky',- },- {- id: 'cff1390a-7548-401b-bfa1-5e062e1e2cd3',- value: 'LEBANON',- label: 'Lebanon 🇱🇧',- position: 94,- color: 'purple',- },- {- id: '2a1d40fd-a633-4bb0-890a-1009a2126ff9',- value: 'LESOTHO',- label: 'Lesotho 🇱🇸',- position: 95,- color: 'orange',- },- {- id: 'dee0303d-11c9-4bf9-913b-c5fedfc93766',- value: 'LIBERIA',- label: 'Liberia 🇱🇷',- position: 96,- color: 'yellow',- },- {- id: '57713732-bd4e-4888-a4e3-ad7761e76dd9',- value: 'LIBYA',- label: 'Libya 🇱🇾',- position: 97,- color: 'red',- },- {- id: '5ed4e5fd-31dc-4adc-a875-b5036ef5eac6',- value: 'LIECHTENSTEIN',- label: 'Liechtenstein 🇱🇮',- position: 98,- color: 'pink',- },- {- id: '8facad69-2b22-47a4-a324-75773bd7d4f8',- value: 'LITHUANIA',- label: 'Lithuania 🇱🇹',- position: 99,- color: 'gray',- },- {- id: 'fb1b4543-7f22-4c44-a953-7c68e2790e27',- value: 'LUXEMBOURG',- label: 'Luxembourg 🇱🇺',- position: 100,- color: 'blue',- },- {- id: '80009115-d98c-4e63-8401-285f82d94921',- value: 'MADAGASCAR',- label: 'Madagascar 🇲🇬',- position: 101,- color: 'turquoise',- },- {- id: 'b32ed1f2-3d12-4255-a39a-3a5ab64b425c',- value: 'MALAWI',- label: 'Malawi 🇲🇼',- position: 102,- color: 'green',- },- {- id: 'd7c744b0-23d2-4dd4-a9f9-3298cfce0d1b',- value: 'MALAYSIA',- label: 'Malaysia 🇲🇾',- position: 103,- color: 'sky',- },- {- id: 'a878865c-a73f-47d7-bf52-29c1b7b947d7',- value: 'MALDIVES',- label: 'Maldives 🇲🇻',- position: 104,- color: 'purple',- },- {- id: '2d5e9644-11b6-4b55-8f9a-ed33da2de6ac',- value: 'MALI',- label: 'Mali 🇲🇱',- position: 105,- color: 'orange',- },- {- id: 'e2fa091a-0e78-41da-937b-42b55e501226',- value: 'MALTA',- label: 'Malta 🇲🇹',- position: 106,- color: 'yellow',- },- {- id: 'e36301e0-1d79-4540-87c7-4de2bfeface6',- value: 'MARSHALL_ISLANDS',- label: 'Marshall Islands 🇲🇭',- position: 107,- color: 'red',- },- {- id: '8dc782e6-3578-4d7a-a6ba-a29e48f3cc11',- value: 'MAURITANIA',- label: 'Mauritania 🇲🇷',- position: 108,- color: 'pink',- },- {- id: 'edf63c87-d621-40fe-b653-a0f7764c8961',- value: 'MAURITIUS',- label: 'Mauritius 🇲🇺',- position: 109,- color: 'gray',- },- {- id: '86233df1-6c71-4ffb-9298-c61c65dcc79c',- value: 'MEXICO',- label: 'Mexico 🇲🇽',- position: 110,- color: 'blue',- },- {- id: 'c41c35ff-118b-4119-b12f-93be635fbae3',- value: 'MICRONESIA',- label: 'Micronesia 🇫🇲',- position: 111,- color: 'turquoise',- },- {- id: '8466a06e-a34f-4dd4-b660-8e9ad2aa5998',- value: 'MOLDOVA',- label: 'Moldova 🇲🇩',- position: 112,- color: 'green',- },- {- id: '948e9117-486d-40c1-847c-de6cc64b9730',- value: 'MONACO',- label: 'Monaco 🇲🇨',- position: 113,- color: 'sky',- },- {- id: 'ee33ddb8-3219-4fdb-8a71-8a6f8fdf93d3',- value: 'MONGOLIA',- label: 'Mongolia 🇲🇳',- position: 114,- color: 'purple',- },- {- id: 'b5c1fa55-0b1a-43d8-a871-ebd004952d0b',- value: 'MONTENEGRO',- label: 'Montenegro 🇲🇪',- position: 115,- color: 'orange',- },- {- id: '9e98cb68-666e-4116-b35f-bb9711fd7546',- value: 'MOROCCO',- label: 'Morocco 🇲🇦',- position: 116,- color: 'yellow',- },- {- id: '86c4b5f8-d4bc-4639-a5bf-00a84601b911',- value: 'MOZAMBIQUE',- label: 'Mozambique 🇲🇿',- position: 117,- color: 'red',- },- {- id: '8b3bcfa4-1797-492e-83d7-7d939e479b1d',- value: 'MYANMAR',- label: 'Myanmar 🇲🇲',- position: 118,- color: 'pink',- },- {- id: 'b8d01fef-4061-4e8c-bc38-f8226b4be6be',- value: 'NAMIBIA',- label: 'Namibia 🇳🇦',- position: 119,- color: 'gray',- },- {- id: '71dd1ad1-af94-4cfb-973d-33f87b4ef0cd',- value: 'NAURU',- label: 'Nauru 🇳🇷',- position: 120,- color: 'blue',- },- {- id: 'dc692171-3adc-4a73-8b45-a25cf659c546',- value: 'NEPAL',- label: 'Nepal 🇳🇵',- position: 121,- color: 'turquoise',- },- {- id: '3e161b4b-be95-4a6a-910d-628ad32691e1',- value: 'NETHERLANDS',- label: 'Netherlands 🇳🇱',- position: 122,- color: 'green',- },- {- id: 'b86be59e-a1ae-4df4-937f-ad97c641e0df',- value: 'NEW_ZEALAND',- label: 'New Zealand 🇳🇿',- position: 123,- color: 'sky',- },- {- id: '4674abdd-0548-4317-8af5-865e4d11327d',- value: 'NICARAGUA',- label: 'Nicaragua 🇳🇮',- position: 124,- color: 'purple',- },- {- id: '85ff2ce7-ddd8-4be6-b740-d79e70a3d103',- value: 'NIGER',- label: 'Niger 🇳🇪',- position: 125,- color: 'orange',- },- {- id: 'a69ab8cf-5a59-4879-92da-7cd2dea6b9e6',- value: 'NIGERIA',- label: 'Nigeria 🇳🇬',- position: 126,- color: 'yellow',- },- {- id: '28736977-b21f-4678-8e22-363be28a8e94',- value: 'NORTH_KOREA',- label: 'North Korea 🇰🇵',- position: 127,- color: 'red',- },- {- id: '11f87414-633d-48f8-a99d-0b407c281dbd',- value: 'NORTH_MACEDONIA',- label: 'North Macedonia 🇲🇰',- position: 128,- color: 'pink',- },- {- id: '9637c5aa-d405-4414-a56b-b983ed0bfa51',- value: 'NORWAY',- label: 'Norway 🇳🇴',- position: 129,- color: 'gray',- },- {- id: '70f79652-7f95-4836-ab2d-4373631910ec',- value: 'OMAN',- label: 'Oman 🇴🇲',- position: 130,- color: 'blue',- },- {- id: '50e4ae80-79d8-4cdf-aa0a-a2675e6e26fb',- value: 'PAKISTAN',- label: 'Pakistan 🇵🇰',- position: 131,- color: 'turquoise',- },- {- id: '08d27180-4861-4937-b04e-6cbcd33f507d',- value: 'PALAU',- label: 'Palau 🇵🇼',- position: 132,- color: 'green',- },- {- id: '6aa50196-ea4b-42cd-b890-8d7d56cc9731',- value: 'PALESTINE',- label: 'Palestine 🇵🇸',- position: 133,- color: 'sky',- },- {- id: '5663124d-f2fc-4374-8734-f3c53f9ea4f5',- value: 'PANAMA',- label: 'Panama 🇵🇦',- position: 134,- color: 'purple',- },- {- id: '8bde7cc7-fa6c-4f52-b9df-16c99928f50f',- value: 'PAPUA_NEW_GUINEA',- label: 'Papua New Guinea 🇵🇬',- position: 135,- color: 'orange',- },- {- id: '3eed4b21-1009-4dd2-bdac-53b11df8400c',- value: 'PARAGUAY',- label: 'Paraguay 🇵🇾',- position: 136,- color: 'yellow',- },- {- id: 'fbc734c9-63ae-4d2e-af0f-8e2abd874dda',- value: 'PERU',- label: 'Peru 🇵🇪',- position: 137,- color: 'red',- },- {- id: '211555bc-8f26-4d4d-94f1-c83884c32e20',- value: 'PHILIPPINES',- label: 'Philippines 🇵🇭',- position: 138,- color: 'pink',- },- {- id: '6d69e1a3-270e-4e36-9a55-40daed5b10ef',- value: 'POLAND',- label: 'Poland 🇵🇱',- position: 139,- color: 'gray',- },- {- id: '23b1ae16-f00f-4844-8871-ed2b46c1cb51',- value: 'PORTUGAL',- label: 'Portugal 🇵🇹',- position: 140,- color: 'blue',- },- {- id: '4dc69f6b-b0ee-48ea-95d3-517dc4ec7b91',- value: 'QATAR',- label: 'Qatar 🇶🇦',- position: 141,- color: 'turquoise',- },- {- id: '8dcd82ce-98b2-45cb-a76d-f1503509035f',- value: 'ROMANIA',- label: 'Romania 🇷🇴',- position: 142,- color: 'green',- },- {- id: '7e18e241-4fd6-4303-b390-0a9dea9c16bd',- value: 'RUSSIA',- label: 'Russia 🇷🇺',- position: 143,- color: 'sky',- },- {- id: '966e45fb-7ed8-478e-9c26-25b7d59ae4f4',- value: 'RWANDA',- label: 'Rwanda 🇷🇼',- position: 144,- color: 'purple',- },- {- id: '22ddf2d7-f1f8-46e9-8eb9-248c02652ad0',- value: 'SAINT_KITTS_AND_NEVIS',- label: 'Saint Kitts & Nevis 🇰🇳',- position: 145,- color: 'orange',- },- {- id: '3312359a-b9fd-4a95-9db2-ad3e1f67f2b2',- value: 'SAINT_LUCIA',- label: 'Saint Lucia 🇱🇨',- position: 146,- color: 'yellow',- },- {- id: '159c06c1-14a5-407f-af16-b84ba14f16be',- value: 'SAINT_VINCENT',- label: 'Saint Vincent 🇻🇨',- position: 147,- color: 'red',- },- {- id: '0dd1cf79-89e2-4442-bd83-c65b43a3a544',- value: 'SAMOA',- label: 'Samoa 🇼🇸',- position: 148,- color: 'pink',- },- {- id: 'e16851a7-97de-4e17-aeac-0cb828655406',- value: 'SAN_MARINO',- label: 'San Marino 🇸🇲',- position: 149,- color: 'gray',- },- {- id: '6415861d-5fa9-46b5-a2cd-d58587c9dd03',- value: 'SAO_TOME_AND_PRINCIPE',- label: 'São Tomé & Príncipe 🇸🇹',- position: 150,- color: 'blue',- },- {- id: '5831720a-3ce0-409c-9694-1b1d12394599',- value: 'SAUDI_ARABIA',- label: 'Saudi Arabia 🇸🇦',- position: 151,- color: 'turquoise',- },- {- id: '89155d75-e4d0-4115-916c-8b77b9ddc5f3',- value: 'SENEGAL',- label: 'Senegal 🇸🇳',- position: 152,- color: 'green',- },- {- id: 'f0c3e0e0-8106-4921-a02e-0497c1318efa',- value: 'SERBIA',- label: 'Serbia 🇷🇸',- position: 153,- color: 'sky',- },- {- id: 'd8633c5d-1c65-44c5-bc71-7eb65cb988c3',- value: 'SEYCHELLES',- label: 'Seychelles 🇸🇨',- position: 154,- color: 'purple',- },- {- id: '64b9fd47-a748-4add-bacf-a7dc1f1aa0c7',- value: 'SIERRA_LEONE',- label: 'Sierra Leone 🇸🇱',- position: 155,- color: 'orange',- },- {- id: '5bd24cd5-a233-4d8f-930d-27f15d493c92',- value: 'SINGAPORE',- label: 'Singapore 🇸🇬',- position: 156,- color: 'yellow',- },- {- id: '63c5df12-b203-4627-91b2-0526a56452d4',- value: 'SLOVAKIA',- label: 'Slovakia 🇸🇰',- position: 157,- color: 'red',- },- {- id: 'b0deeef1-767a-4730-8743-588bfeb856e6',- value: 'SLOVENIA',- label: 'Slovenia 🇸🇮',- position: 158,- color: 'pink',- },- {- id: '9274cd87-3400-4ccd-9192-3239b5126691',- value: 'SOLOMON_ISLANDS',- label: 'Solomon Islands 🇸🇧',- position: 159,- color: 'gray',- },- {- id: '67dc7930-eaa4-4ef0-9fc4-af996eaaae09',- value: 'SOMALIA',- label: 'Somalia 🇸🇴',- position: 160,- color: 'blue',- },- {- id: '19d96578-107c-4286-9504-5d59077b8290',- value: 'SOUTH_AFRICA',- label: 'South Africa 🇿🇦',- position: 161,- color: 'turquoise',- },- {- id: '11cb5cb6-d67d-47ae-adf1-ecba3635fe20',- value: 'SOUTH_KOREA',- label: 'South Korea 🇰🇷',- position: 162,- color: 'green',- },- {- id: '8293e893-0d7d-4002-9929-fea536a9a73c',- value: 'SOUTH_SUDAN',- label: 'South Sudan 🇸🇸',- position: 163,- color: 'sky',- },- {- id: 'e0b9ba99-d891-4f6c-95df-1f92a0a7e12e',- value: 'SPAIN',- label: 'Spain 🇪🇸',- position: 164,- color: 'purple',- },- {- id: '18378ce8-e480-4fd9-b90d-379d5daf7ecb',- value: 'SRI_LANKA',- label: 'Sri Lanka 🇱🇰',- position: 165,- color: 'orange',- },- {- id: '10943324-5ae5-47db-bb2f-5d4bdeafd0b0',- value: 'SUDAN',- label: 'Sudan 🇸🇩',- position: 166,- color: 'yellow',- },- {- id: 'bfd244e4-87c0-4dca-89b0-a1b581f1aa65',- value: 'SURINAME',- label: 'Suriname 🇸🇷',- position: 167,- color: 'red',- },- {- id: '6a8f9119-c413-4ece-b432-2ce2e80580a1',- value: 'SWEDEN',- label: 'Sweden 🇸🇪',- position: 168,- color: 'pink',- },- {- id: '866a8e2d-60a7-40a0-8541-35a9cfa20c09',- value: 'SWITZERLAND',- label: 'Switzerland 🇨🇭',- position: 169,- color: 'gray',- },- {- id: '93758334-0ebc-4884-bfac-c0dbeec23a35',- value: 'SYRIA',- label: 'Syria 🇸🇾',- position: 170,- color: 'blue',- },- {- id: 'c785e424-7a6f-4f27-91bc-aadb617525b0',- value: 'TAIWAN',- label: 'Taiwan 🇹🇼',- position: 171,- color: 'turquoise',- },- {- id: '15ab8a5b-5989-4e3b-92cb-00b88cf7b7f6',- value: 'TAJIKISTAN',- label: 'Tajikistan 🇹🇯',- position: 172,- color: 'green',- },- {- id: '476a55dd-8c69-4711-8e40-54cbe41d5c3a',- value: 'TANZANIA',- label: 'Tanzania 🇹🇿',- position: 173,- color: 'sky',- },- {- id: 'bfcbef16-36c4-4350-a614-7ad065276104',- value: 'THAILAND',- label: 'Thailand 🇹🇭',- position: 174,- color: 'purple',- },- {- id: '6872c804-9baa-498f-9dc6-b5894b64dece',- value: 'TIMOR_LESTE',- label: 'Timor-Leste 🇹🇱',- position: 175,- color: 'orange',- },- {- id: 'b6429782-b6e1-4404-a5c4-8a44f3818147',- value: 'TOGO',- label: 'Togo 🇹🇬',- position: 176,- color: 'yellow',- },- {- id: 'f4a7b7f9-aa58-4d23-adac-a96ed2c61ba1',- value: 'TONGA',- label: 'Tonga 🇹🇴',- position: 177,- color: 'red',- },- {- id: 'a1377467-7a21-40af-861f-4b362b30fcb4',- value: 'TRINIDAD_AND_TOBAGO',- label: 'Trinidad & Tobago 🇹🇹',- position: 178,- color: 'pink',- },- {- id: '7779c7d6-c7e1-4d6c-8282-31f659988c22',- value: 'TUNISIA',- label: 'Tunisia 🇹🇳',- position: 179,- color: 'gray',- },- {- id: '5858f81e-629a-4b04-98e8-6441f3984044',- value: 'TURKEY',- label: 'Turkey 🇹🇷',- position: 180,- color: 'blue',- },- {- id: 'cfdae353-6782-4dde-b229-d4e2c577fbed',- value: 'TURKMENISTAN',- label: 'Turkmenistan 🇹🇲',- position: 181,- color: 'turquoise',- },- {- id: '755d859a-a8d4-45e0-aa6e-77afcedb29d0',- value: 'TUVALU',- label: 'Tuvalu 🇹🇻',- position: 182,- color: 'green',- },- {- id: '3b325d46-b8e8-4cb9-9318-53f20baf50bd',- value: 'UGANDA',- label: 'Uganda 🇺🇬',- position: 183,- color: 'sky',- },- {- id: '10f32cd9-0a6b-4829-913d-50f519dcfc3a',- value: 'UKRAINE',- label: 'Ukraine 🇺🇦',- position: 184,- color: 'purple',- },- {- id: '0776427b-0dc1-49ef-b1c8-bb7dbba5a1e9',- value: 'UNITED_ARAB_EMIRATES',- label: 'UAE 🇦🇪',- position: 185,- color: 'orange',- },- {- id: 'edaf21dc-60d4-4550-8b58-2f7a19eedc92',- value: 'UNITED_KINGDOM',- label: 'UK 🇬🇧',- position: 186,- color: 'yellow',- },- {- id: '553004cd-aeed-4025-aa71-574efcade200',- value: 'UNITED_STATES',- label: 'USA 🇺🇸',- position: 187,- color: 'red',- },- {- id: 'f925d857-5cb7-467d-bc65-e5c04ae5a238',- value: 'URUGUAY',- label: 'Uruguay 🇺🇾',- position: 188,- color: 'pink',- },- {- id: '9b50ea41-2b8f-44d1-beeb-f4f4428289c4',- value: 'UZBEKISTAN',- label: 'Uzbekistan 🇺🇿',- position: 189,- color: 'gray',- },- {- id: 'a7a7cbfd-6999-42e8-874e-c2bfbe6ca567',- value: 'VANUATU',- label: 'Vanuatu 🇻🇺',- position: 190,- color: 'blue',- },- {- id: '7de0a670-8f04-444c-86dc-d7be00cc8b4e',- value: 'VATICAN',- label: 'Vatican 🇻🇦',- position: 191,- color: 'turquoise',- },- {- id: '9acc531c-7f17-4b67-804a-035c3c873cce',- value: 'VENEZUELA',- label: 'Venezuela 🇻🇪',- position: 192,- color: 'green',- },- {- id: '540b908e-f6b6-4f70-bb9c-c86dc5becbe7',- value: 'VIETNAM',- label: 'Vietnam 🇻🇳',- position: 193,- color: 'sky',- },- {- id: 'a70a3610-9a9b-4fe0-9e97-10d3e60a3d92',- value: 'YEMEN',- label: 'Yemen 🇾🇪',- position: 194,- color: 'purple',- },- {- id: 'fde30bd3-b2f1-4331-a255-9601259e807e',- value: 'ZAMBIA',- label: 'Zambia 🇿🇲',- position: 195,- color: 'orange',- },- {- id: 'a83060bf-f55b-4efe-9e0c-b856ad5446c4',- value: 'ZIMBABWE',- label: 'Zimbabwe 🇿🇼',- position: 196,- color: 'yellow',- },- ],- },- {- universalIdentifier: '560503de-6330-4c1d-af97-a8dee125f2ad',- type: FieldType.MULTI_SELECT,- name: 'region',- label: 'Region',- icon: 'IconWorld',- isNullable: true,- options: [- {- id: '735d7a75-c032-48b3-8480-c46e15b7e511',- value: 'EUROPE',- label: 'Europe',- position: 0,- color: 'blue',- },- {- id: '78eb8d0c-841e-48dd-8425-d8546cbcfe25',- value: 'US',- label: 'US',- position: 1,- color: 'red',- },- {- id: 'b0339081-52dd-4101-b7e7-83ed6ad6ca4f',- value: 'LATAM',- label: 'LATAM',- position: 2,- color: 'green',- },- {- id: 'f02bd583-87b8-48d1-97db-9395056c96e2',- value: 'MENA',- label: 'MENA',- position: 3,- color: 'orange',- },- {- id: '5205c25f-a300-4967-b5f3-033c0515a28a',- value: 'APAC',- label: 'APAC',- position: 4,- color: 'yellow',- },- {- id: '7f55cf70-8c81-4f68-83bc-270d215f0a4e',- value: 'AFRICA',- label: 'Africa',- position: 5,- color: 'pink',- },- ],- },- {- universalIdentifier: '243e9808-c070-4163-8603-ded12b03923c',- type: FieldType.CURRENCY,- name: 'projectBudgetMin',- label: 'Project Budget Min',- icon: 'IconCoin',- isNullable: true,- },- {- universalIdentifier: '6a095709-7620-495f-b6e0-790743e412d5',- type: FieldType.CURRENCY,- name: 'hourlyRate',- label: 'Hourly Rate',- icon: 'IconCurrencyDollar',- isNullable: true,- },- {- universalIdentifier: '640bbf33-45d7-4174-a862-dbe611ab8d1a',- type: FieldType.LINKS,- name: 'linkedin',- label: 'LinkedIn',- icon: 'IconBrandLinkedin',- isNullable: true,- },- {- universalIdentifier: '111eb60a-6e5b-4d0f-ac0d-31e7e0ddff97',- type: FieldType.LINKS,- name: 'website',- label: 'Website',- icon: 'IconWorldWww',- isNullable: true,- },- {- // Legacy URL picture, kept as LINKS. Twenty treats field type as- // immutable, so we cannot flip this to FILES in place on an installed- // workspace — the change is silently ignored on upgrade. Existing- // partners keep their URL here; new uploads go to profilePictureFile.- universalIdentifier: '40d730e3-2785-45c8-aa5f-cc724b1b08e0',- type: FieldType.LINKS,- name: 'profilePicture',- label: 'Profile Picture (legacy)',- icon: 'IconPhoto',- isNullable: true,- },- {- universalIdentifier: '076b81f2-2398-4ece-a352-d7a6f6a89cae',- type: FieldType.FILES,- name: 'profilePictureFile',- label: 'Profile Picture File',- icon: 'IconPhoto',- isNullable: true,- universalSettings: { maxNumberOfValues: 1 },- },- {- universalIdentifier: 'a0000008-0000-4000-8000-000000000008',- type: FieldType.LINKS,- name: 'calendarLink',- label: 'Calendar Link',- icon: 'IconCalendar',- isNullable: true,- },- {- universalIdentifier: 'a0000009-0000-4000-8000-000000000009',- type: FieldType.TEXT,- name: 'introduction',- label: 'Introduction',- icon: 'IconFileText',- isNullable: true,- },- {- universalIdentifier: 'a0000011-0000-4000-8000-000000000011',- type: FieldType.TEXT,- name: 'applicationNotes',- label: 'Application Notes',- icon: 'IconClipboardText',- isNullable: true,- },- {- universalIdentifier: 'd8616962-3c4b-475f-a508-a237fffde0b9',- type: FieldType.MULTI_SELECT,- name: 'twentyExperience',- label: 'Twenty Experience',- icon: 'IconTool',- isNullable: true,- options: [- {- id: '879d6ae4-09a2-425e-8292-bfa9f4df3983',- value: 'CUSTOM_APPS',- label: 'Custom apps',- position: 0,- color: 'blue',- },- {- id: '20d4f654-54dc-4e57-902f-f5f4550d0b63',- value: 'DATA_MODELS',- label: 'Data models',- position: 1,- color: 'green',- },- {- id: '2919caa4-e6ec-47d7-870e-9e115fd9da58',- value: 'WORKFLOWS',- label: 'Workflows',- position: 2,- color: 'purple',- },- {- id: '542f843f-ba27-40db-8087-a75d77bdda29',- value: 'FRONT_COMPONENTS',- label: 'Front components',- position: 3,- color: 'orange',- },- ],- },- {- universalIdentifier: '7a0b7526-6695-4b47-8835-d31786174fcd',- type: FieldType.TEXT,- name: 'twentyExperienceNotes',- label: 'Twenty Experience Notes',- icon: 'IconFileText',- isNullable: true,- },- {- universalIdentifier: '80e9b14e-450c-467f-9c06-9a84c07c21f0',- type: FieldType.LINKS,- name: 'twentyExperienceProofLink',- label: 'Twenty Experience Proof Link',- icon: 'IconLink',- isNullable: true,- },- {- universalIdentifier: 'a0000010-0000-4000-8000-000000000010',- type: FieldType.DATE_TIME,- name: 'lastMatchAt',- label: 'Last Match At',- icon: 'IconClock',- isNullable: true,- },- {- universalIdentifier: 'fcfd5b9e-1ea0-4c26-a40c-43631bb3e0d0',- type: FieldType.DATE_TIME,- name: 'partnerUserLinkedAt',- label: 'Partner User Linked At',- icon: 'IconLink',- isNullable: true,- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/graphql/mutations/update-company-partner-user.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/graphql/mutations/update-company-partner-user.tsdeleted file mode 100644index c706a0e3b55..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/graphql/mutations/update-company-partner-user.ts+++ /dev/null@@ -1,5 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--export function updateCompanyPartnerUser(client: CoreApiClient, id: string, partnerUserId: string) {- return client.mutation({ updateCompany: { __args: { id, data: { partnerUserId } }, id: true } });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/graphql/mutations/update-partner-partner-user.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/graphql/mutations/update-partner-partner-user.tsdeleted file mode 100644index af9547da241..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/graphql/mutations/update-partner-partner-user.ts+++ /dev/null@@ -1,12 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--export function updatePartnerPartnerUser(- client: CoreApiClient,- id: string,- partnerUserId: string,- partnerUserLinkedAt: string,-) {- return client.mutation({- updatePartner: { __args: { id, data: { partnerUserId, partnerUserLinkedAt } }, id: true },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/graphql/mutations/update-person-partner-user.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/graphql/mutations/update-person-partner-user.tsdeleted file mode 100644index 885e678bd75..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/graphql/mutations/update-person-partner-user.ts+++ /dev/null@@ -1,5 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--export function updatePersonPartnerUser(client: CoreApiClient, id: string, partnerUserId: string) {- return client.mutation({ updatePerson: { __args: { id, data: { partnerUserId } }, id: true } });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/graphql/queries/find-partner-by-person-email.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/graphql/queries/find-partner-by-person-email.tsdeleted file mode 100644index 8d1168514ba..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/graphql/queries/find-partner-by-person-email.ts+++ /dev/null@@ -1,15 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--export function findPartnerByPersonEmail(client: CoreApiClient, email: string) {- return client.query({- people: {- __args: { filter: { emails: { primaryEmail: { eq: email } } }, first: 1 },- edges: {- node: {- id: true,- partner: { id: true, validationStage: true },- },- },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/graphql/queries/get-partner-cascade-fields.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/graphql/queries/get-partner-cascade-fields.tsdeleted file mode 100644index e4cf1e27a9f..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/graphql/queries/get-partner-cascade-fields.ts+++ /dev/null@@ -1,48 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--// ponytail: applications are capped at 200 (first: 200); persons fetch a single default page.-// A partner has only a handful of each, so neither cap is expected to bind in practice.-// List form on purpose: the single-record read throws `Record not found` for an unknown id.-export function getPartnerCascadeFields(client: CoreApiClient, partnerId: string) {- return client.query({- partners: {- __args: { filter: { id: { eq: partnerId } }, first: 1 },- edges: {- node: {- id: true,- companyId: true,- partnerUserId: true,- persons: { edges: { node: { id: true, partnerUserId: true } } },- },- },- },- applications: {- __args: {- filter: { partnerId: { eq: partnerId }, partnerUserId: { is: 'NULL' } },- first: 200,- },- edges: { node: { id: true } },- },- partnerLinks: {- __args: {- filter: { partnerId: { eq: partnerId }, partnerUserId: { is: 'NULL' } },- first: 200,- },- edges: { node: { id: true } },- },- partnerServices: {- __args: {- filter: { partnerId: { eq: partnerId }, partnerUserId: { is: 'NULL' } },- first: 200,- },- edges: { node: { id: true } },- },- partnerContents: {- __args: {- filter: { partnerId: { eq: partnerId }, partnerUserId: { is: 'NULL' } },- first: 200,- },- edges: { node: { id: true } },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/on-workspace-member-created.logic-function.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/on-workspace-member-created.logic-function.tsdeleted file mode 100644index a3ead50f55d..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/on-workspace-member-created.logic-function.ts+++ /dev/null@@ -1,43 +0,0 @@-import { CoreApiClient } from 'twenty-client-sdk/core';-import {- type DatabaseEventPayload,- defineLogicFunction,- type ObjectRecordCreateEvent,-} from 'twenty-sdk/define';--import { ON_WORKSPACE_MEMBER_CREATED_FN_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { linkPartnerUser } from 'src/modules/partner/onboarding/services/link-partner-user.service';-import { resolvePartnerByEmail } from 'src/modules/partner/onboarding/services/resolve-partner-by-email.service';-import { normalizeInviteEmail } from 'src/modules/partner/onboarding/utils/normalize-invite-email';--type WorkspaceMemberCreated = { userEmail?: string | null };--export const handler = async (- payload: DatabaseEventPayload<ObjectRecordCreateEvent<WorkspaceMemberCreated>>,-): Promise<Record<string, unknown>> => {- const memberId = payload.recordId;- const rawEmail = payload.properties.after?.userEmail;- if (!memberId || !rawEmail) return { skipped: true, reason: 'no_email' };-- const email = normalizeInviteEmail(rawEmail);- if (email.endsWith('@twenty.com')) return { skipped: true, reason: 'internal_email' };-- const client = new CoreApiClient();- const partnerId = await resolvePartnerByEmail(client, email);- if (!partnerId) return { skipped: true, reason: 'no_partner_match' };-- const link = await linkPartnerUser(client, { partnerId, memberId });- if (link.linked === false && link.reason === 'partner_already_linked_other') {- return { skipped: true, reason: 'partner_already_linked' };- }-- return link;-};--export default defineLogicFunction({- universalIdentifier: ON_WORKSPACE_MEMBER_CREATED_FN_UNIVERSAL_IDENTIFIER,- name: 'on-workspace-member-created',- timeoutSeconds: 30,- handler,- databaseEventTriggerSettings: { eventName: 'workspaceMember.created' },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/on-workspace-member-created.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/on-workspace-member-created.test.tsdeleted file mode 100644index 59877b7fb58..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/on-workspace-member-created.test.ts+++ /dev/null@@ -1,53 +0,0 @@-import { beforeEach, describe, expect, it, vi } from 'vitest';--import { handler } from './on-workspace-member-created.logic-function';-import { resolvePartnerByEmail } from './services/resolve-partner-by-email.service';-import { linkPartnerUser } from './services/link-partner-user.service';--vi.mock('twenty-client-sdk/core', () => ({ CoreApiClient: vi.fn() }));-vi.mock('./services/resolve-partner-by-email.service', () => ({ resolvePartnerByEmail: vi.fn() }));-vi.mock('./services/link-partner-user.service', () => ({ linkPartnerUser: vi.fn() }));--const makePayload = (userEmail: string | null | undefined) => ({- recordId: 'member-1',- properties: { after: { userEmail } },-}) as never;--describe('on-workspace-member-created handler', () => {- beforeEach(() => vi.clearAllMocks());-- it('skips when userEmail is missing', async () => {- const res = await handler(makePayload(undefined));- expect(res).toEqual({ skipped: true, reason: 'no_email' });- expect(resolvePartnerByEmail).not.toHaveBeenCalled();- });-- it('skips @twenty.com addresses', async () => {- const res = await handler(makePayload('[email protected]'));- expect(res).toEqual({ skipped: true, reason: 'internal_email' });- expect(resolvePartnerByEmail).not.toHaveBeenCalled();- });-- it('skips when no partner matches', async () => {- vi.mocked(resolvePartnerByEmail).mockResolvedValue(null);- const res = await handler(makePayload('[email protected]'));- expect(res).toEqual({ skipped: true, reason: 'no_partner_match' });- expect(linkPartnerUser).not.toHaveBeenCalled();- });-- it('skips when partner is already claimed by another member', async () => {- vi.mocked(resolvePartnerByEmail).mockResolvedValue('partner-1');- vi.mocked(linkPartnerUser).mockResolvedValue({ linked: false, reason: 'partner_already_linked_other' });- const res = await handler(makePayload('[email protected]'));- expect(res).toEqual({ skipped: true, reason: 'partner_already_linked' });- });-- it('links the member on a fresh match', async () => {- vi.mocked(resolvePartnerByEmail).mockResolvedValue('partner-1');- vi.mocked(linkPartnerUser).mockResolvedValue({ linked: true, partnerId: 'partner-1' });- const res = await handler(makePayload('[email protected]'));- expect(resolvePartnerByEmail).toHaveBeenCalledWith(expect.anything(), '[email protected]');- expect(linkPartnerUser).toHaveBeenCalledWith(expect.anything(), { partnerId: 'partner-1', memberId: 'member-1' });- expect(res).toEqual({ linked: true, partnerId: 'partner-1' });- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/services/link-partner-user.service.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/services/link-partner-user.service.test.tsdeleted file mode 100644index c1b1f0efea3..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/services/link-partner-user.service.test.ts+++ /dev/null@@ -1,217 +0,0 @@-import { beforeEach, describe, expect, it, vi } from 'vitest';-import { type CoreApiClient } from 'twenty-client-sdk/core';--import { linkPartnerUser } from './link-partner-user.service';--describe('linkPartnerUser', () => {- const query = vi.fn();- const mutation = vi.fn();- const client = { query, mutation } as unknown as CoreApiClient;-- // Route each read by the shape of its selection: the cascade query asks for `applications`,- // getCompanyPartnerUser for `companies`, getPartnerOwner for `partners` only.- const routeQueries = (opts: {- cascade: Record<string, unknown>;- companyOwner?: string | null;- ownerRecheck?: string | null;- companyMissing?: boolean;- ownerMissing?: boolean;- }) => {- query.mockImplementation((q: Record<string, unknown>) => {- if ('applications' in q) return Promise.resolve(opts.cascade);- if ('companies' in q)- return Promise.resolve({- companies: opts.companyMissing- ? { edges: [] }- : { edges: [{ node: { id: 'company-1', partnerUserId: opts.companyOwner ?? null } }] },- });- if ('partners' in q)- return Promise.resolve({- partners: opts.ownerMissing- ? { edges: [] }- : { edges: [{ node: { id: 'partner-1', partnerUserId: opts.ownerRecheck ?? null } }] },- });- return Promise.resolve({});- });- };-- beforeEach(() => {- query.mockReset();- mutation.mockReset();- mutation.mockResolvedValue({});- });-- it('stamps the partner and cascades to persons, company, applications, links, services and content', async () => {- routeQueries({- cascade: {- partners: { edges: [{ node: {- id: 'partner-1',- companyId: 'company-1',- partnerUserId: null,- persons: { edges: [{ node: { id: 'person-1', partnerUserId: null } }, { node: { id: 'person-2', partnerUserId: null } }] },- } }] },- applications: { edges: [{ node: { id: 'app-1' } }] },- partnerLinks: { edges: [{ node: { id: 'link-1' } }] },- partnerServices: { edges: [{ node: { id: 'service-1' } }] },- partnerContents: { edges: [{ node: { id: 'content-1' } }] },- },- });-- const result = await linkPartnerUser(client, { partnerId: 'partner-1', memberId: 'member-1' });-- expect(result).toEqual({ linked: true, partnerId: 'partner-1' });- // 2 persons + 1 application + 1 link + 1 service + 1 content + 1 company + 1 partner = 8- expect(mutation).toHaveBeenCalledTimes(8);- // verify every cascade write carries the right id + memberId (not just the count)- expect(mutation).toHaveBeenCalledWith({ updatePerson: { __args: { id: 'person-1', data: { partnerUserId: 'member-1' } }, id: true } });- expect(mutation).toHaveBeenCalledWith({ updatePerson: { __args: { id: 'person-2', data: { partnerUserId: 'member-1' } }, id: true } });- expect(mutation).toHaveBeenCalledWith({ updateApplication: { __args: { id: 'app-1', data: { partnerUserId: 'member-1' } }, id: true } });- expect(mutation).toHaveBeenCalledWith({ updateCompany: { __args: { id: 'company-1', data: { partnerUserId: 'member-1' } }, id: true } });- expect(mutation).toHaveBeenCalledWith({ updatePartnerLink: { __args: { id: 'link-1', data: { partnerUserId: 'member-1' } }, id: true } });- expect(mutation).toHaveBeenCalledWith({ updatePartnerService: { __args: { id: 'service-1', data: { partnerUserId: 'member-1' } }, id: true } });- expect(mutation).toHaveBeenCalledWith({ updatePartnerContent: { __args: { id: 'content-1', data: { partnerUserId: 'member-1' } }, id: true } });- expect(mutation).toHaveBeenCalledWith({- updatePartner: {- __args: { id: 'partner-1', data: { partnerUserId: 'member-1', partnerUserLinkedAt: expect.any(String) } },- id: true,- },- });- });-- it('skips persons already linked to a member', async () => {- routeQueries({- cascade: {- partners: { edges: [{ node: {- id: 'partner-1',- companyId: null,- partnerUserId: null,- persons: { edges: [{ node: { id: 'person-1', partnerUserId: 'member-7' } }, { node: { id: 'person-2', partnerUserId: null } }] },- } }] },- applications: { edges: [] },- partnerLinks: { edges: [] },- partnerServices: { edges: [] },- partnerContents: { edges: [] },- },- });-- const result = await linkPartnerUser(client, { partnerId: 'partner-1', memberId: 'member-1' });-- expect(result).toEqual({ linked: true, partnerId: 'partner-1' });- // only the unlinked person-2 + the partner get stamped; person-1 is left alone- expect(mutation).toHaveBeenCalledWith({ updatePerson: { __args: { id: 'person-2', data: { partnerUserId: 'member-1' } }, id: true } });- expect(mutation).not.toHaveBeenCalledWith(expect.objectContaining({ updatePerson: expect.objectContaining({ __args: expect.objectContaining({ id: 'person-1' }) }) }));- });-- it('does not steal a company already owned by a different member', async () => {- routeQueries({- companyOwner: 'member-9', // company belongs to another partner's member- cascade: {- partners: { edges: [{ node: { id: 'partner-1', companyId: 'company-1', partnerUserId: null, persons: { edges: [{ node: { id: 'person-1', partnerUserId: null } }] } } }] },- applications: { edges: [] },- partnerLinks: { edges: [] },- partnerServices: { edges: [] },- partnerContents: { edges: [] },- },- });-- const result = await linkPartnerUser(client, { partnerId: 'partner-1', memberId: 'member-1' });-- expect(result).toEqual({ linked: true, partnerId: 'partner-1' });- // person + partner are stamped, but the shared company is left untouched- expect(mutation).not.toHaveBeenCalledWith(expect.objectContaining({ updateCompany: expect.anything() }));- expect(mutation).toHaveBeenCalledWith(expect.objectContaining({ updatePartner: expect.anything() }));- });-- it('aborts before stamping when another member claimed the partner during the cascade', async () => {- routeQueries({- ownerRecheck: 'member-9', // a concurrent onboarding won the claim between read and stamp- cascade: {- partners: { edges: [{ node: { id: 'partner-1', companyId: null, partnerUserId: null, persons: { edges: [{ node: { id: 'person-1', partnerUserId: null } }] } } }] },- applications: { edges: [] },- partnerLinks: { edges: [] },- partnerServices: { edges: [] },- partnerContents: { edges: [] },- },- });-- const result = await linkPartnerUser(client, { partnerId: 'partner-1', memberId: 'member-1' });-- expect(result).toEqual({ linked: false, reason: 'partner_already_linked_other' });- // the partner is never stamped by this loser- expect(mutation).not.toHaveBeenCalledWith(expect.objectContaining({ updatePartner: expect.anything() }));- });-- it('no-ops when the partner is already linked to the same member', async () => {- routeQueries({- cascade: {- partners: { edges: [{ node: { id: 'partner-1', companyId: null, partnerUserId: 'member-1', persons: { edges: [] } } }] },- applications: { edges: [] },- },- });- const result = await linkPartnerUser(client, { partnerId: 'partner-1', memberId: 'member-1' });- expect(result).toEqual({ linked: false, reason: 'already_linked_same' });- expect(mutation).not.toHaveBeenCalled();- });-- it('reports partner_already_linked_other when claimed by a different member', async () => {- routeQueries({- cascade: {- partners: { edges: [{ node: { id: 'partner-1', companyId: null, partnerUserId: 'member-9', persons: { edges: [] } } }] },- applications: { edges: [] },- },- });- const result = await linkPartnerUser(client, { partnerId: 'partner-1', memberId: 'member-1' });- expect(result).toEqual({ linked: false, reason: 'partner_already_linked_other' });- expect(mutation).not.toHaveBeenCalled();- });-- it('throws when a cascade write fails (retry semantics)', async () => {- routeQueries({- cascade: {- partners: { edges: [{ node: { id: 'partner-1', companyId: null, partnerUserId: null, persons: { edges: [{ node: { id: 'person-1', partnerUserId: null } }] } } }] },- applications: { edges: [] },- partnerLinks: { edges: [] },- partnerServices: { edges: [] },- partnerContents: { edges: [] },- },- });- mutation.mockRejectedValueOnce(new Error('boom')); // person stamp fails, before the partner is ever touched- await expect(linkPartnerUser(client, { partnerId: 'partner-1', memberId: 'member-1' })).rejects.toThrow(/cascade write/);- expect(mutation).not.toHaveBeenCalledWith(expect.objectContaining({ updatePartner: expect.anything() }));- });- it('links without throwing when the company and partner rows are absent', async () => {- routeQueries({- companyMissing: true,- ownerMissing: true,- cascade: {- partners: { edges: [{ node: { id: 'partner-1', companyId: 'company-1', partnerUserId: null, persons: { edges: [] } } }] },- applications: { edges: [] },- partnerLinks: { edges: [] },- partnerServices: { edges: [] },- partnerContents: { edges: [] },- },- });-- const result = await linkPartnerUser(client, { partnerId: 'partner-1', memberId: 'member-1' });-- expect(result).toEqual({ linked: true, partnerId: 'partner-1' });- expect(mutation).toHaveBeenCalledWith(expect.objectContaining({ updatePartner: expect.anything() }));- });- it('runs no cascade write when the cascade read finds no partner row', async () => {- routeQueries({- cascade: {- partners: { edges: [] },- applications: { edges: [] },- partnerLinks: { edges: [] },- partnerServices: { edges: [] },- partnerContents: { edges: [] },- },- });-- const result = await linkPartnerUser(client, { partnerId: 'partner-1', memberId: 'member-1' });-- expect(result).toEqual({ linked: true, partnerId: 'partner-1' });- expect(mutation).not.toHaveBeenCalledWith(expect.objectContaining({ updatePerson: expect.anything() }));- expect(mutation).not.toHaveBeenCalledWith(expect.objectContaining({ updateCompany: expect.anything() }));- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/services/link-partner-user.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/services/link-partner-user.service.tsdeleted file mode 100644index a542ad779ab..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/services/link-partner-user.service.ts+++ /dev/null@@ -1,89 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--import { getCompanyPartnerUser } from 'src/modules/shared/graphql/queries/get-company-partner-user';-import { getPartnerCascadeFields } from 'src/modules/partner/onboarding/graphql/queries/get-partner-cascade-fields';-import { getPartnerOwner } from 'src/modules/shared/graphql/queries/get-partner-owner';-import { updateApplicationPartnerUser } from 'src/modules/shared/graphql/mutations/update-application-partner-user';-import { updateCompanyPartnerUser } from 'src/modules/partner/onboarding/graphql/mutations/update-company-partner-user';-import { updatePartnerContentPartnerUser } from 'src/modules/shared/graphql/mutations/update-partner-content-partner-user';-import { updatePartnerLinkPartnerUser } from 'src/modules/shared/graphql/mutations/update-partner-link-partner-user';-import { updatePartnerPartnerUser } from 'src/modules/partner/onboarding/graphql/mutations/update-partner-partner-user';-import { updatePartnerServicePartnerUser } from 'src/modules/shared/graphql/mutations/update-partner-service-partner-user';-import { updatePersonPartnerUser } from 'src/modules/partner/onboarding/graphql/mutations/update-person-partner-user';--export type LinkPartnerUserResult =- | { linked: true; partnerId: string }- | { linked: false; reason: 'already_linked_same' | 'partner_already_linked_other' };--const collectIds = (edges: ({ node?: { id?: string | null } | null } | null)[] | null | undefined): string[] =>- (edges ?? []).map((e) => e?.node?.id).filter((id): id is string => Boolean(id));--export async function linkPartnerUser(- client: CoreApiClient,- input: { partnerId: string; memberId: string },-): Promise<LinkPartnerUserResult> {- const { partnerId, memberId } = input;- const detail = await getPartnerCascadeFields(client, partnerId);- const partner = detail.partners?.edges?.[0]?.node;-- const existing = partner?.partnerUserId;- if (existing) {- return existing === memberId- ? { linked: false, reason: 'already_linked_same' }- : { linked: false, reason: 'partner_already_linked_other' };- }-- // Only stamp persons not already linked. The other cascade collections are filtered- // server-side (partnerUserId IS NULL); persons come nested off the partner, so filter here.- const personIds = (partner?.persons?.edges ?? [])- .filter((e) => !e?.node?.partnerUserId)- .map((e) => e?.node?.id)- .filter((id): id is string => Boolean(id));- const applicationIds = collectIds(detail.applications?.edges);- const partnerLinkIds = collectIds(detail.partnerLinks?.edges);- const partnerServiceIds = collectIds(detail.partnerServices?.edges);- const partnerContentIds = collectIds(detail.partnerContents?.edges);-- // Don't clobber a company already owned by a DIFFERENT partner's member. The single- // partnerUser column models one owner per company, so overwriting would revoke that- // partner's access to the company and its contacts. Mirrors propagatePartnerUser's- // companyShared guard. Leave the company alone in that case; stamp only the rest.- const companyId = partner?.companyId;- const companyWrites: Promise<unknown>[] = [];- if (companyId) {- const companyOwner = (await getCompanyPartnerUser(client, companyId)).companies?.edges?.[0]- ?.node?.partnerUserId;- if (!companyOwner || companyOwner === memberId) {- companyWrites.push(updateCompanyPartnerUser(client, companyId, memberId));- }- }-- const results = await Promise.allSettled([- ...personIds.map((id) => updatePersonPartnerUser(client, id, memberId)),- ...applicationIds.map((id) => updateApplicationPartnerUser(client, id, memberId)),- ...partnerLinkIds.map((id) => updatePartnerLinkPartnerUser(client, id, memberId)),- ...partnerServiceIds.map((id) => updatePartnerServicePartnerUser(client, id, memberId)),- ...partnerContentIds.map((id) => updatePartnerContentPartnerUser(client, id, memberId)),- ...companyWrites,- ]);-- const failed = results.filter((r) => r.status === 'rejected').length;- if (failed > 0) {- throw new Error(`link-partner-user: ${failed} cascade write(s) failed for ${partnerId} — retrying`);- }-- // Re-check the claim immediately before the final stamp to narrow the concurrent-onboarding- // race (two members whose emails resolve to the same partner, created at once). This is NOT- // atomic — the API has no conditional update — so a simultaneous claim can still interleave;- // it only shrinks the window. Known limitation, consistent with the rest of the app.- const claimant = (await getPartnerOwner(client, partnerId)).partners?.edges?.[0]?.node- ?.partnerUserId;- if (claimant && claimant !== memberId) {- return { linked: false, reason: 'partner_already_linked_other' };- }-- // Stamp the partner LAST — its own partnerUserId is the already-linked guard, so if any- // cascade write throws, the partner stays unstamped and a re-invocation redoes the cascade.- await updatePartnerPartnerUser(client, partnerId, memberId, new Date().toISOString());- return { linked: true, partnerId };-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/services/resolve-partner-by-email.service.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/services/resolve-partner-by-email.service.test.tsdeleted file mode 100644index 239510d3b3b..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/services/resolve-partner-by-email.service.test.ts+++ /dev/null@@ -1,41 +0,0 @@-import { beforeEach, describe, expect, it, vi } from 'vitest';-import { type CoreApiClient } from 'twenty-client-sdk/core';--import { resolvePartnerByEmail } from './resolve-partner-by-email.service';--describe('resolvePartnerByEmail', () => {- const query = vi.fn();- const client = { query } as unknown as CoreApiClient;-- beforeEach(() => query.mockReset());-- it('returns the partner id for a VALIDATED, unlinked partner', async () => {- query.mockResolvedValueOnce({- people: {- edges: [- { node: { id: 'p-1', partner: { id: 'partner-1', validationStage: 'VALIDATED', partnerUserId: null } } },- ],- },- });- await expect(resolvePartnerByEmail(client, '[email protected]')).resolves.toBe('partner-1');- });-- it('returns null when no Person matches', async () => {- query.mockResolvedValueOnce({ people: { edges: [] } });- await expect(resolvePartnerByEmail(client, '[email protected]')).resolves.toBeNull();- });-- it('returns the partner id even when already linked (classification deferred to linkPartnerUser)', async () => {- query.mockResolvedValueOnce({- people: { edges: [{ node: { id: 'p-1', partner: { id: 'partner-1', validationStage: 'VALIDATED', partnerUserId: 'member-9' } } }] },- });- await expect(resolvePartnerByEmail(client, '[email protected]')).resolves.toBe('partner-1');- });-- it('returns null when the matched partner is not VALIDATED', async () => {- query.mockResolvedValueOnce({- people: { edges: [{ node: { id: 'p-1', partner: { id: 'partner-1', validationStage: 'APPLICATION', partnerUserId: null } } }] },- });- await expect(resolvePartnerByEmail(client, '[email protected]')).resolves.toBeNull();- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/services/resolve-partner-by-email.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/services/resolve-partner-by-email.service.tsdeleted file mode 100644index 0ed91b38362..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/services/resolve-partner-by-email.service.ts+++ /dev/null@@ -1,15 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--import { findPartnerByPersonEmail } from 'src/modules/partner/onboarding/graphql/queries/find-partner-by-person-email';--export async function resolvePartnerByEmail(- client: CoreApiClient,- email: string,-): Promise<string | null> {- const res = await findPartnerByPersonEmail(client, email);- const partner = res.people?.edges?.[0]?.node?.partner;- if (partner?.id && partner.validationStage === 'VALIDATED') {- return partner.id;- }- return null;-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/utils/normalize-invite-email.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/utils/normalize-invite-email.test.tsdeleted file mode 100644index 452014153bc..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/utils/normalize-invite-email.test.ts+++ /dev/null@@ -1,13 +0,0 @@-import { describe, expect, it } from 'vitest';--import { normalizeInviteEmail } from './normalize-invite-email';--describe('normalizeInviteEmail', () => {- it('trims surrounding whitespace and lowercases', () => {- expect(normalizeInviteEmail(' [email protected] ')).toBe('[email protected]');- });-- it('returns empty string unchanged', () => {- expect(normalizeInviteEmail('')).toBe('');- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/utils/normalize-invite-email.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/utils/normalize-invite-email.tsdeleted file mode 100644index 094cfc4080f..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/onboarding/utils/normalize-invite-email.ts+++ /dev/null@@ -1,3 +0,0 @@-export function normalizeInviteEmail(email: string): string {- return email.trim().toLowerCase();-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/__tests__/get-my-partner-profile.integration-test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/__tests__/get-my-partner-profile.integration-test.tsdeleted file mode 100644index 381d15c7d02..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/__tests__/get-my-partner-profile.integration-test.ts+++ /dev/null@@ -1,252 +0,0 @@-import { CoreApiClient } from 'twenty-client-sdk/core';-import { type RoutePayload } from 'twenty-sdk/define';-import { afterEach, beforeEach, describe, expect, it } from 'vitest';--import { handler } from '../get-my-partner-profile.logic-function';--function requireId(id: string | null | undefined, what: string): string {- if (!id) throw new Error(`${what} returned no id`);- return id;-}--async function getWorkspaceMember(- client: CoreApiClient,-): Promise<{ id: string; userId: string }> {- const r = await client.query({- workspaceMembers: {- __args: { first: 1 },- edges: { node: { id: true, userId: true } },- },- });- const node = r.workspaceMembers?.edges?.[0]?.node;- if (!node?.id || !node?.userId) {- throw new Error('No workspace members found — cannot run test');- }- return { id: node.id, userId: node.userId };-}--async function createPartner(client: CoreApiClient, memberId: string): Promise<string> {- const r = await client.mutation({- createPartner: {- __args: {- data: {- name: `[test-my-profile] partner ${Date.now()}`,- slug: `test-my-profile-${Date.now()}`,- partnerUserId: memberId,- city: 'Paris',- introduction: 'Senior implementation partner.',- },- },- id: true,- },- });- return requireId(r.createPartner?.id, 'createPartner');-}--async function destroyPartner(client: CoreApiClient, id: string) {- await client.mutation({ destroyPartner: { __args: { id }, id: true } }).catch(() => {});-}--async function createPartnerLink(- client: CoreApiClient,- partnerId: string,- memberId: string,-): Promise<string> {- const r = await client.mutation({- createPartnerLink: {- __args: {- data: {- name: 'Case studies',- url: { primaryLinkUrl: 'https://example.com/case-studies' },- sortOrder: 1,- partnerId,- partnerUserId: memberId,- },- },- id: true,- },- });- return requireId(r.createPartnerLink?.id, 'createPartnerLink');-}--async function destroyPartnerLink(client: CoreApiClient, id: string) {- await client.mutation({ destroyPartnerLink: { __args: { id }, id: true } }).catch(() => {});-}--async function createPartnerService(- client: CoreApiClient,- partnerId: string,- memberId: string,-): Promise<string> {- const r = await client.mutation({- createPartnerService: {- __args: {- data: {- title: 'Data migration',- description: 'Historical sync and schema mapping.',- sortOrder: 1,- partnerId,- partnerUserId: memberId,- },- },- id: true,- },- });- return requireId(r.createPartnerService?.id, 'createPartnerService');-}--async function destroyPartnerService(client: CoreApiClient, id: string) {- await client.mutation({ destroyPartnerService: { __args: { id }, id: true } }).catch(() => {});-}--async function createPartnerContent(- client: CoreApiClient,- partnerId: string,- memberId: string,- name: string,-): Promise<string> {- const r = await client.mutation({- createPartnerContent: {- __args: {- data: {- name,- contentType: ['CASE_STUDY'],- status: 'APPROVED',- clientName: 'Acme Corp',- headline: 'CRM migration',- body: { markdown: 'Moved 12 teams to Twenty.' },- caseStudyLink: { primaryLinkUrl: 'https://example.com/case-study' },- partnerId,- partnerUserId: memberId,- },- },- id: true,- },- });- return requireId(r.createPartnerContent?.id, 'createPartnerContent');-}--async function destroyPartnerContent(client: CoreApiClient, id: string) {- await client.mutation({ destroyPartnerContent: { __args: { id }, id: true } }).catch(() => {});-}--const makeToken = (payload: Record<string, unknown>): string => {- const body = Buffer.from(JSON.stringify(payload)).toString('base64url');- return `header.${body}.sig`;-};--const makeRouteEvent = (userWorkspaceId: string | null): RoutePayload<unknown> => ({- headers: {},- queryStringParameters: {},- pathParameters: {},- body: null,- isBase64Encoded: false,- requestContext: { http: { method: 'POST', path: '/my-partner-profile' } },- userWorkspaceId,-});--// Invoke the handler directly against a live workspace, crafting the same short-lived env-// token resolvePartnerFromRequest decodes (see resolve-partner-from-request.test.ts), so the-// full identity → profile path is exercised without a real authenticated HTTP request.-describe('get-my-partner-profile', () => {- let client: CoreApiClient;- const originalToken = process.env.TWENTY_APP_ACCESS_TOKEN;-- const createdPartnerIds: string[] = [];- const createdLinkIds: string[] = [];- const createdServiceIds: string[] = [];- const createdContentIds: string[] = [];-- beforeEach(() => {- client = new CoreApiClient();- });-- afterEach(async () => {- if (originalToken === undefined) delete process.env.TWENTY_APP_ACCESS_TOKEN;- else process.env.TWENTY_APP_ACCESS_TOKEN = originalToken;-- for (const id of createdLinkIds.splice(0)) await destroyPartnerLink(client, id);- for (const id of createdServiceIds.splice(0)) await destroyPartnerService(client, id);- for (const id of createdContentIds.splice(0)) await destroyPartnerContent(client, id);- for (const id of createdPartnerIds.splice(0)) await destroyPartner(client, id);- });-- it('returns UNAUTHENTICATED when the event has no userWorkspaceId', async () => {- const result = await handler(makeRouteEvent(null));-- expect(result).toEqual({ ok: false, reason: 'UNAUTHENTICATED' });- });-- it('returns NO_PARTNER when the token userId matches no workspace member', async () => {- const userWorkspaceId = `uw-test-nomember-${Date.now()}`;- process.env.TWENTY_APP_ACCESS_TOKEN = makeToken({- userId: '11111111-1111-4111-8111-111111111111',- userWorkspaceId,- });-- const result = await handler(makeRouteEvent(userWorkspaceId));-- expect(result).toEqual({ ok: false, reason: 'NO_PARTNER' });- });-- it("returns the calling partner's profile with links, services, and case studies", async () => {- const member = await getWorkspaceMember(client);- const partnerId = await createPartner(client, member.id);- createdPartnerIds.push(partnerId);-- const linkId = await createPartnerLink(client, partnerId, member.id);- createdLinkIds.push(linkId);- const serviceId = await createPartnerService(client, partnerId, member.id);- createdServiceIds.push(serviceId);- const caseStudyName = `[test-my-profile] case study ${Date.now()}`;- const contentId = await createPartnerContent(client, partnerId, member.id, caseStudyName);- createdContentIds.push(contentId);-- const userWorkspaceId = `uw-test-${Date.now()}`;- process.env.TWENTY_APP_ACCESS_TOKEN = makeToken({- userId: member.userId,- userWorkspaceId,- });-- const result = await handler(makeRouteEvent(userWorkspaceId));-- expect(result.ok).toBe(true);- if (!result.ok) return;-- expect(result.profile.id).toBe(partnerId);- expect(result.profile.city).toBe('Paris');- expect(result.profile.introduction).toBe('Senior implementation partner.');- expect(result.profile.links).toEqual([- {- id: linkId,- name: 'Case studies',- url: 'https://example.com/case-studies',- sortOrder: 1,- },- ]);- expect(result.profile.services).toEqual([- {- id: serviceId,- title: 'Data migration',- description: 'Historical sync and schema mapping.',- sortOrder: 1,- },- ]);- expect(result.profile.caseStudies).toEqual([- {- id: contentId,- name: caseStudyName,- clientName: 'Acme Corp',- headline: 'CRM migration',- bodyMarkdown: 'Moved 12 teams to Twenty.',- coverImageUrl: null,- caseStudyLink: 'https://example.com/case-study',- status: 'APPROVED',- },- ]);- expect(result.options.partnerScope[0]).toEqual({- value: 'ADVISORY',- label: 'Advisory & Discovery',- });- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/__tests__/save-my-partner-content.integration-test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/__tests__/save-my-partner-content.integration-test.tsdeleted file mode 100644index e2cf017e5e7..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/__tests__/save-my-partner-content.integration-test.ts+++ /dev/null@@ -1,197 +0,0 @@-// resolvePartnerFromRequest only base64-decodes the bearer token (no signature-// check), so a fake unsigned JWT is enough to drive the handler against a real-// workspace member — same trick as resolve-partner-from-request.test.ts.-import { CoreApiClient } from 'twenty-client-sdk/core';-import { afterAll, beforeAll, describe, expect, it } from 'vitest';--import { handler } from 'src/modules/partner/self-service/save-my-partner-content.logic-function';--const makeToken = (payload: Record<string, unknown>): string =>- `header.${Buffer.from(JSON.stringify(payload)).toString('base64url')}.sig`;--const requireId = (id: string | undefined, what: string): string => {- if (id === undefined) throw new Error(`${what} did not return an id`);- return id;-};--describe('save-my-partner-content handler', () => {- let client: CoreApiClient;- let partnerId: string;- let otherPartnerId: string;- let userWorkspaceId: string;- let keepId: string;- let dropId: string;- let otherContentId: string;- const originalToken = process.env.TWENTY_APP_ACCESS_TOKEN;-- beforeAll(async () => {- client = new CoreApiClient();-- const memberResult = await client.query({- workspaceMembers: {- __args: { filter: { userId: { is: 'NOT_NULL' } }, first: 1 },- edges: { node: { id: true, userId: true } },- },- });- const member = memberResult.workspaceMembers?.edges?.[0]?.node;- if (!member?.userId) {- throw new Error('No workspace member with a linked userId found to drive this test.');- }- userWorkspaceId = 'integration-test-workspace';- process.env.TWENTY_APP_ACCESS_TOKEN = makeToken({- userId: member.userId,- userWorkspaceId,- });-- const partnerCreated = await client.mutation({- createPartner: {- __args: {- data: { name: 'Content Integration Test Partner', partnerUserId: member.id },- },- id: true,- },- });- partnerId = requireId(partnerCreated.createPartner?.id, 'createPartner');-- const otherPartnerCreated = await client.mutation({- createPartner: {- __args: { data: { name: 'Other Partner (content test)' } },- id: true,- },- });- otherPartnerId = requireId(otherPartnerCreated.createPartner?.id, 'createPartner');-- // Seeded APPROVED — proves an edit through this route never resets status.- const keep = await client.mutation({- createPartnerContent: {- __args: {- data: {- partnerId,- name: 'Keep me (edited)',- contentType: ['CASE_STUDY'],- status: 'APPROVED',- clientName: 'Acme Corp',- headline: 'Original headline',- body: { markdown: 'Original body' },- },- },- id: true,- },- });- keepId = requireId(keep.createPartnerContent?.id, 'createPartnerContent');-- const drop = await client.mutation({- createPartnerContent: {- __args: {- data: {- partnerId,- name: 'Drop me',- contentType: ['CASE_STUDY'],- status: 'WIP',- },- },- id: true,- },- });- dropId = requireId(drop.createPartnerContent?.id, 'createPartnerContent');-- const otherContent = await client.mutation({- createPartnerContent: {- __args: {- data: {- partnerId: otherPartnerId,- name: 'Belongs to someone else',- contentType: ['CASE_STUDY'],- status: 'WIP',- },- },- id: true,- },- });- otherContentId = requireId(otherContent.createPartnerContent?.id, 'createPartnerContent');- });-- afterAll(async () => {- if (originalToken === undefined) delete process.env.TWENTY_APP_ACCESS_TOKEN;- else process.env.TWENTY_APP_ACCESS_TOKEN = originalToken;-- await client.mutation({ destroyPartnerContent: { __args: { id: keepId }, id: true } });- await client.mutation({ destroyPartnerContent: { __args: { id: otherContentId }, id: true } });- // dropId is deleted by the reconcile happy-path; clean it up in case that test bailed early- // (tolerate not-found — it is expected to be gone after a successful run).- if (dropId) {- await client- .mutation({ destroyPartnerContent: { __args: { id: dropId }, id: true } })- .catch(() => {});- }- await client.mutation({ destroyPartner: { __args: { id: partnerId }, id: true } });- await client.mutation({ destroyPartner: { __args: { id: otherPartnerId }, id: true } });- });-- it('keeps+edits one (status untouched), creates one (WIP/CASE_STUDY), drops the omitted one', async () => {- const result = await handler({- headers: {},- queryStringParameters: {},- pathParameters: {},- body: {- caseStudies: [- {- id: keepId,- name: 'Keep me (edited)',- clientName: 'Acme Corp',- headline: 'Updated headline',- bodyMarkdown: 'Updated body',- caseStudyLink: 'https://example.com/acme-updated',- },- { name: 'Brand new case study', clientName: 'New Co', headline: 'Fresh win' },- ],- },- isBase64Encoded: false,- requestContext: { http: { method: 'POST', path: '/save-my-partner-content' } },- userWorkspaceId,- });-- expect(result.ok).toBe(true);- if (!result.ok) return;-- expect(result.caseStudies).toHaveLength(2);-- const kept = result.caseStudies.find((row) => row.id === keepId);- expect(kept).toMatchObject({ headline: 'Updated headline', bodyMarkdown: 'Updated body' });- // The seeded row was APPROVED — an edit through this route must never reset it.- expect(kept?.status).toBe('APPROVED');-- expect(result.caseStudies.some((row) => row.id === dropId)).toBe(false);-- const created = result.caseStudies.find((row) => row.name === 'Brand new case study');- expect(created).toBeDefined();- expect(created?.status).toBe('WIP');-- // contentType is stamped by the async trigger, which needs the creator's workspaceMemberId —- // absent under vitest (buildAppClient runs as the API key), so it can't fire for route-created- // rows here. Verify the draft persisted; trigger stamping is exercised where a real member exists.- const fetched = await client.query({- partnerContents: {- __args: { filter: { id: { eq: created?.id ?? '' } }, first: 1 },- edges: { node: { status: true } },- },- });- expect(fetched.partnerContents?.edges?.[0]?.node?.status).toBe('WIP');- });-- it('refuses a case study id owned by another partner', async () => {- const result = await handler({- headers: {},- queryStringParameters: {},- pathParameters: {},- body: {- caseStudies: [{ id: otherContentId, name: 'Hijacked' }],- },- isBase64Encoded: false,- requestContext: { http: { method: 'POST', path: '/save-my-partner-content' } },- userWorkspaceId,- });-- expect(result).toEqual({ ok: false, reason: 'FORBIDDEN' });- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/__tests__/save-my-partner-links.integration-test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/__tests__/save-my-partner-links.integration-test.tsdeleted file mode 100644index bb41f79d5a5..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/__tests__/save-my-partner-links.integration-test.ts+++ /dev/null@@ -1,162 +0,0 @@-// Deferred: written for the batch pass, not run as part of this task.-// resolvePartnerFromRequest only base64-decodes the bearer token (no signature-// check), so a fake unsigned JWT is enough to drive the handler against a real-// workspace member — same trick as resolve-partner-from-request.test.ts.-import { CoreApiClient } from 'twenty-client-sdk/core';-import { afterAll, beforeAll, describe, expect, it } from 'vitest';--import { handler } from 'src/modules/partner/self-service/save-my-partner-links.logic-function';--const makeToken = (payload: Record<string, unknown>): string =>- `header.${Buffer.from(JSON.stringify(payload)).toString('base64url')}.sig`;--const requireId = (id: string | undefined, what: string): string => {- if (id === undefined) throw new Error(`${what} did not return an id`);- return id;-};--describe('save-my-partner-links handler', () => {- let client: CoreApiClient;- let partnerId: string;- let otherPartnerId: string;- let userWorkspaceId: string;- let keepId: string;- let dropId: string;- let otherLinkId: string;- const originalToken = process.env.TWENTY_APP_ACCESS_TOKEN;-- beforeAll(async () => {- client = new CoreApiClient();-- const memberResult = await client.query({- workspaceMembers: {- __args: { filter: { userId: { is: 'NOT_NULL' } }, first: 1 },- edges: { node: { id: true, userId: true } },- },- });- const member = memberResult.workspaceMembers?.edges?.[0]?.node;- if (!member?.userId) {- throw new Error('No workspace member with a linked userId found to drive this test.');- }- userWorkspaceId = 'integration-test-workspace';- process.env.TWENTY_APP_ACCESS_TOKEN = makeToken({- userId: member.userId,- userWorkspaceId,- });-- const partnerCreated = await client.mutation({- createPartner: {- __args: {- data: { name: 'Links Integration Test Partner', partnerUserId: member.id },- },- id: true,- },- });- partnerId = requireId(partnerCreated.createPartner?.id, 'createPartner');-- const otherPartnerCreated = await client.mutation({- createPartner: {- __args: { data: { name: 'Other Partner (links test)' } },- id: true,- },- });- otherPartnerId = requireId(otherPartnerCreated.createPartner?.id, 'createPartner');-- const keep = await client.mutation({- createPartnerLink: {- __args: {- data: {- partnerId,- name: 'Keep me (edited)',- url: { primaryLinkUrl: 'https://example.com/keep' },- sortOrder: 0,- },- },- id: true,- },- });- keepId = requireId(keep.createPartnerLink?.id, 'createPartnerLink');-- const drop = await client.mutation({- createPartnerLink: {- __args: {- data: {- partnerId,- name: 'Drop me',- url: { primaryLinkUrl: 'https://example.com/drop' },- sortOrder: 1,- },- },- id: true,- },- });- dropId = requireId(drop.createPartnerLink?.id, 'createPartnerLink');-- const otherLink = await client.mutation({- createPartnerLink: {- __args: {- data: {- partnerId: otherPartnerId,- name: 'Belongs to someone else',- url: { primaryLinkUrl: 'https://example.com/other' },- sortOrder: 0,- },- },- id: true,- },- });- otherLinkId = requireId(otherLink.createPartnerLink?.id, 'createPartnerLink');- });-- afterAll(async () => {- if (originalToken === undefined) delete process.env.TWENTY_APP_ACCESS_TOKEN;- else process.env.TWENTY_APP_ACCESS_TOKEN = originalToken;-- await client.mutation({ destroyPartnerLink: { __args: { id: keepId }, id: true } });- await client.mutation({ destroyPartnerLink: { __args: { id: otherLinkId }, id: true } });- await client.mutation({ destroyPartner: { __args: { id: partnerId }, id: true } });- await client.mutation({ destroyPartner: { __args: { id: otherPartnerId }, id: true } });- });-- it('keeps+edits one, creates one, and drops the omitted one', async () => {- const result = await handler({- headers: {},- queryStringParameters: {},- pathParameters: {},- body: {- links: [- { id: keepId, name: 'Keep me (edited)', url: 'https://example.com/keep-2', sortOrder: 0 },- { name: 'Brand new link', url: 'https://example.com/new', sortOrder: 1 },- ],- },- isBase64Encoded: false,- requestContext: { http: { method: 'POST', path: '/save-my-partner-links' } },- userWorkspaceId,- });-- expect(result.ok).toBe(true);- if (!result.ok) return;-- expect(result.links).toHaveLength(2);- const kept = result.links.find((link) => link.id === keepId);- expect(kept).toMatchObject({ name: 'Keep me (edited)', url: 'https://example.com/keep-2' });- expect(result.links.some((link) => link.id === dropId)).toBe(false);- expect(result.links.some((link) => link.name === 'Brand new link')).toBe(true);- });-- it('refuses a link id owned by another partner', async () => {- const result = await handler({- headers: {},- queryStringParameters: {},- pathParameters: {},- body: {- links: [{ id: otherLinkId, name: 'Hijacked', url: 'https://example.com/hijack' }],- },- isBase64Encoded: false,- requestContext: { http: { method: 'POST', path: '/save-my-partner-links' } },- userWorkspaceId,- });-- expect(result).toEqual({ ok: false, reason: 'FORBIDDEN' });- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/__tests__/save-my-partner-profile.integration-test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/__tests__/save-my-partner-profile.integration-test.tsdeleted file mode 100644index f1fe9ab4b82..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/__tests__/save-my-partner-profile.integration-test.ts+++ /dev/null@@ -1,241 +0,0 @@-import { CoreApiClient, type CoreSchema } from 'twenty-client-sdk/core';-import { type RoutePayload } from 'twenty-sdk/define';-import { afterEach, beforeEach, describe, expect, it } from 'vitest';--import { handler } from '../save-my-partner-profile.logic-function';--function requireId(id: string | null | undefined, what: string): string {- if (!id) throw new Error(`${what} returned no id`);- return id;-}--async function getWorkspaceMember(- client: CoreApiClient,-): Promise<{ id: string; userId: string }> {- const r = await client.query({- workspaceMembers: {- __args: { first: 1 },- edges: { node: { id: true, userId: true } },- },- });- const node = r.workspaceMembers?.edges?.[0]?.node;- if (!node?.id || !node?.userId) {- throw new Error('No workspace members found — cannot run test');- }- return { id: node.id, userId: node.userId };-}--async function createPartner(- client: CoreApiClient,- memberId: string,- overrides: {- name?: string;- region?: CoreSchema.PartnerRegionEnum[];- deploymentExpertise?: CoreSchema.PartnerDeploymentExpertiseEnum[];- } = {},-): Promise<string> {- const r = await client.mutation({- createPartner: {- __args: {- data: {- name: overrides.name ?? `[test-save-profile] partner ${Date.now()}`,- slug: `test-save-profile-${Date.now()}-${Math.random().toString(36).slice(2)}`,- partnerUserId: memberId,- city: 'Paris',- region: overrides.region,- deploymentExpertise: overrides.deploymentExpertise,- },- },- id: true,- },- });- return requireId(r.createPartner?.id, 'createPartner');-}--// A partner that is not linked to any workspace member — stands in for "someone-// else's record" so the test can assert the save route never touches it.-async function createUnlinkedPartner(client: CoreApiClient): Promise<string> {- const r = await client.mutation({- createPartner: {- __args: {- data: {- name: `[test-save-profile] other partner ${Date.now()}`,- slug: `test-save-profile-other-${Date.now()}-${Math.random().toString(36).slice(2)}`,- },- },- id: true,- },- });- return requireId(r.createPartner?.id, 'createPartner');-}--async function destroyPartner(client: CoreApiClient, id: string) {- // Let a failed delete surface so leaked fixtures are visible instead of silently kept.- await client.mutation({ destroyPartner: { __args: { id }, id: true } });-}--async function getPartner(client: CoreApiClient, id: string) {- const r = await client.query({- partners: {- __args: { filter: { id: { eq: id } }, first: 1 },- edges: {- node: {- id: true,- name: true,- city: true,- country: true,- typeOfTeam: true,- hourlyRate: { amountMicros: true, currencyCode: true },- website: { primaryLinkUrl: true },- region: true,- deploymentExpertise: true,- },- },- },- });- const node = r.partners?.edges?.[0]?.node;- if (!node) throw new Error(`partner ${id} not found`);- return node;-}--const makeToken = (payload: Record<string, unknown>): string => {- const body = Buffer.from(JSON.stringify(payload)).toString('base64url');- return `header.${body}.sig`;-};--const makeRouteEvent = (- userWorkspaceId: string | null,- body: unknown,-): RoutePayload<unknown> => ({- headers: {},- queryStringParameters: {},- pathParameters: {},- body,- isBase64Encoded: false,- requestContext: { http: { method: 'POST', path: '/save-my-partner-profile' } },- userWorkspaceId,-});--// Invoke the handler directly against a live workspace, crafting the same short-lived env-// token resolvePartnerFromRequest decodes (see resolve-partner-from-request.test.ts), so the-// full identity → save path is exercised without a real authenticated HTTP request.-describe('save-my-partner-profile', () => {- let client: CoreApiClient;- const originalToken = process.env.TWENTY_APP_ACCESS_TOKEN;-- const createdPartnerIds: string[] = [];-- beforeEach(() => {- client = new CoreApiClient();- });-- afterEach(async () => {- if (originalToken === undefined) delete process.env.TWENTY_APP_ACCESS_TOKEN;- else process.env.TWENTY_APP_ACCESS_TOKEN = originalToken;-- for (const id of createdPartnerIds.splice(0)) await destroyPartner(client, id);- });-- it('returns UNAUTHENTICATED when the event has no userWorkspaceId', async () => {- const result = await handler(makeRouteEvent(null, { name: 'New name' }));-- expect(result).toEqual({ ok: false, reason: 'UNAUTHENTICATED' });- });-- it('rejects an invalid body before writing anything', async () => {- const member = await getWorkspaceMember(client);- const partnerId = await createPartner(client, member.id, { name: 'Original name' });- createdPartnerIds.push(partnerId);-- const userWorkspaceId = `uw-test-invalid-${Date.now()}`;- process.env.TWENTY_APP_ACCESS_TOKEN = makeToken({ userId: member.userId, userWorkspaceId });-- const result = await handler(makeRouteEvent(userWorkspaceId, { website: 'not-a-url' }));-- expect(result.ok).toBe(false);-- const partner = await getPartner(client, partnerId);- expect(partner.name).toBe('Original name');- });-- it('rejects an unknown enum value without writing anything', async () => {- const member = await getWorkspaceMember(client);- const partnerId = await createPartner(client, member.id, { name: 'Original name' });- createdPartnerIds.push(partnerId);-- const userWorkspaceId = `uw-test-badenum-${Date.now()}`;- process.env.TWENTY_APP_ACCESS_TOKEN = makeToken({ userId: member.userId, userWorkspaceId });-- const result = await handler(makeRouteEvent(userWorkspaceId, { country: 'NOPE' }));-- expect(result).toEqual({ ok: false, reason: 'Unknown country: NOPE' });-- const partner = await getPartner(client, partnerId);- expect(partner.country).toBeNull();- });-- it('writes only the editable fields provided in the body', async () => {- const member = await getWorkspaceMember(client);- const partnerId = await createPartner(client, member.id, {- name: 'Original name',- region: ['EUROPE'],- deploymentExpertise: ['CLOUD'],- });- createdPartnerIds.push(partnerId);-- const userWorkspaceId = `uw-test-write-${Date.now()}`;- process.env.TWENTY_APP_ACCESS_TOKEN = makeToken({ userId: member.userId, userWorkspaceId });-- const result = await handler(- makeRouteEvent(userWorkspaceId, {- name: 'Updated name',- city: 'Berlin',- country: 'GERMANY',- typeOfTeam: 'AGENCY',- hourlyRate: { amountMicros: 150000000, currencyCode: 'USD' },- website: 'https://updated.example.com',- }),- );-- expect(result).toEqual({ ok: true });-- const partner = await getPartner(client, partnerId);- expect(partner.name).toBe('Updated name');- expect(partner.city).toBe('Berlin');- expect(partner.country).toBe('GERMANY');- expect(partner.typeOfTeam).toBe('AGENCY');- expect(partner.hourlyRate).toEqual({ amountMicros: 150000000, currencyCode: 'USD' });- expect(partner.website?.primaryLinkUrl).toBe('https://updated.example.com');-- // Fields absent from the body must survive untouched.- expect(partner.region).toEqual(['EUROPE']);- expect(partner.deploymentExpertise).toEqual(['CLOUD']);- });-- it('never writes to another partner even if the body tries to reference one', async () => {- const member = await getWorkspaceMember(client);- const myPartnerId = await createPartner(client, member.id, { name: 'My original name' });- createdPartnerIds.push(myPartnerId);- const otherPartnerId = await createUnlinkedPartner(client);- createdPartnerIds.push(otherPartnerId);-- const userWorkspaceId = `uw-test-foreign-${Date.now()}`;- process.env.TWENTY_APP_ACCESS_TOKEN = makeToken({ userId: member.userId, userWorkspaceId });-- // `partnerId` is not a key in saveProfileSchema, so `.strict()` rejects the whole- // request outright — there is no way to redirect the write via the body.- const result = await handler(- makeRouteEvent(userWorkspaceId, {- name: 'Hijacked name',- partnerId: otherPartnerId,- }),- );-- expect(result.ok).toBe(false);-- const mine = await getPartner(client, myPartnerId);- const other = await getPartner(client, otherPartnerId);- expect(mine.name).toBe('My original name');- expect(other.name).not.toBe('Hijacked name');- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/__tests__/save-my-partner-services.integration-test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/__tests__/save-my-partner-services.integration-test.tsdeleted file mode 100644index 92aa45b5a54..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/__tests__/save-my-partner-services.integration-test.ts+++ /dev/null@@ -1,169 +0,0 @@-// Deferred: written for the batch pass, not run as part of this task.-// resolvePartnerFromRequest only base64-decodes the bearer token (no signature-// check), so a fake unsigned JWT is enough to drive the handler against a real-// workspace member — same trick as resolve-partner-from-request.test.ts.-import { CoreApiClient } from 'twenty-client-sdk/core';-import { afterAll, beforeAll, describe, expect, it } from 'vitest';--import { handler } from 'src/modules/partner/self-service/save-my-partner-services.logic-function';--const makeToken = (payload: Record<string, unknown>): string =>- `header.${Buffer.from(JSON.stringify(payload)).toString('base64url')}.sig`;--const requireId = (id: string | undefined, what: string): string => {- if (id === undefined) throw new Error(`${what} did not return an id`);- return id;-};--describe('save-my-partner-services handler', () => {- let client: CoreApiClient;- let partnerId: string;- let otherPartnerId: string;- let userWorkspaceId: string;- let keepId: string;- let dropId: string;- let otherServiceId: string;- const originalToken = process.env.TWENTY_APP_ACCESS_TOKEN;-- beforeAll(async () => {- client = new CoreApiClient();-- const memberResult = await client.query({- workspaceMembers: {- __args: { filter: { userId: { is: 'NOT_NULL' } }, first: 1 },- edges: { node: { id: true, userId: true } },- },- });- const member = memberResult.workspaceMembers?.edges?.[0]?.node;- if (!member?.userId) {- throw new Error('No workspace member with a linked userId found to drive this test.');- }- userWorkspaceId = 'integration-test-workspace';- process.env.TWENTY_APP_ACCESS_TOKEN = makeToken({- userId: member.userId,- userWorkspaceId,- });-- const partnerCreated = await client.mutation({- createPartner: {- __args: {- data: { name: 'Services Integration Test Partner', partnerUserId: member.id },- },- id: true,- },- });- partnerId = requireId(partnerCreated.createPartner?.id, 'createPartner');-- const otherPartnerCreated = await client.mutation({- createPartner: {- __args: { data: { name: 'Other Partner (services test)' } },- id: true,- },- });- otherPartnerId = requireId(otherPartnerCreated.createPartner?.id, 'createPartner');-- const keep = await client.mutation({- createPartnerService: {- __args: {- data: {- partnerId,- title: 'Keep me (edited)',- description: 'Original description',- sortOrder: 0,- },- },- id: true,- },- });- keepId = requireId(keep.createPartnerService?.id, 'createPartnerService');-- const drop = await client.mutation({- createPartnerService: {- __args: {- data: {- partnerId,- title: 'Drop me',- description: 'Will be removed',- sortOrder: 1,- },- },- id: true,- },- });- dropId = requireId(drop.createPartnerService?.id, 'createPartnerService');-- const otherService = await client.mutation({- createPartnerService: {- __args: {- data: {- partnerId: otherPartnerId,- title: 'Belongs to someone else',- description: 'Not owned by the caller',- sortOrder: 0,- },- },- id: true,- },- });- otherServiceId = requireId(otherService.createPartnerService?.id, 'createPartnerService');- });-- afterAll(async () => {- if (originalToken === undefined) delete process.env.TWENTY_APP_ACCESS_TOKEN;- else process.env.TWENTY_APP_ACCESS_TOKEN = originalToken;-- await client.mutation({ destroyPartnerService: { __args: { id: keepId }, id: true } });- await client.mutation({ destroyPartnerService: { __args: { id: otherServiceId }, id: true } });- await client.mutation({ destroyPartner: { __args: { id: partnerId }, id: true } });- await client.mutation({ destroyPartner: { __args: { id: otherPartnerId }, id: true } });- });-- it('keeps+edits one, creates one, and drops the omitted one', async () => {- const result = await handler({- headers: {},- queryStringParameters: {},- pathParameters: {},- body: {- services: [- {- id: keepId,- title: 'Keep me (edited)',- description: 'Updated description',- sortOrder: 0,- },- { title: 'Brand new service', description: 'Freshly added', sortOrder: 1 },- ],- },- isBase64Encoded: false,- requestContext: { http: { method: 'POST', path: '/save-my-partner-services' } },- userWorkspaceId,- });-- expect(result.ok).toBe(true);- if (!result.ok) return;-- expect(result.services).toHaveLength(2);- const kept = result.services.find((service) => service.id === keepId);- expect(kept).toMatchObject({ title: 'Keep me (edited)', description: 'Updated description' });- expect(result.services.some((service) => service.id === dropId)).toBe(false);- expect(result.services.some((service) => service.title === 'Brand new service')).toBe(true);- });-- it('refuses a service id owned by another partner', async () => {- const result = await handler({- headers: {},- queryStringParameters: {},- pathParameters: {},- body: {- services: [- { id: otherServiceId, title: 'Hijacked', description: 'Should be refused' },- ],- },- isBase64Encoded: false,- requestContext: { http: { method: 'POST', path: '/save-my-partner-services' } },- userWorkspaceId,- });-- expect(result).toEqual({ ok: false, reason: 'FORBIDDEN' });- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/__tests__/submit-partner-content-for-review.integration-test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/__tests__/submit-partner-content-for-review.integration-test.tsdeleted file mode 100644index 6c374fb66b7..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/__tests__/submit-partner-content-for-review.integration-test.ts+++ /dev/null@@ -1,163 +0,0 @@-// Deferred: written for the batch pass, not run as part of this task.-// resolvePartnerFromRequest only base64-decodes the bearer token (no signature-// check), so a fake unsigned JWT is enough to drive the handler against a real-// workspace member — same trick as resolve-partner-from-request.test.ts.-import { CoreApiClient } from 'twenty-client-sdk/core';-import { afterAll, beforeAll, describe, expect, it } from 'vitest';--import { handler } from 'src/modules/partner/self-service/submit-partner-content-for-review.logic-function';--const makeToken = (payload: Record<string, unknown>): string =>- `header.${Buffer.from(JSON.stringify(payload)).toString('base64url')}.sig`;--const requireId = (id: string | undefined, what: string): string => {- if (id === undefined) throw new Error(`${what} did not return an id`);- return id;-};--describe('submit-partner-content-for-review handler', () => {- let client: CoreApiClient;- let partnerId: string;- let otherPartnerId: string;- let userWorkspaceId: string;- let wipId: string;- let approvedId: string;- let otherWipId: string;- const originalToken = process.env.TWENTY_APP_ACCESS_TOKEN;-- beforeAll(async () => {- client = new CoreApiClient();-- const memberResult = await client.query({- workspaceMembers: {- __args: { filter: { userId: { is: 'NOT_NULL' } }, first: 1 },- edges: { node: { id: true, userId: true } },- },- });- const member = memberResult.workspaceMembers?.edges?.[0]?.node;- if (!member?.userId) {- throw new Error('No workspace member with a linked userId found to drive this test.');- }- userWorkspaceId = 'integration-test-workspace';- process.env.TWENTY_APP_ACCESS_TOKEN = makeToken({- userId: member.userId,- userWorkspaceId,- });-- const partnerCreated = await client.mutation({- createPartner: {- __args: {- data: { name: 'Submit-For-Review Integration Test Partner', partnerUserId: member.id },- },- id: true,- },- });- partnerId = requireId(partnerCreated.createPartner?.id, 'createPartner');-- const otherPartnerCreated = await client.mutation({- createPartner: {- __args: { data: { name: 'Other Partner (submit-for-review test)' } },- id: true,- },- });- otherPartnerId = requireId(otherPartnerCreated.createPartner?.id, 'createPartner');-- const wip = await client.mutation({- createPartnerContent: {- __args: {- data: {- partnerId,- name: 'WIP case study',- contentType: ['CASE_STUDY'],- status: 'WIP',- },- },- id: true,- },- });- wipId = requireId(wip.createPartnerContent?.id, 'createPartnerContent');-- const approved = await client.mutation({- createPartnerContent: {- __args: {- data: {- partnerId,- name: 'Already approved case study',- contentType: ['CASE_STUDY'],- status: 'APPROVED',- },- },- id: true,- },- });- approvedId = requireId(approved.createPartnerContent?.id, 'createPartnerContent');-- const otherWip = await client.mutation({- createPartnerContent: {- __args: {- data: {- partnerId: otherPartnerId,- name: 'Belongs to someone else (WIP)',- contentType: ['CASE_STUDY'],- status: 'WIP',- },- },- id: true,- },- });- otherWipId = requireId(otherWip.createPartnerContent?.id, 'createPartnerContent');- });-- afterAll(async () => {- if (originalToken === undefined) delete process.env.TWENTY_APP_ACCESS_TOKEN;- else process.env.TWENTY_APP_ACCESS_TOKEN = originalToken;-- // Guard each id: if beforeAll threw partway through, the unset ones stay undefined —- // skip them so cleanup still reaches every record that was actually created.- for (const id of [wipId, approvedId, otherWipId]) {- if (id) await client.mutation({ destroyPartnerContent: { __args: { id }, id: true } });- }- for (const id of [partnerId, otherPartnerId]) {- if (id) await client.mutation({ destroyPartner: { __args: { id }, id: true } });- }- });-- const callHandler = (recordId: string) =>- handler({- headers: {},- queryStringParameters: {},- pathParameters: {},- body: { recordId },- isBase64Encoded: false,- requestContext: {- http: { method: 'POST', path: '/submit-partner-content-for-review' },- },- userWorkspaceId,- });-- it('flips a WIP row to UNDER_CUSTOMER_PARTNER_REVIEW', async () => {- const result = await callHandler(wipId);-- expect(result).toEqual({ ok: true, status: 'UNDER_CUSTOMER_PARTNER_REVIEW' });-- const fetched = await client.query({- partnerContents: {- __args: { filter: { id: { eq: wipId } }, first: 1 },- edges: { node: { status: true } },- },- });- expect(fetched.partnerContents?.edges?.[0]?.node?.status).toBe(- 'UNDER_CUSTOMER_PARTNER_REVIEW',- );- });-- it('refuses a non-WIP row', async () => {- const result = await callHandler(approvedId);- expect(result).toEqual({ ok: false, reason: 'NOT_SUBMITTABLE' });- });-- it('refuses a row owned by another partner', async () => {- const result = await callHandler(otherWipId);- expect(result).toEqual({ ok: false, reason: 'FORBIDDEN' });- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/constants/my-case-studies.constants.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/constants/my-case-studies.constants.tsdeleted file mode 100644index 57219a70ff0..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/constants/my-case-studies.constants.ts+++ /dev/null@@ -1,5 +0,0 @@-// Plain-data ids for the My Case Studies page, mirroring my-profile.constants.ts.-export const MY_CASE_STUDIES_FRONT_COMPONENT_ID = '1e13a0e5-4dd7-44a6-aaff-081df22f322d';-export const MY_CASE_STUDIES_PAGE_LAYOUT_ID = 'f5acd909-d066-4add-9cf7-2c4eb8f1c1d0';-export const MY_CASE_STUDIES_PAGE_TAB_ID = '85c4ec5f-3c04-4e6f-a0e5-4f494f788eea';-export const MY_CASE_STUDIES_PAGE_WIDGET_ID = 'ec2af263-500e-4256-9324-951fdcad9682';diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/constants/my-profile.constants.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/constants/my-profile.constants.tsdeleted file mode 100644index 4914df3f470..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/constants/my-profile.constants.ts+++ /dev/null@@ -1,284 +0,0 @@-// Plain-data constants shared by the my-profile logic function and the-// front component — no SDK imports so both sides can consume this directly.--export const MY_PROFILE_FRONT_COMPONENT_ID = '92fdaa35-9fc7-4e2d-8db7-77d7f624cec6';-export const MY_PROFILE_PAGE_LAYOUT_ID = 'efc8a005-57db-44f3-a888-ce3a6aec526b';-export const MY_PROFILE_PAGE_TAB_ID = 'ff8185d0-cd72-477b-a1a5-77d9cfff6fef';-export const MY_PROFILE_PAGE_WIDGET_ID = 'abf2a5af-d772-44a6-895b-fd08d741978d';-export const MY_PROFILE_NAV_ITEM_ID = '6c39ddd9-d0c2-4951-8be5-d064c752d18a';--export type SelectOption = { value: string; label: string };--export type ProfileOptions = {- country: SelectOption[];- languagesSpoken: SelectOption[];- partnerScope: SelectOption[];- typeOfTeam: SelectOption[];- availability: SelectOption[];- region: SelectOption[];-};--// These mirror the option lists declared on the Partner object (partner.object.ts).-// If they ever drift, the upgrade path is to fetch field-metadata options at-// runtime instead of duplicating them here — not worth it now.-export const PROFILE_OPTIONS: ProfileOptions = {- partnerScope: [- { value: 'ADVISORY', label: 'Advisory & Discovery' },- { value: 'SOLUTIONING', label: 'Solutioning' },- { value: 'DEVELOPMENT', label: 'Custom Development' },- { value: 'HOSTING', label: 'Hosting & Infrastructure' },- { value: 'SUPPORT', label: 'Training & Adoption' },- ],- typeOfTeam: [- { value: 'SOLO', label: 'Solo' },- { value: 'AGENCY', label: 'Agency' },- ],- availability: [- { value: 'AVAILABLE', label: 'Available' },- { value: 'UNAVAILABLE', label: 'Unavailable' },- ],- region: [- { value: 'EUROPE', label: 'Europe' },- { value: 'US', label: 'US' },- { value: 'LATAM', label: 'LATAM' },- { value: 'MENA', label: 'MENA' },- { value: 'APAC', label: 'APAC' },- { value: 'AFRICA', label: 'Africa' },- ],- languagesSpoken: [- { value: 'ENGLISH', label: 'English' },- { value: 'FRENCH', label: 'French' },- { value: 'GERMAN', label: 'German' },- { value: 'CHINESE', label: 'Chinese' },- { value: 'SPANISH', label: 'Spanish' },- { value: 'ARABIC', label: 'Arabic' },- { value: 'BENGALI', label: 'Bengali' },- { value: 'CATALAN', label: 'Catalan' },- { value: 'CZECH', label: 'Czech' },- { value: 'DANISH', label: 'Danish' },- { value: 'DUTCH', label: 'Dutch' },- { value: 'FARSI', label: 'Farsi' },- { value: 'FINNISH', label: 'Finnish' },- { value: 'GREEK', label: 'Greek' },- { value: 'HINDI', label: 'Hindi' },- { value: 'INDONESIAN', label: 'Indonesian' },- { value: 'ITALIAN', label: 'Italian' },- { value: 'JAPANESE', label: 'Japanese' },- { value: 'KOREAN', label: 'Korean' },- { value: 'MALAY', label: 'Malay' },- { value: 'NORWEGIAN', label: 'Norwegian' },- { value: 'POLISH', label: 'Polish' },- { value: 'PORTUGUESE', label: 'Portuguese' },- { value: 'PUNJABI', label: 'Punjabi' },- { value: 'ROMANIAN', label: 'Romanian' },- { value: 'RUSSIAN', label: 'Russian' },- { value: 'SWAHILI', label: 'Swahili' },- { value: 'SWEDISH', label: 'Swedish' },- { value: 'TAGALOG', label: 'Tagalog' },- { value: 'TAMIL', label: 'Tamil' },- { value: 'THAI', label: 'Thai' },- { value: 'TURKISH', label: 'Turkish' },- { value: 'UKRAINIAN', label: 'Ukrainian' },- { value: 'URDU', label: 'Urdu' },- { value: 'VIETNAMESE', label: 'Vietnamese' },- ],- country: [- { value: 'AFGHANISTAN', label: 'Afghanistan 🇦🇫' },- { value: 'ALBANIA', label: 'Albania 🇦🇱' },- { value: 'ALGERIA', label: 'Algeria 🇩🇿' },- { value: 'ANDORRA', label: 'Andorra 🇦🇩' },- { value: 'ANGOLA', label: 'Angola 🇦🇴' },- { value: 'ANTIGUA_AND_BARBUDA', label: 'Antigua & Barbuda 🇦🇬' },- { value: 'ARGENTINA', label: 'Argentina 🇦🇷' },- { value: 'ARMENIA', label: 'Armenia 🇦🇲' },- { value: 'AUSTRALIA', label: 'Australia 🇦🇺' },- { value: 'AUSTRIA', label: 'Austria 🇦🇹' },- { value: 'AZERBAIJAN', label: 'Azerbaijan 🇦🇿' },- { value: 'BAHAMAS', label: 'Bahamas 🇧🇸' },- { value: 'BAHRAIN', label: 'Bahrain 🇧🇭' },- { value: 'BANGLADESH', label: 'Bangladesh 🇧🇩' },- { value: 'BARBADOS', label: 'Barbados 🇧🇧' },- { value: 'BELARUS', label: 'Belarus 🇧🇾' },- { value: 'BELGIUM', label: 'Belgium 🇧🇪' },- { value: 'BELIZE', label: 'Belize 🇧🇿' },- { value: 'BENIN', label: 'Benin 🇧🇯' },- { value: 'BHUTAN', label: 'Bhutan 🇧🇹' },- { value: 'BOLIVIA', label: 'Bolivia 🇧🇴' },- { value: 'BOSNIA_AND_HERZEGOVINA', label: 'Bosnia & Herzegovina 🇧🇦' },- { value: 'BOTSWANA', label: 'Botswana 🇧🇼' },- { value: 'BRAZIL', label: 'Brazil 🇧🇷' },- { value: 'BRUNEI', label: 'Brunei 🇧🇳' },- { value: 'BULGARIA', label: 'Bulgaria 🇧🇬' },- { value: 'BURKINA_FASO', label: 'Burkina Faso 🇧🇫' },- { value: 'BURUNDI', label: 'Burundi 🇧🇮' },- { value: 'CAMBODIA', label: 'Cambodia 🇰🇭' },- { value: 'CAMEROON', label: 'Cameroon 🇨🇲' },- { value: 'CANADA', label: 'Canada 🇨🇦' },- { value: 'CAPE_VERDE', label: 'Cape Verde 🇨🇻' },- { value: 'CENTRAL_AFRICAN_REPUBLIC', label: 'Central African Republic 🇨🇫' },- { value: 'CHAD', label: 'Chad 🇹🇩' },- { value: 'CHILE', label: 'Chile 🇨🇱' },- { value: 'CHINA', label: 'China 🇨🇳' },- { value: 'COLOMBIA', label: 'Colombia 🇨🇴' },- { value: 'COMOROS', label: 'Comoros 🇰🇲' },- { value: 'CONGO', label: 'Congo 🇨🇬' },- { value: 'DR_CONGO', label: 'DR Congo 🇨🇩' },- { value: 'COSTA_RICA', label: 'Costa Rica 🇨🇷' },- { value: 'CROATIA', label: 'Croatia 🇭🇷' },- { value: 'CUBA', label: 'Cuba 🇨🇺' },- { value: 'CYPRUS', label: 'Cyprus 🇨🇾' },- { value: 'CZECH_REPUBLIC', label: 'Czech Republic 🇨🇿' },- { value: 'DENMARK', label: 'Denmark 🇩🇰' },- { value: 'DJIBOUTI', label: 'Djibouti 🇩🇯' },- { value: 'DOMINICA', label: 'Dominica 🇩🇲' },- { value: 'DOMINICAN_REPUBLIC', label: 'Dominican Republic 🇩🇴' },- { value: 'ECUADOR', label: 'Ecuador 🇪🇨' },- { value: 'EGYPT', label: 'Egypt 🇪🇬' },- { value: 'EL_SALVADOR', label: 'El Salvador 🇸🇻' },- { value: 'EQUATORIAL_GUINEA', label: 'Equatorial Guinea 🇬🇶' },- { value: 'ERITREA', label: 'Eritrea 🇪🇷' },- { value: 'ESTONIA', label: 'Estonia 🇪🇪' },- { value: 'ESWATINI', label: 'Eswatini 🇸🇿' },- { value: 'ETHIOPIA', label: 'Ethiopia 🇪🇹' },- { value: 'FIJI', label: 'Fiji 🇫🇯' },- { value: 'FINLAND', label: 'Finland 🇫🇮' },- { value: 'FRANCE', label: 'France 🇫🇷' },- { value: 'GABON', label: 'Gabon 🇬🇦' },- { value: 'GAMBIA', label: 'Gambia 🇬🇲' },- { value: 'GEORGIA', label: 'Georgia 🇬🇪' },- { value: 'GERMANY', label: 'Germany 🇩🇪' },- { value: 'GHANA', label: 'Ghana 🇬🇭' },- { value: 'GREECE', label: 'Greece 🇬🇷' },- { value: 'GRENADA', label: 'Grenada 🇬🇩' },- { value: 'GUATEMALA', label: 'Guatemala 🇬🇹' },- { value: 'GUINEA', label: 'Guinea 🇬🇳' },- { value: 'GUINEA_BISSAU', label: 'Guinea-Bissau 🇬🇼' },- { value: 'GUYANA', label: 'Guyana 🇬🇾' },- { value: 'HAITI', label: 'Haiti 🇭🇹' },- { value: 'HONDURAS', label: 'Honduras 🇭🇳' },- { value: 'HUNGARY', label: 'Hungary 🇭🇺' },- { value: 'ICELAND', label: 'Iceland 🇮🇸' },- { value: 'INDIA', label: 'India 🇮🇳' },- { value: 'INDONESIA', label: 'Indonesia 🇮🇩' },- { value: 'IRAN', label: 'Iran 🇮🇷' },- { value: 'IRAQ', label: 'Iraq 🇮🇶' },- { value: 'IRELAND', label: 'Ireland 🇮🇪' },- { value: 'ISRAEL', label: 'Israel 🇮🇱' },- { value: 'ITALY', label: 'Italy 🇮🇹' },- { value: 'IVORY_COAST', label: 'Ivory Coast 🇨🇮' },- { value: 'JAMAICA', label: 'Jamaica 🇯🇲' },- { value: 'JAPAN', label: 'Japan 🇯🇵' },- { value: 'JORDAN', label: 'Jordan 🇯🇴' },- { value: 'KAZAKHSTAN', label: 'Kazakhstan 🇰🇿' },- { value: 'KENYA', label: 'Kenya 🇰🇪' },- { value: 'KIRIBATI', label: 'Kiribati 🇰🇮' },- { value: 'KOSOVO', label: 'Kosovo 🇽🇰' },- { value: 'KUWAIT', label: 'Kuwait 🇰🇼' },- { value: 'KYRGYZSTAN', label: 'Kyrgyzstan 🇰🇬' },- { value: 'LAOS', label: 'Laos 🇱🇦' },- { value: 'LATVIA', label: 'Latvia 🇱🇻' },- { value: 'LEBANON', label: 'Lebanon 🇱🇧' },- { value: 'LESOTHO', label: 'Lesotho 🇱🇸' },- { value: 'LIBERIA', label: 'Liberia 🇱🇷' },- { value: 'LIBYA', label: 'Libya 🇱🇾' },- { value: 'LIECHTENSTEIN', label: 'Liechtenstein 🇱🇮' },- { value: 'LITHUANIA', label: 'Lithuania 🇱🇹' },- { value: 'LUXEMBOURG', label: 'Luxembourg 🇱🇺' },- { value: 'MADAGASCAR', label: 'Madagascar 🇲🇬' },- { value: 'MALAWI', label: 'Malawi 🇲🇼' },- { value: 'MALAYSIA', label: 'Malaysia 🇲🇾' },- { value: 'MALDIVES', label: 'Maldives 🇲🇻' },- { value: 'MALI', label: 'Mali 🇲🇱' },- { value: 'MALTA', label: 'Malta 🇲🇹' },- { value: 'MARSHALL_ISLANDS', label: 'Marshall Islands 🇲🇭' },- { value: 'MAURITANIA', label: 'Mauritania 🇲🇷' },- { value: 'MAURITIUS', label: 'Mauritius 🇲🇺' },- { value: 'MEXICO', label: 'Mexico 🇲🇽' },- { value: 'MICRONESIA', label: 'Micronesia 🇫🇲' },- { value: 'MOLDOVA', label: 'Moldova 🇲🇩' },- { value: 'MONACO', label: 'Monaco 🇲🇨' },- { value: 'MONGOLIA', label: 'Mongolia 🇲🇳' },- { value: 'MONTENEGRO', label: 'Montenegro 🇲🇪' },- { value: 'MOROCCO', label: 'Morocco 🇲🇦' },- { value: 'MOZAMBIQUE', label: 'Mozambique 🇲🇿' },- { value: 'MYANMAR', label: 'Myanmar 🇲🇲' },- { value: 'NAMIBIA', label: 'Namibia 🇳🇦' },- { value: 'NAURU', label: 'Nauru 🇳🇷' },- { value: 'NEPAL', label: 'Nepal 🇳🇵' },- { value: 'NETHERLANDS', label: 'Netherlands 🇳🇱' },- { value: 'NEW_ZEALAND', label: 'New Zealand 🇳🇿' },- { value: 'NICARAGUA', label: 'Nicaragua 🇳🇮' },- { value: 'NIGER', label: 'Niger 🇳🇪' },- { value: 'NIGERIA', label: 'Nigeria 🇳🇬' },- { value: 'NORTH_KOREA', label: 'North Korea 🇰🇵' },- { value: 'NORTH_MACEDONIA', label: 'North Macedonia 🇲🇰' },- { value: 'NORWAY', label: 'Norway 🇳🇴' },- { value: 'OMAN', label: 'Oman 🇴🇲' },- { value: 'PAKISTAN', label: 'Pakistan 🇵🇰' },- { value: 'PALAU', label: 'Palau 🇵🇼' },- { value: 'PALESTINE', label: 'Palestine 🇵🇸' },- { value: 'PANAMA', label: 'Panama 🇵🇦' },- { value: 'PAPUA_NEW_GUINEA', label: 'Papua New Guinea 🇵🇬' },- { value: 'PARAGUAY', label: 'Paraguay 🇵🇾' },- { value: 'PERU', label: 'Peru 🇵🇪' },- { value: 'PHILIPPINES', label: 'Philippines 🇵🇭' },- { value: 'POLAND', label: 'Poland 🇵🇱' },- { value: 'PORTUGAL', label: 'Portugal 🇵🇹' },- { value: 'QATAR', label: 'Qatar 🇶🇦' },- { value: 'ROMANIA', label: 'Romania 🇷🇴' },- { value: 'RUSSIA', label: 'Russia 🇷🇺' },- { value: 'RWANDA', label: 'Rwanda 🇷🇼' },- { value: 'SAINT_KITTS_AND_NEVIS', label: 'Saint Kitts & Nevis 🇰🇳' },- { value: 'SAINT_LUCIA', label: 'Saint Lucia 🇱🇨' },- { value: 'SAINT_VINCENT', label: 'Saint Vincent 🇻🇨' },- { value: 'SAMOA', label: 'Samoa 🇼🇸' },- { value: 'SAN_MARINO', label: 'San Marino 🇸🇲' },- { value: 'SAO_TOME_AND_PRINCIPE', label: 'São Tomé & Príncipe 🇸🇹' },- { value: 'SAUDI_ARABIA', label: 'Saudi Arabia 🇸🇦' },- { value: 'SENEGAL', label: 'Senegal 🇸🇳' },- { value: 'SERBIA', label: 'Serbia 🇷🇸' },- { value: 'SEYCHELLES', label: 'Seychelles 🇸🇨' },- { value: 'SIERRA_LEONE', label: 'Sierra Leone 🇸🇱' },- { value: 'SINGAPORE', label: 'Singapore 🇸🇬' },- { value: 'SLOVAKIA', label: 'Slovakia 🇸🇰' },- { value: 'SLOVENIA', label: 'Slovenia 🇸🇮' },- { value: 'SOLOMON_ISLANDS', label: 'Solomon Islands 🇸🇧' },- { value: 'SOMALIA', label: 'Somalia 🇸🇴' },- { value: 'SOUTH_AFRICA', label: 'South Africa 🇿🇦' },- { value: 'SOUTH_KOREA', label: 'South Korea 🇰🇷' },- { value: 'SOUTH_SUDAN', label: 'South Sudan 🇸🇸' },- { value: 'SPAIN', label: 'Spain 🇪🇸' },- { value: 'SRI_LANKA', label: 'Sri Lanka 🇱🇰' },- { value: 'SUDAN', label: 'Sudan 🇸🇩' },- { value: 'SURINAME', label: 'Suriname 🇸🇷' },- { value: 'SWEDEN', label: 'Sweden 🇸🇪' },- { value: 'SWITZERLAND', label: 'Switzerland 🇨🇭' },- { value: 'SYRIA', label: 'Syria 🇸🇾' },- { value: 'TAIWAN', label: 'Taiwan 🇹🇼' },- { value: 'TAJIKISTAN', label: 'Tajikistan 🇹🇯' },- { value: 'TANZANIA', label: 'Tanzania 🇹🇿' },- { value: 'THAILAND', label: 'Thailand 🇹🇭' },- { value: 'TIMOR_LESTE', label: 'Timor-Leste 🇹🇱' },- { value: 'TOGO', label: 'Togo 🇹🇬' },- { value: 'TONGA', label: 'Tonga 🇹🇴' },- { value: 'TRINIDAD_AND_TOBAGO', label: 'Trinidad & Tobago 🇹🇹' },- { value: 'TUNISIA', label: 'Tunisia 🇹🇳' },- { value: 'TURKEY', label: 'Turkey 🇹🇷' },- { value: 'TURKMENISTAN', label: 'Turkmenistan 🇹🇲' },- { value: 'TUVALU', label: 'Tuvalu 🇹🇻' },- { value: 'UGANDA', label: 'Uganda 🇺🇬' },- { value: 'UKRAINE', label: 'Ukraine 🇺🇦' },- { value: 'UNITED_ARAB_EMIRATES', label: 'UAE 🇦🇪' },- { value: 'UNITED_KINGDOM', label: 'UK 🇬🇧' },- { value: 'UNITED_STATES', label: 'USA 🇺🇸' },- { value: 'URUGUAY', label: 'Uruguay 🇺🇾' },- { value: 'UZBEKISTAN', label: 'Uzbekistan 🇺🇿' },- { value: 'VANUATU', label: 'Vanuatu 🇻🇺' },- { value: 'VATICAN', label: 'Vatican 🇻🇦' },- { value: 'VENEZUELA', label: 'Venezuela 🇻🇪' },- { value: 'VIETNAM', label: 'Vietnam 🇻🇳' },- { value: 'YEMEN', label: 'Yemen 🇾🇪' },- { value: 'ZAMBIA', label: 'Zambia 🇿🇲' },- { value: 'ZIMBABWE', label: 'Zimbabwe 🇿🇼' },- ],-};diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-case-studies.front-component.tsx b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-case-studies.front-component.tsxdeleted file mode 100644index 91a29f93a17..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-case-studies.front-component.tsx+++ /dev/null@@ -1,260 +0,0 @@-import { type CSSProperties, useCallback, useEffect, useState } from 'react';-import { defineFrontComponent } from 'twenty-sdk/define';-import { enqueueSnackbar, openCommandConfirmationModal } from 'twenty-sdk/front-component';--import { MY_CASE_STUDIES_FRONT_COMPONENT_ID } from 'src/modules/partner/self-service/constants/my-case-studies.constants';-import { callAppRoute } from 'src/modules/shared/front-components/call-app-route';--import { CaseStudyCard } from './my-case-studies/case-study-card';-import {- buildInitialRows,- newDraftRow,- toSaveBody,- type CaseStudyRow,-} from './my-case-studies/case-study-rows';-import { COLORS, FONT } from 'src/modules/shared/front-components/palette';-import type { MyProfilePayload, SaveContentResult } from './my-profile/types';--type LoadResult = { ok: true; profile: MyProfilePayload } | { ok: false; reason: string };--const pageStyle: CSSProperties = {- fontFamily: FONT,- color: COLORS.fg,- maxWidth: '100%',- padding: '24px 28px',- display: 'flex',- flexDirection: 'column',- gap: 16,-};-const headerStyle: CSSProperties = {- display: 'flex',- alignItems: 'flex-start',- justifyContent: 'space-between',- gap: 12,-};-const titleStyle: CSSProperties = { fontSize: 20, fontWeight: 700, margin: 0 };-const subtitleStyle: CSSProperties = { fontSize: 13, color: COLORS.muted, marginTop: 4 };-const addButtonStyle: CSSProperties = {- height: 34,- padding: '0 16px',- borderRadius: 6,- border: 'none',- background: COLORS.accent,- color: '#fff',- fontSize: 13,- fontWeight: 600,- fontFamily: FONT,- cursor: 'pointer',- whiteSpace: 'nowrap',-};-const emptyStyle: CSSProperties = {- border: `1px solid ${COLORS.border}`,- borderRadius: 8,- background: COLORS.surfaceAlt,- padding: 28,- textAlign: 'center',- color: COLORS.muted,- fontSize: 14,-};-const skeletonStyle: CSSProperties = {- height: 56,- border: `1px solid ${COLORS.border}`,- borderRadius: 8,- background: COLORS.surfaceAlt,- marginBottom: 12,-};-const errorStyle: CSSProperties = {- border: `1px solid ${COLORS.border}`,- borderRadius: 8,- background: COLORS.surfaceAlt,- padding: 28,- textAlign: 'center',- color: COLORS.muted,- fontSize: 14,- display: 'flex',- flexDirection: 'column',- alignItems: 'center',- gap: 12,-};-const retryButtonStyle: CSSProperties = {- height: 32,- padding: '0 16px',- borderRadius: 6,- border: `1px solid ${COLORS.border}`,- background: COLORS.surface,- color: COLORS.fg,- fontSize: 13,- fontFamily: FONT,- cursor: 'pointer',-};--const MyCaseStudies = () => {- const [rows, setRows] = useState<CaseStudyRow[]>([]);- const [loading, setLoading] = useState(true);- const [expandedKey, setExpandedKey] = useState<string | null>(null);- const [busyKey, setBusyKey] = useState<string | null>(null);- const [loadFailed, setLoadFailed] = useState(false);-- const load = useCallback(async () => {- setLoading(true);- try {- const res = (await callAppRoute('/my-partner-profile', {})) as LoadResult;- if (res.ok) {- setRows(buildInitialRows(res.profile.caseStudies));- setLoadFailed(false);- } else {- setLoadFailed(true);- await enqueueSnackbar({ message: `Could not load case studies: ${res.reason}`, variant: 'error' });- }- } catch (error) {- setLoadFailed(true);- await enqueueSnackbar({- message: error instanceof Error ? error.message : 'Failed to load case studies',- variant: 'error',- });- } finally {- setLoading(false);- }- }, []);-- useEffect(() => {- void load();- }, [load]);-- const patchRow = (key: string, patch: Partial<CaseStudyRow>) =>- setRows((prev) => prev.map((r) => (r.key === key ? { ...r, ...patch } : r)));-- const handleAdd = () => {- const draft = newDraftRow();- setRows((prev) => [...prev, draft]);- setExpandedKey(draft.key);- };-- // The reconcile route takes the whole desired list, so a save persists every card's current- // values; in the accordion you edit one at a time, so this reads as "save this card".- const persist = useCallback(- async (nextRows: CaseStudyRow[], successMessage: string): Promise<boolean> => {- const res = (await callAppRoute('/save-my-partner-content', toSaveBody(nextRows))) as SaveContentResult;- if (res.ok) {- setRows(buildInitialRows(res.caseStudies));- await enqueueSnackbar({ message: successMessage, variant: 'success' });- return true;- }- await enqueueSnackbar({ message: res.reason, variant: 'error' });- return false;- },- [],- );-- const handleSave = async (key: string) => {- if (loadFailed) return;- setBusyKey(key);- try {- // Collapse only on success so a rejected save keeps the card open to retry.- if (await persist(rows, 'Case study saved')) setExpandedKey(null);- } catch (error) {- await enqueueSnackbar({- message: error instanceof Error ? error.message : 'Failed to save case study',- variant: 'error',- });- } finally {- setBusyKey(null);- }- };-- const handleDelete = async (key: string) => {- if (loadFailed) return;- const target = rows.find((r) => r.key === key);- if (!target) return;-- const confirmed = await openCommandConfirmationModal({- title: 'Delete this case study?',- subtitle: 'It will be removed from your public profile. This cannot be undone.',- confirmButtonText: 'Delete',- confirmButtonAccent: 'danger',- });- if (confirmed !== 'confirm') return;-- const remaining = rows.filter((r) => r.key !== key);- // A never-saved draft: drop it locally, no server round-trip.- if (!target.id) {- setRows(remaining);- return;- }- setBusyKey(key);- try {- await persist(remaining, 'Case study deleted');- } catch (error) {- await enqueueSnackbar({- message: error instanceof Error ? error.message : 'Failed to delete case study',- variant: 'error',- });- } finally {- setBusyKey(null);- }- };-- return (- <div style={pageStyle}>- <div style={headerStyle}>- <div>- <h1 style={titleStyle}>My Case Studies</h1>- <div style={subtitleStyle}>Showcase your work on your public partner profile.</div>- </div>- <button- type="button"- style={addButtonStyle}- onClick={handleAdd}- disabled={loading || loadFailed || busyKey !== null}- >- + Add case study- </button>- </div>-- {loading ? (- <div>- <div style={skeletonStyle} />- <div style={skeletonStyle} />- </div>- ) : loadFailed ? (- <div style={errorStyle}>- <div>We couldn't load your case studies. Please try again.</div>- <button type="button" style={retryButtonStyle} onClick={() => void load()}>- Retry- </button>- </div>- ) : rows.length === 0 ? (- <div style={emptyStyle}>- No case studies yet. Add one to show clients the work you have delivered.- </div>- ) : (- <div>- {rows.map((row) => (- <CaseStudyCard- key={row.key}- row={row}- expanded={expandedKey === row.key}- busy={busyKey === row.key}- onToggleExpand={() => {- // A save/delete persists the whole list, so block switching cards mid-flight- // to avoid clobbering another card's in-progress edits.- if (busyKey !== null) return;- setExpandedKey((cur) => (cur === row.key ? null : row.key));- }}- onChange={(patch) => patchRow(row.key, patch)}- onSave={() => void handleSave(row.key)}- onDelete={() => void handleDelete(row.key)}- />- ))}- </div>- )}- </div>- );-};--export default defineFrontComponent({- universalIdentifier: MY_CASE_STUDIES_FRONT_COMPONENT_ID,- name: 'My Case Studies',- description: 'Self-service page for a partner to create and edit their case studies.',- component: MyCaseStudies,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-case-studies/case-study-card.tsx b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-case-studies/case-study-card.tsxdeleted file mode 100644index 1100ec26f7a..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-case-studies/case-study-card.tsx+++ /dev/null@@ -1,202 +0,0 @@-import { type CSSProperties } from 'react';--import { COLORS, FONT } from 'src/modules/shared/front-components/palette';--import { Field, TextInput, UrlInput } from '../my-profile/form-fields';-import { MarkdownEditor } from '../my-profile/markdown-editor';-import { type CaseStudyRow } from './case-study-rows';--type CaseStudyCardProps = {- row: CaseStudyRow;- expanded: boolean;- busy: boolean;- onToggleExpand: () => void;- onChange: (patch: Partial<CaseStudyRow>) => void;- onSave: () => void;- onDelete: () => void;-};--const cardStyle: CSSProperties = {- border: `1px solid ${COLORS.border}`,- borderRadius: 8,- background: COLORS.surface,- marginBottom: 12,- fontFamily: FONT,-};-const summaryStyle: CSSProperties = {- display: 'flex',- alignItems: 'center',- justifyContent: 'space-between',- gap: 12,- padding: '12px 14px',- cursor: 'pointer',-};-const titleStyle: CSSProperties = { fontSize: 14, fontWeight: 600, color: COLORS.fg };-const clientStyle: CSSProperties = {- fontSize: 11,- letterSpacing: 0.4,- textTransform: 'uppercase',- color: COLORS.muted,- marginTop: 2,-};-const chipBase: CSSProperties = {- fontSize: 11,- fontWeight: 600,- padding: '2px 8px',- borderRadius: 999,-};-const chipPublished: CSSProperties = { ...chipBase, background: COLORS.accent, color: '#fff' };-const chipDraft: CSSProperties = {- ...chipBase,- background: COLORS.surfaceAlt,- color: COLORS.muted,- border: `1px solid ${COLORS.border}`,-};-const caretStyle: CSSProperties = { color: COLORS.muted, fontSize: 12 };-const bodyStyle: CSSProperties = {- display: 'flex',- flexDirection: 'column',- gap: 14,- padding: '4px 14px 16px',- borderTop: `1px solid ${COLORS.border}`,-};-const actionsStyle: CSSProperties = {- display: 'flex',- alignItems: 'center',- justifyContent: 'space-between',- gap: 8,- flexWrap: 'wrap',-};-const toggleBase: CSSProperties = {- height: 30,- padding: '0 12px',- borderRadius: 6,- fontSize: 13,- fontFamily: FONT,- cursor: 'pointer',-};-const togglePublished: CSSProperties = {- ...toggleBase,- border: `1px solid ${COLORS.accent}`,- background: COLORS.accentSoft,- color: COLORS.accent,-};-const toggleDraft: CSSProperties = {- ...toggleBase,- border: `1px solid ${COLORS.border}`,- background: COLORS.surface,- color: COLORS.muted,-};-const saveButton: CSSProperties = {- height: 30,- padding: '0 16px',- borderRadius: 6,- border: 'none',- background: COLORS.accent,- color: '#fff',- fontSize: 13,- fontWeight: 600,- fontFamily: FONT,- cursor: 'pointer',-};-const deleteButton: CSSProperties = {- height: 30,- padding: '0 12px',- borderRadius: 6,- border: `1px solid ${COLORS.border}`,- background: COLORS.surface,- color: '#b3261e',- fontSize: 13,- fontFamily: FONT,- cursor: 'pointer',-};--export const CaseStudyCard = ({- row,- expanded,- busy,- onToggleExpand,- onChange,- onSave,- onDelete,-}: CaseStudyCardProps) => (- <div style={cardStyle}>- <div- style={summaryStyle}- onClick={onToggleExpand}- role="button"- tabIndex={0}- aria-expanded={expanded}- onKeyDown={(event) => {- if (event.key === 'Enter' || event.key === ' ') {- event.preventDefault();- onToggleExpand();- }- }}- >- <div style={{ minWidth: 0 }}>- <div style={titleStyle}>{row.headline.trim() !== '' ? row.headline : 'Untitled case study'}</div>- {row.clientName.trim() !== '' ? <div style={clientStyle}>{row.clientName}</div> : null}- </div>- <div style={{ display: 'flex', alignItems: 'center', gap: 10 }}>- <span style={row.published ? chipPublished : chipDraft}>{row.published ? 'Published' : 'Draft'}</span>- <span style={caretStyle}>{expanded ? '▾' : '▸'}</span>- </div>- </div>-- {expanded ? (- <div style={bodyStyle}>- <Field label="Client">- <TextInput value={row.clientName} onChange={(v) => onChange({ clientName: v })} placeholder="Client name" />- </Field>- <Field label="Title">- <TextInput value={row.headline} onChange={(v) => onChange({ headline: v })} placeholder="What you delivered" />- </Field>- <Field label="Story">- <MarkdownEditor value={row.bodyMarkdown} onChange={(v) => onChange({ bodyMarkdown: v })} placeholder="Tell the story of this project…" ariaLabel="Case study story" />- </Field>- <Field label="Case study link">- <UrlInput value={row.caseStudyLink} onChange={(v) => onChange({ caseStudyLink: v })} placeholder="https://…" />- </Field>- <Field label="Cover image URL">- <UrlInput- value={row.coverImageUrl}- onChange={(v) => onChange({ coverImageUrl: v })}- placeholder="https://…"- />- </Field>- {row.coverImageUrl.trim() !== '' ? (- <img- src={row.coverImageUrl}- alt="Cover preview"- style={{- maxWidth: '100%',- maxHeight: 160,- objectFit: 'cover',- borderRadius: 6,- border: `1px solid ${COLORS.border}`,- }}- />- ) : null}-- <div style={actionsStyle}>- <button- type="button"- style={row.published ? togglePublished : toggleDraft}- onClick={() => onChange({ published: !row.published })}- >- {row.published ? 'Published on your profile' : 'Draft (hidden from profile)'}- </button>- <div style={{ display: 'flex', gap: 8 }}>- <button type="button" style={deleteButton} onClick={onDelete} disabled={busy}>- Delete- </button>- <button type="button" style={saveButton} onClick={onSave} disabled={busy}>- {busy ? 'Saving…' : 'Save'}- </button>- </div>- </div>- </div>- ) : null}- </div>-);diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-case-studies/case-study-rows.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-case-studies/case-study-rows.test.tsdeleted file mode 100644index b259da7c39e..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-case-studies/case-study-rows.test.ts+++ /dev/null@@ -1,85 +0,0 @@-import { describe, expect, it } from 'vitest';--import {- buildInitialRows,- deriveName,- derivePublished,- isBlankDraft,- newDraftRow,- toSaveBody,- type CaseStudyRow,-} from './case-study-rows';--const persisted = (over: Partial<CaseStudyRow> = {}): CaseStudyRow => ({- key: 'r1',- id: 'r1',- clientName: 'Acme',- headline: 'Migration',- bodyMarkdown: '## Hi',- coverImageUrl: '',- caseStudyLink: 'https://x.io',- published: true,- ...over,-});--describe('case-study-rows', () => {- it('derives published from APPROVED status only', () => {- expect(derivePublished('APPROVED')).toBe(true);- expect(derivePublished('WIP')).toBe(false);- expect(derivePublished(null)).toBe(false);- });-- it('builds initial rows from the load payload (key = id, published from status)', () => {- const rows = buildInitialRows([- { id: 'a', name: 'n', clientName: 'C', headline: 'H', bodyMarkdown: 'B', coverImageUrl: null, caseStudyLink: 'https://y', status: 'APPROVED' },- { id: 'b', name: null, clientName: null, headline: null, bodyMarkdown: null, coverImageUrl: null, caseStudyLink: null, status: 'WIP' },- ]);- expect(rows[0]).toMatchObject({ key: 'a', id: 'a', clientName: 'C', headline: 'H', bodyMarkdown: 'B', caseStudyLink: 'https://y', published: true });- expect(rows[1]).toMatchObject({ key: 'b', id: 'b', clientName: '', headline: '', bodyMarkdown: '', caseStudyLink: '', published: false });- });-- it('new draft rows have a unique key, no id, and default to draft', () => {- const a = newDraftRow();- const b = newDraftRow();- expect(a.id).toBeUndefined();- expect(a.published).toBe(false);- expect(a.key).not.toBe(b.key);- });-- it('derives name from headline, falling back when empty', () => {- expect(deriveName(persisted({ headline: ' Rebuild ' }))).toBe('Rebuild');- expect(deriveName(persisted({ headline: ' ' }))).toBe('Case study');- });-- it('treats an untouched new draft as blank, but not a filled or persisted row', () => {- expect(isBlankDraft(newDraftRow())).toBe(true);- expect(isBlankDraft(newDraftRow())).toBe(true);- expect(isBlankDraft(persisted({ id: undefined, key: 'draft-x', headline: 'x' }))).toBe(false);- expect(isBlankDraft(persisted())).toBe(false);- });-- it('builds the save body: drops blank drafts, keeps id for persisted, carries published + derived name', () => {- const rows = [persisted(), newDraftRow(), { ...newDraftRow(), headline: 'Fresh', published: true }];- const body = toSaveBody(rows) as { caseStudies: Array<Record<string, unknown>> };- expect(body.caseStudies).toHaveLength(2);- expect(body.caseStudies[0]).toMatchObject({ id: 'r1', name: 'Migration', clientName: 'Acme', bodyMarkdown: '## Hi', caseStudyLink: 'https://x.io', published: true });- expect(body.caseStudies[1]).toMatchObject({ name: 'Fresh', published: true });- expect(body.caseStudies[1].id).toBeUndefined();- });-- it('carries coverImageUrl into the save body and reads it from the load payload', () => {- const rows = buildInitialRows([- { id: 'a', name: 'n', clientName: 'C', headline: 'H', bodyMarkdown: 'B', coverImageUrl: 'https://img.example.com/a.png', caseStudyLink: 'https://y', status: 'APPROVED' },- ]);- expect(rows[0].coverImageUrl).toBe('https://img.example.com/a.png');-- const body = toSaveBody([persisted({ coverImageUrl: 'https://img.example.com/c.png' })]) as {- caseStudies: Array<Record<string, unknown>>;- };- expect(body.caseStudies[0].coverImageUrl).toBe('https://img.example.com/c.png');- });-- it('a new draft with only a cover URL set is not treated as blank', () => {- expect(isBlankDraft({ ...newDraftRow(), coverImageUrl: 'https://img.example.com/x.png' })).toBe(false);- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-case-studies/case-study-rows.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-case-studies/case-study-rows.tsdeleted file mode 100644index 683b96d36c5..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-case-studies/case-study-rows.ts+++ /dev/null@@ -1,68 +0,0 @@-import type { MyProfilePayload } from '../my-profile/types';--export type CaseStudyRow = {- key: string; // stable React key: the record id for saved rows, `draft-N` for new ones- id?: string; // present once persisted- clientName: string;- headline: string;- bodyMarkdown: string;- caseStudyLink: string;- coverImageUrl: string;- published: boolean;-};--export const derivePublished = (status: string | null): boolean => status === 'APPROVED';--export const buildInitialRows = (- caseStudies: MyProfilePayload['caseStudies'],-): CaseStudyRow[] =>- caseStudies.map((cs) => ({- key: cs.id,- id: cs.id,- clientName: cs.clientName ?? '',- headline: cs.headline ?? '',- bodyMarkdown: cs.bodyMarkdown ?? '',- caseStudyLink: cs.caseStudyLink ?? '',- coverImageUrl: cs.coverImageUrl ?? '',- published: derivePublished(cs.status),- }));--let draftCounter = 0;-export const newDraftRow = (): CaseStudyRow => ({- key: `draft-${(draftCounter += 1)}`,- clientName: '',- headline: '',- bodyMarkdown: '',- caseStudyLink: '',- coverImageUrl: '',- published: false,-});--// The internal `name` column is required server-side but never shown to partners; derive it.-export const deriveName = (row: CaseStudyRow): string =>- row.headline.trim() !== '' ? row.headline.trim() : 'Case study';--export const isBlankDraft = (row: CaseStudyRow): boolean =>- row.id === undefined &&- row.headline.trim() === '' &&- row.bodyMarkdown.trim() === '' &&- row.clientName.trim() === '' &&- row.caseStudyLink.trim() === '' &&- row.coverImageUrl.trim() === '';--// The reconcile route needs the whole desired list; blank never-saved drafts are excluded-// so an untouched "Add" doesn't create an empty record.-export const toSaveBody = (rows: CaseStudyRow[]): Record<string, unknown> => ({- caseStudies: rows- .filter((row) => !isBlankDraft(row))- .map((row) => ({- ...(row.id ? { id: row.id } : {}),- name: deriveName(row),- clientName: row.clientName,- headline: row.headline,- bodyMarkdown: row.bodyMarkdown,- caseStudyLink: row.caseStudyLink,- coverImageUrl: row.coverImageUrl,- published: row.published,- })),-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-profile.front-component.tsx b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-profile.front-component.tsxdeleted file mode 100644index 57b7c383e02..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-profile.front-component.tsx+++ /dev/null@@ -1,325 +0,0 @@-import { useCallback, useEffect, useState, type ReactNode } from 'react';-import { defineFrontComponent } from 'twenty-sdk/define';-import { enqueueSnackbar } from 'twenty-sdk/front-component';--import { MY_PROFILE_FRONT_COMPONENT_ID } from 'src/modules/partner/self-service/constants/my-profile.constants';-import { callAppRoute } from 'src/modules/shared/front-components/call-app-route';-import { COLORS, FONT } from 'src/modules/shared/front-components/palette';--import { MarkdownEditor } from './my-profile/markdown-editor';-import { ProfilePictureUpload } from './my-profile/profile-picture-upload';-import {- ChipMultiSelect,- CurrencyInput,- Field,- SelectInput,- TagInput,- TextInput,- UrlInput,-} from './my-profile/form-fields';-import { toProfileForm, toSaveBody, type ProfileForm } from './my-profile/profile-form';-import type {- MyPartnerProfileResult,- ProfileOptions,- SaveResult,-} from './my-profile/types';--const SKILL_SUGGESTIONS = [- 'Migrations',- 'RevOps',- 'Reporting',- 'Forecasting',- 'Automations',- 'No-code ops',- 'API & SDK',- 'API integrations',- 'Self-hosted',- 'EU compliance',- 'Data import',- 'Onboarding',- 'Training',- 'Custom development',-];--const styles = {- root: {- display: 'flex',- justifyContent: 'center',- alignItems: 'flex-start',- width: '100%',- minHeight: 'calc(100dvh - 56px)',- boxSizing: 'border-box',- padding: 32,- fontFamily: FONT,- color: COLORS.fg,- background: COLORS.bg,- } as const,- card: {- width: '100%',- maxWidth: '100%',- background: COLORS.surface,- border: `1px solid ${COLORS.border}`,- borderRadius: 12,- padding: 28,- display: 'flex',- flexDirection: 'column',- gap: 28,- } as const,- title: { fontSize: 20, fontWeight: 700, margin: 0 } as const,- sectionTitle: {- fontSize: 11.5,- fontWeight: 700,- color: COLORS.muted,- textTransform: 'uppercase',- letterSpacing: 0.5,- margin: 0,- } as const,- row2: { display: 'flex', gap: 12 } as const,- footer: {- display: 'flex',- justifyContent: 'flex-end',- paddingTop: 4,- borderTop: `1px solid ${COLORS.border}`,- } as const,- button: {- height: 40,- borderRadius: 8,- border: 'none',- background: COLORS.accent,- color: '#fff',- fontSize: 14,- fontWeight: 650,- fontFamily: FONT,- cursor: 'pointer',- padding: '0 24px',- marginTop: 16,- } as const,-} as const;--const Section = ({ title, children }: { title: string; children: ReactNode }) => (- <div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>- <h2 style={styles.sectionTitle}>{title}</h2>- {children}- </div>-);--const MyProfile = () => {- const [form, setForm] = useState<ProfileForm | null>(null);- const [options, setOptions] = useState<ProfileOptions | null>(null);- const [pictureUrl, setPictureUrl] = useState<string | null>(null);- const [partnerId, setPartnerId] = useState<string | null>(null);- const [loading, setLoading] = useState(true);- const [saving, setSaving] = useState(false);-- const set = <K extends keyof ProfileForm>(key: K, value: ProfileForm[K]) =>- setForm((prev) => (prev ? { ...prev, [key]: value } : prev));-- const load = useCallback(async () => {- setLoading(true);- try {- const res = (await callAppRoute('/my-partner-profile', {})) as MyPartnerProfileResult;- if (res.ok) {- setForm(toProfileForm(res.profile));- setOptions(res.options);- setPictureUrl(res.profile.profilePictureUrl);- setPartnerId(res.profile.id);- } else {- await enqueueSnackbar({ message: `Could not load profile: ${res.reason}`, variant: 'error' });- }- } catch (error) {- await enqueueSnackbar({- message: error instanceof Error ? error.message : 'Failed to load profile',- variant: 'error',- });- } finally {- setLoading(false);- }- }, []);-- useEffect(() => {- void load();- }, [load]);-- const save = useCallback(async () => {- if (!form) return;- setSaving(true);- try {- const res = (await callAppRoute('/save-my-partner-profile', toSaveBody(form))) as SaveResult;- if (res.ok) {- await enqueueSnackbar({ message: 'Profile saved', variant: 'success' });- await load();- } else {- await enqueueSnackbar({ message: `Save failed: ${res.reason}`, variant: 'error' });- }- } catch (error) {- await enqueueSnackbar({- message: error instanceof Error ? error.message : 'Failed to save profile',- variant: 'error',- });- } finally {- setSaving(false);- }- }, [form, load]);-- if (loading) return <div style={styles.root}>Loading…</div>;- if (!form || !options) {- return <div style={styles.root}>No partner profile found for your account.</div>;- }-- return (- <div style={styles.root}>- <div style={styles.card}>- <h1 style={styles.title}>My Profile</h1>-- <Section title="Basics">- {partnerId && (- <Field label="Profile picture">- <ProfilePictureUpload url={pictureUrl} recordId={partnerId} />- </Field>- )}- <Field label="Name">- <TextInput value={form.name} onChange={(value) => set('name', value)} />- </Field>- <Field label="Introduction">- <MarkdownEditor- value={form.introduction}- onChange={(value) => set('introduction', value)}- placeholder="Tell clients about your team…"- ariaLabel="Introduction"- />- </Field>- </Section>-- <Section title="Availability & engagement">- <div style={styles.row2}>- <div style={{ flex: 1 }}>- <Field label="Availability">- <SelectInput- value={form.availability}- options={options.availability}- onChange={(value) => set('availability', value)}- />- </Field>- </div>- <div style={{ flex: 1 }}>- <Field label="Type of team">- <SelectInput- value={form.typeOfTeam}- options={options.typeOfTeam}- onChange={(value) => set('typeOfTeam', value)}- />- </Field>- </div>- </div>- <div style={styles.row2}>- <div style={{ flex: 1 }}>- <Field label="Hourly rate">- <CurrencyInput- amount={form.hourlyRate.amount}- currencyCode={form.hourlyRate.currencyCode}- onChange={(value) => set('hourlyRate', value)}- />- </Field>- </div>- <div style={{ flex: 1 }}>- <Field label="Min project budget">- <CurrencyInput- amount={form.projectBudgetMin.amount}- currencyCode={form.projectBudgetMin.currencyCode}- onChange={(value) => set('projectBudgetMin', value)}- />- </Field>- </div>- </div>- </Section>-- <Section title="Expertise">- <Field label="Partner scope">- <ChipMultiSelect- value={form.partnerScope}- options={options.partnerScope}- onChange={(value) => set('partnerScope', value)}- />- </Field>- <Field label="Skills">- <TagInput- value={form.skills}- suggestions={SKILL_SUGGESTIONS}- onChange={(value) => set('skills', value)}- />- </Field>- <Field label="Languages spoken">- <ChipMultiSelect- value={form.languagesSpoken}- options={options.languagesSpoken}- onChange={(value) => set('languagesSpoken', value)}- />- </Field>- </Section>-- <Section title="Location">- <div style={styles.row2}>- <div style={{ flex: 1 }}>- <Field label="Country">- <SelectInput- value={form.country}- options={options.country}- onChange={(value) => set('country', value)}- />- </Field>- </div>- <div style={{ flex: 1 }}>- <Field label="City">- <TextInput value={form.city} onChange={(value) => set('city', value)} />- </Field>- </div>- </div>- <Field label="Regions served">- <ChipMultiSelect- value={form.region}- options={options.region}- onChange={(value) => set('region', value)}- />- </Field>- </Section>-- <Section title="Links">- <Field label="Website">- <UrlInput- value={form.website}- onChange={(value) => set('website', value)}- placeholder="https://…"- />- </Field>- <Field label="LinkedIn">- <UrlInput- value={form.linkedin}- onChange={(value) => set('linkedin', value)}- placeholder="https://linkedin.com/…"- />- </Field>- <Field label="Calendar link">- <UrlInput- value={form.calendarLink}- onChange={(value) => set('calendarLink', value)}- placeholder="https://cal.com/…"- />- </Field>- </Section>-- <div style={styles.footer}>- <button style={styles.button} onClick={() => void save()} disabled={saving}>- {saving ? 'Saving…' : 'Save'}- </button>- </div>- </div>- </div>- );-};--export default defineFrontComponent({- universalIdentifier: MY_PROFILE_FRONT_COMPONENT_ID,- name: 'My Partner Profile',- description: 'Self-service page for a partner to view and edit their profile.',- component: MyProfile,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-profile/form-fields.tsx b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-profile/form-fields.tsxdeleted file mode 100644index eb39a440e8b..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-profile/form-fields.tsx+++ /dev/null@@ -1,303 +0,0 @@-import { useState, type ReactNode } from 'react';--import { COLORS, FONT } from 'src/modules/shared/front-components/palette';--export type SelectOption = { value: string; label: string };--const controlBase = {- width: '100%',- boxSizing: 'border-box',- borderRadius: 8,- border: `1px solid ${COLORS.border}`,- background: COLORS.surface,- color: COLORS.fg,- fontSize: 14,- fontFamily: FONT,- outline: 'none',-} as const;--const inputStyle = { ...controlBase, height: 40, padding: '0 12px' } as const;--const labelStyle = {- fontSize: 12,- fontWeight: 600,- color: COLORS.muted,-} as const;--const chipBase = {- display: 'inline-flex',- alignItems: 'center',- gap: 6,- height: 28,- padding: '0 10px',- borderRadius: 999,- fontSize: 12.5,- fontFamily: FONT,- cursor: 'pointer',- border: `1px solid ${COLORS.border}`,- background: COLORS.surface,- color: COLORS.fg,-} as const;--const chipSelected = {- ...chipBase,- border: `1px solid ${COLORS.accent}`,- background: COLORS.accentSoft,- color: COLORS.accent,- fontWeight: 600,-} as const;--export const Field = ({ label, children }: { label: string; children: ReactNode }) => (- <div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}>- <span style={labelStyle}>{label}</span>- {children}- </div>-);--export const TextInput = ({- value,- onChange,- placeholder,-}: {- value: string;- onChange: (value: string) => void;- placeholder?: string;-}) => (- <input- style={inputStyle}- value={value}- placeholder={placeholder}- onChange={(event) => onChange(event.target.value)}- />-);--export const TextArea = ({- value,- onChange,- rows = 4,- placeholder,-}: {- value: string;- onChange: (value: string) => void;- rows?: number;- placeholder?: string;-}) => (- <textarea- style={{ ...controlBase, padding: '10px 12px', resize: 'vertical', lineHeight: 1.5 }}- rows={rows}- value={value}- placeholder={placeholder}- onChange={(event) => onChange(event.target.value)}- />-);--const CARET =- "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none' stroke='%2366646a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E\")";--export const SelectInput = ({- value,- options,- onChange,- placeholder = 'Select…',-}: {- value: string;- options: SelectOption[];- onChange: (value: string) => void;- placeholder?: string;-}) => (- <select- style={{- ...inputStyle,- appearance: 'none',- WebkitAppearance: 'none',- MozAppearance: 'none',- backgroundImage: CARET,- backgroundRepeat: 'no-repeat',- backgroundPosition: 'right 12px center',- paddingRight: 32,- cursor: 'pointer',- }}- value={value}- onChange={(event) => onChange(event.target.value)}- >- <option value="">{placeholder}</option>- {options.map((option) => (- <option key={option.value} value={option.value}>- {option.label}- </option>- ))}- </select>-);--export const ChipMultiSelect = ({- value,- options,- onChange,-}: {- value: string[];- options: SelectOption[];- onChange: (value: string[]) => void;-}) => {- const toggle = (optionValue: string) => {- onChange(- value.includes(optionValue)- ? value.filter((item) => item !== optionValue)- : [...value, optionValue],- );- };-- return (- <div style={{ display: 'flex', flexWrap: 'wrap', gap: 6 }}>- {options.map((option) => {- const selected = value.includes(option.value);- return (- <button- key={option.value}- type="button"- style={selected ? chipSelected : chipBase}- onClick={() => toggle(option.value)}- >- {option.label}- </button>- );- })}- </div>- );-};--// Free-text tag input with clickable suggestion pills — the same "suggest but let-// them add their own" concept as the website skills field.-export const TagInput = ({- value,- suggestions,- onChange,- placeholder,-}: {- value: string[];- suggestions: string[];- onChange: (value: string[]) => void;- placeholder?: string;-}) => {- const [draft, setDraft] = useState('');-- const add = (tag: string) => {- const trimmed = tag.trim();- if (trimmed !== '' && !value.includes(trimmed)) {- onChange([...value, trimmed]);- }- setDraft('');- };-- const remove = (tag: string) => onChange(value.filter((item) => item !== tag));-- const unusedSuggestions = suggestions.filter((tag) => !value.includes(tag));-- return (- <div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>- {value.length > 0 && (- <div style={{ display: 'flex', flexWrap: 'wrap', gap: 6 }}>- {value.map((tag) => (- <span key={tag} style={chipSelected}>- {tag}- <span- role="button"- tabIndex={0}- aria-label={`Remove ${tag}`}- onClick={() => remove(tag)}- onKeyDown={(event) => {- if (event.key === 'Enter' || event.key === ' ') {- event.preventDefault();- remove(tag);- }- }}- style={{ cursor: 'pointer', opacity: 0.7, fontSize: 14, lineHeight: 1 }}- >- ×- </span>- </span>- ))}- </div>- )}- <input- style={inputStyle}- value={draft}- placeholder={placeholder ?? 'Type a skill and press Enter'}- onChange={(event) => setDraft(event.target.value)}- onKeyDown={(event) => {- if (event.key === 'Enter' || event.key === ',') {- event.preventDefault();- add(draft);- }- }}- />- {unusedSuggestions.length > 0 && (- <div style={{ display: 'flex', flexWrap: 'wrap', gap: 6 }}>- {unusedSuggestions.map((tag) => (- <button key={tag} type="button" style={chipBase} onClick={() => add(tag)}>- + {tag}- </button>- ))}- </div>- )}- </div>- );-};--export const CurrencyInput = ({- amount,- currencyCode,- onChange,-}: {- amount: number | null;- currencyCode: string;- onChange: (next: { amount: number | null; currencyCode: string }) => void;-}) => (- <div style={{ display: 'flex', gap: 8 }}>- <input- style={{ ...inputStyle, flex: 1 }}- type="text"- inputMode="decimal"- value={amount == null ? '' : String(amount)}- placeholder="0"- onChange={(event) => {- const cleaned = event.target.value.replace(/[^0-9.]/g, '');- const next = Number(cleaned);- onChange({- amount: cleaned === '' || Number.isNaN(next) ? null : next,- currencyCode,- });- }}- />- <div- style={{- ...inputStyle,- width: 64,- display: 'flex',- alignItems: 'center',- justifyContent: 'center',- color: COLORS.muted,- background: COLORS.surfaceAlt,- }}- >- {currencyCode || 'USD'}- </div>- </div>-);--export const UrlInput = ({- value,- onChange,- placeholder,-}: {- value: string;- onChange: (value: string) => void;- placeholder?: string;-}) => (- <input- style={inputStyle}- type="url"- value={value}- placeholder={placeholder}- onChange={(event) => onChange(event.target.value)}- />-);diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-profile/markdown-editor.tsx b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-profile/markdown-editor.tsxdeleted file mode 100644index 87164d56491..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-profile/markdown-editor.tsx+++ /dev/null@@ -1,189 +0,0 @@-import { type ReactNode } from 'react';--import { copyToClipboard, enqueueSnackbar } from 'twenty-sdk/front-component';--import { COLORS, FONT } from 'src/modules/shared/front-components/palette';-import { MarkdownContent } from './markdown-render';--// The sandboxed worker exposes no cursor/selection API (DOM refs are method-less proxies,-// and selection offsets aren't forwarded), so toolbar buttons append a ready-to-edit-// snippet rather than wrapping the current selection. The always-on side-by-side preview-// is what makes that workable — the partner sees the result form as they type.-type Tool = { title: string; insert: string; block: boolean; label: ReactNode };--const TOOLS: Tool[] = [- { title: 'Bold', insert: '**bold**', block: false, label: <span style={{ fontWeight: 700 }}>Bold</span> },- { title: 'Italic', insert: '*italic*', block: false, label: <span style={{ fontStyle: 'italic' }}>Italic</span> },- {- title: 'Heading',- insert: '### Heading',- block: true,- label: <span style={{ fontWeight: 700, fontSize: 14 }}>Heading</span>,- },- { title: 'Bullet list', insert: '- item', block: true, label: <span>• List</span> },- { title: 'Numbered list', insert: '1. item', block: true, label: <span>1. List</span> },- {- title: 'Link',- insert: '[text](https://)',- block: false,- label: <span style={{ color: COLORS.accent, textDecoration: 'underline' }}>Link</span>,- },-];--const appendSnippet = (value: string, tool: Tool): string => {- if (value === '') return tool.insert;- if (tool.block) {- const separator = value.endsWith('\n\n') ? '' : value.endsWith('\n') ? '\n' : '\n\n';- return `${value}${separator}${tool.insert}`;- }- const separator = value.endsWith(' ') || value.endsWith('\n') ? '' : ' ';- return `${value}${separator}${tool.insert}`;-};--const buildPrompt = (value: string): string =>- [- 'Reformat the text below as clean markdown for my partner profile.',- 'Use only: **bold**, *italic*, ### headings, - bullet lists, 1. numbered lists, and [links](url).',- "Keep all the information and don't invent anything.",- 'Ask me any questions you need to be sure you have captured all the formatting I want, then return only the formatted text.',- '',- '---',- value.trim() === '' ? '(paste your introduction here)' : value.trim(),- ].join('\n');--// The front-component runs in a Web Worker with no clipboard API; copyToClipboard is a host-// action that copies on the main thread, silently — the confirmation is ours to show.-const copyPrompt = async (value: string): Promise<void> => {- await copyToClipboard(buildPrompt(value));- await enqueueSnackbar({ message: 'Prompt copied to clipboard', variant: 'success' });-};--const EDITOR_HEIGHT = 280;--const toolbarStyle = { display: 'flex', flexWrap: 'wrap', gap: 6 } as const;--const toolButtonStyle = {- height: 30,- padding: '0 12px',- borderRadius: 6,- border: `1px solid ${COLORS.border}`,- background: COLORS.surface,- color: COLORS.fg,- fontSize: 13,- fontFamily: FONT,- cursor: 'pointer',-} as const;--const paneStyle = { flex: '1 1 340px', minWidth: 0, height: EDITOR_HEIGHT } as const;--const controlBase = {- width: '100%',- height: '100%',- boxSizing: 'border-box',- border: `1px solid ${COLORS.border}`,- borderRadius: 8,- background: COLORS.surface,- fontFamily: FONT,- fontSize: 14,- color: COLORS.fg,- lineHeight: 1.5,- padding: '10px 12px',-} as const;--const textareaStyle = { ...controlBase, resize: 'none' } as const;--const previewBoxStyle = { ...controlBase, overflowY: 'auto' } as const;--const eyebrowStyle = {- fontSize: 10.5,- fontWeight: 700,- letterSpacing: 0.5,- textTransform: 'uppercase',- color: COLORS.muted,- marginBottom: 6,-} as const;--const helpBoxStyle = {- display: 'flex',- flexDirection: 'column',- gap: 8,- border: `1px solid ${COLORS.border}`,- borderRadius: 8,- background: COLORS.surfaceAlt,- padding: 12,-} as const;--const copyButtonStyle = {- alignSelf: 'flex-start',- height: 30,- padding: '0 14px',- borderRadius: 6,- border: 'none',- background: COLORS.accent,- color: '#fff',- fontSize: 13,- fontWeight: 600,- fontFamily: FONT,- cursor: 'pointer',-} as const;--export const MarkdownEditor = ({- value,- onChange,- placeholder,- ariaLabel,-}: {- value: string;- onChange: (value: string) => void;- placeholder?: string;- ariaLabel?: string;-}) => (- <div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>- <div style={toolbarStyle}>- {TOOLS.map((tool) => (- <button- key={tool.title}- type="button"- title={tool.title}- style={toolButtonStyle}- onClick={() => onChange(appendSnippet(value, tool))}- >- {tool.label}- </button>- ))}- </div>-- <div style={{ display: 'flex', gap: 12, flexWrap: 'wrap' }}>- <div style={paneStyle}>- <textarea- style={textareaStyle}- value={value}- placeholder={placeholder}- aria-label={ariaLabel ?? placeholder}- onChange={(event) => onChange(event.target.value)}- />- </div>- <div style={paneStyle}>- <div style={previewBoxStyle}>- <div style={eyebrowStyle}>Preview</div>- {value.trim() === '' ? (- <span style={{ color: COLORS.muted, fontSize: 13 }}>- Your formatted text appears here.- </span>- ) : (- <MarkdownContent source={value} />- )}- </div>- </div>- </div>-- <div style={helpBoxStyle}>- <span style={{ fontSize: 12.5, color: COLORS.muted }}>- Not comfortable with Markdown? Copy the prompt into your AI agent to format it for you.- </span>- <button type="button" style={copyButtonStyle} onClick={() => void copyPrompt(value)}>- Copy prompt- </button>- </div>- </div>-);diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-profile/markdown-render.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-profile/markdown-render.test.tsdeleted file mode 100644index 5a1344c526f..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-profile/markdown-render.test.ts+++ /dev/null@@ -1,35 +0,0 @@-import { createElement } from 'react';--import { renderToStaticMarkup } from 'react-dom/server';-import { describe, expect, it } from 'vitest';--import { MarkdownContent } from './markdown-render';--const render = (source: string): string =>- renderToStaticMarkup(createElement(MarkdownContent, { source }));--describe('MarkdownContent', () => {- it('renders bold, italic, and links', () => {- const html = render('a **b** _c_ [d](https://x.io)');- expect(html).toContain('<strong>b</strong>');- expect(html).toContain('<em>c</em>');- expect(html).toContain('href="https://x.io"');- });-- it('demotes # and ## to h3 and never emits h1/h2', () => {- const html = render('# Big\n\n## Sub\n\n### Three');- expect(html).toContain('<h3');- expect(html).not.toContain('<h1');- expect(html).not.toContain('<h2');- });-- it('renders bullet and numbered lists', () => {- expect(render('- a\n- b')).toContain('<ul');- expect(render('1. a\n2. b')).toContain('<ol');- });-- it('leaves a pipe-table as text (matches the website, which has no remark-gfm)', () => {- const html = render('| a | b |\n| --- | --- |\n| 1 | 2 |');- expect(html).not.toContain('<table');- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-profile/markdown-render.tsx b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-profile/markdown-render.tsxdeleted file mode 100644index 91969a92ce3..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-profile/markdown-render.tsx+++ /dev/null@@ -1,60 +0,0 @@-import Markdown from 'react-markdown';--import { COLORS, FONT } from 'src/modules/shared/front-components/palette';--// Mirrors the public website renderer (partners-marketplace/RichText.tsx): same allow-list,-// unwrapDisallowed, and h1/h2 demoted to h3 — so the in-app preview renders exactly what a-// client sees on the profile page. Every element is styled inline because the sandboxed-// worker has no descendant CSS.-const ALLOWED = [- 'p',- 'strong',- 'em',- 'h1',- 'h2',- 'h3',- 'h4',- 'ul',- 'ol',- 'li',- 'a',- 'br',-];--const containerStyle = {- fontFamily: FONT,- fontSize: 14,- color: COLORS.fg,- lineHeight: 1.5,-} as const;--const headingStyle = { fontSize: 15, fontWeight: 700, margin: '10px 0 4px' } as const;-const subHeadingStyle = { fontSize: 13, fontWeight: 700, margin: '10px 0 4px' } as const;-const paragraphStyle = { margin: '6px 0' } as const;-const listStyle = { margin: '6px 0', paddingLeft: 20 } as const;-const linkStyle = { color: COLORS.accent, textDecoration: 'underline' } as const;--export const MarkdownContent = ({ source }: { source: string }) => (- <div style={containerStyle}>- <Markdown- allowedElements={ALLOWED}- unwrapDisallowed- components={{- h1: ({ children }) => <h3 style={headingStyle}>{children}</h3>,- h2: ({ children }) => <h3 style={headingStyle}>{children}</h3>,- h3: ({ children }) => <h3 style={headingStyle}>{children}</h3>,- h4: ({ children }) => <h4 style={subHeadingStyle}>{children}</h4>,- p: ({ children }) => <p style={paragraphStyle}>{children}</p>,- ul: ({ children }) => <ul style={listStyle}>{children}</ul>,- ol: ({ children }) => <ol style={listStyle}>{children}</ol>,- a: ({ href, children }) => (- <a href={href} target="_blank" rel="noreferrer" style={linkStyle}>- {children}- </a>- ),- }}- >- {source}- </Markdown>- </div>-);diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-profile/profile-form.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-profile/profile-form.test.tsdeleted file mode 100644index 732bc9f114c..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-profile/profile-form.test.ts+++ /dev/null@@ -1,59 +0,0 @@-import { describe, expect, it } from 'vitest';--import { toProfileForm, toSaveBody, type ProfilePayload } from './profile-form';--const emptyPayload: ProfilePayload = {- id: 'partner-1',- name: 'Nine Dots Ventures',- profilePictureUrl: null,- introduction: null,- city: null,- country: null,- languagesSpoken: null,- region: null,- partnerScope: null,- skills: null,- typeOfTeam: null,- availability: null,- hourlyRate: null,- projectBudgetMin: null,- website: null,- linkedin: null,- calendarLink: null,-};--describe('toProfileForm', () => {- it('carries region through', () => {- expect(toProfileForm({ ...emptyPayload, region: ['EUROPE', 'MENA'] }).region).toEqual([- 'EUROPE',- 'MENA',- ]);- });-- it('defaults a null region to an empty array', () => {- expect(toProfileForm(emptyPayload).region).toEqual([]);- });-});--describe('toSaveBody', () => {- it('sends region as an array', () => {- const body = toSaveBody({ ...toProfileForm(emptyPayload), region: ['APAC'] });- expect(body.region).toEqual(['APAC']);- });-- it('sends an empty region array when nothing is selected', () => {- expect(toSaveBody(toProfileForm(emptyPayload)).region).toEqual([]);- });-- it('sends null for a blank country, not an empty string', () => {- expect(toSaveBody(toProfileForm(emptyPayload)).country).toBeNull();- });-- it('converts a money field to micros', () => {- const form = toProfileForm({- ...emptyPayload,- hourlyRate: { amountMicros: 150000000, currencyCode: 'USD' },- });- expect(toSaveBody(form).hourlyRate).toEqual({ amountMicros: 150000000, currencyCode: 'USD' });- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-profile/profile-form.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-profile/profile-form.tsdeleted file mode 100644index 976405896f9..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-profile/profile-form.ts+++ /dev/null@@ -1,94 +0,0 @@-import type { MyProfilePayload } from './types';--// Narrowed from the loader's payload so a field rename upstream breaks the build here.-export type ProfilePayload = Pick<- MyProfilePayload,- | 'id'- | 'name'- | 'profilePictureUrl'- | 'introduction'- | 'city'- | 'country'- | 'languagesSpoken'- | 'region'- | 'partnerScope'- | 'skills'- | 'typeOfTeam'- | 'availability'- | 'hourlyRate'- | 'projectBudgetMin'- | 'website'- | 'linkedin'- | 'calendarLink'->;--export type Currency = MyProfilePayload['hourlyRate'];--export type MoneyField = { amount: number | null; currencyCode: string };--export type ProfileForm = {- name: string;- introduction: string;- availability: string;- typeOfTeam: string;- hourlyRate: MoneyField;- projectBudgetMin: MoneyField;- partnerScope: string[];- skills: string[];- languagesSpoken: string[];- region: string[];- country: string;- city: string;- website: string;- linkedin: string;- calendarLink: string;-};--const MICROS = 1_000_000;--export const toMoneyField = (value: Currency): MoneyField => ({- amount: value?.amountMicros != null ? value.amountMicros / MICROS : null,- currencyCode: value?.currencyCode ?? 'USD',-});--export const toProfileForm = (profile: ProfilePayload): ProfileForm => ({- name: profile.name ?? '',- introduction: profile.introduction ?? '',- availability: profile.availability ?? '',- typeOfTeam: profile.typeOfTeam ?? '',- hourlyRate: toMoneyField(profile.hourlyRate),- projectBudgetMin: toMoneyField(profile.projectBudgetMin),- partnerScope: profile.partnerScope ?? [],- skills: profile.skills ?? [],- languagesSpoken: profile.languagesSpoken ?? [],- region: profile.region ?? [],- country: profile.country ?? '',- city: profile.city ?? '',- website: profile.website ?? '',- linkedin: profile.linkedin ?? '',- calendarLink: profile.calendarLink ?? '',-});--export const toMicros = (money: MoneyField) =>- money.amount == null- ? null- : { amountMicros: Math.round(money.amount * MICROS), currencyCode: money.currencyCode || 'USD' };--// Enum/country selectors send null (not '') when reset to blank so the field clears.-export const toSaveBody = (form: ProfileForm): Record<string, unknown> => ({- name: form.name,- introduction: form.introduction,- city: form.city,- languagesSpoken: form.languagesSpoken,- region: form.region,- partnerScope: form.partnerScope,- skills: form.skills,- website: form.website,- linkedin: form.linkedin,- calendarLink: form.calendarLink,- hourlyRate: toMicros(form.hourlyRate),- projectBudgetMin: toMicros(form.projectBudgetMin),- availability: form.availability === '' ? null : form.availability,- typeOfTeam: form.typeOfTeam === '' ? null : form.typeOfTeam,- country: form.country === '' ? null : form.country,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-profile/profile-picture-upload.tsx b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-profile/profile-picture-upload.tsxdeleted file mode 100644index 13829bc1c90..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-profile/profile-picture-upload.tsx+++ /dev/null@@ -1,81 +0,0 @@-import { useState } from 'react';-import { AppPath, enqueueSnackbar, navigate } from 'twenty-sdk/front-component';--import { COLORS, FONT } from 'src/modules/shared/front-components/palette';--const avatarStyle = {- width: 72,- height: 72,- borderRadius: '50%',- objectFit: 'cover',- border: `1px solid ${COLORS.border}`,- background: COLORS.surfaceAlt,- display: 'flex',- alignItems: 'center',- justifyContent: 'center',- fontSize: 24,- color: COLORS.muted,- flexShrink: 0,-} as const;--const buttonStyle = {- height: 34,- borderRadius: 8,- border: `1px solid ${COLORS.border}`,- background: COLORS.surface,- color: COLORS.fg,- fontSize: 13,- fontWeight: 600,- fontFamily: FONT,- cursor: 'pointer',- padding: '0 14px',-} as const;--// A sandboxed front-component can't read file bytes (the renderer only forwards file-// metadata across the worker boundary), so real image upload has to happen on the-// platform's native record page. This sends the partner there; on return the page-// re-fetches and shows the new photo.-export const ProfilePictureUpload = ({- url,- recordId,-}: {- url: string | null;- recordId: string;-}) => {- const [busy, setBusy] = useState(false);-- const goToRecord = async () => {- setBusy(true);- try {- await navigate(AppPath.RecordShowPage, {- objectNameSingular: 'partner',- objectRecordId: recordId,- });- } catch (error) {- await enqueueSnackbar({- message: error instanceof Error ? error.message : 'Could not open your record',- variant: 'error',- });- } finally {- setBusy(false);- }- };-- return (- <div style={{ display: 'flex', alignItems: 'center', gap: 16 }}>- {url ? (- <img src={url} alt="Profile" style={avatarStyle} />- ) : (- <div style={avatarStyle}>🙂</div>- )}- <div style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>- <button style={buttonStyle} onClick={() => void goToRecord()} disabled={busy}>- {busy ? 'Opening…' : url ? 'Change photo' : 'Add photo'}- </button>- <span style={{ fontSize: 11, color: COLORS.muted }}>- Opens your record page to upload an image.- </span>- </div>- </div>- );-};diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-profile/types.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-profile/types.tsdeleted file mode 100644index d43b8ebc610..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/front-components/my-profile/types.ts+++ /dev/null@@ -1,8 +0,0 @@-export type { MyProfilePayload } from 'src/modules/partner/self-service/mappers/get-my-partner-profile.mapper';-export type { MyPartnerProfileResult } from 'src/modules/partner/self-service/services/get-my-partner-profile.service';-export type { SaveResult } from 'src/modules/partner/self-service/services/save-my-partner-profile.service';-export type { SaveLinksResult } from 'src/modules/partner/self-service/services/save-my-partner-links.service';-export type { SaveServicesResult } from 'src/modules/partner/self-service/services/save-my-partner-services.service';-export type { SaveContentResult } from 'src/modules/partner/self-service/services/save-my-partner-content.service';-export type { SubmitContentForReviewResult } from 'src/modules/partner/self-service/services/submit-partner-content-for-review.service';-export type { ProfileOptions, SelectOption } from 'src/modules/partner/self-service/constants/my-profile.constants';diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/get-my-partner-profile.logic-function.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/get-my-partner-profile.logic-function.tsdeleted file mode 100644index 70199b664f4..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/get-my-partner-profile.logic-function.ts+++ /dev/null@@ -1,25 +0,0 @@-import { defineLogicFunction, type RoutePayload } from 'twenty-sdk/define';--import {- getMyPartnerProfile,- type MyPartnerProfileResult,-} from 'src/modules/partner/self-service/services/get-my-partner-profile.service';--export const GET_MY_PARTNER_PROFILE_ID = 'eacfd95b-de02-4f03-aa38-3cae31bb30a9';--export const handler = (event: RoutePayload<unknown>): Promise<MyPartnerProfileResult> =>- getMyPartnerProfile(event);--export default defineLogicFunction({- universalIdentifier: GET_MY_PARTNER_PROFILE_ID,- name: 'get-my-partner-profile',- description:- "Returns the calling partner's own profile + links + services + case studies + enum options.",- timeoutSeconds: 20,- handler,- httpRouteTriggerSettings: {- path: '/my-partner-profile',- httpMethod: 'POST',- isAuthRequired: true,- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/create-partner-content.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/create-partner-content.tsdeleted file mode 100644index b817c42772a..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/create-partner-content.ts+++ /dev/null@@ -1,10 +0,0 @@-import { type CoreApiClient, type CoreSchema } from 'twenty-client-sdk/core';--export function createPartnerContent(- client: CoreApiClient,- data: CoreSchema.PartnerContentCreateInput,-) {- return client.mutation({- createPartnerContent: { __args: { data }, id: true },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/create-partner-link.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/create-partner-link.tsdeleted file mode 100644index 273eef1d610..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/create-partner-link.ts+++ /dev/null@@ -1,10 +0,0 @@-import { type CoreApiClient, type CoreSchema } from 'twenty-client-sdk/core';--export function createPartnerLink(- client: CoreApiClient,- data: CoreSchema.PartnerLinkCreateInput,-) {- return client.mutation({- createPartnerLink: { __args: { data }, id: true },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/create-partner-service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/create-partner-service.tsdeleted file mode 100644index fcade425ac1..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/create-partner-service.ts+++ /dev/null@@ -1,10 +0,0 @@-import { type CoreApiClient, type CoreSchema } from 'twenty-client-sdk/core';--export function createPartnerService(- client: CoreApiClient,- data: CoreSchema.PartnerServiceCreateInput,-) {- return client.mutation({- createPartnerService: { __args: { data }, id: true },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/delete-partner-content.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/delete-partner-content.tsdeleted file mode 100644index 7a0baa27ad5..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/delete-partner-content.ts+++ /dev/null@@ -1,7 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--export function deletePartnerContent(client: CoreApiClient, id: string) {- return client.mutation({- deletePartnerContent: { __args: { id }, id: true },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/delete-partner-link.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/delete-partner-link.tsdeleted file mode 100644index 53a46cab4d3..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/delete-partner-link.ts+++ /dev/null@@ -1,7 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--export function deletePartnerLink(client: CoreApiClient, id: string) {- return client.mutation({- deletePartnerLink: { __args: { id }, id: true },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/delete-partner-service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/delete-partner-service.tsdeleted file mode 100644index 9efb985aa9a..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/delete-partner-service.ts+++ /dev/null@@ -1,7 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--export function deletePartnerService(client: CoreApiClient, id: string) {- return client.mutation({- deletePartnerService: { __args: { id }, id: true },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/update-partner-content.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/update-partner-content.tsdeleted file mode 100644index 4c78153efce..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/update-partner-content.ts+++ /dev/null@@ -1,11 +0,0 @@-import { type CoreApiClient, type CoreSchema } from 'twenty-client-sdk/core';--export function updatePartnerContent(- client: CoreApiClient,- id: string,- data: CoreSchema.PartnerContentUpdateInput,-) {- return client.mutation({- updatePartnerContent: { __args: { id, data }, id: true },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/update-partner-link.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/update-partner-link.tsdeleted file mode 100644index a9b06ec2c44..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/update-partner-link.ts+++ /dev/null@@ -1,11 +0,0 @@-import { type CoreApiClient, type CoreSchema } from 'twenty-client-sdk/core';--export function updatePartnerLink(- client: CoreApiClient,- id: string,- data: CoreSchema.PartnerLinkUpdateInput,-) {- return client.mutation({- updatePartnerLink: { __args: { id, data }, id: true },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/update-partner-service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/update-partner-service.tsdeleted file mode 100644index e91cfa546a4..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/update-partner-service.ts+++ /dev/null@@ -1,11 +0,0 @@-import { type CoreApiClient, type CoreSchema } from 'twenty-client-sdk/core';--export function updatePartnerService(- client: CoreApiClient,- id: string,- data: CoreSchema.PartnerServiceUpdateInput,-) {- return client.mutation({- updatePartnerService: { __args: { id, data }, id: true },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/update-partner.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/update-partner.tsdeleted file mode 100644index 3f5335a8c53..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/mutations/update-partner.ts+++ /dev/null@@ -1,11 +0,0 @@-import { type CoreApiClient, type CoreSchema } from 'twenty-client-sdk/core';--export function updatePartner(- client: CoreApiClient,- id: string,- data: CoreSchema.PartnerUpdateInput,-) {- return client.mutation({- updatePartner: { __args: { id, data }, id: true },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/queries/find-my-partner-profile.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/queries/find-my-partner-profile.tsdeleted file mode 100644index 4813ece1997..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/queries/find-my-partner-profile.ts+++ /dev/null@@ -1,72 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--// CoreApiClient is codegenerated from the synced workspace schema, so the-// selection is strictly typed and the response shape derives from it.-export function findMyPartnerProfile(client: CoreApiClient, partnerId: string) {- return client.query({- partners: {- __args: {- filter: { id: { eq: partnerId } },- first: 1,- },- edges: {- node: {- id: true,- name: true,- introduction: true,- city: true,- country: true,- languagesSpoken: true,- partnerScope: true,- skills: true,- typeOfTeam: true,- availability: true,- hourlyRate: { amountMicros: true, currencyCode: true },- projectBudgetMin: { amountMicros: true, currencyCode: true },- website: { primaryLinkUrl: true },- linkedin: { primaryLinkUrl: true },- calendarLink: { primaryLinkUrl: true },- profilePicture: { primaryLinkUrl: true },- profilePictureFile: { url: true },- region: true,- deploymentExpertise: true,- partnerLinks: {- edges: {- node: {- id: true,- name: true,- url: { primaryLinkUrl: true },- sortOrder: true,- },- },- },- partnerServices: {- edges: {- node: {- id: true,- title: true,- description: true,- sortOrder: true,- },- },- },- partnerContents: {- edges: {- node: {- id: true,- name: true,- clientName: true,- headline: true,- body: { markdown: true },- coverImageUrl: true,- caseStudyLink: { primaryLinkUrl: true },- status: true,- contentType: true,- },- },- },- },- },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/queries/find-partner-content-ids.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/queries/find-partner-content-ids.tsdeleted file mode 100644index 53bdb5b80d9..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/queries/find-partner-content-ids.ts+++ /dev/null@@ -1,10 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--export function findPartnerContentIds(client: CoreApiClient, partnerId: string) {- return client.query({- partnerContents: {- __args: { filter: { partnerId: { eq: partnerId } } },- edges: { node: { id: true, contentType: true } },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/queries/find-partner-content-owner.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/queries/find-partner-content-owner.tsdeleted file mode 100644index cc22cd13a6e..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/queries/find-partner-content-owner.ts+++ /dev/null@@ -1,10 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--export function findPartnerContentOwner(client: CoreApiClient, recordId: string) {- return client.query({- partnerContents: {- __args: { filter: { id: { eq: recordId } }, first: 1 },- edges: { node: { partnerId: true, status: true } },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/queries/find-partner-content-rows.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/queries/find-partner-content-rows.tsdeleted file mode 100644index 19854efcb13..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/queries/find-partner-content-rows.ts+++ /dev/null@@ -1,22 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--export function findPartnerContentRows(client: CoreApiClient, partnerId: string) {- return client.query({- partnerContents: {- __args: { filter: { partnerId: { eq: partnerId } } },- edges: {- node: {- id: true,- name: true,- clientName: true,- headline: true,- body: { markdown: true },- coverImageUrl: true,- caseStudyLink: { primaryLinkUrl: true },- status: true,- contentType: true,- },- },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/queries/find-partner-link-ids.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/queries/find-partner-link-ids.tsdeleted file mode 100644index 3b0450a6c44..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/queries/find-partner-link-ids.ts+++ /dev/null@@ -1,10 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--export function findPartnerLinkIds(client: CoreApiClient, partnerId: string) {- return client.query({- partnerLinks: {- __args: { filter: { partnerId: { eq: partnerId } } },- edges: { node: { id: true } },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/queries/find-partner-link-rows.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/queries/find-partner-link-rows.tsdeleted file mode 100644index 2f6b02633e2..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/queries/find-partner-link-rows.ts+++ /dev/null@@ -1,17 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--export function findPartnerLinkRows(client: CoreApiClient, partnerId: string) {- return client.query({- partnerLinks: {- __args: { filter: { partnerId: { eq: partnerId } } },- edges: {- node: {- id: true,- name: true,- url: { primaryLinkUrl: true },- sortOrder: true,- },- },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/queries/find-partner-service-ids.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/queries/find-partner-service-ids.tsdeleted file mode 100644index 9e50e0a95e9..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/queries/find-partner-service-ids.ts+++ /dev/null@@ -1,10 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--export function findPartnerServiceIds(client: CoreApiClient, partnerId: string) {- return client.query({- partnerServices: {- __args: { filter: { partnerId: { eq: partnerId } } },- edges: { node: { id: true } },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/queries/find-partner-service-rows.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/queries/find-partner-service-rows.tsdeleted file mode 100644index 6616a8954bf..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/graphql/queries/find-partner-service-rows.ts+++ /dev/null@@ -1,17 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--export function findPartnerServiceRows(client: CoreApiClient, partnerId: string) {- return client.query({- partnerServices: {- __args: { filter: { partnerId: { eq: partnerId } } },- edges: {- node: {- id: true,- title: true,- description: true,- sortOrder: true,- },- },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/mappers/get-my-partner-profile.mapper.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/mappers/get-my-partner-profile.mapper.test.tsdeleted file mode 100644index 46ce689563b..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/mappers/get-my-partner-profile.mapper.test.ts+++ /dev/null@@ -1,269 +0,0 @@-import { describe, expect, it } from 'vitest';--import { mapMyProfilePayload, type PartnerNode } from './get-my-partner-profile.mapper';--const makeNode = (overrides: Partial<PartnerNode> = {}): PartnerNode =>- ({- id: 'partner-1',- name: 'Nine Dots Ventures',- introduction: 'Senior implementation partner.',- city: 'Paris',- country: 'FRANCE',- languagesSpoken: ['ENGLISH', 'FRENCH'],- partnerScope: ['ADVISORY'],- skills: ['Salesforce'],- typeOfTeam: 'AGENCY',- availability: 'AVAILABLE',- hourlyRate: { amountMicros: 150000000, currencyCode: 'USD' },- projectBudgetMin: { amountMicros: 1000000000, currencyCode: 'USD' },- website: { primaryLinkUrl: 'https://ninedots.example.com' },- linkedin: { primaryLinkUrl: 'https://linkedin.com/company/nine-dots' },- calendarLink: { primaryLinkUrl: 'https://cal.example.com/nine-dots' },- profilePicture: { primaryLinkUrl: 'https://images.example.com/legacy.png' },- profilePictureFile: [{ url: 'https://images.example.com/uploaded.png' }],- region: ['EUROPE'],- deploymentExpertise: ['CLOUD'],- partnerLinks: {- edges: [- {- node: {- id: 'link-1',- name: 'Case studies',- url: { primaryLinkUrl: 'https://example.com/case-studies' },- sortOrder: 1,- },- },- ],- },- partnerServices: {- edges: [- {- node: {- id: 'service-1',- title: 'Data migration',- description: 'Historical sync and schema mapping.',- sortOrder: 1,- },- },- ],- },- partnerContents: {- edges: [- {- node: {- id: 'content-1',- name: 'Acme case study',- clientName: 'Acme Corp',- headline: 'CRM migration',- body: { markdown: 'Moved 12 teams to Twenty.' },- coverImageUrl: 'https://images.example.com/case-study.png',- caseStudyLink: { primaryLinkUrl: 'https://example.com/case-study' },- status: 'APPROVED',- contentType: ['CASE_STUDY'],- },- },- ],- },- ...overrides,- }) as PartnerNode;--describe('mapMyProfilePayload', () => {- it('unwraps LINKS fields to their primaryLinkUrl', () => {- const mapped = mapMyProfilePayload(makeNode());-- expect(mapped.website).toBe('https://ninedots.example.com');- expect(mapped.linkedin).toBe('https://linkedin.com/company/nine-dots');- expect(mapped.calendarLink).toBe('https://cal.example.com/nine-dots');- expect(mapped.links[0].url).toBe('https://example.com/case-studies');- expect(mapped.caseStudies[0].caseStudyLink).toBe('https://example.com/case-study');- });-- it('prefers the uploaded profile picture file url over the legacy link', () => {- const mapped = mapMyProfilePayload(makeNode());-- expect(mapped.profilePictureUrl).toBe('https://images.example.com/uploaded.png');- });-- it('falls back to the legacy profile picture link when there is no uploaded file', () => {- const mapped = mapMyProfilePayload(- makeNode({ profilePictureFile: null }),- );-- expect(mapped.profilePictureUrl).toBe('https://images.example.com/legacy.png');- });-- it('maps case study body.markdown to bodyMarkdown and passes coverImageUrl through', () => {- const mapped = mapMyProfilePayload(makeNode());-- expect(mapped.caseStudies[0].bodyMarkdown).toBe('Moved 12 teams to Twenty.');- expect(mapped.caseStudies[0].coverImageUrl).toBe(- 'https://images.example.com/case-study.png',- );- });-- it('filters partnerContents to only CASE_STUDY rows, excluding quotes/logos', () => {- const mapped = mapMyProfilePayload(- makeNode({- partnerContents: {- edges: [- {- node: {- id: 'content-1',- name: 'Acme case study',- clientName: 'Acme Corp',- headline: 'CRM migration',- body: { markdown: 'Moved 12 teams to Twenty.' },- coverImageUrl: 'https://images.example.com/case-study.png',- caseStudyLink: { primaryLinkUrl: 'https://example.com/case-study' },- status: 'APPROVED',- contentType: ['CASE_STUDY'],- },- },- {- node: {- id: 'content-2',- name: 'Nine Dots quote',- clientName: 'Sunrise APAC',- status: 'WIP',- contentType: ['PARTNER_QUOTE'],- },- },- ],- },- }),- );-- expect(mapped.caseStudies).toHaveLength(1);- expect(mapped.caseStudies[0].id).toBe('content-1');- });-- it('maps links, services, and caseStudies edges to plain arrays', () => {- const mapped = mapMyProfilePayload(makeNode());-- expect(mapped.links).toEqual([- { id: 'link-1', name: 'Case studies', url: 'https://example.com/case-studies', sortOrder: 1 },- ]);- expect(mapped.services).toEqual([- { id: 'service-1', title: 'Data migration', description: 'Historical sync and schema mapping.', sortOrder: 1 },- ]);- expect(mapped.caseStudies).toEqual([- {- id: 'content-1',- name: 'Acme case study',- clientName: 'Acme Corp',- headline: 'CRM migration',- bodyMarkdown: 'Moved 12 teams to Twenty.',- coverImageUrl: 'https://images.example.com/case-study.png',- caseStudyLink: 'https://example.com/case-study',- status: 'APPROVED',- },- ]);- });-- it('passes the pasted coverImageUrl through for the edit form', () => {- const mapped = mapMyProfilePayload(- makeNode({- partnerContents: {- edges: [- {- node: {- id: 'content-1',- name: 'Acme case study',- clientName: 'Acme Corp',- headline: 'CRM migration',- body: { markdown: 'Moved 12 teams to Twenty.' },- coverImageUrl: 'https://paste.example.com/cover.png',- caseStudyLink: { primaryLinkUrl: 'https://example.com/case-study' },- status: 'APPROVED',- contentType: ['CASE_STUDY'],- },- },- ],- },- } as Partial<PartnerNode>),- );-- expect(mapped.caseStudies[0].coverImageUrl).toBe('https://paste.example.com/cover.png');- });-- // The edit form binds the text coverImageUrl only; a file cover's signed URL must not- // round-trip through save, so it is not surfaced here (the marketplace mapping still shows it).- it('returns null coverImageUrl when the pasted url is empty', () => {- const mapped = mapMyProfilePayload(- makeNode({- partnerContents: {- edges: [- {- node: {- id: 'content-1',- name: 'Acme case study',- clientName: 'Acme Corp',- headline: 'CRM migration',- body: { markdown: 'Moved 12 teams to Twenty.' },- coverImageUrl: null,- caseStudyLink: { primaryLinkUrl: 'https://example.com/case-study' },- status: 'APPROVED',- contentType: ['CASE_STUDY'],- },- },- ],- },- } as Partial<PartnerNode>),- );-- expect(mapped.caseStudies[0].coverImageUrl).toBeNull();- });-- it('handles nulls and empty edges', () => {- const mapped = mapMyProfilePayload(- makeNode({- name: null,- introduction: null,- city: null,- country: null,- languagesSpoken: null,- partnerScope: null,- skills: null,- typeOfTeam: null,- availability: null,- hourlyRate: null,- projectBudgetMin: null,- website: null,- linkedin: null,- calendarLink: null,- profilePicture: null,- profilePictureFile: null,- region: null,- deploymentExpertise: null,- partnerLinks: { edges: [] },- partnerServices: { edges: [] },- partnerContents: { edges: [] },- }),- );-- expect(mapped).toEqual({- id: 'partner-1',- name: null,- introduction: null,- city: null,- country: null,- languagesSpoken: null,- partnerScope: null,- skills: null,- typeOfTeam: null,- availability: null,- hourlyRate: null,- projectBudgetMin: null,- website: null,- linkedin: null,- calendarLink: null,- profilePicture: null,- profilePictureUrl: null,- region: null,- deploymentExpertise: null,- links: [],- services: [],- caseStudies: [],- });- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/mappers/get-my-partner-profile.mapper.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/mappers/get-my-partner-profile.mapper.tsdeleted file mode 100644index d1d39fe1641..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/mappers/get-my-partner-profile.mapper.ts+++ /dev/null@@ -1,95 +0,0 @@-import type { findMyPartnerProfile } from 'src/modules/partner/self-service/graphql/queries/find-my-partner-profile';-import { isCaseStudy } from 'src/modules/partner/utils/content-type';-import { firstFileUrl } from 'src/modules/partner/utils/profile-picture';--export type MyProfilePayload = {- id: string;- name: string | null;- introduction: string | null;- city: string | null;- country: string | null;- languagesSpoken: string[] | null;- partnerScope: string[] | null;- skills: string[] | null;- typeOfTeam: string | null;- availability: string | null;- hourlyRate: { amountMicros: number | null; currencyCode: string | null } | null;- projectBudgetMin: { amountMicros: number | null; currencyCode: string | null } | null;- website: string | null;- linkedin: string | null;- calendarLink: string | null;- profilePicture: string | null;- profilePictureUrl: string | null;- region: string[] | null;- deploymentExpertise: string[] | null;- links: { id: string; name: string | null; url: string | null; sortOrder: number | null }[];- services: {- id: string;- title: string | null;- description: string | null;- sortOrder: number | null;- }[];- caseStudies: {- id: string;- name: string | null;- clientName: string | null;- headline: string | null;- bodyMarkdown: string | null;- coverImageUrl: string | null;- caseStudyLink: string | null;- status: string | null;- }[];-};--export type PartnerNode = NonNullable<- Awaited<ReturnType<typeof findMyPartnerProfile>>['partners']->['edges'][number]['node'];--export const mapMyProfilePayload = (node: PartnerNode): MyProfilePayload => ({- id: node.id,- name: node.name ?? null,- introduction: node.introduction ?? null,- city: node.city ?? null,- country: node.country ?? null,- languagesSpoken: node.languagesSpoken ?? null,- partnerScope: node.partnerScope ?? null,- skills: node.skills ?? null,- typeOfTeam: node.typeOfTeam ?? null,- availability: node.availability ?? null,- hourlyRate: node.hourlyRate ?? null,- projectBudgetMin: node.projectBudgetMin ?? null,- website: node.website?.primaryLinkUrl ?? null,- linkedin: node.linkedin?.primaryLinkUrl ?? null,- calendarLink: node.calendarLink?.primaryLinkUrl ?? null,- profilePicture: node.profilePicture?.primaryLinkUrl ?? null,- profilePictureUrl:- firstFileUrl(node.profilePictureFile) ?? node.profilePicture?.primaryLinkUrl ?? null,- region: node.region ?? null,- deploymentExpertise: node.deploymentExpertise ?? null,- links: (node.partnerLinks?.edges ?? []).map((e) => ({- id: e.node.id,- name: e.node.name ?? null,- url: e.node.url?.primaryLinkUrl ?? null,- sortOrder: e.node.sortOrder ?? null,- })),- services: (node.partnerServices?.edges ?? []).map((e) => ({- id: e.node.id,- title: e.node.title ?? null,- description: e.node.description ?? null,- sortOrder: e.node.sortOrder ?? null,- })),- caseStudies: (node.partnerContents?.edges ?? [])- .filter((e) => isCaseStudy(e.node.contentType))- .map((e) => ({- id: e.node.id,- name: e.node.name ?? null,- clientName: e.node.clientName ?? null,- headline: e.node.headline ?? null,- bodyMarkdown: e.node.body?.markdown ?? null,- // Edit form binds the text coverImageUrl field only; the file cover's signed URL- // must not round-trip through save (it would persist an expiring URL).- coverImageUrl: e.node.coverImageUrl || null,- caseStudyLink: e.node.caseStudyLink?.primaryLinkUrl ?? null,- status: e.node.status ?? null,- })),-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/mappers/save-my-partner-content.mapper.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/mappers/save-my-partner-content.mapper.test.tsdeleted file mode 100644index 3aa008e4886..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/mappers/save-my-partner-content.mapper.test.ts+++ /dev/null@@ -1,142 +0,0 @@-import { describe, expect, it } from 'vitest';--import {- buildContentCreateData,- buildContentUpdateData,- saveContentSchema,-} from './save-my-partner-content.mapper';-import { canSubmitForReview } from './submit-partner-content-for-review.mapper';--describe('saveContentSchema', () => {- it('accepts a minimal case study (name only)', () => {- expect(saveContentSchema.safeParse({ caseStudies: [{ name: 'Acme rollout' }] }).success).toBe(- true,- );- });-- it('accepts an empty caseStudies array', () => {- expect(saveContentSchema.safeParse({ caseStudies: [] }).success).toBe(true);- });-- it('rejects a case study missing name', () => {- expect(saveContentSchema.safeParse({ caseStudies: [{ clientName: 'Acme' }] }).success).toBe(- false,- );- });-});--describe('buildContentCreateData', () => {- it('creates status: WIP and never writes partnerId/contentType (trigger stamps them)', () => {- const data = buildContentCreateData({ name: 'Acme rollout' });- expect(data.status).toBe('WIP');- expect(data.name).toBe('Acme rollout');- expect(data).not.toHaveProperty('partnerId');- expect(data).not.toHaveProperty('contentType');- });-- it('wraps bodyMarkdown into { markdown } (empty string when omitted)', () => {- expect(buildContentCreateData({ name: 'x' }).body).toEqual({ markdown: '' });- expect(- buildContentCreateData({ name: 'x', bodyMarkdown: 'Hello **world**' }).body,- ).toEqual({ markdown: 'Hello **world**' });- });-- it('wraps caseStudyLink into { primaryLinkUrl } when present', () => {- const data = buildContentCreateData({- name: 'x',- caseStudyLink: 'https://example.com/case-study',- });- expect(data.caseStudyLink).toEqual({ primaryLinkUrl: 'https://example.com/case-study' });- });-- it('leaves caseStudyLink undefined when not provided', () => {- expect(buildContentCreateData({ name: 'x' }).caseStudyLink).toBeUndefined();- });-- it('carries clientName and headline through untouched', () => {- const data = buildContentCreateData({- name: 'x',- clientName: 'Acme Corp',- headline: 'A great migration',- });- expect(data.clientName).toBe('Acme Corp');- expect(data.headline).toBe('A great migration');- });-- it('passes coverImageUrl through when provided, and omits it when absent', () => {- expect(buildContentCreateData({ name: 'x', coverImageUrl: 'https://img.example.com/c.png' }).coverImageUrl).toBe(- 'https://img.example.com/c.png',- );- expect(buildContentCreateData({ name: 'x' }).coverImageUrl).toBeUndefined();- });-});--describe('buildContentUpdateData', () => {- it('omits contentType and partnerId', () => {- const data = buildContentUpdateData({ name: 'Acme rollout (edited)' });- expect(data).not.toHaveProperty('contentType');- expect(data).not.toHaveProperty('partnerId');- });-- it('wraps bodyMarkdown and caseStudyLink the same way as create', () => {- const data = buildContentUpdateData({- name: 'x',- bodyMarkdown: 'Updated body',- caseStudyLink: 'https://example.com/updated',- });- expect(data.body).toEqual({ markdown: 'Updated body' });- expect(data.caseStudyLink).toEqual({ primaryLinkUrl: 'https://example.com/updated' });- });-- it('still maps name, clientName, headline', () => {- const data = buildContentUpdateData({- name: 'Acme rollout (edited)',- clientName: 'Acme Corp',- headline: 'A better migration',- });- expect(data.name).toBe('Acme rollout (edited)');- expect(data.clientName).toBe('Acme Corp');- expect(data.headline).toBe('A better migration');- });-- it('passes coverImageUrl through on update', () => {- expect(buildContentUpdateData({ name: 'x', coverImageUrl: 'https://img.example.com/c.png' }).coverImageUrl).toBe(- 'https://img.example.com/c.png',- );- });-});--describe('partner-controlled publish', () => {- it('creates a published case study as APPROVED', () => {- const data = buildContentCreateData({ name: 'x', published: true });- expect(data.status).toBe('APPROVED');- });-- it('creates a draft (published false or omitted) as WIP', () => {- expect(buildContentCreateData({ name: 'x', published: false }).status).toBe('WIP');- expect(buildContentCreateData({ name: 'x' }).status).toBe('WIP');- });-- it('updates status from the published flag', () => {- expect(buildContentUpdateData({ name: 'x', published: true }).status).toBe('APPROVED');- expect(buildContentUpdateData({ name: 'x', published: false }).status).toBe('WIP');- });-- it('omits status when published is not specified, preserving the existing status', () => {- expect(buildContentUpdateData({ name: 'x' })).not.toHaveProperty('status');- });-});--describe('canSubmitForReview', () => {- it('returns true only for WIP', () => {- expect(canSubmitForReview('WIP')).toBe(true);- });-- it('returns false for every other status', () => {- expect(canSubmitForReview('INTERVIEW_SCHEDULED')).toBe(false);- expect(canSubmitForReview('UNDER_CUSTOMER_PARTNER_REVIEW')).toBe(false);- expect(canSubmitForReview('APPROVED')).toBe(false);- expect(canSubmitForReview('REJECTED')).toBe(false);- expect(canSubmitForReview(null)).toBe(false);- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/mappers/save-my-partner-content.mapper.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/mappers/save-my-partner-content.mapper.tsdeleted file mode 100644index 4d1a25a2473..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/mappers/save-my-partner-content.mapper.ts+++ /dev/null@@ -1,69 +0,0 @@-import { type CoreSchema } from 'twenty-client-sdk/core';-import { z } from 'zod';--import { isHttpUrl } from 'src/modules/shared/utils/http-url.util';--export const saveContentSchema = z.object({- caseStudies: z.array(- z.object({- id: z.string().optional(),- name: z.string(),- clientName: z.string().optional(),- headline: z.string().optional(),- bodyMarkdown: z.string().optional(),- caseStudyLink: z- .string()- .refine((value) => value === '' || isHttpUrl(value), {- message: 'URL must use http or https',- })- .optional(),- coverImageUrl: z.string().optional(),- published: z.boolean().optional(),- }),- ).max(50, 'Too many case studies in a single request (max 50)'),-});--export type SaveContentInput = z.infer<typeof saveContentSchema>;--export type CaseStudyItem = SaveContentInput['caseStudies'][number];--export type CaseStudyRow = {- id: string;- name: string | null;- clientName: string | null;- headline: string | null;- bodyMarkdown: string | null;- coverImageUrl: string | null;- caseStudyLink: string | null;- status: string | null;-};--// Partner self-controls visibility: published → APPROVED (public), draft → WIP (hidden).-// partnerId and contentType stay out on purpose: both are locked for the partner role and-// trigger-stamped, so a partner cannot repoint a case study onto another partner's profile.-// Create and update share every field mapping; they diverge only on how status is-// derived, so keep the common fields here and let each add its own status handling.-const buildContentBaseData = (item: CaseStudyItem) => ({- name: item.name,- clientName: item.clientName,- headline: item.headline,- body: { markdown: item.bodyMarkdown ?? '' },- caseStudyLink: item.caseStudyLink ? { primaryLinkUrl: item.caseStudyLink } : undefined,- coverImageUrl: item.coverImageUrl,-});--export function buildContentCreateData(- item: CaseStudyItem,-): CoreSchema.PartnerContentCreateInput {- return { ...buildContentBaseData(item), status: item.published ? 'APPROVED' : 'WIP' };-}--export function buildContentUpdateData(- item: CaseStudyItem,-): CoreSchema.PartnerContentUpdateInput {- return {- ...buildContentBaseData(item),- // Only touch status when the caller specified published; a partial edit must not unpublish an APPROVED case study.- ...(item.published !== undefined ? { status: item.published ? 'APPROVED' : 'WIP' } : {}),- };-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/mappers/save-my-partner-links.mapper.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/mappers/save-my-partner-links.mapper.tsdeleted file mode 100644index e1d0f3dab7b..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/mappers/save-my-partner-links.mapper.ts+++ /dev/null@@ -1,25 +0,0 @@-import { z } from 'zod';--import { isHttpUrl } from 'src/modules/shared/utils/http-url.util';--export const saveLinksSchema = z.object({- links: z.array(- z.object({- id: z.string().optional(),- name: z.string(),- url: z.string().refine((value) => value === '' || isHttpUrl(value), {- message: 'URL must use http or https',- }),- sortOrder: z.number().optional(),- }),- ),-});--export type SaveLinksInput = z.infer<typeof saveLinksSchema>;--export type LinkRow = {- id: string;- name: string | null;- url: string | null;- sortOrder: number | null;-};diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/mappers/save-my-partner-profile.mapper.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/mappers/save-my-partner-profile.mapper.test.tsdeleted file mode 100644index 7dbc5d84c64..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/mappers/save-my-partner-profile.mapper.test.ts+++ /dev/null@@ -1,228 +0,0 @@-import { describe, expect, it } from 'vitest';--import {- buildPartnerUpdateData,- saveProfileSchema,- validateProfileOptionValues,-} from './save-my-partner-profile.mapper';--describe('saveProfileSchema', () => {- it('accepts a valid partial payload', () => {- const parsed = saveProfileSchema.safeParse({- name: 'Nine Dots Ventures',- city: 'Paris',- });- expect(parsed.success).toBe(true);- });-- it('accepts an empty payload', () => {- expect(saveProfileSchema.safeParse({}).success).toBe(true);- });-- it('accepts a region array', () => {- const parsed = saveProfileSchema.safeParse({ region: ['EUROPE', 'MENA'] });- expect(parsed.success).toBe(true);- });-- it('rejects an unknown key (validationStage)', () => {- const parsed = saveProfileSchema.safeParse({- validationStage: 'VALIDATED',- });- expect(parsed.success).toBe(false);- });-- it('rejects an unknown key (superPartner)', () => {- const parsed = saveProfileSchema.safeParse({ superPartner: true });- expect(parsed.success).toBe(false);- });-- it('rejects a malformed url', () => {- const parsed = saveProfileSchema.safeParse({ website: 'not-a-url' });- expect(parsed.success).toBe(false);- });-- it('accepts a null url (clearing the field)', () => {- const parsed = saveProfileSchema.safeParse({ website: null });- expect(parsed.success).toBe(true);- });-- it('treats an empty-string url as cleared (null), not a validation error', () => {- const parsed = saveProfileSchema.safeParse({ website: '' });- expect(parsed.success).toBe(true);- if (parsed.success) expect(parsed.data.website).toBeNull();- });-- it('rejects a typeOfTeam value outside the known enum', () => {- const parsed = saveProfileSchema.safeParse({ typeOfTeam: 'FREELANCER' });- expect(parsed.success).toBe(false);- });-- it('rejects a negative hourlyRate amount', () => {- expect(- saveProfileSchema.safeParse({- hourlyRate: { amountMicros: -1, currencyCode: 'USD' },- }).success,- ).toBe(false);- });-- it('rejects a non-ISO currency code', () => {- expect(- saveProfileSchema.safeParse({- hourlyRate: { amountMicros: 100, currencyCode: 'DOLLARS' },- }).success,- ).toBe(false);- });-- it('rejects a lowercase currency code (USD only)', () => {- expect(- saveProfileSchema.safeParse({- hourlyRate: { amountMicros: 100, currencyCode: 'usd' },- }).success,- ).toBe(false);- });-- it('accepts null for clearable country and enum fields', () => {- expect(- saveProfileSchema.safeParse({- country: null,- typeOfTeam: null,- availability: null,- }).success,- ).toBe(true);- });-});--describe('validateProfileOptionValues', () => {- it('rejects an unknown country', () => {- const result = validateProfileOptionValues({ country: 'NOPE' });- expect(result).toEqual({ error: 'Unknown country: NOPE' });- });-- it('accepts a known country', () => {- expect(validateProfileOptionValues({ country: 'FRANCE' })).toBeNull();- });-- it('rejects an unknown language', () => {- const result = validateProfileOptionValues({- languagesSpoken: ['ENGLISH', 'KLINGON'],- });- expect(result).toEqual({ error: 'Unknown language: KLINGON' });- });-- it('rejects an unknown partner scope', () => {- const result = validateProfileOptionValues({- partnerScope: ['NOT_A_SCOPE'],- });- expect(result?.error).toContain('NOT_A_SCOPE');- });-- it('returns null when nothing to validate is present', () => {- expect(validateProfileOptionValues({})).toBeNull();- });-- it('accepts a null country (clearing it)', () => {- expect(validateProfileOptionValues({ country: null })).toBeNull();- });-- it('rejects an unknown region', () => {- const result = validateProfileOptionValues({- region: ['EUROPE', 'ATLANTIS'],- });- expect(result).toEqual({ error: 'Unknown region: ATLANTIS' });- });-- it('accepts known regions', () => {- expect(- validateProfileOptionValues({ region: ['EUROPE', 'MENA'] }),- ).toBeNull();- });-});--describe('buildPartnerUpdateData', () => {- it('maps only the keys present on the input', () => {- const data = buildPartnerUpdateData({ name: 'Nine Dots Ventures' });- expect(data).toEqual({ name: 'Nine Dots Ventures' });- });-- it('wraps LINKS fields to { primaryLinkUrl }', () => {- const data = buildPartnerUpdateData({- website: 'https://ninedots.example.com',- linkedin: 'https://linkedin.com/company/nine-dots',- calendarLink: 'https://cal.example.com/nine-dots',- });-- expect(data.website).toEqual({- primaryLinkUrl: 'https://ninedots.example.com',- });- expect(data.linkedin).toEqual({- primaryLinkUrl: 'https://linkedin.com/company/nine-dots',- });- expect(data.calendarLink).toEqual({- primaryLinkUrl: 'https://cal.example.com/nine-dots',- });- });-- it('maps a null LINKS field to null (clearing it)', () => {- const data = buildPartnerUpdateData({ website: null });- expect(data.website).toBeNull();- });-- it('passes CURRENCY fields through as { amountMicros, currencyCode }', () => {- const data = buildPartnerUpdateData({- hourlyRate: { amountMicros: 150000000, currencyCode: 'USD' },- projectBudgetMin: { amountMicros: 1000000000, currencyCode: 'USD' },- });-- expect(data.hourlyRate).toEqual({- amountMicros: 150000000,- currencyCode: 'USD',- });- expect(data.projectBudgetMin).toEqual({- amountMicros: 1000000000,- currencyCode: 'USD',- });- });-- it('maps a null CURRENCY field to null (clearing it)', () => {- const data = buildPartnerUpdateData({ hourlyRate: null });- expect(data.hourlyRate).toBeNull();- });-- it('keeps enum and array values as provided', () => {- const data = buildPartnerUpdateData({- country: 'FRANCE',- languagesSpoken: ['ENGLISH', 'FRENCH'],- partnerScope: ['ADVISORY'],- typeOfTeam: 'AGENCY',- availability: 'AVAILABLE',- skills: ['Salesforce'],- });-- expect(data.country).toBe('FRANCE');- expect(data.languagesSpoken).toEqual(['ENGLISH', 'FRENCH']);- expect(data.partnerScope).toEqual(['ADVISORY']);- expect(data.typeOfTeam).toBe('AGENCY');- expect(data.availability).toBe('AVAILABLE');- expect(data.skills).toEqual(['Salesforce']);- });-- it('maps a null country to null (clearing it)', () => {- expect(buildPartnerUpdateData({ country: null }).country).toBeNull();- });-- it('returns an empty object for an empty input', () => {- expect(buildPartnerUpdateData({})).toEqual({});- });-- it('maps region values as provided', () => {- expect(- buildPartnerUpdateData({ region: ['EUROPE', 'MENA'] }).region,- ).toEqual(['EUROPE', 'MENA']);- });-- it('leaves region off the payload when absent', () => {- expect(- 'region' in buildPartnerUpdateData({ name: 'Nine Dots Ventures' }),- ).toBe(false);- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/mappers/save-my-partner-profile.mapper.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/mappers/save-my-partner-profile.mapper.tsdeleted file mode 100644index 46f0e320697..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/mappers/save-my-partner-profile.mapper.ts+++ /dev/null@@ -1,122 +0,0 @@-import { type CoreSchema } from 'twenty-client-sdk/core';-import { z } from 'zod';--import { PROFILE_OPTIONS } from 'src/modules/partner/self-service/constants/my-profile.constants';-import { optionalHttpUrl } from 'src/modules/shared/utils/http-url.util';--const optionalUrl = optionalHttpUrl;--// Marketplace pricing is USD-only (the profile UI has no currency picker), so pin the-// code and reject negative/NaN amounts rather than accept arbitrary values via the API.-const optionalMoney = z- .object({- amountMicros: z.number().finite().nonnegative(),- currencyCode: z.literal('USD'),- })- .nullable()- .optional();--export const saveProfileSchema = z- .object({- name: z.string().trim().optional(),- introduction: z.string().optional(),- city: z.string().optional(),- // null clears the field; the enum/country selectors send null when reset to blank.- country: z.string().nullable().optional(),- languagesSpoken: z.array(z.string()).optional(),- partnerScope: z.array(z.string()).optional(),- region: z.array(z.string()).optional(),- skills: z.array(z.string()).optional(),- typeOfTeam: z.enum(['SOLO', 'AGENCY']).nullable().optional(),- availability: z.enum(['AVAILABLE', 'UNAVAILABLE']).nullable().optional(),- hourlyRate: optionalMoney,- projectBudgetMin: optionalMoney,- website: optionalUrl,- linkedin: optionalUrl,- calendarLink: optionalUrl,- })- .strict();--export type SaveProfileInput = z.infer<typeof saveProfileSchema>;--const optionValueSet = (options: { value: string }[]): Set<string> =>- new Set(options.map((option) => option.value));--const COUNTRY_VALUES = optionValueSet(PROFILE_OPTIONS.country);-const LANGUAGE_VALUES = optionValueSet(PROFILE_OPTIONS.languagesSpoken);-const PARTNER_SCOPE_VALUES = optionValueSet(PROFILE_OPTIONS.partnerScope);-const REGION_VALUES = optionValueSet(PROFILE_OPTIONS.region);--// Kept separate from buildPartnerUpdateData so each concern (validation vs.-// mapping) is independently unit-testable.-export function validateProfileOptionValues(- input: SaveProfileInput,-): { error: string } | null {- if (input.country != null && !COUNTRY_VALUES.has(input.country)) {- return { error: `Unknown country: ${input.country}` };- }- if (input.languagesSpoken !== undefined) {- const unknown = input.languagesSpoken.find((value) => !LANGUAGE_VALUES.has(value));- if (unknown !== undefined) return { error: `Unknown language: ${unknown}` };- }- if (input.partnerScope !== undefined) {- const unknown = input.partnerScope.find((value) => !PARTNER_SCOPE_VALUES.has(value));- if (unknown !== undefined) return { error: `Unknown partner scope: ${unknown}` };- }- if (input.region !== undefined) {- const unknown = input.region.find((value) => !REGION_VALUES.has(value));- if (unknown !== undefined) return { error: `Unknown region: ${unknown}` };- }- return null;-}--// Pure mapper: assumes validateProfileOptionValues already accepted `input`.-// Only fields present on `input` are copied onto the update payload.-export function buildPartnerUpdateData(- input: SaveProfileInput,-): CoreSchema.PartnerUpdateInput {- const data: CoreSchema.PartnerUpdateInput = {};-- if (input.name !== undefined) data.name = input.name;- if (input.introduction !== undefined) data.introduction = input.introduction;- if (input.city !== undefined) data.city = input.city;- if (input.country !== undefined) {- data.country =- input.country === null ? null : (input.country as CoreSchema.PartnerCountryEnum);- }- if (input.languagesSpoken !== undefined) {- data.languagesSpoken = input.languagesSpoken.map(- (value) => value as CoreSchema.PartnerLanguagesSpokenEnum,- );- }- if (input.partnerScope !== undefined) {- data.partnerScope = input.partnerScope.map(- (value) => value as CoreSchema.PartnerPartnerScopeEnum,- );- }- if (input.region !== undefined) {- data.region = input.region.map((value) => value as CoreSchema.PartnerRegionEnum);- }- if (input.skills !== undefined) data.skills = input.skills;- if (input.typeOfTeam !== undefined) data.typeOfTeam = input.typeOfTeam;- if (input.availability !== undefined) data.availability = input.availability;- if (input.hourlyRate !== undefined) {- data.hourlyRate = input.hourlyRate === null ? null : { ...input.hourlyRate };- }- if (input.projectBudgetMin !== undefined) {- data.projectBudgetMin =- input.projectBudgetMin === null ? null : { ...input.projectBudgetMin };- }- if (input.website !== undefined) {- data.website = input.website === null ? null : { primaryLinkUrl: input.website };- }- if (input.linkedin !== undefined) {- data.linkedin = input.linkedin === null ? null : { primaryLinkUrl: input.linkedin };- }- if (input.calendarLink !== undefined) {- data.calendarLink =- input.calendarLink === null ? null : { primaryLinkUrl: input.calendarLink };- }-- return data;-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/mappers/save-my-partner-services.mapper.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/mappers/save-my-partner-services.mapper.tsdeleted file mode 100644index ceed2cd3c0e..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/mappers/save-my-partner-services.mapper.ts+++ /dev/null@@ -1,21 +0,0 @@-import { z } from 'zod';--export const saveServicesSchema = z.object({- services: z.array(- z.object({- id: z.string().optional(),- title: z.string(),- description: z.string(),- sortOrder: z.number().optional(),- }),- ),-});--export type SaveServicesInput = z.infer<typeof saveServicesSchema>;--export type ServiceRow = {- id: string;- title: string | null;- description: string | null;- sortOrder: number | null;-};diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/mappers/submit-partner-content-for-review.mapper.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/mappers/submit-partner-content-for-review.mapper.tsdeleted file mode 100644index 19c7978e61b..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/mappers/submit-partner-content-for-review.mapper.ts+++ /dev/null@@ -1,13 +0,0 @@-import { z } from 'zod';--export const submitContentForReviewSchema = z.object({- recordId: z.string(),-});--export type SubmitContentForReviewInput = z.infer<typeof submitContentForReviewSchema>;--// Only a WIP row can be submitted — this is the one status transition a partner-// can trigger themselves; every other transition stays staff-controlled.-export function canSubmitForReview(status: string | null): boolean {- return status === 'WIP';-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/navigation-menu-items/my-case-studies.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/navigation-menu-items/my-case-studies.navigation-menu-item.tsdeleted file mode 100644index 5aa1ba5bb61..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/navigation-menu-items/my-case-studies.navigation-menu-item.ts+++ /dev/null@@ -1,19 +0,0 @@-import {- NavigationMenuItemType,- defineNavigationMenuItem,-} from 'twenty-sdk/define';--import { MY_CASE_STUDIES_NAV_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';--import { MY_CASE_STUDIES_PAGE_LAYOUT_ID } from 'src/modules/partner/self-service/constants/my-case-studies.constants';-import { PARTNER_WORKSPACE_FOLDER_UNIVERSAL_IDENTIFIER } from 'src/modules/shared/navigation-menu-items/partner-workspace-folder.navigation-menu-item';--export default defineNavigationMenuItem({- universalIdentifier: MY_CASE_STUDIES_NAV_UNIVERSAL_IDENTIFIER,- name: 'My Case Studies',- type: NavigationMenuItemType.PAGE_LAYOUT,- icon: 'IconBriefcase',- position: 5,- folderUniversalIdentifier: PARTNER_WORKSPACE_FOLDER_UNIVERSAL_IDENTIFIER,- pageLayoutUniversalIdentifier: MY_CASE_STUDIES_PAGE_LAYOUT_ID,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/navigation-menu-items/my-profile.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/navigation-menu-items/my-profile.navigation-menu-item.tsdeleted file mode 100644index 6d8c991dffc..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/navigation-menu-items/my-profile.navigation-menu-item.ts+++ /dev/null@@ -1,21 +0,0 @@-import {- NavigationMenuItemType,- defineNavigationMenuItem,-} from 'twenty-sdk/define';--import {- MY_PROFILE_NAV_ITEM_ID,- MY_PROFILE_PAGE_LAYOUT_ID,-} from 'src/modules/partner/self-service/constants/my-profile.constants';--import { PARTNER_WORKSPACE_FOLDER_UNIVERSAL_IDENTIFIER } from 'src/modules/shared/navigation-menu-items/partner-workspace-folder.navigation-menu-item';--export default defineNavigationMenuItem({- universalIdentifier: MY_PROFILE_NAV_ITEM_ID,- name: 'My Profile',- type: NavigationMenuItemType.PAGE_LAYOUT,- icon: 'IconUser',- position: 4,- folderUniversalIdentifier: PARTNER_WORKSPACE_FOLDER_UNIVERSAL_IDENTIFIER,- pageLayoutUniversalIdentifier: MY_PROFILE_PAGE_LAYOUT_ID,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/on-partner-content-created.logic-function.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/on-partner-content-created.logic-function.tsdeleted file mode 100644index 409e9acb1d1..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/on-partner-content-created.logic-function.ts+++ /dev/null@@ -1,14 +0,0 @@-import { defineLogicFunction } from 'twenty-sdk/define';--import { ON_PARTNER_CONTENT_CREATED_FN_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { onPartnerContentCreated } from 'src/modules/partner/self-service/services/on-partner-content-created.service';--export const handler = onPartnerContentCreated;--export default defineLogicFunction({- universalIdentifier: ON_PARTNER_CONTENT_CREATED_FN_UNIVERSAL_IDENTIFIER,- name: 'on-partner-content-created',- timeoutSeconds: 10,- handler,- databaseEventTriggerSettings: { eventName: 'partnerContent.created' },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/on-partner-link-created.logic-function.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/on-partner-link-created.logic-function.tsdeleted file mode 100644index d96ac51677b..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/on-partner-link-created.logic-function.ts+++ /dev/null@@ -1,14 +0,0 @@-import { defineLogicFunction } from 'twenty-sdk/define';--import { ON_PARTNER_LINK_CREATED_FN_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { onPartnerLinkCreated } from 'src/modules/partner/self-service/services/on-partner-link-created.service';--export const handler = onPartnerLinkCreated;--export default defineLogicFunction({- universalIdentifier: ON_PARTNER_LINK_CREATED_FN_UNIVERSAL_IDENTIFIER,- name: 'on-partner-link-created',- timeoutSeconds: 10,- handler,- databaseEventTriggerSettings: { eventName: 'partnerLink.created' },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/on-partner-service-created.logic-function.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/on-partner-service-created.logic-function.tsdeleted file mode 100644index 8bbd893b96b..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/on-partner-service-created.logic-function.ts+++ /dev/null@@ -1,14 +0,0 @@-import { defineLogicFunction } from 'twenty-sdk/define';--import { ON_PARTNER_SERVICE_CREATED_FN_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { onPartnerServiceCreated } from 'src/modules/partner/self-service/services/on-partner-service-created.service';--export const handler = onPartnerServiceCreated;--export default defineLogicFunction({- universalIdentifier: ON_PARTNER_SERVICE_CREATED_FN_UNIVERSAL_IDENTIFIER,- name: 'on-partner-service-created',- timeoutSeconds: 10,- handler,- databaseEventTriggerSettings: { eventName: 'partnerService.created' },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/page-layouts/my-case-studies.page-layout.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/page-layouts/my-case-studies.page-layout.tsdeleted file mode 100644index e5b6e1076c8..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/page-layouts/my-case-studies.page-layout.ts+++ /dev/null@@ -1,36 +0,0 @@-import { definePageLayout, PageLayoutTabLayoutMode } from 'twenty-sdk/define';--import {- MY_CASE_STUDIES_FRONT_COMPONENT_ID,- MY_CASE_STUDIES_PAGE_LAYOUT_ID,- MY_CASE_STUDIES_PAGE_TAB_ID,- MY_CASE_STUDIES_PAGE_WIDGET_ID,-} from 'src/modules/partner/self-service/constants/my-case-studies.constants';--export default definePageLayout({- universalIdentifier: MY_CASE_STUDIES_PAGE_LAYOUT_ID,- name: 'My Case Studies',- type: 'STANDALONE_PAGE',- tabs: [- {- universalIdentifier: MY_CASE_STUDIES_PAGE_TAB_ID,- title: 'My Case Studies',- position: 0,- icon: 'IconBriefcase',- layoutMode: PageLayoutTabLayoutMode.CANVAS,- widgets: [- {- universalIdentifier: MY_CASE_STUDIES_PAGE_WIDGET_ID,- title: 'My Case Studies',- type: 'FRONT_COMPONENT',- position: { layoutMode: PageLayoutTabLayoutMode.CANVAS },- configuration: {- configurationType: 'FRONT_COMPONENT',- frontComponentUniversalIdentifier:- MY_CASE_STUDIES_FRONT_COMPONENT_ID,- },- },- ],- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/page-layouts/my-profile.page-layout.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/page-layouts/my-profile.page-layout.tsdeleted file mode 100644index bbe3be3e074..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/page-layouts/my-profile.page-layout.ts+++ /dev/null@@ -1,35 +0,0 @@-import { definePageLayout, PageLayoutTabLayoutMode } from 'twenty-sdk/define';--import {- MY_PROFILE_FRONT_COMPONENT_ID,- MY_PROFILE_PAGE_LAYOUT_ID,- MY_PROFILE_PAGE_TAB_ID,- MY_PROFILE_PAGE_WIDGET_ID,-} from 'src/modules/partner/self-service/constants/my-profile.constants';--export default definePageLayout({- universalIdentifier: MY_PROFILE_PAGE_LAYOUT_ID,- name: 'My Profile',- type: 'STANDALONE_PAGE',- tabs: [- {- universalIdentifier: MY_PROFILE_PAGE_TAB_ID,- title: 'My Profile',- position: 0,- icon: 'IconUser',- layoutMode: PageLayoutTabLayoutMode.CANVAS,- widgets: [- {- universalIdentifier: MY_PROFILE_PAGE_WIDGET_ID,- title: 'My Profile',- type: 'FRONT_COMPONENT',- position: { layoutMode: PageLayoutTabLayoutMode.CANVAS },- configuration: {- configurationType: 'FRONT_COMPONENT',- frontComponentUniversalIdentifier: MY_PROFILE_FRONT_COMPONENT_ID,- },- },- ],- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/save-my-partner-content.logic-function.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/save-my-partner-content.logic-function.tsdeleted file mode 100644index edb4bafbea5..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/save-my-partner-content.logic-function.ts+++ /dev/null@@ -1,25 +0,0 @@-import { defineLogicFunction, type RoutePayload } from 'twenty-sdk/define';--import {- saveMyPartnerContent,- type SaveContentResult,-} from 'src/modules/partner/self-service/services/save-my-partner-content.service';--export const SAVE_MY_PARTNER_CONTENT_ID = 'e574fc61-6d9e-48db-9e98-a9b8160188cc';--export const handler = (event: RoutePayload<unknown>): Promise<SaveContentResult> =>- saveMyPartnerContent(event);--export default defineLogicFunction({- universalIdentifier: SAVE_MY_PARTNER_CONTENT_ID,- name: 'save-my-partner-content',- description:- "Reconciles the calling partner's own case studies (create/update/delete in one call); each row is published (APPROVED) or kept as a draft (WIP) per its published flag.",- timeoutSeconds: 20,- handler,- httpRouteTriggerSettings: {- path: '/save-my-partner-content',- httpMethod: 'POST',- isAuthRequired: true,- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/save-my-partner-links.logic-function.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/save-my-partner-links.logic-function.tsdeleted file mode 100644index da982c7ab22..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/save-my-partner-links.logic-function.ts+++ /dev/null@@ -1,24 +0,0 @@-import { defineLogicFunction, type RoutePayload } from 'twenty-sdk/define';--import {- saveMyPartnerLinks,- type SaveLinksResult,-} from 'src/modules/partner/self-service/services/save-my-partner-links.service';--export const SAVE_MY_PARTNER_LINKS_ID = 'b56d1158-4e79-4fdb-a7c4-e0f8871b2d42';--export const handler = (event: RoutePayload<unknown>): Promise<SaveLinksResult> =>- saveMyPartnerLinks(event);--export default defineLogicFunction({- universalIdentifier: SAVE_MY_PARTNER_LINKS_ID,- name: 'save-my-partner-links',- description: "Reconciles the calling partner's own links (create/update/delete in one call).",- timeoutSeconds: 20,- handler,- httpRouteTriggerSettings: {- path: '/save-my-partner-links',- httpMethod: 'POST',- isAuthRequired: true,- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/save-my-partner-profile.logic-function.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/save-my-partner-profile.logic-function.tsdeleted file mode 100644index 05ad5d87e65..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/save-my-partner-profile.logic-function.ts+++ /dev/null@@ -1,24 +0,0 @@-import { defineLogicFunction, type RoutePayload } from 'twenty-sdk/define';--import {- saveMyPartnerProfile,- type SaveResult,-} from 'src/modules/partner/self-service/services/save-my-partner-profile.service';--export const SAVE_MY_PARTNER_PROFILE_ID = 'de21e2a6-f4b4-4186-90d9-645015e856a1';--export const handler = (event: RoutePayload<unknown>): Promise<SaveResult> =>- saveMyPartnerProfile(event);--export default defineLogicFunction({- universalIdentifier: SAVE_MY_PARTNER_PROFILE_ID,- name: 'save-my-partner-profile',- description: "Saves the calling partner's own editable profile fields.",- timeoutSeconds: 15,- handler,- httpRouteTriggerSettings: {- path: '/save-my-partner-profile',- httpMethod: 'POST',- isAuthRequired: true,- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/save-my-partner-services.logic-function.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/save-my-partner-services.logic-function.tsdeleted file mode 100644index d602e54235d..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/save-my-partner-services.logic-function.ts+++ /dev/null@@ -1,25 +0,0 @@-import { defineLogicFunction, type RoutePayload } from 'twenty-sdk/define';--import {- saveMyPartnerServices,- type SaveServicesResult,-} from 'src/modules/partner/self-service/services/save-my-partner-services.service';--export const SAVE_MY_PARTNER_SERVICES_ID = '878a6e36-62f4-4590-807d-ef6204d2d168';--export const handler = (event: RoutePayload<unknown>): Promise<SaveServicesResult> =>- saveMyPartnerServices(event);--export default defineLogicFunction({- universalIdentifier: SAVE_MY_PARTNER_SERVICES_ID,- name: 'save-my-partner-services',- description:- "Reconciles the calling partner's own services (create/update/delete in one call).",- timeoutSeconds: 20,- handler,- httpRouteTriggerSettings: {- path: '/save-my-partner-services',- httpMethod: 'POST',- isAuthRequired: true,- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/get-my-partner-profile.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/get-my-partner-profile.service.tsdeleted file mode 100644index e9c196bb246..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/get-my-partner-profile.service.ts+++ /dev/null@@ -1,46 +0,0 @@-import { type RoutePayload } from 'twenty-sdk/define';--import {- PROFILE_OPTIONS,- type ProfileOptions,-} from 'src/modules/partner/self-service/constants/my-profile.constants';-import { findMyPartnerProfile } from 'src/modules/partner/self-service/graphql/queries/find-my-partner-profile';-import {- mapMyProfilePayload,- type MyProfilePayload,-} from 'src/modules/partner/self-service/mappers/get-my-partner-profile.mapper';-import {- buildAppClient,- errorResponse,- failureResponse,- resolvePartnerFromRequest,-} from 'src/modules/shared/http/resolve-partner-from-request.service';--export type MyPartnerProfileResult =- | { ok: true; profile: MyProfilePayload; options: ProfileOptions }- | { ok: false; reason: string };--export const getMyPartnerProfile = async (- event: RoutePayload<unknown>,-): Promise<MyPartnerProfileResult> => {- const resolved = await resolvePartnerFromRequest(event);- if ('error' in resolved) return errorResponse(resolved.error);-- try {- const client = buildAppClient();- const result = await findMyPartnerProfile(client, resolved.partnerId);- const node = result.partners?.edges?.[0]?.node;-- if (!node) {- return errorResponse('NO_PARTNER');- }-- return {- ok: true,- profile: mapMyProfilePayload(node),- options: PROFILE_OPTIONS,- };- } catch (err) {- return failureResponse('get-my-partner-profile', err);- }-};diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/on-partner-content-created.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/on-partner-content-created.service.tsdeleted file mode 100644index f8f80cd4072..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/on-partner-content-created.service.ts+++ /dev/null@@ -1,57 +0,0 @@-import { CoreApiClient, type CoreSchema } from 'twenty-client-sdk/core';-import {- type DatabaseEventPayload,- type ObjectRecordCreateEvent,-} from 'twenty-sdk/define';--import { updatePartnerContent } from 'src/modules/partner/self-service/graphql/mutations/update-partner-content';-import { findPartnerByMember } from 'src/modules/shared/graphql/queries/find-partner-by-member';-import { stampPartnerUserFromPartner } from 'src/modules/partner/self-service/services/stamp-partner-user-on-child.service';--const CASE_STUDY_CONTENT_TYPE: CoreSchema.PartnerContent['contentType'] = [- 'CASE_STUDY',-];--// Default to CASE_STUDY only when the caller left contentType empty (the self-service path);-// an explicit CUSTOMER_QUOTE / PARTNER_QUOTE / LOGO must be preserved, not overwritten.-const hasNoContentType = (- contentType: CoreSchema.PartnerContent['contentType'] | null | undefined,-): boolean => !contentType || contentType.length === 0;--export const onPartnerContentCreated = async (- payload: DatabaseEventPayload<ObjectRecordCreateEvent<CoreSchema.PartnerContent>>,-): Promise<Record<string, unknown>> => {- const after = payload.properties.after;- const childId = after?.id;- if (!childId) return {};-- const client = new CoreApiClient();- let partnerId = after.partnerId;-- if (!partnerId) {- const memberId = after.createdBy?.workspaceMemberId;- if (!memberId) return {};-- const partnerRes = await findPartnerByMember(client, memberId);- partnerId = partnerRes.partners?.edges?.[0]?.node?.id;- if (!partnerId) return {};-- await updatePartnerContent(client, childId, {- partnerId,- partnerUserId: memberId,- ...(hasNoContentType(after.contentType)- ? { contentType: CASE_STUDY_CONTENT_TYPE }- : {}),- });-- return { linked: true, partnerId };- }-- await stampPartnerUserFromPartner(client, partnerId, 'partnerContent', childId);-- if (hasNoContentType(after.contentType)) {- await updatePartnerContent(client, childId, { contentType: CASE_STUDY_CONTENT_TYPE });- }-- return { stamped: true };-};diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/on-partner-link-created.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/on-partner-link-created.service.tsdeleted file mode 100644index e13a5f71ca0..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/on-partner-link-created.service.ts+++ /dev/null@@ -1,39 +0,0 @@-import { CoreApiClient, type CoreSchema } from 'twenty-client-sdk/core';-import {- type DatabaseEventPayload,- type ObjectRecordCreateEvent,-} from 'twenty-sdk/define';--import { updatePartnerLink } from 'src/modules/partner/self-service/graphql/mutations/update-partner-link';-import { findPartnerByMember } from 'src/modules/shared/graphql/queries/find-partner-by-member';-import { stampPartnerUserFromPartner } from 'src/modules/partner/self-service/services/stamp-partner-user-on-child.service';--export const onPartnerLinkCreated = async (- payload: DatabaseEventPayload<ObjectRecordCreateEvent<CoreSchema.PartnerLink>>,-): Promise<Record<string, unknown>> => {- const after = payload.properties.after;- const childId = after?.id;- if (!childId) return {};-- const client = new CoreApiClient();- let partnerId = after.partnerId;-- if (!partnerId) {- const memberId = after.createdBy?.workspaceMemberId;- if (!memberId) return {};-- const partnerRes = await findPartnerByMember(client, memberId);- partnerId = partnerRes.partners?.edges?.[0]?.node?.id;- if (!partnerId) return {};-- await updatePartnerLink(client, childId, {- partnerId,- partnerUserId: memberId,- });-- return { linked: true, partnerId };- }-- await stampPartnerUserFromPartner(client, partnerId, 'partnerLink', childId);- return { stamped: true };-};diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/on-partner-service-created.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/on-partner-service-created.service.tsdeleted file mode 100644index 09902c51421..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/on-partner-service-created.service.ts+++ /dev/null@@ -1,39 +0,0 @@-import { CoreApiClient, type CoreSchema } from 'twenty-client-sdk/core';-import {- type DatabaseEventPayload,- type ObjectRecordCreateEvent,-} from 'twenty-sdk/define';--import { updatePartnerService } from 'src/modules/partner/self-service/graphql/mutations/update-partner-service';-import { findPartnerByMember } from 'src/modules/shared/graphql/queries/find-partner-by-member';-import { stampPartnerUserFromPartner } from 'src/modules/partner/self-service/services/stamp-partner-user-on-child.service';--export const onPartnerServiceCreated = async (- payload: DatabaseEventPayload<ObjectRecordCreateEvent<CoreSchema.PartnerService>>,-): Promise<Record<string, unknown>> => {- const after = payload.properties.after;- const childId = after?.id;- if (!childId) return {};-- const client = new CoreApiClient();- let partnerId = after.partnerId;-- if (!partnerId) {- const memberId = after.createdBy?.workspaceMemberId;- if (!memberId) return {};-- const partnerRes = await findPartnerByMember(client, memberId);- partnerId = partnerRes.partners?.edges?.[0]?.node?.id;- if (!partnerId) return {};-- await updatePartnerService(client, childId, {- partnerId,- partnerUserId: memberId,- });-- return { linked: true, partnerId };- }-- await stampPartnerUserFromPartner(client, partnerId, 'partnerService', childId);- return { stamped: true };-};diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/save-my-partner-content.service.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/save-my-partner-content.service.test.tsdeleted file mode 100644index f18b8117724..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/save-my-partner-content.service.test.ts+++ /dev/null@@ -1,117 +0,0 @@-import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';-import { type RoutePayload } from 'twenty-sdk/define';--const { queryMock, mutationMock } = vi.hoisted(() => ({- queryMock: vi.fn(),- mutationMock: vi.fn(),-}));--vi.mock('twenty-client-sdk/core', () => ({- CoreApiClient: vi.fn(function () {- return { query: queryMock, mutation: mutationMock };- }),-}));--import { saveMyPartnerContent } from './save-my-partner-content.service';--const USER_ID = 'user-1';-const USER_WORKSPACE_ID = 'user-workspace-1';-const WORKSPACE_MEMBER_ID = 'member-1';-const PARTNER_ID = 'partner-1';--const APP_TOKEN = `header.${Buffer.from(- JSON.stringify({ userId: USER_ID, userWorkspaceId: USER_WORKSPACE_ID }),-).toString('base64url')}.sig`;--const QUERY_RESPONSES: Record<string, unknown> = {- workspaceMembers: { edges: [{ node: { id: WORKSPACE_MEMBER_ID } }] },- partners: { edges: [{ node: { id: PARTNER_ID, name: 'Atlas' } }] },- partnerContents: { edges: [] },-};--const routeEvent = (body: unknown): RoutePayload<unknown> =>- ({ body, userWorkspaceId: USER_WORKSPACE_ID }) as RoutePayload<unknown>;--describe('saveMyPartnerContent', () => {- const originalToken = process.env.TWENTY_APP_ACCESS_TOKEN;-- afterEach(() => {- if (originalToken === undefined) delete process.env.TWENTY_APP_ACCESS_TOKEN;- else process.env.TWENTY_APP_ACCESS_TOKEN = originalToken;- });-- beforeEach(() => {- queryMock.mockReset();- mutationMock.mockReset();- process.env.TWENTY_APP_ACCESS_TOKEN = APP_TOKEN;- mutationMock.mockResolvedValue({- createPartnerContent: { id: 'content-1' },- });- queryMock.mockImplementation((selection: Record<string, unknown>) => {- const key = Object.keys(selection)[0] as string;- return Promise.resolve({ [key]: QUERY_RESPONSES[key] });- });- });-- it('creates with the authenticated partnerUserId so RLS accepts the insert', async () => {- const result = await saveMyPartnerContent(- routeEvent({- caseStudies: [- {- name: 'Atlas rollout',- clientName: 'Acme',- headline: 'A migration',- bodyMarkdown: 'How Acme migrated.',- caseStudyLink: 'https://example.com/atlas',- coverImageUrl: 'https://cdn.example.com/cover.png',- published: false,- },- ],- }),- );-- expect(result).toMatchObject({- ok: true,- caseStudies: [{ id: 'content-1', name: 'Atlas rollout', status: 'WIP' }],- });- expect(mutationMock).toHaveBeenCalledTimes(1);- expect(mutationMock).toHaveBeenCalledWith({- createPartnerContent: {- __args: {- data: expect.objectContaining({- name: 'Atlas rollout',- partnerUserId: WORKSPACE_MEMBER_ID,- status: 'WIP',- }),- },- id: true,- },- });-- const createData =- mutationMock.mock.calls[0][0].createPartnerContent.__args.data;- expect(createData).not.toHaveProperty('partnerId');- expect(createData).not.toHaveProperty('contentType');- });-- it('never reads partnerUserId from the request body', async () => {- await saveMyPartnerContent(- routeEvent({- caseStudies: [- {- name: 'Atlas rollout',- partnerUserId: 'spoofed-member',- partnerId: 'spoofed-partner',- },- ],- }),- );-- expect(mutationMock).toHaveBeenCalledTimes(1);-- const createData =- mutationMock.mock.calls[0][0].createPartnerContent.__args.data;- expect(createData.partnerUserId).toBe(WORKSPACE_MEMBER_ID);- expect(createData).not.toHaveProperty('partnerId');- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/save-my-partner-content.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/save-my-partner-content.service.tsdeleted file mode 100644index ffbee4ecb05..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/save-my-partner-content.service.ts+++ /dev/null@@ -1,122 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';-import { type RoutePayload } from 'twenty-sdk/define';--import { createPartnerContent } from 'src/modules/partner/self-service/graphql/mutations/create-partner-content';-import { deletePartnerContent } from 'src/modules/partner/self-service/graphql/mutations/delete-partner-content';-import { updatePartnerContent } from 'src/modules/partner/self-service/graphql/mutations/update-partner-content';-import { findPartnerContentIds } from 'src/modules/partner/self-service/graphql/queries/find-partner-content-ids';-import { findPartnerContentRows } from 'src/modules/partner/self-service/graphql/queries/find-partner-content-rows';-import {- buildContentCreateData,- buildContentUpdateData,- type CaseStudyRow,- saveContentSchema,-} from 'src/modules/partner/self-service/mappers/save-my-partner-content.mapper';-import {- buildAppClient,- errorResponse,- failureResponse,- resolvePartnerFromRequest,-} from 'src/modules/shared/http/resolve-partner-from-request.service';-import { buildReconcilePlan } from 'src/modules/partner/self-service/utils/reconcile-children';-import { isCaseStudy } from 'src/modules/partner/utils/content-type';--export type SaveContentResult =- | { ok: true; caseStudies: CaseStudyRow[] }- | { ok: false; reason: string };--const queryExistingContentIds = async (- client: CoreApiClient,- partnerId: string,-): Promise<string[]> => {- const result = await findPartnerContentIds(client, partnerId);- return (result.partnerContents?.edges ?? [])- .filter((edge) => isCaseStudy(edge.node.contentType))- .map((edge) => edge.node.id);-};--const queryContentRows = async (- client: CoreApiClient,- partnerId: string,-): Promise<CaseStudyRow[]> => {- const result = await findPartnerContentRows(client, partnerId);- return (result.partnerContents?.edges ?? [])- .filter((edge) => isCaseStudy(edge.node.contentType))- .map((edge) => ({- id: edge.node.id,- name: edge.node.name ?? null,- clientName: edge.node.clientName ?? null,- headline: edge.node.headline ?? null,- bodyMarkdown: edge.node.body?.markdown ?? null,- coverImageUrl: edge.node.coverImageUrl || null,- caseStudyLink: edge.node.caseStudyLink?.primaryLinkUrl ?? null,- status: edge.node.status ?? null,- }));-};--export const saveMyPartnerContent = async (- event: RoutePayload<unknown>,-): Promise<SaveContentResult> => {- const resolved = await resolvePartnerFromRequest(event);- if ('error' in resolved) return errorResponse(resolved.error);-- const parsed = saveContentSchema.safeParse(event.body);- if (!parsed.success) {- return errorResponse(parsed.error.issues[0]?.message ?? 'invalid_input');- }-- try {- const client = buildAppClient();- const existingIds = await queryExistingContentIds(- client,- resolved.partnerId,- );-- const plan = buildReconcilePlan(existingIds, parsed.data.caseStudies);- if (!plan) return errorResponse('FORBIDDEN');-- // The re-read filters on partnerId, which the trigger stamps asynchronously, so a- // just-created row is usually still absent. Return it optimistically from input + new id.- const createdRows: CaseStudyRow[] = [];- for (const item of plan.toCreate) {- // partnerUser is the RLS predicate field, and the server exempts predicate fields from- // the field lock on insert only — so this locked field is writable here and nowhere else.- const created = await createPartnerContent(client, {- ...buildContentCreateData(item),- partnerUserId: resolved.workspaceMemberId,- });- const newId = created.createPartnerContent?.id;- if (newId !== undefined) {- createdRows.push({- id: newId,- name: item.name,- clientName: item.clientName ?? null,- headline: item.headline ?? null,- bodyMarkdown: item.bodyMarkdown ?? null,- coverImageUrl: item.coverImageUrl ?? null,- caseStudyLink: item.caseStudyLink ?? null,- status: item.published ? 'APPROVED' : 'WIP',- });- }- }-- for (const item of plan.toUpdate) {- // buildReconcilePlan only puts items with a defined id into toUpdate.- if (item.id === undefined) continue;- await updatePartnerContent(client, item.id, buildContentUpdateData(item));- }-- for (const id of plan.toDelete) {- await deletePartnerContent(client, id);- }-- // A just-created row can surface in the re-read too once the trigger stamps its- // partnerId, so drop those ids before appending the optimistic createdRows.- const existingRows = await queryContentRows(client, resolved.partnerId);- const createdIds = new Set(createdRows.map((row) => row.id));- const deduped = existingRows.filter((row) => !createdIds.has(row.id));- return { ok: true, caseStudies: [...deduped, ...createdRows] };- } catch (err) {- return failureResponse('save-my-partner-content', err);- }-};diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/save-my-partner-links.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/save-my-partner-links.service.tsdeleted file mode 100644index 76a96187d86..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/save-my-partner-links.service.ts+++ /dev/null@@ -1,92 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';-import { type RoutePayload } from 'twenty-sdk/define';--import { createPartnerLink } from 'src/modules/partner/self-service/graphql/mutations/create-partner-link';-import { deletePartnerLink } from 'src/modules/partner/self-service/graphql/mutations/delete-partner-link';-import { updatePartnerLink } from 'src/modules/partner/self-service/graphql/mutations/update-partner-link';-import { findPartnerLinkIds } from 'src/modules/partner/self-service/graphql/queries/find-partner-link-ids';-import { findPartnerLinkRows } from 'src/modules/partner/self-service/graphql/queries/find-partner-link-rows';-import {- type LinkRow,- saveLinksSchema,-} from 'src/modules/partner/self-service/mappers/save-my-partner-links.mapper';-import {- buildAppClient,- errorResponse,- failureResponse,- resolvePartnerFromRequest,-} from 'src/modules/shared/http/resolve-partner-from-request.service';-import { buildReconcilePlan } from 'src/modules/partner/self-service/utils/reconcile-children';--export type SaveLinksResult =- | { ok: true; links: LinkRow[] }- | { ok: false; reason: string };--const queryExistingLinkIds = async (- client: CoreApiClient,- partnerId: string,-): Promise<string[]> => {- const result = await findPartnerLinkIds(client, partnerId);- return (result.partnerLinks?.edges ?? []).map((edge) => edge.node.id);-};--const queryLinkRows = async (- client: CoreApiClient,- partnerId: string,-): Promise<LinkRow[]> => {- const result = await findPartnerLinkRows(client, partnerId);- return (result.partnerLinks?.edges ?? []).map((edge) => ({- id: edge.node.id,- name: edge.node.name ?? null,- url: edge.node.url?.primaryLinkUrl ?? null,- sortOrder: edge.node.sortOrder ?? null,- }));-};--export const saveMyPartnerLinks = async (- event: RoutePayload<unknown>,-): Promise<SaveLinksResult> => {- const resolved = await resolvePartnerFromRequest(event);- if ('error' in resolved) return errorResponse(resolved.error);-- const parsed = saveLinksSchema.safeParse(event.body);- if (!parsed.success) {- return errorResponse(parsed.error.issues[0]?.message ?? 'invalid_input');- }-- try {- const client = buildAppClient();- const existingIds = await queryExistingLinkIds(client, resolved.partnerId);-- const plan = buildReconcilePlan(existingIds, parsed.data.links);- if (!plan) return errorResponse('FORBIDDEN');-- for (const link of plan.toCreate) {- await createPartnerLink(client, {- partnerId: resolved.partnerId,- name: link.name,- url: { primaryLinkUrl: link.url },- sortOrder: link.sortOrder,- });- }-- for (const link of plan.toUpdate) {- // buildReconcilePlan only puts items with a defined id into toUpdate.- if (link.id === undefined) continue;- await updatePartnerLink(client, link.id, {- name: link.name,- url: { primaryLinkUrl: link.url },- sortOrder: link.sortOrder,- });- }-- for (const id of plan.toDelete) {- await deletePartnerLink(client, id);- }-- const links = await queryLinkRows(client, resolved.partnerId);- return { ok: true, links };- } catch (err) {- return failureResponse('save-my-partner-links', err);- }-};diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/save-my-partner-profile.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/save-my-partner-profile.service.tsdeleted file mode 100644index 49c242bf784..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/save-my-partner-profile.service.ts+++ /dev/null@@ -1,42 +0,0 @@-import { type RoutePayload } from 'twenty-sdk/define';--import { updatePartner } from 'src/modules/partner/self-service/graphql/mutations/update-partner';-import {- buildPartnerUpdateData,- saveProfileSchema,- validateProfileOptionValues,-} from 'src/modules/partner/self-service/mappers/save-my-partner-profile.mapper';-import {- buildAppClient,- errorResponse,- failureResponse,- resolvePartnerFromRequest,-} from 'src/modules/shared/http/resolve-partner-from-request.service';--export type SaveResult = { ok: true } | { ok: false; reason: string };--export const saveMyPartnerProfile = async (- event: RoutePayload<unknown>,-): Promise<SaveResult> => {- const resolved = await resolvePartnerFromRequest(event);- if ('error' in resolved) return errorResponse(resolved.error);-- const parsed = saveProfileSchema.safeParse(event.body);- if (!parsed.success) {- return errorResponse(parsed.error.issues[0]?.message ?? 'invalid_input');- }- const input = parsed.data;-- const optionError = validateProfileOptionValues(input);- if (optionError) return errorResponse(optionError.error);-- const data = buildPartnerUpdateData(input);-- try {- const client = buildAppClient();- await updatePartner(client, resolved.partnerId, data);- return { ok: true };- } catch (err) {- return failureResponse('save-my-partner-profile', err);- }-};diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/save-my-partner-services.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/save-my-partner-services.service.tsdeleted file mode 100644index 564464542f4..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/save-my-partner-services.service.ts+++ /dev/null@@ -1,95 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';-import { type RoutePayload } from 'twenty-sdk/define';--import { createPartnerService } from 'src/modules/partner/self-service/graphql/mutations/create-partner-service';-import { deletePartnerService } from 'src/modules/partner/self-service/graphql/mutations/delete-partner-service';-import { updatePartnerService } from 'src/modules/partner/self-service/graphql/mutations/update-partner-service';-import { findPartnerServiceIds } from 'src/modules/partner/self-service/graphql/queries/find-partner-service-ids';-import { findPartnerServiceRows } from 'src/modules/partner/self-service/graphql/queries/find-partner-service-rows';-import {- saveServicesSchema,- type ServiceRow,-} from 'src/modules/partner/self-service/mappers/save-my-partner-services.mapper';-import {- buildAppClient,- errorResponse,- failureResponse,- resolvePartnerFromRequest,-} from 'src/modules/shared/http/resolve-partner-from-request.service';-import { buildReconcilePlan } from 'src/modules/partner/self-service/utils/reconcile-children';--export type SaveServicesResult =- | { ok: true; services: ServiceRow[] }- | { ok: false; reason: string };--const queryExistingServiceIds = async (- client: CoreApiClient,- partnerId: string,-): Promise<string[]> => {- const result = await findPartnerServiceIds(client, partnerId);- return (result.partnerServices?.edges ?? []).map((edge) => edge.node.id);-};--const queryServiceRows = async (- client: CoreApiClient,- partnerId: string,-): Promise<ServiceRow[]> => {- const result = await findPartnerServiceRows(client, partnerId);- return (result.partnerServices?.edges ?? []).map((edge) => ({- id: edge.node.id,- title: edge.node.title ?? null,- description: edge.node.description ?? null,- sortOrder: edge.node.sortOrder ?? null,- }));-};--export const saveMyPartnerServices = async (- event: RoutePayload<unknown>,-): Promise<SaveServicesResult> => {- const resolved = await resolvePartnerFromRequest(event);- if ('error' in resolved) return errorResponse(resolved.error);-- const parsed = saveServicesSchema.safeParse(event.body);- if (!parsed.success) {- return errorResponse(parsed.error.issues[0]?.message ?? 'invalid_input');- }-- try {- const client = buildAppClient();- const existingIds = await queryExistingServiceIds(- client,- resolved.partnerId,- );-- const plan = buildReconcilePlan(existingIds, parsed.data.services);- if (!plan) return errorResponse('FORBIDDEN');-- for (const service of plan.toCreate) {- await createPartnerService(client, {- partnerId: resolved.partnerId,- title: service.title,- description: service.description,- sortOrder: service.sortOrder,- });- }-- for (const service of plan.toUpdate) {- // buildReconcilePlan only puts items with a defined id into toUpdate.- if (service.id === undefined) continue;- await updatePartnerService(client, service.id, {- title: service.title,- description: service.description,- sortOrder: service.sortOrder,- });- }-- for (const id of plan.toDelete) {- await deletePartnerService(client, id);- }-- const services = await queryServiceRows(client, resolved.partnerId);- return { ok: true, services };- } catch (err) {- return failureResponse('save-my-partner-services', err);- }-};diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/stamp-partner-user-on-child.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/stamp-partner-user-on-child.service.tsdeleted file mode 100644index abed595977f..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/stamp-partner-user-on-child.service.ts+++ /dev/null@@ -1,45 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--import { getPartnerOwner } from 'src/modules/shared/graphql/queries/get-partner-owner';-import {- getApplicationPartnerUser,- getPartnerContentPartnerUser,- getPartnerLinkPartnerUser,- getPartnerServicePartnerUser,-} from 'src/modules/shared/graphql/queries/get-child-partner-user';-import { updateApplicationPartnerUser } from 'src/modules/shared/graphql/mutations/update-application-partner-user';-import { updatePartnerContentPartnerUser } from 'src/modules/shared/graphql/mutations/update-partner-content-partner-user';-import { updatePartnerLinkPartnerUser } from 'src/modules/shared/graphql/mutations/update-partner-link-partner-user';-import { updatePartnerServicePartnerUser } from 'src/modules/shared/graphql/mutations/update-partner-service-partner-user';--export type PartnerChildObject =- | 'partnerLink'- | 'partnerService'- | 'partnerContent'- | 'application';--const CHILD_ACCESSORS = {- partnerLink: { read: getPartnerLinkPartnerUser, write: updatePartnerLinkPartnerUser },- partnerService: { read: getPartnerServicePartnerUser, write: updatePartnerServicePartnerUser },- partnerContent: { read: getPartnerContentPartnerUser, write: updatePartnerContentPartnerUser },- application: { read: getApplicationPartnerUser, write: updateApplicationPartnerUser },-} as const;--export const stampPartnerUserFromPartner = async (- client: CoreApiClient,- partnerId: string,- childObject: PartnerChildObject,- childId: string,-): Promise<void> => {- const partnerUserId = (await getPartnerOwner(client, partnerId)).partners?.edges?.[0]?.node- ?.partnerUserId;- if (!partnerUserId) return;-- const { read, write } = CHILD_ACCESSORS[childObject];- const child = await read(client, childId);-- if (!child) return;- if (child.partnerUserId === partnerUserId) return;-- await write(client, childId, partnerUserId);-};diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/stamp-partner-user-on-child.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/stamp-partner-user-on-child.test.tsdeleted file mode 100644index 913845eaa1d..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/stamp-partner-user-on-child.test.ts+++ /dev/null@@ -1,102 +0,0 @@-import { beforeEach, describe, expect, it, vi } from 'vitest';-import { type CoreApiClient } from 'twenty-client-sdk/core';--import { stampPartnerUserFromPartner } from './stamp-partner-user-on-child.service';--const oneEdge = (node: Record<string, unknown>) => ({ edges: [{ node }] });-const noEdges = { edges: [] };--describe('stampPartnerUserFromPartner', () => {- const query = vi.fn();- const mutation = vi.fn();-- const client = {- query,- mutation,- } as unknown as CoreApiClient;-- beforeEach(() => {- query.mockReset();- mutation.mockReset();- mutation.mockResolvedValue({});- });-- it('stamps partnerLink partnerUserId when missing', async () => {- query- .mockResolvedValueOnce({ partners: oneEdge({ id: 'partner-1', partnerUserId: 'member-1' }) })- .mockResolvedValueOnce({ partnerLinks: oneEdge({ id: 'link-1', partnerUserId: null }) });-- await stampPartnerUserFromPartner(client, 'partner-1', 'partnerLink', 'link-1');-- expect(mutation).toHaveBeenCalledWith({- updatePartnerLink: { __args: { id: 'link-1', data: { partnerUserId: 'member-1' } }, id: true },- });- });-- it('stamps application partnerUserId when missing', async () => {- query- .mockResolvedValueOnce({ partners: oneEdge({ id: 'partner-1', partnerUserId: 'member-1' }) })- .mockResolvedValueOnce({ applications: oneEdge({ id: 'application-1', partnerUserId: null }) });-- await stampPartnerUserFromPartner(client, 'partner-1', 'application', 'application-1');-- expect(mutation).toHaveBeenCalledWith({- updateApplication: {- __args: { id: 'application-1', data: { partnerUserId: 'member-1' } },- id: true,- },- });- });-- it('stamps partnerService partnerUserId when missing', async () => {- query- .mockResolvedValueOnce({ partners: oneEdge({ id: 'partner-1', partnerUserId: 'member-1' }) })- .mockResolvedValueOnce({ partnerServices: oneEdge({ id: 'service-1', partnerUserId: null }) });-- await stampPartnerUserFromPartner(client, 'partner-1', 'partnerService', 'service-1');-- expect(mutation).toHaveBeenCalledWith({- updatePartnerService: {- __args: { id: 'service-1', data: { partnerUserId: 'member-1' } },- id: true,- },- });- });-- it('does nothing when partner has no partnerUserId', async () => {- query.mockResolvedValueOnce({ partners: oneEdge({ id: 'partner-1', partnerUserId: null }) });-- await stampPartnerUserFromPartner(client, 'partner-1', 'partnerService', 'service-1');-- expect(query).toHaveBeenCalledTimes(1);- expect(mutation).not.toHaveBeenCalled();- });-- it('does not rewrite when partnerContent already has matching partnerUserId', async () => {- query- .mockResolvedValueOnce({ partners: oneEdge({ id: 'partner-1', partnerUserId: 'member-1' }) })- .mockResolvedValueOnce({ partnerContents: oneEdge({ id: 'content-1', partnerUserId: 'member-1' }) });-- await stampPartnerUserFromPartner(client, 'partner-1', 'partnerContent', 'content-1');-- expect(mutation).not.toHaveBeenCalled();- });- it('does nothing when the partner row is absent', async () => {- query.mockResolvedValueOnce({ partners: noEdges });-- await stampPartnerUserFromPartner(client, 'partner-1', 'partnerService', 'service-1');-- expect(query).toHaveBeenCalledTimes(1);- expect(mutation).not.toHaveBeenCalled();- });-- it('does nothing when the child row is absent', async () => {- query- .mockResolvedValueOnce({ partners: oneEdge({ id: 'partner-1', partnerUserId: 'member-1' }) })- .mockResolvedValueOnce({ partnerLinks: noEdges });-- await stampPartnerUserFromPartner(client, 'partner-1', 'partnerLink', 'link-1');-- expect(mutation).not.toHaveBeenCalled();- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/submit-partner-content-for-review.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/submit-partner-content-for-review.service.tsdeleted file mode 100644index f0ca36ece90..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/services/submit-partner-content-for-review.service.ts+++ /dev/null@@ -1,64 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';-import { type RoutePayload } from 'twenty-sdk/define';--import { updatePartnerContent } from 'src/modules/partner/self-service/graphql/mutations/update-partner-content';-import { findPartnerContentOwner } from 'src/modules/partner/self-service/graphql/queries/find-partner-content-owner';-import {- canSubmitForReview,- submitContentForReviewSchema,-} from 'src/modules/partner/self-service/mappers/submit-partner-content-for-review.mapper';-import {- buildAppClient,- errorResponse,- failureResponse,- resolvePartnerFromRequest,-} from 'src/modules/shared/http/resolve-partner-from-request.service';--export type SubmitContentForReviewResult =- | { ok: true; status: 'UNDER_CUSTOMER_PARTNER_REVIEW' }- | { ok: false; reason: string };--const queryContentOwnerAndStatus = async (- client: CoreApiClient,- recordId: string,-): Promise<{ partnerId: string | null; status: string | null } | null> => {- const result = await findPartnerContentOwner(client, recordId);- const node = result.partnerContents?.edges?.[0]?.node;- if (!node) return null;- return { partnerId: node.partnerId ?? null, status: node.status ?? null };-};--export const submitPartnerContentForReview = async (- event: RoutePayload<unknown>,-): Promise<SubmitContentForReviewResult> => {- const resolved = await resolvePartnerFromRequest(event);- if ('error' in resolved) return errorResponse(resolved.error);-- const parsed = submitContentForReviewSchema.safeParse(event.body);- if (!parsed.success) {- return errorResponse(parsed.error.issues[0]?.message ?? 'invalid_input');- }-- try {- const client = buildAppClient();- const content = await queryContentOwnerAndStatus(- client,- parsed.data.recordId,- );-- if (!content || content.partnerId !== resolved.partnerId) {- return errorResponse('FORBIDDEN');- }- if (!canSubmitForReview(content.status)) {- return errorResponse('NOT_SUBMITTABLE');- }-- await updatePartnerContent(client, parsed.data.recordId, {- status: 'UNDER_CUSTOMER_PARTNER_REVIEW',- });-- return { ok: true, status: 'UNDER_CUSTOMER_PARTNER_REVIEW' };- } catch (err) {- return failureResponse('submit-partner-content-for-review', err);- }-};diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/submit-partner-content-for-review.logic-function.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/submit-partner-content-for-review.logic-function.tsdeleted file mode 100644index 81584ebc7f1..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/submit-partner-content-for-review.logic-function.ts+++ /dev/null@@ -1,26 +0,0 @@-import { defineLogicFunction, type RoutePayload } from 'twenty-sdk/define';--import {- submitPartnerContentForReview,- type SubmitContentForReviewResult,-} from 'src/modules/partner/self-service/services/submit-partner-content-for-review.service';--export const SUBMIT_PARTNER_CONTENT_FOR_REVIEW_ID = '6d722484-bbe9-4ffc-b017-5164e3a5a03c';--export const handler = (- event: RoutePayload<unknown>,-): Promise<SubmitContentForReviewResult> => submitPartnerContentForReview(event);--export default defineLogicFunction({- universalIdentifier: SUBMIT_PARTNER_CONTENT_FOR_REVIEW_ID,- name: 'submit-partner-content-for-review',- description:- "Flips the calling partner's own WIP case study/content to under-review.",- timeoutSeconds: 15,- handler,- httpRouteTriggerSettings: {- path: '/submit-partner-content-for-review',- httpMethod: 'POST',- isAuthRequired: true,- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/utils/reconcile-children.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/utils/reconcile-children.test.tsdeleted file mode 100644index 85b679ad7be..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/utils/reconcile-children.test.ts+++ /dev/null@@ -1,48 +0,0 @@-import { describe, expect, it } from 'vitest';--import { buildReconcilePlan } from './reconcile-children';--type Item = { id?: string; value: string };--describe('buildReconcilePlan', () => {- it('keeps+edits one, creates one (no id), and drops the omitted one', () => {- const existingIds = ['a', 'b'];- const incoming: Item[] = [- { id: 'a', value: 'edited' },- { value: 'new' },- ];-- const plan = buildReconcilePlan(existingIds, incoming);-- expect(plan).toEqual({- toCreate: [{ value: 'new' }],- toUpdate: [{ id: 'a', value: 'edited' }],- toDelete: ['b'],- });- });-- it('returns null when an incoming id is not in existingIds (foreign/stale id)', () => {- const existingIds = ['a'];- const incoming: Item[] = [{ id: 'foreign', value: 'x' }];-- expect(buildReconcilePlan(existingIds, incoming)).toBeNull();- });-- it('returns null when the same id is submitted twice (no double update)', () => {- const existingIds = ['a', 'b'];- const incoming: Item[] = [- { id: 'a', value: 'first' },- { id: 'a', value: 'second' },- ];-- expect(buildReconcilePlan(existingIds, incoming)).toBeNull();- });-- it('deletes everything when incoming is empty', () => {- const existingIds = ['a', 'b', 'c'];-- const plan = buildReconcilePlan(existingIds, []);-- expect(plan).toEqual({ toCreate: [], toUpdate: [], toDelete: ['a', 'b', 'c'] });- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/utils/reconcile-children.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/utils/reconcile-children.tsdeleted file mode 100644index 4f666000dea..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/self-service/utils/reconcile-children.ts+++ /dev/null@@ -1,26 +0,0 @@-export type ReconcileItem = { id?: string };-export type ReconcilePlan<T> = { toCreate: T[]; toUpdate: T[]; toDelete: string[] };--// existingIds = ids currently owned by the caller's partner.-// incoming = desired rows. Rows with an id NOT in existingIds are rejected (return null → caller 403s).-export const buildReconcilePlan = <T extends ReconcileItem>(- existingIds: string[],- incoming: T[],-): ReconcilePlan<T> | null => {- const owned = new Set(existingIds);- const keptIds = new Set<string>();- const toCreate: T[] = [];- const toUpdate: T[] = [];- for (const item of incoming) {- if (item.id === undefined) {- toCreate.push(item);- continue;- }- if (!owned.has(item.id)) return null; // foreign / stale id → refuse the whole batch- if (keptIds.has(item.id)) return null; // same id submitted twice → refuse the whole batch- keptIds.add(item.id);- toUpdate.push(item);- }- const toDelete = existingIds.filter((id) => !keptIds.has(id));- return { toCreate, toUpdate, toDelete };-};diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/utils/content-type.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/utils/content-type.test.tsdeleted file mode 100644index 86acd69b231..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/utils/content-type.test.ts+++ /dev/null@@ -1,29 +0,0 @@-import { describe, expect, it } from 'vitest';--import { isCaseStudy } from './content-type';--describe('isCaseStudy', () => {- it('returns true when the array contains CASE_STUDY', () => {- expect(isCaseStudy(['CASE_STUDY'])).toBe(true);- expect(isCaseStudy(['PARTNER_QUOTE', 'CASE_STUDY'])).toBe(true);- });-- it('returns false when the array does not contain CASE_STUDY', () => {- expect(isCaseStudy(['PARTNER_QUOTE'])).toBe(false);- expect(isCaseStudy(['CUSTOMER_QUOTE', 'LOGO'])).toBe(false);- expect(isCaseStudy([])).toBe(false);- });-- it('returns true when passed the scalar value CASE_STUDY', () => {- expect(isCaseStudy('CASE_STUDY')).toBe(true);- });-- it('returns false for a different scalar value', () => {- expect(isCaseStudy('PARTNER_QUOTE')).toBe(false);- });-- it('returns false for null or undefined', () => {- expect(isCaseStudy(null)).toBe(false);- expect(isCaseStudy(undefined)).toBe(false);- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/utils/content-type.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/utils/content-type.tsdeleted file mode 100644index a72fa78f13b..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/utils/content-type.ts+++ /dev/null@@ -1,12 +0,0 @@-export const isCaseStudy = (- contentType: ReadonlyArray<string | undefined> | string | null | undefined,-): boolean =>- Array.isArray(contentType)- ? contentType.includes('CASE_STUDY')- : contentType === 'CASE_STUDY';--export const isApprovedCaseStudy = (content: {- contentType?: ReadonlyArray<string | undefined> | string | null;- status?: string | null;-}): boolean =>- isCaseStudy(content.contentType) && content.status === 'APPROVED';diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/utils/profile-picture.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/utils/profile-picture.test.tsdeleted file mode 100644index 83b025f5543..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/utils/profile-picture.test.ts+++ /dev/null@@ -1,63 +0,0 @@-import { describe, expect, it } from 'vitest';--import {- firstFileUrl,- resolveCoverUrl,- resolvePartnerPictureUrl,-} from './profile-picture';--describe('firstFileUrl', () => {- it('returns the first file url', () => {- expect(firstFileUrl([{ url: 'https://x/a.png' }, { url: 'https://x/b.png' }])).toBe('https://x/a.png');- });- it('skips entries without a url', () => {- expect(firstFileUrl([{ url: null }, { url: 'https://x/b.png' }])).toBe('https://x/b.png');- });- it('returns null for empty / nullish input', () => {- expect(firstFileUrl(null)).toBeNull();- expect(firstFileUrl(undefined)).toBeNull();- expect(firstFileUrl([])).toBeNull();- expect(firstFileUrl([null])).toBeNull();- });-});--describe('resolvePartnerPictureUrl', () => {- it('prefers the uploaded file url over the legacy link', () => {- expect(- resolvePartnerPictureUrl([{ url: 'https://x/file.png' }], 'https://x/legacy.png'),- ).toBe('https://x/file.png');- });- it('falls back to the legacy link when there is no file', () => {- expect(resolvePartnerPictureUrl(null, 'https://x/legacy.png')).toBe('https://x/legacy.png');- expect(resolvePartnerPictureUrl([], 'https://x/legacy.png')).toBe('https://x/legacy.png');- expect(resolvePartnerPictureUrl([{ url: null }], 'https://x/legacy.png')).toBe(- 'https://x/legacy.png',- );- });- it('returns null when neither source has a url', () => {- expect(resolvePartnerPictureUrl(null, null)).toBeNull();- expect(resolvePartnerPictureUrl(undefined, undefined)).toBeNull();- expect(resolvePartnerPictureUrl([], null)).toBeNull();- });-});--describe('resolveCoverUrl', () => {- it('prefers the pasted url over the uploaded file', () => {- expect(- resolveCoverUrl('https://x/pasted.png', [{ url: 'https://x/file.png' }]),- ).toBe('https://x/pasted.png');- });- it('treats the TEXT default and whitespace as no pasted url', () => {- expect(resolveCoverUrl('', [{ url: 'https://x/file.png' }])).toBe(- 'https://x/file.png',- );- expect(resolveCoverUrl(' ', [{ url: 'https://x/file.png' }])).toBe(- 'https://x/file.png',- );- });- it('returns null when neither source has a url', () => {- expect(resolveCoverUrl('', null)).toBeNull();- expect(resolveCoverUrl(null, [])).toBeNull();- expect(resolveCoverUrl(undefined, [{ url: null }])).toBeNull();- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/utils/profile-picture.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/partner/utils/profile-picture.tsdeleted file mode 100644index 69f80784539..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/partner/utils/profile-picture.ts+++ /dev/null@@ -1,31 +0,0 @@-// A FILES field reads back as an array of file items, each exposing a signed-// `url`. We surface the first file's url, mapped into the legacy { primaryLinkUrl }-// shape the website partner directory already consumes.-type FileItemRead = { url?: string | null } | null | undefined;--export function firstFileUrl(- files: ReadonlyArray<FileItemRead> | null | undefined,-): string | null {- return files?.find((file) => file?.url)?.url ?? null;-}--// Picture has two sources: the new uploaded file (profilePictureFile, FILES) and-// the legacy URL (profilePicture, LINKS) that pre-FILES partners still carry.-// Prefer an uploaded file, fall back to the legacy URL.-export function resolvePartnerPictureUrl(- files: ReadonlyArray<FileItemRead> | null | undefined,- legacyLinkUrl: string | null | undefined,-): string | null {- return firstFileUrl(files) ?? legacyLinkUrl ?? null;-}--// Cover has the same two sources as the picture, in the opposite order: a-// pasted URL wins over an uploaded file. coverImageUrl is TEXT, so it reads-// back as '' when unset — `??` would hand that empty string to the caller and-// hide the uploaded file behind it.-export function resolveCoverUrl(- pastedUrl: string | null | undefined,- files: ReadonlyArray<FileItemRead> | null | undefined,-): string | null {- return (pastedUrl ?? '').trim() || firstFileUrl(files);-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/connector/discord/config.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/connector/discord/config.tsdeleted file mode 100644index 15e2eff7a13..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/connector/discord/config.ts+++ /dev/null@@ -1,9 +0,0 @@-export const DISCORD_WEBHOOK_ENV_VAR = 'DISCORD_WEBHOOK_URL';--// Generous bound on the Discord call. The trigger runs out-of-band on the-// worker (no user waiting), so this only needs to stay under the function's-// 10s budget — not be tight. Guards against a hung/slow webhook.-export const DISCORD_TIMEOUT_MS = 8000;--// Twenty brand blue (#4a38f5) as a Discord embed integer color.-export const TWENTY_BLUE = 0x4a38f5;diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/connector/discord/discord.connector.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/connector/discord/discord.connector.tsdeleted file mode 100644index 59a73589886..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/connector/discord/discord.connector.ts+++ /dev/null@@ -1,32 +0,0 @@-import { DISCORD_TIMEOUT_MS } from 'src/modules/shared/connector/discord/config';-import { type DiscordWebhookPayload } from 'src/modules/shared/connector/discord/types';--// Pure outbound transport: POST the payload, honour a hard timeout, and report-// delivery. Holds no decision logic — the caller decides whether to notify.-export async function postWebhook(- url: string,- payload: DiscordWebhookPayload,- label: string,- timeoutMs: number = DISCORD_TIMEOUT_MS,-): Promise<boolean> {- const controller = new AbortController();- const timeout = setTimeout(() => controller.abort(), timeoutMs);- try {- const response = await fetch(url, {- method: 'POST',- headers: { 'Content-Type': 'application/json' },- body: JSON.stringify(payload),- signal: controller.signal,- });- // fetch only rejects on network errors, not on HTTP error statuses, so a- // non-2xx (dead webhook, rejected payload, rate limit) must be detected- // explicitly — otherwise a failed post is reported as delivered.- if (!response.ok) {- console.warn(`${label}: Discord webhook responded ${response.status}`);- return false;- }- return true;- } finally {- clearTimeout(timeout);- }-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/connector/discord/embed-text.util.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/connector/discord/embed-text.util.tsdeleted file mode 100644index 1af5bfdddba..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/connector/discord/embed-text.util.ts+++ /dev/null@@ -1,20 +0,0 @@-import { type DiscordField } from 'src/modules/shared/connector/discord/types';-import { isNonEmptyString } from 'src/modules/shared/utils/is-non-empty-string.util';--export const INLINE_MAX = 256;--export const truncate = (value: string, max: number): string =>- value.length <= max ? value : `${value.slice(0, max - 1)}…`;--export const trimTrailingSlash = (url: string): string =>- url.replace(/\/+$/, '');--// Discord rejects the whole payload above 1024 chars per field; bound every-// inline value so one long record field cannot silently drop a notification.-export const inlineField = (- name: string,- value: string | undefined | null,-): DiscordField[] =>- isNonEmptyString(value)- ? [{ name, value: truncate(value.trim(), INLINE_MAX), inline: true }]- : [];diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/connector/discord/types.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/connector/discord/types.tsdeleted file mode 100644index a3ac0e7c171..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/connector/discord/types.ts+++ /dev/null@@ -1,5 +0,0 @@-export type DiscordField = { name: string; value: string; inline?: boolean };--export type DiscordEmbed = Record<string, unknown>;--export type DiscordWebhookPayload = { embeds: DiscordEmbed[] };diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/front-components/call-app-route.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/front-components/call-app-route.tsdeleted file mode 100644index e08e568b6d0..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/front-components/call-app-route.ts+++ /dev/null@@ -1,44 +0,0 @@-type ErrorResponse = { messages?: string[]; message?: string; error?: string };--const extractErrorMessage = async (response: Response): Promise<string> => {- const text = await response.text().catch(() => '');-- try {- const parsed = JSON.parse(text) as ErrorResponse;- return (- parsed.messages?.[0] ??- parsed.message ??- parsed.error ??- `Server error (${response.status})`- );- } catch {- return text || `Server error (${response.status})`;- }-};--export const callAppRoute = async (- path: string,- body: Record<string, unknown>,-): Promise<unknown> => {- const token = process.env.TWENTY_APP_ACCESS_TOKEN;-- const functionsUrl = process.env.TWENTY_FUNCTIONS_URL;- const apiUrl = process.env.TWENTY_API_URL ?? '';- const normalizedPath = path.startsWith('/') ? path : `/${path}`;- const url = functionsUrl ? `${functionsUrl}${normalizedPath}` : `${apiUrl}/s${normalizedPath}`;-- const response = await fetch(url, {- method: 'POST',- headers: {- 'Content-Type': 'application/json',- ...(token ? { Authorization: `Bearer ${token}` } : {}),- },- body: JSON.stringify(body),- });-- if (!response.ok) {- throw new Error(await extractErrorMessage(response));- }-- return response.json();-};diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/front-components/palette.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/front-components/palette.tsdeleted file mode 100644index f11267a32fa..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/front-components/palette.ts+++ /dev/null@@ -1,16 +0,0 @@-// Front components render outside the host app's theme, so every panel restates the Twenty-// palette inline. Keep one copy here rather than one per domain.-export const COLORS = {- bg: '#f7f7f8',- surface: '#ffffff',- surfaceAlt: '#f4f5f7',- fg: '#1c1c1c',- muted: '#66646a',- border: '#e7e7eb',- accent: '#4a38f5',- accentSoft: 'rgba(74, 56, 245, 0.1)',- danger: '#b42318',-} as const;--export const FONT =- '"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif';diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/front-components/playbook-styles.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/front-components/playbook-styles.tsdeleted file mode 100644index f80fd656771..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/front-components/playbook-styles.ts+++ /dev/null@@ -1,221 +0,0 @@-import { COLORS, FONT } from 'src/modules/shared/front-components/palette';--const MONO = '"Azeret Mono", ui-monospace, monospace';--export const PLAYBOOK_STYLES = {- root: {- display: 'flex',- justifyContent: 'center',- width: '100%',- minHeight: 'calc(100dvh - 56px)',- boxSizing: 'border-box' as const,- padding: 32,- fontFamily: FONT,- color: COLORS.fg,- background: COLORS.bg,- },- article: {- width: '100%',- maxWidth: 720,- },- kicker: {- fontFamily: MONO,- fontSize: 11,- letterSpacing: 1.4,- textTransform: 'uppercase' as const,- color: COLORS.accent,- margin: '0 0 8px',- },- title: {- fontSize: 28,- fontWeight: 500,- letterSpacing: -0.4,- margin: '0 0 8px',- },- lede: {- color: COLORS.muted,- fontSize: 15,- lineHeight: '22px',- margin: '0 0 28px',- },- ledeWithLinks: {- color: COLORS.muted,- fontSize: 15,- lineHeight: '22px',- margin: '0 0 12px',- },- step: {- display: 'grid',- gridTemplateColumns: '36px 1fr',- gap: 16,- padding: '20px 0',- borderTop: `1px solid ${COLORS.border}`,- },- lastStep: {- display: 'grid',- gridTemplateColumns: '36px 1fr',- gap: 16,- padding: '20px 0',- borderTop: `1px solid ${COLORS.border}`,- borderBottom: `1px solid ${COLORS.border}`,- },- trust: {- display: 'grid',- gridTemplateColumns: '36px 1fr',- gap: 16,- padding: '20px 16px',- margin: '0 -16px',- borderTop: `1px solid ${COLORS.border}`,- background: COLORS.accentSoft,- },- num: {- fontFamily: MONO,- fontSize: 13,- color: COLORS.accent,- paddingTop: 2,- },- heading: {- fontSize: 16,- fontWeight: 500,- margin: '0 0 6px',- },- body: {- margin: 0,- color: COLORS.fg,- fontSize: 14,- lineHeight: '22px',- },- bodySpaced: {- margin: '8px 0 0',- color: COLORS.fg,- fontSize: 14,- lineHeight: '22px',- },- list: {- margin: '8px 0 0',- paddingLeft: 18,- color: COLORS.fg,- fontSize: 14,- lineHeight: '22px',- },- note: {- marginTop: 8,- color: COLORS.muted,- fontSize: 13,- lineHeight: '20px',- },- pillRow: {- display: 'flex',- flexWrap: 'wrap' as const,- gap: 8,- margin: '8px 0',- },- pill: {- display: 'inline-flex',- alignItems: 'center',- fontFamily: MONO,- fontSize: 11,- letterSpacing: 0.4,- textTransform: 'uppercase' as const,- padding: '4px 8px',- borderRadius: 2,- background: COLORS.surfaceAlt,- color: COLORS.muted,- },- table: {- width: '100%',- borderCollapse: 'collapse' as const,- marginTop: 12,- fontSize: 13,- },- th: {- fontFamily: MONO,- fontSize: 10,- letterSpacing: 1.2,- textTransform: 'uppercase' as const,- textAlign: 'left' as const,- color: COLORS.muted,- fontWeight: 500,- padding: '6px 0',- borderBottom: `1px solid ${COLORS.border}`,- },- thRight: {- fontFamily: MONO,- fontSize: 10,- letterSpacing: 1.2,- textTransform: 'uppercase' as const,- textAlign: 'right' as const,- color: COLORS.muted,- fontWeight: 500,- padding: '6px 0',- borderBottom: `1px solid ${COLORS.border}`,- },- td: {- padding: '8px 0',- borderBottom: `1px solid ${COLORS.border}`,- verticalAlign: 'top' as const,- lineHeight: '18px',- },- tdPoints: {- padding: '8px 0 8px 16px',- borderBottom: `1px solid ${COLORS.border}`,- verticalAlign: 'top' as const,- lineHeight: '18px',- fontFamily: MONO,- fontSize: 12,- whiteSpace: 'nowrap' as const,- textAlign: 'right' as const,- color: COLORS.accent,- },- link: {- color: COLORS.accent,- textDecoration: 'underline' as const,- },- linkButton: {- color: COLORS.accent,- textDecoration: 'underline' as const,- background: 'none',- border: 'none',- padding: 0,- margin: 0,- font: 'inherit',- cursor: 'pointer' as const,- },- headerLinkRow: {- display: 'flex',- flexWrap: 'wrap' as const,- gap: 16,- margin: '0 0 28px',- fontSize: 14,- },- code: {- fontFamily: MONO,- fontSize: 12,- padding: '1px 5px',- borderRadius: 2,- background: COLORS.surfaceAlt,- color: COLORS.accent,- },- skill: {- marginTop: 12,- padding: 12,- border: `1px solid ${COLORS.border}`,- borderRadius: 4,- background: COLORS.surface,- },- skillKicker: {- fontFamily: MONO,- fontSize: 10,- letterSpacing: 1.2,- textTransform: 'uppercase' as const,- color: COLORS.muted,- margin: '0 0 8px',- },- skillOutputs: {- margin: '8px 0 0',- paddingLeft: 18,- color: COLORS.fg,- fontSize: 13,- lineHeight: '20px',- },-} as const;diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/mutations/create-company.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/mutations/create-company.tsdeleted file mode 100644index 8d3943ae69a..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/mutations/create-company.ts+++ /dev/null@@ -1,7 +0,0 @@-import type { CoreApiClient } from 'twenty-client-sdk/core';--export function createCompany(client: CoreApiClient, name: string) {- return client.mutation({- createCompany: { __args: { data: { name } }, id: true },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/mutations/create-person.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/mutations/create-person.tsdeleted file mode 100644index 3c2c10bf0f4..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/mutations/create-person.ts+++ /dev/null@@ -1,23 +0,0 @@-import type { CoreApiClient } from 'twenty-client-sdk/core';--export type CreatePersonInput = {- firstName: string;- lastName: string;- email: string;- companyId: string;-};--export function createPerson(client: CoreApiClient, input: CreatePersonInput) {- return client.mutation({- createPerson: {- __args: {- data: {- name: { firstName: input.firstName, lastName: input.lastName },- emails: { primaryEmail: input.email },- companyId: input.companyId,- },- },- id: true,- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/mutations/update-application-partner-user.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/mutations/update-application-partner-user.tsdeleted file mode 100644index ede7bec9cbb..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/mutations/update-application-partner-user.ts+++ /dev/null@@ -1,5 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--export function updateApplicationPartnerUser(client: CoreApiClient, id: string, partnerUserId: string) {- return client.mutation({ updateApplication: { __args: { id, data: { partnerUserId } }, id: true } });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/mutations/update-opportunity-applicant-partner-user-ids.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/mutations/update-opportunity-applicant-partner-user-ids.tsdeleted file mode 100644index c6657698b6c..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/mutations/update-opportunity-applicant-partner-user-ids.ts+++ /dev/null@@ -1,14 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--export function updateOpportunityApplicantPartnerUserIds(- client: CoreApiClient,- opportunityId: string,- applicantPartnerUserIds: string[],-) {- return client.mutation({- updateOpportunity: {- __args: { id: opportunityId, data: { applicantPartnerUserIds } },- id: true,- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/mutations/update-partner-content-partner-user.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/mutations/update-partner-content-partner-user.tsdeleted file mode 100644index 0dc1c319067..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/mutations/update-partner-content-partner-user.ts+++ /dev/null@@ -1,5 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--export function updatePartnerContentPartnerUser(client: CoreApiClient, id: string, partnerUserId: string) {- return client.mutation({ updatePartnerContent: { __args: { id, data: { partnerUserId } }, id: true } });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/mutations/update-partner-link-partner-user.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/mutations/update-partner-link-partner-user.tsdeleted file mode 100644index 084704b883d..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/mutations/update-partner-link-partner-user.ts+++ /dev/null@@ -1,5 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--export function updatePartnerLinkPartnerUser(client: CoreApiClient, id: string, partnerUserId: string) {- return client.mutation({ updatePartnerLink: { __args: { id, data: { partnerUserId } }, id: true } });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/mutations/update-partner-service-partner-user.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/mutations/update-partner-service-partner-user.tsdeleted file mode 100644index 68265ec37b7..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/mutations/update-partner-service-partner-user.ts+++ /dev/null@@ -1,5 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--export function updatePartnerServicePartnerUser(client: CoreApiClient, id: string, partnerUserId: string) {- return client.mutation({ updatePartnerService: { __args: { id, data: { partnerUserId } }, id: true } });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/queries/find-company-by-name.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/queries/find-company-by-name.tsdeleted file mode 100644index 31b9d7d02ce..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/queries/find-company-by-name.ts+++ /dev/null@@ -1,10 +0,0 @@-import type { CoreApiClient } from 'twenty-client-sdk/core';--export function findCompanyByName(client: CoreApiClient, name: string) {- return client.query({- companies: {- __args: { filter: { name: { eq: name } }, first: 1 },- edges: { node: { id: true } },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/queries/find-partner-by-member.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/queries/find-partner-by-member.tsdeleted file mode 100644index d499c6e407e..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/queries/find-partner-by-member.ts+++ /dev/null@@ -1,10 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--export function findPartnerByMember(client: CoreApiClient, memberId: string) {- return client.query({- partners: {- __args: { filter: { partnerUserId: { eq: memberId } }, first: 1 },- edges: { node: { id: true, name: true } },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/queries/find-person-by-email.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/queries/find-person-by-email.tsdeleted file mode 100644index 7ff0a9aa668..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/queries/find-person-by-email.ts+++ /dev/null@@ -1,10 +0,0 @@-import type { CoreApiClient } from 'twenty-client-sdk/core';--export function findPersonByEmail(client: CoreApiClient, primaryEmail: string) {- return client.query({- people: {- __args: { filter: { emails: { primaryEmail: { eq: primaryEmail } } }, first: 1 },- edges: { node: { id: true } },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/queries/get-child-partner-user.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/queries/get-child-partner-user.tsdeleted file mode 100644index 4b78e4b6d3e..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/queries/get-child-partner-user.ts+++ /dev/null@@ -1,46 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--// List form on purpose: the single-record read throws `Record not found` for an unknown id.-export function getPartnerLinkPartnerUser(client: CoreApiClient, id: string) {- return client- .query({- partnerLinks: {- __args: { filter: { id: { eq: id } }, first: 1 },- edges: { node: { id: true, partnerUserId: true } },- },- })- .then((res) => res.partnerLinks?.edges?.[0]?.node ?? null);-}--export function getPartnerServicePartnerUser(client: CoreApiClient, id: string) {- return client- .query({- partnerServices: {- __args: { filter: { id: { eq: id } }, first: 1 },- edges: { node: { id: true, partnerUserId: true } },- },- })- .then((res) => res.partnerServices?.edges?.[0]?.node ?? null);-}--export function getPartnerContentPartnerUser(client: CoreApiClient, id: string) {- return client- .query({- partnerContents: {- __args: { filter: { id: { eq: id } }, first: 1 },- edges: { node: { id: true, partnerUserId: true } },- },- })- .then((res) => res.partnerContents?.edges?.[0]?.node ?? null);-}--export function getApplicationPartnerUser(client: CoreApiClient, id: string) {- return client- .query({- applications: {- __args: { filter: { id: { eq: id } }, first: 1 },- edges: { node: { id: true, partnerUserId: true } },- },- })- .then((res) => res.applications?.edges?.[0]?.node ?? null);-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/queries/get-company-partner-user.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/queries/get-company-partner-user.tsdeleted file mode 100644index 08c988c8d4c..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/queries/get-company-partner-user.ts+++ /dev/null@@ -1,11 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--// List form on purpose: the single-record read throws `Record not found` for an unknown id.-export function getCompanyPartnerUser(client: CoreApiClient, companyId: string) {- return client.query({- companies: {- __args: { filter: { id: { eq: companyId } }, first: 1 },- edges: { node: { id: true, partnerUserId: true } },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/queries/get-opportunity-applicant-partner-user-ids.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/queries/get-opportunity-applicant-partner-user-ids.tsdeleted file mode 100644index ade24fe3013..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/queries/get-opportunity-applicant-partner-user-ids.ts+++ /dev/null@@ -1,13 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--export function getOpportunityApplicantPartnerUserIds(- client: CoreApiClient,- opportunityId: string,-) {- return client.query({- opportunities: {- __args: { filter: { id: { eq: opportunityId } }, first: 1 },- edges: { node: { id: true, applicantPartnerUserIds: true } },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/queries/get-partner-owner.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/queries/get-partner-owner.tsdeleted file mode 100644index c27fe889d85..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/queries/get-partner-owner.ts+++ /dev/null@@ -1,11 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--// List form on purpose: the single-record read throws `Record not found` for an unknown id.-export function getPartnerOwner(client: CoreApiClient, partnerId: string) {- return client.query({- partners: {- __args: { filter: { id: { eq: partnerId } }, first: 1 },- edges: { node: { id: true, partnerUserId: true } },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/queries/list-applications-with-opportunity-partner-user.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/queries/list-applications-with-opportunity-partner-user.tsdeleted file mode 100644index 29be782d24f..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/graphql/queries/list-applications-with-opportunity-partner-user.ts+++ /dev/null@@ -1,21 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--const PAGE_SIZE = 200;--export function listApplicationsWithOpportunityPartnerUser(- client: CoreApiClient,- after?: string,-) {- return client.query({- applications: {- __args: {- first: PAGE_SIZE,- ...(after ? { after } : {}),- },- edges: {- node: { opportunityId: true, partnerUserId: true },- },- pageInfo: { hasNextPage: true, endCursor: true },- },- });-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/http/read-secret-guarded-event.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/http/read-secret-guarded-event.test.tsdeleted file mode 100644index e7b152913ca..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/http/read-secret-guarded-event.test.ts+++ /dev/null@@ -1,64 +0,0 @@-import { afterEach, beforeEach, describe, expect, it } from 'vitest';-import { z } from 'zod';--import { readSecretGuardedEvent } from './read-secret-guarded-event';--const schema = z.object({ name: z.string().trim().min(1) });--describe('readSecretGuardedEvent', () => {- const original = process.env.PARTNER_APPLICATION_SECRET;-- afterEach(() => {- if (original === undefined) delete process.env.PARTNER_APPLICATION_SECRET;- else process.env.PARTNER_APPLICATION_SECRET = original;- });-- it('returns unauthorized when PARTNER_APPLICATION_SECRET is not set', () => {- delete process.env.PARTNER_APPLICATION_SECRET;- const result = readSecretGuardedEvent(- { headers: { 'x-application-secret': 'anything' }, body: { name: 'Acme' } },- schema,- );- expect(result).toEqual({ ok: false, reason: 'unauthorized' });- });-- describe('with a secret configured', () => {- beforeEach(() => {- process.env.PARTNER_APPLICATION_SECRET = 'shh';- });-- it('returns unauthorized when the header is missing', () => {- const result = readSecretGuardedEvent({ body: { name: 'Acme' } }, schema);- expect(result).toEqual({ ok: false, reason: 'unauthorized' });- });-- it('returns unauthorized when the header does not match', () => {- const result = readSecretGuardedEvent(- { headers: { 'x-application-secret': 'wrong' }, body: { name: 'Acme' } },- schema,- );- expect(result).toEqual({ ok: false, reason: 'unauthorized' });- });-- it('returns invalid_input when the header matches but the body fails the schema', () => {- const result = readSecretGuardedEvent(- { headers: { 'x-application-secret': 'shh' }, body: { name: '' } },- schema,- );- expect(result).toEqual({ ok: false, reason: 'invalid_input' });- });-- it('returns ok with the parsed input when the header matches and the body is valid', () => {- const result = readSecretGuardedEvent(- { headers: { 'x-application-secret': 'shh' }, body: { name: 'Acme' } },- schema,- );- expect(result).toEqual({ ok: true, input: { name: 'Acme' } });- });-- it('treats a raw (non-event) payload as the body directly', () => {- const result = readSecretGuardedEvent({ name: 'Acme' }, schema);- expect(result).toEqual({ ok: false, reason: 'unauthorized' });- });- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/http/read-secret-guarded-event.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/http/read-secret-guarded-event.tsdeleted file mode 100644index ad7c76f3e1b..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/http/read-secret-guarded-event.ts+++ /dev/null@@ -1,21 +0,0 @@-import type { z } from 'zod';--import { isNonEmptyString } from 'src/modules/shared/utils/is-non-empty-string.util';--// The header inbound webhooks carry the shared secret in. Logic-functions must-// forward this exact header (forwardedRequestHeaders) for the guard to see it.-export const APPLICATION_SECRET_HEADER = 'x-application-secret';-type GuardedEvent = { headers?: Record<string, string | undefined>; body?: unknown };--export function readSecretGuardedEvent<TSchema extends z.ZodTypeAny>(- event: unknown,- schema: TSchema,-): { ok: true; input: z.infer<TSchema> } | { ok: false; reason: 'unauthorized' | 'invalid_input' } {- const isEvent = typeof event === 'object' && event !== null && ('body' in event || 'headers' in event);- const headers = isEvent ? (event as GuardedEvent).headers ?? {} : {};- const raw = isEvent ? (event as GuardedEvent).body : event;- const expected = process.env.PARTNER_APPLICATION_SECRET;- if (!isNonEmptyString(expected) || headers[APPLICATION_SECRET_HEADER] !== expected) return { ok: false, reason: 'unauthorized' };- const parsed = schema.safeParse(raw);- return parsed.success ? { ok: true, input: parsed.data } : { ok: false, reason: 'invalid_input' };-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/http/resolve-partner-from-request.integration-test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/http/resolve-partner-from-request.integration-test.tsdeleted file mode 100644index e9bb6f8ee42..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/http/resolve-partner-from-request.integration-test.ts+++ /dev/null@@ -1,110 +0,0 @@-import { CoreApiClient } from 'twenty-client-sdk/core';-import { afterEach, beforeEach, describe, expect, it } from 'vitest';--import {- decodeJwtClaims,- resolvePartnerByUserId,- resolvePartnerFromRequest,-} from 'src/modules/shared/http/resolve-partner-from-request.service';--function requireId(id: string | null | undefined, what: string): string {- if (!id) throw new Error(`${what} returned no id`);- return id;-}--async function getWorkspaceMember(- client: CoreApiClient,-): Promise<{ id: string; userId: string }> {- const r = await client.query({- workspaceMembers: {- __args: { first: 1 },- edges: { node: { id: true, userId: true } },- },- });- const node = r.workspaceMembers?.edges?.[0]?.node;- if (!node?.id || !node?.userId) {- throw new Error('No workspace members found — cannot run test');- }- return { id: node.id, userId: node.userId };-}--async function createPartner(- client: CoreApiClient,- memberId: string,-): Promise<{ id: string; name: string }> {- const name = `[test-resolve] partner ${Date.now()}`;- const r = await client.mutation({- createPartner: {- __args: {- data: {- name,- slug: `test-resolve-${Date.now()}`,- partnerUserId: memberId,- },- },- id: true,- },- });- return { id: requireId(r.createPartner?.id, 'createPartner'), name };-}--async function destroyPartner(client: CoreApiClient, id: string) {- await client.mutation({ destroyPartner: { __args: { id }, id: true } }).catch(() => {});-}--describe('decodeJwtClaims', () => {- it('decodes the base64url payload segment of a JWT', () => {- const payload = Buffer.from(- JSON.stringify({ userId: 'u-1', userWorkspaceId: 'uw-1' }),- ).toString('base64url');- const token = `header.${payload}.sig`;-- expect(decodeJwtClaims(token)).toEqual({ userId: 'u-1', userWorkspaceId: 'uw-1' });- });-- it('returns {} for a garbage string', () => {- expect(decodeJwtClaims('not-a-jwt')).toEqual({});- });-});--describe('resolvePartnerByUserId', () => {- let client: CoreApiClient;- const createdPartnerIds: string[] = [];-- beforeEach(() => {- client = new CoreApiClient();- });-- afterEach(async () => {- for (const id of createdPartnerIds) await destroyPartner(client, id);- createdPartnerIds.length = 0;- });-- it('resolves partnerId and workspaceMemberId for a member with a linked partner', async () => {- const member = await getWorkspaceMember(client);- const partner = await createPartner(client, member.id);- createdPartnerIds.push(partner.id);-- const result = await resolvePartnerByUserId(client, member.userId);-- expect(result).toEqual({- partnerId: partner.id,- partnerName: partner.name,- workspaceMemberId: member.id,- });- });-- it('returns null for a userId with no matching workspace member', async () => {- const result = await resolvePartnerByUserId(client, '11111111-1111-4111-8111-111111111111');-- expect(result).toBeNull();- });-});--describe('resolvePartnerFromRequest', () => {- it('returns UNAUTHENTICATED when event.userWorkspaceId is absent', async () => {- const result = await resolvePartnerFromRequest({ userWorkspaceId: null });-- expect(result).toEqual({ error: 'UNAUTHENTICATED' });- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/http/resolve-partner-from-request.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/http/resolve-partner-from-request.service.tsdeleted file mode 100644index 3b8c8cea1ed..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/http/resolve-partner-from-request.service.ts+++ /dev/null@@ -1,138 +0,0 @@-import { CoreApiClient } from 'twenty-client-sdk/core';-import { MetadataApiClient } from 'twenty-client-sdk/metadata';--import { findPartnerByMember } from 'src/modules/shared/graphql/queries/find-partner-by-member';--// Self-service routes run with the app-privileged token in production. Under the vitest-// harness TWENTY_APP_ACCESS_TOKEN is a crafted identity-only token (decoded for userId but-// not a valid API credential), so fall back to the workspace API key for the actual-// queries/mutations. Production is unaffected — VITEST is unset and no API key is injected.-export const buildAppClient = (): CoreApiClient => {- const apiKey = process.env.TWENTY_API_KEY;- if (process.env.VITEST && apiKey) {- return new CoreApiClient({ headers: { Authorization: `Bearer ${apiKey}` } });- }- return new CoreApiClient();-};--export const decodeJwtClaims = (- token: string,-): { userId?: string; userWorkspaceId?: string; workspaceId?: string } => {- const part = token.split('.')[1];- if (!part) return {};- try {- const json = Buffer.from(- part.replace(/-/g, '+').replace(/_/g, '/'),- 'base64',- ).toString('utf8');- const parsed = JSON.parse(json);- // A JWT payload can decode to a non-object (null, number, string); guard so callers- // reading claims.userId reject cleanly instead of throwing on a valid-but-malformed token.- if (parsed === null || typeof parsed !== 'object') return {};- return parsed;- } catch {- return {};- }-};--export type PartnerIdentity = {- partnerId: string;- partnerName: string | null;- workspaceMemberId: string;-};--export const resolvePartnerByUserId = async (- client: CoreApiClient,- userId: string,-): Promise<PartnerIdentity | null> => {- const members = await client.query({- workspaceMembers: {- __args: { filter: { userId: { eq: userId } }, first: 1 },- edges: { node: { id: true } },- },- });- const workspaceMemberId = members.workspaceMembers?.edges?.[0]?.node?.id;- if (!workspaceMemberId) return null;-- const partners = await findPartnerByMember(client, workspaceMemberId);- const partner = partners.partners?.edges?.[0]?.node;- if (!partner?.id) return null;-- return {- partnerId: partner.id,- partnerName: partner.name ?? null,- workspaceMemberId,- };-};--export type ResolvedPartner =- | PartnerIdentity- | { error: 'UNAUTHENTICATED' | 'NO_PARTNER' };--export const resolvePartnerFromRequest = async (event: {- userWorkspaceId?: string | null;-}): Promise<ResolvedPartner> => {- const userWorkspaceId = event.userWorkspaceId ?? null;- if (!userWorkspaceId) return { error: 'UNAUTHENTICATED' };-- // Decode, do not verify — this env token was freshly minted server-side for this call.- const claims = decodeJwtClaims(process.env.TWENTY_APP_ACCESS_TOKEN ?? '');- if (!claims.userId || claims.userWorkspaceId !== userWorkspaceId) {- return { error: 'UNAUTHENTICATED' };- }-- const resolved = await resolvePartnerByUserId(buildAppClient(), claims.userId);- return resolved ?? { error: 'NO_PARTNER' };-};--// Two identity paths on purpose. resolvePartnerFromRequest serves routes that act AS the-// partner, where intersecting the caller's role with the app role is the correct behaviour.-// This one serves a route that acts ON BEHALF OF the partner under app authority, so it-// verifies the forwarded header itself and leaves the function's own token app-only.-export const resolvePartnerFromForwardedToken = async (event: {- headers?: Record<string, string | undefined>;-}): Promise<ResolvedPartner> => {- const authorization = event.headers?.authorization;- if (!authorization?.startsWith('Bearer ')) return { error: 'UNAUTHENTICATED' };-- let userId: string | undefined;- let callerWorkspaceId: string | undefined;- try {- // Verification is the round trip itself: the server checks the signature, so the ids it- // returns are trustworthy in a way a decoded claim never is.- const current = await new MetadataApiClient({- headers: { Authorization: authorization },- }).query({ currentUser: { id: true, currentWorkspace: { id: true } } });- userId = current.currentUser?.id;- callerWorkspaceId = current.currentUser?.currentWorkspace?.id;- } catch {- return { error: 'UNAUTHENTICATED' };- }- if (!userId) return { error: 'UNAUTHENTICATED' };-- // currentUser answers for whatever workspace the presented token belongs to, and the route- // is open (isAuthRequired: false) with a caller-supplied header — so a token minted in any- // other workspace on the server would otherwise pass. Assert the audience here.- const appWorkspaceId = decodeJwtClaims(- process.env.TWENTY_APP_ACCESS_TOKEN ?? '',- ).workspaceId;- if (!appWorkspaceId || callerWorkspaceId !== appWorkspaceId) {- return { error: 'UNAUTHENTICATED' };- }-- const resolved = await resolvePartnerByUserId(buildAppClient(), userId);- return resolved ?? { error: 'NO_PARTNER' };-};--export type PartnerRouteError = { ok: false; reason: string };--export const errorResponse = (reason: string): PartnerRouteError => ({- ok: false,- reason,-});--// Log the real cause server-side but never surface raw SDK/DB text to partner users.-export const failureResponse = (logTag: string, err: unknown): PartnerRouteError => {- console.error(`[${logTag}]`, err instanceof Error ? (err.stack ?? err.message) : String(err));- return { ok: false, reason: 'Something went wrong. Please try again.' };-};diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/http/resolve-partner-from-request.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/http/resolve-partner-from-request.test.tsdeleted file mode 100644index fbee32b71c4..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/http/resolve-partner-from-request.test.ts+++ /dev/null@@ -1,231 +0,0 @@-import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';--const { coreQueryMock, metadataQueryMock } = vi.hoisted(() => ({- coreQueryMock: vi.fn(),- metadataQueryMock: vi.fn(),-}));--vi.mock('twenty-client-sdk/core', () => ({- CoreApiClient: vi.fn(function () {- return { query: coreQueryMock, mutation: vi.fn() };- }),-}));--vi.mock('twenty-client-sdk/metadata', () => ({- MetadataApiClient: vi.fn(function () {- return { query: metadataQueryMock };- }),-}));--import { MetadataApiClient } from 'twenty-client-sdk/metadata';--import {- decodeJwtClaims,- errorResponse,- resolvePartnerFromForwardedToken,- resolvePartnerFromRequest,-} from './resolve-partner-from-request.service';--const makeToken = (payload: Record<string, unknown>): string => {- const body = Buffer.from(JSON.stringify(payload)).toString('base64url');- return `header.${body}.sig`;-};--describe('decodeJwtClaims', () => {- it('decodes userId and userWorkspaceId from a base64url payload', () => {- const token = makeToken({- userId: 'u-1',- userWorkspaceId: 'uw-1',- extra: 'x',- });- expect(decodeJwtClaims(token)).toMatchObject({- userId: 'u-1',- userWorkspaceId: 'uw-1',- });- });-- it('returns {} for a garbage string', () => {- expect(decodeJwtClaims('not-a-jwt')).toEqual({});- });-- it('returns {} for an empty string', () => {- expect(decodeJwtClaims('')).toEqual({});- });-- it('returns {} when the payload segment is not valid JSON', () => {- expect(decodeJwtClaims('header.%%%.sig')).toEqual({});- });-- it('returns {} when the payload decodes to a non-object (null)', () => {- const token = `header.${Buffer.from('null').toString('base64url')}.sig`;- expect(decodeJwtClaims(token)).toEqual({});- });-});--describe('resolvePartnerFromRequest guards (no network)', () => {- const original = process.env.TWENTY_APP_ACCESS_TOKEN;- afterEach(() => {- if (original === undefined) delete process.env.TWENTY_APP_ACCESS_TOKEN;- else process.env.TWENTY_APP_ACCESS_TOKEN = original;- });-- it('returns UNAUTHENTICATED when userWorkspaceId is absent', async () => {- expect(await resolvePartnerFromRequest({})).toEqual({- error: 'UNAUTHENTICATED',- });- expect(await resolvePartnerFromRequest({ userWorkspaceId: null })).toEqual({- error: 'UNAUTHENTICATED',- });- });-- it('returns UNAUTHENTICATED when no app token is present to decode', async () => {- delete process.env.TWENTY_APP_ACCESS_TOKEN;- expect(- await resolvePartnerFromRequest({ userWorkspaceId: 'uw-1' }),- ).toEqual({- error: 'UNAUTHENTICATED',- });- });-- it('returns UNAUTHENTICATED when the token userWorkspaceId does not match the injected one', async () => {- process.env.TWENTY_APP_ACCESS_TOKEN = makeToken({- userId: 'u-1',- userWorkspaceId: 'uw-other',- });- expect(- await resolvePartnerFromRequest({ userWorkspaceId: 'uw-1' }),- ).toEqual({- error: 'UNAUTHENTICATED',- });- });-});--describe('errorResponse', () => {- it('wraps a reason in a failure envelope', () => {- expect(errorResponse('NO_PARTNER')).toEqual({- ok: false,- reason: 'NO_PARTNER',- });- });-});--describe('resolvePartnerFromForwardedToken', () => {- const USER_ID = 'user-1';- const WORKSPACE_MEMBER_ID = 'member-1';- const PARTNER_ID = 'partner-1';- const PARTNER_NAME = 'Acme Partners';- const WORKSPACE_ID = 'workspace-1';- const AUTHORIZATION = 'Bearer forwarded-token';-- const originalAppToken = process.env.TWENTY_APP_ACCESS_TOKEN;- afterEach(() => {- if (originalAppToken === undefined)- delete process.env.TWENTY_APP_ACCESS_TOKEN;- else process.env.TWENTY_APP_ACCESS_TOKEN = originalAppToken;- });-- beforeEach(() => {- coreQueryMock.mockReset();- metadataQueryMock.mockReset();- process.env.TWENTY_APP_ACCESS_TOKEN = makeToken({- workspaceId: WORKSPACE_ID,- });- metadataQueryMock.mockResolvedValue({- currentUser: { id: USER_ID, currentWorkspace: { id: WORKSPACE_ID } },- });- coreQueryMock.mockImplementation((selection: Record<string, unknown>) => {- const key = Object.keys(selection)[0];- if (key === 'workspaceMembers') {- return Promise.resolve({- workspaceMembers: { edges: [{ node: { id: WORKSPACE_MEMBER_ID } }] },- });- }- return Promise.resolve({- partners: { edges: [{ node: { id: PARTNER_ID, name: PARTNER_NAME } }] },- });- });- });-- it('returns UNAUTHENTICATED when there is no authorization header', async () => {- expect(await resolvePartnerFromForwardedToken({})).toEqual({- error: 'UNAUTHENTICATED',- });- expect(await resolvePartnerFromForwardedToken({ headers: {} })).toEqual({- error: 'UNAUTHENTICATED',- });- expect(metadataQueryMock).not.toHaveBeenCalled();- });-- it('returns UNAUTHENTICATED when the header has no Bearer prefix', async () => {- expect(- await resolvePartnerFromForwardedToken({- headers: { authorization: 'forwarded-token' },- }),- ).toEqual({ error: 'UNAUTHENTICATED' });- expect(metadataQueryMock).not.toHaveBeenCalled();- });-- it('returns UNAUTHENTICATED when the server rejects the forwarded token', async () => {- metadataQueryMock.mockRejectedValue(new Error('Unauthorized'));-- expect(- await resolvePartnerFromForwardedToken({- headers: { authorization: AUTHORIZATION },- }),- ).toEqual({ error: 'UNAUTHENTICATED' });- expect(coreQueryMock).not.toHaveBeenCalled();- });-- it('returns UNAUTHENTICATED when currentUser carries no id', async () => {- metadataQueryMock.mockResolvedValue({ currentUser: null });-- expect(- await resolvePartnerFromForwardedToken({- headers: { authorization: AUTHORIZATION },- }),- ).toEqual({ error: 'UNAUTHENTICATED' });- expect(coreQueryMock).not.toHaveBeenCalled();- });-- it('returns UNAUTHENTICATED when the token belongs to another workspace', async () => {- metadataQueryMock.mockResolvedValue({- currentUser: { id: USER_ID, currentWorkspace: { id: 'workspace-other' } },- });-- expect(- await resolvePartnerFromForwardedToken({- headers: { authorization: AUTHORIZATION },- }),- ).toEqual({ error: 'UNAUTHENTICATED' });- expect(coreQueryMock).not.toHaveBeenCalled();- });-- it('returns UNAUTHENTICATED when the app token carries no workspace to compare against', async () => {- delete process.env.TWENTY_APP_ACCESS_TOKEN;-- expect(- await resolvePartnerFromForwardedToken({- headers: { authorization: AUTHORIZATION },- }),- ).toEqual({ error: 'UNAUTHENTICATED' });- expect(coreQueryMock).not.toHaveBeenCalled();- });-- it('resolves the partner by verifying the token against currentUser', async () => {- const result = await resolvePartnerFromForwardedToken({- headers: { authorization: AUTHORIZATION },- });-- expect(result).toEqual({- partnerId: PARTNER_ID,- partnerName: PARTNER_NAME,- workspaceMemberId: WORKSPACE_MEMBER_ID,- });- expect(metadataQueryMock).toHaveBeenCalledWith({- currentUser: { id: true, currentWorkspace: { id: true } },- });- expect(MetadataApiClient).toHaveBeenCalledWith({- headers: { Authorization: AUTHORIZATION },- });- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/navigation-menu-items/partner-workspace-folder.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/navigation-menu-items/partner-workspace-folder.navigation-menu-item.tsdeleted file mode 100644index 1c0e66567b9..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/navigation-menu-items/partner-workspace-folder.navigation-menu-item.ts+++ /dev/null@@ -1,12 +0,0 @@-import { NavigationMenuItemType, defineNavigationMenuItem } from 'twenty-sdk/define';--export const PARTNER_WORKSPACE_FOLDER_UNIVERSAL_IDENTIFIER =- '8e416e6f-8c5d-47d6-ad39-d1f882904c73';--export default defineNavigationMenuItem({- universalIdentifier: PARTNER_WORKSPACE_FOLDER_UNIVERSAL_IDENTIFIER,- type: NavigationMenuItemType.FOLDER,- name: 'Partner Workspace',- icon: 'IconUser',- position: -3,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/navigation-menu-items/pipeline-folder.navigation-menu-item.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/navigation-menu-items/pipeline-folder.navigation-menu-item.tsdeleted file mode 100644index 4ab87cf20a4..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/navigation-menu-items/pipeline-folder.navigation-menu-item.ts+++ /dev/null@@ -1,9 +0,0 @@-import { NavigationMenuItemType, defineNavigationMenuItem } from 'twenty-sdk/define';--export default defineNavigationMenuItem({- universalIdentifier: '0b2e499a-ae74-45e0-af08-243e19fc56aa',- type: NavigationMenuItemType.FOLDER,- name: 'Matching Admin Workspace',- icon: 'IconTargetArrow',- position: -2,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/post-install.logic-function.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/post-install.logic-function.tsdeleted file mode 100644index b81d042c4b5..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/post-install.logic-function.ts+++ /dev/null@@ -1,48 +0,0 @@-import { CoreApiClient } from 'twenty-client-sdk/core';-import { type InstallPayload, definePostInstallLogicFunction } from 'twenty-sdk/define';--import { backfillApplicantOpportunityVisibility } from 'src/modules/shared/services/backfill-applicant-opportunity-visibility.service';-import { backfillPartnerUserOnChildren } from 'src/modules/shared/services/backfill-partner-user-on-children.service';-import { planPostInstall } from 'src/modules/shared/utils/plan-post-install.util';--type PostInstallCounts = {- stamped?: number;- granted?: number;-};--type PostInstallResult = { skipped: true } | PostInstallCounts;--const handler = async ({- previousVersion,-}: InstallPayload): Promise<PostInstallResult> => {- const plan = planPostInstall(previousVersion);-- if (!plan.stampPartnerUser && !plan.grantApplicantVisibility) {- return { skipped: true };- }-- const client = new CoreApiClient();- const result: PostInstallCounts = {};-- // Grant reads partnerUserId on Application. Stamp first so an upgrade from- // before 1.6.1 does not skip those applicants.- if (plan.stampPartnerUser) {- result.stamped = await backfillPartnerUserOnChildren(client);- }-- if (plan.grantApplicantVisibility) {- result.granted = await backfillApplicantOpportunityVisibility(client);- }-- return result;-};--export default definePostInstallLogicFunction({- universalIdentifier: 'f92bad2e-5905-4757-96ee-af9869d4ca0c',- name: 'post-install',- description:- 'Stamps partnerUser on partner-owned records created before the Application RLS narrowing, and grants opportunity read access to existing applicants.',- handler,- shouldRunOnVersionUpgrade: true,- shouldRunSynchronously: true,-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/services/backfill-applicant-opportunity-visibility.service.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/services/backfill-applicant-opportunity-visibility.service.test.tsdeleted file mode 100644index eda965840a1..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/services/backfill-applicant-opportunity-visibility.service.test.ts+++ /dev/null@@ -1,267 +0,0 @@-import { beforeEach, describe, expect, it, vi } from 'vitest';-import { type CoreApiClient } from 'twenty-client-sdk/core';--import { backfillApplicantOpportunityVisibility } from './backfill-applicant-opportunity-visibility.service';--const OPPORTUNITY_A = 'opportunity-a';-const OPPORTUNITY_B = 'opportunity-b';-const MEMBER_1 = 'member-1';-const MEMBER_2 = 'member-2';--type GraphQlSelection = Record<string, unknown>;--const opportunityIdFromSelection = (selection: GraphQlSelection) =>- (- selection.opportunities as {- __args?: { filter?: { id?: { eq?: string } } };- }- )?.__args?.filter?.id?.eq;--const createApplicantIdStore = (initial?: Iterable<[string, string[]]>) => {- const applicantIdsByOpportunity = new Map<string, string[]>(initial);-- const readOpportunity = (opportunityId: string | undefined) => ({- opportunities: {- edges: opportunityId- ? [- {- node: {- id: opportunityId,- applicantPartnerUserIds:- applicantIdsByOpportunity.get(opportunityId) ?? [],- },- },- ]- : [],- },- });-- const writeOpportunity = (selection: GraphQlSelection) => {- const args = (- selection.updateOpportunity as {- __args?: { id?: string; data?: { applicantPartnerUserIds?: string[] } };- }- )?.__args;-- if (args?.id && args.data?.applicantPartnerUserIds) {- applicantIdsByOpportunity.set(args.id, args.data.applicantPartnerUserIds);- }-- return {};- };-- return { readOpportunity, writeOpportunity };-};--describe('backfillApplicantOpportunityVisibility', () => {- const query = vi.fn();- const mutation = vi.fn();- const client = { query, mutation } as unknown as CoreApiClient;-- beforeEach(() => {- query.mockReset();- mutation.mockReset();- mutation.mockResolvedValue({});- });-- it('writes one merged list per opportunity and skips ids that are already present', async () => {- const { readOpportunity, writeOpportunity } = createApplicantIdStore([- [OPPORTUNITY_A, [MEMBER_1]],- [OPPORTUNITY_B, [MEMBER_1]],- ]);-- query.mockImplementation((selection: GraphQlSelection) => {- if (selection.applications) {- return Promise.resolve({- applications: {- edges: [- {- node: {- id: 'app-1',- opportunityId: OPPORTUNITY_A,- partnerUserId: MEMBER_1,- },- },- {- node: {- id: 'app-2',- opportunityId: OPPORTUNITY_A,- partnerUserId: MEMBER_2,- },- },- {- node: {- id: 'app-3',- opportunityId: OPPORTUNITY_B,- partnerUserId: MEMBER_1,- },- },- {- node: {- id: 'app-4',- opportunityId: null,- partnerUserId: MEMBER_1,- },- },- ],- pageInfo: { hasNextPage: false },- },- });- }-- return Promise.resolve(- readOpportunity(opportunityIdFromSelection(selection)),- );- });-- mutation.mockImplementation((selection: GraphQlSelection) =>- Promise.resolve(writeOpportunity(selection)),- );-- const updated = await backfillApplicantOpportunityVisibility(client);-- expect(updated).toBe(1);- expect(mutation).toHaveBeenCalledTimes(1);- expect(mutation).toHaveBeenCalledWith({- updateOpportunity: {- __args: {- id: OPPORTUNITY_A,- data: { applicantPartnerUserIds: [MEMBER_1, MEMBER_2] },- },- id: true,- },- });- });-- it('returns 0 when no application has both an opportunity and a partner user', async () => {- query.mockResolvedValue({- applications: { edges: [], pageInfo: { hasNextPage: false } },- });-- const updated = await backfillApplicantOpportunityVisibility(client);-- expect(updated).toBe(0);- expect(mutation).not.toHaveBeenCalled();- });-- it('follows the cursor across pages and merges rows from every page', async () => {- const applicationPages: Record<string, unknown> = {- first: {- applications: {- edges: [- {- node: { opportunityId: OPPORTUNITY_A, partnerUserId: MEMBER_1 },- },- ],- pageInfo: { hasNextPage: true, endCursor: 'cursor-1' },- },- },- second: {- applications: {- edges: [- {- node: { opportunityId: OPPORTUNITY_A, partnerUserId: MEMBER_2 },- },- ],- pageInfo: { hasNextPage: false, endCursor: null },- },- },- };- const seenCursors: (string | undefined)[] = [];- const { readOpportunity, writeOpportunity } = createApplicantIdStore();-- query.mockImplementation((selection: GraphQlSelection) => {- if (selection.applications) {- const after = (- selection.applications as { __args?: { after?: string } }- )?.__args?.after;-- seenCursors.push(after);-- return Promise.resolve(- after === 'cursor-1'- ? applicationPages.second- : applicationPages.first,- );- }-- return Promise.resolve(- readOpportunity(opportunityIdFromSelection(selection)),- );- });-- mutation.mockImplementation((selection: GraphQlSelection) =>- Promise.resolve(writeOpportunity(selection)),- );-- const updated = await backfillApplicantOpportunityVisibility(client);-- expect(seenCursors).toEqual([undefined, 'cursor-1']);- expect(updated).toBe(1);- expect(mutation).toHaveBeenCalledWith({- updateOpportunity: {- __args: {- id: OPPORTUNITY_A,- data: { applicantPartnerUserIds: [MEMBER_1, MEMBER_2] },- },- id: true,- },- });- });-- it('grants the healthy opportunities, then fails loudly so the upgrade can be re-run', async () => {- const { readOpportunity, writeOpportunity } = createApplicantIdStore();-- query.mockImplementation((selection: GraphQlSelection) => {- if (selection.applications) {- return Promise.resolve({- applications: {- edges: [- {- node: {- id: 'app-1',- opportunityId: OPPORTUNITY_A,- partnerUserId: MEMBER_1,- },- },- {- node: {- id: 'app-2',- opportunityId: OPPORTUNITY_B,- partnerUserId: MEMBER_2,- },- },- ],- pageInfo: { hasNextPage: false },- },- });- }-- const requestedId = opportunityIdFromSelection(selection);-- if (requestedId === OPPORTUNITY_A) {- return Promise.reject(new Error('boom'));- }-- return Promise.resolve(readOpportunity(requestedId));- });-- mutation.mockImplementation((selection: GraphQlSelection) =>- Promise.resolve(writeOpportunity(selection)),- );-- await expect(- backfillApplicantOpportunityVisibility(client),- ).rejects.toThrow(/failed for 1 of 2 opportunities/);-- expect(mutation).toHaveBeenCalledWith({- updateOpportunity: {- __args: {- id: OPPORTUNITY_B,- data: { applicantPartnerUserIds: [MEMBER_2] },- },- id: true,- },- });- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/services/backfill-applicant-opportunity-visibility.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/services/backfill-applicant-opportunity-visibility.service.tsdeleted file mode 100644index d44cf2e33c1..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/services/backfill-applicant-opportunity-visibility.service.ts+++ /dev/null@@ -1,75 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--import { listApplicationsWithOpportunityPartnerUser } from 'src/modules/shared/graphql/queries/list-applications-with-opportunity-partner-user';-import { grantOpportunityVisibility } from 'src/modules/shared/services/grant-opportunity-visibility.service';-import { isNonEmptyString } from 'src/modules/shared/utils/is-non-empty-string.util';-import { collectAll } from 'src/modules/shared/utils/paginate.util';--type ApplicationRow = {- opportunityId?: string | null;- partnerUserId?: string | null;-};--export async function backfillApplicantOpportunityVisibility(- client: CoreApiClient,-): Promise<number> {- const applications = await collectAll<ApplicationRow>(async (after) => {- const page = await listApplicationsWithOpportunityPartnerUser(client, after);-- return page.applications;- });-- const idsByOpportunity = new Map<string, string[]>();-- for (const application of applications) {- const opportunityId = application.opportunityId;- const partnerUserId = application.partnerUserId;-- if (!isNonEmptyString(opportunityId) || !isNonEmptyString(partnerUserId)) {- continue;- }-- const current = idsByOpportunity.get(opportunityId) ?? [];-- if (!current.includes(partnerUserId)) {- current.push(partnerUserId);- idsByOpportunity.set(opportunityId, current);- }- }-- let updated = 0;- const failedOpportunityIds: string[] = [];-- for (const [opportunityId, applicantIds] of idsByOpportunity) {- // Collect failures rather than aborting on the first, so one bad opportunity cannot- // strand the rest — then throw below. The version gate runs this once per upgrade, so- // reporting a partial run as success would leave those applicants locked out for good.- try {- const result = await grantOpportunityVisibility(- client,- opportunityId,- applicantIds,- );-- if (result.granted) {- updated += 1;- }- } catch (error) {- failedOpportunityIds.push(opportunityId);- console.error(- `[backfill] applicant visibility failed for opportunity ${opportunityId}`,- error,- );- }- }-- if (failedOpportunityIds.length > 0) {- throw new Error(- `Applicant visibility backfill failed for ${failedOpportunityIds.length} of ` +- `${idsByOpportunity.size} opportunities (${failedOpportunityIds.join(', ')}). ` +- 'Re-run the upgrade — granting is idempotent, so the ones already done are skipped.',- );- }-- return updated;-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/services/backfill-partner-user-on-children.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/services/backfill-partner-user-on-children.service.tsdeleted file mode 100644index b23287ec4bf..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/services/backfill-partner-user-on-children.service.ts+++ /dev/null@@ -1,98 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--import {- stampPartnerUserFromPartner,- type PartnerChildObject,-} from 'src/modules/partner/self-service/services/stamp-partner-user-on-child.service';--const PAGE_SIZE = 200;--const CHILD_QUERIES: {- childObject: PartnerChildObject;- listKey: 'partnerLinks' | 'partnerServices' | 'partnerContents' | 'applications';-}[] = [- { childObject: 'partnerLink', listKey: 'partnerLinks' },- { childObject: 'partnerService', listKey: 'partnerServices' },- { childObject: 'partnerContent', listKey: 'partnerContents' },- { childObject: 'application', listKey: 'applications' },-];--type Connection<T> = {- edges?: { node: T }[];- pageInfo?: { hasNextPage?: boolean; endCursor?: string | null };-};--const connectionOf = <T>(response: unknown, key: string): Connection<T> =>- (response as Record<string, Connection<T>>)[key] ?? {};--// Walk every page so a workspace with more than one page of partners (or a partner-// with more than one page of children) is fully stamped instead of silently truncated.-const queryAllNodes = async <T>(- runPage: (after: string | null) => Promise<Connection<T>>,-): Promise<T[]> => {- const all: T[] = [];- let after: string | null = null;- for (;;) {- const page = await runPage(after);- for (const edge of page.edges ?? []) all.push(edge.node);- const nextCursor = page.pageInfo?.hasNextPage ? page.pageInfo.endCursor : null;- if (!nextCursor) break;- after = nextCursor;- }- return all;-};--export async function backfillPartnerUserOnChildren(- client: CoreApiClient,-): Promise<number> {- const partners = await queryAllNodes<{ id: string; partnerUserId: string | null }>(- (after) =>- client- .query({- partners: {- __args: { first: PAGE_SIZE, ...(after ? { after } : {}) },- edges: { node: { id: true, partnerUserId: true } },- pageInfo: { hasNextPage: true, endCursor: true },- },- })- .then((res) => connectionOf(res, 'partners')),- );-- let stamped = 0;-- for (const partner of partners) {- if (!partner.partnerUserId) {- continue;- }-- for (const { childObject, listKey } of CHILD_QUERIES) {- const children = await queryAllNodes<{ id: string; partnerUserId: string | null }>(- (after) =>- client- .query({- [listKey]: {- __args: {- filter: { partnerId: { eq: partner.id } },- first: PAGE_SIZE,- ...(after ? { after } : {}),- },- edges: { node: { id: true, partnerUserId: true } },- pageInfo: { hasNextPage: true, endCursor: true },- },- })- .then((res) => connectionOf(res, listKey)),- );-- for (const child of children) {- if (child.partnerUserId === partner.partnerUserId) {- continue;- }-- await stampPartnerUserFromPartner(client, partner.id, childObject, child.id);- stamped++;- }- }- }-- return stamped;-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/services/find-or-create-company-and-person.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/services/find-or-create-company-and-person.service.tsdeleted file mode 100644index 0f53efb19d1..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/services/find-or-create-company-and-person.service.ts+++ /dev/null@@ -1,66 +0,0 @@-import type { CoreApiClient } from 'twenty-client-sdk/core';--import { createCompany } from 'src/modules/shared/graphql/mutations/create-company';-import { createPerson } from 'src/modules/shared/graphql/mutations/create-person';-import { findCompanyByName } from 'src/modules/shared/graphql/queries/find-company-by-name';-import { findPersonByEmail } from 'src/modules/shared/graphql/queries/find-person-by-email';--export async function findCompanyIdByExactName(- client: CoreApiClient,- companyName: string,-): Promise<string | undefined> {- const name = companyName.trim();-- const lookup = await findCompanyByName(client, name);-- return lookup.companies?.edges?.[0]?.node?.id;-}--export async function findOrCreateCompanyByName(- client: CoreApiClient,- companyName: string,-): Promise<string> {- const existing = await findCompanyIdByExactName(client, companyName);- if (existing !== undefined) return existing;-- const name = companyName.trim();- const result = await createCompany(client, name);- const id = result.createCompany?.id;- if (id === undefined) throw new Error('createCompany did not return an id');- return id;-}--export async function findPersonIdByPrimaryEmail(- client: CoreApiClient,- email: string,-): Promise<string | undefined> {- const primaryEmail = email.trim();-- const lookup = await findPersonByEmail(client, primaryEmail);-- return lookup.people?.edges?.[0]?.node?.id;-}--export type FindOrCreatePersonByEmailInput = {- email: string;- firstName: string;- lastName: string;- companyId: string;-};--export async function findOrCreatePersonByEmail(- client: CoreApiClient,- input: FindOrCreatePersonByEmailInput,-): Promise<string> {- const email = input.email.trim();- const firstName = input.firstName.trim();- const lastName = input.lastName.trim();-- const existing = await findPersonIdByPrimaryEmail(client, email);- if (existing !== undefined) return existing;-- const result = await createPerson(client, { email, firstName, lastName, companyId: input.companyId });- const id = result.createPerson?.id;- if (id === undefined) throw new Error('createPerson did not return an id');- return id;-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/services/grant-opportunity-visibility.service.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/services/grant-opportunity-visibility.service.test.tsdeleted file mode 100644index e58cd7bf433..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/services/grant-opportunity-visibility.service.test.ts+++ /dev/null@@ -1,142 +0,0 @@-import { beforeEach, describe, expect, it, vi } from 'vitest';-import { type CoreApiClient } from 'twenty-client-sdk/core';--import { grantOpportunityVisibility } from './grant-opportunity-visibility.service';--const OPPORTUNITY_ID = 'opportunity-1';-const MEMBER_ID = 'member-1';-const OTHER_MEMBER_ID = 'member-2';--const oneOpportunity = (applicantPartnerUserIds: string[] | null) => ({- opportunities: {- edges: [{ node: { id: OPPORTUNITY_ID, applicantPartnerUserIds } }],- },-});--const updateCall = (applicantPartnerUserIds: string[]) => ({- updateOpportunity: {- __args: {- id: OPPORTUNITY_ID,- data: { applicantPartnerUserIds },- },- id: true,- },-});--describe('grantOpportunityVisibility', () => {- const query = vi.fn();- const mutation = vi.fn();- const client = { query, mutation } as unknown as CoreApiClient;-- beforeEach(() => {- query.mockReset();- mutation.mockReset();- mutation.mockResolvedValue({});- });-- it('appends the member id when the opportunity has no list yet', async () => {- query- .mockResolvedValueOnce(oneOpportunity(null))- .mockResolvedValueOnce(oneOpportunity([MEMBER_ID]));-- const result = await grantOpportunityVisibility(client, OPPORTUNITY_ID, [- MEMBER_ID,- ]);-- expect(result).toEqual({ granted: true });- expect(mutation).toHaveBeenCalledTimes(1);- expect(mutation).toHaveBeenCalledWith(updateCall([MEMBER_ID]));- });-- it('keeps existing members and appends the new one', async () => {- query- .mockResolvedValueOnce(oneOpportunity([OTHER_MEMBER_ID]))- .mockResolvedValueOnce(- oneOpportunity([OTHER_MEMBER_ID, MEMBER_ID]),- );-- const result = await grantOpportunityVisibility(client, OPPORTUNITY_ID, [- MEMBER_ID,- ]);-- expect(result).toEqual({ granted: true });- expect(mutation).toHaveBeenCalledTimes(1);- expect(mutation).toHaveBeenCalledWith(- updateCall([OTHER_MEMBER_ID, MEMBER_ID]),- );- });-- it('does not write when every incoming member is already listed', async () => {- query.mockResolvedValue(oneOpportunity([MEMBER_ID]));-- const result = await grantOpportunityVisibility(client, OPPORTUNITY_ID, [- MEMBER_ID,- ]);-- expect(result).toEqual({ granted: false, already: true });- expect(mutation).not.toHaveBeenCalled();- });-- it('does not write when the opportunity is missing', async () => {- query.mockResolvedValue({ opportunities: { edges: [] } });-- const result = await grantOpportunityVisibility(client, OPPORTUNITY_ID, [- MEMBER_ID,- ]);-- expect(result).toEqual({ granted: false, reason: 'opportunity_missing' });- expect(mutation).not.toHaveBeenCalled();- });-- it('does not write when opportunity or member ids are missing', async () => {- const result = await grantOpportunityVisibility(client, '', [MEMBER_ID]);-- expect(result).toEqual({ granted: false, reason: 'missing_ids' });- expect(query).not.toHaveBeenCalled();- expect(mutation).not.toHaveBeenCalled();- });-- it('writes a second time when a concurrent grant dropped the member id', async () => {- query- .mockResolvedValueOnce(oneOpportunity(null))- .mockResolvedValueOnce(oneOpportunity([OTHER_MEMBER_ID]))- .mockResolvedValueOnce(- oneOpportunity([OTHER_MEMBER_ID, MEMBER_ID]),- );-- const result = await grantOpportunityVisibility(client, OPPORTUNITY_ID, [- MEMBER_ID,- ]);-- expect(result).toEqual({ granted: true });- expect(mutation).toHaveBeenCalledTimes(2);- expect(mutation).toHaveBeenNthCalledWith(1, updateCall([MEMBER_ID]));- expect(mutation).toHaveBeenNthCalledWith(- 2,- updateCall([OTHER_MEMBER_ID, MEMBER_ID]),- );- });-- it('throws when the member id is still missing after concurrent writes', async () => {- query.mockResolvedValue(oneOpportunity([OTHER_MEMBER_ID]));-- await expect(- grantOpportunityVisibility(client, OPPORTUNITY_ID, [MEMBER_ID]),- ).rejects.toThrow(/still missing member-1/);-- expect(mutation).toHaveBeenCalledTimes(2);- });-- it('does not claim a grant when the opportunity disappears after the write', async () => {- query- .mockResolvedValueOnce(oneOpportunity(null))- .mockResolvedValueOnce({ opportunities: { edges: [] } });-- const result = await grantOpportunityVisibility(client, OPPORTUNITY_ID, [- MEMBER_ID,- ]);-- expect(result).toEqual({ granted: false, reason: 'opportunity_missing' });- expect(mutation).toHaveBeenCalledTimes(1);- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/services/grant-opportunity-visibility.service.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/services/grant-opportunity-visibility.service.tsdeleted file mode 100644index fb04f386edc..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/services/grant-opportunity-visibility.service.ts+++ /dev/null@@ -1,85 +0,0 @@-import { type CoreApiClient } from 'twenty-client-sdk/core';--import { updateOpportunityApplicantPartnerUserIds } from 'src/modules/shared/graphql/mutations/update-opportunity-applicant-partner-user-ids';-import { getOpportunityApplicantPartnerUserIds } from 'src/modules/shared/graphql/queries/get-opportunity-applicant-partner-user-ids';-import { isNonEmptyString } from 'src/modules/shared/utils/is-non-empty-string.util';--const mergeApplicantPartnerUserIds = (- current: readonly string[] | null | undefined,- incoming: readonly string[],-): string[] => [...new Set([...(current ?? []), ...incoming])];--const GRANT_READ_ATTEMPTS = 3;--type GrantOpportunityVisibilityResult =- | { granted: false; reason: 'missing_ids' | 'opportunity_missing' }- | { granted: false; already: true }- | { granted: true };--const readApplicantIds = async (- client: CoreApiClient,- opportunityId: string,-): Promise<string[] | null> => {- const result = await getOpportunityApplicantPartnerUserIds(- client,- opportunityId,- );- const opportunity = result.opportunities?.edges?.[0]?.node;-- if (!opportunity?.id) {- return null;- }-- return opportunity.applicantPartnerUserIds ?? [];-};--export async function grantOpportunityVisibility(- client: CoreApiClient,- opportunityId: string | null | undefined,- partnerUserIds: readonly string[],-): Promise<GrantOpportunityVisibilityResult> {- const incoming = partnerUserIds.filter(isNonEmptyString);-- if (!isNonEmptyString(opportunityId) || incoming.length === 0) {- return { granted: false, reason: 'missing_ids' };- }-- // updateOpportunity replaces the array, so two applies can each merge from the same- // stale read. Re-read after every write. Throw if the member id is still missing so the- // create trigger retries and the upgrade backfill fails loud. The core API has no- // atomic append; a lost id after this loop is a failed grant, not a silent success.- let attempt = 0;-- while (true) {- attempt += 1;- const current = await readApplicantIds(client, opportunityId);-- if (current === null) {- return { granted: false, reason: 'opportunity_missing' };- }-- if (incoming.every((partnerUserId) => current.includes(partnerUserId))) {- return attempt === 1- ? { granted: false, already: true }- : { granted: true };- }-- if (attempt === GRANT_READ_ATTEMPTS) {- const missingPartnerUserIds = incoming.filter(- (partnerUserId) => !current.includes(partnerUserId),- );-- throw new Error(- `Could not grant opportunity visibility for ${opportunityId}: ` +- `applicantPartnerUserIds still missing ${missingPartnerUserIds.join(', ')} ` +- `after concurrent writes.`,- );- }-- await updateOpportunityApplicantPartnerUserIds(- client,- opportunityId,- mergeApplicantPartnerUserIds(current, incoming),- );- }-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/utils/http-url.util.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/utils/http-url.util.test.tsdeleted file mode 100644index 7b2476a8d81..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/utils/http-url.util.test.ts+++ /dev/null@@ -1,40 +0,0 @@-import { describe, expect, it } from 'vitest';--import { isHttpUrl, optionalHttpUrl } from './http-url.util';--describe('isHttpUrl', () => {- it('accepts http and https', () => {- expect(isHttpUrl('http://example.com')).toBe(true);- expect(isHttpUrl('https://example.com/path?q=1')).toBe(true);- });-- it('rejects javascript:, data:, and other schemes', () => {- expect(isHttpUrl('javascript:alert(1)')).toBe(false);- expect(isHttpUrl('data:text/html,<script>1</script>')).toBe(false);- expect(isHttpUrl('mailto:[email protected]')).toBe(false);- expect(isHttpUrl('not a url')).toBe(false);- expect(isHttpUrl('')).toBe(false);- });-});--describe('optionalHttpUrl', () => {- it('treats empty string as null (clear the field)', () => {- expect(optionalHttpUrl.parse('')).toBeNull();- });-- it('passes a valid https url through', () => {- expect(optionalHttpUrl.parse('https://example.com')).toBe('https://example.com');- });-- it('passes a valid http url through', () => {- expect(optionalHttpUrl.parse('http://example.com')).toBe('http://example.com');- });-- it('treats null as null (the schema is nullable)', () => {- expect(optionalHttpUrl.parse(null)).toBeNull();- });-- it('rejects a javascript: url', () => {- expect(optionalHttpUrl.safeParse('javascript:alert(1)').success).toBe(false);- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/utils/http-url.util.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/utils/http-url.util.tsdeleted file mode 100644index 2814888b022..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/utils/http-url.util.ts+++ /dev/null@@ -1,23 +0,0 @@-import { z } from 'zod';--// Partner-controlled URLs are echoed into public marketplace profiles and rendered as-// links, so block non-web protocols (javascript:, data:) that would execute in a-// visitor's origin. Only http/https are allowed.-export const isHttpUrl = (value: string): boolean => {- try {- const { protocol } = new URL(value);- return protocol === 'http:' || protocol === 'https:';- } catch {- return false;- }-};--// A blank value means "clear the field"; anything else must be a valid http/https URL.-export const optionalHttpUrl = z.preprocess(- (value) => (value === '' ? null : value),- z- .string()- .refine(isHttpUrl, { message: 'URL must use http or https' })- .nullable()- .optional(),-);diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/utils/is-non-empty-string.util.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/utils/is-non-empty-string.util.tsdeleted file mode 100644index 3d8e42d9ea7..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/utils/is-non-empty-string.util.ts+++ /dev/null@@ -1,3 +0,0 @@-export function isNonEmptyString(value: unknown): value is string {- return typeof value === 'string' && value.trim().length > 0;-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/utils/paginate.util.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/utils/paginate.util.tsdeleted file mode 100644index 52173207c91..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/utils/paginate.util.ts+++ /dev/null@@ -1,22 +0,0 @@-type PageResult<TNode> = {- edges?: ({ node?: TNode | null } | null)[] | null;- pageInfo?: { hasNextPage?: boolean | null; endCursor?: string | null } | null;-} | null | undefined;--// Drain a cursor-paginated connection fully: accumulate every present node, advancing the-// cursor until hasNextPage is false. A single capped page would strand overflow rows.-export async function collectAll<TNode>(- fetchPage: (after: string | undefined) => Promise<PageResult<TNode>>,-): Promise<TNode[]> {- const nodes: TNode[] = [];- let after: string | undefined;- for (;;) {- const page = await fetchPage(after);- for (const edge of page?.edges ?? []) {- if (edge?.node) nodes.push(edge.node);- }- if (!page?.pageInfo?.hasNextPage) break;- after = page?.pageInfo?.endCursor ?? undefined;- }- return nodes;-}diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/utils/plan-post-install.util.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/utils/plan-post-install.util.test.tsdeleted file mode 100644index 103dfd14642..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/utils/plan-post-install.util.test.ts+++ /dev/null@@ -1,40 +0,0 @@-import { describe, expect, it } from 'vitest';--import { planPostInstall } from './plan-post-install.util';--describe('planPostInstall', () => {- it('runs both backfills on a fresh install', () => {- expect(planPostInstall(undefined)).toEqual({- stampPartnerUser: true,- grantApplicantVisibility: true,- });- });-- it('runs only the applicant grant when upgrading from 1.8.0', () => {- expect(planPostInstall('1.8.0')).toEqual({- stampPartnerUser: false,- grantApplicantVisibility: true,- });- });-- // 1.8.1 is another PR; 1.8.2 never shipped on main. Both still need the grant.- it('runs only the applicant grant when upgrading from a release below 1.8.3', () => {- for (const previousVersion of ['1.8.1', '1.8.2']) {- expect(planPostInstall(previousVersion)).toEqual({- stampPartnerUser: false,- grantApplicantVisibility: true,- });- }- });-- it('skips both backfills when already on 1.8.3 or later', () => {- expect(planPostInstall('1.8.3')).toEqual({- stampPartnerUser: false,- grantApplicantVisibility: false,- });- expect(planPostInstall('1.9.0')).toEqual({- stampPartnerUser: false,- grantApplicantVisibility: false,- });- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/utils/plan-post-install.util.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/utils/plan-post-install.util.tsdeleted file mode 100644index 417fce930f6..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/utils/plan-post-install.util.ts+++ /dev/null@@ -1,40 +0,0 @@-// The release that narrowed the Application RLS predicate to `partnerUser IS me`.-const STRICT_APPLICATION_RLS_VERSION = [1, 6, 1] as const;-// The release that grants opportunity read access to applicants after unlist.-// Keep this equal to package.json for this feature. A gate below the shipping-// version skips the backfill for any workspace already on that lower number.-// 1.8.1 is #25010, so it still needs the grant.-const APPLICANT_OPPORTUNITY_VISIBILITY_VERSION = [1, 8, 3] as const;--const isBeforeAppVersion = (- version: string,- target: readonly number[],-): boolean => {- const parts = version.split('.').map((part) => Number.parseInt(part, 10) || 0);-- for (let index = 0; index < target.length; index++) {- const part = parts[index] ?? 0;- if (part !== target[index]) return part < target[index];- }-- return false;-};--export type PostInstallPlan = {- stampPartnerUser: boolean;- grantApplicantVisibility: boolean;-};--export const planPostInstall = (- previousVersion: string | undefined,-): PostInstallPlan => ({- stampPartnerUser:- !previousVersion ||- isBeforeAppVersion(previousVersion, STRICT_APPLICATION_RLS_VERSION),- grantApplicantVisibility:- !previousVersion ||- isBeforeAppVersion(- previousVersion,- APPLICANT_OPPORTUNITY_VISIBILITY_VERSION,- ),-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/utils/strip-markdown.util.test.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/utils/strip-markdown.util.test.tsdeleted file mode 100644index 5bada54916e..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/utils/strip-markdown.util.test.ts+++ /dev/null@@ -1,15 +0,0 @@-import { describe, expect, it } from 'vitest';--import { stripMarkdown } from './strip-markdown.util';--describe('stripMarkdown', () => {- it('removes headings, emphasis, and list markers', () => {- expect(- stripMarkdown('**Senior partner**\n\n#### Who we work with\n\n- Seed to Series C'),- ).toBe('Senior partner Who we work with Seed to Series C');- });-- it('unwraps link labels', () => {- expect(stripMarkdown('[Twenty](https://twenty.com)')).toBe('Twenty');- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/utils/strip-markdown.util.ts b/packages/twenty-apps/internal/twenty-partners/src/modules/shared/utils/strip-markdown.util.tsdeleted file mode 100644index af675d544f5..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/modules/shared/utils/strip-markdown.util.ts+++ /dev/null@@ -1,7 +0,0 @@-export const stripMarkdown = (markdown: string): string =>- markdown- .replace(/```[\s\S]*?```/g, ' ')- .replace(/[#>*_~`-]/g, ' ')- .replace(/\[([^\]]*)\]\([^)]*\)/g, '$1')- .replace(/\s+/g, ' ')- .trim();diff --git a/packages/twenty-apps/internal/twenty-partners/src/roles/partner.role.test.ts b/packages/twenty-apps/internal/twenty-partners/src/roles/partner.role.test.tsdeleted file mode 100644index 1de33d7b078..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/roles/partner.role.test.ts+++ /dev/null@@ -1,146 +0,0 @@-import { describe, expect, it } from 'vitest';-import {- RowLevelPermissionPredicateGroupLogicalOperator,- RowLevelPermissionPredicateOperand,- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,-} from 'twenty-sdk/define';--import {- PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER,- PARTNER_LINK_OBJECT_UNIVERSAL_IDENTIFIER,- PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- PARTNER_SERVICE_OBJECT_UNIVERSAL_IDENTIFIER,-} from 'src/constants/universal-identifiers';-import { APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER } from 'src/modules/application/objects/application.object';-import { OPPORTUNITY_APPLICANT_PARTNER_USER_IDS_FIELD_ID } from 'src/modules/opportunity/fields/opportunity-applicant-partner-user-ids.field';-import { OPPORTUNITY_IS_LISTED_FIELD_ID } from 'src/modules/opportunity/fields/opportunity-is-listed.field';--import partnerRole, { OPPORTUNITY_RLS_OR_GROUP_ID } from './partner.role';--const WORKSPACE_MEMBER_ID_FIELD =- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.workspaceMember.fields.id- .universalIdentifier;-const OPPORTUNITY_OBJECT =- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier;--const predicates = partnerRole.config.rowLevelPermissionPredicates ?? [];-const groups = partnerRole.config.rowLevelPermissionPredicateGroups ?? [];--const opportunityPredicates = predicates.filter(- (predicate) => predicate.objectUniversalIdentifier === OPPORTUNITY_OBJECT,-);--describe('partner.role row-level predicates', () => {- it('is a valid role definition', () => {- expect(partnerRole.errors).toEqual([]);- expect(partnerRole.success).toBe(true);- });-- // Every object the partner can read must be row-scoped. A missing entry here silently- // widens the role to the whole workspace, so assert the exact set.- it('row-scopes every object the partner can read', () => {- const scopedObjects = predicates.map(- (predicate) => predicate.objectUniversalIdentifier,- );-- expect(new Set(scopedObjects)).toEqual(- new Set([- PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- PARTNER_LINK_OBJECT_UNIVERSAL_IDENTIFIER,- PARTNER_SERVICE_OBJECT_UNIVERSAL_IDENTIFIER,- PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER,- APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- OPPORTUNITY_OBJECT,- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.person.universalIdentifier,- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.company.universalIdentifier,- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.workspaceMember- .universalIdentifier,- ]),- );- });-- it('gives every object outside the opportunity group a single owner check', () => {- const ownershipPredicates = predicates.filter(- (predicate) => predicate.objectUniversalIdentifier !== OPPORTUNITY_OBJECT,- );-- expect(ownershipPredicates).toHaveLength(8);-- for (const predicate of ownershipPredicates) {- // RELATION filters reject CONTAINS at query time, so ownership must use IS.- expect(predicate.operand).toBe(RowLevelPermissionPredicateOperand.IS);- expect(predicate.workspaceMemberFieldUniversalIdentifier).toBe(- WORKSPACE_MEMBER_ID_FIELD,- );- expect(predicate.predicateGroupUniversalIdentifier).toBeUndefined();- }- });-- it('ORs the three opportunity predicates in one group', () => {- expect(groups).toHaveLength(1);- expect(groups[0].universalIdentifier).toBe(OPPORTUNITY_RLS_OR_GROUP_ID);- expect(OPPORTUNITY_RLS_OR_GROUP_ID).toBe(- '7a7fd85d-62c6-4cac-876f-3a67951e7b10',- );- expect(groups[0].logicalOperator).toBe(- RowLevelPermissionPredicateGroupLogicalOperator.OR,- );-- expect(opportunityPredicates).toHaveLength(3);-- for (const predicate of opportunityPredicates) {- expect(predicate.predicateGroupUniversalIdentifier).toBe(- groups[0].universalIdentifier,- );- }-- expect(- opportunityPredicates.map((predicate) => predicate.position),- ).toEqual([0, 1, 2]);- });-- it('keeps a listed brief visible without naming a member', () => {- const isListed = opportunityPredicates.find(- (predicate) =>- predicate.fieldUniversalIdentifier === OPPORTUNITY_IS_LISTED_FIELD_ID,- );-- expect(isListed?.value).toBe(true);- expect(isListed?.workspaceMemberFieldUniversalIdentifier).toBeUndefined();- });-- it('matches an applicant against the array with CONTAINS', () => {- const applicant = opportunityPredicates.find(- (predicate) =>- predicate.fieldUniversalIdentifier ===- OPPORTUNITY_APPLICANT_PARTNER_USER_IDS_FIELD_ID,- );-- expect(applicant?.operand).toBe(- RowLevelPermissionPredicateOperand.CONTAINS,- );- expect(applicant?.workspaceMemberFieldUniversalIdentifier).toBe(- WORKSPACE_MEMBER_ID_FIELD,- );- });-- it('hides applicantPartnerUserIds so one applicant cannot read the others', () => {- const fieldPermission = partnerRole.config.fieldPermissions?.find(- (permission) =>- permission.fieldUniversalIdentifier ===- OPPORTUNITY_APPLICANT_PARTNER_USER_IDS_FIELD_ID,- );-- expect(fieldPermission?.canReadFieldValue).toBe(false);- expect(fieldPermission?.canUpdateFieldValue).toBe(false);- });-- it('keeps predicate identifiers unique and stable so sync updates in place', () => {- const identifiers = [- ...predicates.map((predicate) => predicate.universalIdentifier),- ...groups.map((group) => group.universalIdentifier),- ];-- expect(new Set(identifiers).size).toBe(identifiers.length);- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/roles/partner.role.ts b/packages/twenty-apps/internal/twenty-partners/src/roles/partner.role.tsdeleted file mode 100644index 42c5eba7057..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/roles/partner.role.ts+++ /dev/null@@ -1,667 +0,0 @@-import {- RowLevelPermissionPredicateGroupLogicalOperator,- RowLevelPermissionPredicateOperand,- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,- SystemPermissionFlag,- defineRole,-} from 'twenty-sdk/define';--import {- INTRO_SENT_AT_FIELD_UNIVERSAL_IDENTIFIER,- PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER,- PARTNER_LINK_OBJECT_UNIVERSAL_IDENTIFIER,- PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- PARTNER_ROLE_UNIVERSAL_IDENTIFIER,- PARTNER_SERVICE_OBJECT_UNIVERSAL_IDENTIFIER,-} from 'src/constants/universal-identifiers';-import { PARTNER_SUPER_PARTNER_FIELD_UNIVERSAL_IDENTIFIER } from 'src/modules/partner/constants/partner-field-universal-identifiers';-import {- APPLICATION_NAME_FIELD_ID,- APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- APPLICATION_PARTNER_FIELD_ID,- APPLICATION_PARTNER_USER_FIELD_ID,- APPLICATION_STATE_FIELD_ID,- APPLICATIONS_ON_OPPORTUNITY_FIELD_ID,-} from 'src/modules/application/objects/application.object';-import {- PARTNER_CONTENT_APPROVAL_DATE_FIELD_ID,- PARTNER_CONTENT_DOCUMENTS_FIELD_ID,- PARTNER_CONTENT_INTERVIEW_FIELD_ID,- PARTNER_CONTENT_STATUS_FIELD_ID,- PARTNER_CONTENT_TYPE_FIELD_ID,-} from 'src/modules/partner/objects/partner-content.object';-import { PARTNER_CONTENT_PARTNER_FIELD_ID } from 'src/modules/partner/fields/partner-content-partner.field';-import { OPPORTUNITY_APPLICANT_PARTNER_USER_IDS_FIELD_ID } from 'src/modules/opportunity/fields/opportunity-applicant-partner-user-ids.field';-import { OPPORTUNITY_DESIGN_DOC_STATUS_FIELD_ID } from 'src/modules/opportunity/fields/opportunity-design-doc-status.field';-import { OPPORTUNITY_DESIGN_DOC_URL_FIELD_ID } from 'src/modules/opportunity/fields/opportunity-design-doc-url.field';-import { OPPORTUNITY_HOSTING_TYPE_FIELD_ID } from 'src/modules/opportunity/fields/opportunity-hosting-type.field';-import { OPPORTUNITY_IS_LISTED_FIELD_ID } from 'src/modules/opportunity/fields/opportunity-is-listed.field';-import { OPPORTUNITY_LOST_REASON_FIELD_ID } from 'src/modules/opportunity/fields/opportunity-lost-reason.field';-import { OPPORTUNITY_NEED_FIELD_ID } from 'src/modules/opportunity/fields/opportunity-need.field';-import { OPPORTUNITY_NUMBER_OF_SEATS_FIELD_ID } from 'src/modules/opportunity/fields/opportunity-number-of-seats.field';-import { OPPORTUNITY_REQUIREMENTS_FIELD_ID } from 'src/modules/opportunity/fields/opportunity-requirements.field';-import { OPPORTUNITY_SUBSCRIPTION_FREQUENCY_FIELD_ID } from 'src/modules/opportunity/fields/opportunity-subscription-frequency.field';-import { OPPORTUNITY_SUBSCRIPTION_TYPE_FIELD_ID } from 'src/modules/opportunity/fields/opportunity-subscription-type.field';-import { OPPORTUNITY_TFT_ID_FIELD_ID } from 'src/modules/opportunity/fields/opportunity-tft-id.field';-import { OPPORTUNITY_USE_CASE_FIELD_ID } from 'src/modules/opportunity/fields/opportunity-use-case.field';-import { PARTNER_COMPANY_FIELD_ID } from 'src/modules/partner/fields/partner-company.field';-import { PARTNER_LINK_PARTNER_FIELD_ID } from 'src/modules/partner/fields/partner-link-partner.field';-import { PARTNER_ON_OPPORTUNITY_FIELD_ID } from 'src/modules/opportunity/fields/partner-on-opportunity.field';-import { PARTNER_SERVICE_PARTNER_FIELD_ID } from 'src/modules/partner/fields/partner-service-partner.field';-import { PARTNER_USER_ON_OPPORTUNITY_FIELD_ID } from 'src/modules/opportunity/fields/partner-user-on-opportunity.field';-import { PARTNER_USER_ON_PARTNER_CONTENT_FIELD_ID } from 'src/modules/partner/fields/partner-user-on-partner-content.field';-import { PARTNER_USER_ON_PARTNER_LINK_FIELD_ID } from 'src/modules/partner/fields/partner-user-on-partner-link.field';-import { PARTNER_USER_ON_PARTNER_FIELD_ID } from 'src/modules/partner/fields/partner-user-on-partner.field';-import { PARTNER_USER_ON_PARTNER_SERVICE_FIELD_ID } from 'src/modules/partner/fields/partner-user-on-partner-service.field';-import { PARTNER_USER_ON_COMPANY_FIELD_ID } from 'src/modules/partner/fields/partner-user-on-company.field';-import { PARTNER_USER_ON_PERSON_FIELD_ID } from 'src/modules/partner/fields/partner-user-on-person.field';-import { REFERRED_BY_PARTNER_ON_OPPORTUNITY_FIELD_ID } from 'src/modules/opportunity/fields/referred-by-partner-on-opportunity.field';--// Shared with configure-partner-rls.ts, which locates the role by this label.-export const PARTNER_ROLE_LABEL = 'Partner';--export const OPPORTUNITY_RLS_OR_GROUP_ID =- '7a7fd85d-62c6-4cac-876f-3a67951e7b10';--const RLS_PREDICATE_IDS = {- partner: '501a50b0-9e57-4a5a-99c3-88c44dc46d4a',- person: 'e22864f1-bf16-4645-a1be-2a7b496f9553',- company: '5560449f-53a2-47e4-86a2-ac9d046d7f48',- partnerLink: '12298a33-14b8-4400-a2a3-6808248f30ca',- partnerService: '6b12da67-2e82-4a4a-950c-590dcccae147',- partnerContent: 'a030e3a0-bcf5-4894-aa85-6f7ef346f540',- application: '028e9c80-608f-4c19-883c-bea2978e957b',- workspaceMemberSelf: 'cc793cb4-c57f-4b37-a16a-2d1077aaffee',- opportunityPartnerUser: '05267679-8996-4787-aaf2-f9e2f7eb960f',- opportunityIsListed: '06475b7d-5e56-4a9d-be5c-83a18c0c28ff',- opportunityApplicant: '5278f25a-c5f9-4e77-bb38-4e28a1b01556',-} as const;--const WORKSPACE_MEMBER_ID_FIELD_UNIVERSAL_IDENTIFIER =- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.workspaceMember.fields.id- .universalIdentifier;--// Operand must be IS, not CONTAINS: the upsert accepts CONTAINS but the RELATION query-// filter only allows IS / IS_NOT and throws at query time.-const ownedByCurrentMember = (- universalIdentifier: string,- objectUniversalIdentifier: string,- fieldUniversalIdentifier: string,-) => ({- universalIdentifier,- objectUniversalIdentifier,- fieldUniversalIdentifier,- operand: RowLevelPermissionPredicateOperand.IS,- workspaceMemberFieldUniversalIdentifier:- WORKSPACE_MEMBER_ID_FIELD_UNIVERSAL_IDENTIFIER,-});--// External partner self-service role: a partner sees only its own records and can edit its-// own Partner profile. Company, Person, Opportunity and Application are read-only — the-// pitch is set once by the apply route (application role) at creation and is never editable-// by the partner afterwards. Application rows are scoped to own partnerUser (RLS).-// Opportunity rows: listed briefs, assigned partnerUser, or applicantPartnerUserIds.-// Row-level predicates ship in this manifest (rowLevelPermissionPredicates below), so an-// install or upgrade configures them — no post-install script step.-//-// The Opportunity and Application field locks below are moot now that neither object is-// writable at all. They stay because configure-partner-rls.ts asserts on them and exits-// non-zero on drift, and because they still describe intent if object access ever reopens.-//-// `updatedBy` and `position` are left unlocked on purpose: the server injects `updatedBy`-// into every update (ActorFromAuthContextService) and co-writes `position` with `stage` on a-// kanban drag, so locking either would make every opportunity update fail with-// PERMISSION_DENIED if object-level write returned. The server overwrites both regardless,-// so there's nothing to protect. `createdBy` stays locked (not injected on update);-// `searchVector` is a generated column, so its lock is an inert no-op.-export default defineRole({- universalIdentifier: PARTNER_ROLE_UNIVERSAL_IDENTIFIER,- label: PARTNER_ROLE_LABEL,- description:- 'External partner self-service role. Sees only its own Partner/Person/Company/PartnerLink/PartnerService/PartnerContent/Opportunity/Application records (row-level). Can edit its own Partner profile; Application is read-only (the pitch is set once at apply time and cannot be edited afterwards); Opportunity stage/amount are read-only. Listed briefs are visible to all partners; after unlist, a partner still sees briefs it applied to or was invited to.',- icon: 'IconBuildingStore',- canBeAssignedToUsers: true,- canUpdateAllSettings: false,- canReadAllObjectRecords: false,- canUpdateAllObjectRecords: false,- canSoftDeleteAllObjectRecords: false,- canDestroyAllObjectRecords: false,- // UPLOAD_FILE lets partners upload their own profile picture and case-study covers on the- // native record page (the FilesField upload mutation is gated behind this flag).- permissionFlagUniversalIdentifiers: [SystemPermissionFlag.UPLOAD_FILE],- // Lock every Opportunity field except the system/server-managed fields left out here- // (id, timestamps, updatedBy, position — see header). Stage + amount are locked too.- fieldPermissions: [- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.fields.name- .universalIdentifier,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.fields.closeDate- .universalIdentifier,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.fields.stage- .universalIdentifier,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.fields.amount- .universalIdentifier,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.fields.createdBy- .universalIdentifier,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.fields.pointOfContact- .universalIdentifier,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.fields.company- .universalIdentifier,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.fields.owner- .universalIdentifier,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.fields.taskTargets- .universalIdentifier,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.fields.noteTargets- .universalIdentifier,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.fields.attachments- .universalIdentifier,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.fields- .timelineActivities.universalIdentifier,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.fields.searchVector- .universalIdentifier,- canUpdateFieldValue: false,- },- // App-specific Opportunity fields (added by this app, also read-only for Partner).- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier: PARTNER_ON_OPPORTUNITY_FIELD_ID,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier: REFERRED_BY_PARTNER_ON_OPPORTUNITY_FIELD_ID,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier: PARTNER_USER_ON_OPPORTUNITY_FIELD_ID,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier: INTRO_SENT_AT_FIELD_UNIVERSAL_IDENTIFIER,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier: OPPORTUNITY_USE_CASE_FIELD_ID,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier: OPPORTUNITY_TFT_ID_FIELD_ID,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier: OPPORTUNITY_DESIGN_DOC_URL_FIELD_ID,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier: OPPORTUNITY_SUBSCRIPTION_FREQUENCY_FIELD_ID,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier: OPPORTUNITY_HOSTING_TYPE_FIELD_ID,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier: OPPORTUNITY_LOST_REASON_FIELD_ID,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier: OPPORTUNITY_NUMBER_OF_SEATS_FIELD_ID,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier: OPPORTUNITY_SUBSCRIPTION_TYPE_FIELD_ID,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier: OPPORTUNITY_DESIGN_DOC_STATUS_FIELD_ID,- canUpdateFieldValue: false,- },- // Marketplace brief fields — read-only for partners (listed briefs visible via RLS OR predicate).- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier: OPPORTUNITY_IS_LISTED_FIELD_ID,- canUpdateFieldValue: false,- },- {- // RLS allowlist of applicant member ids — partners must not read or write it, or one- // applicant would see the others. Hiding it costs realtime only: the server strips- // restricted fields before matching an event against the RLS predicate, so live- // updates for a brief matched solely by this field never reach the partner. The- // initial query still returns the row, so it appears on reload.- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier: OPPORTUNITY_APPLICANT_PARTNER_USER_IDS_FIELD_ID,- canReadFieldValue: false,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier: APPLICATIONS_ON_OPPORTUNITY_FIELD_ID,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier: OPPORTUNITY_REQUIREMENTS_FIELD_ID,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier: OPPORTUNITY_NEED_FIELD_ID,- canUpdateFieldValue: false,- },- // Partner object — lock admin-managed fields so partners can't self-promote or alter ops data.- {- objectUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- fieldUniversalIdentifier: 'a0000002-0000-4000-8000-000000000002',- canUpdateFieldValue: false,- },- {- // Validation Stage — read-locked too: admin-only on the record page, hidden from partners.- objectUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- fieldUniversalIdentifier: '2ca9856f-f54a-4326-9ff3-668fd7da0b50',- canReadFieldValue: false,- canUpdateFieldValue: false,- },- {- // Super partner — listed on the record page; partners can see it, cannot set it.- objectUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- fieldUniversalIdentifier:- PARTNER_SUPER_PARTNER_FIELD_UNIVERSAL_IDENTIFIER,- canUpdateFieldValue: false,- },- {- // Partner Tier — read-locked too: admin-only on the record page, hidden from partners.- objectUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- fieldUniversalIdentifier: 'd4fa6461-37b6-49ee-9181-dd482e74a70b',- canReadFieldValue: false,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- fieldUniversalIdentifier: 'a0000011-0000-4000-8000-000000000011',- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- fieldUniversalIdentifier: 'a0000010-0000-4000-8000-000000000010',- canUpdateFieldValue: false,- },- // Relation locks — the FK relations the Partner record itself owns. partnerUser is the- // RLS pivot: clearing or repointing it would drop the partner's own record out of scope- // (an orphan only admins can see). company is read-only as an object, so its link must- // not be repointable either. Mirrors the Opportunity partner/partnerUser locks above.- {- objectUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- fieldUniversalIdentifier: PARTNER_USER_ON_PARTNER_FIELD_ID,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- fieldUniversalIdentifier: PARTNER_COMPANY_FIELD_ID,- canUpdateFieldValue: false,- },- // Partner Link object — both relation pivots are read-only for partners. Repointing either- // would move links out of RLS scope or let a partner attach links to another profile.- {- objectUniversalIdentifier: PARTNER_LINK_OBJECT_UNIVERSAL_IDENTIFIER,- fieldUniversalIdentifier: PARTNER_LINK_PARTNER_FIELD_ID,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier: PARTNER_LINK_OBJECT_UNIVERSAL_IDENTIFIER,- fieldUniversalIdentifier: PARTNER_USER_ON_PARTNER_LINK_FIELD_ID,- canUpdateFieldValue: false,- },- // Partner Service object — both relation pivots are read-only for partners. Repointing either- // would move services out of RLS scope or let a partner attach services to another profile.- {- objectUniversalIdentifier: PARTNER_SERVICE_OBJECT_UNIVERSAL_IDENTIFIER,- fieldUniversalIdentifier: PARTNER_SERVICE_PARTNER_FIELD_ID,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier: PARTNER_SERVICE_OBJECT_UNIVERSAL_IDENTIFIER,- fieldUniversalIdentifier: PARTNER_USER_ON_PARTNER_SERVICE_FIELD_ID,- canUpdateFieldValue: false,- },- // Partner Content object — the self-service save route runs with the caller's own- // permissions, so partners self-publish their own case studies: only status is writable- // (the route sets it to APPROVED/WIP; RLS scopes to their own rows). partner and contentType- // stay locked and are stamped server-side by the on-partner-content-created trigger, so a- // partner cannot repoint content to another partner. partnerUser is listed as locked but- // stays writable at insert — the server exempts RLS predicate fields there- // (permissions.utils.ts, insert case only), which is how the save route stamps ownership.- {- objectUniversalIdentifier: PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER,- fieldUniversalIdentifier: PARTNER_CONTENT_TYPE_FIELD_ID,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier: PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER,- fieldUniversalIdentifier: PARTNER_CONTENT_APPROVAL_DATE_FIELD_ID,- canReadFieldValue: false,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier: PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER,- fieldUniversalIdentifier: PARTNER_CONTENT_INTERVIEW_FIELD_ID,- canReadFieldValue: false,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier: PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER,- fieldUniversalIdentifier: PARTNER_CONTENT_DOCUMENTS_FIELD_ID,- canReadFieldValue: false,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier: PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER,- fieldUniversalIdentifier: PARTNER_CONTENT_STATUS_FIELD_ID,- canUpdateFieldValue: true,- },- {- objectUniversalIdentifier: PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER,- fieldUniversalIdentifier: PARTNER_CONTENT_PARTNER_FIELD_ID,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier: PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER,- fieldUniversalIdentifier: PARTNER_USER_ON_PARTNER_CONTENT_FIELD_ID,- canUpdateFieldValue: false,- },- // Application — lock every field except pitch and opportunity: the apply route sets- // both once, at creation, under the application role — not the partner role, which- // cannot write this object at all (canUpdateObjectRecords: false). state is populated- // by on-application-created as the app. partnerUser is listed as locked but stays- // writable at insert — the server exempts RLS predicate fields there- // (permissions.utils.ts, insert case only).- // System/server-managed fields (id, timestamps, updatedBy, position, searchVector) stay- // out — locking updatedBy/position breaks every update (same trap as Opportunity above).- {- objectUniversalIdentifier: APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- fieldUniversalIdentifier: APPLICATION_NAME_FIELD_ID,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier: APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- fieldUniversalIdentifier: APPLICATION_PARTNER_FIELD_ID,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier: APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- fieldUniversalIdentifier: APPLICATION_PARTNER_USER_FIELD_ID,- canUpdateFieldValue: false,- },- {- objectUniversalIdentifier: APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- fieldUniversalIdentifier: APPLICATION_STATE_FIELD_ID,- canUpdateFieldValue: false,- },- ],- objectPermissions: [- {- objectUniversalIdentifier: PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- canReadObjectRecords: true,- canUpdateObjectRecords: true,- canSoftDeleteObjectRecords: false,- canDestroyObjectRecords: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- // Also what hides the "New Opportunity" button: the standard command menu item is- // gated on objectPermissions.canUpdateObjectRecords.- canReadObjectRecords: true,- canUpdateObjectRecords: false,- canSoftDeleteObjectRecords: false,- canDestroyObjectRecords: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.person.universalIdentifier,- canReadObjectRecords: true,- canUpdateObjectRecords: false,- canSoftDeleteObjectRecords: false,- canDestroyObjectRecords: false,- },- {- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.company.universalIdentifier,- canReadObjectRecords: true,- canUpdateObjectRecords: false,- canSoftDeleteObjectRecords: false,- canDestroyObjectRecords: false,- },- {- objectUniversalIdentifier: APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- // Insert permission checks canUpdateObjectRecords; disabling prevents- // partners from creating bare Applications (created by apply-to-brief route instead).- canReadObjectRecords: true,- canUpdateObjectRecords: false,- canSoftDeleteObjectRecords: false,- canDestroyObjectRecords: false,- },- {- objectUniversalIdentifier: PARTNER_LINK_OBJECT_UNIVERSAL_IDENTIFIER,- canReadObjectRecords: true,- canUpdateObjectRecords: true,- canSoftDeleteObjectRecords: false,- canDestroyObjectRecords: false,- },- {- objectUniversalIdentifier: PARTNER_SERVICE_OBJECT_UNIVERSAL_IDENTIFIER,- canReadObjectRecords: true,- canUpdateObjectRecords: true,- canSoftDeleteObjectRecords: false,- canDestroyObjectRecords: false,- },- {- objectUniversalIdentifier: PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER,- canReadObjectRecords: true,- canUpdateObjectRecords: true,- canSoftDeleteObjectRecords: false,- canDestroyObjectRecords: false,- },- {- // Read-only so the UI can resolve member-typed relations (own partnerUser link,- // owner/createdBy). The workspaceMemberSelf predicate below scopes this to the- // partner's own member record so the internal roster stays hidden.- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.workspaceMember- .universalIdentifier,- canReadObjectRecords: true,- canUpdateObjectRecords: false,- canSoftDeleteObjectRecords: false,- canDestroyObjectRecords: false,- },- ],- rowLevelPermissionPredicateGroups: [- {- universalIdentifier: OPPORTUNITY_RLS_OR_GROUP_ID,- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- logicalOperator: RowLevelPermissionPredicateGroupLogicalOperator.OR,- },- ],- // RLS validates an insert against the row as submitted, so a row created without- // partnerUser is rejected — which is why the apply route sets partnerUser at creation.- rowLevelPermissionPredicates: [- ownedByCurrentMember(- RLS_PREDICATE_IDS.partner,- PARTNER_OBJECT_UNIVERSAL_IDENTIFIER,- PARTNER_USER_ON_PARTNER_FIELD_ID,- ),- ownedByCurrentMember(- RLS_PREDICATE_IDS.person,- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.person.universalIdentifier,- PARTNER_USER_ON_PERSON_FIELD_ID,- ),- ownedByCurrentMember(- RLS_PREDICATE_IDS.company,- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.company.universalIdentifier,- PARTNER_USER_ON_COMPANY_FIELD_ID,- ),- ownedByCurrentMember(- RLS_PREDICATE_IDS.partnerLink,- PARTNER_LINK_OBJECT_UNIVERSAL_IDENTIFIER,- PARTNER_USER_ON_PARTNER_LINK_FIELD_ID,- ),- ownedByCurrentMember(- RLS_PREDICATE_IDS.partnerService,- PARTNER_SERVICE_OBJECT_UNIVERSAL_IDENTIFIER,- PARTNER_USER_ON_PARTNER_SERVICE_FIELD_ID,- ),- ownedByCurrentMember(- RLS_PREDICATE_IDS.partnerContent,- PARTNER_CONTENT_OBJECT_UNIVERSAL_IDENTIFIER,- PARTNER_USER_ON_PARTNER_CONTENT_FIELD_ID,- ),- ownedByCurrentMember(- RLS_PREDICATE_IDS.application,- APPLICATION_OBJECT_UNIVERSAL_IDENTIFIER,- APPLICATION_PARTNER_USER_FIELD_ID,- ),- // Self-scope: a partner resolves member-typed relations to its own record only, so the- // internal roster stays hidden. Other members resolve to null.- ownedByCurrentMember(- RLS_PREDICATE_IDS.workspaceMemberSelf,- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.workspaceMember.universalIdentifier,- WORKSPACE_MEMBER_ID_FIELD_UNIVERSAL_IDENTIFIER,- ),- // (partnerUser IS me) OR (isListed = true) OR (applicantPartnerUserIds CONTAINS me)- {- ...ownedByCurrentMember(- RLS_PREDICATE_IDS.opportunityPartnerUser,- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- PARTNER_USER_ON_OPPORTUNITY_FIELD_ID,- ),- predicateGroupUniversalIdentifier: OPPORTUNITY_RLS_OR_GROUP_ID,- position: 0,- },- {- universalIdentifier: RLS_PREDICATE_IDS.opportunityIsListed,- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier: OPPORTUNITY_IS_LISTED_FIELD_ID,- operand: RowLevelPermissionPredicateOperand.IS,- value: true,- predicateGroupUniversalIdentifier: OPPORTUNITY_RLS_OR_GROUP_ID,- position: 1,- },- {- universalIdentifier: RLS_PREDICATE_IDS.opportunityApplicant,- objectUniversalIdentifier:- STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.universalIdentifier,- fieldUniversalIdentifier:- OPPORTUNITY_APPLICANT_PARTNER_USER_IDS_FIELD_ID,- operand: RowLevelPermissionPredicateOperand.CONTAINS,- workspaceMemberFieldUniversalIdentifier:- WORKSPACE_MEMBER_ID_FIELD_UNIVERSAL_IDENTIFIER,- predicateGroupUniversalIdentifier: OPPORTUNITY_RLS_OR_GROUP_ID,- position: 2,- },- ],-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/scripts/configure-partner-rls.ts b/packages/twenty-apps/internal/twenty-partners/src/scripts/configure-partner-rls.tsdeleted file mode 100644index 2330796f498..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/scripts/configure-partner-rls.ts+++ /dev/null@@ -1,451 +0,0 @@-// Read-only drift check. `partner.role.ts` declares every row-level predicate and the-// server ingests them from the manifest, so an install or upgrade configures them. This-// script no longer creates, updates or deletes any predicate.-//-// Legacy predicates on an already-installed workspace: earlier versions created them-// through upsertRowLevelPermissionPredicates, which stamps them with the workspace's-// custom application rather than twenty-partners. The manifest sync diffs by application,-// so it cannot see those rows and will never remove them.-//-// Ungrouped leftovers AND to the same ownership check and are redundant. Two parentless-// Opportunity OR groups are not. The RLS compiler keeps only the first parentless group,-// so leftover (partnerUser IS me) OR (isListed) can drop applicantPartnerUserIds CONTAINS.-// This script fails when it finds more than one. Remove leftover groups with database-// access while the manifest predicates stay in place. Do NOT clear them through the-// upsert mutation: it deletes every predicate for a (role, object) pair, and a Partner-// role with no predicate has no row filter at all, so partners would read the whole-// workspace until the manifest predicates were restored.-//-// Also verifies Opportunity and Application field permissions from `partner.role.ts`.-// upsertFieldPermissions rejects out-of-band changes to app-owned roles-// (ROLE_BELONGS_TO_ANOTHER_APPLICATION), so those must come from the manifest; if any-// expected lock is missing, the script exits non-zero and tells you to re-sync.-//-// Usage:-// yarn rls:configure # against .env.local-// yarn rls:configure:prod # against .env.prod--import { config } from 'dotenv';-config({ path: process.env.ENV_FILE ?? '.env.local' });--import { PARTNER_ROLE_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';-import { PARTNER_ROLE_LABEL } from 'src/roles/partner.role';-import { findParentlessOpportunityRlsGroups } from 'src/scripts/find-parentless-opportunity-rls-groups.util';--const requireEnv = (name: string): string => {- const value = process.env[name];- if (!value) throw new Error(`Missing env var: ${name}`);- return value;-};--const SIMPLE_TARGET_OBJECTS = [- 'partner',- 'person',- 'company',- 'partnerLink',- 'partnerService',- 'partnerContent',- 'application',-] as const;-// Opportunity is in this list so leftover parentless OR groups can be resolved by id.-const ALL_TARGET_OBJECTS = [...SIMPLE_TARGET_OBJECTS, 'opportunity'] as const;--// Opportunity fields that must NOT be locked: system columns and updatedBy/position-// (server-managed — locking them breaks every update; see src/roles/partner.role.ts).-// Stage + amount are expected locked (admin-only for partners). Everything else too.-const OPPORTUNITY_FIELD_LOCK_SKIP = new Set([- 'id',- 'createdAt',- 'updatedAt',- 'deletedAt',- 'updatedBy',- 'position',-]);--// Application fields that must be locked. pitch + opportunity are exempt from this set —-// not because a partner can edit them (they can't; the whole object is write-blocked) but-// because the apply route sets both once, at creation, under the application role.-const APPLICATION_FIELD_LOCK_EXPECTED = new Set([- 'name',- 'partner',- 'partnerUser',- 'state',-]);--// Application fields that must NOT be locked: system columns, pitch + opportunity-// (set once by the apply route, not by the partner), and updatedBy/position-// (server-managed — locking them breaks every update).-const APPLICATION_FIELD_LOCK_SKIP = new Set([- 'id',- 'createdAt',- 'updatedAt',- 'deletedAt',- 'updatedBy',- 'position',- 'searchVector',- 'pitch',- 'opportunity',-]);--type FieldEdge = {- node: {- id: string;- name: string;- type: string;- };-};--type PageInfo = {- hasNextPage: boolean;- endCursor: string | null;-};--type FieldsPage = {- edges: FieldEdge[];- pageInfo: PageInfo;-};--type MetadataResponse<T> = {- data: T;- errors?: { message: string }[];-};--async function metadataFetch<T>(- metadataUrl: string,- apiKey: string,- query: string,- variables?: Record<string, unknown>,-): Promise<T> {- const res = await fetch(metadataUrl, {- method: 'POST',- headers: {- 'Content-Type': 'application/json',- Authorization: `Bearer ${apiKey}`,- },- body: JSON.stringify({ query, variables }),- });-- const json = (await res.json()) as MetadataResponse<T>;-- if (json.errors && json.errors.length > 0) {- throw new Error(- `GraphQL errors: ${json.errors.map((e) => e.message).join('; ')}`,- );- }-- return json.data;-}---// Collects every field on an object across all cursor pages.-// Required for Opportunity which can grow; always paginate fully.-async function collectAllFields(- metadataUrl: string,- apiKey: string,- objectId: string,-): Promise<{ id: string; name: string; type: string }[]> {- const all: { id: string; name: string; type: string }[] = [];- let after: string | null = null;-- // eslint-disable-next-line no-constant-condition- while (true) {- const pagingArg = after- ? `paging:{first:200, after:"${after}"}`- : `paging:{first:200}`;-- const query = `{- object(id: "${objectId}") {- fields(${pagingArg}) {- edges { node { id name type } }- pageInfo { hasNextPage endCursor }- }- }- }`;-- const data = await metadataFetch<{- object: { fields: FieldsPage };- }>(metadataUrl, apiKey, query);-- for (const edge of data.object.fields.edges) {- all.push(edge.node);- }-- if (!data.object.fields.pageInfo.hasNextPage) break;- after = data.object.fields.pageInfo.endCursor;- }-- return all;-}--type FieldPermissionResult = {- id: string;- objectMetadataId: string;- fieldMetadataId: string;- canReadFieldValue: boolean | null;- canUpdateFieldValue: boolean | null;-};--type PredicateGroupResult = {- id: string;- objectMetadataId: string;- parentRowLevelPermissionPredicateGroupId?: string | null;-};--async function main() {- const baseUrl = requireEnv('TWENTY_PARTNERS_API_URL').replace(/\/$/, '');- const apiKey = requireEnv('TWENTY_PARTNERS_API_KEY');- const metadataUrl = `${baseUrl}/metadata`;-- console.log(`[rls:configure] target: ${metadataUrl}`);-- // ── 1. Resolve the object metadata IDs ──────────────────────────────────────-- const objectsData = await metadataFetch<{- objects: { edges: { node: { id: string; nameSingular: string } }[] };- }>(- metadataUrl,- apiKey,- `{ objects(paging:{first:100}) { edges { node { id nameSingular } } } }`,- );-- const objectIdByName = new Map<string, string>(- objectsData.objects.edges.map((edge) => [- edge.node.nameSingular,- edge.node.id,- ]),- );-- for (const name of ALL_TARGET_OBJECTS) {- if (!objectIdByName.has(name)) {- throw new Error(- `Object "${name}" not found in workspace metadata. ` +- `Has the app been installed and synced?`,- );- }- }-- if (!objectIdByName.has('workspaceMember')) {- throw new Error('workspaceMember object not found in workspace metadata.');- }-- const opportunityObjectId = objectIdByName.get('opportunity') as string;-- // ── 2. Resolve Partner role, field permissions, and predicate groups ────────- //- // getRoles returns a flat array (not a connection) and does NOT expose- // universalIdentifier, so we match on the role label via the shared PARTNER_ROLE_LABEL- // constant (exported from partner.role.ts) — a rename there can't desync this script.- const rolesData = await metadataFetch<{- getRoles: {- id: string;- label: string;- fieldPermissions: FieldPermissionResult[];- rowLevelPermissionPredicateGroups: PredicateGroupResult[];- }[];- }>(- metadataUrl,- apiKey,- `{ getRoles { id label fieldPermissions { id fieldMetadataId objectMetadataId canUpdateFieldValue canReadFieldValue } rowLevelPermissionPredicateGroups { id objectMetadataId parentRowLevelPermissionPredicateGroupId } } }`,- );-- const roles = rolesData.getRoles;- const partnerRole = roles.find((role) => role.label === PARTNER_ROLE_LABEL);-- if (!partnerRole) {- const labels = roles.map((role) => role.label).join(', ');- throw new Error(- `Partner role not found. Available roles: ${labels}. ` +- `Ensure the app is installed (universalIdentifier=${PARTNER_ROLE_UNIVERSAL_IDENTIFIER}).`,- );- }-- console.log(- `[rls:configure] Partner role id: ${partnerRole.id} ` +- `(universalIdentifier in manifest: ${PARTNER_ROLE_UNIVERSAL_IDENTIFIER})`,- );-- const parentlessOpportunityGroups = findParentlessOpportunityRlsGroups(- partnerRole.rowLevelPermissionPredicateGroups ?? [],- opportunityObjectId,- );-- if (parentlessOpportunityGroups.length > 1) {- const leftoverGroupIds = parentlessOpportunityGroups- .map((group) => group.id)- .join(', ');-- console.error(- `\n[rls:configure] DRIFT DETECTED: Partner role has ` +- `${parentlessOpportunityGroups.length} parentless Opportunity RLS groups ` +- `(${leftoverGroupIds}).\n` +- `The filter compiler keeps only the first parentless group, so leftover\n` +- `(partnerUser IS me) OR (isListed) can drop applicantPartnerUserIds CONTAINS.\n\n` +- `Keep the twenty-partners manifest group. Soft-delete the leftover custom-\n` +- `application group (and its predicates) in core.rowLevelPermissionPredicateGroup\n` +- `/ core.rowLevelPermissionPredicate. Inspect applicationId first:\n\n` +- ` SELECT id, "universalIdentifier", "applicationId"\n` +- ` FROM core."rowLevelPermissionPredicateGroup"\n` +- ` WHERE id IN (${parentlessOpportunityGroups.map((group) => `'${group.id}'`).join(', ')});\n\n` +- `Do NOT call upsertRowLevelPermissionPredicates for (Partner, opportunity):\n` +- `it wipes every predicate for that pair and leaves partners unfiltered.\n`,- );- process.exitCode = 1;- return;- }-- // ── 3. Verify Opportunity field permissions (set via manifest, not here — see header) ─-- const oppObjectId = opportunityObjectId;-- const allOppFields = await collectAllFields(metadataUrl, apiKey, oppObjectId);- const oppFieldIdToName = new Map<string, string>(- allOppFields.map((field) => [field.id, field.name]),- );-- const applicantPartnerUserIdsField = allOppFields.find(- (field) => field.name === 'applicantPartnerUserIds',- );- const applicantPartnerUserIdsPermission =- applicantPartnerUserIdsField &&- partnerRole.fieldPermissions.find(- (fieldPermission) =>- fieldPermission.fieldMetadataId === applicantPartnerUserIdsField.id,- );-- if (- !applicantPartnerUserIdsField ||- applicantPartnerUserIdsPermission?.canReadFieldValue !== false- ) {- console.error(- `\n[rls:configure] DRIFT DETECTED: applicantPartnerUserIds must be ` +- `read-locked on the Partner role (canReadFieldValue: false).\n` +- `Without that lock one applicant can read the other applicants' member ids.\n` +- `Deploy partner.role.ts via yarn twenty apply -r <remote>.\n`,- );- process.exitCode = 1;- return;- }-- // Build the expected lock set: every non-system Opportunity field (incl. stage + amount).- const expectedLockedNames = new Set<string>(- allOppFields- .filter((field) => !OPPORTUNITY_FIELD_LOCK_SKIP.has(field.name))- .map((field) => field.name),- );-- const oppLockedFps = partnerRole.fieldPermissions.filter(- (fieldPermission) =>- fieldPermission.objectMetadataId === oppObjectId &&- fieldPermission.canUpdateFieldValue === false,- );-- const missingLocks = [...expectedLockedNames].filter(- (name) =>- !oppLockedFps.some(- (fieldPermission) =>- oppFieldIdToName.get(fieldPermission.fieldMetadataId) === name,- ),- );-- if (missingLocks.length > 0) {- console.error(- `\n[rls:configure] DRIFT DETECTED: ${missingLocks.length} Opportunity field(s) ` +- `are NOT locked (canUpdateFieldValue: false) on the Partner role:\n` +- ` ${missingLocks.join(', ')}\n\n` +- `These permissions are declared in partner.role.ts and must be deployed via the\n` +- `app manifest. Run the following to deploy them:\n\n` +- ` yarn twenty apply -r <remote>\n\n` +- `(e.g. \`yarn twenty apply\` for local, ` +- `\`yarn twenty apply -r partner-twenty-com\` for prod)\n`,- );- process.exitCode = 1;- return;- }-- console.log(- `[rls:configure] ✓ ${oppLockedFps.length} Opportunity fields locked (Partner role cannot write Opportunity at all; locks kept as intent) — field permissions verified`,- );-- // ── 4. Verify Application field permissions (set via manifest, not here — see header) ─-- const applicationObjectId = objectIdByName.get('application') as string;-- const allAppFields = await collectAllFields(- metadataUrl,- apiKey,- applicationObjectId,- );- const appFieldIdToName = new Map<string, string>(- allAppFields.map((field) => [field.id, field.name]),- );-- const appLockedFps = partnerRole.fieldPermissions.filter(- (fieldPermission) =>- fieldPermission.objectMetadataId === applicationObjectId &&- fieldPermission.canUpdateFieldValue === false,- );-- const missingAppLocks = [...APPLICATION_FIELD_LOCK_EXPECTED].filter(- (name) =>- !appLockedFps.some(- (fieldPermission) =>- appFieldIdToName.get(fieldPermission.fieldMetadataId) === name,- ),- );-- const unexpectedAppLocks = appLockedFps- .map((fieldPermission) =>- appFieldIdToName.get(fieldPermission.fieldMetadataId),- )- .filter(- (name): name is string =>- name !== undefined &&- !APPLICATION_FIELD_LOCK_EXPECTED.has(name) &&- !APPLICATION_FIELD_LOCK_SKIP.has(name),- );-- const pitchIsLocked = appLockedFps.some(- (fieldPermission) =>- appFieldIdToName.get(fieldPermission.fieldMetadataId) === 'pitch',- );-- if (pitchIsLocked) {- console.warn(- `[rls:configure] NOTE: pitch field is locked on the Partner role, beyond the ` +- `expected set. Harmless — canUpdateObjectRecords already blocks every Partner ` +- `write to Application, so this lock has no additional effect.`,- );- }-- if (missingAppLocks.length > 0) {- console.error(- `\n[rls:configure] DRIFT DETECTED: ${missingAppLocks.length} Application field(s) ` +- `are NOT locked (canUpdateFieldValue: false) on the Partner role:\n` +- ` ${missingAppLocks.join(', ')}\n\n` +- `These permissions are declared in partner.role.ts and must be deployed via the\n` +- `app manifest. Run the following to deploy them:\n\n` +- ` yarn twenty apply -r <remote>\n\n` +- `(e.g. \`yarn twenty apply\` for local, ` +- `\`yarn twenty apply -r partner-twenty-com\` for prod)\n`,- );- process.exitCode = 1;- return;- }-- if (unexpectedAppLocks.length > 0) {- console.warn(- `[rls:configure] NOTE: ${unexpectedAppLocks.length} extra Application field(s) ` +- `are locked beyond the expected set (platform fields may be locked intentionally):\n` +- ` ${unexpectedAppLocks.join(', ')}`,- );- }-- console.log(- `[rls:configure] ✓ ${appLockedFps.length} Application fields locked (Partner role cannot write Application at all; locks kept as intent) — field permissions verified`,- );-}--main().catch((err: unknown) => {- console.error('[rls:configure] FAILED:', err);- process.exit(1);-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/scripts/find-parentless-opportunity-rls-groups.util.test.ts b/packages/twenty-apps/internal/twenty-partners/src/scripts/find-parentless-opportunity-rls-groups.util.test.tsdeleted file mode 100644index 3b5147e5cff..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/scripts/find-parentless-opportunity-rls-groups.util.test.ts+++ /dev/null@@ -1,36 +0,0 @@-import { describe, expect, it } from 'vitest';--import { findParentlessOpportunityRlsGroups } from './find-parentless-opportunity-rls-groups.util';--const OPPORTUNITY_OBJECT_ID = 'opportunity-object';--describe('findParentlessOpportunityRlsGroups', () => {- it('returns only parentless groups on the opportunity object', () => {- const groups = findParentlessOpportunityRlsGroups(- [- {- id: 'manifest',- objectMetadataId: OPPORTUNITY_OBJECT_ID,- parentRowLevelPermissionPredicateGroupId: null,- },- {- id: 'leftover',- objectMetadataId: OPPORTUNITY_OBJECT_ID,- },- {- id: 'nested',- objectMetadataId: OPPORTUNITY_OBJECT_ID,- parentRowLevelPermissionPredicateGroupId: 'manifest',- },- {- id: 'other-object',- objectMetadataId: 'application-object',- parentRowLevelPermissionPredicateGroupId: null,- },- ],- OPPORTUNITY_OBJECT_ID,- );-- expect(groups.map((group) => group.id)).toEqual(['manifest', 'leftover']);- });-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/scripts/find-parentless-opportunity-rls-groups.util.ts b/packages/twenty-apps/internal/twenty-partners/src/scripts/find-parentless-opportunity-rls-groups.util.tsdeleted file mode 100644index 33fbb94c70a..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/scripts/find-parentless-opportunity-rls-groups.util.ts+++ /dev/null@@ -1,15 +0,0 @@-export type RowLevelPermissionPredicateGroupRow = {- id: string;- objectMetadataId: string;- parentRowLevelPermissionPredicateGroupId?: string | null;-};--export const findParentlessOpportunityRlsGroups = (- groups: readonly RowLevelPermissionPredicateGroupRow[],- opportunityObjectId: string,-): RowLevelPermissionPredicateGroupRow[] =>- groups.filter(- (group) =>- group.objectMetadataId === opportunityObjectId &&- !group.parentRowLevelPermissionPredicateGroupId,- );diff --git a/packages/twenty-apps/internal/twenty-partners/src/scripts/purge-soft-deleted.ts b/packages/twenty-apps/internal/twenty-partners/src/scripts/purge-soft-deleted.tsdeleted file mode 100644index 668e2a4389a..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/scripts/purge-soft-deleted.ts+++ /dev/null@@ -1,59 +0,0 @@-// Hard-destroy soft-deleted records that block re-imports.-//-// Twenty SOFT-deletes (sets deletedAt); the row stays in the DB and keeps holding-// unique constraints (e.g. company domain, partner slug). But normal queries —-// including the import's existence checks — exclude soft-deleted rows. So after a-// UI "delete" or a partial import that got rolled back, re-running the import hits-// "A duplicate entry was detected" on records it cannot see. This purges those-// ghosts permanently so idempotent upserts work again.-//-// Only touches soft-deleted rows (deletedAt IS NOT NULL); active/default data is-// left untouched. One bulk destroy per object, so it is not rate-limited.-//-// yarn purge # against .env.local-// yarn purge:prod # against .env.prod-//-import { config } from 'dotenv';-config({ path: process.env.ENV_FILE ?? '.env.local' });--const requireEnv = (name: string): string => {- const value = process.env[name];- if (!value) throw new Error(`Missing ${name} env var`);- return value;-};--// Objects the import writes to. partners + partnerContents are app custom objects;-// companies + opportunities are standard but populated by the import.-const OBJECTS = ['companies', 'partners', 'opportunities', 'partnerContents'] as const;--const gql = async (url: string, key: string, query: string): Promise<any> => {- const response = await fetch(`${url.replace(/\/$/, '')}/graphql`, {- method: 'POST',- headers: { Authorization: `Bearer ${key}`, 'Content-Type': 'application/json' },- body: JSON.stringify({ query }),- });- const json: any = await response.json();- if (json.errors?.length) throw new Error(JSON.stringify(json.errors));- return json.data;-};--async function main() {- const url = requireEnv('TWENTY_PARTNERS_API_URL');- const key = requireEnv('TWENTY_PARTNERS_API_KEY');- console.log(`[purge] target: ${url} — destroying soft-deleted rows only`);-- for (const obj of OBJECTS) {- // destroy<Object>s is the bulk variant; capitalise + already-plural names.- const mutationName = `destroy${obj.charAt(0).toUpperCase()}${obj.slice(1)}`;- const data = await gql(url, key, `mutation { ${mutationName}(filter: { deletedAt: { is: NOT_NULL } }) { id } }`);- const destroyed = data[mutationName]?.length ?? 0;- console.log(`[purge] ${obj}: destroyed ${destroyed} soft-deleted`);- }-- console.log('[purge] done');-}--main().catch((err) => {- console.error(err);- process.exit(1);-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/scripts/seed.ts b/packages/twenty-apps/internal/twenty-partners/src/scripts/seed.tsdeleted file mode 100644index d004c05d825..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/scripts/seed.ts+++ /dev/null@@ -1,1423 +0,0 @@-// Single demo seed for the twenty-partners app. Idempotent UPSERT by natural key.-// Covers: partners across ALL validationStage values, companies + people,-// opportunities across ALL stage values, and partner quotes across ALL-// 5 statuses (each linked to a partner + opportunity).-//-// Run from this app directory, against a running Twenty server with the app-// installed (deploy first; do NOT run `yarn test` after — its teardown wipes the app).-// Credentials from shell env or a gitignored .env.local (TWENTY_PARTNERS_API_URL/KEY).-//-// yarn twenty dev --once-// tsx src/scripts/seed.ts--import { config } from 'dotenv';-config({ path: process.env.ENV_FILE ?? '.env.local' });--import { CoreApiClient } from 'twenty-client-sdk/core';--import { backfillPartnerUserOnChildren } from 'src/modules/shared/services/backfill-partner-user-on-children.service';--const requireEnv = (name: string): string => {- const value = process.env[name];- if (!value) throw new Error(`Missing ${name} env var`);- return value;-};--const CAL = 'https://calendly.com/placeholder';-const PRIMARY_DEMO_PARTNER_SLUG = 'nine-dots-ventures';-const PRIMARY_DEMO_BUDGET_USD = 15000;-const PRIMARY_DEMO_DESCRIPTION_MARKDOWN = `## About Nine Dots Ventures--Nine Dots helps scaling teams launch Twenty as an operational system of record, not just a CRM.--### What we typically deliver--- Discovery workshops to align sales, operations, and leadership.-- End-to-end pipeline design with custom lifecycle stages.-- Migration plans that preserve historical activities and account context.-- Team onboarding with adoption dashboards and weekly office hours.--### Why clients pick us--We combine CRM architecture, workflow automation, and enablement so teams ship quickly and keep improving after go-live.`;--const ELEVATE_DESCRIPTION_MARKDOWN = `## About Elevate Consulting--Elevate is a revenue-operations studio for **B2B SaaS teams** moving from seed to Series C. We replace brittle CRM setups with Twenty pipelines your GTM team actually maintains.--### Typical engagement--1. **Audit week** — map objects, stages, and reporting gaps across sales, CS, and finance.-2. **Migration sprint** — Salesforce or HubSpot cutover with dedupe rules and activity history preserved.-3. **RevOps handoff** — manager dashboards, forecast cadences, and playbooks your team owns.--### Focus areas--- Pipeline design for PLG + sales-assist motions-- Lead routing, SLAs, and lifecycle automation-- Executive reporting without a separate BI stack--> Most clients go live in four weeks with a phased rollout that keeps reps selling during migration.`;--const MERIDIAN_DESCRIPTION_MARKDOWN = `## About Meridian Craft--Meridian Craft is an **APAC implementation studio** for fintech and logistics operators running high-volume customer workflows on Twenty.--### What we build--- Multi-entity data models with strict permission boundaries-- Throughput-tuned deployments for **self-hosted** and cloud workspaces-- Custom integrations with banking, KYC, and carrier APIs--### Delivery model--| Phase | Output |-| --- | --- |-| Discovery | Architecture memo + cutover plan |-| Build | Configured workspace, integrations, QA scripts |-| Launch | Runbooks, on-call handoff, performance baseline |--Our senior engineers have shipped regulated workloads across Singapore, Hong Kong, and Kuala Lumpur — we know where CRM projects break at scale.`;--const W3VILLA_DESCRIPTION_MARKDOWN = `## About W3Villa Technologies--W3Villa runs **large self-hosted Twenty deployments** for regulated industries across APAC and the Gulf. The team owns Kubernetes hardening, custom integrations, and 24/7 support contracts.--### What we typically deliver--- Hardened self-host installs with backup, observability, and upgrade runbooks-- Custom integrations against finance, identity, and internal APIs-- Follow-the-sun support for production workspaces--### Why clients pick us--We treat Twenty as infrastructure, not a weekend project. Clients stay on a version they can patch, with a team that answers when the cluster pages.`;--const NETZERO_DESCRIPTION_MARKDOWN = `## About NetZero Systems--NetZero is the **LATAM go-to-market partner** for climate-tech and renewable-energy companies. We build bilingual sales pipelines, ESG reporting, and grant-management workflows on Twenty.--### Typical engagement--1. **GTM map** — bilingual objects, stages, and handoffs for US + LATAM teams-2. **Reporting layer** — ESG and grant evidence without a second spreadsheet stack-3. **Handoff** — playbooks your local operators keep after go-live--### Focus areas--- Climate tech and renewable energy-- Spanish / Portuguese / English workspaces-- Grant and compliance tracking next to the pipeline`;--type DemoPartnerService = {- title: string;- description: string;- position: number;-};--const PRIMARY_DEMO_PARTNER_SERVICES: DemoPartnerService[] = [- {- title: 'CRM architecture and implementation',- description:- 'Designs the full object model, lifecycle stages, and permissions so teams can run on Twenty with clean data from day one.',- position: 0,- },- {- title: 'Data migration and quality hardening',- description:- 'Migrates legacy CRM data with mapping validation, deduplication rules, and QA checkpoints before cutover.',- position: 1,- },- {- title: 'Workflow automation and integrations',- description:- 'Builds automations for lead routing, follow-ups, and third-party syncs with finance, support, and communications systems.',- position: 2,- },- {- title: 'Enablement and revenue operations coaching',- description:- 'Runs role-based onboarding, manager cadences, and KPI reviews to drive long-term adoption after launch.',- position: 3,- },-];--type DemoPartnerContent = {- name: string;- status: 'WIP' | 'APPROVED';- clientName: string;- headline: string;- bodyMarkdown: string;- caseStudyUrl: string;- position: number;-};--const PRIMARY_DEMO_PARTNER_CASE_STUDIES: DemoPartnerContent[] = [- {- name: 'Nine Dots - Acme rollout',- status: 'APPROVED',- clientName: 'Acme Real Estate',- headline: 'Unified tenant and broker operations in one workspace',- bodyMarkdown:- 'Migrated sales and account-management teams from two CRMs into Twenty, reducing pipeline update lag from days to hours.',- caseStudyUrl: 'https://ninedots.example.com/case-studies/acme-rollout',- position: 0,- },- {- name: 'Nine Dots - Sunrise expansion',- status: 'WIP',- clientName: 'Sunrise Logistics',- headline: 'Standardizing regional handoffs across APAC and LATAM',- bodyMarkdown:- 'In progress: rebuilding qualification and renewal workflows so cross-region teams share a single opportunity timeline.',- caseStudyUrl: 'https://ninedots.example.com/case-studies/sunrise-expansion',- position: 1,- },- {- name: 'Nine Dots - Helix reporting',- status: 'APPROVED',- clientName: 'Helix Bio',- headline: 'Board-ready reporting with faster forecast updates',- bodyMarkdown:- 'Implemented a custom forecasting flow and weekly pipeline reviews, giving leadership reliable stage-by-stage visibility.',- caseStudyUrl: 'https://ninedots.example.com/case-studies/helix-reporting',- position: 2,- },-];--type DemoPartnerLink = {- name: string;- url: string;- position: number;-};--const PRIMARY_DEMO_PARTNER_LINKS: DemoPartnerLink[] = [- {- name: 'Company website',- url: 'https://ninedots.example.com',- position: 0,- },- {- name: 'Customer stories',- url: 'https://ninedots.example.com/case-studies',- position: 1,- },- {- name: 'Implementation playbook',- url: 'https://ninedots.example.com/playbook',- position: 2,- },-];--type MarketplaceProfile = {- introduction: string;- services: DemoPartnerService[];- caseStudies: DemoPartnerContent[];- links: DemoPartnerLink[];-};--const MARKETPLACE_PROFILES: Record<string, MarketplaceProfile> = {- 'nine-dots-ventures': {- introduction: PRIMARY_DEMO_DESCRIPTION_MARKDOWN,- services: PRIMARY_DEMO_PARTNER_SERVICES,- caseStudies: PRIMARY_DEMO_PARTNER_CASE_STUDIES,- links: PRIMARY_DEMO_PARTNER_LINKS,- },- 'elevate-consulting': {- introduction: ELEVATE_DESCRIPTION_MARKDOWN,- services: [- {- title: 'Revenue operations audit',- description:- 'Maps objects, stages, and reporting gaps across sales, CS, and finance before any migration starts.',- position: 0,- },- {- title: 'CRM migration sprint',- description:- 'Four-week Salesforce or HubSpot cutover with dedupe rules and activity history preserved.',- position: 1,- },- {- title: 'Forecast and reporting handoff',- description:- 'Manager dashboards, forecast cadences, and playbooks the GTM team owns after go-live.',- position: 2,- },- ],- caseStudies: [- {- name: 'Elevate - Acme RE rollout',- status: 'APPROVED',- clientName: 'Acme Real Estate',- headline: 'Salesforce to Twenty in four weeks, reps still selling',- bodyMarkdown:- 'Rebuilt the pipeline and cut over 30 seats without a freeze weekend. Forecast lag dropped from days to same-day.',- caseStudyUrl: 'https://elevate-consulting.example/case-studies/acme',- position: 0,- },- {- name: 'Elevate - Helix pipeline',- status: 'APPROVED',- clientName: 'Helix Bio',- headline: 'One lifecycle from inbound to renewal',- bodyMarkdown:- 'Collapsed three HubSpot pipelines into a single Twenty opportunity flow with CS handoff SLAs.',- caseStudyUrl: 'https://elevate-consulting.example/case-studies/helix',- position: 1,- },- ],- links: [- {- name: 'Company website',- url: 'https://elevate-consulting.example',- position: 0,- },- ],- },- 'meridian-craft': {- introduction: MERIDIAN_DESCRIPTION_MARKDOWN,- services: [- {- title: 'High-throughput data models',- description:- 'Multi-entity models with strict permission boundaries for fintech and logistics operators.',- position: 0,- },- {- title: 'Banking and carrier integrations',- description:- 'Custom apps against KYC, banking, and carrier APIs on cloud or self-hosted Twenty.',- position: 1,- },- {- title: 'Self-host performance tuning',- description:- 'Throughput baselines, runbooks, and on-call handoff for regulated APAC workloads.',- position: 2,- },- ],- caseStudies: [- {- name: 'Meridian - Sunrise APAC fleet',- status: 'APPROVED',- clientName: 'Sunrise Logistics',- headline: 'Fleet CRM that keeps regional handoffs in one timeline',- bodyMarkdown:- 'Rebuilt qualification and renewal so APAC and LATAM teams share one opportunity record at volume.',- caseStudyUrl: 'https://meridian-craft.example/case-studies/sunrise',- position: 0,- },- ],- links: [- {- name: 'Company website',- url: 'https://meridian-craft.example',- position: 0,- },- ],- },- 'w3villa-technologies': {- introduction: W3VILLA_DESCRIPTION_MARKDOWN,- services: [- {- title: 'Kubernetes self-host',- description:- 'Hardened Twenty installs with backup, observability, and upgrade runbooks.',- position: 0,- },- {- title: 'Custom integrations',- description:- 'Finance, identity, and internal API connectors built for regulated tenants.',- position: 1,- },- {- title: 'Enterprise support',- description:- '24/7 follow-the-sun coverage for production workspaces in APAC and the Gulf.',- position: 2,- },- ],- caseStudies: [- {- name: 'W3Villa - Acme annual review',- status: 'APPROVED',- clientName: 'Acme Real Estate',- headline: 'Self-host cutover with zero lost history',- bodyMarkdown:- 'Moved a production workspace onto hardened Kubernetes and kept activity history intact through the upgrade.',- caseStudyUrl: 'https://w3villa-technologies.example/case-studies/acme',- position: 0,- },- ],- links: [- {- name: 'Company website',- url: 'https://w3villa-technologies.example',- position: 0,- },- ],- },- 'netzero-systems': {- introduction: NETZERO_DESCRIPTION_MARKDOWN,- services: [- {- title: 'Bilingual GTM pipelines',- description:- 'Spanish, Portuguese, and English objects and stages for US + LATAM teams.',- position: 0,- },- {- title: 'ESG reporting',- description:- 'Grant and compliance evidence next to the pipeline, without a second spreadsheet stack.',- position: 1,- },- {- title: 'Climate-tech go-to-market',- description:- 'Playbooks for renewable-energy and climate operators from first lead to grant close.',- position: 2,- },- ],- caseStudies: [- {- name: 'NetZero - Helix clinical',- status: 'APPROVED',- clientName: 'Helix Bio',- headline: 'Bilingual pipeline with grant evidence in one workspace',- bodyMarkdown:- 'US and LATAM teams now share one opportunity timeline, with ESG fields the board can export.',- caseStudyUrl: 'https://netzero-systems.example/case-studies/helix',- position: 0,- },- ],- links: [- {- name: 'Company website',- url: 'https://netzero-systems.example',- position: 0,- },- ],- },-};--const usd = (dollars: number) => ({- amountMicros: dollars * 1_000_000,- currencyCode: 'USD',-});-const linkedin = (slug: string) => `https://www.linkedin.com/company/${slug}`;--type Partner = {- slug: string;- name: string;- validationStage: string;- availability: string;- introduction: string;- calendarLink: string;- deploymentExpertise: string[];- region: string[];- languagesSpoken: string[];- partnerTier: string;- partnerScope: string[];- typeOfTeam: string;- country: string;- city: string;- hourlyRateUsd: number | null;- projectBudgetMinUsd: number | null;- skills: string[];- superPartner?: boolean;-};--const PARTNERS: Partner[] = [- {- slug: 'nine-dots-ventures',- name: 'Nine Dots Ventures',- validationStage: 'VALIDATED',- availability: 'AVAILABLE',- introduction:- 'Boutique CRM implementer for real-estate workflows and WhatsApp automation. Nine Dots runs end-to-end Twenty rollouts for property managers and brokerages across Europe and MENA, with deep multi-language data models and AI-assisted lead intake.',- calendarLink: CAL,- deploymentExpertise: ['CLOUD', 'SELF_HOST'],- region: ['EUROPE', 'MENA'],- languagesSpoken: ['ENGLISH', 'FRENCH', 'ARABIC'],- partnerTier: 'ADVANCED',- partnerScope: ['SOLUTIONING', 'DEVELOPMENT'],- typeOfTeam: 'AGENCY',- country: 'FRANCE',- city: 'Paris',- hourlyRateUsd: 250,- projectBudgetMinUsd: 15000,- skills: [- 'Real estate',- 'WhatsApp',- 'Multi-language',- 'Workflows',- 'Integrations',- 'AI',- ],- superPartner: true,- },- {- slug: 'elevate-consulting',- name: 'Elevate Consulting',- validationStage: 'VALIDATED',- availability: 'AVAILABLE',- introduction:- 'Revenue-operations partner for B2B SaaS teams scaling seed to Series C. Elevate moves teams off legacy CRMs onto Twenty with a four-week migration playbook, pipeline rebuilds, and analytics handoff.',- calendarLink: CAL,- deploymentExpertise: ['CLOUD'],- region: ['US', 'LATAM'],- languagesSpoken: ['ENGLISH', 'SPANISH'],- partnerTier: 'INTERMEDIATE',- partnerScope: ['SOLUTIONING'],- typeOfTeam: 'AGENCY',- country: 'UNITED_STATES',- city: 'Austin',- hourlyRateUsd: 200,- projectBudgetMinUsd: 20000,- skills: [- 'RevOps',- 'B2B SaaS',- 'Data migration',- 'Pipelines',- 'Salesforce migration',- 'HubSpot migration',- ],- },- {- slug: 'w3villa-technologies',- name: 'W3Villa Technologies',- validationStage: 'VALIDATED',- availability: 'AVAILABLE',- introduction:- 'Engineering-heavy partner running large self-hosted Twenty deployments. Specializes in hardened Kubernetes hosting, custom integrations, and 24/7 support contracts for regulated industries across APAC and the Gulf.',- calendarLink: CAL,- deploymentExpertise: ['CLOUD', 'SELF_HOST'],- region: ['APAC', 'MENA'],- languagesSpoken: ['ENGLISH', 'HINDI'],- partnerTier: 'ADVANCED',- partnerScope: ['HOSTING', 'DEVELOPMENT', 'SOLUTIONING'],- typeOfTeam: 'AGENCY',- country: 'INDIA',- city: 'Bangalore',- hourlyRateUsd: 120,- projectBudgetMinUsd: 10000,- skills: [- 'Self-hosting',- 'Kubernetes',- 'DevOps',- 'Integrations',- 'Workflows',- 'Enterprise support',- ],- },- {- slug: 'act-education',- name: 'Act Education',- validationStage: 'VALIDATED',- availability: 'UNAVAILABLE',- introduction:- 'CRM partner for European education providers; compliance-first self-hosting on EU infrastructure with full GDPR data residency and student-record workflows.',- calendarLink: CAL,- deploymentExpertise: ['SELF_HOST'],- region: ['EUROPE'],- languagesSpoken: ['ENGLISH', 'GERMAN'],- partnerTier: 'NEW',- partnerScope: ['HOSTING', 'SOLUTIONING'],- typeOfTeam: 'SOLO',- country: 'GERMANY',- city: 'Berlin',- hourlyRateUsd: 180,- projectBudgetMinUsd: 8000,- skills: ['Education', 'Compliance', 'Self-hosting', 'GDPR', 'Data privacy'],- },- {- slug: 'netzero-systems',- name: 'NetZero Systems',- validationStage: 'VALIDATED',- availability: 'AVAILABLE',- introduction:- 'LATAM go-to-market partner for climate-tech and renewable-energy companies. Builds bilingual sales pipelines, ESG reporting, and grant-management workflows on top of Twenty.',- calendarLink: CAL,- deploymentExpertise: ['CLOUD'],- region: ['LATAM', 'US'],- languagesSpoken: ['ENGLISH', 'SPANISH', 'PORTUGUESE'],- partnerTier: 'INTERMEDIATE',- partnerScope: ['SOLUTIONING'],- typeOfTeam: 'AGENCY',- country: 'BRAZIL',- city: 'São Paulo',- hourlyRateUsd: 150,- projectBudgetMinUsd: 12000,- skills: [- 'Climate tech',- 'Renewable energy',- 'ESG reporting',- 'Bilingual pipelines',- 'LATAM go-to-market',- ],- },- {- slug: 'meridian-craft',- name: 'Meridian Craft',- validationStage: 'VALIDATED',- availability: 'AVAILABLE',- introduction:- 'APAC implementation studio for fintech and logistics. Senior team of ex-bank engineers building high-throughput Twenty deployments across Singapore, Hong Kong, and Kuala Lumpur.',- calendarLink: CAL,- deploymentExpertise: ['CLOUD', 'SELF_HOST'],- region: ['APAC', 'AFRICA'],- languagesSpoken: ['ENGLISH', 'CHINESE', 'MALAY'],- partnerTier: 'ADVANCED',- partnerScope: ['DEVELOPMENT', 'SOLUTIONING'],- typeOfTeam: 'AGENCY',- country: 'SINGAPORE',- city: 'Singapore',- hourlyRateUsd: 300,- projectBudgetMinUsd: 25000,- skills: [- 'Fintech',- 'Logistics',- 'APAC',- 'High throughput',- 'Custom apps',- 'Performance tuning',- ],- superPartner: true,- },- {- slug: 'applicant-studio',- name: 'Applicant Studio',- validationStage: 'APPLICATION',- availability: 'UNAVAILABLE',- introduction: 'New applicant; awaiting first review.',- calendarLink: CAL,- deploymentExpertise: ['CLOUD'],- region: ['EUROPE'],- languagesSpoken: ['ENGLISH', 'FRENCH'],- partnerTier: 'NEW',- partnerScope: ['SOLUTIONING'],- typeOfTeam: 'SOLO',- country: 'FRANCE',- city: 'Lyon',- hourlyRateUsd: null,- projectBudgetMinUsd: null,- skills: ['Boutique', 'Design'],- },- {- slug: 'rising-crm',- name: 'Rising CRM',- validationStage: 'POTENTIAL',- availability: 'AVAILABLE',- introduction: 'Promising applicant in evaluation.',- calendarLink: CAL,- deploymentExpertise: ['CLOUD', 'SELF_HOST'],- region: ['US'],- languagesSpoken: ['ENGLISH'],- partnerTier: 'NEW',- partnerScope: ['SOLUTIONING', 'DEVELOPMENT'],- typeOfTeam: 'AGENCY',- country: 'UNITED_STATES',- city: 'New York',- hourlyRateUsd: null,- projectBudgetMinUsd: null,- skills: ['SMB', 'Quick setup'],- },- {- slug: 'legacy-partners',- name: 'Legacy Partners',- validationStage: 'FORMER',- availability: 'UNAVAILABLE',- introduction: 'Former partner; no longer active in the program.',- calendarLink: CAL,- deploymentExpertise: ['SELF_HOST'],- region: ['EUROPE'],- languagesSpoken: ['ENGLISH', 'GERMAN'],- partnerTier: 'INTERMEDIATE',- partnerScope: ['HOSTING'],- typeOfTeam: 'AGENCY',- country: 'UNITED_KINGDOM',- city: 'London',- hourlyRateUsd: null,- projectBudgetMinUsd: null,- skills: ['Enterprise', 'Self-hosting'],- },- {- slug: 'declined-co',- name: 'Declined Co',- validationStage: 'REJECTED',- availability: 'UNAVAILABLE',- introduction: 'Application rejected after review.',- calendarLink: CAL,- deploymentExpertise: ['CLOUD'],- region: ['MENA'],- languagesSpoken: ['ENGLISH', 'ARABIC'],- partnerTier: 'NEW',- partnerScope: ['DEVELOPMENT'],- typeOfTeam: 'SOLO',- country: 'UNITED_ARAB_EMIRATES',- city: 'Dubai',- hourlyRateUsd: null,- projectBudgetMinUsd: null,- skills: ['MENA', 'Arabic'],- },-];--// One contact per partner. The onboarding trigger matches a new member's email to a-// Person, then links that Person's partner — so signing up with one of these emails is-// what auto-links a member to the partner. Each partner also gets its own Company.-type PartnerContact = { firstName: string; lastName: string; email: string };-const PARTNER_CONTACTS: Record<string, PartnerContact> = {- 'nine-dots-ventures': {- firstName: 'Yasmine',- lastName: 'Haddad',- email: '[email protected]',- },- 'elevate-consulting': {- firstName: 'Diego',- lastName: 'Ramirez',- email: '[email protected]',- },- 'w3villa-technologies': {- firstName: 'Arjun',- lastName: 'Mehta',- email: '[email protected]',- },- 'act-education': {- firstName: 'Lena',- lastName: 'Fischer',- email: '[email protected]',- },- 'netzero-systems': {- firstName: 'Beatriz',- lastName: 'Costa',- email: '[email protected]',- },- 'meridian-craft': {- firstName: 'Mei',- lastName: 'Lim',- email: '[email protected]',- },- 'applicant-studio': {- firstName: 'Hugo',- lastName: 'Bernard',- email: '[email protected]',- },- 'rising-crm': {- firstName: 'Sarah',- lastName: 'Johnson',- email: '[email protected]',- },- 'legacy-partners': {- firstName: 'Oliver',- lastName: 'Smith',- email: '[email protected]',- },- 'declined-co': {- firstName: 'Omar',- lastName: 'Farouk',- email: '[email protected]',- },-};-const partnerDomain = (slug: string): string => `https://${slug}.example`;--const COMPANIES = [- { name: 'Acme Real Estate', domain: 'https://acmerealestate.example' },- { name: 'Helix Bio', domain: 'https://helixbio.example' },- { name: 'Sunrise Logistics', domain: 'https://sunriselogistics.example' },-];--const PERSONS = [- {- firstName: 'Camille',- lastName: 'Durand',- companyName: 'Acme Real Estate',- email: '[email protected]',- },- {- firstName: 'Maya',- lastName: 'Patel',- companyName: 'Helix Bio',- email: '[email protected]',- },- {- firstName: 'Wei',- lastName: 'Chen',- companyName: 'Sunrise Logistics',- email: '[email protected]',- },-];--type Opp = {- name: string;- companyName: string;- stage: string;- partnerSlug?: string;- numberOfSeats?: number;- hostingType?: string;- subscriptionType?: string;- subscriptionFrequency?: string;-};--// One+ opportunity for every stage value (all 5 covered).-const OPPORTUNITIES: Opp[] = [- {- name: 'Acme RE — Q3 renewal',- companyName: 'Acme Real Estate',- stage: 'NEW',- numberOfSeats: 20,- hostingType: 'CLOUD',- subscriptionType: 'PRO',- subscriptionFrequency: 'ANNUAL',- },- {- name: 'Helix Bio — investor reporting',- companyName: 'Helix Bio',- stage: 'NEW',- numberOfSeats: 12,- hostingType: 'CLOUD',- subscriptionType: 'ORG',- subscriptionFrequency: 'MONTHLY',- },- {- name: 'Helix Bio — pipeline review',- companyName: 'Helix Bio',- stage: 'SCREENING',- numberOfSeats: 8,- },- {- name: 'Acme RE — CRM rollout',- companyName: 'Acme Real Estate',- stage: 'MEETING',- partnerSlug: 'elevate-consulting',- numberOfSeats: 30,- hostingType: 'CLOUD',- subscriptionType: 'ENT',- subscriptionFrequency: 'ANNUAL',- },- {- name: 'Sunrise — APAC fleet CRM',- companyName: 'Sunrise Logistics',- stage: 'MEETING',- partnerSlug: 'nine-dots-ventures',- numberOfSeats: 50,- hostingType: 'SELF_HOSTING',- subscriptionType: 'ENT',- subscriptionFrequency: 'ANNUAL',- },- {- name: 'Helix Bio — clinical trials CRM',- companyName: 'Helix Bio',- stage: 'PROPOSAL',- partnerSlug: 'netzero-systems',- numberOfSeats: 25,- hostingType: 'CLOUD',- subscriptionType: 'ORG',- subscriptionFrequency: 'MONTHLY',- },- {- name: 'Helix Bio — self-host evaluation',- companyName: 'Helix Bio',- stage: 'PROPOSAL',- partnerSlug: 'meridian-craft',- numberOfSeats: 40,- hostingType: 'SELF_HOSTING',- subscriptionType: 'ENT',- subscriptionFrequency: 'ANNUAL',- },- {- name: 'Sunrise — LATAM expansion',- companyName: 'Sunrise Logistics',- stage: 'CUSTOMER',- partnerSlug: 'nine-dots-ventures',- numberOfSeats: 60,- hostingType: 'CLOUD',- subscriptionType: 'ENT',- subscriptionFrequency: 'ANNUAL',- },- {- name: 'Acme RE — annual review',- companyName: 'Acme Real Estate',- stage: 'CUSTOMER',- partnerSlug: 'w3villa-technologies',- numberOfSeats: 15,- },- {- name: 'Sunrise — vendor onboarding',- companyName: 'Sunrise Logistics',- stage: 'SCREENING',- numberOfSeats: 10,- hostingType: 'CLOUD',- subscriptionType: 'PRO',- subscriptionFrequency: 'MONTHLY',- },-];--type Quote = {- name: string;- status: string;- partnerSlug: string;- contentType: string[];-};-const QUOTES: Quote[] = [- {- name: 'Sunrise APAC fleet — Nine Dots quote',- status: 'WIP',- partnerSlug: 'nine-dots-ventures',- contentType: ['PARTNER_QUOTE'],- },- {- name: 'Helix clinical — NetZero quote',- status: 'INTERVIEW_SCHEDULED',- partnerSlug: 'netzero-systems',- contentType: ['PARTNER_QUOTE'],- },- {- name: 'Acme rollout — Elevate quote',- status: 'UNDER_CUSTOMER_PARTNER_REVIEW',- partnerSlug: 'elevate-consulting',- contentType: ['PARTNER_QUOTE'],- },- {- name: 'Sunrise LATAM — Nine Dots quote',- status: 'APPROVED',- partnerSlug: 'nine-dots-ventures',- contentType: ['PARTNER_QUOTE'],- },- {- name: 'Helix self-host — Meridian quote',- status: 'REJECTED',- partnerSlug: 'meridian-craft',- contentType: ['CASE_STUDY'],- },-];--const nodes = (r: any, key: string): any[] =>- (r?.[key]?.edges ?? []).map((e: any) => e.node);--const withPartnerUserId = (- data: Record<string, unknown>,- partnerUserId: string | null,-): Record<string, unknown> =>- partnerUserId ? { ...data, partnerUserId } : data;--async function upsertCompanyByName(- client: CoreApiClient,- name: string,- domain: string,-): Promise<string> {- const existing = nodes(- await client.query({- companies: {- __args: { filter: { name: { eq: name } }, first: 1 },- edges: { node: { id: true } },- },- } as any),- 'companies',- );- if (existing[0]?.id) return existing[0].id;- const r: any = await client.mutation({- createCompany: {- __args: { data: { name, domainName: { primaryLinkUrl: domain } } },- id: true,- },- } as any);- return r.createCompany.id;-}--async function upsertMarketplaceProfile(- client: CoreApiClient,- partnerId: string,- partnerUserId: string | null,- profile: MarketplaceProfile,-): Promise<void> {- await client.mutation({- updatePartner: {- __args: {- id: partnerId,- data: { introduction: profile.introduction },- },- id: true,- },- });-- for (const service of profile.services) {- const existing = nodes(- await client.query({- partnerServices: {- __args: {- filter: {- title: { eq: service.title },- partnerId: { eq: partnerId },- },- first: 1,- },- edges: { node: { id: true } },- },- }),- 'partnerServices',- );-- const data = withPartnerUserId(- {- title: service.title,- description: service.description,- sortOrder: service.position,- position: service.position,- partnerId,- },- partnerUserId,- );-- if (existing[0]?.id) {- await client.mutation({- updatePartnerService: {- __args: { id: existing[0].id, data },- id: true,- },- });- } else {- await client.mutation({- createPartnerService: {- __args: { data },- id: true,- },- });- }- }-- for (const content of profile.caseStudies) {- const existing = nodes(- await client.query({- partnerContents: {- __args: {- filter: {- name: { eq: content.name },- partnerId: { eq: partnerId },- },- first: 1,- },- edges: { node: { id: true } },- },- }),- 'partnerContents',- );-- const data = withPartnerUserId(- {- name: content.name,- contentType: ['CASE_STUDY'],- status: content.status,- clientName: content.clientName,- headline: content.headline,- body: { markdown: content.bodyMarkdown },- caseStudyLink: { primaryLinkUrl: content.caseStudyUrl },- position: content.position,- partnerId,- },- partnerUserId,- );-- if (existing[0]?.id) {- await client.mutation({- updatePartnerContent: {- __args: { id: existing[0].id, data },- id: true,- },- });- } else {- await client.mutation({- createPartnerContent: {- __args: { data },- id: true,- },- });- }- }-- for (const link of profile.links) {- const existing = nodes(- await client.query({- partnerLinks: {- __args: {- filter: {- name: { eq: link.name },- partnerId: { eq: partnerId },- },- first: 1,- },- edges: { node: { id: true } },- },- }),- 'partnerLinks',- );-- const data = withPartnerUserId(- {- name: link.name,- url: { primaryLinkUrl: link.url },- sortOrder: link.position,- position: link.position,- partnerId,- },- partnerUserId,- );-- if (existing[0]?.id) {- await client.mutation({- updatePartnerLink: {- __args: { id: existing[0].id, data },- id: true,- },- });- } else {- await client.mutation({- createPartnerLink: {- __args: { data },- id: true,- },- });- }- }-}--async function main() {- const client = new CoreApiClient({- url: `${requireEnv('TWENTY_PARTNERS_API_URL').replace(/\/$/, '')}/graphql`,- headers: {- Authorization: `Bearer ${requireEnv('TWENTY_PARTNERS_API_KEY')}`,- },- });-- // -- Partners (upsert by slug) --- const existingPartners = nodes(- await client.query({- partners: {- __args: {- filter: { slug: { in: PARTNERS.map((p) => p.slug) } },- first: 100,- },- edges: { node: { id: true, slug: true } },- },- } as any),- 'partners',- );- const partnerIdBySlug = new Map<string, string>(- existingPartners.map((n: any) => [n.slug, n.id]),- );- const companyIdByName = new Map<string, string>();- for (const p of PARTNERS) {- // Partner's own company — linked so the profile isn't bare and the contact has an employer.- const companyId = await upsertCompanyByName(- client,- p.name,- partnerDomain(p.slug),- );- companyIdByName.set(p.name, companyId);- const data = {- name: p.name,- slug: p.slug,- validationStage: p.validationStage,- availability: p.availability,- introduction: p.introduction,- calendarLink: { primaryLinkUrl: p.calendarLink },- deploymentExpertise: p.deploymentExpertise,- region: p.region,- languagesSpoken: p.languagesSpoken,- partnerTier: p.partnerTier,- partnerScope: p.partnerScope,- typeOfTeam: p.typeOfTeam,- country: p.country,- city: p.city,- skills: p.skills,- companyId,- linkedin: { primaryLinkUrl: linkedin(p.slug) },- website: { primaryLinkUrl: partnerDomain(p.slug) },- profilePicture: {- primaryLinkUrl: `https://picsum.photos/seed/${p.slug}-team/600/600`,- },- superPartner: p.superPartner === true,- ...(p.hourlyRateUsd != null ? { hourlyRate: usd(p.hourlyRateUsd) } : {}),- ...(p.projectBudgetMinUsd != null- ? { projectBudgetMin: usd(p.projectBudgetMinUsd) }- : {}),- };- const id = partnerIdBySlug.get(p.slug);- if (id) {- await client.mutation({- updatePartner: { __args: { id, data }, id: true },- } as any);- } else {- const r: any = await client.mutation({- createPartner: { __args: { data }, id: true },- } as any);- partnerIdBySlug.set(p.slug, r.createPartner.id);- }- }- console.log(`[seed] partners: ${partnerIdBySlug.size}`);-- // -- Companies (customer accounts, upsert by name) --- for (const c of COMPANIES) {- companyIdByName.set(- c.name,- await upsertCompanyByName(client, c.name, c.domain),- );- }-- // -- People (customer contacts, upsert by firstName+lastName) --- for (const person of PERSONS) {- const existing = nodes(- await client.query({- people: {- __args: {- filter: { name: { firstName: { eq: person.firstName } } },- first: 10,- },- edges: {- node: { id: true, name: { firstName: true, lastName: true } },- },- },- } as any),- 'people',- );- const match = existing.find(- (n: any) =>- n.name?.firstName === person.firstName &&- n.name?.lastName === person.lastName,- );- if (!match) {- await client.mutation({- createPerson: {- __args: {- data: {- name: { firstName: person.firstName, lastName: person.lastName },- emails: { primaryEmail: person.email },- companyId: companyIdByName.get(person.companyName),- },- },- id: true,- },- } as any);- }- }-- // -- Partner contacts (one per partner) — email→Person→partner is the onboarding match key --- let partnerContactCount = 0;- for (const p of PARTNERS) {- const contact = PARTNER_CONTACTS[p.slug];- if (!contact) continue;- partnerContactCount++;- const companyId = companyIdByName.get(p.name);- const partnerId = partnerIdBySlug.get(p.slug);- const existing = nodes(- await client.query({- people: {- __args: {- filter: { emails: { primaryEmail: { eq: contact.email } } },- first: 1,- },- edges: { node: { id: true, partnerId: true, companyId: true } },- },- } as any),- 'people',- );- const found = existing[0];- if (found?.id) {- // Rerun against a workspace where the Person exists but lost its relations would leave- // the onboarding match broken (no_partner_match). Backfill only the missing links.- const patch: Record<string, unknown> = {};- if (!found.partnerId && partnerId) patch.partnerId = partnerId;- if (!found.companyId && companyId) patch.companyId = companyId;- if (Object.keys(patch).length > 0) {- await client.mutation({- updatePerson: { __args: { id: found.id, data: patch }, id: true },- } as any);- }- continue;- }- await client.mutation({- createPerson: {- __args: {- data: {- name: { firstName: contact.firstName, lastName: contact.lastName },- emails: { primaryEmail: contact.email },- companyId,- partnerId,- },- },- id: true,- },- } as any);- }- console.log(`[seed] partner contacts: ${partnerContactCount}`);-- // -- Opportunities (upsert by name) --- const oppIdByName = new Map<string, string>();- for (const o of OPPORTUNITIES) {- const data: Record<string, unknown> = {- name: o.name,- stage: o.stage,- companyId: companyIdByName.get(o.companyName),- ...(o.partnerSlug- ? { partnerId: partnerIdBySlug.get(o.partnerSlug) }- : {}),- ...(o.numberOfSeats != null ? { numberOfSeats: o.numberOfSeats } : {}),- ...(o.hostingType ? { hostingType: o.hostingType } : {}),- ...(o.subscriptionType ? { subscriptionType: o.subscriptionType } : {}),- ...(o.subscriptionFrequency- ? { subscriptionFrequency: o.subscriptionFrequency }- : {}),- };- const existing = nodes(- await client.query({- opportunities: {- __args: { filter: { name: { eq: o.name } }, first: 1 },- edges: { node: { id: true } },- },- } as any),- 'opportunities',- );- let id = existing[0]?.id;- if (id) {- await client.mutation({- updateOpportunity: { __args: { id, data }, id: true },- } as any);- } else {- const r: any = await client.mutation({- createOpportunity: { __args: { data }, id: true },- } as any);- id = r.createOpportunity.id;- }- oppIdByName.set(o.name, id);- }- console.log(`[seed] opportunities: ${oppIdByName.size}`);-- // -- Marketplace-rich profiles for every list-visible partner --- const marketplacePartnerRows = nodes(- await client.query({- partners: {- __args: {- filter: { slug: { in: Object.keys(MARKETPLACE_PROFILES) } },- first: 50,- },- edges: {- node: {- id: true,- slug: true,- partnerUserId: true,- projectBudgetMin: { amountMicros: true },- },- },- },- }),- 'partners',- ) as Array<{- id: string;- slug: string;- partnerUserId: string | null;- projectBudgetMin?: { amountMicros?: number | null } | null;- }>;-- for (const partnerRow of marketplacePartnerRows) {- const profile = MARKETPLACE_PROFILES[partnerRow.slug];- if (!profile) {- continue;- }-- if (- partnerRow.slug === PRIMARY_DEMO_PARTNER_SLUG &&- (partnerRow.projectBudgetMin?.amountMicros ?? 0) <= 0- ) {- await client.mutation({- updatePartner: {- __args: {- id: partnerRow.id,- data: { projectBudgetMin: usd(PRIMARY_DEMO_BUDGET_USD) },- },- id: true,- },- });- }-- await upsertMarketplaceProfile(- client,- partnerRow.id,- partnerRow.partnerUserId ?? null,- profile,- );- }- console.log(`[seed] marketplace profiles: ${marketplacePartnerRows.length}`);-- // -- Partner quotes (upsert by name) --- const partnerUserIdBySlug = new Map<string, string>(- nodes(- await client.query({- partners: {- __args: { first: 200 },- edges: {- node: { slug: true, partnerUserId: true },- },- },- }),- 'partners',- )- .filter(- (partner: { slug: string; partnerUserId: string | null }) =>- partner.partnerUserId,- )- .map((partner: { slug: string; partnerUserId: string }) => [- partner.slug,- partner.partnerUserId,- ]),- );-- let quoteCount = 0;- for (const q of QUOTES) {- const partnerId = partnerIdBySlug.get(q.partnerSlug);- const partnerUserId = partnerUserIdBySlug.get(q.partnerSlug) ?? null;- const data = withPartnerUserId(- {- name: q.name,- status: q.status,- contentType: q.contentType,- partnerId,- },- partnerUserId,- );- const existing = nodes(- await client.query({- partnerContents: {- __args: { filter: { name: { eq: q.name } }, first: 1 },- edges: { node: { id: true } },- },- } as any),- 'partnerContents',- );- if (existing[0]?.id) {- await client.mutation({- updatePartnerContent: {- __args: { id: existing[0].id, data },- id: true,- },- } as any);- } else {- await client.mutation({- createPartnerContent: { __args: { data }, id: true },- } as any);- }- quoteCount++;- }- console.log(`[seed] partner quotes: ${quoteCount}`);-- const backfillCount = await backfillPartnerUserOnChildren(client);- console.log(- `[seed] backfilled partnerUserId on ${backfillCount} child record(s)`,- );-}--main().catch((err) => {- console.error(err);- process.exit(1);-});diff --git a/packages/twenty-apps/internal/twenty-partners/src/scripts/slugify.ts b/packages/twenty-apps/internal/twenty-partners/src/scripts/slugify.tsdeleted file mode 100644index d19622ee34f..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/scripts/slugify.ts+++ /dev/null@@ -1,11 +0,0 @@-// Shared slug helper. Algorithm is intentionally kept simple (no NFKD-// normalization) so that slugs produced by the import script and by the-// partner-application handler are byte-for-byte identical. The import uses-// slug as an idempotency/upsert key (partnerIdBySlug), so the algorithm must-// never change for existing data.-export const slugify = (s: string): string =>- s- .toLowerCase()- .trim()- .replace(/[^a-z0-9]+/g, '-')- .replace(/^-+|-+$/g, '');diff --git a/packages/twenty-apps/internal/twenty-partners/src/skills/_shared/partner-api.md b/packages/twenty-apps/internal/twenty-partners/src/skills/_shared/partner-api.mddeleted file mode 100644index 764da655604..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/skills/_shared/partner-api.md+++ /dev/null@@ -1,200 +0,0 @@-# Shared reference: credentials and API access--Every `twenty-partner-*` / `twenty-lead-*` skill reads this file instead of restating-credentials and queries. Fix a query here once, and every skill gets the fix.--## Credentials--All skills read `~/.twenty/credentials.env`:--```env-TWENTY_PARTNERS_API_URL=https://partners.twenty.com-TWENTY_PARTNERS_API_KEY=<key>-FIREFLIES_API_KEY=<key>-```--The partners key lives in `packages/twenty-apps/internal/twenty-partners/.env.prod`-(gitignored). Copy it to `~/.twenty/credentials.env` on first setup. The Fireflies key is-personal.--Which skill needs what:--| Skill | Partners URL + key | Fireflies key |-|---|---|---|-| `twenty-lead-brief` | yes (writes the Opportunity) | only for a Fireflies input |-| `twenty-partner-shortlist` | yes (read-only) | no |-| `twenty-partner-intro` | yes (writes Applications) | no |-| `twenty-partner-recap` | yes | yes |-| `twenty-partner-triage` | yes (read-only) | no |--**If a required key is missing, stop and name it.** Never proceed on a partial set.--## Helper--```python-import os, json, urllib.request--creds = {}-for line in open(os.path.expanduser("~/.twenty/credentials.env")):- line = line.strip()- if line and "=" in line and not line.startswith("#"):- k, v = line.split("=", 1); creds[k] = v.strip()--def gql(url, key, query, variables=None):- body = json.dumps({"query": query, "variables": variables or {}}).encode()- req = urllib.request.Request(url, data=body, headers={- "Content-Type": "application/json",- "Authorization": "Bearer " + key,- "User-Agent": "Mozilla/5.0"})- return json.load(urllib.request.urlopen(req, timeout=90))-```--The `User-Agent` header is not optional: the Fireflies API rejects urllib's default.--Partners endpoint: `$TWENTY_PARTNERS_API_URL/graphql`.-Fireflies endpoint: `https://api.fireflies.ai/graphql`.--## Partner queries--**All partners available for work** (`twenty-partner-shortlist`). Paginate until-`hasNextPage` is false, passing `endCursor` as `$after`.--```graphql-query ListPartners($after: String) {- partners(- filter: { validationStage: { eq: VALIDATED }, availability: { eq: AVAILABLE } }- after: $after- ) {- pageInfo { hasNextPage endCursor }- edges { node {- id name slug introduction- languagesSpoken country region city- deploymentExpertise partnerScope skills typeOfTeam- partnerTier- twentyExperience twentyExperienceNotes- hourlyRate { amountMicros currencyCode }- projectBudgetMin { amountMicros currencyCode }- lastMatchAt- persons { edges { node { name { firstName lastName } emails { primaryEmail } } } }- company { id name domainName { primaryLinkUrl } }- } }- }-}-```--`amountMicros` is the amount times 1,000,000. Divide before displaying.--**All partners with contact + domain** (`twenty-partner-recap`, matching an attendee):--```graphql-query($a:String){ partners(after:$a){- pageInfo{ hasNextPage endCursor }- edges{ node{- id name slug validationStage- persons{ edges{ node{ name{ firstName lastName } emails{ primaryEmail } } } }- company{ name domainName{ primaryLinkUrl } } } } } }-```--## Opportunity queries--**Find an existing Opportunity before creating one** (`twenty-lead-brief`):--```graphql-query($n:String!){ opportunities(filter:{ name:{ ilike:$n } }, first:5){- edges{ node{ id name stage createdAt company{ name } } } } }-```--**Create** (`twenty-lead-brief`):--```graphql-mutation($d:OpportunityCreateInput!){ createOpportunity(data:$d){ id name } }-```--**Update** (`twenty-partner-intro`, to stamp `introSentAt`):--```graphql-mutation($id:UUID!,$d:OpportunityUpdateInput!){ updateOpportunity(id:$id,data:$d){ id } }-```--`designDocUrl` is a LINKS field: `{ "primaryLinkUrl": "<url>", "primaryLinkLabel": "Partner brief" }`.--## Application queries--An `Application` links a partner to an opportunity. State `INVITED` means Twenty pushed the-partner at the lead; `APPLIED` means the partner came forward on their own.--```graphql-query($oid:UUID!){ applications(filter:{ opportunityId:{ eq:$oid } }){- edges{ node{ id state partner{ id name } } } } }--mutation($d:ApplicationCreateInput!){ createApplication(data:$d){ id state } }-# variables: { "d": { "opportunityId": "<id>", "partnerId": "<id>", "state": "INVITED" } }-```--## Company and person--`twenty-lead-brief` needs a `companyId` and a `pointOfContactId` on the Opportunity. Search-first, create only on a miss.--```graphql-query($n:String!){ companies(filter:{ name:{ ilike:$n } }, first:5){- edges{ node{ id name } } } }-mutation($d:CompanyCreateInput!){ createCompany(data:$d){ id name } }--query($e:String!){ people(filter:{ emails:{ primaryEmail:{ eq:$e } } }, first:1){- edges{ node{ id name{ firstName lastName } } } } }-mutation($d:PersonCreateInput!){ createPerson(data:$d){ id } }-```--## Note queries--```graphql-query($pid:UUID!){ noteTargets(filter:{ targetPartnerId:{ eq:$pid } }){- edges{ node{ note{ id title bodyV2{ markdown } createdAt } } } } }--mutation($d:NoteCreateInput!){ createNote(data:$d){ id title } }-mutation($d:NoteTargetCreateInput!){ createNoteTarget(data:$d){ id targetPartnerId } }-mutation($id:UUID!,$d:NoteUpdateInput!){ updateNote(id:$id,data:$d){ id } }-```--## Fireflies queries--`date` is epoch milliseconds. `limit` is capped at 50: a higher value is a hard-`invalid_arguments` 400, not a soft clamp.--```graphql-query{ transcripts(limit:50){ id title date duration participants- meeting_attendees{ displayName email } } }--query($id:String!){ transcript(id:$id){- title date duration participants host_email organizer_email- meeting_attendees{ displayName email }- summary{ overview short_summary keywords }- sentences{ speaker_name text } } }--mutation($id:String!){ deleteTranscript(id:$id){ id title } }-```--A Fireflies URL is `app.fireflies.ai/view/<slug>::<ID>`. The ID is the trailing `01K…`-segment.--## Opening a Gmail draft in Chrome--```python-import subprocess, urllib.parse, time, sys-params = {"view": "cm", "fs": "1", "to": to, "su": subject, "body": body}-if cc: params["cc"] = cc-url = "https://mail.google.com/mail/?" + urllib.parse.urlencode(params)-if sys.platform == "darwin":- subprocess.run(["open", "-a", "Google Chrome", url])-else:- import webbrowser; webbrowser.open(url)-time.sleep(1.5)-```--Two limits, both real:--- A `view=cm` URL always opens a **new** compose. It cannot reply inside an existing- thread. A reply must be handed to the user as text to paste.-- A long body overflows the URL. Keep bodies to a few short paragraphs and link to the- brief rather than pasting it.diff --git a/packages/twenty-apps/internal/twenty-partners/src/skills/twenty-lead-brief/SKILL.md b/packages/twenty-apps/internal/twenty-partners/src/skills/twenty-lead-brief/SKILL.mddeleted file mode 100644index b010367a951..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/skills/twenty-lead-brief/SKILL.md+++ /dev/null@@ -1,231 +0,0 @@-----name: twenty-lead-brief-description: Turn a Twenty sales/discovery call into a partner-ready brief and record the lead in the CRM. Use whenever the user has a call recording, transcript, Fireflies link, or a lead folder and wants to qualify the deal, summarize the call, write a partner brief, or prep the partner handoff. Trigger even without the word "brief" - "summarize this call", "what did we learn from the X call", "qualify this lead", "scope this for a partner", "draft a design doc", or pointing at a transcript file all count. Produces a qualification summary, a partner brief, matching criteria, and an Opportunity in the partners workspace. Pass --full for inference mode.-trigger: /twenty-lead-brief------# twenty-lead-brief--First step of the lead path. Takes a raw call and produces everything the rest of the path-needs:--```-twenty-lead-brief → twenty-partner-shortlist → twenty-partner-intro-```--Four outputs, in order:--1. A **qualification summary** printed in the conversation. You can stop here.-2. A **partner brief** the partner reads to scope and quote.-3. **`partner-match-criteria.md`**, the input to `twenty-partner-shortlist`.-4. An **Opportunity** in the partners workspace, carrying the brief's URL.--Credentials, the `gql()` helper and every query live in `../_shared/partner-api.md`. Read it-rather than restating anything.-------## Step 1 — Get the transcript--The user provides it: pasted text, a path (`.txt` / `.vtt` / `.srt`, a meetily folder or-`transcripts.json`), or a Fireflies link or ID.--- meetily `transcripts.json` is `{ "segments": [ { "text": … } ] }`: concatenate `text` in- order.-- `.vtt` / `.srt`: drop cue numbers and timecodes.-- Fireflies: fetch the transcript detail (see the shared reference). Needs `FIREFLIES_API_KEY`.--**No transcript means stop and ask.** Never fabricate one, never proceed without one.--For a long transcript, read the whole thing before writing. Coverage is the point.-------## Step 2 — The qualification summary--A **structured extraction against a fixed schema**, not a summary. A "summary that loses-nothing" is a contradiction; the schema is what prevents loss, because every dimension has a-slot and a gap is marked rather than silently dropped.--**Rules**--- Extract ONLY what is in the transcript. If a field isn't covered, write "Not discussed."- A visible gap beats a confident fabrication: it is the signal to ask on the next call.-- Separate stated FACTS from your INFERENCES. Mark any inference "(inferred)". Downstream- matching trusts the facts, so don't contaminate them with guesses.-- Preserve specifics verbatim: numbers, dates, names and roles, tool and CRM names, prices,- budgets, exact requirements. Never round or paraphrase a number. Specifics are where the- matching signal lives.-- Use the customer's own words for needs and objections. Quote pivotal lines.-- Don't smooth over a contradiction or a vagueness: note it. A flagged contradiction is more- useful than a falsely tidy summary.-- With no speaker labels, infer from context who is Twenty and who is the prospect.- Speech-to-text garbles names: flag an uncertain one "(uncertain)" and never invent one.-- Keep PART A tight: it is the one-pager the rest of the path runs on. Push anything not- specific to this deal into PART B. State each fact once.--**Output (these exact headers)**--```-== PART A — DEAL ONE-PAGER ==--1. ONE-LINE SUMMARY-2. COMPANY — name, what they do, size/employees, HQ + countries of operation, industry-3. PEOPLE ON THE CALL — name, role/title, side (Twenty vs prospect); infer roles if- unlabeled and flag uncertain names-4. CURRENT SITUATION — what CRM/tools they use today; specific pains-5. WHY THEY'RE INTERESTED IN TWENTY-6. WHAT THEY WANT — bulleted needs/requirements, verbatim where possible-7. IMPLEMENTATION COMPLEXITY (for partner matching)- - Deployment: cloud / self-host / both / unclear (+ the evidence)- - Data model: custom objects, multi-tenant, row-level security, migrations- - Integrations / custom apps needed- - Workflows / automation needs- - Scale: number of seats/users- - Region + language the partner would need to cover-8. COMMERCIALS — budget or prices discussed, plan tier (Pro/Org/Enterprise), seat count,- deal value, who pays-9. TIMELINE & DECISION — key dates, decision-makers, urgency, decision process-10. OBJECTIONS / RISKS / FEARS — including anything that could kill the deal-11. ALTERNATIVES — competitors or other options they're weighing-12. DOES THIS DEAL NEED A PARTNER? — yes / no / maybe + why; and if yes, what kind- (scope, region, language, seniority/tier)-13. NEXT STEPS / OPEN QUESTIONS / FOLLOW-UPS-14. PARTNER-FACING BRIEF — a 2-4 sentence narrative a partner can skim to decide yes/no,- drawn only from PART A--== PART B — APPENDIX (not deal-specific) ==--15. PRODUCT / WEBSITE / GTM FEEDBACK — feedback on the product, pricing page, website- wording, onboarding, or trial; capture even if off-topic for qualification-16. TERMINOLOGY / DOMAIN-LANGUAGE NOTES — words that mean different things to each side or- carry domain-specific meaning (e.g. "partner", "donor", jargon)-17. KEY VERBATIM QUOTES — 3-8 direct quotes that capture intent, needs, or objections-```--Print it, then save it to the lead folder as `YYYY-MM-DD-<lead>-call-summary.md`.--**Stop here if the user only wanted the summary.** Ask before continuing to Step 3: a lead-that is clearly not partner-shaped (section 12 says no) does not need a partner brief.-------## Step 3 — The partner brief--**The doctrine lives in `design-doc-doctrine.md` in this folder: what to produce, the-structure, the rules, the verification, the self-check. Read it and follow it.** The rest of-this section is only the mechanics.--Default output is a **zero-inference partner brief**. Pass `--full` for the inference-enabled-design doc. The doctrine defines both.--1. **Gather** — read every source material in full, not just the summary. Convert a `.docx`- with `textutil -convert txt "<file>" -output /tmp/out.txt` on macOS.-2. **Extract, grounded** — facts vs inferences, per the doctrine.-3. **Draft** in the doctrine's section structure.-4. **Verify load-bearing claims live** — WebFetch against the doctrine's doc map before- asserting any capability. Build the References appendix as you go.-5. **Reconcile discrepancies** — sources that disagree (call vs braindump, a name differing- across sources) get flagged both ways, never silently resolved.-6. **Resolve ❓ with the operator** — after a full v1 draft, use AskUserQuestion for the- unknowns a Twenty insider can answer. Leave customer-facing unknowns as ❓. **Running- autonomously** (a subagent or batch run) means skipping the questions and leaving every- unknown as ❓.-7. **Run the doctrine's self-check**, fix, then save as `YYYY-MM-DD-<lead>-partner-brief.md`- (or `-design-doc.md` in `--full`).-------## Step 4 — Publish the brief as a Google Doc--The partner gets a link, never an attachment: a Gmail compose URL cannot carry a file, and a-`.md` attachment is a poor read.--1. Open the shared Drive folder in Chrome:--```bash-open -a "Google Chrome" "https://drive.google.com/drive/folders/1ISDCplqLv6GrBQOOX7Fk4OK07LAK8BPd"-```--2. Tell the user: create the Doc there, paste the brief markdown, then paste the share URL- back. Mention `Tools → Preferences → Enable Markdown` once, so the paste renders headings,- bold and tables instead of showing raw `##`.--3. **Wait for the URL.** If the user skips it, carry on with Step 5 and leave `designDocUrl`- empty. Say so, because `twenty-partner-intro` will then have no link to send.--The folder is shared `anyone with the link can view`, so a partner can open it without an-account. Do not call the Drive API: the connected account is personal, and any Doc it created-would land in the wrong Drive under the wrong owner.-------## Step 5 — Write `partner-match-criteria.md`--Always, as a third file in the lead folder. This is the input `twenty-partner-shortlist`-reads.--- **Hard requirements** — a `Criterion | Why` table. Cover language and region, deployment- type, data-model complexity signal, migration capability, engagement model (fixed vs- retainer).-- **Strong preference** — bullets: domain familiarity, migration experience, willingness to- scope for free, ability to work with non-technical end-users.-- **Nice to have** — bullets: industry-specific workflow experience, partner size fit.-- **Red flags** — bullets: anything that would disqualify a partner silently (language,- hosting model, engagement type, technical depth).-- **Budget** — what the client said about money, verbatim, or "not stated". Most calls never- state a ceiling, and that is itself the answer. `twenty-partner-shortlist` shows this next- to each partner's rate; it never filters on it.-- **Matching notes** — 3 to 5 bullets: technical nuances, the prospect's sophistication- level, migration unknowns, who the decision-makers are. Draw from Open questions and- Implementation complexity.-------## Step 6 — Record the Opportunity--**This step writes to production.** Search before creating, always.--1. **Search** for an existing Opportunity on the company name (see the shared reference). If- one comes back, show it to the user and ask whether to update it or create a new one.- Never create a silent duplicate.-2. **Resolve the company and the point of contact**: search first, create only on a miss.-3. **Create** the Opportunity:--| Field | Value |-|---|---|-| `name` | `<Company> <need in about three words>`, matching existing records: `TADA new CRM`, `Aranya CRM Migration`, `ECF PRO - Self-hosting multi-workspace` |-| `stage` | `NEW` |-| `need` | one line, from section 6 of the summary |-| `requirements` | the requirements text, from section 7 |-| `companyId`, `pointOfContactId` | resolved above |-| `designDocUrl` | `{ "primaryLinkUrl": "<the Doc URL>", "primaryLinkLabel": "Partner brief" }`, omitted if Step 4 produced no URL |--Do **not** set `isListed`: that belongs to the marketplace pull flow, which this path does-not use. Do **not** set `introSentAt` and do not create any Application:-`twenty-partner-intro` owns both.--4. **Verify** by reading the record back, then print its id and name.-------## Output files--In the lead folder:--- `YYYY-MM-DD-<lead>-call-summary.md`-- `YYYY-MM-DD-<lead>-partner-brief.md` (or `-design-doc.md` in `--full`)-- `partner-match-criteria.md`-------## Notes--- Keep `partner-match-criteria.md` current as you learn more about the lead. It feeds- `twenty-partner-shortlist` and, eventually, in-product matching logic.-- Sections 7 and 12 of the summary are the matching axes: `Deployment → deploymentExpertise`,- scope needs → `partnerScope`, region and language → partner region and languages, scale →- capacity, the "needs a partner?" tier → `partnerTier`.-- Worked example: `partners-experience/TSF/2026-05-26-tsf-design-doc.md` shows the target- coverage, flag discipline and verification appendix. It predates the current concision and- formatting rules, so **follow the doctrine over the example** where they differ.diff --git a/packages/twenty-apps/internal/twenty-partners/src/skills/twenty-lead-brief/design-doc-doctrine.md b/packages/twenty-apps/internal/twenty-partners/src/skills/twenty-lead-brief/design-doc-doctrine.mddeleted file mode 100644index aec4721440c..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/skills/twenty-lead-brief/design-doc-doctrine.md+++ /dev/null@@ -1,361 +0,0 @@-# Design-doc doctrine: translating a lead into Twenty terms--**Portable doctrine.** Tool-agnostic. It defines *what* a Twenty partner design doc is, its-structure, the rules, and how to verify it. Two consumers use it: the Claude Code skill-`twenty-lead-brief` (see `SKILL.md` in this folder), and, in a later phase, the `content` of-a Twenty `defineSkill` driving an in-product agent. Keep it free of any one tool's mechanics-(no file paths, no tool names).--Every rule lives here **once**. To restate one elsewhere, link to it instead.--## Purpose--Produce a doc that translates a qualified lead's needs into **Twenty terms** (data model,-permissions, integrations, hosting, plus whatever else the client named) so an-implementation **partner can scope and quote** the work.--**Core principle:** identify *all* the work with **no blindspots**, **ground every claim** in-the source or in live Twenty docs, and **present options rather than prescribe**. The partner-quotes off this doc, so a confident-but-wrong capability claim or a hidden requirement is the-worst failure.--**Stay on the client's outcome.** Every line must change what the partner *builds* or what-the client *receives*. The doc is a design, not a meeting record.--The doc is **partner-facing** and may be forwarded verbatim. It is a *suggestion to make-scoping easier*, not a spec that constrains how the partner builds.--## Output structure--**Header: a compact table, four fields only.** Never a stack of bold lines.--| Field | Value |-|---|---|-| Lead | name (one-line description of who they are) |-| Date | YYYY-MM-DD |-| Author | Twenty (partnerships) |-| Status | one short line (e.g. "Draft for partner review") |--Keep the Status line short: a load-bearing caveat (e.g. "data model is an inference pending-discovery") goes in the "What this is" callout, not in the header cell. Never list source-materials, internal timelines, or who-promised-what: not load-bearing, not customer-safe.--After the table, one **"What this is"** callout framing the doc as a partner-scoping-suggestion across the full surface, *not* an MVP.--### Flags--Emoji **and** short text label, always together, so they are scannable and unambiguous:--- **❓ open** open question to resolve before quoting.-- **⚠️ heavy** product-constrained, needs special design, or has a real cost.-- **🛑 blocker** dealbreaker-grade. Doesn't quote without resolution.--These three only. Never invent a flag, swap the emoji (🟥 / 🚩 / 🚨 / ✅), or drop the text-label. `--full` mode adds a fourth, `🔮 inf.`.--### Required sections--Number sequentially, no gaps. A doc with Context, Data model, Integrations, Permissions,-Hosting, Phasing, Open questions, References is §1 through §8.--**Context** — the 30-second read: who they are, what they want, deployment requirement,-scale, language and region.--**Data model in Twenty terms** — the core. A **table, one row per object**:-`Object | Std/Custom | Represents | Key fields | Core relations`. Only objects the client-explicitly named; only fields the client explicitly named; `—` for an empty cell. Spell out-SELECT option sets.--**Model the relationships, not just the fields.** Who introduced or sourced a record (an-ambassador to Opportunity `sourcedBy`), parent and child, ownership: these carry as much-scoping signal as the attributes. A data-model section written as prose, or one that lists-fields but no links, has missed the point.--State product constraints **only when they change the build or the quote**, and inline: no-formula fields, so reporting ratios need a logic-function-maintained stored field; custom-objects auto-get attachments, notes, tasks and timeline, so relationship tracking is free.--Where a customer term collides with a Twenty term (their "partner" is a donor), note the-mapping inline as a small "term collisions" bullet list above the table. Never add a glossary-section.--**Roles, permissions & RLS** — map named roles to Twenty's object, field and row-level model.-Answer "do we need RLS?" against verified, plan-gated capability.--**Hosting & compliance** — cloud vs self-host, data-residency requirement (verify), GDPR.-Flag contradictions.--**Suggested phasing** — layers, labelled "(the partner's call, not Twenty's)".--**Open questions / blindspot-killers** — the list a partner must resolve before pricing.-**The one exception to "tables over bullets": always a numbered list**, so the partner can-speak them as items 1, 2, 3 with the client. Each item names the decision it gates and links-back to its body section.--**References & verification** — a `Claim (§) | Verified against` table, then an explicit-"**Could not be confirmed in public docs (check with Twenty directly):**" list. Cite the-**human-readable (non-`.md`) URL**: the `.md` twin is for your fetch, and renders as raw-markdown in a partner's browser.--### Conditional sections--If the client didn't name the topic, **omit the section entirely**. Never include a section-to say "X was not named": that is filler. Unknowns belong in Open questions.--**Views & navigation** — include when the data model has enough scope to warrant a surface-conversation. A **tight table**, columns `Surface | Shows | Audience`, one row per surface-the workspace should expose day-to-day. **No `Type` column**: table vs kanban vs page layout-is the partner's call, not a scoping decision. If the client named pipelines or layouts,-capture them in `Shows`. Never render this as a bullet list. Supplement with a single-follow-up bullet only when a cross-cutting open question needs flagging.--**Automations** — only if the client named processes to automate. Give-Workflow-or-logic-function for each; name the automation and its trigger.--**Integrations** — only when the client explicitly names an external system (Gmail, Slack,-WhatsApp). Direction, indicative mechanism, data flow, risks. A likely integration the client-never named is a single **❓ open**, not a section.--**Reporting & analytics** — only if the client named reporting needs. Map to native-Dashboards; flag gaps with paths.--Scale each section to its content. **Coverage of surface area matters more than depth per-item.**--## Default behavior: zero inference--The default output is a **zero-inference partner brief**: sharp, small, strictly grounded.--- **Nothing is inferred.** If the client didn't say it, it doesn't appear.-- **Required sections with no grounded content** get exactly one line:- `> ⬜ Not discussed on call — needs input before this section can be filled.`-- **Conditional sections** with nothing grounded are omitted entirely. The placeholder is for- required sections only.-- **Data-model cells** with no grounded content get `—`, never an invented value.-- **No `Source` column** in the data-model table: every row is `client`, so the column is- noise.-- **`🔮 inf.` never appears.** If you want to use it, that line should not exist.-- **Target length: 1 page.** Each section 1 to 5 lines.-- **Verification** runs only for sections with grounded content.-- Filename: `YYYY-MM-DD-<lead>-partner-brief.md`.--## Full mode (`--full`)--Use when discovery is complete, the lead is well documented, and inferences give the partner-a richer starting model.--| Dimension | Default | `--full` |-|---|---|---|-| Inferences | never | allowed, tagged `🔮 inf.` |-| Empty section | placeholder line | filled with tagged inferences |-| Data-model `Source` column | omitted | `client` / `inf.` |-| Inferred field names and relations | not included | tagged `🔮 inf.` |-| Length | 1 page target | as long as content requires |-| Verification | grounded sections only | all load-bearing claims |-| Filename | `…-partner-brief.md` | `…-design-doc.md` |--## Rules--Each rule states what to do and the failure it prevents.--**Be concise: maximum signal per word.** Cut throat-clearing, scene-setting, hedges and-feature-tour prose. Length is not coverage: a short doc that names every requirement beats a-long one that pads each. A hesitant buyer reads a focused doc; a bloated one reads as cost.--**Bullets and tables over paragraphs.** Reach for a table whenever rows share structure-(objects, views, plans, paths). Use prose only for a nuance no bullet or cell can carry. The-Open questions numbered list is the single deliberate exception.--**Business decisions over technical mechanics.** Scope is what the partner *builds* and what-the client *receives*: data sensitivity, who-sees-what, plan choice, hosting choice,-integration surface, cost drivers. Cut SDK, runtime and build-tool internals that don't move-the quote: Docker version, OAuth flavour, auto-system relations, env-var names, CI/CD-workflow detail. The partner reads References for those.--**Scope altitude: name the decision, defer the mechanics.** State the *decision* and its-*cost or scope consequence*; leave implementation detail to the technical phase. "Production-automations need a sandboxed serverless logic-function backend, an infra cost that belongs in-the platform workstream" carries the quote signal. The exact `LOGIC_FUNCTION_TYPE` /-`LAMBDA` / region / role / key settings do not. Deep mechanics inflate length and date fast.--**Ground everything; tag inferences; never grow scope.** The partner quotes off this, so an-invented field or requirement inflates the quote or sets a false expectation. If the-*concept* is from the source but the *field name* is yours, that is an inference: tag it.-Values lifted from the source (the customer's own category list becoming SELECT options) are-grounded; only names you coin are inferences.--**Record the design consequence, not the backstory.** State a requirement and the client's-path that follows. Do not litigate *why* it is true. When a requirement traces to-vendor-internal or third-party detail (corporate structure, legal domicile, ownership,-internal commercial arrangements, who-confirms-what-with-whom), keep only the consequence: it-is a commercial matter, not a build input, however much airtime it got on the call. An open-item the client is waiting on is recorded as the **decision it gates**, not as a narrative.--**No "left out" or "not named" placeholders.** A bullet saying *"sessions and programmes left-out on purpose"*, or a section saying *"no reporting was named"*, is filler. Cut it. To flag-an absence, write it as an Open question that gates a specific decision. Otherwise, silence.--**Never repeat yourself.** State each fact once, in its home section; elsewhere link to it.-Open questions and References are deliberate roll-ups: give the pointer and the decision the-item gates, not a re-explanation. Repetition is the main source of bloat, and two copies of a-claim drift out of sync.--**Cross-references are functional anchor links.** `[§N](#n-section-slug)`, never a bare `§N`.-The slug follows GitHub auto-anchoring: lowercase, spaces to hyphens, punctuation dropped,-`&` removed leaving a double hyphen. A partner skimming a bare `§7` sees a number with no way-to jump.--**Database discipline: reuse and extend standard objects.** Company, Person and Opportunity-plus built-in Notes, Tasks and Timeline cover most CRM needs; every new object multiplies-build and maintenance. **A human actor is a Person with a role flag before it is a new-object**: create an object only when it needs its own pipeline or reporting. Name the wall-when you add one.--**When the brief is thin, under-reach.** A blurry situation (no discovery call, sparse notes)-is a reason to model the *fewest, most certain* objects and leave the rest as **❓ open**, not-to compensate with an elaborate inferred domain. An over-detailed inference reads as scope-and cost the customer never asked for, and scares a hesitant buyer off. Lead with standard-objects plus the one or two custom objects the domain unmistakably needs. Say plainly, up-front, that the model is a minimal starting sketch to validate.--**Present build approaches; don't prescribe.** An automation can be a no-code Workflow *or* a-logic function in an app: say both. Prescribing one penalizes a partner who would do the-other. The doc identifies the *need*, not the *build*.--**Every problem carries a path.** If you flag a constraint (dashboards can't share-externally), pair it with at least one solution (CSV export, a front-component, a public site-on the API) or a question that resolves it. A flag with no path is useless to someone pricing-the work.--**Flag what an approach can't satisfy.** The doc's value is surfacing walls and limits per-requirement so the partner prices around them, not picking the one true solution.--**Partner-facing voice.** Say **"Twenty," never first person** ("we", "our", "ours"). No-local file paths: cite shareable `docs.twenty.com` URLs only. Customer quotes containing-"we" or "our" are fine: they are quotes.--**No characterisations or asides.** The doc is customer-forwardable, so keep out the source-chat's off-hand remarks: characterisations of the buyer (budget, temperament,-sophistication), named comparisons to competing vendors, and internal partnerships notes-(deadlines, who promised what). If price-sensitivity or a competitor displacement genuinely-shapes the build, state it neutrally as a requirement, never as a quote or a judgement.--**Verify before asserting capability.** Any "Twenty can, can't, has or lacks X" that moves-the quote must be verified live. **Undocumented is not impossible.** See Verification.--### Formatting--- One line per paragraph. **No mid-sentence hard wraps**: they render as broken lines.-- **Never an em dash** (the long dash). Restructure, or use a colon, comma, parentheses, or a- period.-- **Never a bare `~`** for "approximately": GitHub markdown pairs `~…~` into strikethrough.- Write "around" or "about".-- Mark unverified capability claims **❓ open**, never as fact.--## Verification--Any statement of the form **"Twenty can, can't, has or lacks X"** that changes the partner's-quote MUST be verified **live** before it is stated as fact. Model training is stale on a-fast-moving product; the worst failure is a confident, authoritative-sounding claim that is-wrong.--**Source hierarchy:**--1. **Live docs** (`docs.twenty.com`): primary truth. For the highest-stakes claims, read the- page's primary text rather than trust a summary.-2. **Established Twenty SDK build patterns** (hands-on): build-level facts the customer docs- omit (no formula fields; custom objects auto-get attachments, notes, tasks and timeline;- two-file relations).-3. **The Twenty operator** (a Twenty team member): best for "is it shipped, internal, or- undocumented".-4. **Model training**: never the sole basis for a high-stakes claim.--**Right doc layer (the trap).** Capabilities live in two layers, so check the right one.--- **Product capabilities** (what the CRM does for the *customer*): the **user guide and- pricing page**. Covers roles, row-level permissions, dashboards, plans, hosting, data- residency.-- **App capabilities** (what an *app* can define): the **developer and extend** docs. Covers- field types, fields, logic functions, views, page layouts.--Checking only the app layer is how "row-level not supported" (wrong) happens: row-level is a-**product feature on the Organization plan**. The converse also holds: SDK build patterns-*are* sufficient to assert **build-layer** facts even when the customer docs are silent, so-do not demote a well-established build fact to **❓ open**.--Two claims are stale in model training and must always be checked: "Twenty isn't a BI tool"-(it has Dashboards) and "Twenty can't do row-level" (Organization plan).--**Always verify, live, every run:**--1. Field types and constraints (no formula or computed fields).-2. Standard-object extension and relabeling (add fields; relabel built-in SELECT options?).-3. Roles and permissions: object, field and row-level, and which plan tier gates them.-4. Dashboards and reporting: chart and widget types, beta status, export and- external-sharing limits.-5. Automation surfaces: Workflows vs logic functions, what each can do.-6. Integration mechanisms: webhooks, HTTP triggers, scheduled functions, connections.-7. Hosting and deployment: cloud plans and regions, **EU data residency**, self-host- availability and requirements.--Plus any other capability claim the draft makes that carries a **⚠️ heavy** or **❓ open**.--**Fallback chain:**--- Docs confirm the claim, so state it as fact and record the source in References.-- Docs are silent or ambiguous, so ask the operator, if one is available.-- The operator is unavailable or unsure, so render it as **❓ open**. **Never assert.** When- you fetched a page and it was simply silent, record "docs silent (URL)" rather than leaving- the claim unsourced.--**Doc map.** Base `https://docs.twenty.com/`. Fetch **`<path>.md`** for the clean markdown-twin.--- Product and user-guide: `user-guide/dashboards/overview` ·- `user-guide/dashboards/capabilities/widgets` ·- `user-guide/permissions-access/how-tos/permissions-faq` · `user-guide/data-model/overview` ·- `user-guide/data-model/capabilities/fields` ·- `user-guide/data-migration/how-tos/export-your-data`-- Developer and extend: `developers/extend/apps/data/objects` ·- `developers/extend/apps/data/extending-objects` · `developers/extend/apps/data/relations` ·- `developers/extend/apps/logic/logic-functions` ·- `developers/extend/apps/logic/connections` · `developers/extend/apps/layout/views` ·- `developers/extend/apps/layout/page-layouts` · `developers/extend/apps/config/roles`-- Self-host: `developers/self-host/self-host`-- Pricing and plans: `https://twenty.com/pricing` (**marketing page, no `.md`**, fetch as- HTML).--If a `.md` 404s, drop the suffix or re-derive from the docs index: the map can go stale.--## Self-check--Run this list against the finished draft. Every item restates a rule above; this is the-scannable form, not a new rule set.--**Hard failures, fix before saving:**--- [ ] An em dash anywhere.-- [ ] A bare `~` for "approximately".-- [ ] First-person voice ("we", "our") outside a customer quote.-- [ ] A local file path.-- [ ] A header that is not the four-field table.-- [ ] A flag that is not `**❓ open**`, `**⚠️ heavy**` or `**🛑 blocker**` (plus `🔮 inf.` in- `--full`). A stray 🟥 🚩 🚨 ✅, or a naked emoji with no text label, is wrong.-- [ ] `🔮 inf.` present in default mode. Remove the whole inference, not just the tag.-- [ ] A `Source` column in the data-model table in default mode.-- [ ] A section that just says "X was not named", or lists what was left out on purpose.-- [ ] A bare `§N` instead of `[§N](#n-section-slug)`.-- [ ] Renumbering gaps: a section was cut but the numbers around it were kept.-- [ ] A capability claim stated as fact with no References source.--**Warnings, fix unless you can justify it:**--- [ ] A section that is mostly paragraphs where bullets or a table would do. Open questions- is the exception.-- [ ] Build, runtime or SDK mechanics that don't change the quote.-- [ ] A point repeated across sections instead of a `[§N](…)` cross-reference.-- [ ] A leftover glossary or domain-language section.-- [ ] A Views table with a `Type` column, or Views rendered as a bullet list.-- [ ] An Integrations section for a system the client never named.-- [ ] Doc longer than 2 pages in default mode.diff --git a/packages/twenty-apps/internal/twenty-partners/src/skills/twenty-partner-intro/SKILL.md b/packages/twenty-apps/internal/twenty-partners/src/skills/twenty-partner-intro/SKILL.mddeleted file mode 100644index 54ae8b2444c..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/skills/twenty-partner-intro/SKILL.md+++ /dev/null@@ -1,141 +0,0 @@-----name: twenty-partner-intro-description: Send the partner introductions for a lead - record them in the CRM and open the ready-to-send emails in Chrome. Use once the user has reviewed a shortlist and named the partners they want to introduce, or whenever they say to make the intro, send the intros, connect the client with a partner, or generate the intro emails. Writes Application records in INVITED state, stamps introSentAt on the Opportunity, and opens each partner email as a prefilled Gmail draft. Chains after twenty-partner-shortlist.-trigger: /twenty-partner-intro------# twenty-partner-intro--Third and last step of the lead path.--```-twenty-lead-brief → twenty-partner-shortlist → twenty-partner-intro-```--Takes the partners the user picked and does two things: records the push in the CRM, and puts-ready-to-send emails on screen.--**This skill writes to production.** It creates Application records and stamps the-Opportunity. Read Phase 2 before running it on a lead you are unsure about.--Credentials, the `gql()` helper and every query live in `../_shared/partner-api.md`.-------## Phase 0 — Inputs--Three things are needed. Ask for whatever is missing rather than guessing.--1. **The partners**, by name, as the user stated them. Never re-derive the list, and never- add a partner they did not name. If they name someone who was not on the shortlist, take- them: overriding the shortlist is the point of the review step.-2. **The lead folder**, for `partner-shortlist.md` and the brief. `twenty-partner-shortlist`- names it at the end of its run.-3. **The Opportunity**, created by `twenty-lead-brief` at Step 6. Search by company name. If- there is none, say so and ask whether to create one here or go back and run- `/twenty-lead-brief`.--Read the Opportunity's `designDocUrl`. **Empty means stopping and asking for the Doc URL**:-the whole point of the link is that the partner emails carry it, and an intro without the-brief makes the partner ask for it in a round trip.--Resolve each partner's contact email from `persons` → `emails.primaryEmail`. No email on-record means saying so and leaving the `to` field blank rather than inventing an address.-------## Phase 1 — Write to the CRM--Do this **before** the emails. If a write fails, the user finds out before anything leaves-their outbox.--For each confirmed partner:--1. **Check** `applications` filtered by `opportunityId` for an existing record for this- partner. One already there means leaving it alone and reporting it: re-running must not- create duplicates.-2. **Create** the Application: `{ opportunityId, partnerId, state: "INVITED" }`.--`INVITED` means Twenty pushed the partner at this lead. `APPLIED` means the partner came-forward on their own through the marketplace. Never write `APPLIED` here.--Then, once per run:--3. **Stamp** `introSentAt` on the Opportunity with the current timestamp. Already set means- asking whether this is a second wave before overwriting it.--4. **Verify** by reading the Applications back, then print a line per partner: created, or- already present.-------## Phase 2 — The emails--For N confirmed partners, the total is `1 + 2N`.--### Rules, always applied--- **English by default.** Match another language only when the lead clearly operates in one,- for instance a French lead. Tutoiement applies only in French.-- **Short.** 4 to 6 sentences, never more than a short screen. Cut throat-clearing, cut a- recap the reader already has, cut anything the brief covers. A sentence doing no work goes.-- **Intros are launched in parallel, so frame them as already happening.** Never "may I- introduce you" or "si c'est ok pour toi je te présente" or any other request for- permission. State that the intros are going out.-- **No em dashes.** Use a colon or a comma.-- Sign: `Cheers,\nRashad\nPartnerships @twenty`-- Subject prefix: `[Twenty]`-- No self-introduction in a partner email: they know who Rashad is.-- **Link the brief, never attach it.** Put the `designDocUrl` in the body. A Gmail compose- URL cannot carry a file, and the Doc reads better than a `.md` anyway.--### Email 1 — Client notification, one per run--A **reply inside the existing client thread**, not a new draft. Do not open a compose window-and do not invent a subject: a `view=cm` URL always starts a new thread. Output the body text-only, for the user to paste as a reply.--Content: the intros are going out, in parallel, to `<agency name(s)>`, who will reach out-directly. No permission-asking, no recap, no re-introduction.--### Email 2 per partner — Solo outreach--- **To**: the partner contact email-- **Subject**: `[Twenty] Partner opportunity: <Client>, <one-line project description>`-- **Content**: why this opportunity fits their profile, the project's complexity (custom- objects, deployment, migration, seats), the brief link, an invitation to reply or take a- call.--### Email 3 per partner — Three-way intro--- **To**: the partner contact email-- **CC**: the client email-- **Subject**: `[Twenty] <Client> x <Partner>: CRM project`-- **Content**: one sentence introducing each side, the project in two sentences, the brief- link, then hand off.--### Opening them--Open **the partner emails only** (2 and 3), sequentially, 1.5 s apart. The helper is in the-shared reference. Email 1 is a thread reply, so it stays as text on screen.-------## Phase 3 — Save and report--Save each email body to the lead folder:--- `email-1-client.txt`-- `email-2-<partner-slug>-solo.txt`-- `email-3-<partner-slug>-intro.txt`--Use the partner's `slug` field, not their display name. Older lead folders use ad-hoc names-(`email-4-intro-tatara.txt`, `email-fasttrack-codevelop.txt`); do not copy them.--Close with one table:--| Partner | Application | Emails opened |-|---|---|---|--Then the counts, and the reminder that Email 1 is the text to paste into the existing client-thread.diff --git a/packages/twenty-apps/internal/twenty-partners/src/skills/twenty-partner-recap/SKILL.md b/packages/twenty-apps/internal/twenty-partners/src/skills/twenty-partner-recap/SKILL.mddeleted file mode 100644index 380466ee3f2..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/skills/twenty-partner-recap/SKILL.md+++ /dev/null@@ -1,149 +0,0 @@-----name: twenty-partner-recap-description: Pull recent Fireflies partner meetings, match each to an existing Partner record by attendee email or domain, write a recap (transcript-first, Fireflies summary as fallback), and inject it as a Note on the partner's profile. Use after a batch of partner calls when you want each partner's CRM record updated with what was said. Leads and discovery calls have no Partner match and are skipped. Pass --prune to delete the Fireflies recordings once the recaps are safely in the CRM.-trigger: /twenty-partner-recap------# twenty-partner-recap--Network upkeep, not the lead path. After a batch of partner calls: pull the Fireflies-meetings, work out which partner each one is, summarize the call, and drop that summary as a-Note on the partner's profile. Runs end to end with no per-note confirmation.--The recap notes it writes are what `twenty-partner-shortlist` later reads to tell a real-capability from a partner's own marketing copy. Roughly 5 of the 29 validated partners have-one today, so every run makes the shortlist better.--Optional `--prune`: after the recaps are safely in the CRM, delete the corresponding Fireflies-recordings to free storage. Confirmed first, see Phase 6.--Credentials, the `gql()` helper and every query live in `../_shared/partner-api.md`. This-skill needs all three keys.-------## Phase 1 — Pull meetings--Default scope: **the last 2 days**, which covers "yesterday". The user can override per run:-"last week", a date, or pasted Fireflies URLs and IDs.--List recent transcripts, keep the ones inside the window (`date` is epoch milliseconds), then-fetch each kept transcript's detail.--If two transcripts share the same partner and day (Fireflies sometimes double-records), keep-the one with more sentences.-------## Phase 2 — Match each meeting to a Partner--Only a meeting tied to an existing Partner gets processed. A lead or discovery call has no-Partner match: skip it and list it at the end.--1. Page through all partners once, building two maps:- - `email → partner` from every `persons.edges.node.emails.primaryEmail`- - `domain → [partners]` from each `company.domainName.primaryLinkUrl`-2. For each meeting, take the attendee emails and drop anything `@twenty.com` plus the host- and organizer: that is the Twenty side. For each remaining attendee:- - **Exact email match** wins. It is the strongest signal.- - Otherwise **domain match**, skipping free providers (`gmail.com`, `outlook.com`,- `hotmail.com`, `yahoo.com`, `icloud.com`, `proton.me` and friends). Exactly one partner- on the domain means a match. Several means **flag it in the report and skip**, never- guess.-3. The meeting title is a secondary hint only (`Partner intro between … and <name>` was the- historical convention). Never the primary matcher.-------## Phase 3 — Summarize, transcript first--Judge content quality before writing. **Never write a note from nothing or from noise.**--- A transcript is **usable** only with real content: roughly 15 sentences or more **and** an- average of 4 words or more per sentence. A handful of one-word lines (`Platform.`- `Opportunity.` `Background.`) is garbled ASR, not a transcript. Treat it as unusable even- though the array is not empty.-- **Usable transcript** → write the recap yourself from the transcript. The default whenever- one exists.-- **No usable transcript but a Fireflies summary exists** → fall back to `summary.overview`,- then richer fields, then `short_summary`. Note the fallback in the source line.-- **Neither** → the call is still processing or was never recorded. Skip it, record it as- "skipped: content not ready", move on. Today's calls often land here for a while. Never- inject an empty or placeholder note.--Write the note in English, structured. No em dashes: use a colon or a comma.--```-**TL;DR:** one-line verdict / state of the relationship.--**Profil:** team size, location, languages, structure.-**Compétences Twenty:** deployment (cloud / self-host), data model, migrations, what they've-actually shipped.-**Contexte:** background, how they found Twenty, motivation, target clients, current-partnerships.-**Next steps:** concrete follow-ups (who owes what).-**Flags:** risks, unknowns, ASR artifacts to double-check.--Source: Fireflies <transcript-id> (call <YYYY-MM-DD>, transcript|summary).-```--The `Source: Fireflies <transcript-id>` line is load-bearing: it is the dedup key for re-runs-and the prune key for Phase 6. Always include the real transcript id.--**Compétences Twenty is the section that matters downstream.** It is the only place a-verified capability gets recorded, as opposed to what the partner writes about themselves.-State what they have actually shipped, not what they say they can do.-------## Phase 4 — Inject the Note--For each matched meeting, check first whether it was already noted: read the partner's notes-(`noteTargets` filtered by `targetPartnerId`) and look for a body containing-`Fireflies <transcript-id>`.--- **No such note** → `createNote` with `bodyV2.markdown`, then `createNoteTarget` linking- `noteId` to `targetPartnerId`. Title: `Partner call recap: <Partner name> (<YYYY-MM-DD>)`.-- **Note exists** → regenerate the recap, diff it against the existing body, and append- **only net-new information** under a dated `**Update <YYYY-MM-DD>:**` block via- `updateNote`. Nothing new means leaving it untouched.--No confirmation step: match, summarize, write. Then verify each write by reading the note back-and confirming the partner link resolved.-------## Phase 5 — Report--One table:--| Meeting (date · title) | Attendee matched | Partner | Action |-|---|---|---|---|--`Action` is one of `created`, `updated (appended)`, `unchanged`, `skipped: no partner match`,-`skipped: ambiguous domain (N partners)`, `skipped: content not ready`. End with the counts.-------## Phase 6 — Prune (`--prune`, opt-in, deletes Fireflies recordings)--Runs only with `--prune`. Fireflies storage fills up, and a recording whose content is-already safe in the CRM is dead weight. **Deletion is irreversible and on an external-service, so always confirm before deleting.**--A recording is **safe to prune** only when its recap note was confirmed written this run-(`created` or `updated`), **or** already exists in the CRM with this transcript's-`Fireflies <id>` in its body. Never prune a meeting that was skipped, has no note, or whose-note you could not verify: losing the recording loses the only copy.--1. Build the prune set from this run's safe meetings. If asked to "free more", add existing- recap notes whose `Fireflies <id>` resolves to a still-present transcript.-2. **Present the exact list** (partner, transcript id, date) and get explicit confirmation.- Default to keeping the most recent unless told otherwise.-3. Delete each confirmed transcript with `deleteTranscript(id:)`, then **verify** by- re-listing and confirming the ids are gone. Report `deleted N/M` and how many remain.--Matching old notes back to transcripts: notes written before this skill embed only a date, not-an id, so fall back to the meeting-title person name (`Partner intro between … and <name>`,-`… - <name> x Rashad`) against the partner name in the note title. Notes written by this skill-carry `Fireflies <id>` in the body, so the mapping is exact going forward.diff --git a/packages/twenty-apps/internal/twenty-partners/src/skills/twenty-partner-shortlist/SKILL.md b/packages/twenty-apps/internal/twenty-partners/src/skills/twenty-partner-shortlist/SKILL.mddeleted file mode 100644index 8922345aa96..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/skills/twenty-partner-shortlist/SKILL.md+++ /dev/null@@ -1,146 +0,0 @@-----name: twenty-partner-shortlist-description: Shortlist the Twenty partners who fit a lead, with the reason for each, and stop so the user can review. Use when the user asks who to introduce, who fits this deal, which partners to consider, or to match a lead to partners. Works from a lead folder's partner-match-criteria.md, or straight from an Opportunity's need and requirements for a website form submission that has no call behind it. Read-only - it never writes to the CRM and never writes emails. Chains forward into twenty-partner-intro once the user has picked.-trigger: /twenty-partner-shortlist------# twenty-partner-shortlist--Second step of the lead path.--```-twenty-lead-brief → twenty-partner-shortlist → twenty-partner-intro-```--Produce a shortlist of partners who fit this lead, each with the reason, and **stop**. The-user reviews it, adds, removes and changes it, then runs `twenty-partner-intro` with the-names they settled on.--**This skill is read-only and email-free.** It never writes to the CRM. It never drafts,-opens or sends an email. Those belong to `twenty-partner-intro`. That separation is the whole-point: a stop instruction sitting above email instructions in the same file gets walked past,-so the barrier is the end of this skill.--Credentials, the `gql()` helper and the partner query live in `../_shared/partner-api.md`.-------## Phase 0 — Inputs--Criteria come from one of two places. Check them in this order.--**1. `partner-match-criteria.md` in the lead folder.** The richer source, produced by-`/twenty-lead-brief` at Step 5. Use it whenever it exists.--**2. The Opportunity's own `need` and `requirements`.** A lead that arrived through the-website form (`submit-client-brief`) has no call, no transcript and no lead folder, but it-does have structured content in the CRM: `need` is what they want, and `requirements` carries-the hosting, seats, country, languages, timeline and budget block. That is enough to-shortlist on. Read the Opportunity and treat those two fields as the criteria.--Names ending in `— marketplace brief` are always this second case. Never bounce one back to-`/twenty-lead-brief`: there is no transcript to give it, so that is a dead end.--**Neither?** Ask what exists (a transcript, a Fireflies ID or URL, an existing summary) and-run `/twenty-lead-brief` first.--**With a criteria file, be critical before querying anything.** Read it and check:--- At least 2 hard requirements, each with a justification.-- The language requirement is explicit.-- The required skills are specific enough to separate one partner from another. "Self-hosted- Docker" does that; "technical" does not.-- Red flags are listed.--Thin on any axis means saying so and asking targeted questions first. A shortlist built on a-vague brief is noise.--**Working from `need` and `requirements` instead**, the same scrutiny applies but the bar is-lower: a form submission is short by design. Name what is missing (the criteria file would-have carried red flags and an engagement model) and shortlist on what is there. Say in the-output which of the two sources you used, so nobody mistakes a form-level match for a-call-level one.-------## Phase 1 — Fetch and filter--Query every `VALIDATED` and `AVAILABLE` partner (see the shared reference). Paginate to the-end.--Apply the eliminators in this order. Each one is a hard fact, never a judgement.--**1. Empty profile.** A partner with no `country`, no `deploymentExpertise` and no-`introduction` cannot be assessed. Drop them and name them in one line at the bottom. As of-the last check that is 6 of the 29 validated partners, so the line is short and it doubles as-a chase list.--**2. Hard requirements from the criteria file.** Language and deployment are the usual two. A-partner missing a hard requirement does not appear among the candidates, not even with a-caveat.--**Price is never an eliminator.** Roughly half the partners have no rate on record, and at-least one rate is a day rate entered in an hourly field, so any threshold would cut on noise.-Price is shown as a fact and the user decides.-------## Phase 2 — The shortlist--2 to 4 candidates by default. More only if the user asks.--For each, in this format:--```-## <Partner name> — fort / moyen / faible--**Pourquoi ça matche**-- point-- point-- point--**Ce qui manque ou est risqué**-- point--**Tarif** : <hourly> /h (≈ <hourly × 8> /jour) · budget projet min <amount>-**Contacts** : <name>, <email>-```--Rules:--- **Be honest.** One strong candidate and two weak ones is a real answer. Say why the others- are weaker. Never inflate a score to fill a quota.-- **Never invent a capability.** An `introduction` is marketing copy the partner wrote about- themselves. Only one partner in 29 has `twentyExperience` filled, so proof of real Twenty- work is rare and worth calling out when it exists.-- Read the partner's **notes** (`noteTargets` filtered by `targetPartnerId`) when there are- any. A `Partner call recap:` note carries what was actually said on a call, which beats- self-written copy. About 5 partners have one.-- `partnerTier` is the user's own past judgement. Report it where set; never let it- reorder the list.--Head the output with the lead's budget line from the criteria file, usually "not stated".-Show each partner's rate next to it. Do not compute a verdict from the comparison.--**Then list the ones you did not shortlist**, by name, one line, with the one fact that kept-them out:--```-Non retenus : Smotly (pas d'allemand) · OPALIA (cloud seulement) · Buildrhaus (…) · …-Écartés, profil vide : Giacomo · Shubham · Gaurav Trivedi · Devreet Dulay · Benjamin Reynolds-```--Without this the user can only remove, never add. Adding is half of what the review is for.-------## Phase 3 — Save and stop--Save the whole output to `partner-shortlist.md` in the lead folder. Working from an-Opportunity, there is no folder yet: create `partners-experience/<company>/` and save it-there, so `twenty-partner-intro` has somewhere to write. Say which folder you used.--Then **stop**. Tell the user they can add, remove or change any candidate, and that-`/twenty-partner-intro` takes the names they settle on.--Do not ask "shall I write the emails?". Do not draft one in advance. End here.diff --git a/packages/twenty-apps/internal/twenty-partners/src/skills/twenty-partner-triage/SKILL.md b/packages/twenty-apps/internal/twenty-partners/src/skills/twenty-partner-triage/SKILL.mddeleted file mode 100644index 05ca72d08f0..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/skills/twenty-partner-triage/SKILL.md+++ /dev/null@@ -1,112 +0,0 @@-----name: twenty-partner-triage-description: Rank the partner-application backlog by net-new value and hand back a short chase-list of applicants worth a personal nudge. Use when the user wants to triage, rank, or prioritize partner applications, find which applicants are worth chasing, run the daily or weekly application review, or asks "who should I reach out to" / "which applications matter". Reads the live partners workspace, read-only, never mutates a record.-trigger: /twenty-partner-triage------# twenty-partner-triage--Network upkeep, not the lead path. Rank `APPLICATION`-stage partners by the value they would-*add* (geographies and languages the roster doesn't yet cover, plus proof of real Twenty work)-and hand back a short **chase-list**: the applicants worth a personal nudge.--**The door stays open for everyone.** This skill rejects nobody and filters nobody out of the-pipeline. It just makes sure the good applicants bubble up so they don't rot. The point is a-few high-confidence partners, not maximum coverage.--Read-only. It never mutates a record.--Credentials live in `../_shared/partner-api.md`. This skill needs the partners URL and key.-------## Phase 0 — Run the ranker--```bash-python3 "$(dirname "$0")/rank.py" # or: python3 rank.py from the skill dir-```--`rank.py` is the deterministic core. It pulls every partner, computes each applicant's-net-new geo, language, scope and skills against the **VALIDATED** baseline, detects a "real-Twenty work" proof signal in the notes, scores, and prints ranked JSON. It calls no LLM: the-judgment lives in you, at Phase 1.--Each ranked entry: `name, score, tier (A/B/C), new_geo, new_lang, new_scope, new_skills,-proof{workspace_url|customers|migration}, team, contact_name, email, linkedin, website,-notes`.--Scoring, tunable in `rank.py`: geo +3 each, language +3 each, scope +1, skills +1 capped at 3-(so a dev shop spraying skill lists can't dominate), proof +6. Any proof signal means at least-tier A.--**Scope: every application is scored.** There is no booking signal on the Partner object, so-the ranker cannot narrow to the applicants who never booked a call. That is the true chase-set, and reaching it would mean adding a field and populating it from the calendar. Until-someone does, say plainly in the output that the list covers all applications, booked or not.--A missing-credentials error means stopping and naming the key to add.-------## Phase 1 — Judgment pass (this is the point)--The score surfaces; you decide. Read the `notes` of the **top ~15**, plus anything tier-B or-tier-C with a non-trivial note, and adjust:--- **Rescue the motivated-but-unobvious.** Thin checkboxes but notes showing real intent, a- live Twenty instance, named customers, or a thoughtful pitch is a chase even at a low- score. This is the whole reason a human reads the notes: the applicants who do things the- form doesn't capture are exactly the ones not to lose.-- **Sanity-check volume inflation.** A high score driven by 6 net-new *languages* from one- solo, or a long skills list, may be aspirational. Confirm against the notes before ranking- it top. Real net-new geography with proof beats a long list every time.-- **Demote noise.** Empty notes, agency spam, or `Tally submission: <id>` with nothing else is- tier C regardless of score. Don't chase them.-- **Note proof quality.** `workspace_url` and `customers` together, a live workspace with- named clients, is the strongest signal, stronger than the raw score. Call it out.--Don't invent facts. An ambiguous note gets said so, not upgraded on a guess.-------## Phase 2 — Output the chase-list--A tight digest, grouped by tier, A first. Lead with the count and the scope caveat.--```-# Partner application triage — N applications ranked (all applications, no booking signal on the model)--## Chase now (Tier A — fills a gap AND/OR proven)-- **<name>** (<team>) — +<geo>/<lang>; proof: <workspace+customers/…>- why: <one line, drawn from notes>- reach: <email> · <linkedin>--## Worth a look (Tier B)-- <name> — <one line>; reach: <email>--## Skip for now (Tier C) — <count>, not listed (empty/spam/no gap)-```--Rules:--- Tier A is the actual worklist. Keep it short. Eighteen entries means the proof-backed- gap-fillers go first and the volume-only ones go last.-- Always give a reach handle: email from `contact_name` or `email`, else linkedin, else- website. None on record means saying "no contact on record", which is itself a data-quality- flag.-- Be honest. A handful genuinely worth chasing is a real answer. Don't pad the A-tier.-------## What this is not--- **Not a gate.** It never moves anyone to `REJECTED` or out of the funnel.-- **Not a writer.** It never edits a record. Surfacing only.-- **Not a background job.** Nothing here is scheduled. The judgment pass stays here, for- the runs where a human is in the loop.--## Self-check--`python3 rank.py --selftest` asserts that the scoring orders a gap-filler-with-proof above a-skill-sprayer above an empty record, and that skill volume stays capped. Run it after any edit-to the weights or the signal regexes.diff --git a/packages/twenty-apps/internal/twenty-partners/src/skills/twenty-partner-triage/rank.py b/packages/twenty-apps/internal/twenty-partners/src/skills/twenty-partner-triage/rank.pydeleted file mode 100644index ad7469267ad..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/skills/twenty-partner-triage/rank.py+++ /dev/null@@ -1,195 +0,0 @@-#!/usr/bin/env python3-"""Deterministic ranker for the twenty-partner-triage skill.--Ranks APPLICATION-stage partners by NET-NEW value vs the current VALIDATED set:-geography and language we don't yet cover (weighted high), plus a "real Twenty-work" proof signal read from the application notes. Skill volume is deliberately-capped so generic dev shops that spray skill lists don't dominate.--Reads creds from ~/.twenty/credentials.env. Emits ranked JSON to stdout.-Run `rank.py --selftest` to verify scoring without hitting the API.--# ponytail: fixed weights + tier thresholds. Tune the WEIGHTS/THRESHOLDS dicts-# below if the ranking drifts; everything else is mechanical.-"""-import json-import os-import re-import sys-import urllib.request--WEIGHTS = {"geo": 3, "lang": 3, "scope": 1, "skill": 1, "skill_cap": 3, "proof": 6}-THRESHOLDS = {"A": 12, "B": 5} # >=A => A; >=B => B; else C. Any proof => at least A.--# "real Twenty work" signals in the free-text notes (the high-confidence axis).-PROOF_WORKSPACE = re.compile(r"https?://[^\s]*(twenty|crm)[^\s]*", re.I)-PROOF_CUSTOMERS = re.compile(r"(customers?\s+onboarded|real implementation|clients?\s+(moving|migrat)|delivered \d|named customer)", re.I)-PROOF_MIGRATION = re.compile(r"(switch\w*|migrat\w*|moved|replac\w*|our crm|own crm|we use twenty|dogfood|managed service)", re.I)--CRED_PATH = os.path.expanduser("~/.twenty/credentials.env")---def load_creds():- if not os.path.exists(CRED_PATH):- sys.exit(f"Missing {CRED_PATH}. Copy the partners key from the app's "- ".env.prod into it (TWENTY_PARTNERS_API_URL / _API_KEY).")- env = {}- with open(CRED_PATH) as fh:- for line in fh:- line = line.strip()- if line and not line.startswith("#") and "=" in line:- k, v = line.split("=", 1)- env[k.strip()] = v.strip()- url = env.get("TWENTY_PARTNERS_API_URL")- key = env.get("TWENTY_PARTNERS_API_KEY")- if not url or not key:- sys.exit("credentials.env is missing TWENTY_PARTNERS_API_URL or TWENTY_PARTNERS_API_KEY.")- return url.rstrip("/"), key---def fetch_all_partners(url, key):- recs, after = [], None- while True:- path = f"{url}/rest/partners?limit=200&depth=1" + (f"&starting_after={after}" if after else "")- req = urllib.request.Request(path, headers={"Authorization": f"Bearer {key}", "User-Agent": "Mozilla/5.0"})- data = json.load(urllib.request.urlopen(req))- page = data["data"]["partners"]- recs += page- info = data.get("pageInfo", {})- if info.get("hasNextPage") and page:- after = info["endCursor"]- continue- return recs---def tok(value):- """Flatten any nested value into a set of lowercased non-empty string tokens."""- out = set()- if value is None:- return out- if isinstance(value, str):- s = value.strip().lower()- if s:- out.add(s)- elif isinstance(value, list):- for item in value:- out |= tok(item)- elif isinstance(value, dict):- for item in value.values():- out |= tok(item)- else:- out.add(str(value).lower())- return out---def notes_str(rec):- v = rec.get("applicationNotes")- if isinstance(v, str):- return v- return "" if v is None else json.dumps(v)---def contact(rec):- persons = rec.get("persons") or []- if not persons:- return None, None, rec.get("linkedin")- p = persons[0]- name = p.get("name") or {}- full = " ".join(x for x in [name.get("firstName"), name.get("lastName")] if x) or None- email = (p.get("emails") or {}).get("primaryEmail")- linkedin = p.get("linkedinLink") or rec.get("linkedin")- return full, email, linkedin---def baseline(validated):- geo, lang, scope, skill = set(), set(), set(), set()- for r in validated:- geo |= tok(r.get("region")) | tok(r.get("country"))- lang |= tok(r.get("languagesSpoken"))- scope |= tok(r.get("partnerScope"))- skill |= tok(r.get("skills"))- return {"geo": geo, "lang": lang, "scope": scope, "skill": skill}---def score_one(rec, base):- new_geo = sorted((tok(rec.get("region")) | tok(rec.get("country"))) - base["geo"])- new_lang = sorted(tok(rec.get("languagesSpoken")) - base["lang"])- new_scope = sorted(tok(rec.get("partnerScope")) - base["scope"])- new_skill = sorted(tok(rec.get("skills")) - base["skill"])- notes = notes_str(rec)- proof = {- "workspace_url": bool(PROOF_WORKSPACE.search(notes)),- "customers": bool(PROOF_CUSTOMERS.search(notes)),- "migration": bool(PROOF_MIGRATION.search(notes)),- }- has_proof = any(proof.values())- score = (WEIGHTS["geo"] * len(new_geo)- + WEIGHTS["lang"] * len(new_lang)- + WEIGHTS["scope"] * len(new_scope)- + WEIGHTS["skill"] * min(len(new_skill), WEIGHTS["skill_cap"])- + (WEIGHTS["proof"] if has_proof else 0))- if has_proof or score >= THRESHOLDS["A"]:- tier = "A"- elif score >= THRESHOLDS["B"]:- tier = "B"- else:- tier = "C"- name, email, linkedin = contact(rec)- return {- "name": rec.get("name"),- "score": score,- "tier": tier,- "new_geo": new_geo,- "new_lang": new_lang,- "new_scope": new_scope,- "new_skills": new_skill,- "proof": {k: v for k, v in proof.items() if v},- "team": rec.get("typeOfTeam"),- "contact_name": name,- "email": email,- "linkedin": linkedin if isinstance(linkedin, str) else (linkedin or {}).get("primaryLinkUrl") if isinstance(linkedin, dict) else None,- "website": (rec.get("website") or {}).get("primaryLinkUrl") if isinstance(rec.get("website"), dict) else None,- "notes": notes.strip()[:400],- }---def rank(recs):- validated = [r for r in recs if r.get("validationStage") == "VALIDATED"]- apps = [r for r in recs if r.get("validationStage") == "APPLICATION"]- base = baseline(validated)- ranked = sorted((score_one(r, base) for r in apps), key=lambda d: -d["score"])- return {- "validated_count": len(validated),- "application_count": len(apps),- "coverage": {k: sorted(v) for k, v in base.items()},- "ranked": ranked,- }---def selftest():- base_recs = [{"validationStage": "VALIDATED", "country": ["france"],- "languagesSpoken": ["french", "english"], "partnerScope": ["development"],- "skills": ["react", "postgres"]}]- apps = [- {"validationStage": "APPLICATION", "name": "gap+proof", "country": ["germany"],- "languagesSpoken": ["german"], "applicationNotes":- "Live workspace https://crm.acme.de — customers onboarded: Foo GmbH"},- {"validationStage": "APPLICATION", "name": "skill-sprayer",- "skills": ["php", "vue", "kotlin", "swift", "laravel", "mongodb"]},- {"validationStage": "APPLICATION", "name": "empty"},- ]- out = rank(base_recs + apps)["ranked"]- order = [r["name"] for r in out]- assert order == ["gap+proof", "skill-sprayer", "empty"], order- assert out[0]["tier"] == "A", out[0]- assert out[1]["score"] == WEIGHTS["skill_cap"], out[1] # 6 new skills capped at 3- assert out[2]["tier"] == "C", out[2]- print("selftest ok:", order)---if __name__ == "__main__":- if "--selftest" in sys.argv:- selftest()- else:- url, key = load_creds()- print(json.dumps(rank(fetch_all_partners(url, key)), indent=2, ensure_ascii=False))diff --git a/packages/twenty-apps/internal/twenty-partners/src/workflows/README.md b/packages/twenty-apps/internal/twenty-partners/src/workflows/README.mddeleted file mode 100644index 5dfc63ee3f0..00000000000--- a/packages/twenty-apps/internal/twenty-partners/src/workflows/README.md+++ /dev/null@@ -1,74 +0,0 @@-# Manual workflows runbook--The Twenty Partners app relies on one workflow built in the Twenty workspace UI: a-**cron workflow**. The SDK has no `defineWorkflow`, so this is a documented setup-step — not shipped in the app manifest.--**Rebuild this workflow in every workspace** where the app is installed (local-bundles, staging, prod). After `yarn twenty install`, prod is empty until an admin follows-this runbook.--## Prerequisites--- Twenty Partners app installed and synced (`yarn twenty apply`).-- The **WORKFLOWS** permission flag is no longer needed for apply: the apply path now- ships in the app manifest as a command menu item.-------## Winner assignment (no workflow needed)--An admin sets the **Partner** field on the linked **Opportunity** record directly.-The app's logic function `on-opportunity-partner-won` fires on that change and-cascades the Application states to **WON** / **DECLINED** automatically. No-workflow to build or rebuild for this step.-------## 1. Daily digest--Nudges validated partners once a day when new briefs appear: count + link, no brief-details. Zero new briefs → no email. Hand-built per workspace — workflows are workspace-metadata and do not travel with the app.--Validated structure (local, 2026-08-25):--1. Trigger — **Cron, daily 07:00**. (A test build may use a manual trigger; switch to- cron before relying on it.)-2. **Find Records** `Search new opp` — Opportunity, `Creation date` is relative- `PAST_1_DAY` and `isListed` is true. Raise the record limit well above the editor- default of 1.-3. **Find Records** `Search Partners` — Partner, `Validation Stage` is `VALIDATED`.- Raise the record limit as well.-4. **Iterator** over the partners from step 3. Inside the loop:- - **Find Records** `Search people partner` — Person whose `Partner → Id` is- `{{currentItem.id}}`. The workflow engine loads no relations, so this extra search- is what resolves the partner's contact email.- - **If/Else** — continue only when the person search returned an email.- - **Send Email** — from the workspace's connected mailbox, to the found person email.- Subject and body carry the count from step 2 and the prod marketplace link.-5. Publish and confirm the version shows ACTIVE.--Prod prerequisites: a connected mailbox (Settings → Accounts) and the app installed.--### Local email testing (never prod)--Run smtp4dev:-`docker run --rm -d --name smtp4dev -p 8090:80 -p 2525:25 -p 1143:143 rnwood/smtp4dev`.-Add `host.docker.internal` to `OUTBOUND_HTTP_ALLOWED_INTERNAL_HOSTS` (Settings → Admin-Panel → Config Variables) — private hosts are blocked for IMAP/SMTP on purpose. Connect-an IMAP/SMTP account with host `host.docker.internal` (SMTP 2525, IMAP 1143, no TLS, any-credentials). Mails land at http://localhost:8090. `EMAIL_DRIVER` env vars are the-system mailer, not this — leave them alone.-------## Per-workspace checklist--- Trigger: cron, daily.-- Action: send email per validated partner via person lookup.-- Published label: **Daily Digest**.-- Who runs it: application role.--Repeat for each workspace after install. Workflows are workspace metadata — they do not-travel with `deploy` / `install`.diff --git a/packages/twenty-apps/internal/twenty-partners/tsconfig.json b/packages/twenty-apps/internal/twenty-partners/tsconfig.jsondeleted file mode 100644index eed679b9bc3..00000000000--- a/packages/twenty-apps/internal/twenty-partners/tsconfig.json+++ /dev/null@@ -1,43 +0,0 @@-{- "compileOnSave": false,- "compilerOptions": {- "sourceMap": true,- "declaration": true,- "outDir": "./dist",- "rootDir": ".",- "jsx": "react-jsx",- "moduleResolution": "bundler",- "allowSyntheticDefaultImports": true,- "emitDecoratorMetadata": true,- "experimentalDecorators": true,- "importHelpers": true,- "allowUnreachableCode": false,- "strict": true,- "alwaysStrict": true,- "noImplicitAny": true,- "strictBindCallApply": false,- "target": "es2018",- "module": "esnext",- "lib": ["es2020", "dom"],- "skipLibCheck": true,- "skipDefaultLibCheck": true,- "resolveJsonModule": true,- "paths": {- "src/*": ["./src/*"],- "~/*": ["./*"]- }- },- "exclude": [- "node_modules",- "dist",- "**/*.config.ts",- "**/*.test.ts",- "**/*.spec.ts",- "**/*.integration-test.ts"- ],- "references": [- {- "path": "./tsconfig.spec.json"- }- ]-}diff --git a/packages/twenty-apps/internal/twenty-partners/tsconfig.spec.json b/packages/twenty-apps/internal/twenty-partners/tsconfig.spec.jsondeleted file mode 100644index ea69a6c0105..00000000000--- a/packages/twenty-apps/internal/twenty-partners/tsconfig.spec.json+++ /dev/null@@ -1,9 +0,0 @@-{- "extends": "./tsconfig.json",- "compilerOptions": {- "composite": true,- "types": ["vitest/globals", "node"]- },- "include": ["src/**/*.ts", "src/**/*.tsx"],- "exclude": ["node_modules", "dist"]-}diff --git a/packages/twenty-apps/internal/twenty-partners/vitest.config.ts b/packages/twenty-apps/internal/twenty-partners/vitest.config.tsdeleted file mode 100644index aa1c1122000..00000000000--- a/packages/twenty-apps/internal/twenty-partners/vitest.config.ts+++ /dev/null@@ -1,47 +0,0 @@-import tsconfigPaths from 'vite-tsconfig-paths';-import { defineConfig } from 'vitest/config';--const TWENTY_API_URL = process.env.TWENTY_API_URL ?? 'http://localhost:2020';-const TWENTY_API_KEY =- process.env.TWENTY_API_KEY ??- 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIyMDIwMjAyMC0xYzI1LTRkMDItYmYyNS02YWVjY2Y3ZWE0MTkiLCJ0eXBlIjoiQVBJX0tFWSIsIndvcmtzcGFjZUlkIjoiMjAyMDIwMjAtMWMyNS00ZDAyLWJmMjUtNmFlY2NmN2VhNDE5IiwiaWF0IjoxNzM1Njg5NjAwLCJleHAiOjQ4OTE0NDk2MDAsImp0aSI6IjIwMjAyMDIwLWY0MDEtNGQ4YS1hNzMxLTY0ZDAwN2MyN2JhZCJ9.bfQjfyN0NEtTCLE_xPyNcwonDzlSXFoP8kdCQTdnuDc';--// Make env vars available to globalSetup (test.env only applies to workers)-process.env.TWENTY_API_URL = TWENTY_API_URL;-process.env.TWENTY_API_KEY = TWENTY_API_KEY;--export default defineConfig({- plugins: [- tsconfigPaths({- projects: ['tsconfig.spec.json'],- ignoreConfigErrors: true,- }),- ],- test: {- projects: [- {- extends: true,- test: {- name: 'unit',- include: ['src/**/*.test.ts'],- },- },- {- extends: true,- test: {- name: 'integration',- include: ['src/**/*.integration-test.ts'],- testTimeout: 120_000,- hookTimeout: 120_000,- fileParallelism: false,- globalSetup: ['src/__tests__/global-setup.ts'],- setupFiles: ['src/__tests__/rate-limit-retry.setup.ts'],- env: {- TWENTY_API_URL,- TWENTY_API_KEY,- },- },- },- ],- },-});diff --git a/packages/twenty-apps/internal/twenty-partners/yarn.lock b/packages/twenty-apps/internal/twenty-partners/yarn.lockdeleted file mode 100644index b1f4514e1fe..00000000000--- a/packages/twenty-apps/internal/twenty-partners/yarn.lock+++ /dev/null@@ -1,4031 +0,0 @@-# This file is generated by running "yarn install" inside your project.-# Manual changes might be lost - proceed with caution!--__metadata:- version: 8- cacheKey: 10c0--"@alcalzone/ansi-tokenize@npm:^0.2.4":- version: 0.2.5- resolution: "@alcalzone/ansi-tokenize@npm:0.2.5"- dependencies:- ansi-styles: "npm:^6.2.1"- is-fullwidth-code-point: "npm:^5.0.0"- checksum: 10c0/dd8622288426b5b7dbf8b68d51d4b930cea591d0e3b9dbc3f523131464d78ac922c165fcb7ba5307f133d35dbcaa0e6648a1c3fb6a0dc2725546d6f867b70af4- languageName: node- linkType: hard--"@emnapi/core@npm:1.10.0":- version: 1.10.0- resolution: "@emnapi/core@npm:1.10.0"- dependencies:- "@emnapi/wasi-threads": "npm:1.2.1"- tslib: "npm:^2.4.0"- checksum: 10c0/f51d08227857b60632de7714d708124f0e100a1462dde6df8221760939aa3204a73193830371830fac0716f3ccd2129f2cac1b17cd7d7958bc4da9018a296edb- languageName: node- linkType: hard--"@emnapi/runtime@npm:1.10.0":- version: 1.10.0- resolution: "@emnapi/runtime@npm:1.10.0"- dependencies:- tslib: "npm:^2.4.0"- checksum: 10c0/953f14991d1aefb92ee6f8eb27dea725e484791a53a0cb5f47d9e0087b9a2c929ff2e92adf95af15d6ad456db6300c6b761ebf72b50a875b874a83520b3ba093- languageName: node- linkType: hard--"@emnapi/runtime@npm:^1.11.3":- version: 1.11.3- resolution: "@emnapi/runtime@npm:1.11.3"- dependencies:- tslib: "npm:^2.4.0"- checksum: 10c0/a00f1020fefb9d4145c367f93a9fddb383a00da8ffd7871e20b19659890379b83aeecb9f84d7d0eda5456343f4a09eb05b0acb5153b0d3d889539dedb1ed87c3- languageName: node- linkType: hard--"@emnapi/wasi-threads@npm:1.2.1":- version: 1.2.1- resolution: "@emnapi/wasi-threads@npm:1.2.1"- dependencies:- tslib: "npm:^2.4.0"- checksum: 10c0/32fcfa81ab396533b2ec1f4082b1ff779a05d9c836bbbd3f4398405b0e6814c0d9503b7993130e37bc6941dbc1ded49f55e9700ae9ca4e803bab2b5bc5deb331- languageName: node- linkType: hard--"@esbuild/aix-ppc64@npm:0.28.1":- version: 0.28.1- resolution: "@esbuild/aix-ppc64@npm:0.28.1"- conditions: os=aix & cpu=ppc64- languageName: node- linkType: hard--"@esbuild/android-arm64@npm:0.28.1":- version: 0.28.1- resolution: "@esbuild/android-arm64@npm:0.28.1"- conditions: os=android & cpu=arm64- languageName: node- linkType: hard--"@esbuild/android-arm@npm:0.28.1":- version: 0.28.1- resolution: "@esbuild/android-arm@npm:0.28.1"- conditions: os=android & cpu=arm- languageName: node- linkType: hard--"@esbuild/android-x64@npm:0.28.1":- version: 0.28.1- resolution: "@esbuild/android-x64@npm:0.28.1"- conditions: os=android & cpu=x64- languageName: node- linkType: hard--"@esbuild/darwin-arm64@npm:0.28.1":- version: 0.28.1- resolution: "@esbuild/darwin-arm64@npm:0.28.1"- conditions: os=darwin & cpu=arm64- languageName: node- linkType: hard--"@esbuild/darwin-x64@npm:0.28.1":- version: 0.28.1- resolution: "@esbuild/darwin-x64@npm:0.28.1"- conditions: os=darwin & cpu=x64- languageName: node- linkType: hard--"@esbuild/freebsd-arm64@npm:0.28.1":- version: 0.28.1- resolution: "@esbuild/freebsd-arm64@npm:0.28.1"- conditions: os=freebsd & cpu=arm64- languageName: node- linkType: hard--"@esbuild/freebsd-x64@npm:0.28.1":- version: 0.28.1- resolution: "@esbuild/freebsd-x64@npm:0.28.1"- conditions: os=freebsd & cpu=x64- languageName: node- linkType: hard--"@esbuild/linux-arm64@npm:0.28.1":- version: 0.28.1- resolution: "@esbuild/linux-arm64@npm:0.28.1"- conditions: os=linux & cpu=arm64- languageName: node- linkType: hard--"@esbuild/linux-arm@npm:0.28.1":- version: 0.28.1- resolution: "@esbuild/linux-arm@npm:0.28.1"- conditions: os=linux & cpu=arm- languageName: node- linkType: hard--"@esbuild/linux-ia32@npm:0.28.1":- version: 0.28.1- resolution: "@esbuild/linux-ia32@npm:0.28.1"- conditions: os=linux & cpu=ia32- languageName: node- linkType: hard--"@esbuild/linux-loong64@npm:0.28.1":- version: 0.28.1- resolution: "@esbuild/linux-loong64@npm:0.28.1"- conditions: os=linux & cpu=loong64- languageName: node- linkType: hard--"@esbuild/linux-mips64el@npm:0.28.1":- version: 0.28.1- resolution: "@esbuild/linux-mips64el@npm:0.28.1"- conditions: os=linux & cpu=mips64el- languageName: node- linkType: hard--"@esbuild/linux-ppc64@npm:0.28.1":- version: 0.28.1- resolution: "@esbuild/linux-ppc64@npm:0.28.1"- conditions: os=linux & cpu=ppc64- languageName: node- linkType: hard--"@esbuild/linux-riscv64@npm:0.28.1":- version: 0.28.1- resolution: "@esbuild/linux-riscv64@npm:0.28.1"- conditions: os=linux & cpu=riscv64- languageName: node- linkType: hard--"@esbuild/linux-s390x@npm:0.28.1":- version: 0.28.1- resolution: "@esbuild/linux-s390x@npm:0.28.1"- conditions: os=linux & cpu=s390x- languageName: node- linkType: hard--"@esbuild/linux-x64@npm:0.28.1":- version: 0.28.1- resolution: "@esbuild/linux-x64@npm:0.28.1"- conditions: os=linux & cpu=x64- languageName: node- linkType: hard--"@esbuild/netbsd-arm64@npm:0.28.1":- version: 0.28.1- resolution: "@esbuild/netbsd-arm64@npm:0.28.1"- conditions: os=netbsd & cpu=arm64- languageName: node- linkType: hard--"@esbuild/netbsd-x64@npm:0.28.1":- version: 0.28.1- resolution: "@esbuild/netbsd-x64@npm:0.28.1"- conditions: os=netbsd & cpu=x64- languageName: node- linkType: hard--"@esbuild/openbsd-arm64@npm:0.28.1":- version: 0.28.1- resolution: "@esbuild/openbsd-arm64@npm:0.28.1"- conditions: os=openbsd & cpu=arm64- languageName: node- linkType: hard--"@esbuild/openbsd-x64@npm:0.28.1":- version: 0.28.1- resolution: "@esbuild/openbsd-x64@npm:0.28.1"- conditions: os=openbsd & cpu=x64- languageName: node- linkType: hard--"@esbuild/openharmony-arm64@npm:0.28.1":- version: 0.28.1- resolution: "@esbuild/openharmony-arm64@npm:0.28.1"- conditions: os=openharmony & cpu=arm64- languageName: node- linkType: hard--"@esbuild/sunos-x64@npm:0.28.1":- version: 0.28.1- resolution: "@esbuild/sunos-x64@npm:0.28.1"- conditions: os=sunos & cpu=x64- languageName: node- linkType: hard--"@esbuild/win32-arm64@npm:0.28.1":- version: 0.28.1- resolution: "@esbuild/win32-arm64@npm:0.28.1"- conditions: os=win32 & cpu=arm64- languageName: node- linkType: hard--"@esbuild/win32-ia32@npm:0.28.1":- version: 0.28.1- resolution: "@esbuild/win32-ia32@npm:0.28.1"- conditions: os=win32 & cpu=ia32- languageName: node- linkType: hard--"@esbuild/win32-x64@npm:0.28.1":- version: 0.28.1- resolution: "@esbuild/win32-x64@npm:0.28.1"- conditions: os=win32 & cpu=x64- languageName: node- linkType: hard--"@genql/runtime@npm:^2.10.0":- version: 2.10.0- resolution: "@genql/runtime@npm:2.10.0"- dependencies:- "@types/qs": "npm:^6.9.0"- "@types/ws": "npm:^6.0.1"- graphql-query-batcher: "npm:^1.0.1"- isomorphic-unfetch: "npm:^3.0.0"- lodash: "npm:^4.17.20"- subscriptions-transport-ws: "npm:^0.9.16"- tslib: "npm:^2.0.0"- utility-types: "npm:^3.10.0"- ws: "npm:^6.1.4"- zen-observable-ts: "npm:^0.8.21"- peerDependencies:- graphql: "*"- checksum: 10c0/e2a886c2469c933681e2b0ddd6a5b7f4cb12932251ba460e3cf2db4246817da79313ea4ba9769ec7cbe53ab9c1cb81ad8fcce6a969cd241185b79398d2a4f3c6- languageName: node- linkType: hard--"@img/colour@npm:^1.1.0":- version: 1.1.0- resolution: "@img/colour@npm:1.1.0"- checksum: 10c0/2ebea2c0bbaee73b99badcefa04e1e71d83f36e5369337d3121dca841f4569533c4e2faddda6d62dd247f0d5cca143711f9446c59bcce81e427ba433a7a94a17- languageName: node- linkType: hard--"@img/sharp-darwin-arm64@npm:0.35.4":- version: 0.35.4- resolution: "@img/sharp-darwin-arm64@npm:0.35.4"- dependencies:- "@img/sharp-libvips-darwin-arm64": "npm:1.3.3"- dependenciesMeta:- "@img/sharp-libvips-darwin-arm64":- optional: true- conditions: os=darwin & cpu=arm64- languageName: node- linkType: hard--"@img/sharp-darwin-x64@npm:0.35.4":- version: 0.35.4- resolution: "@img/sharp-darwin-x64@npm:0.35.4"- dependencies:- "@img/sharp-libvips-darwin-x64": "npm:1.3.3"- dependenciesMeta:- "@img/sharp-libvips-darwin-x64":- optional: true- conditions: os=darwin & cpu=x64- languageName: node- linkType: hard--"@img/sharp-freebsd-wasm32@npm:0.35.4":- version: 0.35.4- resolution: "@img/sharp-freebsd-wasm32@npm:0.35.4"- dependencies:- "@img/sharp-wasm32": "npm:0.35.4"- conditions: os=freebsd- languageName: node- linkType: hard--"@img/sharp-libvips-darwin-arm64@npm:1.3.3":- version: 1.3.3- resolution: "@img/sharp-libvips-darwin-arm64@npm:1.3.3"- conditions: os=darwin & cpu=arm64- languageName: node- linkType: hard--"@img/sharp-libvips-darwin-x64@npm:1.3.3":- version: 1.3.3- resolution: "@img/sharp-libvips-darwin-x64@npm:1.3.3"- conditions: os=darwin & cpu=x64- languageName: node- linkType: hard--"@img/sharp-libvips-linux-arm64@npm:1.3.3":- version: 1.3.3- resolution: "@img/sharp-libvips-linux-arm64@npm:1.3.3"- conditions: os=linux & cpu=arm64 & libc=glibc- languageName: node- linkType: hard--"@img/sharp-libvips-linux-arm@npm:1.3.3":- version: 1.3.3- resolution: "@img/sharp-libvips-linux-arm@npm:1.3.3"- conditions: os=linux & cpu=arm & libc=glibc- languageName: node- linkType: hard--"@img/sharp-libvips-linux-ppc64@npm:1.3.3":- version: 1.3.3- resolution: "@img/sharp-libvips-linux-ppc64@npm:1.3.3"- conditions: os=linux & cpu=ppc64 & libc=glibc- languageName: node- linkType: hard--"@img/sharp-libvips-linux-riscv64@npm:1.3.3":- version: 1.3.3- resolution: "@img/sharp-libvips-linux-riscv64@npm:1.3.3"- conditions: os=linux & cpu=riscv64 & libc=glibc- languageName: node- linkType: hard--"@img/sharp-libvips-linux-s390x@npm:1.3.3":- version: 1.3.3- resolution: "@img/sharp-libvips-linux-s390x@npm:1.3.3"- conditions: os=linux & cpu=s390x & libc=glibc- languageName: node- linkType: hard--"@img/sharp-libvips-linux-x64@npm:1.3.3":- version: 1.3.3- resolution: "@img/sharp-libvips-linux-x64@npm:1.3.3"- conditions: os=linux & cpu=x64 & libc=glibc- languageName: node- linkType: hard--"@img/sharp-libvips-linuxmusl-arm64@npm:1.3.3":- version: 1.3.3- resolution: "@img/sharp-libvips-linuxmusl-arm64@npm:1.3.3"- conditions: os=linux & cpu=arm64 & libc=musl- languageName: node- linkType: hard--"@img/sharp-libvips-linuxmusl-x64@npm:1.3.3":- version: 1.3.3- resolution: "@img/sharp-libvips-linuxmusl-x64@npm:1.3.3"- conditions: os=linux & cpu=x64 & libc=musl- languageName: node- linkType: hard--"@img/sharp-linux-arm64@npm:0.35.4":- version: 0.35.4- resolution: "@img/sharp-linux-arm64@npm:0.35.4"- dependencies:- "@img/sharp-libvips-linux-arm64": "npm:1.3.3"- dependenciesMeta:- "@img/sharp-libvips-linux-arm64":- optional: true- conditions: os=linux & cpu=arm64 & libc=glibc- languageName: node- linkType: hard--"@img/sharp-linux-arm@npm:0.35.4":- version: 0.35.4- resolution: "@img/sharp-linux-arm@npm:0.35.4"- dependencies:- "@img/sharp-libvips-linux-arm": "npm:1.3.3"- dependenciesMeta:- "@img/sharp-libvips-linux-arm":- optional: true- conditions: os=linux & cpu=arm & libc=glibc- languageName: node- linkType: hard--"@img/sharp-linux-ppc64@npm:0.35.4":- version: 0.35.4- resolution: "@img/sharp-linux-ppc64@npm:0.35.4"- dependencies:- "@img/sharp-libvips-linux-ppc64": "npm:1.3.3"- dependenciesMeta:- "@img/sharp-libvips-linux-ppc64":- optional: true- conditions: os=linux & cpu=ppc64 & libc=glibc- languageName: node- linkType: hard--"@img/sharp-linux-riscv64@npm:0.35.4":- version: 0.35.4- resolution: "@img/sharp-linux-riscv64@npm:0.35.4"- dependencies:- "@img/sharp-libvips-linux-riscv64": "npm:1.3.3"- dependenciesMeta:- "@img/sharp-libvips-linux-riscv64":- optional: true- conditions: os=linux & cpu=riscv64 & libc=glibc- languageName: node- linkType: hard--"@img/sharp-linux-s390x@npm:0.35.4":- version: 0.35.4- resolution: "@img/sharp-linux-s390x@npm:0.35.4"- dependencies:- "@img/sharp-libvips-linux-s390x": "npm:1.3.3"- dependenciesMeta:- "@img/sharp-libvips-linux-s390x":- optional: true- conditions: os=linux & cpu=s390x & libc=glibc- languageName: node- linkType: hard--"@img/sharp-linux-x64@npm:0.35.4":- version: 0.35.4- resolution: "@img/sharp-linux-x64@npm:0.35.4"- dependencies:- "@img/sharp-libvips-linux-x64": "npm:1.3.3"- dependenciesMeta:- "@img/sharp-libvips-linux-x64":- optional: true- conditions: os=linux & cpu=x64 & libc=glibc- languageName: node- linkType: hard--"@img/sharp-linuxmusl-arm64@npm:0.35.4":- version: 0.35.4- resolution: "@img/sharp-linuxmusl-arm64@npm:0.35.4"- dependencies:- "@img/sharp-libvips-linuxmusl-arm64": "npm:1.3.3"- dependenciesMeta:- "@img/sharp-libvips-linuxmusl-arm64":- optional: true- conditions: os=linux & cpu=arm64 & libc=musl- languageName: node- linkType: hard--"@img/sharp-linuxmusl-x64@npm:0.35.4":- version: 0.35.4- resolution: "@img/sharp-linuxmusl-x64@npm:0.35.4"- dependencies:- "@img/sharp-libvips-linuxmusl-x64": "npm:1.3.3"- dependenciesMeta:- "@img/sharp-libvips-linuxmusl-x64":- optional: true- conditions: os=linux & cpu=x64 & libc=musl- languageName: node- linkType: hard--"@img/sharp-wasm32@npm:0.35.4":- version: 0.35.4- resolution: "@img/sharp-wasm32@npm:0.35.4"- dependencies:- "@emnapi/runtime": "npm:^1.11.3"- checksum: 10c0/7f5e394f168eb2f038b8ae4949fb5434085d1db931ede2ae1389479d7a1dbe11e2fc9d58e8e9830bff744ba996256c9e411be1d466dfcbf6e1f4d153b84f25ff- languageName: node- linkType: hard--"@img/sharp-webcontainers-wasm32@npm:0.35.4":- version: 0.35.4- resolution: "@img/sharp-webcontainers-wasm32@npm:0.35.4"- dependencies:- "@img/sharp-wasm32": "npm:0.35.4"- conditions: cpu=wasm32- languageName: node- linkType: hard--"@img/sharp-win32-arm64@npm:0.35.4":- version: 0.35.4- resolution: "@img/sharp-win32-arm64@npm:0.35.4"- conditions: os=win32 & cpu=arm64- languageName: node- linkType: hard--"@img/sharp-win32-ia32@npm:0.35.4":- version: 0.35.4- resolution: "@img/sharp-win32-ia32@npm:0.35.4"- conditions: os=win32 & cpu=ia32- languageName: node- linkType: hard--"@img/sharp-win32-x64@npm:0.35.4":- version: 0.35.4- resolution: "@img/sharp-win32-x64@npm:0.35.4"- conditions: os=win32 & cpu=x64- languageName: node- linkType: hard--"@inquirer/ansi@npm:^2.0.7":- version: 2.0.7- resolution: "@inquirer/ansi@npm:2.0.7"- checksum: 10c0/a574f97a899f0d9346fa26b528b3f4a9ba6dcb9172288efb6b4314d8486470ed53d2f538200f66a25b843c6e0cbf83688c6d5174a8dc6eca853b291b09609c5a- languageName: node- linkType: hard--"@inquirer/checkbox@npm:^5.2.1":- version: 5.2.1- resolution: "@inquirer/checkbox@npm:5.2.1"- dependencies:- "@inquirer/ansi": "npm:^2.0.7"- "@inquirer/core": "npm:^11.2.1"- "@inquirer/figures": "npm:^2.0.7"- "@inquirer/type": "npm:^4.0.7"- peerDependencies:- "@types/node": ">=18"- peerDependenciesMeta:- "@types/node":- optional: true- checksum: 10c0/e3a845156c718fbbec228a0e7fd2a4f10775185615eac1f405b3a2bb2ae607dda6baf178fbd6487db0e12e5e33014536e81acefe65de57cd476a7aeaea6fb35d- languageName: node- linkType: hard--"@inquirer/confirm@npm:^6.1.1":- version: 6.1.1- resolution: "@inquirer/confirm@npm:6.1.1"- dependencies:- "@inquirer/core": "npm:^11.2.1"- "@inquirer/type": "npm:^4.0.7"- peerDependencies:- "@types/node": ">=18"- peerDependenciesMeta:- "@types/node":- optional: true- checksum: 10c0/4684406161c09327df830b4026f3165b31e13831276d215051586408ed434423263b15686393ce95a4b55058c1b7f9b08aa4b66f5ac930b47523fff75051d36f- languageName: node- linkType: hard--"@inquirer/core@npm:^11.2.1":- version: 11.2.1- resolution: "@inquirer/core@npm:11.2.1"- dependencies:- "@inquirer/ansi": "npm:^2.0.7"- "@inquirer/figures": "npm:^2.0.7"- "@inquirer/type": "npm:^4.0.7"- cli-width: "npm:^4.1.0"- fast-wrap-ansi: "npm:^0.2.0"- mute-stream: "npm:^3.0.0"- signal-exit: "npm:^4.1.0"- peerDependencies:- "@types/node": ">=18"- peerDependenciesMeta:- "@types/node":- optional: true- checksum: 10c0/b5be386cecd9e441ac2f9d3417a6ae1c4658b3ee6cdf5dae791211400f4de158851f81fca2245e2062833716f95366b9e1717770828cb7365e756c16e822f0d2- languageName: node- linkType: hard--"@inquirer/editor@npm:^5.2.2":- version: 5.2.2- resolution: "@inquirer/editor@npm:5.2.2"- dependencies:- "@inquirer/core": "npm:^11.2.1"- "@inquirer/external-editor": "npm:^3.0.3"- "@inquirer/type": "npm:^4.0.7"- peerDependencies:- "@types/node": ">=18"- peerDependenciesMeta:- "@types/node":- optional: true- checksum: 10c0/a75e7012aad3ccc3ec84893463ed689924515a6cbaee8e2a475769fb27c12bcf359fcdd5f62e92107fc4be88fd69444c15adf13071982efc140c7015a6604d9a- languageName: node- linkType: hard--"@inquirer/expand@npm:^5.1.1":- version: 5.1.1- resolution: "@inquirer/expand@npm:5.1.1"- dependencies:- "@inquirer/core": "npm:^11.2.1"- "@inquirer/type": "npm:^4.0.7"- peerDependencies:- "@types/node": ">=18"- peerDependenciesMeta:- "@types/node":- optional: true- checksum: 10c0/4de661a042147759ce351971a4f92010ab66cb76450424e7d8aec5de79b449d14e8751f54f557d0b047180bca2b76707626f4835ee46603c6200139c31b59652- languageName: node- linkType: hard--"@inquirer/external-editor@npm:^3.0.3":- version: 3.0.3- resolution: "@inquirer/external-editor@npm:3.0.3"- dependencies:- chardet: "npm:^2.1.1"- iconv-lite: "npm:^0.7.2"- peerDependencies:- "@types/node": ">=18"- peerDependenciesMeta:- "@types/node":- optional: true- checksum: 10c0/fc24ddbff15f0874db6498c16d2fe153bb19a670d83605f480486d6ff0ea872ae2f32a548fd555797989db09850fa019a6b5e49a8d40cfee0d7deacad17edc1e- languageName: node- linkType: hard--"@inquirer/figures@npm:^2.0.7":- version: 2.0.7- resolution: "@inquirer/figures@npm:2.0.7"- checksum: 10c0/e0573dc9ad25fa3628d5164745e52852d8cd832a9918605b7716df2e37a0005a0aaf40b6d81cef2ca09cb708b200e61b82d1dcd17003f572577e233c19a9ec7b- languageName: node- linkType: hard--"@inquirer/input@npm:^5.1.2":- version: 5.1.2- resolution: "@inquirer/input@npm:5.1.2"- dependencies:- "@inquirer/core": "npm:^11.2.1"- "@inquirer/type": "npm:^4.0.7"- peerDependencies:- "@types/node": ">=18"- peerDependenciesMeta:- "@types/node":- optional: true- checksum: 10c0/9c3614f8d79fc2bec07a088858a58967a162046c9292b0c6f0c6f63396cf391181cfb54bb636f5b3dce8d23924c24ee4a0310183a493c94190e4750218f3744d- languageName: node- linkType: hard--"@inquirer/number@npm:^4.1.1":- version: 4.1.1- resolution: "@inquirer/number@npm:4.1.1"- dependencies:- "@inquirer/core": "npm:^11.2.1"- "@inquirer/type": "npm:^4.0.7"- peerDependencies:- "@types/node": ">=18"- peerDependenciesMeta:- "@types/node":- optional: true- checksum: 10c0/06210dd70bf89d35242af43009b5e3f76a5f07d6275a9d842bbed61536032f5f349ecba1c20012975d7b0362deb89746d5903e90f21516da10bfd8c2055829a9- languageName: node- linkType: hard--"@inquirer/password@npm:^5.1.1":- version: 5.1.1- resolution: "@inquirer/password@npm:5.1.1"- dependencies:- "@inquirer/ansi": "npm:^2.0.7"- "@inquirer/core": "npm:^11.2.1"- "@inquirer/type": "npm:^4.0.7"- peerDependencies:- "@types/node": ">=18"- peerDependenciesMeta:- "@types/node":- optional: true- checksum: 10c0/e4cb3a53b56743808f83958a8fe85738d721599690a4bc7640eaa07fb8f4765bc6f174e40c16efcc8a5958a7169667e240714a706a36e831f9c7a6822cbe8b55- languageName: node- linkType: hard--"@inquirer/prompts@npm:^8.5.2":- version: 8.5.2- resolution: "@inquirer/prompts@npm:8.5.2"- dependencies:- "@inquirer/checkbox": "npm:^5.2.1"- "@inquirer/confirm": "npm:^6.1.1"- "@inquirer/editor": "npm:^5.2.2"- "@inquirer/expand": "npm:^5.1.1"- "@inquirer/input": "npm:^5.1.2"- "@inquirer/number": "npm:^4.1.1"- "@inquirer/password": "npm:^5.1.1"- "@inquirer/rawlist": "npm:^5.3.1"- "@inquirer/search": "npm:^4.2.1"- "@inquirer/select": "npm:^5.2.1"- peerDependencies:- "@types/node": ">=18"- peerDependenciesMeta:- "@types/node":- optional: true- checksum: 10c0/253b92e31c6a1f8f00a778eda8196bb53fc931723f7db4a03937f38ccd4d07c987766d4f60b9250b5d90bfe30b04747dfa73927a9f6fb886bd48091ccb202535- languageName: node- linkType: hard--"@inquirer/rawlist@npm:^5.3.1":- version: 5.3.1- resolution: "@inquirer/rawlist@npm:5.3.1"- dependencies:- "@inquirer/core": "npm:^11.2.1"- "@inquirer/type": "npm:^4.0.7"- peerDependencies:- "@types/node": ">=18"- peerDependenciesMeta:- "@types/node":- optional: true- checksum: 10c0/a05eb6a16633bd7b32b3b6b2c1f645e6e28d955475b21ba7222e7e66806b1be15be9f91235b2933e8d27e04fdad81ebfb2d64fc1fc0d4b8d82dcd2718817b2b9- languageName: node- linkType: hard--"@inquirer/search@npm:^4.2.1":- version: 4.2.1- resolution: "@inquirer/search@npm:4.2.1"- dependencies:- "@inquirer/core": "npm:^11.2.1"- "@inquirer/figures": "npm:^2.0.7"- "@inquirer/type": "npm:^4.0.7"- peerDependencies:- "@types/node": ">=18"- peerDependenciesMeta:- "@types/node":- optional: true- checksum: 10c0/eae9b2d524aae58266f96987696be22ad62f608661d28763c413f2560094d571a39d72a40630d2470f503ad5e6e50d8c574a653cc028bf79b51104fa91f59a67- languageName: node- linkType: hard--"@inquirer/select@npm:^5.2.1":- version: 5.2.1- resolution: "@inquirer/select@npm:5.2.1"- dependencies:- "@inquirer/ansi": "npm:^2.0.7"- "@inquirer/core": "npm:^11.2.1"- "@inquirer/figures": "npm:^2.0.7"- "@inquirer/type": "npm:^4.0.7"- peerDependencies:- "@types/node": ">=18"- peerDependenciesMeta:- "@types/node":- optional: true- checksum: 10c0/3c6d0151b5a29111254a58eaf8b93bb4c476e68b0751526d8bff61a4bea457bdbe782890ae33977c5d2015f436596b5d32a8bb0677bfdf610f5f5998e65f5a92- languageName: node- linkType: hard--"@inquirer/type@npm:^4.0.7":- version: 4.0.7- resolution: "@inquirer/type@npm:4.0.7"- peerDependencies:- "@types/node": ">=18"- peerDependenciesMeta:- "@types/node":- optional: true- checksum: 10c0/80678ac1c6e19ce309909e4a54a69adc95697ea3abc2cb92f17b1bc52f4caadbcb4003ae7339fb5a70c0d36d3bde975e1bb4450069662f41c953a0d28695bb70- languageName: node- linkType: hard--"@isaacs/fs-minipass@npm:^4.0.0":- version: 4.0.1- resolution: "@isaacs/fs-minipass@npm:4.0.1"- dependencies:- minipass: "npm:^7.0.4"- checksum: 10c0/c25b6dc1598790d5b55c0947a9b7d111cfa92594db5296c3b907e2f533c033666f692a3939eadac17b1c7c40d362d0b0635dc874cbfe3e70db7c2b07cc97a5d2- languageName: node- linkType: hard--"@jridgewell/sourcemap-codec@npm:^1.5.5":- version: 1.5.5- resolution: "@jridgewell/sourcemap-codec@npm:1.5.5"- checksum: 10c0/f9e538f302b63c0ebc06eecb1dd9918dd4289ed36147a0ddce35d6ea4d7ebbda243cda7b2213b6a5e1d8087a298d5cf630fb2bd39329cdecb82017023f6081a0- languageName: node- linkType: hard--"@napi-rs/wasm-runtime@npm:^1.1.4":- version: 1.1.5- resolution: "@napi-rs/wasm-runtime@npm:1.1.5"- dependencies:- "@tybys/wasm-util": "npm:^0.10.2"- peerDependencies:- "@emnapi/core": ^1.7.1- "@emnapi/runtime": ^1.7.1- checksum: 10c0/727f2b6ae0e68bbe5d39aeb68aa6f183314e9f03dc50bb55a962849535b2db53ecc3fbf1554d8656a54488a608df5a2634670595cf5874dc4af2ee59f817c65d- languageName: node- linkType: hard--"@oxc-project/types@npm:=0.133.0":- version: 0.133.0- resolution: "@oxc-project/types@npm:0.133.0"- checksum: 10c0/70c57ba58644f7ec217b670c301801f4d06995f4ccdba6b2bd106ea3e5ee49d616573e6ef8d55530b87571a960696543687f3850e87ad173d3f88965c30cdd63- languageName: node- linkType: hard--"@oxlint/darwin-arm64@npm:0.16.12":- version: 0.16.12- resolution: "@oxlint/darwin-arm64@npm:0.16.12"- conditions: os=darwin & cpu=arm64- languageName: node- linkType: hard--"@oxlint/darwin-x64@npm:0.16.12":- version: 0.16.12- resolution: "@oxlint/darwin-x64@npm:0.16.12"- conditions: os=darwin & cpu=x64- languageName: node- linkType: hard--"@oxlint/linux-arm64-gnu@npm:0.16.12":- version: 0.16.12- resolution: "@oxlint/linux-arm64-gnu@npm:0.16.12"- conditions: os=linux & cpu=arm64 & libc=glibc- languageName: node- linkType: hard--"@oxlint/linux-arm64-musl@npm:0.16.12":- version: 0.16.12- resolution: "@oxlint/linux-arm64-musl@npm:0.16.12"- conditions: os=linux & cpu=arm64 & libc=musl- languageName: node- linkType: hard--"@oxlint/linux-x64-gnu@npm:0.16.12":- version: 0.16.12- resolution: "@oxlint/linux-x64-gnu@npm:0.16.12"- conditions: os=linux & cpu=x64 & libc=glibc- languageName: node- linkType: hard--"@oxlint/linux-x64-musl@npm:0.16.12":- version: 0.16.12- resolution: "@oxlint/linux-x64-musl@npm:0.16.12"- conditions: os=linux & cpu=x64 & libc=musl- languageName: node- linkType: hard--"@oxlint/win32-arm64@npm:0.16.12":- version: 0.16.12- resolution: "@oxlint/win32-arm64@npm:0.16.12"- conditions: os=win32 & cpu=arm64- languageName: node- linkType: hard--"@oxlint/win32-x64@npm:0.16.12":- version: 0.16.12- resolution: "@oxlint/win32-x64@npm:0.16.12"- conditions: os=win32 & cpu=x64- languageName: node- linkType: hard--"@rolldown/binding-android-arm64@npm:1.0.3":- version: 1.0.3- resolution: "@rolldown/binding-android-arm64@npm:1.0.3"- conditions: os=android & cpu=arm64- languageName: node- linkType: hard--"@rolldown/binding-darwin-arm64@npm:1.0.3":- version: 1.0.3- resolution: "@rolldown/binding-darwin-arm64@npm:1.0.3"- conditions: os=darwin & cpu=arm64- languageName: node- linkType: hard--"@rolldown/binding-darwin-x64@npm:1.0.3":- version: 1.0.3- resolution: "@rolldown/binding-darwin-x64@npm:1.0.3"- conditions: os=darwin & cpu=x64- languageName: node- linkType: hard--"@rolldown/binding-freebsd-x64@npm:1.0.3":- version: 1.0.3- resolution: "@rolldown/binding-freebsd-x64@npm:1.0.3"- conditions: os=freebsd & cpu=x64- languageName: node- linkType: hard--"@rolldown/binding-linux-arm-gnueabihf@npm:1.0.3":- version: 1.0.3- resolution: "@rolldown/binding-linux-arm-gnueabihf@npm:1.0.3"- conditions: os=linux & cpu=arm- languageName: node- linkType: hard--"@rolldown/binding-linux-arm64-gnu@npm:1.0.3":- version: 1.0.3- resolution: "@rolldown/binding-linux-arm64-gnu@npm:1.0.3"- conditions: os=linux & cpu=arm64 & libc=glibc- languageName: node- linkType: hard--"@rolldown/binding-linux-arm64-musl@npm:1.0.3":- version: 1.0.3- resolution: "@rolldown/binding-linux-arm64-musl@npm:1.0.3"- conditions: os=linux & cpu=arm64 & libc=musl- languageName: node- linkType: hard--"@rolldown/binding-linux-ppc64-gnu@npm:1.0.3":- version: 1.0.3- resolution: "@rolldown/binding-linux-ppc64-gnu@npm:1.0.3"- conditions: os=linux & cpu=ppc64 & libc=glibc- languageName: node- linkType: hard--"@rolldown/binding-linux-s390x-gnu@npm:1.0.3":- version: 1.0.3- resolution: "@rolldown/binding-linux-s390x-gnu@npm:1.0.3"- conditions: os=linux & cpu=s390x & libc=glibc- languageName: node- linkType: hard--"@rolldown/binding-linux-x64-gnu@npm:1.0.3":- version: 1.0.3- resolution: "@rolldown/binding-linux-x64-gnu@npm:1.0.3"- conditions: os=linux & cpu=x64 & libc=glibc- languageName: node- linkType: hard--"@rolldown/binding-linux-x64-musl@npm:1.0.3":- version: 1.0.3- resolution: "@rolldown/binding-linux-x64-musl@npm:1.0.3"- conditions: os=linux & cpu=x64 & libc=musl- languageName: node- linkType: hard--"@rolldown/binding-openharmony-arm64@npm:1.0.3":- version: 1.0.3- resolution: "@rolldown/binding-openharmony-arm64@npm:1.0.3"- conditions: os=openharmony & cpu=arm64- languageName: node- linkType: hard--"@rolldown/binding-wasm32-wasi@npm:1.0.3":- version: 1.0.3- resolution: "@rolldown/binding-wasm32-wasi@npm:1.0.3"- dependencies:- "@emnapi/core": "npm:1.10.0"- "@emnapi/runtime": "npm:1.10.0"- "@napi-rs/wasm-runtime": "npm:^1.1.4"- conditions: cpu=wasm32- languageName: node- linkType: hard--"@rolldown/binding-win32-arm64-msvc@npm:1.0.3":- version: 1.0.3- resolution: "@rolldown/binding-win32-arm64-msvc@npm:1.0.3"- conditions: os=win32 & cpu=arm64- languageName: node- linkType: hard--"@rolldown/binding-win32-x64-msvc@npm:1.0.3":- version: 1.0.3- resolution: "@rolldown/binding-win32-x64-msvc@npm:1.0.3"- conditions: os=win32 & cpu=x64- languageName: node- linkType: hard--"@rolldown/pluginutils@npm:^1.0.0":- version: 1.0.1- resolution: "@rolldown/pluginutils@npm:1.0.1"- checksum: 10c0/99d9b06d90196823e4d8c841f258db7a16e5dbba5824a2962b05d907b79f1ba929d56f22dd744fd530936e568c865ee56a719dc31e57e13bc0a8eb4764a8d8dd- languageName: node- linkType: hard--"@sniptt/guards@npm:^0.2.0":- version: 0.2.0- resolution: "@sniptt/guards@npm:0.2.0"- checksum: 10c0/749bb0f550d1ddd4abdb23dc1076cba26e977659922b73d000bceeb253c09270aaced0d18e92f09d4ce2fdaae33e55f60f2142f5359bc90ba505422af0873526- languageName: node- linkType: hard--"@standard-schema/spec@npm:^1.1.0":- version: 1.1.0- resolution: "@standard-schema/spec@npm:1.1.0"- checksum: 10c0/d90f55acde4b2deb983529c87e8025fa693de1a5e8b49ecc6eb84d1fd96328add0e03d7d551442156c7432fd78165b2c26ff561b970a9a881f046abb78d6a526- languageName: node- linkType: hard--"@tybys/wasm-util@npm:^0.10.2":- version: 0.10.2- resolution: "@tybys/wasm-util@npm:0.10.2"- dependencies:- tslib: "npm:^2.4.0"- checksum: 10c0/26165bcd1fd7269f42d7fbe3de318f854a8968de8397e89fc9a423bb3e2da35a52150f382e6323b3367595beb16d9800a6f35971a5599daf76da1742ec3afc25- languageName: node- linkType: hard--"@types/chai@npm:^5.2.2":- version: 5.2.3- resolution: "@types/chai@npm:5.2.3"- dependencies:- "@types/deep-eql": "npm:*"- assertion-error: "npm:^2.0.1"- checksum: 10c0/e0ef1de3b6f8045a5e473e867c8565788c444271409d155588504840ad1a53611011f85072188c2833941189400228c1745d78323dac13fcede9c2b28bacfb2f- languageName: node- linkType: hard--"@types/debug@npm:^4.0.0":- version: 4.1.13- resolution: "@types/debug@npm:4.1.13"- dependencies:- "@types/ms": "npm:*"- checksum: 10c0/e5e124021bbdb23a82727eee0a726ae0fc8a3ae1f57253cbcc47497f259afb357de7f6941375e773e1abbfa1604c1555b901a409d762ec2bb4c1612131d4afb7- languageName: node- linkType: hard--"@types/deep-eql@npm:*":- version: 4.0.2- resolution: "@types/deep-eql@npm:4.0.2"- checksum: 10c0/bf3f811843117900d7084b9d0c852da9a044d12eb40e6de73b552598a6843c21291a8a381b0532644574beecd5e3491c5ff3a0365ab86b15d59862c025384844- languageName: node- linkType: hard--"@types/estree-jsx@npm:^1.0.0":- version: 1.0.5- resolution: "@types/estree-jsx@npm:1.0.5"- dependencies:- "@types/estree": "npm:*"- checksum: 10c0/07b354331516428b27a3ab99ee397547d47eb223c34053b48f84872fafb841770834b90cc1a0068398e7c7ccb15ec51ab00ec64b31dc5e3dbefd624638a35c6d- languageName: node- linkType: hard--"@types/estree@npm:*, @types/estree@npm:^1.0.0":- version: 1.0.9- resolution: "@types/estree@npm:1.0.9"- checksum: 10c0/3ad3286ca2988cd550dafb8f2ad599c8474868e954fa601a36655bdfefd8039f7c714b8c1c7f2ae219ffbd58bd4660e66fa7479a0120fc02d4777057d4865387- languageName: node- linkType: hard--"@types/hast@npm:^3.0.0":- version: 3.0.5- resolution: "@types/hast@npm:3.0.5"- dependencies:- "@types/unist": "npm:*"- checksum: 10c0/f3af8594a6903a507ed191eda944af18099198d6708c29102ae17118c3e20779f6929e91ed37e033541fd28d58055d8a5910a4366dbdf976cf81b13a464741fb- languageName: node- linkType: hard--"@types/mdast@npm:^4.0.0":- version: 4.0.4- resolution: "@types/mdast@npm:4.0.4"- dependencies:- "@types/unist": "npm:*"- checksum: 10c0/84f403dbe582ee508fd9c7643ac781ad8597fcbfc9ccb8d4715a2c92e4545e5772cbd0dbdf18eda65789386d81b009967fdef01b24faf6640f817287f54d9c82- languageName: node- linkType: hard--"@types/ms@npm:*":- version: 2.1.0- resolution: "@types/ms@npm:2.1.0"- checksum: 10c0/5ce692ffe1549e1b827d99ef8ff71187457e0eb44adbae38fdf7b9a74bae8d20642ee963c14516db1d35fa2652e65f47680fdf679dcbde52bbfadd021f497225- languageName: node- linkType: hard--"@types/node@npm:*":- version: 25.8.0- resolution: "@types/node@npm:25.8.0"- dependencies:- undici-types: "npm:>=7.24.0 <7.24.7"- checksum: 10c0/ff53e5428309d2e6060190ec5e02afd0e4a7369456b16130a7f5898f12a6ad0efd62d752830f2f7355d714ae429bc0acbb2dc0cbf761cadb03e88c4996cdf1dc- languageName: node- linkType: hard--"@types/node@npm:^24.7.2":- version: 24.12.4- resolution: "@types/node@npm:24.12.4"- dependencies:- undici-types: "npm:~7.16.0"- checksum: 10c0/d2c36b78b6050d8677769fa05a32243061675e81ddc2bb43955d91a671af3465506ef2731a24c0c9ab42b6b679bd5c1513de45bbe9ea278c2c07ee63b564b61b- languageName: node- linkType: hard--"@types/qs@npm:^6.9.0":- version: 6.15.1- resolution: "@types/qs@npm:6.15.1"- checksum: 10c0/1dfdbcb4cf2a8f66d57f0b9a9fe6b1c7091cb816687b6698c1351eaf31f62e412cea9b7453a9637b570cd5fad8dced527e5a9e69b4fcc6e318daacd8b749f094- languageName: node- linkType: hard--"@types/react-dom@npm:^19":- version: 19.2.3- resolution: "@types/react-dom@npm:19.2.3"- peerDependencies:- "@types/react": ^19.2.0- checksum: 10c0/b486ebe0f4e2fb35e2e108df1d8fc0927ca5d6002d5771e8a739de11239fe62d0e207c50886185253c99eb9dedfeeb956ea7429e5ba17f6693c7acb4c02f8cd1- languageName: node- linkType: hard--"@types/react@npm:^19.0.0":- version: 19.2.14- resolution: "@types/react@npm:19.2.14"- dependencies:- csstype: "npm:^3.2.2"- checksum: 10c0/7d25bf41b57719452d86d2ac0570b659210402707313a36ee612666bf11275a1c69824f8c3ee1fdca077ccfe15452f6da8f1224529b917050eb2d861e52b59b7- languageName: node- linkType: hard--"@types/unist@npm:*, @types/unist@npm:^3.0.0":- version: 3.0.3- resolution: "@types/unist@npm:3.0.3"- checksum: 10c0/2b1e4adcab78388e088fcc3c0ae8700f76619dbcb4741d7d201f87e2cb346bfc29a89003cfea2d76c996e1061452e14fcd737e8b25aacf949c1f2d6b2bc3dd60- languageName: node- linkType: hard--"@types/unist@npm:^2.0.0":- version: 2.0.11- resolution: "@types/unist@npm:2.0.11"- checksum: 10c0/24dcdf25a168f453bb70298145eb043cfdbb82472db0bc0b56d6d51cd2e484b9ed8271d4ac93000a80da568f2402e9339723db262d0869e2bf13bc58e081768d- languageName: node- linkType: hard--"@types/ws@npm:^6.0.1":- version: 6.0.4- resolution: "@types/ws@npm:6.0.4"- dependencies:- "@types/node": "npm:*"- checksum: 10c0/fa958e64596ca9487c3ed6012834de70b47f25d971f1950cfb8e6a99cb77ff340ae82ac7627744e01b58010674ef8ede07d5a2ac29ca9ad0d67a430fcc69ae14- languageName: node- linkType: hard--"@ungap/structured-clone@npm:^1.0.0":- version: 1.3.3- resolution: "@ungap/structured-clone@npm:1.3.3"- checksum: 10c0/b199e280ee06e9c447e0ccd38df60a65c2b2c13d3c77af50b1e6d77230aee1ea7da309d7b80c5a4850c8e22e4eee9e4b2813c6a33f8c360560d7f2e99a9f6e8f- languageName: node- linkType: hard--"@vitest/expect@npm:4.1.11":- version: 4.1.11- resolution: "@vitest/expect@npm:4.1.11"- dependencies:- "@standard-schema/spec": "npm:^1.1.0"- "@types/chai": "npm:^5.2.2"- "@vitest/spy": "npm:4.1.11"- "@vitest/utils": "npm:4.1.11"- chai: "npm:^6.2.2"- tinyrainbow: "npm:^3.1.0"- checksum: 10c0/0aa5e0973aca93a58cbdc3041c6bfed5897e976124965203b96a23b811f4ca403590c7eb15802c8d8366ec27a1db0682451e8a91c4d06617636de262baf86e4b- languageName: node- linkType: hard--"@vitest/mocker@npm:4.1.11":- version: 4.1.11- resolution: "@vitest/mocker@npm:4.1.11"- dependencies:- "@vitest/spy": "npm:4.1.11"- estree-walker: "npm:^3.0.3"- magic-string: "npm:^0.30.21"- peerDependencies:- msw: ^2.4.9- vite: ^6.0.0 || ^7.0.0 || ^8.0.0- peerDependenciesMeta:- msw:- optional: true- vite:- optional: true- checksum: 10c0/3111ea34bd5046f6c70bbd67cf8b89608ee8c41cb27ab2bd61d42f4b68810e9ea16a9a757a71bc254c105f73b407d00ebb6bab1ab0f7f5cdcc9d7d16602a3933- languageName: node- linkType: hard--"@vitest/pretty-format@npm:4.1.11":- version: 4.1.11- resolution: "@vitest/pretty-format@npm:4.1.11"- dependencies:- tinyrainbow: "npm:^3.1.0"- checksum: 10c0/ad32525c73807c0b72f38dc29bc51fd5a17879dc650f37995a9c5adbb8526e15f787691f76aa8768448ec7ed5bf5ba2b12329eac8fda1428b4d6b8c036390f71- languageName: node- linkType: hard--"@vitest/runner@npm:4.1.11":- version: 4.1.11- resolution: "@vitest/runner@npm:4.1.11"- dependencies:- "@vitest/utils": "npm:4.1.11"- pathe: "npm:^2.0.3"- checksum: 10c0/3c782b055e9e688e1785f7c8937bd1669bad1b0e5758cb8b844f918f30a324b1d21e174d46c941ce80ebf37f2b89b55b6d619a675025914a1ece6377b95909e2- languageName: node- linkType: hard--"@vitest/snapshot@npm:4.1.11":- version: 4.1.11- resolution: "@vitest/snapshot@npm:4.1.11"- dependencies:- "@vitest/pretty-format": "npm:4.1.11"- "@vitest/utils": "npm:4.1.11"- magic-string: "npm:^0.30.21"- pathe: "npm:^2.0.3"- checksum: 10c0/35d82a7c2a3e4b57529c30387d568d9106b6bf960189214e5d8cb1f5288cb042305c2e5c7b0b2f8cb56a2c814973de0310bc56d72deb79427bea272b6224190c- languageName: node- linkType: hard--"@vitest/spy@npm:4.1.11":- version: 4.1.11- resolution: "@vitest/spy@npm:4.1.11"- checksum: 10c0/06c68247a8efd21006abe7532fee17f30ba83c8cda3e0b952ef89e278d58058f4b1de69b6bbaa2ed614c568bf4f5769fcc76be42802dedf2bcdd9c0aae601740- languageName: node- linkType: hard--"@vitest/utils@npm:4.1.11":- version: 4.1.11- resolution: "@vitest/utils@npm:4.1.11"- dependencies:- "@vitest/pretty-format": "npm:4.1.11"- convert-source-map: "npm:^2.0.0"- tinyrainbow: "npm:^3.1.0"- checksum: 10c0/a2c1ddc64333458c3e031465c1ee0440a7660fd1b298c54ccbf865ef1e5cf3ebdd6c5c75a5ea235d8a672498b394e7121f992b096f021f45014ab25e9abd1b52- languageName: node- linkType: hard--"abbrev@npm:^4.0.0":- version: 4.0.0- resolution: "abbrev@npm:4.0.0"- checksum: 10c0/b4cc16935235e80702fc90192e349e32f8ef0ed151ef506aa78c81a7c455ec18375c4125414b99f84b2e055199d66383e787675f0bcd87da7a4dbd59f9eac1d5- languageName: node- linkType: hard--"agent-base@npm:6":- version: 6.0.2- resolution: "agent-base@npm:6.0.2"- dependencies:- debug: "npm:4"- checksum: 10c0/dc4f757e40b5f3e3d674bc9beb4f1048f4ee83af189bae39be99f57bf1f48dde166a8b0a5342a84b5944ee8e6ed1e5a9d801858f4ad44764e84957122fe46261- languageName: node- linkType: hard--"ansi-escapes@npm:^7.3.0":- version: 7.3.0- resolution: "ansi-escapes@npm:7.3.0"- dependencies:- environment: "npm:^1.0.0"- checksum: 10c0/068961d99f0ef28b661a4a9f84a5d645df93ccf3b9b93816cc7d46bbe1913321d4cdf156bb842a4e1e4583b7375c631fa963efb43001c4eb7ff9ab8f78fc0679- languageName: node- linkType: hard--"ansi-regex@npm:^6.2.2":- version: 6.2.2- resolution: "ansi-regex@npm:6.2.2"- checksum: 10c0/05d4acb1d2f59ab2cf4b794339c7b168890d44dda4bf0ce01152a8da0213aca207802f930442ce8cd22d7a92f44907664aac6508904e75e038fa944d2601b30f- languageName: node- linkType: hard--"ansi-styles@npm:^6.2.1, ansi-styles@npm:^6.2.3":- version: 6.2.3- resolution: "ansi-styles@npm:6.2.3"- checksum: 10c0/23b8a4ce14e18fb854693b95351e286b771d23d8844057ed2e7d083cd3e708376c3323707ec6a24365f7d7eda3ca00327fe04092e29e551499ec4c8b7bfac868- languageName: node- linkType: hard--"assertion-error@npm:^2.0.1":- version: 2.0.1- resolution: "assertion-error@npm:2.0.1"- checksum: 10c0/bbbcb117ac6480138f8c93cf7f535614282dea9dc828f540cdece85e3c665e8f78958b96afac52f29ff883c72638e6a87d469ecc9fe5bc902df03ed24a55dba8- languageName: node- linkType: hard--"async-function@npm:^1.0.0":- version: 1.0.0- resolution: "async-function@npm:1.0.0"- checksum: 10c0/669a32c2cb7e45091330c680e92eaeb791bc1d4132d827591e499cd1f776ff5a873e77e5f92d0ce795a8d60f10761dec9ddfe7225a5de680f5d357f67b1aac73- languageName: node- linkType: hard--"async-generator-function@npm:^1.0.0":- version: 1.0.0- resolution: "async-generator-function@npm:1.0.0"- checksum: 10c0/2c50ef856c543ad500d8d8777d347e3c1ba623b93e99c9263ecc5f965c1b12d2a140e2ab6e43c3d0b85366110696f28114649411cbcd10b452a92a2318394186- languageName: node- linkType: hard--"async-limiter@npm:~1.0.0":- version: 1.0.1- resolution: "async-limiter@npm:1.0.1"- checksum: 10c0/0693d378cfe86842a70d4c849595a0bb50dc44c11649640ca982fa90cbfc74e3cc4753b5a0847e51933f2e9c65ce8e05576e75e5e1fd963a086e673735b35969- languageName: node- linkType: hard--"asynckit@npm:^0.4.0":- version: 0.4.0- resolution: "asynckit@npm:0.4.0"- checksum: 10c0/d73e2ddf20c4eb9337e1b3df1a0f6159481050a5de457c55b14ea2e5cb6d90bb69e004c9af54737a5ee0917fcf2c9e25de67777bbe58261847846066ba75bc9d- languageName: node- linkType: hard--"auto-bind@npm:^5.0.1":- version: 5.0.1- resolution: "auto-bind@npm:5.0.1"- checksum: 10c0/a703375350ea7b6e92405d8e6bcc6dbfb84b0d7c7172b33e5788a7593929a18227999ff9aa9c32436741d06d021e6672457b1cec73287efe3fab95cff6627eaf- languageName: node- linkType: hard--"axios@npm:^1.16.0":- version: 1.18.1- resolution: "axios@npm:1.18.1"- dependencies:- follow-redirects: "npm:^1.16.0"- form-data: "npm:^4.0.5"- https-proxy-agent: "npm:^5.0.1"- proxy-from-env: "npm:^2.1.0"- checksum: 10c0/9d9378a3af0d0ad730a52ad9d15ec7201f3926ad6e7e8bbffc5ae21ca2835ad11d1d9598698f5dd9718917486039f55ea1d7dc23d8e44fa827a55cc3262c02fc- languageName: node- linkType: hard--"backo2@npm:^1.0.2":- version: 1.0.2- resolution: "backo2@npm:1.0.2"- checksum: 10c0/a9e825a6a38a6d1c4a94476eabc13d6127dfaafb0967baf104affbb67806ae26abbb58dab8d572d2cd21ef06634ff57c3ad48dff14b904e18de1474cc2f22bf3- languageName: node- linkType: hard--"bail@npm:^2.0.0":- version: 2.0.2- resolution: "bail@npm:2.0.2"- checksum: 10c0/25cbea309ef6a1f56214187004e8f34014eb015713ea01fa5b9b7e9e776ca88d0fdffd64143ac42dc91966c915a4b7b683411b56e14929fad16153fc026ffb8b- languageName: node- linkType: hard--"call-bind-apply-helpers@npm:^1.0.1, call-bind-apply-helpers@npm:^1.0.2":- version: 1.0.2- resolution: "call-bind-apply-helpers@npm:1.0.2"- dependencies:- es-errors: "npm:^1.3.0"- function-bind: "npm:^1.1.2"- checksum: 10c0/47bd9901d57b857590431243fea704ff18078b16890a6b3e021e12d279bbf211d039155e27d7566b374d49ee1f8189344bac9833dec7a20cdec370506361c938- languageName: node- linkType: hard--"ccount@npm:^2.0.0":- version: 2.0.1- resolution: "ccount@npm:2.0.1"- checksum: 10c0/3939b1664390174484322bc3f45b798462e6c07ee6384cb3d645e0aa2f318502d174845198c1561930e1d431087f74cf1fe291ae9a4722821a9f4ba67e574350- languageName: node- linkType: hard--"chai@npm:^6.2.2":- version: 6.2.2- resolution: "chai@npm:6.2.2"- checksum: 10c0/e6c69e5f0c11dffe6ea13d0290936ebb68fcc1ad688b8e952e131df6a6d5797d5e860bc55cef1aca2e950c3e1f96daf79e9d5a70fb7dbaab4e46355e2635ed53- languageName: node- linkType: hard--"chalk@npm:^5.3.0, chalk@npm:^5.6.0":- version: 5.6.2- resolution: "chalk@npm:5.6.2"- checksum: 10c0/99a4b0f0e7991796b1e7e3f52dceb9137cae2a9dfc8fc0784a550dc4c558e15ab32ed70b14b21b52beb2679b4892b41a0aa44249bcb996f01e125d58477c6976- languageName: node- linkType: hard--"character-entities-html4@npm:^2.0.0":- version: 2.1.0- resolution: "character-entities-html4@npm:2.1.0"- checksum: 10c0/fe61b553f083400c20c0b0fd65095df30a0b445d960f3bbf271536ae6c3ba676f39cb7af0b4bf2755812f08ab9b88f2feed68f9aebb73bb153f7a115fe5c6e40- languageName: node- linkType: hard--"character-entities-legacy@npm:^3.0.0":- version: 3.0.0- resolution: "character-entities-legacy@npm:3.0.0"- checksum: 10c0/ec4b430af873661aa754a896a2b55af089b4e938d3d010fad5219299a6b6d32ab175142699ee250640678cd64bdecd6db3c9af0b8759ab7b155d970d84c4c7d1- languageName: node- linkType: hard--"character-entities@npm:^2.0.0":- version: 2.0.2- resolution: "character-entities@npm:2.0.2"- checksum: 10c0/b0c645a45bcc90ff24f0e0140f4875a8436b8ef13b6bcd31ec02cfb2ca502b680362aa95386f7815bdc04b6464d48cf191210b3840d7c04241a149ede591a308- languageName: node- linkType: hard--"character-reference-invalid@npm:^2.0.0":- version: 2.0.1- resolution: "character-reference-invalid@npm:2.0.1"- checksum: 10c0/2ae0dec770cd8659d7e8b0ce24392d83b4c2f0eb4a3395c955dce5528edd4cc030a794cfa06600fcdd700b3f2de2f9b8e40e309c0011c4180e3be64a0b42e6a1- languageName: node- linkType: hard--"chardet@npm:^2.1.1":- version: 2.1.1- resolution: "chardet@npm:2.1.1"- checksum: 10c0/d8391dd412338442b3de0d3a488aa9327f8bcf74b62b8723d6bd0b85c4084d50b731320e0a7c710edb1d44de75969995d2784b80e4c13b004a6c7a0db4c6e793- languageName: node- linkType: hard--"chokidar@npm:^4.0.0":- version: 4.0.3- resolution: "chokidar@npm:4.0.3"- dependencies:- readdirp: "npm:^4.0.1"- checksum: 10c0/a58b9df05bb452f7d105d9e7229ac82fa873741c0c40ddcc7bb82f8a909fbe3f7814c9ebe9bc9a2bef9b737c0ec6e2d699d179048ef06ad3ec46315df0ebe6ad- languageName: node- linkType: hard--"chownr@npm:^3.0.0":- version: 3.0.0- resolution: "chownr@npm:3.0.0"- checksum: 10c0/43925b87700f7e3893296c8e9c56cc58f926411cce3a6e5898136daaf08f08b9a8eb76d37d3267e707d0dcc17aed2e2ebdf5848c0c3ce95cf910a919935c1b10- languageName: node- linkType: hard--"cli-boxes@npm:^3.0.0":- version: 3.0.0- resolution: "cli-boxes@npm:3.0.0"- checksum: 10c0/4db3e8fbfaf1aac4fb3a6cbe5a2d3fa048bee741a45371b906439b9ffc821c6e626b0f108bdcd3ddf126a4a319409aedcf39a0730573ff050fdd7b6731e99fb9- languageName: node- linkType: hard--"cli-cursor@npm:^4.0.0":- version: 4.0.0- resolution: "cli-cursor@npm:4.0.0"- dependencies:- restore-cursor: "npm:^4.0.0"- checksum: 10c0/e776e8c3c6727300d0539b0d25160b2bb56aed1a63942753ba1826b012f337a6f4b7ace3548402e4f2f13b5e16bfd751be672c44b203205e7eca8be94afec42c- languageName: node- linkType: hard--"cli-truncate@npm:^5.1.1":- version: 5.2.0- resolution: "cli-truncate@npm:5.2.0"- dependencies:- slice-ansi: "npm:^8.0.0"- string-width: "npm:^8.2.0"- checksum: 10c0/0d4ec94702ca85b64522ac93633837fb5ea7db17b79b1322a60f6045e6ae2b8cd7bd4c1d19ac7d1f9e10e3bbda1112e172e439b68c02b785ee00da8d6a5c5471- languageName: node- linkType: hard--"cli-width@npm:^4.1.0":- version: 4.1.0- resolution: "cli-width@npm:4.1.0"- checksum: 10c0/1fbd56413578f6117abcaf858903ba1f4ad78370a4032f916745fa2c7e390183a9d9029cf837df320b0fdce8137668e522f60a30a5f3d6529ff3872d265a955f- languageName: node- linkType: hard--"code-excerpt@npm:^4.0.0":- version: 4.0.0- resolution: "code-excerpt@npm:4.0.0"- dependencies:- convert-to-spaces: "npm:^2.0.1"- checksum: 10c0/b6c5a06e039cecd2ab6a0e10ee0831de8362107d1f298ca3558b5f9004cb8e0260b02dd6c07f57b9a0e346c76864d2873311ee1989809fdeb05bd5fbbadde773- languageName: node- linkType: hard--"combined-stream@npm:^1.0.8":- version: 1.0.8- resolution: "combined-stream@npm:1.0.8"- dependencies:- delayed-stream: "npm:~1.0.0"- checksum: 10c0/0dbb829577e1b1e839fa82b40c07ffaf7de8a09b935cadd355a73652ae70a88b4320db322f6634a4ad93424292fa80973ac6480986247f1734a1137debf271d5- languageName: node- linkType: hard--"comma-separated-tokens@npm:^2.0.0":- version: 2.0.3- resolution: "comma-separated-tokens@npm:2.0.3"- checksum: 10c0/91f90f1aae320f1755d6957ef0b864fe4f54737f3313bd95e0802686ee2ca38bff1dd381964d00ae5db42912dd1f4ae5c2709644e82706ffc6f6842a813cdd67- languageName: node- linkType: hard--"commander@npm:^12.0.0":- version: 12.1.0- resolution: "commander@npm:12.1.0"- checksum: 10c0/6e1996680c083b3b897bfc1cfe1c58dfbcd9842fd43e1aaf8a795fbc237f65efcc860a3ef457b318e73f29a4f4a28f6403c3d653d021d960e4632dd45bde54a9- languageName: node- linkType: hard--"convert-source-map@npm:^2.0.0":- version: 2.0.0- resolution: "convert-source-map@npm:2.0.0"- checksum: 10c0/8f2f7a27a1a011cc6cc88cc4da2d7d0cfa5ee0369508baae3d98c260bb3ac520691464e5bbe4ae7cdf09860c1d69ecc6f70c63c6e7c7f7e3f18ec08484dc7d9b- languageName: node- linkType: hard--"convert-to-spaces@npm:^2.0.1":- version: 2.0.1- resolution: "convert-to-spaces@npm:2.0.1"- checksum: 10c0/d90aa0e3b6a27f9d5265a8d32def3c5c855b3e823a9db1f26d772f8146d6b91020a2fdfd905ce8048a73fad3aaf836fef8188c67602c374405e2ae8396c4ac46- languageName: node- linkType: hard--"csstype@npm:^3.2.2":- version: 3.2.3- resolution: "csstype@npm:3.2.3"- checksum: 10c0/cd29c51e70fa822f1cecd8641a1445bed7063697469d35633b516e60fe8c1bde04b08f6c5b6022136bb669b64c63d4173af54864510fbb4ee23281801841a3ce- languageName: node- linkType: hard--"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.1":- version: 4.4.3- resolution: "debug@npm:4.4.3"- dependencies:- ms: "npm:^2.1.3"- peerDependenciesMeta:- supports-color:- optional: true- checksum: 10c0/d79136ec6c83ecbefd0f6a5593da6a9c91ec4d7ddc4b54c883d6e71ec9accb5f67a1a5e96d00a328196b5b5c86d365e98d8a3a70856aaf16b4e7b1985e67f5a6- languageName: node- linkType: hard--"decode-named-character-reference@npm:^1.0.0":- version: 1.3.0- resolution: "decode-named-character-reference@npm:1.3.0"- dependencies:- character-entities: "npm:^2.0.0"- checksum: 10c0/787f4c87f3b82ea342aa7c2d7b1882b6fb9511bb77f72ae44dcaabea0470bacd1e9c6a0080ab886545019fa0cb3a7109573fad6b61a362844c3a0ac52b36e4bb- languageName: node- linkType: hard--"delayed-stream@npm:~1.0.0":- version: 1.0.0- resolution: "delayed-stream@npm:1.0.0"- checksum: 10c0/d758899da03392e6712f042bec80aa293bbe9e9ff1b2634baae6a360113e708b91326594c8a486d475c69d6259afb7efacdc3537bfcda1c6c648e390ce601b19- languageName: node- linkType: hard--"dequal@npm:^2.0.0":- version: 2.0.3- resolution: "dequal@npm:2.0.3"- checksum: 10c0/f98860cdf58b64991ae10205137c0e97d384c3a4edc7f807603887b7c4b850af1224a33d88012009f150861cbee4fa2d322c4cc04b9313bee312e47f6ecaa888- languageName: node- linkType: hard--"detect-libc@npm:^2.0.3, detect-libc@npm:^2.1.2":- version: 2.1.2- resolution: "detect-libc@npm:2.1.2"- checksum: 10c0/acc675c29a5649fa1fb6e255f993b8ee829e510b6b56b0910666949c80c364738833417d0edb5f90e4e46be17228b0f2b66a010513984e18b15deeeac49369c4- languageName: node- linkType: hard--"devlop@npm:^1.0.0, devlop@npm:^1.1.0":- version: 1.1.0- resolution: "devlop@npm:1.1.0"- dependencies:- dequal: "npm:^2.0.0"- checksum: 10c0/e0928ab8f94c59417a2b8389c45c55ce0a02d9ac7fd74ef62d01ba48060129e1d594501b77de01f3eeafc7cb00773819b0df74d96251cf20b31c5b3071f45c0e- languageName: node- linkType: hard--"dotenv@npm:^16.0.0":- version: 16.6.1- resolution: "dotenv@npm:16.6.1"- checksum: 10c0/15ce56608326ea0d1d9414a5c8ee6dcf0fffc79d2c16422b4ac2268e7e2d76ff5a572d37ffe747c377de12005f14b3cc22361e79fc7f1061cce81f77d2c973dc- languageName: node- linkType: hard--"dunder-proto@npm:^1.0.1":- version: 1.0.1- resolution: "dunder-proto@npm:1.0.1"- dependencies:- call-bind-apply-helpers: "npm:^1.0.1"- es-errors: "npm:^1.3.0"- gopd: "npm:^1.2.0"- checksum: 10c0/199f2a0c1c16593ca0a145dbf76a962f8033ce3129f01284d48c45ed4e14fea9bbacd7b3610b6cdc33486cef20385ac054948fefc6272fcce645c09468f93031- languageName: node- linkType: hard--"emoji-regex@npm:^10.3.0":- version: 10.6.0- resolution: "emoji-regex@npm:10.6.0"- checksum: 10c0/1e4aa097bb007301c3b4b1913879ae27327fdc48e93eeefefe3b87e495eb33c5af155300be951b4349ff6ac084f4403dc9eff970acba7c1c572d89396a9a32d7- languageName: node- linkType: hard--"env-paths@npm:^2.2.0":- version: 2.2.1- resolution: "env-paths@npm:2.2.1"- checksum: 10c0/285325677bf00e30845e330eec32894f5105529db97496ee3f598478e50f008c5352a41a30e5e72ec9de8a542b5a570b85699cd63bd2bc646dbcb9f311d83bc4- languageName: node- linkType: hard--"environment@npm:^1.0.0":- version: 1.1.0- resolution: "environment@npm:1.1.0"- checksum: 10c0/fb26434b0b581ab397039e51ff3c92b34924a98b2039dcb47e41b7bca577b9dbf134a8eadb364415c74464b682e2d3afe1a4c0eb9873dc44ea814c5d3103331d- languageName: node- linkType: hard--"es-define-property@npm:^1.0.1":- version: 1.0.1- resolution: "es-define-property@npm:1.0.1"- checksum: 10c0/3f54eb49c16c18707949ff25a1456728c883e81259f045003499efba399c08bad00deebf65cccde8c0e07908c1a225c9d472b7107e558f2a48e28d530e34527c- languageName: node- linkType: hard--"es-errors@npm:^1.3.0":- version: 1.3.0- resolution: "es-errors@npm:1.3.0"- checksum: 10c0/0a61325670072f98d8ae3b914edab3559b6caa980f08054a3b872052640d91da01d38df55df797fcc916389d77fc92b8d5906cf028f4db46d7e3003abecbca85- languageName: node- linkType: hard--"es-module-lexer@npm:^2.0.0":- version: 2.1.0- resolution: "es-module-lexer@npm:2.1.0"- checksum: 10c0/93bcf2454fa72d67fe3ccd0abef8ce7933f5840a319513418a643dd8e9c6aa8f49709cecfae02ded722805dd327232d30723a807cc52e6809d6ac697c62c29fb- languageName: node- linkType: hard--"es-object-atoms@npm:^1.0.0, es-object-atoms@npm:^1.1.1":- version: 1.1.1- resolution: "es-object-atoms@npm:1.1.1"- dependencies:- es-errors: "npm:^1.3.0"- checksum: 10c0/65364812ca4daf48eb76e2a3b7a89b3f6a2e62a1c420766ce9f692665a29d94fe41fe88b65f24106f449859549711e4b40d9fb8002d862dfd7eb1c512d10be0c- languageName: node- linkType: hard--"es-set-tostringtag@npm:^2.1.0":- version: 2.1.0- resolution: "es-set-tostringtag@npm:2.1.0"- dependencies:- es-errors: "npm:^1.3.0"- get-intrinsic: "npm:^1.2.6"- has-tostringtag: "npm:^1.0.2"- hasown: "npm:^2.0.2"- checksum: 10c0/ef2ca9ce49afe3931cb32e35da4dcb6d86ab02592cfc2ce3e49ced199d9d0bb5085fc7e73e06312213765f5efa47cc1df553a6a5154584b21448e9fb8355b1af- languageName: node- linkType: hard--"es-toolkit@npm:^1.39.10":- version: 1.46.1- resolution: "es-toolkit@npm:1.46.1"- dependenciesMeta:- "@trivago/[email protected]":- unplugged: true- unplugged: true- checksum: 10c0/6a4c3dd0ddc2138fa13d983d93ebaf8061759c52c2cf7c3101315139fc1fca826d253daa67fe85ad880c03cc4c092bd53a83a7cbf58b4721c251479122ba5303- languageName: node- linkType: hard--"esbuild@npm:^0.28.1, esbuild@npm:~0.28.0":- version: 0.28.1- resolution: "esbuild@npm:0.28.1"- dependencies:- "@esbuild/aix-ppc64": "npm:0.28.1"- "@esbuild/android-arm": "npm:0.28.1"- "@esbuild/android-arm64": "npm:0.28.1"- "@esbuild/android-x64": "npm:0.28.1"- "@esbuild/darwin-arm64": "npm:0.28.1"- "@esbuild/darwin-x64": "npm:0.28.1"- "@esbuild/freebsd-arm64": "npm:0.28.1"- "@esbuild/freebsd-x64": "npm:0.28.1"- "@esbuild/linux-arm": "npm:0.28.1"- "@esbuild/linux-arm64": "npm:0.28.1"- "@esbuild/linux-ia32": "npm:0.28.1"- "@esbuild/linux-loong64": "npm:0.28.1"- "@esbuild/linux-mips64el": "npm:0.28.1"- "@esbuild/linux-ppc64": "npm:0.28.1"- "@esbuild/linux-riscv64": "npm:0.28.1"- "@esbuild/linux-s390x": "npm:0.28.1"- "@esbuild/linux-x64": "npm:0.28.1"- "@esbuild/netbsd-arm64": "npm:0.28.1"- "@esbuild/netbsd-x64": "npm:0.28.1"- "@esbuild/openbsd-arm64": "npm:0.28.1"- "@esbuild/openbsd-x64": "npm:0.28.1"- "@esbuild/openharmony-arm64": "npm:0.28.1"- "@esbuild/sunos-x64": "npm:0.28.1"- "@esbuild/win32-arm64": "npm:0.28.1"- "@esbuild/win32-ia32": "npm:0.28.1"- "@esbuild/win32-x64": "npm:0.28.1"- dependenciesMeta:- "@esbuild/aix-ppc64":- optional: true- "@esbuild/android-arm":- optional: true- "@esbuild/android-arm64":- optional: true- "@esbuild/android-x64":- optional: true- "@esbuild/darwin-arm64":- optional: true- "@esbuild/darwin-x64":- optional: true- "@esbuild/freebsd-arm64":- optional: true- "@esbuild/freebsd-x64":- optional: true- "@esbuild/linux-arm":- optional: true- "@esbuild/linux-arm64":- optional: true- "@esbuild/linux-ia32":- optional: true- "@esbuild/linux-loong64":- optional: true- "@esbuild/linux-mips64el":- optional: true- "@esbuild/linux-ppc64":- optional: true- "@esbuild/linux-riscv64":- optional: true- "@esbuild/linux-s390x":- optional: true- "@esbuild/linux-x64":- optional: true- "@esbuild/netbsd-arm64":- optional: true- "@esbuild/netbsd-x64":- optional: true- "@esbuild/openbsd-arm64":- optional: true- "@esbuild/openbsd-x64":- optional: true- "@esbuild/openharmony-arm64":- optional: true- "@esbuild/sunos-x64":- optional: true- "@esbuild/win32-arm64":- optional: true- "@esbuild/win32-ia32":- optional: true- "@esbuild/win32-x64":- optional: true- bin:- esbuild: bin/esbuild- checksum: 10c0/29cd456a79ce35ac2c7e05fe871330416b2c395c045d849653f843e51378d6e0d6e774d6dcd01b35f4e83238a29bf8decd04fcd34b3780c589a250b21e5f92bb- languageName: node- linkType: hard--"escape-string-regexp@npm:^2.0.0":- version: 2.0.0- resolution: "escape-string-regexp@npm:2.0.0"- checksum: 10c0/2530479fe8db57eace5e8646c9c2a9c80fa279614986d16dcc6bcaceb63ae77f05a851ba6c43756d816c61d7f4534baf56e3c705e3e0d884818a46808811c507- languageName: node- linkType: hard--"estree-util-is-identifier-name@npm:^3.0.0":- version: 3.0.0- resolution: "estree-util-is-identifier-name@npm:3.0.0"- checksum: 10c0/d1881c6ed14bd588ebd508fc90bf2a541811dbb9ca04dec2f39d27dcaa635f85b5ed9bbbe7fc6fb1ddfca68744a5f7c70456b4b7108b6c4c52780631cc787c5b- languageName: node- linkType: hard--"estree-walker@npm:^3.0.3":- version: 3.0.3- resolution: "estree-walker@npm:3.0.3"- dependencies:- "@types/estree": "npm:^1.0.0"- checksum: 10c0/c12e3c2b2642d2bcae7d5aa495c60fa2f299160946535763969a1c83fc74518ffa9c2cd3a8b69ac56aea547df6a8aac25f729a342992ef0bbac5f1c73e78995d- languageName: node- linkType: hard--"eventemitter3@npm:^3.1.0":- version: 3.1.2- resolution: "eventemitter3@npm:3.1.2"- checksum: 10c0/c67262eccbf85848b7cc6d4abb6c6e34155e15686db2a01c57669fd0d44441a574a19d44d25948b442929e065774cbe5003d8e77eed47674fbf876ac77887793- languageName: node- linkType: hard--"expect-type@npm:^1.3.0":- version: 1.3.0- resolution: "expect-type@npm:1.3.0"- checksum: 10c0/8412b3fe4f392c420ab41dae220b09700e4e47c639a29ba7ba2e83cc6cffd2b4926f7ac9e47d7e277e8f4f02acda76fd6931cb81fd2b382fa9477ef9ada953fd- languageName: node- linkType: hard--"exponential-backoff@npm:^3.1.1":- version: 3.1.3- resolution: "exponential-backoff@npm:3.1.3"- checksum: 10c0/77e3ae682b7b1f4972f563c6dbcd2b0d54ac679e62d5d32f3e5085feba20483cf28bd505543f520e287a56d4d55a28d7874299941faf637e779a1aa5994d1267- languageName: node- linkType: hard--"extend@npm:^3.0.0":- version: 3.0.2- resolution: "extend@npm:3.0.2"- checksum: 10c0/73bf6e27406e80aa3e85b0d1c4fd987261e628064e170ca781125c0b635a3dabad5e05adbf07595ea0cf1e6c5396cacb214af933da7cbaf24fe75ff14818e8f9- languageName: node- linkType: hard--"fast-string-truncated-width@npm:^3.0.2":- version: 3.0.3- resolution: "fast-string-truncated-width@npm:3.0.3"- checksum: 10c0/043b8663397d14a3880ce4f3407bcda60b40db9bbeafe62863a35d1f9c69ea17c8da3fcd72de235553e6c9cd053128cde9e24ca0d4a7463208f48db3cd23d981- languageName: node- linkType: hard--"fast-string-width@npm:^3.0.2":- version: 3.0.2- resolution: "fast-string-width@npm:3.0.2"- dependencies:- fast-string-truncated-width: "npm:^3.0.2"- checksum: 10c0/c8822d175315bb353ebe782b65214ac53b13e3bf704e03b132ea7bdfa8de6a636375b3ab7a4097545393d109381c37c4f387c72a462c90b61412dbc4632f39a7- languageName: node- linkType: hard--"fast-wrap-ansi@npm:^0.2.0":- version: 0.2.2- resolution: "fast-wrap-ansi@npm:0.2.2"- dependencies:- fast-string-width: "npm:^3.0.2"- checksum: 10c0/1aa7be4f7cb86f4bdb14691cb6bcc0b8df8b3b89df142ade3ae1602332dcf6f990cd750a923cd581ca0847808cb4ec1aa5afaafa7a72f849e87a2a62c98fa370- languageName: node- linkType: hard--"fdir@npm:^6.5.0":- version: 6.5.0- resolution: "fdir@npm:6.5.0"- peerDependencies:- picomatch: ^3 || ^4- peerDependenciesMeta:- picomatch:- optional: true- checksum: 10c0/e345083c4306b3aed6cb8ec551e26c36bab5c511e99ea4576a16750ddc8d3240e63826cc624f5ae17ad4dc82e68a253213b60d556c11bfad064b7607847ed07f- languageName: node- linkType: hard--"follow-redirects@npm:^1.16.0":- version: 1.16.0- resolution: "follow-redirects@npm:1.16.0"- peerDependenciesMeta:- debug:- optional: true- checksum: 10c0/a1e2900163e6f1b4d1ed5c221b607f41decbab65534c63fe7e287e40a5d552a6496e7d9d7d976fa4ba77b4c51c11e5e9f683f10b43011ea11e442ff128d0e181- languageName: node- linkType: hard--"form-data@npm:^4.0.5":- version: 4.0.6- resolution: "form-data@npm:4.0.6"- dependencies:- asynckit: "npm:^0.4.0"- combined-stream: "npm:^1.0.8"- es-set-tostringtag: "npm:^2.1.0"- hasown: "npm:^2.0.4"- mime-types: "npm:^2.1.35"- checksum: 10c0/43947a77bf0ff45c6ceed789778982d47a3f3e720a74b71721174ebf3310a5f1a8be1d6b38a3ee3688e8a18a2c4273073ec0844cd37efda3eaf46d41c9c318ff- languageName: node- linkType: hard--"fsevents@npm:~2.3.3":- version: 2.3.3- resolution: "fsevents@npm:2.3.3"- dependencies:- node-gyp: "npm:latest"- checksum: 10c0/a1f0c44595123ed717febbc478aa952e47adfc28e2092be66b8ab1635147254ca6cfe1df792a8997f22716d4cbafc73309899ff7bfac2ac3ad8cf2e4ecc3ec60- conditions: os=darwin- languageName: node- linkType: hard--"fsevents@patch:fsevents@npm%3A~2.3.3#optional!builtin<compat/fsevents>":- version: 2.3.3- resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin<compat/fsevents>::version=2.3.3&hash=df0bf1"- dependencies:- node-gyp: "npm:latest"- conditions: os=darwin- languageName: node- linkType: hard--"function-bind@npm:^1.1.2":- version: 1.1.2- resolution: "function-bind@npm:1.1.2"- checksum: 10c0/d8680ee1e5fcd4c197e4ac33b2b4dce03c71f4d91717292785703db200f5c21f977c568d28061226f9b5900cbcd2c84463646134fd5337e7925e0942bc3f46d5- languageName: node- linkType: hard--"generator-function@npm:^2.0.0":- version: 2.0.1- resolution: "generator-function@npm:2.0.1"- checksum: 10c0/8a9f59df0f01cfefafdb3b451b80555e5cf6d76487095db91ac461a0e682e4ff7a9dbce15f4ecec191e53586d59eece01949e05a4b4492879600bbbe8e28d6b8- languageName: node- linkType: hard--"get-east-asian-width@npm:^1.0.0, get-east-asian-width@npm:^1.3.1, get-east-asian-width@npm:^1.5.0":- version: 1.6.0- resolution: "get-east-asian-width@npm:1.6.0"- checksum: 10c0/7e72e9550fd49ca5b246f9af6bb2afc129c96412845ff6556b3274fd44817a381702ca17028efe9866b261a3d44254cbf21e6c90cf05b4b61675630af776d431- languageName: node- linkType: hard--"get-intrinsic@npm:^1.2.6":- version: 1.3.1- resolution: "get-intrinsic@npm:1.3.1"- dependencies:- async-function: "npm:^1.0.0"- async-generator-function: "npm:^1.0.0"- call-bind-apply-helpers: "npm:^1.0.2"- es-define-property: "npm:^1.0.1"- es-errors: "npm:^1.3.0"- es-object-atoms: "npm:^1.1.1"- function-bind: "npm:^1.1.2"- generator-function: "npm:^2.0.0"- get-proto: "npm:^1.0.1"- gopd: "npm:^1.2.0"- has-symbols: "npm:^1.1.0"- hasown: "npm:^2.0.2"- math-intrinsics: "npm:^1.1.0"- checksum: 10c0/9f4ab0cf7efe0fd2c8185f52e6f637e708f3a112610c88869f8f041bb9ecc2ce44bf285dfdbdc6f4f7c277a5b88d8e94a432374d97cca22f3de7fc63795deb5d- languageName: node- linkType: hard--"get-proto@npm:^1.0.1":- version: 1.0.1- resolution: "get-proto@npm:1.0.1"- dependencies:- dunder-proto: "npm:^1.0.1"- es-object-atoms: "npm:^1.0.0"- checksum: 10c0/9224acb44603c5526955e83510b9da41baf6ae73f7398875fba50edc5e944223a89c4a72b070fcd78beb5f7bdda58ecb6294adc28f7acfc0da05f76a2399643c- languageName: node- linkType: hard--"globrex@npm:^0.1.2":- version: 0.1.2- resolution: "globrex@npm:0.1.2"- checksum: 10c0/a54c029520cf58bda1d8884f72bd49b4cd74e977883268d931fd83bcbd1a9eb96d57c7dbd4ad80148fb9247467ebfb9b215630b2ed7563b2a8de02e1ff7f89d1- languageName: node- linkType: hard--"gopd@npm:^1.2.0":- version: 1.2.0- resolution: "gopd@npm:1.2.0"- checksum: 10c0/50fff1e04ba2b7737c097358534eacadad1e68d24cccee3272e04e007bed008e68d2614f3987788428fd192a5ae3889d08fb2331417e4fc4a9ab366b2043cead- languageName: node- linkType: hard--"graceful-fs@npm:^4.2.6":- version: 4.2.11- resolution: "graceful-fs@npm:4.2.11"- checksum: 10c0/386d011a553e02bc594ac2ca0bd6d9e4c22d7fa8cfbfc448a6d148c59ea881b092db9dbe3547ae4b88e55f1b01f7c4a2ecc53b310c042793e63aa44cf6c257f2- languageName: node- linkType: hard--"graphql-query-batcher@npm:^1.0.1":- version: 1.0.1- resolution: "graphql-query-batcher@npm:1.0.1"- checksum: 10c0/804d0f4064721a2116a16b9eac422e9233e85f4ab5b250cb8f83662725658ffde35779a8ae8211037f3dd2f9717de8cb63b394ad8057ce22171a83db2471196a- languageName: node- linkType: hard--"graphql-sse@npm:^2.5.4":- version: 2.6.0- resolution: "graphql-sse@npm:2.6.0"- peerDependencies:- graphql: ">=0.11 <=16"- checksum: 10c0/e05f0b5c8539d61e5ce34af8e0bb418c02bf922d6a7f9232a9abd53c77df5654684ca14f674ac771645c8fba9c37ce666c5d06f46eef54ea07e63653468065b0- languageName: node- linkType: hard--"graphql@npm:^16.8.1":- version: 16.14.0- resolution: "graphql@npm:16.14.0"- checksum: 10c0/baaa368fcfeb7bf2cdf94b9f31bf916e97eaa9e7e82148a7046f31cbd49b760b38190f22393b024cbdd9ca0f4f46287515de0136b6a0cc164074b36ad7b50618- languageName: node- linkType: hard--"has-symbols@npm:^1.0.3, has-symbols@npm:^1.1.0":- version: 1.1.0- resolution: "has-symbols@npm:1.1.0"- checksum: 10c0/dde0a734b17ae51e84b10986e651c664379018d10b91b6b0e9b293eddb32f0f069688c841fb40f19e9611546130153e0a2a48fd7f512891fb000ddfa36f5a20e- languageName: node- linkType: hard--"has-tostringtag@npm:^1.0.2":- version: 1.0.2- resolution: "has-tostringtag@npm:1.0.2"- dependencies:- has-symbols: "npm:^1.0.3"- checksum: 10c0/a8b166462192bafe3d9b6e420a1d581d93dd867adb61be223a17a8d6dad147aa77a8be32c961bb2f27b3ef893cae8d36f564ab651f5e9b7938ae86f74027c48c- languageName: node- linkType: hard--"hasown@npm:^2.0.2":- version: 2.0.3- resolution: "hasown@npm:2.0.3"- dependencies:- function-bind: "npm:^1.1.2"- checksum: 10c0/f5eb28c3fd0d3e4facd821c1eeee3836c37b70ab0b0fc532e8a39976e18fef43652415dadc52f8c7a5ff6d5ac93b7bef128789aa6f90f4e9b9a9083dce74ab38- languageName: node- linkType: hard--"hasown@npm:^2.0.4":- version: 2.0.4- resolution: "hasown@npm:2.0.4"- dependencies:- function-bind: "npm:^1.1.2"- checksum: 10c0/2d8de939e270b70618f8cebb69746620db10617dbb495bc66ddad326955ea24d3ca4af133aff3eb7c1853e0218f867bc2b050ec26fe02e3aea58f880ffc5e506- languageName: node- linkType: hard--"hast-util-to-jsx-runtime@npm:^2.0.0":- version: 2.3.6- resolution: "hast-util-to-jsx-runtime@npm:2.3.6"- dependencies:- "@types/estree": "npm:^1.0.0"- "@types/hast": "npm:^3.0.0"- "@types/unist": "npm:^3.0.0"- comma-separated-tokens: "npm:^2.0.0"- devlop: "npm:^1.0.0"- estree-util-is-identifier-name: "npm:^3.0.0"- hast-util-whitespace: "npm:^3.0.0"- mdast-util-mdx-expression: "npm:^2.0.0"- mdast-util-mdx-jsx: "npm:^3.0.0"- mdast-util-mdxjs-esm: "npm:^2.0.0"- property-information: "npm:^7.0.0"- space-separated-tokens: "npm:^2.0.0"- style-to-js: "npm:^1.0.0"- unist-util-position: "npm:^5.0.0"- vfile-message: "npm:^4.0.0"- checksum: 10c0/27297e02848fe37ef219be04a26ce708d17278a175a807689e94a821dcffc88aa506d62c3a85beed1f9a8544f7211bdcbcde0528b7b456a57c2e342c3fd11056- languageName: node- linkType: hard--"hast-util-whitespace@npm:^3.0.0":- version: 3.0.0- resolution: "hast-util-whitespace@npm:3.0.0"- dependencies:- "@types/hast": "npm:^3.0.0"- checksum: 10c0/b898bc9fe27884b272580d15260b6bbdabe239973a147e97fa98c45fa0ffec967a481aaa42291ec34fb56530dc2d484d473d7e2bae79f39c83f3762307edfea8- languageName: node- linkType: hard--"html-url-attributes@npm:^3.0.0":- version: 3.0.1- resolution: "html-url-attributes@npm:3.0.1"- checksum: 10c0/496e4908aa8b77665f348b4b03521901794f648b8ac34a581022cd6f2c97934d5c910cd91bc6593bbf2994687549037bc2520fcdc769b31484f29ffdd402acd0- languageName: node- linkType: hard--"https-proxy-agent@npm:^5.0.1":- version: 5.0.1- resolution: "https-proxy-agent@npm:5.0.1"- dependencies:- agent-base: "npm:6"- debug: "npm:4"- checksum: 10c0/6dd639f03434003577c62b27cafdb864784ef19b2de430d8ae2a1d45e31c4fd60719e5637b44db1a88a046934307da7089e03d6089ec3ddacc1189d8de8897d1- languageName: node- linkType: hard--"iconv-lite@npm:^0.7.2":- version: 0.7.2- resolution: "iconv-lite@npm:0.7.2"- dependencies:- safer-buffer: "npm:>= 2.1.2 < 3.0.0"- checksum: 10c0/3c228920f3bd307f56bf8363706a776f4a060eb042f131cd23855ceca962951b264d0997ab38a1ad340e1c5df8499ed26e1f4f0db6b2a2ad9befaff22f14b722- languageName: node- linkType: hard--"indent-string@npm:^5.0.0":- version: 5.0.0- resolution: "indent-string@npm:5.0.0"- checksum: 10c0/8ee77b57d92e71745e133f6f444d6fa3ed503ad0e1bcd7e80c8da08b42375c07117128d670589725ed07b1978065803fa86318c309ba45415b7fe13e7f170220- languageName: node- linkType: hard--"ink@npm:^6.8.0":- version: 6.8.0- resolution: "ink@npm:6.8.0"- dependencies:- "@alcalzone/ansi-tokenize": "npm:^0.2.4"- ansi-escapes: "npm:^7.3.0"- ansi-styles: "npm:^6.2.1"- auto-bind: "npm:^5.0.1"- chalk: "npm:^5.6.0"- cli-boxes: "npm:^3.0.0"- cli-cursor: "npm:^4.0.0"- cli-truncate: "npm:^5.1.1"- code-excerpt: "npm:^4.0.0"- es-toolkit: "npm:^1.39.10"- indent-string: "npm:^5.0.0"- is-in-ci: "npm:^2.0.0"- patch-console: "npm:^2.0.0"- react-reconciler: "npm:^0.33.0"- scheduler: "npm:^0.27.0"- signal-exit: "npm:^3.0.7"- slice-ansi: "npm:^8.0.0"- stack-utils: "npm:^2.0.6"- string-width: "npm:^8.1.1"- terminal-size: "npm:^4.0.1"- type-fest: "npm:^5.4.1"- widest-line: "npm:^6.0.0"- wrap-ansi: "npm:^9.0.0"- ws: "npm:^8.18.0"- yoga-layout: "npm:~3.2.1"- peerDependencies:- "@types/react": ">=19.0.0"- react: ">=19.0.0"- react-devtools-core: ">=6.1.2"- peerDependenciesMeta:- "@types/react":- optional: true- react-devtools-core:- optional: true- checksum: 10c0/50500e547fdf6a1f1d836d6befbd4770e3ab649ef0be1884500a6da411fb68a90e22dd7dcc9c404911d30e9f87506b3b9d8e997c6c6ceac85ee054b4dadefaff- languageName: node- linkType: hard--"inline-style-parser@npm:0.2.7":- version: 0.2.7- resolution: "inline-style-parser@npm:0.2.7"- checksum: 10c0/d884d76f84959517430ae6c22f0bda59bb3f58f539f99aac75a8d786199ec594ed648c6ab4640531f9fc244b0ed5cd8c458078e592d016ef06de793beb1debff- languageName: node- linkType: hard--"inquirer@npm:^14.0.0":- version: 14.0.2- resolution: "inquirer@npm:14.0.2"- dependencies:- "@inquirer/ansi": "npm:^2.0.7"- "@inquirer/core": "npm:^11.2.1"- "@inquirer/prompts": "npm:^8.5.2"- "@inquirer/type": "npm:^4.0.7"- mute-stream: "npm:^3.0.0"- run-async: "npm:^4.0.6"- peerDependencies:- "@types/node": ">=18"- peerDependenciesMeta:- "@types/node":- optional: true- checksum: 10c0/31ec80b7d599dcb19568540d694865b1da116f701b75503a23ed38189d96fca70eb1fb6ccb1dbd994f6f79d407d51dc1a94d06dcef5370644ce736792414781b- languageName: node- linkType: hard--"is-alphabetical@npm:^2.0.0":- version: 2.0.1- resolution: "is-alphabetical@npm:2.0.1"- checksum: 10c0/932367456f17237533fd1fc9fe179df77957271020b83ea31da50e5cc472d35ef6b5fb8147453274ffd251134472ce24eb6f8d8398d96dee98237cdb81a6c9a7- languageName: node- linkType: hard--"is-alphanumerical@npm:^2.0.0":- version: 2.0.1- resolution: "is-alphanumerical@npm:2.0.1"- dependencies:- is-alphabetical: "npm:^2.0.0"- is-decimal: "npm:^2.0.0"- checksum: 10c0/4b35c42b18e40d41378293f82a3ecd9de77049b476f748db5697c297f686e1e05b072a6aaae2d16f54d2a57f85b00cbbe755c75f6d583d1c77d6657bd0feb5a2- languageName: node- linkType: hard--"is-decimal@npm:^2.0.0":- version: 2.0.1- resolution: "is-decimal@npm:2.0.1"- checksum: 10c0/8085dd66f7d82f9de818fba48b9e9c0429cb4291824e6c5f2622e96b9680b54a07a624cfc663b24148b8e853c62a1c987cfe8b0b5a13f5156991afaf6736e334- languageName: node- linkType: hard--"is-fullwidth-code-point@npm:^5.0.0, is-fullwidth-code-point@npm:^5.1.0":- version: 5.1.0- resolution: "is-fullwidth-code-point@npm:5.1.0"- dependencies:- get-east-asian-width: "npm:^1.3.1"- checksum: 10c0/c1172c2e417fb73470c56c431851681591f6a17233603a9e6f94b7ba870b2e8a5266506490573b607fb1081318589372034aa436aec07b465c2029c0bc7f07a4- languageName: node- linkType: hard--"is-hexadecimal@npm:^2.0.0":- version: 2.0.1- resolution: "is-hexadecimal@npm:2.0.1"- checksum: 10c0/3eb60fe2f1e2bbc760b927dcad4d51eaa0c60138cf7fc671803f66353ad90c301605b502c7ea4c6bb0548e1c7e79dfd37b73b632652e3b76030bba603a7e9626- languageName: node- linkType: hard--"is-in-ci@npm:^2.0.0":- version: 2.0.0- resolution: "is-in-ci@npm:2.0.0"- bin:- is-in-ci: cli.js- checksum: 10c0/1e1d1056939a681e8206035de5ad84e0404556eaa7622bb55f0f1868b9788bff3df427bc0b1ed5a172623154a90fcb1e759a230817cd73d09435543ae3c71feb- languageName: node- linkType: hard--"is-plain-obj@npm:^4.0.0":- version: 4.1.0- resolution: "is-plain-obj@npm:4.1.0"- checksum: 10c0/32130d651d71d9564dc88ba7e6fda0e91a1010a3694648e9f4f47bb6080438140696d3e3e15c741411d712e47ac9edc1a8a9de1fe76f3487b0d90be06ac9975e- languageName: node- linkType: hard--"isexe@npm:^4.0.0":- version: 4.0.0- resolution: "isexe@npm:4.0.0"- checksum: 10c0/5884815115bceac452877659a9c7726382531592f43dc29e5d48b7c4100661aed54018cb90bd36cb2eaeba521092570769167acbb95c18d39afdccbcca06c5ce- languageName: node- linkType: hard--"isomorphic-unfetch@npm:^3.0.0":- version: 3.1.0- resolution: "isomorphic-unfetch@npm:3.1.0"- dependencies:- node-fetch: "npm:^2.6.1"- unfetch: "npm:^4.2.0"- checksum: 10c0/d3b61fca06304db692b7f76bdfd3a00f410e42cfa7403c3b250546bf71589d18cf2f355922f57198e4cc4a9872d3647b20397a5c3edf1a347c90d57c83cf2a89- languageName: node- linkType: hard--"iterall@npm:^1.2.1":- version: 1.3.0- resolution: "iterall@npm:1.3.0"- checksum: 10c0/40de624e5fe937c4c0e511981b91caea9ff2142bfc0316cccc8506eaa03aa253820cc17c5bc5f0a98706c7268a373e5ebee9af9a0c8a359730cf7c05938b57b5- languageName: node- linkType: hard--"jsonc-parser@npm:^3.2.0":- version: 3.3.1- resolution: "jsonc-parser@npm:3.3.1"- checksum: 10c0/269c3ae0a0e4f907a914bf334306c384aabb9929bd8c99f909275ebd5c2d3bc70b9bcd119ad794f339dec9f24b6a4ee9cd5a8ab2e6435e730ad4075388fc2ab6- languageName: node- linkType: hard--"lightningcss-android-arm64@npm:1.32.0":- version: 1.32.0- resolution: "lightningcss-android-arm64@npm:1.32.0"- conditions: os=android & cpu=arm64- languageName: node- linkType: hard--"lightningcss-darwin-arm64@npm:1.32.0":- version: 1.32.0- resolution: "lightningcss-darwin-arm64@npm:1.32.0"- conditions: os=darwin & cpu=arm64- languageName: node- linkType: hard--"lightningcss-darwin-x64@npm:1.32.0":- version: 1.32.0- resolution: "lightningcss-darwin-x64@npm:1.32.0"- conditions: os=darwin & cpu=x64- languageName: node- linkType: hard--"lightningcss-freebsd-x64@npm:1.32.0":- version: 1.32.0- resolution: "lightningcss-freebsd-x64@npm:1.32.0"- conditions: os=freebsd & cpu=x64- languageName: node- linkType: hard--"lightningcss-linux-arm-gnueabihf@npm:1.32.0":- version: 1.32.0- resolution: "lightningcss-linux-arm-gnueabihf@npm:1.32.0"- conditions: os=linux & cpu=arm- languageName: node- linkType: hard--"lightningcss-linux-arm64-gnu@npm:1.32.0":- version: 1.32.0- resolution: "lightningcss-linux-arm64-gnu@npm:1.32.0"- conditions: os=linux & cpu=arm64 & libc=glibc- languageName: node- linkType: hard--"lightningcss-linux-arm64-musl@npm:1.32.0":- version: 1.32.0- resolution: "lightningcss-linux-arm64-musl@npm:1.32.0"- conditions: os=linux & cpu=arm64 & libc=musl- languageName: node- linkType: hard--"lightningcss-linux-x64-gnu@npm:1.32.0":- version: 1.32.0- resolution: "lightningcss-linux-x64-gnu@npm:1.32.0"- conditions: os=linux & cpu=x64 & libc=glibc- languageName: node- linkType: hard--"lightningcss-linux-x64-musl@npm:1.32.0":- version: 1.32.0- resolution: "lightningcss-linux-x64-musl@npm:1.32.0"- conditions: os=linux & cpu=x64 & libc=musl- languageName: node- linkType: hard--"lightningcss-win32-arm64-msvc@npm:1.32.0":- version: 1.32.0- resolution: "lightningcss-win32-arm64-msvc@npm:1.32.0"- conditions: os=win32 & cpu=arm64- languageName: node- linkType: hard--"lightningcss-win32-x64-msvc@npm:1.32.0":- version: 1.32.0- resolution: "lightningcss-win32-x64-msvc@npm:1.32.0"- conditions: os=win32 & cpu=x64- languageName: node- linkType: hard--"lightningcss@npm:^1.32.0":- version: 1.32.0- resolution: "lightningcss@npm:1.32.0"- dependencies:- detect-libc: "npm:^2.0.3"- lightningcss-android-arm64: "npm:1.32.0"- lightningcss-darwin-arm64: "npm:1.32.0"- lightningcss-darwin-x64: "npm:1.32.0"- lightningcss-freebsd-x64: "npm:1.32.0"- lightningcss-linux-arm-gnueabihf: "npm:1.32.0"- lightningcss-linux-arm64-gnu: "npm:1.32.0"- lightningcss-linux-arm64-musl: "npm:1.32.0"- lightningcss-linux-x64-gnu: "npm:1.32.0"- lightningcss-linux-x64-musl: "npm:1.32.0"- lightningcss-win32-arm64-msvc: "npm:1.32.0"- lightningcss-win32-x64-msvc: "npm:1.32.0"- dependenciesMeta:- lightningcss-android-arm64:- optional: true- lightningcss-darwin-arm64:- optional: true- lightningcss-darwin-x64:- optional: true- lightningcss-freebsd-x64:- optional: true- lightningcss-linux-arm-gnueabihf:- optional: true- lightningcss-linux-arm64-gnu:- optional: true- lightningcss-linux-arm64-musl:- optional: true- lightningcss-linux-x64-gnu:- optional: true- lightningcss-linux-x64-musl:- optional: true- lightningcss-win32-arm64-msvc:- optional: true- lightningcss-win32-x64-msvc:- optional: true- checksum: 10c0/70945bd55097af46fc9fab7f5ed09cd5869d85940a2acab7ee06d0117004a1d68155708a2d462531cea2fc3c67aefc9333a7068c80b0b78dd404c16838809e03- languageName: node- linkType: hard--"lodash@npm:^4.17.20, lodash@npm:^4.17.21":- version: 4.18.1- resolution: "lodash@npm:4.18.1"- checksum: 10c0/757228fc68805c59789e82185135cf85f05d0b2d3d54631d680ca79ec21944ec8314d4533639a14b8bcfbd97a517e78960933041a5af17ecb693ec6eecb99a27- languageName: node- linkType: hard--"longest-streak@npm:^3.0.0":- version: 3.1.0- resolution: "longest-streak@npm:3.1.0"- checksum: 10c0/7c2f02d0454b52834d1bcedef79c557bd295ee71fdabb02d041ff3aa9da48a90b5df7c0409156dedbc4df9b65da18742652aaea4759d6ece01f08971af6a7eaa- languageName: node- linkType: hard--"magic-string@npm:^0.30.21":- version: 0.30.21- resolution: "magic-string@npm:0.30.21"- dependencies:- "@jridgewell/sourcemap-codec": "npm:^1.5.5"- checksum: 10c0/299378e38f9a270069fc62358522ddfb44e94244baa0d6a8980ab2a9b2490a1d03b236b447eee309e17eb3bddfa482c61259d47960eb018a904f0ded52780c4a- languageName: node- linkType: hard--"math-intrinsics@npm:^1.1.0":- version: 1.1.0- resolution: "math-intrinsics@npm:1.1.0"- checksum: 10c0/7579ff94e899e2f76ab64491d76cf606274c874d8f2af4a442c016bd85688927fcfca157ba6bf74b08e9439dc010b248ce05b96cc7c126a354c3bae7fcb48b7f- languageName: node- linkType: hard--"mdast-util-from-markdown@npm:^2.0.0":- version: 2.0.3- resolution: "mdast-util-from-markdown@npm:2.0.3"- dependencies:- "@types/mdast": "npm:^4.0.0"- "@types/unist": "npm:^3.0.0"- decode-named-character-reference: "npm:^1.0.0"- devlop: "npm:^1.0.0"- mdast-util-to-string: "npm:^4.0.0"- micromark: "npm:^4.0.0"- micromark-util-decode-numeric-character-reference: "npm:^2.0.0"- micromark-util-decode-string: "npm:^2.0.0"- micromark-util-normalize-identifier: "npm:^2.0.0"- micromark-util-symbol: "npm:^2.0.0"- micromark-util-types: "npm:^2.0.0"- unist-util-stringify-position: "npm:^4.0.0"- checksum: 10c0/d3eac9ac2b88e3b41fb85aa81c7bfd1f4f8a2fde497ad805e66fea7b2abfe486ffd94d2a20f9fd2951dcdebe4916f3bdcf851319891dd62d343e26c2f02583ba- languageName: node- linkType: hard--"mdast-util-mdx-expression@npm:^2.0.0":- version: 2.0.1- resolution: "mdast-util-mdx-expression@npm:2.0.1"- dependencies:- "@types/estree-jsx": "npm:^1.0.0"- "@types/hast": "npm:^3.0.0"- "@types/mdast": "npm:^4.0.0"- devlop: "npm:^1.0.0"- mdast-util-from-markdown: "npm:^2.0.0"- mdast-util-to-markdown: "npm:^2.0.0"- checksum: 10c0/9a1e57940f66431f10312fa239096efa7627f375e7933b5d3162c0b5c1712a72ac87447aff2b6838d2bbd5c1311b188718cc90b33b67dc67a88550e0a6ef6183- languageName: node- linkType: hard--"mdast-util-mdx-jsx@npm:^3.0.0":- version: 3.2.0- resolution: "mdast-util-mdx-jsx@npm:3.2.0"- dependencies:- "@types/estree-jsx": "npm:^1.0.0"- "@types/hast": "npm:^3.0.0"- "@types/mdast": "npm:^4.0.0"- "@types/unist": "npm:^3.0.0"- ccount: "npm:^2.0.0"- devlop: "npm:^1.1.0"- mdast-util-from-markdown: "npm:^2.0.0"- mdast-util-to-markdown: "npm:^2.0.0"- parse-entities: "npm:^4.0.0"- stringify-entities: "npm:^4.0.0"- unist-util-stringify-position: "npm:^4.0.0"- vfile-message: "npm:^4.0.0"- checksum: 10c0/3acadaf3b962254f7ad2990fed4729961dc0217ca31fde9917986e880843f3ecf3392b1f22d569235cacd180d50894ad266db7af598aedca69d330d33c7ac613- languageName: node- linkType: hard--"mdast-util-mdxjs-esm@npm:^2.0.0":- version: 2.0.1- resolution: "mdast-util-mdxjs-esm@npm:2.0.1"- dependencies:- "@types/estree-jsx": "npm:^1.0.0"- "@types/hast": "npm:^3.0.0"- "@types/mdast": "npm:^4.0.0"- devlop: "npm:^1.0.0"- mdast-util-from-markdown: "npm:^2.0.0"- mdast-util-to-markdown: "npm:^2.0.0"- checksum: 10c0/5bda92fc154141705af2b804a534d891f28dac6273186edf1a4c5e3f045d5b01dbcac7400d27aaf91b7e76e8dce007c7b2fdf136c11ea78206ad00bdf9db46bc- languageName: node- linkType: hard--"mdast-util-phrasing@npm:^4.0.0":- version: 4.1.0- resolution: "mdast-util-phrasing@npm:4.1.0"- dependencies:- "@types/mdast": "npm:^4.0.0"- unist-util-is: "npm:^6.0.0"- checksum: 10c0/bf6c31d51349aa3d74603d5e5a312f59f3f65662ed16c58017169a5fb0f84ca98578f626c5ee9e4aa3e0a81c996db8717096705521bddb4a0185f98c12c9b42f- languageName: node- linkType: hard--"mdast-util-to-hast@npm:^13.0.0":- version: 13.2.1- resolution: "mdast-util-to-hast@npm:13.2.1"- dependencies:- "@types/hast": "npm:^3.0.0"- "@types/mdast": "npm:^4.0.0"- "@ungap/structured-clone": "npm:^1.0.0"- devlop: "npm:^1.0.0"- micromark-util-sanitize-uri: "npm:^2.0.0"- trim-lines: "npm:^3.0.0"- unist-util-position: "npm:^5.0.0"- unist-util-visit: "npm:^5.0.0"- vfile: "npm:^6.0.0"- checksum: 10c0/3eeaf28a5e84e1e08e6d54a1a8a06c0fca88cb5d36f4cf8086f0177248d1ce6e4e751f4ad0da19a3dea1c6ea61bd80784acc3ae021e44ceeb21aa5413a375e43- languageName: node- linkType: hard--"mdast-util-to-markdown@npm:^2.0.0":- version: 2.1.2- resolution: "mdast-util-to-markdown@npm:2.1.2"- dependencies:- "@types/mdast": "npm:^4.0.0"- "@types/unist": "npm:^3.0.0"- longest-streak: "npm:^3.0.0"- mdast-util-phrasing: "npm:^4.0.0"- mdast-util-to-string: "npm:^4.0.0"- micromark-util-classify-character: "npm:^2.0.0"- micromark-util-decode-string: "npm:^2.0.0"- unist-util-visit: "npm:^5.0.0"- zwitch: "npm:^2.0.0"- checksum: 10c0/4649722a6099f12e797bd8d6469b2b43b44e526b5182862d9c7766a3431caad2c0112929c538a972f214e63c015395e5d3f54bd81d9ac1b16e6d8baaf582f749- languageName: node- linkType: hard--"mdast-util-to-string@npm:^4.0.0":- version: 4.0.0- resolution: "mdast-util-to-string@npm:4.0.0"- dependencies:- "@types/mdast": "npm:^4.0.0"- checksum: 10c0/2d3c1af29bf3fe9c20f552ee9685af308002488f3b04b12fa66652c9718f66f41a32f8362aa2d770c3ff464c034860b41715902ada2306bb0a055146cef064d7- languageName: node- linkType: hard--"micromark-core-commonmark@npm:^2.0.0":- version: 2.0.3- resolution: "micromark-core-commonmark@npm:2.0.3"- dependencies:- decode-named-character-reference: "npm:^1.0.0"- devlop: "npm:^1.0.0"- micromark-factory-destination: "npm:^2.0.0"- micromark-factory-label: "npm:^2.0.0"- micromark-factory-space: "npm:^2.0.0"- micromark-factory-title: "npm:^2.0.0"- micromark-factory-whitespace: "npm:^2.0.0"- micromark-util-character: "npm:^2.0.0"- micromark-util-chunked: "npm:^2.0.0"- micromark-util-classify-character: "npm:^2.0.0"- micromark-util-html-tag-name: "npm:^2.0.0"- micromark-util-normalize-identifier: "npm:^2.0.0"- micromark-util-resolve-all: "npm:^2.0.0"- micromark-util-subtokenize: "npm:^2.0.0"- micromark-util-symbol: "npm:^2.0.0"- micromark-util-types: "npm:^2.0.0"- checksum: 10c0/bd4a794fdc9e88dbdf59eaf1c507ddf26e5f7ddf4e52566c72239c0f1b66adbcd219ba2cd42350debbe24471434d5f5e50099d2b3f4e5762ca222ba8e5b549ee- languageName: node- linkType: hard--"micromark-factory-destination@npm:^2.0.0":- version: 2.0.1- resolution: "micromark-factory-destination@npm:2.0.1"- dependencies:- micromark-util-character: "npm:^2.0.0"- micromark-util-symbol: "npm:^2.0.0"- micromark-util-types: "npm:^2.0.0"- checksum: 10c0/bbafcf869cee5bf511161354cb87d61c142592fbecea051000ff116068dc85216e6d48519d147890b9ea5d7e2864a6341c0c09d9948c203bff624a80a476023c- languageName: node- linkType: hard--"micromark-factory-label@npm:^2.0.0":- version: 2.0.1- resolution: "micromark-factory-label@npm:2.0.1"- dependencies:- devlop: "npm:^1.0.0"- micromark-util-character: "npm:^2.0.0"- micromark-util-symbol: "npm:^2.0.0"- micromark-util-types: "npm:^2.0.0"- checksum: 10c0/0137716b4ecb428114165505e94a2f18855c8bbea21b07a8b5ce514b32a595ed789d2b967125718fc44c4197ceaa48f6609d58807a68e778138d2e6b91b824e8- languageName: node- linkType: hard--"micromark-factory-space@npm:^2.0.0":- version: 2.0.1- resolution: "micromark-factory-space@npm:2.0.1"- dependencies:- micromark-util-character: "npm:^2.0.0"- micromark-util-types: "npm:^2.0.0"- checksum: 10c0/f9ed43f1c0652d8d898de0ac2be3f77f776fffe7dd96bdbba1e02d7ce33d3853c6ff5daa52568fc4fa32cdf3a62d86b85ead9b9189f7211e1d69ff2163c450fb- languageName: node- linkType: hard--"micromark-factory-title@npm:^2.0.0":- version: 2.0.1- resolution: "micromark-factory-title@npm:2.0.1"- dependencies:- micromark-factory-space: "npm:^2.0.0"- micromark-util-character: "npm:^2.0.0"- micromark-util-symbol: "npm:^2.0.0"- micromark-util-types: "npm:^2.0.0"- checksum: 10c0/e72fad8d6e88823514916890099a5af20b6a9178ccf78e7e5e05f4de99bb8797acb756257d7a3a57a53854cb0086bf8aab15b1a9e9db8982500dd2c9ff5948b6- languageName: node- linkType: hard--"micromark-factory-whitespace@npm:^2.0.0":- version: 2.0.1- resolution: "micromark-factory-whitespace@npm:2.0.1"- dependencies:- micromark-factory-space: "npm:^2.0.0"- micromark-util-character: "npm:^2.0.0"- micromark-util-symbol: "npm:^2.0.0"- micromark-util-types: "npm:^2.0.0"- checksum: 10c0/20a1ec58698f24b766510a309b23a10175034fcf1551eaa9da3adcbed3e00cd53d1ebe5f030cf873f76a1cec3c34eb8c50cc227be3344caa9ed25d56cf611224- languageName: node- linkType: hard--"micromark-util-character@npm:^2.0.0":- version: 2.1.1- resolution: "micromark-util-character@npm:2.1.1"- dependencies:- micromark-util-symbol: "npm:^2.0.0"- micromark-util-types: "npm:^2.0.0"- checksum: 10c0/d3fe7a5e2c4060fc2a076f9ce699c82a2e87190a3946e1e5eea77f563869b504961f5668d9c9c014724db28ac32fa909070ea8b30c3a39bd0483cc6c04cc76a1- languageName: node- linkType: hard--"micromark-util-chunked@npm:^2.0.0":- version: 2.0.1- resolution: "micromark-util-chunked@npm:2.0.1"- dependencies:- micromark-util-symbol: "npm:^2.0.0"- checksum: 10c0/b68c0c16fe8106949537bdcfe1be9cf36c0ccd3bc54c4007003cb0984c3750b6cdd0fd77d03f269a3382b85b0de58bde4f6eedbe7ecdf7244759112289b1ab56- languageName: node- linkType: hard--"micromark-util-classify-character@npm:^2.0.0":- version: 2.0.1- resolution: "micromark-util-classify-character@npm:2.0.1"- dependencies:- micromark-util-character: "npm:^2.0.0"- micromark-util-symbol: "npm:^2.0.0"- micromark-util-types: "npm:^2.0.0"- checksum: 10c0/8a02e59304005c475c332f581697e92e8c585bcd45d5d225a66c1c1b14ab5a8062705188c2ccec33cc998d33502514121478b2091feddbc751887fc9c290ed08- languageName: node- linkType: hard--"micromark-util-combine-extensions@npm:^2.0.0":- version: 2.0.1- resolution: "micromark-util-combine-extensions@npm:2.0.1"- dependencies:- micromark-util-chunked: "npm:^2.0.0"- micromark-util-types: "npm:^2.0.0"- checksum: 10c0/f15e282af24c8372cbb10b9b0b3e2c0aa681fea0ca323a44d6bc537dc1d9382c819c3689f14eaa000118f5a163245358ce6276b2cda9a84439cdb221f5d86ae7- languageName: node- linkType: hard--"micromark-util-decode-numeric-character-reference@npm:^2.0.0":- version: 2.0.2- resolution: "micromark-util-decode-numeric-character-reference@npm:2.0.2"- dependencies:- micromark-util-symbol: "npm:^2.0.0"- checksum: 10c0/9c8a9f2c790e5593ffe513901c3a110e9ec8882a08f466da014112a25e5059b51551ca0aeb7ff494657d86eceb2f02ee556c6558b8d66aadc61eae4a240da0df- languageName: node- linkType: hard--"micromark-util-decode-string@npm:^2.0.0":- version: 2.0.1- resolution: "micromark-util-decode-string@npm:2.0.1"- dependencies:- decode-named-character-reference: "npm:^1.0.0"- micromark-util-character: "npm:^2.0.0"- micromark-util-decode-numeric-character-reference: "npm:^2.0.0"- micromark-util-symbol: "npm:^2.0.0"- checksum: 10c0/f24d75b2e5310be6e7b6dee532e0d17d3bf46996841d6295f2a9c87a2046fff4ab603c52ab9d7a7a6430a8b787b1574ae895849c603d262d1b22eef71736b5cb- languageName: node- linkType: hard--"micromark-util-encode@npm:^2.0.0":- version: 2.0.1- resolution: "micromark-util-encode@npm:2.0.1"- checksum: 10c0/b2b29f901093845da8a1bf997ea8b7f5e061ffdba85070dfe14b0197c48fda64ffcf82bfe53c90cf9dc185e69eef8c5d41cae3ba918b96bc279326921b59008a- languageName: node- linkType: hard--"micromark-util-html-tag-name@npm:^2.0.0":- version: 2.0.1- resolution: "micromark-util-html-tag-name@npm:2.0.1"- checksum: 10c0/ae80444db786fde908e9295f19a27a4aa304171852c77414516418650097b8afb401961c9edb09d677b06e97e8370cfa65638dde8438ebd41d60c0a8678b85b9- languageName: node- linkType: hard--"micromark-util-normalize-identifier@npm:^2.0.0":- version: 2.0.1- resolution: "micromark-util-normalize-identifier@npm:2.0.1"- dependencies:- micromark-util-symbol: "npm:^2.0.0"- checksum: 10c0/5299265fa360769fc499a89f40142f10a9d4a5c3dd8e6eac8a8ef3c2e4a6570e4c009cf75ea46dce5ee31c01f25587bde2f4a5cc0a935584ae86dd857f2babbd- languageName: node- linkType: hard--"micromark-util-resolve-all@npm:^2.0.0":- version: 2.0.1- resolution: "micromark-util-resolve-all@npm:2.0.1"- dependencies:- micromark-util-types: "npm:^2.0.0"- checksum: 10c0/bb6ca28764696bb479dc44a2d5b5fe003e7177aeae1d6b0d43f24cc223bab90234092d9c3ce4a4d2b8df095ccfd820537b10eb96bb7044d635f385d65a4c984a- languageName: node- linkType: hard--"micromark-util-sanitize-uri@npm:^2.0.0":- version: 2.0.1- resolution: "micromark-util-sanitize-uri@npm:2.0.1"- dependencies:- micromark-util-character: "npm:^2.0.0"- micromark-util-encode: "npm:^2.0.0"- micromark-util-symbol: "npm:^2.0.0"- checksum: 10c0/60e92166e1870fd4f1961468c2651013ff760617342918e0e0c3c4e872433aa2e60c1e5a672bfe5d89dc98f742d6b33897585cf86ae002cda23e905a3c02527c- languageName: node- linkType: hard--"micromark-util-subtokenize@npm:^2.0.0":- version: 2.1.0- resolution: "micromark-util-subtokenize@npm:2.1.0"- dependencies:- devlop: "npm:^1.0.0"- micromark-util-chunked: "npm:^2.0.0"- micromark-util-symbol: "npm:^2.0.0"- micromark-util-types: "npm:^2.0.0"- checksum: 10c0/bee69eece4393308e657c293ba80d92ebcb637e5f55e21dcf9c3fa732b91a8eda8ac248d76ff375e675175bfadeae4712e5158ef97eef1111789da1ce7ab5067- languageName: node- linkType: hard--"micromark-util-symbol@npm:^2.0.0":- version: 2.0.1- resolution: "micromark-util-symbol@npm:2.0.1"- checksum: 10c0/f2d1b207771e573232436618e78c5e46cd4b5c560dd4a6d63863d58018abbf49cb96ec69f7007471e51434c60de3c9268ef2bf46852f26ff4aacd10f9da16fe9- languageName: node- linkType: hard--"micromark-util-types@npm:^2.0.0":- version: 2.0.2- resolution: "micromark-util-types@npm:2.0.2"- checksum: 10c0/c8c15b96c858db781c4393f55feec10004bf7df95487636c9a9f7209e51002a5cca6a047c5d2a5dc669ff92da20e57aaa881e81a268d9ccadb647f9dce305298- languageName: node- linkType: hard--"micromark@npm:^4.0.0":- version: 4.0.2- resolution: "micromark@npm:4.0.2"- dependencies:- "@types/debug": "npm:^4.0.0"- debug: "npm:^4.0.0"- decode-named-character-reference: "npm:^1.0.0"- devlop: "npm:^1.0.0"- micromark-core-commonmark: "npm:^2.0.0"- micromark-factory-space: "npm:^2.0.0"- micromark-util-character: "npm:^2.0.0"- micromark-util-chunked: "npm:^2.0.0"- micromark-util-combine-extensions: "npm:^2.0.0"- micromark-util-decode-numeric-character-reference: "npm:^2.0.0"- micromark-util-encode: "npm:^2.0.0"- micromark-util-normalize-identifier: "npm:^2.0.0"- micromark-util-resolve-all: "npm:^2.0.0"- micromark-util-sanitize-uri: "npm:^2.0.0"- micromark-util-subtokenize: "npm:^2.0.0"- micromark-util-symbol: "npm:^2.0.0"- micromark-util-types: "npm:^2.0.0"- checksum: 10c0/07462287254219d6eda6eac8a3cebaff2994e0575499e7088027b825105e096e4f51e466b14b2a81b71933a3b6c48ee069049d87bc2c2127eee50d9cc69e8af6- languageName: node- linkType: hard--"mime-db@npm:1.52.0":- version: 1.52.0- resolution: "mime-db@npm:1.52.0"- checksum: 10c0/0557a01deebf45ac5f5777fe7740b2a5c309c6d62d40ceab4e23da9f821899ce7a900b7ac8157d4548ddbb7beffe9abc621250e6d182b0397ec7f10c7b91a5aa- languageName: node- linkType: hard--"mime-types@npm:^2.1.35":- version: 2.1.35- resolution: "mime-types@npm:2.1.35"- dependencies:- mime-db: "npm:1.52.0"- checksum: 10c0/82fb07ec56d8ff1fc999a84f2f217aa46cb6ed1033fefaabd5785b9a974ed225c90dc72fff460259e66b95b73648596dbcc50d51ed69cdf464af2d237d3149b2- languageName: node- linkType: hard--"mimic-fn@npm:^2.1.0":- version: 2.1.0- resolution: "mimic-fn@npm:2.1.0"- checksum: 10c0/b26f5479d7ec6cc2bce275a08f146cf78f5e7b661b18114e2506dd91ec7ec47e7a25bf4360e5438094db0560bcc868079fb3b1fb3892b833c1ecbf63f80c95a4- languageName: node- linkType: hard--"minipass@npm:^7.0.4, minipass@npm:^7.1.2":- version: 7.1.3- resolution: "minipass@npm:7.1.3"- checksum: 10c0/539da88daca16533211ea5a9ee98dc62ff5742f531f54640dd34429e621955e91cc280a91a776026264b7f9f6735947629f920944e9c1558369e8bf22eb33fbb- languageName: node- linkType: hard--"minizlib@npm:^3.1.0":- version: 3.1.0- resolution: "minizlib@npm:3.1.0"- dependencies:- minipass: "npm:^7.1.2"- checksum: 10c0/5aad75ab0090b8266069c9aabe582c021ae53eb33c6c691054a13a45db3b4f91a7fb1bd79151e6b4e9e9a86727b522527c0a06ec7d45206b745d54cd3097bcec- languageName: node- linkType: hard--"ms@npm:^2.1.3":- version: 2.1.3- resolution: "ms@npm:2.1.3"- checksum: 10c0/d924b57e7312b3b63ad21fc5b3dc0af5e78d61a1fc7cfb5457edaf26326bf62be5307cc87ffb6862ef1c2b33b0233cdb5d4f01c4c958cc0d660948b65a287a48- languageName: node- linkType: hard--"mute-stream@npm:^3.0.0":- version: 3.0.0- resolution: "mute-stream@npm:3.0.0"- checksum: 10c0/12cdb36a101694c7a6b296632e6d93a30b74401873cf7507c88861441a090c71c77a58f213acadad03bc0c8fa186639dec99d68a14497773a8744320c136e701- languageName: node- linkType: hard--"nanoid@npm:^3.3.17":- version: 3.3.18- resolution: "nanoid@npm:3.3.18"- bin:- nanoid: bin/nanoid.cjs- checksum: 10c0/b994b4e396730f8be2520923284e2040d61eaee55cc6d4935ef6d38d34bafdc46133eda4d3faea5073bda545aa6079d82b886caeac5c731cf9ac18bcc1301425- languageName: node- linkType: hard--"node-fetch@npm:^2.6.1":- version: 2.7.0- resolution: "node-fetch@npm:2.7.0"- dependencies:- whatwg-url: "npm:^5.0.0"- peerDependencies:- encoding: ^0.1.0- peerDependenciesMeta:- encoding:- optional: true- checksum: 10c0/b55786b6028208e6fbe594ccccc213cab67a72899c9234eb59dba51062a299ea853210fcf526998eaa2867b0963ad72338824450905679ff0fa304b8c5093ae8- languageName: node- linkType: hard--"node-gyp@npm:latest":- version: 12.3.0- resolution: "node-gyp@npm:12.3.0"- dependencies:- env-paths: "npm:^2.2.0"- exponential-backoff: "npm:^3.1.1"- graceful-fs: "npm:^4.2.6"- nopt: "npm:^9.0.0"- proc-log: "npm:^6.0.0"- semver: "npm:^7.3.5"- tar: "npm:^7.5.4"- tinyglobby: "npm:^0.2.12"- undici: "npm:^6.25.0"- which: "npm:^6.0.0"- bin:- node-gyp: bin/node-gyp.js- checksum: 10c0/9d9032b405cbe42f72a105259d9eb679376470c102df4a2dbaa51e07d59bf741dcffb85897087ea9d8318b9cabb824a8978af51508ae142f0239ae1e6a3c2329- languageName: node- linkType: hard--"nopt@npm:^9.0.0":- version: 9.0.0- resolution: "nopt@npm:9.0.0"- dependencies:- abbrev: "npm:^4.0.0"- bin:- nopt: bin/nopt.js- checksum: 10c0/1822eb6f9b020ef6f7a7516d7b64a8036e09666ea55ac40416c36e4b2b343122c3cff0e2f085675f53de1d2db99a2a89a60ccea1d120bcd6a5347bf6ceb4a7fd- languageName: node- linkType: hard--"obug@npm:^2.1.1":- version: 2.1.2- resolution: "obug@npm:2.1.2"- checksum: 10c0/e857080ef23c018bd4ad8553238cd97008cd4ab8472b4b83eafe75c19e9b6f84ac8fe53ef7f50b515a1dbf83e6372dd0b198aece33bc716edfa70366f6f6ed5e- languageName: node- linkType: hard--"onetime@npm:^5.1.0":- version: 5.1.2- resolution: "onetime@npm:5.1.2"- dependencies:- mimic-fn: "npm:^2.1.0"- checksum: 10c0/ffcef6fbb2692c3c40749f31ea2e22677a876daea92959b8a80b521d95cca7a668c884d8b2045d1d8ee7d56796aa405c405462af112a1477594cc63531baeb8f- languageName: node- linkType: hard--"oxlint@npm:^0.16.0":- version: 0.16.12- resolution: "oxlint@npm:0.16.12"- dependencies:- "@oxlint/darwin-arm64": "npm:0.16.12"- "@oxlint/darwin-x64": "npm:0.16.12"- "@oxlint/linux-arm64-gnu": "npm:0.16.12"- "@oxlint/linux-arm64-musl": "npm:0.16.12"- "@oxlint/linux-x64-gnu": "npm:0.16.12"- "@oxlint/linux-x64-musl": "npm:0.16.12"- "@oxlint/win32-arm64": "npm:0.16.12"- "@oxlint/win32-x64": "npm:0.16.12"- dependenciesMeta:- "@oxlint/darwin-arm64":- optional: true- "@oxlint/darwin-x64":- optional: true- "@oxlint/linux-arm64-gnu":- optional: true- "@oxlint/linux-arm64-musl":- optional: true- "@oxlint/linux-x64-gnu":- optional: true- "@oxlint/linux-x64-musl":- optional: true- "@oxlint/win32-arm64":- optional: true- "@oxlint/win32-x64":- optional: true- bin:- oxc_language_server: bin/oxc_language_server- oxlint: bin/oxlint- checksum: 10c0/209c3484039c4f1fdd340689e81be93a70fdf74e8c111731e70d81580d223b0029439107c95fa4118cec3c9b03ba6c56624d3dcb8cdc79af222da3561122b3e7- languageName: node- linkType: hard--"parse-entities@npm:^4.0.0":- version: 4.0.2- resolution: "parse-entities@npm:4.0.2"- dependencies:- "@types/unist": "npm:^2.0.0"- character-entities-legacy: "npm:^3.0.0"- character-reference-invalid: "npm:^2.0.0"- decode-named-character-reference: "npm:^1.0.0"- is-alphanumerical: "npm:^2.0.0"- is-decimal: "npm:^2.0.0"- is-hexadecimal: "npm:^2.0.0"- checksum: 10c0/a13906b1151750b78ed83d386294066daf5fb559e08c5af9591b2d98cc209123103016a01df776f65f8219ad26652d6d6b210d0974d452049cddfc53a8916c34- languageName: node- linkType: hard--"patch-console@npm:^2.0.0":- version: 2.0.0- resolution: "patch-console@npm:2.0.0"- checksum: 10c0/486602591a0af7af8d4c76d8eea42cad32b6de7200488819c6383c75e43733ca7bdc80e30f2e68ce05f06a1607cce1683a1706c6672ca27dada1921b366e8f1c- languageName: node- linkType: hard--"pathe@npm:^2.0.3":- version: 2.0.3- resolution: "pathe@npm:2.0.3"- checksum: 10c0/c118dc5a8b5c4166011b2b70608762e260085180bb9e33e80a50dcdb1e78c010b1624f4280c492c92b05fc276715a4c357d1f9edc570f8f1b3d90b6839ebaca1- languageName: node- linkType: hard--"picocolors@npm:^1.1.1":- version: 1.1.1- resolution: "picocolors@npm:1.1.1"- checksum: 10c0/e2e3e8170ab9d7c7421969adaa7e1b31434f789afb9b3f115f6b96d91945041ac3ceb02e9ec6fe6510ff036bcc0bf91e69a1772edc0b707e12b19c0f2d6bcf58- languageName: node- linkType: hard--"picomatch@npm:^4.0.3, picomatch@npm:^4.0.4":- version: 4.0.4- resolution: "picomatch@npm:4.0.4"- checksum: 10c0/e2c6023372cc7b5764719a5ffb9da0f8e781212fa7ca4bd0562db929df8e117460f00dff3cb7509dacfc06b86de924b247f504d0ce1806a37fac4633081466b0- languageName: node- linkType: hard--"postcss@npm:^8.5.15":- version: 8.5.26- resolution: "postcss@npm:8.5.26"- dependencies:- nanoid: "npm:^3.3.17"- picocolors: "npm:^1.1.1"- source-map-js: "npm:^1.2.1"- checksum: 10c0/2bdafc00d96bd57b6649a52e458864a4bf58ee56cfdbe4aea1472b5cccc127e6c1ad653bd0bec50d211e650eb0b9270c80e1e72aff2e2fa40d9e7363234d6e43- languageName: node- linkType: hard--"preact@npm:^10.28.3":- version: 10.29.1- resolution: "preact@npm:10.29.1"- checksum: 10c0/55da3994d0d9ebcc26476552c6571f8be1150cccdafe842aad40eff9abc84c867555f6d01db386fc63ac4cbe9f9da245002468bb24df0642365162d8f1b545e2- languageName: node- linkType: hard--"prettier@npm:^3.8.3":- version: 3.8.4- resolution: "prettier@npm:3.8.4"- bin:- prettier: bin/prettier.cjs- checksum: 10c0/b90a0cbe75b88ac0af9c13fe0f359bd19926fabccd88483227b21f71f0c1cc42da056fc1ac3a361e665577c568371d5ccfb2c62c31c8a1186f8d1bd531a063e9- languageName: node- linkType: hard--"proc-log@npm:^6.0.0":- version: 6.1.0- resolution: "proc-log@npm:6.1.0"- checksum: 10c0/4f178d4062733ead9d71a9b1ab24ebcecdfe2250916a5b1555f04fe2eda972a0ec76fbaa8df1ad9c02707add6749219d118a4fc46dc56bdfe4dde4b47d80bb82- languageName: node- linkType: hard--"property-information@npm:^7.0.0":- version: 7.2.0- resolution: "property-information@npm:7.2.0"- checksum: 10c0/03662c8f9e1544510914c5e594ae72963f67d261027a5fdc06c4134742584fe40dd49b959470d30e757e9fb70b297d8546ab1362a040364144029926ad4e07c4- languageName: node- linkType: hard--"proxy-from-env@npm:^2.1.0":- version: 2.1.0- resolution: "proxy-from-env@npm:2.1.0"- checksum: 10c0/ed01729fd4d094eab619cd7e17ce3698b3413b31eb102c4904f9875e677cd207392795d5b4adee9cec359dfd31c44d5ad7595a3a3ad51c40250e141512281c58- languageName: node- linkType: hard--"react-dom@npm:^19.0.0":- version: 19.2.6- resolution: "react-dom@npm:19.2.6"- dependencies:- scheduler: "npm:^0.27.0"- peerDependencies:- react: ^19.2.6- checksum: 10c0/dbf2aef67857c03a612bc9316a4562e5066f43fa04bf28f7f0734963fc1350da2c9f8eb973930655453281079f30cc8222bab383dbec4b5097084e2c081e3334- languageName: node- linkType: hard--"react-dom@npm:^19.2.0":- version: 19.2.7- resolution: "react-dom@npm:19.2.7"- dependencies:- scheduler: "npm:^0.27.0"- peerDependencies:- react: ^19.2.7- checksum: 10c0/970ff600f6e80d47d39e2f226f12f226173b3cba3382efc97c5f0cd663de9af38c7a4c11c213fb936094faeac83060d660247accaa96b752180d5b951b9cfecb- languageName: node- linkType: hard--"react-markdown@npm:^10.1.0":- version: 10.1.0- resolution: "react-markdown@npm:10.1.0"- dependencies:- "@types/hast": "npm:^3.0.0"- "@types/mdast": "npm:^4.0.0"- devlop: "npm:^1.0.0"- hast-util-to-jsx-runtime: "npm:^2.0.0"- html-url-attributes: "npm:^3.0.0"- mdast-util-to-hast: "npm:^13.0.0"- remark-parse: "npm:^11.0.0"- remark-rehype: "npm:^11.0.0"- unified: "npm:^11.0.0"- unist-util-visit: "npm:^5.0.0"- vfile: "npm:^6.0.0"- peerDependencies:- "@types/react": ">=18"- react: ">=18"- checksum: 10c0/4a5dc7d15ca6d05e9ee95318c1904f83b111a76f7588c44f50f1d54d4c97193b84e4f64c4b592057c989228238a2590306cedd0c4d398e75da49262b2b5ae1bf- languageName: node- linkType: hard--"react-reconciler@npm:^0.33.0":- version: 0.33.0- resolution: "react-reconciler@npm:0.33.0"- dependencies:- scheduler: "npm:^0.27.0"- peerDependencies:- react: ^19.2.0- checksum: 10c0/3f7b27ea8d0ff4c8bf0e402a285e1af9b7d0e6f4c1a70a28f4384938bc1130bc82a90a31df0b79ef5e380e2e55e2598bd90b4dbf802b1203d735ba0355817d3a- languageName: node- linkType: hard--"react@npm:^19.0.0":- version: 19.2.6- resolution: "react@npm:19.2.6"- checksum: 10c0/66afde33b9a9ee87b1e1cae39d8e7e040d1262e719524fd70660c4d4ce79929c532ac19fc3df5a911edaf02768fdf2c49de4ede1ba99bc6aad72796e0e26e798- languageName: node- linkType: hard--"react@npm:^19.2.0":- version: 19.2.7- resolution: "react@npm:19.2.7"- checksum: 10c0/0bd0e2f1bbd4ba97561c6597bf8a5fec05e6476fe61e165c1065598d16668efc6715205599c94d3ddd49d36cb0f21cbf1b9bcc18ee840b805ce222c3e8d558ac- languageName: node- linkType: hard--"readdirp@npm:^4.0.1":- version: 4.1.2- resolution: "readdirp@npm:4.1.2"- checksum: 10c0/60a14f7619dec48c9c850255cd523e2717001b0e179dc7037cfa0895da7b9e9ab07532d324bfb118d73a710887d1e35f79c495fa91582784493e085d18c72c62- languageName: node- linkType: hard--"remark-parse@npm:^11.0.0":- version: 11.0.0- resolution: "remark-parse@npm:11.0.0"- dependencies:- "@types/mdast": "npm:^4.0.0"- mdast-util-from-markdown: "npm:^2.0.0"- micromark-util-types: "npm:^2.0.0"- unified: "npm:^11.0.0"- checksum: 10c0/6eed15ddb8680eca93e04fcb2d1b8db65a743dcc0023f5007265dda558b09db595a087f622062ccad2630953cd5cddc1055ce491d25a81f3317c858348a8dd38- languageName: node- linkType: hard--"remark-rehype@npm:^11.0.0":- version: 11.1.2- resolution: "remark-rehype@npm:11.1.2"- dependencies:- "@types/hast": "npm:^3.0.0"- "@types/mdast": "npm:^4.0.0"- mdast-util-to-hast: "npm:^13.0.0"- unified: "npm:^11.0.0"- vfile: "npm:^6.0.0"- checksum: 10c0/f9eccacfb596d9605581dc05bfad28635d6ded5dd0a18e88af5fd4df0d3fcf9612e1501d4513bc2164d833cfe9636dab20400080b09e53f155c6e1442a1231fb- languageName: node- linkType: hard--"restore-cursor@npm:^4.0.0":- version: 4.0.0- resolution: "restore-cursor@npm:4.0.0"- dependencies:- onetime: "npm:^5.1.0"- signal-exit: "npm:^3.0.2"- checksum: 10c0/6f7da8c5e422ac26aa38354870b1afac09963572cf2879443540449068cb43476e9cbccf6f8de3e0171e0d6f7f533c2bc1a0a008003c9a525bbc098e89041318- languageName: node- linkType: hard--"rolldown@npm:1.0.3":- version: 1.0.3- resolution: "rolldown@npm:1.0.3"- dependencies:- "@oxc-project/types": "npm:=0.133.0"- "@rolldown/binding-android-arm64": "npm:1.0.3"- "@rolldown/binding-darwin-arm64": "npm:1.0.3"- "@rolldown/binding-darwin-x64": "npm:1.0.3"- "@rolldown/binding-freebsd-x64": "npm:1.0.3"- "@rolldown/binding-linux-arm-gnueabihf": "npm:1.0.3"- "@rolldown/binding-linux-arm64-gnu": "npm:1.0.3"- "@rolldown/binding-linux-arm64-musl": "npm:1.0.3"- "@rolldown/binding-linux-ppc64-gnu": "npm:1.0.3"- "@rolldown/binding-linux-s390x-gnu": "npm:1.0.3"- "@rolldown/binding-linux-x64-gnu": "npm:1.0.3"- "@rolldown/binding-linux-x64-musl": "npm:1.0.3"- "@rolldown/binding-openharmony-arm64": "npm:1.0.3"- "@rolldown/binding-wasm32-wasi": "npm:1.0.3"- "@rolldown/binding-win32-arm64-msvc": "npm:1.0.3"- "@rolldown/binding-win32-x64-msvc": "npm:1.0.3"- "@rolldown/pluginutils": "npm:^1.0.0"- dependenciesMeta:- "@rolldown/binding-android-arm64":- optional: true- "@rolldown/binding-darwin-arm64":- optional: true- "@rolldown/binding-darwin-x64":- optional: true- "@rolldown/binding-freebsd-x64":- optional: true- "@rolldown/binding-linux-arm-gnueabihf":- optional: true- "@rolldown/binding-linux-arm64-gnu":- optional: true- "@rolldown/binding-linux-arm64-musl":- optional: true- "@rolldown/binding-linux-ppc64-gnu":- optional: true- "@rolldown/binding-linux-s390x-gnu":- optional: true- "@rolldown/binding-linux-x64-gnu":- optional: true- "@rolldown/binding-linux-x64-musl":- optional: true- "@rolldown/binding-openharmony-arm64":- optional: true- "@rolldown/binding-wasm32-wasi":- optional: true- "@rolldown/binding-win32-arm64-msvc":- optional: true- "@rolldown/binding-win32-x64-msvc":- optional: true- bin:- rolldown: ./bin/cli.mjs- checksum: 10c0/5f9dd47b7abf203b16bc600db68542f245e974c800e59ff50b76157d1dada1403657690435b036fabca88e93d13a67c31abe5cfaa6f61ce33717f61720204cdf- languageName: node- linkType: hard--"run-async@npm:^4.0.6":- version: 4.0.6- resolution: "run-async@npm:4.0.6"- checksum: 10c0/3e512c689d356238a06a59839deddeb09aec23bc66f780fe970fcf12b64bfc00c6880e9530ea22b8cf88a927145561f5a43343d8be87166e849ec0daaa3d4cf4- languageName: node- linkType: hard--"safer-buffer@npm:>= 2.1.2 < 3.0.0":- version: 2.1.2- resolution: "safer-buffer@npm:2.1.2"- checksum: 10c0/7e3c8b2e88a1841c9671094bbaeebd94448111dd90a81a1f606f3f67708a6ec57763b3b47f06da09fc6054193e0e6709e77325415dc8422b04497a8070fa02d4- languageName: node- linkType: hard--"scheduler@npm:^0.27.0":- version: 0.27.0- resolution: "scheduler@npm:0.27.0"- checksum: 10c0/4f03048cb05a3c8fddc45813052251eca00688f413a3cee236d984a161da28db28ba71bd11e7a3dd02f7af84ab28d39fb311431d3b3772fed557945beb00c452- languageName: node- linkType: hard--"semver@npm:7.6.3":- version: 7.6.3- resolution: "semver@npm:7.6.3"- bin:- semver: bin/semver.js- checksum: 10c0/88f33e148b210c153873cb08cfe1e281d518aaa9a666d4d148add6560db5cd3c582f3a08ccb91f38d5f379ead256da9931234ed122057f40bb5766e65e58adaf- languageName: node- linkType: hard--"semver@npm:^7.3.5":- version: 7.8.0- resolution: "semver@npm:7.8.0"- bin:- semver: bin/semver.js- checksum: 10c0/8f096ca9b80ffd47b308d03f9ce8c873e27e2983f36023c559cdc92c51e8433fc23ebbfe57ec9623fc155636a6961ee989501099841ae4bb1babc8d2b3f048cd- languageName: node- linkType: hard--"semver@npm:^7.8.5":- version: 7.8.5- resolution: "semver@npm:7.8.5"- bin:- semver: bin/semver.js- checksum: 10c0/b1f3127a5be8125a94f37188b361c212466c292c6910adce3ec106cff5dc211ccaedc4739c11bb70fda59d6fc1f040a9bca289f4e093451521a2372e5231fe0c- languageName: node- linkType: hard--"sharp@npm:^0.35.3":- version: 0.35.4- resolution: "sharp@npm:0.35.4"- dependencies:- "@img/colour": "npm:^1.1.0"- "@img/sharp-darwin-arm64": "npm:0.35.4"- "@img/sharp-darwin-x64": "npm:0.35.4"- "@img/sharp-freebsd-wasm32": "npm:0.35.4"- "@img/sharp-libvips-darwin-arm64": "npm:1.3.3"- "@img/sharp-libvips-darwin-x64": "npm:1.3.3"- "@img/sharp-libvips-linux-arm": "npm:1.3.3"- "@img/sharp-libvips-linux-arm64": "npm:1.3.3"- "@img/sharp-libvips-linux-ppc64": "npm:1.3.3"- "@img/sharp-libvips-linux-riscv64": "npm:1.3.3"- "@img/sharp-libvips-linux-s390x": "npm:1.3.3"- "@img/sharp-libvips-linux-x64": "npm:1.3.3"- "@img/sharp-libvips-linuxmusl-arm64": "npm:1.3.3"- "@img/sharp-libvips-linuxmusl-x64": "npm:1.3.3"- "@img/sharp-linux-arm": "npm:0.35.4"- "@img/sharp-linux-arm64": "npm:0.35.4"- "@img/sharp-linux-ppc64": "npm:0.35.4"- "@img/sharp-linux-riscv64": "npm:0.35.4"- "@img/sharp-linux-s390x": "npm:0.35.4"- "@img/sharp-linux-x64": "npm:0.35.4"- "@img/sharp-linuxmusl-arm64": "npm:0.35.4"- "@img/sharp-linuxmusl-x64": "npm:0.35.4"- "@img/sharp-webcontainers-wasm32": "npm:0.35.4"- "@img/sharp-win32-arm64": "npm:0.35.4"- "@img/sharp-win32-ia32": "npm:0.35.4"- "@img/sharp-win32-x64": "npm:0.35.4"- detect-libc: "npm:^2.1.2"- semver: "npm:^7.8.5"- dependenciesMeta:- "@img/sharp-darwin-arm64":- optional: true- "@img/sharp-darwin-x64":- optional: true- "@img/sharp-freebsd-wasm32":- optional: true- "@img/sharp-libvips-darwin-arm64":- optional: true- "@img/sharp-libvips-darwin-x64":- optional: true- "@img/sharp-libvips-linux-arm":- optional: true- "@img/sharp-libvips-linux-arm64":- optional: true- "@img/sharp-libvips-linux-ppc64":- optional: true- "@img/sharp-libvips-linux-riscv64":- optional: true- "@img/sharp-libvips-linux-s390x":- optional: true- "@img/sharp-libvips-linux-x64":- optional: true- "@img/sharp-libvips-linuxmusl-arm64":- optional: true- "@img/sharp-libvips-linuxmusl-x64":- optional: true- "@img/sharp-linux-arm":- optional: true- "@img/sharp-linux-arm64":- optional: true- "@img/sharp-linux-ppc64":- optional: true- "@img/sharp-linux-riscv64":- optional: true- "@img/sharp-linux-s390x":- optional: true- "@img/sharp-linux-x64":- optional: true- "@img/sharp-linuxmusl-arm64":- optional: true- "@img/sharp-linuxmusl-x64":- optional: true- "@img/sharp-webcontainers-wasm32":- optional: true- "@img/sharp-win32-arm64":- optional: true- "@img/sharp-win32-ia32":- optional: true- "@img/sharp-win32-x64":- optional: true- peerDependenciesMeta:- "@types/node":- optional: true- checksum: 10c0/dbcc0909200cbff98e82805c86085b94afbd45f373897a04b21e52e9bbc1671dc64970350dd3cb6b2d0970f3444be7100d728005dc6620e39b599269ed7e15eb- languageName: node- linkType: hard--"siginfo@npm:^2.0.0":- version: 2.0.0- resolution: "siginfo@npm:2.0.0"- checksum: 10c0/3def8f8e516fbb34cb6ae415b07ccc5d9c018d85b4b8611e3dc6f8be6d1899f693a4382913c9ed51a06babb5201639d76453ab297d1c54a456544acf5c892e34- languageName: node- linkType: hard--"signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.7":- version: 3.0.7- resolution: "signal-exit@npm:3.0.7"- checksum: 10c0/25d272fa73e146048565e08f3309d5b942c1979a6f4a58a8c59d5fa299728e9c2fcd1a759ec870863b1fd38653670240cd420dad2ad9330c71f36608a6a1c912- languageName: node- linkType: hard--"signal-exit@npm:^4.1.0":- version: 4.1.0- resolution: "signal-exit@npm:4.1.0"- checksum: 10c0/41602dce540e46d599edba9d9860193398d135f7ff72cab629db5171516cfae628d21e7bfccde1bbfdf11c48726bc2a6d1a8fb8701125852fbfda7cf19c6aa83- languageName: node- linkType: hard--"slice-ansi@npm:^8.0.0":- version: 8.0.0- resolution: "slice-ansi@npm:8.0.0"- dependencies:- ansi-styles: "npm:^6.2.3"- is-fullwidth-code-point: "npm:^5.1.0"- checksum: 10c0/0ce4aa91febb7cea4a00c2c27bb820fa53b6d2862ce0f80f7120134719f7914fc416b0ed966cf35250a3169e152916392f35917a2d7cad0fcc5d8b841010fa9a- languageName: node- linkType: hard--"source-map-js@npm:^1.2.1":- version: 1.2.1- resolution: "source-map-js@npm:1.2.1"- checksum: 10c0/7bda1fc4c197e3c6ff17de1b8b2c20e60af81b63a52cb32ec5a5d67a20a7d42651e2cb34ebe93833c5a2a084377e17455854fee3e21e7925c64a51b6a52b0faf- languageName: node- linkType: hard--"space-separated-tokens@npm:^2.0.0":- version: 2.0.2- resolution: "space-separated-tokens@npm:2.0.2"- checksum: 10c0/6173e1d903dca41dcab6a2deed8b4caf61bd13b6d7af8374713500570aa929ff9414ae09a0519f4f8772df993300305a395d4871f35bc4ca72b6db57e1f30af8- languageName: node- linkType: hard--"stack-utils@npm:^2.0.6":- version: 2.0.6- resolution: "stack-utils@npm:2.0.6"- dependencies:- escape-string-regexp: "npm:^2.0.0"- checksum: 10c0/651c9f87667e077584bbe848acaecc6049bc71979f1e9a46c7b920cad4431c388df0f51b8ad7cfd6eed3db97a2878d0fc8b3122979439ea8bac29c61c95eec8a- languageName: node- linkType: hard--"stackback@npm:0.0.2":- version: 0.0.2- resolution: "stackback@npm:0.0.2"- checksum: 10c0/89a1416668f950236dd5ac9f9a6b2588e1b9b62b1b6ad8dff1bfc5d1a15dbf0aafc9b52d2226d00c28dffff212da464eaeebfc6b7578b9d180cef3e3782c5983- languageName: node- linkType: hard--"std-env@npm:^4.0.0-rc.1":- version: 4.1.0- resolution: "std-env@npm:4.1.0"- checksum: 10c0/2e14b6b490db34cb969a48d9cf7c35bca4a47653914aac2814221baae7b867a5b15940d133625c391621971f98cd2266a5dc7036669960e883f1081db2a56558- languageName: node- linkType: hard--"string-width@npm:^7.0.0":- version: 7.2.0- resolution: "string-width@npm:7.2.0"- dependencies:- emoji-regex: "npm:^10.3.0"- get-east-asian-width: "npm:^1.0.0"- strip-ansi: "npm:^7.1.0"- checksum: 10c0/eb0430dd43f3199c7a46dcbf7a0b34539c76fe3aa62763d0b0655acdcbdf360b3f66f3d58ca25ba0205f42ea3491fa00f09426d3b7d3040e506878fc7664c9b9- languageName: node- linkType: hard--"string-width@npm:^8.1.0, string-width@npm:^8.1.1, string-width@npm:^8.2.0":- version: 8.2.1- resolution: "string-width@npm:8.2.1"- dependencies:- get-east-asian-width: "npm:^1.5.0"- strip-ansi: "npm:^7.1.2"- checksum: 10c0/d467b4eaf4c40a01bb438a2620e77badd2456ffd5131c9973abe4f3acf7c802d5b21f3b6a00a5e33a7fc28ca8f9c103226e01bac61e9f259659c6f46d78e353a- languageName: node- linkType: hard--"stringify-entities@npm:^4.0.0":- version: 4.0.4- resolution: "stringify-entities@npm:4.0.4"- dependencies:- character-entities-html4: "npm:^2.0.0"- character-entities-legacy: "npm:^3.0.0"- checksum: 10c0/537c7e656354192406bdd08157d759cd615724e9d0873602d2c9b2f6a5c0a8d0b1d73a0a08677848105c5eebac6db037b57c0b3a4ec86331117fa7319ed50448- languageName: node- linkType: hard--"strip-ansi@npm:^7.1.0, strip-ansi@npm:^7.1.2":- version: 7.2.0- resolution: "strip-ansi@npm:7.2.0"- dependencies:- ansi-regex: "npm:^6.2.2"- checksum: 10c0/544d13b7582f8254811ea97db202f519e189e59d35740c46095897e254e4f1aa9fe1524a83ad6bc5ad67d4dd6c0281d2e0219ed62b880a6238a16a17d375f221- languageName: node- linkType: hard--"style-to-js@npm:^1.0.0":- version: 1.1.21- resolution: "style-to-js@npm:1.1.21"- dependencies:- style-to-object: "npm:1.0.14"- checksum: 10c0/94231aa80f58f442c3a5ae01a21d10701e5d62f96b4b3e52eab3499077ee52df203cc0df4a1a870707f5e99470859136ea8657b782a5f4ca7934e0ffe662a588- languageName: node- linkType: hard--"style-to-object@npm:1.0.14":- version: 1.0.14- resolution: "style-to-object@npm:1.0.14"- dependencies:- inline-style-parser: "npm:0.2.7"- checksum: 10c0/854d9e9b77afc336e6d7b09348e7939f2617b34eb0895824b066d8cd1790284cb6d8b2ba36be88025b2595d715dba14b299ae76e4628a366541106f639e13679- languageName: node- linkType: hard--"subscriptions-transport-ws@npm:^0.9.16":- version: 0.9.19- resolution: "subscriptions-transport-ws@npm:0.9.19"- dependencies:- backo2: "npm:^1.0.2"- eventemitter3: "npm:^3.1.0"- iterall: "npm:^1.2.1"- symbol-observable: "npm:^1.0.4"- ws: "npm:^5.2.0 || ^6.0.0 || ^7.0.0"- peerDependencies:- graphql: ">=0.10.0"- checksum: 10c0/6f2ade56865f0ba291d3ff82c79781b051c2374873bac853286fedfdbc05001b8c4018ab7cba44af667ead7f573e48d18892d58a8f9ca8d90dfb4bff5c125045- languageName: node- linkType: hard--"symbol-observable@npm:^1.0.4":- version: 1.2.0- resolution: "symbol-observable@npm:1.2.0"- checksum: 10c0/009fee50798ef80ed4b8195048288f108b03de162db07493f2e1fd993b33fafa72d659e832b584da5a2427daa78e5a738fb2a9ab027ee9454252e0bedbcd1fdc- languageName: node- linkType: hard--"tagged-tag@npm:^1.0.0":- version: 1.0.0- resolution: "tagged-tag@npm:1.0.0"- checksum: 10c0/91d25c9ffb86a91f20522cefb2cbec9b64caa1febe27ad0df52f08993ff60888022d771e868e6416cf2e72dab68449d2139e8709ba009b74c6c7ecd4000048d1- languageName: node- linkType: hard--"tar@npm:^7.5.4":- version: 7.5.21- resolution: "tar@npm:7.5.21"- dependencies:- "@isaacs/fs-minipass": "npm:^4.0.0"- chownr: "npm:^3.0.0"- minipass: "npm:^7.1.2"- minizlib: "npm:^3.1.0"- yallist: "npm:^5.0.0"- checksum: 10c0/bce0e51692356078e6f6a909d5c93f5b4c099c097ffea19b1b1bf10385539a429baba26bca59aabbace68c4519d16f2f1c07afe7eaab55876a449a032480fabc- languageName: node- linkType: hard--"terminal-size@npm:^4.0.1":- version: 4.0.1- resolution: "terminal-size@npm:4.0.1"- checksum: 10c0/89afd9d816dd9dbfe4499da9aeea70491bbde4ff4592226a9c8ac71074a7580afead6a78e95ecc35f6d42e09087b55ffcb1019302cd55e0cc957b6ce5c4847e8- languageName: node- linkType: hard--"tinybench@npm:^2.9.0":- version: 2.9.0- resolution: "tinybench@npm:2.9.0"- checksum: 10c0/c3500b0f60d2eb8db65250afe750b66d51623057ee88720b7f064894a6cb7eb93360ca824a60a31ab16dab30c7b1f06efe0795b352e37914a9d4bad86386a20c- languageName: node- linkType: hard--"tinyexec@npm:^1.0.2":- version: 1.2.4- resolution: "tinyexec@npm:1.2.4"- checksum: 10c0/153b8db6b080194b558ff145b9cffc36b80a6e07babd644dcfbe49c807eee668c876049d28bdee90b96304476f883352f2dad91b3f86bc23832532f4363e66ff- languageName: node- linkType: hard--"tinyglobby@npm:^0.2.12, tinyglobby@npm:^0.2.15":- version: 0.2.16- resolution: "tinyglobby@npm:0.2.16"- dependencies:- fdir: "npm:^6.5.0"- picomatch: "npm:^4.0.4"- checksum: 10c0/f2e09fd93dd95c41e522113b686ff6f7c13020962f8698a864a257f3d7737599afc47722b7ab726e12f8a813f779906187911ff8ee6701ede65072671a7e934b- languageName: node- linkType: hard--"tinyglobby@npm:^0.2.17":- version: 0.2.17- resolution: "tinyglobby@npm:0.2.17"- dependencies:- fdir: "npm:^6.5.0"- picomatch: "npm:^4.0.4"- checksum: 10c0/7f7bb0f197c88bc4b20c231e0deca4240ca3bf313a88f5a7fee93a872b84966a4d50220947c0455ad07a60b3b360961c5b7fd979222aeb716a9f99b412002e4c- languageName: node- linkType: hard--"tinyrainbow@npm:^3.1.0":- version: 3.1.0- resolution: "tinyrainbow@npm:3.1.0"- checksum: 10c0/f11cf387a26c5c9255bec141a90ac511b26172981b10c3e50053bc6700ea7d2336edcc4a3a21dbb8412fe7c013477d2ba4d7e4877800f3f8107be5105aad6511- languageName: node- linkType: hard--"tr46@npm:~0.0.3":- version: 0.0.3- resolution: "tr46@npm:0.0.3"- checksum: 10c0/047cb209a6b60c742f05c9d3ace8fa510bff609995c129a37ace03476a9b12db4dbf975e74600830ef0796e18882b2381fb5fb1f6b4f96b832c374de3ab91a11- languageName: node- linkType: hard--"trim-lines@npm:^3.0.0":- version: 3.0.1- resolution: "trim-lines@npm:3.0.1"- checksum: 10c0/3a1611fa9e52aa56a94c69951a9ea15b8aaad760eaa26c56a65330dc8adf99cb282fc07cc9d94968b7d4d88003beba220a7278bbe2063328eb23fb56f9509e94- languageName: node- linkType: hard--"trough@npm:^2.0.0":- version: 2.2.0- resolution: "trough@npm:2.2.0"- checksum: 10c0/58b671fc970e7867a48514168894396dd94e6d9d6456aca427cc299c004fe67f35ed7172a36449086b2edde10e78a71a284ec0076809add6834fb8f857ccb9b0- languageName: node- linkType: hard--"tsconfck@npm:^3.0.3":- version: 3.1.6- resolution: "tsconfck@npm:3.1.6"- peerDependencies:- typescript: ^5.0.0- peerDependenciesMeta:- typescript:- optional: true- bin:- tsconfck: bin/tsconfck.js- checksum: 10c0/269c3c513540be44844117bb9b9258fe6f8aeab026d32aeebf458d5299125f330711429dbb556dbf125a0bc25f4a81e6c24ac96de2740badd295c3fb400f66c4- languageName: node- linkType: hard--"tslib@npm:^1.9.3":- version: 1.14.1- resolution: "tslib@npm:1.14.1"- checksum: 10c0/69ae09c49eea644bc5ebe1bca4fa4cc2c82b7b3e02f43b84bd891504edf66dbc6b2ec0eef31a957042de2269139e4acff911e6d186a258fb14069cd7f6febce2- languageName: node- linkType: hard--"tslib@npm:^2.0.0, tslib@npm:^2.4.0":- version: 2.8.1- resolution: "tslib@npm:2.8.1"- checksum: 10c0/9c4759110a19c53f992d9aae23aac5ced636e99887b51b9e61def52611732872ff7668757d4e4c61f19691e36f4da981cd9485e869b4a7408d689f6bf1f14e62- languageName: node- linkType: hard--"tsx@npm:^4.0.0":- version: 4.22.2- resolution: "tsx@npm:4.22.2"- dependencies:- esbuild: "npm:~0.28.0"- fsevents: "npm:~2.3.3"- dependenciesMeta:- fsevents:- optional: true- bin:- tsx: dist/cli.mjs- checksum: 10c0/5e9a9b5577642b6084bac14450379bdb72567a9bf47b3508470f3ccd530693358ab0c5eb86c57c249260f2ffa0549e2e4cedc93cbe526bbae5ef4d215e1d57a3- languageName: node- linkType: hard--"twenty-client-sdk@npm:2.31.0":- version: 2.31.0- resolution: "twenty-client-sdk@npm:2.31.0"- dependencies:- "@genql/runtime": "npm:^2.10.0"- esbuild: "npm:^0.28.1"- graphql: "npm:^16.8.1"- lodash: "npm:^4.17.21"- prettier: "npm:^3.8.3"- checksum: 10c0/03a476db2dd6092875d6929a7f96a72d79c17d95fd9e42963ba2530b3f5ceec3760a96946ec032144976c75004ee2bbbb5791bb2583dd69f7f91c6ac20cd0337- languageName: node- linkType: hard--"twenty-partners@workspace:.":- version: 0.0.0-use.local- resolution: "twenty-partners@workspace:."- dependencies:- "@types/node": "npm:^24.7.2"- "@types/react": "npm:^19.0.0"- "@types/react-dom": "npm:^19"- dotenv: "npm:^16.0.0"- oxlint: "npm:^0.16.0"- react: "npm:^19.0.0"- react-dom: "npm:^19.0.0"- react-markdown: "npm:^10.1.0"- tsx: "npm:^4.0.0"- twenty-client-sdk: "npm:2.31.0"- twenty-sdk: "npm:2.31.0"- typescript: "npm:^5.9.3"- vite-tsconfig-paths: "npm:^4.2.1"- vitest: "npm:^4.0.0"- zod: "npm:^4.1.11"- languageName: unknown- linkType: soft--"twenty-sdk@npm:2.31.0":- version: 2.31.0- resolution: "twenty-sdk@npm:2.31.0"- dependencies:- "@sniptt/guards": "npm:^0.2.0"- axios: "npm:^1.16.0"- chalk: "npm:^5.3.0"- chokidar: "npm:^4.0.0"- commander: "npm:^12.0.0"- esbuild: "npm:^0.28.1"- graphql: "npm:^16.8.1"- graphql-sse: "npm:^2.5.4"- ink: "npm:^6.8.0"- inquirer: "npm:^14.0.0"- jsonc-parser: "npm:^3.2.0"- preact: "npm:^10.28.3"- react: "npm:^19.2.0"- react-dom: "npm:^19.2.0"- semver: "npm:7.6.3"- sharp: "npm:^0.35.3"- tinyglobby: "npm:^0.2.15"- twenty-client-sdk: "npm:2.31.0"- typescript: "npm:^5.9.3"- uuid: "npm:^13.0.2"- bin:- twenty: dist/cli.cjs- checksum: 10c0/ceb42a2abb29b43243c1db41b8de6ef5a5c3140cafc1cd663026d034b9aa010aa140f656af742d5804b89ace2be9e7eea63b3c4279959aad86253f59c1b95da0- languageName: node- linkType: hard--"type-fest@npm:^5.4.1":- version: 5.6.0- resolution: "type-fest@npm:5.6.0"- dependencies:- tagged-tag: "npm:^1.0.0"- checksum: 10c0/5468a8ffda7f3904e6f7bbd8069eb8b6dd4bd9156e206df7a01d09a73e28cd1afedf74ead9d0fc12841c8c90074194859feca240511c50800962fde1bd9ddcbc- languageName: node- linkType: hard--"typescript@npm:^5.9.3":- version: 5.9.3- resolution: "typescript@npm:5.9.3"- bin:- tsc: bin/tsc- tsserver: bin/tsserver- checksum: 10c0/6bd7552ce39f97e711db5aa048f6f9995b53f1c52f7d8667c1abdc1700c68a76a308f579cd309ce6b53646deb4e9a1be7c813a93baaf0a28ccd536a30270e1c5- languageName: node- linkType: hard--"typescript@patch:typescript@npm%3A^5.9.3#optional!builtin<compat/typescript>":- version: 5.9.3- resolution: "typescript@patch:typescript@npm%3A5.9.3#optional!builtin<compat/typescript>::version=5.9.3&hash=5786d5"- bin:- tsc: bin/tsc- tsserver: bin/tsserver- checksum: 10c0/ad09fdf7a756814dce65bc60c1657b40d44451346858eea230e10f2e95a289d9183b6e32e5c11e95acc0ccc214b4f36289dcad4bf1886b0adb84d711d336a430- languageName: node- linkType: hard--"undici-types@npm:>=7.24.0 <7.24.7":- version: 7.24.6- resolution: "undici-types@npm:7.24.6"- checksum: 10c0/d9cd8befb643ac904615c280a095ba4240531f6bb4a5e75a22a7483630ca8d3f1016d2ab6ace6ceda1f63b3a2db2fe037fafe121d6917a0187573aa548ff78ca- languageName: node- linkType: hard--"undici-types@npm:~7.16.0":- version: 7.16.0- resolution: "undici-types@npm:7.16.0"- checksum: 10c0/3033e2f2b5c9f1504bdc5934646cb54e37ecaca0f9249c983f7b1fc2e87c6d18399ebb05dc7fd5419e02b2e915f734d872a65da2e3eeed1813951c427d33cc9a- languageName: node- linkType: hard--"undici@npm:^6.25.0":- version: 6.28.0- resolution: "undici@npm:6.28.0"- checksum: 10c0/3029a70df06b38b5b2f30732932a1e92544c753cd82c8abdf0d35afad48e0ba91612e79fe3a442dbbb9434d6a9eba2b714d5ea28984c903dda2b5d5444f38354- languageName: node- linkType: hard--"unfetch@npm:^4.2.0":- version: 4.2.0- resolution: "unfetch@npm:4.2.0"- checksum: 10c0/a5c0a896a6f09f278b868075aea65652ad185db30e827cb7df45826fe5ab850124bf9c44c4dafca4bf0c55a0844b17031e8243467fcc38dd7a7d435007151f1b- languageName: node- linkType: hard--"unified@npm:^11.0.0":- version: 11.0.5- resolution: "unified@npm:11.0.5"- dependencies:- "@types/unist": "npm:^3.0.0"- bail: "npm:^2.0.0"- devlop: "npm:^1.0.0"- extend: "npm:^3.0.0"- is-plain-obj: "npm:^4.0.0"- trough: "npm:^2.0.0"- vfile: "npm:^6.0.0"- checksum: 10c0/53c8e685f56d11d9d458a43e0e74328a4d6386af51c8ac37a3dcabec74ce5026da21250590d4aff6733ccd7dc203116aae2b0769abc18cdf9639a54ae528dfc9- languageName: node- linkType: hard--"unist-util-is@npm:^6.0.0":- version: 6.0.1- resolution: "unist-util-is@npm:6.0.1"- dependencies:- "@types/unist": "npm:^3.0.0"- checksum: 10c0/5a487d390193811d37a68264e204dbc7c15c40b8fc29b5515a535d921d071134f571d7b5cbd59bcd58d5ce1c0ab08f20fc4a1f0df2287a249c979267fc32ce06- languageName: node- linkType: hard--"unist-util-position@npm:^5.0.0":- version: 5.0.0- resolution: "unist-util-position@npm:5.0.0"- dependencies:- "@types/unist": "npm:^3.0.0"- checksum: 10c0/dde3b31e314c98f12b4dc6402f9722b2bf35e96a4f2d463233dd90d7cde2d4928074a7a11eff0a5eb1f4e200f27fc1557e0a64a7e8e4da6558542f251b1b7400- languageName: node- linkType: hard--"unist-util-stringify-position@npm:^4.0.0":- version: 4.0.0- resolution: "unist-util-stringify-position@npm:4.0.0"- dependencies:- "@types/unist": "npm:^3.0.0"- checksum: 10c0/dfe1dbe79ba31f589108cb35e523f14029b6675d741a79dea7e5f3d098785045d556d5650ec6a8338af11e9e78d2a30df12b1ee86529cded1098da3f17ee999e- languageName: node- linkType: hard--"unist-util-visit-parents@npm:^6.0.0":- version: 6.0.2- resolution: "unist-util-visit-parents@npm:6.0.2"- dependencies:- "@types/unist": "npm:^3.0.0"- unist-util-is: "npm:^6.0.0"- checksum: 10c0/f1e4019dbd930301825895e3737b1ee0cd682f7622ddd915062135cbb39f8c090aaece3a3b5eae1f2ea52ec33f0931abb8f8a8b5c48a511a4203e3d360a8cd49- languageName: node- linkType: hard--"unist-util-visit@npm:^5.0.0":- version: 5.1.0- resolution: "unist-util-visit@npm:5.1.0"- dependencies:- "@types/unist": "npm:^3.0.0"- unist-util-is: "npm:^6.0.0"- unist-util-visit-parents: "npm:^6.0.0"- checksum: 10c0/a56e1bbbf63fcb55abe379e660b9a3367787e8be1e2473bdb7e86cfa6f32b6c1fa0092432d7040b8a30b2fc674bbbe024ffe6d03c3d6bf4839b064f584463a4e- languageName: node- linkType: hard--"utility-types@npm:^3.10.0":- version: 3.11.0- resolution: "utility-types@npm:3.11.0"- checksum: 10c0/2f1580137b0c3e6cf5405f37aaa8f5249961a76d26f1ca8efc0ff49a2fc0e0b2db56de8e521a174d075758e0c7eb3e590edec0832eb44478b958f09914920f19- languageName: node- linkType: hard--"uuid@npm:^13.0.2":- version: 13.0.2- resolution: "uuid@npm:13.0.2"- bin:- uuid: dist-node/bin/uuid- checksum: 10c0/32c7ee84fa7c7966cc09b3a1514a752a8e2f609f15c00033fbaedc0255d577d1877b839f11ee537f37e587bbc620bbb98c3b3a1482931b8ed47d79497cd7a7cd- languageName: node- linkType: hard--"vfile-message@npm:^4.0.0":- version: 4.0.3- resolution: "vfile-message@npm:4.0.3"- dependencies:- "@types/unist": "npm:^3.0.0"- unist-util-stringify-position: "npm:^4.0.0"- checksum: 10c0/33d9f219610d27987689bb14fa5573d2daa146941d1a05416dd7702c4215b23f44ed81d059e70d0e4e24f9a57d5f4dc9f18d35a993f04cf9446a7abe6d72d0c0- languageName: node- linkType: hard--"vfile@npm:^6.0.0":- version: 6.0.3- resolution: "vfile@npm:6.0.3"- dependencies:- "@types/unist": "npm:^3.0.0"- vfile-message: "npm:^4.0.0"- checksum: 10c0/e5d9eb4810623f23758cfc2205323e33552fb5972e5c2e6587babe08fe4d24859866277404fb9e2a20afb71013860d96ec806cb257536ae463c87d70022ab9ef- languageName: node- linkType: hard--"vite-tsconfig-paths@npm:^4.2.1":- version: 4.3.2- resolution: "vite-tsconfig-paths@npm:4.3.2"- dependencies:- debug: "npm:^4.1.1"- globrex: "npm:^0.1.2"- tsconfck: "npm:^3.0.3"- peerDependencies:- vite: "*"- peerDependenciesMeta:- vite:- optional: true- checksum: 10c0/f390ac1d1c3992fc5ac50f9274c1090f8b55ab34a89ea88893db9a6924a3b26c9f64bc1163615150ad100749db73b6b2cf1d57f6cd60df6e762ceb5b8ad30024- languageName: node- linkType: hard--"vite@npm:^6.0.0 || ^7.0.0 || ^8.0.0":- version: 8.0.16- resolution: "vite@npm:8.0.16"- dependencies:- fsevents: "npm:~2.3.3"- lightningcss: "npm:^1.32.0"- picomatch: "npm:^4.0.4"- postcss: "npm:^8.5.15"- rolldown: "npm:1.0.3"- tinyglobby: "npm:^0.2.17"- peerDependencies:- "@types/node": ^20.19.0 || >=22.12.0- "@vitejs/devtools": ^0.1.18- esbuild: ^0.27.0 || ^0.28.0- jiti: ">=1.21.0"- less: ^4.0.0- sass: ^1.70.0- sass-embedded: ^1.70.0- stylus: ">=0.54.8"- sugarss: ^5.0.0- terser: ^5.16.0- tsx: ^4.8.1- yaml: ^2.4.2- dependenciesMeta:- fsevents:- optional: true- peerDependenciesMeta:- "@types/node":- optional: true- "@vitejs/devtools":- optional: true- esbuild:- optional: true- jiti:- optional: true- less:- optional: true- sass:- optional: true- sass-embedded:- optional: true- stylus:- optional: true- sugarss:- optional: true- terser:- optional: true- tsx:- optional: true- yaml:- optional: true- bin:- vite: bin/vite.js- checksum: 10c0/d75be3fbe2f63e6a8145325970338afaf0dd4d96ba9175c13f9a286fd5f95afc489401b693e4fa6c0899a4dd0e137be91cdf9401a40a635563911ad5036e3467- languageName: node- linkType: hard--"vitest@npm:^4.0.0":- version: 4.1.11- resolution: "vitest@npm:4.1.11"- dependencies:- "@vitest/expect": "npm:4.1.11"- "@vitest/mocker": "npm:4.1.11"- "@vitest/pretty-format": "npm:4.1.11"- "@vitest/runner": "npm:4.1.11"- "@vitest/snapshot": "npm:4.1.11"- "@vitest/spy": "npm:4.1.11"- "@vitest/utils": "npm:4.1.11"- es-module-lexer: "npm:^2.0.0"- expect-type: "npm:^1.3.0"- magic-string: "npm:^0.30.21"- obug: "npm:^2.1.1"- pathe: "npm:^2.0.3"- picomatch: "npm:^4.0.3"- std-env: "npm:^4.0.0-rc.1"- tinybench: "npm:^2.9.0"- tinyexec: "npm:^1.0.2"- tinyglobby: "npm:^0.2.15"- tinyrainbow: "npm:^3.1.0"- vite: "npm:^6.0.0 || ^7.0.0 || ^8.0.0"- why-is-node-running: "npm:^2.3.0"- peerDependencies:- "@edge-runtime/vm": "*"- "@opentelemetry/api": ^1.9.0- "@types/node": ^20.0.0 || ^22.0.0 || >=24.0.0- "@vitest/browser-playwright": 4.1.11- "@vitest/browser-preview": 4.1.11- "@vitest/browser-webdriverio": 4.1.11- "@vitest/coverage-istanbul": 4.1.11- "@vitest/coverage-v8": 4.1.11- "@vitest/ui": 4.1.11- happy-dom: "*"- jsdom: "*"- vite: ^6.0.0 || ^7.0.0 || ^8.0.0- peerDependenciesMeta:- "@edge-runtime/vm":- optional: true- "@opentelemetry/api":- optional: true- "@types/node":- optional: true- "@vitest/browser-playwright":- optional: true- "@vitest/browser-preview":- optional: true- "@vitest/browser-webdriverio":- optional: true- "@vitest/coverage-istanbul":- optional: true- "@vitest/coverage-v8":- optional: true- "@vitest/ui":- optional: true- happy-dom:- optional: true- jsdom:- optional: true- vite:- optional: false- bin:- vitest: ./vitest.mjs- checksum: 10c0/3fa0948cf74adcccc8cbcdb4e6d30ada6933bdfb1816ff99200f3d3b689325b37dc483b22535b57b6d911f7a7b64eaa6a5f8da1606cfe7f2466f48000c21e296- languageName: node- linkType: hard--"webidl-conversions@npm:^3.0.0":- version: 3.0.1- resolution: "webidl-conversions@npm:3.0.1"- checksum: 10c0/5612d5f3e54760a797052eb4927f0ddc01383550f542ccd33d5238cfd65aeed392a45ad38364970d0a0f4fea32e1f4d231b3d8dac4a3bdd385e5cf802ae097db- languageName: node- linkType: hard--"whatwg-url@npm:^5.0.0":- version: 5.0.0- resolution: "whatwg-url@npm:5.0.0"- dependencies:- tr46: "npm:~0.0.3"- webidl-conversions: "npm:^3.0.0"- checksum: 10c0/1588bed84d10b72d5eec1d0faa0722ba1962f1821e7539c535558fb5398d223b0c50d8acab950b8c488b4ba69043fd833cc2697056b167d8ad46fac3995a55d5- languageName: node- linkType: hard--"which@npm:^6.0.0":- version: 6.0.1- resolution: "which@npm:6.0.1"- dependencies:- isexe: "npm:^4.0.0"- bin:- node-which: bin/which.js- checksum: 10c0/7e710e54ea36d2d6183bee2f9caa27a3b47b9baf8dee55a199b736fcf85eab3b9df7556fca3d02b50af7f3dfba5ea3a45644189836df06267df457e354da66d5- languageName: node- linkType: hard--"why-is-node-running@npm:^2.3.0":- version: 2.3.0- resolution: "why-is-node-running@npm:2.3.0"- dependencies:- siginfo: "npm:^2.0.0"- stackback: "npm:0.0.2"- bin:- why-is-node-running: cli.js- checksum: 10c0/1cde0b01b827d2cf4cb11db962f3958b9175d5d9e7ac7361d1a7b0e2dc6069a263e69118bd974c4f6d0a890ef4eedfe34cf3d5167ec14203dbc9a18620537054- languageName: node- linkType: hard--"widest-line@npm:^6.0.0":- version: 6.0.0- resolution: "widest-line@npm:6.0.0"- dependencies:- string-width: "npm:^8.1.0"- checksum: 10c0/735f1fdcd97fe765a07bb8b5e73c020bed8e53ab34e83ce0ef01693ba3c914d9e7977fe5f5facf0d0b670297a82dd5e376d3efa0896860dfcdaf7cd6924c0fb7- languageName: node- linkType: hard--"wrap-ansi@npm:^9.0.0":- version: 9.0.2- resolution: "wrap-ansi@npm:9.0.2"- dependencies:- ansi-styles: "npm:^6.2.1"- string-width: "npm:^7.0.0"- strip-ansi: "npm:^7.1.0"- checksum: 10c0/3305839b9a0d6fb930cb63a52f34d3936013d8b0682ff3ec133c9826512620f213800ffa19ea22904876d5b7e9a3c1f40682f03597d986a4ca881fa7b033688c- languageName: node- linkType: hard--"ws@npm:^5.2.0 || ^6.0.0 || ^7.0.0":- version: 7.5.11- resolution: "ws@npm:7.5.11"- peerDependencies:- bufferutil: ^4.0.1- utf-8-validate: ^5.0.2- peerDependenciesMeta:- bufferutil:- optional: true- utf-8-validate:- optional: true- checksum: 10c0/7972670b676fb1ccba73b0899ca3c2e04e8c2075629c2614cced7f556536f96a672bbf4619fc5a06c8b8720bb839a47ca88c69c95dc14c9c61a99fbecba1c866- languageName: node- linkType: hard--"ws@npm:^6.1.4":- version: 6.2.4- resolution: "ws@npm:6.2.4"- dependencies:- async-limiter: "npm:~1.0.0"- checksum: 10c0/5c2b9474164f9cb68c7776a1d10b0461c186f3a69bffb1028fca33eba5ab7206a09173fb0b311d6c5a81c8cf148406f8deb0b7d899542ab8ca67407d99717dad- languageName: node- linkType: hard--"ws@npm:^8.18.0":- version: 8.21.0- resolution: "ws@npm:8.21.0"- peerDependencies:- bufferutil: ^4.0.1- utf-8-validate: ">=5.0.2"- peerDependenciesMeta:- bufferutil:- optional: true- utf-8-validate:- optional: true- checksum: 10c0/ef4a243476283fc49bc7550966c4af4aa0eef56273837211e700de3b664e08604a760cdddcb5ba43c049140e74ccfec5b0ee0bb439e08c2adf9138902fdde5f9- languageName: node- linkType: hard--"yallist@npm:^5.0.0":- version: 5.0.0- resolution: "yallist@npm:5.0.0"- checksum: 10c0/a499c81ce6d4a1d260d4ea0f6d49ab4da09681e32c3f0472dee16667ed69d01dae63a3b81745a24bd78476ec4fcf856114cb4896ace738e01da34b2c42235416- languageName: node- linkType: hard--"yoga-layout@npm:~3.2.1":- version: 3.2.1- resolution: "yoga-layout@npm:3.2.1"- checksum: 10c0/9001e51be993c85e03757e5a04a2b61b8b30c9e5a7865d0156ca87a6431a3b717d51eb4990bfe588189fcfeac688dd9c3de707bbd50d1c344a84e63974cc54a8- languageName: node- linkType: hard--"zen-observable-ts@npm:^0.8.21":- version: 0.8.21- resolution: "zen-observable-ts@npm:0.8.21"- dependencies:- tslib: "npm:^1.9.3"- zen-observable: "npm:^0.8.0"- checksum: 10c0/fe4a02f862b5f7e8ae0f86230c37b84c7d5611f5c206981afb4043e732d04cf7067a6cbe1ba82d20f18b735a3387937195a12542158a631d308ae3959a1d93c4- languageName: node- linkType: hard--"zen-observable@npm:^0.8.0":- version: 0.8.15- resolution: "zen-observable@npm:0.8.15"- checksum: 10c0/71cc2f2bbb537300c3f569e25693d37b3bc91f225cefce251a71c30bc6bb3e7f8e9420ca0eb57f2ac9e492b085b8dfa075fd1e8195c40b83c951dd59c6e4fbf8- languageName: node- linkType: hard--"zod@npm:^4.1.11":- version: 4.4.3- resolution: "zod@npm:4.4.3"- checksum: 10c0/7ea31b558e88f9faf44f31dd185e2e1cbf51fed3081787fb96cc2534749b50c0acfc6da7f0922a7353ed092dd358c7d50c28ea96c94d04af64191bd33152eca3- languageName: node- linkType: hard--"zwitch@npm:^2.0.0":- version: 2.0.4- resolution: "zwitch@npm:2.0.4"- checksum: 10c0/3c7830cdd3378667e058ffdb4cf2bb78ac5711214e2725900873accb23f3dfe5f9e7e5a06dcdc5f29605da976fc45c26d9a13ca334d6eea2245a15e77b8fc06e- languageName: node- linkType: hard