@transcend-io/privacy-types 7.2.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";
@@ -309,6 +312,14 @@ const RequestAction = {
309
312
  //#endregion
310
313
  //#region src/assessmentForm.ts
311
314
  /**
315
+ * Fields by which assessment forms can be ordered.
316
+ */
317
+ const AssessmentFormRawOrderField = {
318
+ StatusRank: "statusRank",
319
+ SubmittedAt: "submittedAt",
320
+ Title: "title"
321
+ };
322
+ /**
312
323
  * AssessmentForm status types
313
324
  */
314
325
  let AssessmentFormStatus = /* @__PURE__ */ function(AssessmentFormStatus) {
@@ -1742,1401 +1753,264 @@ const ConsentThemeInput = t.type({
1742
1753
  configuration: t.string
1743
1754
  });
1744
1755
  //#endregion
1745
- //#region src/consentUiConfiguration.ts
1746
- /** Actions for buttons in modals */
1747
- const ModalButtonActions = {
1748
- SaveAndClose: "SaveAndClose",
1749
- AcceptAllAndClose: "AcceptAllAndClose",
1750
- RejectAllAndClose: "RejectAllAndClose"
1751
- };
1752
- /** All action types for buttons */
1753
- const ButtonAction = {
1754
- ...ModalButtonActions,
1755
- 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"
1756
2007
  };
1757
- /** Button Type */
1758
- const ButtonType = {
1759
- Default: "default",
1760
- Link: "link"
1761
- };
1762
- /** Absolute URL string */
1763
- const AbsoluteUrlString = t.string;
1764
- /** URL host string */
1765
- const URLHostString = t.string;
1766
- /** Top-level configuration shared between the UI layers */
1767
- const SharedTopLevelConfig = t.type({
1768
- /** Supported locales */
1769
- locales: t.array(LocaleCodec),
1770
- /** The transcend URL where the transcend logo links to */
1771
- transcendUrl: AbsoluteUrlString,
1772
- /** The default locale to use - must be one of the supported locales */
1773
- defaultLocale: LocaleCodec
1774
- });
1775
- /** Button configuration */
1776
- const ButtonConfig = t.type({
1777
- type: valuesOf(ButtonType),
1778
- action: valuesOf(ButtonAction)
1779
- });
1780
- /** Configuration for buttons in modals */
1781
- const ModalButtonConfig = t.type({
1782
- type: valuesOf(ButtonType),
1783
- action: valuesOf(ModalButtonActions)
1784
- });
1785
- /** Footer configuration */
1786
- const FooterConfig = t.type({
1787
- showTranscendBadge: t.boolean,
1788
- showGpcDetected: t.boolean,
1789
- showLocalePicker: t.boolean
1790
- });
1791
- /** Common configuration for both first and second layers */
1792
- const CommonLayerConfig = t.intersection([t.type({ showCloseButton: t.boolean }), t.partial({
1793
- logoImageUrl: AbsoluteUrlString,
1794
- alphaMask: t.boolean,
1795
- footer: FooterConfig,
1796
- links: t.array(AbsoluteUrlString)
1797
- })]);
1798
- /** First layer configuration: Banner */
1799
- const FirstLayerConfig = t.intersection([
1800
- CommonLayerConfig,
1801
- t.type({ buttons: t.tuple([
1802
- ButtonConfig,
1803
- t.union([ButtonConfig, t.undefined]),
1804
- t.union([ButtonConfig, t.undefined])
1805
- ]) }),
1806
- t.partial({ showHeader: t.boolean })
1807
- ]);
1808
- /** Second layer configuration: Modal */
1809
- const SecondLayerConfig = t.intersection([CommonLayerConfig, t.type({
1810
- buttons: t.tuple([
1811
- ModalButtonConfig,
1812
- t.union([ModalButtonConfig, t.undefined]),
1813
- t.union([ModalButtonConfig, t.undefined])
1814
- ]),
1815
- showBulkActions: t.boolean,
1816
- closeAfterBulkAction: t.boolean,
1817
- showPurposeDescriptions: t.boolean,
1818
- showCookiesLink: t.literal(false),
1819
- showVendorsLink: t.literal(false),
1820
- showToggleText: t.boolean,
1821
- showToggleIcon: t.boolean
1822
- })]);
1823
- /** --- Top-level UI Configuration --- */
1824
- /** Banner only configuration */
1825
- const UIConfigurationBannerOnly = t.intersection([SharedTopLevelConfig, t.type({ firstLayerConfig: FirstLayerConfig })]);
1826
- /** Modal only configuration */
1827
- const UIConfigurationModalOnly = t.intersection([SharedTopLevelConfig, t.type({ secondLayerConfig: SecondLayerConfig })]);
1828
- /** Banner into modal configuration */
1829
- const UIConfigurationBannerIntoModal = t.intersection([SharedTopLevelConfig, t.type({
1830
- firstLayerConfig: FirstLayerConfig,
1831
- secondLayerConfig: SecondLayerConfig
1832
- })]);
1833
- /** Configuration of the entire consent UI */
1834
- const UIConfiguration = t.union([
1835
- UIConfigurationBannerOnly,
1836
- UIConfigurationModalOnly,
1837
- UIConfigurationBannerIntoModal
1838
- ]);
1839
- //#endregion
1840
- //#region src/consentUiTheme.ts
1841
- /**
1842
- * Types representing the consent UI theme configuration
1843
- * Includes keys for alignment, logo position, content flow, colors, and more
1844
- */
1845
- /**
1846
- * Vertical alignment options for the consent UI content
1847
- */
1848
- const VerticalAlign = {
1849
- /** Aligns the UI content at the top */
1850
- Top: "top",
1851
- /** Aligns the UI content at the bottom */
1852
- Bottom: "bottom",
1853
- /** Aligns the UI content in the center */
1854
- Center: "center"
1855
- };
1856
- /**
1857
- * Horizontal alignment options for the consent UI content
1858
- */
1859
- const HorizontalAlign = {
1860
- /** Aligns the UI content on the left */
1861
- Left: "left",
1862
- /** Aligns the UI content in the center */
1863
- Center: "center",
1864
- /** Aligns the UI content on the right */
1865
- Right: "right"
1866
- };
1867
- /**
1868
- * Position options for the logo in the consent UI
1869
- */
1870
- const LogoPosition = {
1871
- /** Logo is positioned above the content */
1872
- Above: "above",
1873
- /** Logo is positioned to the left of the content */
1874
- Left: "left"
1875
- };
1876
- /**
1877
- * Defines how content can flow in a layout
1878
- */
1879
- const ContentFlows = {
1880
- /** Items are stacked vertically, top to bottom */
1881
- Vertical: "vertical",
1882
- /** Items are stacked horizontally, often wrapping if space runs out */
1883
- HorizontalStacked: "horizontalStacked",
1884
- /** Items are laid out horizontally, in a single row */
1885
- HorizontalFlat: "horizontalFlat"
1886
- };
1887
- /**
1888
- * Units available for responsive breakpoints.
1889
- */
1890
- const BreakpointType = {
1891
- /** Breakpoint defined in pixels */
1892
- Px: "px",
1893
- /** Breakpoint defined as a percentage */
1894
- Percent: "percent"
1895
- };
1896
- /** String that represents a CSS unit eg. px, em, etc. */
1897
- const CssUnitString = t.string;
1898
- /**
1899
- * String that represents an RGBA hex color (8-digit hex with alpha channel),
1900
- * e.g. "#FFFFFFFF" (opaque white) or "#FF000080" (semi-transparent red).
1901
- */
1902
- const RgbaHexString = t.string;
1903
- /**
1904
- * String that represents an RGB hex color (6-digit hex without alpha channel),
1905
- * e.g. "#FFFFFF" (white) or "#000000" (black).
1906
- */
1907
- const RgbHexString = t.string;
1908
- /** Index of a button's theme */
1909
- const ButtonThemeIndex = t.number;
1910
- /** Represents background color configuration */
1911
- const Background = t.type({
1912
- /** Background color as an RGBA hex string */
1913
- backgroundColor: RgbaHexString });
1914
- /**
1915
- * Represents border configuration
1916
- */
1917
- const Border = t.type({
1918
- borderRadius: CssUnitString,
1919
- borderColor: RgbHexString
1920
- });
1921
- /**
1922
- * Represents text configuration
1923
- */
1924
- const Text = t.type({ textColor: RgbHexString });
1925
- /**
1926
- * Represents link configuration
1927
- */
1928
- const Link = t.type({
1929
- linkColor: RgbHexString,
1930
- linkUnderline: t.boolean
1931
- });
1932
- /**
1933
- * Represents icon configuration
1934
- */
1935
- const Icon = t.type({ iconColor: RgbHexString });
1936
- /** Represents a responsive breakpoint with value and unit */
1937
- const Breakpoint = t.type({
1938
- /** The numeric value of the breakpoint */
1939
- value: t.number,
1940
- /** The unit of the breakpoint (px or percent) */
1941
- unit: valuesOf(BreakpointType)
1942
- });
1943
- /**
1944
- * Represents a container theme with background and border configurations
1945
- */
1946
- const ContainerTheme = t.intersection([Background, Border]);
1947
- /** Represents the header theme configuration (reduced scope) */
1948
- const HeaderThemeMinimal = t.type({
1949
- logoPosition: valuesOf(LogoPosition),
1950
- logoImageUrl: AbsoluteUrlString
1951
- });
1952
- /** Represents the header theme configuration (full scope) */
1953
- const HeaderTheme = t.intersection([Text, t.type({ logoPosition: valuesOf(LogoPosition) })]);
1954
- /** Represents the configuration of the close button */
1955
- const CloseButtonTheme = t.intersection([
1956
- Background,
1957
- Border,
1958
- t.type({ iconColor: RgbHexString })
1959
- ]);
1960
- /** Represents the configuration of the description text */
1961
- const DescriptionTextTheme = t.intersection([Text, Link]);
1962
- /** Represents the configuration of the footer */
1963
- const FooterTheme = t.intersection([Background, t.type({ localePickerColor: RgbHexString })]);
1964
- /** Defines how content should be padded and sized at different breakpoints */
1965
- const PaddedContentLayout = t.type({
1966
- breakpoint: Breakpoint,
1967
- maxWidths: t.record(valuesOf(ContentFlows), CssUnitString)
1968
- });
1969
- /** Defines a layout that stretches content to full width */
1970
- const FullWidthContentLayout = t.type({ fullWidth: t.literal(true) });
1971
- /** Represents either a padded content layout or a full-width layout */
1972
- const ContentLayout = t.union([PaddedContentLayout, FullWidthContentLayout]);
1973
- /** Theme configuration for the toggle */
1974
- const ToggleTheme = t.intersection([
1975
- Text,
1976
- Icon,
1977
- t.type({
1978
- enabledColor: RgbHexString,
1979
- disabledColor: RgbHexString,
1980
- knobColor: RgbHexString
1981
- })
1982
- ]);
1983
- /** Theme configuration shared between both First (banner) and Second Layers (modal) (reduced scope) */
1984
- const CommonLayerThemeMinimal = t.intersection([t.type({ alwaysShowScrollbar: t.boolean }), t.partial({ header: HeaderThemeMinimal })]);
1985
- /** Theme configuration shared between both First (banner) and Second Layers (modal) (full scope) */
1986
- const CommonLayerTheme = t.intersection([t.type({
1987
- buttons: t.tuple([
1988
- ButtonThemeIndex,
1989
- t.union([ButtonThemeIndex, t.undefined]),
1990
- t.union([ButtonThemeIndex, t.undefined])
1991
- ]),
1992
- container: ContainerTheme,
1993
- description: DescriptionTextTheme,
1994
- footer: FooterTheme,
1995
- alwaysShowScrollbar: t.boolean,
1996
- horizontalAlign: valuesOf(HorizontalAlign),
1997
- cookieAndPrivacyPolicy: t.partial(Link.props)
1998
- }), t.partial({
1999
- background: Background,
2000
- header: HeaderTheme,
2001
- closeButton: CloseButtonTheme
2002
- })]);
2003
- /** Theme configuration for the First Layer (banner) (reduced scope) */
2004
- const FirstLayerThemeMinimal = t.intersection([CommonLayerThemeMinimal, t.type({ contentLayout: ContentLayout })]);
2005
- /** Theme configuration for the First Layer (banner) (full scope) */
2006
- const FirstLayerTheme = t.intersection([
2007
- CommonLayerTheme,
2008
- t.type({
2009
- contentFlow: valuesOf(ContentFlows),
2010
- verticalAlign: valuesOf(VerticalAlign)
2011
- }),
2012
- t.partial({ contentLayout: ContentLayout })
2013
- ]);
2014
- /** Theme configuration for the Second Layer (modal) (reduced scope) */
2015
- const SecondLayerThemeMinimal = t.intersection([CommonLayerThemeMinimal, t.type({ lockToEdges: t.boolean })]);
2016
- /** Theme configuration for the Second Layer (modal) (full scope) */
2017
- const SecondLayerTheme = t.intersection([
2018
- CommonLayerTheme,
2019
- t.type({
2020
- modalTitle: Text,
2021
- modalSubtitle: Text,
2022
- purposeListTitle: Text,
2023
- caretIcon: Icon,
2024
- cardTitle: Text,
2025
- alwaysOnText: Text,
2026
- purposeDescription: DescriptionTextTheme,
2027
- purposeCard: ContainerTheme,
2028
- toggle: ToggleTheme,
2029
- lockToEdges: t.boolean,
2030
- maxWidth: CssUnitString
2031
- }),
2032
- t.partial({
2033
- bulkActionButtons: t.tuple([ButtonThemeIndex, ButtonThemeIndex]),
2034
- shrinkToFullWidth: CssUnitString
2035
- })
2036
- ]);
2037
- /** Represents a button theme which can be either a full button or a link style */
2038
- const ButtonTheme = t.union([t.intersection([
2039
- Background,
2040
- Border,
2041
- Text
2042
- ]), Link]);
2043
- /** Configuration shared between all themes types */
2044
- const SharedTopLevelTheme = t.type({ buttonThemes: t.array(ButtonTheme) });
2045
- /** Banner-only theme configuration (reduced scope) */
2046
- const ThemeConfigurationBannerOnlyMinimal = t.type({ firstLayer: FirstLayerThemeMinimal });
2047
- /** Banner-only theme configuration (full scope) */
2048
- const ThemeConfigurationBannerOnly = t.intersection([SharedTopLevelTheme, t.type({ firstLayer: FirstLayerTheme })]);
2049
- /** Modal-only theme configuration (reduced scope) */
2050
- const ThemeConfigurationModalOnlyMinimal = t.type({ secondLayer: SecondLayerThemeMinimal });
2051
- /** Modal-only theme configuration (full scope) */
2052
- const ThemeConfigurationModalOnly = t.intersection([SharedTopLevelTheme, t.type({ secondLayer: SecondLayerTheme })]);
2053
- /** Banner into modal theme configuration (reduced scope) */
2054
- const ThemeConfigurationBannerIntoModalMinimal = t.type({
2055
- firstLayer: FirstLayerThemeMinimal,
2056
- secondLayer: SecondLayerThemeMinimal
2057
- });
2058
- /** Banner into modal theme configuration (full scope) */
2059
- const ThemeConfigurationBannerIntoModal = t.intersection([SharedTopLevelTheme, t.type({
2060
- firstLayer: FirstLayerTheme,
2061
- secondLayer: SecondLayerTheme
2062
- })]);
2063
- /** Union of all reduced-scope theme configurations */
2064
- const ThemeConfigurationMinimal = t.union([
2065
- ThemeConfigurationBannerOnlyMinimal,
2066
- ThemeConfigurationModalOnlyMinimal,
2067
- ThemeConfigurationBannerIntoModalMinimal
2068
- ]);
2069
- /** Union of all full-scope theme configurations */
2070
- const ThemeConfiguration = t.union([
2071
- ThemeConfigurationBannerOnly,
2072
- ThemeConfigurationModalOnly,
2073
- ThemeConfigurationBannerIntoModal
2074
- ]);
2075
- //#endregion
2076
- //#region src/consentUi.ts
2077
- /**
2078
- * Types representing the top-level consent UI configuration
2079
- * Includes keys for regimes, variants, and themes
2080
- */
2081
- /** Key representing a specific regime */
2082
- const RegimeKey = t.string;
2083
- /** Key representing a specific consent UI variant */
2084
- const VariantKey = t.string;
2085
- /** Key representing a specific theme */
2086
- const ThemeKey = t.string;
2087
- /** String that represents an integer value */
2088
- const IntegerString = t.string;
2089
- /** String that represents a DOM element ID */
2090
- const DOMElementId = t.string;
2091
- /** String that represents a semicolon-delimited list of regime keys */
2092
- const SemicolonDelimitedRegimeKeyString = t.string;
2093
- /**
2094
- * Autofocus toggle values ("on" / "off").
2095
- */
2096
- const AutofocusToggle = {
2097
- /** Enable autofocus */
2098
- On: "on",
2099
- /** Disable autofocus */
2100
- Off: "off"
2101
- };
2102
- /**
2103
- * All valid autofocus values:
2104
- * - `"on"` / `"off"`
2105
- * - or a DOM element ID string
2106
- */
2107
- const AutofocusValues = t.union([valuesOf(AutofocusToggle), DOMElementId]);
2108
- /**
2109
- * Shadow root options ("open" / "closed" / "none").
2110
- */
2111
- const ShadowRootOptions = {
2112
- /** Enable shadow root */
2113
- Open: "open",
2114
- /** Disable shadow root */
2115
- Closed: "closed",
2116
- /** Disable shadow root */
2117
- None: "none"
2118
- };
2119
- /** Shared load option fields excluding themeConfigMap */
2120
- const SharedLoadOptions = t.intersection([t.type({
2121
- regimeVariantMap: t.record(RegimeKey, VariantKey),
2122
- regimeAutoPromptMap: t.record(RegimeKey, t.boolean),
2123
- variantConfigMap: t.record(VariantKey, UIConfiguration),
2124
- variantThemeMap: t.record(VariantKey, ThemeKey),
2125
- autofocus: AutofocusValues,
2126
- uiZIndex: IntegerString,
2127
- messageFolder: AbsoluteUrlString,
2128
- regimePrecedence: SemicolonDelimitedRegimeKeyString,
2129
- uiShadowRoot: valuesOf(ShadowRootOptions)
2130
- }), t.partial({
2131
- css: AbsoluteUrlString,
2132
- messageMap: t.record(LocaleCodec, AbsoluteUrlString),
2133
- forceTheme: ThemeKey,
2134
- cssFolder: AbsoluteUrlString,
2135
- hostThemeMap: t.record(URLHostString, ThemeKey),
2136
- customCssUrlMap: t.record(ThemeKey, AbsoluteUrlString),
2137
- fontUrlMap: t.record(ThemeKey, AbsoluteUrlString),
2138
- overrideLocale: t.string,
2139
- deploymentId: t.string
2140
- })]);
2141
- /** The top-level configuration for the consent UI (minimal theme configs) */
2142
- const LoadOptions = t.intersection([
2143
- SharedLoadOptions,
2144
- t.type({ themeConfigMap: t.record(ThemeKey, ThemeConfigurationMinimal) }),
2145
- t.partial({ viewportHeightOverride: t.string })
2146
- ]);
2147
- /** The top-level configuration for the mobile consent UI (full theme configs) */
2148
- const MobileUiLoadOptions = t.intersection([SharedLoadOptions, t.type({ themeConfigMap: t.record(ThemeKey, ThemeConfiguration) })]);
2149
- //#endregion
2150
- //#region src/customFunction.ts
2151
- /**
2152
- * The product-facing type of a custom function.
2153
- */
2154
- const CustomFunctionType = {
2155
- /** DSR pre-flight enricher and datapoint resolver */
2156
- Dsr: "DSR",
2157
- /** General purpose code execution */
2158
- General: "GENERAL"
2159
- };
2160
- /**
2161
- * The lifecycle state of a custom function.
2162
- *
2163
- * Staging removed `INACTIVE` from this enum (version-level `INACTIVE` is unchanged).
2164
- * A function that only has a draft is still `ACTIVE` until archived.
2165
- */
2166
- const CustomFunctionLifecycleState = {
2167
- /** The function is available (may or may not have an active version yet) */
2168
- Active: "ACTIVE",
2169
- /** The function is archived */
2170
- Archived: "ARCHIVED"
2171
- };
2172
- /**
2173
- * The lifecycle state of a custom function version.
2174
- */
2175
- const CustomFunctionVersionLifecycleState = {
2176
- /** The version is the function's active version */
2177
- Active: "ACTIVE",
2178
- /** The version is a draft pending promotion */
2179
- Draft: "DRAFT",
2180
- /** The version was superseded by a newer version */
2181
- Inactive: "INACTIVE"
2182
- };
2183
- /**
2184
- * The payload types a custom function can be invoked with, selecting which
2185
- * export the runtime executes.
2186
- */
2187
- const CustomFunctionPayloadType = {
2188
- /** DSR datapoint resolver — invokes the `default` export */
2189
- DataPoint: "DATA_POINT",
2190
- /** DSR pre-flight request enricher — invokes the `enricher` export */
2191
- RequestEnricher: "REQUEST_ENRICHER",
2192
- /** General purpose (Maestro) custom function */
2193
- Maestro: "MAESTRO"
2194
- };
2195
- //#endregion
2196
- //#region src/database.ts
2197
- /**
2198
- * The database integrations
2199
- */
2200
- const DatabaseIntegration = {
2201
- postgresql: "postgresql",
2202
- redshift: "amazonredshift",
2203
- snowflake: "snowflake",
2204
- mysql: "mysql",
2205
- bigquery: "bigquery",
2206
- microsoftsql: "microsoftsql",
2207
- maria: "maria",
2208
- mongodb: "mongodb",
2209
- amazondynamodb: "amazondynamodb",
2210
- amazons3: "amazons3",
2211
- databrickslakehouse: "databrickslakehouse",
2212
- ibmdb2: "ibmdb2",
2213
- oracle: "oracle",
2214
- quickbase: "quickbase",
2215
- redis: "redis",
2216
- treasuredata: "treasuredata",
2217
- saps4hana: "saps4hana",
2218
- googlebigtable: "googlebigtable",
2219
- azuresynapse: "azuresynapse",
2220
- azurecosmosdbnosql: "azurecosmosdbnosql",
2221
- trino: "trino"
2222
- };
2223
- /**
2224
- * The possible drivers for a database integration
2225
- */
2226
- const SQLDriverWithDataMapping = {
2227
- [DatabaseIntegration.redshift]: "Amazon Redshift",
2228
- [DatabaseIntegration.postgresql]: "PostgreSQL Unicode",
2229
- [DatabaseIntegration.snowflake]: "SnowflakeDSIIDriver",
2230
- [DatabaseIntegration.mysql]: "MySQL",
2231
- [DatabaseIntegration.bigquery]: "Google BigQuery",
2232
- [DatabaseIntegration.microsoftsql]: "Microsoft SQL",
2233
- [DatabaseIntegration.maria]: "MariaDB",
2234
- [DatabaseIntegration.databrickslakehouse]: "Databricks Lakehouse",
2235
- [DatabaseIntegration.ibmdb2]: "IBM DB2",
2236
- [DatabaseIntegration.oracle]: "Oracle DB",
2237
- [DatabaseIntegration.azuresynapse]: "Azure Synapse",
2238
- [DatabaseIntegration.trino]: "Trino"
2239
- };
2240
- /**
2241
- * All possible drivers for a database integration, regardless
2242
- * or not they support data mapping
2243
- */
2244
- const DatabaseDriver = {
2245
- ...SQLDriverWithDataMapping,
2246
- [DatabaseIntegration.mongodb]: "MongoDB",
2247
- [DatabaseIntegration.amazondynamodb]: "AmazonDynamoDB",
2248
- [DatabaseIntegration.amazons3]: "AmazonS3",
2249
- [DatabaseIntegration.databrickslakehouse]: "Databricks Lakehouse",
2250
- [DatabaseIntegration.quickbase]: "Quickbase",
2251
- [DatabaseIntegration.redis]: "Redis",
2252
- [DatabaseIntegration.treasuredata]: "TreasureData",
2253
- [DatabaseIntegration.saps4hana]: "SapS4Hana",
2254
- [DatabaseIntegration.googlebigtable]: "Google Bigtable",
2255
- [DatabaseIntegration.azurecosmosdbnosql]: "Azure Cosmos DB NoSQL"
2256
- };
2257
- //#endregion
2258
- //#region src/dataSubjectClass.ts
2259
- /**
2260
- * Immutable class for a data subject type (GraphQL {@link DataSubjectClass}).
2261
- */
2262
- const DataSubjectClass = {
2263
- /** Consumer or end-user data subject */
2264
- EndUser: "END_USER",
2265
- /** Employee data subject */
2266
- Employee: "EMPLOYEE",
2267
- /** Business contact data subject */
2268
- BusinessContact: "BUSINESS_CONTACT",
2269
- /** Other / uncategorized data subject */
2270
- Other: "OTHER"
2271
- };
2272
- //#endregion
2273
- //#region src/datapoint.ts
2274
- const ConfidenceLabel = {
2275
- High: "HIGH",
2276
- Medium: "MEDIUM",
2277
- Low: "LOW"
2278
- };
2279
- /** The approval status of the category guess for a subdatapoint */
2280
- const SubDataPointDataSubCategoryGuessStatus = {
2281
- /** The guess has been approved as valid */
2282
- Approved: "APPROVED",
2283
- /** The guess is pending review */
2284
- Pending: "PENDING",
2285
- /** The guess has been marked as wrong */
2286
- Rejected: "REJECTED"
2287
- };
2288
- const UnstructuredSubDataPointRecommendationStatus = {
2289
- /** The category was manually applied */
2290
- ManuallyAdded: "MANUALLY_ADDED",
2291
- /** The recommendation has been corrected */
2292
- Corrected: "CORRECTED",
2293
- /** The recommendation has been approved as valid */
2294
- Validated: "VALIDATED",
2295
- /** The recommendation is has been made but not validated */
2296
- Classified: "CLASSIFIED",
2297
- /** The recommendation has been marked as wrong */
2298
- Rejected: "REJECTED"
2299
- };
2300
- /**
2301
- * Encryption types for database table
2302
- */
2303
- const TableEncryptionType = {
2304
- Unencrypted: "UNENCRYPTED",
2305
- EncryptedApplicationSide: "ENCRYPTED_APPLICATION_SIDE",
2306
- EncryptedByDataAtRest: "ENCRYPTED_DATA_AT_REST"
2307
- };
2308
- const Controllership = {
2309
- /** The current organization is a controller of the data */
2310
- Controller: "CONTROLLER",
2311
- /** The current organization is a processor of the data */
2312
- Processor: "PROCESSOR",
2313
- /** The current organization is a joint controller of the data */
2314
- JointController: "JOINT_CONTROLLER"
2315
- };
2316
- /** The type of retention schedule for personal data */
2317
- const RetentionType = {
2318
- /** Collected user information is deleted, anonymized or aggregated after a specific time period */
2319
- StatedPeriod: "STATED_PERIOD",
2320
- /** Data is deleted, anonymized, or aggregated at some point, but no specific retention period is stated */
2321
- Limited: "LIMITED",
2322
- /** Collected user information is retained indefinitely */
2323
- Indefinite: "INDEFINITE",
2324
- /** A specific retention type not covered above */
2325
- Other: "OTHER",
2326
- /** Retention period is not stated or unclear */
2327
- Unspecified: "UNSPECIFIED"
2328
- };
2329
- //#endregion
2330
- //#region src/docs.ts
2331
- /** Allowed `guideType` frontmatter values on docs.transcend.io pages. */
2332
- const DocsGuideType = {
2333
- OverviewsAndConcepts: "Overviews & Concepts",
2334
- UseCaseGuides: "Use Case Guides",
2335
- DeveloperDocs: "Developer Docs",
2336
- IntegrationGuides: "Integration Guides",
2337
- Troubleshooting: "Troubleshooting"
2338
- };
2339
- /** Who reads a docs page. */
2340
- const DocsPersona = {
2341
- Compliance: "Compliance",
2342
- Development: "Development",
2343
- Operations: "Operations",
2344
- Legal: "Legal",
2345
- Security: "Security",
2346
- Marketing: "Marketing"
2347
- };
2348
- /** Customer goals a docs page serves. */
2349
- const DocsUseCase = {
2350
- PrivacyImpactAssessments: "Privacy Impact Assessments",
2351
- KnowYourData: "Know Your Data",
2352
- FullStackConsent: "Full Stack Consent",
2353
- LegacyMigrations: "Legacy Migrations",
2354
- DoNotSellOrShare: "Do Not Sell or Share",
2355
- DataMinimization: "Data Minimization",
2356
- InAppDeletion: "In-App Deletion"
2357
- };
2358
- /**
2359
- * Who may read a docs page.
2360
- * Omit `access` in frontmatter for signed-in only. Set `public` to opt in.
2361
- */
2362
- const DocsAccess = {
2363
- Public: "public",
2364
- SignedIn: "signedIn"
2365
- };
2366
- /** Lookup API content source filter. */
2367
- const DocsLookupSource = {
2368
- Guides: "guides",
2369
- ApiReference: "api-reference",
2370
- Graphql: "graphql",
2371
- Marketing: "marketing"
2372
- };
2373
- /** `matchedBy` value on docs lookup API rows. */
2374
- const DocsLookupMatch = {
2375
- Route: "route",
2376
- Integration: "integration",
2377
- Graphql: "graphql",
2378
- Product: "product",
2379
- Fulltext: "fulltext",
2380
- FulltextFallback: "fulltext-fallback"
2381
- };
2382
- /** `match` field on docs_list rows from route or product lookup. */
2383
- const DocsListRouteMatch = {
2384
- Primary: "primary",
2385
- Mention: "mention",
2386
- Product: "product",
2387
- Search: "search"
2388
- };
2389
- /** GraphQL schema artifact kind for docs lookup. */
2390
- const DocsGraphqlKind = {
2391
- Query: "query",
2392
- Mutation: "mutation",
2393
- Type: "type",
2394
- Input: "input",
2395
- Enum: "enum"
2396
- };
2397
- const docsGuideTypeTitles = new Set(Object.values(DocsGuideType));
2398
- /** Returns a known guide type title, or null when the index carries a newer label. */
2399
- function parseDocsGuideType(value) {
2400
- if (value == null || value === "") return null;
2401
- return docsGuideTypeTitles.has(value) ? value : null;
2402
- }
2403
- /**
2404
- * Product titles used in docs.transcend.io page frontmatter and dashboard-routes.json.
2405
- * `Platform` covers workspace routes.
2406
- */
2407
- const DocsProduct = {
2408
- Assessments: "Assessments",
2409
- Classification: "Classification",
2410
- ConsentManagement: "Consent Management",
2411
- DataInventory: "Data Inventory",
2412
- DsrAutomation: "DSR Automation",
2413
- Platform: "Platform",
2414
- PreferenceManagement: "Preference Management",
2415
- PrivacyCenter: "Privacy Center",
2416
- SystemDiscovery: "System Discovery",
2417
- WebAuditor: "Web Auditor"
2418
- };
2419
- //#endregion
2420
- //#region src/drop.ts
2421
- /** The six DROP list types as written on the wire. */
2422
- const DropListType = {
2423
- Email: "email",
2424
- Phone: "phone",
2425
- Maid: "maid",
2426
- Ctv: "ctv",
2427
- Ndz: "ndz",
2428
- NameVin: "name_vin"
2429
- };
2430
- /**
2431
- * Longest `dropRecordId` accepted on DROP ingress payloads and persisted on
2432
- * `DropRunRequest`.
2433
- */
2434
- const DROP_RECORD_ID_MAX_LENGTH = 64;
2435
- //#endregion
2436
- //#region src/dsrBulkErrorCode.ts
2437
- /**
2438
- * Stable, machine-readable error codes for bulk submission failures that apply
2439
- * to the call as a whole rather than a single `input[]` item.
2440
- *
2441
- * Surfaced on `POST /v1/data-subject-request-bulk` when the payload or its
2442
- * preconditions are invalid before per-input processing completes.
2443
- */
2444
- const DsrBulkErrorCode = {
2445
- /** The bulk submission included no request inputs. */
2446
- NoInputsProvided: "NO_INPUTS_PROVIDED",
2447
- /** The bulk submission exceeds the maximum number of inputs. */
2448
- SubmissionLimitExceeded: "SUBMISSION_LIMIT_EXCEEDED",
2449
- /** The bulk submission mixed inputs with and without a pre-generated CEK context. */
2450
- MixedCekContext: "MIXED_CEK_CONTEXT",
2451
- /**
2452
- * The required Diffie-Hellman encrypted payload was missing. Whether `dhEncrypted`
2453
- * is required depends on the entire input set — it is required only when at least
2454
- * one input is missing a pre-generated `encryptedCEKContext`.
2455
- */
2456
- DhContextRequired: "DH_CONTEXT_REQUIRED",
2457
- /**
2458
- * A concurrent DROP submission won the `dropRunId` unique-index idempotency race
2459
- * during bulk create. The retry loop cannot determine which input lost, so no
2460
- * input index can be attributed.
2461
- */
2462
- ConcurrentSubmissionConflict: "CONCURRENT_SUBMISSION_CONFLICT",
2463
- /**
2464
- * The bulk submission's top-level `input` was not an array (malformed body
2465
- * before per-item processing).
2466
- */
2467
- InvalidBulkInput: "INVALID_BULK_INPUT"
2468
- };
2469
- //#endregion
2470
- //#region src/dsrErrorCode.ts
2471
- /**
2472
- * Stable, machine-readable error codes for a single bulk submission input
2473
- * (`POST /v1/data-subject-request-bulk` `input[]` item).
2474
- *
2475
- * Returned on one failed input so callers can branch without parsing the error
2476
- * message. Failures about the bulk call as a whole use {@link DsrBulkErrorCode}.
2477
- */
2478
- const DsrErrorCode = {
2479
- /** This request has an invalid or missing workflowConfigId. */
2480
- InvalidWorkflowConfigId: "INVALID_WORKFLOW_CONFIG_ID",
2481
- /** This request is missing a core identifier. */
2482
- MissingCoreIdentifier: "MISSING_CORE_IDENTIFIER",
2483
- /** A restart was requested for a request ID that does not exist. */
2484
- RestartRequestNotFound: "RESTART_REQUEST_NOT_FOUND",
2485
- /** A restart was requested for a request closed beyond the org's time limit. */
2486
- RestartTimeLimitExceeded: "RESTART_TIME_LIMIT_EXCEEDED",
2487
- /** The referenced receipt email template does not exist. */
2488
- ReceiptTemplateNotFound: "RECEIPT_TEMPLATE_NOT_FOUND",
2489
- /** DROP linkage identifiers on this request do not cover the required identifier types. */
2490
- DropIdentifierCoverageMismatch: "DROP_IDENTIFIER_COVERAGE_MISMATCH",
2491
- /** The same DROP record was claimed more than once on this request. */
2492
- DuplicateDropRecords: "DUPLICATE_DROP_RECORDS",
2493
- /** This request's DROP identifiers conflict with another input sharing a dropRunId idempotency key. */
2494
- InBatchDropIdempotencyKeyCollision: "IN_BATCH_DROP_IDEMPOTENCY_KEY_COLLISION",
2495
- /** This request's `dropRecords` was provided without a `dropRunId`. */
2496
- DropRecordsRequireDropRunId: "DROP_RECORDS_REQUIRE_DROP_RUN_ID",
2497
- /** This request exceeds the per-request DROP record link limit. */
2498
- MaxDropRecordsPerRequestExceeded: "MAX_DROP_RECORDS_PER_REQUEST_EXCEEDED",
2499
- /** One or more DROP records on this request are not part of the run's CPPA download. */
2500
- UnknownDropRecords: "UNKNOWN_DROP_RECORDS",
2501
- /**
2502
- * One or more DROP records on this request exist in the run's CPPA download
2503
- * under a different list type than the submission claims.
2504
- */
2505
- DropRecordListTypeMismatch: "DROP_RECORD_LIST_TYPE_MISMATCH",
2506
- /** The DROP run referenced by this request does not exist. */
2507
- DropRunNotFound: "DROP_RUN_NOT_FOUND",
2508
- /** The DROP run referenced by this request is in a state that no longer accepts new DROP-linked DSRs. */
2509
- DropRunNotIntakeEligible: "DROP_RUN_NOT_INTAKE_ELIGIBLE",
2510
- /** An identifier value on this request failed format or regex validation. */
2511
- IdentifierValidationFailed: "IDENTIFIER_VALIDATION_FAILED",
2512
- /** This request names an identifier the organization does not have configured. */
2513
- UnsupportedIdentifierName: "UNSUPPORTED_IDENTIFIER_NAME",
2514
- /** This request has no email, which is required outside silent mode. */
2515
- MissingRequiredEmail: "MISSING_REQUIRED_EMAIL",
2516
- /**
2517
- * One or more `dataSiloIds` on this request are not connected to the
2518
- * workflow config. `dataSiloIds` may only narrow the workflow's connected set.
2519
- */
2520
- DataSiloNotInWorkflow: "DATA_SILO_NOT_IN_WORKFLOW",
2521
- /**
2522
- * This request set both `dataSiloIds` and `ignoreDataSiloIds`. The two are
2523
- * mutually exclusive: `dataSiloIds` restricts fulfillment to a subset of the
2524
- * workflow's connected silos, `ignoreDataSiloIds` excludes silos from it.
2525
- */
2526
- ConflictingDataSiloFilters: "CONFLICTING_DATA_SILO_FILTERS",
2527
- /**
2528
- * The `type` asserted on this request does not match the workflow config's
2529
- * request action. `type` is optional; omit it to derive from the workflow.
2530
- */
2531
- TypeNotMatchingWorkflow: "TYPE_NOT_MATCHING_WORKFLOW",
2532
- /**
2533
- * The `subjectType` asserted on this request does not match the workflow
2534
- * config's data subject type. `subjectType` is optional; omit it to derive
2535
- * from the workflow.
2536
- */
2537
- SubjectTypeNotMatchingWorkflow: "SUBJECT_TYPE_NOT_MATCHING_WORKFLOW",
2538
- /**
2539
- * The request region is not eligible for the workflow config's regionList.
2540
- * The supplied country or subdivision must match an entry in regionList when
2541
- * the workflow collects regions and regionList is non-empty.
2542
- */
2543
- RegionNotInWorkflow: "REGION_NOT_IN_WORKFLOW",
2544
- /**
2545
- * This request's input failed shape, option, or field-pairing validation
2546
- * (gateway codec decode or backend per-item checks).
2547
- */
2548
- InvalidRequestInput: "INVALID_REQUEST_INPUT",
2549
- /**
2550
- * A Sombra-signed identifier JWT on this request failed verification or
2551
- * decode (tampered, expired, or malformed).
2552
- */
2553
- InvalidIdentifierJwt: "INVALID_IDENTIFIER_JWT",
2554
- /**
2555
- * The targeted workflow config is saved as a draft and cannot be used to
2556
- * submit requests.
2557
- */
2558
- DraftWorkflowConfig: "DRAFT_WORKFLOW_CONFIG",
2559
- /**
2560
- * An open request with the same type and identifiers already exists for this
2561
- * data subject.
2562
- */
2563
- DuplicateOpenRequest: "DUPLICATE_OPEN_REQUEST",
2564
- /**
2565
- * An open parent request (for example erasure with access preview) already
2566
- * covers this submission.
2567
- */
2568
- OpenParentRequest: "OPEN_PARENT_REQUEST"
2569
- };
2570
- //#endregion
2571
- //#region src/dsrErrorMessage.ts
2572
- /**
2573
- * Maximum CPPA DROP records that can be linked to a single DSR at submission
2574
- * time.
2575
- */
2576
- const MAX_DROP_RECORDS_PER_REQUEST = 500;
2577
- /**
2578
- * Maximum number of requests that can be submitted at once in a bulk
2579
- * operation.
2580
- */
2581
- const REQUEST_SUBMISSION_LIMIT = 100;
2582
- /**
2583
- * Maximum unknown DROP records named in an {@link DsrErrorCode.UnknownDropRecords}
2584
- * error message before truncating with an "and N more" suffix.
2585
- */
2586
- const MAX_UNKNOWN_DROP_RECORDS_IN_ERROR = 20;
2587
- /**
2588
- * Summary message when an entire bulk submission is rejected.
2589
- */
2590
- const DSR_BULK_SUBMISSION_REJECTED_MESSAGE = "The submission was rejected. No requests were created.";
2591
- /**
2592
- * Canonical per-input DSR bulk submission error messages.
2593
- *
2594
- * Each {@link DsrErrorCode} has exactly one builder; call
2595
- * `DSR_ERROR_MESSAGE[code](...)` to render the runtime string for one failed
2596
- * `input[]` item. Per-input errors currently surface as HTTP 400 bad-request
2597
- * validation failures.
2598
- */
2599
- const DSR_ERROR_MESSAGE = {
2600
- [DsrErrorCode.InvalidWorkflowConfigId]: () => "Invalid workflowConfigId",
2601
- [DsrErrorCode.MissingCoreIdentifier]: () => "Missing core identifier",
2602
- [DsrErrorCode.RestartRequestNotFound]: () => "Cannot restart: request not found",
2603
- [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.`,
2604
- [DsrErrorCode.ReceiptTemplateNotFound]: (templateId) => `Could not find specified email template ID: ${templateId}`,
2605
- [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.",
2606
- [DsrErrorCode.DuplicateDropRecords]: () => "dropRecords contains duplicate (dropRecordId, dropListType) entries: each DROP record can only be linked to one request per submission.",
2607
- [DsrErrorCode.InBatchDropIdempotencyKeyCollision]: () => "This request's identifiers conflict with another input in the batch that shares the same dropRunId idempotency key.",
2608
- [DsrErrorCode.DropRecordsRequireDropRunId]: () => "dropRecords requires dropRunId",
2609
- [DsrErrorCode.MaxDropRecordsPerRequestExceeded]: () => `Cannot link more than 500 DROP records to a single request.`,
2610
- [DsrErrorCode.UnknownDropRecords]: (records) => {
2611
- const named = records.slice(0, 20).map(({ dropRecordId, dropListType }) => `${dropRecordId} (${dropListType})`).join(", ");
2612
- const remainder = records.length > 20 ? ` and ${records.length - 20} more` : "";
2613
- 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.`;
2614
- },
2615
- [DsrErrorCode.DropRecordListTypeMismatch]: (records) => {
2616
- 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.`;
2617
- },
2618
- [DsrErrorCode.DropRunNotFound]: (dropRunId) => `Could not find DROP run with id "${dropRunId}"`,
2619
- [DsrErrorCode.DropRunNotIntakeEligible]: (dropRunState) => `Cannot submit DROP-linked DSRs while the run is in state ${dropRunState}`,
2620
- /**
2621
- * Fallback canonical message for {@link DsrErrorCode.IdentifierValidationFailed}.
2622
- * Organizations can configure a custom, locale-translated `validationErrorMessage`
2623
- * per identifier, so the runtime message on the error entry will often differ
2624
- * from this string. Downstream consumers must branch on `code` and display the
2625
- * returned `message` — never reconstruct it from `DSR_ERROR_MESSAGE`.
2626
- */
2627
- [DsrErrorCode.IdentifierValidationFailed]: (identifierNames) => `${identifierNames.join(", ")} did not pass validation`,
2628
- [DsrErrorCode.UnsupportedIdentifierName]: (name) => `The organization does not support identifiers with name: "${name}" at time of request submission.`,
2629
- [DsrErrorCode.MissingRequiredEmail]: () => "At least one email must be provided before a request can be created when not in silent mode",
2630
- [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.`,
2631
- [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.",
2632
- [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.`,
2633
- [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.`,
2634
- [DsrErrorCode.RegionNotInWorkflow]: ({ region, supportedRegions }) => `Region "${region}" is not eligible for this workflow. Supported regions: ${supportedRegions.join(", ")}.`,
2635
- /**
2636
- * Fallback canonical message for {@link DsrErrorCode.InvalidRequestInput}.
2637
- * Producers often pass through the original validation `ClientError` message,
2638
- * so the runtime message on the error entry may differ from this string.
2639
- * Downstream consumers must branch on `code` and display the returned
2640
- * `message` — never reconstruct it from `DSR_ERROR_MESSAGE`.
2641
- */
2642
- [DsrErrorCode.InvalidRequestInput]: () => "Request input failed validation",
2643
- [DsrErrorCode.InvalidIdentifierJwt]: () => "Signed identifier JWT failed verification",
2644
- [DsrErrorCode.DraftWorkflowConfig]: () => "Workflow is saved as a draft and cannot be used to submit requests.",
2645
- [DsrErrorCode.DuplicateOpenRequest]: () => "You have already made this request.",
2646
- [DsrErrorCode.OpenParentRequest]: () => "You have already submitted a previous request that will also accommodate this current one."
2647
- };
2648
- //#endregion
2649
- //#region src/dsrBulkErrorMessage.ts
2650
- /**
2651
- * Canonical bulk-call DSR submission error messages.
2652
- *
2653
- * Each {@link DsrBulkErrorCode} has exactly one builder for failures that apply
2654
- * to the submission as a whole. These currently surface as HTTP 400 bad-request
2655
- * validation failures, so no separate status map is exported.
2656
- */
2657
- const DSR_BULK_ERROR_MESSAGE = {
2658
- [DsrBulkErrorCode.NoInputsProvided]: () => "No inputs provided",
2659
- [DsrBulkErrorCode.SubmissionLimitExceeded]: () => `Cannot submit more than 100 requests at once. Please split your requests into smaller batches and try again.`,
2660
- [DsrBulkErrorCode.MixedCekContext]: () => "Either all or none of the requests must include encryptedCEKContext",
2661
- [DsrBulkErrorCode.DhContextRequired]: () => "No encrypted data subject payload provided",
2662
- [DsrBulkErrorCode.ConcurrentSubmissionConflict]: () => "A concurrent DROP submission already created one or more of these requests. Retry the batch.",
2663
- [DsrBulkErrorCode.InvalidBulkInput]: () => "Bulk submission input must be an array"
2664
- };
2665
- //#endregion
2666
- //#region src/dsrRequestOutcome.ts
2667
- /**
2668
- * Per-input outcome for `POST /v1/data-subject-request-bulk` responses.
2669
- *
2670
- * Returned on successful bulk submissions so callers can branch without parsing
2671
- * error messages. Failures continue to use {@link DsrErrorCode}.
2672
- */
2673
- const DsrRequestOutcome = {
2674
- /** A new request was created. */
2675
- Created: "CREATED",
2676
- /** An equivalent open request already exists for this submission. */
2677
- AlreadyOpen: "ALREADY_OPEN",
2678
- /** DROP records were linked to an existing request without creating a new one. */
2679
- DropRecordsLinked: "DROP_RECORDS_LINKED",
2680
- /** An existing request was restarted. */
2681
- Restarted: "RESTARTED"
2682
- };
2683
- //#endregion
2684
- //#region src/identifier.ts
2685
- /**
2686
- * An identifier that can be used to communication with the data subject, also implies that the identifier is transcend supported
2687
- */
2688
- const CommunicationIdentifierType = {
2689
- /** An email address */
2690
- Email: "email",
2691
- /** A phone number */
2692
- Phone: "phone"
2693
- };
2694
- /**
2695
- * The built in identification strategies
2696
- */
2697
- const IdentifierType = {
2698
- ...CommunicationIdentifierType,
2699
- /** The core id of the organization (usually provided through login) */
2700
- CoreIdentifier: "coreIdentifier",
2701
- /** A custom identifier */
2702
- Custom: "custom",
2703
- /**
2704
- * Google/Android mobile identifier
2705
- *
2706
- * @see https://www.singular.net/blog/google-advertising-id-gaid/
2707
- * AKA adid - android advertising id
2708
- */
2709
- Gaid: "gaid",
2710
- /** Apple ios mobile identifier */
2711
- Idfa: "idfa",
2712
- /**
2713
- * The Identifier for Vendors
2714
- *
2715
- * @see https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor
2716
- */
2717
- Idfv: "idfv",
2718
- BrowserId: "browserId",
2719
- /** Microsoft Advertising Id */
2720
- MicrosoftAdvertisingId: "microsoftAdvertisingId",
2721
- /** Amazon fire Advertising Id */
2722
- AmazonFireAdvertisingId: "amazonFireAdvertisingId",
2723
- /**
2724
- * Roku Advertising Id
2725
- *
2726
- * @see https://developer.roku.com/docs/developer-program/advertising/integrating-roku-advertising-framework.md
2727
- */
2728
- Rida: "rida",
2729
- /** The handle for the filestack file */
2730
- FilestackHandle: "filestackHandle",
2731
- /** An ID for a stripe user */
2732
- StripeId: "stripeId",
2733
- /** The ID used to key braintree customer */
2734
- BraintreeCustomerId: "braintreeCustomerId",
2735
- /** An ID for a chargebee user */
2736
- ChargebeeId: "chargebeeId",
2737
- /** An ID for a Thrive TRM contact */
2738
- thriveTrmContactId: "thriveTrmContactId",
2739
- /** Talkable uuid */
2740
- TalkableUUID: "talkableUUID",
2741
- /** Recurly site account ID */
2742
- RecurlyId: "recurlyId",
2743
- /** The customer.io ID - also known as cio_id */
2744
- customerIoId: "customerIoId",
2745
- /** The visitorId for the Sprig integration */
2746
- sprigVisitorId: "sprigVisitorId",
2747
- /** URL of a LinkedIn profile */
2748
- linkedInURL: "linkedInURL",
2749
- /**
2750
- * An advertising ID (for a mobile device)
2751
- * TODO: https://transcend.height.app/T-13657 - remove this in favor of idfa and gpadvid
2752
- */
2753
- AdvertisingId: "advertisingId",
2754
- /** An ID for a Persona account */
2755
- PersonaReferenceId: "personaReferenceId",
2756
- /** An ID for a Stream user */
2757
- StreamUserId: "streamUserId",
2758
- /** A token used to make API calls on behalf of a Plaid account. */
2759
- PlaidProcessorToken: "plaidProcessorToken",
2760
- /** An ID for an applicant on Onfido */
2761
- OnfidoApplicantId: "onfidoApplicantId",
2762
- /** Custom ID for a Vero user */
2763
- VeroUserId: "veroUserId",
2764
- /**
2765
- * Adobe Privacy API ID's
2766
- * https://experienceleague.adobe.com/en/docs/experience-platform/privacy/api/appendix#standard-namespaces
2767
- */
2768
- /** Adobe Advertising Cloud ID */
2769
- AdobeAdvertisingCloudId: "adobeAdvertisingCloudId",
2770
- /** Adobe Audience Manager UUID */
2771
- AdobeAudienceManagerId: "adobeAudienceManagerId",
2772
- /** Adobe Experience Cloud ID */
2773
- AdobeExperienceCloudId: "adobeExperienceCloudId",
2774
- /** Adobe Target ID */
2775
- AdobeTargetID: "adobeTargetId",
2776
- /** Adobe Campaign recipient ID */
2777
- AdobeCampaignRecipientId: "adobeCampaignRecipientId",
2778
- /** The special Transcend identifier on consent preference records */
2779
- Transcend: "transcend"
2780
- };
2781
- //#endregion
2782
- //#region src/enricher.ts
2783
- /**
2784
- * Enrichers that are a bit more freeform, as in they can take in arbitrary inputs
2785
- * and return arbitrary outputs
2786
- */
2787
- const CustomEnricherType = {
2788
- /** Notify a server to enrich the variable */
2789
- Server: "SERVER",
2790
- /** Notify a person to enrich the value */
2791
- Person: "PERSON",
2792
- /** Check the legal hold list for that enricher type */
2793
- LegalHold: "LEGAL_HOLD",
2794
- /** Auto approve a specific identifier in a specific situation */
2795
- AutoApprove: "AUTO_APPROVE",
2796
- /** Test an identifier using a regex */
2797
- RegexMatch: "REGEX_MATCH",
2798
- /** Perform conditional logic based on region */
2799
- RegionMatcher: "REGION_MATCH",
2800
- /** Execute an SQL query against a database */
2801
- Database: "DATABASE",
2802
- /** Execute a look in looker to map identifiers */
2803
- Looker: "LOOKER",
2804
- /** Adds an enricher dependency */
2805
- WaitPeriod: "WAIT_PERIOD",
2806
- /** Verify a government ID */
2807
- GovernmentId: "GOVERNMENT_ID",
2808
- /** Custom Function enricher type. */
2809
- CustomFunction: "CUSTOM_FUNCTION"
2810
- };
2811
- /**
2812
- * Enrichers that can only be used to initialize the beginning of a DSR
2813
- */
2814
- const InitEnricherType = {
2815
- /** Sombra has the capability */
2816
- Sombra: "SOMBRA" };
2817
- /**
2818
- * The various types of identity enrichers supported by transcend
2819
- */
2820
- const EnricherType = {
2821
- ...InitEnricherType,
2822
- ...CommunicationIdentifierType,
2823
- ...CustomEnricherType
2824
- };
2825
- //#endregion
2826
- //#region src/formType.ts
2827
- /**
2828
- * Privacy Center / action form field types (GraphQL {@link FormType}).
2829
- */
2830
- const FormType = {
2831
- /** Boolean input */
2832
- Boolean: "boolean",
2833
- /** Group of nested fields */
2834
- Group: "group",
2835
- /** Single-line string input */
2836
- String: "string",
2837
- /** Array input */
2838
- Array: "array",
2839
- /** Select dropdown */
2840
- Select: "select",
2841
- /** Multi-line text area */
2842
- TextArea: "textArea",
2843
- /** JSON input */
2844
- Json: "json",
2845
- /** Password input */
2846
- Password: "password",
2847
- /** File upload */
2848
- File: "file",
2849
- /** API key picker */
2850
- SelectApiKeys: "SelectApiKeys",
2851
- /** User picker */
2852
- SelectUsers: "SelectUsers",
2853
- /** Team picker */
2854
- SelectTeams: "SelectTeams",
2855
- /** Template picker */
2856
- SelectTemplate: "SelectTemplate"
2857
- };
2858
- //#endregion
2859
- //#region src/getRegistryLink.ts
2860
- const CODE_PACKAGE_TYPE_TO_LINK = {
2861
- [CodePackageType.CocoaPods]: (name) => `https://cocoapods.org/pods/${name}`,
2862
- [CodePackageType.Gradle]: (name) => `https://mvnrepository.com/artifact/${name.split(":").join("/")}`,
2863
- [CodePackageType.PackageJson]: (name) => `https://www.npmjs.com/package/${name}`,
2864
- [CodePackageType.RequirementsTxt]: (name) => `https://pypi.org/project/${name}`,
2865
- [CodePackageType.Swift]: (name) => `https://swiftpackageindex.com/search?query=${name}`,
2866
- [CodePackageType.Pubspec]: (name) => `https://pub.dev/packages/${name}`,
2867
- [CodePackageType.Gemfile]: (name) => `https://rubygems.org/gems/${name}`,
2868
- [CodePackageType.ComposerJson]: (name) => `https://packagist.org/packages/${name}`,
2869
- [CodePackageType.Kotlin]: (name) => `https://mvnrepository.com/artifact/${name.split(":").join("/")}`
2870
- };
2871
- /**
2872
- * Get the registry link for a given code package
2873
- *
2874
- * @param name - Name of package
2875
- * @param type - Type of registry
2876
- * @returns The registry link
2877
- */
2878
- function getRegistryLink(name, type) {
2879
- return CODE_PACKAGE_TYPE_TO_LINK[type](name);
2880
- }
2881
- //#endregion
2882
- //#region src/isoConstants/iso3166-1.ts
2883
- const COUNTRY_LOOKUP = {
2884
- AF: "Afghanistan",
2885
- AX: "Åland Islands",
2886
- AL: "Albania",
2887
- DZ: "Algeria",
2888
- AS: "American Samoa",
2889
- AD: "Andorra",
2890
- AO: "Angola",
2891
- AI: "Anguilla",
2892
- AQ: "Antarctica",
2893
- AG: "Antigua & Barbuda",
2894
- AR: "Argentina",
2895
- AM: "Armenia",
2896
- AW: "Aruba",
2897
- AU: "Australia",
2898
- AT: "Austria",
2899
- AZ: "Azerbaijan",
2900
- BS: "Bahamas",
2901
- BH: "Bahrain",
2902
- BD: "Bangladesh",
2903
- BB: "Barbados",
2904
- BY: "Belarus",
2905
- BE: "Belgium",
2906
- BZ: "Belize",
2907
- BJ: "Benin",
2908
- BM: "Bermuda",
2909
- BT: "Bhutan",
2910
- BO: "Bolivia",
2911
- BA: "Bosnia & Herzegovina",
2912
- BW: "Botswana",
2913
- BV: "Bouvet Island",
2914
- BR: "Brazil",
2915
- IO: "British Indian Ocean Territory",
2916
- VG: "British Virgin Islands",
2917
- BN: "Brunei",
2918
- BG: "Bulgaria",
2919
- BF: "Burkina Faso",
2920
- BI: "Burundi",
2921
- KH: "Cambodia",
2922
- CM: "Cameroon",
2923
- CA: "Canada",
2924
- CV: "Cape Verde",
2925
- BQ: "Caribbean Netherlands",
2926
- KY: "Cayman Islands",
2927
- CF: "Central African Republic",
2928
- TD: "Chad",
2929
- CL: "Chile",
2930
- CN: "China",
2931
- CX: "Christmas Island",
2932
- CC: "Cocos (Keeling) Islands",
2933
- CO: "Colombia",
2934
- KM: "Comoros",
2935
- CG: "Congo - Brazzaville",
2936
- CD: "Congo - Kinshasa",
2937
- CK: "Cook Islands",
2938
- CR: "Costa Rica",
2939
- CI: "Côte d’Ivoire",
2940
- HR: "Croatia",
2941
- CU: "Cuba",
2942
- CW: "Curaçao",
2943
- CY: "Cyprus",
2944
- CZ: "Czechia",
2945
- DK: "Denmark",
2946
- DJ: "Djibouti",
2947
- DM: "Dominica",
2948
- DO: "Dominican Republic",
2949
- EC: "Ecuador",
2950
- EG: "Egypt",
2951
- SV: "El Salvador",
2952
- GQ: "Equatorial Guinea",
2953
- ER: "Eritrea",
2954
- EE: "Estonia",
2955
- SZ: "Eswatini",
2956
- ET: "Ethiopia",
2957
- FK: "Falkland Islands",
2958
- FO: "Faroe Islands",
2959
- FJ: "Fiji",
2960
- FI: "Finland",
2961
- FR: "France",
2962
- GF: "French Guiana",
2963
- PF: "French Polynesia",
2964
- TF: "French Southern Territories",
2965
- GA: "Gabon",
2966
- GM: "Gambia",
2967
- GE: "Georgia",
2968
- DE: "Germany",
2969
- GH: "Ghana",
2970
- GI: "Gibraltar",
2971
- GR: "Greece",
2972
- GL: "Greenland",
2973
- GD: "Grenada",
2974
- GP: "Guadeloupe",
2975
- GU: "Guam",
2976
- GT: "Guatemala",
2977
- GG: "Guernsey",
2978
- GN: "Guinea",
2979
- GW: "Guinea-Bissau",
2980
- GY: "Guyana",
2981
- HT: "Haiti",
2982
- HM: "Heard & McDonald Islands",
2983
- HN: "Honduras",
2984
- HK: "Hong Kong SAR China",
2985
- HU: "Hungary",
2986
- IS: "Iceland",
2987
- IN: "India",
2988
- ID: "Indonesia",
2989
- IR: "Iran",
2990
- IQ: "Iraq",
2991
- IE: "Ireland",
2992
- IM: "Isle of Man",
2993
- IL: "Israel",
2994
- IT: "Italy",
2995
- JM: "Jamaica",
2996
- JP: "Japan",
2997
- JE: "Jersey",
2998
- JO: "Jordan",
2999
- KZ: "Kazakhstan",
3000
- KE: "Kenya",
3001
- KI: "Kiribati",
3002
- KW: "Kuwait",
3003
- KG: "Kyrgyzstan",
3004
- LA: "Laos",
3005
- LV: "Latvia",
3006
- LB: "Lebanon",
3007
- LS: "Lesotho",
3008
- LR: "Liberia",
3009
- LY: "Libya",
3010
- LI: "Liechtenstein",
3011
- LT: "Lithuania",
3012
- LU: "Luxembourg",
3013
- MO: "Macao SAR China",
3014
- MG: "Madagascar",
3015
- MW: "Malawi",
3016
- MY: "Malaysia",
3017
- MV: "Maldives",
3018
- ML: "Mali",
3019
- MT: "Malta",
3020
- MH: "Marshall Islands",
3021
- MQ: "Martinique",
3022
- MR: "Mauritania",
3023
- MU: "Mauritius",
3024
- YT: "Mayotte",
3025
- MX: "Mexico",
3026
- FM: "Micronesia",
3027
- MD: "Moldova",
3028
- MC: "Monaco",
3029
- MN: "Mongolia",
3030
- ME: "Montenegro",
3031
- MS: "Montserrat",
3032
- MA: "Morocco",
3033
- MZ: "Mozambique",
3034
- MM: "Myanmar (Burma)",
3035
- NA: "Namibia",
3036
- NR: "Nauru",
3037
- NP: "Nepal",
3038
- NL: "Netherlands",
3039
- NC: "New Caledonia",
3040
- NZ: "New Zealand",
3041
- NI: "Nicaragua",
3042
- NE: "Niger",
3043
- NG: "Nigeria",
3044
- NU: "Niue",
3045
- NF: "Norfolk Island",
3046
- KP: "North Korea",
3047
- MK: "North Macedonia",
3048
- MP: "Northern Mariana Islands",
3049
- NO: "Norway",
3050
- OM: "Oman",
3051
- PK: "Pakistan",
3052
- PW: "Palau",
3053
- PS: "Palestinian Territories",
3054
- PA: "Panama",
3055
- PG: "Papua New Guinea",
3056
- PY: "Paraguay",
3057
- PE: "Peru",
3058
- PH: "Philippines",
3059
- PN: "Pitcairn Islands",
3060
- PL: "Poland",
3061
- PT: "Portugal",
3062
- PR: "Puerto Rico",
3063
- QA: "Qatar",
3064
- RE: "Réunion",
3065
- RO: "Romania",
3066
- RU: "Russia",
3067
- RW: "Rwanda",
3068
- WS: "Samoa",
3069
- SM: "San Marino",
3070
- ST: "São Tomé & Príncipe",
3071
- SA: "Saudi Arabia",
3072
- SN: "Senegal",
3073
- RS: "Serbia",
3074
- SC: "Seychelles",
3075
- SL: "Sierra Leone",
3076
- SG: "Singapore",
3077
- SX: "Sint Maarten",
3078
- SK: "Slovakia",
3079
- SI: "Slovenia",
3080
- SB: "Solomon Islands",
3081
- SO: "Somalia",
3082
- ZA: "South Africa",
3083
- GS: "South Georgia & South Sandwich Islands",
3084
- KR: "South Korea",
3085
- SS: "South Sudan",
3086
- ES: "Spain",
3087
- LK: "Sri Lanka",
3088
- BL: "St. Barthélemy",
3089
- SH: "St. Helena",
3090
- KN: "St. Kitts & Nevis",
3091
- LC: "St. Lucia",
3092
- MF: "St. Martin",
3093
- PM: "St. Pierre & Miquelon",
3094
- VC: "St. Vincent & Grenadines",
3095
- SD: "Sudan",
3096
- SR: "Suriname",
3097
- SJ: "Svalbard & Jan Mayen",
3098
- SE: "Sweden",
3099
- CH: "Switzerland",
3100
- SY: "Syria",
3101
- TW: "Taiwan",
3102
- TJ: "Tajikistan",
3103
- TZ: "Tanzania",
3104
- TH: "Thailand",
3105
- TL: "Timor-Leste",
3106
- TG: "Togo",
3107
- TK: "Tokelau",
3108
- TO: "Tonga",
3109
- TT: "Trinidad & Tobago",
3110
- TN: "Tunisia",
3111
- TR: "Turkey",
3112
- TM: "Turkmenistan",
3113
- TC: "Turks & Caicos Islands",
3114
- TV: "Tuvalu",
3115
- UM: "U.S. Outlying Islands",
3116
- VI: "U.S. Virgin Islands",
3117
- UG: "Uganda",
3118
- UA: "Ukraine",
3119
- AE: "United Arab Emirates",
3120
- GB: "United Kingdom",
3121
- US: "United States",
3122
- UY: "Uruguay",
3123
- UZ: "Uzbekistan",
3124
- VU: "Vanuatu",
3125
- VA: "Vatican City",
3126
- VE: "Venezuela",
3127
- VN: "Vietnam",
3128
- WF: "Wallis & Futuna",
3129
- EH: "Western Sahara",
3130
- YE: "Yemen",
3131
- ZM: "Zambia",
3132
- ZW: "Zimbabwe"
3133
- };
3134
- const COUNTRIES = Object.values(COUNTRY_LOOKUP);
3135
- const EXCEPTIONAL_RESERVATION_LOOKUP = { EU: "European Union" };
3136
- const EXCEPTIONAL_RESERVATIONS = Object.values(EXCEPTIONAL_RESERVATION_LOOKUP);
3137
- const ISO_31661 = {
3138
- ...EXCEPTIONAL_RESERVATION_LOOKUP,
3139
- ...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
3140
2014
  };
3141
2015
  //#endregion
3142
2016
  //#region src/isoConstants/iso3166-2.ts
@@ -28796,18 +27670,1338 @@ const ISO_31662 = {
28796
27670
  name: "Matabeleland South",
28797
27671
  parent: "ZW"
28798
27672
  },
28799
- "ZW-MV": {
28800
- code: "ZW-MV",
28801
- name: "Masvingo",
28802
- 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.`;
28803
28740
  },
28804
- "ZW-MW": {
28805
- code: "ZW-MW",
28806
- name: "Mashonaland West",
28807
- parent: "ZW"
28808
- }
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"
28809
28980
  };
28810
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("/")}`
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
+ }
29004
+ //#endregion
28811
29005
  //#region src/sql.ts
28812
29006
  /**
28813
29007
  * Allowed database variable formats
@@ -28858,25 +29052,6 @@ const DatabaseSqlVariablesForPrivacyRequest = t.intersection([t.type({
28858
29052
  partitionName: t.union([t.string, t.null])
28859
29053
  }), DatabaseVariables]);
28860
29054
  //#endregion
28861
- //#region src/isoRegion.ts
28862
- /**
28863
- * gets a typed Dictionary (identical key/values) from a source lookup object
28864
- *
28865
- * @param source - the source lookup
28866
- * @returns the typed dictionary
28867
- */
28868
- function getDictFromKeys(source) {
28869
- return Object.fromEntries(Object.keys(source).map((code) => [code, code]));
28870
- }
28871
- /**
28872
- * Country Code taken from https://github.com/umpirsky/country-list/blob/master/data/en/country.json
28873
- */
28874
- const IsoCountryCode = getDictFromKeys(ISO_31661);
28875
- /**
28876
- * Country subdivisions taken from taken from https://github.com/wooorm/iso-3166/blob/main/2.js
28877
- */
28878
- const IsoCountrySubdivisionCode = getDictFromKeys(ISO_31662);
28879
- //#endregion
28880
29055
  //#region src/largeLanguageModels.ts
28881
29056
  /**
28882
29057
  * The role of the message's author. One of `system`, `user`, `assistant`
@@ -31127,39 +31302,17 @@ const PolicyType = {
31127
31302
  /** Custom policy */
31128
31303
  Custom: "CUSTOM"
31129
31304
  };
31130
- //#endregion
31131
- //#region src/prefixModule.ts
31132
- /** Catalog a prefix module is published in */
31133
- const PrefixModuleCatalog = {
31134
- /** Provided by Transcend */
31135
- Transcend: "transcend",
31136
- /** Owned by the organization */
31137
- Organization: "organization"
31138
- };
31139
- /**
31140
- * Config on a prefix module release. Backend JSON schemas allow only string properties.
31141
- */
31142
- const PrefixModuleConfig = t.record(t.string, t.string);
31143
- /** Codec for prefix module catalog in yaml and API mappings */
31144
- const PrefixModuleCatalogCodec = valuesOf(PrefixModuleCatalog);
31145
31305
  /**
31146
- * Parse the API config JSON string into a flat string map
31306
+ * OPA Data API `explain` option on `POST /v1/data/{path}`.
31147
31307
  *
31148
- * @param configJson - Raw config from GraphQL
31149
- * @param context - Module name for error messages
31150
- * @returns Parsed config
31308
+ * @see https://www.openpolicyagent.org/docs/latest/rest-api/#query-api
31151
31309
  */
31152
- function parsePrefixModuleConfigFromJson(configJson, context) {
31153
- let parsed;
31154
- try {
31155
- parsed = JSON.parse(configJson);
31156
- } catch (cause) {
31157
- throw new Error(`Prefix module "${context.moduleName}" has invalid config JSON: ${cause instanceof Error ? cause.message : String(cause)}`);
31158
- }
31159
- const decoded = PrefixModuleConfig.decode(parsed);
31160
- if (either.isLeft(decoded)) throw new Error(`Prefix module "${context.moduleName}" has invalid config: expected a flat map of string values`);
31161
- return decoded.right;
31162
- }
31310
+ const OPAExplainMode = {
31311
+ Notes: "notes",
31312
+ Fails: "fails",
31313
+ Full: "full",
31314
+ Debug: "debug"
31315
+ };
31163
31316
  //#endregion
31164
31317
  //#region src/privacyCenterAccessToken.ts
31165
31318
  /**
@@ -32975,6 +33128,19 @@ const PrivacyCenterThemePartial = t.intersection([t.type({
32975
33128
  textStyles: PrivacyCenterTextStyles
32976
33129
  })]);
32977
33130
  //#endregion
33131
+ //#region src/user.ts
33132
+ /**
33133
+ * Fields that the list of users can be filtered by
33134
+ */
33135
+ const UserOrderField = {
33136
+ /** In alphabetical order */
33137
+ Name: "name",
33138
+ /** When the user was added */
33139
+ CreatedAt: "createdAt",
33140
+ /** The time the user was updated */
33141
+ UpdatedAt: "updatedAt"
33142
+ };
33143
+ //#endregion
32978
33144
  //#region src/workflowConfig.ts
32979
33145
  /** The type of workflow config */
32980
33146
  const WorkflowConfigType = {
@@ -33000,6 +33166,6 @@ const CollectDataSubjectRegions = {
33000
33166
  Collect: "COLLECT"
33001
33167
  };
33002
33168
  //#endregion
33003
- export { AbsoluteUrlString, ActionItemCode, ActionItemPriorityOverride, AirgapBundleAnalyticsBinInterval, AirgapBundleAnalyticsDimension, AirgapBundleAnalyticsMetric, 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, 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, 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 };
33004
33170
 
33005
33171
  //# sourceMappingURL=index.mjs.map