|
|
@@ -13,18 +13,6 @@ import ApiResource from "~/models/ApiResource";
|
|
|
import {AnyJson} from "~/types/enum/data";
|
|
|
import {Record} from "immutable";
|
|
|
|
|
|
-/**
|
|
|
- * Upgrade du @nuxt/types pour TypeScript
|
|
|
- */
|
|
|
-declare module '@nuxt/types' {
|
|
|
- interface Context {
|
|
|
- $ability: Ability
|
|
|
- $dataPersister: DataPersister
|
|
|
- $dataProvider: DataProvider
|
|
|
- $dataDeleter: DataDeleter
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
declare module '@vuex-orm/core' {
|
|
|
interface Query {
|
|
|
getAllRelations: () => Array<string>
|
|
|
@@ -45,38 +33,55 @@ interface AbilitiesType {
|
|
|
reason?: string
|
|
|
}
|
|
|
|
|
|
-interface formState {
|
|
|
- violations: AnyJson
|
|
|
- readonly: boolean
|
|
|
- formFunction: FORM_FUNCTION
|
|
|
- dirty: boolean
|
|
|
- showConfirmToLeave: boolean
|
|
|
- goAfterLeave: string | null
|
|
|
-}
|
|
|
-
|
|
|
interface Alert {
|
|
|
type: TYPE_ALERT
|
|
|
messages: Array<string>
|
|
|
}
|
|
|
|
|
|
-interface pageState {
|
|
|
- alerts: Array<Alert>,
|
|
|
- menusOpened: Record<string, boolean>
|
|
|
+type AnyStore = Store<any>
|
|
|
+
|
|
|
+interface EnumChoice {
|
|
|
+ value: string
|
|
|
+ label: string
|
|
|
+}
|
|
|
+
|
|
|
+interface Filter {
|
|
|
+ readonly key: string
|
|
|
+ readonly value: string | boolean | number
|
|
|
+}
|
|
|
+
|
|
|
+type EnumChoices = Array<EnumChoice>
|
|
|
+
|
|
|
+interface HookProvider {
|
|
|
+ invoke(args: DataProviderArgs): Promise<any>
|
|
|
+}
|
|
|
+interface HookPersister {
|
|
|
+ invoke(args: DataPersisterArgs): Promise<any>
|
|
|
+}
|
|
|
+interface HookDeleter {
|
|
|
+ invoke(args: DataDeleterArgs): Promise<any>
|
|
|
+}
|
|
|
+
|
|
|
+interface Processor {
|
|
|
+ process(data: AnyJson): Promise<any>
|
|
|
}
|
|
|
|
|
|
-interface ormState {
|
|
|
- initialValues: Map<string, Map<number, ApiResource>>
|
|
|
+interface Normalizer {
|
|
|
+ normalize(args: DataPersisterArgs): any
|
|
|
+}
|
|
|
+interface Denormalizer {
|
|
|
+ denormalize(data: any): any
|
|
|
}
|
|
|
|
|
|
interface Historical {
|
|
|
- future?: boolean
|
|
|
- past?: boolean
|
|
|
- present?: boolean
|
|
|
- dateStart?: string
|
|
|
- dateEnd?: string
|
|
|
+ future: boolean
|
|
|
+ past: boolean
|
|
|
+ present: boolean
|
|
|
+ dateStart?: string | null
|
|
|
+ dateEnd?: string | null
|
|
|
}
|
|
|
|
|
|
-interface baseAccessState {
|
|
|
+interface BaseAccessProfile {
|
|
|
id: number | null
|
|
|
name: string | null
|
|
|
givenName: string | null
|
|
|
@@ -84,18 +89,18 @@ interface baseAccessState {
|
|
|
avatarId: number | null
|
|
|
}
|
|
|
|
|
|
-interface baseOrganizationState {
|
|
|
+interface BaseOrganizationProfile {
|
|
|
id: number | null
|
|
|
name: string | null
|
|
|
website?: string | null
|
|
|
}
|
|
|
|
|
|
-interface OrignalAccessState extends baseAccessState {
|
|
|
+interface OrignalAccessProfile extends BaseAccessProfile {
|
|
|
isSuperAdminAccess: boolean
|
|
|
- organization: baseOrganizationState
|
|
|
+ organization: BaseOrganizationProfile
|
|
|
}
|
|
|
|
|
|
-interface accessState extends baseAccessState {
|
|
|
+interface AccessProfile extends BaseAccessProfile {
|
|
|
bearer: string | null
|
|
|
switchId: number | null
|
|
|
activityYear: number | null
|
|
|
@@ -115,12 +120,12 @@ interface accessState extends baseAccessState {
|
|
|
isOther: boolean | null
|
|
|
isGuardian: boolean | null
|
|
|
isPayer: boolean | null
|
|
|
- multiAccesses: Array<baseOrganizationState>
|
|
|
- familyAccesses: Array<baseAccessState>
|
|
|
- originalAccess: OrignalAccessState | null
|
|
|
+ multiAccesses: Array<BaseOrganizationProfile>
|
|
|
+ familyAccesses: Array<BaseAccessProfile>
|
|
|
+ originalAccess: OrignalAccessProfile | null
|
|
|
}
|
|
|
|
|
|
-interface organizationState extends baseOrganizationState {
|
|
|
+interface organizationState extends BaseOrganizationProfile {
|
|
|
id: number | null
|
|
|
parametersId: number | null
|
|
|
name: string | null
|
|
|
@@ -131,42 +136,7 @@ interface organizationState extends baseOrganizationState {
|
|
|
showAdherentList?: boolean | null
|
|
|
legalStatus?: string | null
|
|
|
networks: Array<string>
|
|
|
- parents: Array<baseOrganizationState>
|
|
|
-}
|
|
|
-
|
|
|
-type AnyStore = Store<any>
|
|
|
-
|
|
|
-interface EnumChoice {
|
|
|
- value: string
|
|
|
- label: string
|
|
|
-}
|
|
|
-
|
|
|
-interface Filter {
|
|
|
- readonly key: string
|
|
|
- readonly value: string | boolean | number
|
|
|
-}
|
|
|
-
|
|
|
-type EnumChoices = Array<EnumChoice>
|
|
|
-
|
|
|
-interface HookProvider {
|
|
|
- invoke(args: DataProviderArgs): Promise<any>
|
|
|
-}
|
|
|
-interface HookPersister {
|
|
|
- invoke(args: DataPersisterArgs): Promise<any>
|
|
|
-}
|
|
|
-interface HookDeleter {
|
|
|
- invoke(args: DataDeleterArgs): Promise<any>
|
|
|
-}
|
|
|
-
|
|
|
-interface Processor {
|
|
|
- process(data: AnyJson): Promise<any>
|
|
|
-}
|
|
|
-
|
|
|
-interface Normalizer {
|
|
|
- normalize(args: DataPersisterArgs): any
|
|
|
-}
|
|
|
-interface Denormalizer {
|
|
|
- denormalize(data: any): any
|
|
|
+ parents: Array<BaseOrganizationProfile>
|
|
|
}
|
|
|
|
|
|
interface DolibarrContractLine {
|
|
|
@@ -199,11 +169,11 @@ interface DolibarrAccount {
|
|
|
socId: number
|
|
|
clientNumber: string
|
|
|
product:
|
|
|
- | 'PRODUCT_ARTIST'
|
|
|
- | 'PRODUCT_ARTIST_PREMIUM'
|
|
|
- | 'PRODUCT_SCHOOL'
|
|
|
- | 'PRODUCT_SCHOOL_PREMIUM'
|
|
|
- | 'PRODUCT_MANAGER'
|
|
|
+ | 'PRODUCT_ARTIST'
|
|
|
+ | 'PRODUCT_ARTIST_PREMIUM'
|
|
|
+ | 'PRODUCT_SCHOOL'
|
|
|
+ | 'PRODUCT_SCHOOL_PREMIUM'
|
|
|
+ | 'PRODUCT_MANAGER'
|
|
|
contract: DolibarrContract
|
|
|
bills: Array<DolibarrBill>
|
|
|
}
|
|
|
@@ -221,7 +191,8 @@ interface MercureEntityUpdate {
|
|
|
data: any
|
|
|
}
|
|
|
|
|
|
-interface sseState {
|
|
|
+interface SseState {
|
|
|
connected: boolean
|
|
|
events: Array<MercureEntityUpdate>
|
|
|
}
|
|
|
+
|