@transcend-io/sdk 1.4.0 → 1.6.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
@@ -3,7 +3,7 @@ import { GraphQLClient, gql } from "graphql-request";
3
3
  import got from "got";
4
4
  import { parse } from "graphql";
5
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, WorkflowConfigType, WorkflowConfigVisibility } from "@transcend-io/privacy-types";
6
+ import { AssessmentsDisplayLogicAction, AttributeKeyType, ComparisonOperator, ConsentTrackerStatus, EnricherType, IdentifierType, IsoCountryCode, IsoCountrySubdivisionCode, LogicOperator, OrderDirection, PolicyType, PreferenceQueryResponseItem, PreferenceStoreAuthLevel, PreferenceStoreIdentifier, PreferenceTopicType, PreferenceUpdateItem, RequestAction, WorkflowConfigType, WorkflowConfigVisibility } from "@transcend-io/privacy-types";
7
7
  import * as t from "io-ts";
8
8
  import { InitialViewState, KnownDefaultPurpose, OnConsentExpiry, UserPrivacySignalEnum } from "@transcend-io/airgap.js-types";
9
9
  import { apply, decodeCodec, valuesOf } from "@transcend-io/type-utils";
@@ -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$43 = 20;
287
+ const PAGE_SIZE$44 = 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$43,
302
+ first: PAGE_SIZE$44,
303
303
  offset
304
304
  },
305
305
  logger
306
306
  });
307
307
  businessEntities.push(...nodes);
308
- offset += PAGE_SIZE$43;
309
- shouldContinue = nodes.length === PAGE_SIZE$43;
308
+ offset += PAGE_SIZE$44;
309
+ shouldContinue = nodes.length === PAGE_SIZE$44;
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$42 = 20;
360
+ const PAGE_SIZE$43 = 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$42,
376
+ first: PAGE_SIZE$43,
377
377
  offset
378
378
  },
379
379
  logger
380
380
  });
381
381
  dataSubCategories.push(...nodes);
382
- offset += PAGE_SIZE$42;
383
- shouldContinue = nodes.length === PAGE_SIZE$42;
382
+ offset += PAGE_SIZE$43;
383
+ shouldContinue = nodes.length === PAGE_SIZE$43;
384
384
  } while (shouldContinue);
385
385
  return dataSubCategories.sort((a, b) => a.name.localeCompare(b.name));
386
386
  }
@@ -768,6 +768,20 @@ const DATA_SILOS_ENRICHED = gql`
768
768
  }
769
769
  }
770
770
  `;
