@frontegg/rest-api 7.40.0 → 7.41.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ContextHolder/index.d.ts +7 -1
- package/ContextHolder/index.js +14 -0
- package/index.js +1 -1
- package/node/ContextHolder/index.js +14 -0
- package/node/index.js +1 -1
- package/package.json +1 -1
package/ContextHolder/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ContextOptions, RedirectOptions, RequestSource, SessionContext } from '../interfaces';
|
|
2
2
|
import { IUserProfile } from '../users/interfaces';
|
|
3
3
|
/**
|
|
4
4
|
* Entitlements config from frontegg provider
|
|
@@ -18,6 +18,8 @@ export declare class ContextHolder {
|
|
|
18
18
|
private appName;
|
|
19
19
|
private sessionContext?;
|
|
20
20
|
private basename;
|
|
21
|
+
private cdnUrl;
|
|
22
|
+
private assetsUrl;
|
|
21
23
|
private constructor();
|
|
22
24
|
static default(): ContextHolder;
|
|
23
25
|
static for(appName: string): ContextHolder;
|
|
@@ -133,6 +135,10 @@ export declare class ContextHolder {
|
|
|
133
135
|
*/
|
|
134
136
|
static getAppName(appName?: string): string | null;
|
|
135
137
|
getAppName: () => string | null;
|
|
138
|
+
setCdnUrl: (cdnUrl: string | null) => void;
|
|
139
|
+
getCdnUrl: () => string | null;
|
|
140
|
+
setAssetsUrl: (assets: string | null) => void;
|
|
141
|
+
getAssetsUrl: () => string | null;
|
|
136
142
|
}
|
|
137
143
|
/**
|
|
138
144
|
* Frontegg context to be used in the application
|
package/ContextHolder/index.js
CHANGED
|
@@ -14,6 +14,8 @@ export class ContextHolder {
|
|
|
14
14
|
this.appName = null;
|
|
15
15
|
this.sessionContext = void 0;
|
|
16
16
|
this.basename = null;
|
|
17
|
+
this.cdnUrl = null;
|
|
18
|
+
this.assetsUrl = null;
|
|
17
19
|
this.setContext = context => {
|
|
18
20
|
this.context = context;
|
|
19
21
|
};
|
|
@@ -69,6 +71,18 @@ export class ContextHolder {
|
|
|
69
71
|
this.getAppName = () => {
|
|
70
72
|
return this.appName;
|
|
71
73
|
};
|
|
74
|
+
this.setCdnUrl = cdnUrl => {
|
|
75
|
+
this.cdnUrl = cdnUrl;
|
|
76
|
+
};
|
|
77
|
+
this.getCdnUrl = () => {
|
|
78
|
+
return this.cdnUrl;
|
|
79
|
+
};
|
|
80
|
+
this.setAssetsUrl = assets => {
|
|
81
|
+
this.assetsUrl = assets;
|
|
82
|
+
};
|
|
83
|
+
this.getAssetsUrl = () => {
|
|
84
|
+
return this.assetsUrl;
|
|
85
|
+
};
|
|
72
86
|
}
|
|
73
87
|
static default() {
|
|
74
88
|
return ContextHolder.getInstance(DEFAULT_APP_NAME);
|
package/index.js
CHANGED
|
@@ -20,6 +20,8 @@ class ContextHolder {
|
|
|
20
20
|
this.appName = null;
|
|
21
21
|
this.sessionContext = void 0;
|
|
22
22
|
this.basename = null;
|
|
23
|
+
this.cdnUrl = null;
|
|
24
|
+
this.assetsUrl = null;
|
|
23
25
|
this.setContext = context => {
|
|
24
26
|
this.context = context;
|
|
25
27
|
};
|
|
@@ -75,6 +77,18 @@ class ContextHolder {
|
|
|
75
77
|
this.getAppName = () => {
|
|
76
78
|
return this.appName;
|
|
77
79
|
};
|
|
80
|
+
this.setCdnUrl = cdnUrl => {
|
|
81
|
+
this.cdnUrl = cdnUrl;
|
|
82
|
+
};
|
|
83
|
+
this.getCdnUrl = () => {
|
|
84
|
+
return this.cdnUrl;
|
|
85
|
+
};
|
|
86
|
+
this.setAssetsUrl = assets => {
|
|
87
|
+
this.assetsUrl = assets;
|
|
88
|
+
};
|
|
89
|
+
this.getAssetsUrl = () => {
|
|
90
|
+
return this.assetsUrl;
|
|
91
|
+
};
|
|
78
92
|
}
|
|
79
93
|
static default() {
|
|
80
94
|
return ContextHolder.getInstance(DEFAULT_APP_NAME);
|
package/node/index.js
CHANGED