@statezero/core
Version:
The type-safe frontend client for StateZero - connect directly to your backend models with zero boilerplate
45 lines (44 loc) • 1.23 kB
TypeScript
/**
* Get current user information (no serializers - simple action)
*
* @param {Object} [axiosOverrides] - Allows overriding Axios request parameters.
* @returns {Promise<Object>} A promise that resolves with the action's result.
*/
export function getUserInfo(axiosOverrides?: Object): Promise<Object>;
export namespace getUserInfo {
let actionName: string;
let title: string;
let app: string;
let permissions: string[];
let configKey: string;
}
/**
* Zod schema for the response of getUserInfo.
*/
export const getUserInfoResponseSchema: z.ZodObject<{
username: z.ZodString;
email: z.ZodString;
is_staff: z.ZodBoolean;
is_superuser: z.ZodBoolean;
date_joined: z.ZodString;
last_login: z.ZodNullable<z.ZodString>;
server_time: z.ZodString;
}, "strip", z.ZodTypeAny, {
username: string;
email: string;
is_staff: boolean;
is_superuser: boolean;
date_joined: string;
last_login: string | null;
server_time: string;
}, {
username: string;
email: string;
is_staff: boolean;
is_superuser: boolean;
date_joined: string;
last_login: string | null;
server_time: string;
}>;
export default getUserInfo;
import { z } from 'zod';