771
+ /**
772
+ * Singular data silo fetch — `sombra` is available on `DataSilo` but not on
773
+ * the `DataSiloBulkPreview` nodes returned by the paginated `dataSilos` query.
774
+ */
775
+ const DATA_SILO_SOMBRA = gql`
776
+ query TranscendCliDataSiloSombra($id: String!) {
777
+ dataSilo(id: $id) {
778
+ id
779
+ sombra {
780
+ id
781
+ }
782
+ }
783
+ }
784
+ `;
771
785
  const UPDATE_DATA_SILOS = gql`
772
786
  mutation TranscendCliUpdateDataSilo($input: UpdateDataSilosInput!) {
773
787
  updateDataSilos(input: $input) {
@@ -860,7 +874,7 @@ const IDENTIFIERS = parse(gql`
860
874
  `);
861
875
  //#endregion
862
876
  //#region src/data-inventory/fetchAllIdentifiers.ts
863
- const PAGE_SIZE$41 = 20;
877
+ const PAGE_SIZE$42 = 20;
864
878
  /**
865
879
  * Fetch all identifiers in the organization
866
880
  *
@@ -877,13 +891,13 @@ async function fetchAllIdentifiers(client, options = {}) {
877
891
  const { identifiers: { nodes } } = await makeGraphQLRequest(client, IDENTIFIERS, {
878
892
  logger,
879
893
  variables: {
880
- first: PAGE_SIZE$41,
894
+ first: PAGE_SIZE$42,
881
895
  offset
882
896
  }
883
897
  });
884
898
  identifiers.push(...nodes);
885
- offset += PAGE_SIZE$41;
886
- shouldContinue = nodes.length === PAGE_SIZE$41;
899
+ offset += PAGE_SIZE$42;
900
+ shouldContinue = nodes.length === PAGE_SIZE$42;
887
901
  } while (shouldContinue);
888
902
  return identifiers.sort((a, b) => a.name.localeCompare(b.name));
889
903
  }
@@ -962,7 +976,7 @@ const UPDATE_PROCESSING_ACTIVITIES = gql`
962
976
  `;
963
977
  //#endregion
964
978
  //#region src/data-inventory/fetchAllProcessingActivities.ts
965
- const PAGE_SIZE$40 = 20;
979
+ const PAGE_SIZE$41 = 20;
966
980
  /**
967
981
  * Fetch all processingActivities in the organization
968
982
  *
@@ -978,14 +992,14 @@ async function fetchAllProcessingActivities(client, options = {}) {
978
992
  do {
979
993
  const { processingActivities: { nodes } } = await makeGraphQLRequest(client, PROCESSING_ACTIVITIES, {
980
994
  variables: {
981
- first: PAGE_SIZE$40,
995
+ first: PAGE_SIZE$41,
982
996
  offset
983
997
  },
984
998
  logger
985
999
  });
986
1000
  processingActivities.push(...nodes);
987
- offset += PAGE_SIZE$40;
988
- shouldContinue = nodes.length === PAGE_SIZE$40;
1001
+ offset += PAGE_SIZE$41;
1002
+ shouldContinue = nodes.length === PAGE_SIZE$41;
989
1003
  } while (shouldContinue);
990
1004
  return processingActivities.sort((a, b) => a.title.localeCompare(b.title));
991
1005
  }
@@ -1050,7 +1064,7 @@ const UPDATE_VENDORS = gql`
1050
1064
  `;
1051
1065
  //#endregion
1052
1066
  //#region src/data-inventory/fetchAllVendors.ts
1053
- const PAGE_SIZE$39 = 20;
1067
+ const PAGE_SIZE$40 = 20;
1054
1068
  /**
1055
1069
  * Fetch all vendors in the organization
1056
1070
  *
@@ -1065,14 +1079,14 @@ async function fetchAllVendors(client, options = {}) {
1065
1079
  do {
1066
1080
  const { vendors: { nodes } } = await makeGraphQLRequest(client, VENDORS, {
1067
1081
  variables: {
1068
- first: PAGE_SIZE$39,
1082
+ first: PAGE_SIZE$40,
1069
1083
  offset
1070
1084
  },
1071
1085
  logger
1072
1086
  });
1073
1087
  vendors.push(...nodes);
1074
- offset += PAGE_SIZE$39;
1075
- shouldContinue = nodes.length === PAGE_SIZE$39;
1088
+ offset += PAGE_SIZE$40;
1089
+ shouldContinue = nodes.length === PAGE_SIZE$40;
1076
1090
  } while (shouldContinue);
1077
1091
  return vendors.sort((a, b) => a.title.localeCompare(b.title));
1078
1092
  }
@@ -1096,6 +1110,13 @@ async function fetchEnrichedDataSilos(client, options) {
1096
1110
  gql: DATA_SILOS_ENRICHED,
1097
1111
  logger
1098
1112
  });
1113
+ await mapSeries(silos, async (silo) => {
1114
+ const { dataSilo: { sombra } } = await makeGraphQLRequest(client, DATA_SILO_SOMBRA, {
1115
+ variables: { id: silo.id },
1116
+ logger
1117
+ });
1118
+ silo.sombra = sombra;
1119
+ });
1099
1120
  if (!skipDatapoints) await mapSeries(silos, async (silo, index) => {
1100
1121
  logger.info(`[${index + 1}/${silos.length}] Fetching data silo - ${silo.title}`);
1101
1122
  const dataPoints = await fetchAllDataPoints(client, {
@@ -1109,6 +1130,9 @@ async function fetchEnrichedDataSilos(client, options) {
1109
1130
  if (debug) logger.info(`[${index + 1}/${silos.length}] Successfully fetched datapoint for - ${silo.title}`);
1110
1131
  dataSilos.push([silo, dataPoints]);
1111
1132
  });
1133
+ else silos.forEach((silo) => {
1134
+ dataSilos.push([silo, []]);
1135
+ });
1112
1136
  logger.info(`Successfully fetched all ${silos.length} data silo configurations`);
1113
1137
  return dataSilos;
1114
1138
  }
@@ -1541,7 +1565,7 @@ const UPDATE_PURPOSE = parse(gql`
1541
1565
  `);
1542
1566
  //#endregion
1543
1567
  //#region src/preference-management/fetchAllPurposes.ts
1544
- const PAGE_SIZE$38 = 20;
1568
+ const PAGE_SIZE$39 = 20;
1545
1569
  /**
1546
1570
  * Fetch all purposes in the organization
1547
1571
  *
@@ -1558,14 +1582,14 @@ async function fetchAllPurposes(client, options = {}) {
1558
1582
  const { purposes: { nodes } } = await makeGraphQLRequest(client, PURPOSES$1, {
1559
1583
  logger,
1560
1584
  variables: {
1561
- first: PAGE_SIZE$38,
1585
+ first: PAGE_SIZE$39,
1562
1586
  offset,
1563
1587
  input: { includeDeleted }
1564
1588
  }
1565
1589
  });
1566
1590
  purposes.push(...nodes);
1567
- offset += PAGE_SIZE$38;
1568
- shouldContinue = nodes.length === PAGE_SIZE$38;
1591
+ offset += PAGE_SIZE$39;
1592
+ shouldContinue = nodes.length === PAGE_SIZE$39;
1569
1593
  } while (shouldContinue);
1570
1594
  return purposes.sort((a, b) => a.trackingType.localeCompare(b.trackingType));
1571
1595
  }
@@ -1619,7 +1643,7 @@ const CREATE_OR_UPDATE_PREFERENCE_TOPIC = parse(gql`
1619
1643
  `);
1620
1644
  //#endregion
1621
1645
  //#region src/preference-management/fetchAllPreferenceTopics.ts
1622
- const PAGE_SIZE$37 = 20;
1646
+ const PAGE_SIZE$38 = 20;
1623
1647
  /**
1624
1648
  * Fetch all preference topics in the organization
1625
1649
  *
@@ -1636,13 +1660,13 @@ async function fetchAllPreferenceTopics(client, options = {}) {
1636
1660
  const { preferenceTopics: { nodes } } = await makeGraphQLRequest(client, PREFERENCE_TOPICS, {
1637
1661
  logger,
1638
1662
  variables: {
1639
- first: PAGE_SIZE$37,
1663
+ first: PAGE_SIZE$38,
1640
1664
  offset
1641
1665
  }
1642
1666
  });
1643
1667
  preferenceTopics.push(...nodes);
1644
- offset += PAGE_SIZE$37;
1645
- shouldContinue = nodes.length === PAGE_SIZE$37;
1668
+ offset += PAGE_SIZE$38;
1669
+ shouldContinue = nodes.length === PAGE_SIZE$38;
1646
1670
  } while (shouldContinue);
1647
1671
  return preferenceTopics.sort((a, b) => `${a.slug}:${a.purpose.trackingType}`.localeCompare(`${b.slug}:${b.purpose.trackingType}`));
1648
1672
  }
@@ -2816,7 +2840,7 @@ const CREATE_OR_UPDATE_PREFERENCE_OPTION_VALUES = parse(gql`
2816
2840
  `);
2817
2841
  //#endregion
2818
2842
  //#region src/preference-management/fetchAllPreferenceOptionValues.ts
2819
- const PAGE_SIZE$36 = 50;
2843
+ const PAGE_SIZE$37 = 50;
2820
2844
  /**
2821
2845
  * Fetch all preference option values in the organization
2822
2846
  *
@@ -2832,14 +2856,14 @@ async function fetchAllPreferenceOptionValues(client, options = {}) {
2832
2856
  do {
2833
2857
  const { preferenceOptionValues: { nodes } } = await makeGraphQLRequest(client, PREFERENCE_OPTION_VALUES, {
2834
2858
  variables: {
2835
- first: PAGE_SIZE$36,
2859
+ first: PAGE_SIZE$37,
2836
2860
  offset
2837
2861
  },
2838
2862
  logger
2839
2863
  });
2840
2864
  preferenceOptionValues.push(...nodes);
2841
- offset += PAGE_SIZE$36;
2842
- shouldContinue = nodes.length === PAGE_SIZE$36;
2865
+ offset += PAGE_SIZE$37;
2866
+ shouldContinue = nodes.length === PAGE_SIZE$37;
2843
2867
  } while (shouldContinue);
2844
2868
  return preferenceOptionValues.sort((a, b) => a.slug.localeCompare(b.slug));
2845
2869
  }
@@ -3230,7 +3254,7 @@ const SET_RESOURCE_ATTRIBUTES = gql`
3230
3254
  `;
3231
3255
  //#endregion
3232
3256
  //#region src/administration/fetchAllAttributes.ts
3233
- const PAGE_SIZE$35 = 100;
3257
+ const PAGE_SIZE$36 = 100;
3234
3258
  /**
3235
3259
  * Fetch all attribute values for an attribute key
3236
3260
  *
@@ -3246,15 +3270,15 @@ async function fetchAllAttributeValues(client, options) {
3246
3270
  do {
3247
3271
  const { attributeValues: { nodes } } = await makeGraphQLRequest(client, ATTRIBUTE_VALUES, {
3248
3272
  variables: {
3249
- first: PAGE_SIZE$35,
3273
+ first: PAGE_SIZE$36,
3250
3274
  offset,
3251
3275
  attributeKeyId
3252
3276
  },
3253
3277
  logger
3254
3278
  });
3255
3279
  attributeValues.push(...nodes);
3256
- offset += PAGE_SIZE$35;
3257
- shouldContinue = nodes.length === PAGE_SIZE$35;
3280
+ offset += PAGE_SIZE$36;
3281
+ shouldContinue = nodes.length === PAGE_SIZE$36;
3258
3282
  } while (shouldContinue);
3259
3283
  return attributeValues.sort((a, b) => a.name.localeCompare(b.name));
3260
3284
  }
@@ -3273,7 +3297,7 @@ async function fetchAllAttributes(client, options = {}) {
3273
3297
  do {
3274
3298
  const { attributeKeys: { nodes } } = await makeGraphQLRequest(client, ATTRIBUTES, {
3275
3299
  variables: {
3276
- first: PAGE_SIZE$35,
3300
+ first: PAGE_SIZE$36,
3277
3301
  offset
3278
3302
  },
3279
3303
  logger
@@ -3285,8 +3309,8 @@ async function fetchAllAttributes(client, options = {}) {
3285
3309
  filterBy: { attributeKeyId: node.id }
3286
3310
  }) : []
3287
3311
  }))));
3288
- offset += PAGE_SIZE$35;
3289
- shouldContinue = nodes.length === PAGE_SIZE$35;
3312
+ offset += PAGE_SIZE$36;
3313
+ shouldContinue = nodes.length === PAGE_SIZE$36;
3290
3314
  } while (shouldContinue);
3291
3315
  return attributes.sort((a, b) => a.name.localeCompare(b.name));
3292
3316
  }
@@ -3403,7 +3427,7 @@ const UPDATE_TEAM = gql`
3403
3427
  `;
3404
3428
  //#endregion
3405
3429
  //#region src/administration/fetchAllTeams.ts
3406
- const PAGE_SIZE$34 = 20;
3430
+ const PAGE_SIZE$35 = 20;
3407
3431
  /**
3408
3432
  * Fetch all teams in the organization
3409
3433
  *
@@ -3419,20 +3443,20 @@ async function fetchAllTeams(client, options = {}) {
3419
3443
  do {
3420
3444
  const { teams: { nodes } } = await makeGraphQLRequest(client, TEAMS, {
3421
3445
  variables: {
3422
- first: PAGE_SIZE$34,
3446
+ first: PAGE_SIZE$35,
3423
3447
  offset
3424
3448
  },
3425
3449
  logger
3426
3450
  });
3427
3451
  teams.push(...nodes);
3428
- offset += PAGE_SIZE$34;
3429
- shouldContinue = nodes.length === PAGE_SIZE$34;
3452
+ offset += PAGE_SIZE$35;
3453
+ shouldContinue = nodes.length === PAGE_SIZE$35;
3430
3454
  } while (shouldContinue);
3431
3455
  return teams.sort((a, b) => a.name.localeCompare(b.name));
3432
3456
  }
3433
3457
  //#endregion
3434
3458
  //#region src/administration/fetchParentOrganizationTeams.ts
3435
- const PAGE_SIZE$33 = 20;
3459
+ const PAGE_SIZE$34 = 20;
3436
3460
  /**
3437
3461
  * Fetch teams from the parent organization that can be linked to child-org teams
3438
3462
  *
@@ -3448,15 +3472,15 @@ async function fetchParentOrganizationTeams(client, options = {}) {
3448
3472
  do {
3449
3473
  const { parentOrganizationTeams: { nodes } } = await makeGraphQLRequest(client, PARENT_ORGANIZATION_TEAMS, {
3450
3474
  variables: {
3451
- first: PAGE_SIZE$33,
3475
+ first: PAGE_SIZE$34,
3452
3476
  offset,
3453
3477
  filterBy
3454
3478
  },
3455
3479
  logger
3456
3480
  });
3457
3481
  teams.push(...nodes);
3458
- offset += PAGE_SIZE$33;
3459
- shouldContinue = nodes.length === PAGE_SIZE$33;
3482
+ offset += PAGE_SIZE$34;
3483
+ shouldContinue = nodes.length === PAGE_SIZE$34;
3460
3484
  } while (shouldContinue);
3461
3485
  return teams.sort((a, b) => a.name.localeCompare(b.name));
3462
3486
  }
@@ -3502,7 +3526,7 @@ const USERS = gql`
3502
3526
  `;
3503
3527
  //#endregion
3504
3528
  //#region src/administration/fetchAllUsers.ts
3505
- const PAGE_SIZE$32 = 20;
3529
+ const PAGE_SIZE$33 = 20;
3506
3530
  /**
3507
3531
  * Fetch all users in the organization
3508
3532
  *
@@ -3518,14 +3542,14 @@ async function fetchAllUsers(client, options = {}) {
3518
3542
  do {
3519
3543
  const { users: { nodes } } = await makeGraphQLRequest(client, USERS, {
3520
3544
  variables: {
3521
- first: PAGE_SIZE$32,
3545
+ first: PAGE_SIZE$33,
3522
3546
  offset
3523
3547
  },
3524
3548
  logger
3525
3549
  });
3526
3550
  users.push(...nodes);
3527
- offset += PAGE_SIZE$32;
3528
- shouldContinue = nodes.length === PAGE_SIZE$32;
3551
+ offset += PAGE_SIZE$33;
3552
+ shouldContinue = nodes.length === PAGE_SIZE$33;
3529
3553
  } while (shouldContinue);
3530
3554
  return users.sort((a, b) => a.email.localeCompare(b.email));
3531
3555
  }
@@ -3567,7 +3591,7 @@ const DELETE_API_KEY = gql`
3567
3591
  `;
3568
3592
  //#endregion
3569
3593
  //#region src/administration/fetchApiKeys.ts
3570
- const PAGE_SIZE$31 = 20;
3594
+ const PAGE_SIZE$32 = 20;
3571
3595
  const ADMIN_LINK = "https://app.transcend.io/infrastructure/api-keys";
3572
3596
  /**
3573
3597
  * Fetch all API keys in an organization
@@ -3584,15 +3608,15 @@ async function fetchAllApiKeys(client, options = {}) {
3584
3608
  do {
3585
3609
  const { apiKeys: { nodes } } = await makeGraphQLRequest(client, API_KEYS, {
3586
3610
  variables: {
3587
- first: PAGE_SIZE$31,
3611
+ first: PAGE_SIZE$32,
3588
3612
  offset,
3589
3613
  titles
3590
3614
  },
3591
3615
  logger
3592
3616
  });
3593
3617
  apiKeys.push(...nodes);
3594
- offset += PAGE_SIZE$31;
3595
- shouldContinue = nodes.length === PAGE_SIZE$31;
3618
+ offset += PAGE_SIZE$32;
3619
+ shouldContinue = nodes.length === PAGE_SIZE$32;
3596
3620
  } while (shouldContinue);
3597
3621
  return apiKeys.sort((a, b) => a.title.localeCompare(b.title));
3598
3622
  }
@@ -4567,7 +4591,7 @@ const DELETE_COOKIES = gql`
4567
4591
  `;
4568
4592
  //#endregion
4569
4593
  //#region src/consent/fetchAllCookies.ts
4570
- const PAGE_SIZE$30 = 20;
4594
+ const PAGE_SIZE$31 = 20;
4571
4595
  const DEFAULT_COOKIE_ORDER = [{
4572
4596
  field: "createdAt",
4573
4597
  direction: OrderDirection.Asc
@@ -4592,7 +4616,7 @@ async function fetchAllCookies(client, options = {}) {
4592
4616
  const { cookies: { nodes } } = await makeGraphQLRequest(client, COOKIES, {
4593
4617
  variables: {
4594
4618
  input: { airgapBundleId },
4595
- first: PAGE_SIZE$30,
4619
+ first: PAGE_SIZE$31,
4596
4620
  offset,
4597
4621
  filterBy: { status },
4598
4622
  orderBy
@@ -4600,8 +4624,8 @@ async function fetchAllCookies(client, options = {}) {
4600
4624
  logger
4601
4625
  });
4602
4626
  cookies.push(...nodes);
4603
- offset += PAGE_SIZE$30;
4604
- shouldContinue = nodes.length === PAGE_SIZE$30;
4627
+ offset += PAGE_SIZE$31;
4628
+ shouldContinue = nodes.length === PAGE_SIZE$31;
4605
4629
  } while (shouldContinue);
4606
4630
  return cookies.sort((a, b) => a.name.localeCompare(b.name));
4607
4631
  }
@@ -4713,7 +4737,7 @@ const DELETE_DATA_FLOWS = gql`
4713
4737
  `;
4714
4738
  //#endregion
4715
4739
  //#region src/consent/fetchAllDataFlows.ts
4716
- const PAGE_SIZE$29 = 20;
4740
+ const PAGE_SIZE$30 = 20;
4717
4741
  const DEFAULT_DATA_FLOW_ORDER = [{
4718
4742
  field: "createdAt",
4719
4743
  direction: OrderDirection.Asc
@@ -4738,7 +4762,7 @@ async function fetchAllDataFlows(client, options = {}) {
4738
4762
  const { dataFlows: { nodes } } = await makeGraphQLRequest(client, DATA_FLOWS, {
4739
4763
  variables: {
4740
4764
  input: { airgapBundleId },
4741
- first: PAGE_SIZE$29,
4765
+ first: PAGE_SIZE$30,
4742
4766
  offset,
4743
4767
  filterBy: {
4744
4768
  status,
@@ -4749,8 +4773,8 @@ async function fetchAllDataFlows(client, options = {}) {
4749
4773
  logger
4750
4774
  });
4751
4775
  dataFlows.push(...nodes);
4752
- offset += PAGE_SIZE$29;
4753
- shouldContinue = nodes.length === PAGE_SIZE$29;
4776
+ offset += PAGE_SIZE$30;
4777
+ shouldContinue = nodes.length === PAGE_SIZE$30;
4754
4778
  } while (shouldContinue);
4755
4779
  return dataFlows.sort((a, b) => a.value.localeCompare(b.value));
4756
4780
  }
@@ -4792,7 +4816,36 @@ const PRIVACY_CENTER = gql`
4792
4816
  useNoReplyEmailAddress
4793
4817
  useCustomEmailDomain
4794
4818
  transformAccessReportJsonToCsv
4819
+ home {
4820
+ defaultMessage
4821
+ }
4822
+ expandSideMenuByDefault
4823
+ workflowsCustomFieldsRequired
4824
+ footerLayout
4795
4825
  themeStr
4826
+ childOrganizations {
4827
+ id
4828
+ uri
4829
+ name
4830
+ }
4831
+ footerLinks {
4832
+ id
4833
+ displayOrder
4834
+ title {
4835
+ defaultMessage
4836
+ }
4837
+ url {
4838
+ defaultMessage
4839
+ }
4840
+ icon {
4841
+ id
4842
+ src
4843
+ key
4844
+ size
4845
+ mimetype
4846
+ }
4847
+ iconOnly
4848
+ }
4796
4849
  }
