Some checks failed
App Prod-Parity E2E Dispatch / dispatch (push) Failing after 10s
CD Storybook UI / build (push) Failing after 3m25s
CD Storybook UI / dispatch (push) Has been skipped
CD deploy main / website-changed-files (push) Successful in 18m8s
CI Agent Skills / changed-files-check (push) Successful in 18m9s
CI Create App E2E minimal / changed-files-check (push) Successful in 24s
CI Create App / changed-files-check (push) Successful in 26s
CI Docs / changed-files-check (push) Successful in 26s
CI Emails / changed-files-check (push) Successful in 28s
CI Example App Hello World / changed-files-check (push) Successful in 23s
CI Front / changed-files-check (push) Has been skipped
CI Example App Postcard / changed-files-check (push) Successful in 27s
CI UI / changed-files-check (push) Has been skipped
CI Utils Test / changed-files-check (push) Successful in 45s
CI Twenty Apps / discover (push) Successful in 1m3s
CD deploy main / deploy-main (push) Failing after 3s
CI Agent Skills / agent-skills-validate (push) Has been skipped
CI Create App / create-app-test (lint) (push) Has been skipped
CI Emails / emails-test (push) Has been skipped
CI Front / front-task (lingui:compile) (push) Has been skipped
CI Front / front-task (lint) (push) Has been skipped
CI Example App Postcard / example-app-postcard (push) Has been skipped
CI UI / ui-task (lint) (push) Has been skipped
CI UI / ui-task (pack-size) (push) Has been skipped
CI UI / ui-task (size) (push) Has been skipped
CI UI / ui-task (test) (push) Has been skipped
CI UI / ui-task (typecheck) (push) Has been skipped
CI Utils Test / utils-test (push) Has been skipped
CI Twenty Apps / ${{ matrix.app.name }} (push) Has been skipped
CI Emails / ci-emails-status-check (push) Successful in 2s
CI Example App Hello World / ci-example-app-hello-world-status-check (push) Successful in 2s
CI Example App Postcard / ci-example-app-postcard-status-check (push) Successful in 3s
CI UI / ui-sb-test (push) Has been skipped
CI Utils Test / ci-utils-test-status-check (push) Successful in 2s
CI Twenty Apps / ci-twenty-apps-status-check (push) Successful in 2s
CI UI / ci-ui-status-check (push) Successful in 2s
CI Desktop / desktop (push) Failing after 1m8s
Push docs to Crowdin / Push documentation to Crowdin (push) Failing after 55s
Push translations to Crowdin / Extract and upload translations (push) Failing after 5s
Push website translations to Crowdin / Extract and upload website translations (push) Failing after 5s
CI Create App / create-app-test (test) (push) Has been skipped
CI Create App / create-app-test (typecheck) (push) Has been skipped
CI Docs / docs-lint (push) Has been skipped
CI Example App Hello World / example-app-hello-world (push) Has been skipped
CI Front / front-task (lingui:extract) (push) Has been skipped
CI Front / front-task (test) (push) Has been skipped
CI Front / front-task (typecheck) (push) Has been skipped
CI UI / ui-sb-build (push) Failing after 1m32s
CI Twenty Apps / ${{ matrix.app.name }} (${{ matrix.server-source }}) (push) Has been skipped
CI Agent Skills / agent-skills-publish (push) Has been skipped
CI Create App / ci-create-app-status-check (push) Successful in 2s
CI Agent Skills / agent-skills-remote-source (push) Has been skipped
CI Create App E2E minimal / create-app-e2e-minimal (push) Has been cancelled
CI E2E Main / e2e-test (push) Has been cancelled
CI Front / front-sb-build (push) Has been cancelled
CI Front / front-build (push) Has been cancelled
CI Create App E2E minimal / ci-create-app-e2e-minimal-status-check (push) Has been cancelled
CI E2E Main / ci-e2e-main-status-check (push) Has been cancelled
CI E2E Main / notify-main-ci-failure (push) Has been cancelled
CI E2E Main / qa-scout-comment (push) Has been cancelled
CI Front / front-sb-test (push) Has been cancelled
CI Front / front-sb-screenshots (push) Has been cancelled
CI Front / ci-front-status-check (push) Has been cancelled
DPA Sub-Processor Sync / sync-subprocessors (push) Failing after 3s
AI Catalog Sync / sync-catalog (push) Failing after 2s
176 lines
5.6 KiB
TypeScript
176 lines
5.6 KiB
TypeScript
import { defineApplication, FieldType } from 'twenty-sdk/define';
|
|
import { DEFAULT_ROLE_UNIVERSAL_IDENTIFIER } from './src/roles/default-function.role';
|
|
|
|
export default defineApplication({
|
|
universalIdentifier: '4ec0391d-18d5-411c-b2f3-266ddc1c3ef7',
|
|
displayName: 'Rich App',
|
|
description: 'A simple rich app',
|
|
applicationVariables: {
|
|
DEFAULT_RECIPIENT_NAME: {
|
|
universalIdentifier: '19e94e59-d4fe-4251-8981-b96d0a9f74de',
|
|
description: 'Default recipient name for postcards',
|
|
value: 'Alex Karp',
|
|
isSecret: false,
|
|
},
|
|
|
|
GREETING_TEXT: {
|
|
universalIdentifier: 'ad19edc5-4cc5-4003-a996-aef53a5c8de0',
|
|
description: 'Free text shown on the postcard',
|
|
type: FieldType.TEXT,
|
|
value: 'Hello from Rich App',
|
|
},
|
|
ENABLE_TRACKING: {
|
|
universalIdentifier: 'b9c58bb2-58c3-4c6c-9877-498ea6c03fde',
|
|
description: 'Toggle delivery tracking',
|
|
type: FieldType.BOOLEAN,
|
|
value: true,
|
|
},
|
|
MAX_POSTCARDS: {
|
|
universalIdentifier: '5f4497e4-9030-4085-85eb-2c48b8d53713',
|
|
description: 'Maximum postcards per batch',
|
|
type: FieldType.NUMBER,
|
|
value: 10,
|
|
},
|
|
DISCOUNT_RATE: {
|
|
universalIdentifier: 'd32f810f-06bb-4d29-b0ee-1dc4228f7cb8',
|
|
description: 'Bulk discount rate applied at checkout',
|
|
type: FieldType.NUMERIC,
|
|
value: 2.5,
|
|
},
|
|
CAMPAIGN_START_DATE: {
|
|
universalIdentifier: '5aa4fcec-e8a3-4bc1-9c7f-762e1f9dfb40',
|
|
description: 'Date the campaign starts',
|
|
type: FieldType.DATE,
|
|
value: '2026-01-01',
|
|
},
|
|
CAMPAIGN_START_AT: {
|
|
universalIdentifier: '273d0cfd-d6ab-4148-8816-c4a5d4b1d600',
|
|
description: 'Exact moment the campaign starts',
|
|
type: FieldType.DATE_TIME,
|
|
value: '2026-01-01T09:00:00.000Z',
|
|
},
|
|
DEFAULT_REGION: {
|
|
universalIdentifier: '76c5c321-b6b6-46eb-b4fc-f9f04bb04227',
|
|
description: 'Default shipping region',
|
|
type: FieldType.SELECT,
|
|
options: [
|
|
{ label: 'Europe', value: 'eu' },
|
|
{ label: 'United States', value: 'us' },
|
|
{ label: 'Asia-Pacific', value: 'apac' },
|
|
],
|
|
value: 'eu',
|
|
},
|
|
ENABLED_CHANNELS: {
|
|
universalIdentifier: '706a2b08-8284-4715-8bc0-922a99cb26af',
|
|
description: 'Channels the app is allowed to use',
|
|
type: FieldType.MULTI_SELECT,
|
|
options: [
|
|
{ label: 'Email', value: 'email' },
|
|
{ label: 'SMS', value: 'sms' },
|
|
{ label: 'Postcard', value: 'postcard' },
|
|
],
|
|
value: ['email', 'postcard'],
|
|
},
|
|
ALLOWED_TAGS: {
|
|
universalIdentifier: 'c1c8a4c9-9130-4ab8-8dce-18d2b50879ed',
|
|
description: 'Free-form tags applied to recipients',
|
|
type: FieldType.ARRAY,
|
|
value: ['vip', 'returning'],
|
|
},
|
|
PROVIDER_CONFIG: {
|
|
universalIdentifier: '183d5285-c70c-4f29-96e0-c68659fbe5ae',
|
|
description: 'Raw JSON configuration for the printing provider',
|
|
type: FieldType.RAW_JSON,
|
|
value: { retries: 3, timeoutMs: 5000 },
|
|
},
|
|
WELCOME_MESSAGE: {
|
|
universalIdentifier: '25a66ff5-8458-498e-9e7e-33ea458a6f3c',
|
|
description: 'Rich text welcome message',
|
|
type: FieldType.RICH_TEXT,
|
|
value: { blocknote: null, markdown: 'Welcome to **Rich App**!' },
|
|
},
|
|
},
|
|
serverVariables: {
|
|
POSTCARD_API_KEY: {
|
|
description: 'API key for the postcard printing service',
|
|
isSecret: true,
|
|
isRequired: true,
|
|
},
|
|
POSTCARD_SENDER_NAME: {
|
|
description: 'Default sender name on postcards',
|
|
isSecret: false,
|
|
isRequired: false,
|
|
},
|
|
POSTCARD_DELIVERY_SPEED: {
|
|
description: 'Delivery speed requested from the provider',
|
|
type: FieldType.SELECT,
|
|
options: [
|
|
{ label: 'Standard', value: 'standard' },
|
|
{ label: 'Express', value: 'express' },
|
|
],
|
|
isSecret: false,
|
|
isRequired: true,
|
|
},
|
|
POSTCARD_DAILY_LIMIT: {
|
|
description: 'Maximum postcards the provider will accept per day',
|
|
type: FieldType.NUMBER,
|
|
isSecret: false,
|
|
isRequired: false,
|
|
},
|
|
POSTCARD_UNIT_PRICE: {
|
|
description: 'Price charged by the provider per postcard',
|
|
type: FieldType.NUMERIC,
|
|
isSecret: false,
|
|
isRequired: false,
|
|
},
|
|
POSTCARD_SANDBOX_MODE: {
|
|
description: 'Send postcards through the provider sandbox instead of production',
|
|
type: FieldType.BOOLEAN,
|
|
isSecret: false,
|
|
isRequired: false,
|
|
},
|
|
POSTCARD_CONTRACT_START_DATE: {
|
|
description: 'Date the provider contract starts',
|
|
type: FieldType.DATE,
|
|
isSecret: false,
|
|
isRequired: false,
|
|
},
|
|
POSTCARD_CONTRACT_RENEWAL_AT: {
|
|
description: 'Exact moment the provider contract renews',
|
|
type: FieldType.DATE_TIME,
|
|
isSecret: false,
|
|
isRequired: false,
|
|
},
|
|
POSTCARD_ENABLED_REGIONS: {
|
|
description: 'Regions the provider is allowed to ship to',
|
|
type: FieldType.MULTI_SELECT,
|
|
options: [
|
|
{ label: 'Europe', value: 'eu' },
|
|
{ label: 'United States', value: 'us' },
|
|
{ label: 'Asia-Pacific', value: 'apac' },
|
|
],
|
|
isSecret: false,
|
|
isRequired: false,
|
|
},
|
|
POSTCARD_WEBHOOK_EVENTS: {
|
|
description: 'Provider webhook events the app subscribes to',
|
|
type: FieldType.ARRAY,
|
|
isSecret: false,
|
|
isRequired: false,
|
|
},
|
|
POSTCARD_PROVIDER_CONFIG: {
|
|
description: 'Raw JSON configuration for the printing provider',
|
|
type: FieldType.RAW_JSON,
|
|
isSecret: false,
|
|
isRequired: false,
|
|
},
|
|
POSTCARD_INVOICE_NOTE: {
|
|
description: 'Rich text note appended to provider invoices',
|
|
type: FieldType.RICH_TEXT,
|
|
isSecret: false,
|
|
isRequired: false,
|
|
},
|
|
},
|
|
defaultRoleUniversalIdentifier: DEFAULT_ROLE_UNIVERSAL_IDENTIFIER,
|
|
});
|