Skip to content

Commit

Permalink
LA-128 Fix docs for region codes (#5511)
Browse files Browse the repository at this point in the history
Co-authored-by: Lucano Vera <[email protected]>
  • Loading branch information
lucanovera and Lucano Vera authored Nov 19, 2024
1 parent 2c64212 commit 6fc8086
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 21 deletions.
9 changes: 4 additions & 5 deletions clients/fides-js/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Original file line number Diff line number Diff line change
@@ -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
5 changes: 3 additions & 2 deletions clients/fides-js/docs/interfaces/FidesExperienceConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions clients/fides-js/src/docs/fides-experience-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
Expand Down
1 change: 1 addition & 0 deletions clients/fides-js/src/docs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
20 changes: 20 additions & 0 deletions clients/fides-js/src/docs/privacy-notice-region.ts
Original file line number Diff line number Diff line change
@@ -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 {}

0 comments on commit 6fc8086

Please sign in to comment.