4797
4850
  }
4798
4851
  `;
@@ -4803,6 +4856,25 @@ const UPDATE_PRIVACY_CENTER = gql`
4803
4856
  }
4804
4857
  }
4805
4858
  `;
4859
+ const UPDATE_PRIVACY_CENTER_FOOTER_LINKS = gql`
4860
+ mutation TranscendCliUpdatePrivacyCenterFooterLinks(
4861
+ $input: UpdatePrivacyCenterFooterLinksInput!
4862
+ ) {
4863
+ updatePrivacyCenterFooterLinks(input: $input) {
4864
+ clientMutationId
4865
+ }
4866
+ }
4867
+ `;
4868
+ const DELETE_PRIVACY_CENTER_FOOTER_LINKS = gql`
4869
+ mutation TranscendCliDeletePrivacyCenterFooterLinks(
4870
+ $input: DeletePrivacyCenterFooterLinksInput!
4871
+ ) {
4872
+ deletePrivacyCenterFooterLinks(input: $input) {
4873
+ clientMutationId
4874
+ success
4875
+ }
4876
+ }
4877
+ `;
4806
4878
  //#endregion
4807
4879
  //#region src/consent/fetchPrivacyCenterId.ts
4808
4880
  /**
@@ -4842,6 +4914,7 @@ const POLICIES = gql`
4842
4914
  title {
4843
4915
  defaultMessage
4844
4916
  }
4917
+ type
4845
4918
  disableEffectiveOn
4846
4919
  disabledLocales
