fix(core): update

This commit is contained in:
Philipp Kunz 2020-10-20 21:02:14 +00:00
parent 7db0e622b6
commit ebd7ccc171
3 changed files with 694 additions and 818 deletions

1493
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -13,17 +13,17 @@
},
"devDependencies": {
"@gitzone/tsbuild": "^2.0.22",
"@gitzone/tstest": "^1.0.15",
"@gitzone/tstest": "^1.0.52",
"@pushrocks/tapbundle": "^3.0.7",
"@types/node": "^14.11.2",
"@types/node": "^14.14.0",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.15.0"
},
"dependencies": {
"@apiglobal/typedrequest": "^1.0.43",
"@consentsoftware/interfaces": "^1.0.7",
"@pushrocks/smarttime": "^3.0.35",
"@pushrocks/webstore": "^1.0.14"
"@apiglobal/typedrequest": "^1.0.54",
"@consentsoftware/interfaces": "^1.0.10",
"@pushrocks/smarttime": "^3.0.37",
"@pushrocks/webstore": "^1.0.16"
},
"browserslist": [
"last 1 chrome versions"

View File

@ -46,7 +46,7 @@ export class CsWebclient {
return true;
}
public async getAndRunConsentTuples() {
public async getAndRunConsentTuples(domainArg?: string) {
const acceptedCookieLevels = await this.getCookieLevels();
if (!acceptedCookieLevels) {
console.log('You need to set accepted cookielevels first');
@ -55,8 +55,9 @@ export class CsWebclient {
const csGetDomainSettingsRequest = new plugins.typedrequest.TypedRequest<
plugins.csInterfaces.IRequest_Client_ConsentSoftwareServer_GetDomainSettings
>('https://connect.api.global/consentsoftware', 'getDomainSettings');
const domainToRequest = domainArg || window.location.hostname;
const response = await csGetDomainSettingsRequest.fire({
domain: window.location.hostname
domain: domainToRequest
});
for (const consentTuple of response.consentTuples) {
if (consentTuple.level === 'functional' || acceptedCookieLevels.includes(consentTuple.level)) {