Skip to content

Commit

Permalink
Adds TCF Support (#3804)
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Sachs <[email protected]>
Co-authored-by: Allison King <[email protected]>
Co-authored-by: eastandwestwind <[email protected]>
  • Loading branch information
4 people authored Sep 20, 2023
1 parent b9efa45 commit e279130
Show file tree
Hide file tree
Showing 129 changed files with 34,094 additions and 2,206 deletions.
12 changes: 12 additions & 0 deletions .fides/db_dataset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ dataset:
- name: vendor
data_categories:
- system.operations
- name: system
data_categories:
- system.operations
data_qualifier: aggregated.anonymized.unlinked_pseudonymized.pseudonymized.identified
- name: feature
data_categories:
Expand Down Expand Up @@ -2323,6 +2326,9 @@ dataset:
- name: vendor
data_categories:
- system.operations
- name: system
data_categories:
- system.operations
data_qualifier: aggregated.anonymized.unlinked_pseudonymized.pseudonymized.identified
- name: feature
data_categories:
Expand Down Expand Up @@ -2451,6 +2457,9 @@ dataset:
- name: vendor
data_categories:
- system.operations
- name: system
data_categories:
- system.operations
data_qualifier: aggregated.anonymized.unlinked_pseudonymized.pseudonymized.identified
- name: feature
data_categories:
Expand Down Expand Up @@ -2559,6 +2568,9 @@ dataset:
- name: vendor
data_categories:
- system.operations
- name: system
data_categories:
- system.operations
data_qualifier: aggregated.anonymized.unlinked_pseudonymized.pseudonymized.identified
- name: feature
data_categories:
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,18 @@ The types of changes are:

### Added
- "Add a vendor" flow to configuring consent page [#4107](https://github.com/ethyca/fides/pull/4107)
- Initial TCF Backend Support [#3804](https://github.com/ethyca/fides/pull/3804)
- Add initial layer to TCF modal [#3956](https://github.com/ethyca/fides/pull/3956)
- Support for rendering in the TCF modal whether or not a vendor is part of the GVL [#3972](https://github.com/ethyca/fides/pull/3972)
- Features and legal bases dropdown for TCF modal [#3995](https://github.com/ethyca/fides/pull/3995)
- TCF CMP stub API [#4000](https://github.com/ethyca/fides/pull/4000)
- Fides-js can now display preliminary TCF data [#3879](https://github.com/ethyca/fides/pull/3879)
- Fides-js can persist TCF preferences to the backend [#3887](https://github.com/ethyca/fides/pull/3887)
- TCF modal now supports setting legitimate interest fields [#4037](https://github.com/ethyca/fides/pull/4037)

### Changed
- Added further config options to customize the privacy center [#4090](https://github.com/ethyca/fides/pull/4090)
- Refactored `fides.js` components so that they can take data structures that are not necessarily privacy notices [#3870](https://github.com/ethyca/fides/pull/3870)

### Fixed
- Allows CDN to cache empty experience responses from fides.js API [#4113](https://github.com/ethyca/fides/pull/4113)
Expand Down
18 changes: 16 additions & 2 deletions clients/admin-ui/src/types/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ export type { ConsentReport } from "./models/ConsentReport";
export type { ConsentReportingSchema } from "./models/ConsentReportingSchema";
export type { ConsentRequestMap } from "./models/ConsentRequestMap";
export type { ConsentRequestResponse } from "./models/ConsentRequestResponse";
export type { ConsentSettingsRequestSchema } from "./models/ConsentSettingsRequestSchema";
export type { ConsentSettingsResponseSchema } from "./models/ConsentSettingsResponseSchema";
export type { ConsentWithExecutableStatus } from "./models/ConsentWithExecutableStatus";
export type { ContactDetails } from "./models/ContactDetails";
export type { Cookies } from "./models/Cookies";
Expand Down Expand Up @@ -118,6 +120,9 @@ export type { DryRunDatasetResponse } from "./models/DryRunDatasetResponse";
export type { DynamoDBDocsSchema } from "./models/DynamoDBDocsSchema";
export { EdgeDirection } from "./models/EdgeDirection";
export type { EmailDocsSchema } from "./models/EmailDocsSchema";
export type { EmbeddedLineItem } from "./models/EmbeddedLineItem";
export type { EmbeddedPurpose } from "./models/EmbeddedPurpose";
export type { EmbeddedVendor } from "./models/EmbeddedVendor";
export type { Endpoint } from "./models/Endpoint";
export { EnforcementLevel } from "./models/EnforcementLevel";
export type { Evaluation } from "./models/Evaluation";
Expand Down Expand Up @@ -153,7 +158,7 @@ export type { Identity } from "./models/Identity";
export type { IdentityTypes } from "./models/IdentityTypes";
export type { IdentityVerificationConfigResponse } from "./models/IdentityVerificationConfigResponse";
export { IncludeExcludeEnum } from "./models/IncludeExcludeEnum";
export type { LastServedNoticeSchema } from "./models/LastServedNoticeSchema";
export type { LastServedConsentSchema } from "./models/LastServedConsentSchema";
export { LegalBasisEnum } from "./models/LegalBasisEnum";
export { LegalBasisForProcessingEnum } from "./models/LegalBasisForProcessingEnum";
export { LegalBasisForProfilingEnum } from "./models/LegalBasisForProfilingEnum";
Expand Down Expand Up @@ -187,7 +192,6 @@ export type { MessagingTemplateResponse } from "./models/MessagingTemplateRespon
export type { MongoDBDocsSchema } from "./models/MongoDBDocsSchema";
export type { MSSQLDocsSchema } from "./models/MSSQLDocsSchema";
export type { MySQLDocsSchema } from "./models/MySQLDocsSchema";
export type { NoticesServedRequest } from "./models/NoticesServedRequest";
export type { NotificationApplicationConfig } from "./models/NotificationApplicationConfig";
export type { OktaConfig } from "./models/OktaConfig";
export type { Organization } from "./models/Organization";
Expand Down Expand Up @@ -248,6 +252,7 @@ export type { QueryParam } from "./models/QueryParam";
export type { RateLimit } from "./models/RateLimit";
export type { RateLimitConfig } from "./models/RateLimitConfig";
export { RateLimitPeriod } from "./models/RateLimitPeriod";
export type { RecordConsentServedRequest } from "./models/RecordConsentServedRequest";
export type { RedshiftDocsSchema } from "./models/RedshiftDocsSchema";
export type { Registration } from "./models/Registration";
export type { Registry } from "./models/Registry";
Expand Down Expand Up @@ -300,6 +305,15 @@ export type { SystemScannerStatus } from "./models/SystemScannerStatus";
export type { SystemScanResponse } from "./models/SystemScanResponse";
export type { SystemsDiff } from "./models/SystemsDiff";
export { SystemType } from "./models/SystemType";
export type { TCFDataCategoryRecord } from "./models/TCFDataCategoryRecord";
export type { TCFFeatureRecord } from "./models/TCFFeatureRecord";
export type { TCFFeatureSave } from "./models/TCFFeatureSave";
export type { TCFPurposeRecord } from "./models/TCFPurposeRecord";
export type { TCFPurposeSave } from "./models/TCFPurposeSave";
export type { TCFSpecialFeatureSave } from "./models/TCFSpecialFeatureSave";
export type { TCFSpecialPurposeSave } from "./models/TCFSpecialPurposeSave";
export type { TCFVendorRecord } from "./models/TCFVendorRecord";
export type { TCFVendorSave } from "./models/TCFVendorSave";
export type { TestMessagingStatusMessage } from "./models/TestMessagingStatusMessage";
export { TestStatus } from "./models/TestStatus";
export type { TestStatusMessage } from "./models/TestStatusMessage";
Expand Down
1 change: 1 addition & 0 deletions clients/admin-ui/src/types/api/models/ComponentType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
export enum ComponentType {
OVERLAY = "overlay",
PRIVACY_CENTER = "privacy_center",
TCF_OVERLAY = "tcf_overlay",
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ import type { UserConsentPreference } from "./UserConsentPreference";
* Schema for consent reporting - largely a join of PrivacyPreferenceHistory and PrivacyRequest
*/
export type ConsentReportingSchema = {
purpose?: number;
special_purpose?: number;
vendor?: string;
feature?: number;
special_feature?: number;
system?: string;
id: string;
privacy_request_id?: string;
email?: string;
Expand All @@ -24,7 +30,7 @@ export type ConsentReportingSchema = {
request_status?: PrivacyRequestStatus;
request_type: ActionType;
approver_id?: string;
privacy_notice_history_id: string;
privacy_notice_history_id?: string;
preference: UserConsentPreference;
user_geography?: string;
relevant_systems?: Array<string>;
Expand All @@ -36,4 +42,5 @@ export type ConsentReportingSchema = {
truncated_ip_address?: string;
method?: ConsentMethod;
served_notice_history_id?: string;
tcf_version?: string;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

/**
* Response schema for consent settings update
*/
export type ConsentSettingsRequestSchema = {
tcf_enabled?: boolean;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

/**
* Response schema for consent settings response
*/
export type ConsentSettingsResponseSchema = {
tcf_enabled?: boolean;
created_at: string;
updated_at: string;
};
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@ import type { UserConsentPreference } from "./UserConsentPreference";
* contents of the notice the user consented to at the time.
*/
export type CurrentPrivacyPreferenceReportingSchema = {
purpose?: number;
special_purpose?: number;
vendor?: string;
feature?: number;
special_feature?: number;
system?: string;
id: string;
preference: UserConsentPreference;
privacy_notice_history_id: string;
privacy_notice_history_id?: string;
privacy_preference_history_id: string;
provided_identity_id?: string;
created_at: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@ import type { UserConsentPreference } from "./UserConsentPreference";
* contents of the notice the user consented to at the time.
*/
export type CurrentPrivacyPreferenceSchema = {
purpose?: number;
special_purpose?: number;
vendor?: string;
feature?: number;
special_feature?: number;
system?: string;
id: string;
preference: UserConsentPreference;
privacy_notice_history: PrivacyNoticeHistorySchema;
privacy_preference_history_id: string;
privacy_notice_history?: PrivacyNoticeHistorySchema;
privacy_preference_history_id?: string;
};
11 changes: 11 additions & 0 deletions clients/admin-ui/src/types/api/models/EmbeddedLineItem.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

/**
* Sparse details for an embedded TCF line item within another TCF component. Read-only.
*/
export type EmbeddedLineItem = {
id: number;
name: string;
};
12 changes: 12 additions & 0 deletions clients/admin-ui/src/types/api/models/EmbeddedPurpose.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

/**
* Sparse details for an embedded TCF line item within another TCF component. Read-only.
*/
export type EmbeddedPurpose = {
id: number;
name: string;
legal_bases?: Array<string>;
};
11 changes: 11 additions & 0 deletions clients/admin-ui/src/types/api/models/EmbeddedVendor.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

/**
* Sparse details for an embedded vendor. Read-only.
*/
export type EmbeddedVendor = {
id: string;
name: string;
};
21 changes: 21 additions & 0 deletions clients/admin-ui/src/types/api/models/LastServedConsentSchema.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

import type { PrivacyNoticeHistorySchema } from "./PrivacyNoticeHistorySchema";

/**
* Schema that surfaces the the last time a consent item that was shown to a user
*/
export type LastServedConsentSchema = {
purpose?: number;
special_purpose?: number;
vendor?: string;
feature?: number;
special_feature?: number;
system?: string;
id: string;
updated_at: string;
served_notice_history_id: string;
privacy_notice_history?: PrivacyNoticeHistorySchema;
};
15 changes: 0 additions & 15 deletions clients/admin-ui/src/types/api/models/LastServedNoticeSchema.ts

This file was deleted.

36 changes: 36 additions & 0 deletions clients/admin-ui/src/types/api/models/PrivacyExperienceResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,53 @@ import type { ComponentType } from "./ComponentType";
import type { ExperienceConfigResponse } from "./ExperienceConfigResponse";
import type { PrivacyNoticeRegion } from "./PrivacyNoticeRegion";
import type { PrivacyNoticeResponseWithUserPreferences } from "./PrivacyNoticeResponseWithUserPreferences";
import type { TCFFeatureRecord } from "./TCFFeatureRecord";
import type { TCFPurposeRecord } from "./TCFPurposeRecord";
import type { TCFVendorRecord } from "./TCFVendorRecord";

/**
* An API representation of a PrivacyExperience used for response payloads
*/
export type PrivacyExperienceResponse = {
region: PrivacyNoticeRegion;
component?: ComponentType;
/**
* The Experience copy or language
*/
experience_config?: ExperienceConfigResponse;
id: string;
created_at: string;
updated_at: string;
/**
* Whether the experience should show a banner
*/
show_banner?: boolean;
/**
* The Privacy Notices associated with this experience, if applicable
*/
privacy_notices?: Array<PrivacyNoticeResponseWithUserPreferences>;
/**
* For TCF Experiences, the TCF Purposes that appear on your Systems
*/
tcf_purposes?: Array<TCFPurposeRecord>;
/**
* For TCF Experiences, the TCF Special Purposes that appear on your Systems
*/
tcf_special_purposes?: Array<TCFPurposeRecord>;
/**
* For TCF Experiences, the TCF Vendors associated with your Systems
*/
tcf_vendors?: Array<TCFVendorRecord>;
/**
* For TCF Experiences, the TCF Features that appear on your Systems
*/
tcf_features?: Array<TCFFeatureRecord>;
/**
* For TCF Experiences, the TCF Special Features that appear on your Systems
*/
tcf_special_features?: Array<TCFFeatureRecord>;
/**
* For TCF Experiences, Systems with TCF components that do not have an official vendor id (identified by system id)
*/
tcf_systems?: Array<TCFVendorRecord>;
};
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ import type { UserConsentPreference } from "./UserConsentPreference";
* and any saved preferences.
*/
export type PrivacyNoticeResponseWithUserPreferences = {
default_preference?: UserConsentPreference;
current_preference?: UserConsentPreference;
outdated_preference?: UserConsentPreference;
current_served?: boolean;
outdated_served?: boolean;
name?: string;
notice_key?: string;
description?: string;
Expand All @@ -34,9 +39,4 @@ export type PrivacyNoticeResponseWithUserPreferences = {
privacy_notice_history_id: string;
cookies: Array<Cookies>;
systems_applicable?: boolean;
default_preference: UserConsentPreference;
current_preference?: UserConsentPreference;
outdated_preference?: UserConsentPreference;
current_served?: boolean;
outdated_served?: boolean;
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,25 @@
import type { ConsentMethod } from "./ConsentMethod";
import type { ConsentOptionCreate } from "./ConsentOptionCreate";
import type { Identity } from "./Identity";
import type { TCFFeatureSave } from "./TCFFeatureSave";
import type { TCFPurposeSave } from "./TCFPurposeSave";
import type { TCFSpecialFeatureSave } from "./TCFSpecialFeatureSave";
import type { TCFSpecialPurposeSave } from "./TCFSpecialPurposeSave";
import type { TCFVendorSave } from "./TCFVendorSave";

/**
* Request body for creating PrivacyPreferences.
*/
export type PrivacyPreferencesRequest = {
browser_identity: Identity;
code?: string;
preferences: Array<ConsentOptionCreate>;
preferences?: Array<ConsentOptionCreate>;
purpose_preferences?: Array<TCFPurposeSave>;
special_purpose_preferences?: Array<TCFSpecialPurposeSave>;
vendor_preferences?: Array<TCFVendorSave>;
feature_preferences?: Array<TCFFeatureSave>;
special_feature_preferences?: Array<TCFSpecialFeatureSave>;
system_preferences?: Array<TCFVendorSave>;
policy_key?: string;
privacy_experience_id?: string;
user_geography?: string;
Expand Down
Loading

0 comments on commit e279130

Please sign in to comment.