Skip to content

Commit 546c573

Browse files
committed
expose config and entity-route
1 parent 53bdb45 commit 546c573

File tree

4 files changed

+5
-91
lines changed

4 files changed

+5
-91
lines changed

projects/fusio-sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-fusio-sdk",
3-
"version": "6.0.0",
3+
"version": "6.0.1",
44
"description": "SDK to integrate Fusio into an Angular app",
55
"keywords": [
66
"Fusio",
Lines changed: 0 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import {InjectionToken} from "@angular/core";
2-
import {CommonMessage, ConsumerPlan, ConsumerUserAccount} from "fusio-sdk";
32
import {GroupItem, Items} from "../service/navigation.service";
43

54
export interface Config {
@@ -20,82 +19,6 @@ export interface Config {
2019
paymentCurrency?: string,
2120
recaptcha?: string,
2221
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,
9922
}
10023

10124
export const FUSIO_CONFIG = new InjectionToken<Config>('FUSIO_SDK_CONFIG');

projects/fusio-sdk/src/lib/service/config.service.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
import {Inject, Injectable} from '@angular/core';
2-
import {
3-
Config,
4-
EventListener,
5-
FUSIO_CONFIG,
6-
} from "../config/config";
2+
import {Config, FUSIO_CONFIG,} from "../config/config";
73
import {GroupItem, Items} from "./navigation.service";
84

95
@Injectable({
@@ -142,14 +138,6 @@ export class ConfigService {
142138
return this.config.helpUrl;
143139
}
144140

145-
public getEventListener(): EventListener {
146-
if (this.config.on) {
147-
return this.config.on;
148-
} else {
149-
return {};
150-
}
151-
}
152-
153141
public update(config: Config): void {
154142
this.config = config;
155143
}

projects/fusio-sdk/src/public-api.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ export * from './lib/component/security/security.component';
2929
export * from './lib/component/subscription/subscription.component';
3030
export * from './lib/component/subscription/callback/callback.component';
3131

32+
export * from './lib/config/config';
33+
3234
export * from './lib/guard/authentication.guard';
3335

3436
export * from './lib/service/api.service';
@@ -47,5 +49,6 @@ export * from './lib/service/webhook.service';
4749

4850
export * from './lib/route/account-route';
4951
export * from './lib/route/authorization-route';
52+
export * from './lib/route/entity-route';
5053

5154
export * from './lib/fusio-sdk.module';

0 commit comments

Comments
 (0)