twenty-sdk 0.1.3 → 0.2.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.
- package/dist/application/application-config.d.ts +2 -13
- package/dist/application/fields/field.decorator.d.ts +3 -0
- package/dist/application/function-config.d.ts +3 -19
- package/dist/application/index.d.ts +10 -8
- package/dist/application/objects/object.decorator.d.ts +4 -0
- package/dist/application/permission-flag-type.d.ts +1 -0
- package/dist/application/role-config.d.ts +2 -0
- package/dist/cli/commands/app-sync.command.d.ts +1 -1
- package/dist/cli/commands/app-uninstall.command.d.ts +1 -1
- package/dist/cli/services/api.service.d.ts +3 -2
- package/dist/cli/services/config.service.d.ts +4 -1
- package/dist/cli/services/generate.service.d.ts +1 -0
- package/dist/cli/types/api-response.types.d.ts +12 -0
- package/dist/cli/utils/load-manifest.d.ts +3 -2
- package/dist/cli.cjs +78 -39
- package/dist/cli.mjs +1513 -1454
- package/dist/index.cjs +12 -39
- package/dist/index.mjs +2749 -16950
- package/package.json +1 -1
- package/dist/application/field-metadata/field.decorator.d.ts +0 -14
- package/dist/application/object-metadata/object.decorator.d.ts +0 -11
- package/dist/cli/types/config.types.d.ts +0 -99
- /package/dist/application/{field-metadata → fields}/composite-fields.d.ts +0 -0
- /package/dist/application/{field-metadata → fields}/field-type.d.ts +0 -0
- /package/dist/application/{field-metadata → fields}/on-delete-action.d.ts +0 -0
- /package/dist/application/{field-metadata → fields}/relation-type.d.ts +0 -0
- /package/dist/application/{field-metadata → fields}/relation.decorator.d.ts +0 -0
- /package/dist/application/{object-metadata → objects}/standard-object-ids.d.ts +0 -0
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type
|
|
3
|
-
value?: string;
|
|
4
|
-
description?: string;
|
|
5
|
-
isSecret?: boolean;
|
|
6
|
-
};
|
|
7
|
-
export type ApplicationConfig = SyncableEntityOptions & {
|
|
8
|
-
displayName?: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
icon?: string;
|
|
11
|
-
applicationVariables?: Record<string, ApplicationVariable>;
|
|
12
|
-
};
|
|
13
|
-
export {};
|
|
1
|
+
import { Application } from 'twenty-shared/application';
|
|
2
|
+
export type ApplicationConfig = Application;
|
|
@@ -1,23 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type
|
|
3
|
-
type: 'route';
|
|
4
|
-
path: string;
|
|
5
|
-
httpMethod: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
6
|
-
isAuthRequired: boolean;
|
|
7
|
-
};
|
|
8
|
-
type CronTrigger = {
|
|
9
|
-
type: 'cron';
|
|
10
|
-
pattern: string;
|
|
11
|
-
};
|
|
12
|
-
type DatabaseEventTrigger = {
|
|
13
|
-
type: 'databaseEvent';
|
|
14
|
-
eventName: string;
|
|
15
|
-
};
|
|
16
|
-
type FunctionTrigger = SyncableEntityOptions & (RouteTrigger | CronTrigger | DatabaseEventTrigger);
|
|
17
|
-
export type FunctionConfig = SyncableEntityOptions & {
|
|
1
|
+
import { ServerlessFunctionManifest, ServerlessFunctionTriggerManifest } from 'twenty-shared/application';
|
|
2
|
+
export type FunctionConfig = Omit<ServerlessFunctionManifest, 'handlerPath' | 'handlerName'> & {
|
|
18
3
|
name?: string;
|
|
19
4
|
description?: string;
|
|
20
5
|
timeoutSeconds?: number;
|
|
21
|
-
triggers?:
|
|
6
|
+
triggers?: ServerlessFunctionTriggerManifest[];
|
|
22
7
|
};
|
|
23
|
-
export {};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
export type { ApplicationConfig } from './application-config';
|
|
2
|
-
export type { ActorField, AddressField, CurrencyField, EmailsField, FullNameField, LinksField, PhonesField, RichTextField, } from './
|
|
3
|
-
export { FieldType } from './
|
|
4
|
-
export { Field } from './
|
|
5
|
-
export { OnDeleteAction } from './
|
|
6
|
-
export { RelationType } from './
|
|
7
|
-
export { Relation } from './
|
|
2
|
+
export type { ActorField, AddressField, CurrencyField, EmailsField, FullNameField, LinksField, PhonesField, RichTextField, } from './fields/composite-fields';
|
|
3
|
+
export { FieldType } from './fields/field-type';
|
|
4
|
+
export { Field } from './fields/field.decorator';
|
|
5
|
+
export { OnDeleteAction } from './fields/on-delete-action';
|
|
6
|
+
export { RelationType } from './fields/relation-type';
|
|
7
|
+
export { Relation } from './fields/relation.decorator';
|
|
8
8
|
export type { FunctionConfig } from './function-config';
|
|
9
|
-
export { Object } from './
|
|
10
|
-
export { STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS } from './
|
|
9
|
+
export { Object } from './objects/object.decorator';
|
|
10
|
+
export { STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS } from './objects/standard-object-ids';
|
|
11
|
+
export { PermissionFlag } from './permission-flag-type';
|
|
12
|
+
export type { RoleConfig } from './role-config';
|
|
11
13
|
export type { SyncableEntityOptions } from './syncable-entity-options.type';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PermissionFlagType as PermissionFlag } from 'twenty-shared/constants';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ApiResponse
|
|
1
|
+
import { ApiResponse } from '../types/api-response.types';
|
|
2
|
+
import { PackageJson, ApplicationManifest } from 'twenty-shared/application';
|
|
2
3
|
export declare class ApiService {
|
|
3
4
|
private client;
|
|
4
5
|
private configService;
|
|
@@ -7,7 +8,7 @@ export declare class ApiService {
|
|
|
7
8
|
syncApplication({ packageJson, yarnLock, manifest, }: {
|
|
8
9
|
packageJson: PackageJson;
|
|
9
10
|
yarnLock: string;
|
|
10
|
-
manifest:
|
|
11
|
+
manifest: ApplicationManifest;
|
|
11
12
|
}): Promise<ApiResponse>;
|
|
12
13
|
uninstallApplication(universalIdentifier: string): Promise<ApiResponse>;
|
|
13
14
|
getSchema(): Promise<ApiResponse<string>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type SuccessfulApiResponse<T = unknown> = {
|
|
2
|
+
success: true;
|
|
3
|
+
data: T;
|
|
4
|
+
message?: string;
|
|
5
|
+
};
|
|
6
|
+
type FailingApiResponse = {
|
|
7
|
+
success: false;
|
|
8
|
+
error?: unknown;
|
|
9
|
+
message?: string;
|
|
10
|
+
};
|
|
11
|
+
export type ApiResponse<T = unknown> = SuccessfulApiResponse<T> | FailingApiResponse;
|
|
12
|
+
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Program } from 'typescript';
|
|
2
|
-
import {
|
|
2
|
+
import { Application, PackageJson, ApplicationManifest, RoleManifest } from 'twenty-shared/application';
|
|
3
3
|
export declare const extractTwentyAppConfig: (program: Program) => Application;
|
|
4
|
+
export declare const collectRoles: (program: Program) => Array<RoleManifest>;
|
|
4
5
|
export declare const loadManifest: (appPath: string) => Promise<{
|
|
5
6
|
packageJson: PackageJson;
|
|
6
7
|
yarnLock: string;
|
|
7
|
-
manifest:
|
|
8
|
+
manifest: ApplicationManifest;
|
|
8
9
|
shouldGenerate: boolean;
|
|
9
10
|
}>;
|