Fresh history cut from cynarAI/evoo antigravity-handoff/project-timeline (Voice First + project timeline). Brand docs/titles as evOo; keep @rakazo/* packages as tech debt. Excludes node_modules, caches, secrets, voice blobs.
23 lines
1.0 KiB
TypeScript
23 lines
1.0 KiB
TypeScript
import * as z from "zod";
|
|
|
|
export const IntegrationProviderIdSchema = z.enum(["composio", "pipedream"]);
|
|
export const IntegrationProviderConfigSchema = z.discriminatedUnion("provider", [
|
|
z.object({ provider: z.literal("composio"), apiKey: z.string().trim().min(1).max(16384) }),
|
|
z.object({
|
|
provider: z.literal("pipedream"),
|
|
clientId: z.string().trim().min(1).max(512),
|
|
clientSecret: z.string().trim().min(1).max(16384),
|
|
projectId: z.string().trim().min(1).max(512),
|
|
environment: z.enum(["production", "development"]).default("production"),
|
|
}),
|
|
]);
|
|
export type IntegrationProviderConfig = z.infer<typeof IntegrationProviderConfigSchema>;
|
|
export type IntegrationProviderId = z.infer<typeof IntegrationProviderIdSchema>;
|
|
export const IntegrationSetupStateSchema = z.object({
|
|
canConfigure: z.boolean(),
|
|
needsSetup: z.boolean(),
|
|
webUrl: z.string().url(),
|
|
providers: z.array(z.object({ id: IntegrationProviderIdSchema, configured: z.boolean() })),
|
|
});
|
|
export type IntegrationSetupState = z.infer<typeof IntegrationSetupStateSchema>;
|