@didomi/react
Advanced tools
Comparing version 1.8.4 to 1.8.5
@@ -15,3 +15,3 @@ // Type definitions for @didomi/react 1.2.2 | ||
interface IPreferencesObject { | ||
show(): void; | ||
show(view?: 'information' | 'purposes' | 'vendors'): void; | ||
hide(): void; | ||
@@ -39,36 +39,79 @@ isVisible(): boolean; | ||
purposes: { | ||
enabled: any[], | ||
disabled: any[], | ||
enabled: number[] | string[]; | ||
disabled: number[] | string[]; | ||
}; | ||
vendors: { | ||
enabled: any[], | ||
disabled: any[], | ||
} | ||
enabled: number[] | string[]; | ||
disabled: number[] | string[]; | ||
}; | ||
} | ||
/** | ||
* Should match: https://developers.didomi.io/cmp/web-sdk/reference/events | ||
*/ | ||
type EventType = | ||
| 'api.error' | ||
| 'consent.changed' | ||
| 'consent.pendingchanged' | ||
| 'integrations.consentpassedtodfp' | ||
| 'notice.backdropclick' | ||
| 'notice.clickagree' | ||
| 'notice.clickclose' | ||
| 'notice.clickdisagree' | ||
| 'notice.clickmoreinfo' | ||
| 'notice.clickviewvendors' | ||
| 'notice.hidden' | ||
| 'notice.shown' | ||
| 'preferences.clickagreetoall' | ||
| 'preferences.clickcategoryagree' | ||
| 'preferences.clickcategorydisagree' | ||
| 'preferences.clickclose' | ||
| 'preferences.clickdisagreetoall' | ||
| 'preferences.clickpurposeagree' | ||
| 'preferences.clickpurposedisagree' | ||
| 'preferences.clicksavechoices' | ||
| 'preferences.clickvendoragree' | ||
| 'preferences.clickvendordisagree' | ||
| 'preferences.clickvendorsavechoices' | ||
| 'preferences.clickviewvendors' | ||
| 'preferences.hidden' | ||
| 'preferences.shown' | ||
| 'sync.ready'; | ||
/** | ||
* Should match: https://developers.didomi.io/cmp/web-sdk/reference/api#getuserstatus | ||
*/ | ||
interface IUserStatus { | ||
consent_string: string, | ||
created: string, | ||
updated: string, | ||
user_id: string, | ||
consent_string: string; | ||
created: string; | ||
updated: string; | ||
user_id: string; | ||
purposes: { | ||
global: { | ||
enabled: string[] | number[]; | ||
disabled: string[] | number[]; | ||
}; | ||
consent: { | ||
enabled: any[], | ||
disabled: any[], | ||
}, | ||
enabled: string[] | number[]; | ||
disabled: string[] | number[]; | ||
}; | ||
legitimate_interest: { | ||
enabled: any[], | ||
disabled: any[], | ||
} | ||
enabled: string[] | number[]; | ||
disabled: string[] | number[]; | ||
}; | ||
}; | ||
vendors: { | ||
global: { | ||
enabled: string[] | number[]; | ||
disabled: string[] | number[]; | ||
}; | ||
consent: { | ||
enabled: any[], | ||
disabled: any[], | ||
}, | ||
enabled: string[] | number[]; | ||
disabled: string[] | number[]; | ||
}; | ||
legitimate_interest: { | ||
enabled: any[], | ||
disabled: any[], | ||
} | ||
} | ||
enabled: string[] | number[]; | ||
disabled: string[] | number[]; | ||
}; | ||
}; | ||
} | ||
@@ -81,3 +124,3 @@ | ||
version: string; | ||
on(event: string, eventHandler: Function): void; | ||
on(event: EventType, eventHandler: Function): void; | ||
@@ -104,3 +147,6 @@ preferences: IPreferencesObject; | ||
getUserConsentStatusForPurpose(purposeId: ConsentID): ConsentStatus; | ||
getUserConsentStatus(purposeId: ConsentID, vendorId: ConsentID): boolean | undefined; | ||
getUserConsentStatus( | ||
purposeId: ConsentID, | ||
vendorId: ConsentID, | ||
): boolean | undefined; | ||
getObservableOnUserConsentStatusForVendor(vendorId: ConsentID): any; | ||
@@ -116,3 +162,7 @@ getPurposeById(id: ConsentID): any; | ||
setConfigParameter(param: any, value: any): void; | ||
setUserConsentStatus(purposeId: ConsentID, vendorId: ConsentID, value: any): void; | ||
setUserConsentStatus( | ||
purposeId: ConsentID, | ||
vendorId: ConsentID, | ||
value: any, | ||
): void; | ||
@@ -132,5 +182,5 @@ isConsentRequired(): boolean; | ||
/** | ||
* Receives a consent web token. | ||
* See: https://github.com/didomi/cwt-node/blob/master/src/token.js | ||
*/ | ||
* Receives a consent web token. | ||
* See: https://github.com/didomi/cwt-node/blob/master/src/token.js | ||
*/ | ||
export type OnConsentChangedFunction = (consentToken: any) => any; | ||
@@ -141,3 +191,5 @@ export type OnPreferencesClickPurposeFunction = (purposeId: string) => any; | ||
// Force an object type for didomiConfig | ||
interface IDidomiConfig { [key: string]: any; } | ||
interface IDidomiConfig { | ||
[key: string]: any; | ||
} | ||
@@ -144,0 +196,0 @@ /** |
{ | ||
"name": "@didomi/react", | ||
"version": "1.8.4", | ||
"version": "1.8.5", | ||
"description": "didomi-react-test React component", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
53110
874