UNPKG

@posthog/wizard

Version:

The PostHog wizard helps you to configure your project

76 lines (75 loc) 1.81 kB
import { z } from 'zod'; export declare const ApiUserSchema: z.ZodObject<{ distinct_id: z.ZodString; organizations: z.ZodArray<z.ZodObject<{ id: z.ZodString; }, "strip", z.ZodTypeAny, { id: string; }, { id: string; }>, "many">; team: z.ZodObject<{ id: z.ZodNumber; organization: z.ZodString; }, "strip", z.ZodTypeAny, { id: number; organization: string; }, { id: number; organization: string; }>; organization: z.ZodObject<{ id: z.ZodString; }, "strip", z.ZodTypeAny, { id: string; }, { id: string; }>; }, "strip", z.ZodTypeAny, { team: { id: number; organization: string; }; distinct_id: string; organizations: { id: string; }[]; organization: { id: string; }; }, { team: { id: number; organization: string; }; distinct_id: string; organizations: { id: string; }[]; organization: { id: string; }; }>; export declare const ApiProjectSchema: z.ZodObject<{ id: z.ZodNumber; uuid: z.ZodString; organization: z.ZodString; api_token: z.ZodString; name: z.ZodString; }, "strip", z.ZodTypeAny, { id: number; organization: string; uuid: string; api_token: string; name: string; }, { id: number; organization: string; uuid: string; api_token: string; name: string; }>; export type ApiUser = z.infer<typeof ApiUserSchema>; export type ApiProject = z.infer<typeof ApiProjectSchema>; export declare function fetchUserData(accessToken: string, baseUrl: string): Promise<ApiUser>; export declare function fetchProjectData(accessToken: string, projectId: number, baseUrl: string): Promise<ApiProject>;