From 6fc80862e4123e0a335cf52f967831521ac15e73 Mon Sep 17 00:00:00 2001 From: Lucano Vera Date: Tue, 19 Nov 2024 10:03:37 -0300 Subject: [PATCH] LA-128 Fix docs for region codes (#5511) Co-authored-by: Lucano Vera --- clients/fides-js/docs/README.md | 9 +++---- .../PrivacyNoticeRegion.md | 25 ++++++++----------- .../docs/interfaces/FidesExperienceConfig.md | 5 ++-- .../src/docs/fides-experience-config.ts | 1 + clients/fides-js/src/docs/index.ts | 1 + .../src/docs/privacy-notice-region.ts | 20 +++++++++++++++ 6 files changed, 40 insertions(+), 21 deletions(-) rename clients/fides-js/docs/{types => enumerations}/PrivacyNoticeRegion.md (59%) create mode 100644 clients/fides-js/src/docs/privacy-notice-region.ts diff --git a/clients/fides-js/docs/README.md b/clients/fides-js/docs/README.md index 2209b87699..46b6ab9b58 100644 --- a/clients/fides-js/docs/README.md +++ b/clients/fides-js/docs/README.md @@ -26,14 +26,13 @@ Google Tag Manager, IAB TCF, etc. See [Fides](interfaces/Fides.md) for how to use the `window.Fides` JavaScript API, [FidesOptions](interfaces/FidesOptions.md) for supported options to customize it's behavior, and [FidesEvent](interfaces/FidesEvent.md) for how to use `window.addEventListener(...)` to subscribe to custom Fides events for real-time updates. +## Enumerations + +- [PrivacyNoticeRegion](enumerations/PrivacyNoticeRegion.md) + ## Interfaces - [FidesEvent](interfaces/FidesEvent.md) - [FidesExperienceConfig](interfaces/FidesExperienceConfig.md) - [FidesOptions](interfaces/FidesOptions.md) - [Fides](interfaces/Fides.md) - - -## Types - -- [PrivacyNoticeRegion](types/PrivacyNoticeRegion.md) diff --git a/clients/fides-js/docs/types/PrivacyNoticeRegion.md b/clients/fides-js/docs/enumerations/PrivacyNoticeRegion.md similarity index 59% rename from clients/fides-js/docs/types/PrivacyNoticeRegion.md rename to clients/fides-js/docs/enumerations/PrivacyNoticeRegion.md index 828a7588d0..6c91a6161b 100644 --- a/clients/fides-js/docs/types/PrivacyNoticeRegion.md +++ b/clients/fides-js/docs/enumerations/PrivacyNoticeRegion.md @@ -1,21 +1,18 @@ -# Types: PrivacyNoticeRegion +# Enumeration: PrivacyNoticeRegion A string that represents a specific region of the world. It is used to specify regions that apply to a [Privacy Experience](/tutorials/consent-management/consent-management-configuration/privacy-experiences#what-are-privacy-experiences). - The string is formatted with [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166) two-letter codes for a country and subdivisions. They're written in lowercase and separated with an underscore. Subdivisions are currently supported for the United States and Canada. - The PrivacyNoticeRegion can also be one of the following non-iso standard codes: - -- `eea` : European Economic Area -- `mexico_central_america` : Mexico and Central America +- `eea` : European Economic Area +- `non_eea` : European countries that are not part of the European Economic Area +- `mexico_central_america` : Mexico and Central America - `caribbean` : Caribbean ### Example values: - -`us` : United States -`ca` : Canada -`fr` : France -`us_ca` : United States - State of California -`us_ny` : United States - State of New York -`ca_on` : Canada - Ontario Province -`eea` : European Economic Area +- `us` : United States +- `ca` : Canada +- `fr` : France +- `us_ca` : United States - State of California +- `us_ny` : United States - State of New York +- `ca_on` : Canada - Ontario Province +- `eea` : European Economic Area diff --git a/clients/fides-js/docs/interfaces/FidesExperienceConfig.md b/clients/fides-js/docs/interfaces/FidesExperienceConfig.md index de6dd4daae..8744e2f9fa 100644 --- a/clients/fides-js/docs/interfaces/FidesExperienceConfig.md +++ b/clients/fides-js/docs/interfaces/FidesExperienceConfig.md @@ -80,9 +80,10 @@ Full name of the configured experience (e.g. `"US Modal"`) ### regions? -> `optional` **regions**: [PrivacyNoticeRegion](../types/PrivacyNoticeRegion)[] +> `optional` **regions**: `string`[] -List of [region codes](../types/PrivacyNoticeRegion) that apply. +List of region codes that apply. +For more information on valid values see [PrivacyNoticeRegion](../enumerations/PrivacyNoticeRegion.md) #### Example diff --git a/clients/fides-js/src/docs/fides-experience-config.ts b/clients/fides-js/src/docs/fides-experience-config.ts index dafd4cc7c3..3fcb71142e 100644 --- a/clients/fides-js/src/docs/fides-experience-config.ts +++ b/clients/fides-js/src/docs/fides-experience-config.ts @@ -58,6 +58,7 @@ export interface FidesExperienceConfig { /** * List of region codes that apply. + * For more information on valid values see {@link PrivacyNoticeRegion} * @example * ```ts * [ "us_ca", "us_co", "us_ct", "us_ut", "us_va", "us_or", "us_tx" ] diff --git a/clients/fides-js/src/docs/index.ts b/clients/fides-js/src/docs/index.ts index bdd866eded..4f9f6d1731 100644 --- a/clients/fides-js/src/docs/index.ts +++ b/clients/fides-js/src/docs/index.ts @@ -52,3 +52,4 @@ export * from "./fides"; export * from "./fides-event"; export * from "./fides-experience-config"; export * from "./fides-options"; +export * from "./privacy-notice-region"; diff --git a/clients/fides-js/src/docs/privacy-notice-region.ts b/clients/fides-js/src/docs/privacy-notice-region.ts new file mode 100644 index 0000000000..cb33f0b316 --- /dev/null +++ b/clients/fides-js/src/docs/privacy-notice-region.ts @@ -0,0 +1,20 @@ +/** + * A string that represents a specific region of the world. It is used to specify regions that apply to a [Privacy Experience](/tutorials/consent-management/consent-management-configuration/privacy-experiences#what-are-privacy-experiences). + * The string is formatted with [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166) two-letter codes for a country and subdivisions. They're written in lowercase and separated with an underscore. Subdivisions are currently supported for the United States and Canada. + * The PrivacyNoticeRegion can also be one of the following non-iso standard codes: + * - `eea` : European Economic Area + * - `non_eea` : European countries that are not part of the European Economic Area + * - `mexico_central_america` : Mexico and Central America + * - `caribbean` : Caribbean + * + * ### Example values: + * - `us` : United States + * - `ca` : Canada + * - `fr` : France + * - `us_ca` : United States - State of California + * - `us_ny` : United States - State of New York + * - `ca_on` : Canada - Ontario Province + * - `eea` : European Economic Area + */ + +export enum PrivacyNoticeRegion {}