UNPKG

@mesh-tech/mesh-cli

Version:

CLI for Mesh platform development utilities

77 lines (76 loc) 3 kB
export declare const ZITADEL_ISSUER = "http://localhost:8080"; export declare const LOGIN_CONTEXT = "local"; export declare const PLATFORM_ORG = "mesh"; export declare const CLI_PROJECT_NAME = "mesh-cli"; export declare const CLI_APP_NAME = "cli"; export declare const CLI_REDIRECT_URI = "http://localhost:9876/callback"; export declare const HUB_PROJECT_NAME = "hub"; export declare const HUB_APP_NAME = "ui"; export declare const hubRedirectUri: () => string; export declare const HUB_DEFAULT_REDIRECT_URI = "http://localhost:9000/oauth2/callback"; export declare const HUB_ROLES: string[]; export declare const ZITADEL_SSM_PARAM = "/mesh-platform/local/dev/platform/zitadel"; export declare const TEST_USERS_SSM_PREFIX = "/mesh-platform/local/dev/temporal/test-users"; export interface LocalTestUser { name: string; email: string; firstName: string; lastName: string; password: string; } export declare const TEST_USERS: LocalTestUser[]; export declare function buildCliAppPayload(): { name: string; redirectUris: string[]; responseTypes: string[]; grantTypes: string[]; appType: string; authMethodType: string; accessTokenType: string; accessTokenRoleAssertion: boolean; idTokenRoleAssertion: boolean; idTokenUserinfoAssertion: boolean; devMode: boolean; }; export declare function readSeederPat(): string; export declare function api(pat: string, method: string, apiPath: string, body?: unknown, orgId?: string): Promise<any>; export declare const isAlreadyExists: (err: any) => boolean; export declare function ensureZitadelProject(pat: string, name: string, opts?: { orgId?: string; describe?: string; logExisting?: boolean; }): Promise<string>; export declare function searchZitadelApp(pat: string, projectId: string, name: string, orgId?: string): Promise<any | undefined>; export interface HubAuthConfig { clientId: string; clientSecret: string; cookieSecret: string; projectId: string; } export declare function hubAuthPath(): string; export declare function readHubAuth(): HubAuthConfig | null; interface HubOidcApp { id: string; oidcConfig?: { clientId?: string; redirectUris?: string[]; postLogoutRedirectUris?: string[]; responseTypes?: string[]; grantTypes?: string[]; accessTokenType?: string; accessTokenRoleAssertion?: boolean; idTokenRoleAssertion?: boolean; idTokenUserinfoAssertion?: boolean; devMode?: boolean; }; } export declare function reconcileHubRedirectUris(pat: string, projectId: string, app: HubOidcApp): Promise<void>; export declare function seedHubAuth(pat: string): Promise<HubAuthConfig>; export declare const OPS_HUB_SECRET_ID = "mesh/local/dev/zitadel/ops-hub"; export interface ZitadelSeedResult { projectId: string; cliClientId: string; hubAuth: HubAuthConfig; } export declare function seedZitadel(awsConfig: object): Promise<ZitadelSeedResult>; export {};