| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- import {
- Store
- } from "vuex";
- import {Ability} from "@casl/ability";
- import {Rest} from "~/services/queries/rest";
- /**
- * Upgrade du @nuxt/types pour TypeScript
- */
- declare module '@nuxt/types' {
- interface Context {
- $ability(): Ability,
- $rest: Rest
- }
- }
- interface ItemMenu {
- title: string,
- icon?: string,
- to?: string,
- children?: ItemsMenu,
- isExternalLink?: boolean,
- }
- interface ItemsMenu extends Array<ItemMenu> {}
- interface AbilitiesType {
- action: 'display' | 'read' | 'manage',
- subject: string,
- /** an array of fields to which user has (or not) access */
- fields?: string[]
- /** an object of conditions which restricts the rule scope */
- conditions?: any
- /** indicates whether rule allows or forbids something */
- inverted?: boolean
- /** message which explains why rule is forbidden */
- reason?: string
- }
- interface accessState {
- bearer: string,
- accessId: number,
- name: string,
- givenName: string,
- roles: Array<string>,
- abilities: Array<AbilitiesType>,
- isAdminAccess: boolean,
- isAdmin: boolean,
- isAdministratifManager: boolean,
- isPedagogicManager: boolean,
- isFinancialManager: boolean,
- isCaMember: boolean,
- isStudent: boolean,
- isTeacher: boolean,
- isMember: boolean,
- isOther: boolean,
- hasLateralMenu: boolean,
- hasConfigurationMenu: boolean,
- hasAccessesMenu: boolean,
- hasFamilyMenu: boolean
- }
- interface AccessStore extends Store<{profile:{access:accessState}}> {}
- interface organizationState {
- id: number,
- name: string,
- product?: string,
- modules?: Array<string>,
- hasChildren?: boolean,
- networks: Array<string>,
- website?: string,
- subDomain?: string,
- parents: Array<organizationState>,
- }
- interface OrganizationStore extends Store<{profile:{organization:organizationState}}> {}
- interface AnyJson extends Record<string, any> {}
- interface AnyStore extends Store<any> {}
- interface EnumChoice {
- value: string,
- label: string
- }
- interface EnumChoices extends Array<EnumChoice> {}
- import {Query, Repository} from "@vuex-orm/core";
- export type RepositoryOrQuery<R extends Repository = Repository, Q extends Query = Query> = R | Q;
|