1
1
import { InjectionToken } from "@angular/core" ;
2
- import { CommonMessage , ConsumerPlan , ConsumerUserAccount } from "fusio-sdk" ;
3
2
import { GroupItem , Items } from "../service/navigation.service" ;
4
3
5
4
export interface Config {
@@ -20,82 +19,6 @@ export interface Config {
20
19
paymentCurrency ?: string ,
21
20
recaptcha ?: string ,
22
21
helpUrl ?: string ,
23
- on ?: EventListener
24
- }
25
-
26
- export interface EventListener {
27
- /**
28
- * Invoked on login
29
- */
30
- login ?: ( user : ConsumerUserAccount ) => void ,
31
-
32
- /**
33
- * Invoked on logout
34
- */
35
- logout ?: ( ) => void ,
36
-
37
- /**
38
- * Invoked if a user registers a new account
39
- */
40
- register ?: ( name : string , email : string ) => void ,
41
-
42
- /**
43
- * Invoked in case a user activates a registered account by verifying the account via email
44
- */
45
- register_activate ?: ( ) => void ,
46
-
47
- /**
48
- * Invoked in case a user confirms a password reset
49
- */
50
- password_confirm ?: ( ) => void ,
51
-
52
- /**
53
- * Invoked in case a user triggers the password reset process
54
- */
55
- password_reset ?: ( ) => void ,
56
-
57
- /**
58
- * Invoked in case a user starts a checkout of a plan
59
- */
60
- checkout ?: ( plan : ConsumerPlan ) => void ,
61
-
62
- /**
63
- * Invoked in case a user has purchased a plan
64
- */
65
- purchase ?: ( plan : ConsumerPlan ) => void ,
66
-
67
- /**
68
- * Invoked in case an error occurred
69
- */
70
- error ?: ( error : CommonMessage ) => void ,
71
-
72
- /**
73
- * Invoked in case a model list was called
74
- */
75
- model_list ?: ( route : string ) => void ,
76
-
77
- /**
78
- * Invoked in case a model detail was called
79
- */
80
- model_detail ?: ( model : any , route : string ) => void ,
81
-
82
- /**
83
- * Invoked in case a model was created. The route contains the value from the getRoute() method at your list component
84
- * which you can then use to understand the model which gets passed
85
- */
86
- model_created ?: ( model : any , route : string ) => void ,
87
-
88
- /**
89
- * Invoked in case a model was updated. The route contains the value from the getRoute() method at your list component
90
- * which you can then use to understand the model which gets passed
91
- */
92
- model_updated ?: ( model : any , route : string ) => void ,
93
-
94
- /**
95
- * Invoked in case a model was deleted. The route contains the value from the getRoute() method at your list component
96
- * which you can then use to understand the model which gets passed
97
- */
98
- model_deleted ?: ( model : any , route : string ) => void ,
99
22
}
100
23
101
24
export const FUSIO_CONFIG = new InjectionToken < Config > ( 'FUSIO_SDK_CONFIG' ) ;
0 commit comments