@transcend-io/cli 8.26.2 → 8.27.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.
Files changed (130) hide show
  1. package/README.md +15 -0
  2. package/dist/bin/bash-complete.cjs +1 -1
  3. package/dist/bin/cli.cjs +1 -1
  4. package/dist/bin/deprecated-command.cjs +2 -2
  5. package/dist/{chunk-JKEVZFNY.cjs → chunk-AD5RNQ4J.cjs} +2 -2
  6. package/dist/{chunk-JKEVZFNY.cjs.map → chunk-AD5RNQ4J.cjs.map} +1 -1
  7. package/dist/{chunk-6GWHYOPM.cjs → chunk-BL2UJW5C.cjs} +2 -2
  8. package/dist/{chunk-6GWHYOPM.cjs.map → chunk-BL2UJW5C.cjs.map} +1 -1
  9. package/dist/{chunk-BLSMEA5C.cjs → chunk-DZ5KTF7W.cjs} +2 -2
  10. package/dist/{chunk-BLSMEA5C.cjs.map → chunk-DZ5KTF7W.cjs.map} +1 -1
  11. package/dist/{chunk-5UBGZNDC.cjs → chunk-ECGHWDVP.cjs} +2 -2
  12. package/dist/chunk-ECGHWDVP.cjs.map +1 -0
  13. package/dist/{chunk-M7EKT75X.cjs → chunk-FQESEVCX.cjs} +2 -2
  14. package/dist/{chunk-M7EKT75X.cjs.map → chunk-FQESEVCX.cjs.map} +1 -1
  15. package/dist/chunk-G3LZCX5D.cjs +12 -0
  16. package/dist/chunk-G3LZCX5D.cjs.map +1 -0
  17. package/dist/{chunk-7OG6A4LI.cjs → chunk-GMTBHFZV.cjs} +4 -4
  18. package/dist/{chunk-7OG6A4LI.cjs.map → chunk-GMTBHFZV.cjs.map} +1 -1
  19. package/dist/{chunk-TQEFJGW6.cjs → chunk-HBI4MFHE.cjs} +21 -21
  20. package/dist/{chunk-TQEFJGW6.cjs.map → chunk-HBI4MFHE.cjs.map} +1 -1
  21. package/dist/{chunk-ACHJOO4S.cjs → chunk-IG445VJR.cjs} +2 -2
  22. package/dist/{chunk-ACHJOO4S.cjs.map → chunk-IG445VJR.cjs.map} +1 -1
  23. package/dist/{chunk-RE5YALEO.cjs → chunk-JFZPP4VV.cjs} +3 -3
  24. package/dist/{chunk-RE5YALEO.cjs.map → chunk-JFZPP4VV.cjs.map} +1 -1
  25. package/dist/{chunk-4LSUJDDH.cjs → chunk-JXUIQS5T.cjs} +2 -2
  26. package/dist/{chunk-4LSUJDDH.cjs.map → chunk-JXUIQS5T.cjs.map} +1 -1
  27. package/dist/{chunk-5QRRUXRI.cjs → chunk-LIFHKHUG.cjs} +2 -2
  28. package/dist/{chunk-5QRRUXRI.cjs.map → chunk-LIFHKHUG.cjs.map} +1 -1
  29. package/dist/{chunk-QMXGMC2H.cjs → chunk-LSZQ3OFG.cjs} +2 -2
  30. package/dist/{chunk-QMXGMC2H.cjs.map → chunk-LSZQ3OFG.cjs.map} +1 -1
  31. package/dist/{chunk-5HNRVLH2.cjs → chunk-NXWJFTTG.cjs} +4 -4
  32. package/dist/{chunk-5HNRVLH2.cjs.map → chunk-NXWJFTTG.cjs.map} +1 -1
  33. package/dist/{chunk-FE6CECES.cjs → chunk-OPHHRNLH.cjs} +11 -10
  34. package/dist/chunk-OPHHRNLH.cjs.map +1 -0
  35. package/dist/{chunk-UBVZKE7V.cjs → chunk-THCW2SNW.cjs} +2 -2
  36. package/dist/{chunk-UBVZKE7V.cjs.map → chunk-THCW2SNW.cjs.map} +1 -1
  37. package/dist/{impl-RHZNZ6CW.cjs → impl-2KMLK6S2.cjs} +2 -2
  38. package/dist/{impl-RHZNZ6CW.cjs.map → impl-2KMLK6S2.cjs.map} +1 -1
  39. package/dist/{impl-NILGKSUG.cjs → impl-3NXCEUTZ.cjs} +5 -5
  40. package/dist/{impl-NILGKSUG.cjs.map → impl-3NXCEUTZ.cjs.map} +1 -1
  41. package/dist/impl-3SWF4GZZ.cjs +2 -0
  42. package/dist/{impl-EMD77BVT.cjs.map → impl-3SWF4GZZ.cjs.map} +1 -1
  43. package/dist/{impl-XW4UTUBW.cjs → impl-3YAJ7ZV3.cjs} +2 -2
  44. package/dist/{impl-XW4UTUBW.cjs.map → impl-3YAJ7ZV3.cjs.map} +1 -1
  45. package/dist/{impl-TSZSY33S.cjs → impl-5AU5GNSB.cjs} +2 -2
  46. package/dist/{impl-TSZSY33S.cjs.map → impl-5AU5GNSB.cjs.map} +1 -1
  47. package/dist/{impl-BQKRH5GQ.cjs → impl-5BIEQWSB.cjs} +2 -2
  48. package/dist/{impl-BQKRH5GQ.cjs.map → impl-5BIEQWSB.cjs.map} +1 -1
  49. package/dist/{impl-CSXBLMR7.cjs → impl-5D3TCFK7.cjs} +2 -2
  50. package/dist/{impl-CSXBLMR7.cjs.map → impl-5D3TCFK7.cjs.map} +1 -1
  51. package/dist/{impl-SXOCIQPX.cjs → impl-5LRIZL6Q.cjs} +2 -2
  52. package/dist/{impl-SXOCIQPX.cjs.map → impl-5LRIZL6Q.cjs.map} +1 -1
  53. package/dist/{impl-FHICSIT4.cjs → impl-5LT5ZA7K.cjs} +2 -2
  54. package/dist/{impl-FHICSIT4.cjs.map → impl-5LT5ZA7K.cjs.map} +1 -1
  55. package/dist/{impl-HRVPP3AF.cjs → impl-6VNSS7JY.cjs} +2 -2
  56. package/dist/{impl-HRVPP3AF.cjs.map → impl-6VNSS7JY.cjs.map} +1 -1
  57. package/dist/{impl-K7NLXEZN.cjs → impl-6X6QOXM3.cjs} +3 -3
  58. package/dist/{impl-K7NLXEZN.cjs.map → impl-6X6QOXM3.cjs.map} +1 -1
  59. package/dist/{impl-FK7FC2AF.cjs → impl-6ZJOSWUH.cjs} +2 -2
  60. package/dist/{impl-FK7FC2AF.cjs.map → impl-6ZJOSWUH.cjs.map} +1 -1
  61. package/dist/{impl-7V22LA5U.cjs → impl-ABBOINXS.cjs} +2 -2
  62. package/dist/{impl-7V22LA5U.cjs.map → impl-ABBOINXS.cjs.map} +1 -1
  63. package/dist/{impl-CBO3W76N.cjs → impl-BGLZ6S7A.cjs} +2 -2
  64. package/dist/{impl-CBO3W76N.cjs.map → impl-BGLZ6S7A.cjs.map} +1 -1
  65. package/dist/{impl-GOJL7NWE.cjs → impl-BIB6PUGE.cjs} +2 -2
  66. package/dist/{impl-GOJL7NWE.cjs.map → impl-BIB6PUGE.cjs.map} +1 -1
  67. package/dist/{impl-JY5JVCKH.cjs → impl-BSODHREX.cjs} +2 -2
  68. package/dist/{impl-JY5JVCKH.cjs.map → impl-BSODHREX.cjs.map} +1 -1
  69. package/dist/{impl-GCAHKCXJ.cjs → impl-D3IADLFZ.cjs} +2 -2
  70. package/dist/{impl-GCAHKCXJ.cjs.map → impl-D3IADLFZ.cjs.map} +1 -1
  71. package/dist/{impl-A7QHIGMS.cjs → impl-FKFSISLZ.cjs} +2 -2
  72. package/dist/{impl-A7QHIGMS.cjs.map → impl-FKFSISLZ.cjs.map} +1 -1
  73. package/dist/{impl-WJZL3F6W.cjs → impl-GE54DKYZ.cjs} +3 -3
  74. package/dist/{impl-WJZL3F6W.cjs.map → impl-GE54DKYZ.cjs.map} +1 -1
  75. package/dist/{impl-BEATRFDE.cjs → impl-GZIWCS6D.cjs} +2 -2
  76. package/dist/{impl-BEATRFDE.cjs.map → impl-GZIWCS6D.cjs.map} +1 -1
  77. package/dist/{impl-ZA3FYBHK.cjs → impl-HIZHI4CT.cjs} +2 -2
  78. package/dist/{impl-ZA3FYBHK.cjs.map → impl-HIZHI4CT.cjs.map} +1 -1
  79. package/dist/{impl-KBXUU7JT.cjs → impl-HULEYZA3.cjs} +2 -2
  80. package/dist/{impl-KBXUU7JT.cjs.map → impl-HULEYZA3.cjs.map} +1 -1
  81. package/dist/{impl-LDYN63H6.cjs → impl-IOI72RK7.cjs} +2 -2
  82. package/dist/{impl-LDYN63H6.cjs.map → impl-IOI72RK7.cjs.map} +1 -1
  83. package/dist/{impl-33BZGWDB.cjs → impl-J23ILBH7.cjs} +2 -2
  84. package/dist/{impl-33BZGWDB.cjs.map → impl-J23ILBH7.cjs.map} +1 -1
  85. package/dist/{impl-M4OXXOMC.cjs → impl-JID5BHDK.cjs} +2 -2
  86. package/dist/{impl-M4OXXOMC.cjs.map → impl-JID5BHDK.cjs.map} +1 -1
  87. package/dist/{impl-72VUDRUK.cjs → impl-KFQWJU6D.cjs} +2 -2
  88. package/dist/{impl-72VUDRUK.cjs.map → impl-KFQWJU6D.cjs.map} +1 -1
  89. package/dist/{impl-YEQ5CW47.cjs → impl-LLP7IXWK.cjs} +2 -2
  90. package/dist/{impl-YEQ5CW47.cjs.map → impl-LLP7IXWK.cjs.map} +1 -1
  91. package/dist/{impl-ARSWR7NX.cjs → impl-OGVRZFXA.cjs} +2 -2
  92. package/dist/{impl-ARSWR7NX.cjs.map → impl-OGVRZFXA.cjs.map} +1 -1
  93. package/dist/{impl-OU5VJBRQ.cjs → impl-OQKJR3OY.cjs} +4 -4
  94. package/dist/{impl-OU5VJBRQ.cjs.map → impl-OQKJR3OY.cjs.map} +1 -1
  95. package/dist/{impl-VSGGPMKM.cjs → impl-OVRVC7X5.cjs} +2 -2
  96. package/dist/{impl-VSGGPMKM.cjs.map → impl-OVRVC7X5.cjs.map} +1 -1
  97. package/dist/{impl-NVHVPNKZ.cjs → impl-OYWTY4Q7.cjs} +2 -2
  98. package/dist/{impl-NVHVPNKZ.cjs.map → impl-OYWTY4Q7.cjs.map} +1 -1
  99. package/dist/{impl-LOR6NAV6.cjs → impl-P7VE347W.cjs} +2 -2
  100. package/dist/{impl-LOR6NAV6.cjs.map → impl-P7VE347W.cjs.map} +1 -1
  101. package/dist/{impl-7RRE2GGO.cjs → impl-QOGUZMYD.cjs} +2 -2
  102. package/dist/{impl-7RRE2GGO.cjs.map → impl-QOGUZMYD.cjs.map} +1 -1
  103. package/dist/impl-U4GMJYRH.cjs +2 -0
  104. package/dist/{impl-M6YOD7LA.cjs.map → impl-U4GMJYRH.cjs.map} +1 -1
  105. package/dist/{impl-DVDXXRQC.cjs → impl-W75S6XUS.cjs} +2 -2
  106. package/dist/{impl-DVDXXRQC.cjs.map → impl-W75S6XUS.cjs.map} +1 -1
  107. package/dist/{impl-24WXRAZH.cjs → impl-WUHP3P5R.cjs} +2 -2
  108. package/dist/{impl-24WXRAZH.cjs.map → impl-WUHP3P5R.cjs.map} +1 -1
  109. package/dist/{impl-2QA5YMX7.cjs → impl-WWL2A2T2.cjs} +2 -2
  110. package/dist/{impl-2QA5YMX7.cjs.map → impl-WWL2A2T2.cjs.map} +1 -1
  111. package/dist/{impl-3NHKBP7U.cjs → impl-WWVVPFM7.cjs} +2 -2
  112. package/dist/{impl-3NHKBP7U.cjs.map → impl-WWVVPFM7.cjs.map} +1 -1
  113. package/dist/{impl-5T356QQ5.cjs → impl-X3NI5ITC.cjs} +2 -2
  114. package/dist/{impl-5T356QQ5.cjs.map → impl-X3NI5ITC.cjs.map} +1 -1
  115. package/dist/{impl-VUMK2QR4.cjs → impl-XMOEYUIG.cjs} +2 -2
  116. package/dist/{impl-VUMK2QR4.cjs.map → impl-XMOEYUIG.cjs.map} +1 -1
  117. package/dist/{impl-ONAOXMKU.cjs → impl-YGX4NQLZ.cjs} +2 -2
  118. package/dist/{impl-ONAOXMKU.cjs.map → impl-YGX4NQLZ.cjs.map} +1 -1
  119. package/dist/{impl-47P6B22N.cjs → impl-YOB7AAQJ.cjs} +2 -2
  120. package/dist/{impl-47P6B22N.cjs.map → impl-YOB7AAQJ.cjs.map} +1 -1
  121. package/dist/index.cjs +3 -3
  122. package/dist/index.cjs.map +1 -1
  123. package/dist/index.d.cts +9 -2
  124. package/package.json +1 -1
  125. package/dist/chunk-5UBGZNDC.cjs.map +0 -1
  126. package/dist/chunk-CP42F62X.cjs +0 -12
  127. package/dist/chunk-CP42F62X.cjs.map +0 -1
  128. package/dist/chunk-FE6CECES.cjs.map +0 -1
  129. package/dist/impl-EMD77BVT.cjs +0 -2
  130. package/dist/impl-M6YOD7LA.cjs +0 -2
