twenty-sdk 0.8.0 → 0.9.0

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.
Files changed (42) hide show
  1. package/dist/cli/commands/dev-once.d.ts +7 -0
  2. package/dist/cli/commands/exec.d.ts +2 -2
  3. package/dist/cli/operations/dev-once.d.ts +13 -0
  4. package/dist/cli/operations/execute.d.ts +2 -2
  5. package/dist/cli/operations/index.d.ts +2 -0
  6. package/dist/cli/operations/server-start.d.ts +1 -0
  7. package/dist/cli/utilities/build/manifest/manifest-extract-config.d.ts +1 -1
  8. package/dist/cli/utilities/build/manifest/utils/add-missing-field-option-ids.d.ts +2 -0
  9. package/dist/cli/utilities/build/manifest/utils/from-role-config-to-role-manifest.d.ts +3 -0
  10. package/dist/cli/utilities/config/config-service.d.ts +3 -1
  11. package/dist/cli/utilities/config/get-config-path.d.ts +1 -1
  12. package/dist/cli/utilities/server/docker-container.d.ts +5 -3
  13. package/dist/cli.cjs +46 -44
  14. package/dist/cli.mjs +2035 -2089
  15. package/dist/{frontComponentHostCommunicationApi-op3Q7sYg.mjs → frontComponentHostCommunicationApi-Bz03t3FY.mjs} +66 -74
  16. package/dist/{frontComponentHostCommunicationApi-DvdpnfNz.js → frontComponentHostCommunicationApi-DyOxvANW.js} +3 -3
  17. package/dist/{get-function-input-schema-BZ7_XyUh-xI83N7kX.mjs → get-function-input-schema-BZ7_XyUh-CtECetlr.mjs} +1 -1
  18. package/dist/{get-function-input-schema-BZ7_XyUh-Bf_NiyDR.js → get-function-input-schema-BZ7_XyUh-D2ypJxjI.js} +1 -1
  19. package/dist/index.cjs +1 -1
  20. package/dist/index.mjs +9 -9
  21. package/dist/operations.cjs +1 -1
  22. package/dist/operations.mjs +14 -13
  23. package/dist/sdk/application/application-config.d.ts +1 -1
  24. package/dist/sdk/common/types/define-entity.type.d.ts +5 -2
  25. package/dist/sdk/index.d.ts +1 -1
  26. package/dist/sdk/logic-functions/define-post-install-logic-function.d.ts +2 -5
  27. package/dist/sdk/logic-functions/define-post-install-logic-function.js.map +1 -1
  28. package/dist/sdk/logic-functions/define-pre-install-logic-function.d.ts +2 -5
  29. package/dist/sdk/logic-functions/define-pre-install-logic-function.js.map +1 -1
  30. package/dist/sdk/logic-functions/install-payload-type.d.ts +5 -0
  31. package/dist/sdk/logic-functions/post-install-logic-function-config.d.ts +4 -0
  32. package/dist/sdk/logic-functions/pre-install-logic-function-config.d.ts +5 -0
  33. package/dist/sdk/roles/define-role.d.ts +2 -2
  34. package/dist/sdk/roles/define-role.js.map +1 -1
  35. package/dist/sdk/roles/role-config.d.ts +7 -0
  36. package/dist/ui/index.cjs +413 -398
  37. package/dist/ui/index.mjs +2164 -2134
  38. package/dist/uninstall-CXlUxs8p.js +189 -0
  39. package/dist/{uninstall-9yB-e13_.mjs → uninstall-CrGYRb-Z.mjs} +993 -663
  40. package/package.json +2 -2
  41. package/dist/sdk/logic-functions/install-logic-function-payload-type.d.ts +0 -4
  42. package/dist/uninstall-BCUbP_Bn.js +0 -178
