@userfrosting/sprinkle-admin
Version:
Admin Sprinkle for UserFrosting 6
23 lines (22 loc) • 760 B
TypeScript
import { ApiResponse, ApiErrorResponse } from '@userfrosting/sprinkle-core/interfaces';
/**
* API used to update role.
*
* This API is tied to the `RoleUpdateFieldAction` API, accessed at the
* GET `/api/roles/r/{slug}/{field}` endpoint.
*
* This composable can be used to update {field} for a specific role.
*/
export declare function useRoleUpdateApi(): {
submitRoleUpdate: (slug: string, fieldName: string, formData: any) => Promise<void | ApiResponse>;
apiLoading: import('vue').Ref<boolean, boolean>;
apiError: import('vue').Ref<{
title: string;
description: string;
status: number;
} | null, ApiErrorResponse | {
title: string;
description: string;
status: number;
} | null>;
};