@transcend-io/sdk 1.5.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
  }
@@ -874,7 +874,7 @@ const IDENTIFIERS = parse(gql`
874
874
  `);
875
875
  //#endregion
876
876
  //#region src/data-inventory/fetchAllIdentifiers.ts
877
- const PAGE_SIZE$41 = 20;
877
+ const PAGE_SIZE$42 = 20;
878
878
  /**
879
879
  * Fetch all identifiers in the organization
880
880
  *
@@ -891,13 +891,13 @@ async function fetchAllIdentifiers(client, options = {}) {
891
891
  const { identifiers: { nodes } } = await makeGraphQLRequest(client, IDENTIFIERS, {
892
892
  logger,
893
893
  variables: {
894
- first: PAGE_SIZE$41,
894
+ first: PAGE_SIZE$42,
895
895
  offset
896
896
  }
897
897
  });
898
898
  identifiers.push(...nodes);
899
- offset += PAGE_SIZE$41;
900
- shouldContinue = nodes.length === PAGE_SIZE$41;
899
+ offset += PAGE_SIZE$42;
900
+ shouldContinue = nodes.length === PAGE_SIZE$42;
901
901
  } while (shouldContinue);
902
902
  return identifiers.sort((a, b) => a.name.localeCompare(b.name));
903
903
  }
@@ -976,7 +976,7 @@ const UPDATE_PROCESSING_ACTIVITIES = gql`
976
976
  `;
977
977
  //#endregion
978
978
  //#region src/data-inventory/fetchAllProcessingActivities.ts
979
- const PAGE_SIZE$40 = 20;
979
+ const PAGE_SIZE$41 = 20;
980
980
  /**
981
981
  * Fetch all processingActivities in the organization
982
982
  *
@@ -992,14 +992,14 @@ async function fetchAllProcessingActivities(client, options = {}) {
992
992
  do {
993
993
  const { processingActivities: { nodes } } = await makeGraphQLRequest(client, PROCESSING_ACTIVITIES, {
994
994
  variables: {
995
- first: PAGE_SIZE$40,
995
+ first: PAGE_SIZE$41,
996
996
  offset
997
997
  },
998
998
  logger
999
999
  });
1000
1000
  processingActivities.push(...nodes);
1001
- offset += PAGE_SIZE$40;
1002
- shouldContinue = nodes.length === PAGE_SIZE$40;
1001
+ offset += PAGE_SIZE$41;
1002
+ shouldContinue = nodes.length === PAGE_SIZE$41;
1003
1003
  } while (shouldContinue);
1004
1004
  return processingActivities.sort((a, b) => a.title.localeCompare(b.title));
1005
1005
  }
@@ -1064,7 +1064,7 @@ const UPDATE_VENDORS = gql`
1064
1064
  `;
1065
1065
  //#endregion
1066
1066
  //#region src/data-inventory/fetchAllVendors.ts
1067
- const PAGE_SIZE$39 = 20;
1067
+ const PAGE_SIZE$40 = 20;
1068
1068
  /**
1069
1069
  * Fetch all vendors in the organization
1070
1070
  *
@@ -1079,14 +1079,14 @@ async function fetchAllVendors(client, options = {}) {
1079
1079
  do {
1080
1080
  const { vendors: { nodes } } = await makeGraphQLRequest(client, VENDORS, {
1081
1081
  variables: {
1082
- first: PAGE_SIZE$39,
1082
+ first: PAGE_SIZE$40,
1083
1083
  offset
1084
1084
  },
1085
1085
  logger
1086
1086
  });
1087
1087
  vendors.push(...nodes);
1088
- offset += PAGE_SIZE$39;
1089
- shouldContinue = nodes.length === PAGE_SIZE$39;
1088
+ offset += PAGE_SIZE$40;
1089
+ shouldContinue = nodes.length === PAGE_SIZE$40;
1090
1090
  } while (shouldContinue);
1091
1091
  return vendors.sort((a, b) => a.title.localeCompare(b.title));
1092
1092
  }
@@ -1565,7 +1565,7 @@ const UPDATE_PURPOSE = parse(gql`
1565
1565
  `);
1566
1566
  //#endregion
1567
1567
  //#region src/preference-management/fetchAllPurposes.ts
1568
- const PAGE_SIZE$38 = 20;
1568
+ const PAGE_SIZE$39 = 20;
1569
1569
  /**
1570
1570
  * Fetch all purposes in the organization
1571
1571
  *
@@ -1582,14 +1582,14 @@ async function fetchAllPurposes(client, options = {}) {
1582
1582
  const { purposes: { nodes } } = await makeGraphQLRequest(client, PURPOSES$1, {
1583
1583
  logger,
1584
1584
  variables: {
1585
- first: PAGE_SIZE$38,
1585
+ first: PAGE_SIZE$39,
1586
1586
  offset,
1587
1587
  input: { includeDeleted }
1588
1588
  }
1589
1589
  });
1590
1590
  purposes.push(...nodes);
1591
- offset += PAGE_SIZE$38;
1592
- shouldContinue = nodes.length === PAGE_SIZE$38;
1591
+ offset += PAGE_SIZE$39;
1592
+ shouldContinue = nodes.length === PAGE_SIZE$39;
1593
1593
  } while (shouldContinue);
1594
1594
  return purposes.sort((a, b) => a.trackingType.localeCompare(b.trackingType));
1595
1595
  }
@@ -1643,7 +1643,7 @@ const CREATE_OR_UPDATE_PREFERENCE_TOPIC = parse(gql`
1643
1643
  `);
1644
1644
  //#endregion
1645
1645
  //#region src/preference-management/fetchAllPreferenceTopics.ts
1646
- const PAGE_SIZE$37 = 20;
1646
+ const PAGE_SIZE$38 = 20;
1647
1647
  /**
1648
1648
  * Fetch all preference topics in the organization
1649
1649
  *
@@ -1660,13 +1660,13 @@ async function fetchAllPreferenceTopics(client, options = {}) {
1660
1660
  const { preferenceTopics: { nodes } } = await makeGraphQLRequest(client, PREFERENCE_TOPICS, {
1661
1661
  logger,
1662
1662
  variables: {
1663
- first: PAGE_SIZE$37,
1663
+ first: PAGE_SIZE$38,
1664
1664
  offset
1665
1665
  }
1666
1666
  });
1667
1667
  preferenceTopics.push(...nodes);
1668
- offset += PAGE_SIZE$37;
1669
- shouldContinue = nodes.length === PAGE_SIZE$37;
1668
+ offset += PAGE_SIZE$38;
1669
+ shouldContinue = nodes.length === PAGE_SIZE$38;
1670
1670
  } while (shouldContinue);
1671
1671
  return preferenceTopics.sort((a, b) => `${a.slug}:${a.purpose.trackingType}`.localeCompare(`${b.slug}:${b.purpose.trackingType}`));
1672
1672
  }
@@ -2840,7 +2840,7 @@ const CREATE_OR_UPDATE_PREFERENCE_OPTION_VALUES = parse(gql`
2840
2840
  `);
2841
2841
  //#endregion
2842
2842
  //#region src/preference-management/fetchAllPreferenceOptionValues.ts
2843
- const PAGE_SIZE$36 = 50;
2843
+ const PAGE_SIZE$37 = 50;
2844
2844
  /**
2845
2845
  * Fetch all preference option values in the organization
2846
2846
  *
@@ -2856,14 +2856,14 @@ async function fetchAllPreferenceOptionValues(client, options = {}) {
2856
2856
  do {
2857
2857
  const { preferenceOptionValues: { nodes } } = await makeGraphQLRequest(client, PREFERENCE_OPTION_VALUES, {
2858
2858
  variables: {
2859
- first: PAGE_SIZE$36,
2859
+ first: PAGE_SIZE$37,
2860
2860
  offset
2861
2861
  },
2862
2862
  logger
2863
2863
  });
2864
2864
  preferenceOptionValues.push(...nodes);
2865
- offset += PAGE_SIZE$36;
2866
- shouldContinue = nodes.length === PAGE_SIZE$36;
2865
+ offset += PAGE_SIZE$37;
2866
+ shouldContinue = nodes.length === PAGE_SIZE$37;
2867
2867
  } while (shouldContinue);
2868
2868
  return preferenceOptionValues.sort((a, b) => a.slug.localeCompare(b.slug));
2869
2869
  }
@@ -3254,7 +3254,7 @@ const SET_RESOURCE_ATTRIBUTES = gql`
3254
3254
  `;
3255
3255
  //#endregion
3256
3256
  //#region src/administration/fetchAllAttributes.ts
3257
- const PAGE_SIZE$35 = 100;
3257
+ const PAGE_SIZE$36 = 100;
3258
3258
  /**
3259
3259
  * Fetch all attribute values for an attribute key
3260
3260
  *
@@ -3270,15 +3270,15 @@ async function fetchAllAttributeValues(client, options) {
3270
3270
  do {
3271
3271
  const { attributeValues: { nodes } } = await makeGraphQLRequest(client, ATTRIBUTE_VALUES, {
3272
3272
  variables: {
3273
- first: PAGE_SIZE$35,
3273
+ first: PAGE_SIZE$36,
3274
3274
  offset,
3275
3275
  attributeKeyId
3276
3276
  },
3277
3277
  logger
3278
3278
  });
3279
3279
  attributeValues.push(...nodes);
3280
- offset += PAGE_SIZE$35;
3281
- shouldContinue = nodes.length === PAGE_SIZE$35;
3280
+ offset += PAGE_SIZE$36;
3281
+ shouldContinue = nodes.length === PAGE_SIZE$36;
3282
3282
  } while (shouldContinue);
3283
3283
  return attributeValues.sort((a, b) => a.name.localeCompare(b.name));
3284
3284
  }
@@ -3297,7 +3297,7 @@ async function fetchAllAttributes(client, options = {}) {
3297
3297
  do {
3298
3298
  const { attributeKeys: { nodes } } = await makeGraphQLRequest(client, ATTRIBUTES, {
3299
3299
  variables: {
3300
- first: PAGE_SIZE$35,
3300
+ first: PAGE_SIZE$36,
3301
3301
  offset
3302
3302
  },
3303
3303
  logger
@@ -3309,8 +3309,8 @@ async function fetchAllAttributes(client, options = {}) {
3309
3309
  filterBy: { attributeKeyId: node.id }
3310
3310
  }) : []
3311
3311
  }))));
3312
- offset += PAGE_SIZE$35;
3313
- shouldContinue = nodes.length === PAGE_SIZE$35;
3312
+ offset += PAGE_SIZE$36;
3313
+ shouldContinue = nodes.length === PAGE_SIZE$36;
3314
3314
  } while (shouldContinue);
3315
3315
  return attributes.sort((a, b) => a.name.localeCompare(b.name));
3316
3316
  }
@@ -3427,7 +3427,7 @@ const UPDATE_TEAM = gql`
3427
3427
  `;
3428
3428
  //#endregion
3429
3429
  //#region src/administration/fetchAllTeams.ts
3430
- const PAGE_SIZE$34 = 20;
3430
+ const PAGE_SIZE$35 = 20;
3431
3431
  /**
3432
3432
  * Fetch all teams in the organization
3433
3433
  *
@@ -3443,20 +3443,20 @@ async function fetchAllTeams(client, options = {}) {
3443
3443
  do {
3444
3444
  const { teams: { nodes } } = await makeGraphQLRequest(client, TEAMS, {
3445
3445
  variables: {
3446
- first: PAGE_SIZE$34,
3446
+ first: PAGE_SIZE$35,
3447
3447
  offset
3448
3448
  },
3449
3449
  logger
3450
3450
  });
3451
3451
  teams.push(...nodes);
3452
- offset += PAGE_SIZE$34;
3453
- shouldContinue = nodes.length === PAGE_SIZE$34;
3452
+ offset += PAGE_SIZE$35;
3453
+ shouldContinue = nodes.length === PAGE_SIZE$35;
3454
3454
  } while (shouldContinue);
3455
3455
  return teams.sort((a, b) => a.name.localeCompare(b.name));
3456
3456
  }
3457
3457
  //#endregion
3458
3458
  //#region src/administration/fetchParentOrganizationTeams.ts
3459
- const PAGE_SIZE$33 = 20;
3459
+ const PAGE_SIZE$34 = 20;
3460
3460
  /**
3461
3461
  * Fetch teams from the parent organization that can be linked to child-org teams
3462
3462
  *
@@ -3472,15 +3472,15 @@ async function fetchParentOrganizationTeams(client, options = {}) {
3472
3472
  do {
3473
3473
  const { parentOrganizationTeams: { nodes } } = await makeGraphQLRequest(client, PARENT_ORGANIZATION_TEAMS, {
3474
3474
  variables: {
3475
- first: PAGE_SIZE$33,
3475
+ first: PAGE_SIZE$34,
3476
3476
  offset,
3477
3477
  filterBy
3478
3478
  },
3479
3479
  logger
3480
3480
  });
3481
3481
  teams.push(...nodes);
3482
- offset += PAGE_SIZE$33;
3483
- shouldContinue = nodes.length === PAGE_SIZE$33;
3482
+ offset += PAGE_SIZE$34;
3483
+ shouldContinue = nodes.length === PAGE_SIZE$34;
3484
3484
  } while (shouldContinue);
3485
3485
  return teams.sort((a, b) => a.name.localeCompare(b.name));
3486
3486
  }
@@ -3526,7 +3526,7 @@ const USERS = gql`
3526
3526
  `;
3527
3527
  //#endregion
3528
3528
  //#region src/administration/fetchAllUsers.ts
3529
- const PAGE_SIZE$32 = 20;
3529
+ const PAGE_SIZE$33 = 20;
3530
3530
  /**
3531
3531
  * Fetch all users in the organization
3532
3532
  *
@@ -3542,14 +3542,14 @@ async function fetchAllUsers(client, options = {}) {
3542
3542
  do {
3543
3543
  const { users: { nodes } } = await makeGraphQLRequest(client, USERS, {
3544
3544
  variables: {
3545
- first: PAGE_SIZE$32,
3545
+ first: PAGE_SIZE$33,
3546
3546
  offset
3547
3547
  },
3548
3548
  logger
3549
3549
  });
3550
3550
  users.push(...nodes);
3551
- offset += PAGE_SIZE$32;
3552
- shouldContinue = nodes.length === PAGE_SIZE$32;
3551
+ offset += PAGE_SIZE$33;
3552
+ shouldContinue = nodes.length === PAGE_SIZE$33;
3553
3553
  } while (shouldContinue);
3554
3554
  return users.sort((a, b) => a.email.localeCompare(b.email));
3555
3555
  }
@@ -3591,7 +3591,7 @@ const DELETE_API_KEY = gql`
3591
3591
  `;
3592
3592
  //#endregion
3593
3593
  //#region src/administration/fetchApiKeys.ts
3594
- const PAGE_SIZE$31 = 20;
3594
+ const PAGE_SIZE$32 = 20;
3595
3595
  const ADMIN_LINK = "https://app.transcend.io/infrastructure/api-keys";
3596
3596
  /**
3597
3597
  * Fetch all API keys in an organization
@@ -3608,15 +3608,15 @@ async function fetchAllApiKeys(client, options = {}) {
3608
3608
  do {
3609
3609
  const { apiKeys: { nodes } } = await makeGraphQLRequest(client, API_KEYS, {
3610
3610
  variables: {
3611
- first: PAGE_SIZE$31,
3611
+ first: PAGE_SIZE$32,
3612
3612
  offset,
3613
3613
  titles
3614
3614
  },
3615
3615
  logger
3616
3616
  });
3617
3617
  apiKeys.push(...nodes);
3618
- offset += PAGE_SIZE$31;
3619
- shouldContinue = nodes.length === PAGE_SIZE$31;
3618
+ offset += PAGE_SIZE$32;
3619
+ shouldContinue = nodes.length === PAGE_SIZE$32;
3620
3620
  } while (shouldContinue);
3621
3621
  return apiKeys.sort((a, b) => a.title.localeCompare(b.title));
3622
3622
  }
@@ -4591,7 +4591,7 @@ const DELETE_COOKIES = gql`
4591
4591
  `;
4592
4592
  //#endregion
4593
4593
  //#region src/consent/fetchAllCookies.ts
4594
- const PAGE_SIZE$30 = 20;
4594
+ const PAGE_SIZE$31 = 20;
4595
4595
  const DEFAULT_COOKIE_ORDER = [{
4596
4596
  field: "createdAt",
4597
4597
  direction: OrderDirection.Asc
@@ -4616,7 +4616,7 @@ async function fetchAllCookies(client, options = {}) {
4616
4616
  const { cookies: { nodes } } = await makeGraphQLRequest(client, COOKIES, {
4617
4617
  variables: {
4618
4618
  input: { airgapBundleId },
4619
- first: PAGE_SIZE$30,
4619
+ first: PAGE_SIZE$31,
4620
4620
  offset,
4621
4621
  filterBy: { status },
4622
4622
  orderBy
@@ -4624,8 +4624,8 @@ async function fetchAllCookies(client, options = {}) {
4624
4624
  logger
4625
4625
  });
4626
4626
  cookies.push(...nodes);
4627
- offset += PAGE_SIZE$30;
4628
- shouldContinue = nodes.length === PAGE_SIZE$30;
4627
+ offset += PAGE_SIZE$31;
4628
+ shouldContinue = nodes.length === PAGE_SIZE$31;
4629
4629
  } while (shouldContinue);
4630
4630
  return cookies.sort((a, b) => a.name.localeCompare(b.name));
4631
4631
  }
@@ -4737,7 +4737,7 @@ const DELETE_DATA_FLOWS = gql`
4737
4737
  `;
4738
4738
  //#endregion
4739
4739
  //#region src/consent/fetchAllDataFlows.ts
4740
- const PAGE_SIZE$29 = 20;
4740
+ const PAGE_SIZE$30 = 20;
4741
4741
  const DEFAULT_DATA_FLOW_ORDER = [{
4742
4742
  field: "createdAt",
4743
4743
  direction: OrderDirection.Asc
@@ -4762,7 +4762,7 @@ async function fetchAllDataFlows(client, options = {}) {
4762
4762
  const { dataFlows: { nodes } } = await makeGraphQLRequest(client, DATA_FLOWS, {
4763
4763
  variables: {
4764
4764
  input: { airgapBundleId },
4765
- first: PAGE_SIZE$29,
4765
+ first: PAGE_SIZE$30,
4766
4766
  offset,
4767
4767
  filterBy: {
4768
4768
  status,
@@ -4773,8 +4773,8 @@ async function fetchAllDataFlows(client, options = {}) {
4773
4773
  logger
4774
4774
  });
4775
4775
  dataFlows.push(...nodes);
4776
- offset += PAGE_SIZE$29;
4777
- shouldContinue = nodes.length === PAGE_SIZE$29;
4776
+ offset += PAGE_SIZE$30;
4777
+ shouldContinue = nodes.length === PAGE_SIZE$30;
4778
4778
  } while (shouldContinue);
4779
4779
  return dataFlows.sort((a, b) => a.value.localeCompare(b.value));
4780
4780
  }
@@ -4914,6 +4914,7 @@ const POLICIES = gql`
4914
4914
  title {
4915
4915
  defaultMessage
4916
4916
  }
4917
+ type
4917
4918
  disableEffectiveOn
4918
4919
  disabledLocales
4919
4920
  versions {
@@ -5035,7 +5036,7 @@ const UPDATE_PROCESSING_PURPOSE_SUB_CATEGORIES = gql`
5035
5036
  `;
5036
5037
  //#endregion
5037
5038
  //#region src/consent/fetchAllProcessingPurposes.ts
5038
- const PAGE_SIZE$28 = 20;
5039
+ const PAGE_SIZE$29 = 20;
5039
5040
  /**
5040
5041
  * Fetch all processingPurposeSubCategories in the organization
5041
5042
  *
@@ -5050,14 +5051,14 @@ async function fetchAllProcessingPurposes(client, options = {}) {
5050
5051
  do {
5051
5052
  const { processingPurposeSubCategories: { nodes } } = await makeGraphQLRequest(client, PROCESSING_PURPOSE_SUB_CATEGORIES, {
5052
5053
  variables: {
5053
- first: PAGE_SIZE$28,
5054
+ first: PAGE_SIZE$29,
5054
5055
  offset
5055
5056
  },
5056
5057
  logger: options.logger
5057
5058
  });
5058
5059
  processingPurposeSubCategories.push(...nodes);
5059
- offset += PAGE_SIZE$28;
5060
- shouldContinue = nodes.length === PAGE_SIZE$28;
5060
+ offset += PAGE_SIZE$29;
5061
+ shouldContinue = nodes.length === PAGE_SIZE$29;
5061
5062
  } while (shouldContinue);
5062
5063
  return processingPurposeSubCategories.sort((a, b) => a.name.localeCompare(b.name));
5063
5064
  }
@@ -5159,7 +5160,7 @@ const CREATE_CONSENT_EXPERIENCE = gql`
5159
5160
  `;
5160
5161
  //#endregion
5161
5162
  //#region src/consent/fetchConsentManagerExperiences.ts
5162
- const PAGE_SIZE$27 = 50;
5163
+ const PAGE_SIZE$28 = 50;
5163
5164
  /**
5164
5165
  * Fetch consent manager experiences
5165
5166
  *
@@ -5174,14 +5175,14 @@ async function fetchConsentManagerExperiences(client, options = {}) {
5174
5175
  do {
5175
5176
  const { experiences: { nodes } } = await makeGraphQLRequest(client, EXPERIENCES, {
5176
5177
  variables: {
5177
- first: PAGE_SIZE$27,
5178
+ first: PAGE_SIZE$28,
5178
5179
  offset
5179
5180
  },
5180
5181
  logger: options.logger
5181
5182
  });
5182
5183
  experiences.push(...nodes);
5183
- offset += PAGE_SIZE$27;
5184
- shouldContinue = nodes.length === PAGE_SIZE$27;
5184
+ offset += PAGE_SIZE$28;
5185
+ shouldContinue = nodes.length === PAGE_SIZE$28;
5185
5186
  } while (shouldContinue);
5186
5187
  return experiences.sort((a, b) => a.name.localeCompare(b.name));
5187
5188
  }
@@ -5203,7 +5204,7 @@ async function fetchConsentManagerTheme(client, options) {
5203
5204
  }
5204
5205
  //#endregion
5205
5206
  //#region src/consent/fetchConsentThemes.ts
5206
- const PAGE_SIZE$26 = 50;
5207
+ const PAGE_SIZE$27 = 50;
5207
5208
  /**
5208
5209
  * Fetch consent themes
5209
5210
  *
@@ -5220,20 +5221,20 @@ async function fetchConsentThemes(client, options = {}) {
5220
5221
  const { consentUiThemes: { nodes } } = await makeGraphQLRequest(client, FETCH_CONSENT_UI_THEMES, {
5221
5222
  variables: {
5222
5223
  airgapBundleId,
5223
- first: PAGE_SIZE$26,
5224
+ first: PAGE_SIZE$27,
5224
5225
  offset
5225
5226
  },
5226
5227
  logger: options.logger
5227
5228
  });
5228
5229
  themes.push(...nodes);
5229
- offset += PAGE_SIZE$26;
5230
- shouldContinue = nodes.length === PAGE_SIZE$26;
5230
+ offset += PAGE_SIZE$27;
5231
+ shouldContinue = nodes.length === PAGE_SIZE$27;
5231
5232
  } while (shouldContinue);
5232
5233
  return themes;
5233
5234
  }
5234
5235
  //#endregion
5235
5236
  //#region src/consent/fetchConsentVariants.ts
5236
- const PAGE_SIZE$25 = 50;
5237
+ const PAGE_SIZE$26 = 50;
5237
5238
  /**
5238
5239
  * Fetch consent variants
5239
5240
  *
@@ -5250,14 +5251,14 @@ async function fetchConsentVariants(client, options = {}) {
5250
5251
  const { consentUiVariants: { nodes } } = await makeGraphQLRequest(client, FETCH_CONSENT_UI_VARIANTS, {
5251
5252
  variables: {
5252
5253
  airgapBundleId,
5253
- first: PAGE_SIZE$25,
5254
+ first: PAGE_SIZE$26,
5254
5255
  offset
5255
5256
  },
5256
5257
  logger: options.logger
5257
5258
  });
5258
5259
  variants.push(...nodes);
5259
- offset += PAGE_SIZE$25;
5260
- shouldContinue = nodes.length === PAGE_SIZE$25;
5260
+ offset += PAGE_SIZE$26;
5261
+ shouldContinue = nodes.length === PAGE_SIZE$26;
5261
5262
  } while (shouldContinue);
5262
5263
  return variants;
5263
5264
  }
@@ -5418,6 +5419,45 @@ const DATA_FLOW_STATS = gql`
5418
5419
  }
5419
5420
  `;
5420
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
5421
5461
  //#region src/consent/resolveDisplayedChildOrganizationIds.ts
5422
5462
  /**
5423
5463
  * Resolve displayed child organization URIs or IDs to organization IDs.
@@ -5570,7 +5610,7 @@ async function syncConsentUiVariants(client, airgapBundleId, yamlVariants, synce
5570
5610
  }
5571
5611
  //#endregion
5572
5612
  //#region src/consent/syncPartitions.ts
5573
- const PAGE_SIZE$24 = 50;
5613
+ const PAGE_SIZE$25 = 50;
5574
5614
  /**
5575
5615
  * Fetch the list of partitions
5576
5616
  *
@@ -5586,14 +5626,14 @@ async function fetchPartitions(client, options = {}) {
5586
5626
  do {
5587
5627
  const { consentPartitions: { nodes } } = await makeGraphQLRequest(client, CONSENT_PARTITIONS, {
5588
5628
  variables: {
5589
- first: PAGE_SIZE$24,
5629
+ first: PAGE_SIZE$25,
5590
5630
  offset
5591
5631
  },
5592
5632
  logger
5593
5633
  });
5594
5634
  partitions.push(...nodes);
5595
- offset += PAGE_SIZE$24;
5596
- shouldContinue = nodes.length === PAGE_SIZE$24;
5635
+ offset += PAGE_SIZE$25;
5636
+ shouldContinue = nodes.length === PAGE_SIZE$25;
5597
5637
  } while (shouldContinue);
5598
5638
  return partitions.sort((a, b) => a.name.localeCompare(b.name));
5599
5639
  }
@@ -5971,6 +6011,17 @@ async function syncDataFlows(client, dataFlows, options = {}) {
5971
6011
  //#region src/consent/syncPolicies.ts
5972
6012
  const MAX_PAGE_SIZE = 100;
5973
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
+ /**
5974
6025
  * Update or create policies
5975
6026
  *
5976
6027
  * @param client - GraphQL client
@@ -5986,6 +6037,7 @@ async function updatePolicies(client, options) {
5986
6037
  policies: page.map(([policy, policyId]) => ({
5987
6038
  id: policyId,
5988
6039
  title: policy.title,
6040
+ ...!policyId ? { type: policy.type ?? inferPolicyTypeFromTitle(policy.title) } : {},
5989
6041
  disableEffectiveOn: policy.disableEffectiveOn,
5990
6042
  disabledLocales: policy.disabledLocales,
5991
6043
  ...policy.effectiveOn || policy.content ? { version: {
@@ -6137,40 +6189,528 @@ async function syncPrivacyCenter(client, privacyCenter, options = {}) {
6137
6189
  return !encounteredError;
6138
6190
  }
6139
6191
  //#endregion
6140
- //#region src/consent/syncProcessingPurposes.ts
6192
+ //#region src/consent/fetchAllConsentWorkflowTriggers.ts
6193
+ const PAGE_SIZE$24 = 50;
6141
6194
  /**
6142
- * Input to create a new processing purpose
6195
+ * Fetch all consent workflow triggers in the organization
6143
6196
  *
6144
6197
  * @param client - GraphQL client
6145
- * @param processingPurpose - Input
6146
6198
  * @param options - Options
6147
- * @returns Created processing purpose
6199
+ * @returns All consent workflow triggers in the organization
6148
6200
  */