@@ -0,0 +1,7 @@
1
+ export type AppDevOnceCommandOptions = {
2
+ appPath?: string;
3
+ verbose?: boolean;
4
+ };
5
+ export declare class AppDevOnceCommand {
6
+ execute(options: AppDevOnceCommandOptions): Promise<void>;
7
+ }
@@ -1,8 +1,8 @@
1
1
  export declare class LogicFunctionExecuteCommand {
2
- execute({ appPath, preInstall, postInstall, functionUniversalIdentifier, functionName, payload }: {
2
+ execute({ appPath, postInstall, preInstall, functionUniversalIdentifier, functionName, payload }: {
3
3
  appPath?: string;
4
- preInstall?: boolean;
5
4
  postInstall?: boolean;
5
+ preInstall?: boolean;
6
6
  functionUniversalIdentifier?: string;
7
7
  functionName?: string;
8
8
  payload?: string;
@@ -0,0 +1,13 @@
1
+ import { type CommandResult } from '../../cli/types';
2
+ export type AppDevOnceOptions = {
3
+ appPath: string;
4
+ verbose?: boolean;
5
+ onProgress?: (message: string) => void;
6
+ };
7
+ export type AppDevOnceResult = {
8
+ outputDir: string;
9
+ fileCount: number;
10
+ applicationDisplayName: string;
11
+ applicationUniversalIdentifier: string;
12
+ };
13
+ export declare const appDevOnce: (options: AppDevOnceOptions) => Promise<CommandResult<AppDevOnceResult>>;
@@ -4,9 +4,9 @@ export type FunctionExecuteOptions = {
4
4
  remote?: string;
5
5
  payload?: Record<string, unknown>;
6
6
  } & ({
7
- preInstall: true;
8
- } | {
9
7
  postInstall: true;
8
+ } | {
9
+ preInstall: true;
10
10
  } | {
11
11
  functionUniversalIdentifier: string;
12
12
  } | {
@@ -8,6 +8,8 @@ export { appBuild } from './build';
8
8
  export type { AppBuildOptions, AppBuildResult } from './build';
9
9
  export { appDeploy } from './deploy';
10
10
  export type { AppDeployOptions, AppDeployResult } from './deploy';
11
+ export { appDevOnce } from './dev-once';
12
+ export type { AppDevOnceOptions, AppDevOnceResult } from './dev-once';
11
13
  export { appInstall } from './install';
12
14
  export type { AppInstallOptions } from './install';
13
15
  export { appPublish } from './publish';
@@ -1,6 +1,7 @@
1
1
  import { type CommandResult } from '../../cli/types';
2
2
  export type ServerStartOptions = {
3
3
  port?: number;
4
+ test?: boolean;
4
5
  onProgress?: (message: string) => void;
5
6
  };
6
7
  export type ServerStartResult = {
@@ -2,8 +2,8 @@ export declare enum TargetFunction {
2
2
  DefineApplication = "defineApplication",
3
3
  DefineField = "defineField",
4
4
  DefineLogicFunction = "defineLogicFunction",
5
- DefinePreInstallLogicFunction = "definePreInstallLogicFunction",
6
5
  DefinePostInstallLogicFunction = "definePostInstallLogicFunction",
6
+ DefinePreInstallLogicFunction = "definePreInstallLogicFunction",
7
7
  DefineObject = "defineObject",
8
8
  DefineRole = "defineRole",
9
9
  DefineSkill = "defineSkill",
@@ -0,0 +1,2 @@
1
+ import type { FieldManifest, ObjectFieldManifest } from 'twenty-shared/application';
2
+ export declare const addMissingFieldOptionIds: <T extends FieldManifest | ObjectFieldManifest>(fieldManifest: T) => T;
@@ -0,0 +1,3 @@
1
+ import { type RoleConfig } from '../../../../../sdk/roles/role-config';
2
+ import { type RoleManifest } from 'twenty-shared/application';
3
+ export declare const fromRoleConfigToRoleManifest: (roleConfig: RoleConfig) => RoleManifest;
@@ -8,7 +8,9 @@ export type RemoteConfig = {
8
8
  export declare class ConfigService {
9
9
  private readonly configPath;
10
10
  private static activeRemote;
11
- constructor();
11
+ constructor(options?: {
12
+ configPath?: string;
13
+ });
12
14
  static setActiveRemote(name?: string): void;
13
15
  static getActiveRemote(): string;
14
16
  private getActiveRemoteName;
@@ -1 +1 @@
1
- export declare const getConfigPath: () => string;
1
+ export declare const getConfigPath: (test?: boolean) => string;
@@ -1,7 +1,9 @@
1
1
  export declare const CONTAINER_NAME = "twenty-app-dev";
2
+ export declare const TEST_CONTAINER_NAME = "twenty-app-dev-test";
2
3
  export declare const IMAGE = "twentycrm/twenty-app-dev:latest";
3
4
  export declare const DEFAULT_PORT = 2020;
4
- export declare const isContainerRunning: () => boolean;
5
- export declare const getContainerPort: () => number;
6
- export declare const containerExists: () => boolean;
5
+ export declare const DEFAULT_TEST_PORT = 2021;
6
+ export declare const isContainerRunning: (containerName?: string) => boolean;
7
+ export declare const getContainerPort: (containerName?: string) => number;
8
+ export declare const containerExists: (containerName?: string) => boolean;
7
9
  export declare const checkDockerRunning: () => boolean;