twenty-sdk 0.2.3 → 0.3.0-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +125 -39
- package/dist/ObjectRecordGroupByDateGranularity-CtpRADP1-Bft-VMSh.mjs +3151 -0
- package/dist/ObjectRecordGroupByDateGranularity-CtpRADP1-Duv5iOeZ.js +20 -0
- package/dist/application/define-app.d.ts +18 -0
- package/dist/application/functions/define-function.d.ts +28 -0
- package/dist/application/functions/function-config.d.ts +2 -0
- package/dist/application/functions/triggers/cron-payload-type.d.ts +1 -1
- package/dist/application/index.d.ts +5 -1
- package/dist/application/objects/define-object.d.ts +35 -0
- package/dist/application/roles/define-role.d.ts +26 -0
- package/dist/cli/commands/app-add.command.d.ts +2 -1
- package/dist/cli/utils/config-loader.d.ts +43 -0
- package/dist/cli/utils/display-entity-summary.d.ts +2 -0
- package/dist/cli/utils/display-errors.d.ts +2 -0
- package/dist/cli/utils/display-warnings.d.ts +2 -0
- package/dist/cli/utils/get-new-object-file-content.d.ts +9 -0
- package/dist/cli/utils/get-role-base-file.d.ts +4 -0
- package/dist/cli/utils/load-manifest.d.ts +37 -6
- package/dist/cli/utils/validate-manifest.d.ts +22 -0
- package/dist/cli.cjs +133 -79
- package/dist/cli.mjs +3318 -3163
- package/dist/index.cjs +2 -21
- package/dist/index.mjs +237 -3283
- package/dist/vendor/twenty-shared/ObjectRecordGroupByDateGranularity-BwpmSE4s.js +1 -0
- package/dist/vendor/twenty-shared/{FieldMetadataDefaultValue-CJU0Y2Fi.mjs → ObjectRecordGroupByDateGranularity-CtpRADP1.mjs} +219 -217
- package/dist/vendor/twenty-shared/RatingValues-B_wgYyso.js +1 -0
- package/dist/vendor/twenty-shared/{RatingValues-4GPp8aN_.mjs → RatingValues-DNSj7xKA.mjs} +63 -5
- package/dist/vendor/twenty-shared/application/fieldManifestType.d.ts +1 -0
- package/dist/vendor/twenty-shared/application/fieldManifestType.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/application/index.d.ts +1 -1
- package/dist/vendor/twenty-shared/application/index.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/application/objectManifestType.d.ts +1 -1
- package/dist/vendor/twenty-shared/application/objectManifestType.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/application/roleManifestType.d.ts +0 -1
- package/dist/vendor/twenty-shared/application/roleManifestType.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/application/serverlessFunctionManifestType.d.ts +12 -1
- package/dist/vendor/twenty-shared/application/serverlessFunctionManifestType.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/constants/GroupByDateGranularityThatRequireTimeZone.d.ts +4 -0
- package/dist/vendor/twenty-shared/constants/GroupByDateGranularityThatRequireTimeZone.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/constants/ViewGroupVisibleOptionsMax.d.ts +2 -0
- package/dist/vendor/twenty-shared/constants/ViewGroupVisibleOptionsMax.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/constants/index.d.ts +2 -0
- package/dist/vendor/twenty-shared/constants/index.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/constants.cjs +1 -1
- package/dist/vendor/twenty-shared/constants.mjs +34 -33
- package/dist/vendor/twenty-shared/index.cjs +1 -1
- package/dist/vendor/twenty-shared/index.d.ts +0 -1
- package/dist/vendor/twenty-shared/index.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/index.mjs +2 -5
- package/dist/vendor/twenty-shared/isValidCountryCode-DKpNbkXA.mjs +8533 -0
- package/dist/vendor/twenty-shared/isValidCountryCode-DgPRUhSL.js +4 -0
- package/dist/vendor/twenty-shared/metadata/MetadataValidationError.d.ts +2 -2
- package/dist/vendor/twenty-shared/metadata/MetadataValidationError.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/metadata/all-metadata-name.constant.d.ts +4 -0
- package/dist/vendor/twenty-shared/metadata/all-metadata-name.constant.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/metadata.cjs +1 -1
- package/dist/vendor/twenty-shared/metadata.mjs +12 -8
- package/dist/vendor/twenty-shared/types/ArraySortDirection.d.ts +2 -0
- package/dist/vendor/twenty-shared/types/ArraySortDirection.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/CrudOperationType.d.ts +8 -0
- package/dist/vendor/twenty-shared/types/CrudOperationType.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/ExtractPropertiesThatEndsWithIds.d.ts +4 -0
- package/dist/vendor/twenty-shared/types/ExtractPropertiesThatEndsWithIds.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/types/RecordFilterValueDependencies.d.ts +1 -0
- package/dist/vendor/twenty-shared/types/RecordFilterValueDependencies.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/types/SettingsPath.d.ts +3 -1
- package/dist/vendor/twenty-shared/types/SettingsPath.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/types/ViewFilterOperand.d.ts +1 -1
- package/dist/vendor/twenty-shared/types/ViewFilterOperand.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/types/index.d.ts +3 -0
- package/dist/vendor/twenty-shared/types/index.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/types.cjs +1 -1
- package/dist/vendor/twenty-shared/types.mjs +60 -59
- package/dist/vendor/twenty-shared/utils/array/{upsertIntoArrayOfObjectComparingId.d.ts → upsertIntoArrayOfObjectsComparingId.d.ts} +1 -1
- package/dist/vendor/twenty-shared/utils/array/upsertIntoArrayOfObjectsComparingId.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/array/upsertPropertiesOfItemIntoArrayOfObjectsComparingId.d.ts +6 -0
- package/dist/vendor/twenty-shared/utils/array/upsertPropertiesOfItemIntoArrayOfObjectsComparingId.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/date/isPlainDateAfter.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/date/isPlainDateAfter.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/date/isPlainDateBefore.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/date/isPlainDateBefore.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/date/isPlainDateBeforeOrEqual.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/date/isPlainDateBeforeOrEqual.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/date/isPlainDateInSameMonth.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/date/isPlainDateInSameMonth.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/date/isPlainDateInWeekend.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/date/isPlainDateInWeekend.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/date/isSamePlainDate.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/date/isSamePlainDate.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/date/parseToPlainDateOrThrow.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/date/parseToPlainDateOrThrow.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/date/sortPlainDate.d.ts +5 -0
- package/dist/vendor/twenty-shared/utils/date/sortPlainDate.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/date/turnJSDateToPlainDate.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/date/turnJSDateToPlainDate.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/date/turnPlainDateIntoUserTimeZoneInstantString.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/date/turnPlainDateIntoUserTimeZoneInstantString.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/date/turnPlainDateToShiftedDateInSystemTimeZone.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/date/turnPlainDateToShiftedDateInSystemTimeZone.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/fieldMetadata/index.d.ts +3 -0
- package/dist/vendor/twenty-shared/utils/fieldMetadata/index.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/utils/fieldMetadata/isFieldMetadataNumericKind.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/fieldMetadata/isFieldMetadataNumericKind.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/fieldMetadata/isFieldMetadataSelectKind.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/fieldMetadata/isFieldMetadataSelectKind.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/fieldMetadata/isFieldMetadataTextKind.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/fieldMetadata/isFieldMetadataTextKind.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/types/DateTimePeriod.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/types/DateTimePeriod.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/addUnitToDateTime.d.ts +1 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/addUnitToDateTime.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/addUnitToZonedDateTime.d.ts +5 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/addUnitToZonedDateTime.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/convertCalendarStartDayNonIsoNumberToFirstDayOfTheWeek.d.ts +5 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/convertCalendarStartDayNonIsoNumberToFirstDayOfTheWeek.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/convertFirstDayOfTheWeekToCalendarStartDayNumber.d.ts +5 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/convertFirstDayOfTheWeekToCalendarStartDayNumber.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/getFirstDayOfTheWeekAsISONumber.d.ts +4 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/getFirstDayOfTheWeekAsISONumber.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/getNextPeriodStart.d.ts +8 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/getNextPeriodStart.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/getPeriodStart.d.ts +7 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/getPeriodStart.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/relativeDateFilterStringifiedSchema.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/resolveDateTimeFilter.d.ts +1 -1
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/resolveDateTimeFilter.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/resolveRelativeDateFilter.d.ts +2 -1
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/resolveRelativeDateFilter.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/resolveRelativeDateFilterStringified.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/resolveRelativeDateTimeFilter.d.ts +4 -3
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/resolveRelativeDateTimeFilter.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/resolveRelativeDateTimeFilterStringified.d.ts +5 -3
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/resolveRelativeDateTimeFilterStringified.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/subUnitFromZonedDateTime.d.ts +5 -0
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/subUnitFromZonedDateTime.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/utils/filter/turnRecordFilterIntoGqlOperationFilter.d.ts +1 -1
- package/dist/vendor/twenty-shared/utils/filter/turnRecordFilterIntoGqlOperationFilter.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/utils/index.d.ts +24 -7
- package/dist/vendor/twenty-shared/utils/index.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/utils/url/lowercaseUrlOriginAndRemoveTrailingSlash.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/utils.cjs +2 -3
- package/dist/vendor/twenty-shared/utils.mjs +774 -2484
- package/dist/vendor/twenty-shared/workflow/constants/IfElseBranchPositionOffsets.d.ts +11 -0
- package/dist/vendor/twenty-shared/workflow/constants/IfElseBranchPositionOffsets.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/workflow/index.d.ts +6 -0
- package/dist/vendor/twenty-shared/workflow/index.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/workflow/schemas/filter-action-settings-schema.d.ts +2 -5
- package/dist/vendor/twenty-shared/workflow/schemas/filter-action-settings-schema.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/workflow/schemas/http-request-action-schema.d.ts +1 -1
- package/dist/vendor/twenty-shared/workflow/schemas/http-request-action-settings-schema.d.ts +1 -1
- package/dist/vendor/twenty-shared/workflow/schemas/if-else-action-schema.d.ts +49 -0
- package/dist/vendor/twenty-shared/workflow/schemas/if-else-action-schema.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/workflow/schemas/if-else-action-settings-schema.d.ts +43 -0
- package/dist/vendor/twenty-shared/workflow/schemas/if-else-action-settings-schema.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/workflow/schemas/step-filter-group-schema.d.ts +10 -0
- package/dist/vendor/twenty-shared/workflow/schemas/step-filter-group-schema.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/workflow/schemas/step-filter-schema.d.ts +16 -0
- package/dist/vendor/twenty-shared/workflow/schemas/step-filter-schema.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/workflow/schemas/workflow-action-schema.d.ts +46 -1
- package/dist/vendor/twenty-shared/workflow/schemas/workflow-action-schema.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/workflow/schemas/workflow-run-schema.d.ts +46 -1
- package/dist/vendor/twenty-shared/workflow/schemas/workflow-run-schema.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/workflow/schemas/workflow-run-state-schema.d.ts +46 -1
- package/dist/vendor/twenty-shared/workflow/schemas/workflow-run-state-schema.d.ts.map +1 -1
- package/dist/vendor/twenty-shared/workflow/types/StepIfElseBranch.d.ts +6 -0
- package/dist/vendor/twenty-shared/workflow/types/StepIfElseBranch.d.ts.map +1 -0
- package/dist/vendor/twenty-shared/workflow.cjs +3 -3
- package/dist/vendor/twenty-shared/workflow.mjs +199 -174
- package/package.json +3 -1
- package/dist/_commonjsHelpers-DKOUU3wS.js +0 -1
- package/dist/_commonjsHelpers-DaMA6jEr.mjs +0 -8
- package/dist/cli/utils/get-object-decorated-class.d.ts +0 -4
- package/dist/vendor/twenty-shared/FieldMetadataDefaultValue-CmL_eyqR.js +0 -1
- package/dist/vendor/twenty-shared/LabelIdentifierFieldMetadataTypes-BaWEb4k0.js +0 -1
- package/dist/vendor/twenty-shared/LabelIdentifierFieldMetadataTypes-BzzhC1dx.mjs +0 -55
- package/dist/vendor/twenty-shared/RatingValues-CBa057Mi.js +0 -1
- package/dist/vendor/twenty-shared/isValidCountryCode-DNOavXY6.js +0 -4
- package/dist/vendor/twenty-shared/isValidCountryCode-QjE8dukS.mjs +0 -6850
- package/dist/vendor/twenty-shared/utils/array/upsertIntoArrayOfObjectComparingId.d.ts.map +0 -1
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/getDateFromPlainDate.d.ts +0 -2
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/getDateFromPlainDate.d.ts.map +0 -1
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/getEndUnitOfDateTime.d.ts +0 -6
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/getEndUnitOfDateTime.d.ts.map +0 -1
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/getPlainDateFromDate.d.ts +0 -2
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/getPlainDateFromDate.d.ts.map +0 -1
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/getStartUnitOfDateTime.d.ts +0 -6
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/getStartUnitOfDateTime.d.ts.map +0 -1
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/shiftPointInTimeFromTimezoneDifferenceInMinutesWithSystemTimezone.d.ts +0 -2
- package/dist/vendor/twenty-shared/utils/filter/dates/utils/shiftPointInTimeFromTimezoneDifferenceInMinutesWithSystemTimezone.d.ts.map +0 -1
- package/dist/vendor/twenty-shared/utils/filter/utils/computeTimezoneDifferenceInMinutes.d.ts +0 -2
- package/dist/vendor/twenty-shared/utils/filter/utils/computeTimezoneDifferenceInMinutes.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -30,66 +30,152 @@ npm install twenty-sdk
|
|
|
30
30
|
yarn add twenty-sdk
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
##
|
|
34
|
-
You can either scaffold a new app or add the SDK to an existing one.
|
|
33
|
+
## Usage
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
```
|
|
36
|
+
Usage: twenty [options] [command]
|
|
37
|
+
|
|
38
|
+
CLI for Twenty application development
|
|
39
|
+
|
|
40
|
+
Options:
|
|
41
|
+
--workspace <name> Use a specific workspace configuration (default: "default")
|
|
42
|
+
-V, --version output the version number
|
|
43
|
+
-h, --help display help for command
|
|
44
|
+
|
|
45
|
+
Commands:
|
|
46
|
+
auth Authentication commands
|
|
47
|
+
app Application development commands
|
|
48
|
+
help [command] display help for command
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Global Options
|
|
52
|
+
|
|
53
|
+
- `--workspace <name>`: Use a specific workspace configuration profile. Defaults to `default`. See Configuration for details.
|
|
54
|
+
|
|
55
|
+
## Commands
|
|
56
|
+
|
|
57
|
+
### Auth
|
|
58
|
+
|
|
59
|
+
Authenticate the CLI against your Twenty workspace.
|
|
60
|
+
|
|
61
|
+
- `twenty auth login` — Authenticate with Twenty.
|
|
62
|
+
- Options:
|
|
63
|
+
- `--api-key <key>`: API key for authentication.
|
|
64
|
+
- `--api-url <url>`: Twenty API URL (defaults to your current profile's value or `http://localhost:3000`).
|
|
65
|
+
- Behavior: Prompts for any missing values, persists them to the active workspace profile, and validates the credentials.
|
|
66
|
+
|
|
67
|
+
- `twenty auth logout` — Remove authentication credentials for the active workspace profile.
|
|
68
|
+
|
|
69
|
+
- `twenty auth status` — Print the current authentication status (API URL, masked API key, validity).
|
|
70
|
+
|
|
71
|
+
Examples:
|
|
42
72
|
|
|
43
|
-
## CLI quickstart
|
|
44
73
|
```bash
|
|
45
|
-
#
|
|
74
|
+
# Login interactively (recommended)
|
|
46
75
|
twenty auth login
|
|
47
76
|
|
|
48
|
-
#
|
|
49
|
-
twenty
|
|
77
|
+
# Provide values in flags
|
|
78
|
+
twenty auth login --api-key $TWENTY_API_KEY --api-url https://api.twenty.com
|
|
50
79
|
|
|
51
|
-
#
|
|
52
|
-
twenty
|
|
80
|
+
# Login interactively for a specific workspace profile
|
|
81
|
+
twenty auth login --workspace my-custom-workspace
|
|
82
|
+
|
|
83
|
+
# Check status
|
|
84
|
+
twenty auth status
|
|
85
|
+
|
|
86
|
+
# Logout current profile
|
|
87
|
+
twenty auth logout
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### App
|
|
53
91
|
|
|
54
|
-
|
|
92
|
+
Application development commands.
|
|
93
|
+
|
|
94
|
+
- `twenty app sync [appPath]` — One-time sync of the application to your Twenty workspace.
|
|
95
|
+
- Behavior: Compute your application's manifest and send it to your workspace to sync your application
|
|
96
|
+
|
|
97
|
+
- `twenty app dev [appPath]` — Watch and sync local application changes.
|
|
98
|
+
- Options:
|
|
99
|
+
- `-d, --debounce <ms>`: Debounce delay in milliseconds (default: `1000`).
|
|
100
|
+
- Behavior: Performs an initial sync, then watches the directory for changes and re-syncs after debounced edits. Press Ctrl+C to stop.
|
|
101
|
+
|
|
102
|
+
- `twenty app uninstall [appPath]` — Uninstall the application from the current workspace.
|
|
103
|
+
- Note: `twenty app delete` exists as a hidden alias for backward compatibility.
|
|
104
|
+
|
|
105
|
+
- `twenty app add [entityType]` — Add a new entity to your application.
|
|
106
|
+
- Arguments:
|
|
107
|
+
- `entityType`: one of `function` or `object`. If omitted, an interactive prompt is shown.
|
|
108
|
+
- Options:
|
|
109
|
+
- `--path <path>`: The path where the entity file should be created (relative to the current directory).
|
|
110
|
+
- Behavior:
|
|
111
|
+
- `object`: prompts for singular/plural names and labels, then creates a new object definition file.
|
|
112
|
+
- `function`: prompts for a name and scaffolds a serverless function file.
|
|
113
|
+
|
|
114
|
+
- `twenty app generate [appPath]` — Generate the typed Twenty client for your application.
|
|
115
|
+
|
|
116
|
+
- `twenty app logs [appPath]` — Stream application function logs.
|
|
117
|
+
- Options:
|
|
118
|
+
- `-u, --functionUniversalIdentifier <id>`: Only show logs for a specific function universal ID.
|
|
119
|
+
- `-n, --functionName <name>`: Only show logs for a specific function name.
|
|
120
|
+
|
|
121
|
+
Examples:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# Start dev mode with default debounce
|
|
55
125
|
twenty app dev
|
|
56
126
|
|
|
57
|
-
#
|
|
127
|
+
# Start dev mode with custom workspace profile
|
|
128
|
+
twenty app dev --workspace my-custom-workspace
|
|
129
|
+
|
|
130
|
+
# Dev mode with custom debounce
|
|
131
|
+
twenty app dev --debounce 1500
|
|
132
|
+
|
|
133
|
+
# One-time sync of the current directory
|
|
58
134
|
twenty app sync
|
|
59
135
|
|
|
60
|
-
#
|
|
61
|
-
twenty app
|
|
62
|
-
|
|
136
|
+
# Add a new object interactively
|
|
137
|
+
twenty app add
|
|
138
|
+
|
|
139
|
+
# Generate client types
|
|
140
|
+
twenty app generate
|
|
63
141
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
142
|
+
# Watch all function logs
|
|
143
|
+
twenty app logs
|
|
144
|
+
|
|
145
|
+
# Watch logs for a specific function by name
|
|
146
|
+
twenty app logs -n my-function
|
|
68
147
|
```
|
|
69
148
|
|
|
70
|
-
##
|
|
71
|
-
Applications are currently stored in [`twenty/packages/twenty-apps`](https://github.com/twentyhq/twenty/tree/main/packages/twenty-apps).
|
|
149
|
+
## Configuration
|
|
72
150
|
|
|
73
|
-
|
|
151
|
+
The CLI stores configuration per user in a JSON file:
|
|
74
152
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
153
|
+
- Location: `~/.twenty/config.json`
|
|
154
|
+
- Structure: Profiles keyed by workspace name. The active profile is selected with `--workspace <name>`.
|
|
155
|
+
|
|
156
|
+
Example configuration file:
|
|
79
157
|
|
|
80
|
-
|
|
81
|
-
|
|
158
|
+
```json
|
|
159
|
+
{
|
|
160
|
+
"profiles": {
|
|
161
|
+
"default": {
|
|
162
|
+
"apiUrl": "http://localhost:3000",
|
|
163
|
+
"apiKey": "<your-api-key>"
|
|
164
|
+
},
|
|
165
|
+
"prod": {
|
|
166
|
+
"apiUrl": "https://api.twenty.com",
|
|
167
|
+
"apiKey": "<your-api-key>"
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
82
171
|
```
|
|
83
172
|
|
|
84
|
-
|
|
85
|
-
- Commit your changes and open a pull request on https://github.com/twentyhq/twenty
|
|
173
|
+
Notes:
|
|
86
174
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
```
|
|
175
|
+
- If a profile is missing, `apiUrl` defaults to `http://localhost:3000` until set.
|
|
176
|
+
- `twenty auth login` writes the `apiUrl` and `apiKey` for the default profile.
|
|
177
|
+
- `twenty auth login --workspace custom-workspace` writes the `apiUrl` and `apiKey` for a custom `custom-workspace` profile.
|
|
91
178
|
|
|
92
|
-
Our team reviews contributions for quality, security, and reusability.
|
|
93
179
|
|
|
94
180
|
## Troubleshooting
|
|
95
181
|
- Auth errors: run `twenty auth login` again and ensure the API key has the required permissions.
|