package/dist/index.d.cts CHANGED
@@ -57858,6 +57858,8 @@ declare const IntlMessageInput: t.IntersectionC<[t.TypeC<{
57858
57858
  }>, t.PartialC<{
57859
57859
  /** The hard-coded ID that the message refers to in the Privacy Center or Consent Manager UI, null if message is dynamic */
57860
57860
  targetReactIntlId: t.StringC;
57861
+ /** The description of the message */
57862
+ description: t.StringC;
57861
57863
  /** The default message to use */
57862
57864
  defaultMessage: t.StringC;
57863
57865
  /** The translations */
@@ -105758,6 +105760,8 @@ declare const TranscendInput: t.PartialC<{
105758
105760
  }>, t.PartialC<{
105759
105761
  /** The hard-coded ID that the message refers to in the Privacy Center or Consent Manager UI, null if message is dynamic */
105760
105762
  targetReactIntlId: t.StringC;
105763
+ /** The description of the message */
105764
+ description: t.StringC;
105761
105765
  /** The default message to use */
105762
105766
  defaultMessage: t.StringC;
105763
105767
  /** The translations */
@@ -124843,6 +124847,8 @@ interface Message {
124843
124847
  id: string;
124844
124848
  /** Default message */
124845
124849
  defaultMessage: string;
124850
+ /** Description */
124851
+ description: string;
124846
124852
  /** React Intl ID */
124847
124853
  targetReactIntlId: string | null;
124848
124854
  /** Disabled locales */
@@ -145348,7 +145354,7 @@ declare function removeUnverifiedRequestIdentifiers({ requestActions, identifier
145348
145354
  }): Promise<number>;
145349
145355
 
145350
145356
  var description = "A command line interface for programmatic operations across Transcend.";
145351
- var version = "8.26.2";
145357
+ var version = "8.27.0";
145352
145358
 
145353
145359
  /**
145354
145360
  * The name of the main binary for the CLI
@@ -145852,6 +145858,7 @@ declare function parquetToCsvOneFile(opts: ParquetToCsvOneFileOptions): Promise<
145852
145858
 
145853
145859
  declare const DAY_MS: number;
145854
145860
  declare const HOUR_MS: number;
145861
+ declare const FIVE_MIN_MS: number;
145855
145862
  /**
145856
145863
  * Clamp 1..50 per API spec
145857
145864
  *
@@ -146672,4 +146679,4 @@ type EnrichPrivacyRequest = t.TypeOf<typeof EnrichPrivacyRequest>;
146672
146679
  */
146673
146680
  declare function enrichPrivacyRequest(sombra: Got, { id: rawId, ...rest }: EnrichPrivacyRequest, enricherId: string, index?: number): Promise<boolean>;
146674
146681
 
146675
- export { ACTIONS, ADD_MESSAGES_TO_PROMPT_RUN, ADD_SILO_DISCOVERY_RESULTS, ADMIN_DASH, ADMIN_DASH_DATAPOINTS, ADMIN_DASH_INTEGRATIONS, AGENTS, AGENT_FILES, AGENT_FUNCTIONS, type AIIntegrationC, API_KEYS, APPROVE_PRIVACY_REQUEST, ASSESSMENTS, ASSESSMENT_SECTION_FIELDS, ASSESSMENT_TEMPLATES, ASSUME_ROLE, ATTRIBUTES, ATTRIBUTE_KEYS_REQUESTS, ATTRIBUTE_VALUES, type Action, ActionInput, type ActionItem, ActionItemCollectionInput, ActionItemInput, type ActionItemRaw, type AddMessagesToPromptRunInput, type Agent, type AgentFile, type AgentFileFilterBy, AgentFileInput, type AgentFunction, AgentFunctionInput, AgentInput, type ApiKey, type ApiKeyGenerateError, ApiKeyInput, type Assessment, AssessmentAction, type AssessmentAnswer, type AssessmentAnswerOption, AssessmentAnswerOptionInput, type AssessmentComment, AssessmentDisplayLogicInput, type AssessmentGroup, AssessmentInput, AssessmentNestedRule, AssessmentNestedRuleInput, type AssessmentPreviousSubmission, type AssessmentQuestion, type AssessmentResource, AssessmentResourceInput, AssessmentRetentionScheduleInput, AssessmentRiskLogic, AssessmentRule, AssessmentRuleInput, AssessmentRuleWithOperands, AssessmentRuleWithoutOperands, type AssessmentSection, AssessmentSectionInput, AssessmentSectionQuestionInput, type AssessmentTemplate, AssessmentTemplateInput, AttestedExtraIdentifiers, type Attribute, AttributeInput, type AttributeKey, type AttributeNameMap, AttributePreview, type AttributeValue, AttributeValueInput, BLANK, BULK_APPLY, BULK_REQUEST_FILES, BUSINESS_ENTITIES, type BusinessEntity, BusinessEntityInput, CANCEL_PRIVACY_REQUEST, CAN_APPLY_IN_BULK, CATALOGS, CHANGE_REQUEST_DATA_SILO_STATUS, CODE_PACKAGES, CONSENT_MANAGER_ANALYTICS_DATA, CONSENT_PARTITIONS, COOKIES, CREATE_ACTION_ITEMS, CREATE_ACTION_ITEM_COLLECTION, CREATE_AGENT, CREATE_AGENT_FILE, CREATE_AGENT_FUNCTION, CREATE_API_KEY, CREATE_ATTRIBUTE, CREATE_ATTRIBUTE_VALUES, CREATE_BUSINESS_ENTITY, CREATE_CODE_PACKAGE, CREATE_CONSENT_EXPERIENCE, CREATE_CONSENT_MANAGER, CREATE_CONSENT_PARTITION, CREATE_DATA_FLOWS, CREATE_DATA_SILOS, CREATE_DATA_SUBJECT, CREATE_DATA_SUB_CATEGORY, CREATE_ENRICHER, CREATE_IDENTIFIER, CREATE_PREFERENCE_ACCESS_TOKENS, CREATE_PROCESSING_ACTIVITY, CREATE_PROCESSING_PURPOSE_SUB_CATEGORY, CREATE_PROMPT, CREATE_PROMPT_GROUP, CREATE_PROMPT_PARTIAL, CREATE_REPOSITORY, CREATE_SOFTWARE_DEVELOPMENT_KIT, CREATE_TEAM, CREATE_TEMPLATE, CREATE_VENDOR, CachedFileState, CachedRequestState, type Catalog, CodePackageInput, CodePackageSdk, ColumnName, type ColumnNameMap, type ConsentExperience, ConsentManageExperienceInput, type ConsentManager, ConsentManagerInput, type ConsentManagerMetric, ConsentManagerMetricBin, ConsentManagerServiceMetadata, type ConsentManagerTheme, ConsentPreferenceTopic, ConsentPreferenceTopicOptionValue, ConsentPurpose, type Cookie, CookieCsvInput, CookieInput, type CreatedApiKey, CronIdentifier, CronIdentifierPush, type CronIdentifierWithAction, type CsvFormattedIdentifier, DATAPOINT_EXPORT, DATA_FLOWS, DATA_POINTS, DATA_POINT_COUNT, DATA_SILOS, DATA_SILOS_ENRICHED, DATA_SILO_EXPORT, DATA_SUBJECTS, DATA_SUB_CATEGORIES, DAY_MS, DEBUG, DEFAULT_TRANSCEND_API, DEFAULT_TRANSCEND_CONSENT_API, DEFAULT_TRANSCEND_PULL_RESOURCES, DELETE_API_KEY, DELETE_ATTRIBUTE_VALUE, DEPLOYED_PRIVACY_CENTER_URL, DEPLOY_CONSENT_MANAGER, DETERMINE_LOGIN_METHOD, DataCategoryGuessInput, DataCategoryInput, DataCategoryPreviewInput, DataCategoryRecommendationInput, type DataFlow, DataFlowCsvInput, DataFlowInput, type DataPointCsvPreview, type DataSilo, type DataSiloAttributeValue, type DataSiloCsvPreview, type DataSiloEnriched, DataSiloInput, type DataSubCategory, type DataSubject, DataSubjectInput, type DatapointFilterOptions, DatapointInput, ENABLED_PLUGINS, ENRICHERS, ENTRY_COUNT, EXPERIENCES, type EnabledRouteC, type EnabledRoutesC, EnrichPrivacyRequest, type Enricher, EnricherInput, type ExportedPrivacyRequest, type ExternalUser, FETCH_CONSENT_MANAGER, FETCH_CONSENT_MANAGER_ID, FETCH_CONSENT_MANAGER_THEME, FETCH_PRIVACY_CENTER_ID, FieldInput, type FormattedAttribute, GLOBAL_ACTION_ITEMS, GLOBAL_ACTION_ITEM_COLLECTIONS, type GetPromptParamType, type GetPromptResponseType, HOUR_MS, IDENTIFIERS, IDENTIFIER_BLOCK_LIST, IMPORT_ONE_TRUST_ASSESSMENT_FORMS, INITIALIZER, IP_ADDRESS_REGEX, IS_REQUIRED, type Identifier, IdentifierInput, type IdentifierNameMap, ImportOnetrustAssessmentsInput, type IndexedCatalogs, type Initializer, IntlMessage, IntlMessageInput, LARGE_LANGUAGE_MODELS, LOGIN, MESSAGES, type Message, NEW_IDENTIFIER_TYPES, NONE, NOTIFY_ADDITIONAL_TIME, ORGANIZATION, OneTrustFileFormat, OneTrustPullResource, OneTrustPullSource, OpenAIEnabledRoute, OpenAIEnabledRoutes, OpenAIIntegration, OpenAIRouteName, type OrganizationPreview, POLICIES, PREFERENCE_TOPICS, PRIVACY_CENTER, PROCESSING_ACTIVITIES, PROCESSING_PURPOSE_SUB_CATEGORIES, PROMPTS, PROMPTS_WITH_VARIABLES, PROMPT_GROUPS, PROMPT_PARTIALS, PROMPT_THREADS, PURPOSES, type ParquetToCsvOneFileOptions, ParsedAttributeInput, PartitionInput, PathfinderPolicy, PathfinderPolicyName, PathfinderPolicyNameC, PathfinderPromptRunMetadata, type Plugin, type PluginResponse, type Policy, PolicyInput, type PreferenceAccessTokenInput, type PreferenceAccessTokenInputWithIndex, type PreferenceTopic, type PrivacyCenter, PrivacyCenterInput, PrivacyRequest, PrivacyRequestInput, PrivacyRequestResponse, type PrivacyRequestWithIdentifiers, type ProcessingActivity, ProcessingActivityInput, ProcessingPurposeInput, ProcessingPurposePreviewInput, type ProcessingPurposeSubCategory, type Prompt, PromptAVendorEmailSettings, type PromptCalculatedVariable, type PromptGroup, PromptGroupInput, PromptInput, type PromptPartial, PromptPartialInput, type PromptRunResult, type PromptRuntimeVariable, type PromptThread, type Purpose, PurposeMap, type PurposeWithPreferences, REDUCED_REQUESTS_FOR_DATA_SILO_COUNT, REMOVE_REQUEST_IDENTIFIERS, REPORT_PROMPT_RUN, REPOSITORIES, REQUESTS, REQUEST_DATA_SILOS, REQUEST_ENRICHERS, REQUEST_FILES, REQUEST_IDENTIFIERS, RETRYABLE_BATCH_STATUSES, RETRY_REQUEST_DATA_SILO, RETRY_REQUEST_ENRICHER, RateCounter, RegionInput, type ReportPromptRunInput, type ReportPromptRunOptions, RepositoryInput, type RequestDataSilo, type RequestDataSiloFilters, type RequestEnricher, type RequestFile, type RequestFileCursor, RequestFileMetadata, RequestFileMetadataResponse, type RequestFileResponse, RequestIdentifier, type RequestIdentifierMetadata, RequestIdentifiersResponse, RequestPurposeTrigger, type RetentionSchedule, type RetryPolicy, RiskAssignmentInput, type RiskCategory, type RiskFramework, type RiskLevel, RiskLogicInput, type RiskMatrix, type RiskMatrixColumn, type RiskMatrixRow, SCOPES_BY_TITLE, SCOPE_TITLES, SET_RESOURCE_ATTRIBUTES, SKIP_REQUEST_ENRICHER, SOFTWARE_DEVELOPMENT_KITS, SOMBRA_VERSION, SUB_DATA_POINTS, SUB_DATA_POINTS_COUNT, SUB_DATA_POINTS_WITH_GUESSES, SYNC_ATTRIBUTE_TYPES, SoftwareDevelopmentKitInput, StoredApiKey, type SubDataPoint, type SubDataPointCsvPreview, SuccessfulRequest, TEAMS, TEMPLATES, TOGGLE_CONSENT_PRECEDENCE, TOGGLE_DATA_SUBJECT, TOGGLE_TELEMETRY_PARTITION_STRATEGY, TOGGLE_UNKNOWN_COOKIE_POLICY, TOGGLE_UNKNOWN_REQUEST_POLICY, TR_PULL_RESOURCE_SCOPE_MAP, TR_PUSH_RESOURCE_SCOPE_MAP, TR_YML_RESOURCE_TO_FIELD_NAME, type Team, TeamInput, type Template, TemplateInput, TranscendInput, type TranscendPartition, type TranscendPrompt, TranscendPromptManager, type TranscendPromptPartialTemplated, type TranscendPromptTemplated, type TranscendPromptsAndVariables, type TranscendPullConfigurationInput, TranscendPullResource, UPDATE_ACTION, UPDATE_ACTION_ITEMS, UPDATE_ACTION_ITEM_COLLECTION, UPDATE_AGENTS, UPDATE_AGENT_FILES, UPDATE_AGENT_FUNCTIONS, UPDATE_ATTRIBUTE, UPDATE_ATTRIBUTE_VALUES, UPDATE_BUSINESS_ENTITIES, 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_DATA_FLOWS, UPDATE_DATA_SILOS, UPDATE_DATA_SUBJECT, UPDATE_DATA_SUB_CATEGORIES, UPDATE_ENRICHER, UPDATE_IDENTIFIER, UPDATE_INTL_MESSAGES, UPDATE_LOAD_OPTIONS, UPDATE_OR_CREATE_COOKIES, UPDATE_OR_CREATE_DATA_POINT, UPDATE_POLICIES, UPDATE_PRIVACY_CENTER, UPDATE_PRIVACY_REQUEST, UPDATE_PROCESSING_ACTIVITIES, UPDATE_PROCESSING_PURPOSE_SUB_CATEGORIES, UPDATE_PROMPTS, UPDATE_PROMPT_GROUPS, UPDATE_PROMPT_PARTIALS, UPDATE_REPOSITORIES, UPDATE_SOFTWARE_DEVELOPMENT_KITS, UPDATE_TEAM, UPDATE_VENDORS, USERS, USP_STRING_REGEX, type User, type UserPreview, type UserRole, VARIABLE_PARAMETERS_NAME, VARIABLE_PARAMETERS_REGEXP, VENDORS, type Vendor, VendorInput, WebhookHeader, type XdiSyncGroups, addDaysUtc, addMessagesToPromptRun, addMs, appendCsvRowsOrdered, appendCsvSync, approvePrivacyRequests, assumeRole, buildAIIntegrationType, buildEnabledRouteType, buildTranscendGraphQLClient, buildTranscendGraphQLClientGeneric, buildXdiSyncEndpoint, bulkRestartRequests, bulkRetryEnrichers, cancelPrivacyRequests, clampPageSize, collectParquetFilesOrExit, consentManagersToBusinessEntities, convertToDataSubjectAllowlist, convertToDataSubjectBlockList, createActionItemCollection, createActionItems, createAgent, createAgentFile, createAgentFunction, createApiKey, createBusinessEntity, createCodePackage, createConsentToken, createDataCategory, createDataFlows, createPreferenceAccessTokens, createProcessingPurpose, createPrompt, createRegexForTag, createRepository, createSoftwareDevelopmentKit, createSombraGotInstance, createTranscendConsentGotInstance, createVendor, defineTranscendPrompts, deleteApiKey, deployConsentManager, description, domainToHost, downloadPrivacyRequestFiles, enrichPrivacyRequest, ensureAllDataSubjectsExist, extractClientError, extractErrorMessage, fetchActiveSiloDiscoPlugin, fetchAllActionItems, fetchAllActions, fetchAllAgentFiles, fetchAllAgentFunctions, fetchAllAgents, fetchAllApiKeys, fetchAllAssessmentTemplates, fetchAllAssessments, fetchAllAttributeValues, fetchAllAttributes, fetchAllBusinessEntities, fetchAllCatalogs, fetchAllCookies, fetchAllDataCategories, fetchAllDataFlows, fetchAllDataPoints, fetchAllDataSilos, fetchAllDataSubjects, fetchAllEnrichers, fetchAllIdentifiers, fetchAllMessages, fetchAllPolicies, fetchAllPreferenceTopics, fetchAllPrivacyCenters, fetchAllProcessingActivities, fetchAllProcessingPurposes, fetchAllPromptGroups, fetchAllPromptPartials, fetchAllPromptThreads, fetchAllPrompts, fetchAllPurposes, fetchAllPurposesAndPreferences, fetchAllRequestAttributeKeys, fetchAllRequestEnrichers, fetchAllRequestIdentifierMetadata, fetchAllRequestIdentifiers, fetchAllRequests, fetchAllSubDataPoints, fetchAllTeams, fetchAllTemplates, fetchAllUsers, fetchAllVendors, fetchAndIndexCatalogs, fetchApiKeys, fetchConsentManager, fetchConsentManagerAnalyticsData, fetchConsentManagerExperiences, fetchConsentManagerId, fetchConsentManagerTheme, fetchEnrichedDataSilos, fetchIdentifiersAndCreateMissing, fetchPartitions, fetchPrivacyCenterId, fetchPrivacyCenterUrl, fetchPromptsWithVariables, fetchRequestDataSilo, fetchRequestDataSiloActiveCount, fetchRequestDataSilos, fetchRequestDataSilosCount, fetchRequestFilesForRequest, filterNullishValuesFromObject, filterRows, formatAttributeValues, fuzzyMatchColumns, fuzzySearch, generateCrossAccountApiKeys, getErrorStatus, getFileMetadataForPrivacyRequests, getGitFilesThatChanged, getUniqueValuesForColumn, initCsvFile, inquirerAutoComplete, inquirerConfirmBoolean, inquirerConfirmText, limitRecords, listDirectories, listFiles, loginUser, makeGraphQLRequest, mapColumnsToAttributes, mapColumnsToIdentifiers, mapCsvColumnsToApi, mapCsvRowsToRequestInputs, mapEnumValues, mapRequestEnumValues, markCronIdentifierCompleted, markRequestDataSiloIdsCompleted, markSilentPrivacyRequests, mergeTranscendInputs, name, normalizeIdentifierValue, notifyPrivacyRequestsAdditionalTime, parquetToCsvOneFile, parseAssessmentDisplayLogic, parseAssessmentRiskLogic, parseAttributesFromString, parseFilePath, parseVariablesFromString, pullAllDatapoints, pullChunkedCustomSiloOutstandingIdentifiers, pullConsentManagerMetrics, pullCronPageOfIdentifiers, pullManualEnrichmentIdentifiersToCsv, pullPrivacyRequests, pullTranscendConfiguration, pullUnstructuredSubDataPointRecommendations, pushCronIdentifiersFromCsv, pushManualEnrichmentIdentifiersFromCsv, readCsv, readSafe, readTranscendYaml, removeLinks, removeUnverifiedRequestIdentifiers, replaceVariablesInYaml, reportPromptRun, restartPrivacyRequest, retryRequestDataSilos, retryRequestEnricher, retrySamePromise, setResourceAttributes, skipPreflightJobs, skipRequestDataSilos, sleepPromise, splitCsvToList, splitInHalf, startOfHour, startOfUtcDay, streamPrivacyRequestFiles, submitPrivacyRequest, syncAction, syncActionItemCollections, syncActionItems, syncAgentFiles, syncAgentFunctions, syncAgents, syncAttribute, syncBusinessEntities, syncCodePackages, syncConfigurationToTranscend, syncConsentManager, syncConsentManagerExperiences, syncCookies, syncDataCategories, syncDataFlows, syncDataSiloDependencies, syncDataSilos, syncDataSubject, syncEnricher, syncIdentifier, syncIntlMessages, syncPartitions, syncPolicies, syncPrivacyCenter, syncProcessingActivities, syncProcessingPurposes, syncPrompts, syncRepositories, syncSoftwareDevelopmentKits, syncTemplate, syncVendors, updateActionItem, updateActionItemCollection, updateAgentFiles, updateAgentFunctions, updateAgents, updateBusinessEntities, updateCodePackages, updateConsentManagerToLatest, updateConsentManagerVersionToLatest, updateDataCategories, updateDataFlows, updateIntlMessages, updateOrCreateCookies, updatePolicies, updateProcessingPurposes, updatePrompts, updateRepositories, updateSoftwareDevelopmentKits, updateVendors, uploadConsents, uploadCookiesFromCsv, uploadDataFlowsFromCsv, uploadPrivacyRequestsFromCsv, uploadSiloDiscoveryResults, validateTranscendAuth, version, writeCsv, writeCsvSync, writeLargeCsv, writeTranscendYaml };
146682
+ export { ACTIONS, ADD_MESSAGES_TO_PROMPT_RUN, ADD_SILO_DISCOVERY_RESULTS, ADMIN_DASH, ADMIN_DASH_DATAPOINTS, ADMIN_DASH_INTEGRATIONS, AGENTS, AGENT_FILES, AGENT_FUNCTIONS, type AIIntegrationC, API_KEYS, APPROVE_PRIVACY_REQUEST, ASSESSMENTS, ASSESSMENT_SECTION_FIELDS, ASSESSMENT_TEMPLATES, ASSUME_ROLE, ATTRIBUTES, ATTRIBUTE_KEYS_REQUESTS, ATTRIBUTE_VALUES, type Action, ActionInput, type ActionItem, ActionItemCollectionInput, ActionItemInput, type ActionItemRaw, type AddMessagesToPromptRunInput, type Agent, type AgentFile, type AgentFileFilterBy, AgentFileInput, type AgentFunction, AgentFunctionInput, AgentInput, type ApiKey, type ApiKeyGenerateError, ApiKeyInput, type Assessment, AssessmentAction, type AssessmentAnswer, type AssessmentAnswerOption, AssessmentAnswerOptionInput, type AssessmentComment, AssessmentDisplayLogicInput, type AssessmentGroup, AssessmentInput, AssessmentNestedRule, AssessmentNestedRuleInput, type AssessmentPreviousSubmission, type AssessmentQuestion, type AssessmentResource, AssessmentResourceInput, AssessmentRetentionScheduleInput, AssessmentRiskLogic, AssessmentRule, AssessmentRuleInput, AssessmentRuleWithOperands, AssessmentRuleWithoutOperands, type AssessmentSection, AssessmentSectionInput, AssessmentSectionQuestionInput, type AssessmentTemplate, AssessmentTemplateInput, AttestedExtraIdentifiers, type Attribute, AttributeInput, type AttributeKey, type AttributeNameMap, AttributePreview, type AttributeValue, AttributeValueInput, BLANK, BULK_APPLY, BULK_REQUEST_FILES, BUSINESS_ENTITIES, type BusinessEntity, BusinessEntityInput, CANCEL_PRIVACY_REQUEST, CAN_APPLY_IN_BULK, CATALOGS, CHANGE_REQUEST_DATA_SILO_STATUS, CODE_PACKAGES, CONSENT_MANAGER_ANALYTICS_DATA, CONSENT_PARTITIONS, COOKIES, CREATE_ACTION_ITEMS, CREATE_ACTION_ITEM_COLLECTION, CREATE_AGENT, CREATE_AGENT_FILE, CREATE_AGENT_FUNCTION, CREATE_API_KEY, CREATE_ATTRIBUTE, CREATE_ATTRIBUTE_VALUES, CREATE_BUSINESS_ENTITY, CREATE_CODE_PACKAGE, CREATE_CONSENT_EXPERIENCE, CREATE_CONSENT_MANAGER, CREATE_CONSENT_PARTITION, CREATE_DATA_FLOWS, CREATE_DATA_SILOS, CREATE_DATA_SUBJECT, CREATE_DATA_SUB_CATEGORY, CREATE_ENRICHER, CREATE_IDENTIFIER, CREATE_PREFERENCE_ACCESS_TOKENS, CREATE_PROCESSING_ACTIVITY, CREATE_PROCESSING_PURPOSE_SUB_CATEGORY, CREATE_PROMPT, CREATE_PROMPT_GROUP, CREATE_PROMPT_PARTIAL, CREATE_REPOSITORY, CREATE_SOFTWARE_DEVELOPMENT_KIT, CREATE_TEAM, CREATE_TEMPLATE, CREATE_VENDOR, CachedFileState, CachedRequestState, type Catalog, CodePackageInput, CodePackageSdk, ColumnName, type ColumnNameMap, type ConsentExperience, ConsentManageExperienceInput, type ConsentManager, ConsentManagerInput, type ConsentManagerMetric, ConsentManagerMetricBin, ConsentManagerServiceMetadata, type ConsentManagerTheme, ConsentPreferenceTopic, ConsentPreferenceTopicOptionValue, ConsentPurpose, type Cookie, CookieCsvInput, CookieInput, type CreatedApiKey, CronIdentifier, CronIdentifierPush, type CronIdentifierWithAction, type CsvFormattedIdentifier, DATAPOINT_EXPORT, DATA_FLOWS, DATA_POINTS, DATA_POINT_COUNT, DATA_SILOS, DATA_SILOS_ENRICHED, DATA_SILO_EXPORT, DATA_SUBJECTS, DATA_SUB_CATEGORIES, DAY_MS, DEBUG, DEFAULT_TRANSCEND_API, DEFAULT_TRANSCEND_CONSENT_API, DEFAULT_TRANSCEND_PULL_RESOURCES, DELETE_API_KEY, DELETE_ATTRIBUTE_VALUE, DEPLOYED_PRIVACY_CENTER_URL, DEPLOY_CONSENT_MANAGER, DETERMINE_LOGIN_METHOD, DataCategoryGuessInput, DataCategoryInput, DataCategoryPreviewInput, DataCategoryRecommendationInput, type DataFlow, DataFlowCsvInput, DataFlowInput, type DataPointCsvPreview, type DataSilo, type DataSiloAttributeValue, type DataSiloCsvPreview, type DataSiloEnriched, DataSiloInput, type DataSubCategory, type DataSubject, DataSubjectInput, type DatapointFilterOptions, DatapointInput, ENABLED_PLUGINS, ENRICHERS, ENTRY_COUNT, EXPERIENCES, type EnabledRouteC, type EnabledRoutesC, EnrichPrivacyRequest, type Enricher, EnricherInput, type ExportedPrivacyRequest, type ExternalUser, FETCH_CONSENT_MANAGER, FETCH_CONSENT_MANAGER_ID, FETCH_CONSENT_MANAGER_THEME, FETCH_PRIVACY_CENTER_ID, FIVE_MIN_MS, FieldInput, type FormattedAttribute, GLOBAL_ACTION_ITEMS, GLOBAL_ACTION_ITEM_COLLECTIONS, type GetPromptParamType, type GetPromptResponseType, HOUR_MS, IDENTIFIERS, IDENTIFIER_BLOCK_LIST, IMPORT_ONE_TRUST_ASSESSMENT_FORMS, INITIALIZER, IP_ADDRESS_REGEX, IS_REQUIRED, type Identifier, IdentifierInput, type IdentifierNameMap, ImportOnetrustAssessmentsInput, type IndexedCatalogs, type Initializer, IntlMessage, IntlMessageInput, LARGE_LANGUAGE_MODELS, LOGIN, MESSAGES, type Message, NEW_IDENTIFIER_TYPES, NONE, NOTIFY_ADDITIONAL_TIME, ORGANIZATION, OneTrustFileFormat, OneTrustPullResource, OneTrustPullSource, OpenAIEnabledRoute, OpenAIEnabledRoutes, OpenAIIntegration, OpenAIRouteName, type OrganizationPreview, POLICIES, PREFERENCE_TOPICS, PRIVACY_CENTER, PROCESSING_ACTIVITIES, PROCESSING_PURPOSE_SUB_CATEGORIES, PROMPTS, PROMPTS_WITH_VARIABLES, PROMPT_GROUPS, PROMPT_PARTIALS, PROMPT_THREADS, PURPOSES, type ParquetToCsvOneFileOptions, ParsedAttributeInput, PartitionInput, PathfinderPolicy, PathfinderPolicyName, PathfinderPolicyNameC, PathfinderPromptRunMetadata, type Plugin, type PluginResponse, type Policy, PolicyInput, type PreferenceAccessTokenInput, type PreferenceAccessTokenInputWithIndex, type PreferenceTopic, type PrivacyCenter, PrivacyCenterInput, PrivacyRequest, PrivacyRequestInput, PrivacyRequestResponse, type PrivacyRequestWithIdentifiers, type ProcessingActivity, ProcessingActivityInput, ProcessingPurposeInput, ProcessingPurposePreviewInput, type ProcessingPurposeSubCategory, type Prompt, PromptAVendorEmailSettings, type PromptCalculatedVariable, type PromptGroup, PromptGroupInput, PromptInput, type PromptPartial, PromptPartialInput, type PromptRunResult, type PromptRuntimeVariable, type PromptThread, type Purpose, PurposeMap, type PurposeWithPreferences, REDUCED_REQUESTS_FOR_DATA_SILO_COUNT, REMOVE_REQUEST_IDENTIFIERS, REPORT_PROMPT_RUN, REPOSITORIES, REQUESTS, REQUEST_DATA_SILOS, REQUEST_ENRICHERS, REQUEST_FILES, REQUEST_IDENTIFIERS, RETRYABLE_BATCH_STATUSES, RETRY_REQUEST_DATA_SILO, RETRY_REQUEST_ENRICHER, RateCounter, RegionInput, type ReportPromptRunInput, type ReportPromptRunOptions, RepositoryInput, type RequestDataSilo, type RequestDataSiloFilters, type RequestEnricher, type RequestFile, type RequestFileCursor, RequestFileMetadata, RequestFileMetadataResponse, type RequestFileResponse, RequestIdentifier, type RequestIdentifierMetadata, RequestIdentifiersResponse, RequestPurposeTrigger, type RetentionSchedule, type RetryPolicy, RiskAssignmentInput, type RiskCategory, type RiskFramework, type RiskLevel, RiskLogicInput, type RiskMatrix, type RiskMatrixColumn, type RiskMatrixRow, SCOPES_BY_TITLE, SCOPE_TITLES, SET_RESOURCE_ATTRIBUTES, SKIP_REQUEST_ENRICHER, SOFTWARE_DEVELOPMENT_KITS, SOMBRA_VERSION, SUB_DATA_POINTS, SUB_DATA_POINTS_COUNT, SUB_DATA_POINTS_WITH_GUESSES, SYNC_ATTRIBUTE_TYPES, SoftwareDevelopmentKitInput, StoredApiKey, type SubDataPoint, type SubDataPointCsvPreview, SuccessfulRequest, TEAMS, TEMPLATES, TOGGLE_CONSENT_PRECEDENCE, TOGGLE_DATA_SUBJECT, TOGGLE_TELEMETRY_PARTITION_STRATEGY, TOGGLE_UNKNOWN_COOKIE_POLICY, TOGGLE_UNKNOWN_REQUEST_POLICY, TR_PULL_RESOURCE_SCOPE_MAP, TR_PUSH_RESOURCE_SCOPE_MAP, TR_YML_RESOURCE_TO_FIELD_NAME, type Team, TeamInput, type Template, TemplateInput, TranscendInput, type TranscendPartition, type TranscendPrompt, TranscendPromptManager, type TranscendPromptPartialTemplated, type TranscendPromptTemplated, type TranscendPromptsAndVariables, type TranscendPullConfigurationInput, TranscendPullResource, UPDATE_ACTION, UPDATE_ACTION_ITEMS, UPDATE_ACTION_ITEM_COLLECTION, UPDATE_AGENTS, UPDATE_AGENT_FILES, UPDATE_AGENT_FUNCTIONS, UPDATE_ATTRIBUTE, UPDATE_ATTRIBUTE_VALUES, UPDATE_BUSINESS_ENTITIES, 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_DATA_FLOWS, UPDATE_DATA_SILOS, UPDATE_DATA_SUBJECT, UPDATE_DATA_SUB_CATEGORIES, UPDATE_ENRICHER, UPDATE_IDENTIFIER, UPDATE_INTL_MESSAGES, UPDATE_LOAD_OPTIONS, UPDATE_OR_CREATE_COOKIES, UPDATE_OR_CREATE_DATA_POINT, UPDATE_POLICIES, UPDATE_PRIVACY_CENTER, UPDATE_PRIVACY_REQUEST, UPDATE_PROCESSING_ACTIVITIES, UPDATE_PROCESSING_PURPOSE_SUB_CATEGORIES, UPDATE_PROMPTS, UPDATE_PROMPT_GROUPS, UPDATE_PROMPT_PARTIALS, UPDATE_REPOSITORIES, UPDATE_SOFTWARE_DEVELOPMENT_KITS, UPDATE_TEAM, UPDATE_VENDORS, USERS, USP_STRING_REGEX, type User, type UserPreview, type UserRole, VARIABLE_PARAMETERS_NAME, VARIABLE_PARAMETERS_REGEXP, VENDORS, type Vendor, VendorInput, WebhookHeader, type XdiSyncGroups, addDaysUtc, addMessagesToPromptRun, addMs, appendCsvRowsOrdered, appendCsvSync, approvePrivacyRequests, assumeRole, buildAIIntegrationType, buildEnabledRouteType, buildTranscendGraphQLClient, buildTranscendGraphQLClientGeneric, buildXdiSyncEndpoint, bulkRestartRequests, bulkRetryEnrichers, cancelPrivacyRequests, clampPageSize, collectParquetFilesOrExit, consentManagersToBusinessEntities, convertToDataSubjectAllowlist, convertToDataSubjectBlockList, createActionItemCollection, createActionItems, createAgent, createAgentFile, createAgentFunction, createApiKey, createBusinessEntity, createCodePackage, createConsentToken, createDataCategory, createDataFlows, createPreferenceAccessTokens, createProcessingPurpose, createPrompt, createRegexForTag, createRepository, createSoftwareDevelopmentKit, createSombraGotInstance, createTranscendConsentGotInstance, createVendor, defineTranscendPrompts, deleteApiKey, deployConsentManager, description, domainToHost, downloadPrivacyRequestFiles, enrichPrivacyRequest, ensureAllDataSubjectsExist, extractClientError, extractErrorMessage, fetchActiveSiloDiscoPlugin, fetchAllActionItems, fetchAllActions, fetchAllAgentFiles, fetchAllAgentFunctions, fetchAllAgents, fetchAllApiKeys, fetchAllAssessmentTemplates, fetchAllAssessments, fetchAllAttributeValues, fetchAllAttributes, fetchAllBusinessEntities, fetchAllCatalogs, fetchAllCookies, fetchAllDataCategories, fetchAllDataFlows, fetchAllDataPoints, fetchAllDataSilos, fetchAllDataSubjects, fetchAllEnrichers, fetchAllIdentifiers, fetchAllMessages, fetchAllPolicies, fetchAllPreferenceTopics, fetchAllPrivacyCenters, fetchAllProcessingActivities, fetchAllProcessingPurposes, fetchAllPromptGroups, fetchAllPromptPartials, fetchAllPromptThreads, fetchAllPrompts, fetchAllPurposes, fetchAllPurposesAndPreferences, fetchAllRequestAttributeKeys, fetchAllRequestEnrichers, fetchAllRequestIdentifierMetadata, fetchAllRequestIdentifiers, fetchAllRequests, fetchAllSubDataPoints, fetchAllTeams, fetchAllTemplates, fetchAllUsers, fetchAllVendors, fetchAndIndexCatalogs, fetchApiKeys, fetchConsentManager, fetchConsentManagerAnalyticsData, fetchConsentManagerExperiences, fetchConsentManagerId, fetchConsentManagerTheme, fetchEnrichedDataSilos, fetchIdentifiersAndCreateMissing, fetchPartitions, fetchPrivacyCenterId, fetchPrivacyCenterUrl, fetchPromptsWithVariables, fetchRequestDataSilo, fetchRequestDataSiloActiveCount, fetchRequestDataSilos, fetchRequestDataSilosCount, fetchRequestFilesForRequest, filterNullishValuesFromObject, filterRows, formatAttributeValues, fuzzyMatchColumns, fuzzySearch, generateCrossAccountApiKeys, getErrorStatus, getFileMetadataForPrivacyRequests, getGitFilesThatChanged, getUniqueValuesForColumn, initCsvFile, inquirerAutoComplete, inquirerConfirmBoolean, inquirerConfirmText, limitRecords, listDirectories, listFiles, loginUser, makeGraphQLRequest, mapColumnsToAttributes, mapColumnsToIdentifiers, mapCsvColumnsToApi, mapCsvRowsToRequestInputs, mapEnumValues, mapRequestEnumValues, markCronIdentifierCompleted, markRequestDataSiloIdsCompleted, markSilentPrivacyRequests, mergeTranscendInputs, name, normalizeIdentifierValue, notifyPrivacyRequestsAdditionalTime, parquetToCsvOneFile, parseAssessmentDisplayLogic, parseAssessmentRiskLogic, parseAttributesFromString, parseFilePath, parseVariablesFromString, pullAllDatapoints, pullChunkedCustomSiloOutstandingIdentifiers, pullConsentManagerMetrics, pullCronPageOfIdentifiers, pullManualEnrichmentIdentifiersToCsv, pullPrivacyRequests, pullTranscendConfiguration, pullUnstructuredSubDataPointRecommendations, pushCronIdentifiersFromCsv, pushManualEnrichmentIdentifiersFromCsv, readCsv, readSafe, readTranscendYaml, removeLinks, removeUnverifiedRequestIdentifiers, replaceVariablesInYaml, reportPromptRun, restartPrivacyRequest, retryRequestDataSilos, retryRequestEnricher, retrySamePromise, setResourceAttributes, skipPreflightJobs, skipRequestDataSilos, sleepPromise, splitCsvToList, splitInHalf, startOfHour, startOfUtcDay, streamPrivacyRequestFiles, submitPrivacyRequest, syncAction, syncActionItemCollections, syncActionItems, syncAgentFiles, syncAgentFunctions, syncAgents, syncAttribute, syncBusinessEntities, syncCodePackages, syncConfigurationToTranscend, syncConsentManager, syncConsentManagerExperiences, syncCookies, syncDataCategories, syncDataFlows, syncDataSiloDependencies, syncDataSilos, syncDataSubject, syncEnricher, syncIdentifier, syncIntlMessages, syncPartitions, syncPolicies, syncPrivacyCenter, syncProcessingActivities, syncProcessingPurposes, syncPrompts, syncRepositories, syncSoftwareDevelopmentKits, syncTemplate, syncVendors, updateActionItem, updateActionItemCollection, updateAgentFiles, updateAgentFunctions, updateAgents, updateBusinessEntities, updateCodePackages, updateConsentManagerToLatest, updateConsentManagerVersionToLatest, updateDataCategories, updateDataFlows, updateIntlMessages, updateOrCreateCookies, updatePolicies, updateProcessingPurposes, updatePrompts, updateRepositories, updateSoftwareDevelopmentKits, updateVendors, uploadConsents, uploadCookiesFromCsv, uploadDataFlowsFromCsv, uploadPrivacyRequestsFromCsv, uploadSiloDiscoveryResults, validateTranscendAuth, version, writeCsv, writeCsvSync, writeLargeCsv, writeTranscendYaml };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "author": "Transcend Inc.",
3
3
  "name": "@transcend-io/cli",
4
4
  "description": "A command line interface for programmatic operations across Transcend.",
5
- "version": "8.26.2",
5
+ "version": "8.27.0",
6
6
  "homepage": "https://github.com/transcend-io/cli",
7
7
  "repository": {
8
8
  "type": "git",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/chunk-5UBGZNDC.cjs","../src/codecs.ts"],"names":["TemplateInput","WebhookHeader","ApiKeyInput","TeamInput","valuesOf","EnricherInput","IsoCountryCode","IsoCountrySubdivisionCode","ProcessingPurposePreviewInput","DataCategoryPreviewInput","DataCategoryGuessInput","DataCategoryRecommendationInput","AttributeValueInput","AttributeInput","AttributePreview","AgentInput","AgentFunctionInput","AgentFileInput","VendorInput","DataCategoryInput","ProcessingPurposeInput","PromptInput","PromptPartialInput","PromptGroupInput","FieldInput","DatapointInput","applyEnum","RequestActionObjectResolver","PromptAVendorEmailSettings","BusinessEntityInput","RegionInput","ProcessingActivityInput","SoftwareDevelopmentKitInput","CodePackageSdk","CodePackageInput","RepositoryInput","DataSubjectInput","ActionInput","IdentifierInput","DataFlowInput","CookieInput","ConsentManageExperienceInput","PartitionInput","ConsentManagerInput","PrivacyCenterInput","ConfigurableColorPaletteColor","PrivacyCenterComponentStyles","PrivacyCenterTextStyles","PolicyInput","IntlMessageInput","LOCALE_KEY","DataSiloInput","ActionItemCollectionInput","ActionItemInput","AssessmentRuleInput","AssessmentNestedRuleInput","self","AssessmentDisplayLogicInput","RiskAssignmentInput","RiskLogicInput","AssessmentAnswerOptionInput","AssessmentSectionQuestionInput","AssessmentSectionInput","AssessmentRetentionScheduleInput","AssessmentTemplateInput","AssessmentResourceInput","AssessmentInput","ConsentPreferenceTopicOptionValue","ConsentPreferenceTopic","ConsentPurpose","TranscendInput","StoredApiKey","DataFlowCsvInput","CookieCsvInput","ConsentManagerServiceMetadata","PathfinderPolicyNameC","OpenAIEnabledRoute","buildEnabledRouteType","OpenAIRouteNameC","OpenAIEnabledRoutes","OpenAIIntegration","buildAIIntegrationType","PathfinderPolicy","PathfinderPromptRunMetadata","OneTrustAssessmentColumnInput","OneTrustAssessmentRowInput","ImportOnetrustAssessmentsInput"],"mappings":"AAAA,mZAA+C,wDAAgD,qECE5E,qDACiB,2DAsD7B,8DAMA,0EAIoB,IAQdA,EAAAA,CAAkB,CAAA,CAAA,IAAA,CAAK,CAElC,KAAA,CAAS,CAAA,CAAA,MACX,CAAC,CAAA,CAKYC,CAAAA,aAAkB,CAAA,CAAA,YAAA,CAAa,CACxC,CAAA,CAAA,IAAA,CAAK,CAEL,IAAA,CAAQ,CAAA,CAAA,MAAA,CAER,KAAA,CAAS,CAAA,CAAA,MACX,CAAC,CAAA,CACC,CAAA,CAAA,OAAA,CAAQ,CAER,QAAA,CAAY,CAAA,CAAA,OACd,CAAC,CACH,CAAC,CAAA,CAaYC,EAAAA,aAAgB,CAAA,CAAA,IAAA,CAAK,CAEhC,KAAA,CAAS,CAAA,CAAA,MACX,CAAC,CAAA,CAWYC,EAAAA,aAAc,CAAA,CAAA,YAAA,CAAa,CACpC,CAAA,CAAA,IAAA,CAAK,CAEL,IAAA,CAAQ,CAAA,CAAA,MAAA,CAER,WAAA,CAAe,CAAA,CAAA,MACjB,CAAC,CAAA,CACC,CAAA,CAAA,OAAA,CAAQ,CAER,gBAAA,CAAoB,CAAA,CAAA,MAAA,CAEpB,WAAA,CAAe,CAAA,CAAA,MAAA,CAEf,WAAA,CAAe,CAAA,CAAA,MAAA,CAEf,KAAA,CAAS,CAAA,CAAA,KAAA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port * as t from 'io-ts';\nimport { applyEnum, valuesOf } from '@transcend-io/type-utils';\nimport {\n DataCategoryType,\n ConsentBundleType,\n EnricherType,\n ProcessingPurpose,\n RequestAction,\n ComparisonOperator,\n RequestActionObjectResolver,\n AssessmentSyncColumn,\n RetentionScheduleType,\n AssessmentQuestionType,\n DataFlowScope,\n PromptAVendorEmailSendType,\n RetentionScheduleOperation,\n AssessmentsDisplayLogicAction,\n DefaultConsentOption,\n LogicOperator,\n ConsentPrecedenceOption,\n AssessmentSyncModel,\n AssessmentQuestionSubType,\n IsoCountryCode,\n BrowserTimeZone,\n IsoCountrySubdivisionCode,\n ConsentTrackerStatus,\n AttributeKeyType,\n PromptAVendorEmailCompletionLinkType,\n RegionsOperator,\n UnknownRequestPolicy,\n TelemetryPartitionStrategy,\n SignedIabAgreementOption,\n RegionDetectionMethod,\n PreflightRequestStatus,\n AttributeSupportedResourceType,\n SubDataPointDataSubCategoryGuessStatus,\n LargeLanguageModelClient,\n PromptFilePurpose,\n CodePackageType,\n ActionItemPriorityOverride,\n ActionItemCode,\n ScopeName,\n TranscendProduct,\n PrivacyCenterComponentStyles,\n PrivacyCenterTextStyles,\n PreferenceStoreAuthLevel,\n ConfigurableColorPaletteColor,\n AssessmentFormTemplateStatus,\n AssessmentFormStatus,\n AssessmentFormTemplateSource,\n UnstructuredSubDataPointRecommendationStatus,\n PreferenceTopicType,\n Controllership,\n RetentionType,\n DataProtectionImpactAssessmentStatus,\n} from '@transcend-io/privacy-types';\nimport {\n InitialViewState,\n BrowserLanguage,\n UserPrivacySignalEnum,\n OnConsentExpiry,\n} from '@transcend-io/airgap.js-types';\nimport { buildEnabledRouteType } from './lib/helpers/buildEnabledRouteType';\nimport { buildAIIntegrationType } from './lib/helpers/buildAIIntegrationType';\nimport { OpenAIRouteName, PathfinderPolicyName } from './enums';\nimport { LOCALE_KEY } from '@transcend-io/internationalization';\n\n/**\n * Input to define email templates that can be used to communicate to end-users\n * about the status of their requests\n *\n * @see https://docs.transcend.io/docs/privacy-requests/configuring-requests/email-templates\n */\nexport const TemplateInput = t.type({\n /** The title of the template */\n title: t.string,\n});\n\n/** Type override */\nexport type TemplateInput = t.TypeOf<typeof TemplateInput>;\n\nexport const WebhookHeader = t.intersection([\n t.type({\n /** The name of the header to set. */\n name: t.string,\n /** The value of the header. */\n value: t.string,\n }),\n t.partial({\n /** The header contains a secret */\n isSecret: t.boolean,\n }),\n]);\n\n/** Type override */\nexport type WebhookHeader = t.TypeOf<typeof WebhookHeader>;\n\n/**\n * Input to define API keys that may be shared across data silos\n * in the data map. When creating new data silos through the yaml\n * cli, it is possible to specify which API key should be associated\n * with the newly created data silo.\n *\n * @see https://docs.transcend.io/docs/authentication\n */\nexport const ApiKeyInput = t.type({\n /** The display title of the enricher */\n title: t.string,\n});\n\n/** Type override */\nexport type ApiKeyInput = t.TypeOf<typeof ApiKeyInput>;\n\n/**\n * Input to define teams in Transcend\n * Users belong to teams and teams can be assigned to various resources\n *\n * @see https://docs.transcend.io/docs/security/access-control\n */\nexport const TeamInput = t.intersection([\n t.type({\n /** The display name of the team */\n name: t.string,\n /** Team description */\n description: t.string,\n }),\n t.partial({\n /** SSO department for automated provisioning */\n 'sso-department': t.string,\n /** SSO group name for automated provisioning */\n 'sso-group': t.string,\n /** SSO title mapping for automated provisioning */\n 'sso-title': t.string,\n /** List of user emails on the team */\n users: t.array(t.string),\n /** List of scopes that the team should have */\n scopes: t.array(valuesOf(ScopeName)),\n }),\n]);\n\n/** Type override */\nexport type TeamInput = t.TypeOf<typeof TeamInput>;\n\n/**\n * Input to define an enricher\n *\n * Define enricher or pre-flight check webhooks that will be executed\n * prior to privacy request workflows. Some examples may include:\n * - identity enrichment: look up additional identifiers for that user.\n * i.e. map an email address to a user ID\n * - fraud check: auto-cancel requests if the user is flagged for fraudulent behavior\n * - customer check: auto-cancel request for some custom business criteria\n *\n * @see https://docs.transcend.io/docs/identity-enrichment\n */\nexport const EnricherInput = t.intersection([\n t.type({\n /** The display title of the enricher */\n title: t.string,\n\n /**\n * The names of the identifiers that can be resolved by this enricher.\n * i.e. email -> [userId, phone, advertisingId]\n */\n 'output-identifiers': t.array(t.string),\n }),\n t.partial({\n /** Internal description for why the enricher is needed */\n description: t.string,\n /** The URL of the enricher */\n url: t.string,\n /** The type of enricher */\n type: valuesOf(EnricherType),\n /**\n * The name of the identifier that will be the input to this enricher.\n * Whenever a privacy request contains this identifier, the webhook will\n * be called with the value of that identifier as input\n */\n 'input-identifier': t.string,\n /**\n * A regular expression that can be used to match on for cancelation\n */\n testRegex: t.string,\n /**\n * For looker integration - the title of the looker query to run\n */\n lookerQueryTitle: t.string,\n /**\n * The duration (in ms) that the enricher should take to execute.\n */\n expirationDuration: t.number,\n /**\n * The status that the enricher should transfer to when condition is met.\n */\n transitionRequestStatus: valuesOf(PreflightRequestStatus),\n /**\n * For twilio integration - the phone numbers that can be used to send text codes\n */\n phoneNumbers: t.array(t.string),\n /** The list of regions that should trigger the preflight check */\n regionList: t.array(\n valuesOf({ ...IsoCountryCode, ...IsoCountrySubdivisionCode }),\n ),\n /**\n * Specify which data subjects the enricher should run for\n */\n 'data-subjects': t.array(t.string),\n /** Headers to include in the webhook */\n headers: t.array(WebhookHeader),\n /** The privacy actions that the enricher should run against */\n 'privacy-actions': t.array(valuesOf(RequestAction)),\n }),\n]);\n\n/** Type override */\nexport type EnricherInput = t.TypeOf<typeof EnricherInput>;\n\n/**\n * The processing purpose for a field\n */\nexport const ProcessingPurposePreviewInput = t.intersection([\n t.type({\n /** The parent purpose */\n purpose: valuesOf(ProcessingPurpose),\n }),\n t.partial({\n /** User-defined name for this processing purpose sub category */\n name: t.string,\n }),\n]);\n\n/** Type override */\nexport type ProcessingPurposePreviewInput = t.TypeOf<\n typeof ProcessingPurposePreviewInput\n>;\n\n/**\n * The data category for a field\n */\nexport const DataCategoryPreviewInput = t.intersection([\n t.type({\n /** The parent category */\n category: valuesOf(DataCategoryType),\n }),\n t.partial({\n /** User-defined name for this sub category */\n name: t.string,\n }),\n]);\n\n/** Type override */\nexport type DataCategoryPreviewInput = t.TypeOf<\n typeof DataCategoryPreviewInput\n>;\n\n/**\n * A guessed data category from the content classifier\n */\nexport const DataCategoryGuessInput = t.intersection([\n t.type({\n /** The parent category */\n category: DataCategoryPreviewInput,\n /** Status of guess */\n status: valuesOf(SubDataPointDataSubCategoryGuessStatus),\n /** Confidence level of guess */\n confidence: t.number,\n }),\n t.partial({\n /** classifier version that produced the guess */\n classifierVersion: t.number,\n }),\n]);\n\n/** Type override */\nexport type DataCategoryGuessInput = t.TypeOf<typeof DataCategoryGuessInput>;\n\n/**\n * A guessed data category from the content classifier\n */\nexport const DataCategoryRecommendationInput = t.intersection([\n t.type({\n /** The parent category */\n category: DataCategoryPreviewInput,\n /** Status of guess */\n status: valuesOf(UnstructuredSubDataPointRecommendationStatus),\n /** Confidence level of guess */\n confidence: t.number,\n }),\n t.partial({\n /** classifier version that produced the guess */\n classifierVersion: t.number,\n }),\n]);\n\n/** Type override */\nexport type DataCategoryRecommendationInput = t.TypeOf<\n typeof DataCategoryRecommendationInput\n>;\n\nexport const AttributeValueInput = t.intersection([\n t.type({\n /** Name of attribute value */\n name: t.string,\n }),\n t.partial({\n /** Description */\n description: t.string,\n /** Color */\n color: t.string,\n }),\n]);\n\n/** Type override */\nexport type AttributeValueInput = t.TypeOf<typeof AttributeValueInput>;\n\nexport const AttributeInput = t.intersection([\n t.type({\n /** Name of attribute */\n name: t.string,\n /** Type of attribute */\n type: valuesOf(AttributeKeyType),\n }),\n t.partial({\n /** Description of attribute */\n description: t.string,\n /** Resource types that the attribute is enabled on */\n resources: t.array(valuesOf(AttributeSupportedResourceType)),\n /** Values of attribute */\n values: t.array(AttributeValueInput),\n }),\n]);\n\n/** Type override */\nexport type AttributeInput = t.TypeOf<typeof AttributeInput>;\n\nexport const AttributePreview = t.type({\n /** Attribute key */\n key: t.string,\n /** Attribute values */\n values: t.array(t.string),\n});\n\n/** Type override */\nexport type AttributePreview = t.TypeOf<typeof AttributePreview>;\n\n/**\n * Agent type definition.\n */\nexport const AgentInput = t.intersection([\n t.type({\n /** The name of the agent. */\n name: t.string,\n /** The instructions of the agent. */\n instructions: t.string,\n /** The ID of the agent */\n agentId: t.string,\n /** Whether the agent has code interpreter enabled */\n codeInterpreterEnabled: t.boolean,\n /** Whether the agent has retrieval enabled */\n retrievalEnabled: t.boolean,\n /** Large language model powering the agent */\n 'large-language-model': t.type({\n /** Name of the model */\n name: t.string,\n /** Client of the model */\n client: valuesOf(LargeLanguageModelClient),\n }),\n }),\n t.partial({\n /** The description of the agent. */\n description: t.string,\n /** The title of the prompt that the agent is based on */\n prompt: t.string,\n /**\n * The email addresses of the employees within your company that are the go-to individuals\n * for managing this agent\n */\n owners: t.array(t.string),\n /**\n * The names of teams within your Transcend instance that should be responsible\n * for managing this agent\n *\n * @see https://docs.transcend.io/docs/security/access-control#teams\n * for more information about how to create and manage teams\n */\n teams: t.array(t.string),\n /**\n * The names of the functions that the agent has access to\n */\n 'agent-functions': t.array(t.string),\n /**\n * The names of the files that the agent has access to for retrieval\n */\n 'agent-files': t.array(t.string),\n }),\n]);\n\n/**\n * Type override\n */\nexport type AgentInput = t.TypeOf<typeof AgentInput>;\n\n/**\n * AgentFunction type definition.\n */\nexport const AgentFunctionInput = t.type({\n /** Name of the agentFunction */\n name: t.string,\n /** Description of the agentFunction */\n description: t.string,\n /** The JSON schema */\n parameters: t.string,\n});\n\n/**\n * Type override\n */\nexport type AgentFunctionInput = t.TypeOf<typeof AgentFunctionInput>;\n\n/**\n * AgentFile type definition.\n */\nexport const AgentFileInput = t.intersection([\n t.type({\n /** Name of the agentFile */\n name: t.string,\n /** File ID */\n fileId: t.string,\n /** File size */\n size: t.number,\n /** File purpose */\n purpose: valuesOf(PromptFilePurpose),\n }),\n t.partial({\n /** Description of the agentFile */\n description: t.string,\n }),\n]);\n\n/**\n * Type override\n */\nexport type AgentFileInput = t.TypeOf<typeof AgentFileInput>;\n\n/**\n * Vendor type definition.\n */\nexport const VendorInput = t.intersection([\n t.type({\n /** Title of vendor */\n title: t.string,\n }),\n t.partial({\n /** Description of vendor */\n description: t.string,\n /** DPA link */\n dataProcessingAgreementLink: t.string,\n /** Contract email */\n contactName: t.string,\n /** Contract phone */\n contactPhone: t.string,\n /** Address */\n address: t.string,\n /** Headquarters country */\n headquarterCountry: valuesOf(IsoCountryCode),\n /** Headquarters subdivision */\n headquarterSubDivision: valuesOf(IsoCountrySubdivisionCode),\n /** Website URL */\n websiteUrl: t.string,\n /** Business entity */\n businessEntity: t.string,\n /**\n * The email addresses of the employees within your company that are the go-to individuals\n * for managing this vendor\n */\n owners: t.array(t.string),\n /**\n * The names of teams within your Transcend instance that should be responsible\n * for managing this vendor\n *\n * @see https://docs.transcend.io/docs/security/access-control#teams\n * for more information about how to create and manage teams\n */\n teams: t.array(t.string),\n /**\n * Attribute value and its corresponding attribute key\n */\n attributes: t.array(AttributePreview),\n }),\n]);\n\n/**\n * Type override\n */\nexport type VendorInput = t.TypeOf<typeof VendorInput>;\n\n/**\n * DataCategory type definition.\n */\nexport const DataCategoryInput = t.intersection([\n t.type({\n /** Name of data category */\n name: t.string,\n /** Type of data category */\n category: valuesOf(DataCategoryType),\n }),\n t.partial({\n /** Description of data category */\n description: t.string,\n /** Regex for data category */\n regex: t.string,\n /**\n * The email addresses of the employees within your company that are the go-to individuals\n * for managing this data category\n */\n owners: t.array(t.string),\n /**\n * The names of teams within your Transcend instance that should be responsible\n * for managing this data category.\n *\n * @see https://docs.transcend.io/docs/security/access-control#teams\n * for more information about how to create and manage teams\n */\n teams: t.array(t.string),\n /**\n * Attribute value and its corresponding attribute key\n */\n attributes: t.array(AttributePreview),\n }),\n]);\n\n/**\n * Type override\n */\nexport type DataCategoryInput = t.TypeOf<typeof DataCategoryInput>;\n\n/**\n * ProcessingPurpose type definition.\n */\nexport const ProcessingPurposeInput = t.intersection([\n t.type({\n /** Name of processing purpose */\n name: t.string,\n /** Type of processing purpose */\n purpose: valuesOf(ProcessingPurpose),\n }),\n t.partial({\n /** Description of processing purpose */\n description: t.string,\n /**\n * The email addresses of the employees within your company that are the go-to individuals\n * for managing this processing purpose\n */\n owners: t.array(t.string),\n /**\n * The names of teams within your Transcend instance that should be responsible\n * for managing this processing purpose.\n *\n * @see https://docs.transcend.io/docs/security/access-control#teams\n * for more information about how to create and manage teams\n */\n teams: t.array(t.string),\n /**\n * Attribute value and its corresponding attribute key\n */\n attributes: t.array(AttributePreview),\n }),\n]);\n\n/**\n * Type override\n */\nexport type ProcessingPurposeInput = t.TypeOf<typeof ProcessingPurposeInput>;\n\n/**\n * Prompt definition inputs\n */\nexport const PromptInput = t.type({\n /** The title of the prompt. */\n title: t.string,\n /** The content of the prompt. */\n content: t.string,\n});\n\n/**\n * Type override\n */\nexport type PromptInput = t.TypeOf<typeof PromptInput>;\n\n/**\n * Prompt partial definition inputs\n */\nexport const PromptPartialInput = t.type({\n /** The title of the prompt partial. */\n title: t.string,\n /** The content of the prompt partial. */\n content: t.string,\n});\n\n/**\n * Type override\n */\nexport type PromptPartialInput = t.TypeOf<typeof PromptPartialInput>;\n\n/**\n * Prompt partial definition inputs\n */\nexport const PromptGroupInput = t.type({\n /** The title of the prompt group. */\n title: t.string,\n /** The description of the prompt group. */\n description: t.string,\n /** The titles of the prompts included. */\n prompts: t.array(t.string),\n});\n\n/**\n * Type override\n */\nexport type PromptGroupInput = t.TypeOf<typeof PromptGroupInput>;\n\n/**\n * Annotate specific fields within a datapoint. These are often database table columns.\n * Fields can also be a JSON object or separate file.\n */\nexport const FieldInput = t.intersection([\n t.type({\n /** The unique key of the field. When a database, this is the column name. */\n key: t.string,\n }),\n t.partial({\n /** The display title of the field */\n title: t.string,\n /** Description of the field */\n description: t.union([t.string, t.null]),\n /**\n * What is the purpose of processing for this datapoint/table?\n *\n * @see https://github.com/transcend-io/privacy-types/blob/main/src/objects.ts\n */\n purposes: t.array(ProcessingPurposePreviewInput),\n /**\n * The category of personal data for this datapoint\n *\n * @see https://github.com/transcend-io/privacy-types/blob/main/src/objects.ts\n */\n categories: t.array(DataCategoryPreviewInput),\n /**\n * The category of personal data that have been guessed by the classifier this datapoint\n *\n * @see https://github.com/transcend-io/privacy-types/blob/main/src/objects.ts\n */\n 'guessed-categories': t.array(DataCategoryGuessInput),\n /**\n * When true, this subdatapoint should be revealed in a data access request.\n * When false, this field should be redacted\n */\n 'access-request-visibility-enabled': t.boolean,\n /**\n * When true, this subdatapoint should be redacted during an erasure request.\n * There normally is a choice of enabling hard deletion or redaction at the\n * datapoint level, but if redaction is enabled, this column can be used\n * to define which fields should be redacted.\n */\n 'erasure-request-redaction-enabled': t.boolean,\n /** Attributes tagged to subdatapoint */\n attributes: t.array(AttributePreview),\n }),\n]);\n\n/** Type override */\nexport type FieldInput = t.TypeOf<typeof FieldInput>;\n\n/**\n * Datapoints are the different types of data models that existing within your data silo.\n * If the data silo is a database, these would be your tables.\n * Note: These are currently called \"datapoints\" in the Transcend UI and documentation.\n *\n * @see https://docs.transcend.io/docs/the-data-map#datapoints\n */\nexport const DatapointInput = t.intersection([\n t.type({\n /** The unique key of the datapoint. For a database, this is the table name. */\n key: t.string,\n }),\n t.partial({\n /**\n * Usually only relevant for databases,\n * this field should include any schema information for a given datapoint.\n *\n * Examples:\n * - In postgres, it's possible to have multiple tables with the same name under\n * different schemas. e.g., \"public\", \"test\". So here you'd specify [\"public\"] or [\"test\"]\n * - In Snowflake, it's possible to have different databases with different schemas,\n * so you can specify [\"ANALYTICS\", \"public\"] to indicate that the datapoint belongs to\n * the \"public\" schema of the \"ANALYTICS\" database.\n */\n path: t.array(t.string),\n /** The display title of the enricher */\n title: t.string,\n /** Internal description for why the enricher is needed */\n description: t.string,\n /**\n * Configure the category of data that this datapoint should be grouped by in a data access request.\n *\n * @see https://docs.transcend.io/docs/privacy-requests/connecting-data-silos/saas-tools#configuring-an-integration\n */\n 'data-collection-tag': t.string,\n /**\n * The SQL queries that should be run for that datapoint in a privacy request.\n *\n * @see https://github.com/transcend-io/privacy-types/blob/main/src/actions.ts\n */\n 'privacy-action-queries': t.partial(\n applyEnum(RequestActionObjectResolver, () => t.string),\n ),\n /**\n * The types of privacy actions that this datapoint can implement\n *\n * @see https://github.com/transcend-io/privacy-types/blob/main/src/actions.ts\n */\n 'privacy-actions': t.array(valuesOf(RequestActionObjectResolver)),\n /**\n * Provide field-level metadata for this datapoint.\n * This is often the column metadata\n */\n fields: t.array(FieldInput),\n /**\n * The email addresses of the employees within your company that are the go-to individuals\n * for managing this datapoint\n */\n owners: t.array(t.string),\n /**\n * The names of teams within your Transcend instance that should be responsible\n * for managing this datapoint\n *\n * @see https://docs.transcend.io/docs/security/access-control#teams\n * for more information about how to create and manage teams\n */\n teams: t.array(t.string),\n }),\n]);\n\n/** Type override */\nexport type DatapointInput = t.TypeOf<typeof DatapointInput>;\n\nexport const PromptAVendorEmailSettings = t.partial({\n /** The email address of the user to notify when a promptAPerson integration */\n 'notify-email-address': t.string,\n /**\n * The frequency with which we should be sending emails for this data silo, in milliseconds.\n */\n 'send-frequency': t.number,\n /**\n * The type of emails to send for this data silo, i.e. send an email for each DSR, across all open DSRs,\n * or per profile in a DSR.\n */\n 'send-type': valuesOf(PromptAVendorEmailSendType),\n /**\n * Indicates whether prompt-a-vendor emails should include a list of identifiers\n * in addition to a link to the bulk processing UI.\n */\n 'include-identifiers-attachment': t.boolean,\n /**\n * Indicates what kind of link to generate as part of the emails sent out for this Prompt-a-Vendor silo.\n */\n 'completion-link-type': valuesOf(PromptAVendorEmailCompletionLinkType),\n /**\n * The frequency with which we should retry sending emails for this data silo, in milliseconds.\n * Needs to be a string because the number can be larger than the MAX_INT\n */\n 'manual-work-retry-frequency': t.string,\n});\n\n/** Type override */\nexport type PromptAVendorEmailSettings = t.TypeOf<\n typeof PromptAVendorEmailSettings\n>;\n\n/**\n * Input to define a business entity\n *\n * @see https://app.transcend.io/data-map/data-inventory/business-entities\n */\nexport const BusinessEntityInput = t.intersection([\n t.type({\n /** The title of the business entity */\n title: t.string,\n }),\n t.partial({\n /** Description of the business entity */\n description: t.string,\n /** Address of the business entity */\n address: t.string,\n /** Country of headquarters */\n headquarterCountry: valuesOf(IsoCountryCode),\n /** Subdivision of headquarters */\n headquarterSubDivision: valuesOf(IsoCountrySubdivisionCode),\n /** Data protection officer name for the business entity */\n dataProtectionOfficerName: t.string,\n /** Data protection officer email for the business entity */\n dataProtectionOfficerEmail: t.string,\n /**\n * Attribute value and its corresponding attribute key\n */\n attributes: t.array(AttributePreview),\n /**\n * The email addresses of the employees within your company that are the go-to individuals\n * for managing this data silo\n */\n owners: t.array(t.string),\n /**\n * The names of teams within your Transcend instance that should be responsible\n * for managing this data silo.\n *\n * @see https://docs.transcend.io/docs/security/access-control#teams\n * for more information about how to create and manage teams\n */\n teams: t.array(t.string),\n }),\n]);\n\n/** Type override */\nexport type BusinessEntityInput = t.TypeOf<typeof BusinessEntityInput>;\n\nexport const RegionInput = t.partial({\n /** The country */\n country: valuesOf(IsoCountryCode),\n /** The country subdivision */\n countrySubDivision: valuesOf(IsoCountrySubdivisionCode),\n});\n\n/** Type override */\nexport type RegionInput = t.TypeOf<typeof RegionInput>;\n\n/**\n * Input to define a processing activity\n *\n * @see https://app.transcend.io/data-map/data-inventory/processing-activities\n */\nexport const ProcessingActivityInput = t.intersection([\n t.type({\n /** The title of the processing activity */\n title: t.string,\n }),\n t.partial({\n /** Description of the processing activity */\n description: t.string,\n /** Security measure details */\n securityMeasureDetails: t.string,\n /**\n * Controllerships\n *\n * @see https://github.com/transcend-io/privacy-types/blob/main/src/datapoint.ts\n */\n controllerships: t.array(valuesOf(Controllership)),\n /** Storage regions */\n storageRegions: t.array(RegionInput),\n /** Transfer regions */\n transferRegions: t.array(RegionInput),\n /**\n * Retention type\n *\n * @see https://github.com/transcend-io/privacy-types/blob/main/src/datapoint.ts\n */\n retentionType: valuesOf(RetentionType),\n /** Retention period in days */\n retentionPeriod: t.number,\n /** Data protection impact assessment link */\n dataProtectionImpactAssessmentLink: t.string,\n /**\n * Data protection impact assessment status\n *\n * @see https://github.com/transcend-io/privacy-types/blob/main/src/processingActivity.ts.ts\n */\n dataProtectionImpactAssessmentStatus: valuesOf(\n DataProtectionImpactAssessmentStatus,\n ),\n /**\n * Attribute value and its corresponding attribute key\n */\n attributes: t.array(AttributePreview),\n /** Data silo titles */\n dataSiloTitles: t.array(t.string),\n /** Data subject types */\n dataSubjectTypes: t.array(t.string),\n /** Team names */\n teamNames: t.array(t.string),\n /** Owner emails */\n ownerEmails: t.array(t.string),\n /**\n * The purposes of processing for this processing activity\n *\n * @see https://github.com/transcend-io/privacy-types/blob/main/src/objects.ts\n */\n processingSubPurposes: t.array(ProcessingPurposePreviewInput),\n /**\n * The categories of personal data for this processing activity\n *\n * @see https://github.com/transcend-io/privacy-types/blob/main/src/objects.ts\n */\n dataSubCategories: t.array(DataCategoryPreviewInput),\n /** SaaS category titles */\n saaSCategories: t.array(t.string),\n }),\n]);\n\n/** Type override */\nexport type ProcessingActivityInput = t.TypeOf<typeof ProcessingActivityInput>;\n\n/**\n * Software development kit inputs\n *\n * @see https://app.transcend.io/code-scanning/sdks\n */\nexport const SoftwareDevelopmentKitInput = t.intersection([\n t.type({\n /** Title of software development kit */\n name: t.string,\n /** Code package type */\n codePackageType: valuesOf(CodePackageType),\n }),\n t.partial({\n /** Description of the SDK */\n description: t.string,\n /** Github repository */\n repositoryUrl: t.string,\n /** Integration name */\n catalogIntegrationName: t.string,\n /** Doc links */\n documentationLinks: t.array(t.string),\n /** Emails of owners */\n ownerEmails: t.array(t.string),\n /** Team names */\n teamNames: t.array(t.string),\n }),\n]);\n\n/** Type override */\nexport type SoftwareDevelopmentKitInput = t.TypeOf<\n typeof SoftwareDevelopmentKitInput\n>;\n\n/**\n * SDK defined for a code package\n */\nexport const CodePackageSdk = t.intersection([\n t.type({\n /** Name of SDK */\n name: t.string,\n }),\n t.partial({\n /** Version of SDK */\n version: t.string,\n /** Indicate if dependency is a dev dependency */\n isDevDependency: t.boolean,\n }),\n]);\n\n/** Type override */\nexport type CodePackageSdk = t.TypeOf<typeof CodePackageSdk>;\n\n/**\n * Input to define a code package\n *\n * @see https://app.transcend.io/code-scanning/code-packages\n */\nexport const CodePackageInput = t.intersection([\n t.type({\n /** The name of the package */\n name: t.string,\n /** Type of code package */\n type: valuesOf(CodePackageType),\n /** Relative path to code package within the repository */\n relativePath: t.string,\n /** Name of repository that the code packages are being uploaded to */\n repositoryName: t.string,\n }),\n t.partial({\n /** Description of the code package */\n description: t.string,\n /** Software development kits in the repository */\n softwareDevelopmentKits: t.array(CodePackageSdk),\n /** Names of the teams that manage the code package */\n teamNames: t.array(t.string),\n /** Names of the owner emails that manage the code package */\n ownerEmails: t.array(t.string),\n }),\n]);\n\n/** Type override */\nexport type CodePackageInput = t.TypeOf<typeof CodePackageInput>;\n\n/**\n * Input to define a repository\n *\n * @see https://app.transcend.io/code-scanning/repositories\n */\nexport const RepositoryInput = t.intersection([\n t.type({\n /** The name of the repo */\n name: t.string,\n /** URL of repository */\n url: t.string,\n }),\n t.partial({\n /** Description of the repository */\n description: t.string,\n /** Names of the teams that manage the repository */\n teamNames: t.array(t.string),\n /** Names of the owner emails that manage the repository */\n ownerEmails: t.array(t.string),\n }),\n]);\n\n/** Type override */\nexport type RepositoryInput = t.TypeOf<typeof RepositoryInput>;\n\n/**\n * Input to define a data subject\n *\n * @see https://app.transcend.io/privacy-requests/settings\n */\nexport const DataSubjectInput = t.intersection([\n t.type({\n /** The type of the data subject */\n type: t.string,\n }),\n t.partial({\n /** Whether the data subject is active on the Privacy Center & DSR API */\n active: t.boolean,\n /** The title of the data subject */\n title: t.string,\n /** Whether or not to default new requests made in the admin dashboard to silent mode */\n adminDashboardDefaultSilentMode: t.boolean,\n /** Enabled request actions for the data subject */\n actions: t.array(valuesOf(RequestAction)),\n }),\n]);\n\n/** Type override */\nexport type DataSubjectInput = t.TypeOf<typeof DataSubjectInput>;\n\n/**\n * Input to define an action\n *\n * @see https://app.transcend.io/privacy-requests/settings\n */\nexport const ActionInput = t.intersection([\n t.type({\n /** The type of the data subject */\n type: valuesOf(RequestAction),\n }),\n t.partial({\n /** Whether or not to skip deletion phase when no data is found */\n skipSecondaryIfNoFiles: t.boolean,\n /** Whether to skip the downloadable step */\n skipDownloadableStep: t.boolean,\n /** Whether the request action requires review */\n requiresReview: t.boolean,\n /** The wait period for the action */\n waitingPeriod: t.number,\n /** The method in which the data subject's region is detected */\n regionDetectionMethod: valuesOf(RegionDetectionMethod),\n /** The list of regions to show in the form */\n regionList: t.array(\n valuesOf({ ...IsoCountryCode, ...IsoCountrySubdivisionCode }),\n ),\n /** The list of regions NOT to show in the form */\n regionBlockList: t.array(\n valuesOf({ ...IsoCountryCode, ...IsoCountrySubdivisionCode }),\n ),\n }),\n]);\n\n/** Type override */\nexport type ActionInput = t.TypeOf<typeof ActionInput>;\n\n/**\n * Input to define an identifier\n *\n * @see https://app.transcend.io/privacy-requests/identifiers\n */\nexport const IdentifierInput = t.intersection([\n t.type({\n /** The name of the identifier */\n name: t.string,\n /** The type of the identifier */\n type: t.string,\n }),\n t.partial({\n /** Regular expression to verify the identifier */\n regex: t.string,\n /** The fixed set of options that an identifier can take on */\n selectOptions: t.array(t.string),\n /** Whether or not the identifier is shown in the privacy center form */\n privacyCenterVisibility: t.array(valuesOf(RequestAction)),\n /** The set of data subjects that this identifier is enabled for */\n dataSubjects: t.array(t.string),\n /** When true, the identifier is a required field on the privacy center form */\n isRequiredInForm: t.boolean,\n /** Placeholder message for identifier */\n placeholder: t.string,\n /** Display title for identifier */\n displayTitle: t.string,\n /** Display description for identifier */\n displayDescription: t.string,\n /** The display order for the identifier */\n displayOrder: t.number,\n /** Whether or not the identifier is unique on the preference store */\n isUniqueOnPreferenceStore: t.boolean,\n }),\n]);\n\n/** Type override */\nexport type IdentifierInput = t.TypeOf<typeof IdentifierInput>;\n\n/**\n * Input to define a data flow\n *\n * @see https://app.transcend.io/consent-manager/data-flows/approved\n */\nexport const DataFlowInput = t.intersection([\n t.type({\n /** Value of data flow */\n value: t.string,\n /** Type of data flow */\n type: valuesOf(DataFlowScope),\n }),\n t.partial({\n /** Description of data flow */\n description: t.string,\n /** The tracking purposes that are required to be opted in for this data flow */\n trackingPurposes: t.array(t.string),\n /**\n * Name of the consent service attached\n */\n service: t.string,\n /**\n * Status of the tracker (approved vs triage)\n */\n status: valuesOf(ConsentTrackerStatus),\n /**\n * The email addresses of the employees within your company that are the go-to individuals\n * for managing this data silo\n */\n owners: t.array(t.string),\n /**\n * The names of teams within your Transcend instance that should be responsible\n * for managing this data silo.\n *\n * @see https://docs.transcend.io/docs/security/access-control#teams\n * for more information about how to create and manage teams\n */\n teams: t.array(t.string),\n /**\n * Attribute value and its corresponding attribute key\n */\n attributes: t.array(AttributePreview),\n }),\n]);\n\n/** Type override */\nexport type DataFlowInput = t.TypeOf<typeof DataFlowInput>;\n\nexport const CookieInput = t.intersection([\n t.type({\n /** Name of data flow */\n name: t.string,\n }),\n t.partial({\n /** Whether or not the cookie is a regular expression */\n isRegex: t.boolean,\n /** Description of data flow */\n description: t.string,\n /** The tracking purposes that are required to be opted in for this data flow */\n trackingPurposes: t.array(t.string),\n /**\n * Name of the consent service attached\n */\n service: t.string,\n /**\n * Status of the tracker (approved vs triage)\n */\n status: valuesOf(ConsentTrackerStatus),\n /**\n * The email addresses of the employees within your company that are the go-to individuals\n * for managing this data silo\n */\n owners: t.array(t.string),\n /**\n * The names of teams within your Transcend instance that should be responsible\n * for managing this data silo.\n *\n * @see https://docs.transcend.io/docs/security/access-control#teams\n * for more information about how to create and manage teams\n */\n teams: t.array(t.string),\n /**\n * Attribute value and its corresponding attribute key\n */\n attributes: t.array(AttributePreview),\n }),\n]);\n\n/** Type override */\nexport type CookieInput = t.TypeOf<typeof CookieInput>;\n\nexport const ConsentManageExperienceInput = t.intersection([\n t.type({\n /** Name of experience */\n name: t.string,\n }),\n t.partial({\n /** Name of experience */\n displayName: t.string,\n /** Region that define this regional experience */\n regions: t.array(RegionInput),\n /** How to handle consent expiry */\n onConsentExpiry: valuesOf(OnConsentExpiry),\n /** Consent expiration lever */\n consentExpiry: t.number,\n /** In vs not in operator */\n operator: valuesOf(RegionsOperator),\n /** Priority of experience */\n displayPriority: t.number,\n /** View state to prompt when auto prompting is enabled */\n viewState: valuesOf(InitialViewState),\n /** Purposes that can be opted out of in a particular experience */\n purposes: t.array(\n t.type({\n /** Slug of purpose */\n trackingType: t.string,\n }),\n ),\n /** Purposes that are opted out by default in a particular experience */\n optedOutPurposes: t.array(\n t.type({\n /** Slug of purpose */\n trackingType: t.string,\n }),\n ),\n /**\n * Browser languages that define this regional experience\n */\n browserLanguages: t.array(valuesOf(BrowserLanguage)),\n /** Browser time zones that define this regional experience */\n browserTimeZones: t.array(valuesOf(BrowserTimeZone)),\n }),\n]);\n\n/** Type override */\nexport type ConsentManageExperienceInput = t.TypeOf<\n typeof ConsentManageExperienceInput\n>;\n\nexport const PartitionInput = t.intersection([\n t.type({\n /** Name of partition */\n name: t.string,\n }),\n t.partial({\n /** Value of partition, cannot be pushed, can only be pulled */\n partition: t.string,\n }),\n]);\n\n/** Type override */\nexport type PartitionInput = t.TypeOf<typeof PartitionInput>;\n\nexport const ConsentManagerInput = t.partial({\n /** Airgap version */\n version: t.string,\n /** The consent manager domains in the instance */\n bundleUrls: t.record(valuesOf(ConsentBundleType), t.string),\n /** The consent manager domains in the instance */\n domains: t.array(t.string),\n /** Key used to partition consent records */\n partition: t.string,\n /** Precedence of signals vs user input */\n consentPrecedence: valuesOf(ConsentPrecedenceOption),\n /** The consent manager unknown request policy */\n unknownRequestPolicy: valuesOf(UnknownRequestPolicy),\n /** The consent manager unknown cookie policy */\n unknownCookiePolicy: valuesOf(UnknownRequestPolicy),\n /** The XDI sync endpoint for this airgap bundle */\n syncEndpoint: t.string,\n /** The telemetry partitioning strategy */\n telemetryPartitioning: valuesOf(TelemetryPartitionStrategy),\n /** Whether the site owner has signed the IAB agreement */\n signedIabAgreement: valuesOf(SignedIabAgreementOption),\n /** Regional experience configurations */\n experiences: t.array(ConsentManageExperienceInput),\n /** Theme config */\n theme: t.partial({\n /** Primary color */\n primaryColor: t.string,\n /** Font color */\n fontColor: t.string,\n /** Privacy policy URL */\n privacyPolicy: t.string,\n /** Auto-prompt setting */\n prompt: t.number,\n }),\n // TODO: https://transcend.height.app/T-23919 - reconsider simpler yml shape\n /** The Shared XDI host sync groups config (JSON) for this airgap bundle */\n syncGroups: t.string,\n});\n\n/** Type override */\nexport type ConsentManagerInput = t.TypeOf<typeof ConsentManagerInput>;\n\n/**\n * Input to define a privacy center\n */\nexport const PrivacyCenterInput = t.partial({\n /** Whether or not the entire privacy center is enabled or disabled */\n isDisabled: t.boolean,\n /** Whether or not to show the privacy requests button */\n showPrivacyRequestButton: t.boolean,\n /** Whether or not to show the data practices page */\n showDataPractices: t.boolean,\n /** Whether or not to show the policies page */\n showPolicies: t.boolean,\n /** Whether or not to show the tracking technologies page */\n showTrackingTechnologies: t.boolean,\n /** Whether or not to show the cookies on the tracking technologies page */\n showCookies: t.boolean,\n /** Whether or not to show the data flows on the tracking technologies page */\n showDataFlows: t.boolean,\n /** Whether or not to show the consent manager opt out options on the tracking technologies page */\n showConsentManager: t.boolean,\n /** Whether or not to show the manage your privacy page */\n showManageYourPrivacy: t.boolean,\n /** Whether or not to show the marketing preferences page */\n showMarketingPreferences: t.boolean,\n /** What languages are supported for the privacy center */\n locales: t.array(valuesOf(LOCALE_KEY)),\n /** The default locale for the privacy center */\n defaultLocale: valuesOf(LOCALE_KEY),\n /** Whether or not to prefer the browser default locale */\n preferBrowserDefaultLocale: t.boolean,\n /** The email addresses of the employees within your company that are the go-to individuals for managing this privacy center */\n supportEmail: t.string,\n /** The email addresses of the employees within your company that are the go-to individuals for managing this privacy center */\n replyToEmail: t.string,\n /** Whether or not to send emails from a no reply email */\n useNoReplyEmailAddress: t.boolean,\n /** Whether or not to use a custom email domain */\n useCustomEmailDomain: t.boolean,\n /** Whether or not to transcend access requests from JSON to CSV */\n transformAccessReportJsonToCsv: t.boolean,\n /** The theme object of colors to display on the privacy center */\n theme: t.partial({\n /** The theme colors */\n colors: t.partial(applyEnum(ConfigurableColorPaletteColor, () => t.string)),\n /** Styles to apply to components */\n componentStyles: PrivacyCenterComponentStyles,\n /** Override styles */\n textStyles: PrivacyCenterTextStyles,\n }),\n});\n\n/** Type override */\nexport type PrivacyCenterInput = t.TypeOf<typeof PrivacyCenterInput>;\n\n/**\n * Input to define a policy\n */\nexport const PolicyInput = t.intersection([\n t.type({\n /** The title of the policy */\n title: t.string,\n }),\n t.partial({\n /** Effective date of policy */\n effectiveOn: t.string,\n /** Whether or not to disable the effective date */\n disableEffectiveOn: t.boolean,\n /** Content of the policy */\n content: t.string,\n /** The languages for which the policy is disabled for */\n disabledLocales: t.array(valuesOf(LOCALE_KEY)),\n }),\n]);\n\n/** Type override */\nexport type PolicyInput = t.TypeOf<typeof PolicyInput>;\n\n/**\n * Input to define an internationalized message defined in Transcend\n */\nexport const IntlMessageInput = t.intersection([\n t.type({\n /** The ID of the message */\n id: t.string,\n }),\n t.partial({\n /** The hard-coded ID that the message refers to in the Privacy Center or Consent Manager UI, null if message is dynamic */\n targetReactIntlId: t.string,\n /** The default message to use */\n defaultMessage: t.string,\n /** The translations */\n translations: t.partial(applyEnum(LOCALE_KEY, () => t.string)),\n }),\n]);\n\n/** Type override */\nexport type IntlMessageInput = t.TypeOf<typeof IntlMessageInput>;\n\n/**\n * Input to define a data silo\n *\n * Define the data silos in your data map. A data silo can be a database,\n * or a web service that may use a collection of different data stores under the hood.\n *\n * @see https://docs.transcend.io/docs/the-data-map#data-silos\n */\nexport const DataSiloInput = t.intersection([\n t.type({\n /** The display title of the data silo */\n title: t.string,\n /**\n * The type of integration. Common internal system types:\n * server | database | cron | promptAPerson\n */\n integrationName: t.string,\n }),\n t.partial({\n /** For prompt a person or database integrations, the underlying integration name */\n 'outer-type': t.string,\n /** A description for that data silo */\n description: t.string,\n /** The webhook URL to notify for data privacy requests */\n url: t.string,\n /** The title of the API key that will be used to respond to privacy requests */\n 'api-key-title': t.string,\n /** Custom headers to include in outbound webhook */\n headers: t.array(WebhookHeader),\n /**\n * Specify which data subjects may have personally-identifiable-information (PII) within this system\n * This field can be omitted, and the default assumption will be that the system may potentially\n * contain PII for any potential data subject type.\n */\n 'data-subjects': t.array(t.string),\n /**\n * When this data silo implements a privacy request, these are the identifiers\n * that should be looked up within this system.\n */\n 'identity-keys': t.array(t.string),\n /**\n * When a data erasure request is being performed, this data silo should not be deleted from\n * until all of the following data silos were deleted first. This list can contain other internal\n * systems defined in this file, as well as any of the SaaS tools connected in your Transcend instance.\n */\n 'deletion-dependencies': t.array(t.string),\n /**\n * The email addresses of the employees within your company that are the go-to individuals\n * for managing this data silo\n */\n owners: t.array(t.string),\n /**\n * The names of teams within your Transcend instance that should be responsible\n * for managing this data silo.\n *\n * @see https://docs.transcend.io/docs/security/access-control#teams\n * for more information about how to create and manage teams\n */\n teams: t.array(t.string),\n /**\n * Specify this flag if the data silo is under development and should not be included\n * in production privacy request workflows. Will still sync metadata to app.transcend.io.\n */\n disabled: t.boolean,\n /**\n * Datapoints defined within this data silo, see comment of `DatapointInput`\n * for further details.\n */\n datapoints: t.array(DatapointInput),\n /**\n * Configure email notification settings for privacy requests\n */\n 'email-settings': PromptAVendorEmailSettings,\n /** Country of data silo hosting */\n country: valuesOf(IsoCountryCode),\n /** Sub-division of data silo hosting */\n countrySubDivision: valuesOf(IsoCountrySubdivisionCode),\n /**\n * Attribute value and its corresponding attribute key\n */\n attributes: t.array(AttributePreview),\n /**\n * The business entities associated with this data silo\n */\n businessEntityTitles: t.array(t.string),\n }),\n]);\n\n/** Type override */\nexport type DataSiloInput = t.TypeOf<typeof DataSiloInput>;\n\nexport const ActionItemCollectionInput = t.intersection([\n t.type({\n /** The display title of the enricher */\n title: t.string,\n /** Locations where collection is shown */\n productLine: valuesOf(TranscendProduct),\n }),\n t.partial({\n /** Description of collection */\n description: t.string,\n /** Whether hidden */\n hidden: t.boolean,\n }),\n]);\n\n/** Type override */\nexport type ActionItemCollectionInput = t.TypeOf<\n typeof ActionItemCollectionInput\n>;\n\n/**\n * Input to define an action item\n */\nexport const ActionItemInput = t.intersection([\n t.type({\n /** The display title of the enricher */\n title: t.string,\n /** Action item type */\n type: valuesOf(ActionItemCode),\n /** The titles of the collections that the action item is grouped within */\n collections: t.array(t.string),\n }),\n t.partial({\n /** Priority of the action item */\n priority: valuesOf(ActionItemPriorityOverride),\n /** Customer experience action item key */\n customerExperienceActionItemId: t.string,\n /** Due date of the action item */\n dueDate: t.string,\n /** Whether action item has been resolved */\n resolved: t.boolean,\n /** Notes */\n notes: t.string,\n /** Links to action items */\n link: t.string,\n /**\n * The email addresses of the employees assigned to the action item\n */\n users: t.array(t.string),\n /**\n * The names of teams assigned to the action item\n *\n * @see https://docs.transcend.io/docs/security/access-control#teams\n * for more information about how to create and manage teams\n */\n teams: t.array(t.string),\n /**\n * Attribute value and its corresponding attribute key\n */\n attributes: t.array(AttributePreview),\n }),\n]);\n\n/** Type override */\nexport type ActionItemInput = t.TypeOf<typeof ActionItemInput>;\n\nexport const AssessmentRuleInput = t.intersection([\n t.type({\n /** The reference id of the question whose answer is compared by this rule */\n 'depends-on-question-reference-id': t.string,\n /** The operator to use when comparing the question answer to the operands */\n 'comparison-operator': valuesOf(ComparisonOperator),\n }),\n t.partial({\n /** The values to compare the question answer to */\n 'comparison-operands': t.array(t.string),\n }),\n]);\n\n/** Type override */\nexport type AssessmentRuleInput = t.TypeOf<typeof AssessmentRuleInput>;\n\nexport interface AssessmentNestedRuleInput {\n /** The operator to use when comparing the nested rules */\n 'logic-operator': LogicOperator;\n /** The rules to evaluate and be compared with to other using the LogicOperator */\n rules?: AssessmentRuleInput[];\n /** The nested rules to add one more level of nesting to the rules. They are also compared to each other. */\n 'nested-rules'?: AssessmentNestedRuleInput[];\n}\n\nexport const AssessmentNestedRuleInput: t.RecursiveType<\n t.Type<AssessmentNestedRuleInput>\n> = t.recursion('AssessmentNestedRuleInput', (self) =>\n t.intersection([\n t.type({\n /** The operator to use when comparing the nested rules */\n 'logic-operator': valuesOf(LogicOperator),\n }),\n t.partial({\n /** The rules to evaluate and be compared with to other using the LogicOperator */\n rules: t.array(AssessmentRuleInput),\n /** The nested rules to add one more level of nesting to the rules. They are also compared to each other. */\n 'nested-rules': t.array(self),\n }),\n ]),\n);\n\nexport const AssessmentDisplayLogicInput = t.intersection([\n t.type({\n /** The display logic type */\n action: valuesOf(AssessmentsDisplayLogicAction),\n }),\n t.partial({\n /** The rule to evaluate */\n rule: AssessmentRuleInput,\n /** The nested rule to evaluate */\n 'nested-rule': AssessmentNestedRuleInput,\n }),\n]);\n\n/** Type override */\nexport type AssessmentDisplayLogicInput = t.TypeOf<\n typeof AssessmentDisplayLogicInput\n>;\n\nexport const RiskAssignmentInput = t.partial({\n /** The risk level to assign to the question */\n 'risk-level': t.string,\n /** The risk matrix column to assign to a question. */\n 'risk-matrix-column': t.string,\n /** The risk matrix row to assign to a question. */\n 'risk-matrix-row': t.string,\n});\n\n/** Type override */\nexport type RiskAssignmentInput = t.TypeOf<typeof RiskAssignmentInput>;\n\nexport const RiskLogicInput = t.intersection([\n t.type({\n /** The values to compare */\n 'comparison-operands': t.array(t.string),\n /** The operator */\n 'comparison-operator': valuesOf(ComparisonOperator),\n }),\n t.partial({\n /** The risk level to assign to the question */\n 'risk-level': t.string,\n /** The risk matrix column to assign to a question. */\n 'risk-matrix-column': t.string,\n /** The risk matrix row to assign to a question. */\n 'risk-matrix-row': t.string,\n }),\n]);\n\n/** Type override */\nexport type RiskLogicInput = t.TypeOf<typeof RiskLogicInput>;\n\nexport const AssessmentAnswerOptionInput = t.type({\n /** Value of answer */\n value: t.string,\n});\n\n/** Type override */\nexport type AssessmentAnswerOptionInput = t.TypeOf<\n typeof AssessmentAnswerOptionInput\n>;\n\nexport const AssessmentSectionQuestionInput = t.intersection([\n t.type({\n /** The title of the assessment section question */\n title: t.string,\n /** The question type */\n type: valuesOf(AssessmentQuestionType),\n }),\n t.partial({\n /** The sub-type of the assessment question */\n 'sub-type': valuesOf(AssessmentQuestionSubType),\n /** The question placeholder */\n placeholder: t.string,\n /** The question description */\n description: t.string,\n /** Whether an answer is required */\n 'is-required': t.boolean,\n /** Used to identify the question within a form or template so it can be referenced in conditional logic. */\n 'reference-id': t.string,\n /** Display logic for the question */\n 'display-logic': AssessmentDisplayLogicInput,\n /** Risk logic for the question */\n 'risk-logic': t.array(RiskLogicInput),\n /** Risk category titles for the question */\n 'risk-categories': t.array(t.string),\n /** Risk framework titles for the question */\n 'risk-framework': t.string,\n /** Answer options for the question */\n 'answer-options': t.array(AssessmentAnswerOptionInput),\n /** The selected answers to the assessments */\n 'selected-answers': t.array(t.string),\n /** Allowed MIME types for the question */\n 'allowed-mime-types': t.array(t.string),\n /** Allow selecting other options */\n 'allow-select-other': t.boolean,\n /** Sync model for the question */\n 'sync-model': valuesOf(AssessmentSyncModel),\n /** Sync column for the question */\n 'sync-column': valuesOf(AssessmentSyncColumn),\n /** Attribute key / custom field name for the question */\n 'attribute-key': t.string,\n /** Require risk evaluation for the question */\n 'require-risk-evaluation': t.boolean,\n /** Require risk matrix evaluation for the question */\n 'require-risk-matrix-evaluation': t.boolean,\n }),\n]);\n\n/** Type override */\nexport type AssessmentSectionQuestionInput = t.TypeOf<\n typeof AssessmentSectionQuestionInput\n>;\n\nexport const AssessmentSectionInput = t.intersection([\n t.type({\n /** The title of the assessment section */\n title: t.string,\n /** The questions in the assessment section */\n questions: t.array(AssessmentSectionQuestionInput),\n }),\n t.partial({\n /** Email address of those assigned */\n assignees: t.array(t.string),\n /** Email address of those externally assigned */\n 'external-assignees': t.array(t.string),\n /** Status of section */\n status: t.string,\n /** Whether assessment is reviewed */\n 'is-reviewed': t.boolean,\n }),\n]);\n\n/** Type override */\nexport type AssessmentSectionInput = t.TypeOf<typeof AssessmentSectionInput>;\n\nexport const AssessmentRetentionScheduleInput = t.type({\n /** The retention schedule type */\n type: valuesOf(RetentionScheduleType),\n /** The duration of the retention schedule in days */\n 'duration-days': t.number,\n /** The operation to perform on the retention schedule */\n operand: valuesOf(RetentionScheduleOperation),\n});\n\n/** Type override */\nexport type AssessmentRetentionScheduleInput = t.TypeOf<\n typeof AssessmentRetentionScheduleInput\n>;\n\nexport const AssessmentTemplateInput = t.intersection([\n t.type({\n /** The title of the assessment template */\n title: t.string,\n }),\n t.partial({\n /** The Assessment sections under this assessment template */\n sections: t.array(AssessmentSectionInput),\n /** Description of assessment template */\n description: t.string,\n /** The status of the assessment */\n status: valuesOf(AssessmentFormTemplateStatus),\n /** The source of the assessment */\n source: valuesOf(AssessmentFormTemplateSource),\n /** The email of the user that created the assessment */\n creator: t.string,\n /** Whether the template is in a locked status */\n locked: t.boolean,\n /** ID of parent template this was cloned from */\n 'parent-id': t.string,\n /** Whether the template is archived */\n archived: t.boolean,\n /** The date that the assessment was created */\n 'created-at': t.string,\n /** The names of the custom fields associated to this assessment template */\n 'attribute-keys': t.array(t.string),\n /** The retention schedule configuration */\n 'retention-schedule': AssessmentRetentionScheduleInput,\n /** The titles of the email templates used in the assessment template */\n templates: t.array(t.string),\n }),\n]);\n\n/** Type override */\nexport type AssessmentTemplateInput = t.TypeOf<typeof AssessmentTemplateInput>;\n\nexport const AssessmentResourceInput = t.type({\n /** The title of the resource */\n title: t.string,\n /** The type of the resource */\n type: valuesOf(AttributeSupportedResourceType),\n});\n\n/** Type override */\nexport type AssessmentResourceInput = t.TypeOf<typeof AssessmentResourceInput>;\n\nexport const AssessmentInput = t.intersection([\n t.type({\n /** The title of the assessment */\n title: t.string,\n /** The title of the assessment group */\n group: t.string,\n }),\n t.partial({\n /** The assessment sections */\n sections: t.array(AssessmentSectionInput),\n /** The email of the user that created the assessment */\n creator: t.string,\n /** The description of the assessment */\n description: t.string,\n /** The status of the assessment */\n status: valuesOf(AssessmentFormStatus),\n /** The emails of the transcend users assigned to the assessment */\n assignees: t.array(t.string),\n /** The emails of the external emails assigned to the assessment */\n 'external-assignees': t.array(t.string),\n /** The emails of the assessment reviewers */\n reviewers: t.array(t.string),\n /** Whether the assessment is in a locked status */\n locked: t.boolean,\n /** Whether the assessment is archived */\n archived: t.boolean,\n /** Whether the form is created by an external user */\n external: t.boolean,\n /**\n * Whether the form title is an internal label only, and the group title should be used in communications with assignees\n */\n 'title-is-internal': t.boolean,\n /** The date that the assessment is due */\n 'due-date': t.string,\n /** The date that the assessment was created */\n 'created-at': t.string,\n /** The date that the assessment was assigned at */\n 'assigned-at': t.string,\n /** The date that the assessment was submitted at */\n 'submitted-at': t.string,\n /** The date that the assessment was approved at */\n 'approved-at': t.string,\n /** The date that the assessment was rejected at */\n 'rejected-at': t.string,\n /** The linked data inventory resources */\n resources: t.array(AssessmentResourceInput),\n /** The linked data inventory synced rows */\n rows: t.array(AssessmentResourceInput),\n /** The assessment retention schedule */\n 'retention-schedule': AssessmentRetentionScheduleInput,\n /** The assessment custom fields */\n attributes: t.array(AttributePreview),\n }),\n]);\n\n/** Type override */\nexport type AssessmentInput = t.TypeOf<typeof AssessmentInput>;\n\nexport const ConsentPreferenceTopicOptionValue = t.type({\n /** Title of option value */\n title: t.string,\n /** API slug */\n slug: t.string,\n});\n\n/** Type override */\nexport type ConsentPreferenceTopicOptionValue = t.TypeOf<\n typeof ConsentPreferenceTopicOptionValue\n>;\n\nexport const ConsentPreferenceTopic = t.intersection([\n t.type({\n /** The type of the preference topic */\n type: valuesOf(PreferenceTopicType),\n /** The title of the preference topic */\n title: t.string,\n /** The description of the preference topic */\n description: t.string,\n }),\n t.partial({\n /** Default value */\n 'default-configuration': t.string,\n /** Whether the preference topic is shown in privacy center */\n 'show-in-privacy-center': t.boolean,\n /** The options when type is single or multi select */\n options: t.array(ConsentPreferenceTopicOptionValue),\n }),\n]);\n\n/** Type override */\nexport type ConsentPreferenceTopic = t.TypeOf<typeof ConsentPreferenceTopic>;\n\nexport const ConsentPurpose = t.intersection([\n t.type({\n /** Consent purpose slug */\n trackingType: t.string,\n /** The title of the tracking purpose that appears in Consent Management and Privacy Center UIs */\n title: t.string,\n /** The display name of this tracking purpose */\n name: t.string,\n }),\n t.partial({\n /** Description of purpose */\n description: t.string,\n /** Whether purpose is active */\n 'is-active': t.boolean,\n /** Whether purpose is configurable */\n configurable: t.boolean,\n /** Display order of purpose for privacy center */\n 'display-order': t.number,\n /** Whether purpose is shown in privacy center */\n 'show-in-privacy-center': t.boolean,\n /** Whether purpose is show in consent manger */\n 'show-in-consent-manager': t.boolean,\n /** The preference topics configured for the purpose */\n 'preference-topics': t.array(ConsentPreferenceTopic),\n /** Authentication level for purpose on privacy center */\n 'auth-level': valuesOf(PreferenceStoreAuthLevel),\n /** Opt out signals that should instantly opt out of this purpose */\n 'opt-out-signals': t.array(valuesOf(UserPrivacySignalEnum)),\n /** Default consent value */\n 'default-consent': valuesOf(DefaultConsentOption),\n }),\n]);\n\n/** Type override */\nexport type ConsentPurpose = t.TypeOf<typeof ConsentPurpose>;\n\nexport const TranscendInput = t.partial({\n /**\n * Action items\n */\n 'action-items': t.array(ActionItemInput),\n /**\n * Action item collections\n */\n 'action-item-collections': t.array(ActionItemCollectionInput),\n /**\n * API key definitions\n */\n 'api-keys': t.array(ApiKeyInput),\n /** Team definitions */\n teams: t.array(TeamInput),\n /**\n * Email template definitions\n */\n templates: t.array(TemplateInput),\n /**\n * Enricher definitions\n */\n enrichers: t.array(EnricherInput),\n /**\n * Attribute definitions\n */\n attributes: t.array(AttributeInput),\n /**\n * Business entity definitions\n */\n 'business-entities': t.array(BusinessEntityInput),\n /**\n * Vendor definitions\n */\n vendors: t.array(VendorInput),\n /**\n * Data categories definitions\n */\n 'data-categories': t.array(DataCategoryInput),\n /**\n * Vendor definitions\n */\n 'processing-purposes': t.array(ProcessingPurposeInput),\n /**\n * Data subject definitions\n */\n 'data-subjects': t.array(DataSubjectInput),\n /**\n * Action definitions\n */\n actions: t.array(ActionInput),\n /**\n * Identifier definitions\n */\n identifiers: t.array(IdentifierInput),\n /**\n * Data silo definitions\n */\n 'data-silos': t.array(DataSiloInput),\n /**\n * Data flow definitions\n */\n 'data-flows': t.array(DataFlowInput),\n /**\n * Cookie definitions\n */\n cookies: t.array(CookieInput),\n /**\n * Consent manager definition\n */\n 'consent-manager': ConsentManagerInput,\n /**\n * Prompt definitions\n */\n prompts: t.array(PromptInput),\n /**\n * Prompt partial definitions\n */\n 'prompt-partials': t.array(PromptPartialInput),\n /**\n * Prompt group definitions\n */\n 'prompt-groups': t.array(PromptGroupInput),\n /**\n * Agent definitions\n */\n agents: t.array(AgentInput),\n /**\n * Agent function definitions\n */\n 'agent-functions': t.array(AgentFunctionInput),\n /**\n * Agent file definitions\n */\n 'agent-files': t.array(AgentFileInput),\n /**\n * The privacy center configuration\n */\n 'privacy-center': PrivacyCenterInput,\n /**\n * The policies configuration\n */\n policies: t.array(PolicyInput),\n /**\n * The internationalized messages configuration\n */\n messages: t.array(IntlMessageInput),\n /** The full list of consent manager partitions (e.g. dev vs staging vs prod) */\n partitions: t.array(PartitionInput),\n /**\n * The full list of assessment templates\n */\n 'assessment-templates': t.array(AssessmentTemplateInput),\n /**\n * The full list of assessment results\n */\n assessments: t.array(AssessmentInput),\n /**\n * Processing activity definitions\n */\n 'processing-activities': t.array(ProcessingActivityInput),\n /**\n * Consent and preference management purposes\n */\n purposes: t.array(ConsentPurpose),\n});\n\n/** Type override */\nexport type TranscendInput = t.TypeOf<typeof TranscendInput>;\n\n/**\n * The output of `tr-generate-api-keys` that can be provided to `tr-push`\n */\nexport const StoredApiKey = t.type({\n /** Name of instance */\n organizationName: t.string,\n /** API key */\n apiKey: t.string,\n /** Organization ID API key is for */\n organizationId: t.string,\n});\n\n/** Type override */\nexport type StoredApiKey = t.TypeOf<typeof StoredApiKey>;\n\n/**\n * Minimal set required to mark as completed\n */\nexport const DataFlowCsvInput = t.intersection([\n t.type({\n /** The value of the data flow (host or regex) */\n 'Connections Made To': t.string,\n /** The type of the data flow */\n Type: valuesOf(DataFlowScope),\n /** The CSV of purposes mapped to that data flow */\n Purpose: t.string,\n }),\n t.partial({\n /** The service that the data flow relates to */\n Service: t.string,\n /** Notes and descriptions for the data flow */\n Notes: t.string,\n /** Set of data flow owners */\n Owners: t.string,\n /** Set of data flow team owners */\n Teams: t.string,\n /** LIVE vs NEEDS_REVIEW aka Approved vs Triage */\n Status: valuesOf(ConsentTrackerStatus),\n }),\n // Custom attributes\n t.record(t.string, t.string),\n]);\n\n/** Type override */\nexport type DataFlowCsvInput = t.TypeOf<typeof DataFlowCsvInput>;\n\nexport const CookieCsvInput = t.intersection([\n t.type({\n /** The value of the cookie */\n Name: t.string,\n /** The CSV of purposes mapped to that cookie */\n Purpose: t.string,\n }),\n t.partial({\n /** The service that the cookie relates to */\n Service: t.string,\n /** Notes and descriptions for the cookie */\n Notes: t.string,\n /** Set of cookie owners */\n Owners: t.string,\n /** Set of cookie team owners */\n Teams: t.string,\n /** LIVE vs NEEDS_REVIEW aka Approved vs Triage */\n Status: valuesOf(ConsentTrackerStatus),\n }),\n // Custom attributes\n t.record(t.string, t.string),\n]);\n\n/** Type override */\nexport type CookieCsvInput = t.TypeOf<typeof CookieCsvInput>;\n\n/**\n * Export of (await airgap.getMetadata()).services\n */\nexport const ConsentManagerServiceMetadata = t.type({\n /** The title of the service */\n title: t.string,\n /** The description */\n description: t.string,\n /** Cookies */\n cookies: t.array(\n t.type({\n /** Name of cookie */\n name: t.string,\n /** Allowed purposes */\n trackingPurposes: t.array(t.string),\n }),\n ),\n /** Data Flows */\n dataFlows: t.array(\n t.type({\n /** Value of data flow */\n value: t.string,\n /** Type of data flow */\n type: valuesOf(DataFlowScope),\n /** Allowed purposes */\n trackingPurposes: t.array(t.string),\n }),\n ),\n});\n\n/** Type override */\nexport type ConsentManagerServiceMetadata = t.TypeOf<\n typeof ConsentManagerServiceMetadata\n>;\n/// //////////////////////////////////////\n// Pathfinder policies //\n/// //////////////////////////////////////\n\nexport const PathfinderPolicyNameC = valuesOf(PathfinderPolicyName);\n\n/** the codec of a route enabled in an AI integration */\nexport type EnabledRouteC<T extends t.Mixed> = t.TypeC<{\n /** the name of the enabled route */\n routeName: T;\n /** the enabled policies */\n enabledPolicies: t.ArrayC<typeof PathfinderPolicyNameC>;\n}>;\n\n/** the codec of routes enabled in an AI integration */\nexport type EnabledRoutesC<T extends t.Mixed> = t.ArrayC<EnabledRouteC<T>>;\n\n/** the codec of an AI Integration */\nexport type AIIntegrationC<T extends t.Mixed> = t.TypeC<{\n /** the routes enabled in the AI integration */\n enabledRoutes: EnabledRoutesC<T>;\n}>;\n\nexport const OpenAIEnabledRoute = buildEnabledRouteType({\n TRouteName: valuesOf(OpenAIRouteName),\n});\n\n/** Type override */\nexport type OpenAIEnabledRoute = t.TypeOf<typeof OpenAIEnabledRoute>;\n\nconst OpenAIRouteNameC = valuesOf(OpenAIRouteName);\n\n/** The enabled routes for OpenAI */\nexport const OpenAIEnabledRoutes: EnabledRoutesC<typeof OpenAIRouteNameC> =\n t.array(OpenAIEnabledRoute);\n\n/** Type override */\nexport type OpenAIEnabledRoutes = t.TypeOf<typeof OpenAIEnabledRoutes>;\n\nexport const OpenAIIntegration = buildAIIntegrationType<\n typeof OpenAIRouteNameC,\n EnabledRoutesC<typeof OpenAIRouteNameC>\n>({\n TEnabledRoutes: OpenAIEnabledRoutes,\n});\n\n/** Type override */\nexport type OpenAIIntegration = t.TypeOf<typeof OpenAIIntegration>;\n\nexport const PathfinderPolicy = t.partial({\n enabledIntegrations: t.partial({\n openAI: OpenAIIntegration,\n }),\n});\n\n/** Type override */\nexport type PathfinderPolicy = t.TypeOf<typeof PathfinderPolicy>;\n\n/**\n * Interface of metadata that can be passed for logging purposes\n * via the Transcend Pathfinder\n */\nexport const PathfinderPromptRunMetadata = t.partial({\n /** Unique name for the current prompt run */\n promptRunName: t.string,\n /** ID of the Transcend prompt being reported */\n promptId: t.string,\n /** Title of the prompt being reported on */\n promptTitle: t.string,\n /** The ID of the prompt group being reported */\n promptGroupId: t.string,\n /** The title of the prompt group being reported */\n promptGroupTitle: t.string,\n /** Employee email that is executing the request */\n runByEmployeeEmail: t.string,\n /** ID of the application calling pathfinder */\n applicationId: t.string,\n /** Name of the application calling pathfinder */\n applicationName: t.string,\n /** Name of the code package calling pathfinder */\n codePackageName: t.string,\n /** Name of the repository calling pathfinder */\n repositoryName: t.string,\n /** Core identifier of the application user being reported on */\n applicationUserCoreIdentifier: t.string,\n /** Name of the application user being reported on */\n applicationUserName: t.string,\n /** Slack message ts that is in context of the API call */\n slackMessageTs: t.string,\n /** Slack team ID in context of the API call */\n slackTeamId: t.string,\n /** Slack channel ID in context of the API call */\n slackChannelId: t.string,\n /** Slack channel name in context of the API call */\n slackChannelName: t.string,\n});\n\n/** Type override */\nexport type PathfinderPromptRunMetadata = t.TypeOf<\n typeof PathfinderPromptRunMetadata\n>;\n\n/** The columns of a row of a OneTrust Assessment form to import into Transcend. */\nconst OneTrustAssessmentColumnInput = t.intersection([\n t.type({\n /** The title of the column */\n title: t.string,\n }),\n t.partial({\n /** The optional value of the column */\n value: t.string,\n }),\n]);\n\n/** A row with information of the OneTrust assessment form to import into Transcend */\nconst OneTrustAssessmentRowInput = t.type({\n /** A list of columns within this row. */\n columns: t.array(OneTrustAssessmentColumnInput),\n});\n\n/** Input for importing multiple OneTrust assessment forms into Transcend */\nexport const ImportOnetrustAssessmentsInput = t.partial({\n /** 'The rows of the CSV file.' */\n rows: t.array(OneTrustAssessmentRowInput),\n /** 'The json record representing the assessment.' */\n json: t.string,\n});\n/** Type override */\nexport type ImportOnetrustAssessmentsInput = t.TypeOf<\n typeof ImportOnetrustAssessmentsInput\n>;\n"]}
@@ -1,12 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkFE6CECEScjs = require('./chunk-FE6CECES.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkUBVZKE7Vcjs = require('./chunk-UBVZKE7V.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _bluebird = require('bluebird');var _cliprogress = require('cli-progress'); var _cliprogress2 = _interopRequireDefault(_cliprogress);var _persistedstate = require('@transcend-io/persisted-state');var _iots = require('io-ts'); var G = _interopRequireWildcard(_iots); var x = _interopRequireWildcard(_iots); var n = _interopRequireWildcard(_iots);var _typeutils = require('@transcend-io/type-utils');var He=["ENOTFOUND","ECONNRESET","ETIMEDOUT","502 Bad Gateway","504 Gateway Time-out","Task timed out after"];async function D(p,{maxAttempts:t=3,baseDelayMs:f=250,isRetryable:u=(d,a)=>He.some(o=>a.includes(o)),onRetry:c}={}){let d=0;for(;;){d+=1;try{return await p()}catch(a){let o=_nullishCoalesce((a&&(_optionalChain([a, 'access', _2 => _2.response, 'optionalAccess', _3 => _3.body])||a.message)), () => (String(_nullishCoalesce(a, () => ("Unknown error")))));if(!(d<t&&u(a,o)))throw new Error(`Preference query failed after ${d} attempt(s): ${o}`);_optionalChain([c, 'optionalCall', _4 => _4(d,a,o)]);let r=f*2**(d-1),s=Math.floor(Math.random()*f),e=r+s;_chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`[retry] attempt ${d}/${t-1}; backing off ${e}ms: ${o}`)),await _chunkFE6CECEScjs.Xf.call(void 0, e)}}}var _privacytypes = require('@transcend-io/privacy-types');var V=x.intersection([x.type({nodes:x.array(_privacytypes.PreferenceQueryResponseItem)}),x.partial({cursor:x.string})]);async function Me(p,{identifiers:t,partitionKey:f,skipLogging:u=!1,concurrency:c=40}){let d=[],a=_chunkUBVZKE7Vcjs.b.call(void 0, t,100),o=new Date().getTime(),i=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic);u||i.start(t.length,0);let r=0;await _bluebird.map.call(void 0, a,async l=>{let y=await D(()=>p.post(`v1/preferences/${f}/query`,{json:{filter:{identifiers:l},limit:l.length}}).json(),{onRetry:(h,C,w)=>{_chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`[RETRY] group size=${l.length} partition=${f} attempt=${h}: ${w}`))}}),g=_typeutils.decodeCodec.call(void 0, V,y);d.push(...g.nodes),r+=l.length,i.update(r)},{concurrency:c}),i.stop();let e=new Date().getTime()-o;return u||_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Completed download in "${e/1e3}" seconds.`)),d}function H({row:p,columnToPurposeName:t,purposeSlugs:f,preferenceTopics:u}){let c={};return Object.entries(t).forEach(([d,{purpose:a,preference:o,valueMapping:i}])=>{if(!f.includes(a))throw new Error(`Invalid purpose slug: ${a}, expected: ${f.join(", ")}`);let r=p[d];if(o){let s=u.find(e=>e.slug===o&&e.purpose.trackingType===a);if(!s){let e=u.filter(l=>l.purpose.trackingType===a).map(l=>l.slug);throw new Error(`Invalid preference slug: ${o} for purpose: ${a}. Allowed preference slugs for purpose are: ${e.join(",")}`)}switch(c[a]||(c[a]={preferences:[]}),c[a].preferences||(c[a].preferences=[]),s.type){case _privacytypes.PreferenceTopicType.Boolean:{let e=i[r];if(e===void 0&&r!=="")throw new Error(`No preference mapping found for value "${r}" in column "${d}" (purpose=${a}, preference=${o})`);if(e==null)return;if(typeof e!="boolean")throw new Error(`Invalid value for boolean preference: ${o}, expected boolean, got: ${r}`);c[a].preferences.push({topic:o,choice:{booleanValue:e}});break}case _privacytypes.PreferenceTopicType.Select:{let e=i[r];if(e===void 0&&r!=="")throw new Error(`No preference mapping found for value "${r}" in column "${d}" (purpose=${a}, preference=${o})`);if(e==null)return;if(typeof e!="string")throw new Error(`Invalid value for select preference: ${o}, expected string, got: ${r}`);let l=e.trim()||null;if(l&&!s.preferenceOptionValues.map(({slug:y})=>y).includes(l))throw new Error(`Invalid value for select preference: ${o}, expected one of: ${s.preferenceOptionValues.map(({slug:y})=>y).join(", ")}, got: ${r}`);c[a].preferences.push({topic:o,choice:{selectValue:l}});break}case _privacytypes.PreferenceTopicType.MultiSelect:{if(typeof r!="string")throw new Error(`Invalid value for multi select preference: ${o}, expected string, got: ${r}`);let e=_chunkFE6CECEScjs.oc.call(void 0, r).map(l=>{let y=i[l];if(y===void 0&&r!=="")throw new Error(`No preference mapping found for multi select token "${r}" in column "${d}" (purpose=${a}, preference=${o})`);if(y==null)return null;if(typeof y!="string")throw new Error(`Invalid value for multi select preference: ${o}, expected one of: ${s.preferenceOptionValues.map(({slug:g})=>g).join(", ")}, got: ${l}`);return y}).filter(l=>l!==null).sort((l,y)=>l.localeCompare(y));e.length>0&&c[a].preferences.push({topic:o,choice:{selectValues:e}});break}default:throw new Error(`Unknown preference type: ${s.type}`)}}else{let s=i[r];if(s===void 0&&r!=="")throw new Error(`No preference mapping found for value "${r}" in column "${d}" (purpose=${a}, preference=\u2205)`);if(s===null)return;c[a]?c[a].enabled=s===!0:c[a]={enabled:s===!0}}}),_typeutils.apply.call(void 0, c,(d,a)=>{if(typeof d.enabled!="boolean")throw new Error(`No mapping provided for purpose.enabled=true/false value: ${a}`);return{...d,enabled:d.enabled}})}var _inquirer = require('inquirer'); var _inquirer2 = _interopRequireDefault(_inquirer);var Y="[NONE]";async function xe(p,t){let f=_chunkUBVZKE7Vcjs.j.call(void 0, p.map(c=>Object.keys(c)).flat()),u=_chunkUBVZKE7Vcjs.c.call(void 0, f,[...t.identifierColumn?[t.identifierColumn]:[],...Object.keys(t.columnToPurposeName)]);if(!t.timestampColum){let{timestampName:c}=await _inquirer2.default.prompt([{name:"timestampName",message:"Choose the column that will be used as the timestamp of last preference update",type:"list",default:u.find(d=>d.toLowerCase().includes("date"))||u.find(d=>d.toLowerCase().includes("time"))||u[0],choices:[...u,Y]}]);t.timestampColum=c}if(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Using timestamp column "${t.timestampColum}"`)),t.timestampColum!==Y){let c=p.map((d,a)=>d[t.timestampColum]?null:[a]).filter(d=>!!d).flat();if(c.length>0)throw new Error(`The timestamp column "${t.timestampColum}" is missing a value for the following rows: ${c.join(`
2
- `)}`);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`The timestamp column "${t.timestampColum}" is present for all row`))}return t}async function Ie(p,t){let f=_chunkUBVZKE7Vcjs.j.call(void 0, p.map(o=>Object.keys(o)).flat()),u=_chunkUBVZKE7Vcjs.c.call(void 0, f,[...t.identifierColumn?[t.identifierColumn]:[],...Object.keys(t.columnToPurposeName)]);if(!t.identifierColumn){let{identifierName:o}=await _inquirer2.default.prompt([{name:"identifierName",message:"Choose the column that will be used as the identifier to upload consent preferences by",type:"list",default:u.find(i=>i.toLowerCase().includes("email"))||u[0],choices:u}]);t.identifierColumn=o}_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Using identifier column "${t.identifierColumn}"`));let c=p.map((o,i)=>o[t.identifierColumn]?null:[i]).filter(o=>!!o).flat();if(c.length>0){let o=`The identifier column "${t.identifierColumn}" is missing a value for the following rows: ${c.join(", ")}`;if(_chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(o)),!await _chunkFE6CECEScjs.Rf.call(void 0, {message:"Would you like to skip rows missing an identifier?"}))throw new Error(o);let r=p.length;p=p.filter(s=>s[t.identifierColumn]),_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`Skipped ${r-p.length} rows missing an identifier`))}_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`The identifier column "${t.identifierColumn}" is present for all rows`));let d=_chunkUBVZKE7Vcjs.d.call(void 0, p,t.identifierColumn),a=Object.entries(d).filter(([,o])=>o.length>1);if(a.length>0){let o=`The identifier column "${t.identifierColumn}" has duplicate values for the following rows: ${a.slice(0,10).map(([r,s])=>`${r} (${s.length})`).join(`
3
- `)}`;if(_chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(o)),!await _chunkFE6CECEScjs.Rf.call(void 0, {message:"Would you like to automatically take the latest update?"}))throw new Error(o);p=Object.entries(d).map(([,r])=>r.sort((e,l)=>new Date(l[t.timestampColum]).getTime()-new Date(e[t.timestampColum]).getTime())[0]).filter(r=>r)}return{currentState:t,preferences:p}}async function Re(p,t,{purposeSlugs:f,preferenceTopics:u,forceTriggerWorkflows:c}){let d=_chunkUBVZKE7Vcjs.j.call(void 0, p.map(i=>Object.keys(i)).flat()),a=_chunkUBVZKE7Vcjs.c.call(void 0, d,[...t.identifierColumn?[t.identifierColumn]:[],...t.timestampColum?[t.timestampColum]:[]]);if(a.length===0){if(c)return t;throw new Error("No other columns to process")}let o=[...f,...u.map(i=>`${i.purpose.trackingType}->${i.slug}`)];return await _bluebird.mapSeries.call(void 0, a,async i=>{let r=_chunkUBVZKE7Vcjs.j.call(void 0, p.map(e=>e[i])),s=t.columnToPurposeName[i];if(s)_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Column "${i}" is associated with purpose "${s.purpose}"`));else{let{purposeName:e}=await _inquirer2.default.prompt([{name:"purposeName",message:`Choose the purpose that column ${i} is associated with`,type:"list",default:o.find(g=>g.startsWith(f[0])),choices:o}]),[l,y]=e.split("->");s={purpose:l,preference:y||null,valueMapping:{}}}await _bluebird.mapSeries.call(void 0, r,async e=>{if(s.valueMapping[e]!==void 0){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Value "${e}" is associated with purpose value "${s.valueMapping[e]}"`));return}if(s.preference===null){let{purposeValue:l}=await _inquirer2.default.prompt([{name:"purposeValue",message:`Choose the purpose value for value "${e}" associated with purpose "${s.purpose}"`,type:"confirm",default:e!=="false"}]);s.valueMapping[e]=l}if(s.preference!==null){let l=u.find(g=>g.slug===s.preference);if(!l){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Preference topic "${s.preference}" not found`));return}let y=l.preferenceOptionValues.map(({slug:g})=>g);if(l.type===_privacytypes.PreferenceTopicType.Boolean){let{preferenceValue:g}=await _inquirer2.default.prompt([{name:"preferenceValue",message:`Choose the preference value for "${l.slug}" value "${e}" associated with purpose "${s.purpose}"`,type:"confirm",default:e!=="false"}]);s.valueMapping[e]=g;return}if(l.type===_privacytypes.PreferenceTopicType.Select){let{preferenceValue:g}=await _inquirer2.default.prompt([{name:"preferenceValue",message:`Choose the preference value for "${l.slug}" value "${e}" associated with purpose "${s.purpose}"`,type:"list",choices:y,default:y.find(h=>h===e)}]);s.valueMapping[e]=g;return}if(l.type===_privacytypes.PreferenceTopicType.MultiSelect){let g=_chunkFE6CECEScjs.oc.call(void 0, e);await _bluebird.mapSeries.call(void 0, g,async h=>{if(s.valueMapping[h]!==void 0)return;let{preferenceValue:C}=await _inquirer2.default.prompt([{name:"preferenceValue",message:`Choose the preference value for "${l.slug}" value "${h}" associated with purpose "${s.purpose}"`,type:"list",choices:y,default:y.find(w=>w===h)}]);s.valueMapping[h]=C});return}throw new Error(`Unknown preference topic type: ${l.type}`)}}),t.columnToPurposeName[i]=s}),t}function Fe({currentConsentRecord:p,pendingUpdates:t,preferenceTopics:f}){return Object.entries(t).every(([u,{preferences:c=[],enabled:d}])=>{let a=p.purposes.find(i=>i.purpose===u);return!!a&&a.enabled===d?c.every(({topic:i,choice:r})=>a.preferences&&a.preferences.find(s=>{if(s.topic!==i)return!1;let e=f.find(l=>l.slug===i&&l.purpose.trackingType===u);if(!e)throw new Error(`Could not find preference topic for ${i}`);switch(e.type){case _privacytypes.PreferenceTopicType.Boolean:return s.choice.booleanValue===r.booleanValue;case _privacytypes.PreferenceTopicType.Select:return s.choice.selectValue===r.selectValue;case _privacytypes.PreferenceTopicType.MultiSelect:let l=(s.choice.selectValues||[]).sort(),y=(r.selectValues||[]).sort();return l.length===y.length&&l.every((g,h)=>g===y[h]);default:throw new Error(`Unknown preference topic type: ${e.type}`)}})):!1})}function Oe({currentConsentRecord:p,pendingUpdates:t,preferenceTopics:f,log:u}){return!!Object.entries(t).find(([c,{preferences:d=[],enabled:a}])=>{let o=p.purposes.find(i=>i.purpose===c);return o?o.enabled!==a?(u&&_chunkZUNVPK23cjs.a.warn(`Purpose ${c} enabled value conflict for user ${p.userId}. Pending Value: ${a}, Current Value: ${o.enabled}`),!0):!!d.find(({topic:i,choice:r})=>{let s=(o.preferences||[]).find(g=>g.topic===i);if(!s)return u&&_chunkZUNVPK23cjs.a.warn(`No existing preference found for topic ${i} in purpose ${c} for user ${p.userId}.`),!1;let e=f.find(g=>g.slug===i&&g.purpose.trackingType===c);if(!e)throw new Error(`Could not find preference topic for ${i}`);let l,y;switch(e.type){case _privacytypes.PreferenceTopicType.Boolean:return l=s.choice.booleanValue!==r.booleanValue,u&&_chunkZUNVPK23cjs.a.warn(`Preference topic ${i} boolean value conflict for user ${p.userId}. Expected: ${r.booleanValue}, Found: ${s.choice.booleanValue}`),l;case _privacytypes.PreferenceTopicType.Select:return y=s.choice.selectValue!==r.selectValue,u&&_chunkZUNVPK23cjs.a.warn(`Preference topic ${i} select value conflict for user ${p.userId}. Expected: ${r.selectValue}, Found: ${s.choice.selectValue}`),y;case _privacytypes.PreferenceTopicType.MultiSelect:let g=(s.choice.selectValues||[]).sort(),h=(r.selectValues||[]).sort();return y=g.length!==h.length||!g.every((C,w)=>C===h[w]),u&&_chunkZUNVPK23cjs.a.warn(`Preference topic ${i} multi-select value conflict for user ${p.userId}. Expected: ${h.join(", ")}, Found: ${g.join(", ")}`),y;default:throw new Error(`Unknown preference topic type: ${e.type}`)}}):(u&&_chunkZUNVPK23cjs.a.warn(`No existing purpose found for ${c} in consent record for ${p.userId}.`),!1)})}async function Ue({file:p,sombra:t,purposeSlugs:f,preferenceTopics:u,partitionKey:c,skipExistingRecordCheck:d,forceTriggerWorkflows:a},o){let i=new Date().getTime(),r=o.getValue("fileMetadata");_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Reading in file: "${p}"`));let s=_chunkFE6CECEScjs.rc.call(void 0, p,G.record(G.string,G.string)),e={columnToPurposeName:{},pendingSafeUpdates:{},pendingConflictUpdates:{},skippedUpdates:{},...r[p]||{},lastFetchedAt:new Date().toISOString()};e=await xe(s,e),r[p]=e,await o.setValue(r,"fileMetadata");let l=await Ie(s,e);e=l.currentState,s=l.preferences,r[p]=e,await o.setValue(r,"fileMetadata"),e=await Re(s,e,{preferenceTopics:u,purposeSlugs:f,forceTriggerWorkflows:a}),r[p]=e,await o.setValue(r,"fileMetadata");let y=s.map(w=>w[e.identifierColumn]),g=d?[]:await Me(t,{identifiers:y.map(w=>({value:w})),partitionKey:c}),h=_chunkUBVZKE7Vcjs.e.call(void 0, g,"userId");e.pendingConflictUpdates={},e.pendingSafeUpdates={},e.skippedUpdates={},s.forEach(w=>{let P=w[e.identifierColumn],b=H({row:w,columnToPurposeName:e.columnToPurposeName,preferenceTopics:u,purposeSlugs:f}),S=h[P];if(a&&!S)throw new Error(`No existing consent record found for user with id: ${P}.
4
- When 'forceTriggerWorkflows' is set all the user identifiers should contain a consent record`);if(S&&Fe({currentConsentRecord:S,pendingUpdates:b,preferenceTopics:u})&&!a){e.skippedUpdates[P]=w;return}if(S&&Oe({currentConsentRecord:S,pendingUpdates:b,preferenceTopics:u})){e.pendingConflictUpdates[P]={row:w,record:S};return}e.pendingSafeUpdates[P]=w}),r[p]=e,await o.setValue(r,"fileMetadata");let C=new Date().getTime();_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully pre-processed file: "${p}" in ${(C-i)/1e3}s`))}var Ve=n.type({purpose:n.string,preference:n.union([n.string,n.null]),valueMapping:n.record(n.string,n.union([n.string,n.boolean,n.null,n.undefined]))}),$r=n.record(n.string,Ve),tt=n.type({name:n.string,isUniqueOnPreferenceStore:n.boolean}),br=n.record(n.string,tt),rt=n.intersection([n.type({columnToPurposeName:n.record(n.string,Ve),lastFetchedAt:n.string,pendingSafeUpdates:n.record(n.string,n.record(n.string,n.string)),pendingConflictUpdates:n.record(n.string,n.type({record:_privacytypes.PreferenceQueryResponseItem,row:n.record(n.string,n.string)})),skippedUpdates:n.record(n.string,n.record(n.string,n.string))}),n.partial({identifierColumn:n.string,timestampColum:n.string})]),Cr=n.record(n.string,n.union([n.boolean,_privacytypes.PreferenceUpdateItem])),Tr=n.record(n.string,n.union([n.boolean,n.record(n.string,n.string)])),Sr=n.record(n.string,n.type({uploadedAt:n.string,error:n.string,update:_privacytypes.PreferenceUpdateItem})),Mr=n.record(n.string,n.type({record:_privacytypes.PreferenceQueryResponseItem,row:n.record(n.string,n.string)})),kr=n.record(n.string,n.record(n.string,n.string)),Ee=n.type({fileMetadata:n.record(n.string,rt),failingUpdates:n.record(n.string,n.type({uploadedAt:n.string,error:n.string,update:_privacytypes.PreferenceUpdateItem})),pendingUpdates:n.record(n.string,_privacytypes.PreferenceUpdateItem)});async function qr({auth:p,sombraAuth:t,receiptFilepath:f,file:u,partition:c,isSilent:d=!0,dryRun:a=!1,skipWorkflowTriggers:o=!1,skipConflictUpdates:i=!1,skipExistingRecordCheck:r=!1,attributes:s=[],transcendUrl:e,forceTriggerWorkflows:l=!1}){let y=_chunkFE6CECEScjs.qc.call(void 0, s),g=new (0, _persistedstate.PersistedState)(f,Ee,{fileMetadata:{},failingUpdates:{},pendingUpdates:{}}),h=g.getValue("failingUpdates"),C=g.getValue("pendingUpdates"),w=g.getValue("fileMetadata");_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Restored cache, there are:
5
- ${Object.values(h).length} failing requests to be retried
6
- ${Object.values(C).length} pending requests to be processed
7
- The following files are stored in cache and will be used:
8
- ${Object.keys(w).map(M=>M).join(`
9
- `)}
10
- The following file will be processed: ${u}
11
- `));let P=_chunkFE6CECEScjs.wc.call(void 0, e,p),[b,S,pe]=await Promise.all([_chunkFE6CECEScjs.xc.call(void 0, e,p,t),l?Promise.resolve([]):_chunkFE6CECEScjs.fd.call(void 0, P),l?Promise.resolve([]):_chunkFE6CECEScjs.bd.call(void 0, P)]);await Ue({file:u,purposeSlugs:S.map(M=>M.trackingType),preferenceTopics:pe,sombra:b,partitionKey:c,skipExistingRecordCheck:r,forceTriggerWorkflows:l},g);let Q={};w=g.getValue("fileMetadata");let F=w[u];if(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Found ${Object.entries(F.pendingSafeUpdates).length} safe updates in ${u}`)),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Found ${Object.entries(F.pendingConflictUpdates).length} conflict updates in ${u}`)),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Found ${Object.entries(F.skippedUpdates).length} skipped updates in ${u}`)),Object.entries({...F.pendingSafeUpdates,...i?{}:_typeutils.apply.call(void 0, F.pendingConflictUpdates,({row:M})=>M)}).forEach(([M,k])=>{let L=F.timestampColum===Y?new Date:new Date(k[F.timestampColum]),O=H({row:k,columnToPurposeName:F.columnToPurposeName,preferenceTopics:pe,purposeSlugs:S.map(N=>N.trackingType)});Q[M]={userId:M,partition:c,timestamp:L.toISOString(),purposes:Object.entries(O).map(([N,We])=>({...We,purpose:N,workflowSettings:{attributes:y,isSilent:d,skipWorkflowTrigger:o}}))}}),await g.setValue(Q,"pendingUpdates"),await g.setValue({},"failingUpdates"),a){_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Dry run complete, exiting. ${Object.values(Q).length} pending updates. Check file: ${f}`));return}_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Uploading ${Object.values(Q).length} preferences to partition: ${c}`));let qe=new Date().getTime(),Z=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),fe=0,ee=Object.entries(Q),_e=_chunkUBVZKE7Vcjs.b.call(void 0, ee,o?100:10);Z.start(ee.length,0),await _bluebird.map.call(void 0, _e,async M=>{try{await b.put("v1/preferences",{json:{records:M.map(([,k])=>k),skipWorkflowTriggers:o,forceTriggerWorkflows:l}}).json()}catch(k){try{let O=JSON.parse(_optionalChain([k, 'optionalAccess', _5 => _5.response, 'optionalAccess', _6 => _6.body])||"{}");O.error&&_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Error: ${O.error}`))}catch (e2){}_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to upload ${M.length} user preferences to partition ${c}: ${_optionalChain([k, 'optionalAccess', _7 => _7.response, 'optionalAccess', _8 => _8.body])||_optionalChain([k, 'optionalAccess', _9 => _9.message])}`));let L=g.getValue("failingUpdates");M.forEach(([O,N])=>{L[O]={uploadedAt:new Date().toISOString(),update:N,error:_optionalChain([k, 'optionalAccess', _10 => _10.response, 'optionalAccess', _11 => _11.body])||_optionalChain([k, 'optionalAccess', _12 => _12.message])||"Unknown error"}}),await g.setValue(L,"failingUpdates")}fe+=M.length,Z.update(fe)},{concurrency:40}),Z.stop();let Le=new Date().getTime()-qe;_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully uploaded ${ee.length} user preferences to partition ${c} in "${Le/1e3}" seconds!`))}function Lr({identifiers:p=[],purposes:t=[],metadata:f=[],consentManagement:u={},system:c={decryptionStatus:"DECRYPTED"},...d}){let a={...d,...c,...u};if(Array.isArray(p)){let o=new Map;for(let{name:i,value:r}of p)o.has(i)||o.set(i,new Set),r&&o.get(i).add(r);for(let[i,r]of o.entries())a[i]=Array.from(r).join(",")}if(Array.isArray(f)&&(a.metadata=JSON.stringify(f.reduce((o,{key:i,value:r})=>(o[i]=r,o),{}))),Array.isArray(t)){for(let{purpose:o,preferences:i,enabled:r}of t)if(a[o]=!!r,Array.isArray(i))for(let{topic:s,choice:e}of i){let l=`${o}_${s}`,y=null;typeof e.booleanValue=="boolean"?y=e.booleanValue:e.selectValue?y=e.selectValue:Array.isArray(e.selectValues)?y=e.selectValues.filter(h=>h.length>0).join(","):y=null,a[l]=y}}return a}async function*K(p,t,f,u){let c;for(;;){let d={limit:u};f&&Object.keys(f).length&&(d.filter=f),c&&(d.cursor=c);let a=await D(()=>p.post(`v1/preferences/${t}/query`,{json:d}).json(),{onRetry:(r,s,e)=>{_chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`Retry attempt ${r} for fetchConsentPreferences due to error: ${e}`))}}),{nodes:o,cursor:i}=_typeutils.decodeCodec.call(void 0, V,a);if(!_optionalChain([o, 'optionalAccess', _13 => _13.length])||(yield o,!i))break;c=i}}function X(p){return!!p.timestampAfter||!!p.timestampBefore?"timestamp":"updated"}function E(p,t){return p==="timestamp"?new Date(t.timestamp):_optionalChain([t, 'access', _14 => _14.system, 'optionalAccess', _15 => _15.updatedAt])?new Date(t.system.updatedAt):new Date}function Qe(p,t){if(p==="timestamp")return{after:t.timestampAfter?new Date(t.timestampAfter):void 0,before:t.timestampBefore?new Date(t.timestampBefore):void 0};let f=_nullishCoalesce(t.system, () => ({}));return{after:f.updatedAfter?new Date(f.updatedAfter):void 0,before:f.updatedBefore?new Date(f.updatedBefore):void 0}}function q(p,t,f){return p==="timestamp"?{...t,timestampBefore:_nullishCoalesce(f, () => (t.timestampBefore))}:{...t,system:{...t.system||{},...f?{updatedBefore:f}:{}},timestampAfter:void 0,timestampBefore:void 0}}async function _(p,t,f){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Single-record probe with filter: ${JSON.stringify(f)}`));let c=await K(p,t,f,1).next();if(c.done||!c.value||c.value.length===0)return _chunkZUNVPK23cjs.a.info(_colors2.default.yellow("Probe result: no record")),null;let d=c.value[0];return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Probe result: found record at ${E(X(f),d).toISOString()}`)),d}async function Ne(p,t){let{partition:f,mode:u,baseFilter:c,maxLookbackDays:d=3650}=t,a=await _(p,f,q(u,c));if(!a)return _chunkZUNVPK23cjs.a.info(_colors2.default.yellow("No records found; defaulting earliest day to today.")),_chunkFE6CECEScjs.gg.call(void 0, new Date);let o=E(u,a);_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Newest instant: ${o.toISOString()}`));let i=[1,7,30],r=0,s=i[0]*864e5,e=o,l=null;for(;;){let w=r<i.length?new Date(o.getTime()-i[r]*864e5):new Date(o.getTime()-s);if((_chunkFE6CECEScjs.gg.call(void 0, new Date).getTime()-_chunkFE6CECEScjs.gg.call(void 0, w).getTime())/864e5>d){_chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`Exponential jump exceeded maxLookbackDays=${d}. Using current bounds.`)),l=w;break}_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Probing before=${w.toISOString()} (jump step ${r<i.length?`${i[r]}d`:`${Math.round(s/864e5)}d`})\u2026`));let b=await _(p,f,q(u,c,w.toISOString()));if(b){e=E(u,b),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Found older record at ${e.toISOString()} \u2014 continue jumping back.`)),r<i.length-1?(r+=1,s=i[r]*864e5):r===i.length-1?(r+=1,s=i[i.length-1]*2*864e5):s*=2;continue}l=w,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`No record before ${w.toISOString()} \u2014 established empty lower bound.`));break}l||(l=new Date(e.getTime()-864e5));let y=l,g=e,h=Math.max(864e5,Math.floor((g.getTime()-y.getTime())/64));_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Exponential forward-from-empty start: empty=${y.toISOString()} found=${g.toISOString()} step=${Math.round(h/864e5)}d`));for(let w=0;w<8;w+=1){let P=new Date(y.getTime()+h);if(P.getTime()>=g.getTime())break;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Forward gallop probe before=${P.toISOString()}\u2026`));let b=await _(p,f,q(u,c,P.toISOString()));if(b?(g=E(u,b),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Gallop hit at ${g.toISOString()} \u2014 tightening found bound. Next step halves.`)),h=Math.max(864e5,Math.floor(h/2))):(y.setTime(P.getTime()),_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`Gallop miss \u2014 advancing empty bound to ${y.toISOString()}. Next step doubles.`)),h=Math.min(g.getTime()-y.getTime(),h*2),h<864e5&&(h=864e5)),g.getTime()-y.getTime()<=864e5)break}for(;g.getTime()-y.getTime()>864e5;){let w=new Date(y.getTime()+Math.floor((g.getTime()-y.getTime())/2));_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Binary probe before=${w.toISOString()}\u2026`));let P=await _(p,f,q(u,c,w.toISOString()));if(P){let b=E(u,P);_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Binary probe found record at ${b.toISOString()}.`)),g=b}else _chunkZUNVPK23cjs.a.info(_colors2.default.yellow("Binary probe found no record.")),y=w}let C=_chunkFE6CECEScjs.gg.call(void 0, g);return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Earliest day (UTC) resolved to ${C.toISOString()} (instant \u2248 ${g.toISOString()}).`)),C}async function je(p,t){let{partition:f,mode:u,baseFilter:c}=t;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Latest-day discovery: probing newest record\u2026"));let d=await _(p,f,q(u,c));if(!d)return _chunkZUNVPK23cjs.a.info(_colors2.default.yellow("No records found at all; defaulting latest day to today.")),_chunkFE6CECEScjs.gg.call(void 0, new Date);let a=E(u,d);_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Newest record instant is ${a.toISOString()}.`));let o=_chunkFE6CECEScjs.gg.call(void 0, a);return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Latest day (UTC) resolved to ${o.toISOString()} from instant ${a.toISOString()}.`)),o}function Be(p,t,f,u=1e3){let c=Math.max(0,f.getTime()-t.getTime());if(c===0)return[];let d=_chunkFE6CECEScjs.hg.call(void 0, t),a=Math.ceil(c/Math.max(1,u)),o=Math.max(36e5,a),i=Math.ceil((f.getTime()-d.getTime())/o),r=[];for(let s=0;s<i;s+=1){let e=d.getTime()+s*o,y=Math.min(f.getTime(),e+o)-1,g=Math.max(e,y),h=new Date(e).toISOString(),C=new Date(g).toISOString();p==="timestamp"?r.push({timestampAfter:h,timestampBefore:C}):r.push({system:{updatedAfter:h,updatedBefore:C}})}return r}function ft(p,t,f){return p==="timestamp"?{...t,timestampAfter:_nullishCoalesce(f.timestampAfter, () => (t.timestampAfter)),timestampBefore:_nullishCoalesce(f.timestampBefore, () => (t.timestampBefore)),system:void 0}:{...t,system:{...t.system||{},..._optionalChain([f, 'access', _16 => _16.system, 'optionalAccess', _17 => _17.updatedAfter])?{updatedAfter:f.system.updatedAfter}:{},..._optionalChain([f, 'access', _18 => _18.system, 'optionalAccess', _19 => _19.updatedBefore])?{updatedBefore:f.system.updatedBefore}:{}},timestampAfter:void 0,timestampBefore:void 0}}async function bo(p,{partition:t,filterBy:f={},limit:u=50,windowConcurrency:c=25,maxChunks:d=1e3,maxLookbackDays:a=3650,onItems:o}){let i=X(f);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Fetching consent preferences in chunks by ${i==="timestamp"?"timestamp":"system.updatedAt"}...`));let{after:r,before:s}=Qe(i,f);if(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Initial bounds: after=${_nullishCoalesce(_optionalChain([r, 'optionalAccess', _20 => _20.toISOString, 'call', _21 => _21()]), () => ("undefined"))} before=${_nullishCoalesce(_optionalChain([s, 'optionalAccess', _22 => _22.toISOString, 'call', _23 => _23()]), () => ("undefined"))}`)),(!r||!s)&&(r||(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Discovering earliest day with data for partition ${t}...`)),r=await Ne(p,{partition:t,mode:i,baseFilter:f,maxLookbackDays:a}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Discovered earliest day with data: ${r.toISOString()}`))),!s)){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Discovering latest day with data for partition ${t}...`));let P=await je(p,{partition:t,mode:i,baseFilter:f,earliest:r});s=_chunkFE6CECEScjs.jg.call(void 0, P,1),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Discovered latest day with data: ${P.toISOString()}`))}_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Final bounds (UTC): after=${r.toISOString()} before=${s.toISOString()}`));let e=Be(i,r,s,d);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Fetching consent preferences from partition ${t} in ${e.length} chunks...`));let l=new _cliprogress2.default.SingleBar({format:"Downloading [{bar}] {percentage}% | chunks {value}/{total} | fetched {fetched}"},_cliprogress2.default.Presets.shades_classic),y=0,g=0;l.start(e.length,0,{fetched:g});let h=Date.now(),C=_chunkFE6CECEScjs.fg.call(void 0, u),w=[];return await _bluebird.map.call(void 0, e.map((P,b)=>({windowFilter:P,idx:b})),async({windowFilter:P})=>{let b=ft(i,f,P);for await(let S of K(p,t,b,C))g+=S.length,l.update(y,{fetched:g}),o?await o(S):w.push(...S);y+=1,l.update(y,{fetched:g})},{concurrency:Math.max(1,c)}),l.update(y,{fetched:g}),l.stop(),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Fetched ${g} consent preference records from partition ${t} in ${(Date.now()-h)/1e3}s.`)),o?[]:w}async function Ro(p,{partition:t,filterBy:f={},limit:u=50,onItems:c}){let d=[],a,o=f&&(Object.keys(f).length>0||f.system&&Object.keys(f.system).length>0),i=Math.max(1,Math.min(50,_nullishCoalesce(u, () => (50))));for(;;){let r={limit:i};o&&(r.filter=f),a&&(r.cursor=a);let s=await D(()=>p.post(`v1/preferences/${t}/query`,{json:r}).json(),{onRetry:(y,g,h)=>{_chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`Retry attempt ${y} for fetchConsentPreferences due to error: ${h}`))}}),{nodes:e,cursor:l}=_typeutils.decodeCodec.call(void 0, V,s);if(!e||e.length===0||(c?await c(e):d.push(...e),!l))break;a=l}return c?[]:d}exports.a = qr; exports.b = Lr; exports.c = bo; exports.d = Ro;
12
- //# sourceMappingURL=chunk-CP42F62X.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/chunk-CP42F62X.cjs","../src/lib/preference-management/uploadPreferenceManagementPreferencesInteractive.ts","../src/lib/preference-management/parsePreferenceManagementCsv.ts","../src/lib/preference-management/getPreferencesForIdentifiers.ts","../src/lib/preference-management/withPreferenceQueryRetry.ts","../src/lib/preference-management/parsePreferenceIdentifiersFromCsv.ts","../src/lib/preference-management/parsePreferenceAndPurposeValuesFromCsv.ts","../src/lib/preference-management/codecs.ts"],"names":["RETRY_PREFERENCE_MSGS","withPreferenceQueryRetry","fn","maxAttempts","baseDelayMs","isRetryable","_err","msg","m","onRetry","attempt","err"],"mappings":"AAAA,2lCAAqK,wDAAyC,wDAAuE,gFCQlQ,oCACC,qGAGI,+DAEO,qJCXZ,qDCES,ICGfA,EAAAA,CAAkC,CAC7C,WAAA,CACA,YAAA,CACA,WAAA,CACA,iBAAA,CACA,sBAAA,CACA,sBACF,CAAA,CAwBA,MAAA,SAAsBC,CAAAA,CACpBC,CAAAA,CACA,CACE,WAAA,CAAAC,CAAAA,CAAc,CAAA,CACd,WAAA,CAAAC,CAAAA,CAAc,GAAA,CACd,WAAA,CAAAC,CAAAA,CAAc,CAACC,CAAAA,CAAMC,CAAAA,CAAAA,EACnBP,EAAAA,CAAsB,IAAA,CAAMQ,CAAAA,EAAMD,CAAAA,CAAI,QAAA,CAASC,CAAC,CAAC,CAAA,CACnD,OAAA,CAAAC,CACF,CAAA,CAAkB,CAAC,CAAA,CACP,CACZ,IAAIC,CAAAA,CAAU,CAAA,CAEd,GAAA,CAAA,CAAA,CAAA,CAAa,CACXA,CAAAA,EAAW,CAAA,CACX,GAAI,CACF,OAAO,MAAMR,CAAAA,CAAG,CAElB,CAAA,KAAA,CAASS,CAAAA,CAAU,CACjB,IAAMJ,CAAAA,kBAAAA,CACHI,CAAAA,EAAAA,iBAAQA,CAAAA,qBAAI,QAAA,6BAAU,MAAA,EAAQA,CAAAA,CAAI,OAAA,CAAA,CAAA,SACnC,MAAA,kBAAOA,CAAAA,SAAO,iBAAe,GAAA,CAE/B,EAAA,CAAI,CAAA,CADcD,CAAAA,CAAUP,CAAAA,EAAeE,CAAAA,CAAYM,CAAAA,CAAKJ,CAAG,CAAA,CAAA,CAE7D,MAAM,IAAI,KAAA,CACR,CAAA,8BAAA,EAAiCG,CAAO,CAAA,aAAA,EAAgBH,CAAG,CAAA,CAAA;AC4B3B;ACdvB;ACsBf,oGAAA;ANTI;AAGA;AAAA;AAKQ;AAAK;AACgC,sCAAA;AA0F3C","file":"/home/runner/work/cli/cli/dist/chunk-CP42F62X.cjs","sourcesContent":[null,"import {\n buildTranscendGraphQLClient,\n createSombraGotInstance,\n fetchAllPurposes,\n fetchAllPreferenceTopics,\n PreferenceTopic,\n Purpose,\n} from '../graphql';\nimport colors from 'colors';\nimport { map } from 'bluebird';\nimport { chunk } from 'lodash-es';\nimport { logger } from '../../logger';\nimport cliProgress from 'cli-progress';\nimport { parseAttributesFromString } from '../requests';\nimport { PersistedState } from '@transcend-io/persisted-state';\nimport { parsePreferenceManagementCsvWithCache } from './parsePreferenceManagementCsv';\nimport { PreferenceState } from './codecs';\nimport { PreferenceUpdateItem } from '@transcend-io/privacy-types';\nimport { apply } from '@transcend-io/type-utils';\nimport { NONE_PREFERENCE_MAP } from './parsePreferenceTimestampsFromCsv';\nimport { getPreferenceUpdatesFromRow } from './getPreferenceUpdatesFromRow';\n\n/**\n * Upload a set of consent preferences\n *\n * @param options - Options\n */\nexport async function uploadPreferenceManagementPreferencesInteractive({\n auth,\n sombraAuth,\n receiptFilepath,\n file,\n partition,\n isSilent = true,\n dryRun = false,\n skipWorkflowTriggers = false,\n skipConflictUpdates = false,\n skipExistingRecordCheck = false,\n attributes = [],\n transcendUrl,\n forceTriggerWorkflows = false,\n}: {\n /** The Transcend API key */\n auth: string;\n /** Sombra API key authentication */\n sombraAuth?: string;\n /** Partition key */\n partition: string;\n /** File where to store receipt and continue from where left off */\n receiptFilepath: string;\n /** The file to process */\n file: string;\n /** API URL for Transcend backend */\n transcendUrl: string;\n /** Whether to do a dry run */\n dryRun?: boolean;\n /** Whether to upload as isSilent */\n isSilent?: boolean;\n /** Attributes string pre-parse. In format Key:Value */\n attributes?: string[];\n /** Skip workflow triggers */\n skipWorkflowTriggers?: boolean;\n /**\n * When true, only update preferences that do not conflict with existing\n * preferences. When false, update all preferences in CSV based on timestamp.\n */\n skipConflictUpdates?: boolean;\n /** Whether to skip the check for existing records. SHOULD ONLY BE USED FOR INITIAL UPLOAD */\n skipExistingRecordCheck?: boolean;\n /** Whether to force trigger workflows */\n forceTriggerWorkflows?: boolean;\n}): Promise<void> {\n // Parse out the extra attributes to apply to all requests uploaded\n const parsedAttributes = parseAttributesFromString(attributes);\n\n // Create a new state file to store the requests from this run\n const preferenceState = new PersistedState(receiptFilepath, PreferenceState, {\n fileMetadata: {},\n failingUpdates: {},\n pendingUpdates: {},\n });\n const failingRequests = preferenceState.getValue('failingUpdates');\n const pendingRequests = preferenceState.getValue('pendingUpdates');\n let fileMetadata = preferenceState.getValue('fileMetadata');\n\n logger.info(\n colors.magenta(\n 'Restored cache, there are: \\n' +\n `${\n Object.values(failingRequests).length\n } failing requests to be retried\\n` +\n `${\n Object.values(pendingRequests).length\n } pending requests to be processed\\n` +\n `The following files are stored in cache and will be used:\\n${Object.keys(\n fileMetadata,\n )\n .map((x) => x)\n .join('\\n')}\\n` +\n `The following file will be processed: ${file}\\n`,\n ),\n );\n\n // Create GraphQL client to connect to Transcend backend\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n const [sombra, purposes, preferenceTopics] = await Promise.all([\n // Create sombra instance to communicate with\n createSombraGotInstance(transcendUrl, auth, sombraAuth),\n // get all purposes and topics\n forceTriggerWorkflows\n ? Promise.resolve([] as Purpose[])\n : fetchAllPurposes(client),\n forceTriggerWorkflows\n ? Promise.resolve([] as PreferenceTopic[])\n : fetchAllPreferenceTopics(client),\n ]);\n\n // Process the file\n await parsePreferenceManagementCsvWithCache(\n {\n file,\n purposeSlugs: purposes.map((x) => x.trackingType),\n preferenceTopics,\n sombra,\n partitionKey: partition,\n skipExistingRecordCheck,\n forceTriggerWorkflows,\n },\n preferenceState,\n );\n\n // Construct the pending updates\n const pendingUpdates: Record<string, PreferenceUpdateItem> = {};\n fileMetadata = preferenceState.getValue('fileMetadata');\n const metadata = fileMetadata[file];\n\n logger.info(\n colors.magenta(\n `Found ${\n Object.entries(metadata.pendingSafeUpdates).length\n } safe updates in ${file}`,\n ),\n );\n logger.info(\n colors.magenta(\n `Found ${\n Object.entries(metadata.pendingConflictUpdates).length\n } conflict updates in ${file}`,\n ),\n );\n logger.info(\n colors.magenta(\n `Found ${\n Object.entries(metadata.skippedUpdates).length\n } skipped updates in ${file}`,\n ),\n );\n\n // Update either safe updates only or safe + conflict\n Object.entries({\n ...metadata.pendingSafeUpdates,\n ...(skipConflictUpdates\n ? {}\n : apply(metadata.pendingConflictUpdates, ({ row }) => row)),\n }).forEach(([userId, update]) => {\n // Determine timestamp\n const timestamp =\n metadata.timestampColum === NONE_PREFERENCE_MAP\n ? new Date()\n : new Date(update[metadata.timestampColum!]);\n\n // Determine updates\n const updates = getPreferenceUpdatesFromRow({\n row: update,\n columnToPurposeName: metadata.columnToPurposeName,\n preferenceTopics,\n purposeSlugs: purposes.map((x) => x.trackingType),\n });\n pendingUpdates[userId] = {\n userId,\n partition,\n timestamp: timestamp.toISOString(),\n purposes: Object.entries(updates).map(([purpose, value]) => ({\n ...value,\n purpose,\n workflowSettings: {\n attributes: parsedAttributes,\n isSilent,\n skipWorkflowTrigger: skipWorkflowTriggers,\n },\n })),\n };\n });\n await preferenceState.setValue(pendingUpdates, 'pendingUpdates');\n await preferenceState.setValue({}, 'failingUpdates');\n\n // Exist early if dry run\n if (dryRun) {\n logger.info(\n colors.green(\n `Dry run complete, exiting. ${\n Object.values(pendingUpdates).length\n } pending updates. Check file: ${receiptFilepath}`,\n ),\n );\n return;\n }\n\n logger.info(\n colors.magenta(\n `Uploading ${\n Object.values(pendingUpdates).length\n } preferences to partition: ${partition}`,\n ),\n );\n\n // Time duration\n const t0 = new Date().getTime();\n\n // create a new progress bar instance and use shades_classic theme\n const progressBar = new cliProgress.SingleBar(\n {},\n cliProgress.Presets.shades_classic,\n );\n\n // Build a GraphQL client\n let total = 0;\n const updatesToRun = Object.entries(pendingUpdates);\n const chunkedUpdates = chunk(updatesToRun, skipWorkflowTriggers ? 100 : 10);\n progressBar.start(updatesToRun.length, 0);\n await map(\n chunkedUpdates,\n async (currentChunk) => {\n // Make the request\n try {\n await sombra\n .put('v1/preferences', {\n json: {\n records: currentChunk.map(([, update]) => update),\n skipWorkflowTriggers,\n forceTriggerWorkflows,\n },\n })\n .json();\n } catch (err) {\n try {\n const parsed = JSON.parse(err?.response?.body || '{}');\n if (parsed.error) {\n logger.error(colors.red(`Error: ${parsed.error}`));\n }\n } catch (e) {\n // continue\n }\n logger.error(\n colors.red(\n `Failed to upload ${\n currentChunk.length\n } user preferences to partition ${partition}: ${\n err?.response?.body || err?.message\n }`,\n ),\n );\n const failingUpdates = preferenceState.getValue('failingUpdates');\n currentChunk.forEach(([userId, update]) => {\n failingUpdates[userId] = {\n uploadedAt: new Date().toISOString(),\n update,\n error: err?.response?.body || err?.message || 'Unknown error',\n };\n });\n await preferenceState.setValue(failingUpdates, 'failingUpdates');\n }\n\n total += currentChunk.length;\n progressBar.update(total);\n },\n {\n concurrency: 40,\n },\n );\n\n progressBar.stop();\n const t1 = new Date().getTime();\n const totalTime = t1 - t0;\n logger.info(\n colors.green(\n `Successfully uploaded ${\n updatesToRun.length\n } user preferences to partition ${partition} in \"${\n totalTime / 1000\n }\" seconds!`,\n ),\n );\n}\n","import { PersistedState } from '@transcend-io/persisted-state';\nimport type { Got } from 'got';\nimport { keyBy } from 'lodash-es';\nimport * as t from 'io-ts';\nimport colors from 'colors';\nimport { FileMetadataState, PreferenceState } from './codecs';\nimport { logger } from '../../logger';\nimport { readCsv } from '../requests';\nimport { getPreferencesForIdentifiers } from './getPreferencesForIdentifiers';\nimport { PreferenceTopic } from '../graphql';\nimport { getPreferenceUpdatesFromRow } from './getPreferenceUpdatesFromRow';\nimport { parsePreferenceTimestampsFromCsv } from './parsePreferenceTimestampsFromCsv';\nimport { parsePreferenceIdentifiersFromCsv } from './parsePreferenceIdentifiersFromCsv';\nimport { parsePreferenceAndPurposeValuesFromCsv } from './parsePreferenceAndPurposeValuesFromCsv';\nimport { checkIfPendingPreferenceUpdatesAreNoOp } from './checkIfPendingPreferenceUpdatesAreNoOp';\nimport { checkIfPendingPreferenceUpdatesCauseConflict } from './checkIfPendingPreferenceUpdatesCauseConflict';\n\n/**\n * Parse a file into the cache\n *\n *\n * @param options - Options\n * @param cache - The cache to store the parsed file in\n * @returns The cache with the parsed file\n */\nexport async function parsePreferenceManagementCsvWithCache(\n {\n file,\n sombra,\n purposeSlugs,\n preferenceTopics,\n partitionKey,\n skipExistingRecordCheck,\n forceTriggerWorkflows,\n }: {\n /** File to parse */\n file: string;\n /** The purpose slugs that are allowed to be updated */\n purposeSlugs: string[];\n /** The preference topics */\n preferenceTopics: PreferenceTopic[];\n /** Sombra got instance */\n sombra: Got;\n /** Partition key */\n partitionKey: string;\n /** Whether to skip the check for existing records. SHOULD ONLY BE USED FOR INITIAL UPLOAD */\n skipExistingRecordCheck: boolean;\n /** Wheather to force workflow triggers */\n forceTriggerWorkflows: boolean;\n },\n cache: PersistedState<typeof PreferenceState>,\n): Promise<void> {\n // Start the timer\n const t0 = new Date().getTime();\n\n // Get the current metadata\n const fileMetadata = cache.getValue('fileMetadata');\n\n // Read in the file\n logger.info(colors.magenta(`Reading in file: \"${file}\"`));\n let preferences = readCsv(file, t.record(t.string, t.string));\n\n // start building the cache, can use previous cache as well\n let currentState: FileMetadataState = {\n columnToPurposeName: {},\n pendingSafeUpdates: {},\n pendingConflictUpdates: {},\n skippedUpdates: {},\n // Load in the last fetched time\n ...((fileMetadata[file] || {}) as Partial<FileMetadataState>),\n lastFetchedAt: new Date().toISOString(),\n };\n\n // Validate that all timestamps are present in the file\n currentState = await parsePreferenceTimestampsFromCsv(\n preferences,\n currentState,\n );\n fileMetadata[file] = currentState;\n await cache.setValue(fileMetadata, 'fileMetadata');\n\n // Validate that all identifiers are present and unique\n const result = await parsePreferenceIdentifiersFromCsv(\n preferences,\n currentState,\n );\n currentState = result.currentState;\n preferences = result.preferences;\n fileMetadata[file] = currentState;\n await cache.setValue(fileMetadata, 'fileMetadata');\n\n // Ensure all other columns are mapped to purpose and preference\n // slug values\n currentState = await parsePreferenceAndPurposeValuesFromCsv(\n preferences,\n currentState,\n {\n preferenceTopics,\n purposeSlugs,\n forceTriggerWorkflows,\n },\n );\n fileMetadata[file] = currentState;\n await cache.setValue(fileMetadata, 'fileMetadata');\n\n // Grab existing preference store records\n const identifiers = preferences.map(\n (pref) => pref[currentState.identifierColumn!],\n );\n const existingConsentRecords = skipExistingRecordCheck\n ? []\n : await getPreferencesForIdentifiers(sombra, {\n identifiers: identifiers.map((x) => ({ value: x })),\n partitionKey,\n });\n const consentRecordByIdentifier = keyBy(existingConsentRecords, 'userId');\n\n // Clear out previous updates\n currentState.pendingConflictUpdates = {};\n currentState.pendingSafeUpdates = {};\n currentState.skippedUpdates = {};\n\n // Process each row\n preferences.forEach((pref) => {\n // Grab unique Id for the user\n const userId = pref[currentState.identifierColumn!];\n\n // determine updates for user\n const pendingUpdates = getPreferenceUpdatesFromRow({\n row: pref,\n columnToPurposeName: currentState.columnToPurposeName,\n preferenceTopics,\n purposeSlugs,\n });\n\n // Grab current state of the update\n const currentConsentRecord = consentRecordByIdentifier[userId];\n if (forceTriggerWorkflows && !currentConsentRecord) {\n throw new Error(\n `No existing consent record found for user with id: ${userId}. \n When 'forceTriggerWorkflows' is set all the user identifiers should contain a consent record`,\n );\n }\n // Check if the update can be skipped\n // this is the case if a record exists, and the purpose\n // and preference values are all in sync\n if (\n currentConsentRecord &&\n checkIfPendingPreferenceUpdatesAreNoOp({\n currentConsentRecord,\n pendingUpdates,\n preferenceTopics,\n }) &&\n !forceTriggerWorkflows\n ) {\n currentState.skippedUpdates[userId] = pref;\n return;\n }\n\n // Determine if there are any conflicts\n if (\n currentConsentRecord &&\n checkIfPendingPreferenceUpdatesCauseConflict({\n currentConsentRecord,\n pendingUpdates,\n preferenceTopics,\n })\n ) {\n currentState.pendingConflictUpdates[userId] = {\n row: pref,\n record: currentConsentRecord,\n };\n return;\n }\n\n // Add to pending updates\n currentState.pendingSafeUpdates[userId] = pref;\n });\n\n // Read in the file\n fileMetadata[file] = currentState;\n await cache.setValue(fileMetadata, 'fileMetadata');\n const t1 = new Date().getTime();\n logger.info(\n colors.green(\n `Successfully pre-processed file: \"${file}\" in ${(t1 - t0) / 1000}s`,\n ),\n );\n}\n","import { PreferenceQueryResponseItem } from '@transcend-io/privacy-types';\nimport type { Got } from 'got';\nimport colors from 'colors';\nimport cliProgress from 'cli-progress';\nimport { chunk } from 'lodash-es';\nimport { decodeCodec } from '@transcend-io/type-utils';\nimport { map } from 'bluebird';\nimport { logger } from '../../logger';\nimport { withPreferenceQueryRetry } from './withPreferenceQueryRetry';\nimport { ConsentPreferenceResponse } from './types';\n\n/**\n * Grab the current consent preference values for a list of identifiers\n *\n * @param sombra - Backend to make API call to\n * @param options - Options\n * @returns Plaintext context information\n */\nexport async function getPreferencesForIdentifiers(\n sombra: Got,\n {\n identifiers,\n partitionKey,\n skipLogging = false,\n concurrency = 40,\n }: {\n /** The list of identifiers to look up */\n identifiers: {\n /** The value of the identifier */\n value: string;\n }[];\n /** The partition key to look up */\n partitionKey: string;\n /** Whether to skip logging */\n skipLogging?: boolean;\n /** Concurrency for requests (default 40) */\n concurrency?: number;\n },\n): Promise<PreferenceQueryResponseItem[]> {\n const results: PreferenceQueryResponseItem[] = [];\n const groupedIdentifiers = chunk(identifiers, 100);\n\n // create a new progress bar instance and use shades_classic theme\n const t0 = new Date().getTime();\n const progressBar = new cliProgress.SingleBar(\n {},\n cliProgress.Presets.shades_classic,\n );\n if (!skipLogging) {\n progressBar.start(identifiers.length, 0);\n }\n\n let total = 0;\n await map(\n groupedIdentifiers,\n async (group) => {\n const rawResult = await withPreferenceQueryRetry(\n () =>\n sombra\n .post(`v1/preferences/${partitionKey}/query`, {\n json: {\n filter: { identifiers: group },\n limit: group.length,\n },\n })\n .json(),\n {\n onRetry: (attempt, _err, msg) => {\n logger.warn(\n colors.yellow(\n `[RETRY] group size=${group.length} partition=${partitionKey} attempt=${attempt}: ${msg}`,\n ),\n );\n },\n },\n );\n\n const result = decodeCodec(ConsentPreferenceResponse, rawResult);\n results.push(...result.nodes);\n total += group.length;\n progressBar.update(total);\n },\n {\n concurrency,\n },\n );\n\n progressBar.stop();\n const t1 = new Date().getTime();\n const totalTime = t1 - t0;\n\n if (!skipLogging) {\n // Log completion time\n logger.info(\n colors.green(`Completed download in \"${totalTime / 1000}\" seconds.`),\n );\n }\n\n return results;\n}\n","import colors from 'colors';\nimport { logger } from '../../logger';\nimport { sleepPromise } from '../helpers';\n\n/**\n * Transient network / platform errors that merit a retry.\n * Keep this list short and specific to avoid masking real failures.\n */\nexport const RETRY_PREFERENCE_MSGS: string[] = [\n 'ENOTFOUND',\n 'ECONNRESET',\n 'ETIMEDOUT',\n '502 Bad Gateway',\n '504 Gateway Time-out',\n 'Task timed out after',\n];\n\n/**\n * Options for retrying preference queries.\n */\nexport type RetryOptions = {\n /** Max attempts including the first try (default 3) */\n maxAttempts?: number;\n /** Initial backoff in ms (default 250) */\n baseDelayMs?: number;\n /** Optional custom predicate to decide if an error is retryable */\n isRetryable?: (err: unknown, message: string) => boolean;\n /** Optional hook to log on each retry */\n onRetry?: (attempt: number, err: unknown, message: string) => void;\n};\n\n/**\n * Run an async function with standardized retry behavior for preference queries.\n * Exponential backoff with jitter; only retries on known-transient messages.\n *\n * @param fn - Function to run\n * @param options - Retry options\n * @returns Result of the function\n */\nexport async function withPreferenceQueryRetry<T>(\n fn: () => Promise<T>,\n {\n maxAttempts = 3,\n baseDelayMs = 250,\n isRetryable = (_err, msg) =>\n RETRY_PREFERENCE_MSGS.some((m) => msg.includes(m)),\n onRetry,\n }: RetryOptions = {},\n): Promise<T> {\n let attempt = 0;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n attempt += 1;\n try {\n return await fn();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } catch (err: any) {\n const msg: string =\n (err && (err.response?.body || err.message)) ??\n String(err ?? 'Unknown error');\n const willRetry = attempt < maxAttempts && isRetryable(err, msg);\n if (!willRetry) {\n throw new Error(\n `Preference query failed after ${attempt} attempt(s): ${msg}`,\n );\n }\n onRetry?.(attempt, err, msg);\n\n const backoff = baseDelayMs * 2 ** (attempt - 1);\n const jitter = Math.floor(Math.random() * baseDelayMs);\n const delay = backoff + jitter;\n logger.warn(\n colors.yellow(\n `[retry] attempt ${attempt}/${\n maxAttempts - 1\n }; backing off ${delay}ms: ${msg}`,\n ),\n );\n await sleepPromise(delay);\n }\n }\n}\n","import { uniq, groupBy, difference } from 'lodash-es';\nimport colors from 'colors';\nimport inquirer from 'inquirer';\nimport { FileMetadataState } from './codecs';\nimport { logger } from '../../logger';\nimport { inquirerConfirmBoolean } from '../helpers';\n\n/* eslint-disable no-param-reassign */\n\n/**\n * Parse identifiers from a CSV list of preferences\n *\n * Ensures that all rows have a valid identifier\n * and that all identifiers are unique.\n *\n * @param preferences - List of preferences\n * @param currentState - The current file metadata state for parsing this list\n * @returns The updated file metadata state\n */\nexport async function parsePreferenceIdentifiersFromCsv(\n preferences: Record<string, string>[],\n currentState: FileMetadataState,\n): Promise<{\n /** The updated state */\n currentState: FileMetadataState;\n /** The updated preferences */\n preferences: Record<string, string>[];\n}> {\n // Determine columns to map\n const columnNames = uniq(preferences.map((x) => Object.keys(x)).flat());\n\n // Determine the columns that could potentially be used for identifier\n const remainingColumnsForIdentifier = difference(columnNames, [\n ...(currentState.identifierColumn ? [currentState.identifierColumn] : []),\n ...Object.keys(currentState.columnToPurposeName),\n ]);\n\n // Determine the identifier column to work off of\n if (!currentState.identifierColumn) {\n const { identifierName } = await inquirer.prompt<{\n /** Identifier name */\n identifierName: string;\n }>([\n {\n name: 'identifierName',\n message:\n 'Choose the column that will be used as the identifier to upload consent preferences by',\n type: 'list',\n default:\n remainingColumnsForIdentifier.find((col) =>\n col.toLowerCase().includes('email'),\n ) || remainingColumnsForIdentifier[0],\n choices: remainingColumnsForIdentifier,\n },\n ]);\n currentState.identifierColumn = identifierName;\n }\n logger.info(\n colors.magenta(\n `Using identifier column \"${currentState.identifierColumn}\"`,\n ),\n );\n\n // Validate that the identifier column is present for all rows and unique\n const identifierColumnsMissing = preferences\n .map((pref, ind) => (pref[currentState.identifierColumn!] ? null : [ind]))\n .filter((x): x is number[] => !!x)\n .flat();\n if (identifierColumnsMissing.length > 0) {\n const msg = `The identifier column \"${\n currentState.identifierColumn\n }\" is missing a value for the following rows: ${identifierColumnsMissing.join(\n ', ',\n )}`;\n logger.warn(colors.yellow(msg));\n\n // Ask user if they would like to skip rows missing an identifier\n const skip = await inquirerConfirmBoolean({\n message: 'Would you like to skip rows missing an identifier?',\n });\n if (!skip) {\n throw new Error(msg);\n }\n\n // Filter out rows missing an identifier\n const previous = preferences.length;\n preferences = preferences.filter(\n (pref) => pref[currentState.identifierColumn!],\n );\n logger.info(\n colors.yellow(\n `Skipped ${previous - preferences.length} rows missing an identifier`,\n ),\n );\n }\n logger.info(\n colors.magenta(\n `The identifier column \"${currentState.identifierColumn}\" is present for all rows`,\n ),\n );\n\n // Validate that all identifiers are unique\n const rowsByUserId = groupBy(preferences, currentState.identifierColumn);\n const duplicateIdentifiers = Object.entries(rowsByUserId).filter(\n ([, rows]) => rows.length > 1,\n );\n if (duplicateIdentifiers.length > 0) {\n const msg = `The identifier column \"${\n currentState.identifierColumn\n }\" has duplicate values for the following rows: ${duplicateIdentifiers\n .slice(0, 10)\n .map(([userId, rows]) => `${userId} (${rows.length})`)\n .join('\\n')}`;\n logger.warn(colors.yellow(msg));\n\n // Ask user if they would like to take the most recent update\n // for each duplicate identifier\n const skip = await inquirerConfirmBoolean({\n message: 'Would you like to automatically take the latest update?',\n });\n if (!skip) {\n throw new Error(msg);\n }\n preferences = Object.entries(rowsByUserId)\n .map(([, rows]) => {\n const sorted = rows.sort(\n (a, b) =>\n new Date(b[currentState.timestampColum!]).getTime() -\n new Date(a[currentState.timestampColum!]).getTime(),\n );\n return sorted[0];\n })\n .filter((x) => x);\n }\n\n return { currentState, preferences };\n}\n/* eslint-enable no-param-reassign */\n","import { uniq, difference } from 'lodash-es';\nimport colors from 'colors';\nimport inquirer from 'inquirer';\nimport { FileMetadataState } from './codecs';\nimport { logger } from '../../logger';\nimport { mapSeries } from 'bluebird';\nimport { PreferenceTopic } from '../graphql';\nimport { PreferenceTopicType } from '@transcend-io/privacy-types';\nimport { splitCsvToList } from '../requests';\n\n/* eslint-disable no-param-reassign */\n\n/**\n * Parse out the purpose.enabled and preference values from a CSV file\n *\n * @param preferences - List of preferences\n * @param currentState - The current file metadata state for parsing this list\n * @param options - Options\n * @returns The updated file metadata state\n */\nexport async function parsePreferenceAndPurposeValuesFromCsv(\n preferences: Record<string, string>[],\n currentState: FileMetadataState,\n {\n purposeSlugs,\n preferenceTopics,\n forceTriggerWorkflows,\n }: {\n /** The purpose slugs that are allowed to be updated */\n purposeSlugs: string[];\n /** The preference topics */\n preferenceTopics: PreferenceTopic[];\n /** Force workflow triggers */\n forceTriggerWorkflows: boolean;\n },\n): Promise<FileMetadataState> {\n // Determine columns to map\n const columnNames = uniq(preferences.map((x) => Object.keys(x)).flat());\n\n // Determine the columns that could potentially be used for identifier\n const otherColumns = difference(columnNames, [\n ...(currentState.identifierColumn ? [currentState.identifierColumn] : []),\n ...(currentState.timestampColum ? [currentState.timestampColum] : []),\n ]);\n if (otherColumns.length === 0) {\n if (forceTriggerWorkflows) {\n return currentState;\n }\n throw new Error('No other columns to process');\n }\n\n // The purpose and preferences to map to\n const purposeNames = [\n ...purposeSlugs,\n ...preferenceTopics.map((x) => `${x.purpose.trackingType}->${x.slug}`),\n ];\n\n // Ensure all columns are accounted for\n await mapSeries(otherColumns, async (col) => {\n // Determine the unique values to map in this column\n const uniqueValues = uniq(preferences.map((x) => x[col]));\n\n // Map the column to a purpose\n let purposeMapping = currentState.columnToPurposeName[col];\n if (purposeMapping) {\n logger.info(\n colors.magenta(\n `Column \"${col}\" is associated with purpose \"${purposeMapping.purpose}\"`,\n ),\n );\n } else {\n const { purposeName } = await inquirer.prompt<{\n /** purpose name */\n purposeName: string;\n }>([\n {\n name: 'purposeName',\n message: `Choose the purpose that column ${col} is associated with`,\n type: 'list',\n default: purposeNames.find((x) => x.startsWith(purposeSlugs[0])),\n choices: purposeNames,\n },\n ]);\n const [purposeSlug, preferenceSlug] = purposeName.split('->');\n purposeMapping = {\n purpose: purposeSlug,\n preference: preferenceSlug || null,\n valueMapping: {},\n };\n }\n\n // map each value to the purpose value\n await mapSeries(uniqueValues, async (value) => {\n if (purposeMapping.valueMapping[value] !== undefined) {\n logger.info(\n colors.magenta(\n `Value \"${value}\" is associated with purpose value \"${purposeMapping.valueMapping[value]}\"`,\n ),\n );\n return;\n }\n // if preference is null, this column is just for the purpose\n if (purposeMapping.preference === null) {\n const { purposeValue } = await inquirer.prompt<{\n /** purpose value */\n purposeValue: boolean;\n }>([\n {\n name: 'purposeValue',\n message: `Choose the purpose value for value \"${value}\" associated with purpose \"${purposeMapping.purpose}\"`,\n type: 'confirm',\n default: value !== 'false',\n },\n ]);\n purposeMapping.valueMapping[value] = purposeValue;\n }\n\n // if preference is not null, this column is for a specific preference\n if (purposeMapping.preference !== null) {\n const preferenceTopic = preferenceTopics.find(\n (x) => x.slug === purposeMapping.preference,\n );\n if (!preferenceTopic) {\n logger.error(\n colors.red(\n `Preference topic \"${purposeMapping.preference}\" not found`,\n ),\n );\n return;\n }\n const preferenceOptions = preferenceTopic.preferenceOptionValues.map(\n ({ slug }) => slug,\n );\n\n if (preferenceTopic.type === PreferenceTopicType.Boolean) {\n const { preferenceValue } = await inquirer.prompt<{\n /** purpose value */\n preferenceValue: boolean;\n }>([\n {\n name: 'preferenceValue',\n message:\n // eslint-disable-next-line max-len\n `Choose the preference value for \"${preferenceTopic.slug}\" value \"${value}\" associated with purpose \"${purposeMapping.purpose}\"`,\n type: 'confirm',\n default: value !== 'false',\n },\n ]);\n purposeMapping.valueMapping[value] = preferenceValue;\n return;\n }\n\n if (preferenceTopic.type === PreferenceTopicType.Select) {\n const { preferenceValue } = await inquirer.prompt<{\n /** purpose value */\n preferenceValue: boolean;\n }>([\n {\n name: 'preferenceValue',\n // eslint-disable-next-line max-len\n message: `Choose the preference value for \"${preferenceTopic.slug}\" value \"${value}\" associated with purpose \"${purposeMapping.purpose}\"`,\n type: 'list',\n choices: preferenceOptions,\n default: preferenceOptions.find((x) => x === value),\n },\n ]);\n purposeMapping.valueMapping[value] = preferenceValue;\n return;\n }\n\n if (preferenceTopic.type === PreferenceTopicType.MultiSelect) {\n const parsedValues = splitCsvToList(value);\n // need to do this serially\n await mapSeries(parsedValues, async (parsedValue) => {\n // if we already have a value, skip re-processing it again\n if (purposeMapping.valueMapping[parsedValue] !== undefined) {\n return;\n }\n const { preferenceValue } = await inquirer.prompt<{\n /** purpose value */\n preferenceValue: boolean;\n }>([\n {\n name: 'preferenceValue',\n // eslint-disable-next-line max-len\n message: `Choose the preference value for \"${preferenceTopic.slug}\" value \"${parsedValue}\" associated with purpose \"${purposeMapping.purpose}\"`,\n type: 'list',\n choices: preferenceOptions,\n default: preferenceOptions.find((x) => x === parsedValue),\n },\n ]);\n purposeMapping.valueMapping[parsedValue] = preferenceValue;\n });\n return;\n }\n\n throw new Error(\n `Unknown preference topic type: ${preferenceTopic.type}`,\n );\n }\n });\n\n currentState.columnToPurposeName[col] = purposeMapping;\n });\n\n return currentState;\n}\n/* eslint-enable no-param-reassign */\n","import {\n PreferenceQueryResponseItem,\n PreferenceUpdateItem,\n} from '@transcend-io/privacy-types';\nimport * as t from 'io-ts';\n\nexport const PurposeRowMapping = t.type({\n /**\n * The slug or trackingType of the purpose to map to\n *\n * e.g. `Marketing`\n */\n purpose: t.string,\n /**\n * If the column maps to a preference instead of a purpose\n * this is the slug of the purpose.\n *\n * null value indicates that this column maps to the true/false\n * value of the purpose\n */\n preference: t.union([t.string, t.null]),\n /**\n * The mapping between each row value and purpose/preference value.\n *\n * e.g. for a boolean preference or purpose\n * {\n * 'true': true,\n * 'false': false,\n * '': true,\n * }\n *\n * or for a single or multi select preference\n * {\n * '': true,\n * 'value1': 'Value1',\n * 'value2': 'Value2',\n * }\n */\n valueMapping: t.record(\n t.string,\n t.union([t.string, t.boolean, t.null, t.undefined]),\n ),\n});\n\n/** Override type */\nexport type PurposeRowMapping = t.TypeOf<typeof PurposeRowMapping>;\n\n/**\n * Mapping of column name to purpose row mapping.\n * This is used to map each column in the CSV to the relevant purpose and preference definitions in\n * transcend.\n */\nexport const ColumnPurposeMap = t.record(t.string, PurposeRowMapping);\n\n/** Override type */\nexport type ColumnPurposeMap = t.TypeOf<typeof ColumnPurposeMap>;\n\nexport const IdentifierMetadataForPreference = t.type({\n /** The identifier name */\n name: t.string,\n /** Is unique on preference store */\n isUniqueOnPreferenceStore: t.boolean,\n});\n\n/** Override type */\nexport type IdentifierMetadataForPreference = t.TypeOf<\n typeof IdentifierMetadataForPreference\n>;\n\n/**\n * Mapping of identifier name to the column name in the CSV file.\n * This is used to map each identifier name to the column in the CSV file.\n */\nexport const ColumnIdentifierMap = t.record(\n t.string,\n IdentifierMetadataForPreference,\n);\n\n/** Override type */\nexport type ColumnIdentifierMap = t.TypeOf<typeof ColumnIdentifierMap>;\n\nexport const FileMetadataState = t.intersection([\n t.type({\n /**\n * Definition of how to map each column in the CSV to\n * the relevant purpose and preference definitions in transcend\n */\n columnToPurposeName: t.record(t.string, PurposeRowMapping),\n /** Last time the file was last parsed at */\n lastFetchedAt: t.string,\n /**\n * Mapping of userId to the rows in the file that need to be uploaded\n * These uploads are overwriting non-existent preferences and are safe\n */\n pendingSafeUpdates: t.record(t.string, t.record(t.string, t.string)),\n /**\n * Mapping of userId to the rows in the file that need to be uploaded\n * these records have conflicts with existing consent preferences\n */\n pendingConflictUpdates: t.record(\n t.string,\n t.type({\n record: PreferenceQueryResponseItem,\n row: t.record(t.string, t.string),\n }),\n ),\n /**\n * Mapping of userId to the rows in the file that can be skipped because\n * their preferences are already in the store\n */\n skippedUpdates: t.record(t.string, t.record(t.string, t.string)),\n }),\n t.partial({\n /** Determine which column name in file maps to consent record identifier to upload on */\n identifierColumn: t.string,\n /** Determine which column name in file maps to the timestamp */\n timestampColum: t.string,\n }),\n]);\n\n/** Override type */\nexport type FileMetadataState = t.TypeOf<typeof FileMetadataState>;\n\n/**\n * This is the type of the receipts that are stored in the file\n * that is used to track the state of the upload process.\n * It is used to resume the upload process from where it left off.\n * It is used to persist the state of the upload process across multiple runs.\n */\nexport const PreferenceUpdateMap = t.record(\n t.string,\n // This can either be true to indicate the record is pending\n // or it can be an object showing the object\n // We only return a fixed number of results to avoid\n // making the JSON file too large\n t.union([t.boolean, PreferenceUpdateItem]),\n);\n\n/** Override type */\nexport type PreferenceUpdateMap = t.TypeOf<typeof PreferenceUpdateMap>;\n\n/**\n * This is the type of the pending updates that are safe to run without\n * conflicts with existing consent preferences.\n *\n * Key is primaryKey of the record in the file.\n * The value is the row in the file that is safe to upload.\n */\nexport const PendingSafePreferenceUpdates = t.record(\n t.string,\n // This can either be true to indicate the record is safe\n // or it can be an object showing the object\n // We only return a fixed number of results to avoid\n // making the JSON file too large\n t.union([t.boolean, t.record(t.string, t.string)]),\n);\n\n/** Override type */\nexport type PendingSafePreferenceUpdates = t.TypeOf<\n typeof PendingSafePreferenceUpdates\n>;\n\n/**\n * These are the updates that failed to be uploaded to the API.\n */\nexport const FailingPreferenceUpdates = t.record(\n t.string,\n t.type({\n /** Time upload ran at */\n uploadedAt: t.string,\n /** Attempts to upload that resulted in an error */\n error: t.string,\n /** The update body */\n update: PreferenceUpdateItem,\n }),\n);\n\n/** Override type */\nexport type FailingPreferenceUpdates = t.TypeOf<\n typeof FailingPreferenceUpdates\n>;\n\n/**\n * This is the type of the pending updates that are in conflict with existing consent preferences.\n *\n * Key is primaryKey of the record in the file.\n * The value is the row in the file that is pending upload.\n */\nexport const PendingWithConflictPreferenceUpdates = t.record(\n t.string,\n // We always return the conflicts for investigation\n t.type({\n /** Record to be inserted to transcend v1/preferences API */\n record: PreferenceQueryResponseItem,\n /** The row in the file that is pending upload */\n row: t.record(t.string, t.string),\n }),\n);\n\n/** Override type */\nexport type PendingWithConflictPreferenceUpdates = t.TypeOf<\n typeof PendingWithConflictPreferenceUpdates\n>;\n\n/**\n * The set of preference updates that are skipped\n * Key is primaryKey and value is the row in the CSV\n * that is skipped.\n *\n * This is usually because the preferences are already in the store\n * or there are duplicate rows in the CSV file that are identical.\n */\nexport const SkippedPreferenceUpdates = t.record(\n t.string,\n t.record(t.string, t.string),\n);\n\n/** Override type */\nexport type SkippedPreferenceUpdates = t.TypeOf<\n typeof SkippedPreferenceUpdates\n>;\n\n/** Persist this data between runs of the script */\nexport const PreferenceState = t.type({\n /**\n * Store a cache of previous files read in\n */\n fileMetadata: t.record(t.string, FileMetadataState),\n /**\n * The set of successful uploads to Transcend\n * Mapping from userId to the upload metadata\n */\n failingUpdates: t.record(\n t.string,\n t.type({\n /** Time upload ran at */\n uploadedAt: t.string,\n /** Attempts to upload that resulted in an error */\n error: t.string,\n /** The update body */\n update: PreferenceUpdateItem,\n }),\n ),\n /**\n * The set of pending uploads to Transcend\n * Mapping from userId to the upload metadata\n */\n pendingUpdates: t.record(t.string, PreferenceUpdateItem),\n});\n\n/** Override type */\nexport type PreferenceState = t.TypeOf<typeof PreferenceState>;\n"]}