4847
4920
  versions {
@@ -4890,12 +4963,21 @@ async function fetchAllPolicies(client, options = {}) {
4890
4963
  */
4891
4964
  async function fetchAllPrivacyCenters(client, options = {}) {
4892
4965
  const { logger } = options;
4893
- const { privacyCenter: { themeStr, ...rest } } = await makeGraphQLRequest(client, PRIVACY_CENTER, {
4966
+ const { privacyCenter: { themeStr, footerLinks, home, ...rest } } = await makeGraphQLRequest(client, PRIVACY_CENTER, {
4894
4967
  variables: { url: await fetchPrivacyCenterUrl(client, { logger }) },
4895
4968
  logger
4896
4969
  });
4897
4970
  return [{
4898
4971
  ...rest,
4972
+ home: home.defaultMessage,
4973
+ footerLinks: footerLinks.map((link) => ({
4974
+ id: link.id,
4975
+ displayOrder: link.displayOrder,
4976
+ title: link.title,
4977
+ url: link.url.defaultMessage,
4978
+ ...link.icon ? { icon: link.icon } : {},
4979
+ iconOnly: link.iconOnly
4980
+ })),
4899
4981
  theme: JSON.parse(themeStr)
4900
4982
  }];
4901
4983
  }
@@ -4954,7 +5036,7 @@ const UPDATE_PROCESSING_PURPOSE_SUB_CATEGORIES = gql`
4954
5036
  `;
4955
5037
  //#endregion
4956
5038
  //#region src/consent/fetchAllProcessingPurposes.ts
4957
- const PAGE_SIZE$28 = 20;
5039
+ const PAGE_SIZE$29 = 20;
4958
5040
  /**
4959
5041
  * Fetch all processingPurposeSubCategories in the organization
4960
5042
  *
@@ -4969,14 +5051,14 @@ async function fetchAllProcessingPurposes(client, options = {}) {
4969
5051
  do {
4970
5052
  const { processingPurposeSubCategories: { nodes } } = await makeGraphQLRequest(client, PROCESSING_PURPOSE_SUB_CATEGORIES, {
4971
5053
  variables: {
4972
- first: PAGE_SIZE$28,
5054
+ first: PAGE_SIZE$29,
4973
5055
  offset
4974
5056
  },
4975
5057
  logger: options.logger
4976
5058
  });
4977
5059
  processingPurposeSubCategories.push(...nodes);
4978
- offset += PAGE_SIZE$28;
4979
- shouldContinue = nodes.length === PAGE_SIZE$28;
5060
+ offset += PAGE_SIZE$29;
5061
+ shouldContinue = nodes.length === PAGE_SIZE$29;
4980
5062
  } while (shouldContinue);
4981
5063
  return processingPurposeSubCategories.sort((a, b) => a.name.localeCompare(b.name));
4982
5064
  }
@@ -5078,7 +5160,7 @@ const CREATE_CONSENT_EXPERIENCE = gql`
5078
5160
  `;
5079
5161
  //#endregion
5080
5162
  //#region src/consent/fetchConsentManagerExperiences.ts
5081
- const PAGE_SIZE$27 = 50;
5163
+ const PAGE_SIZE$28 = 50;
5082
5164
  /**
5083
5165
  * Fetch consent manager experiences
5084
5166
  *
@@ -5093,14 +5175,14 @@ async function fetchConsentManagerExperiences(client, options = {}) {
5093
5175
  do {
5094
5176
  const { experiences: { nodes } } = await makeGraphQLRequest(client, EXPERIENCES, {
5095
5177
  variables: {
5096
- first: PAGE_SIZE$27,
5178
+ first: PAGE_SIZE$28,
5097
5179
  offset
5098
5180
  },
5099
5181
  logger: options.logger
5100
5182
  });
5101
5183
  experiences.push(...nodes);
5102
- offset += PAGE_SIZE$27;
5103
- shouldContinue = nodes.length === PAGE_SIZE$27;
5184
+ offset += PAGE_SIZE$28;
5185
+ shouldContinue = nodes.length === PAGE_SIZE$28;
5104
5186
  } while (shouldContinue);
5105
5187
  return experiences.sort((a, b) => a.name.localeCompare(b.name));
5106
5188
  }
@@ -5122,7 +5204,7 @@ async function fetchConsentManagerTheme(client, options) {
5122
5204
  }
5123
5205
  //#endregion
5124
5206
  //#region src/consent/fetchConsentThemes.ts
5125
- const PAGE_SIZE$26 = 50;
5207
+ const PAGE_SIZE$27 = 50;
5126
5208
  /**
5127
5209
  * Fetch consent themes
5128
5210
  *
@@ -5139,20 +5221,20 @@ async function fetchConsentThemes(client, options = {}) {
5139
5221
  const { consentUiThemes: { nodes } } = await makeGraphQLRequest(client, FETCH_CONSENT_UI_THEMES, {
5140
5222
  variables: {
5141
5223
  airgapBundleId,
5142
- first: PAGE_SIZE$26,
5224
+ first: PAGE_SIZE$27,
5143
5225
  offset
5144
5226
  },
5145
5227
  logger: options.logger
5146
5228
  });
5147
5229
  themes.push(...nodes);
5148
- offset += PAGE_SIZE$26;
5149
- shouldContinue = nodes.length === PAGE_SIZE$26;
5230
+ offset += PAGE_SIZE$27;
5231
+ shouldContinue = nodes.length === PAGE_SIZE$27;
5150
5232
  } while (shouldContinue);
5151
5233
  return themes;
5152
5234
  }
5153
5235
  //#endregion
5154
5236
  //#region src/consent/fetchConsentVariants.ts
5155
- const PAGE_SIZE$25 = 50;
5237
+ const PAGE_SIZE$26 = 50;
5156
5238
  /**
5157
5239
  * Fetch consent variants
5158
5240
  *
@@ -5169,14 +5251,14 @@ async function fetchConsentVariants(client, options = {}) {
5169
5251
  const { consentUiVariants: { nodes } } = await makeGraphQLRequest(client, FETCH_CONSENT_UI_VARIANTS, {
5170
5252
  variables: {
5171
5253
  airgapBundleId,
5172
- first: PAGE_SIZE$25,
5254
+ first: PAGE_SIZE$26,
5173
5255
  offset
5174
5256
  },
5175
5257
  logger: options.logger
5176
5258
  });
5177
5259
  variants.push(...nodes);
5178
- offset += PAGE_SIZE$25;
5179
- shouldContinue = nodes.length === PAGE_SIZE$25;
5260
+ offset += PAGE_SIZE$26;
5261
+ shouldContinue = nodes.length === PAGE_SIZE$26;
5180
5262
  } while (shouldContinue);
5181
5263
  return variants;
5182
5264
  }
@@ -5337,6 +5419,67 @@ const DATA_FLOW_STATS = gql`
5337
5419
  }
5338
5420
  `;
5339
5421
  //#endregion
5422
+ //#region src/consent/gqls/consentWorkflowTrigger.ts
5423
+ const CONSENT_WORKFLOW_TRIGGERS = parse(gql`
5424
+ query TranscendCliConsentWorkflowTriggers($first: Int!, $offset: Int!) {
5425
+ consentWorkflowTriggers(first: $first, offset: $offset) {
5426
+ nodes {
5427
+ id
5428
+ name
5429
+ triggerCondition
5430
+ isSilent
5431
+ allowUnauthenticated
5432
+ isActive
5433
+ workflowConfigId
5434
+ action {
5435
+ type
5436
+ }
5437
+ subject {
5438
+ type
5439
+ }
5440
+ dataSilos {
5441
+ title
5442
+ }
5443
+ }
5444
+ totalCount
5445
+ }
5446
+ }
5447
+ `);
5448
+ const CREATE_OR_UPDATE_CONSENT_WORKFLOW_TRIGGER = parse(gql`
5449
+ mutation TranscendCliCreateOrUpdateConsentWorkflowTrigger(
5450
+ $input: CreateOrUpdateConsentWorkflowTriggerInput!
5451
+ ) {
5452
+ createOrUpdateConsentWorkflowTrigger(input: $input) {
5453
+ consentWorkflowTrigger {
5454
+ id
5455
+ name
5456
+ }
5457
+ }
5458
+ }
5459
+ `);
5460
+ //#endregion
5461
+ //#region src/consent/resolveDisplayedChildOrganizationIds.ts
5462
+ /**
5463
+ * Resolve displayed child organization URIs or IDs to organization IDs.
5464
+ *
5465
+ * Each value may be either an organization ID or URI. IDs are matched first,
5466
+ * then URIs. Throws if any value cannot be resolved.
5467
+ *
5468
+ * @param childOrganizations - Child organizations available on the privacy center
5469
+ * @param urisOrIds - URIs and/or IDs from transcend.yml
5470
+ * @returns Resolved organization IDs (same order as input)
5471
+ */
5472
+ function resolveDisplayedChildOrganizationIds(childOrganizations, urisOrIds) {
5473
+ return urisOrIds.map((value) => {
5474
+ const byId = childOrganizations.find((child) => child.id === value);
5475
+ if (byId) return byId.id;
5476
+ const byUri = childOrganizations.find((child) => child.uri === value);
5477
+ if (byUri) return byUri.id;
5478
+ const available = childOrganizations.length > 0 ? childOrganizations.map((child) => `${child.uri} (${child.id})`).join(", ") : "(none)";
5479
+ throw new Error(`Failed to resolve displayed child organization URI or ID: "${value}". Available: ${available}`);
5480
+ });
5481
+ }
5482
+ //#endregion
5340
5483
  //#region src/consent/syncConsentUi.ts
5341
5484
  /**
5342
5485
  * Parse a JSON configuration string from transcend.yml
@@ -5467,7 +5610,7 @@ async function syncConsentUiVariants(client, airgapBundleId, yamlVariants, synce
5467
5610
  }
5468
5611
  //#endregion
5469
5612
  //#region src/consent/syncPartitions.ts
5470
- const PAGE_SIZE$24 = 50;
5613
+ const PAGE_SIZE$25 = 50;
5471
5614
  /**
5472
5615
  * Fetch the list of partitions
5473
5616
  *
@@ -5483,14 +5626,14 @@ async function fetchPartitions(client, options = {}) {
5483
5626
  do {
5484
5627
  const { consentPartitions: { nodes } } = await makeGraphQLRequest(client, CONSENT_PARTITIONS, {
5485
5628
  variables: {
5486
- first: PAGE_SIZE$24,
5629
+ first: PAGE_SIZE$25,
5487
5630
  offset
5488
5631
  },
5489
5632
  logger
5490
5633
  });
5491
5634
  partitions.push(...nodes);
5492
- offset += PAGE_SIZE$24;
5493
- shouldContinue = nodes.length === PAGE_SIZE$24;
5635
+ offset += PAGE_SIZE$25;
5636
+ shouldContinue = nodes.length === PAGE_SIZE$25;
5494
5637
  } while (shouldContinue);
5495
5638
  return partitions.sort((a, b) => a.name.localeCompare(b.name));
5496
5639
  }
@@ -5868,6 +6011,17 @@ async function syncDataFlows(client, dataFlows, options = {}) {
5868
6011
  //#region src/consent/syncPolicies.ts
5869
6012
  const MAX_PAGE_SIZE = 100;
5870
6013
  /**
6014
+ * Infer PolicyType from a policy title when type is not provided on create.
6015
+ *
6016
+ * @param title - Policy title
6017
+ * @returns Inferred policy type
6018
+ */
6019
+ function inferPolicyTypeFromTitle(title) {
6020
+ if (title === "Privacy Policy") return PolicyType.PrivacyPolicy;
6021
+ if (title === "Cookie Policy") return PolicyType.CookiePolicy;
6022
+ return PolicyType.Custom;
6023
+ }
6024
+ /**
5871
6025
  * Update or create policies
5872
6026
  *
5873
6027
  * @param client - GraphQL client
@@ -5883,6 +6037,7 @@ async function updatePolicies(client, options) {
5883
6037
  policies: page.map(([policy, policyId]) => ({
5884
6038
  id: policyId,
5885
6039
  title: policy.title,
6040
+ ...!policyId ? { type: policy.type ?? inferPolicyTypeFromTitle(policy.title) } : {},
5886
6041
  disableEffectiveOn: policy.disableEffectiveOn,
5887
6042
  disabledLocales: policy.disabledLocales,
5888
6043
  ...policy.effectiveOn || policy.content ? { version: {
@@ -5924,6 +6079,54 @@ async function syncPolicies(client, policies, options = {}) {
5924
6079
  return !encounteredError;
5925
6080
  }
5926
6081
  //#endregion
6082
+ //#region src/consent/syncPrivacyCenterFooterLinks.ts
6083
+ /**
6084
+ * Sync privacy center footer links. Matches existing links by title, upserts
6085
+ * the provided list, and deletes any existing links omitted from the YAML.
6086
+ *
6087
+ * @param client - GraphQL client
6088
+ * @param privacyCenterId - Privacy center ID
6089
+ * @param footerLinks - Desired footer links
6090
+ * @param existingFooterLinks - Existing footer links from the privacy center
6091
+ * @param options - Options
6092
+ */
6093
+ async function syncPrivacyCenterFooterLinks(client, privacyCenterId, footerLinks, existingFooterLinks, options = {}) {
6094
+ const { logger = NOOP_LOGGER } = options;
6095
+ const notUnique = footerLinks.filter((link) => footerLinks.filter((other) => other.title === link.title).length > 1);
6096
+ if (notUnique.length > 0) throw new Error(`Failed to sync privacy center footer links as there were non-unique titles: ${[...new Set(notUnique.map(({ title }) => title))].join(", ")}`);
6097
+ const existingByTitle = keyBy(existingFooterLinks, ({ title }) => title.defaultMessage);
6098
+ const resolved = footerLinks.map((link) => {
6099
+ return {
6100
+ id: existingByTitle[link.title]?.id,
6101
+ title: link.title,
6102
+ ...link.url !== void 0 ? { url: link.url } : {},
6103
+ ...link.iconOnly !== void 0 ? { iconOnly: link.iconOnly } : {}
6104
+ };
6105
+ });
6106
+ const keptIds = new Set(resolved.map((link) => link.id).filter((id) => !!id));
6107
+ const idsToDelete = existingFooterLinks.map(({ id }) => id).filter((id) => !keptIds.has(id));
6108
+ if (idsToDelete.length > 0) {
6109
+ logger.info(`Deleting "${idsToDelete.length}" privacy center footer links...`);
6110
+ await makeGraphQLRequest(client, DELETE_PRIVACY_CENTER_FOOTER_LINKS, {
6111
+ variables: { input: {
6112
+ privacyCenterId,
6113
+ ids: idsToDelete
6114
+ } },
6115
+ logger
6116
+ });
6117
+ }
6118
+ if (resolved.length > 0) {
6119
+ logger.info(`Upserting "${resolved.length}" privacy center footer links...`);
6120
+ await makeGraphQLRequest(client, UPDATE_PRIVACY_CENTER_FOOTER_LINKS, {
6121
+ variables: { input: {
6122
+ privacyCenterId,
6123
+ footerLinks: resolved
6124
+ } },
6125
+ logger
6126
+ });
6127
+ }
6128
+ }
6129
+ //#endregion
5927
6130
  //#region src/consent/syncPrivacyCenter.ts
5928
6131
  /**
5929
6132
  * Sync the privacy center
@@ -5934,10 +6137,14 @@ async function syncPolicies(client, policies, options = {}) {
5934
6137
  * @returns Whether the privacy center was synced successfully
5935
6138
  */
5936
6139
  async function syncPrivacyCenter(client, privacyCenter, options = {}) {
5937
- const { logger = NOOP_LOGGER } = options;
6140
+ const { logger = NOOP_LOGGER, skipPublish } = options;
5938
6141
  let encounteredError = false;
5939
6142
  logger.info("Syncing privacy center...");
5940
6143
  const privacyCenterId = await fetchPrivacyCenterId(client, { logger });
6144
+ const { displayedChildOrganizationUris, footerLinks } = privacyCenter;
6145
+ const [existing] = !!displayedChildOrganizationUris || footerLinks !== void 0 ? await fetchAllPrivacyCenters(client, { logger }) : [];
6146
+ let displayedChildOrganizationIds;
6147
+ if (displayedChildOrganizationUris) displayedChildOrganizationIds = resolveDisplayedChildOrganizationIds(existing?.childOrganizations ?? [], displayedChildOrganizationUris);
5941
6148
  try {
5942
6149
  await makeGraphQLRequest(client, UPDATE_PRIVACY_CENTER, {
5943
6150
  variables: { input: {
@@ -5959,6 +6166,12 @@ async function syncPrivacyCenter(client, privacyCenter, options = {}) {
5959
6166
  showTrackingTechnologies: privacyCenter.showTrackingTechnologies,
5960
6167
  showPrivacyRequestButton: privacyCenter.showPrivacyRequestButton,
5961
6168
  isDisabled: privacyCenter.isDisabled,
6169
+ home: privacyCenter.home,
6170
+ expandSideMenuByDefault: privacyCenter.expandSideMenuByDefault,
6171
+ workflowsCustomFieldsRequired: privacyCenter.workflowsCustomFieldsRequired,
6172
+ footerLayout: privacyCenter.footerLayout,
6173
+ ...displayedChildOrganizationIds ? { displayedChildOrganizationIds } : {},
6174
+ ...skipPublish !== void 0 ? { skipPublish } : {},
5962
6175
  ...privacyCenter.theme ? {
5963
6176
  colorPalette: privacyCenter.theme.colors,
5964
6177
  componentStyles: privacyCenter.theme.componentStyles,
@@ -5967,14 +6180,503 @@ async function syncPrivacyCenter(client, privacyCenter, options = {}) {
5967
6180
  } },
5968
6181
  logger
5969
6182
  });
6183
+ if (footerLinks !== void 0) await syncPrivacyCenterFooterLinks(client, privacyCenterId, footerLinks, existing?.footerLinks ?? [], { logger });
5970
6184
  logger.info("Successfully synced privacy center!");
5971
6185
  } catch (err) {
5972
6186
  encounteredError = true;
5973
- logger.error(`Failed to create privacy center! - ${err.message}`);
6187
+ logger.error(`Failed to sync privacy center! - ${err.message}`);
5974
6188
  }
5975
6189
  return !encounteredError;
5976
6190
  }
5977
6191
  //#endregion
6192
+ //#region src/consent/fetchAllConsentWorkflowTriggers.ts
6193
+ const PAGE_SIZE$24 = 50;
6194
+ /**
6195
+ * Fetch all consent workflow triggers in the organization
6196
+ *
6197
+ * @param client - GraphQL client
6198
+ * @param options - Options
6199
+ * @returns All consent workflow triggers in the organization
6200
+ */
6201
+ async function fetchAllConsentWorkflowTriggers(client, options = {}) {
6202
+ const { logger } = options;
6203
+ const triggers = [];
6204
+ let offset = 0;
6205
+ let shouldContinue = false;
6206
+ do {
6207
+ const { consentWorkflowTriggers: { nodes } } = await makeGraphQLRequest(client, CONSENT_WORKFLOW_TRIGGERS, {
6208
+ variables: {
6209
+ first: PAGE_SIZE$24,
6210
+ offset
6211
+ },
6212
+ logger
6213
+ });
6214
+ triggers.push(...nodes);
6215
+ offset += PAGE_SIZE$24;
6216
+ shouldContinue = nodes.length === PAGE_SIZE$24;
6217
+ } while (shouldContinue);
6218
+ return triggers.sort((a, b) => a.name.localeCompare(b.name));
6219
+ }
6220
+ //#endregion
6221
+ //#region src/dsr-automation/gqls/action.ts
6222
+ const ACTIONS = gql`
6223
+ query TranscendCliActions($first: Int!, $offset: Int!) {
6224
+ actions(
6225
+ first: $first
6226
+ offset: $offset
6227
+ useMaster: false
6228
+ orderBy: [{ field: type, direction: ASC }]
6229
+ ) {
6230
+ nodes {
6231
+ id
6232
+ type
6233
+ skipSecondaryIfNoFiles
6234
+ skipDownloadableStep
6235
+ requiresReview
6236
+ regionList
6237
+ regionDetectionMethod
6238
+ waitingPeriod
6239
+ }
6240
+ }
6241
+ }
6242
+ `;
6243
+ const UPDATE_ACTION = gql`
6244
+ mutation TranscendCliUpdateAction($input: UpdateActionInput!) {
6245
+ updateAction(input: $input) {
6246
+ clientMutationId
6247
+ }
6248
+ }
6249
+ `;
6250
+ //#endregion
6251
+ //#region src/dsr-automation/fetchAllActions.ts
6252
+ const PAGE_SIZE$23 = 20;
6253
+ /**
6254
+ * Fetch all actions in the organization
6255
+ *
6256
+ * @param client - GraphQL client
6257
+ * @param options - Options
6258
+ * @returns All actions in the organization
6259
+ */
6260
+ async function fetchAllActions(client, options = {}) {
6261
+ const { logger } = options;
6262
+ const actions = [];
6263
+ let offset = 0;
6264
+ let shouldContinue = false;
6265
+ do {
6266
+ const { actions: { nodes } } = await makeGraphQLRequest(client, ACTIONS, {
6267
+ variables: {
6268
+ first: PAGE_SIZE$23,
6269
+ offset
6270
+ },
6271
+ logger
6272
+ });
6273
+ actions.push(...nodes);
6274
+ offset += PAGE_SIZE$23;
6275
+ shouldContinue = nodes.length === PAGE_SIZE$23;
6276
+ } while (shouldContinue);
6277
+ return actions.sort((a, b) => a.type.localeCompare(b.type));
6278
+ }
6279
+ //#endregion
6280
+ //#region src/dsr-automation/gqls/workflowConfig.ts
6281
+ const WORKFLOW_CONFIGS = parse(gql`
6282
+ query TranscendCliWorkflowConfigs($first: Int!, $offset: Int!, $filterBy: WorkflowFilterInput) {
6283
+ workflows(first: $first, offset: $offset, filterBy: $filterBy) {
6284
+ nodes {
6285
+ id
6286
+ title {
6287
+ defaultMessage
6288
+ }
6289
+ subtitle {
6290
+ defaultMessage
6291
+ }
6292
+ description {
6293
+ defaultMessage
6294
+ }
6295
+ internalName
6296
+ workflowConfigVisibility
6297
+ workflowConfigType
6298
+ collectDataSubjectRegions
6299
+ regionList
6300
+ expiryTime {
6301
+ region
6302
+ value
6303
+ }
6304
+ action {
6305
+ id
6306
+ type
6307
+ }
6308
+ subject {
6309
+ id
6310
+ type
6311
+ }
6312
+ WorkflowConfigAttributeKeys {
6313
+ attributeKey {
6314
+ id
6315
+ name
6316
+ }
6317
+ }
6318
+ }
6319
+ totalCount
6320
+ }
6321
+ }
6322
+ `);
6323
+ const CREATE_WORKFLOW = parse(gql`
6324
+ mutation TranscendCliCreateWorkflow($input: CreateWorkflowInput!) {
6325
+ createWorkflow(input: $input) {
6326
+ workflowConfig {
6327
+ id
6328
+ internalName
6329
+ }
6330
+ }
6331
+ }
6332
+ `);
6333
+ const UPDATE_WORKFLOW_CONFIG = parse(gql`
6334
+ mutation TranscendCliUpdateWorkflowConfig($input: UpdateWorkflowConfigInput!) {
6335
+ updateWorkflowConfig(input: $input) {
6336
+ success
6337
+ }
6338
+ }
6339
+ `);
6340
+ //#endregion
6341
+ //#region src/dsr-automation/fetchAllWorkflowConfigs.ts
6342
+ const PAGE_SIZE$22 = 50;
6343
+ /**
6344
+ * Display title for a workflow config, matching the admin UI:
6345
+ * `internalName` when set, otherwise the external title.
6346
+ *
6347
+ * @param workflow - Workflow config
6348
+ * @returns Display title used in Preference Workflows dropdown
6349
+ */
6350
+ function getWorkflowConfigDisplayTitle(workflow) {
6351
+ return workflow.internalName || workflow.title.defaultMessage;
6352
+ }
6353
+ /**
6354
+ * Fetch all workflow configs in the organization
6355
+ *
6356
+ * @param client - GraphQL client
6357
+ * @param options - Options
6358
+ * @returns All workflow configs
6359
+ */
6360
+ async function fetchAllWorkflowConfigs(client, options = {}) {
6361
+ const { logger, workflowConfigType } = options;
6362
+ const configs = [];
6363
+ let offset = 0;
6364
+ let shouldContinue = false;
6365
+ do {
6366
+ const { workflows: { nodes } } = await makeGraphQLRequest(client, WORKFLOW_CONFIGS, {
6367
+ variables: {
6368
+ first: PAGE_SIZE$22,
6369
+ offset,
6370
+ filterBy: workflowConfigType ? { workflowConfigType } : void 0
6371
+ },
6372
+ logger
6373
+ });
6374
+ configs.push(...nodes);
6375
+ offset += PAGE_SIZE$22;
6376
+ shouldContinue = nodes.length === PAGE_SIZE$22;
6377
+ } while (shouldContinue);
6378
+ return configs.sort((a, b) => getWorkflowConfigDisplayTitle(a).localeCompare(getWorkflowConfigDisplayTitle(b)));
6379
+ }
6380
+ /**
6381
+ * Resolve a YAML `workflow-title` to a DSR workflow config.
6382
+ * Matches against display title (`internalName` or external title).
6383
+ *
6384
+ * @param workflows - Candidate workflow configs
6385
+ * @param workflowTitle - Title from transcend.yml
6386
+ * @returns Matching workflow
6387
+ */
6388
+ function resolveWorkflowConfigByTitle(workflows, workflowTitle) {
6389
+ const matches = workflows.filter((workflow) => getWorkflowConfigDisplayTitle(workflow) === workflowTitle);
6390
+ if (matches.length === 0) throw new Error(`Failed to find DSR workflow with title: ${workflowTitle}. Use the workflow internal name when set, otherwise the external title.`);
6391
+ if (matches.length > 1) throw new Error(`Found multiple DSR workflows with title: ${workflowTitle}. Set a unique internalName on the workflow in the Admin Dashboard.`);
6392
+ const [match] = matches;
6393
+ if (!match) throw new Error(`Failed to find DSR workflow with title: ${workflowTitle}.`);
6394
+ return match;
6395
+ }
6396
+ //#endregion
6397
+ //#region src/dsr-automation/gqls/dataSubject.ts
6398
+ const DATA_SUBJECTS = parse(gql`
6399
+ query TranscendCliDataSubjects {
6400
+ internalSubjects {
6401
+ id
6402
+ title {
6403
+ defaultMessage
6404
+ }
6405
+ active
6406
+ type
6407
+ adminDashboardDefaultSilentMode
6408
+ actions {
6409
+ type
6410
+ }
6411
+ }
6412
+ }
6413
+ `);
6414
+ const CREATE_DATA_SUBJECT = parse(gql`
6415
+ mutation TranscendCliCreateDataSubject($type: String!) {
6416
+ createSubject(input: { type: $type, title: $type, subjectClass: OTHER }) {
6417
+ subject {
6418
+ id
6419
+ type
6420
+ }
6421
+ }
6422
+ }
6423
+ `);
6424
+ const UPDATE_DATA_SUBJECT = parse(gql`
6425
+ mutation TranscendCliUpdateDataSubject($input: UpdateSubjectInput!) {
6426
+ updateSubject(input: $input) {
6427
+ clientMutationId
6428
+ }
6429
+ }
6430
+ `);
6431
+ const TOGGLE_DATA_SUBJECT = parse(gql`
6432
+ mutation TranscendCliToggleDataSubject($input: ToggleSubjectInput!) {
6433
+ toggleSubject(input: $input) {
6434
+ clientMutationId
6435
+ }
6436
+ }
6437
+ `);
6438
+ //#endregion
6439
+ //#region src/dsr-automation/fetchDataSubjects.ts
6440
+ /**
6441
+ * Fetch all data subjects in an organization
6442
+ *
6443
+ * @param client - GraphQL client
6444
+ * @param options - Options
6445
+ * @returns List of data subject configurations
6446
+ */
6447
+ async function fetchAllDataSubjects(client, options = {}) {
6448
+ const { logger = NOOP_LOGGER } = options;
6449
+ const { internalSubjects } = await makeGraphQLRequest(client, DATA_SUBJECTS, { logger });
6450
+ return internalSubjects;
6451
+ }
6452
+ /**
6453
+ * Create a single data subject
6454
+ *
6455
+ * @param client - GraphQL client
6456
+ * @param options - Options
6457
+ * @returns Created data subject
6458
+ */
6459
+ async function createDataSubject(client, options) {
6460
+ const { input: dataSubjectType, logger = NOOP_LOGGER } = options;
6461
+ const { createSubject } = await makeGraphQLRequest(client, CREATE_DATA_SUBJECT, {
6462
+ variables: {
6463
+ type: dataSubjectType,
6464
+ skipPublish: true
6465
+ },
6466
+ logger
6467
+ });
6468
+ return createSubject.subject;
6469
+ }
6470
+ /**
6471
+ * Convert a list of data subject types into the block list of IDs to assign to the data silo
6472
+ *
6473
+ * @param dataSubjectTypes - The list of data subject types that the data silo should be for
6474
+ * @param allDataSubjects - All data subjects in the organization
6475
+ * @returns The block list of data subject ids to not process against this data silo
6476
+ */
6477
+ function convertToDataSubjectBlockList(dataSubjectTypes, allDataSubjects) {
6478
+ dataSubjectTypes.forEach((type) => {
6479
+ if (!allDataSubjects[type]) throw new Error(`Expected to find data subject definition: ${type}`);
6480
+ });
6481
+ return Object.values(allDataSubjects).filter((silo) => !dataSubjectTypes.includes(silo.type)).map(({ id }) => id);
6482
+ }
6483
+ /**
6484
+ * Convert a list of data subject types into the allow list of types
6485
+ *
6486
+ * @param dataSubjectTypes - The list of data subject types that the data silo should be for
6487
+ * @param allDataSubjects - All data subjects in the organization
6488
+ * @returns The allow list of data subjects for that silo
6489
+ */
6490
+ function convertToDataSubjectAllowlist(dataSubjectTypes, allDataSubjects) {
6491
+ dataSubjectTypes.forEach((type) => {
6492
+ if (!allDataSubjects[type]) throw new Error(`Expected to find data subject definition: ${type}`);
6493
+ });
6494
+ return Object.values(allDataSubjects).filter((silo) => !dataSubjectTypes.includes(silo.type)).map(({ type }) => type);
6495
+ }
6496
+ //#endregion
6497
+ //#region src/consent/syncConsentWorkflowTriggers.ts
6498
+ /**
6499
+ * Build the GraphQL triggerCondition JSON string from purposes,
6500
+ * matching the admin dashboard Preferences → Consent Workflows UI.
6501
+ *
6502
+ * @param purposes - Purpose tracking types and matching states
6503
+ * @returns JSON string of `{ And: [{ [trackingType]: matchingState }, ...] }`
6504
+ */
6505
+ function buildTriggerConditionFromPurposes(purposes) {
6506
+ return JSON.stringify({ And: purposes.map((purpose) => ({ [purpose["tracking-type"]]: purpose["matching-state"] })) });
6507
+ }
6508
+ /**
6509
+ * Parse GraphQL triggerCondition JSON into purposes for transcend.yml.
6510
+ * Expects ConditionalExpression shape: `{ And: [{ [trackingType]: boolean }, ...] }`.
6511
+ *
6512
+ * @param triggerCondition - JSON string from GraphQL (or null)
6513
+ * @returns Purpose entries for YAML, or empty if unparseable
6514
+ */
6515
+ function parsePurposesFromTriggerCondition(triggerCondition) {
6516
+ if (!triggerCondition) return [];
6517
+ try {
6518
+ const parsed = JSON.parse(triggerCondition);
6519
+ if (!parsed || typeof parsed !== "object") return [];
6520
+ const andEntries = parsed.And;
6521
+ if (!Array.isArray(andEntries)) return [];
6522
+ const purposes = [];
6523
+ for (const entry of andEntries) {
6524
+ if (!entry || typeof entry !== "object" || Array.isArray(entry)) continue;
6525
+ for (const [trackingType, matchingState] of Object.entries(entry)) if (typeof matchingState === "boolean") purposes.push({
6526
+ "tracking-type": trackingType,
6527
+ "matching-state": matchingState
6528
+ });
6529
+ }
6530
+ return purposes;
6531
+ } catch {
6532
+ return [];
6533
+ }
6534
+ }
6535
+ /**
6536
+ * Whether this YAML entry is Workflows V2 mode (links a DSR workflow config).
6537
+ *
6538
+ * @param trigger - Sync input
6539
+ * @returns True when workflow-title is set
6540
+ */
6541
+ function isConsentWorkflowTriggerV2Mode(trigger) {
6542
+ return Boolean(trigger["workflow-title"]);
6543
+ }
6544
+ /**
6545
+ * Validate mutual exclusivity and required fields for a trigger input.
6546
+ * Pure helper for unit tests and sync.
6547
+ *
6548
+ * @param trigger - Sync input
6549
+ * @param options - Whether the trigger already exists in the org
6550
+ */
6551
+ function validateConsentWorkflowTriggerMode(trigger, options) {
6552
+ if (!trigger.purposes?.length) throw new Error(`Consent workflow trigger "${trigger.name}" requires a non-empty "purposes" list (each entry needs tracking-type and matching-state). See Preferences → Preference Workflows.`);
6553
+ const isV2 = isConsentWorkflowTriggerV2Mode(trigger);
6554
+ const hasLegacyAction = Boolean(trigger["action-type"]);
6555
+ const hasLegacySilos = Boolean(trigger["data-silo-titles"]?.length);
6556
+ if (isV2 && (hasLegacyAction || hasLegacySilos)) throw new Error(`Consent workflow trigger "${trigger.name}" cannot set "workflow-title" together with "action-type" or "data-silo-titles". Use workflow-title for Workflows V2, or action-type / data-silo-titles for legacy mode.`);
6557
+ if (!options.isUpdate) {
6558
+ if (isV2) return;
6559
+ if (!trigger["action-type"]) throw new Error(`Consent workflow trigger "${trigger.name}" requires "action-type" when creating a legacy trigger (or set "workflow-title" for Workflows V2).`);
6560
+ if (!trigger["data-subject-type"]) throw new Error(`Consent workflow trigger "${trigger.name}" requires "data-subject-type" when creating a new trigger.`);
6561
+ }
6562
+ }
6563
+ /**
6564
+ * Resolve workflow display title from a workflowConfigId.
6565
+ *
6566
+ * @param workflows - DSR workflows
6567
+ * @param workflowConfigId - Linked workflow config ID
6568
+ * @returns Display title, or undefined if not found
6569
+ */
6570
+ function resolveWorkflowTitleFromId(workflows, workflowConfigId) {
6571
+ if (!workflowConfigId) return;
6572
+ const workflow = workflows.find((candidate) => candidate.id === workflowConfigId);
6573
+ return workflow ? getWorkflowConfigDisplayTitle(workflow) : void 0;
6574
+ }
6575
+ /**
6576
+ * Sync consent workflow triggers to Transcend
6577
+ *
6578
+ * @param client - GraphQL client
6579
+ * @param inputs - Consent workflow trigger inputs from YAML
6580
+ * @param options - Options
6581
+ * @returns True if run without error
6582
+ */
6583
+ async function syncConsentWorkflowTriggers(client, inputs, options = {}) {
6584
+ const { logger, pageSize = 50 } = options;
6585
+ logger?.info(`Syncing "${inputs.length}" consent workflow triggers...`);
6586
+ let encounteredError = false;
6587
+ const needsV2 = inputs.some((t) => isConsentWorkflowTriggerV2Mode(t));
6588
+ const needsActions = inputs.some((t) => t["action-type"]);
6589
+ const needsSubjects = inputs.some((t) => t["data-subject-type"]);
6590
+ const needsDataSilos = inputs.some((t) => t["data-silo-titles"]?.length);
6591
+ const [existingTriggers, actions, dataSubjects, purposes, dataSilos, dsrWorkflows] = await Promise.all([
6592
+ fetchAllConsentWorkflowTriggers(client, { logger }),
6593
+ needsActions ? fetchAllActions(client, { logger }) : [],
6594
+ needsSubjects ? fetchAllDataSubjects(client, { logger }) : [],
6595
+ fetchAllPurposes(client, { logger }),
6596
+ needsDataSilos ? fetchAllDataSilos(client, {
6597
+ pageSize,
6598
+ logger
6599
+ }) : [],
6600
+ needsV2 ? fetchAllWorkflowConfigs(client, {
6601
+ logger,
6602
+ workflowConfigType: WorkflowConfigType.DSR
6603
+ }) : []
6604
+ ]);
6605
+ const triggerByName = keyBy(existingTriggers, "name");
6606
+ const actionByType = keyBy(actions, "type");
6607
+ const dataSubjectByType = keyBy(dataSubjects, "type");
6608
+ const purposeByTrackingType = keyBy(purposes, "trackingType");
6609
+ const dataSiloByTitle = keyBy(dataSilos, "title");
6610
+ await mapSeries(inputs, async (trigger) => {
6611
+ try {
6612
+ const existingTrigger = triggerByName[trigger.name];
6613
+ validateConsentWorkflowTriggerMode(trigger, { isUpdate: Boolean(existingTrigger) });
6614
+ const consentWorkflowTriggerPurposes = trigger.purposes.map((purposeInput) => {
6615
+ const purpose = purposeByTrackingType[purposeInput["tracking-type"]];
6616
+ if (!purpose) throw new Error(`Failed to find purpose with trackingType: ${purposeInput["tracking-type"]}`);
6617
+ return {
6618
+ purposeId: purpose.id,
6619
+ matchingState: purposeInput["matching-state"]
6620
+ };
6621
+ });
6622
+ const mutationInput = {
6623
+ name: trigger.name,
6624
+ ...existingTrigger ? { id: existingTrigger.id } : {},
6625
+ triggerCondition: buildTriggerConditionFromPurposes(trigger.purposes),
6626
+ consentWorkflowTriggerPurposes,
6627
+ ...trigger["is-silent"] !== void 0 ? { isSilent: trigger["is-silent"] } : {},
6628
+ ...trigger["allow-unauthenticated"] !== void 0 ? { allowUnauthenticated: trigger["allow-unauthenticated"] } : {},
6629
+ ...trigger["is-active"] !== void 0 ? { isActive: trigger["is-active"] } : {}
6630
+ };
6631
+ if (isConsentWorkflowTriggerV2Mode(trigger)) {
6632
+ const workflow = resolveWorkflowConfigByTitle(dsrWorkflows, trigger["workflow-title"]);
6633
+ mutationInput.workflowConfigId = workflow.id;
6634
+ if (!existingTrigger) {
6635
+ mutationInput.actionId = workflow.action.id;
6636
+ if (!workflow.subject) throw new Error(`DSR workflow "${trigger["workflow-title"]}" has no data subject; cannot create consent workflow trigger "${trigger.name}".`);
6637
+ mutationInput.dataSubjectId = workflow.subject.id;
6638
+ } else if (trigger["data-subject-type"]) {
6639
+ const subject = dataSubjectByType[trigger["data-subject-type"]];
6640
+ if (!subject) throw new Error(`Failed to find data subject with type: ${trigger["data-subject-type"]}`);
6641
+ mutationInput.dataSubjectId = subject.id;
6642
+ }
6643
+ } else {
6644
+ let actionId;
6645
+ if (trigger["action-type"]) {
6646
+ const action = actionByType[trigger["action-type"]];
6647
+ if (!action) throw new Error(`Failed to find action with type: ${trigger["action-type"]}`);
6648
+ actionId = action.id;
6649
+ }
6650
+ let dataSubjectId;
6651
+ if (trigger["data-subject-type"]) {
6652
+ const subject = dataSubjectByType[trigger["data-subject-type"]];
6653
+ if (!subject) throw new Error(`Failed to find data subject with type: ${trigger["data-subject-type"]}`);
6654
+ dataSubjectId = subject.id;
6655
+ }
6656
+ let dataSiloIds;
6657
+ if (trigger["data-silo-titles"]?.length) dataSiloIds = trigger["data-silo-titles"].map((title) => {
6658
+ const dataSilo = dataSiloByTitle[title];
6659
+ if (!dataSilo) throw new Error(`Failed to find data silo with title: ${title}`);
6660
+ return dataSilo.id;
6661
+ });
6662
+ if (actionId) mutationInput.actionId = actionId;
6663
+ if (dataSubjectId) mutationInput.dataSubjectId = dataSubjectId;
6664
+ if (dataSiloIds) mutationInput.dataSiloIds = dataSiloIds;
6665
+ }
6666
+ await makeGraphQLRequest(client, CREATE_OR_UPDATE_CONSENT_WORKFLOW_TRIGGER, {
6667
+ variables: { input: mutationInput },
6668
+ logger
6669
+ });
6670
+ logger?.info(`Successfully synced consent workflow trigger "${trigger.name}"!`);
6671
+ } catch (err) {
6672
+ encounteredError = true;
6673
+ logger?.error(`Failed to sync consent workflow trigger "${trigger.name}"! - ${err.message}`);
6674
+ }
6675
+ });
6676
+ logger?.info(`Synced "${inputs.length}" consent workflow triggers!`);
6677
+ return !encounteredError;
6678
+ }
6679
+ //#endregion
5978
6680
  //#region src/consent/syncProcessingPurposes.ts
5979
6681
  /**
5980
6682
  * Input to create a new processing purpose
@@ -6099,7 +6801,7 @@ const SKIP_REQUEST_ENRICHER = gql`
6099
6801
  `;
6100
6802
  //#endregion
6101
6803
  //#region src/dsr-automation/fetchAllRequestEnrichers.ts
6102
- const PAGE_SIZE$23 = 50;
6804
+ const PAGE_SIZE$21 = 50;
6103
6805
  /**
6104
6806
  * Fetch all request enrichers for a particular request
6105
6807
  *
@@ -6115,15 +6817,15 @@ async function fetchAllRequestEnrichers(client, options) {
6115
6817
  do {
6116
6818
  const { requestEnrichers: { nodes } } = await makeGraphQLRequest(client, REQUEST_ENRICHERS, {
6117
6819
  variables: {
6118
- first: PAGE_SIZE$23,
6820
+ first: PAGE_SIZE$21,
6119
6821
  offset,
6120
6822
  requestId
6121
6823
  },
6122
6824
  logger
6123
6825
  });
6124
6826
  requestEnrichers.push(...nodes);
6125
- offset += PAGE_SIZE$23;
6126
- shouldContinue = nodes.length === PAGE_SIZE$23;
6827
+ offset += PAGE_SIZE$21;
6828
+ shouldContinue = nodes.length === PAGE_SIZE$21;
6127
6829
  } while (shouldContinue);
6128
6830
  return requestEnrichers;
6129
6831
  }
@@ -6151,7 +6853,7 @@ const RequestIdentifier = t.type({
6151
6853
  /** Type of identifier */
6152
6854
  type: valuesOf(IdentifierType)
6153
6855
  });
6154
- const PAGE_SIZE$22 = 50;
6856
+ const PAGE_SIZE$20 = 50;
6155
6857
  const RequestIdentifiersResponse = t.type({ identifiers: t.array(RequestIdentifier) });
6156
6858
  /**
6157
6859
  * Validate that the Sombra version meets the minimum requirement for
@@ -6182,7 +6884,7 @@ async function fetchAllRequestIdentifiers(client, sombra, options) {
6182
6884
  if (!skipSombraCheck) await validateSombraVersion(client, { logger });
6183
6885
  do {
6184
6886
  const { identifiers: nodes } = decodeCodec(RequestIdentifiersResponse, await withTransientRetry("Failed to fetch request identifiers", () => sombra.post("v1/request-identifiers", { json: {
6185
- first: PAGE_SIZE$22,
6887
+ first: PAGE_SIZE$20,
6186
6888
  offset,
6187
6889
  requestId
6188
6890
  } }).json(), {
@@ -6191,8 +6893,8 @@ async function fetchAllRequestIdentifiers(client, sombra, options) {
6191
6893
  baseDelayMs: 500
6192
6894
  }));
6193
6895
  requestIdentifiers.push(...nodes);
6194
- offset += PAGE_SIZE$22;
6195
- shouldContinue = nodes.length === PAGE_SIZE$22;
6896
+ offset += PAGE_SIZE$20;
6897
+ shouldContinue = nodes.length === PAGE_SIZE$20;
6196
6898
  } while (shouldContinue);
6197
6899
  return requestIdentifiers;
6198
6900
  }
@@ -6229,143 +6931,43 @@ const REQUEST_IDENTIFIERS = parse(gql`
6229
6931
  name
6230
6932
  isVerifiedAtLeastOnce
6231
6933
  }
6232
- totalCount
6233
- }
6234
- }
6235
- `);
6236
- //#endregion
6237
- //#region src/dsr-automation/fetchAllRequestIdentifierMetadata.ts
6238
- const PAGE_SIZE$21 = 50;
6239
- /**
6240
- * Fetch all request identifier metadata for a particular request
6241
- *
6242
- * @param client - GraphQL client
6243
- * @param options - Filter options
6244
- * @returns List of request identifiers
6245
- */
6246
- async function fetchAllRequestIdentifierMetadata(client, options = {}) {
6247
- const { logger = NOOP_LOGGER, filterBy } = options;
6248
- const { requestId, requestIds, updatedAtBefore, updatedAtAfter } = filterBy ?? {};
6249
- const resolvedRequestIds = requestIds ?? (requestId ? [requestId] : void 0);
6250
- const requestIdentifiers = [];
6251
- let offset = 0;
6252
- let shouldContinue = false;
6253
- do {
6254
- const { requestIdentifiers: { nodes } } = await makeGraphQLRequest(client, REQUEST_IDENTIFIERS, {
6255
- variables: {
6256
- first: PAGE_SIZE$21,
6257
- offset,
6258
- requestIds: resolvedRequestIds,
6259
- updatedAtBefore: updatedAtBefore ? updatedAtBefore.toISOString() : void 0,
6260
- updatedAtAfter: updatedAtAfter ? updatedAtAfter.toISOString() : void 0
6261
- },
6262
- logger
6263
- });
6264
- requestIdentifiers.push(...nodes);
6265
- offset += PAGE_SIZE$21;
6266
- shouldContinue = nodes.length === PAGE_SIZE$21;
6267
- } while (shouldContinue);
6268
- return requestIdentifiers;
6269
- }
6270
- //#endregion
6271
- //#region src/dsr-automation/gqls/dataSubject.ts
6272
- const DATA_SUBJECTS = parse(gql`
6273
- query TranscendCliDataSubjects {
6274
- internalSubjects {
6275
- id
6276
- title {
6277
- defaultMessage
6278
- }
6279
- active
6280
- type
6281
- adminDashboardDefaultSilentMode
6282
- actions {
6283
- type
6284
- }
6285
- }
6286
- }
6287
- `);
6288
- const CREATE_DATA_SUBJECT = parse(gql`
6289
- mutation TranscendCliCreateDataSubject($type: String!) {
6290
- createSubject(input: { type: $type, title: $type, subjectClass: OTHER }) {
6291
- subject {
6292
- id
6293
- type
6294
- }
6295
- }
6296
- }
6297
- `);
6298
- const UPDATE_DATA_SUBJECT = parse(gql`
6299
- mutation TranscendCliUpdateDataSubject($input: UpdateSubjectInput!) {
6300
- updateSubject(input: $input) {
6301
- clientMutationId
6302
- }
6303
- }
6304
- `);
6305
- const TOGGLE_DATA_SUBJECT = parse(gql`
6306
- mutation TranscendCliToggleDataSubject($input: ToggleSubjectInput!) {
6307
- toggleSubject(input: $input) {
6308
- clientMutationId
6309
- }
6310
- }
6311
- `);
6312
- //#endregion
6313
- //#region src/dsr-automation/fetchDataSubjects.ts
6314
- /**
6315
- * Fetch all data subjects in an organization
6316
- *
6317
- * @param client - GraphQL client
6318
- * @param options - Options
6319
- * @returns List of data subject configurations
6320
- */
6321
- async function fetchAllDataSubjects(client, options = {}) {
6322
- const { logger = NOOP_LOGGER } = options;
6323
- const { internalSubjects } = await makeGraphQLRequest(client, DATA_SUBJECTS, { logger });
6324
- return internalSubjects;
6325
- }
6934
+ totalCount
6935
+ }
6936
+ }
6937
+ `);
6938
+ //#endregion
6939
+ //#region src/dsr-automation/fetchAllRequestIdentifierMetadata.ts
6940
+ const PAGE_SIZE$19 = 50;
6326
6941
  /**
6327
- * Create a single data subject
6942
+ * Fetch all request identifier metadata for a particular request
6328
6943
  *
6329
6944
  * @param client - GraphQL client
6330
- * @param options - Options
6331
- * @returns Created data subject
6332
- */
6333
- async function createDataSubject(client, options) {
6334
- const { input: dataSubjectType, logger = NOOP_LOGGER } = options;
6335
- const { createSubject } = await makeGraphQLRequest(client, CREATE_DATA_SUBJECT, {
6336
- variables: {
6337
- type: dataSubjectType,
6338
- skipPublish: true
6339
- },
6340
- logger
6341
- });
6342
- return createSubject.subject;
6343
- }
6344
- /**
6345
- * Convert a list of data subject types into the block list of IDs to assign to the data silo
6346
- *
6347
- * @param dataSubjectTypes - The list of data subject types that the data silo should be for
6348
- * @param allDataSubjects - All data subjects in the organization
6349
- * @returns The block list of data subject ids to not process against this data silo
6350
- */
6351
- function convertToDataSubjectBlockList(dataSubjectTypes, allDataSubjects) {
6352
- dataSubjectTypes.forEach((type) => {
6353
- if (!allDataSubjects[type]) throw new Error(`Expected to find data subject definition: ${type}`);
6354
- });
6355
- return Object.values(allDataSubjects).filter((silo) => !dataSubjectTypes.includes(silo.type)).map(({ id }) => id);
6356
- }
6357
- /**
6358
- * Convert a list of data subject types into the allow list of types
6359
- *
6360
- * @param dataSubjectTypes - The list of data subject types that the data silo should be for
6361
- * @param allDataSubjects - All data subjects in the organization
6362
- * @returns The allow list of data subjects for that silo
6945
+ * @param options - Filter options
6946
+ * @returns List of request identifiers
6363
6947
  */
6364
- function convertToDataSubjectAllowlist(dataSubjectTypes, allDataSubjects) {
6365
- dataSubjectTypes.forEach((type) => {
6366
- if (!allDataSubjects[type]) throw new Error(`Expected to find data subject definition: ${type}`);
6367
- });
6368
- return Object.values(allDataSubjects).filter((silo) => !dataSubjectTypes.includes(silo.type)).map(({ type }) => type);
6948
+ async function fetchAllRequestIdentifierMetadata(client, options = {}) {
6949
+ const { logger = NOOP_LOGGER, filterBy } = options;
6950
+ const { requestId, requestIds, updatedAtBefore, updatedAtAfter } = filterBy ?? {};
6951
+ const resolvedRequestIds = requestIds ?? (requestId ? [requestId] : void 0);
6952
+ const requestIdentifiers = [];
6953
+ let offset = 0;
6954
+ let shouldContinue = false;
6955
+ do {
6956
+ const { requestIdentifiers: { nodes } } = await makeGraphQLRequest(client, REQUEST_IDENTIFIERS, {
6957
+ variables: {
6958
+ first: PAGE_SIZE$19,
6959
+ offset,
6960
+ requestIds: resolvedRequestIds,
6961
+ updatedAtBefore: updatedAtBefore ? updatedAtBefore.toISOString() : void 0,
6962
+ updatedAtAfter: updatedAtAfter ? updatedAtAfter.toISOString() : void 0
6963
+ },
6964
+ logger
6965
+ });
6966
+ requestIdentifiers.push(...nodes);
6967
+ offset += PAGE_SIZE$19;
6968
+ shouldContinue = nodes.length === PAGE_SIZE$19;
6969
+ } while (shouldContinue);
6970
+ return requestIdentifiers;
6369
6971
  }
6370
6972
  //#endregion
6371
6973
  //#region src/dsr-automation/gqls/dsrIdentifier.ts
@@ -6543,7 +7145,7 @@ const UPDATE_ENRICHER = gql`
6543
7145
  `;
6544
7146
  //#endregion
6545
7147
  //#region src/dsr-automation/syncEnrichers.ts
6546
- const PAGE_SIZE$20 = 20;
7148
+ const PAGE_SIZE$18 = 20;
6547
7149
  /**
6548
7150
  * Fetch all enrichers in the organization
6549
7151
  *
@@ -6560,15 +7162,15 @@ async function fetchAllEnrichers(client, options = {}) {
6560
7162
  do {
6561
7163
  const { enrichers: { nodes } } = await makeGraphQLRequest(client, ENRICHERS, {
6562
7164
  variables: {
6563
- first: PAGE_SIZE$20,
7165
+ first: PAGE_SIZE$18,
6564
7166
  offset,
6565
7167
  title
6566
7168
  },
6567
7169
  logger
6568
7170
  });
6569
7171
  enrichers.push(...nodes);
6570
- offset += PAGE_SIZE$20;
6571
- shouldContinue = nodes.length === PAGE_SIZE$20;
7172
+ offset += PAGE_SIZE$18;
7173
+ shouldContinue = nodes.length === PAGE_SIZE$18;
6572
7174
  } while (shouldContinue);
6573
7175
  return enrichers.sort((a, b) => a.title.localeCompare(b.title));
6574
7176
  }
@@ -6707,67 +7309,8 @@ async function fetchActiveSiloDiscoPlugin(client, options) {
6707
7309
  return plugins[0];
6708
7310
  }
6709
7311
  //#endregion
6710
- //#region src/dsr-automation/gqls/action.ts
6711
- const ACTIONS = gql`
6712
- query TranscendCliActions($first: Int!, $offset: Int!) {
6713
- actions(
6714
- first: $first
6715
- offset: $offset
6716
- useMaster: false
6717
- orderBy: [{ field: type, direction: ASC }]
6718
- ) {
6719
- nodes {
6720
- id
6721
- type
6722
- skipSecondaryIfNoFiles
6723
- skipDownloadableStep
6724
- requiresReview
6725
- regionList
6726
- regionDetectionMethod
6727
- waitingPeriod
6728
- }
6729
- }
6730
- }
6731
- `;
6732
- const UPDATE_ACTION = gql`
6733
- mutation TranscendCliUpdateAction($input: UpdateActionInput!) {
6734
- updateAction(input: $input) {
6735
- clientMutationId
6736
- }
6737
- }
6738
- `;
6739
- //#endregion
6740
- //#region src/dsr-automation/fetchAllActions.ts
6741
- const PAGE_SIZE$19 = 20;
6742
- /**
6743
- * Fetch all actions in the organization
6744
- *
6745
- * @param client - GraphQL client
6746
- * @param options - Options
6747
- * @returns All actions in the organization
6748
- */
6749
- async function fetchAllActions(client, options = {}) {
6750
- const { logger } = options;
6751
- const actions = [];
6752
- let offset = 0;
6753
- let shouldContinue = false;
6754
- do {
6755
- const { actions: { nodes } } = await makeGraphQLRequest(client, ACTIONS, {
6756
- variables: {
6757
- first: PAGE_SIZE$19,
6758
- offset
6759
- },
6760
- logger
6761
- });
6762
- actions.push(...nodes);
6763
- offset += PAGE_SIZE$19;
6764
- shouldContinue = nodes.length === PAGE_SIZE$19;
6765
- } while (shouldContinue);
6766
- return actions.sort((a, b) => a.type.localeCompare(b.type));
6767
- }
6768
- //#endregion
6769
7312
  //#region src/dsr-automation/fetchAllAttributeKeys.ts
6770
- const PAGE_SIZE$18 = 20;
7313
+ const PAGE_SIZE$17 = 20;
6771
7314
  /**
6772
7315
  * Fetch all attribute keys enabled for privacy requests
6773
7316
  *
@@ -6783,14 +7326,14 @@ async function fetchAllRequestAttributeKeys(client, options = {}) {
6783
7326
  do {
6784
7327
  const { attributeKeys: { nodes } } = await makeGraphQLRequest(client, ATTRIBUTE_KEYS_REQUESTS, {
6785
7328
  variables: {
6786
- first: PAGE_SIZE$18,
7329
+ first: PAGE_SIZE$17,
6787
7330
  offset
6788
7331
  },
6789
7332
  logger
6790
7333
  });
6791
7334
  attributeKeys.push(...nodes);
6792
- offset += PAGE_SIZE$18;
6793
- shouldContinue = nodes.length === PAGE_SIZE$18;
7335
+ offset += PAGE_SIZE$17;
7336
+ shouldContinue = nodes.length === PAGE_SIZE$17;
6794
7337
  } while (shouldContinue);
6795
7338
  return attributeKeys.sort((a, b) => a.name.localeCompare(b.name));
6796
7339
  }
@@ -6821,7 +7364,7 @@ const SILO_DISCOVERY_RESULTS = gql`
6821
7364
  `;
6822
7365
  //#endregion
6823
7366
  //#region src/dsr-automation/fetchAllSiloDiscoveryResults.ts
6824
- const PAGE_SIZE$17 = 30;
7367
+ const PAGE_SIZE$16 = 30;
6825
7368
  /**
6826
7369
  * Fetch all silo discovery results in the organization
6827
7370
  *
@@ -6837,7 +7380,7 @@ async function fetchAllSiloDiscoveryResults(client, options = {}) {
6837
7380
  do {
6838
7381
  const { siloDiscoveryResults: { nodes } } = await makeGraphQLRequest(client, SILO_DISCOVERY_RESULTS, {
6839
7382
  variables: {
6840
- first: PAGE_SIZE$17,
7383
+ first: PAGE_SIZE$16,
6841
7384
  offset,
6842
7385
  input: {},
6843
7386
  filterBy: {}
@@ -6849,8 +7392,8 @@ async function fetchAllSiloDiscoveryResults(client, options = {}) {
6849
7392
  title: node.suggestedCatalog.title
6850
7393
  } : node);
6851
7394
  siloDiscoveryResults.push(...titledNodes);
6852
- offset += PAGE_SIZE$17;
6853
- shouldContinue = nodes.length === PAGE_SIZE$17;
7395
+ offset += PAGE_SIZE$16;
7396
+ shouldContinue = nodes.length === PAGE_SIZE$16;
6854
7397
  } while (shouldContinue);
6855
7398
  return siloDiscoveryResults;
6856
7399
  }
@@ -6869,7 +7412,7 @@ const CATALOGS = gql`
6869
7412
  `;
6870
7413
  //#endregion
6871
7414
  //#region src/dsr-automation/fetchCatalogs.ts
6872
- const PAGE_SIZE$16 = 100;
7415
+ const PAGE_SIZE$15 = 100;
6873
7416
  /**
6874
7417
  * Fetch all integration catalogs in an organization
6875
7418
  *
@@ -6885,14 +7428,14 @@ async function fetchAllCatalogs(client, options = {}) {
6885
7428
  do {
6886
7429
  const { catalogs: { nodes } } = await makeGraphQLRequest(client, CATALOGS, {
6887
7430
  variables: {
6888
- first: PAGE_SIZE$16,
7431
+ first: PAGE_SIZE$15,
6889
7432
  offset
6890
7433
  },
6891
7434
  logger
6892
7435
  });
6893
7436
  catalogs.push(...nodes);
6894
- offset += PAGE_SIZE$16;
6895
- shouldContinue = nodes.length === PAGE_SIZE$16;
7437
+ offset += PAGE_SIZE$15;
7438
+ shouldContinue = nodes.length === PAGE_SIZE$15;
6896
7439
  } while (shouldContinue);
6897
7440
  return catalogs.sort((a, b) => a.integrationName.localeCompare(b.integrationName));
6898
7441
  }
@@ -6995,7 +7538,7 @@ async function fetchRequestDataSilosCount(client, options = {}) {
6995
7538
  });
6996
7539
  return totalCount;
6997
7540
  }
6998
- const PAGE_SIZE$15 = 100;
7541
+ const PAGE_SIZE$14 = 100;
6999
7542
  /**
7000
7543
  * Fetch all request data silos by some filter criteria
7001
7544
  *
@@ -7011,7 +7554,7 @@ async function fetchRequestDataSilos(client, options = {}) {
7011
7554
  do {
7012
7555
  const { requestDataSilos: { nodes } } = await makeGraphQLRequest(client, REQUEST_DATA_SILOS, {
7013
7556
  variables: {
7014
- first: PAGE_SIZE$15,
7557
+ first: PAGE_SIZE$14,
7015
7558
  offset,
7016
7559
  filterBy: {
7017
7560
  dataSiloId,
@@ -7023,8 +7566,8 @@ async function fetchRequestDataSilos(client, options = {}) {
7023
7566
  logger
7024
7567
  });
7025
7568
  requestDataSilos.push(...nodes);
7026
- offset += PAGE_SIZE$15;
7027
- shouldContinue = nodes.length === PAGE_SIZE$15;
7569
+ offset += PAGE_SIZE$14;
7570
+ shouldContinue = nodes.length === PAGE_SIZE$14;
7028
7571
  onProgress?.(nodes.length);
7029
7572
  } while (shouldContinue && (!limit || offset < limit));
7030
7573
  return requestDataSilos;
@@ -7189,7 +7732,7 @@ const CREATE_TEMPLATE = gql`
7189
7732
  `;
7190
7733
  //#endregion
7191
7734
  //#region src/dsr-automation/syncTemplates.ts
7192
- const PAGE_SIZE$14 = 20;
7735
+ const PAGE_SIZE$13 = 20;
7193
7736
  /**
7194
7737
  * Fetch all Templates in the organization
7195
7738
  *
@@ -7205,15 +7748,15 @@ async function fetchAllTemplates(client, options = {}) {
7205
7748
  do {
7206
7749
  const { templates: { nodes } } = await makeGraphQLRequest(client, TEMPLATES, {
7207
7750
  variables: {
7208
- first: PAGE_SIZE$14,
7751
+ first: PAGE_SIZE$13,
7209
7752
  offset,
7210
7753
  title
7211
7754
  },
7212
7755
  logger
7213
7756
  });
7214
7757
  templates.push(...nodes);
7215
- offset += PAGE_SIZE$14;
7216
- shouldContinue = nodes.length === PAGE_SIZE$14;
7758
+ offset += PAGE_SIZE$13;
7759
+ shouldContinue = nodes.length === PAGE_SIZE$13;
7217
7760
  } while (shouldContinue);
7218
7761
  return templates.sort((a, b) => a.title.localeCompare(b.title));
7219
7762
  }
@@ -7235,96 +7778,6 @@ async function syncTemplate(client, template, options = {}) {
7235
7778
  });
7236
7779
  }
7237
7780
  //#endregion
7238
- //#region src/dsr-automation/gqls/workflowConfig.ts
7239
- const WORKFLOW_CONFIGS = parse(gql`
7240
- query TranscendCliWorkflowConfigs($first: Int!, $offset: Int!, $filterBy: WorkflowFilterInput) {
7241
- workflows(first: $first, offset: $offset, filterBy: $filterBy) {
7242
- nodes {
7243
- id
7244
- title {
7245
- defaultMessage
7246
- }
7247
- subtitle {
7248
- defaultMessage
7249
- }
7250
- description {
7251
- defaultMessage
7252
- }
7253
- internalName
7254
- workflowConfigVisibility
7255
- workflowConfigType
7256
- collectDataSubjectRegions
7257
- regionList
7258
- expiryTime {
7259
- region
7260
- value
7261
- }
7262
- action {
7263
- type
7264
- }
7265
- subject {
7266
- id
7267
- type
7268
- }
7269
- WorkflowConfigAttributeKeys {
7270
- attributeKey {
7271
- id
7272
- name
7273
- }
7274
- }
7275
- }
7276
- totalCount
7277
- }
7278
- }
7279
- `);
7280
- const CREATE_WORKFLOW = parse(gql`
7281
- mutation TranscendCliCreateWorkflow($input: CreateWorkflowInput!) {
7282
- createWorkflow(input: $input) {
7283
- workflowConfig {
7284
- id
7285
- internalName
7286
- }
7287
- }
7288
- }
7289
- `);
7290
- const UPDATE_WORKFLOW_CONFIG = parse(gql`
7291
- mutation TranscendCliUpdateWorkflowConfig($input: UpdateWorkflowConfigInput!) {
7292
- updateWorkflowConfig(input: $input) {
7293
- success
7294
- }
7295
- }
7296
- `);
7297
- //#endregion
7298
- //#region src/dsr-automation/fetchAllWorkflowConfigs.ts
7299
- const PAGE_SIZE$13 = 50;
7300
- /**
7301
- * Fetch all workflow configs in the organization
7302
- *
7303
- * @param client - GraphQL client
7304
- * @param options - Options
7305
- * @returns All workflow configs
7306
- */
7307
- async function fetchAllWorkflowConfigs(client, options = {}) {
7308
- const { logger, workflowConfigType } = options;
7309
- const configs = [];
7310
- let offset = 0;
7311
- let shouldContinue = false;
7312
- do {
7313
- const { workflows: { nodes } } = await makeGraphQLRequest(client, WORKFLOW_CONFIGS, {
7314
- variables: {
7315
- first: PAGE_SIZE$13,
7316
- offset,
7317
- filterBy: workflowConfigType ? { workflowConfigType } : void 0
7318
- },
7319
- logger
7320
- });
7321
- configs.push(...nodes);
7322
- offset += PAGE_SIZE$13;
7323
- shouldContinue = nodes.length === PAGE_SIZE$13;
7324
- } while (shouldContinue);
7325
- return configs.sort((a, b) => a.title.defaultMessage.localeCompare(b.title.defaultMessage));
7326
- }
7327
- //#endregion
7328
7781
  //#region src/dsr-automation/resolveWorkflowConfigMatch.ts
7329
7782
  /**
7330
7783
  * Stable key for title + action + data subject + region-list identity.
@@ -7510,7 +7963,10 @@ async function syncWorkflowConfigs(client, inputs, options = {}) {
7510
7963
  collectDataSubjectRegions: null,
7511
7964
  regionList: config["region-list"] ?? [],
7512
7965
  expiryTime: null,
7513
- action: { type: config["action-type"] },
7966
+ action: {
7967
+ id: "",
7968
+ type: config["action-type"]
7969
+ },
7514
7970
  subject: subjectId ? {
7515
7971
  id: subjectId,
7516
7972
  type: config["data-subject-type"]
@@ -9997,6 +10453,6 @@ function createMonorepoPackageDefinition(name, directory) {
9997
10453
  };
9998
10454
  }
9999
10455
  //#endregion
10000
- 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, fetchAllWorkflowConfigs, 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, resolveWorkflowConfigMatch, 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, syncWorkflowConfigs, transformPreferenceRecordToCsv, updateActionItem, updateActionItemCollection, updateAgentFiles, updateAgentFunctions, updateAgents, updateBusinessEntities, updateConsentManagerToLatest, updateDataCategories, updateDataFlows, updateIntlMessages, updateOrCreateCookies, updatePolicies, updateProcessingPurposes, updatePromptGroups, updatePromptPartials, updatePrompts, updateRepositories, updateSoftwareDevelopmentKits, updateTeam, updateVendors, uploadSiloDiscoveryResults, validateSombraVersion, withTransientRetry, workflowConfigInputLabel, workflowConfigMatchKey, workflowRegionListKey };
10456
+ 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, CONSENT_WORKFLOW_TRIGGERS, 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_OR_UPDATE_CONSENT_WORKFLOW_TRIGGER, 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_SILO_SOMBRA, DATA_SUBJECTS, DELETE_COOKIES, DELETE_DATA_FLOWS, DELETE_PRIVACY_CENTER_FOOTER_LINKS, 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_PRIVACY_CENTER_FOOTER_LINKS, UPDATE_PROCESSING_PURPOSE_SUB_CATEGORIES, addMessagesToPromptRun, assumeRole, buildConsentChunks, buildTranscendGraphQLClient, buildTranscendGraphQLClientGeneric, buildTriggerConditionFromPurposes, 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, fetchAllConsentWorkflowTriggers, 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, fetchAllWorkflowConfigs, 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, getWorkflowConfigDisplayTitle, inferPolicyTypeFromTitle, isConsentWorkflowTriggerV2Mode, isTransientError, iterateConsentPages, loadReferenceData, loginUser, makeGraphQLRequest, parseAssessmentDisplayLogic, parseAssessmentRiskLogic, parsePurposesFromTriggerCondition, pickConsentChunkMode, reportPromptRun, resolveDisplayedChildOrganizationIds, resolveParentTeamIdsByName, resolveWorkflowConfigByTitle, resolveWorkflowConfigMatch, resolveWorkflowTitleFromId, retryRequestEnricher, setResourceAttributes, syncAction, syncActionItemCollections, syncActionItems, syncAgentFiles, syncAgentFunctions, syncAgents, syncAttribute, syncBusinessEntities, syncConsentManager, syncConsentManagerExperiences, syncConsentUiThemes, syncConsentUiVariants, syncConsentWorkflowTriggers, syncCookies, syncDataCategories, syncDataFlows, syncDataSiloDependencies, syncDataSubject, syncEnricher, syncIdentifier, syncIntlMessages, syncPartitions, syncPolicies, syncPreferenceOptionValues, syncPreferenceTopics, syncPrivacyCenter, syncPrivacyCenterFooterLinks, syncProcessingActivities, syncProcessingPurposes, syncPromptGroups, syncPromptPartials, syncPrompts, syncPurposes, syncRepositories, syncSoftwareDevelopmentKits, syncTeams, syncTemplate, syncVendors, syncWorkflowConfigs, transformPreferenceRecordToCsv, updateActionItem, updateActionItemCollection, updateAgentFiles, updateAgentFunctions, updateAgents, updateBusinessEntities, updateConsentManagerToLatest, updateDataCategories, updateDataFlows, updateIntlMessages, updateOrCreateCookies, updatePolicies, updateProcessingPurposes, updatePromptGroups, updatePromptPartials, updatePrompts, updateRepositories, updateSoftwareDevelopmentKits, updateTeam, updateVendors, uploadSiloDiscoveryResults, validateConsentWorkflowTriggerMode, validateSombraVersion, withTransientRetry, workflowConfigInputLabel, workflowConfigMatchKey, workflowRegionListKey };
10001
10457
 
10002
10458
  //# sourceMappingURL=index.mjs.map