@transcend-io/sdk 1.2.11 → 1.3.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.d.mts +137 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +466 -34
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -2,11 +2,11 @@ import { DAY_MS, FIVE_MIN_MS, addDaysUtc, clampPageSize, describePackageName, ex
|
|
|
2
2
|
import { GraphQLClient, gql } from "graphql-request";
|
|
3
3
|
import got from "got";
|
|
4
4
|
import { parse } from "graphql";
|
|
5
|
-
import { chunk, difference, flatten, groupBy, keyBy, sortBy, uniq } from "lodash-es";
|
|
6
|
-
import { AssessmentsDisplayLogicAction, AttributeKeyType, ComparisonOperator, ConsentTrackerStatus, EnricherType, IdentifierType, IsoCountryCode, IsoCountrySubdivisionCode, LogicOperator, OrderDirection, PreferenceQueryResponseItem, PreferenceStoreIdentifier, PreferenceTopicType, PreferenceUpdateItem, RequestAction } from "@transcend-io/privacy-types";
|
|
5
|
+
import { chunk, difference, flatten, groupBy, keyBy, sortBy, uniq, uniqBy } from "lodash-es";
|
|
6
|
+
import { AssessmentsDisplayLogicAction, AttributeKeyType, ComparisonOperator, ConsentTrackerStatus, EnricherType, IdentifierType, IsoCountryCode, IsoCountrySubdivisionCode, LogicOperator, OrderDirection, PreferenceQueryResponseItem, PreferenceStoreAuthLevel, PreferenceStoreIdentifier, PreferenceTopicType, PreferenceUpdateItem, RequestAction } from "@transcend-io/privacy-types";
|
|
7
7
|
import * as t from "io-ts";
|
|
8
|
+
import { InitialViewState, KnownDefaultPurpose, OnConsentExpiry, UserPrivacySignalEnum } from "@transcend-io/airgap.js-types";
|
|
8
9
|
import { apply, decodeCodec, valuesOf } from "@transcend-io/type-utils";
|
|
9
|
-
import { InitialViewState, OnConsentExpiry } from "@transcend-io/airgap.js-types";
|
|
10
10
|
import semver from "semver";
|
|
11
11
|
//#region src/gqls/shared.ts
|
|
12
12
|
/**
|
|
@@ -284,7 +284,7 @@ const UPDATE_BUSINESS_ENTITIES = gql`
|
|
|
284
284
|
`;
|
|
285
285
|
//#endregion
|
|
286
286
|
//#region src/data-inventory/fetchAllBusinessEntities.ts
|
|
287
|
-
const PAGE_SIZE$
|
|
287
|
+
const PAGE_SIZE$42 = 20;
|
|
288
288
|
/**
|
|
289
289
|
* Fetch all businessEntities in the organization
|
|
290
290
|
*
|
|
@@ -299,14 +299,14 @@ async function fetchAllBusinessEntities(client, options = {}) {
|
|
|
299
299
|
do {
|
|
300
300
|
const { businessEntities: { nodes } } = await makeGraphQLRequest(client, BUSINESS_ENTITIES, {
|
|
301
301
|
variables: {
|
|
302
|
-
first: PAGE_SIZE$
|
|
302
|
+
first: PAGE_SIZE$42,
|
|
303
303
|
offset
|
|
304
304
|
},
|
|
305
305
|
logger
|
|
306
306
|
});
|
|
307
307
|
businessEntities.push(...nodes);
|
|
308
|
-
offset += PAGE_SIZE$
|
|
309
|
-
shouldContinue = nodes.length === PAGE_SIZE$
|
|
308
|
+
offset += PAGE_SIZE$42;
|
|
309
|
+
shouldContinue = nodes.length === PAGE_SIZE$42;
|
|
310
310
|
} while (shouldContinue);
|
|
311
311
|
return businessEntities.sort((a, b) => a.title.localeCompare(b.title));
|
|
312
312
|
}
|
|
@@ -357,7 +357,7 @@ const UPDATE_DATA_SUB_CATEGORIES = gql`
|
|
|
357
357
|
`;
|
|
358
358
|
//#endregion
|
|
359
359
|
//#region src/data-inventory/fetchAllDataCategories.ts
|
|
360
|
-
const PAGE_SIZE$
|
|
360
|
+
const PAGE_SIZE$41 = 20;
|
|
361
361
|
/**
|
|
362
362
|
* Fetch all dataSubCategories in the organization
|
|
363
363
|
*
|
|
@@ -373,14 +373,14 @@ async function fetchAllDataCategories(client, options = {}) {
|
|
|
373
373
|
do {
|
|
374
374
|
const { dataSubCategories: { nodes } } = await makeGraphQLRequest(client, DATA_SUB_CATEGORIES, {
|
|
375
375
|
variables: {
|
|
376
|
-
first: PAGE_SIZE$
|
|
376
|
+
first: PAGE_SIZE$41,
|
|
377
377
|
offset
|
|
378
378
|
},
|
|
379
379
|
logger
|
|
380
380
|
});
|
|
381
381
|
dataSubCategories.push(...nodes);
|
|
382
|
-
offset += PAGE_SIZE$
|
|
383
|
-
shouldContinue = nodes.length === PAGE_SIZE$
|
|
382
|
+
offset += PAGE_SIZE$41;
|
|
383
|
+
shouldContinue = nodes.length === PAGE_SIZE$41;
|
|
384
384
|
} while (shouldContinue);
|
|
385
385
|
return dataSubCategories.sort((a, b) => a.name.localeCompare(b.name));
|
|
386
386
|
}
|
|
@@ -860,7 +860,7 @@ const IDENTIFIERS = parse(gql`
|
|
|
860
860
|
`);
|
|
861
861
|
//#endregion
|
|
862
862
|
//#region src/data-inventory/fetchAllIdentifiers.ts
|
|
863
|
-
const PAGE_SIZE$
|
|
863
|
+
const PAGE_SIZE$40 = 20;
|
|
864
864
|
/**
|
|
865
865
|
* Fetch all identifiers in the organization
|
|
866
866
|
*
|
|
@@ -877,13 +877,13 @@ async function fetchAllIdentifiers(client, options = {}) {
|
|
|
877
877
|
const { identifiers: { nodes } } = await makeGraphQLRequest(client, IDENTIFIERS, {
|
|
878
878
|
logger,
|
|
879
879
|
variables: {
|
|
880
|
-
first: PAGE_SIZE$
|
|
880
|
+
first: PAGE_SIZE$40,
|
|
881
881
|
offset
|
|
882
882
|
}
|
|
883
883
|
});
|
|
884
884
|
identifiers.push(...nodes);
|
|
885
|
-
offset += PAGE_SIZE$
|
|
886
|
-
shouldContinue = nodes.length === PAGE_SIZE$
|
|
885
|
+
offset += PAGE_SIZE$40;
|
|
886
|
+
shouldContinue = nodes.length === PAGE_SIZE$40;
|
|
887
887
|
} while (shouldContinue);
|
|
888
888
|
return identifiers.sort((a, b) => a.name.localeCompare(b.name));
|
|
889
889
|
}
|
|
@@ -962,7 +962,7 @@ const UPDATE_PROCESSING_ACTIVITIES = gql`
|
|
|
962
962
|
`;
|
|
963
963
|
//#endregion
|
|
964
964
|
//#region src/data-inventory/fetchAllProcessingActivities.ts
|
|
965
|
-
const PAGE_SIZE$
|
|
965
|
+
const PAGE_SIZE$39 = 20;
|
|
966
966
|
/**
|
|
967
967
|
* Fetch all processingActivities in the organization
|
|
968
968
|
*
|
|
@@ -978,14 +978,14 @@ async function fetchAllProcessingActivities(client, options = {}) {
|
|
|
978
978
|
do {
|
|
979
979
|
const { processingActivities: { nodes } } = await makeGraphQLRequest(client, PROCESSING_ACTIVITIES, {
|
|
980
980
|
variables: {
|
|
981
|
-
first: PAGE_SIZE$
|
|
981
|
+
first: PAGE_SIZE$39,
|
|
982
982
|
offset
|
|
983
983
|
},
|
|
984
984
|
logger
|
|
985
985
|
});
|
|
986
986
|
processingActivities.push(...nodes);
|
|
987
|
-
offset += PAGE_SIZE$
|
|
988
|
-
shouldContinue = nodes.length === PAGE_SIZE$
|
|
987
|
+
offset += PAGE_SIZE$39;
|
|
988
|
+
shouldContinue = nodes.length === PAGE_SIZE$39;
|
|
989
989
|
} while (shouldContinue);
|
|
990
990
|
return processingActivities.sort((a, b) => a.title.localeCompare(b.title));
|
|
991
991
|
}
|
|
@@ -1050,7 +1050,7 @@ const UPDATE_VENDORS = gql`
|
|
|
1050
1050
|
`;
|
|
1051
1051
|
//#endregion
|
|
1052
1052
|
//#region src/data-inventory/fetchAllVendors.ts
|
|
1053
|
-
const PAGE_SIZE$
|
|
1053
|
+
const PAGE_SIZE$38 = 20;
|
|
1054
1054
|
/**
|
|
1055
1055
|
* Fetch all vendors in the organization
|
|
1056
1056
|
*
|
|
@@ -1065,14 +1065,14 @@ async function fetchAllVendors(client, options = {}) {
|
|
|
1065
1065
|
do {
|
|
1066
1066
|
const { vendors: { nodes } } = await makeGraphQLRequest(client, VENDORS, {
|
|
1067
1067
|
variables: {
|
|
1068
|
-
first: PAGE_SIZE$
|
|
1068
|
+
first: PAGE_SIZE$38,
|
|
1069
1069
|
offset
|
|
1070
1070
|
},
|
|
1071
1071
|
logger
|
|
1072
1072
|
});
|
|
1073
1073
|
vendors.push(...nodes);
|
|
1074
|
-
offset += PAGE_SIZE$
|
|
1075
|
-
shouldContinue = nodes.length === PAGE_SIZE$
|
|
1074
|
+
offset += PAGE_SIZE$38;
|
|
1075
|
+
shouldContinue = nodes.length === PAGE_SIZE$38;
|
|
1076
1076
|
} while (shouldContinue);
|
|
1077
1077
|
return vendors.sort((a, b) => a.title.localeCompare(b.title));
|
|
1078
1078
|
}
|
|
@@ -1519,9 +1519,29 @@ const PURPOSES$1 = parse(gql`
|
|
|
1519
1519
|
}
|
|
1520
1520
|
}
|
|
1521
1521
|
`);
|
|
1522
|
+
const CREATE_PURPOSE = parse(gql`
|
|
1523
|
+
mutation TranscendCliCreatePurpose($input: CreatePurposeInput!) {
|
|
1524
|
+
createPurpose(input: $input) {
|
|
1525
|
+
purpose {
|
|
1526
|
+
id
|
|
1527
|
+
trackingType
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
}
|
|
1531
|
+
`);
|
|
1532
|
+
const UPDATE_PURPOSE = parse(gql`
|
|
1533
|
+
mutation TranscendCliUpdatePurpose($input: UpdatePurposeInput!) {
|
|
1534
|
+
updatePurpose(input: $input) {
|
|
1535
|
+
purpose {
|
|
1536
|
+
id
|
|
1537
|
+
trackingType
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
}
|
|
1541
|
+
`);
|
|
1522
1542
|
//#endregion
|
|
1523
1543
|
//#region src/preference-management/fetchAllPurposes.ts
|
|
1524
|
-
const PAGE_SIZE$
|
|
1544
|
+
const PAGE_SIZE$37 = 20;
|
|
1525
1545
|
/**
|
|
1526
1546
|
* Fetch all purposes in the organization
|
|
1527
1547
|
*
|
|
@@ -1538,14 +1558,14 @@ async function fetchAllPurposes(client, options = {}) {
|
|
|
1538
1558
|
const { purposes: { nodes } } = await makeGraphQLRequest(client, PURPOSES$1, {
|
|
1539
1559
|
logger,
|
|
1540
1560
|
variables: {
|
|
1541
|
-
first: PAGE_SIZE$
|
|
1561
|
+
first: PAGE_SIZE$37,
|
|
1542
1562
|
offset,
|
|
1543
1563
|
input: { includeDeleted }
|
|
1544
1564
|
}
|
|
1545
1565
|
});
|
|
1546
1566
|
purposes.push(...nodes);
|
|
1547
|
-
offset += PAGE_SIZE$
|
|
1548
|
-
shouldContinue = nodes.length === PAGE_SIZE$
|
|
1567
|
+
offset += PAGE_SIZE$37;
|
|
1568
|
+
shouldContinue = nodes.length === PAGE_SIZE$37;
|
|
1549
1569
|
} while (shouldContinue);
|
|
1550
1570
|
return purposes.sort((a, b) => a.trackingType.localeCompare(b.trackingType));
|
|
1551
1571
|
}
|
|
@@ -1562,6 +1582,7 @@ const PREFERENCE_TOPICS = parse(gql`
|
|
|
1562
1582
|
id
|
|
1563
1583
|
slug
|
|
1564
1584
|
type
|
|
1585
|
+
color
|
|
1565
1586
|
title {
|
|
1566
1587
|
id
|
|
1567
1588
|
defaultMessage
|
|
@@ -1586,9 +1607,19 @@ const PREFERENCE_TOPICS = parse(gql`
|
|
|
1586
1607
|
}
|
|
1587
1608
|
}
|
|
1588
1609
|
`);
|
|
1610
|
+
const CREATE_OR_UPDATE_PREFERENCE_TOPIC = parse(gql`
|
|
1611
|
+
mutation TranscendCliCreateOrUpdatePreferenceTopic($input: CreateOrUpdatePreferenceTopicInput!) {
|
|
1612
|
+
createOrUpdatePreferenceTopic(input: $input) {
|
|
1613
|
+
preferenceTopic {
|
|
1614
|
+
id
|
|
1615
|
+
slug
|
|
1616
|
+
}
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
`);
|
|
1589
1620
|
//#endregion
|
|
1590
1621
|
//#region src/preference-management/fetchAllPreferenceTopics.ts
|
|
1591
|
-
const PAGE_SIZE$
|
|
1622
|
+
const PAGE_SIZE$36 = 20;
|
|
1592
1623
|
/**
|
|
1593
1624
|
* Fetch all preference topics in the organization
|
|
1594
1625
|
*
|
|
@@ -1605,13 +1636,13 @@ async function fetchAllPreferenceTopics(client, options = {}) {
|
|
|
1605
1636
|
const { preferenceTopics: { nodes } } = await makeGraphQLRequest(client, PREFERENCE_TOPICS, {
|
|
1606
1637
|
logger,
|
|
1607
1638
|
variables: {
|
|
1608
|
-
first: PAGE_SIZE$
|
|
1639
|
+
first: PAGE_SIZE$36,
|
|
1609
1640
|
offset
|
|
1610
1641
|
}
|
|
1611
1642
|
});
|
|
1612
1643
|
preferenceTopics.push(...nodes);
|
|
1613
|
-
offset += PAGE_SIZE$
|
|
1614
|
-
shouldContinue = nodes.length === PAGE_SIZE$
|
|
1644
|
+
offset += PAGE_SIZE$36;
|
|
1645
|
+
shouldContinue = nodes.length === PAGE_SIZE$36;
|
|
1615
1646
|
} while (shouldContinue);
|
|
1616
1647
|
return preferenceTopics.sort((a, b) => `${a.slug}:${a.purpose.trackingType}`.localeCompare(`${b.slug}:${b.purpose.trackingType}`));
|
|
1617
1648
|
}
|
|
@@ -1644,7 +1675,7 @@ const CREATE_PREFERENCE_ACCESS_TOKENS = parse(gql`
|
|
|
1644
1675
|
`);
|
|
1645
1676
|
//#endregion
|
|
1646
1677
|
//#region src/preference-management/createPreferenceAccessTokens.ts
|
|
1647
|
-
const MAX_BATCH_SIZE = 50;
|
|
1678
|
+
const MAX_BATCH_SIZE$1 = 50;
|
|
1648
1679
|
/**
|
|
1649
1680
|
* Create preference access tokens for a single page of identifiers.
|
|
1650
1681
|
*
|
|
@@ -1673,7 +1704,7 @@ async function createPreferenceAccessTokens(client, options) {
|
|
|
1673
1704
|
let completed = 0;
|
|
1674
1705
|
emitProgress?.(0);
|
|
1675
1706
|
const results = [];
|
|
1676
|
-
await map(chunk(records, MAX_BATCH_SIZE), async (chunkedRecords) => {
|
|
1707
|
+
await map(chunk(records, MAX_BATCH_SIZE$1), async (chunkedRecords) => {
|
|
1677
1708
|
const mappedResults = (await createPreferenceAccessTokensPage(client, chunkedRecords.map(({ index, ...rest }) => rest), logger)).map((token, idx) => ({
|
|
1678
1709
|
input: chunkedRecords[idx],
|
|
1679
1710
|
accessToken: token
|
|
@@ -1928,6 +1959,59 @@ const DeletePreferenceRecordCliCsvRow = t.type({
|
|
|
1928
1959
|
/** The value of the identifier */
|
|
1929
1960
|
value: t.string
|
|
1930
1961
|
});
|
|
1962
|
+
/** Preference option value input for sync */
|
|
1963
|
+
const PreferenceOptionValueInput = t.type({
|
|
1964
|
+
/** Title of option value */
|
|
1965
|
+
title: t.string,
|
|
1966
|
+
/** API slug */
|
|
1967
|
+
slug: t.string
|
|
1968
|
+
});
|
|
1969
|
+
/** Preference topic input for sync */
|
|
1970
|
+
const PreferenceTopicSyncInput = t.intersection([t.type({
|
|
1971
|
+
/** Purpose slug (trackingType) this topic belongs to */
|
|
1972
|
+
"tracking-type": t.string,
|
|
1973
|
+
/** The type of the preference topic */
|
|
1974
|
+
type: valuesOf(PreferenceTopicType),
|
|
1975
|
+
/** The title of the preference topic */
|
|
1976
|
+
title: t.string,
|
|
1977
|
+
/** The description of the preference topic */
|
|
1978
|
+
description: t.string,
|
|
1979
|
+
/** API slug for the preference topic */
|
|
1980
|
+
slug: t.string
|
|
1981
|
+
}), t.partial({
|
|
1982
|
+
/** Default configuration value */
|
|
1983
|
+
"default-configuration": t.string,
|
|
1984
|
+
/** Whether the preference topic is shown in the privacy center */
|
|
1985
|
+
"show-in-privacy-center": t.boolean,
|
|
1986
|
+
/** The option values when the type is single or multi select */
|
|
1987
|
+
options: t.array(PreferenceOptionValueInput)
|
|
1988
|
+
})]);
|
|
1989
|
+
/** Consent purpose input for sync */
|
|
1990
|
+
const PurposeInput = t.intersection([t.type({
|
|
1991
|
+
/** Purpose slug (immutable key used to match existing purposes) */
|
|
1992
|
+
trackingType: t.string,
|
|
1993
|
+
/** Display name of the purpose */
|
|
1994
|
+
name: t.string
|
|
1995
|
+
}), t.partial({
|
|
1996
|
+
/** Title shown in Consent Management and Privacy Center UIs */
|
|
1997
|
+
title: t.string,
|
|
1998
|
+
/** Description of the purpose */
|
|
1999
|
+
description: t.string,
|
|
2000
|
+
/** Whether the purpose is active */
|
|
2001
|
+
"is-active": t.boolean,
|
|
2002
|
+
/** Whether the purpose is configurable */
|
|
2003
|
+
configurable: t.boolean,
|
|
2004
|
+
/** Display order of the purpose in the privacy center */
|
|
2005
|
+
"display-order": t.number,
|
|
2006
|
+
/** Whether the purpose is shown in the privacy center */
|
|
2007
|
+
"show-in-privacy-center": t.boolean,
|
|
2008
|
+
/** Whether the purpose is shown in the consent manager */
|
|
2009
|
+
"show-in-consent-manager": t.boolean,
|
|
2010
|
+
/** Authentication level required for the purpose */
|
|
2011
|
+
"auth-level": valuesOf(PreferenceStoreAuthLevel),
|
|
2012
|
+
/** Opt-out signals that instantly opt out of this purpose */
|
|
2013
|
+
"opt-out-signals": t.array(valuesOf(UserPrivacySignalEnum))
|
|
2014
|
+
})]);
|
|
1931
2015
|
//#endregion
|
|
1932
2016
|
//#region src/preference-management/getPreferenceMetadataFromRow.ts
|
|
1933
2017
|
/**
|
|
@@ -2703,6 +2787,354 @@ async function loadReferenceData(client, { logger }) {
|
|
|
2703
2787
|
};
|
|
2704
2788
|
}
|
|
2705
2789
|
//#endregion
|
|
2790
|
+
//#region src/preference-management/gqls/preferenceOptionValues.ts
|
|
2791
|
+
const PREFERENCE_OPTION_VALUES = parse(gql`
|
|
2792
|
+
query TranscendCliPreferenceOptionValues($first: Int!, $offset: Int!) {
|
|
2793
|
+
preferenceOptionValues(first: $first, offset: $offset) {
|
|
2794
|
+
nodes {
|
|
2795
|
+
id
|
|
2796
|
+
title {
|
|
2797
|
+
id
|
|
2798
|
+
defaultMessage
|
|
2799
|
+
}
|
|
2800
|
+
slug
|
|
2801
|
+
}
|
|
2802
|
+
}
|
|
2803
|
+
}
|
|
2804
|
+
`);
|
|
2805
|
+
const CREATE_OR_UPDATE_PREFERENCE_OPTION_VALUES = parse(gql`
|
|
2806
|
+
mutation TranscendCliCreateOrUpdatePreferenceOptionValues(
|
|
2807
|
+
$input: CreateOrUpdatePreferenceOptionValuesInput!
|
|
2808
|
+
) {
|
|
2809
|
+
createOrUpdatePreferenceOptionValues(input: $input) {
|
|
2810
|
+
preferenceOptionValues {
|
|
2811
|
+
id
|
|
2812
|
+
slug
|
|
2813
|
+
}
|
|
2814
|
+
}
|
|
2815
|
+
}
|
|
2816
|
+
`);
|
|
2817
|
+
//#endregion
|
|
2818
|
+
//#region src/preference-management/fetchAllPreferenceOptionValues.ts
|
|
2819
|
+
const PAGE_SIZE$35 = 50;
|
|
2820
|
+
/**
|
|
2821
|
+
* Fetch all preference option values in the organization
|
|
2822
|
+
*
|
|
2823
|
+
* @param client - GraphQL client
|
|
2824
|
+
* @param options - Options
|
|
2825
|
+
* @returns All preference option values in the organization
|
|
2826
|
+
*/
|
|
2827
|
+
async function fetchAllPreferenceOptionValues(client, options = {}) {
|
|
2828
|
+
const { logger } = options;
|
|
2829
|
+
const preferenceOptionValues = [];
|
|
2830
|
+
let offset = 0;
|
|
2831
|
+
let shouldContinue = false;
|
|
2832
|
+
do {
|
|
2833
|
+
const { preferenceOptionValues: { nodes } } = await makeGraphQLRequest(client, PREFERENCE_OPTION_VALUES, {
|
|
2834
|
+
variables: {
|
|
2835
|
+
first: PAGE_SIZE$35,
|
|
2836
|
+
offset
|
|
2837
|
+
},
|
|
2838
|
+
logger
|
|
2839
|
+
});
|
|
2840
|
+
preferenceOptionValues.push(...nodes);
|
|
2841
|
+
offset += PAGE_SIZE$35;
|
|
2842
|
+
shouldContinue = nodes.length === PAGE_SIZE$35;
|
|
2843
|
+
} while (shouldContinue);
|
|
2844
|
+
return preferenceOptionValues.sort((a, b) => a.slug.localeCompare(b.slug));
|
|
2845
|
+
}
|
|
2846
|
+
//#endregion
|
|
2847
|
+
//#region src/preference-management/syncPreferenceOptionValues.ts
|
|
2848
|
+
const MAX_BATCH_SIZE = 50;
|
|
2849
|
+
/**
|
|
2850
|
+
* Create or update preference option values
|
|
2851
|
+
*
|
|
2852
|
+
* @param client - GraphQL client
|
|
2853
|
+
* @param optionValues - Preference option values paired with existing IDs
|
|
2854
|
+
* @param options - Options
|
|
2855
|
+
* @returns Created/updated preference option values
|
|
2856
|
+
*/
|
|
2857
|
+
async function createOrUpdatePreferenceOptionValues(client, optionValues, options = {}) {
|
|
2858
|
+
const { logger } = options;
|
|
2859
|
+
const results = [];
|
|
2860
|
+
await mapSeries(chunk(optionValues, MAX_BATCH_SIZE), async (batch) => {
|
|
2861
|
+
const result = await makeGraphQLRequest(client, CREATE_OR_UPDATE_PREFERENCE_OPTION_VALUES, {
|
|
2862
|
+
variables: { input: { preferenceOptionValues: batch.map(([optionValue, id]) => id ? {
|
|
2863
|
+
id,
|
|
2864
|
+
title: optionValue.title
|
|
2865
|
+
} : {
|
|
2866
|
+
slug: optionValue.slug,
|
|
2867
|
+
title: optionValue.title
|
|
2868
|
+
}) } },
|
|
2869
|
+
logger
|
|
2870
|
+
});
|
|
2871
|
+
results.push(...result.createOrUpdatePreferenceOptionValues.preferenceOptionValues);
|
|
2872
|
+
});
|
|
2873
|
+
return results;
|
|
2874
|
+
}
|
|
2875
|
+
/**
|
|
2876
|
+
* Sync the preference option values
|
|
2877
|
+
*
|
|
2878
|
+
* @param client - GraphQL client
|
|
2879
|
+
* @param optionValues - Preference option values
|
|
2880
|
+
* @param options - Options
|
|
2881
|
+
* @returns True if run without error
|
|
2882
|
+
*/
|
|
2883
|
+
async function syncPreferenceOptionValues(client, optionValues, options = {}) {
|
|
2884
|
+
const { logger } = options;
|
|
2885
|
+
logger?.info(`Syncing "${optionValues.length}" preference option values...`);
|
|
2886
|
+
const optionValueBySlug = keyBy(await fetchAllPreferenceOptionValues(client, { logger }), "slug");
|
|
2887
|
+
const changedOptionValues = optionValues.filter((optionValueInput) => {
|
|
2888
|
+
const found = optionValueBySlug[optionValueInput.slug];
|
|
2889
|
+
return !found || found.title.defaultMessage !== optionValueInput.title;
|
|
2890
|
+
});
|
|
2891
|
+
if (changedOptionValues.length === 0) {
|
|
2892
|
+
logger?.info(`Skipping "${optionValues.length}" unchanged preference option values`);
|
|
2893
|
+
return true;
|
|
2894
|
+
}
|
|
2895
|
+
try {
|
|
2896
|
+
await createOrUpdatePreferenceOptionValues(client, changedOptionValues.map((optionValueInput) => [optionValueInput, optionValueBySlug[optionValueInput.slug]?.id]), { logger });
|
|
2897
|
+
logger?.info(`Successfully synced "${changedOptionValues.length}" preference option values (${optionValues.length - changedOptionValues.length} unchanged skipped)!`);
|
|
2898
|
+
return true;
|
|
2899
|
+
} catch (err) {
|
|
2900
|
+
logger?.error(`Failed to sync preference option values! - ${err.message}`);
|
|
2901
|
+
return false;
|
|
2902
|
+
}
|
|
2903
|
+
}
|
|
2904
|
+
//#endregion
|
|
2905
|
+
//#region src/preference-management/syncPurposes.ts
|
|
2906
|
+
const DEFAULT_PURPOSE_TRACKING_TYPES = new Set(Object.values(KnownDefaultPurpose));
|
|
2907
|
+
/**
|
|
2908
|
+
* Whether a purpose tracking type is a built-in default purpose.
|
|
2909
|
+
*
|
|
2910
|
+
* @param trackingType - Purpose tracking type slug
|
|
2911
|
+
* @returns True when the purpose is a built-in default
|
|
2912
|
+
*/
|
|
2913
|
+
function isDefaultPurposeTrackingType(trackingType) {
|
|
2914
|
+
return DEFAULT_PURPOSE_TRACKING_TYPES.has(trackingType);
|
|
2915
|
+
}
|
|
2916
|
+
/**
|
|
2917
|
+
* Compare opt-out signal lists regardless of order.
|
|
2918
|
+
*
|
|
2919
|
+
* @param left - First signal list
|
|
2920
|
+
* @param right - Second signal list
|
|
2921
|
+
* @returns True when both lists contain the same signals
|
|
2922
|
+
*/
|
|
2923
|
+
function optOutSignalsMatch(left, right) {
|
|
2924
|
+
const normalizedLeft = [...left ?? []].sort();
|
|
2925
|
+
const normalizedRight = [...right].sort();
|
|
2926
|
+
return normalizedLeft.length === normalizedRight.length && normalizedLeft.every((signal, index) => signal === normalizedRight[index]);
|
|
2927
|
+
}
|
|
2928
|
+
/**
|
|
2929
|
+
* Build updatePurpose input with only changed fields.
|
|
2930
|
+
* Built-in default purposes cannot sync `configurable` or `showInConsentManager`.
|
|
2931
|
+
*
|
|
2932
|
+
* @param found - Existing purpose from the API
|
|
2933
|
+
* @param input - Purpose input from YAML
|
|
2934
|
+
* @param options - Options
|
|
2935
|
+
* @returns Mutation input and any warnings for omitted default-purpose fields
|
|
2936
|
+
*/
|
|
2937
|
+
function buildUpdatePurposeInput(found, input, options = {}) {
|
|
2938
|
+
const { logger } = options;
|
|
2939
|
+
const isDefault = isDefaultPurposeTrackingType(input.trackingType);
|
|
2940
|
+
const updateInput = { id: found.id };
|
|
2941
|
+
if (input.name !== found.name) updateInput.name = input.name;
|
|
2942
|
+
if (input.title !== found.title) updateInput.title = input.title;
|
|
2943
|
+
if (input.description !== found.description) updateInput.description = input.description;
|
|
2944
|
+
if (input["is-active"] !== found.isActive) updateInput.isActive = input["is-active"];
|
|
2945
|
+
if (input["display-order"] !== found.displayOrder) updateInput.displayOrder = input["display-order"];
|
|
2946
|
+
if (input["show-in-privacy-center"] !== found.showInPrivacyCenter) updateInput.showInPrivacyCenter = input["show-in-privacy-center"];
|
|
2947
|
+
if (input["auth-level"] !== found.authLevel) updateInput.authLevel = input["auth-level"];
|
|
2948
|
+
if (!optOutSignalsMatch(input["opt-out-signals"], found.optOutSignals)) updateInput.optOutSignals = input["opt-out-signals"];
|
|
2949
|
+
if (isDefault) {
|
|
2950
|
+
if (input.configurable !== found.configurable) logger?.warn(`Cannot sync "configurable" for built-in purpose "${input.trackingType}" via API — update this field in the Admin Dashboard instead.`);
|
|
2951
|
+
if (input["show-in-consent-manager"] !== found.showInConsentManager) logger?.warn(`Cannot sync "show-in-consent-manager" for built-in purpose "${input.trackingType}" via API — update this field in the Admin Dashboard instead.`);
|
|
2952
|
+
} else {
|
|
2953
|
+
if (input.configurable !== found.configurable) updateInput.configurable = input.configurable;
|
|
2954
|
+
if (input["show-in-consent-manager"] !== found.showInConsentManager) updateInput.showInConsentManager = input["show-in-consent-manager"];
|
|
2955
|
+
}
|
|
2956
|
+
return {
|
|
2957
|
+
input: updateInput,
|
|
2958
|
+
isEmpty: Object.keys(updateInput).length === 1
|
|
2959
|
+
};
|
|
2960
|
+
}
|
|
2961
|
+
/**
|
|
2962
|
+
* Sync tracking purposes to Transcend, matching existing purposes by trackingType.
|
|
2963
|
+
* Creates purposes that do not yet exist and updates the rest.
|
|
2964
|
+
*
|
|
2965
|
+
* @param client - GraphQL client
|
|
2966
|
+
* @param purposes - Purpose inputs from YAML
|
|
2967
|
+
* @param options - Options
|
|
2968
|
+
* @returns Whether the sync succeeded and a trackingType -> purpose ID map
|
|
2969
|
+
*/
|
|
2970
|
+
async function syncPurposes(client, purposes, options = {}) {
|
|
2971
|
+
const { logger } = options;
|
|
2972
|
+
logger?.info(`Syncing "${purposes.length}" purposes...`);
|
|
2973
|
+
const existing = await fetchAllPurposes(client, { logger });
|
|
2974
|
+
const existingByTrackingType = keyBy(existing, "trackingType");
|
|
2975
|
+
const purposeIdByTrackingType = Object.fromEntries(existing.map(({ trackingType, id }) => [trackingType, id]));
|
|
2976
|
+
let success = true;
|
|
2977
|
+
for (const purpose of purposes) {
|
|
2978
|
+
const found = existingByTrackingType[purpose.trackingType];
|
|
2979
|
+
try {
|
|
2980
|
+
if (found) {
|
|
2981
|
+
const { input: updateInput, isEmpty } = buildUpdatePurposeInput(found, purpose, { logger });
|
|
2982
|
+
if (isEmpty) {
|
|
2983
|
+
logger?.info(`Skipping purpose "${purpose.trackingType}" — only blocked fields differ for built-in purpose`);
|
|
2984
|
+
purposeIdByTrackingType[purpose.trackingType] = found.id;
|
|
2985
|
+
continue;
|
|
2986
|
+
}
|
|
2987
|
+
await makeGraphQLRequest(client, UPDATE_PURPOSE, {
|
|
2988
|
+
variables: { input: updateInput },
|
|
2989
|
+
logger
|
|
2990
|
+
});
|
|
2991
|
+
purposeIdByTrackingType[purpose.trackingType] = found.id;
|
|
2992
|
+
} else {
|
|
2993
|
+
const { createPurpose: { purpose: created } } = await makeGraphQLRequest(client, CREATE_PURPOSE, {
|
|
2994
|
+
variables: { input: {
|
|
2995
|
+
name: purpose.name,
|
|
2996
|
+
description: purpose.description ?? "",
|
|
2997
|
+
trackingType: purpose.trackingType,
|
|
2998
|
+
isActive: purpose["is-active"],
|
|
2999
|
+
configurable: purpose.configurable,
|
|
3000
|
+
displayOrder: purpose["display-order"],
|
|
3001
|
+
showInPrivacyCenter: purpose["show-in-privacy-center"],
|
|
3002
|
+
showInConsentManager: purpose["show-in-consent-manager"],
|
|
3003
|
+
authLevel: purpose["auth-level"],
|
|
3004
|
+
optOutSignals: purpose["opt-out-signals"]
|
|
3005
|
+
} },
|
|
3006
|
+
logger
|
|
3007
|
+
});
|
|
3008
|
+
purposeIdByTrackingType[purpose.trackingType] = created.id;
|
|
3009
|
+
if (purpose.title !== void 0) await makeGraphQLRequest(client, UPDATE_PURPOSE, {
|
|
3010
|
+
variables: { input: {
|
|
3011
|
+
id: created.id,
|
|
3012
|
+
title: purpose.title
|
|
3013
|
+
} },
|
|
3014
|
+
logger
|
|
3015
|
+
});
|
|
3016
|
+
}
|
|
3017
|
+
} catch (err) {
|
|
3018
|
+
success = false;
|
|
3019
|
+
logger?.error(`Failed to sync purpose "${purpose.trackingType}"! - ${err.message}`);
|
|
3020
|
+
}
|
|
3021
|
+
}
|
|
3022
|
+
if (success) logger?.info(`Successfully synced "${purposes.length}" purposes!`);
|
|
3023
|
+
return {
|
|
3024
|
+
success,
|
|
3025
|
+
purposeIdByTrackingType
|
|
3026
|
+
};
|
|
3027
|
+
}
|
|
3028
|
+
//#endregion
|
|
3029
|
+
//#region src/preference-management/syncPreferenceTopics.ts
|
|
3030
|
+
/**
|
|
3031
|
+
* Build GraphQL input for creating a preference topic.
|
|
3032
|
+
*
|
|
3033
|
+
* @param topic - Topic input from YAML
|
|
3034
|
+
* @param purposeId - Resolved purpose ID
|
|
3035
|
+
* @param preferenceOptionValueIds - Linked option value IDs (omit for BOOLEAN)
|
|
3036
|
+
* @returns Mutation input with only the fields allowed on create
|
|
3037
|
+
*/
|
|
3038
|
+
function buildCreatePreferenceTopicInput(topic, purposeId, preferenceOptionValueIds) {
|
|
3039
|
+
const input = {
|
|
3040
|
+
title: topic.title,
|
|
3041
|
+
slug: topic.slug,
|
|
3042
|
+
type: topic.type,
|
|
3043
|
+
displayDescription: topic.description,
|
|
3044
|
+
purposeId
|
|
3045
|
+
};
|
|
3046
|
+
if (topic["show-in-privacy-center"] !== void 0) input.showInPrivacyCenter = topic["show-in-privacy-center"];
|
|
3047
|
+
if (topic["default-configuration"] !== void 0) input.defaultConfiguration = topic["default-configuration"];
|
|
3048
|
+
if (topic.type !== PreferenceTopicType.Boolean && preferenceOptionValueIds.length > 0) input.preferenceOptionValueIds = preferenceOptionValueIds;
|
|
3049
|
+
return input;
|
|
3050
|
+
}
|
|
3051
|
+
/**
|
|
3052
|
+
* Build GraphQL input for updating an existing preference topic.
|
|
3053
|
+
* Slug, type, and purposeId must be omitted — the backend rejects them on update.
|
|
3054
|
+
*
|
|
3055
|
+
* @param existingId - ID of the existing topic
|
|
3056
|
+
* @param topic - Topic input from YAML
|
|
3057
|
+
* @param preferenceOptionValueIds - Linked option value IDs (omit for BOOLEAN)
|
|
3058
|
+
* @returns Mutation input with only the fields allowed on update
|
|
3059
|
+
*/
|
|
3060
|
+
function buildUpdatePreferenceTopicInput(existingId, topic, preferenceOptionValueIds) {
|
|
3061
|
+
const input = {
|
|
3062
|
+
id: existingId,
|
|
3063
|
+
title: topic.title,
|
|
3064
|
+
displayDescription: topic.description
|
|
3065
|
+
};
|
|
3066
|
+
if (topic["show-in-privacy-center"] !== void 0) input.showInPrivacyCenter = topic["show-in-privacy-center"];
|
|
3067
|
+
if (topic["default-configuration"] !== void 0) input.defaultConfiguration = topic["default-configuration"];
|
|
3068
|
+
if (topic.type !== PreferenceTopicType.Boolean && preferenceOptionValueIds.length > 0) input.preferenceOptionValueIds = preferenceOptionValueIds;
|
|
3069
|
+
return input;
|
|
3070
|
+
}
|
|
3071
|
+
/**
|
|
3072
|
+
* Sync preference topics to Transcend, matching existing topics by (trackingType, slug).
|
|
3073
|
+
* Inline option values are upserted (by slug) so their IDs can be linked to the topic.
|
|
3074
|
+
*
|
|
3075
|
+
* @param client - GraphQL client
|
|
3076
|
+
* @param topics - Preference topic inputs, each tagged with its purpose trackingType
|
|
3077
|
+
* @param options - Options
|
|
3078
|
+
* @returns True if every topic synced without error
|
|
3079
|
+
*/
|
|
3080
|
+
async function syncPreferenceTopics(client, topics, options = {}) {
|
|
3081
|
+
const { logger } = options;
|
|
3082
|
+
logger?.info(`Syncing "${topics.length}" preference topics...`);
|
|
3083
|
+
let { purposeIdByTrackingType } = options;
|
|
3084
|
+
if (!purposeIdByTrackingType) {
|
|
3085
|
+
const purposes = await fetchAllPurposes(client, { logger });
|
|
3086
|
+
purposeIdByTrackingType = Object.fromEntries(purposes.map(({ trackingType, id }) => [trackingType, id]));
|
|
3087
|
+
}
|
|
3088
|
+
const existingOptionValues = await fetchAllPreferenceOptionValues(client, { logger });
|
|
3089
|
+
const optionIdBySlug = Object.fromEntries(existingOptionValues.map(({ slug, id }) => [slug, id]));
|
|
3090
|
+
const inlineOptions = uniqBy(topics.filter((topic) => topic.type !== PreferenceTopicType.Boolean).flatMap((topic) => topic.options ?? []), "slug").filter((optionValue) => {
|
|
3091
|
+
const found = existingOptionValues.find(({ slug }) => slug === optionValue.slug);
|
|
3092
|
+
return !found || found.title.defaultMessage !== optionValue.title;
|
|
3093
|
+
});
|
|
3094
|
+
if (inlineOptions.length > 0) try {
|
|
3095
|
+
(await createOrUpdatePreferenceOptionValues(client, inlineOptions.map((optionValue) => [optionValue, optionIdBySlug[optionValue.slug]]), { logger })).forEach(({ slug, id }) => {
|
|
3096
|
+
optionIdBySlug[slug] = id;
|
|
3097
|
+
});
|
|
3098
|
+
} catch (err) {
|
|
3099
|
+
logger?.error(`Failed to sync inline preference option values! - ${err.message}`);
|
|
3100
|
+
return false;
|
|
3101
|
+
}
|
|
3102
|
+
const topicBySlugKey = keyBy(await fetchAllPreferenceTopics(client, { logger }), ({ purpose, slug }) => `${purpose.trackingType}:${slug}`);
|
|
3103
|
+
let success = true;
|
|
3104
|
+
for (const topic of topics) {
|
|
3105
|
+
const trackingType = topic["tracking-type"];
|
|
3106
|
+
const purposeId = purposeIdByTrackingType[trackingType];
|
|
3107
|
+
if (!purposeId) {
|
|
3108
|
+
success = false;
|
|
3109
|
+
logger?.error(`Failed to sync preference topic "${topic.title}"! - unknown purpose "${trackingType}"`);
|
|
3110
|
+
continue;
|
|
3111
|
+
}
|
|
3112
|
+
if (topic.type === PreferenceTopicType.Boolean && (topic.options ?? []).length > 0) {
|
|
3113
|
+
success = false;
|
|
3114
|
+
logger?.error(`Failed to sync preference topic "${topic.title}"! - BOOLEAN preference topics cannot have options in YAML (the backend auto-creates True/False options)`);
|
|
3115
|
+
continue;
|
|
3116
|
+
}
|
|
3117
|
+
const existing = topicBySlugKey[`${trackingType}:${topic.slug}`];
|
|
3118
|
+
if (existing && existing.type !== topic.type) {
|
|
3119
|
+
success = false;
|
|
3120
|
+
logger?.error(`Failed to sync preference topic "${topic.title}"! - Cannot change preference topic type from "${existing.type}" to "${topic.type}" for an existing topic`);
|
|
3121
|
+
continue;
|
|
3122
|
+
}
|
|
3123
|
+
const preferenceOptionValueIds = topic.type === PreferenceTopicType.Boolean ? [] : (topic.options ?? []).map((optionValue) => optionIdBySlug[optionValue.slug]).filter((id) => Boolean(id));
|
|
3124
|
+
try {
|
|
3125
|
+
await makeGraphQLRequest(client, CREATE_OR_UPDATE_PREFERENCE_TOPIC, {
|
|
3126
|
+
variables: { input: existing ? buildUpdatePreferenceTopicInput(existing.id, topic, preferenceOptionValueIds) : buildCreatePreferenceTopicInput(topic, purposeId, preferenceOptionValueIds) },
|
|
3127
|
+
logger
|
|
3128
|
+
});
|
|
3129
|
+
} catch (err) {
|
|
3130
|
+
success = false;
|
|
3131
|
+
logger?.error(`Failed to sync preference topic "${topic.title}"! - ${err.message}`);
|
|
3132
|
+
}
|
|
3133
|
+
}
|
|
3134
|
+
if (success) logger?.info(`Successfully synced "${topics.length}" preference topics!`);
|
|
3135
|
+
return success;
|
|
3136
|
+
}
|
|
3137
|
+
//#endregion
|
|
2706
3138
|
//#region src/administration/gqls/attribute.ts
|
|
2707
3139
|
const ATTRIBUTES = gql`
|
|
2708
3140
|
query TranscendCliAttributes($first: Int!, $offset: Int!) {
|
|
@@ -9250,6 +9682,6 @@ function createMonorepoPackageDefinition(name, directory) {
|
|
|
9250
9682
|
};
|
|
9251
9683
|
}
|
|
9252
9684
|
//#endregion
|
|
9253
|
-
export { AIRGAP_BUNDLE_AGGREGATE_ANALYTICS, AIRGAP_BUNDLE_TIMESERIES_ANALYTICS, ASSESSMENTS, ASSESSMENT_SECTION_FIELDS, ATTRIBUTE_KEYS_REQUESTS, ATTRIBUTE_VALUE_FIELDS, AssessmentAction, AssessmentNestedRule, AssessmentRiskLogic, AssessmentRule, AssessmentRuleWithOperands, AssessmentRuleWithoutOperands, BULK_REQUEST_FILES, CHANGE_REQUEST_DATA_SILO_STATUS, CODE_PACKAGES, CONSENT_MANAGER_ANALYTICS_DATA, CONSENT_PARTITIONS, COOKIES, COOKIE_STATS, CREATE_CODE_PACKAGE, CREATE_CONSENT_EXPERIENCE, CREATE_CONSENT_MANAGER, CREATE_CONSENT_PARTITION, CREATE_CONSENT_UI_THEME, CREATE_CONSENT_UI_VARIANT, CREATE_DATA_FLOWS, CREATE_DATA_SILOS, CREATE_DATA_SUBJECT, CREATE_ENRICHER, CREATE_IDENTIFIER, CREATE_PROCESSING_PURPOSE_SUB_CATEGORY, ColumnIdentifierMap, ColumnMetadataMap, ColumnPurposeMap, ConsentPreferenceResponse, DATAPOINT_EXPORT, DATA_FLOWS, DATA_FLOW_STATS, DATA_POINTS, DATA_POINT_COUNT, DATA_SILOS, DATA_SILOS_ENRICHED, DATA_SILO_EXPORT, DATA_SUBJECTS, DELETE_COOKIES, DELETE_DATA_FLOWS, DEPLOYED_PRIVACY_CENTER_URL, DEPLOY_CONSENT_MANAGER, DeletePreferenceRecordCliCsvRow, DeletePreferenceRecordsInput, DeletePreferenceRecordsResponse, ENRICHERS, EXPERIENCES, FETCH_CONSENT_MANAGER, FETCH_CONSENT_MANAGER_ID, FETCH_CONSENT_MANAGER_THEME, FETCH_CONSENT_UI_THEMES, FETCH_CONSENT_UI_VARIANTS, FETCH_PRIVACY_CENTER_ID, FailingPreferenceUpdates, FileFormatState, FileMetadataState, IMPORT_ONE_TRUST_ASSESSMENT_FORMS, INITIALIZER, IdentifierMetadataForPreference, MetadataMapping, NEW_IDENTIFIER_TYPES, NOOP_LOGGER, OWNER_FIELDS, POLICIES, PRIVACY_CENTER, PROCESSING_PURPOSE_SUB_CATEGORIES, PURPOSES, PendingSafePreferenceUpdates, PendingWithConflictPreferenceUpdates, PreferenceState, PreferenceUpdateMap, PurposeRowMapping, REDUCED_REQUESTS_FOR_DATA_SILO_COUNT, REMOVE_REQUEST_IDENTIFIERS, REQUEST_DATA_SILOS, REQUEST_ENRICHERS, REQUEST_FILES, REQUEST_IDENTIFIERS, RETRY_REQUEST_DATA_SILO, RETRY_REQUEST_ENRICHER, RETRY_TRANSIENT_MSGS, RequestIdentifiersResponse, RequestUploadReceipts, SERVICE_FIELDS, SKIP_REQUEST_ENRICHER, SOMBRA_VERSION, SUB_DATA_POINTS, SUB_DATA_POINTS_COUNT, SUB_DATA_POINTS_WITH_GUESSES, SYNC_ATTRIBUTE_TYPES, SkippedPreferenceUpdates, TEAM_FIELDS, TOGGLE_CONSENT_PRECEDENCE, TOGGLE_DATA_SUBJECT, TOGGLE_TELEMETRY_PARTITION_STRATEGY, TOGGLE_UNKNOWN_COOKIE_POLICY, TOGGLE_UNKNOWN_REQUEST_POLICY, TRACKING_PURPOSE_FIELDS, UPDATE_CODE_PACKAGES, UPDATE_CONSENT_EXPERIENCE, UPDATE_CONSENT_MANAGER_DOMAINS, UPDATE_CONSENT_MANAGER_PARTITION, UPDATE_CONSENT_MANAGER_THEME, UPDATE_CONSENT_MANAGER_TO_LATEST, UPDATE_CONSENT_MANAGER_VERSION, UPDATE_CONSENT_UI_THEME, UPDATE_CONSENT_UI_VARIANT, UPDATE_DATA_FLOWS, UPDATE_DATA_SILOS, UPDATE_DATA_SUBJECT, UPDATE_ENRICHER, UPDATE_IDENTIFIER, UPDATE_LOAD_OPTIONS, UPDATE_OR_CREATE_COOKIES, UPDATE_OR_CREATE_DATA_POINT, UPDATE_POLICIES, UPDATE_PRIVACY_CENTER, UPDATE_PROCESSING_PURPOSE_SUB_CATEGORIES, addMessagesToPromptRun, assumeRole, buildConsentChunks, buildTranscendGraphQLClient, buildTranscendGraphQLClientGeneric, checkIfPendingPreferenceUpdatesAreNoOp, checkIfPendingPreferenceUpdatesCauseConflict, consentWindowHasAny, convertToDataSubjectAllowlist, convertToDataSubjectBlockList, createActionItemCollection, createActionItems, createAgent, createAgentFile, createAgentFunction, createApiKey, createBusinessEntity, createDataCategory, createDataFlows, createDataSubject, createMonorepoPackageDefinition, createPreferenceAccessTokens, createProcessingPurpose, createPrompt, createPromptGroup, createPromptPartial, createRepository, createSoftwareDevelopmentKit, createSombraGotInstance, createTeam, createTranscendConsentGotInstance, createVendor, deleteApiKey, deployConsentManager, fetchActiveSiloDiscoPlugin, fetchAirgapBundleAggregateAnalytics, fetchAirgapBundleTimeseriesAnalytics, fetchAllActionItemCollections, fetchAllActionItems, fetchAllActions, fetchAllAgentFiles, fetchAllAgentFunctions, fetchAllAgents, fetchAllApiKeys, fetchAllAssessments, fetchAllAttributeValues, fetchAllAttributes, fetchAllBusinessEntities, fetchAllCatalogs, fetchAllCodePackages, fetchAllCookies, fetchAllDataCategories, fetchAllDataFlows, fetchAllDataPoints, fetchAllDataSilos, fetchAllDataSubjects, fetchAllEnrichers, fetchAllIdentifiers, fetchAllLargeLanguageModels, fetchAllMessages, fetchAllPolicies, fetchAllPreferenceTopics, fetchAllPrivacyCenters, fetchAllProcessingActivities, fetchAllProcessingPurposes, fetchAllPromptGroups, fetchAllPromptPartials, fetchAllPromptThreads, fetchAllPrompts, fetchAllPurposes, fetchAllPurposesAndPreferences, fetchAllRepositories, fetchAllRequestAttributeKeys, fetchAllRequestEnrichers, fetchAllRequestIdentifierMetadata, fetchAllRequestIdentifiers, fetchAllSiloDiscoveryResults, fetchAllSoftwareDevelopmentKits, fetchAllSubDataPoints, fetchAllTeams, fetchAllTemplates, fetchAllUsers, fetchAllVendors, fetchAndIndexCatalogs, fetchApiKeys, fetchConsentManager, fetchConsentManagerAnalyticsData, fetchConsentManagerExperiences, fetchConsentManagerId, fetchConsentManagerTheme, fetchConsentPreferences, fetchConsentPreferencesChunked, fetchConsentThemes, fetchConsentVariants, fetchEnrichedDataSilos, fetchIdentifiersAndCreateMissing, fetchParentOrganizationTeams, fetchPartitions, fetchPrivacyCenterId, fetchPrivacyCenterUrl, fetchPromptsWithVariables, fetchRequestDataSilo, fetchRequestDataSilos, fetchRequestDataSilosCount, fetchRequestFilesForRequest, findEarliestDayWithData, findLatestDayWithData, formatAttributeValues, formatRegions, getBoundsFromConsentFilter, getComparisonTimeForRecord, getPreferenceIdentifiersFromRow, getPreferenceMetadataFromRow, getPreferenceUpdatesFromRow, getPreferencesForIdentifiers, getUniquePreferenceIdentifierNamesFromRow, isTransientError, iterateConsentPages, loadReferenceData, loginUser, makeGraphQLRequest, parseAssessmentDisplayLogic, parseAssessmentRiskLogic, pickConsentChunkMode, reportPromptRun, resolveParentTeamIdsByName, retryRequestEnricher, setResourceAttributes, syncAction, syncActionItemCollections, syncActionItems, syncAgentFiles, syncAgentFunctions, syncAgents, syncAttribute, syncBusinessEntities, syncConsentManager, syncConsentManagerExperiences, syncConsentUiThemes, syncConsentUiVariants, syncCookies, syncDataCategories, syncDataFlows, syncDataSiloDependencies, syncDataSubject, syncEnricher, syncIdentifier, syncIntlMessages, syncPartitions, syncPolicies, syncPrivacyCenter, syncProcessingActivities, syncProcessingPurposes, syncPromptGroups, syncPromptPartials, syncPrompts, syncRepositories, syncSoftwareDevelopmentKits, syncTeams, syncTemplate, syncVendors, transformPreferenceRecordToCsv, updateActionItem, updateActionItemCollection, updateAgentFiles, updateAgentFunctions, updateAgents, updateBusinessEntities, updateConsentManagerToLatest, updateDataCategories, updateDataFlows, updateIntlMessages, updateOrCreateCookies, updatePolicies, updateProcessingPurposes, updatePromptGroups, updatePromptPartials, updatePrompts, updateRepositories, updateSoftwareDevelopmentKits, updateTeam, updateVendors, uploadSiloDiscoveryResults, validateSombraVersion, withTransientRetry };
|
|
9685
|
+
export { AIRGAP_BUNDLE_AGGREGATE_ANALYTICS, AIRGAP_BUNDLE_TIMESERIES_ANALYTICS, ASSESSMENTS, ASSESSMENT_SECTION_FIELDS, ATTRIBUTE_KEYS_REQUESTS, ATTRIBUTE_VALUE_FIELDS, AssessmentAction, AssessmentNestedRule, AssessmentRiskLogic, AssessmentRule, AssessmentRuleWithOperands, AssessmentRuleWithoutOperands, BULK_REQUEST_FILES, CHANGE_REQUEST_DATA_SILO_STATUS, CODE_PACKAGES, CONSENT_MANAGER_ANALYTICS_DATA, CONSENT_PARTITIONS, COOKIES, COOKIE_STATS, CREATE_CODE_PACKAGE, CREATE_CONSENT_EXPERIENCE, CREATE_CONSENT_MANAGER, CREATE_CONSENT_PARTITION, CREATE_CONSENT_UI_THEME, CREATE_CONSENT_UI_VARIANT, CREATE_DATA_FLOWS, CREATE_DATA_SILOS, CREATE_DATA_SUBJECT, CREATE_ENRICHER, CREATE_IDENTIFIER, CREATE_PROCESSING_PURPOSE_SUB_CATEGORY, ColumnIdentifierMap, ColumnMetadataMap, ColumnPurposeMap, ConsentPreferenceResponse, DATAPOINT_EXPORT, DATA_FLOWS, DATA_FLOW_STATS, DATA_POINTS, DATA_POINT_COUNT, DATA_SILOS, DATA_SILOS_ENRICHED, DATA_SILO_EXPORT, DATA_SUBJECTS, DELETE_COOKIES, DELETE_DATA_FLOWS, DEPLOYED_PRIVACY_CENTER_URL, DEPLOY_CONSENT_MANAGER, DeletePreferenceRecordCliCsvRow, DeletePreferenceRecordsInput, DeletePreferenceRecordsResponse, ENRICHERS, EXPERIENCES, FETCH_CONSENT_MANAGER, FETCH_CONSENT_MANAGER_ID, FETCH_CONSENT_MANAGER_THEME, FETCH_CONSENT_UI_THEMES, FETCH_CONSENT_UI_VARIANTS, FETCH_PRIVACY_CENTER_ID, FailingPreferenceUpdates, FileFormatState, FileMetadataState, IMPORT_ONE_TRUST_ASSESSMENT_FORMS, INITIALIZER, IdentifierMetadataForPreference, MetadataMapping, NEW_IDENTIFIER_TYPES, NOOP_LOGGER, OWNER_FIELDS, POLICIES, PRIVACY_CENTER, PROCESSING_PURPOSE_SUB_CATEGORIES, PURPOSES, PendingSafePreferenceUpdates, PendingWithConflictPreferenceUpdates, PreferenceOptionValueInput, PreferenceState, PreferenceTopicSyncInput, PreferenceUpdateMap, PurposeInput, PurposeRowMapping, REDUCED_REQUESTS_FOR_DATA_SILO_COUNT, REMOVE_REQUEST_IDENTIFIERS, REQUEST_DATA_SILOS, REQUEST_ENRICHERS, REQUEST_FILES, REQUEST_IDENTIFIERS, RETRY_REQUEST_DATA_SILO, RETRY_REQUEST_ENRICHER, RETRY_TRANSIENT_MSGS, RequestIdentifiersResponse, RequestUploadReceipts, SERVICE_FIELDS, SKIP_REQUEST_ENRICHER, SOMBRA_VERSION, SUB_DATA_POINTS, SUB_DATA_POINTS_COUNT, SUB_DATA_POINTS_WITH_GUESSES, SYNC_ATTRIBUTE_TYPES, SkippedPreferenceUpdates, TEAM_FIELDS, TOGGLE_CONSENT_PRECEDENCE, TOGGLE_DATA_SUBJECT, TOGGLE_TELEMETRY_PARTITION_STRATEGY, TOGGLE_UNKNOWN_COOKIE_POLICY, TOGGLE_UNKNOWN_REQUEST_POLICY, TRACKING_PURPOSE_FIELDS, UPDATE_CODE_PACKAGES, UPDATE_CONSENT_EXPERIENCE, UPDATE_CONSENT_MANAGER_DOMAINS, UPDATE_CONSENT_MANAGER_PARTITION, UPDATE_CONSENT_MANAGER_THEME, UPDATE_CONSENT_MANAGER_TO_LATEST, UPDATE_CONSENT_MANAGER_VERSION, UPDATE_CONSENT_UI_THEME, UPDATE_CONSENT_UI_VARIANT, UPDATE_DATA_FLOWS, UPDATE_DATA_SILOS, UPDATE_DATA_SUBJECT, UPDATE_ENRICHER, UPDATE_IDENTIFIER, UPDATE_LOAD_OPTIONS, UPDATE_OR_CREATE_COOKIES, UPDATE_OR_CREATE_DATA_POINT, UPDATE_POLICIES, UPDATE_PRIVACY_CENTER, UPDATE_PROCESSING_PURPOSE_SUB_CATEGORIES, addMessagesToPromptRun, assumeRole, buildConsentChunks, buildTranscendGraphQLClient, buildTranscendGraphQLClientGeneric, checkIfPendingPreferenceUpdatesAreNoOp, checkIfPendingPreferenceUpdatesCauseConflict, consentWindowHasAny, convertToDataSubjectAllowlist, convertToDataSubjectBlockList, createActionItemCollection, createActionItems, createAgent, createAgentFile, createAgentFunction, createApiKey, createBusinessEntity, createDataCategory, createDataFlows, createDataSubject, createMonorepoPackageDefinition, createOrUpdatePreferenceOptionValues, createPreferenceAccessTokens, createProcessingPurpose, createPrompt, createPromptGroup, createPromptPartial, createRepository, createSoftwareDevelopmentKit, createSombraGotInstance, createTeam, createTranscendConsentGotInstance, createVendor, deleteApiKey, deployConsentManager, fetchActiveSiloDiscoPlugin, fetchAirgapBundleAggregateAnalytics, fetchAirgapBundleTimeseriesAnalytics, fetchAllActionItemCollections, fetchAllActionItems, fetchAllActions, fetchAllAgentFiles, fetchAllAgentFunctions, fetchAllAgents, fetchAllApiKeys, fetchAllAssessments, fetchAllAttributeValues, fetchAllAttributes, fetchAllBusinessEntities, fetchAllCatalogs, fetchAllCodePackages, fetchAllCookies, fetchAllDataCategories, fetchAllDataFlows, fetchAllDataPoints, fetchAllDataSilos, fetchAllDataSubjects, fetchAllEnrichers, fetchAllIdentifiers, fetchAllLargeLanguageModels, fetchAllMessages, fetchAllPolicies, fetchAllPreferenceOptionValues, fetchAllPreferenceTopics, fetchAllPrivacyCenters, fetchAllProcessingActivities, fetchAllProcessingPurposes, fetchAllPromptGroups, fetchAllPromptPartials, fetchAllPromptThreads, fetchAllPrompts, fetchAllPurposes, fetchAllPurposesAndPreferences, fetchAllRepositories, fetchAllRequestAttributeKeys, fetchAllRequestEnrichers, fetchAllRequestIdentifierMetadata, fetchAllRequestIdentifiers, fetchAllSiloDiscoveryResults, fetchAllSoftwareDevelopmentKits, fetchAllSubDataPoints, fetchAllTeams, fetchAllTemplates, fetchAllUsers, fetchAllVendors, fetchAndIndexCatalogs, fetchApiKeys, fetchConsentManager, fetchConsentManagerAnalyticsData, fetchConsentManagerExperiences, fetchConsentManagerId, fetchConsentManagerTheme, fetchConsentPreferences, fetchConsentPreferencesChunked, fetchConsentThemes, fetchConsentVariants, fetchEnrichedDataSilos, fetchIdentifiersAndCreateMissing, fetchParentOrganizationTeams, fetchPartitions, fetchPrivacyCenterId, fetchPrivacyCenterUrl, fetchPromptsWithVariables, fetchRequestDataSilo, fetchRequestDataSilos, fetchRequestDataSilosCount, fetchRequestFilesForRequest, findEarliestDayWithData, findLatestDayWithData, formatAttributeValues, formatRegions, getBoundsFromConsentFilter, getComparisonTimeForRecord, getPreferenceIdentifiersFromRow, getPreferenceMetadataFromRow, getPreferenceUpdatesFromRow, getPreferencesForIdentifiers, getUniquePreferenceIdentifierNamesFromRow, isTransientError, iterateConsentPages, loadReferenceData, loginUser, makeGraphQLRequest, parseAssessmentDisplayLogic, parseAssessmentRiskLogic, pickConsentChunkMode, reportPromptRun, resolveParentTeamIdsByName, retryRequestEnricher, setResourceAttributes, syncAction, syncActionItemCollections, syncActionItems, syncAgentFiles, syncAgentFunctions, syncAgents, syncAttribute, syncBusinessEntities, syncConsentManager, syncConsentManagerExperiences, syncConsentUiThemes, syncConsentUiVariants, syncCookies, syncDataCategories, syncDataFlows, syncDataSiloDependencies, syncDataSubject, syncEnricher, syncIdentifier, syncIntlMessages, syncPartitions, syncPolicies, syncPreferenceOptionValues, syncPreferenceTopics, syncPrivacyCenter, syncProcessingActivities, syncProcessingPurposes, syncPromptGroups, syncPromptPartials, syncPrompts, syncPurposes, syncRepositories, syncSoftwareDevelopmentKits, syncTeams, syncTemplate, syncVendors, transformPreferenceRecordToCsv, updateActionItem, updateActionItemCollection, updateAgentFiles, updateAgentFunctions, updateAgents, updateBusinessEntities, updateConsentManagerToLatest, updateDataCategories, updateDataFlows, updateIntlMessages, updateOrCreateCookies, updatePolicies, updateProcessingPurposes, updatePromptGroups, updatePromptPartials, updatePrompts, updateRepositories, updateSoftwareDevelopmentKits, updateTeam, updateVendors, uploadSiloDiscoveryResults, validateSombraVersion, withTransientRetry };
|
|
9254
9686
|
|
|
9255
9687
|
//# sourceMappingURL=index.mjs.map
|