UNPKG

@userfrosting/sprinkle-admin

Version:
41 lines (40 loc) 1.45 kB
import { AlertInterface } from '@userfrosting/sprinkle-core/interfaces'; import { GroupInterface } from '@userfrosting/sprinkle-account/interfaces'; /** * API used to fetch a list of groups. * * This interface is tied to the `GroupsSprunjeAction` API, accessed at the * GET `/api/groups` endpoint and the `GroupsSprunjerResponse` Typescript * interface. * * This composable can be used to access a list of groups, for select purpose * for example. While it uses the Sprunjer on the backend, it doesn't filter * nor sort the data. The Sprunjer should be used directly for that. * * NOTE: This group list is not access controlled. It return all groups, so use * it wisely. */ export declare function useGroupsApi(): { groups: import('vue').Ref<{ id: number; slug: string; name: string; description: string; icon: string; created_at: Date | string; updated_at: Date | string; deleted_at: Date | string | null; }[], GroupInterface[] | { id: number; slug: string; name: string; description: string; icon: string; created_at: Date | string; updated_at: Date | string; deleted_at: Date | string | null; }[]>; error: import('vue').Ref<AlertInterface | null | undefined, AlertInterface | null | undefined>; loading: import('vue').Ref<boolean, boolean>; updateGroups: () => Promise<void>; };