@genesislcap/foundation-filters 9.0.1-alpha-b5c5eb7.0
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/MODULE_FEDERATION.md +11 -0
- package/README.md +173 -0
- package/dist/1.0.0.remoteEntry.js +1 -0
- package/dist/191.191.64feeeeeb6c4132a6cae.js +2 -0
- package/dist/191.d7c8a7fc5c69e4190ea53a04618e0459.js.map +1 -0
- package/dist/195.195.2c71a4e018ba860ab228.js +3 -0
- package/dist/195.195.2c71a4e018ba860ab228.js.LICENSE.txt +4 -0
- package/dist/195.331a5c4d39a8a3d001d3344cb66ef3b8.js.map +1 -0
- package/dist/259.0acac2573f700ecd1acac239926438a5.js.map +1 -0
- package/dist/259.259.3aa926921ed1388957f1.js +2 -0
- package/dist/338.338.cd6e49db31e7adc808c6.js +3 -0
- package/dist/338.338.cd6e49db31e7adc808c6.js.LICENSE.txt +1 -0
- package/dist/338.7a143cd09921b756e7fe871d338dcb67.js.map +1 -0
- package/dist/410.410.76d9d4b118ba230b93c4.js +2 -0
- package/dist/410.cda4ae21eb38efbf2dbfd913db12d66f.js.map +1 -0
- package/dist/755.755.ec31a791472b4b3fcb0f.js +2 -0
- package/dist/755.c71c3a1801dd2c0461f8b831d09ec90f.js.map +1 -0
- package/dist/dashboard.json +1 -0
- package/dist/dts/clientFilter.d.ts +108 -0
- package/dist/dts/clientFilter.d.ts.map +1 -0
- package/dist/dts/index.d.ts +9 -0
- package/dist/dts/index.d.ts.map +1 -0
- package/dist/dts/index.federated.d.ts +1 -0
- package/dist/dts/index.federated.d.ts.map +1 -0
- package/dist/dts/logger.d.ts +17 -0
- package/dist/dts/logger.d.ts.map +1 -0
- package/dist/dts/nodeEnv.d.ts +81 -0
- package/dist/dts/nodeEnv.d.ts.map +1 -0
- package/dist/dts/percentage.d.ts +81 -0
- package/dist/dts/percentage.d.ts.map +1 -0
- package/dist/dts/timeWindow.d.ts +91 -0
- package/dist/dts/timeWindow.d.ts.map +1 -0
- package/dist/dts/tsdoc-metadata.json +11 -0
- package/dist/dts/urlTargeting.d.ts +94 -0
- package/dist/dts/urlTargeting.d.ts.map +1 -0
- package/dist/dts/userAgent.d.ts +96 -0
- package/dist/dts/userAgent.d.ts.map +1 -0
- package/dist/dts/userTargeting.d.ts +107 -0
- package/dist/dts/userTargeting.d.ts.map +1 -0
- package/dist/esm/clientFilter.js +84 -0
- package/dist/esm/clientFilter.js.map +1 -0
- package/dist/esm/index.federated.js +2 -0
- package/dist/esm/index.federated.js.map +1 -0
- package/dist/esm/index.js +9 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/logger.js +18 -0
- package/dist/esm/logger.js.map +1 -0
- package/dist/esm/nodeEnv.js +48 -0
- package/dist/esm/nodeEnv.js.map +1 -0
- package/dist/esm/percentage.js +38 -0
- package/dist/esm/percentage.js.map +1 -0
- package/dist/esm/timeWindow.js +49 -0
- package/dist/esm/timeWindow.js.map +1 -0
- package/dist/esm/urlTargeting.js +68 -0
- package/dist/esm/urlTargeting.js.map +1 -0
- package/dist/esm/userAgent.js +59 -0
- package/dist/esm/userAgent.js.map +1 -0
- package/dist/esm/userTargeting.js +73 -0
- package/dist/esm/userTargeting.js.map +1 -0
- package/dist/favicon.ico +0 -0
- package/dist/foundation-filters.api.json +3065 -0
- package/dist/foundation-filters.d.ts +707 -0
- package/dist/foundation-filters.iife.min.js +3 -0
- package/dist/foundation-filters.js +8608 -0
- package/dist/foundation-filters.min.js +3 -0
- package/dist/foundationFilters.c0ca375607bf5b49304e9efbcfb9ec0d.js.map +1 -0
- package/dist/index.ejs +23 -0
- package/dist/index.html +16 -0
- package/dist/info.ejs +13 -0
- package/dist/main.479db3c6a61354c4d21c4a52177a4fc9.js.map +1 -0
- package/dist/main.8bf3ac27c0d922605d1f.js +2 -0
- package/dist/npm.analytics.343.d4561facd9660fd45482.js +2 -0
- package/dist/npm.analytics.50acd47759b15e99bc3ad79caad7c672.js.map +1 -0
- package/dist/npm.consola.0f92c98545c00deac8a01e6e5c25e63c.js.map +1 -0
- package/dist/npm.consola.713.4cfd0e26a2fd1e472409.js +2 -0
- package/dist/npm.finos.690.4b909dcccf246b8fb074.js +2 -0
- package/dist/npm.finos.83f8bd7cc8c58aabd1049256a8d005fe.js.map +1 -0
- package/dist/npm.microsoft.127.2934a743e3e0797a43e6.js +1469 -0
- package/dist/npm.microsoft.127.2934a743e3e0797a43e6.js.LICENSE.txt +14 -0
- package/dist/npm.microsoft.e17056c760df168ceb07617558d61f7e.js.map +1 -0
- package/dist/npm.rxjs.271.11caf676e6c2aaf1715a.js +2 -0
- package/dist/npm.rxjs.2d42120c7dd915e4ea92bdec64a19f45.js.map +1 -0
- package/dist/npm.ua-parser-js.809.92491f7cd444ab77d377.js +2 -0
- package/dist/npm.ua-parser-js.b1390f6f6c6080318a30bc73abe8add8.js.map +1 -0
- package/dist/remoteEntry.js +2 -0
- package/dist/serve.json +3 -0
- package/docs/api/foundation-filters.clientfilter.filter.md +24 -0
- package/docs/api/foundation-filters.clientfilter.md +24 -0
- package/docs/api/foundation-filters.clientfiltername.md +19 -0
- package/docs/api/foundation-filters.clientfilterrunner.md +20 -0
- package/docs/api/foundation-filters.clientfilterrunner.run.md +23 -0
- package/docs/api/foundation-filters.clientfilterschema.md +22 -0
- package/docs/api/foundation-filters.clientfilterschemas.md +15 -0
- package/docs/api/foundation-filters.defaultclientfilterrunner.container.md +11 -0
- package/docs/api/foundation-filters.defaultclientfilterrunner.md +27 -0
- package/docs/api/foundation-filters.defaultclientfilterrunner.run.md +23 -0
- package/docs/api/foundation-filters.defaultnodeenv.filter.md +24 -0
- package/docs/api/foundation-filters.defaultnodeenv.isdevelopment.md +16 -0
- package/docs/api/foundation-filters.defaultnodeenv.isproduction.md +16 -0
- package/docs/api/foundation-filters.defaultnodeenv.istesting.md +16 -0
- package/docs/api/foundation-filters.defaultnodeenv.md +29 -0
- package/docs/api/foundation-filters.defaultpercentage.filter.md +24 -0
- package/docs/api/foundation-filters.defaultpercentage.md +21 -0
- package/docs/api/foundation-filters.defaulttimewindow.filter.md +24 -0
- package/docs/api/foundation-filters.defaulttimewindow.md +21 -0
- package/docs/api/foundation-filters.defaulturltargeting.filter.md +24 -0
- package/docs/api/foundation-filters.defaulturltargeting.issecure.md +26 -0
- package/docs/api/foundation-filters.defaulturltargeting.md +22 -0
- package/docs/api/foundation-filters.defaultuseragent.filter.md +24 -0
- package/docs/api/foundation-filters.defaultuseragent.issafari.md +16 -0
- package/docs/api/foundation-filters.defaultuseragent.md +27 -0
- package/docs/api/foundation-filters.defaultusertargeting._constructor_.md +20 -0
- package/docs/api/foundation-filters.defaultusertargeting.auth.md +11 -0
- package/docs/api/foundation-filters.defaultusertargeting.filter.md +24 -0
- package/docs/api/foundation-filters.defaultusertargeting.hasadminprofile.md +16 -0
- package/docs/api/foundation-filters.defaultusertargeting.isloggedin.md +16 -0
- package/docs/api/foundation-filters.defaultusertargeting.md +35 -0
- package/docs/api/foundation-filters.getfilterbyname.md +25 -0
- package/docs/api/foundation-filters.logger.md +27 -0
- package/docs/api/foundation-filters.md +71 -0
- package/docs/api/foundation-filters.nodeenv.isdevelopment.md +16 -0
- package/docs/api/foundation-filters.nodeenv.isproduction.md +16 -0
- package/docs/api/foundation-filters.nodeenv.istesting.md +16 -0
- package/docs/api/foundation-filters.nodeenv.md +23 -0
- package/docs/api/foundation-filters.nodeenvfilter.md +28 -0
- package/docs/api/foundation-filters.nodeenvparams.md +25 -0
- package/docs/api/foundation-filters.nodeenvschema.md +19 -0
- package/docs/api/foundation-filters.percentage.md +19 -0
- package/docs/api/foundation-filters.percentagefilter.md +29 -0
- package/docs/api/foundation-filters.percentageparams.md +41 -0
- package/docs/api/foundation-filters.percentageschema.md +19 -0
- package/docs/api/foundation-filters.runner.md +29 -0
- package/docs/api/foundation-filters.timewindow.md +19 -0
- package/docs/api/foundation-filters.timewindowfilter.md +29 -0
- package/docs/api/foundation-filters.timewindowparams.md +59 -0
- package/docs/api/foundation-filters.timewindowschema.md +19 -0
- package/docs/api/foundation-filters.urltargeting.issecure.md +26 -0
- package/docs/api/foundation-filters.urltargeting.md +21 -0
- package/docs/api/foundation-filters.urltargetingfilter.md +32 -0
- package/docs/api/foundation-filters.urltargetingparams.md +30 -0
- package/docs/api/foundation-filters.urltargetingschema.md +19 -0
- package/docs/api/foundation-filters.useragent.issafari.md +16 -0
- package/docs/api/foundation-filters.useragent.md +25 -0
- package/docs/api/foundation-filters.useragentfilter.md +31 -0
- package/docs/api/foundation-filters.useragentparams.md +30 -0
- package/docs/api/foundation-filters.useragentschema.md +19 -0
- package/docs/api/foundation-filters.usertargeting.hasadminprofile.md +16 -0
- package/docs/api/foundation-filters.usertargeting.isloggedin.md +16 -0
- package/docs/api/foundation-filters.usertargeting.md +26 -0
- package/docs/api/foundation-filters.usertargetingfilter.md +31 -0
- package/docs/api/foundation-filters.usertargetingparams.md +29 -0
- package/docs/api/foundation-filters.usertargetingschema.md +19 -0
- package/docs/api/index.md +12 -0
- package/docs/api-report.md +283 -0
- package/jsdom.setup.ts +1 -0
- package/license.txt +46 -0
- package/package.json +122 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [DefaultURLTargeting](./foundation-filters.defaulturltargeting.md) > [filter](./foundation-filters.defaulturltargeting.filter.md)
|
|
4
|
+
|
|
5
|
+
## DefaultURLTargeting.filter() method
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
filter(params: URLTargetingParams): boolean;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
| Parameter | Type | Description |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| params | [URLTargetingParams](./foundation-filters.urltargetingparams.md) | |
|
|
18
|
+
|
|
19
|
+
**Returns:**
|
|
20
|
+
|
|
21
|
+
boolean
|
|
22
|
+
|
|
23
|
+
The filter outcome.
|
|
24
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [DefaultURLTargeting](./foundation-filters.defaulturltargeting.md) > [isSecure](./foundation-filters.defaulturltargeting.issecure.md)
|
|
4
|
+
|
|
5
|
+
## DefaultURLTargeting.isSecure() method
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
isSecure(url: any): boolean;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
| Parameter | Type | Description |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| url | any | A url. |
|
|
18
|
+
|
|
19
|
+
**Returns:**
|
|
20
|
+
|
|
21
|
+
boolean
|
|
22
|
+
|
|
23
|
+
## Remarks
|
|
24
|
+
|
|
25
|
+
Check if a url is secure.
|
|
26
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [DefaultURLTargeting](./foundation-filters.defaulturltargeting.md)
|
|
4
|
+
|
|
5
|
+
## DefaultURLTargeting class
|
|
6
|
+
|
|
7
|
+
Default URLTargeting DI implementation.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare class DefaultURLTargeting implements URLTargeting
|
|
13
|
+
```
|
|
14
|
+
**Implements:** [URLTargeting](./foundation-filters.urltargeting.md)
|
|
15
|
+
|
|
16
|
+
## Methods
|
|
17
|
+
|
|
18
|
+
| Method | Modifiers | Description |
|
|
19
|
+
| --- | --- | --- |
|
|
20
|
+
| [filter(params)](./foundation-filters.defaulturltargeting.filter.md) | | |
|
|
21
|
+
| [isSecure(url)](./foundation-filters.defaulturltargeting.issecure.md) | | |
|
|
22
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [DefaultUserAgent](./foundation-filters.defaultuseragent.md) > [filter](./foundation-filters.defaultuseragent.filter.md)
|
|
4
|
+
|
|
5
|
+
## DefaultUserAgent.filter() method
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
filter(params: UserAgentParams): boolean;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
| Parameter | Type | Description |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| params | [UserAgentParams](./foundation-filters.useragentparams.md) | |
|
|
18
|
+
|
|
19
|
+
**Returns:**
|
|
20
|
+
|
|
21
|
+
boolean
|
|
22
|
+
|
|
23
|
+
The filter outcome.
|
|
24
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [DefaultUserAgent](./foundation-filters.defaultuseragent.md) > [isSafari](./foundation-filters.defaultuseragent.issafari.md)
|
|
4
|
+
|
|
5
|
+
## DefaultUserAgent.isSafari property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
get isSafari(): boolean;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Remarks
|
|
14
|
+
|
|
15
|
+
Is the user-agent safari.
|
|
16
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [DefaultUserAgent](./foundation-filters.defaultuseragent.md)
|
|
4
|
+
|
|
5
|
+
## DefaultUserAgent class
|
|
6
|
+
|
|
7
|
+
Default UserAgent DI implementation.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare class DefaultUserAgent implements UserAgent
|
|
13
|
+
```
|
|
14
|
+
**Implements:** [UserAgent](./foundation-filters.useragent.md)
|
|
15
|
+
|
|
16
|
+
## Properties
|
|
17
|
+
|
|
18
|
+
| Property | Modifiers | Type | Description |
|
|
19
|
+
| --- | --- | --- | --- |
|
|
20
|
+
| [isSafari](./foundation-filters.defaultuseragent.issafari.md) | <code>readonly</code> | boolean | |
|
|
21
|
+
|
|
22
|
+
## Methods
|
|
23
|
+
|
|
24
|
+
| Method | Modifiers | Description |
|
|
25
|
+
| --- | --- | --- |
|
|
26
|
+
| [filter(params)](./foundation-filters.defaultuseragent.filter.md) | | |
|
|
27
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [DefaultUserTargeting](./foundation-filters.defaultusertargeting.md) > [(constructor)](./foundation-filters.defaultusertargeting._constructor_.md)
|
|
4
|
+
|
|
5
|
+
## DefaultUserTargeting.(constructor)
|
|
6
|
+
|
|
7
|
+
Constructs a new instance of the `DefaultUserTargeting` class
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
constructor(auth: Auth);
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| auth | Auth | |
|
|
20
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [DefaultUserTargeting](./foundation-filters.defaultusertargeting.md) > [auth](./foundation-filters.defaultusertargeting.auth.md)
|
|
4
|
+
|
|
5
|
+
## DefaultUserTargeting.auth property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
auth: Auth;
|
|
11
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [DefaultUserTargeting](./foundation-filters.defaultusertargeting.md) > [filter](./foundation-filters.defaultusertargeting.filter.md)
|
|
4
|
+
|
|
5
|
+
## DefaultUserTargeting.filter() method
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
filter(params: UserTargetingParams): boolean;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
| Parameter | Type | Description |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| params | [UserTargetingParams](./foundation-filters.usertargetingparams.md) | |
|
|
18
|
+
|
|
19
|
+
**Returns:**
|
|
20
|
+
|
|
21
|
+
boolean
|
|
22
|
+
|
|
23
|
+
The filter outcome.
|
|
24
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [DefaultUserTargeting](./foundation-filters.defaultusertargeting.md) > [hasAdminProfile](./foundation-filters.defaultusertargeting.hasadminprofile.md)
|
|
4
|
+
|
|
5
|
+
## DefaultUserTargeting.hasAdminProfile property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
get hasAdminProfile(): boolean;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Remarks
|
|
14
|
+
|
|
15
|
+
Has the user got the 'ADMIN' profile assigned.
|
|
16
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [DefaultUserTargeting](./foundation-filters.defaultusertargeting.md) > [isLoggedIn](./foundation-filters.defaultusertargeting.isloggedin.md)
|
|
4
|
+
|
|
5
|
+
## DefaultUserTargeting.isLoggedIn property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
get isLoggedIn(): boolean;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Remarks
|
|
14
|
+
|
|
15
|
+
Has the user logged in, regardless of their identity.
|
|
16
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [DefaultUserTargeting](./foundation-filters.defaultusertargeting.md)
|
|
4
|
+
|
|
5
|
+
## DefaultUserTargeting class
|
|
6
|
+
|
|
7
|
+
Default UserTargeting DI implementation.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare class DefaultUserTargeting implements UserTargeting
|
|
13
|
+
```
|
|
14
|
+
**Implements:** [UserTargeting](./foundation-filters.usertargeting.md)
|
|
15
|
+
|
|
16
|
+
## Constructors
|
|
17
|
+
|
|
18
|
+
| Constructor | Modifiers | Description |
|
|
19
|
+
| --- | --- | --- |
|
|
20
|
+
| [(constructor)(auth)](./foundation-filters.defaultusertargeting._constructor_.md) | | Constructs a new instance of the <code>DefaultUserTargeting</code> class |
|
|
21
|
+
|
|
22
|
+
## Properties
|
|
23
|
+
|
|
24
|
+
| Property | Modifiers | Type | Description |
|
|
25
|
+
| --- | --- | --- | --- |
|
|
26
|
+
| [auth](./foundation-filters.defaultusertargeting.auth.md) | | Auth | |
|
|
27
|
+
| [hasAdminProfile](./foundation-filters.defaultusertargeting.hasadminprofile.md) | <code>readonly</code> | boolean | |
|
|
28
|
+
| [isLoggedIn](./foundation-filters.defaultusertargeting.isloggedin.md) | <code>readonly</code> | boolean | |
|
|
29
|
+
|
|
30
|
+
## Methods
|
|
31
|
+
|
|
32
|
+
| Method | Modifiers | Description |
|
|
33
|
+
| --- | --- | --- |
|
|
34
|
+
| [filter(params)](./foundation-filters.defaultusertargeting.filter.md) | | |
|
|
35
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [getFilterByName](./foundation-filters.getfilterbyname.md)
|
|
4
|
+
|
|
5
|
+
## getFilterByName() function
|
|
6
|
+
|
|
7
|
+
Filer lookup by name.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function getFilterByName(name: ClientFilterName, container: Container): NodeEnv | Percentage | TimeWindow | URLTargeting | UserAgent | UserTargeting;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| name | [ClientFilterName](./foundation-filters.clientfiltername.md) | |
|
|
20
|
+
| container | Container | |
|
|
21
|
+
|
|
22
|
+
**Returns:**
|
|
23
|
+
|
|
24
|
+
[NodeEnv](./foundation-filters.nodeenv.md) \| [Percentage](./foundation-filters.percentage.md) \| [TimeWindow](./foundation-filters.timewindow.md) \| [URLTargeting](./foundation-filters.urltargeting.md) \| [UserAgent](./foundation-filters.useragent.md) \| [UserTargeting](./foundation-filters.usertargeting.md)
|
|
25
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [logger](./foundation-filters.logger.md)
|
|
4
|
+
|
|
5
|
+
## logger variable
|
|
6
|
+
|
|
7
|
+
Client filter logger
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
logger: import("@genesislcap/foundation-utils").Logger
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Remarks
|
|
16
|
+
|
|
17
|
+
Exposed so that the logging level within this package can be tailored differently to the default level when needed.
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import { LogLevel } from '@genesislcap/foundation-utils';
|
|
24
|
+
import { logger as clientFilterLogger } from '@genesislcap/foundation-filters';
|
|
25
|
+
clientFilterLogger.level = LogLevel.Error;
|
|
26
|
+
```
|
|
27
|
+
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md)
|
|
4
|
+
|
|
5
|
+
## foundation-filters package
|
|
6
|
+
|
|
7
|
+
## Classes
|
|
8
|
+
|
|
9
|
+
| Class | Description |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| [DefaultClientFilterRunner](./foundation-filters.defaultclientfilterrunner.md) | Default ClientFilterRunner DI implementation. |
|
|
12
|
+
| [DefaultNodeEnv](./foundation-filters.defaultnodeenv.md) | Default NodeEnv DI implementation. |
|
|
13
|
+
| [DefaultPercentage](./foundation-filters.defaultpercentage.md) | Default Percentage DI implementation. |
|
|
14
|
+
| [DefaultTimeWindow](./foundation-filters.defaulttimewindow.md) | Default TimeWindow DI implementation. |
|
|
15
|
+
| [DefaultURLTargeting](./foundation-filters.defaulturltargeting.md) | Default URLTargeting DI implementation. |
|
|
16
|
+
| [DefaultUserAgent](./foundation-filters.defaultuseragent.md) | Default UserAgent DI implementation. |
|
|
17
|
+
| [DefaultUserTargeting](./foundation-filters.defaultusertargeting.md) | Default UserTargeting DI implementation. |
|
|
18
|
+
|
|
19
|
+
## Functions
|
|
20
|
+
|
|
21
|
+
| Function | Description |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| [getFilterByName(name, container)](./foundation-filters.getfilterbyname.md) | Filer lookup by name. |
|
|
24
|
+
| [nodeEnvFilter(envs)](./foundation-filters.nodeenvfilter.md) | NodeEnv client filter function. |
|
|
25
|
+
| [percentageFilter(percent, random)](./foundation-filters.percentagefilter.md) | Percentage client filter function. |
|
|
26
|
+
| [runner(filters, container)](./foundation-filters.runner.md) | Client filter runner function. |
|
|
27
|
+
| [timeWindowFilter(start, end)](./foundation-filters.timewindowfilter.md) | TimeWindow client filter function. |
|
|
28
|
+
| [urlTargetingFilter(url, pattern, schemes, hosts, paths)](./foundation-filters.urltargetingfilter.md) | URLTargeting client filter function. |
|
|
29
|
+
| [userAgentFilter(browsers, devices, oss, ua)](./foundation-filters.useragentfilter.md) | UserAgent client filter function. |
|
|
30
|
+
| [userTargetingFilter(user, usernames, profiles, permissions)](./foundation-filters.usertargetingfilter.md) | UserTargeting client filter function. |
|
|
31
|
+
|
|
32
|
+
## Interfaces
|
|
33
|
+
|
|
34
|
+
| Interface | Description |
|
|
35
|
+
| --- | --- |
|
|
36
|
+
| [ClientFilter](./foundation-filters.clientfilter.md) | ClientFilter interface. |
|
|
37
|
+
| [ClientFilterRunner](./foundation-filters.clientfilterrunner.md) | ClientFilterRunner DI interface. |
|
|
38
|
+
| [NodeEnv](./foundation-filters.nodeenv.md) | NodeEnv client filter DI interface. |
|
|
39
|
+
| [Percentage](./foundation-filters.percentage.md) | Percentage client filter DI interface. |
|
|
40
|
+
| [TimeWindow](./foundation-filters.timewindow.md) | TimeWindow client filter DI interface. |
|
|
41
|
+
| [URLTargeting](./foundation-filters.urltargeting.md) | URLTargeting client filter DI interface. |
|
|
42
|
+
| [UserAgent](./foundation-filters.useragent.md) | UserAgent client filter DI interface. |
|
|
43
|
+
| [UserTargeting](./foundation-filters.usertargeting.md) | UserTargeting client filter DI interface. |
|
|
44
|
+
|
|
45
|
+
## Variables
|
|
46
|
+
|
|
47
|
+
| Variable | Description |
|
|
48
|
+
| --- | --- |
|
|
49
|
+
| [ClientFilterName](./foundation-filters.clientfiltername.md) | |
|
|
50
|
+
| [logger](./foundation-filters.logger.md) | Client filter logger |
|
|
51
|
+
|
|
52
|
+
## Type Aliases
|
|
53
|
+
|
|
54
|
+
| Type Alias | Description |
|
|
55
|
+
| --- | --- |
|
|
56
|
+
| [ClientFilterName](./foundation-filters.clientfiltername.md) | |
|
|
57
|
+
| [ClientFilterSchema](./foundation-filters.clientfilterschema.md) | ClientFilterSchema type. |
|
|
58
|
+
| [ClientFilterSchemas](./foundation-filters.clientfilterschemas.md) | ClientFilterSchemas type. |
|
|
59
|
+
| [NodeEnvParams](./foundation-filters.nodeenvparams.md) | NodeEnvParams |
|
|
60
|
+
| [NodeEnvSchema](./foundation-filters.nodeenvschema.md) | NodeEnvSchema type. |
|
|
61
|
+
| [PercentageParams](./foundation-filters.percentageparams.md) | PercentageParams |
|
|
62
|
+
| [PercentageSchema](./foundation-filters.percentageschema.md) | PercentageSchema type. |
|
|
63
|
+
| [TimeWindowParams](./foundation-filters.timewindowparams.md) | TimeWindowParams |
|
|
64
|
+
| [TimeWindowSchema](./foundation-filters.timewindowschema.md) | TimeWindowSchema type. |
|
|
65
|
+
| [URLTargetingParams](./foundation-filters.urltargetingparams.md) | URLTargetingParams |
|
|
66
|
+
| [URLTargetingSchema](./foundation-filters.urltargetingschema.md) | URLTargetingSchema type. |
|
|
67
|
+
| [UserAgentParams](./foundation-filters.useragentparams.md) | UserAgentParams |
|
|
68
|
+
| [UserAgentSchema](./foundation-filters.useragentschema.md) | UserAgentSchema type. |
|
|
69
|
+
| [UserTargetingParams](./foundation-filters.usertargetingparams.md) | UserTargetingParams |
|
|
70
|
+
| [UserTargetingSchema](./foundation-filters.usertargetingschema.md) | UserTargetingSchema type. |
|
|
71
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [NodeEnv](./foundation-filters.nodeenv.md) > [isDevelopment](./foundation-filters.nodeenv.isdevelopment.md)
|
|
4
|
+
|
|
5
|
+
## NodeEnv.isDevelopment property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
readonly isDevelopment: boolean;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Remarks
|
|
14
|
+
|
|
15
|
+
Running in development mode.
|
|
16
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [NodeEnv](./foundation-filters.nodeenv.md) > [isProduction](./foundation-filters.nodeenv.isproduction.md)
|
|
4
|
+
|
|
5
|
+
## NodeEnv.isProduction property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
readonly isProduction: boolean;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Remarks
|
|
14
|
+
|
|
15
|
+
Running in production mode.
|
|
16
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [NodeEnv](./foundation-filters.nodeenv.md) > [isTesting](./foundation-filters.nodeenv.istesting.md)
|
|
4
|
+
|
|
5
|
+
## NodeEnv.isTesting property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
readonly isTesting: boolean;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Remarks
|
|
14
|
+
|
|
15
|
+
Running in test mode.
|
|
16
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [NodeEnv](./foundation-filters.nodeenv.md)
|
|
4
|
+
|
|
5
|
+
## NodeEnv interface
|
|
6
|
+
|
|
7
|
+
NodeEnv client filter DI interface.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export interface NodeEnv extends ClientFilter<NodeEnvParams>
|
|
13
|
+
```
|
|
14
|
+
**Extends:** [ClientFilter](./foundation-filters.clientfilter.md)<!-- --><[NodeEnvParams](./foundation-filters.nodeenvparams.md)<!-- -->>
|
|
15
|
+
|
|
16
|
+
## Properties
|
|
17
|
+
|
|
18
|
+
| Property | Modifiers | Type | Description |
|
|
19
|
+
| --- | --- | --- | --- |
|
|
20
|
+
| [isDevelopment](./foundation-filters.nodeenv.isdevelopment.md) | <code>readonly</code> | boolean | |
|
|
21
|
+
| [isProduction](./foundation-filters.nodeenv.isproduction.md) | <code>readonly</code> | boolean | |
|
|
22
|
+
| [isTesting](./foundation-filters.nodeenv.istesting.md) | <code>readonly</code> | boolean | |
|
|
23
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [nodeEnvFilter](./foundation-filters.nodeenvfilter.md)
|
|
4
|
+
|
|
5
|
+
## nodeEnvFilter() function
|
|
6
|
+
|
|
7
|
+
NodeEnv client filter function.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function nodeEnvFilter(envs: string[]): boolean;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| envs | string\[\] | Environments to target. |
|
|
20
|
+
|
|
21
|
+
**Returns:**
|
|
22
|
+
|
|
23
|
+
boolean
|
|
24
|
+
|
|
25
|
+
## Remarks
|
|
26
|
+
|
|
27
|
+
This will return true when the current node env matches target parameters.
|
|
28
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [NodeEnvParams](./foundation-filters.nodeenvparams.md)
|
|
4
|
+
|
|
5
|
+
## NodeEnvParams type
|
|
6
|
+
|
|
7
|
+
NodeEnvParams
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export type NodeEnvParams = {
|
|
13
|
+
readonly envs: string[];
|
|
14
|
+
};
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"envs": ["development", "testing"],
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [NodeEnvSchema](./foundation-filters.nodeenvschema.md)
|
|
4
|
+
|
|
5
|
+
## NodeEnvSchema type
|
|
6
|
+
|
|
7
|
+
NodeEnvSchema type.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export type NodeEnvSchema = ClientFilterSchema<typeof ClientFilterName.nodeEnv, NodeEnvParams>;
|
|
13
|
+
```
|
|
14
|
+
**References:** [ClientFilterSchema](./foundation-filters.clientfilterschema.md)<!-- -->, [NodeEnvParams](./foundation-filters.nodeenvparams.md)
|
|
15
|
+
|
|
16
|
+
## Remarks
|
|
17
|
+
|
|
18
|
+
JSON schema type.
|
|
19
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [Percentage](./foundation-filters.percentage.md)
|
|
4
|
+
|
|
5
|
+
## Percentage interface
|
|
6
|
+
|
|
7
|
+
Percentage client filter DI interface.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export interface Percentage extends ClientFilter<PercentageParams>
|
|
13
|
+
```
|
|
14
|
+
**Extends:** [ClientFilter](./foundation-filters.clientfilter.md)<!-- --><[PercentageParams](./foundation-filters.percentageparams.md)<!-- -->>
|
|
15
|
+
|
|
16
|
+
## Remarks
|
|
17
|
+
|
|
18
|
+
Simplifies access to runtime data / state contained within the DI container.
|
|
19
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [percentageFilter](./foundation-filters.percentagefilter.md)
|
|
4
|
+
|
|
5
|
+
## percentageFilter() function
|
|
6
|
+
|
|
7
|
+
Percentage client filter function.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function percentageFilter(percent: number, random?: number): boolean;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| percent | number | The percent of the time to pass, a numeric value between 0 and 1. |
|
|
20
|
+
| random | number | _(Optional)_ Math.random() generated floating-point. |
|
|
21
|
+
|
|
22
|
+
**Returns:**
|
|
23
|
+
|
|
24
|
+
boolean
|
|
25
|
+
|
|
26
|
+
## Remarks
|
|
27
|
+
|
|
28
|
+
This will return true a certain percentage of the time.
|
|
29
|
+
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [PercentageParams](./foundation-filters.percentageparams.md)
|
|
4
|
+
|
|
5
|
+
## PercentageParams type
|
|
6
|
+
|
|
7
|
+
PercentageParams
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export type PercentageParams = {
|
|
13
|
+
readonly percent: number;
|
|
14
|
+
readonly random?: number;
|
|
15
|
+
};
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Remarks
|
|
19
|
+
|
|
20
|
+
Percent should be a numeric value between 0 and 1.
|
|
21
|
+
|
|
22
|
+
## Example 1
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"percent": 0.5
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Example 2
|
|
32
|
+
|
|
33
|
+
In a rare case where you need to control the random floating-point creation, you can do so externally and provide it.
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"percent": 0.34
|
|
38
|
+
"random": 0.08901819974272063
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [PercentageSchema](./foundation-filters.percentageschema.md)
|
|
4
|
+
|
|
5
|
+
## PercentageSchema type
|
|
6
|
+
|
|
7
|
+
PercentageSchema type.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export type PercentageSchema = ClientFilterSchema<typeof ClientFilterName.percentage, PercentageParams>;
|
|
13
|
+
```
|
|
14
|
+
**References:** [ClientFilterSchema](./foundation-filters.clientfilterschema.md)<!-- -->, [PercentageParams](./foundation-filters.percentageparams.md)
|
|
15
|
+
|
|
16
|
+
## Remarks
|
|
17
|
+
|
|
18
|
+
JSON schema type.
|
|
19
|
+
|