@transcend-io/privacy-types 7.3.0 → 7.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,4 +1,7 @@
1
1
  import { applyEnum, getEntries, getValues, invert, makeEnum, toJsonSchema, valuesOf } from "@transcend-io/type-utils";
2
+ import { BrowserLanguage } from "@transcend-io/airgap.js-types/enums/browserLanguage";
3
+ import { OnConsentExpiry } from "@transcend-io/airgap.js-types/enums/consentExpiry";
4
+ import { InitialViewState } from "@transcend-io/airgap.js-types/enums/viewState";
2
5
  import * as t from "io-ts";
3
6
  import { LOCALE_KEY } from "@transcend-io/internationalization";
4
7
  import * as either from "fp-ts/lib/Either.js";
@@ -1750,1401 +1753,264 @@ const ConsentThemeInput = t.type({
1750
1753
  configuration: t.string
1751
1754
  });
1752
1755
  //#endregion
1753
- //#region src/consentUiConfiguration.ts
1754
- /** Actions for buttons in modals */
1755
- const ModalButtonActions = {
1756
- SaveAndClose: "SaveAndClose",
1757
- AcceptAllAndClose: "AcceptAllAndClose",
1758
- RejectAllAndClose: "RejectAllAndClose"
1759
- };
1760
- /** All action types for buttons */
1761
- const ButtonAction = {
1762
- ...ModalButtonActions,
1763
- OpenModal: "OpenModal"
1756
+ //#region src/isoConstants/iso3166-1.ts
1757
+ const COUNTRY_LOOKUP = {
1758
+ AF: "Afghanistan",
1759
+ AX: "Åland Islands",
1760
+ AL: "Albania",
1761
+ DZ: "Algeria",
1762
+ AS: "American Samoa",
1763
+ AD: "Andorra",
1764
+ AO: "Angola",
1765
+ AI: "Anguilla",
1766
+ AQ: "Antarctica",
1767
+ AG: "Antigua & Barbuda",
1768
+ AR: "Argentina",
1769
+ AM: "Armenia",
1770
+ AW: "Aruba",
1771
+ AU: "Australia",
1772
+ AT: "Austria",
1773
+ AZ: "Azerbaijan",
1774
+ BS: "Bahamas",
1775
+ BH: "Bahrain",
1776
+ BD: "Bangladesh",
1777
+ BB: "Barbados",
1778
+ BY: "Belarus",
1779
+ BE: "Belgium",
1780
+ BZ: "Belize",
1781
+ BJ: "Benin",
1782
+ BM: "Bermuda",
1783
+ BT: "Bhutan",
1784
+ BO: "Bolivia",
1785
+ BA: "Bosnia & Herzegovina",
1786
+ BW: "Botswana",
1787
+ BV: "Bouvet Island",
1788
+ BR: "Brazil",
1789
+ IO: "British Indian Ocean Territory",
1790
+ VG: "British Virgin Islands",
1791
+ BN: "Brunei",
1792
+ BG: "Bulgaria",
1793
+ BF: "Burkina Faso",
1794
+ BI: "Burundi",
1795
+ KH: "Cambodia",
1796
+ CM: "Cameroon",
1797
+ CA: "Canada",
1798
+ CV: "Cape Verde",
1799
+ BQ: "Caribbean Netherlands",
1800
+ KY: "Cayman Islands",
1801
+ CF: "Central African Republic",
1802
+ TD: "Chad",
1803
+ CL: "Chile",
1804
+ CN: "China",
1805
+ CX: "Christmas Island",
1806
+ CC: "Cocos (Keeling) Islands",
1807
+ CO: "Colombia",
1808
+ KM: "Comoros",
1809
+ CG: "Congo - Brazzaville",
1810
+ CD: "Congo - Kinshasa",
1811
+ CK: "Cook Islands",
1812
+ CR: "Costa Rica",
1813
+ CI: "Côte d’Ivoire",
1814
+ HR: "Croatia",
1815
+ CU: "Cuba",
1816
+ CW: "Curaçao",
1817
+ CY: "Cyprus",
1818
+ CZ: "Czechia",
1819
+ DK: "Denmark",
1820
+ DJ: "Djibouti",
1821
+ DM: "Dominica",
1822
+ DO: "Dominican Republic",
1823
+ EC: "Ecuador",
1824
+ EG: "Egypt",
1825
+ SV: "El Salvador",
1826
+ GQ: "Equatorial Guinea",
1827
+ ER: "Eritrea",
1828
+ EE: "Estonia",
1829
+ SZ: "Eswatini",
1830
+ ET: "Ethiopia",
1831
+ FK: "Falkland Islands",
1832
+ FO: "Faroe Islands",
1833
+ FJ: "Fiji",
1834
+ FI: "Finland",
1835
+ FR: "France",
1836
+ GF: "French Guiana",
1837
+ PF: "French Polynesia",
1838
+ TF: "French Southern Territories",
1839
+ GA: "Gabon",
1840
+ GM: "Gambia",
1841
+ GE: "Georgia",
1842
+ DE: "Germany",
1843
+ GH: "Ghana",
1844
+ GI: "Gibraltar",
1845
+ GR: "Greece",
1846
+ GL: "Greenland",
1847
+ GD: "Grenada",
1848
+ GP: "Guadeloupe",
1849
+ GU: "Guam",
1850
+ GT: "Guatemala",
1851
+ GG: "Guernsey",
1852
+ GN: "Guinea",
1853
+ GW: "Guinea-Bissau",
1854
+ GY: "Guyana",
1855
+ HT: "Haiti",
1856
+ HM: "Heard & McDonald Islands",
1857
+ HN: "Honduras",
1858
+ HK: "Hong Kong SAR China",
1859
+ HU: "Hungary",
1860
+ IS: "Iceland",
1861
+ IN: "India",
1862
+ ID: "Indonesia",
1863
+ IR: "Iran",
1864
+ IQ: "Iraq",
1865
+ IE: "Ireland",
1866
+ IM: "Isle of Man",
1867
+ IL: "Israel",
1868
+ IT: "Italy",
1869
+ JM: "Jamaica",
1870
+ JP: "Japan",
1871
+ JE: "Jersey",
1872
+ JO: "Jordan",
1873
+ KZ: "Kazakhstan",
1874
+ KE: "Kenya",
1875
+ KI: "Kiribati",
1876
+ KW: "Kuwait",
1877
+ KG: "Kyrgyzstan",
1878
+ LA: "Laos",
1879
+ LV: "Latvia",
1880
+ LB: "Lebanon",
1881
+ LS: "Lesotho",
1882
+ LR: "Liberia",
1883
+ LY: "Libya",
1884
+ LI: "Liechtenstein",
1885
+ LT: "Lithuania",
1886
+ LU: "Luxembourg",
1887
+ MO: "Macao SAR China",
1888
+ MG: "Madagascar",
1889
+ MW: "Malawi",
1890
+ MY: "Malaysia",
1891
+ MV: "Maldives",
1892
+ ML: "Mali",
1893
+ MT: "Malta",
1894
+ MH: "Marshall Islands",
1895
+ MQ: "Martinique",
1896
+ MR: "Mauritania",
1897
+ MU: "Mauritius",
1898
+ YT: "Mayotte",
1899
+ MX: "Mexico",
1900
+ FM: "Micronesia",
1901
+ MD: "Moldova",
1902
+ MC: "Monaco",
1903
+ MN: "Mongolia",
1904
+ ME: "Montenegro",
1905
+ MS: "Montserrat",
1906
+ MA: "Morocco",
1907
+ MZ: "Mozambique",
1908
+ MM: "Myanmar (Burma)",
1909
+ NA: "Namibia",
1910
+ NR: "Nauru",
1911
+ NP: "Nepal",
1912
+ NL: "Netherlands",
1913
+ NC: "New Caledonia",
1914
+ NZ: "New Zealand",
1915
+ NI: "Nicaragua",
1916
+ NE: "Niger",
1917
+ NG: "Nigeria",
1918
+ NU: "Niue",
1919
+ NF: "Norfolk Island",
1920
+ KP: "North Korea",
1921
+ MK: "North Macedonia",
1922
+ MP: "Northern Mariana Islands",
1923
+ NO: "Norway",
1924
+ OM: "Oman",
1925
+ PK: "Pakistan",
1926
+ PW: "Palau",
1927
+ PS: "Palestinian Territories",
1928
+ PA: "Panama",
1929
+ PG: "Papua New Guinea",
1930
+ PY: "Paraguay",
1931
+ PE: "Peru",
1932
+ PH: "Philippines",
1933
+ PN: "Pitcairn Islands",
1934
+ PL: "Poland",
1935
+ PT: "Portugal",
1936
+ PR: "Puerto Rico",
1937
+ QA: "Qatar",
1938
+ RE: "Réunion",
1939
+ RO: "Romania",
1940
+ RU: "Russia",
1941
+ RW: "Rwanda",
1942
+ WS: "Samoa",
1943
+ SM: "San Marino",
1944
+ ST: "São Tomé & Príncipe",
1945
+ SA: "Saudi Arabia",
1946
+ SN: "Senegal",
1947
+ RS: "Serbia",
1948
+ SC: "Seychelles",
1949
+ SL: "Sierra Leone",
1950
+ SG: "Singapore",
1951
+ SX: "Sint Maarten",
1952
+ SK: "Slovakia",
1953
+ SI: "Slovenia",
1954
+ SB: "Solomon Islands",
1955
+ SO: "Somalia",
1956
+ ZA: "South Africa",
1957
+ GS: "South Georgia & South Sandwich Islands",
1958
+ KR: "South Korea",
1959
+ SS: "South Sudan",
1960
+ ES: "Spain",
1961
+ LK: "Sri Lanka",
1962
+ BL: "St. Barthélemy",
1963
+ SH: "St. Helena",
1964
+ KN: "St. Kitts & Nevis",
1965
+ LC: "St. Lucia",
1966
+ MF: "St. Martin",
1967
+ PM: "St. Pierre & Miquelon",
1968
+ VC: "St. Vincent & Grenadines",
1969
+ SD: "Sudan",
1970
+ SR: "Suriname",
1971
+ SJ: "Svalbard & Jan Mayen",
1972
+ SE: "Sweden",
1973
+ CH: "Switzerland",
1974
+ SY: "Syria",
1975
+ TW: "Taiwan",
1976
+ TJ: "Tajikistan",
1977
+ TZ: "Tanzania",
1978
+ TH: "Thailand",
1979
+ TL: "Timor-Leste",
1980
+ TG: "Togo",
1981
+ TK: "Tokelau",
1982
+ TO: "Tonga",
1983
+ TT: "Trinidad & Tobago",
1984
+ TN: "Tunisia",
1985
+ TR: "Turkey",
1986
+ TM: "Turkmenistan",
1987
+ TC: "Turks & Caicos Islands",
1988
+ TV: "Tuvalu",
1989
+ UM: "U.S. Outlying Islands",
1990
+ VI: "U.S. Virgin Islands",
1991
+ UG: "Uganda",
1992
+ UA: "Ukraine",
1993
+ AE: "United Arab Emirates",
1994
+ GB: "United Kingdom",
1995
+ US: "United States",
1996
+ UY: "Uruguay",
1997
+ UZ: "Uzbekistan",
1998
+ VU: "Vanuatu",
1999
+ VA: "Vatican City",
2000
+ VE: "Venezuela",
2001
+ VN: "Vietnam",
2002
+ WF: "Wallis & Futuna",
2003
+ EH: "Western Sahara",
2004
+ YE: "Yemen",
2005
+ ZM: "Zambia",
2006
+ ZW: "Zimbabwe"
1764
2007
  };
1765
- /** Button Type */
1766
- const ButtonType = {
1767
- Default: "default",
1768
- Link: "link"
1769
- };
1770
- /** Absolute URL string */
1771
- const AbsoluteUrlString = t.string;
1772
- /** URL host string */
1773
- const URLHostString = t.string;
1774
- /** Top-level configuration shared between the UI layers */
1775
- const SharedTopLevelConfig = t.type({
1776
- /** Supported locales */
1777
- locales: t.array(LocaleCodec),
1778
- /** The transcend URL where the transcend logo links to */
1779
- transcendUrl: AbsoluteUrlString,
1780
- /** The default locale to use - must be one of the supported locales */
1781
- defaultLocale: LocaleCodec
1782
- });
1783
- /** Button configuration */
1784
- const ButtonConfig = t.type({
1785
- type: valuesOf(ButtonType),
1786
- action: valuesOf(ButtonAction)
1787
- });
1788
- /** Configuration for buttons in modals */
1789
- const ModalButtonConfig = t.type({
1790
- type: valuesOf(ButtonType),
1791
- action: valuesOf(ModalButtonActions)
1792
- });
1793
- /** Footer configuration */
1794
- const FooterConfig = t.type({
1795
- showTranscendBadge: t.boolean,
1796
- showGpcDetected: t.boolean,
1797
- showLocalePicker: t.boolean
1798
- });
1799
- /** Common configuration for both first and second layers */
1800
- const CommonLayerConfig = t.intersection([t.type({ showCloseButton: t.boolean }), t.partial({
1801
- logoImageUrl: AbsoluteUrlString,
1802
- alphaMask: t.boolean,
1803
- footer: FooterConfig,
1804
- links: t.array(AbsoluteUrlString)
1805
- })]);
1806
- /** First layer configuration: Banner */
1807
- const FirstLayerConfig = t.intersection([
1808
- CommonLayerConfig,
1809
- t.type({ buttons: t.tuple([
1810
- ButtonConfig,
1811
- t.union([ButtonConfig, t.undefined]),
1812
- t.union([ButtonConfig, t.undefined])
1813
- ]) }),
1814
- t.partial({ showHeader: t.boolean })
1815
- ]);
1816
- /** Second layer configuration: Modal */
1817
- const SecondLayerConfig = t.intersection([CommonLayerConfig, t.type({
1818
- buttons: t.tuple([
1819
- ModalButtonConfig,
1820
- t.union([ModalButtonConfig, t.undefined]),
1821
- t.union([ModalButtonConfig, t.undefined])
1822
- ]),
1823
- showBulkActions: t.boolean,
1824
- closeAfterBulkAction: t.boolean,
1825
- showPurposeDescriptions: t.boolean,
1826
- showCookiesLink: t.literal(false),
1827
- showVendorsLink: t.literal(false),
1828
- showToggleText: t.boolean,
1829
- showToggleIcon: t.boolean
1830
- })]);
1831
- /** --- Top-level UI Configuration --- */
1832
- /** Banner only configuration */
1833
- const UIConfigurationBannerOnly = t.intersection([SharedTopLevelConfig, t.type({ firstLayerConfig: FirstLayerConfig })]);
1834
- /** Modal only configuration */
1835
- const UIConfigurationModalOnly = t.intersection([SharedTopLevelConfig, t.type({ secondLayerConfig: SecondLayerConfig })]);
1836
- /** Banner into modal configuration */
1837
- const UIConfigurationBannerIntoModal = t.intersection([SharedTopLevelConfig, t.type({
1838
- firstLayerConfig: FirstLayerConfig,
1839
- secondLayerConfig: SecondLayerConfig
1840
- })]);
1841
- /** Configuration of the entire consent UI */
1842
- const UIConfiguration = t.union([
1843
- UIConfigurationBannerOnly,
1844
- UIConfigurationModalOnly,
1845
- UIConfigurationBannerIntoModal
1846
- ]);
1847
- //#endregion
1848
- //#region src/consentUiTheme.ts
1849
- /**
1850
- * Types representing the consent UI theme configuration
1851
- * Includes keys for alignment, logo position, content flow, colors, and more
1852
- */
1853
- /**
1854
- * Vertical alignment options for the consent UI content
1855
- */
1856
- const VerticalAlign = {
1857
- /** Aligns the UI content at the top */
1858
- Top: "top",
1859
- /** Aligns the UI content at the bottom */
1860
- Bottom: "bottom",
1861
- /** Aligns the UI content in the center */
1862
- Center: "center"
1863
- };
1864
- /**
1865
- * Horizontal alignment options for the consent UI content
1866
- */
1867
- const HorizontalAlign = {
1868
- /** Aligns the UI content on the left */
1869
- Left: "left",
1870
- /** Aligns the UI content in the center */
1871
- Center: "center",
1872
- /** Aligns the UI content on the right */
1873
- Right: "right"
1874
- };
1875
- /**
1876
- * Position options for the logo in the consent UI
1877
- */
1878
- const LogoPosition = {
1879
- /** Logo is positioned above the content */
1880
- Above: "above",
1881
- /** Logo is positioned to the left of the content */
1882
- Left: "left"
1883
- };
1884
- /**
1885
- * Defines how content can flow in a layout
1886
- */
1887
- const ContentFlows = {
1888
- /** Items are stacked vertically, top to bottom */
1889
- Vertical: "vertical",
1890
- /** Items are stacked horizontally, often wrapping if space runs out */
1891
- HorizontalStacked: "horizontalStacked",
1892
- /** Items are laid out horizontally, in a single row */
1893
- HorizontalFlat: "horizontalFlat"
1894
- };
1895
- /**
1896
- * Units available for responsive breakpoints.
1897
- */
1898
- const BreakpointType = {
1899
- /** Breakpoint defined in pixels */
1900
- Px: "px",
1901
- /** Breakpoint defined as a percentage */
1902
- Percent: "percent"
1903
- };
1904
- /** String that represents a CSS unit eg. px, em, etc. */
1905
- const CssUnitString = t.string;
1906
- /**
1907
- * String that represents an RGBA hex color (8-digit hex with alpha channel),
1908
- * e.g. "#FFFFFFFF" (opaque white) or "#FF000080" (semi-transparent red).
1909
- */
1910
- const RgbaHexString = t.string;
1911
- /**
1912
- * String that represents an RGB hex color (6-digit hex without alpha channel),
1913
- * e.g. "#FFFFFF" (white) or "#000000" (black).
1914
- */
1915
- const RgbHexString = t.string;
1916
- /** Index of a button's theme */
1917
- const ButtonThemeIndex = t.number;
1918
- /** Represents background color configuration */
1919
- const Background = t.type({
1920
- /** Background color as an RGBA hex string */
1921
- backgroundColor: RgbaHexString });
1922
- /**
1923
- * Represents border configuration
1924
- */
1925
- const Border = t.type({
1926
- borderRadius: CssUnitString,
1927
- borderColor: RgbHexString
1928
- });
1929
- /**
1930
- * Represents text configuration
1931
- */
1932
- const Text = t.type({ textColor: RgbHexString });
1933
- /**
1934
- * Represents link configuration
1935
- */
1936
- const Link = t.type({
1937
- linkColor: RgbHexString,
1938
- linkUnderline: t.boolean
1939
- });
1940
- /**
1941
- * Represents icon configuration
1942
- */
1943
- const Icon = t.type({ iconColor: RgbHexString });
1944
- /** Represents a responsive breakpoint with value and unit */
1945
- const Breakpoint = t.type({
1946
- /** The numeric value of the breakpoint */
1947
- value: t.number,
1948
- /** The unit of the breakpoint (px or percent) */
1949
- unit: valuesOf(BreakpointType)
1950
- });
1951
- /**
1952
- * Represents a container theme with background and border configurations
1953
- */
1954
- const ContainerTheme = t.intersection([Background, Border]);
1955
- /** Represents the header theme configuration (reduced scope) */
1956
- const HeaderThemeMinimal = t.type({
1957
- logoPosition: valuesOf(LogoPosition),
1958
- logoImageUrl: AbsoluteUrlString
1959
- });
1960
- /** Represents the header theme configuration (full scope) */
1961
- const HeaderTheme = t.intersection([Text, t.type({ logoPosition: valuesOf(LogoPosition) })]);
1962
- /** Represents the configuration of the close button */
1963
- const CloseButtonTheme = t.intersection([
1964
- Background,
1965
- Border,
1966
- t.type({ iconColor: RgbHexString })
1967
- ]);
1968
- /** Represents the configuration of the description text */
1969
- const DescriptionTextTheme = t.intersection([Text, Link]);
1970
- /** Represents the configuration of the footer */
1971
- const FooterTheme = t.intersection([Background, t.type({ localePickerColor: RgbHexString })]);
1972
- /** Defines how content should be padded and sized at different breakpoints */
1973
- const PaddedContentLayout = t.type({
1974
- breakpoint: Breakpoint,
1975
- maxWidths: t.record(valuesOf(ContentFlows), CssUnitString)
1976
- });
1977
- /** Defines a layout that stretches content to full width */
1978
- const FullWidthContentLayout = t.type({ fullWidth: t.literal(true) });
1979
- /** Represents either a padded content layout or a full-width layout */
1980
- const ContentLayout = t.union([PaddedContentLayout, FullWidthContentLayout]);
1981
- /** Theme configuration for the toggle */
1982
- const ToggleTheme = t.intersection([
1983
- Text,
1984
- Icon,
1985
- t.type({
1986
- enabledColor: RgbHexString,
1987
- disabledColor: RgbHexString,
1988
- knobColor: RgbHexString
1989
- })
1990
- ]);
1991
- /** Theme configuration shared between both First (banner) and Second Layers (modal) (reduced scope) */
1992
- const CommonLayerThemeMinimal = t.intersection([t.type({ alwaysShowScrollbar: t.boolean }), t.partial({ header: HeaderThemeMinimal })]);
1993
- /** Theme configuration shared between both First (banner) and Second Layers (modal) (full scope) */
1994
- const CommonLayerTheme = t.intersection([t.type({
1995
- buttons: t.tuple([
1996
- ButtonThemeIndex,
1997
- t.union([ButtonThemeIndex, t.undefined]),
1998
- t.union([ButtonThemeIndex, t.undefined])
1999
- ]),
2000
- container: ContainerTheme,
2001
- description: DescriptionTextTheme,
2002
- footer: FooterTheme,
2003
- alwaysShowScrollbar: t.boolean,
2004
- horizontalAlign: valuesOf(HorizontalAlign),
2005
- cookieAndPrivacyPolicy: t.partial(Link.props)
2006
- }), t.partial({
2007
- background: Background,
2008
- header: HeaderTheme,
2009
- closeButton: CloseButtonTheme
2010
- })]);
2011
- /** Theme configuration for the First Layer (banner) (reduced scope) */
2012
- const FirstLayerThemeMinimal = t.intersection([CommonLayerThemeMinimal, t.type({ contentLayout: ContentLayout })]);
2013
- /** Theme configuration for the First Layer (banner) (full scope) */
2014
- const FirstLayerTheme = t.intersection([
2015
- CommonLayerTheme,
2016
- t.type({
2017
- contentFlow: valuesOf(ContentFlows),
2018
- verticalAlign: valuesOf(VerticalAlign)
2019
- }),
2020
- t.partial({ contentLayout: ContentLayout })
2021
- ]);
2022
- /** Theme configuration for the Second Layer (modal) (reduced scope) */
2023
- const SecondLayerThemeMinimal = t.intersection([CommonLayerThemeMinimal, t.type({ lockToEdges: t.boolean })]);
2024
- /** Theme configuration for the Second Layer (modal) (full scope) */
2025
- const SecondLayerTheme = t.intersection([
2026
- CommonLayerTheme,
2027
- t.type({
2028
- modalTitle: Text,
2029
- modalSubtitle: Text,
2030
- purposeListTitle: Text,
2031
- caretIcon: Icon,
2032
- cardTitle: Text,
2033
- alwaysOnText: Text,
2034
- purposeDescription: DescriptionTextTheme,
2035
- purposeCard: ContainerTheme,
2036
- toggle: ToggleTheme,
2037
- lockToEdges: t.boolean,
2038
- maxWidth: CssUnitString
2039
- }),
2040
- t.partial({
2041
- bulkActionButtons: t.tuple([ButtonThemeIndex, ButtonThemeIndex]),
2042
- shrinkToFullWidth: CssUnitString
2043
- })
2044
- ]);
2045
- /** Represents a button theme which can be either a full button or a link style */
2046
- const ButtonTheme = t.union([t.intersection([
2047
- Background,
2048
- Border,
2049
- Text
2050
- ]), Link]);
2051
- /** Configuration shared between all themes types */
2052
- const SharedTopLevelTheme = t.type({ buttonThemes: t.array(ButtonTheme) });
2053
- /** Banner-only theme configuration (reduced scope) */
2054
- const ThemeConfigurationBannerOnlyMinimal = t.type({ firstLayer: FirstLayerThemeMinimal });
2055
- /** Banner-only theme configuration (full scope) */
2056
- const ThemeConfigurationBannerOnly = t.intersection([SharedTopLevelTheme, t.type({ firstLayer: FirstLayerTheme })]);
2057
- /** Modal-only theme configuration (reduced scope) */
2058
- const ThemeConfigurationModalOnlyMinimal = t.type({ secondLayer: SecondLayerThemeMinimal });
2059
- /** Modal-only theme configuration (full scope) */
2060
- const ThemeConfigurationModalOnly = t.intersection([SharedTopLevelTheme, t.type({ secondLayer: SecondLayerTheme })]);
2061
- /** Banner into modal theme configuration (reduced scope) */
2062
- const ThemeConfigurationBannerIntoModalMinimal = t.type({
2063
- firstLayer: FirstLayerThemeMinimal,
2064
- secondLayer: SecondLayerThemeMinimal
2065
- });
2066
- /** Banner into modal theme configuration (full scope) */
2067
- const ThemeConfigurationBannerIntoModal = t.intersection([SharedTopLevelTheme, t.type({
2068
- firstLayer: FirstLayerTheme,
2069
- secondLayer: SecondLayerTheme
2070
- })]);
2071
- /** Union of all reduced-scope theme configurations */
2072
- const ThemeConfigurationMinimal = t.union([
2073
- ThemeConfigurationBannerOnlyMinimal,
2074
- ThemeConfigurationModalOnlyMinimal,
2075
- ThemeConfigurationBannerIntoModalMinimal
2076
- ]);
2077
- /** Union of all full-scope theme configurations */
2078
- const ThemeConfiguration = t.union([
2079
- ThemeConfigurationBannerOnly,
2080
- ThemeConfigurationModalOnly,
2081
- ThemeConfigurationBannerIntoModal
2082
- ]);
2083
- //#endregion
2084
- //#region src/consentUi.ts
2085
- /**
2086
- * Types representing the top-level consent UI configuration
2087
- * Includes keys for regimes, variants, and themes
2088
- */
2089
- /** Key representing a specific regime */
2090
- const RegimeKey = t.string;
2091
- /** Key representing a specific consent UI variant */
2092
- const VariantKey = t.string;
2093
- /** Key representing a specific theme */
2094
- const ThemeKey = t.string;
2095
- /** String that represents an integer value */
2096
- const IntegerString = t.string;
2097
- /** String that represents a DOM element ID */
2098
- const DOMElementId = t.string;
2099
- /** String that represents a semicolon-delimited list of regime keys */
2100
- const SemicolonDelimitedRegimeKeyString = t.string;
2101
- /**
2102
- * Autofocus toggle values ("on" / "off").
2103
- */
2104
- const AutofocusToggle = {
2105
- /** Enable autofocus */
2106
- On: "on",
2107
- /** Disable autofocus */
2108
- Off: "off"
2109
- };
2110
- /**
2111
- * All valid autofocus values:
2112
- * - `"on"` / `"off"`
2113
- * - or a DOM element ID string
2114
- */
2115
- const AutofocusValues = t.union([valuesOf(AutofocusToggle), DOMElementId]);
2116
- /**
2117
- * Shadow root options ("open" / "closed" / "none").
2118
- */
2119
- const ShadowRootOptions = {
2120
- /** Enable shadow root */
2121
- Open: "open",
2122
- /** Disable shadow root */
2123
- Closed: "closed",
2124
- /** Disable shadow root */
2125
- None: "none"
2126
- };
2127
- /** Shared load option fields excluding themeConfigMap */
2128
- const SharedLoadOptions = t.intersection([t.type({
2129
- regimeVariantMap: t.record(RegimeKey, VariantKey),
2130
- regimeAutoPromptMap: t.record(RegimeKey, t.boolean),
2131
- variantConfigMap: t.record(VariantKey, UIConfiguration),
2132
- variantThemeMap: t.record(VariantKey, ThemeKey),
2133
- autofocus: AutofocusValues,
2134
- uiZIndex: IntegerString,
2135
- messageFolder: AbsoluteUrlString,
2136
- regimePrecedence: SemicolonDelimitedRegimeKeyString,
2137
- uiShadowRoot: valuesOf(ShadowRootOptions)
2138
- }), t.partial({
2139
- css: AbsoluteUrlString,
2140
- messageMap: t.record(LocaleCodec, AbsoluteUrlString),
2141
- forceTheme: ThemeKey,
2142
- cssFolder: AbsoluteUrlString,
2143
- hostThemeMap: t.record(URLHostString, ThemeKey),
2144
- customCssUrlMap: t.record(ThemeKey, AbsoluteUrlString),
2145
- fontUrlMap: t.record(ThemeKey, AbsoluteUrlString),
2146
- overrideLocale: t.string,
2147
- deploymentId: t.string
2148
- })]);
2149
- /** The top-level configuration for the consent UI (minimal theme configs) */
2150
- const LoadOptions = t.intersection([
2151
- SharedLoadOptions,
2152
- t.type({ themeConfigMap: t.record(ThemeKey, ThemeConfigurationMinimal) }),
2153
- t.partial({ viewportHeightOverride: t.string })
2154
- ]);
2155
- /** The top-level configuration for the mobile consent UI (full theme configs) */
2156
- const MobileUiLoadOptions = t.intersection([SharedLoadOptions, t.type({ themeConfigMap: t.record(ThemeKey, ThemeConfiguration) })]);
2157
- //#endregion
2158
- //#region src/customFunction.ts
2159
- /**
2160
- * The product-facing type of a custom function.
2161
- */
2162
- const CustomFunctionType = {
2163
- /** DSR pre-flight enricher and datapoint resolver */
2164
- Dsr: "DSR",
2165
- /** General purpose code execution */
2166
- General: "GENERAL"
2167
- };
2168
- /**
2169
- * The lifecycle state of a custom function.
2170
- *
2171
- * Staging removed `INACTIVE` from this enum (version-level `INACTIVE` is unchanged).
2172
- * A function that only has a draft is still `ACTIVE` until archived.
2173
- */
2174
- const CustomFunctionLifecycleState = {
2175
- /** The function is available (may or may not have an active version yet) */
2176
- Active: "ACTIVE",
2177
- /** The function is archived */
2178
- Archived: "ARCHIVED"
2179
- };
2180
- /**
2181
- * The lifecycle state of a custom function version.
2182
- */
2183
- const CustomFunctionVersionLifecycleState = {
2184
- /** The version is the function's active version */
2185
- Active: "ACTIVE",
2186
- /** The version is a draft pending promotion */
2187
- Draft: "DRAFT",
2188
- /** The version was superseded by a newer version */
2189
- Inactive: "INACTIVE"
2190
- };
2191
- /**
2192
- * The payload types a custom function can be invoked with, selecting which
2193
- * export the runtime executes.
2194
- */
2195
- const CustomFunctionPayloadType = {
2196
- /** DSR datapoint resolver — invokes the `default` export */
2197
- DataPoint: "DATA_POINT",
2198
- /** DSR pre-flight request enricher — invokes the `enricher` export */
2199
- RequestEnricher: "REQUEST_ENRICHER",
2200
- /** General purpose (Maestro) custom function */
2201
- Maestro: "MAESTRO"
2202
- };
2203
- //#endregion
2204
- //#region src/database.ts
2205
- /**
2206
- * The database integrations
2207
- */
2208
- const DatabaseIntegration = {
2209
- postgresql: "postgresql",
2210
- redshift: "amazonredshift",
2211
- snowflake: "snowflake",
2212
- mysql: "mysql",
2213
- bigquery: "bigquery",
2214
- microsoftsql: "microsoftsql",
2215
- maria: "maria",
2216
- mongodb: "mongodb",
2217
- amazondynamodb: "amazondynamodb",
2218
- amazons3: "amazons3",
2219
- databrickslakehouse: "databrickslakehouse",
2220
- ibmdb2: "ibmdb2",
2221
- oracle: "oracle",
2222
- quickbase: "quickbase",
2223
- redis: "redis",
2224
- treasuredata: "treasuredata",
2225
- saps4hana: "saps4hana",
2226
- googlebigtable: "googlebigtable",
2227
- azuresynapse: "azuresynapse",
2228
- azurecosmosdbnosql: "azurecosmosdbnosql",
2229
- trino: "trino"
2230
- };
2231
- /**
2232
- * The possible drivers for a database integration
2233
- */
2234
- const SQLDriverWithDataMapping = {
2235
- [DatabaseIntegration.redshift]: "Amazon Redshift",
2236
- [DatabaseIntegration.postgresql]: "PostgreSQL Unicode",
2237
- [DatabaseIntegration.snowflake]: "SnowflakeDSIIDriver",
2238
- [DatabaseIntegration.mysql]: "MySQL",
2239
- [DatabaseIntegration.bigquery]: "Google BigQuery",
2240
- [DatabaseIntegration.microsoftsql]: "Microsoft SQL",
2241
- [DatabaseIntegration.maria]: "MariaDB",
2242
- [DatabaseIntegration.databrickslakehouse]: "Databricks Lakehouse",
2243
- [DatabaseIntegration.ibmdb2]: "IBM DB2",
2244
- [DatabaseIntegration.oracle]: "Oracle DB",
2245
- [DatabaseIntegration.azuresynapse]: "Azure Synapse",
2246
- [DatabaseIntegration.trino]: "Trino"
2247
- };
2248
- /**
2249
- * All possible drivers for a database integration, regardless
2250
- * or not they support data mapping
2251
- */
2252
- const DatabaseDriver = {
2253
- ...SQLDriverWithDataMapping,
2254
- [DatabaseIntegration.mongodb]: "MongoDB",
2255
- [DatabaseIntegration.amazondynamodb]: "AmazonDynamoDB",
2256
- [DatabaseIntegration.amazons3]: "AmazonS3",
2257
- [DatabaseIntegration.databrickslakehouse]: "Databricks Lakehouse",
2258
- [DatabaseIntegration.quickbase]: "Quickbase",
2259
- [DatabaseIntegration.redis]: "Redis",
2260
- [DatabaseIntegration.treasuredata]: "TreasureData",
2261
- [DatabaseIntegration.saps4hana]: "SapS4Hana",
2262
- [DatabaseIntegration.googlebigtable]: "Google Bigtable",
2263
- [DatabaseIntegration.azurecosmosdbnosql]: "Azure Cosmos DB NoSQL"
2264
- };
2265
- //#endregion
2266
- //#region src/dataSubjectClass.ts
2267
- /**
2268
- * Immutable class for a data subject type (GraphQL {@link DataSubjectClass}).
2269
- */
2270
- const DataSubjectClass = {
2271
- /** Consumer or end-user data subject */
2272
- EndUser: "END_USER",
2273
- /** Employee data subject */
2274
- Employee: "EMPLOYEE",
2275
- /** Business contact data subject */
2276
- BusinessContact: "BUSINESS_CONTACT",
2277
- /** Other / uncategorized data subject */
2278
- Other: "OTHER"
2279
- };
2280
- //#endregion
2281
- //#region src/datapoint.ts
2282
- const ConfidenceLabel = {
2283
- High: "HIGH",
2284
- Medium: "MEDIUM",
2285
- Low: "LOW"
2286
- };
2287
- /** The approval status of the category guess for a subdatapoint */
2288
- const SubDataPointDataSubCategoryGuessStatus = {
2289
- /** The guess has been approved as valid */
2290
- Approved: "APPROVED",
2291
- /** The guess is pending review */
2292
- Pending: "PENDING",
2293
- /** The guess has been marked as wrong */
2294
- Rejected: "REJECTED"
2295
- };
2296
- const UnstructuredSubDataPointRecommendationStatus = {
2297
- /** The category was manually applied */
2298
- ManuallyAdded: "MANUALLY_ADDED",
2299
- /** The recommendation has been corrected */
2300
- Corrected: "CORRECTED",
2301
- /** The recommendation has been approved as valid */
2302
- Validated: "VALIDATED",
2303
- /** The recommendation is has been made but not validated */
2304
- Classified: "CLASSIFIED",
2305
- /** The recommendation has been marked as wrong */
2306
- Rejected: "REJECTED"
2307
- };
2308
- /**
2309
- * Encryption types for database table
2310
- */
2311
- const TableEncryptionType = {
2312
- Unencrypted: "UNENCRYPTED",
2313
- EncryptedApplicationSide: "ENCRYPTED_APPLICATION_SIDE",
2314
- EncryptedByDataAtRest: "ENCRYPTED_DATA_AT_REST"
2315
- };
2316
- const Controllership = {
2317
- /** The current organization is a controller of the data */
2318
- Controller: "CONTROLLER",
2319
- /** The current organization is a processor of the data */
2320
- Processor: "PROCESSOR",
2321
- /** The current organization is a joint controller of the data */
2322
- JointController: "JOINT_CONTROLLER"
2323
- };
2324
- /** The type of retention schedule for personal data */
2325
- const RetentionType = {
2326
- /** Collected user information is deleted, anonymized or aggregated after a specific time period */
2327
- StatedPeriod: "STATED_PERIOD",
2328
- /** Data is deleted, anonymized, or aggregated at some point, but no specific retention period is stated */
2329
- Limited: "LIMITED",
2330
- /** Collected user information is retained indefinitely */
2331
- Indefinite: "INDEFINITE",
2332
- /** A specific retention type not covered above */
2333
- Other: "OTHER",
2334
- /** Retention period is not stated or unclear */
2335
- Unspecified: "UNSPECIFIED"
2336
- };
2337
- //#endregion
2338
- //#region src/docs.ts
2339
- /** Allowed `guideType` frontmatter values on docs.transcend.io pages. */
2340
- const DocsGuideType = {
2341
- OverviewsAndConcepts: "Overviews & Concepts",
2342
- UseCaseGuides: "Use Case Guides",
2343
- DeveloperDocs: "Developer Docs",
2344
- IntegrationGuides: "Integration Guides",
2345
- Troubleshooting: "Troubleshooting"
2346
- };
2347
- /** Who reads a docs page. */
2348
- const DocsPersona = {
2349
- Compliance: "Compliance",
2350
- Development: "Development",
2351
- Operations: "Operations",
2352
- Legal: "Legal",
2353
- Security: "Security",
2354
- Marketing: "Marketing"
2355
- };
2356
- /** Customer goals a docs page serves. */
2357
- const DocsUseCase = {
2358
- PrivacyImpactAssessments: "Privacy Impact Assessments",
2359
- KnowYourData: "Know Your Data",
2360
- FullStackConsent: "Full Stack Consent",
2361
- LegacyMigrations: "Legacy Migrations",
2362
- DoNotSellOrShare: "Do Not Sell or Share",
2363
- DataMinimization: "Data Minimization",
2364
- InAppDeletion: "In-App Deletion"
2365
- };
2366
- /**
2367
- * Who may read a docs page.
2368
- * Omit `access` in frontmatter for signed-in only. Set `public` to opt in.
2369
- */
2370
- const DocsAccess = {
2371
- Public: "public",
2372
- SignedIn: "signedIn"
2373
- };
2374
- /** Lookup API content source filter. */
2375
- const DocsLookupSource = {
2376
- Guides: "guides",
2377
- ApiReference: "api-reference",
2378
- Graphql: "graphql",
2379
- Marketing: "marketing"
2380
- };
2381
- /** `matchedBy` value on docs lookup API rows. */
2382
- const DocsLookupMatch = {
2383
- Route: "route",
2384
- Integration: "integration",
2385
- Graphql: "graphql",
2386
- Product: "product",
2387
- Fulltext: "fulltext",
2388
- FulltextFallback: "fulltext-fallback"
2389
- };
2390
- /** `match` field on docs_list rows from route or product lookup. */
2391
- const DocsListRouteMatch = {
2392
- Primary: "primary",
2393
- Mention: "mention",
2394
- Product: "product",
2395
- Search: "search"
2396
- };
2397
- /** GraphQL schema artifact kind for docs lookup. */
2398
- const DocsGraphqlKind = {
2399
- Query: "query",
2400
- Mutation: "mutation",
2401
- Type: "type",
2402
- Input: "input",
2403
- Enum: "enum"
2404
- };
2405
- const docsGuideTypeTitles = new Set(Object.values(DocsGuideType));
2406
- /** Returns a known guide type title, or null when the index carries a newer label. */
2407
- function parseDocsGuideType(value) {
2408
- if (value == null || value === "") return null;
2409
- return docsGuideTypeTitles.has(value) ? value : null;
2410
- }
2411
- /**
2412
- * Product titles used in docs.transcend.io page frontmatter and dashboard-routes.json.
2413
- * `Platform` covers workspace routes.
2414
- */
2415
- const DocsProduct = {
2416
- Assessments: "Assessments",
2417
- Classification: "Classification",
2418
- ConsentManagement: "Consent Management",
2419
- DataInventory: "Data Inventory",
2420
- DsrAutomation: "DSR Automation",
2421
- Platform: "Platform",
2422
- PreferenceManagement: "Preference Management",
2423
- PrivacyCenter: "Privacy Center",
2424
- SystemDiscovery: "System Discovery",
2425
- WebAuditor: "Web Auditor"
2426
- };
2427
- //#endregion
2428
- //#region src/drop.ts
2429
- /** The six DROP list types as written on the wire. */
2430
- const DropListType = {
2431
- Email: "email",
2432
- Phone: "phone",
2433
- Maid: "maid",
2434
- Ctv: "ctv",
2435
- Ndz: "ndz",
2436
- NameVin: "name_vin"
2437
- };
2438
- /**
2439
- * Longest `dropRecordId` accepted on DROP ingress payloads and persisted on
2440
- * `DropRunRequest`.
2441
- */
2442
- const DROP_RECORD_ID_MAX_LENGTH = 64;
2443
- //#endregion
2444
- //#region src/dsrBulkErrorCode.ts
2445
- /**
2446
- * Stable, machine-readable error codes for bulk submission failures that apply
2447
- * to the call as a whole rather than a single `input[]` item.
2448
- *
2449
- * Surfaced on `POST /v1/data-subject-request-bulk` when the payload or its
2450
- * preconditions are invalid before per-input processing completes.
2451
- */
2452
- const DsrBulkErrorCode = {
2453
- /** The bulk submission included no request inputs. */
2454
- NoInputsProvided: "NO_INPUTS_PROVIDED",
2455
- /** The bulk submission exceeds the maximum number of inputs. */
2456
- SubmissionLimitExceeded: "SUBMISSION_LIMIT_EXCEEDED",
2457
- /** The bulk submission mixed inputs with and without a pre-generated CEK context. */
2458
- MixedCekContext: "MIXED_CEK_CONTEXT",
2459
- /**
2460
- * The required Diffie-Hellman encrypted payload was missing. Whether `dhEncrypted`
2461
- * is required depends on the entire input set — it is required only when at least
2462
- * one input is missing a pre-generated `encryptedCEKContext`.
2463
- */
2464
- DhContextRequired: "DH_CONTEXT_REQUIRED",
2465
- /**
2466
- * A concurrent DROP submission won the `dropRunId` unique-index idempotency race
2467
- * during bulk create. The retry loop cannot determine which input lost, so no
2468
- * input index can be attributed.
2469
- */
2470
- ConcurrentSubmissionConflict: "CONCURRENT_SUBMISSION_CONFLICT",
2471
- /**
2472
- * The bulk submission's top-level `input` was not an array (malformed body
2473
- * before per-item processing).
2474
- */
2475
- InvalidBulkInput: "INVALID_BULK_INPUT"
2476
- };
2477
- //#endregion
2478
- //#region src/dsrErrorCode.ts
2479
- /**
2480
- * Stable, machine-readable error codes for a single bulk submission input
2481
- * (`POST /v1/data-subject-request-bulk` `input[]` item).
2482
- *
2483
- * Returned on one failed input so callers can branch without parsing the error
2484
- * message. Failures about the bulk call as a whole use {@link DsrBulkErrorCode}.
2485
- */
2486
- const DsrErrorCode = {
2487
- /** This request has an invalid or missing workflowConfigId. */
2488
- InvalidWorkflowConfigId: "INVALID_WORKFLOW_CONFIG_ID",
2489
- /** This request is missing a core identifier. */
2490
- MissingCoreIdentifier: "MISSING_CORE_IDENTIFIER",
2491
- /** A restart was requested for a request ID that does not exist. */
2492
- RestartRequestNotFound: "RESTART_REQUEST_NOT_FOUND",
2493
- /** A restart was requested for a request closed beyond the org's time limit. */
2494
- RestartTimeLimitExceeded: "RESTART_TIME_LIMIT_EXCEEDED",
2495
- /** The referenced receipt email template does not exist. */
2496
- ReceiptTemplateNotFound: "RECEIPT_TEMPLATE_NOT_FOUND",
2497
- /** DROP linkage identifiers on this request do not cover the required identifier types. */
2498
- DropIdentifierCoverageMismatch: "DROP_IDENTIFIER_COVERAGE_MISMATCH",
2499
- /** The same DROP record was claimed more than once on this request. */
2500
- DuplicateDropRecords: "DUPLICATE_DROP_RECORDS",
2501
- /** This request's DROP identifiers conflict with another input sharing a dropRunId idempotency key. */
2502
- InBatchDropIdempotencyKeyCollision: "IN_BATCH_DROP_IDEMPOTENCY_KEY_COLLISION",
2503
- /** This request's `dropRecords` was provided without a `dropRunId`. */
2504
- DropRecordsRequireDropRunId: "DROP_RECORDS_REQUIRE_DROP_RUN_ID",
2505
- /** This request exceeds the per-request DROP record link limit. */
2506
- MaxDropRecordsPerRequestExceeded: "MAX_DROP_RECORDS_PER_REQUEST_EXCEEDED",
2507
- /** One or more DROP records on this request are not part of the run's CPPA download. */
2508
- UnknownDropRecords: "UNKNOWN_DROP_RECORDS",
2509
- /**
2510
- * One or more DROP records on this request exist in the run's CPPA download
2511
- * under a different list type than the submission claims.
2512
- */
2513
- DropRecordListTypeMismatch: "DROP_RECORD_LIST_TYPE_MISMATCH",
2514
- /** The DROP run referenced by this request does not exist. */
2515
- DropRunNotFound: "DROP_RUN_NOT_FOUND",
2516
- /** The DROP run referenced by this request is in a state that no longer accepts new DROP-linked DSRs. */
2517
- DropRunNotIntakeEligible: "DROP_RUN_NOT_INTAKE_ELIGIBLE",
2518
- /** An identifier value on this request failed format or regex validation. */
2519
- IdentifierValidationFailed: "IDENTIFIER_VALIDATION_FAILED",
2520
- /** This request names an identifier the organization does not have configured. */
2521
- UnsupportedIdentifierName: "UNSUPPORTED_IDENTIFIER_NAME",
2522
- /** This request has no email, which is required outside silent mode. */
2523
- MissingRequiredEmail: "MISSING_REQUIRED_EMAIL",
2524
- /**
2525
- * One or more `dataSiloIds` on this request are not connected to the
2526
- * workflow config. `dataSiloIds` may only narrow the workflow's connected set.
2527
- */
2528
- DataSiloNotInWorkflow: "DATA_SILO_NOT_IN_WORKFLOW",
2529
- /**
2530
- * This request set both `dataSiloIds` and `ignoreDataSiloIds`. The two are
2531
- * mutually exclusive: `dataSiloIds` restricts fulfillment to a subset of the
2532
- * workflow's connected silos, `ignoreDataSiloIds` excludes silos from it.
2533
- */
2534
- ConflictingDataSiloFilters: "CONFLICTING_DATA_SILO_FILTERS",
2535
- /**
2536
- * The `type` asserted on this request does not match the workflow config's
2537
- * request action. `type` is optional; omit it to derive from the workflow.
2538
- */
2539
- TypeNotMatchingWorkflow: "TYPE_NOT_MATCHING_WORKFLOW",
2540
- /**
2541
- * The `subjectType` asserted on this request does not match the workflow
2542
- * config's data subject type. `subjectType` is optional; omit it to derive
2543
- * from the workflow.
2544
- */
2545
- SubjectTypeNotMatchingWorkflow: "SUBJECT_TYPE_NOT_MATCHING_WORKFLOW",
2546
- /**
2547
- * The request region is not eligible for the workflow config's regionList.
2548
- * The supplied country or subdivision must match an entry in regionList when
2549
- * the workflow collects regions and regionList is non-empty.
2550
- */
2551
- RegionNotInWorkflow: "REGION_NOT_IN_WORKFLOW",
2552
- /**
2553
- * This request's input failed shape, option, or field-pairing validation
2554
- * (gateway codec decode or backend per-item checks).
2555
- */
2556
- InvalidRequestInput: "INVALID_REQUEST_INPUT",
2557
- /**
2558
- * A Sombra-signed identifier JWT on this request failed verification or
2559
- * decode (tampered, expired, or malformed).
2560
- */
2561
- InvalidIdentifierJwt: "INVALID_IDENTIFIER_JWT",
2562
- /**
2563
- * The targeted workflow config is saved as a draft and cannot be used to
2564
- * submit requests.
2565
- */
2566
- DraftWorkflowConfig: "DRAFT_WORKFLOW_CONFIG",
2567
- /**
2568
- * An open request with the same type and identifiers already exists for this
2569
- * data subject.
2570
- */
2571
- DuplicateOpenRequest: "DUPLICATE_OPEN_REQUEST",
2572
- /**
2573
- * An open parent request (for example erasure with access preview) already
2574
- * covers this submission.
2575
- */
2576
- OpenParentRequest: "OPEN_PARENT_REQUEST"
2577
- };
2578
- //#endregion
2579
- //#region src/dsrErrorMessage.ts
2580
- /**
2581
- * Maximum CPPA DROP records that can be linked to a single DSR at submission
2582
- * time.
2583
- */
2584
- const MAX_DROP_RECORDS_PER_REQUEST = 500;
2585
- /**
2586
- * Maximum number of requests that can be submitted at once in a bulk
2587
- * operation.
2588
- */
2589
- const REQUEST_SUBMISSION_LIMIT = 100;
2590
- /**
2591
- * Maximum unknown DROP records named in an {@link DsrErrorCode.UnknownDropRecords}
2592
- * error message before truncating with an "and N more" suffix.
2593
- */
2594
- const MAX_UNKNOWN_DROP_RECORDS_IN_ERROR = 20;
2595
- /**
2596
- * Summary message when an entire bulk submission is rejected.
2597
- */
2598
- const DSR_BULK_SUBMISSION_REJECTED_MESSAGE = "The submission was rejected. No requests were created.";
2599
- /**
2600
- * Canonical per-input DSR bulk submission error messages.
2601
- *
2602
- * Each {@link DsrErrorCode} has exactly one builder; call
2603
- * `DSR_ERROR_MESSAGE[code](...)` to render the runtime string for one failed
2604
- * `input[]` item. Per-input errors currently surface as HTTP 400 bad-request
2605
- * validation failures.
2606
- */
2607
- const DSR_ERROR_MESSAGE = {
2608
- [DsrErrorCode.InvalidWorkflowConfigId]: () => "Invalid workflowConfigId",
2609
- [DsrErrorCode.MissingCoreIdentifier]: () => "Missing core identifier",
2610
- [DsrErrorCode.RestartRequestNotFound]: () => "Cannot restart: request not found",
2611
- [DsrErrorCode.RestartTimeLimitExceeded]: ({ daysSinceLastTransition, restartTimeLimitDays }) => `This request's status last changed ${daysSinceLastTransition} days ago, which exceeds your organization's restart time limit of ${restartTimeLimitDays} days. Create a new request instead.`,
2612
- [DsrErrorCode.ReceiptTemplateNotFound]: (templateId) => `Could not find specified email template ID: ${templateId}`,
2613
- [DsrErrorCode.DropIdentifierCoverageMismatch]: () => "Cannot link DROP records to an existing request until every identifier on this submission is already on that request. Submit a new request that includes all required identifiers, or retry with only identifiers already on the existing request.",
2614
- [DsrErrorCode.DuplicateDropRecords]: () => "dropRecords contains duplicate (dropRecordId, dropListType) entries: each DROP record can only be linked to one request per submission.",
2615
- [DsrErrorCode.InBatchDropIdempotencyKeyCollision]: () => "This request's identifiers conflict with another input in the batch that shares the same dropRunId idempotency key.",
2616
- [DsrErrorCode.DropRecordsRequireDropRunId]: () => "dropRecords requires dropRunId",
2617
- [DsrErrorCode.MaxDropRecordsPerRequestExceeded]: () => `Cannot link more than 500 DROP records to a single request.`,
2618
- [DsrErrorCode.UnknownDropRecords]: (records) => {
2619
- const named = records.slice(0, 20).map(({ dropRecordId, dropListType }) => `${dropRecordId} (${dropListType})`).join(", ");
2620
- const remainder = records.length > 20 ? ` and ${records.length - 20} more` : "";
2621
- return `${records.length} DROP record(s) are not part of this run's CPPA download: ${named}${remainder}. Re-index the run's records, or download a fresh matched-records file and edit that.`;
2622
- },
2623
- [DsrErrorCode.DropRecordListTypeMismatch]: (records) => {
2624
- return `${records.length === 1 ? "" : `${records.length} DROP record(s) have a list-type mismatch with this run's CPPA download: `}${records.slice(0, 20).map(({ dropRecordId, submittedListType, actualListType }) => `${dropRecordId} is a ${actualListType} record in this run; file says ${submittedListType}`).join("; ")}${records.length > 20 ? `; and ${records.length - 20} more` : ""}. Download a fresh matched-records file and edit that.`;
2625
- },
2626
- [DsrErrorCode.DropRunNotFound]: (dropRunId) => `Could not find DROP run with id "${dropRunId}"`,
2627
- [DsrErrorCode.DropRunNotIntakeEligible]: (dropRunState) => `Cannot submit DROP-linked DSRs while the run is in state ${dropRunState}`,
2628
- /**
2629
- * Fallback canonical message for {@link DsrErrorCode.IdentifierValidationFailed}.
2630
- * Organizations can configure a custom, locale-translated `validationErrorMessage`
2631
- * per identifier, so the runtime message on the error entry will often differ
2632
- * from this string. Downstream consumers must branch on `code` and display the
2633
- * returned `message` — never reconstruct it from `DSR_ERROR_MESSAGE`.
2634
- */
2635
- [DsrErrorCode.IdentifierValidationFailed]: (identifierNames) => `${identifierNames.join(", ")} did not pass validation`,
2636
- [DsrErrorCode.UnsupportedIdentifierName]: (name) => `The organization does not support identifiers with name: "${name}" at time of request submission.`,
2637
- [DsrErrorCode.MissingRequiredEmail]: () => "At least one email must be provided before a request can be created when not in silent mode",
2638
- [DsrErrorCode.DataSiloNotInWorkflow]: ({ workflowConfigId, dataSiloIds }) => `The following dataSiloIds are not connected to the workflow config "${workflowConfigId}": ${dataSiloIds.join(", ")}. dataSiloIds may only narrow the workflow's connected data silos.`,
2639
- [DsrErrorCode.ConflictingDataSiloFilters]: () => "dataSiloIds and ignoreDataSiloIds cannot both be set on the same input. Use dataSiloIds to restrict fulfillment to a subset of the workflow's connected data silos, or ignoreDataSiloIds to exclude silos from it.",
2640
- [DsrErrorCode.TypeNotMatchingWorkflow]: ({ workflowConfigId, providedType, workflowType }) => `The provided type "${providedType}" does not match the request action "${workflowType}" of workflow config "${workflowConfigId}". Omit type to derive it from the workflow config.`,
2641
- [DsrErrorCode.SubjectTypeNotMatchingWorkflow]: ({ workflowConfigId, providedSubjectType, workflowSubjectType }) => `The provided subjectType "${providedSubjectType}" does not match the data subject type "${workflowSubjectType}" of workflow config "${workflowConfigId}". Omit subjectType to derive it from the workflow config.`,
2642
- [DsrErrorCode.RegionNotInWorkflow]: ({ region, supportedRegions }) => `Region "${region}" is not eligible for this workflow. Supported regions: ${supportedRegions.join(", ")}.`,
2643
- /**
2644
- * Fallback canonical message for {@link DsrErrorCode.InvalidRequestInput}.
2645
- * Producers often pass through the original validation `ClientError` message,
2646
- * so the runtime message on the error entry may differ from this string.
2647
- * Downstream consumers must branch on `code` and display the returned
2648
- * `message` — never reconstruct it from `DSR_ERROR_MESSAGE`.
2649
- */
2650
- [DsrErrorCode.InvalidRequestInput]: () => "Request input failed validation",
2651
- [DsrErrorCode.InvalidIdentifierJwt]: () => "Signed identifier JWT failed verification",
2652
- [DsrErrorCode.DraftWorkflowConfig]: () => "Workflow is saved as a draft and cannot be used to submit requests.",
2653
- [DsrErrorCode.DuplicateOpenRequest]: () => "You have already made this request.",
2654
- [DsrErrorCode.OpenParentRequest]: () => "You have already submitted a previous request that will also accommodate this current one."
2655
- };
2656
- //#endregion
2657
- //#region src/dsrBulkErrorMessage.ts
2658
- /**
2659
- * Canonical bulk-call DSR submission error messages.
2660
- *
2661
- * Each {@link DsrBulkErrorCode} has exactly one builder for failures that apply
2662
- * to the submission as a whole. These currently surface as HTTP 400 bad-request
2663
- * validation failures, so no separate status map is exported.
2664
- */
2665
- const DSR_BULK_ERROR_MESSAGE = {
2666
- [DsrBulkErrorCode.NoInputsProvided]: () => "No inputs provided",
2667
- [DsrBulkErrorCode.SubmissionLimitExceeded]: () => `Cannot submit more than 100 requests at once. Please split your requests into smaller batches and try again.`,
2668
- [DsrBulkErrorCode.MixedCekContext]: () => "Either all or none of the requests must include encryptedCEKContext",
2669
- [DsrBulkErrorCode.DhContextRequired]: () => "No encrypted data subject payload provided",
2670
- [DsrBulkErrorCode.ConcurrentSubmissionConflict]: () => "A concurrent DROP submission already created one or more of these requests. Retry the batch.",
2671
- [DsrBulkErrorCode.InvalidBulkInput]: () => "Bulk submission input must be an array"
2672
- };
2673
- //#endregion
2674
- //#region src/dsrRequestOutcome.ts
2675
- /**
2676
- * Per-input outcome for `POST /v1/data-subject-request-bulk` responses.
2677
- *
2678
- * Returned on successful bulk submissions so callers can branch without parsing
2679
- * error messages. Failures continue to use {@link DsrErrorCode}.
2680
- */
2681
- const DsrRequestOutcome = {
2682
- /** A new request was created. */
2683
- Created: "CREATED",
2684
- /** An equivalent open request already exists for this submission. */
2685
- AlreadyOpen: "ALREADY_OPEN",
2686
- /** DROP records were linked to an existing request without creating a new one. */
2687
- DropRecordsLinked: "DROP_RECORDS_LINKED",
2688
- /** An existing request was restarted. */
2689
- Restarted: "RESTARTED"
2690
- };
2691
- //#endregion
2692
- //#region src/identifier.ts
2693
- /**
2694
- * An identifier that can be used to communication with the data subject, also implies that the identifier is transcend supported
2695
- */
2696
- const CommunicationIdentifierType = {
2697
- /** An email address */
2698
- Email: "email",
2699
- /** A phone number */
2700
- Phone: "phone"
2701
- };
2702
- /**
2703
- * The built in identification strategies
2704
- */
2705
- const IdentifierType = {
2706
- ...CommunicationIdentifierType,
2707
- /** The core id of the organization (usually provided through login) */
2708
- CoreIdentifier: "coreIdentifier",
2709
- /** A custom identifier */
2710
- Custom: "custom",
2711
- /**
2712
- * Google/Android mobile identifier
2713
- *
2714
- * @see https://www.singular.net/blog/google-advertising-id-gaid/
2715
- * AKA adid - android advertising id
2716
- */
2717
- Gaid: "gaid",
2718
- /** Apple ios mobile identifier */
2719
- Idfa: "idfa",
2720
- /**
2721
- * The Identifier for Vendors
2722
- *
2723
- * @see https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor
2724
- */
2725
- Idfv: "idfv",
2726
- BrowserId: "browserId",
2727
- /** Microsoft Advertising Id */
2728
- MicrosoftAdvertisingId: "microsoftAdvertisingId",
2729
- /** Amazon fire Advertising Id */
2730
- AmazonFireAdvertisingId: "amazonFireAdvertisingId",
2731
- /**
2732
- * Roku Advertising Id
2733
- *
2734
- * @see https://developer.roku.com/docs/developer-program/advertising/integrating-roku-advertising-framework.md
2735
- */
2736
- Rida: "rida",
2737
- /** The handle for the filestack file */
2738
- FilestackHandle: "filestackHandle",
2739
- /** An ID for a stripe user */
2740
- StripeId: "stripeId",
2741
- /** The ID used to key braintree customer */
2742
- BraintreeCustomerId: "braintreeCustomerId",
2743
- /** An ID for a chargebee user */
2744
- ChargebeeId: "chargebeeId",
2745
- /** An ID for a Thrive TRM contact */
2746
- thriveTrmContactId: "thriveTrmContactId",
2747
- /** Talkable uuid */
2748
- TalkableUUID: "talkableUUID",
2749
- /** Recurly site account ID */
2750
- RecurlyId: "recurlyId",
2751
- /** The customer.io ID - also known as cio_id */
2752
- customerIoId: "customerIoId",
2753
- /** The visitorId for the Sprig integration */
2754
- sprigVisitorId: "sprigVisitorId",
2755
- /** URL of a LinkedIn profile */
2756
- linkedInURL: "linkedInURL",
2757
- /**
2758
- * An advertising ID (for a mobile device)
2759
- * TODO: https://transcend.height.app/T-13657 - remove this in favor of idfa and gpadvid
2760
- */
2761
- AdvertisingId: "advertisingId",
2762
- /** An ID for a Persona account */
2763
- PersonaReferenceId: "personaReferenceId",
2764
- /** An ID for a Stream user */
2765
- StreamUserId: "streamUserId",
2766
- /** A token used to make API calls on behalf of a Plaid account. */
2767
- PlaidProcessorToken: "plaidProcessorToken",
2768
- /** An ID for an applicant on Onfido */
2769
- OnfidoApplicantId: "onfidoApplicantId",
2770
- /** Custom ID for a Vero user */
2771
- VeroUserId: "veroUserId",
2772
- /**
2773
- * Adobe Privacy API ID's
2774
- * https://experienceleague.adobe.com/en/docs/experience-platform/privacy/api/appendix#standard-namespaces
2775
- */
2776
- /** Adobe Advertising Cloud ID */
2777
- AdobeAdvertisingCloudId: "adobeAdvertisingCloudId",
2778
- /** Adobe Audience Manager UUID */
2779
- AdobeAudienceManagerId: "adobeAudienceManagerId",
2780
- /** Adobe Experience Cloud ID */
2781
- AdobeExperienceCloudId: "adobeExperienceCloudId",
2782
- /** Adobe Target ID */
2783
- AdobeTargetID: "adobeTargetId",
2784
- /** Adobe Campaign recipient ID */
2785
- AdobeCampaignRecipientId: "adobeCampaignRecipientId",
2786
- /** The special Transcend identifier on consent preference records */
2787
- Transcend: "transcend"
2788
- };
2789
- //#endregion
2790
- //#region src/enricher.ts
2791
- /**
2792
- * Enrichers that are a bit more freeform, as in they can take in arbitrary inputs
2793
- * and return arbitrary outputs
2794
- */
2795
- const CustomEnricherType = {
2796
- /** Notify a server to enrich the variable */
2797
- Server: "SERVER",
2798
- /** Notify a person to enrich the value */
2799
- Person: "PERSON",
2800
- /** Check the legal hold list for that enricher type */
2801
- LegalHold: "LEGAL_HOLD",
2802
- /** Auto approve a specific identifier in a specific situation */
2803
- AutoApprove: "AUTO_APPROVE",
2804
- /** Test an identifier using a regex */
2805
- RegexMatch: "REGEX_MATCH",
2806
- /** Perform conditional logic based on region */
2807
- RegionMatcher: "REGION_MATCH",
2808
- /** Execute an SQL query against a database */
2809
- Database: "DATABASE",
2810
- /** Execute a look in looker to map identifiers */
2811
- Looker: "LOOKER",
2812
- /** Adds an enricher dependency */
2813
- WaitPeriod: "WAIT_PERIOD",
2814
- /** Verify a government ID */
2815
- GovernmentId: "GOVERNMENT_ID",
2816
- /** Custom Function enricher type. */
2817
- CustomFunction: "CUSTOM_FUNCTION"
2818
- };
2819
- /**
2820
- * Enrichers that can only be used to initialize the beginning of a DSR
2821
- */
2822
- const InitEnricherType = {
2823
- /** Sombra has the capability */
2824
- Sombra: "SOMBRA" };
2825
- /**
2826
- * The various types of identity enrichers supported by transcend
2827
- */
2828
- const EnricherType = {
2829
- ...InitEnricherType,
2830
- ...CommunicationIdentifierType,
2831
- ...CustomEnricherType
2832
- };
2833
- //#endregion
2834
- //#region src/formType.ts
2835
- /**
2836
- * Privacy Center / action form field types (GraphQL {@link FormType}).
2837
- */
2838
- const FormType = {
2839
- /** Boolean input */
2840
- Boolean: "boolean",
2841
- /** Group of nested fields */
2842
- Group: "group",
2843
- /** Single-line string input */
2844
- String: "string",
2845
- /** Array input */
2846
- Array: "array",
2847
- /** Select dropdown */
2848
- Select: "select",
2849
- /** Multi-line text area */
2850
- TextArea: "textArea",
2851
- /** JSON input */
2852
- Json: "json",
2853
- /** Password input */
2854
- Password: "password",
2855
- /** File upload */
2856
- File: "file",
2857
- /** API key picker */
2858
- SelectApiKeys: "SelectApiKeys",
2859
- /** User picker */
2860
- SelectUsers: "SelectUsers",
2861
- /** Team picker */
2862
- SelectTeams: "SelectTeams",
2863
- /** Template picker */
2864
- SelectTemplate: "SelectTemplate"
2865
- };
2866
- //#endregion
2867
- //#region src/getRegistryLink.ts
2868
- const CODE_PACKAGE_TYPE_TO_LINK = {
2869
- [CodePackageType.CocoaPods]: (name) => `https://cocoapods.org/pods/${name}`,
2870
- [CodePackageType.Gradle]: (name) => `https://mvnrepository.com/artifact/${name.split(":").join("/")}`,
2871
- [CodePackageType.PackageJson]: (name) => `https://www.npmjs.com/package/${name}`,
2872
- [CodePackageType.RequirementsTxt]: (name) => `https://pypi.org/project/${name}`,
2873
- [CodePackageType.Swift]: (name) => `https://swiftpackageindex.com/search?query=${name}`,
2874
- [CodePackageType.Pubspec]: (name) => `https://pub.dev/packages/${name}`,
2875
- [CodePackageType.Gemfile]: (name) => `https://rubygems.org/gems/${name}`,
2876
- [CodePackageType.ComposerJson]: (name) => `https://packagist.org/packages/${name}`,
2877
- [CodePackageType.Kotlin]: (name) => `https://mvnrepository.com/artifact/${name.split(":").join("/")}`
2878
- };
2879
- /**
2880
- * Get the registry link for a given code package
2881
- *
2882
- * @param name - Name of package
2883
- * @param type - Type of registry
2884
- * @returns The registry link
2885
- */
2886
- function getRegistryLink(name, type) {
2887
- return CODE_PACKAGE_TYPE_TO_LINK[type](name);
2888
- }
2889
- //#endregion
2890
- //#region src/isoConstants/iso3166-1.ts
2891
- const COUNTRY_LOOKUP = {
2892
- AF: "Afghanistan",
2893
- AX: "Åland Islands",
2894
- AL: "Albania",
2895
- DZ: "Algeria",
2896
- AS: "American Samoa",
2897
- AD: "Andorra",
2898
- AO: "Angola",
2899
- AI: "Anguilla",
2900
- AQ: "Antarctica",
2901
- AG: "Antigua & Barbuda",
2902
- AR: "Argentina",
2903
- AM: "Armenia",
2904
- AW: "Aruba",
2905
- AU: "Australia",
2906
- AT: "Austria",
2907
- AZ: "Azerbaijan",
2908
- BS: "Bahamas",
2909
- BH: "Bahrain",
2910
- BD: "Bangladesh",
2911
- BB: "Barbados",
2912
- BY: "Belarus",
2913
- BE: "Belgium",
2914
- BZ: "Belize",
2915
- BJ: "Benin",
2916
- BM: "Bermuda",
2917
- BT: "Bhutan",
2918
- BO: "Bolivia",
2919
- BA: "Bosnia & Herzegovina",
2920
- BW: "Botswana",
2921
- BV: "Bouvet Island",
2922
- BR: "Brazil",
2923
- IO: "British Indian Ocean Territory",
2924
- VG: "British Virgin Islands",
2925
- BN: "Brunei",
2926
- BG: "Bulgaria",
2927
- BF: "Burkina Faso",
2928
- BI: "Burundi",
2929
- KH: "Cambodia",
2930
- CM: "Cameroon",
2931
- CA: "Canada",
2932
- CV: "Cape Verde",
2933
- BQ: "Caribbean Netherlands",
2934
- KY: "Cayman Islands",
2935
- CF: "Central African Republic",
2936
- TD: "Chad",
2937
- CL: "Chile",
2938
- CN: "China",
2939
- CX: "Christmas Island",
2940
- CC: "Cocos (Keeling) Islands",
2941
- CO: "Colombia",
2942
- KM: "Comoros",
2943
- CG: "Congo - Brazzaville",
2944
- CD: "Congo - Kinshasa",
2945
- CK: "Cook Islands",
2946
- CR: "Costa Rica",
2947
- CI: "Côte d’Ivoire",
2948
- HR: "Croatia",
2949
- CU: "Cuba",
2950
- CW: "Curaçao",
2951
- CY: "Cyprus",
2952
- CZ: "Czechia",
2953
- DK: "Denmark",
2954
- DJ: "Djibouti",
2955
- DM: "Dominica",
2956
- DO: "Dominican Republic",
2957
- EC: "Ecuador",
2958
- EG: "Egypt",
2959
- SV: "El Salvador",
2960
- GQ: "Equatorial Guinea",
2961
- ER: "Eritrea",
2962
- EE: "Estonia",
2963
- SZ: "Eswatini",
2964
- ET: "Ethiopia",
2965
- FK: "Falkland Islands",
2966
- FO: "Faroe Islands",
2967
- FJ: "Fiji",
2968
- FI: "Finland",
2969
- FR: "France",
2970
- GF: "French Guiana",
2971
- PF: "French Polynesia",
2972
- TF: "French Southern Territories",
2973
- GA: "Gabon",
2974
- GM: "Gambia",
2975
- GE: "Georgia",
2976
- DE: "Germany",
2977
- GH: "Ghana",
2978
- GI: "Gibraltar",
2979
- GR: "Greece",
2980
- GL: "Greenland",
2981
- GD: "Grenada",
2982
- GP: "Guadeloupe",
2983
- GU: "Guam",
2984
- GT: "Guatemala",
2985
- GG: "Guernsey",
2986
- GN: "Guinea",
2987
- GW: "Guinea-Bissau",
2988
- GY: "Guyana",
2989
- HT: "Haiti",
2990
- HM: "Heard & McDonald Islands",
2991
- HN: "Honduras",
2992
- HK: "Hong Kong SAR China",
2993
- HU: "Hungary",
2994
- IS: "Iceland",
2995
- IN: "India",
2996
- ID: "Indonesia",
2997
- IR: "Iran",
2998
- IQ: "Iraq",
2999
- IE: "Ireland",
3000
- IM: "Isle of Man",
3001
- IL: "Israel",
3002
- IT: "Italy",
3003
- JM: "Jamaica",
3004
- JP: "Japan",
3005
- JE: "Jersey",
3006
- JO: "Jordan",
3007
- KZ: "Kazakhstan",
3008
- KE: "Kenya",
3009
- KI: "Kiribati",
3010
- KW: "Kuwait",
3011
- KG: "Kyrgyzstan",
3012
- LA: "Laos",
3013
- LV: "Latvia",
3014
- LB: "Lebanon",
3015
- LS: "Lesotho",
3016
- LR: "Liberia",
3017
- LY: "Libya",
3018
- LI: "Liechtenstein",
3019
- LT: "Lithuania",
3020
- LU: "Luxembourg",
3021
- MO: "Macao SAR China",
3022
- MG: "Madagascar",
3023
- MW: "Malawi",
3024
- MY: "Malaysia",
3025
- MV: "Maldives",
3026
- ML: "Mali",
3027
- MT: "Malta",
3028
- MH: "Marshall Islands",
3029
- MQ: "Martinique",
3030
- MR: "Mauritania",
3031
- MU: "Mauritius",
3032
- YT: "Mayotte",
3033
- MX: "Mexico",
3034
- FM: "Micronesia",
3035
- MD: "Moldova",
3036
- MC: "Monaco",
3037
- MN: "Mongolia",
3038
- ME: "Montenegro",
3039
- MS: "Montserrat",
3040
- MA: "Morocco",
3041
- MZ: "Mozambique",
3042
- MM: "Myanmar (Burma)",
3043
- NA: "Namibia",
3044
- NR: "Nauru",
3045
- NP: "Nepal",
3046
- NL: "Netherlands",
3047
- NC: "New Caledonia",
3048
- NZ: "New Zealand",
3049
- NI: "Nicaragua",
3050
- NE: "Niger",
3051
- NG: "Nigeria",
3052
- NU: "Niue",
3053
- NF: "Norfolk Island",
3054
- KP: "North Korea",
3055
- MK: "North Macedonia",
3056
- MP: "Northern Mariana Islands",
3057
- NO: "Norway",
3058
- OM: "Oman",
3059
- PK: "Pakistan",
3060
- PW: "Palau",
3061
- PS: "Palestinian Territories",
3062
- PA: "Panama",
3063
- PG: "Papua New Guinea",
3064
- PY: "Paraguay",
3065
- PE: "Peru",
3066
- PH: "Philippines",
3067
- PN: "Pitcairn Islands",
3068
- PL: "Poland",
3069
- PT: "Portugal",
3070
- PR: "Puerto Rico",
3071
- QA: "Qatar",
3072
- RE: "Réunion",
3073
- RO: "Romania",
3074
- RU: "Russia",
3075
- RW: "Rwanda",
3076
- WS: "Samoa",
3077
- SM: "San Marino",
3078
- ST: "São Tomé & Príncipe",
3079
- SA: "Saudi Arabia",
3080
- SN: "Senegal",
3081
- RS: "Serbia",
3082
- SC: "Seychelles",
3083
- SL: "Sierra Leone",
3084
- SG: "Singapore",
3085
- SX: "Sint Maarten",
3086
- SK: "Slovakia",
3087
- SI: "Slovenia",
3088
- SB: "Solomon Islands",
3089
- SO: "Somalia",
3090
- ZA: "South Africa",
3091
- GS: "South Georgia & South Sandwich Islands",
3092
- KR: "South Korea",
3093
- SS: "South Sudan",
3094
- ES: "Spain",
3095
- LK: "Sri Lanka",
3096
- BL: "St. Barthélemy",
3097
- SH: "St. Helena",
3098
- KN: "St. Kitts & Nevis",
3099
- LC: "St. Lucia",
3100
- MF: "St. Martin",
3101
- PM: "St. Pierre & Miquelon",
3102
- VC: "St. Vincent & Grenadines",
3103
- SD: "Sudan",
3104
- SR: "Suriname",
3105
- SJ: "Svalbard & Jan Mayen",
3106
- SE: "Sweden",
3107
- CH: "Switzerland",
3108
- SY: "Syria",
3109
- TW: "Taiwan",
3110
- TJ: "Tajikistan",
3111
- TZ: "Tanzania",
3112
- TH: "Thailand",
3113
- TL: "Timor-Leste",
3114
- TG: "Togo",
3115
- TK: "Tokelau",
3116
- TO: "Tonga",
3117
- TT: "Trinidad & Tobago",
3118
- TN: "Tunisia",
3119
- TR: "Turkey",
3120
- TM: "Turkmenistan",
3121
- TC: "Turks & Caicos Islands",
3122
- TV: "Tuvalu",
3123
- UM: "U.S. Outlying Islands",
3124
- VI: "U.S. Virgin Islands",
3125
- UG: "Uganda",
3126
- UA: "Ukraine",
3127
- AE: "United Arab Emirates",
3128
- GB: "United Kingdom",
3129
- US: "United States",
3130
- UY: "Uruguay",
3131
- UZ: "Uzbekistan",
3132
- VU: "Vanuatu",
3133
- VA: "Vatican City",
3134
- VE: "Venezuela",
3135
- VN: "Vietnam",
3136
- WF: "Wallis & Futuna",
3137
- EH: "Western Sahara",
3138
- YE: "Yemen",
3139
- ZM: "Zambia",
3140
- ZW: "Zimbabwe"
3141
- };
3142
- const COUNTRIES = Object.values(COUNTRY_LOOKUP);
3143
- const EXCEPTIONAL_RESERVATION_LOOKUP = { EU: "European Union" };
3144
- const EXCEPTIONAL_RESERVATIONS = Object.values(EXCEPTIONAL_RESERVATION_LOOKUP);
3145
- const ISO_31661 = {
3146
- ...EXCEPTIONAL_RESERVATION_LOOKUP,
3147
- ...COUNTRY_LOOKUP
2008
+ const COUNTRIES = Object.values(COUNTRY_LOOKUP);
2009
+ const EXCEPTIONAL_RESERVATION_LOOKUP = { EU: "European Union" };
2010
+ const EXCEPTIONAL_RESERVATIONS = Object.values(EXCEPTIONAL_RESERVATION_LOOKUP);
2011
+ const ISO_31661 = {
2012
+ ...EXCEPTIONAL_RESERVATION_LOOKUP,
2013
+ ...COUNTRY_LOOKUP
3148
2014
  };
3149
2015
  //#endregion
3150
2016
  //#region src/isoConstants/iso3166-2.ts
@@ -28804,17 +27670,1337 @@ const ISO_31662 = {
28804
27670
  name: "Matabeleland South",
28805
27671
  parent: "ZW"
28806
27672
  },
28807
- "ZW-MV": {
28808
- code: "ZW-MV",
28809
- name: "Masvingo",
28810
- parent: "ZW"
27673
+ "ZW-MV": {
27674
+ code: "ZW-MV",
27675
+ name: "Masvingo",
27676
+ parent: "ZW"
27677
+ },
27678
+ "ZW-MW": {
27679
+ code: "ZW-MW",
27680
+ name: "Mashonaland West",
27681
+ parent: "ZW"
27682
+ }
27683
+ };
27684
+ //#endregion
27685
+ //#region src/isoRegion.ts
27686
+ /**
27687
+ * gets a typed Dictionary (identical key/values) from a source lookup object
27688
+ *
27689
+ * @param source - the source lookup
27690
+ * @returns the typed dictionary
27691
+ */
27692
+ function getDictFromKeys(source) {
27693
+ return Object.fromEntries(Object.keys(source).map((code) => [code, code]));
27694
+ }
27695
+ /**
27696
+ * Country Code taken from https://github.com/umpirsky/country-list/blob/master/data/en/country.json
27697
+ */
27698
+ const IsoCountryCode = getDictFromKeys(ISO_31661);
27699
+ /**
27700
+ * Country subdivisions taken from taken from https://github.com/wooorm/iso-3166/blob/main/2.js
27701
+ */
27702
+ const IsoCountrySubdivisionCode = getDictFromKeys(ISO_31662);
27703
+ /** io-ts codec for {@link IsoCountryCode}, shared so JSON schema output can reference it once */
27704
+ const IsoCountryCodeCodec = valuesOf(IsoCountryCode, "IsoCountryCode");
27705
+ /** io-ts codec for {@link IsoCountrySubdivisionCode}, shared so JSON schema output can reference it once */
27706
+ const IsoCountrySubdivisionCodeCodec = valuesOf(IsoCountrySubdivisionCode, "IsoCountrySubdivisionCode");
27707
+ //#endregion
27708
+ //#region src/prefixModule.ts
27709
+ /** Catalog a prefix module is published in */
27710
+ const PrefixModuleCatalog = {
27711
+ /** Provided by Transcend */
27712
+ Transcend: "transcend",
27713
+ /** Owned by the organization */
27714
+ Organization: "organization"
27715
+ };
27716
+ /**
27717
+ * Config on a prefix module release. Backend JSON schemas allow only string properties.
27718
+ */
27719
+ const PrefixModuleConfig = t.record(t.string, t.string);
27720
+ /** Codec for prefix module catalog in yaml and API mappings */
27721
+ const PrefixModuleCatalogCodec = valuesOf(PrefixModuleCatalog);
27722
+ /**
27723
+ * Parse the API config JSON string into a flat string map
27724
+ *
27725
+ * @param configJson - Raw config from GraphQL
27726
+ * @param context - Module name for error messages
27727
+ * @returns Parsed config
27728
+ */
27729
+ function parsePrefixModuleConfigFromJson(configJson, context) {
27730
+ let parsed;
27731
+ try {
27732
+ parsed = JSON.parse(configJson);
27733
+ } catch (cause) {
27734
+ throw new Error(`Prefix module "${context.moduleName}" has invalid config JSON: ${cause instanceof Error ? cause.message : String(cause)}`);
27735
+ }
27736
+ const decoded = PrefixModuleConfig.decode(parsed);
27737
+ if (either.isLeft(decoded)) throw new Error(`Prefix module "${context.moduleName}" has invalid config: expected a flat map of string values`);
27738
+ return decoded.right;
27739
+ }
27740
+ //#endregion
27741
+ //#region src/consentManagerInput.ts
27742
+ const UnknownRequestPolicyCodec = valuesOf(UnknownRequestPolicy, "UnknownRequestPolicy");
27743
+ const WebhookHeader = t.intersection([t.type({
27744
+ /** The name of the header to set. */
27745
+ name: t.string,
27746
+ /** The value of the header. */
27747
+ value: t.string
27748
+ }), t.partial({
27749
+ /**
27750
+ * When true, the header value is write-only in inventory pull/preview and
27751
+ * should be supplied via `<<parameters.NAME>>` at push time.
27752
+ */
27753
+ isSecret: t.boolean })]);
27754
+ const RegionInput = t.partial({
27755
+ /** The country */
27756
+ country: IsoCountryCodeCodec,
27757
+ /** The country subdivision */
27758
+ countrySubDivision: IsoCountrySubdivisionCodeCodec
27759
+ });
27760
+ const ConsentManageExperienceInput = t.intersection([t.type({
27761
+ /** Name of experience */
27762
+ name: t.string }), t.partial({
27763
+ /** Name of experience */
27764
+ displayName: t.string,
27765
+ /** Region that define this regional experience */
27766
+ regions: t.array(RegionInput),
27767
+ /** How to handle consent expiry */
27768
+ onConsentExpiry: valuesOf(OnConsentExpiry),
27769
+ /** Consent expiration lever */
27770
+ consentExpiry: t.number,
27771
+ /** In vs not in operator */
27772
+ operator: valuesOf(RegionsOperator),
27773
+ /** Priority of experience */
27774
+ displayPriority: t.number,
27775
+ /** View state to prompt when auto prompting is enabled */
27776
+ viewState: valuesOf(InitialViewState),
27777
+ /** Purposes that can be opted out of in a particular experience */
27778
+ purposes: t.array(t.type({
27779
+ /** Slug of purpose */
27780
+ trackingType: t.string })),
27781
+ /** Purposes that are opted out by default in a particular experience */
27782
+ optedOutPurposes: t.array(t.type({
27783
+ /** Slug of purpose */
27784
+ trackingType: t.string })),
27785
+ /**
27786
+ * Browser languages that define this regional experience
27787
+ */
27788
+ browserLanguages: t.array(valuesOf(BrowserLanguage)),
27789
+ /** Browser time zones that define this regional experience */
27790
+ browserTimeZones: t.array(valuesOf(BrowserTimeZone)),
27791
+ /** ID of the consent UI variant assigned to this experience */
27792
+ consentUiVariantSlug: t.string
27793
+ })]);
27794
+ /** Prefix module attached to the consent manager. Pull only: push ignores it */
27795
+ const ConsentManagerPrefixModuleInput = t.intersection([t.type({
27796
+ /** Name of the module */
27797
+ name: t.string,
27798
+ /** Catalog the module comes from */
27799
+ catalog: PrefixModuleCatalogCodec,
27800
+ /** Version of the module */
27801
+ version: t.string
27802
+ }), t.partial({
27803
+ /** String config values for the module on this bundle */
27804
+ config: PrefixModuleConfig })]);
27805
+ const ConsentManagerInput = t.partial({
27806
+ /** Airgap version */
27807
+ version: t.string,
27808
+ /** The consent manager domains in the instance */
27809
+ bundleUrls: t.record(valuesOf(ConsentBundleType), t.string),
27810
+ /** The consent manager domains in the instance */
27811
+ domains: t.array(t.string),
27812
+ /** Key used to partition consent records */
27813
+ partition: t.string,
27814
+ /** Precedence of signals vs user input */
27815
+ consentPrecedence: valuesOf(ConsentPrecedenceOption),
27816
+ /** The consent manager unknown request policy */
27817
+ unknownRequestPolicy: UnknownRequestPolicyCodec,
27818
+ /** The consent manager unknown cookie policy */
27819
+ unknownCookiePolicy: UnknownRequestPolicyCodec,
27820
+ /** The XDI sync endpoint for this airgap bundle */
27821
+ syncEndpoint: t.string,
27822
+ /** The telemetry partitioning strategy */
27823
+ telemetryPartitioning: valuesOf(TelemetryPartitionStrategy),
27824
+ /** Whether the site owner has signed the IAB agreement */
27825
+ signedIabAgreement: valuesOf(SignedIabAgreementOption),
27826
+ /** Regional experience configurations */
27827
+ experiences: t.array(ConsentManageExperienceInput),
27828
+ /** Theme config */
27829
+ theme: t.partial({
27830
+ /** Primary color */
27831
+ primaryColor: t.string,
27832
+ /** Font color */
27833
+ fontColor: t.string,
27834
+ /** Privacy policy URL */
27835
+ privacyPolicy: t.string,
27836
+ /** Auto-prompt setting */
27837
+ prompt: t.number
27838
+ }),
27839
+ /** The Shared XDI host sync groups config (JSON) for this airgap bundle */
27840
+ syncGroups: t.string,
27841
+ consentVariants: t.array(ConsentVariantInput),
27842
+ consentThemes: t.array(ConsentThemeInput),
27843
+ /** Prefix modules on the bundle. Pull only, push ignores it (no public API to write them) */
27844
+ prefixModules: t.array(ConsentManagerPrefixModuleInput),
27845
+ /**
27846
+ * Deployment webhook URL called when consent bundles are published.
27847
+ *
27848
+ * @example `webhookUrl: https://example.<<parameters.domain>>/consent-deploy`
27849
+ */
27850
+ webhookUrl: t.string,
27851
+ /**
27852
+ * Custom headers for the deployment webhook. Use `<<parameters.NAME>>` for
27853
+ * secret values and set `isSecret: true` so push preview does not log them.
27854
+ *
27855
+ * @example
27856
+ * `- name: x-transcend-token`
27857
+ * ` value: <<parameters.CONSENT_DEPLOY_TOKEN>>`
27858
+ * ` isSecret: true`
27859
+ */
27860
+ webhookHeaders: t.array(WebhookHeader),
27861
+ /**
27862
+ * When true, traffic is report-only (enforcement off).
27863
+ * Deploy the bundle after push for the live /cm bundle to change.
27864
+ */
27865
+ reportOnly: t.boolean
27866
+ });
27867
+ //#endregion
27868
+ //#region src/consentUiConfiguration.ts
27869
+ /** Actions for buttons in modals */
27870
+ const ModalButtonActions = {
27871
+ SaveAndClose: "SaveAndClose",
27872
+ AcceptAllAndClose: "AcceptAllAndClose",
27873
+ RejectAllAndClose: "RejectAllAndClose"
27874
+ };
27875
+ /** All action types for buttons */
27876
+ const ButtonAction = {
27877
+ ...ModalButtonActions,
27878
+ OpenModal: "OpenModal"
27879
+ };
27880
+ /** Button Type */
27881
+ const ButtonType = {
27882
+ Default: "default",
27883
+ Link: "link"
27884
+ };
27885
+ /** Absolute URL string */
27886
+ const AbsoluteUrlString = t.string;
27887
+ /** URL host string */
27888
+ const URLHostString = t.string;
27889
+ /** Top-level configuration shared between the UI layers */
27890
+ const SharedTopLevelConfig = t.type({
27891
+ /** Supported locales */
27892
+ locales: t.array(LocaleCodec),
27893
+ /** The transcend URL where the transcend logo links to */
27894
+ transcendUrl: AbsoluteUrlString,
27895
+ /** The default locale to use - must be one of the supported locales */
27896
+ defaultLocale: LocaleCodec
27897
+ });
27898
+ /** Button configuration */
27899
+ const ButtonConfig = t.type({
27900
+ type: valuesOf(ButtonType),
27901
+ action: valuesOf(ButtonAction)
27902
+ });
27903
+ /** Configuration for buttons in modals */
27904
+ const ModalButtonConfig = t.type({
27905
+ type: valuesOf(ButtonType),
27906
+ action: valuesOf(ModalButtonActions)
27907
+ });
27908
+ /** Footer configuration */
27909
+ const FooterConfig = t.type({
27910
+ showTranscendBadge: t.boolean,
27911
+ showGpcDetected: t.boolean,
27912
+ showLocalePicker: t.boolean
27913
+ });
27914
+ /** Common configuration for both first and second layers */
27915
+ const CommonLayerConfig = t.intersection([t.type({ showCloseButton: t.boolean }), t.partial({
27916
+ logoImageUrl: AbsoluteUrlString,
27917
+ alphaMask: t.boolean,
27918
+ footer: FooterConfig,
27919
+ links: t.array(AbsoluteUrlString)
27920
+ })]);
27921
+ /** First layer configuration: Banner */
27922
+ const FirstLayerConfig = t.intersection([
27923
+ CommonLayerConfig,
27924
+ t.type({ buttons: t.tuple([
27925
+ ButtonConfig,
27926
+ t.union([ButtonConfig, t.undefined]),
27927
+ t.union([ButtonConfig, t.undefined])
27928
+ ]) }),
27929
+ t.partial({ showHeader: t.boolean })
27930
+ ]);
27931
+ /** Second layer configuration: Modal */
27932
+ const SecondLayerConfig = t.intersection([CommonLayerConfig, t.type({
27933
+ buttons: t.tuple([
27934
+ ModalButtonConfig,
27935
+ t.union([ModalButtonConfig, t.undefined]),
27936
+ t.union([ModalButtonConfig, t.undefined])
27937
+ ]),
27938
+ showBulkActions: t.boolean,
27939
+ closeAfterBulkAction: t.boolean,
27940
+ showPurposeDescriptions: t.boolean,
27941
+ showCookiesLink: t.literal(false),
27942
+ showVendorsLink: t.literal(false),
27943
+ showToggleText: t.boolean,
27944
+ showToggleIcon: t.boolean
27945
+ })]);
27946
+ /** --- Top-level UI Configuration --- */
27947
+ /** Banner only configuration */
27948
+ const UIConfigurationBannerOnly = t.intersection([SharedTopLevelConfig, t.type({ firstLayerConfig: FirstLayerConfig })]);
27949
+ /** Modal only configuration */
27950
+ const UIConfigurationModalOnly = t.intersection([SharedTopLevelConfig, t.type({ secondLayerConfig: SecondLayerConfig })]);
27951
+ /** Banner into modal configuration */
27952
+ const UIConfigurationBannerIntoModal = t.intersection([SharedTopLevelConfig, t.type({
27953
+ firstLayerConfig: FirstLayerConfig,
27954
+ secondLayerConfig: SecondLayerConfig
27955
+ })]);
27956
+ /** Configuration of the entire consent UI */
27957
+ const UIConfiguration = t.union([
27958
+ UIConfigurationBannerOnly,
27959
+ UIConfigurationModalOnly,
27960
+ UIConfigurationBannerIntoModal
27961
+ ]);
27962
+ //#endregion
27963
+ //#region src/consentUiTheme.ts
27964
+ /**
27965
+ * Types representing the consent UI theme configuration
27966
+ * Includes keys for alignment, logo position, content flow, colors, and more
27967
+ */
27968
+ /**
27969
+ * Vertical alignment options for the consent UI content
27970
+ */
27971
+ const VerticalAlign = {
27972
+ /** Aligns the UI content at the top */
27973
+ Top: "top",
27974
+ /** Aligns the UI content at the bottom */
27975
+ Bottom: "bottom",
27976
+ /** Aligns the UI content in the center */
27977
+ Center: "center"
27978
+ };
27979
+ /**
27980
+ * Horizontal alignment options for the consent UI content
27981
+ */
27982
+ const HorizontalAlign = {
27983
+ /** Aligns the UI content on the left */
27984
+ Left: "left",
27985
+ /** Aligns the UI content in the center */
27986
+ Center: "center",
27987
+ /** Aligns the UI content on the right */
27988
+ Right: "right"
27989
+ };
27990
+ /**
27991
+ * Position options for the logo in the consent UI
27992
+ */
27993
+ const LogoPosition = {
27994
+ /** Logo is positioned above the content */
27995
+ Above: "above",
27996
+ /** Logo is positioned to the left of the content */
27997
+ Left: "left"
27998
+ };
27999
+ /**
28000
+ * Defines how content can flow in a layout
28001
+ */
28002
+ const ContentFlows = {
28003
+ /** Items are stacked vertically, top to bottom */
28004
+ Vertical: "vertical",
28005
+ /** Items are stacked horizontally, often wrapping if space runs out */
28006
+ HorizontalStacked: "horizontalStacked",
28007
+ /** Items are laid out horizontally, in a single row */
28008
+ HorizontalFlat: "horizontalFlat"
28009
+ };
28010
+ /**
28011
+ * Units available for responsive breakpoints.
28012
+ */
28013
+ const BreakpointType = {
28014
+ /** Breakpoint defined in pixels */
28015
+ Px: "px",
28016
+ /** Breakpoint defined as a percentage */
28017
+ Percent: "percent"
28018
+ };
28019
+ /** String that represents a CSS unit eg. px, em, etc. */
28020
+ const CssUnitString = t.string;
28021
+ /**
28022
+ * String that represents an RGBA hex color (8-digit hex with alpha channel),
28023
+ * e.g. "#FFFFFFFF" (opaque white) or "#FF000080" (semi-transparent red).
28024
+ */
28025
+ const RgbaHexString = t.string;
28026
+ /**
28027
+ * String that represents an RGB hex color (6-digit hex without alpha channel),
28028
+ * e.g. "#FFFFFF" (white) or "#000000" (black).
28029
+ */
28030
+ const RgbHexString = t.string;
28031
+ /** Index of a button's theme */
28032
+ const ButtonThemeIndex = t.number;
28033
+ /** Represents background color configuration */
28034
+ const Background = t.type({
28035
+ /** Background color as an RGBA hex string */
28036
+ backgroundColor: RgbaHexString });
28037
+ /**
28038
+ * Represents border configuration
28039
+ */
28040
+ const Border = t.type({
28041
+ borderRadius: CssUnitString,
28042
+ borderColor: RgbHexString
28043
+ });
28044
+ /**
28045
+ * Represents text configuration
28046
+ */
28047
+ const Text = t.type({ textColor: RgbHexString });
28048
+ /**
28049
+ * Represents link configuration
28050
+ */
28051
+ const Link = t.type({
28052
+ linkColor: RgbHexString,
28053
+ linkUnderline: t.boolean
28054
+ });
28055
+ /**
28056
+ * Represents icon configuration
28057
+ */
28058
+ const Icon = t.type({ iconColor: RgbHexString });
28059
+ /** Represents a responsive breakpoint with value and unit */
28060
+ const Breakpoint = t.type({
28061
+ /** The numeric value of the breakpoint */
28062
+ value: t.number,
28063
+ /** The unit of the breakpoint (px or percent) */
28064
+ unit: valuesOf(BreakpointType)
28065
+ });
28066
+ /**
28067
+ * Represents a container theme with background and border configurations
28068
+ */
28069
+ const ContainerTheme = t.intersection([Background, Border]);
28070
+ /** Represents the header theme configuration (reduced scope) */
28071
+ const HeaderThemeMinimal = t.type({
28072
+ logoPosition: valuesOf(LogoPosition),
28073
+ logoImageUrl: AbsoluteUrlString
28074
+ });
28075
+ /** Represents the header theme configuration (full scope) */
28076
+ const HeaderTheme = t.intersection([Text, t.type({ logoPosition: valuesOf(LogoPosition) })]);
28077
+ /** Represents the configuration of the close button */
28078
+ const CloseButtonTheme = t.intersection([
28079
+ Background,
28080
+ Border,
28081
+ t.type({ iconColor: RgbHexString })
28082
+ ]);
28083
+ /** Represents the configuration of the description text */
28084
+ const DescriptionTextTheme = t.intersection([Text, Link]);
28085
+ /** Represents the configuration of the footer */
28086
+ const FooterTheme = t.intersection([Background, t.type({ localePickerColor: RgbHexString })]);
28087
+ /** Defines how content should be padded and sized at different breakpoints */
28088
+ const PaddedContentLayout = t.type({
28089
+ breakpoint: Breakpoint,
28090
+ maxWidths: t.record(valuesOf(ContentFlows), CssUnitString)
28091
+ });
28092
+ /** Defines a layout that stretches content to full width */
28093
+ const FullWidthContentLayout = t.type({ fullWidth: t.literal(true) });
28094
+ /** Represents either a padded content layout or a full-width layout */
28095
+ const ContentLayout = t.union([PaddedContentLayout, FullWidthContentLayout]);
28096
+ /** Theme configuration for the toggle */
28097
+ const ToggleTheme = t.intersection([
28098
+ Text,
28099
+ Icon,
28100
+ t.type({
28101
+ enabledColor: RgbHexString,
28102
+ disabledColor: RgbHexString,
28103
+ knobColor: RgbHexString
28104
+ })
28105
+ ]);
28106
+ /** Theme configuration shared between both First (banner) and Second Layers (modal) (reduced scope) */
28107
+ const CommonLayerThemeMinimal = t.intersection([t.type({ alwaysShowScrollbar: t.boolean }), t.partial({ header: HeaderThemeMinimal })]);
28108
+ /** Theme configuration shared between both First (banner) and Second Layers (modal) (full scope) */
28109
+ const CommonLayerTheme = t.intersection([t.type({
28110
+ buttons: t.tuple([
28111
+ ButtonThemeIndex,
28112
+ t.union([ButtonThemeIndex, t.undefined]),
28113
+ t.union([ButtonThemeIndex, t.undefined])
28114
+ ]),
28115
+ container: ContainerTheme,
28116
+ description: DescriptionTextTheme,
28117
+ footer: FooterTheme,
28118
+ alwaysShowScrollbar: t.boolean,
28119
+ horizontalAlign: valuesOf(HorizontalAlign),
28120
+ cookieAndPrivacyPolicy: t.partial(Link.props)
28121
+ }), t.partial({
28122
+ background: Background,
28123
+ header: HeaderTheme,
28124
+ closeButton: CloseButtonTheme
28125
+ })]);
28126
+ /** Theme configuration for the First Layer (banner) (reduced scope) */
28127
+ const FirstLayerThemeMinimal = t.intersection([CommonLayerThemeMinimal, t.type({ contentLayout: ContentLayout })]);
28128
+ /** Theme configuration for the First Layer (banner) (full scope) */
28129
+ const FirstLayerTheme = t.intersection([
28130
+ CommonLayerTheme,
28131
+ t.type({
28132
+ contentFlow: valuesOf(ContentFlows),
28133
+ verticalAlign: valuesOf(VerticalAlign)
28134
+ }),
28135
+ t.partial({ contentLayout: ContentLayout })
28136
+ ]);
28137
+ /** Theme configuration for the Second Layer (modal) (reduced scope) */
28138
+ const SecondLayerThemeMinimal = t.intersection([CommonLayerThemeMinimal, t.type({ lockToEdges: t.boolean })]);
28139
+ /** Theme configuration for the Second Layer (modal) (full scope) */
28140
+ const SecondLayerTheme = t.intersection([
28141
+ CommonLayerTheme,
28142
+ t.type({
28143
+ modalTitle: Text,
28144
+ modalSubtitle: Text,
28145
+ purposeListTitle: Text,
28146
+ caretIcon: Icon,
28147
+ cardTitle: Text,
28148
+ alwaysOnText: Text,
28149
+ purposeDescription: DescriptionTextTheme,
28150
+ purposeCard: ContainerTheme,
28151
+ toggle: ToggleTheme,
28152
+ lockToEdges: t.boolean,
28153
+ maxWidth: CssUnitString
28154
+ }),
28155
+ t.partial({
28156
+ bulkActionButtons: t.tuple([ButtonThemeIndex, ButtonThemeIndex]),
28157
+ shrinkToFullWidth: CssUnitString
28158
+ })
28159
+ ]);
28160
+ /** Represents a button theme which can be either a full button or a link style */
28161
+ const ButtonTheme = t.union([t.intersection([
28162
+ Background,
28163
+ Border,
28164
+ Text
28165
+ ]), Link]);
28166
+ /** Configuration shared between all themes types */
28167
+ const SharedTopLevelTheme = t.type({ buttonThemes: t.array(ButtonTheme) });
28168
+ /** Banner-only theme configuration (reduced scope) */
28169
+ const ThemeConfigurationBannerOnlyMinimal = t.type({ firstLayer: FirstLayerThemeMinimal });
28170
+ /** Banner-only theme configuration (full scope) */
28171
+ const ThemeConfigurationBannerOnly = t.intersection([SharedTopLevelTheme, t.type({ firstLayer: FirstLayerTheme })]);
28172
+ /** Modal-only theme configuration (reduced scope) */
28173
+ const ThemeConfigurationModalOnlyMinimal = t.type({ secondLayer: SecondLayerThemeMinimal });
28174
+ /** Modal-only theme configuration (full scope) */
28175
+ const ThemeConfigurationModalOnly = t.intersection([SharedTopLevelTheme, t.type({ secondLayer: SecondLayerTheme })]);
28176
+ /** Banner into modal theme configuration (reduced scope) */
28177
+ const ThemeConfigurationBannerIntoModalMinimal = t.type({
28178
+ firstLayer: FirstLayerThemeMinimal,
28179
+ secondLayer: SecondLayerThemeMinimal
28180
+ });
28181
+ /** Banner into modal theme configuration (full scope) */
28182
+ const ThemeConfigurationBannerIntoModal = t.intersection([SharedTopLevelTheme, t.type({
28183
+ firstLayer: FirstLayerTheme,
28184
+ secondLayer: SecondLayerTheme
28185
+ })]);
28186
+ /** Union of all reduced-scope theme configurations */
28187
+ const ThemeConfigurationMinimal = t.union([
28188
+ ThemeConfigurationBannerOnlyMinimal,
28189
+ ThemeConfigurationModalOnlyMinimal,
28190
+ ThemeConfigurationBannerIntoModalMinimal
28191
+ ]);
28192
+ /** Union of all full-scope theme configurations */
28193
+ const ThemeConfiguration = t.union([
28194
+ ThemeConfigurationBannerOnly,
28195
+ ThemeConfigurationModalOnly,
28196
+ ThemeConfigurationBannerIntoModal
28197
+ ]);
28198
+ //#endregion
28199
+ //#region src/consentUi.ts
28200
+ /**
28201
+ * Types representing the top-level consent UI configuration
28202
+ * Includes keys for regimes, variants, and themes
28203
+ */
28204
+ /** Key representing a specific regime */
28205
+ const RegimeKey = t.string;
28206
+ /** Key representing a specific consent UI variant */
28207
+ const VariantKey = t.string;
28208
+ /** Key representing a specific theme */
28209
+ const ThemeKey = t.string;
28210
+ /** String that represents an integer value */
28211
+ const IntegerString = t.string;
28212
+ /** String that represents a DOM element ID */
28213
+ const DOMElementId = t.string;
28214
+ /** String that represents a semicolon-delimited list of regime keys */
28215
+ const SemicolonDelimitedRegimeKeyString = t.string;
28216
+ /**
28217
+ * Autofocus toggle values ("on" / "off").
28218
+ */
28219
+ const AutofocusToggle = {
28220
+ /** Enable autofocus */
28221
+ On: "on",
28222
+ /** Disable autofocus */
28223
+ Off: "off"
28224
+ };
28225
+ /**
28226
+ * All valid autofocus values:
28227
+ * - `"on"` / `"off"`
28228
+ * - or a DOM element ID string
28229
+ */
28230
+ const AutofocusValues = t.union([valuesOf(AutofocusToggle), DOMElementId]);
28231
+ /**
28232
+ * Shadow root options ("open" / "closed" / "none").
28233
+ */
28234
+ const ShadowRootOptions = {
28235
+ /** Enable shadow root */
28236
+ Open: "open",
28237
+ /** Disable shadow root */
28238
+ Closed: "closed",
28239
+ /** Disable shadow root */
28240
+ None: "none"
28241
+ };
28242
+ /** Shared load option fields excluding themeConfigMap */
28243
+ const SharedLoadOptions = t.intersection([t.type({
28244
+ regimeVariantMap: t.record(RegimeKey, VariantKey),
28245
+ regimeAutoPromptMap: t.record(RegimeKey, t.boolean),
28246
+ variantConfigMap: t.record(VariantKey, UIConfiguration),
28247
+ variantThemeMap: t.record(VariantKey, ThemeKey),
28248
+ autofocus: AutofocusValues,
28249
+ uiZIndex: IntegerString,
28250
+ messageFolder: AbsoluteUrlString,
28251
+ regimePrecedence: SemicolonDelimitedRegimeKeyString,
28252
+ uiShadowRoot: valuesOf(ShadowRootOptions)
28253
+ }), t.partial({
28254
+ css: AbsoluteUrlString,
28255
+ messageMap: t.record(LocaleCodec, AbsoluteUrlString),
28256
+ forceTheme: ThemeKey,
28257
+ cssFolder: AbsoluteUrlString,
28258
+ hostThemeMap: t.record(URLHostString, ThemeKey),
28259
+ customCssUrlMap: t.record(ThemeKey, AbsoluteUrlString),
28260
+ fontUrlMap: t.record(ThemeKey, AbsoluteUrlString),
28261
+ overrideLocale: t.string,
28262
+ deploymentId: t.string
28263
+ })]);
28264
+ /** The top-level configuration for the consent UI (minimal theme configs) */
28265
+ const LoadOptions = t.intersection([
28266
+ SharedLoadOptions,
28267
+ t.type({ themeConfigMap: t.record(ThemeKey, ThemeConfigurationMinimal) }),
28268
+ t.partial({ viewportHeightOverride: t.string })
28269
+ ]);
28270
+ /** The top-level configuration for the mobile consent UI (full theme configs) */
28271
+ const MobileUiLoadOptions = t.intersection([SharedLoadOptions, t.type({ themeConfigMap: t.record(ThemeKey, ThemeConfiguration) })]);
28272
+ //#endregion
28273
+ //#region src/customFunction.ts
28274
+ /**
28275
+ * The product-facing type of a custom function.
28276
+ */
28277
+ const CustomFunctionType = {
28278
+ /** DSR pre-flight enricher and datapoint resolver */
28279
+ Dsr: "DSR",
28280
+ /** General purpose code execution */
28281
+ General: "GENERAL"
28282
+ };
28283
+ /**
28284
+ * The lifecycle state of a custom function.
28285
+ *
28286
+ * Staging removed `INACTIVE` from this enum (version-level `INACTIVE` is unchanged).
28287
+ * A function that only has a draft is still `ACTIVE` until archived.
28288
+ */
28289
+ const CustomFunctionLifecycleState = {
28290
+ /** The function is available (may or may not have an active version yet) */
28291
+ Active: "ACTIVE",
28292
+ /** The function is archived */
28293
+ Archived: "ARCHIVED"
28294
+ };
28295
+ /**
28296
+ * The lifecycle state of a custom function version.
28297
+ */
28298
+ const CustomFunctionVersionLifecycleState = {
28299
+ /** The version is the function's active version */
28300
+ Active: "ACTIVE",
28301
+ /** The version is a draft pending promotion */
28302
+ Draft: "DRAFT",
28303
+ /** The version was superseded by a newer version */
28304
+ Inactive: "INACTIVE"
28305
+ };
28306
+ /**
28307
+ * The payload types a custom function can be invoked with, selecting which
28308
+ * export the runtime executes.
28309
+ */
28310
+ const CustomFunctionPayloadType = {
28311
+ /** DSR datapoint resolver — invokes the `default` export */
28312
+ DataPoint: "DATA_POINT",
28313
+ /** DSR pre-flight request enricher — invokes the `enricher` export */
28314
+ RequestEnricher: "REQUEST_ENRICHER",
28315
+ /** General purpose (Maestro) custom function */
28316
+ Maestro: "MAESTRO"
28317
+ };
28318
+ //#endregion
28319
+ //#region src/database.ts
28320
+ /**
28321
+ * The database integrations
28322
+ */
28323
+ const DatabaseIntegration = {
28324
+ postgresql: "postgresql",
28325
+ redshift: "amazonredshift",
28326
+ snowflake: "snowflake",
28327
+ mysql: "mysql",
28328
+ bigquery: "bigquery",
28329
+ microsoftsql: "microsoftsql",
28330
+ maria: "maria",
28331
+ mongodb: "mongodb",
28332
+ amazondynamodb: "amazondynamodb",
28333
+ amazons3: "amazons3",
28334
+ databrickslakehouse: "databrickslakehouse",
28335
+ ibmdb2: "ibmdb2",
28336
+ oracle: "oracle",
28337
+ quickbase: "quickbase",
28338
+ redis: "redis",
28339
+ treasuredata: "treasuredata",
28340
+ saps4hana: "saps4hana",
28341
+ googlebigtable: "googlebigtable",
28342
+ azuresynapse: "azuresynapse",
28343
+ azurecosmosdbnosql: "azurecosmosdbnosql",
28344
+ trino: "trino"
28345
+ };
28346
+ /**
28347
+ * The possible drivers for a database integration
28348
+ */
28349
+ const SQLDriverWithDataMapping = {
28350
+ [DatabaseIntegration.redshift]: "Amazon Redshift",
28351
+ [DatabaseIntegration.postgresql]: "PostgreSQL Unicode",
28352
+ [DatabaseIntegration.snowflake]: "SnowflakeDSIIDriver",
28353
+ [DatabaseIntegration.mysql]: "MySQL",
28354
+ [DatabaseIntegration.bigquery]: "Google BigQuery",
28355
+ [DatabaseIntegration.microsoftsql]: "Microsoft SQL",
28356
+ [DatabaseIntegration.maria]: "MariaDB",
28357
+ [DatabaseIntegration.databrickslakehouse]: "Databricks Lakehouse",
28358
+ [DatabaseIntegration.ibmdb2]: "IBM DB2",
28359
+ [DatabaseIntegration.oracle]: "Oracle DB",
28360
+ [DatabaseIntegration.azuresynapse]: "Azure Synapse",
28361
+ [DatabaseIntegration.trino]: "Trino"
28362
+ };
28363
+ /**
28364
+ * All possible drivers for a database integration, regardless
28365
+ * or not they support data mapping
28366
+ */
28367
+ const DatabaseDriver = {
28368
+ ...SQLDriverWithDataMapping,
28369
+ [DatabaseIntegration.mongodb]: "MongoDB",
28370
+ [DatabaseIntegration.amazondynamodb]: "AmazonDynamoDB",
28371
+ [DatabaseIntegration.amazons3]: "AmazonS3",
28372
+ [DatabaseIntegration.databrickslakehouse]: "Databricks Lakehouse",
28373
+ [DatabaseIntegration.quickbase]: "Quickbase",
28374
+ [DatabaseIntegration.redis]: "Redis",
28375
+ [DatabaseIntegration.treasuredata]: "TreasureData",
28376
+ [DatabaseIntegration.saps4hana]: "SapS4Hana",
28377
+ [DatabaseIntegration.googlebigtable]: "Google Bigtable",
28378
+ [DatabaseIntegration.azurecosmosdbnosql]: "Azure Cosmos DB NoSQL"
28379
+ };
28380
+ //#endregion
28381
+ //#region src/dataSubjectClass.ts
28382
+ /**
28383
+ * Immutable class for a data subject type (GraphQL {@link DataSubjectClass}).
28384
+ */
28385
+ const DataSubjectClass = {
28386
+ /** Consumer or end-user data subject */
28387
+ EndUser: "END_USER",
28388
+ /** Employee data subject */
28389
+ Employee: "EMPLOYEE",
28390
+ /** Business contact data subject */
28391
+ BusinessContact: "BUSINESS_CONTACT",
28392
+ /** Other / uncategorized data subject */
28393
+ Other: "OTHER"
28394
+ };
28395
+ //#endregion
28396
+ //#region src/datapoint.ts
28397
+ const ConfidenceLabel = {
28398
+ High: "HIGH",
28399
+ Medium: "MEDIUM",
28400
+ Low: "LOW"
28401
+ };
28402
+ /** The approval status of the category guess for a subdatapoint */
28403
+ const SubDataPointDataSubCategoryGuessStatus = {
28404
+ /** The guess has been approved as valid */
28405
+ Approved: "APPROVED",
28406
+ /** The guess is pending review */
28407
+ Pending: "PENDING",
28408
+ /** The guess has been marked as wrong */
28409
+ Rejected: "REJECTED"
28410
+ };
28411
+ const UnstructuredSubDataPointRecommendationStatus = {
28412
+ /** The category was manually applied */
28413
+ ManuallyAdded: "MANUALLY_ADDED",
28414
+ /** The recommendation has been corrected */
28415
+ Corrected: "CORRECTED",
28416
+ /** The recommendation has been approved as valid */
28417
+ Validated: "VALIDATED",
28418
+ /** The recommendation is has been made but not validated */
28419
+ Classified: "CLASSIFIED",
28420
+ /** The recommendation has been marked as wrong */
28421
+ Rejected: "REJECTED"
28422
+ };
28423
+ /**
28424
+ * Encryption types for database table
28425
+ */
28426
+ const TableEncryptionType = {
28427
+ Unencrypted: "UNENCRYPTED",
28428
+ EncryptedApplicationSide: "ENCRYPTED_APPLICATION_SIDE",
28429
+ EncryptedByDataAtRest: "ENCRYPTED_DATA_AT_REST"
28430
+ };
28431
+ const Controllership = {
28432
+ /** The current organization is a controller of the data */
28433
+ Controller: "CONTROLLER",
28434
+ /** The current organization is a processor of the data */
28435
+ Processor: "PROCESSOR",
28436
+ /** The current organization is a joint controller of the data */
28437
+ JointController: "JOINT_CONTROLLER"
28438
+ };
28439
+ /** The type of retention schedule for personal data */
28440
+ const RetentionType = {
28441
+ /** Collected user information is deleted, anonymized or aggregated after a specific time period */
28442
+ StatedPeriod: "STATED_PERIOD",
28443
+ /** Data is deleted, anonymized, or aggregated at some point, but no specific retention period is stated */
28444
+ Limited: "LIMITED",
28445
+ /** Collected user information is retained indefinitely */
28446
+ Indefinite: "INDEFINITE",
28447
+ /** A specific retention type not covered above */
28448
+ Other: "OTHER",
28449
+ /** Retention period is not stated or unclear */
28450
+ Unspecified: "UNSPECIFIED"
28451
+ };
28452
+ //#endregion
28453
+ //#region src/docs.ts
28454
+ /** Allowed `guideType` frontmatter values on docs.transcend.io pages. */
28455
+ const DocsGuideType = {
28456
+ OverviewsAndConcepts: "Overviews & Concepts",
28457
+ UseCaseGuides: "Use Case Guides",
28458
+ DeveloperDocs: "Developer Docs",
28459
+ IntegrationGuides: "Integration Guides",
28460
+ Troubleshooting: "Troubleshooting"
28461
+ };
28462
+ /** Who reads a docs page. */
28463
+ const DocsPersona = {
28464
+ Compliance: "Compliance",
28465
+ Development: "Development",
28466
+ Operations: "Operations",
28467
+ Legal: "Legal",
28468
+ Security: "Security",
28469
+ Marketing: "Marketing"
28470
+ };
28471
+ /** Customer goals a docs page serves. */
28472
+ const DocsUseCase = {
28473
+ PrivacyImpactAssessments: "Privacy Impact Assessments",
28474
+ KnowYourData: "Know Your Data",
28475
+ FullStackConsent: "Full Stack Consent",
28476
+ LegacyMigrations: "Legacy Migrations",
28477
+ DoNotSellOrShare: "Do Not Sell or Share",
28478
+ DataMinimization: "Data Minimization",
28479
+ InAppDeletion: "In-App Deletion"
28480
+ };
28481
+ /**
28482
+ * Who may read a docs page.
28483
+ * Omit `access` in frontmatter for signed-in only. Set `public` to opt in.
28484
+ */
28485
+ const DocsAccess = {
28486
+ Public: "public",
28487
+ SignedIn: "signedIn"
28488
+ };
28489
+ /** Lookup API content source filter. */
28490
+ const DocsLookupSource = {
28491
+ Guides: "guides",
28492
+ ApiReference: "api-reference",
28493
+ Graphql: "graphql",
28494
+ Marketing: "marketing"
28495
+ };
28496
+ /** `matchedBy` value on docs lookup API rows. */
28497
+ const DocsLookupMatch = {
28498
+ Route: "route",
28499
+ Integration: "integration",
28500
+ Graphql: "graphql",
28501
+ Product: "product",
28502
+ Fulltext: "fulltext",
28503
+ FulltextFallback: "fulltext-fallback"
28504
+ };
28505
+ /** `match` field on docs_list rows from route or product lookup. */
28506
+ const DocsListRouteMatch = {
28507
+ Primary: "primary",
28508
+ Mention: "mention",
28509
+ Product: "product",
28510
+ Search: "search"
28511
+ };
28512
+ /** GraphQL schema artifact kind for docs lookup. */
28513
+ const DocsGraphqlKind = {
28514
+ Query: "query",
28515
+ Mutation: "mutation",
28516
+ Type: "type",
28517
+ Input: "input",
28518
+ Enum: "enum"
28519
+ };
28520
+ const docsGuideTypeTitles = new Set(Object.values(DocsGuideType));
28521
+ /** Returns a known guide type title, or null when the index carries a newer label. */
28522
+ function parseDocsGuideType(value) {
28523
+ if (value == null || value === "") return null;
28524
+ return docsGuideTypeTitles.has(value) ? value : null;
28525
+ }
28526
+ /**
28527
+ * Product titles used in docs.transcend.io page frontmatter and dashboard-routes.json.
28528
+ * `Platform` covers workspace routes.
28529
+ */
28530
+ const DocsProduct = {
28531
+ Assessments: "Assessments",
28532
+ Classification: "Classification",
28533
+ ConsentManagement: "Consent Management",
28534
+ DataInventory: "Data Inventory",
28535
+ DsrAutomation: "DSR Automation",
28536
+ Platform: "Platform",
28537
+ PreferenceManagement: "Preference Management",
28538
+ PrivacyCenter: "Privacy Center",
28539
+ SystemDiscovery: "System Discovery",
28540
+ WebAuditor: "Web Auditor"
28541
+ };
28542
+ //#endregion
28543
+ //#region src/drop.ts
28544
+ /** The six DROP list types as written on the wire. */
28545
+ const DropListType = {
28546
+ Email: "email",
28547
+ Phone: "phone",
28548
+ Maid: "maid",
28549
+ Ctv: "ctv",
28550
+ Ndz: "ndz",
28551
+ NameVin: "name_vin"
28552
+ };
28553
+ /**
28554
+ * Longest `dropRecordId` accepted on DROP ingress payloads and persisted on
28555
+ * `DropRunRequest`.
28556
+ */
28557
+ const DROP_RECORD_ID_MAX_LENGTH = 64;
28558
+ //#endregion
28559
+ //#region src/dsrBulkErrorCode.ts
28560
+ /**
28561
+ * Stable, machine-readable error codes for bulk submission failures that apply
28562
+ * to the call as a whole rather than a single `input[]` item.
28563
+ *
28564
+ * Surfaced on `POST /v1/data-subject-request-bulk` when the payload or its
28565
+ * preconditions are invalid before per-input processing completes.
28566
+ */
28567
+ const DsrBulkErrorCode = {
28568
+ /** The bulk submission included no request inputs. */
28569
+ NoInputsProvided: "NO_INPUTS_PROVIDED",
28570
+ /** The bulk submission exceeds the maximum number of inputs. */
28571
+ SubmissionLimitExceeded: "SUBMISSION_LIMIT_EXCEEDED",
28572
+ /** The bulk submission mixed inputs with and without a pre-generated CEK context. */
28573
+ MixedCekContext: "MIXED_CEK_CONTEXT",
28574
+ /**
28575
+ * The required Diffie-Hellman encrypted payload was missing. Whether `dhEncrypted`
28576
+ * is required depends on the entire input set — it is required only when at least
28577
+ * one input is missing a pre-generated `encryptedCEKContext`.
28578
+ */
28579
+ DhContextRequired: "DH_CONTEXT_REQUIRED",
28580
+ /**
28581
+ * A concurrent DROP submission won the `dropRunId` unique-index idempotency race
28582
+ * during bulk create. The retry loop cannot determine which input lost, so no
28583
+ * input index can be attributed.
28584
+ */
28585
+ ConcurrentSubmissionConflict: "CONCURRENT_SUBMISSION_CONFLICT",
28586
+ /**
28587
+ * The bulk submission's top-level `input` was not an array (malformed body
28588
+ * before per-item processing).
28589
+ */
28590
+ InvalidBulkInput: "INVALID_BULK_INPUT"
28591
+ };
28592
+ //#endregion
28593
+ //#region src/dsrErrorCode.ts
28594
+ /**
28595
+ * Stable, machine-readable error codes for a single bulk submission input
28596
+ * (`POST /v1/data-subject-request-bulk` `input[]` item).
28597
+ *
28598
+ * Returned on one failed input so callers can branch without parsing the error
28599
+ * message. Failures about the bulk call as a whole use {@link DsrBulkErrorCode}.
28600
+ */
28601
+ const DsrErrorCode = {
28602
+ /** This request has an invalid or missing workflowConfigId. */
28603
+ InvalidWorkflowConfigId: "INVALID_WORKFLOW_CONFIG_ID",
28604
+ /** This request is missing a core identifier. */
28605
+ MissingCoreIdentifier: "MISSING_CORE_IDENTIFIER",
28606
+ /** A restart was requested for a request ID that does not exist. */
28607
+ RestartRequestNotFound: "RESTART_REQUEST_NOT_FOUND",
28608
+ /** A restart was requested for a request closed beyond the org's time limit. */
28609
+ RestartTimeLimitExceeded: "RESTART_TIME_LIMIT_EXCEEDED",
28610
+ /** The referenced receipt email template does not exist. */
28611
+ ReceiptTemplateNotFound: "RECEIPT_TEMPLATE_NOT_FOUND",
28612
+ /** DROP linkage identifiers on this request do not cover the required identifier types. */
28613
+ DropIdentifierCoverageMismatch: "DROP_IDENTIFIER_COVERAGE_MISMATCH",
28614
+ /** The same DROP record was claimed more than once on this request. */
28615
+ DuplicateDropRecords: "DUPLICATE_DROP_RECORDS",
28616
+ /** This request's DROP identifiers conflict with another input sharing a dropRunId idempotency key. */
28617
+ InBatchDropIdempotencyKeyCollision: "IN_BATCH_DROP_IDEMPOTENCY_KEY_COLLISION",
28618
+ /** This request's `dropRecords` was provided without a `dropRunId`. */
28619
+ DropRecordsRequireDropRunId: "DROP_RECORDS_REQUIRE_DROP_RUN_ID",
28620
+ /** This request exceeds the per-request DROP record link limit. */
28621
+ MaxDropRecordsPerRequestExceeded: "MAX_DROP_RECORDS_PER_REQUEST_EXCEEDED",
28622
+ /** One or more DROP records on this request are not part of the run's CPPA download. */
28623
+ UnknownDropRecords: "UNKNOWN_DROP_RECORDS",
28624
+ /**
28625
+ * One or more DROP records on this request exist in the run's CPPA download
28626
+ * under a different list type than the submission claims.
28627
+ */
28628
+ DropRecordListTypeMismatch: "DROP_RECORD_LIST_TYPE_MISMATCH",
28629
+ /** The DROP run referenced by this request does not exist. */
28630
+ DropRunNotFound: "DROP_RUN_NOT_FOUND",
28631
+ /** The DROP run referenced by this request is in a state that no longer accepts new DROP-linked DSRs. */
28632
+ DropRunNotIntakeEligible: "DROP_RUN_NOT_INTAKE_ELIGIBLE",
28633
+ /** An identifier value on this request failed format or regex validation. */
28634
+ IdentifierValidationFailed: "IDENTIFIER_VALIDATION_FAILED",
28635
+ /** This request names an identifier the organization does not have configured. */
28636
+ UnsupportedIdentifierName: "UNSUPPORTED_IDENTIFIER_NAME",
28637
+ /** This request has no email, which is required outside silent mode. */
28638
+ MissingRequiredEmail: "MISSING_REQUIRED_EMAIL",
28639
+ /**
28640
+ * One or more `dataSiloIds` on this request are not connected to the
28641
+ * workflow config. `dataSiloIds` may only narrow the workflow's connected set.
28642
+ */
28643
+ DataSiloNotInWorkflow: "DATA_SILO_NOT_IN_WORKFLOW",
28644
+ /**
28645
+ * This request set both `dataSiloIds` and `ignoreDataSiloIds`. The two are
28646
+ * mutually exclusive: `dataSiloIds` restricts fulfillment to a subset of the
28647
+ * workflow's connected silos, `ignoreDataSiloIds` excludes silos from it.
28648
+ */
28649
+ ConflictingDataSiloFilters: "CONFLICTING_DATA_SILO_FILTERS",
28650
+ /**
28651
+ * The `type` asserted on this request does not match the workflow config's
28652
+ * request action. `type` is optional; omit it to derive from the workflow.
28653
+ */
28654
+ TypeNotMatchingWorkflow: "TYPE_NOT_MATCHING_WORKFLOW",
28655
+ /**
28656
+ * The `subjectType` asserted on this request does not match the workflow
28657
+ * config's data subject type. `subjectType` is optional; omit it to derive
28658
+ * from the workflow.
28659
+ */
28660
+ SubjectTypeNotMatchingWorkflow: "SUBJECT_TYPE_NOT_MATCHING_WORKFLOW",
28661
+ /**
28662
+ * The request region is not eligible for the workflow config's regionList.
28663
+ * The supplied country or subdivision must match an entry in regionList when
28664
+ * the workflow collects regions and regionList is non-empty.
28665
+ */
28666
+ RegionNotInWorkflow: "REGION_NOT_IN_WORKFLOW",
28667
+ /**
28668
+ * This request's input failed shape, option, or field-pairing validation
28669
+ * (gateway codec decode or backend per-item checks).
28670
+ */
28671
+ InvalidRequestInput: "INVALID_REQUEST_INPUT",
28672
+ /**
28673
+ * A Sombra-signed identifier JWT on this request failed verification or
28674
+ * decode (tampered, expired, or malformed).
28675
+ */
28676
+ InvalidIdentifierJwt: "INVALID_IDENTIFIER_JWT",
28677
+ /**
28678
+ * The targeted workflow config is saved as a draft and cannot be used to
28679
+ * submit requests.
28680
+ */
28681
+ DraftWorkflowConfig: "DRAFT_WORKFLOW_CONFIG",
28682
+ /**
28683
+ * An open request with the same type and identifiers already exists for this
28684
+ * data subject.
28685
+ */
28686
+ DuplicateOpenRequest: "DUPLICATE_OPEN_REQUEST",
28687
+ /**
28688
+ * An open parent request (for example erasure with access preview) already
28689
+ * covers this submission.
28690
+ */
28691
+ OpenParentRequest: "OPEN_PARENT_REQUEST"
28692
+ };
28693
+ //#endregion
28694
+ //#region src/dsrErrorMessage.ts
28695
+ /**
28696
+ * Maximum CPPA DROP records that can be linked to a single DSR at submission
28697
+ * time.
28698
+ */
28699
+ const MAX_DROP_RECORDS_PER_REQUEST = 500;
28700
+ /**
28701
+ * Maximum number of requests that can be submitted at once in a bulk
28702
+ * operation.
28703
+ */
28704
+ const REQUEST_SUBMISSION_LIMIT = 100;
28705
+ /**
28706
+ * Maximum unknown DROP records named in an {@link DsrErrorCode.UnknownDropRecords}
28707
+ * error message before truncating with an "and N more" suffix.
28708
+ */
28709
+ const MAX_UNKNOWN_DROP_RECORDS_IN_ERROR = 20;
28710
+ /**
28711
+ * Summary message when an entire bulk submission is rejected.
28712
+ */
28713
+ const DSR_BULK_SUBMISSION_REJECTED_MESSAGE = "The submission was rejected. No requests were created.";
28714
+ /**
28715
+ * Canonical per-input DSR bulk submission error messages.
28716
+ *
28717
+ * Each {@link DsrErrorCode} has exactly one builder; call
28718
+ * `DSR_ERROR_MESSAGE[code](...)` to render the runtime string for one failed
28719
+ * `input[]` item. Per-input errors currently surface as HTTP 400 bad-request
28720
+ * validation failures.
28721
+ */
28722
+ const DSR_ERROR_MESSAGE = {
28723
+ [DsrErrorCode.InvalidWorkflowConfigId]: () => "Invalid workflowConfigId",
28724
+ [DsrErrorCode.MissingCoreIdentifier]: () => "Missing core identifier",
28725
+ [DsrErrorCode.RestartRequestNotFound]: () => "Cannot restart: request not found",
28726
+ [DsrErrorCode.RestartTimeLimitExceeded]: ({ daysSinceLastTransition, restartTimeLimitDays }) => `This request's status last changed ${daysSinceLastTransition} days ago, which exceeds your organization's restart time limit of ${restartTimeLimitDays} days. Create a new request instead.`,
28727
+ [DsrErrorCode.ReceiptTemplateNotFound]: (templateId) => `Could not find specified email template ID: ${templateId}`,
28728
+ [DsrErrorCode.DropIdentifierCoverageMismatch]: () => "Cannot link DROP records to an existing request until every identifier on this submission is already on that request. Submit a new request that includes all required identifiers, or retry with only identifiers already on the existing request.",
28729
+ [DsrErrorCode.DuplicateDropRecords]: () => "dropRecords contains duplicate (dropRecordId, dropListType) entries: each DROP record can only be linked to one request per submission.",
28730
+ [DsrErrorCode.InBatchDropIdempotencyKeyCollision]: () => "This request's identifiers conflict with another input in the batch that shares the same dropRunId idempotency key.",
28731
+ [DsrErrorCode.DropRecordsRequireDropRunId]: () => "dropRecords requires dropRunId",
28732
+ [DsrErrorCode.MaxDropRecordsPerRequestExceeded]: () => `Cannot link more than 500 DROP records to a single request.`,
28733
+ [DsrErrorCode.UnknownDropRecords]: (records) => {
28734
+ const named = records.slice(0, 20).map(({ dropRecordId, dropListType }) => `${dropRecordId} (${dropListType})`).join(", ");
28735
+ const remainder = records.length > 20 ? ` and ${records.length - 20} more` : "";
28736
+ return `${records.length} DROP record(s) are not part of this run's CPPA download: ${named}${remainder}. Re-index the run's records, or download a fresh matched-records file and edit that.`;
28737
+ },
28738
+ [DsrErrorCode.DropRecordListTypeMismatch]: (records) => {
28739
+ return `${records.length === 1 ? "" : `${records.length} DROP record(s) have a list-type mismatch with this run's CPPA download: `}${records.slice(0, 20).map(({ dropRecordId, submittedListType, actualListType }) => `${dropRecordId} is a ${actualListType} record in this run; file says ${submittedListType}`).join("; ")}${records.length > 20 ? `; and ${records.length - 20} more` : ""}. Download a fresh matched-records file and edit that.`;
28811
28740
  },
28812
- "ZW-MW": {
28813
- code: "ZW-MW",
28814
- name: "Mashonaland West",
28815
- parent: "ZW"
28816
- }
28741
+ [DsrErrorCode.DropRunNotFound]: (dropRunId) => `Could not find DROP run with id "${dropRunId}"`,
28742
+ [DsrErrorCode.DropRunNotIntakeEligible]: (dropRunState) => `Cannot submit DROP-linked DSRs while the run is in state ${dropRunState}`,
28743
+ /**
28744
+ * Fallback canonical message for {@link DsrErrorCode.IdentifierValidationFailed}.
28745
+ * Organizations can configure a custom, locale-translated `validationErrorMessage`
28746
+ * per identifier, so the runtime message on the error entry will often differ
28747
+ * from this string. Downstream consumers must branch on `code` and display the
28748
+ * returned `message` — never reconstruct it from `DSR_ERROR_MESSAGE`.
28749
+ */
28750
+ [DsrErrorCode.IdentifierValidationFailed]: (identifierNames) => `${identifierNames.join(", ")} did not pass validation`,
28751
+ [DsrErrorCode.UnsupportedIdentifierName]: (name) => `The organization does not support identifiers with name: "${name}" at time of request submission.`,
28752
+ [DsrErrorCode.MissingRequiredEmail]: () => "At least one email must be provided before a request can be created when not in silent mode",
28753
+ [DsrErrorCode.DataSiloNotInWorkflow]: ({ workflowConfigId, dataSiloIds }) => `The following dataSiloIds are not connected to the workflow config "${workflowConfigId}": ${dataSiloIds.join(", ")}. dataSiloIds may only narrow the workflow's connected data silos.`,
28754
+ [DsrErrorCode.ConflictingDataSiloFilters]: () => "dataSiloIds and ignoreDataSiloIds cannot both be set on the same input. Use dataSiloIds to restrict fulfillment to a subset of the workflow's connected data silos, or ignoreDataSiloIds to exclude silos from it.",
28755
+ [DsrErrorCode.TypeNotMatchingWorkflow]: ({ workflowConfigId, providedType, workflowType }) => `The provided type "${providedType}" does not match the request action "${workflowType}" of workflow config "${workflowConfigId}". Omit type to derive it from the workflow config.`,
28756
+ [DsrErrorCode.SubjectTypeNotMatchingWorkflow]: ({ workflowConfigId, providedSubjectType, workflowSubjectType }) => `The provided subjectType "${providedSubjectType}" does not match the data subject type "${workflowSubjectType}" of workflow config "${workflowConfigId}". Omit subjectType to derive it from the workflow config.`,
28757
+ [DsrErrorCode.RegionNotInWorkflow]: ({ region, supportedRegions }) => `Region "${region}" is not eligible for this workflow. Supported regions: ${supportedRegions.join(", ")}.`,
28758
+ /**
28759
+ * Fallback canonical message for {@link DsrErrorCode.InvalidRequestInput}.
28760
+ * Producers often pass through the original validation `ClientError` message,
28761
+ * so the runtime message on the error entry may differ from this string.
28762
+ * Downstream consumers must branch on `code` and display the returned
28763
+ * `message` — never reconstruct it from `DSR_ERROR_MESSAGE`.
28764
+ */
28765
+ [DsrErrorCode.InvalidRequestInput]: () => "Request input failed validation",
28766
+ [DsrErrorCode.InvalidIdentifierJwt]: () => "Signed identifier JWT failed verification",
28767
+ [DsrErrorCode.DraftWorkflowConfig]: () => "Workflow is saved as a draft and cannot be used to submit requests.",
28768
+ [DsrErrorCode.DuplicateOpenRequest]: () => "You have already made this request.",
28769
+ [DsrErrorCode.OpenParentRequest]: () => "You have already submitted a previous request that will also accommodate this current one."
28770
+ };
28771
+ //#endregion
28772
+ //#region src/dsrBulkErrorMessage.ts
28773
+ /**
28774
+ * Canonical bulk-call DSR submission error messages.
28775
+ *
28776
+ * Each {@link DsrBulkErrorCode} has exactly one builder for failures that apply
28777
+ * to the submission as a whole. These currently surface as HTTP 400 bad-request
28778
+ * validation failures, so no separate status map is exported.
28779
+ */
28780
+ const DSR_BULK_ERROR_MESSAGE = {
28781
+ [DsrBulkErrorCode.NoInputsProvided]: () => "No inputs provided",
28782
+ [DsrBulkErrorCode.SubmissionLimitExceeded]: () => `Cannot submit more than 100 requests at once. Please split your requests into smaller batches and try again.`,
28783
+ [DsrBulkErrorCode.MixedCekContext]: () => "Either all or none of the requests must include encryptedCEKContext",
28784
+ [DsrBulkErrorCode.DhContextRequired]: () => "No encrypted data subject payload provided",
28785
+ [DsrBulkErrorCode.ConcurrentSubmissionConflict]: () => "A concurrent DROP submission already created one or more of these requests. Retry the batch.",
28786
+ [DsrBulkErrorCode.InvalidBulkInput]: () => "Bulk submission input must be an array"
28787
+ };
28788
+ //#endregion
28789
+ //#region src/dsrRequestOutcome.ts
28790
+ /**
28791
+ * Per-input outcome for `POST /v1/data-subject-request-bulk` responses.
28792
+ *
28793
+ * Returned on successful bulk submissions so callers can branch without parsing
28794
+ * error messages. Failures continue to use {@link DsrErrorCode}.
28795
+ */
28796
+ const DsrRequestOutcome = {
28797
+ /** A new request was created. */
28798
+ Created: "CREATED",
28799
+ /** An equivalent open request already exists for this submission. */
28800
+ AlreadyOpen: "ALREADY_OPEN",
28801
+ /** DROP records were linked to an existing request without creating a new one. */
28802
+ DropRecordsLinked: "DROP_RECORDS_LINKED",
28803
+ /** An existing request was restarted. */
28804
+ Restarted: "RESTARTED"
28805
+ };
28806
+ //#endregion
28807
+ //#region src/identifier.ts
28808
+ /**
28809
+ * An identifier that can be used to communication with the data subject, also implies that the identifier is transcend supported
28810
+ */
28811
+ const CommunicationIdentifierType = {
28812
+ /** An email address */
28813
+ Email: "email",
28814
+ /** A phone number */
28815
+ Phone: "phone"
28816
+ };
28817
+ /**
28818
+ * The built in identification strategies
28819
+ */
28820
+ const IdentifierType = {
28821
+ ...CommunicationIdentifierType,
28822
+ /** The core id of the organization (usually provided through login) */
28823
+ CoreIdentifier: "coreIdentifier",
28824
+ /** A custom identifier */
28825
+ Custom: "custom",
28826
+ /**
28827
+ * Google/Android mobile identifier
28828
+ *
28829
+ * @see https://www.singular.net/blog/google-advertising-id-gaid/
28830
+ * AKA adid - android advertising id
28831
+ */
28832
+ Gaid: "gaid",
28833
+ /** Apple ios mobile identifier */
28834
+ Idfa: "idfa",
28835
+ /**
28836
+ * The Identifier for Vendors
28837
+ *
28838
+ * @see https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor
28839
+ */
28840
+ Idfv: "idfv",
28841
+ BrowserId: "browserId",
28842
+ /** Microsoft Advertising Id */
28843
+ MicrosoftAdvertisingId: "microsoftAdvertisingId",
28844
+ /** Amazon fire Advertising Id */
28845
+ AmazonFireAdvertisingId: "amazonFireAdvertisingId",
28846
+ /**
28847
+ * Roku Advertising Id
28848
+ *
28849
+ * @see https://developer.roku.com/docs/developer-program/advertising/integrating-roku-advertising-framework.md
28850
+ */
28851
+ Rida: "rida",
28852
+ /** The handle for the filestack file */
28853
+ FilestackHandle: "filestackHandle",
28854
+ /** An ID for a stripe user */
28855
+ StripeId: "stripeId",
28856
+ /** The ID used to key braintree customer */
28857
+ BraintreeCustomerId: "braintreeCustomerId",
28858
+ /** An ID for a chargebee user */
28859
+ ChargebeeId: "chargebeeId",
28860
+ /** An ID for a Thrive TRM contact */
28861
+ thriveTrmContactId: "thriveTrmContactId",
28862
+ /** Talkable uuid */
28863
+ TalkableUUID: "talkableUUID",
28864
+ /** Recurly site account ID */
28865
+ RecurlyId: "recurlyId",
28866
+ /** The customer.io ID - also known as cio_id */
28867
+ customerIoId: "customerIoId",
28868
+ /** The visitorId for the Sprig integration */
28869
+ sprigVisitorId: "sprigVisitorId",
28870
+ /** URL of a LinkedIn profile */
28871
+ linkedInURL: "linkedInURL",
28872
+ /**
28873
+ * An advertising ID (for a mobile device)
28874
+ * TODO: https://transcend.height.app/T-13657 - remove this in favor of idfa and gpadvid
28875
+ */
28876
+ AdvertisingId: "advertisingId",
28877
+ /** An ID for a Persona account */
28878
+ PersonaReferenceId: "personaReferenceId",
28879
+ /** An ID for a Stream user */
28880
+ StreamUserId: "streamUserId",
28881
+ /** A token used to make API calls on behalf of a Plaid account. */
28882
+ PlaidProcessorToken: "plaidProcessorToken",
28883
+ /** An ID for an applicant on Onfido */
28884
+ OnfidoApplicantId: "onfidoApplicantId",
28885
+ /** Custom ID for a Vero user */
28886
+ VeroUserId: "veroUserId",
28887
+ /**
28888
+ * Adobe Privacy API ID's
28889
+ * https://experienceleague.adobe.com/en/docs/experience-platform/privacy/api/appendix#standard-namespaces
28890
+ */
28891
+ /** Adobe Advertising Cloud ID */
28892
+ AdobeAdvertisingCloudId: "adobeAdvertisingCloudId",
28893
+ /** Adobe Audience Manager UUID */
28894
+ AdobeAudienceManagerId: "adobeAudienceManagerId",
28895
+ /** Adobe Experience Cloud ID */
28896
+ AdobeExperienceCloudId: "adobeExperienceCloudId",
28897
+ /** Adobe Target ID */
28898
+ AdobeTargetID: "adobeTargetId",
28899
+ /** Adobe Campaign recipient ID */
28900
+ AdobeCampaignRecipientId: "adobeCampaignRecipientId",
28901
+ /** The special Transcend identifier on consent preference records */
28902
+ Transcend: "transcend"
28903
+ };
28904
+ //#endregion
28905
+ //#region src/enricher.ts
28906
+ /**
28907
+ * Enrichers that are a bit more freeform, as in they can take in arbitrary inputs
28908
+ * and return arbitrary outputs
28909
+ */
28910
+ const CustomEnricherType = {
28911
+ /** Notify a server to enrich the variable */
28912
+ Server: "SERVER",
28913
+ /** Notify a person to enrich the value */
28914
+ Person: "PERSON",
28915
+ /** Check the legal hold list for that enricher type */
28916
+ LegalHold: "LEGAL_HOLD",
28917
+ /** Auto approve a specific identifier in a specific situation */
28918
+ AutoApprove: "AUTO_APPROVE",
28919
+ /** Test an identifier using a regex */
28920
+ RegexMatch: "REGEX_MATCH",
28921
+ /** Perform conditional logic based on region */
28922
+ RegionMatcher: "REGION_MATCH",
28923
+ /** Execute an SQL query against a database */
28924
+ Database: "DATABASE",
28925
+ /** Execute a look in looker to map identifiers */
28926
+ Looker: "LOOKER",
28927
+ /** Adds an enricher dependency */
28928
+ WaitPeriod: "WAIT_PERIOD",
28929
+ /** Verify a government ID */
28930
+ GovernmentId: "GOVERNMENT_ID",
28931
+ /** Custom Function enricher type. */
28932
+ CustomFunction: "CUSTOM_FUNCTION"
28933
+ };
28934
+ /**
28935
+ * Enrichers that can only be used to initialize the beginning of a DSR
28936
+ */
28937
+ const InitEnricherType = {
28938
+ /** Sombra has the capability */
28939
+ Sombra: "SOMBRA" };
28940
+ /**
28941
+ * The various types of identity enrichers supported by transcend
28942
+ */
28943
+ const EnricherType = {
28944
+ ...InitEnricherType,
28945
+ ...CommunicationIdentifierType,
28946
+ ...CustomEnricherType
28947
+ };
28948
+ //#endregion
28949
+ //#region src/formType.ts
28950
+ /**
28951
+ * Privacy Center / action form field types (GraphQL {@link FormType}).
28952
+ */
28953
+ const FormType = {
28954
+ /** Boolean input */
28955
+ Boolean: "boolean",
28956
+ /** Group of nested fields */
28957
+ Group: "group",
28958
+ /** Single-line string input */
28959
+ String: "string",
28960
+ /** Array input */
28961
+ Array: "array",
28962
+ /** Select dropdown */
28963
+ Select: "select",
28964
+ /** Multi-line text area */
28965
+ TextArea: "textArea",
28966
+ /** JSON input */
28967
+ Json: "json",
28968
+ /** Password input */
28969
+ Password: "password",
28970
+ /** File upload */
28971
+ File: "file",
28972
+ /** API key picker */
28973
+ SelectApiKeys: "SelectApiKeys",
28974
+ /** User picker */
28975
+ SelectUsers: "SelectUsers",
28976
+ /** Team picker */
28977
+ SelectTeams: "SelectTeams",
28978
+ /** Template picker */
28979
+ SelectTemplate: "SelectTemplate"
28980
+ };
28981
+ //#endregion
28982
+ //#region src/getRegistryLink.ts
28983
+ const CODE_PACKAGE_TYPE_TO_LINK = {
28984
+ [CodePackageType.CocoaPods]: (name) => `https://cocoapods.org/pods/${name}`,
28985
+ [CodePackageType.Gradle]: (name) => `https://mvnrepository.com/artifact/${name.split(":").join("/")}`,
28986
+ [CodePackageType.PackageJson]: (name) => `https://www.npmjs.com/package/${name}`,
28987
+ [CodePackageType.RequirementsTxt]: (name) => `https://pypi.org/project/${name}`,
28988
+ [CodePackageType.Swift]: (name) => `https://swiftpackageindex.com/search?query=${name}`,
28989
+ [CodePackageType.Pubspec]: (name) => `https://pub.dev/packages/${name}`,
28990
+ [CodePackageType.Gemfile]: (name) => `https://rubygems.org/gems/${name}`,
28991
+ [CodePackageType.ComposerJson]: (name) => `https://packagist.org/packages/${name}`,
28992
+ [CodePackageType.Kotlin]: (name) => `https://mvnrepository.com/artifact/${name.split(":").join("/")}`
28817
28993
  };
28994
+ /**
28995
+ * Get the registry link for a given code package
28996
+ *
28997
+ * @param name - Name of package
28998
+ * @param type - Type of registry
28999
+ * @returns The registry link
29000
+ */
29001
+ function getRegistryLink(name, type) {
29002
+ return CODE_PACKAGE_TYPE_TO_LINK[type](name);
29003
+ }
28818
29004
  //#endregion
28819
29005
  //#region src/sql.ts
28820
29006
  /**
@@ -28866,25 +29052,6 @@ const DatabaseSqlVariablesForPrivacyRequest = t.intersection([t.type({
28866
29052
  partitionName: t.union([t.string, t.null])
28867
29053
  }), DatabaseVariables]);
28868
29054
  //#endregion
28869
- //#region src/isoRegion.ts
28870
- /**
28871
- * gets a typed Dictionary (identical key/values) from a source lookup object
28872
- *
28873
- * @param source - the source lookup
28874
- * @returns the typed dictionary
28875
- */
28876
- function getDictFromKeys(source) {
28877
- return Object.fromEntries(Object.keys(source).map((code) => [code, code]));
28878
- }
28879
- /**
28880
- * Country Code taken from https://github.com/umpirsky/country-list/blob/master/data/en/country.json
28881
- */
28882
- const IsoCountryCode = getDictFromKeys(ISO_31661);
28883
- /**
28884
- * Country subdivisions taken from taken from https://github.com/wooorm/iso-3166/blob/main/2.js
28885
- */
28886
- const IsoCountrySubdivisionCode = getDictFromKeys(ISO_31662);
28887
- //#endregion
28888
29055
  //#region src/largeLanguageModels.ts
28889
29056
  /**
28890
29057
  * The role of the message's author. One of `system`, `user`, `assistant`
@@ -31147,39 +31314,6 @@ const OPAExplainMode = {
31147
31314
  Debug: "debug"
31148
31315
  };
31149
31316
  //#endregion
31150
- //#region src/prefixModule.ts
31151
- /** Catalog a prefix module is published in */
31152
- const PrefixModuleCatalog = {
31153
- /** Provided by Transcend */
31154
- Transcend: "transcend",
31155
- /** Owned by the organization */
31156
- Organization: "organization"
31157
- };
31158
- /**
31159
- * Config on a prefix module release. Backend JSON schemas allow only string properties.
31160
- */
31161
- const PrefixModuleConfig = t.record(t.string, t.string);
31162
- /** Codec for prefix module catalog in yaml and API mappings */
31163
- const PrefixModuleCatalogCodec = valuesOf(PrefixModuleCatalog);
31164
- /**
31165
- * Parse the API config JSON string into a flat string map
31166
- *
31167
- * @param configJson - Raw config from GraphQL
31168
- * @param context - Module name for error messages
31169
- * @returns Parsed config
31170
- */
31171
- function parsePrefixModuleConfigFromJson(configJson, context) {
31172
- let parsed;
31173
- try {
31174
- parsed = JSON.parse(configJson);
31175
- } catch (cause) {
31176
- throw new Error(`Prefix module "${context.moduleName}" has invalid config JSON: ${cause instanceof Error ? cause.message : String(cause)}`);
31177
- }
31178
- const decoded = PrefixModuleConfig.decode(parsed);
31179
- if (either.isLeft(decoded)) throw new Error(`Prefix module "${context.moduleName}" has invalid config: expected a flat map of string values`);
31180
- return decoded.right;
31181
- }
31182
- //#endregion
31183
31317
  //#region src/privacyCenterAccessToken.ts
31184
31318
  /**
31185
31319
  * Wire format of a Privacy Center access token.
@@ -33032,6 +33166,6 @@ const CollectDataSubjectRegions = {
33032
33166
  Collect: "COLLECT"
33033
33167
  };
33034
33168
  //#endregion
33035
- export { AbsoluteUrlString, ActionItemCode, ActionItemPriorityOverride, AirgapBundleAnalyticsBinInterval, AirgapBundleAnalyticsDimension, AirgapBundleAnalyticsMetric, AssessmentFormRawOrderField, AssessmentFormStatus, AssessmentFormTemplateSource, AssessmentFormTemplateStatus, AssessmentQuestionSubType, AssessmentQuestionType, AssessmentSyncColumn, AssessmentSyncModel, AssessmentsDisplayLogicAction, AttributeKeyType, AttributeSupportedResourceType, AutofocusToggle, AutofocusValues, BackendSyncOption, Background, Border, Breakpoint, BreakpointType, BrowserTimeZone, BusinessEntityAttribute, BusinessEntityAttributeSyncColumn, ButtonAction, ButtonConfig, ButtonTheme, ButtonThemeIndex, ButtonType, CODE_PACKAGE_TYPE_TO_LINK, COUNTRIES, COUNTRY_LOOKUP, ChatCompletionMessage, ChatCompletionRole, CloseButtonTheme, CodePackageType, CollectDataSubjectRegions, CommonLayerConfig, CommonLayerTheme, CommonLayerThemeMinimal, CommunicationIdentifierType, ComparisonOperator, CompletedRequestStatus, ConfidenceLabel, ConfigurableColorPaletteColor, ConsentBundleType, ConsentManagerAnalyticsDataSource, ConsentManagerMetricBin, ConsentPrecedenceOption, ConsentThemeInput, ConsentTrackerSource, ConsentTrackerStatus, ConsentTrackerType, ConsentUiUserFlow, ConsentVariantInput, ContainerTheme, ContentFlows, ContentLayout, Controllership, CookieOrderField, CspOption, CssUnitString, CustomEnricherType, CustomFieldApiInput, CustomFunctionLifecycleState, CustomFunctionPayloadType, CustomFunctionType, CustomFunctionVersionLifecycleState, CustomizableComponent, CustomizableText, DEFAULT_MACROREGIONS_MAP, DOMElementId, DROP_RECORD_ID_MAX_LENGTH, DSR_BULK_ERROR_MESSAGE, DSR_BULK_SUBMISSION_REJECTED_MESSAGE, DSR_ERROR_MESSAGE, DataCategoryType, DataFlowOrderField, DataFlowScope, DataFlowType, DataProtectionImpactAssessmentStatus, DataSiloAttribute, DataSiloAttributeSyncColumn, DataSubCategoryAttribute, DataSubCategoryAttributeSyncColumn, DataSubjectClass, DatabaseDriver, DatabaseIntegration, DatabaseSqlVariablesForPrivacyRequest, DatabaseVariables, DecryptionStatus, DefaultConsentOption, DefaultDataSubCategoryType, DefaultPurposeSubCategoryType, DescriptionTextTheme, DocsAccess, DocsGraphqlKind, DocsGuideType, DocsListRouteMatch, DocsLookupMatch, DocsLookupSource, DocsPersona, DocsProduct, DocsUseCase, DropListType, DsrBulkErrorCode, DsrErrorCode, DsrRequestOutcome, EXCEPTIONAL_RESERVATIONS, EXCEPTIONAL_RESERVATION_LOOKUP, EnricherType, FirstLayerConfig, FirstLayerTheme, FirstLayerThemeMinimal, FooterConfig, FooterTheme, FormType, FullWidthContentLayout, HeaderTheme, HeaderThemeMinimal, HorizontalAlign, ISO_31661, ISO_31662, Icon, IdentifierType, InitEnricherType, IntegerString, InternalDataSiloObjectResolver, IsoCountryCode, IsoCountrySubdivisionCode, LargeLanguageModelClient, Link, LoadOptions, LocalSyncOption, LocaleCodec, LogicOperator, LogoPosition, MAX_DROP_RECORDS_PER_REQUEST, MAX_SOURCE_SYSTEM_LENGTH, MAX_UNKNOWN_DROP_RECORDS_IN_ERROR, MacroRegion, McpFeatureRequestCategory, McpToolErrorCode, MobileUiLoadOptions, ModalButtonActions, ModalButtonConfig, NORMALIZE_PHONE_NUMBER, OPAExplainMode, OneTrustApprover, OneTrustAssessment, OneTrustAssessmentCreatedBy, OneTrustAssessmentCsvHeader, OneTrustAssessmentCsvRecord, OneTrustAssessmentNestedQuestion, OneTrustAssessmentQuestion, OneTrustAssessmentQuestionOption, OneTrustAssessmentQuestionResponses, OneTrustAssessmentQuestionRisk, OneTrustAssessmentResponses, OneTrustAssessmentSection, OneTrustAssessmentSectionHeader, OneTrustAssessmentSectionHeaderRiskStatistics, OneTrustAssessmentSectionSubmittedBy, OneTrustAssessmentStatus, OneTrustEnrichedAssessment, OneTrustEnrichedAssessmentQuestion, OneTrustEnrichedAssessmentResponse, OneTrustEnrichedAssessmentSection, OneTrustEnrichedAssessments, OneTrustEnrichedRisk, OneTrustEnrichedRisks, OneTrustEnrichedUser, OneTrustGetAssessmentResponse, OneTrustGetListOfAssessmentsResponse, OneTrustGetRiskResponse, OneTrustGetUserResponse, OneTrustPrimaryEntityDetails, OneTrustQuestionComment, OneTrustQuestionComments, OneTrustRiskCategories, OneTrustRiskReference, OneTrustRiskReferences, OneTrustRiskTemplate, OneTrustUserDetails, OneTrustUserEmail, OneTrustUserEmails, OneTrustUserGroup, OneTrustUserMetadata, OptionalConfigurableColorPaletteColor, OrderDirection, PERMISSIONS_POLICY_INPUT_EXAMPLE, PERMISSIONS_POLICY_INPUT_SCHEMA_ID, PROMPT_FILE_PURPOSE_TO_OPEN_AI, PaddedContentLayout, PermissionsPolicyInput, PermissionsPolicyPreferenceEntry, PolicyType, Preference, PreferenceQueryResponseItem, PreferenceStoreAuthLevel, PreferenceStoreConsentFields, PreferenceStoreIdentifier, PreferenceStoreKeyConditionals, PreferenceStorePurposeResponse, PreferenceStorePurposeUpdate, PreferenceStoreSystemAttributes, PreferenceStoreWorkflowSettings, PreferenceTopicType, PreferenceUpdateItem, PrefixModuleCatalog, PrefixModuleCatalogCodec, PrefixModuleConfig, PreflightRequestStatus, PrivacyCenterAccessTokenFormat, PrivacyCenterAssetName, PrivacyCenterComponentStyles, PrivacyCenterConfigurableColorPalette, PrivacyCenterFont, PrivacyCenterFontBasic, PrivacyCenterFooterLayout, PrivacyCenterTextStyles, PrivacyCenterThemePartial, ProcessingActivityAttribute, ProcessingActivityAttributeSyncColumn, ProcessingPurpose, ProcessingPurposeSubCategoryAttribute, ProcessingPurposeSubCategoryAttributeSyncColumn, PromptAVendorEmailCompletionLinkType, PromptAVendorEmailSendType, PromptFilePurpose, PromptResponseFormat, PromptRunProductArea, PromptStatus, QueueStatus, REQUEST_ACTION_OPT_IN_TO_OPT_OUT, REQUEST_ACTION_OPT_OUT_TO_OPT_IN, REQUEST_SUBMISSION_LIMIT, RegimeKey, RegionDetectionMethod, RegionsOperator, RequestAction, RequestActionObjectResolver, RequestActionOptIn, RequestActionOptOut, RequestDataSiloStatus, RequestEnricherStatus, RequestOrigin, RequestStatus, RequiredConfigurableColorPaletteColor, RestartIdentifierStrategy, RetentionScheduleOperation, RetentionScheduleType, RetentionType, RgbHexString, RgbaHexString, SQLDriverWithDataMapping, ScopeName, ScopeType, SecondLayerConfig, SecondLayerTheme, SecondLayerThemeMinimal, SemicolonDelimitedRegimeKeyString, ShadowRootOptions, SharedTopLevelConfig, SharedTopLevelTheme, SignedIabAgreementOption, SombraStandardScope, SourceSystemLabel, StaticTeamType, SubDataPointAttribute, SubDataPointAttributeSyncColumn, SubDataPointDataSubCategoryGuessStatus, TRANSCEND_SCOPES, TableEncryptionType, TelemetryPartitionStrategy, TemplateVariableModelName, Text, ThemeConfiguration, ThemeConfigurationBannerIntoModal, ThemeConfigurationBannerIntoModalMinimal, ThemeConfigurationBannerOnly, ThemeConfigurationBannerOnlyMinimal, ThemeConfigurationMinimal, ThemeConfigurationModalOnly, ThemeConfigurationModalOnlyMinimal, ThemeKey, ToggleTheme, TranscendProduct, TriageAction, UIConfiguration, UIConfigurationBannerIntoModal, UIConfigurationBannerOnly, UIConfigurationModalOnly, URLHostString, UiVariantStatus, UnknownRequestPolicy, UnstructuredSubDataPointRecommendationStatus, UserOrderField, UspapiOption, VariantKey, VendorAttribute, VendorAttributeSyncColumn, VerticalAlign, WorkflowConfigType, WorkflowConfigVisibility, buildPermissionsPolicyInputJsonSchema, getRegistryLink, parseDocsGuideType, parsePrefixModuleConfigFromJson };
33169
+ export { AbsoluteUrlString, ActionItemCode, ActionItemPriorityOverride, AirgapBundleAnalyticsBinInterval, AirgapBundleAnalyticsDimension, AirgapBundleAnalyticsMetric, AssessmentFormRawOrderField, AssessmentFormStatus, AssessmentFormTemplateSource, AssessmentFormTemplateStatus, AssessmentQuestionSubType, AssessmentQuestionType, AssessmentSyncColumn, AssessmentSyncModel, AssessmentsDisplayLogicAction, AttributeKeyType, AttributeSupportedResourceType, AutofocusToggle, AutofocusValues, BackendSyncOption, Background, Border, Breakpoint, BreakpointType, BrowserTimeZone, BusinessEntityAttribute, BusinessEntityAttributeSyncColumn, ButtonAction, ButtonConfig, ButtonTheme, ButtonThemeIndex, ButtonType, CODE_PACKAGE_TYPE_TO_LINK, COUNTRIES, COUNTRY_LOOKUP, ChatCompletionMessage, ChatCompletionRole, CloseButtonTheme, CodePackageType, CollectDataSubjectRegions, CommonLayerConfig, CommonLayerTheme, CommonLayerThemeMinimal, CommunicationIdentifierType, ComparisonOperator, CompletedRequestStatus, ConfidenceLabel, ConfigurableColorPaletteColor, ConsentBundleType, ConsentManageExperienceInput, ConsentManagerAnalyticsDataSource, ConsentManagerInput, ConsentManagerMetricBin, ConsentManagerPrefixModuleInput, ConsentPrecedenceOption, ConsentThemeInput, ConsentTrackerSource, ConsentTrackerStatus, ConsentTrackerType, ConsentUiUserFlow, ConsentVariantInput, ContainerTheme, ContentFlows, ContentLayout, Controllership, CookieOrderField, CspOption, CssUnitString, CustomEnricherType, CustomFieldApiInput, CustomFunctionLifecycleState, CustomFunctionPayloadType, CustomFunctionType, CustomFunctionVersionLifecycleState, CustomizableComponent, CustomizableText, DEFAULT_MACROREGIONS_MAP, DOMElementId, DROP_RECORD_ID_MAX_LENGTH, DSR_BULK_ERROR_MESSAGE, DSR_BULK_SUBMISSION_REJECTED_MESSAGE, DSR_ERROR_MESSAGE, DataCategoryType, DataFlowOrderField, DataFlowScope, DataFlowType, DataProtectionImpactAssessmentStatus, DataSiloAttribute, DataSiloAttributeSyncColumn, DataSubCategoryAttribute, DataSubCategoryAttributeSyncColumn, DataSubjectClass, DatabaseDriver, DatabaseIntegration, DatabaseSqlVariablesForPrivacyRequest, DatabaseVariables, DecryptionStatus, DefaultConsentOption, DefaultDataSubCategoryType, DefaultPurposeSubCategoryType, DescriptionTextTheme, DocsAccess, DocsGraphqlKind, DocsGuideType, DocsListRouteMatch, DocsLookupMatch, DocsLookupSource, DocsPersona, DocsProduct, DocsUseCase, DropListType, DsrBulkErrorCode, DsrErrorCode, DsrRequestOutcome, EXCEPTIONAL_RESERVATIONS, EXCEPTIONAL_RESERVATION_LOOKUP, EnricherType, FirstLayerConfig, FirstLayerTheme, FirstLayerThemeMinimal, FooterConfig, FooterTheme, FormType, FullWidthContentLayout, HeaderTheme, HeaderThemeMinimal, HorizontalAlign, ISO_31661, ISO_31662, Icon, IdentifierType, InitEnricherType, IntegerString, InternalDataSiloObjectResolver, IsoCountryCode, IsoCountryCodeCodec, IsoCountrySubdivisionCode, IsoCountrySubdivisionCodeCodec, LargeLanguageModelClient, Link, LoadOptions, LocalSyncOption, LocaleCodec, LogicOperator, LogoPosition, MAX_DROP_RECORDS_PER_REQUEST, MAX_SOURCE_SYSTEM_LENGTH, MAX_UNKNOWN_DROP_RECORDS_IN_ERROR, MacroRegion, McpFeatureRequestCategory, McpToolErrorCode, MobileUiLoadOptions, ModalButtonActions, ModalButtonConfig, NORMALIZE_PHONE_NUMBER, OPAExplainMode, OneTrustApprover, OneTrustAssessment, OneTrustAssessmentCreatedBy, OneTrustAssessmentCsvHeader, OneTrustAssessmentCsvRecord, OneTrustAssessmentNestedQuestion, OneTrustAssessmentQuestion, OneTrustAssessmentQuestionOption, OneTrustAssessmentQuestionResponses, OneTrustAssessmentQuestionRisk, OneTrustAssessmentResponses, OneTrustAssessmentSection, OneTrustAssessmentSectionHeader, OneTrustAssessmentSectionHeaderRiskStatistics, OneTrustAssessmentSectionSubmittedBy, OneTrustAssessmentStatus, OneTrustEnrichedAssessment, OneTrustEnrichedAssessmentQuestion, OneTrustEnrichedAssessmentResponse, OneTrustEnrichedAssessmentSection, OneTrustEnrichedAssessments, OneTrustEnrichedRisk, OneTrustEnrichedRisks, OneTrustEnrichedUser, OneTrustGetAssessmentResponse, OneTrustGetListOfAssessmentsResponse, OneTrustGetRiskResponse, OneTrustGetUserResponse, OneTrustPrimaryEntityDetails, OneTrustQuestionComment, OneTrustQuestionComments, OneTrustRiskCategories, OneTrustRiskReference, OneTrustRiskReferences, OneTrustRiskTemplate, OneTrustUserDetails, OneTrustUserEmail, OneTrustUserEmails, OneTrustUserGroup, OneTrustUserMetadata, OptionalConfigurableColorPaletteColor, OrderDirection, PERMISSIONS_POLICY_INPUT_EXAMPLE, PERMISSIONS_POLICY_INPUT_SCHEMA_ID, PROMPT_FILE_PURPOSE_TO_OPEN_AI, PaddedContentLayout, PermissionsPolicyInput, PermissionsPolicyPreferenceEntry, PolicyType, Preference, PreferenceQueryResponseItem, PreferenceStoreAuthLevel, PreferenceStoreConsentFields, PreferenceStoreIdentifier, PreferenceStoreKeyConditionals, PreferenceStorePurposeResponse, PreferenceStorePurposeUpdate, PreferenceStoreSystemAttributes, PreferenceStoreWorkflowSettings, PreferenceTopicType, PreferenceUpdateItem, PrefixModuleCatalog, PrefixModuleCatalogCodec, PrefixModuleConfig, PreflightRequestStatus, PrivacyCenterAccessTokenFormat, PrivacyCenterAssetName, PrivacyCenterComponentStyles, PrivacyCenterConfigurableColorPalette, PrivacyCenterFont, PrivacyCenterFontBasic, PrivacyCenterFooterLayout, PrivacyCenterTextStyles, PrivacyCenterThemePartial, ProcessingActivityAttribute, ProcessingActivityAttributeSyncColumn, ProcessingPurpose, ProcessingPurposeSubCategoryAttribute, ProcessingPurposeSubCategoryAttributeSyncColumn, PromptAVendorEmailCompletionLinkType, PromptAVendorEmailSendType, PromptFilePurpose, PromptResponseFormat, PromptRunProductArea, PromptStatus, QueueStatus, REQUEST_ACTION_OPT_IN_TO_OPT_OUT, REQUEST_ACTION_OPT_OUT_TO_OPT_IN, REQUEST_SUBMISSION_LIMIT, RegimeKey, RegionDetectionMethod, RegionInput, RegionsOperator, RequestAction, RequestActionObjectResolver, RequestActionOptIn, RequestActionOptOut, RequestDataSiloStatus, RequestEnricherStatus, RequestOrigin, RequestStatus, RequiredConfigurableColorPaletteColor, RestartIdentifierStrategy, RetentionScheduleOperation, RetentionScheduleType, RetentionType, RgbHexString, RgbaHexString, SQLDriverWithDataMapping, ScopeName, ScopeType, SecondLayerConfig, SecondLayerTheme, SecondLayerThemeMinimal, SemicolonDelimitedRegimeKeyString, ShadowRootOptions, SharedTopLevelConfig, SharedTopLevelTheme, SignedIabAgreementOption, SombraStandardScope, SourceSystemLabel, StaticTeamType, SubDataPointAttribute, SubDataPointAttributeSyncColumn, SubDataPointDataSubCategoryGuessStatus, TRANSCEND_SCOPES, TableEncryptionType, TelemetryPartitionStrategy, TemplateVariableModelName, Text, ThemeConfiguration, ThemeConfigurationBannerIntoModal, ThemeConfigurationBannerIntoModalMinimal, ThemeConfigurationBannerOnly, ThemeConfigurationBannerOnlyMinimal, ThemeConfigurationMinimal, ThemeConfigurationModalOnly, ThemeConfigurationModalOnlyMinimal, ThemeKey, ToggleTheme, TranscendProduct, TriageAction, UIConfiguration, UIConfigurationBannerIntoModal, UIConfigurationBannerOnly, UIConfigurationModalOnly, URLHostString, UiVariantStatus, UnknownRequestPolicy, UnstructuredSubDataPointRecommendationStatus, UserOrderField, UspapiOption, VariantKey, VendorAttribute, VendorAttributeSyncColumn, VerticalAlign, WebhookHeader, WorkflowConfigType, WorkflowConfigVisibility, buildPermissionsPolicyInputJsonSchema, getRegistryLink, parseDocsGuideType, parsePrefixModuleConfigFromJson };
33036
33170
 
33037
33171
  //# sourceMappingURL=index.mjs.map