6149
- async function createProcessingPurpose(client, options) {
6150
- const { input: processingPurpose, logger } = options;
6151
- const { createProcessingPurposeSubCategory } = await makeGraphQLRequest(client, CREATE_PROCESSING_PURPOSE_SUB_CATEGORY, {
6152
- variables: { input: {
6153
- name: processingPurpose.name,
6154
- purpose: processingPurpose.purpose,
6155
- description: processingPurpose.description
6156
- } },
6157
- logger
6158
- });
6159
- return createProcessingPurposeSubCategory.processingPurposeSubCategory;
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));
6160
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;
6161
6253
  /**
6162
- * Input to update processing purposes
6254
+ * Fetch all actions in the organization
6163
6255
  *
6164
6256
  * @param client - GraphQL client
6165
6257
  * @param options - Options
6258
+ * @returns All actions in the organization
6166
6259
  */
6167
- async function updateProcessingPurposes(client, options) {
6168
- const { input: processingPurposes, logger } = options;
6169
- await makeGraphQLRequest(client, UPDATE_PROCESSING_PURPOSE_SUB_CATEGORIES, {
6170
- variables: { input: { processingPurposeSubCategories: processingPurposes.map(([processingPurpose, id]) => ({
6171
- id,
6172
- description: processingPurpose.description,
6173
- attributes: processingPurpose.attributes
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
6680
+ //#region src/consent/syncProcessingPurposes.ts
6681
+ /**
6682
+ * Input to create a new processing purpose
6683
+ *
6684
+ * @param client - GraphQL client
6685
+ * @param processingPurpose - Input
6686
+ * @param options - Options
6687
+ * @returns Created processing purpose
6688
+ */
6689
+ async function createProcessingPurpose(client, options) {
6690
+ const { input: processingPurpose, logger } = options;
6691
+ const { createProcessingPurposeSubCategory } = await makeGraphQLRequest(client, CREATE_PROCESSING_PURPOSE_SUB_CATEGORY, {
6692
+ variables: { input: {
6693
+ name: processingPurpose.name,
6694
+ purpose: processingPurpose.purpose,
6695
+ description: processingPurpose.description
6696
+ } },
6697
+ logger
6698
+ });
6699
+ return createProcessingPurposeSubCategory.processingPurposeSubCategory;
6700
+ }
6701
+ /**
6702
+ * Input to update processing purposes
6703
+ *
6704
+ * @param client - GraphQL client
6705
+ * @param options - Options
6706
+ */
6707
+ async function updateProcessingPurposes(client, options) {
6708
+ const { input: processingPurposes, logger } = options;
6709
+ await makeGraphQLRequest(client, UPDATE_PROCESSING_PURPOSE_SUB_CATEGORIES, {
6710
+ variables: { input: { processingPurposeSubCategories: processingPurposes.map(([processingPurpose, id]) => ({
6711
+ id,
6712
+ description: processingPurpose.description,
6713
+ attributes: processingPurpose.attributes
6174
6714
  })) } },
6175
6715
  logger
6176
6716
  });
@@ -6261,7 +6801,7 @@ const SKIP_REQUEST_ENRICHER = gql`
6261
6801
  `;
6262
6802
  //#endregion
6263
6803
  //#region src/dsr-automation/fetchAllRequestEnrichers.ts
6264
- const PAGE_SIZE$23 = 50;
6804
+ const PAGE_SIZE$21 = 50;
6265
6805
  /**
6266
6806
  * Fetch all request enrichers for a particular request
6267
6807
  *
@@ -6277,15 +6817,15 @@ async function fetchAllRequestEnrichers(client, options) {
6277
6817
  do {
6278
6818
  const { requestEnrichers: { nodes } } = await makeGraphQLRequest(client, REQUEST_ENRICHERS, {
6279
6819
  variables: {
6280
- first: PAGE_SIZE$23,
6820
+ first: PAGE_SIZE$21,
6281
6821
  offset,
6282
6822
  requestId
6283
6823
  },
6284
6824
  logger
6285
6825
  });
6286
6826
  requestEnrichers.push(...nodes);
6287
- offset += PAGE_SIZE$23;
6288
- shouldContinue = nodes.length === PAGE_SIZE$23;
6827
+ offset += PAGE_SIZE$21;
6828
+ shouldContinue = nodes.length === PAGE_SIZE$21;
6289
6829
  } while (shouldContinue);
6290
6830
  return requestEnrichers;
6291
6831
  }
@@ -6313,7 +6853,7 @@ const RequestIdentifier = t.type({
6313
6853
  /** Type of identifier */
6314
6854
  type: valuesOf(IdentifierType)
6315
6855
  });
6316
- const PAGE_SIZE$22 = 50;
6856
+ const PAGE_SIZE$20 = 50;
6317
6857
  const RequestIdentifiersResponse = t.type({ identifiers: t.array(RequestIdentifier) });
6318
6858
  /**
6319
6859
  * Validate that the Sombra version meets the minimum requirement for
@@ -6344,7 +6884,7 @@ async function fetchAllRequestIdentifiers(client, sombra, options) {
6344
6884
  if (!skipSombraCheck) await validateSombraVersion(client, { logger });
6345
6885
  do {
6346
6886
  const { identifiers: nodes } = decodeCodec(RequestIdentifiersResponse, await withTransientRetry("Failed to fetch request identifiers", () => sombra.post("v1/request-identifiers", { json: {
6347
- first: PAGE_SIZE$22,
6887
+ first: PAGE_SIZE$20,
6348
6888
  offset,
6349
6889
  requestId
6350
6890
  } }).json(), {
@@ -6353,8 +6893,8 @@ async function fetchAllRequestIdentifiers(client, sombra, options) {
6353
6893
  baseDelayMs: 500
6354
6894
  }));
6355
6895
  requestIdentifiers.push(...nodes);
6356
- offset += PAGE_SIZE$22;
6357
- shouldContinue = nodes.length === PAGE_SIZE$22;
6896
+ offset += PAGE_SIZE$20;
6897
+ shouldContinue = nodes.length === PAGE_SIZE$20;
6358
6898
  } while (shouldContinue);
6359
6899
  return requestIdentifiers;
6360
6900
  }
@@ -6391,143 +6931,43 @@ const REQUEST_IDENTIFIERS = parse(gql`
6391
6931
  name
6392
6932
  isVerifiedAtLeastOnce
6393
6933
  }
6394
- totalCount
6395
- }
6396
- }
6397
- `);
6398
- //#endregion
6399
- //#region src/dsr-automation/fetchAllRequestIdentifierMetadata.ts
6400
- const PAGE_SIZE$21 = 50;
6401
- /**
6402
- * Fetch all request identifier metadata for a particular request
6403
- *
6404
- * @param client - GraphQL client
6405
- * @param options - Filter options
6406
- * @returns List of request identifiers
6407
- */
6408
- async function fetchAllRequestIdentifierMetadata(client, options = {}) {
6409
- const { logger = NOOP_LOGGER, filterBy } = options;
6410
- const { requestId, requestIds, updatedAtBefore, updatedAtAfter } = filterBy ?? {};
6411
- const resolvedRequestIds = requestIds ?? (requestId ? [requestId] : void 0);
6412
- const requestIdentifiers = [];
6413
- let offset = 0;
6414
- let shouldContinue = false;
6415
- do {
6416
- const { requestIdentifiers: { nodes } } = await makeGraphQLRequest(client, REQUEST_IDENTIFIERS, {
6417
- variables: {
6418
- first: PAGE_SIZE$21,
6419
- offset,
6420
- requestIds: resolvedRequestIds,
6421
- updatedAtBefore: updatedAtBefore ? updatedAtBefore.toISOString() : void 0,
6422
- updatedAtAfter: updatedAtAfter ? updatedAtAfter.toISOString() : void 0
6423
- },
6424
- logger
6425
- });
6426
- requestIdentifiers.push(...nodes);
6427
- offset += PAGE_SIZE$21;
6428
- shouldContinue = nodes.length === PAGE_SIZE$21;
6429
- } while (shouldContinue);
6430
- return requestIdentifiers;
6431
- }
6432
- //#endregion
6433
- //#region src/dsr-automation/gqls/dataSubject.ts
6434
- const DATA_SUBJECTS = parse(gql`
6435
- query TranscendCliDataSubjects {
6436
- internalSubjects {
6437
- id
6438
- title {
6439
- defaultMessage
6440
- }
6441
- active
6442
- type
6443
- adminDashboardDefaultSilentMode
6444
- actions {
6445
- type
6446
- }
6447
- }
6448
- }
6449
- `);
6450
- const CREATE_DATA_SUBJECT = parse(gql`
6451
- mutation TranscendCliCreateDataSubject($type: String!) {
6452
- createSubject(input: { type: $type, title: $type, subjectClass: OTHER }) {
6453
- subject {
6454
- id
6455
- type
6456
- }
6457
- }
6458
- }
6459
- `);
6460
- const UPDATE_DATA_SUBJECT = parse(gql`
6461
- mutation TranscendCliUpdateDataSubject($input: UpdateSubjectInput!) {
6462
- updateSubject(input: $input) {
6463
- clientMutationId
6464
- }
6465
- }
6466
- `);
6467
- const TOGGLE_DATA_SUBJECT = parse(gql`
6468
- mutation TranscendCliToggleDataSubject($input: ToggleSubjectInput!) {
6469
- toggleSubject(input: $input) {
6470
- clientMutationId
6471
- }
6472
- }
6473
- `);
6474
- //#endregion
6475
- //#region src/dsr-automation/fetchDataSubjects.ts
6476
- /**
6477
- * Fetch all data subjects in an organization
6478
- *
6479
- * @param client - GraphQL client
6480
- * @param options - Options
6481
- * @returns List of data subject configurations
6482
- */
6483
- async function fetchAllDataSubjects(client, options = {}) {
6484
- const { logger = NOOP_LOGGER } = options;
6485
- const { internalSubjects } = await makeGraphQLRequest(client, DATA_SUBJECTS, { logger });
6486
- return internalSubjects;
6487
- }
6934
+ totalCount
6935
+ }
6936
+ }
6937
+ `);
6938
+ //#endregion
6939
+ //#region src/dsr-automation/fetchAllRequestIdentifierMetadata.ts
6940
+ const PAGE_SIZE$19 = 50;
6488
6941
  /**
6489
- * Create a single data subject
6942
+ * Fetch all request identifier metadata for a particular request
6490
6943
  *
6491
6944
  * @param client - GraphQL client
6492
- * @param options - Options
6493
- * @returns Created data subject
6494
- */
6495
- async function createDataSubject(client, options) {
6496
- const { input: dataSubjectType, logger = NOOP_LOGGER } = options;
6497
- const { createSubject } = await makeGraphQLRequest(client, CREATE_DATA_SUBJECT, {
6498
- variables: {
6499
- type: dataSubjectType,
6500
- skipPublish: true
6501
- },
6502
- logger
6503
- });
6504
- return createSubject.subject;
6505
- }
6506
- /**
6507
- * Convert a list of data subject types into the block list of IDs to assign to the data silo
6508
- *
6509
- * @param dataSubjectTypes - The list of data subject types that the data silo should be for
6510
- * @param allDataSubjects - All data subjects in the organization
6511
- * @returns The block list of data subject ids to not process against this data silo
6512
- */
6513
- function convertToDataSubjectBlockList(dataSubjectTypes, allDataSubjects) {
6514
- dataSubjectTypes.forEach((type) => {
6515
- if (!allDataSubjects[type]) throw new Error(`Expected to find data subject definition: ${type}`);
6516
- });
6517
- return Object.values(allDataSubjects).filter((silo) => !dataSubjectTypes.includes(silo.type)).map(({ id }) => id);
6518
- }
6519
- /**
6520
- * Convert a list of data subject types into the allow list of types
6521
- *
6522
- * @param dataSubjectTypes - The list of data subject types that the data silo should be for
6523
- * @param allDataSubjects - All data subjects in the organization
6524
- * @returns The allow list of data subjects for that silo
6945
+ * @param options - Filter options
6946
+ * @returns List of request identifiers
6525
6947
  */
6526
- function convertToDataSubjectAllowlist(dataSubjectTypes, allDataSubjects) {
6527
- dataSubjectTypes.forEach((type) => {
6528
- if (!allDataSubjects[type]) throw new Error(`Expected to find data subject definition: ${type}`);
6529
- });
6530
- 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;
6531
6971
  }
6532
6972
  //#endregion
6533
6973
  //#region src/dsr-automation/gqls/dsrIdentifier.ts
@@ -6705,7 +7145,7 @@ const UPDATE_ENRICHER = gql`
6705
7145
  `;
6706
7146
  //#endregion
6707
7147
  //#region src/dsr-automation/syncEnrichers.ts
6708
- const PAGE_SIZE$20 = 20;
7148
+ const PAGE_SIZE$18 = 20;
6709
7149
  /**
6710
7150
  * Fetch all enrichers in the organization
6711
7151
  *
@@ -6722,15 +7162,15 @@ async function fetchAllEnrichers(client, options = {}) {
6722
7162
  do {
6723
7163
  const { enrichers: { nodes } } = await makeGraphQLRequest(client, ENRICHERS, {
6724
7164
  variables: {
6725
- first: PAGE_SIZE$20,
7165
+ first: PAGE_SIZE$18,
6726
7166
  offset,
6727
7167
  title
6728
7168
  },
6729
7169
  logger
6730
7170
  });
6731
7171
  enrichers.push(...nodes);
6732
- offset += PAGE_SIZE$20;
6733
- shouldContinue = nodes.length === PAGE_SIZE$20;
7172
+ offset += PAGE_SIZE$18;
7173
+ shouldContinue = nodes.length === PAGE_SIZE$18;
6734
7174
  } while (shouldContinue);
6735
7175
  return enrichers.sort((a, b) => a.title.localeCompare(b.title));
6736
7176
  }
@@ -6869,67 +7309,8 @@ async function fetchActiveSiloDiscoPlugin(client, options) {
6869
7309
  return plugins[0];
6870
7310
  }
6871
7311
  //#endregion
6872
- //#region src/dsr-automation/gqls/action.ts
6873
- const ACTIONS = gql`
6874
- query TranscendCliActions($first: Int!, $offset: Int!) {
6875
- actions(
6876
- first: $first
6877
- offset: $offset
6878
- useMaster: false
6879
- orderBy: [{ field: type, direction: ASC }]
6880
- ) {
6881
- nodes {
6882
- id
6883
- type
6884
- skipSecondaryIfNoFiles
6885
- skipDownloadableStep
6886
- requiresReview
6887
- regionList
6888
- regionDetectionMethod
6889
- waitingPeriod
6890
- }
6891
- }
6892
- }
6893
- `;
6894
- const UPDATE_ACTION = gql`
6895
- mutation TranscendCliUpdateAction($input: UpdateActionInput!) {
6896
- updateAction(input: $input) {
6897
- clientMutationId
6898
- }
6899
- }
6900
- `;
6901
- //#endregion
6902
- //#region src/dsr-automation/fetchAllActions.ts
6903
- const PAGE_SIZE$19 = 20;
6904
- /**
6905
- * Fetch all actions in the organization
6906
- *
6907
- * @param client - GraphQL client
6908
- * @param options - Options
6909
- * @returns All actions in the organization
6910
- */
6911
- async function fetchAllActions(client, options = {}) {
6912
- const { logger } = options;
6913
- const actions = [];
6914
- let offset = 0;
6915
- let shouldContinue = false;
6916
- do {
6917
- const { actions: { nodes } } = await makeGraphQLRequest(client, ACTIONS, {
6918
- variables: {
6919
- first: PAGE_SIZE$19,
6920
- offset
6921
- },
6922
- logger
6923
- });
6924
- actions.push(...nodes);
6925
- offset += PAGE_SIZE$19;
6926
- shouldContinue = nodes.length === PAGE_SIZE$19;
6927
- } while (shouldContinue);
6928
- return actions.sort((a, b) => a.type.localeCompare(b.type));
6929
- }
6930
- //#endregion
6931
7312
  //#region src/dsr-automation/fetchAllAttributeKeys.ts
6932
- const PAGE_SIZE$18 = 20;
7313
+ const PAGE_SIZE$17 = 20;
6933
7314
  /**
6934
7315
  * Fetch all attribute keys enabled for privacy requests
6935
7316
  *
@@ -6945,14 +7326,14 @@ async function fetchAllRequestAttributeKeys(client, options = {}) {
6945
7326
  do {
6946
7327
  const { attributeKeys: { nodes } } = await makeGraphQLRequest(client, ATTRIBUTE_KEYS_REQUESTS, {
6947
7328
  variables: {
6948
- first: PAGE_SIZE$18,
7329
+ first: PAGE_SIZE$17,
6949
7330
  offset
6950
7331
  },
6951
7332
  logger
6952
7333
  });
6953
7334
  attributeKeys.push(...nodes);
6954
- offset += PAGE_SIZE$18;
6955
- shouldContinue = nodes.length === PAGE_SIZE$18;
7335
+ offset += PAGE_SIZE$17;
7336
+ shouldContinue = nodes.length === PAGE_SIZE$17;
6956
7337
  } while (shouldContinue);
6957
7338
  return attributeKeys.sort((a, b) => a.name.localeCompare(b.name));
6958
7339
  }
@@ -6983,7 +7364,7 @@ const SILO_DISCOVERY_RESULTS = gql`
6983
7364
  `;
6984
7365
  //#endregion
6985
7366
  //#region src/dsr-automation/fetchAllSiloDiscoveryResults.ts
6986
- const PAGE_SIZE$17 = 30;
7367
+ const PAGE_SIZE$16 = 30;
6987
7368
  /**
6988
7369
  * Fetch all silo discovery results in the organization
6989
7370
  *
@@ -6999,7 +7380,7 @@ async function fetchAllSiloDiscoveryResults(client, options = {}) {
6999
7380
  do {
7000
7381
  const { siloDiscoveryResults: { nodes } } = await makeGraphQLRequest(client, SILO_DISCOVERY_RESULTS, {
7001
7382
  variables: {
7002
- first: PAGE_SIZE$17,
7383
+ first: PAGE_SIZE$16,
7003
7384
  offset,
7004
7385
  input: {},
7005
7386
  filterBy: {}
@@ -7011,8 +7392,8 @@ async function fetchAllSiloDiscoveryResults(client, options = {}) {
7011
7392
  title: node.suggestedCatalog.title
7012
7393
  } : node);
7013
7394
  siloDiscoveryResults.push(...titledNodes);
7014
- offset += PAGE_SIZE$17;
7015
- shouldContinue = nodes.length === PAGE_SIZE$17;
7395
+ offset += PAGE_SIZE$16;
7396
+ shouldContinue = nodes.length === PAGE_SIZE$16;
7016
7397
  } while (shouldContinue);
7017
7398
  return siloDiscoveryResults;
7018
7399
  }
@@ -7031,7 +7412,7 @@ const CATALOGS = gql`
7031
7412
  `;
7032
7413
  //#endregion
7033
7414
  //#region src/dsr-automation/fetchCatalogs.ts
7034
- const PAGE_SIZE$16 = 100;
7415
+ const PAGE_SIZE$15 = 100;
7035
7416
  /**
7036
7417
  * Fetch all integration catalogs in an organization
7037
7418
  *
@@ -7047,14 +7428,14 @@ async function fetchAllCatalogs(client, options = {}) {
7047
7428
  do {
7048
7429
  const { catalogs: { nodes } } = await makeGraphQLRequest(client, CATALOGS, {
7049
7430
  variables: {
7050
- first: PAGE_SIZE$16,
7431
+ first: PAGE_SIZE$15,
7051
7432
  offset
7052
7433
  },
7053
7434
  logger
7054
7435
  });
7055
7436
  catalogs.push(...nodes);
7056
- offset += PAGE_SIZE$16;
7057
- shouldContinue = nodes.length === PAGE_SIZE$16;
7437
+ offset += PAGE_SIZE$15;
7438
+ shouldContinue = nodes.length === PAGE_SIZE$15;
7058
7439
  } while (shouldContinue);
7059
7440
  return catalogs.sort((a, b) => a.integrationName.localeCompare(b.integrationName));
7060
7441
  }
@@ -7157,7 +7538,7 @@ async function fetchRequestDataSilosCount(client, options = {}) {
7157
7538
  });
7158
7539
  return totalCount;
7159
7540
  }
7160
- const PAGE_SIZE$15 = 100;
7541
+ const PAGE_SIZE$14 = 100;
7161
7542
  /**
7162
7543
  * Fetch all request data silos by some filter criteria
7163
7544
  *
@@ -7173,7 +7554,7 @@ async function fetchRequestDataSilos(client, options = {}) {
7173
7554
  do {
7174
7555
  const { requestDataSilos: { nodes } } = await makeGraphQLRequest(client, REQUEST_DATA_SILOS, {
7175
7556
  variables: {
7176
- first: PAGE_SIZE$15,
7557
+ first: PAGE_SIZE$14,
7177
7558
  offset,
7178
7559
  filterBy: {
7179
7560
  dataSiloId,
@@ -7185,8 +7566,8 @@ async function fetchRequestDataSilos(client, options = {}) {
7185
7566
  logger
7186
7567
  });
7187
7568
  requestDataSilos.push(...nodes);
7188
- offset += PAGE_SIZE$15;
7189
- shouldContinue = nodes.length === PAGE_SIZE$15;
7569
+ offset += PAGE_SIZE$14;
7570
+ shouldContinue = nodes.length === PAGE_SIZE$14;
7190
7571
  onProgress?.(nodes.length);
7191
7572
  } while (shouldContinue && (!limit || offset < limit));
7192
7573
  return requestDataSilos;
@@ -7351,7 +7732,7 @@ const CREATE_TEMPLATE = gql`
7351
7732
  `;
7352
7733
  //#endregion
7353
7734
  //#region src/dsr-automation/syncTemplates.ts
7354
- const PAGE_SIZE$14 = 20;
7735
+ const PAGE_SIZE$13 = 20;
7355
7736
  /**
7356
7737
  * Fetch all Templates in the organization
7357
7738
  *
@@ -7367,15 +7748,15 @@ async function fetchAllTemplates(client, options = {}) {
7367
7748
  do {
7368
7749
  const { templates: { nodes } } = await makeGraphQLRequest(client, TEMPLATES, {
7369
7750
  variables: {
7370
- first: PAGE_SIZE$14,
7751
+ first: PAGE_SIZE$13,
7371
7752
  offset,
7372
7753
  title
7373
7754
  },
7374
7755
  logger
7375
7756
  });
7376
7757
  templates.push(...nodes);
7377
- offset += PAGE_SIZE$14;
7378
- shouldContinue = nodes.length === PAGE_SIZE$14;
7758
+ offset += PAGE_SIZE$13;
7759
+ shouldContinue = nodes.length === PAGE_SIZE$13;
7379
7760
  } while (shouldContinue);
7380
7761
  return templates.sort((a, b) => a.title.localeCompare(b.title));
7381
7762
  }
@@ -7397,96 +7778,6 @@ async function syncTemplate(client, template, options = {}) {
7397
7778
  });
7398
7779
  }
7399
7780
  //#endregion
7400
- //#region src/dsr-automation/gqls/workflowConfig.ts
7401
- const WORKFLOW_CONFIGS = parse(gql`
7402
- query TranscendCliWorkflowConfigs($first: Int!, $offset: Int!, $filterBy: WorkflowFilterInput) {
7403
- workflows(first: $first, offset: $offset, filterBy: $filterBy) {
7404
- nodes {
7405
- id
7406
- title {
7407
- defaultMessage
7408
- }
7409
- subtitle {
7410
- defaultMessage
7411
- }
7412
- description {
7413
- defaultMessage
7414
- }
7415
- internalName
7416
- workflowConfigVisibility
7417
- workflowConfigType
7418
- collectDataSubjectRegions
7419
- regionList
7420
- expiryTime {
7421
- region
7422
- value
7423
- }
7424
- action {
7425
- type
7426
- }
7427
- subject {
7428
- id
7429
- type
7430
- }
7431
- WorkflowConfigAttributeKeys {
7432
- attributeKey {
7433
- id
7434
- name
7435
- }
7436
- }
7437
- }
7438
- totalCount
7439
- }
7440
- }
7441
- `);
7442
- const CREATE_WORKFLOW = parse(gql`
7443
- mutation TranscendCliCreateWorkflow($input: CreateWorkflowInput!) {
7444
- createWorkflow(input: $input) {
7445
- workflowConfig {
7446
- id
7447
- internalName
7448
- }
7449
- }
7450
- }
7451
- `);
7452
- const UPDATE_WORKFLOW_CONFIG = parse(gql`
7453
- mutation TranscendCliUpdateWorkflowConfig($input: UpdateWorkflowConfigInput!) {
7454
- updateWorkflowConfig(input: $input) {
7455
- success
7456
- }
7457
- }
7458
- `);
7459
- //#endregion
7460
- //#region src/dsr-automation/fetchAllWorkflowConfigs.ts
7461
- const PAGE_SIZE$13 = 50;
7462
- /**
7463
- * Fetch all workflow configs in the organization
7464
- *
7465
- * @param client - GraphQL client
7466
- * @param options - Options
7467
- * @returns All workflow configs
7468
- */
7469
- async function fetchAllWorkflowConfigs(client, options = {}) {
7470
- const { logger, workflowConfigType } = options;
7471
- const configs = [];
7472
- let offset = 0;
7473
- let shouldContinue = false;
7474
- do {
7475
- const { workflows: { nodes } } = await makeGraphQLRequest(client, WORKFLOW_CONFIGS, {
7476
- variables: {
7477
- first: PAGE_SIZE$13,
7478
- offset,
7479
- filterBy: workflowConfigType ? { workflowConfigType } : void 0
7480
- },
7481
- logger
7482
- });
7483
- configs.push(...nodes);
7484
- offset += PAGE_SIZE$13;
7485
- shouldContinue = nodes.length === PAGE_SIZE$13;
7486
- } while (shouldContinue);
7487
- return configs.sort((a, b) => a.title.defaultMessage.localeCompare(b.title.defaultMessage));
7488
- }
7489
- //#endregion
7490
7781
  //#region src/dsr-automation/resolveWorkflowConfigMatch.ts
7491
7782
  /**
7492
7783
  * Stable key for title + action + data subject + region-list identity.
@@ -7672,7 +7963,10 @@ async function syncWorkflowConfigs(client, inputs, options = {}) {
7672
7963
  collectDataSubjectRegions: null,
7673
7964
  regionList: config["region-list"] ?? [],
7674
7965
  expiryTime: null,
7675
- action: { type: config["action-type"] },
7966
+ action: {
7967
+ id: "",
7968
+ type: config["action-type"]
7969
+ },
7676
7970
  subject: subjectId ? {
7677
7971
  id: subjectId,
7678
7972
  type: config["data-subject-type"]
@@ -10159,6 +10453,6 @@ function createMonorepoPackageDefinition(name, directory) {
10159
10453
  };
10160
10454
  }
10161
10455
  //#endregion
10162
- 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_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, 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, resolveDisplayedChildOrganizationIds, 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, 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, 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 };
10163
10457
 
10164
10458
  //# sourceMappingURL=index.mjs.map