twenty-sdk 0.9.0 → 1.22.0-canary.2
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/cli/utilities/api/api-service.d.ts +5 -2
- package/dist/cli/utilities/api/application-api.d.ts +3 -0
- package/dist/cli/utilities/api/schema-api.d.ts +2 -2
- package/dist/cli/utilities/auth/resolve-app-access-token.d.ts +16 -0
- package/dist/cli/utilities/client/client-service.d.ts +2 -2
- package/dist/cli/utilities/config/config-service.d.ts +8 -3
- package/dist/cli/utilities/dev/orchestrator/steps/register-app-orchestrator-step.d.ts +1 -5
- package/dist/cli.cjs +24 -24
- package/dist/cli.mjs +1080 -1091
- package/dist/{frontComponentHostCommunicationApi-DyOxvANW.js → frontComponentHostCommunicationApi-CKQ8bYZc.js} +14 -14
- package/dist/{frontComponentHostCommunicationApi-Bz03t3FY.mjs → frontComponentHostCommunicationApi-DW-iUETt.mjs} +1163 -1439
- package/dist/{get-function-input-schema-BZ7_XyUh-D2ypJxjI.js → get-function-input-schema-BZ7_XyUh-BkpZfzI8.js} +1 -1
- package/dist/{get-function-input-schema-BZ7_XyUh-CtECetlr.mjs → get-function-input-schema-BZ7_XyUh-CaVpAsI0.mjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +2 -2
- package/dist/operations.cjs +1 -1
- package/dist/operations.mjs +2 -2
- package/dist/ui/index.cjs +440 -440
- package/dist/ui/index.mjs +6443 -6368
- package/dist/{uninstall-CrGYRb-Z.mjs → uninstall-BRCM_wgb.mjs} +667 -574
- package/dist/uninstall-_5Pou4yr.js +195 -0
- package/package.json +2 -2
- package/dist/uninstall-CXlUxs8p.js +0 -189
|
@@ -35,6 +35,9 @@ export declare class ApiService {
|
|
|
35
35
|
};
|
|
36
36
|
clientSecret: string;
|
|
37
37
|
}>>;
|
|
38
|
+
rotateApplicationRegistrationClientSecret(...args: Parameters<ApplicationApi['rotateApplicationRegistrationClientSecret']>): Promise<ApiResponse<{
|
|
39
|
+
clientSecret: string;
|
|
40
|
+
}>>;
|
|
38
41
|
createDevelopmentApplication(...args: Parameters<ApplicationApi['createDevelopmentApplication']>): Promise<ApiResponse<{
|
|
39
42
|
id: string;
|
|
40
43
|
universalIdentifier: string;
|
|
@@ -43,10 +46,10 @@ export declare class ApiService {
|
|
|
43
46
|
uninstallApplication(universalIdentifier: string): Promise<ApiResponse>;
|
|
44
47
|
syncMarketplaceCatalog(): Promise<ApiResponse<boolean>>;
|
|
45
48
|
getSchema(options?: {
|
|
46
|
-
|
|
49
|
+
appAccessToken?: string;
|
|
47
50
|
}): Promise<ApiResponse<string>>;
|
|
48
51
|
getMetadataSchema(options?: {
|
|
49
|
-
|
|
52
|
+
appAccessToken?: string;
|
|
50
53
|
}): Promise<ApiResponse<string>>;
|
|
51
54
|
findLogicFunctions(...args: Parameters<LogicFunctionApi['findLogicFunctions']>): Promise<ApiResponse<{
|
|
52
55
|
id: string;
|
|
@@ -22,6 +22,9 @@ export declare class ApplicationApi {
|
|
|
22
22
|
};
|
|
23
23
|
clientSecret: string;
|
|
24
24
|
}>>;
|
|
25
|
+
rotateApplicationRegistrationClientSecret(id: string): Promise<ApiResponse<{
|
|
26
|
+
clientSecret: string;
|
|
27
|
+
}>>;
|
|
25
28
|
createDevelopmentApplication(input: {
|
|
26
29
|
universalIdentifier: string;
|
|
27
30
|
name: string;
|
|
@@ -4,10 +4,10 @@ export declare class SchemaApi {
|
|
|
4
4
|
private readonly client;
|
|
5
5
|
constructor(client: AxiosInstance);
|
|
6
6
|
getSchema(options?: {
|
|
7
|
-
|
|
7
|
+
appAccessToken?: string;
|
|
8
8
|
}): Promise<ApiResponse<string>>;
|
|
9
9
|
getMetadataSchema(options?: {
|
|
10
|
-
|
|
10
|
+
appAccessToken?: string;
|
|
11
11
|
}): Promise<ApiResponse<string>>;
|
|
12
12
|
private introspectEndpoint;
|
|
13
13
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ConfigService } from '../../../cli/utilities/config/config-service';
|
|
2
|
+
/**
|
|
3
|
+
* Exchanges an app registration's clientId + clientSecret for access/refresh
|
|
4
|
+
* tokens via the OAuth client_credentials grant, then persists them in config.
|
|
5
|
+
*/
|
|
6
|
+
export declare const exchangeCredentialsForTokens: (configService: ConfigService, params: {
|
|
7
|
+
clientId: string;
|
|
8
|
+
clientSecret: string;
|
|
9
|
+
}) => Promise<{
|
|
10
|
+
accessToken: string;
|
|
11
|
+
refreshToken?: string | undefined;
|
|
12
|
+
}>;
|
|
13
|
+
/**
|
|
14
|
+
* Returns a valid appAccessToken from config, refreshing it first if expired.
|
|
15
|
+
*/
|
|
16
|
+
export declare const ensureValidAppAccessTokenOrRefresh: (configService: ConfigService) => Promise<string | undefined>;
|
|
@@ -5,8 +5,8 @@ export declare class ClientService {
|
|
|
5
5
|
token?: string;
|
|
6
6
|
skipAuth?: boolean;
|
|
7
7
|
});
|
|
8
|
-
generateCoreClient({ appPath,
|
|
8
|
+
generateCoreClient({ appPath, appAccessToken }: {
|
|
9
9
|
appPath: string;
|
|
10
|
-
|
|
10
|
+
appAccessToken?: string;
|
|
11
11
|
}): Promise<void>;
|
|
12
12
|
}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
export type RemoteConfig = {
|
|
2
2
|
apiUrl: string;
|
|
3
3
|
apiKey?: string;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
twentyCLIRegistrationId?: string;
|
|
5
|
+
twentyCLIRegistrationClientId?: string;
|
|
6
|
+
twentyCLIAccessToken?: string;
|
|
7
|
+
twentyCLIRefreshToken?: string;
|
|
8
|
+
appRegistrationId?: string;
|
|
9
|
+
appRegistrationClientId?: string;
|
|
10
|
+
appAccessToken?: string;
|
|
11
|
+
appRefreshToken?: string;
|
|
7
12
|
};
|
|
8
13
|
export declare class ConfigService {
|
|
9
14
|
private readonly configPath;
|
|
@@ -2,10 +2,6 @@ import { type ApiService } from '../../../../../cli/utilities/api/api-service';
|
|
|
2
2
|
import { type ConfigService } from '../../../../../cli/utilities/config/config-service';
|
|
3
3
|
import { type OrchestratorState } from '../../../../../cli/utilities/dev/orchestrator/dev-mode-orchestrator-state';
|
|
4
4
|
import { type Manifest } from 'twenty-shared/application';
|
|
5
|
-
export type RegisterAppOrchestratorStepOutput = {
|
|
6
|
-
applicationRegistrationId: string | null;
|
|
7
|
-
clientId: string | null;
|
|
8
|
-
};
|
|
9
5
|
export declare class RegisterAppOrchestratorStep {
|
|
10
6
|
private apiService;
|
|
11
7
|
private configService;
|
|
@@ -19,5 +15,5 @@ export declare class RegisterAppOrchestratorStep {
|
|
|
19
15
|
});
|
|
20
16
|
execute(input: {
|
|
21
17
|
manifest: Manifest;
|
|
22
|
-
}): Promise<
|
|
18
|
+
}): Promise<void>;
|
|
23
19
|
}
|