- createApi(manager, blocker): {
consent: ((...args) => Promise<void>);
consentAll: ((...args) => Promise<void[]>);
consentSync: ((...args) => {
consentGiven: boolean;
cookie: Service;
cookieOptIn: boolean;
});
unblock: ((...args) => Promise<void>);
unblockSync: ((...args) => BlockerDefinition);
wrapFn: ((...args) => Fn | Fn[]);
} Returns {
consent: ((...args) => Promise<void>);
consentAll: ((...args) => Promise<void[]>);
consentSync: ((...args) => {
consentGiven: boolean;
cookie: Service;
cookieOptIn: boolean;
});
unblock: ((...args) => Promise<void>);
unblockSync: ((...args) => BlockerDefinition);
wrapFn: ((...args) => Fn | Fn[]);
}
consent: ((...args) => Promise<void>)
- (...args): Promise<void>
Parameters
Rest
...args: [typeOrIdOrUniqueName: string | number, name?: string, host?: string]
Returns Promise<void>
consentAll: ((...args) => Promise<void[]>)
- (...args): Promise<void[]>
Parameters
Rest
...args: [technicalDefinitions: [typeOrIdOrUniqueName: string | number, name?: string, host?: string][]]
Returns Promise<void[]>
consentSync: ((...args) => {
consentGiven: boolean;
cookie: Service;
cookieOptIn: boolean;
})
- (...args): {
consentGiven: boolean;
cookie: Service;
cookieOptIn: boolean;
} Parameters
Rest
...args: [typeOrIdOrUniqueName: string | number, name?: string, host?: string]
Returns {
consentGiven: boolean;
cookie: Service;
cookieOptIn: boolean;
}
consentGiven: boolean
cookieOptIn: boolean
unblock: ((...args) => Promise<void>)
- (...args): Promise<void>
Parameters
Rest
...args: [url: string, options?: HTMLElement | Options]
Returns Promise<void>
unblockSync: ((...args) => BlockerDefinition)
- (...args): BlockerDefinition
Parameters
Rest
...args: [url: string]
Returns BlockerDefinition
wrapFn: ((...args) => Fn | Fn[])
- (...args): Fn | Fn[]
Parameters
Rest
...args: [fn: Fn | FnOverwriteObject | FnOverwriteObject[], checkExecution: Promise<any> | ((args) => boolean | Promise<void>) | ["consent", typeOrIdOrUniqueName: string | number, name?: string, host?: string] | ["consentAll", technicalDefinitions: [typeOrIdOrUniqueName: string | number, name?: string, host?: string][]] | ["consentSync", typeOrIdOrUniqueName: string | number, name?: string, host?: string] | ["unblock", url: string, options?: HTMLElement | Options] | "functionBody", settings: {
failedSyncReturnValue?: boolean;
skipRetry?: boolean;
}]
Returns Fn | Fn[]
Create the API functions and make them available through
window.consentApi
.There is also a stub implementation: