@transcend-io/cli 7.0.4 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -4
- package/dist/bin/bash-complete.cjs +1 -1
- package/dist/bin/cli.cjs +1 -1
- package/dist/bin/deprecated-command.cjs +2 -2
- package/dist/{chunk-IG65EYJY.cjs → chunk-22FUPUQJ.cjs} +2 -2
- package/dist/{chunk-IG65EYJY.cjs.map → chunk-22FUPUQJ.cjs.map} +1 -1
- package/dist/{chunk-L7NHDBBN.cjs → chunk-2FBBA65B.cjs} +3 -3
- package/dist/{chunk-L7NHDBBN.cjs.map → chunk-2FBBA65B.cjs.map} +1 -1
- package/dist/{chunk-EVZLUL56.cjs → chunk-2YSOUNTB.cjs} +4 -4
- package/dist/{chunk-EVZLUL56.cjs.map → chunk-2YSOUNTB.cjs.map} +1 -1
- package/dist/{chunk-TS5EYI4O.cjs → chunk-3G7BOKG7.cjs} +3 -3
- package/dist/{chunk-TS5EYI4O.cjs.map → chunk-3G7BOKG7.cjs.map} +1 -1
- package/dist/{chunk-3ZKZCSGD.cjs → chunk-4VUILSBX.cjs} +216 -163
- package/dist/chunk-4VUILSBX.cjs.map +1 -0
- package/dist/{chunk-6DWFLWWT.cjs → chunk-7EL5CRKO.cjs} +2 -2
- package/dist/{chunk-6DWFLWWT.cjs.map → chunk-7EL5CRKO.cjs.map} +1 -1
- package/dist/{chunk-G2T7YVBG.cjs → chunk-BJ4WK322.cjs} +19 -19
- package/dist/{chunk-G2T7YVBG.cjs.map → chunk-BJ4WK322.cjs.map} +1 -1
- package/dist/{chunk-6FGYCQAQ.cjs → chunk-DTYXOQNB.cjs} +2 -2
- package/dist/{chunk-6FGYCQAQ.cjs.map → chunk-DTYXOQNB.cjs.map} +1 -1
- package/dist/{chunk-R4IKDXM5.cjs → chunk-E2JQNQ2B.cjs} +2 -2
- package/dist/{chunk-R4IKDXM5.cjs.map → chunk-E2JQNQ2B.cjs.map} +1 -1
- package/dist/{chunk-FPXWBUHS.cjs → chunk-FHTJX3WX.cjs} +2 -2
- package/dist/{chunk-FPXWBUHS.cjs.map → chunk-FHTJX3WX.cjs.map} +1 -1
- package/dist/chunk-HVTVWP7K.cjs +2 -0
- package/dist/chunk-HVTVWP7K.cjs.map +1 -0
- package/dist/{chunk-SAEKBZGF.cjs → chunk-LCDYXJN6.cjs} +2 -2
- package/dist/{chunk-SAEKBZGF.cjs.map → chunk-LCDYXJN6.cjs.map} +1 -1
- package/dist/{chunk-L7YT5ETS.cjs → chunk-MS4WBSCZ.cjs} +2 -2
- package/dist/{chunk-L7YT5ETS.cjs.map → chunk-MS4WBSCZ.cjs.map} +1 -1
- package/dist/chunk-Q7I37FJV.cjs +2 -0
- package/dist/chunk-Q7I37FJV.cjs.map +1 -0
- package/dist/{chunk-YA5UZ3YM.cjs → chunk-STKQW3E3.cjs} +2 -2
- package/dist/{chunk-YA5UZ3YM.cjs.map → chunk-STKQW3E3.cjs.map} +1 -1
- package/dist/{chunk-Y4BWTFTX.cjs → chunk-T7B5NTGF.cjs} +2 -2
- package/dist/{chunk-Y4BWTFTX.cjs.map → chunk-T7B5NTGF.cjs.map} +1 -1
- package/dist/chunk-UWUR56CO.cjs +2 -0
- package/dist/chunk-UWUR56CO.cjs.map +1 -0
- package/dist/{chunk-WIXQSFS6.cjs → chunk-V73KHIHK.cjs} +2 -2
- package/dist/{chunk-WIXQSFS6.cjs.map → chunk-V73KHIHK.cjs.map} +1 -1
- package/dist/{chunk-BF5T3SGE.cjs → chunk-XGO26OIM.cjs} +2 -2
- package/dist/{chunk-BF5T3SGE.cjs.map → chunk-XGO26OIM.cjs.map} +1 -1
- package/dist/impl-26KL2AQB.cjs +2 -0
- package/dist/{impl-UKOAB6ED.cjs.map → impl-26KL2AQB.cjs.map} +1 -1
- package/dist/{impl-FG47LALL.cjs → impl-2CQCTBD2.cjs} +2 -2
- package/dist/{impl-FG47LALL.cjs.map → impl-2CQCTBD2.cjs.map} +1 -1
- package/dist/impl-4DVNH34T.cjs +2 -0
- package/dist/{impl-TWLWQSZG.cjs.map → impl-4DVNH34T.cjs.map} +1 -1
- package/dist/{impl-RSHVCDLE.cjs → impl-6DGHS6VJ.cjs} +2 -2
- package/dist/{impl-RSHVCDLE.cjs.map → impl-6DGHS6VJ.cjs.map} +1 -1
- package/dist/{impl-NNOWJ4Q4.cjs → impl-6N7KEKKE.cjs} +3 -3
- package/dist/{impl-NNOWJ4Q4.cjs.map → impl-6N7KEKKE.cjs.map} +1 -1
- package/dist/{impl-NKLZ5RG4.cjs → impl-6OYCZRQ7.cjs} +2 -2
- package/dist/{impl-NKLZ5RG4.cjs.map → impl-6OYCZRQ7.cjs.map} +1 -1
- package/dist/{impl-BPWMOF4U.cjs → impl-7F2KZRW5.cjs} +2 -2
- package/dist/{impl-BPWMOF4U.cjs.map → impl-7F2KZRW5.cjs.map} +1 -1
- package/dist/impl-7NGG2UXP.cjs +2 -0
- package/dist/{impl-KZ2L66Q3.cjs.map → impl-7NGG2UXP.cjs.map} +1 -1
- package/dist/impl-A624VO2M.cjs +2 -0
- package/dist/{impl-QHTG36G3.cjs.map → impl-A624VO2M.cjs.map} +1 -1
- package/dist/{impl-N6ML5K5S.cjs → impl-C7MMMEGG.cjs} +2 -2
- package/dist/{impl-N6ML5K5S.cjs.map → impl-C7MMMEGG.cjs.map} +1 -1
- package/dist/{impl-CNCC36M6.cjs → impl-DGWQ6Y7G.cjs} +5 -5
- package/dist/{impl-CNCC36M6.cjs.map → impl-DGWQ6Y7G.cjs.map} +1 -1
- package/dist/{impl-Q6EQYFKN.cjs → impl-GEU5O3ZJ.cjs} +2 -2
- package/dist/{impl-Q6EQYFKN.cjs.map → impl-GEU5O3ZJ.cjs.map} +1 -1
- package/dist/{impl-MO6AOGQM.cjs → impl-GRHNMCGI.cjs} +2 -2
- package/dist/{impl-MO6AOGQM.cjs.map → impl-GRHNMCGI.cjs.map} +1 -1
- package/dist/{impl-ZKBMWGMK.cjs → impl-GY5C6LR2.cjs} +2 -2
- package/dist/{impl-ZKBMWGMK.cjs.map → impl-GY5C6LR2.cjs.map} +1 -1
- package/dist/{impl-R3KCARSP.cjs → impl-HPYFSR3X.cjs} +2 -2
- package/dist/{impl-R3KCARSP.cjs.map → impl-HPYFSR3X.cjs.map} +1 -1
- package/dist/{impl-TPVA6DLJ.cjs → impl-IEKOU55S.cjs} +2 -2
- package/dist/{impl-TPVA6DLJ.cjs.map → impl-IEKOU55S.cjs.map} +1 -1
- package/dist/{impl-HB3R7YDP.cjs → impl-LZCXSUYN.cjs} +2 -2
- package/dist/{impl-HB3R7YDP.cjs.map → impl-LZCXSUYN.cjs.map} +1 -1
- package/dist/impl-N2M4B3CD.cjs +2 -0
- package/dist/{impl-KP27234L.cjs.map → impl-N2M4B3CD.cjs.map} +1 -1
- package/dist/{impl-6B7JDOM5.cjs → impl-NCEXVWU3.cjs} +2 -2
- package/dist/{impl-6B7JDOM5.cjs.map → impl-NCEXVWU3.cjs.map} +1 -1
- package/dist/impl-NDDSMUX6.cjs +2 -0
- package/dist/{impl-TVNBHOR4.cjs.map → impl-NDDSMUX6.cjs.map} +1 -1
- package/dist/{impl-4EDFESYC.cjs → impl-NS5G5S3D.cjs} +2 -2
- package/dist/{impl-4EDFESYC.cjs.map → impl-NS5G5S3D.cjs.map} +1 -1
- package/dist/impl-NWAHIHPW.cjs +2 -0
- package/dist/{impl-5FO2QEHJ.cjs.map → impl-NWAHIHPW.cjs.map} +1 -1
- package/dist/impl-O3424TEB.cjs +2 -0
- package/dist/{impl-2G6FOZLU.cjs.map → impl-O3424TEB.cjs.map} +1 -1
- package/dist/{impl-ICI7EQKE.cjs → impl-P7MPXBR4.cjs} +2 -2
- package/dist/{impl-ICI7EQKE.cjs.map → impl-P7MPXBR4.cjs.map} +1 -1
- package/dist/{impl-L3M67IGI.cjs → impl-PLMOOI5A.cjs} +4 -4
- package/dist/{impl-L3M67IGI.cjs.map → impl-PLMOOI5A.cjs.map} +1 -1
- package/dist/impl-Q5SIRPYG.cjs +2 -0
- package/dist/{impl-N54C7NPT.cjs.map → impl-Q5SIRPYG.cjs.map} +1 -1
- package/dist/{impl-SNLQCZOR.cjs → impl-RIPB6B26.cjs} +2 -2
- package/dist/{impl-SNLQCZOR.cjs.map → impl-RIPB6B26.cjs.map} +1 -1
- package/dist/{impl-ZTWLYZZO.cjs → impl-RLFZCZTL.cjs} +2 -2
- package/dist/{impl-ZTWLYZZO.cjs.map → impl-RLFZCZTL.cjs.map} +1 -1
- package/dist/{impl-LTOV5CHF.cjs → impl-RWUZ7AHK.cjs} +2 -2
- package/dist/{impl-LTOV5CHF.cjs.map → impl-RWUZ7AHK.cjs.map} +1 -1
- package/dist/{impl-MPGDZ2M2.cjs → impl-RXMW5OPR.cjs} +6 -6
- package/dist/{impl-MPGDZ2M2.cjs.map → impl-RXMW5OPR.cjs.map} +1 -1
- package/dist/{impl-24MFRX5R.cjs → impl-U64CK4IR.cjs} +2 -2
- package/dist/{impl-24MFRX5R.cjs.map → impl-U64CK4IR.cjs.map} +1 -1
- package/dist/{impl-OLEEHZUA.cjs → impl-UIIEKRVI.cjs} +3 -3
- package/dist/{impl-OLEEHZUA.cjs.map → impl-UIIEKRVI.cjs.map} +1 -1
- package/dist/impl-WD6I2IMR.cjs +2 -0
- package/dist/{impl-KOMGU55G.cjs.map → impl-WD6I2IMR.cjs.map} +1 -1
- package/dist/{impl-QITUCVEV.cjs → impl-XR27ZBRD.cjs} +2 -2
- package/dist/{impl-QITUCVEV.cjs.map → impl-XR27ZBRD.cjs.map} +1 -1
- package/dist/impl-Y57JWHDO.cjs +2 -0
- package/dist/{impl-BNFADMTO.cjs.map → impl-Y57JWHDO.cjs.map} +1 -1
- package/dist/impl-Y6OUBKKA.cjs +2 -0
- package/dist/{impl-AUOR6D3Q.cjs.map → impl-Y6OUBKKA.cjs.map} +1 -1
- package/dist/{impl-GNB7TDFU.cjs → impl-YU5XVOPI.cjs} +2 -2
- package/dist/{impl-GNB7TDFU.cjs.map → impl-YU5XVOPI.cjs.map} +1 -1
- package/dist/impl-ZBWYJB63.cjs +2 -0
- package/dist/{impl-DBDL4Z23.cjs.map → impl-ZBWYJB63.cjs.map} +1 -1
- package/dist/{impl-B5HQXUMH.cjs → impl-ZZQT62Y5.cjs} +2 -2
- package/dist/{impl-B5HQXUMH.cjs.map → impl-ZZQT62Y5.cjs.map} +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30531 -3216
- package/package.json +4 -3
- package/dist/chunk-3ZKZCSGD.cjs.map +0 -1
- package/dist/chunk-BY7W4UQF.cjs +0 -2
- package/dist/chunk-BY7W4UQF.cjs.map +0 -1
- package/dist/chunk-E3CF3RKX.cjs +0 -2
- package/dist/chunk-E3CF3RKX.cjs.map +0 -1
- package/dist/chunk-ZD2HOHJI.cjs +0 -2
- package/dist/chunk-ZD2HOHJI.cjs.map +0 -1
- package/dist/impl-2G6FOZLU.cjs +0 -2
- package/dist/impl-5FO2QEHJ.cjs +0 -2
- package/dist/impl-AUOR6D3Q.cjs +0 -2
- package/dist/impl-BNFADMTO.cjs +0 -2
- package/dist/impl-DBDL4Z23.cjs +0 -2
- package/dist/impl-KOMGU55G.cjs +0 -2
- package/dist/impl-KP27234L.cjs +0 -2
- package/dist/impl-KZ2L66Q3.cjs +0 -2
- package/dist/impl-N54C7NPT.cjs +0 -2
- package/dist/impl-QHTG36G3.cjs +0 -2
- package/dist/impl-TVNBHOR4.cjs +0 -2
- package/dist/impl-TWLWQSZG.cjs +0 -2
- package/dist/impl-UKOAB6ED.cjs +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
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; } }var _chunkLCDYXJN6cjs = require('./chunk-LCDYXJN6.cjs');var _chunkQ7I37FJVcjs = require('./chunk-Q7I37FJV.cjs');var _iots = require('io-ts'); var t = _interopRequireWildcard(_iots);var _typeutils = require('@transcend-io/type-utils');var _privacytypes = require('@transcend-io/privacy-types');var _airgapjstypes = require('@transcend-io/airgap.js-types');var _internationalization = require('@transcend-io/internationalization');var Tt=t.type({title:t.string}),C= exports.b =t.intersection([t.type({name:t.string,value:t.string}),t.partial({isSecret:t.boolean})]),Pt= exports.c =t.type({title:t.string}),At= exports.d =t.intersection([t.type({name:t.string,description:t.string}),t.partial({"sso-department":t.string,"sso-group":t.string,"sso-title":t.string,users:t.array(t.string),scopes:t.array(_typeutils.valuesOf.call(void 0, _privacytypes.ScopeName))})]),Ot= exports.e =t.intersection([t.type({title:t.string,"output-identifiers":t.array(t.string)}),t.partial({description:t.string,url:t.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.EnricherType),"input-identifier":t.string,testRegex:t.string,lookerQueryTitle:t.string,expirationDuration:t.number,transitionRequestStatus:_typeutils.valuesOf.call(void 0, _privacytypes.PreflightRequestStatus),phoneNumbers:t.array(t.string),regionList:t.array(_typeutils.valuesOf.call(void 0, {..._privacytypes.IsoCountryCode,..._privacytypes.IsoCountrySubdivisionCode})),"data-subjects":t.array(t.string),headers:t.array(C),"privacy-actions":t.array(_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction))})]),v= exports.f =t.intersection([t.type({purpose:_typeutils.valuesOf.call(void 0, _privacytypes.ProcessingPurpose)}),t.partial({name:t.string})]),p= exports.g =t.intersection([t.type({category:_typeutils.valuesOf.call(void 0, _privacytypes.DataCategoryType)}),t.partial({name:t.string})]),Ct= exports.h =t.intersection([t.type({category:p,status:_typeutils.valuesOf.call(void 0, _privacytypes.SubDataPointDataSubCategoryGuessStatus),confidence:t.number}),t.partial({classifierVersion:t.number})]),Ce= exports.i =t.intersection([t.type({category:p,status:_typeutils.valuesOf.call(void 0, _privacytypes.UnstructuredSubDataPointRecommendationStatus),confidence:t.number}),t.partial({classifierVersion:t.number})]),vt= exports.j =t.intersection([t.type({name:t.string}),t.partial({description:t.string,color:t.string})]),kt= exports.k =t.intersection([t.type({name:t.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.AttributeKeyType)}),t.partial({description:t.string,resources:t.array(_typeutils.valuesOf.call(void 0, _privacytypes.AttributeSupportedResourceType)),values:t.array(vt)})]),r= exports.l =t.type({key:t.string,values:t.array(t.string)}),Rt= exports.m =t.intersection([t.type({name:t.string,instructions:t.string,agentId:t.string,codeInterpreterEnabled:t.boolean,retrievalEnabled:t.boolean,"large-language-model":t.type({name:t.string,client:_typeutils.valuesOf.call(void 0, _privacytypes.LargeLanguageModelClient)})}),t.partial({description:t.string,prompt:t.string,owners:t.array(t.string),teams:t.array(t.string),"agent-functions":t.array(t.string),"agent-files":t.array(t.string)})]),St= exports.n =t.type({name:t.string,description:t.string,parameters:t.string}),wt= exports.o =t.intersection([t.type({name:t.string,fileId:t.string,size:t.number,purpose:_typeutils.valuesOf.call(void 0, _privacytypes.PromptFilePurpose)}),t.partial({description:t.string})]),ht= exports.p =t.intersection([t.type({title:t.string}),t.partial({description:t.string,dataProcessingAgreementLink:t.string,contactName:t.string,contactPhone:t.string,address:t.string,headquarterCountry:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode),headquarterSubDivision:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode),websiteUrl:t.string,businessEntity:t.string,owners:t.array(t.string),teams:t.array(t.string),attributes:t.array(r)})]),Dt= exports.q =t.intersection([t.type({name:t.string,category:_typeutils.valuesOf.call(void 0, _privacytypes.DataCategoryType)}),t.partial({description:t.string,regex:t.string,owners:t.array(t.string),teams:t.array(t.string),attributes:t.array(r)})]),Et= exports.r =t.intersection([t.type({name:t.string,purpose:_typeutils.valuesOf.call(void 0, _privacytypes.ProcessingPurpose)}),t.partial({description:t.string,owners:t.array(t.string),teams:t.array(t.string),attributes:t.array(r)})]),Nt= exports.s =t.type({title:t.string,content:t.string}),Mt= exports.t =t.type({title:t.string,content:t.string}),Lt= exports.u =t.type({title:t.string,description:t.string,prompts:t.array(t.string)}),Ft= exports.v =t.intersection([t.type({key:t.string}),t.partial({title:t.string,description:t.union([t.string,t.null]),purposes:t.array(v),categories:t.array(p),"guessed-categories":t.array(Ct),"access-request-visibility-enabled":t.boolean,"erasure-request-redaction-enabled":t.boolean,attributes:t.array(r)})]),qt= exports.w =t.intersection([t.type({key:t.string}),t.partial({path:t.array(t.string),title:t.string,description:t.string,"data-collection-tag":t.string,"privacy-action-queries":t.partial(_typeutils.applyEnum.call(void 0, _privacytypes.RequestActionObjectResolver,()=>t.string)),"privacy-actions":t.array(_typeutils.valuesOf.call(void 0, _privacytypes.RequestActionObjectResolver)),fields:t.array(Ft),owners:t.array(t.string),teams:t.array(t.string)})]),Vt= exports.x =t.partial({"notify-email-address":t.string,"send-frequency":t.number,"send-type":_typeutils.valuesOf.call(void 0, _privacytypes.PromptAVendorEmailSendType),"include-identifiers-attachment":t.boolean,"completion-link-type":_typeutils.valuesOf.call(void 0, _privacytypes.PromptAVendorEmailCompletionLinkType),"manual-work-retry-frequency":t.string}),Kt= exports.y =t.intersection([t.type({title:t.string}),t.partial({description:t.string,address:t.string,headquarterCountry:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode),headquarterSubDivision:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode),dataProtectionOfficerName:t.string,dataProtectionOfficerEmail:t.string,attributes:t.array(r),owners:t.array(t.string),teams:t.array(t.string)})]),u= exports.z =t.partial({country:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode),countrySubDivision:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode)}),jt= exports.A =t.intersection([t.type({title:t.string}),t.partial({description:t.string,securityMeasureDetails:t.string,controllerships:t.array(_typeutils.valuesOf.call(void 0, _privacytypes.Controllership)),storageRegions:t.array(u),transferRegions:t.array(u),retentionType:_typeutils.valuesOf.call(void 0, _privacytypes.RetentionType),retentionPeriod:t.number,dataProtectionImpactAssessmentLink:t.string,dataProtectionImpactAssessmentStatus:_typeutils.valuesOf.call(void 0, _privacytypes.DataProtectionImpactAssessmentStatus),attributes:t.array(r),dataSiloTitles:t.array(t.string),dataSubjectTypes:t.array(t.string),teamNames:t.array(t.string),ownerEmails:t.array(t.string),processingSubPurposes:t.array(v),dataSubCategories:t.array(p),saaSCategories:t.array(t.string)})]),ve= exports.B =t.intersection([t.type({name:t.string,codePackageType:_typeutils.valuesOf.call(void 0, _privacytypes.CodePackageType)}),t.partial({description:t.string,repositoryUrl:t.string,catalogIntegrationName:t.string,documentationLinks:t.array(t.string),ownerEmails:t.array(t.string),teamNames:t.array(t.string)})]),Bt= exports.C =t.intersection([t.type({name:t.string}),t.partial({version:t.string,isDevDependency:t.boolean})]),ke= exports.D =t.intersection([t.type({name:t.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.CodePackageType),relativePath:t.string,repositoryName:t.string}),t.partial({description:t.string,softwareDevelopmentKits:t.array(Bt),teamNames:t.array(t.string),ownerEmails:t.array(t.string)})]),Re= exports.E =t.intersection([t.type({name:t.string,url:t.string}),t.partial({description:t.string,teamNames:t.array(t.string),ownerEmails:t.array(t.string)})]),Gt= exports.F =t.intersection([t.type({type:t.string}),t.partial({active:t.boolean,title:t.string,adminDashboardDefaultSilentMode:t.boolean,actions:t.array(_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction))})]),Ut= exports.G =t.intersection([t.type({type:_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction)}),t.partial({skipSecondaryIfNoFiles:t.boolean,skipDownloadableStep:t.boolean,requiresReview:t.boolean,waitingPeriod:t.number,regionDetectionMethod:_typeutils.valuesOf.call(void 0, _privacytypes.RegionDetectionMethod),regionList:t.array(_typeutils.valuesOf.call(void 0, {..._privacytypes.IsoCountryCode,..._privacytypes.IsoCountrySubdivisionCode})),regionBlockList:t.array(_typeutils.valuesOf.call(void 0, {..._privacytypes.IsoCountryCode,..._privacytypes.IsoCountrySubdivisionCode}))})]),Qt= exports.H =t.intersection([t.type({name:t.string,type:t.string}),t.partial({regex:t.string,selectOptions:t.array(t.string),privacyCenterVisibility:t.array(_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction)),dataSubjects:t.array(t.string),isRequiredInForm:t.boolean,placeholder:t.string,displayTitle:t.string,displayDescription:t.string,displayOrder:t.number})]),zt= exports.I =t.intersection([t.type({value:t.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.DataFlowScope)}),t.partial({description:t.string,trackingPurposes:t.array(t.string),service:t.string,status:_typeutils.valuesOf.call(void 0, _privacytypes.ConsentTrackerStatus),owners:t.array(t.string),teams:t.array(t.string),attributes:t.array(r)})]),Ht= exports.J =t.intersection([t.type({name:t.string}),t.partial({isRegex:t.boolean,description:t.string,trackingPurposes:t.array(t.string),service:t.string,status:_typeutils.valuesOf.call(void 0, _privacytypes.ConsentTrackerStatus),owners:t.array(t.string),teams:t.array(t.string),attributes:t.array(r)})]),Wt= exports.K =t.intersection([t.type({name:t.string}),t.partial({displayName:t.string,regions:t.array(u),onConsentExpiry:_typeutils.valuesOf.call(void 0, _airgapjstypes.OnConsentExpiry),consentExpiry:t.number,operator:_typeutils.valuesOf.call(void 0, _privacytypes.RegionsOperator),displayPriority:t.number,viewState:_typeutils.valuesOf.call(void 0, _airgapjstypes.InitialViewState),purposes:t.array(t.type({trackingType:t.string})),optedOutPurposes:t.array(t.type({trackingType:t.string})),browserLanguages:t.array(_typeutils.valuesOf.call(void 0, _airgapjstypes.BrowserLanguage)),browserTimeZones:t.array(_typeutils.valuesOf.call(void 0, _privacytypes.BrowserTimeZone))})]),Zt= exports.L =t.intersection([t.type({name:t.string}),t.partial({partition:t.string})]),Jt= exports.M =t.partial({version:t.string,bundleUrls:t.record(_typeutils.valuesOf.call(void 0, _privacytypes.ConsentBundleType),t.string),domains:t.array(t.string),partition:t.string,consentPrecedence:_typeutils.valuesOf.call(void 0, _privacytypes.ConsentPrecedenceOption),unknownRequestPolicy:_typeutils.valuesOf.call(void 0, _privacytypes.UnknownRequestPolicy),unknownCookiePolicy:_typeutils.valuesOf.call(void 0, _privacytypes.UnknownRequestPolicy),syncEndpoint:t.string,telemetryPartitioning:_typeutils.valuesOf.call(void 0, _privacytypes.TelemetryPartitionStrategy),signedIabAgreement:_typeutils.valuesOf.call(void 0, _privacytypes.SignedIabAgreementOption),experiences:t.array(Wt),theme:t.partial({primaryColor:t.string,fontColor:t.string,privacyPolicy:t.string,prompt:t.number}),syncGroups:t.string}),Yt= exports.N =t.partial({isDisabled:t.boolean,showPrivacyRequestButton:t.boolean,showDataPractices:t.boolean,showPolicies:t.boolean,showTrackingTechnologies:t.boolean,showCookies:t.boolean,showDataFlows:t.boolean,showConsentManager:t.boolean,showManageYourPrivacy:t.boolean,showMarketingPreferences:t.boolean,locales:t.array(_typeutils.valuesOf.call(void 0, _internationalization.LanguageKey)),defaultLocale:_typeutils.valuesOf.call(void 0, _internationalization.LanguageKey),preferBrowserDefaultLocale:t.boolean,supportEmail:t.string,replyToEmail:t.string,useNoReplyEmailAddress:t.boolean,useCustomEmailDomain:t.boolean,transformAccessReportJsonToCsv:t.boolean,theme:t.partial({colors:t.partial(_typeutils.applyEnum.call(void 0, _privacytypes.ConfigurableColorPaletteColor,()=>t.string)),componentStyles:_privacytypes.PrivacyCenterComponentStyles,textStyles:_privacytypes.PrivacyCenterTextStyles})}),Xt= exports.O =t.intersection([t.type({title:t.string}),t.partial({effectiveOn:t.string,disableEffectiveOn:t.boolean,content:t.string,disabledLocales:t.array(_typeutils.valuesOf.call(void 0, _internationalization.LanguageKey))})]),_t= exports.P =t.intersection([t.type({id:t.string}),t.partial({targetReactIntlId:t.string,defaultMessage:t.string,translations:t.partial(_typeutils.applyEnum.call(void 0, _internationalization.LanguageKey,()=>t.string))})]),$t= exports.Q =t.intersection([t.type({title:t.string,integrationName:t.string}),t.partial({"outer-type":t.string,description:t.string,url:t.string,"api-key-title":t.string,headers:t.array(C),"data-subjects":t.array(t.string),"identity-keys":t.array(t.string),"deletion-dependencies":t.array(t.string),owners:t.array(t.string),teams:t.array(t.string),disabled:t.boolean,datapoints:t.array(qt),"email-settings":Vt,country:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode),countrySubDivision:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode),attributes:t.array(r),businessEntityTitles:t.array(t.string)})]),te= exports.R =t.intersection([t.type({title:t.string,productLine:_typeutils.valuesOf.call(void 0, _privacytypes.TranscendProduct)}),t.partial({description:t.string,hidden:t.boolean})]),ee= exports.S =t.intersection([t.type({title:t.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.ActionItemCode),collections:t.array(t.string)}),t.partial({priority:_typeutils.valuesOf.call(void 0, _privacytypes.ActionItemPriorityOverride),customerExperienceActionItemId:t.string,dueDate:t.string,resolved:t.boolean,notes:t.string,link:t.string,users:t.array(t.string),teams:t.array(t.string),attributes:t.array(r)})]),k= exports.T =t.intersection([t.type({"depends-on-question-reference-id":t.string,"comparison-operator":_typeutils.valuesOf.call(void 0, _privacytypes.ComparisonOperator)}),t.partial({"comparison-operands":t.array(t.string)})]),re= exports.U =t.recursion("AssessmentNestedRuleInput",w=>t.intersection([t.type({"logic-operator":_typeutils.valuesOf.call(void 0, _privacytypes.LogicOperator)}),t.partial({rules:t.array(k),"nested-rules":t.array(w)})])),ne= exports.V =t.intersection([t.type({action:_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentsDisplayLogicAction)}),t.partial({rule:k,"nested-rule":re})]),Se= exports.W =t.partial({"risk-level":t.string,"risk-matrix-column":t.string,"risk-matrix-row":t.string}),se= exports.X =t.intersection([t.type({"comparison-operands":t.array(t.string),"comparison-operator":_typeutils.valuesOf.call(void 0, _privacytypes.ComparisonOperator)}),t.partial({"risk-level":t.string,"risk-matrix-column":t.string,"risk-matrix-row":t.string})]),ie= exports.Y =t.type({value:t.string}),oe= exports.Z =t.intersection([t.type({title:t.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentQuestionType)}),t.partial({"sub-type":_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentQuestionSubType),placeholder:t.string,description:t.string,"is-required":t.boolean,"reference-id":t.string,"display-logic":ne,"risk-logic":t.array(se),"risk-categories":t.array(t.string),"risk-framework":t.string,"answer-options":t.array(ie),"selected-answers":t.array(t.string),"allowed-mime-types":t.array(t.string),"allow-select-other":t.boolean,"sync-model":_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentSyncModel),"sync-column":_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentSyncColumn),"attribute-key":t.string,"require-risk-evaluation":t.boolean,"require-risk-matrix-evaluation":t.boolean})]),R= exports._ =t.intersection([t.type({title:t.string,questions:t.array(oe)}),t.partial({assignees:t.array(t.string),"external-assignees":t.array(t.string),status:t.string,"is-reviewed":t.boolean})]),S= exports.$ =t.type({type:_typeutils.valuesOf.call(void 0, _privacytypes.RetentionScheduleType),"duration-days":t.number,operand:_typeutils.valuesOf.call(void 0, _privacytypes.RetentionScheduleOperation)}),ae= exports.aa =t.intersection([t.type({title:t.string}),t.partial({sections:t.array(R),description:t.string,status:_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentFormTemplateStatus),source:_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentFormTemplateSource),creator:t.string,locked:t.boolean,"parent-id":t.string,archived:t.boolean,"created-at":t.string,"attribute-keys":t.array(t.string),"retention-schedule":S,templates:t.array(t.string)})]),x= exports.ba =t.type({title:t.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.AttributeSupportedResourceType)}),pe= exports.ca =t.intersection([t.type({title:t.string,group:t.string}),t.partial({sections:t.array(R),creator:t.string,description:t.string,status:_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentFormStatus),assignees:t.array(t.string),"external-assignees":t.array(t.string),reviewers:t.array(t.string),locked:t.boolean,archived:t.boolean,external:t.boolean,"title-is-internal":t.boolean,"due-date":t.string,"created-at":t.string,"assigned-at":t.string,"submitted-at":t.string,"approved-at":t.string,"rejected-at":t.string,resources:t.array(x),rows:t.array(x),"retention-schedule":S,attributes:t.array(r)})]),ye= exports.da =t.type({title:t.string,slug:t.string}),ue= exports.ea =t.intersection([t.type({type:_typeutils.valuesOf.call(void 0, _privacytypes.PreferenceTopicType),title:t.string,description:t.string}),t.partial({"default-configuration":t.string,"show-in-privacy-center":t.boolean,options:t.array(ye)})]),ce= exports.fa =t.intersection([t.type({trackingType:t.string,title:t.string,name:t.string}),t.partial({description:t.string,"is-active":t.boolean,configurable:t.boolean,"display-order":t.number,"show-in-privacy-center":t.boolean,"show-in-consent-manager":t.boolean,"preference-topics":t.array(ue),"auth-level":_typeutils.valuesOf.call(void 0, _privacytypes.PreferenceStoreAuthLevel),"opt-out-signals":t.array(_typeutils.valuesOf.call(void 0, _airgapjstypes.UserPrivacySignalEnum)),"default-consent":_typeutils.valuesOf.call(void 0, _privacytypes.DefaultConsentOption)})]),we= exports.ga =t.partial({"action-items":t.array(ee),"action-item-collections":t.array(te),"api-keys":t.array(Pt),teams:t.array(At),templates:t.array(Tt),enrichers:t.array(Ot),attributes:t.array(kt),"business-entities":t.array(Kt),vendors:t.array(ht),"data-categories":t.array(Dt),"processing-purposes":t.array(Et),"data-subjects":t.array(Gt),actions:t.array(Ut),identifiers:t.array(Qt),"data-silos":t.array($t),"data-flows":t.array(zt),cookies:t.array(Ht),"consent-manager":Jt,prompts:t.array(Nt),"prompt-partials":t.array(Mt),"prompt-groups":t.array(Lt),agents:t.array(Rt),"agent-functions":t.array(St),"agent-files":t.array(wt),"privacy-center":Yt,policies:t.array(Xt),messages:t.array(_t),partitions:t.array(Zt),"assessment-templates":t.array(ae),assessments:t.array(pe),"processing-activities":t.array(jt),purposes:t.array(ce)}),he= exports.ha =t.type({organizationName:t.string,apiKey:t.string,organizationId:t.string}),De= exports.ia =t.intersection([t.type({"Connections Made To":t.string,Type:_typeutils.valuesOf.call(void 0, _privacytypes.DataFlowScope),Purpose:t.string}),t.partial({Service:t.string,Notes:t.string,Owners:t.string,Teams:t.string,Status:_typeutils.valuesOf.call(void 0, _privacytypes.ConsentTrackerStatus)}),t.record(t.string,t.string)]),Ee= exports.ja =t.intersection([t.type({Name:t.string,Purpose:t.string}),t.partial({Service:t.string,Notes:t.string,Owners:t.string,Teams:t.string,Status:_typeutils.valuesOf.call(void 0, _privacytypes.ConsentTrackerStatus)}),t.record(t.string,t.string)]),Ne= exports.ka =t.type({title:t.string,description:t.string,cookies:t.array(t.type({name:t.string,trackingPurposes:t.array(t.string)})),dataFlows:t.array(t.type({value:t.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.DataFlowScope),trackingPurposes:t.array(t.string)}))}),Me= exports.la =_typeutils.valuesOf.call(void 0, _chunkQ7I37FJVcjs.e),ge= exports.ma =_chunkLCDYXJN6cjs.a.call(void 0, {TRouteName:_typeutils.valuesOf.call(void 0, _chunkQ7I37FJVcjs.f)}),Le=_typeutils.valuesOf.call(void 0, _chunkQ7I37FJVcjs.f),le= exports.na =t.array(ge),me= exports.oa =_chunkLCDYXJN6cjs.b.call(void 0, {TEnabledRoutes:le}),Fe= exports.pa =t.partial({enabledIntegrations:t.partial({openAI:me})}),qe= exports.qa =t.partial({promptRunName:t.string,promptId:t.string,promptTitle:t.string,promptGroupId:t.string,promptGroupTitle:t.string,runByEmployeeEmail:t.string,applicationId:t.string,applicationName:t.string,codePackageName:t.string,repositoryName:t.string,applicationUserCoreIdentifier:t.string,applicationUserName:t.string,slackMessageTs:t.string,slackTeamId:t.string,slackChannelId:t.string,slackChannelName:t.string}),de=t.intersection([t.type({title:t.string}),t.partial({value:t.string})]),Ie=t.type({columns:t.array(de)}),Ve= exports.ra =t.partial({rows:t.array(Ie),json:t.string});exports.a = Tt; exports.b = C; exports.c = Pt; exports.d = At; exports.e = Ot; exports.f = v; exports.g = p; exports.h = Ct; exports.i = Ce; exports.j = vt; exports.k = kt; exports.l = r; exports.m = Rt; exports.n = St; exports.o = wt; exports.p = ht; exports.q = Dt; exports.r = Et; exports.s = Nt; exports.t = Mt; exports.u = Lt; exports.v = Ft; exports.w = qt; exports.x = Vt; exports.y = Kt; exports.z = u; exports.A = jt; exports.B = ve; exports.C = Bt; exports.D = ke; exports.E = Re; exports.F = Gt; exports.G = Ut; exports.H = Qt; exports.I = zt; exports.J = Ht; exports.K = Wt; exports.L = Zt; exports.M = Jt; exports.N = Yt; exports.O = Xt; exports.P = _t; exports.Q = $t; exports.R = te; exports.S = ee; exports.T = k; exports.U = re; exports.V = ne; exports.W = Se; exports.X = se; exports.Y = ie; exports.Z = oe; exports._ = R; exports.$ = S; exports.aa = ae; exports.ba = x; exports.ca = pe; exports.da = ye; exports.ea = ue; exports.fa = ce; exports.ga = we; exports.ha = he; exports.ia = De; exports.ja = Ee; exports.ka = Ne; exports.la = Me; exports.ma = ge; exports.na = le; exports.oa = me; exports.pa = Fe; exports.qa = qe; exports.ra = Ve;
|
|
2
|
+
//# sourceMappingURL=chunk-UWUR56CO.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/cli/cli/dist/chunk-UWUR56CO.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","LanguageKey","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,0EAIqB,IAQfA,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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,CAAA,CAAA,MACV,CAAC,CAAA,CAAA,woCAAA","file":"/home/runner/work/cli/cli/dist/chunk-UWUR56CO.cjs","sourcesContent":[null,"// eslint-disable-next-line eslint-comments/disable-enable-pair\n/* eslint-disable max-lines */\nimport * 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 { LanguageKey } 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 }),\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(LanguageKey)),\n /** The default locale for the privacy center */\n defaultLocale: valuesOf(LanguageKey),\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(LanguageKey)),\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(LanguageKey, () => 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,2 +1,2 @@
|
|
|
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 _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 _chunk3ZKZCSGDcjs = require('./chunk-3ZKZCSGD.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkE3CF3RKXcjs = require('./chunk-E3CF3RKX.cjs');var _chunkY4BWTFTXcjs = require('./chunk-Y4BWTFTX.cjs');var _typeutils = require('@transcend-io/type-utils');var _internationalization = require('@transcend-io/internationalization');var _privacytypes = require('@transcend-io/privacy-types');var _iots = require('io-ts'); var R = _interopRequireWildcard(_iots); var re = _interopRequireWildcard(_iots); var lt = _interopRequireWildcard(_iots); var D = _interopRequireWildcard(_iots); var q = _interopRequireWildcard(_iots); var I = _interopRequireWildcard(_iots); var de = _interopRequireWildcard(_iots); var Ft = _interopRequireWildcard(_iots); var M = _interopRequireWildcard(_iots);var A="[NONE]",pe= exports.b ="[APPLY VALUE TO ALL ROWS]",De= exports.c ="<blank>",be= exports.d =["email","coreIdentifier"],ne= exports.e =(c=>(c.Email="email",c.CoreIdentifier="coreIdentifier",c.RequestType="requestType",c.SubjectType="subjectType",c.Locale="locale",c.Country="country",c.CountrySubDivision="countrySubDivision",c.RequestStatus="requestStatus",c.CreatedAt="createdAt",c.DataSiloIds="dataSiloIds",c))(ne||{}),et= exports.f ={email:!1,coreIdentifier:!0,requestType:!0,subjectType:!0,requestStatus:!1,createdAt:!1,dataSiloIds:!1,locale:!1,country:!1,countrySubDivision:!1},tt= exports.g ={requestType:!0,subjectType:!0},rt= exports.h =R.type({columnNames:R.partial(_typeutils.applyEnum.call(void 0, ne,()=>R.string)),identifierNames:R.record(R.string,R.string),attributeNames:R.record(R.string,R.string),requestTypeToRequestAction:R.record(R.string,_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction)),subjectTypeToSubjectName:R.record(R.string,R.string),languageToLocale:R.record(R.string,_typeutils.valuesOf.call(void 0, _internationalization.LanguageKey)),regionToCountry:R.record(R.string,_typeutils.valuesOf.call(void 0, {..._privacytypes.IsoCountryCode,[A]:A})),regionToCountrySubDivision:R.record(R.string,_typeutils.valuesOf.call(void 0, {..._privacytypes.IsoCountrySubdivisionCode,[A]:A})),statusToRequestStatus:R.record(R.string,_typeutils.valuesOf.call(void 0, {..._privacytypes.CompletedRequestStatus,[A]:A}))}),Te= exports.i =R.type({id:R.string,link:R.string,rowIndex:R.number,coreIdentifier:R.string,attemptedAt:R.string}),st= exports.j =R.type({failingRequests:R.array(R.record(R.string,R.any)),successfulRequests:R.array(Te),duplicateRequests:R.array(R.type({rowIndex:R.number,coreIdentifier:R.string,attemptedAt:R.string}))});var _inquirer = require('inquirer'); var _inquirer2 = _interopRequireDefault(_inquirer);var _fuzzysearch = require('fuzzysearch'); var _fuzzysearch2 = _interopRequireDefault(_fuzzysearch);function Ae(n,e){return _fuzzysearch2.default.call(void 0, n.toLowerCase(),e.toLowerCase())||_fuzzysearch2.default.call(void 0, e.toLowerCase(),n.toLowerCase())}function ae(n,e,s,l){let a=n.filter(o=>Ae(e.toLowerCase(),o.toLowerCase()));return[...a,new _inquirer2.default.Separator,...s?[]:[A],...l?[pe]:[],...n.filter(o=>!a.includes(o))]}var _inquirerautocompleteprompt = require('inquirer-autocomplete-prompt'); var _inquirerautocompleteprompt2 = _interopRequireDefault(_inquirerautocompleteprompt);async function te(n,e,s){_inquirer2.default.registerPrompt("autocomplete",_inquirerautocompleteprompt2.default);let l=n.map(o=>o||"<blank>").filter(o=>!s[o]);if(l.length===0)return s;let a=await _inquirer2.default.prompt(l.map(o=>({name:o,message:`Map value of: ${o}`,type:"autocomplete",default:e.find(i=>Ae(o,i)),source:(i,r)=>r?e.filter(t=>typeof t=="string"&&Ae(r,t)):e})));return{...s,..._typeutils.apply.call(void 0, a,o=>typeof o=="string"?o:Object.values(o)[0])}}function Ee(n){return n.split(",").map(e=>e.trim()).filter(e=>e)}var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var at=re.type({key:re.string,values:re.array(re.string)});function ut(n){let e=n.map(s=>{let[l,a]=s.trim().split(":");if(!a)throw new Error("Expected attributes in key:value1;value2,key2:value3;value4");let o=a.split(";");return{key:l,values:o}});return _chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Attributes to apply to all requests:")),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(JSON.stringify(e,null,2))),e}var _sync = require('csv-parse/sync');var _fs = require('fs');function ct(n,e,s={columns:!0}){let l=_sync.parse.call(void 0, _fs.readFileSync.call(void 0, n,"utf-8"),s);return _typeutils.decodeCodec.call(void 0, lt.array(e),l).map(i=>Object.entries(i).reduce((r,[t,y])=>Object.assign(r,{[t.replace(/[^a-z_.+\-A-Z -~]/g,"")]:y}),{}))}function G(n,e){return _chunkY4BWTFTXcjs.j.call(void 0, n.map(s=>s[e]||"").flat())}async function pt(n){let e=_chunkY4BWTFTXcjs.j.call(void 0, n.map(a=>Object.keys(a)).flat()),s=n,l=!0;for(;l;){let{filterColumnName:a}=await _inquirer2.default.prompt([{name:"filterColumnName",message:`If you need to filter the list of requests to import, choose the column to filter on. Currently ${s.length} rows.`,type:"list",default:e,choices:[A,...e]}]);if(l=A!==a,l){let o=G(s,a),{valuesToKeep:i}=await _inquirer2.default.prompt([{name:"valuesToKeep",message:"Keep rows matching this value",type:"checkbox",default:e,choices:o}]);s=s.filter(r=>i.includes(r[a]))}}return _chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Importing ${s.length} requests`)),s}var _cliprogress = require('cli-progress'); var _cliprogress2 = _interopRequireDefault(_cliprogress);async function Us({requestActions:n,auth:e,requestIds:s,statuses:l=[_privacytypes.RequestStatus.Compiling,_privacytypes.RequestStatus.RequestMade,_privacytypes.RequestStatus.Delayed,_privacytypes.RequestStatus.Approving,_privacytypes.RequestStatus.Secondary,_privacytypes.RequestStatus.Enriching,_privacytypes.RequestStatus.Waiting,_privacytypes.RequestStatus.SecondaryApproving],createdAtAfter:a,createdAtBefore:o,concurrency:i=100,transcendUrl:r=_chunkE3CF3RKXcjs.e}){let t=_chunk3ZKZCSGDcjs.qe.call(void 0, r,e),y=new Date().getTime(),c=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),g=await _chunk3ZKZCSGDcjs.ze.call(void 0, t,{actions:n,statuses:l,createdAtBefore:o,createdAtAfter:a,isSilent:!1,requestIds:s});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Marking "${g.length}" as silent mode.`));let m=0;c.start(g.length,0),await _chunk3ZKZCSGDcjs.b.call(void 0, g,async f=>{await _chunk3ZKZCSGDcjs.$b.call(void 0, t,_chunk3ZKZCSGDcjs._,{input:{id:f.id,isSilent:!0}}),m+=1,c.update(m)},{concurrency:i}),c.stop();let p=new Date().getTime()-y;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully marked ${m} requests as silent mode in "${p/1e3}" seconds!`)),g.length}async function gt(n,e){let s=_typeutils.getValues.call(void 0, ne).filter(a=>!e.getValue("columnNames",a)),l=s.length===0?{}:await _inquirer2.default.prompt(s.map(a=>{let o=_chunkY4BWTFTXcjs.h.call(void 0, a.replace("ColumnName","")),i=ae(n,o,et[a],!!tt[a]);return{name:a,message:`Choose the column that will be used to map in the field: ${o}`,type:"list",default:i[0],choices:i}}));return await Promise.all(_typeutils.getEntries.call(void 0, l).map(([a,o])=>e.setValue(o,"columnNames",a))),l}async function yt(n,e,{state:s,columnNameMap:l}){let a=f=>s.getValue("columnNames",f)||l[f],{internalSubjects:o}=await _chunk3ZKZCSGDcjs.$b.call(void 0, n,_chunk3ZKZCSGDcjs.y);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for request action"));let i=await te(G(e,a("requestType")),Object.values(_privacytypes.RequestAction),s.getValue("requestTypeToRequestAction"));await s.setValue(i,"requestTypeToRequestAction"),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for subject"));let r=await te(G(e,a("subjectType")),o.map(({type:f})=>f),s.getValue("subjectTypeToSubjectName"));await s.setValue(r,"subjectTypeToSubjectName"),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for locale"));let t=await te(G(e,a("locale")),Object.values(_internationalization.LanguageKey),s.getValue("languageToLocale"));await s.setValue(t,"languageToLocale"),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for request status")),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for request status"));let y=a("requestStatus"),c=y===A?{}:await te(G(e,y),[...Object.values(_privacytypes.CompletedRequestStatus),A],s.getValue("statusToRequestStatus"));await s.setValue(c,"statusToRequestStatus"),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for country"));let g=a("country"),m=g===A?{}:await te(G(e,g),[...Object.values(_privacytypes.IsoCountryCode),A],s.getValue("regionToCountry"));await s.setValue(m,"regionToCountry"),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for country sub division"));let d=a("countrySubDivision"),p=d===A?{}:await te(G(e,d),[...Object.values(_privacytypes.IsoCountrySubdivisionCode),A],s.getValue("regionToCountrySubDivision"));await s.setValue(p,"regionToCountrySubDivision")}var _iotstypes = require('io-ts-types');var Pr=D.record(D.string,D.array(D.intersection([D.type({value:D.string}),D.partial({name:D.string})]))),ho= exports.x =D.intersection([D.type({email:D.string,attestedExtraIdentifiers:Pr,coreIdentifier:D.string,requestType:_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction),subjectType:D.string}),D.partial({country:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode),countrySubDivision:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode),attributes:D.array(at),status:_typeutils.valuesOf.call(void 0, _privacytypes.CompletedRequestStatus),createdAt:_iotstypes.DateFromISOString,dataSiloIds:D.array(D.string),locale:_typeutils.valuesOf.call(void 0, _internationalization.LanguageKey)})]);function Dr(n,e,s){if(e===_privacytypes.IdentifierType.Email)return n.toLowerCase();if(e===_privacytypes.IdentifierType.Phone){let l=n.replace(_privacytypes.NORMALIZE_PHONE_NUMBER,"").replace(/[()]/g,"").replace(/[–]/g,"").replace(/[:]/g,"").replace(/[]/g,"").replace(/[A-Za-z]/g,"");return l?l.startsWith("+")?l:`+${s}${l}`:""}return n}function qt(n,e,{columnNameMap:s,identifierNameMap:l,attributeNameMap:a,requestAttributeKeys:o,defaultPhoneCountryCode:i="1"}){let r=t=>e.getValue("columnNames",t)||s[t];return n.map(t=>{let y={};Object.entries(l).filter(([,d])=>d!==A).forEach(([d,p])=>{let f=Object.values(_privacytypes.IdentifierType).includes(d)?d:_privacytypes.IdentifierType.Custom,h=t[p];if(h){let S=Dr(h,f,i);S&&(y[f]||(y[f]=[]),y[f].push({value:S,name:d}))}});let c=[];Object.entries(a).filter(([,d])=>d!==A).forEach(([d,p])=>{let f=t[p];if(f){let h=_optionalChain([o, 'access', _2 => _2.find, 'call', _3 => _3(S=>S.name===d), 'optionalAccess', _4 => _4.type])==="MULTI_SELECT";c.push({values:h?Ee(f):f,key:d})}});let g=r("requestType"),m=r("subjectType");return[t,{email:t[r("email")],attestedExtraIdentifiers:y,attributes:c,coreIdentifier:t[r("coreIdentifier")],requestType:g===pe?e.getValue("requestTypeToRequestAction",De):e.getValue("requestTypeToRequestAction",t[g]),subjectType:m===pe?e.getValue("subjectTypeToSubjectName",De):e.getValue("subjectTypeToSubjectName",t[m]),...r("locale")!==A&&t[r("locale")]?{locale:e.getValue("languageToLocale",t[r("locale")])}:{},...r("country")!==A&&t[r("country")]?{country:e.getValue("regionToCountry",t[r("country")])}:{},...r("countrySubDivision")!==A&&t[r("countrySubDivision")]?{countrySubDivision:e.getValue("regionToCountrySubDivision",t[r("countrySubDivision")])}:{},...r("requestStatus")!==A&&e.getValue("statusToRequestStatus",t[r("requestStatus")])!==A&&t[r("requestStatus")]?{status:e.getValue("statusToRequestStatus",t[r("requestStatus")])}:{},...r("createdAt")!==A&&t[r("createdAt")]?{createdAt:new Date(t[r("createdAt")])}:{},...r("dataSiloIds")!==A&&t[r("dataSiloIds")]?{dataSiloIds:Ee(t[r("dataSiloIds")])}:{}}]})}var St=q.type({defaultMessage:q.string,id:q.string}),xr= exports.B =q.type({downloadKey:q.string,error:q.union([q.null,q.string]),mimetype:q.string,size:q.string,fileName:q.string,dataPoint:q.type({id:q.string,title:q.union([St,q.null]),description:q.union([St,q.null]),name:q.string,slug:q.string,encryption:q.union([_typeutils.valuesOf.call(void 0, _privacytypes.TableEncryptionType),q.null]),dataSilo:q.type({id:q.string,title:q.string,description:q.string,type:q.string,outerType:q.union([q.string,q.null])}),path:q.array(q.string)})}),Lr= exports.C =q.type({nodes:q.array(xr),totalCount:q.number,_links:q.partial({next:q.union([q.string,q.null]),previous:q.union([q.string,q.null])})});async function bt(n,{sombra:e,concurrency:s=5,limit:l=100}){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Pulling file metadata for ${n.length} requests`));let a=new Date().getTime(),o=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),i=0;o.start(n.length,0);let r=await _chunk3ZKZCSGDcjs.b.call(void 0, n,async c=>{let g=[],m=!0,d=0;for(;m;){let p;try{let f=await e.get(`v1/data-subject-request/${c.id}/download-keys`,{searchParams:{limit:l,offset:d}}).json();p=_typeutils.decodeCodec.call(void 0, Lr,f),g.push(...p.nodes),d+=l,m=!!p._links.next&&p.nodes.length===l}catch(f){throw new Error(`Received an error from server: ${_optionalChain([f, 'optionalAccess', _5 => _5.response, 'optionalAccess', _6 => _6.body])||_optionalChain([f, 'optionalAccess', _7 => _7.message])}`)}}return i+=1,o.update(i),[c,g]},{concurrency:s});o.stop();let y=new Date().getTime()-a;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully downloaded file metadata ${n.length} requests in "${y/1e3}" seconds!`)),r}async function Tt(n,{requestId:e,sombra:s,onFileDownloaded:l,concurrency:a=20}){await _chunk3ZKZCSGDcjs.b.call(void 0, n,async o=>{try{await s.get("v1/files",{searchParams:{downloadKey:o.downloadKey}}).buffer().then(i=>l(o,i))}catch(i){if(_optionalChain([i, 'optionalAccess', _8 => _8.response, 'optionalAccess', _9 => _9.body, 'optionalAccess', _10 => _10.includes, 'call', _11 => _11("fileMetadata#verify")])){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to pull file for: ${o.fileName} (request:${e}) - JWT expired. This likely means that the file is no longer available. Try restarting the request from scratch in Transcend Admin Dashboard. Skipping the download of this file.`));return}throw new Error(`Received an error from server: ${_optionalChain([i, 'optionalAccess', _12 => _12.response, 'optionalAccess', _13 => _13.body])||_optionalChain([i, 'optionalAccess', _14 => _14.message])}`)}},{concurrency:a})}var _path = require('path');async function Uo({auth:n,folderPath:e,requestIds:s,createdAtBefore:l,sombraAuth:a,createdAtAfter:o,statuses:i=[_privacytypes.RequestStatus.Approving,_privacytypes.RequestStatus.Downloadable],concurrency:r=5,transcendUrl:t=_chunkE3CF3RKXcjs.e,approveAfterDownload:y=!1}){let c=_chunk3ZKZCSGDcjs.qe.call(void 0, t,n),g=await _chunk3ZKZCSGDcjs.re.call(void 0, t,n,a);_fs.existsSync.call(void 0, e)||_fs.mkdirSync.call(void 0, e);let m=await _chunk3ZKZCSGDcjs.ze.call(void 0, c,{actions:[_privacytypes.RequestAction.Access],createdAtBefore:l,createdAtAfter:o,statuses:i,requestIds:s}),d=await bt(m,{sombra:g,concurrency:r}),p=new Date().getTime(),f=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),h=0,S=0;f.start(m.length,0),await _chunk3ZKZCSGDcjs.b.call(void 0, d,async([v,x])=>{let K=_path.join.call(void 0, e,v.id);_fs.existsSync.call(void 0, K)||_fs.mkdirSync.call(void 0, K),await Tt(x,{sombra:g,requestId:v.id,onFileDownloaded:($,_)=>{let z=_path.join.call(void 0, K,$.fileName),j=_path.dirname.call(void 0, z);_fs.existsSync.call(void 0, j)||_fs.mkdirSync.call(void 0, j,{recursive:!0}),_fs.writeFileSync.call(void 0, z,_)}}),y&&v.status===_privacytypes.RequestStatus.Approving&&(await _chunk3ZKZCSGDcjs.$b.call(void 0, c,_chunk3ZKZCSGDcjs.Y,{input:{requestId:v.id}}),S+=1),h+=1,f.update(h)},{concurrency:r}),f.stop();let T=new Date().getTime()-p;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully downloaded ${h} requests in "${T/1e3}" seconds!`)),S>0&&_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Approved ${S} requests in Transcend.`)),m.length}var Le=I.type({id:I.string,link:I.string,status:_typeutils.valuesOf.call(void 0, _privacytypes.RequestStatus),type:_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction),subjectType:I.string,email:I.union([I.null,I.string]),coreIdentifier:I.string,isSilent:I.boolean,isTest:I.boolean,country:I.union([I.null,_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode)]),countrySubDivision:I.union([I.null,_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode)]),attributeValues:I.array(I.type({attributeKey:I.type({name:I.string}),name:I.string}))});async function It(n,e,{details:s="",isTest:l=!1,emailIsVerified:a=!0,skipSendingReceipt:o=!1,isSilent:i=!0,additionalAttributes:r=[]}={}){let t=[...r];(e.attributes||[]).forEach(g=>{let m=t.find(d=>d.key===g.key);m?(m.values.push(...g.values),m.values=_chunkY4BWTFTXcjs.j.call(void 0, m.values)):t.push(g)});let y;try{y=await n.post("v1/data-subject-request",{json:{type:e.requestType,subject:{coreIdentifier:e.coreIdentifier,email:e.email,emailIsVerified:a,attestedExtraIdentifiers:e.attestedExtraIdentifiers},subjectType:e.subjectType,isSilent:i,isTest:l,skipSendingReceipt:o,...e.locale?{locale:e.locale}:{},details:s,attributes:t,...e.country||e.countrySubDivision?{region:{...e.country?{country:e.country}:e.countrySubDivision?{country:e.countrySubDivision.split("-")[0]}:{},...e.countrySubDivision?{countrySubDivision:e.countrySubDivision}:{}}}:{},...e.createdAt?{createdAt:e.createdAt}:{},...e.dataSiloIds?{dataSiloIds:e.dataSiloIds}:{},...e.status?{completedRequestStatus:e.status}:{}}}).json()}catch(g){throw new Error(`Received an error from server: ${_optionalChain([g, 'optionalAccess', _15 => _15.response, 'optionalAccess', _16 => _16.body])||_optionalChain([g, 'optionalAccess', _17 => _17.message])}`)}let{request:c}=_typeutils.decodeCodec.call(void 0, I.type({request:Le}),y);return c}async function oi({requestActions:n,requestOrigins:e,auth:s,silentModeBefore:l,createdAtAfter:a,createdAtBefore:o,concurrency:i=50,transcendUrl:r=_chunkE3CF3RKXcjs.e}){let t=_chunk3ZKZCSGDcjs.qe.call(void 0, r,s),y=new Date().getTime(),c=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),g=await _chunk3ZKZCSGDcjs.ze.call(void 0, t,{actions:n,statuses:[_privacytypes.RequestStatus.Approving],createdAtAfter:a,origins:e,createdAtBefore:o});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Approving "${g.length}" requests.`));let m=0,d=0;c.start(g.length,0),await _chunk3ZKZCSGDcjs.b.call(void 0, g,async h=>{l&&new Date(l)>new Date(h.createdAt)&&await _chunk3ZKZCSGDcjs.$b.call(void 0, t,_chunk3ZKZCSGDcjs._,{input:{id:h.id,isSilent:!0}});try{await _chunk3ZKZCSGDcjs.$b.call(void 0, t,_chunk3ZKZCSGDcjs.Y,{input:{requestId:h.id}})}catch(S){S.message.includes("Request must be in an approving state,")&&(d+=1)}m+=1,c.update(m)},{concurrency:i}),c.stop();let f=new Date().getTime()-y;return d>0&&_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`${d} requests were skipped.`)),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully approved ${m} requests in "${f/1e3}" seconds!`)),g.length}async function fi({requestActions:n=Object.values(_privacytypes.RequestAction),auth:e,requestIds:s,createdAtBefore:l,days:a=45,daysLeft:o=10,createdAtAfter:i,emailTemplate:r="Additional Time Needed",concurrency:t=100,transcendUrl:y=_chunkE3CF3RKXcjs.e}){let c=_chunk3ZKZCSGDcjs.qe.call(void 0, y,e),g=new Date().getTime(),m=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),p=(await _chunk3ZKZCSGDcjs.ed.call(void 0, c,r)).find(T=>T.title===r);if(!p)throw new Error(`Failed to find a template with title: "${r}"`);let f=await _chunk3ZKZCSGDcjs.ze.call(void 0, c,{actions:n,createdAtBefore:l,createdAtAfter:i,isSilent:!1,isClosed:!1,requestIds:s});f=f.filter(T=>typeof T.daysRemaining=="number"&&T.daysRemaining<o),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Notifying "${f.length}" that more time is needed.`));let h=0;m.start(f.length,0),await _chunk3ZKZCSGDcjs.b.call(void 0, f,async T=>{await _chunk3ZKZCSGDcjs.$b.call(void 0, c,_chunk3ZKZCSGDcjs.$,{input:{requestId:T.id,template:p.template.defaultMessage,subject:p.subject.defaultMessage,additionalTime:a}}),h+=1,m.update(h)},{concurrency:t}),m.stop();let N=new Date().getTime()-g;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully marked ${h} requests as silent mode in "${N/1e3}" seconds!`)),f.length}async function vt(n,e,s){let{initializer:l}=await _chunk3ZKZCSGDcjs.$b.call(void 0, n,_chunk3ZKZCSGDcjs.q),a=l.identifiers.filter(({name:i})=>!s.getValue("identifierNames",i)&&!be.includes(i)),o=a.length===0?{}:await _inquirer2.default.prompt(a.map(({name:i})=>{let r=ae(e,i,!1);return{name:i,message:`Choose the column that will be used to map in the identifier: ${i}`,type:"list",default:r[0],choices:r}}));return await Promise.all(Object.entries(o).map(([i,r])=>s.setValue(r,"identifierNames",i))),{...s.getValue("identifierNames"),...o}}async function Ni({requestActions:n,cancellationTitle:e,auth:s,requestIds:l,silentModeBefore:a,createdAtBefore:o,createdAtAfter:i,statuses:r=[_privacytypes.RequestStatus.Compiling,_privacytypes.RequestStatus.RequestMade,_privacytypes.RequestStatus.Delayed,_privacytypes.RequestStatus.Approving,_privacytypes.RequestStatus.Secondary,_privacytypes.RequestStatus.Enriching,_privacytypes.RequestStatus.Waiting,_privacytypes.RequestStatus.SecondaryApproving],concurrency:t=50,transcendUrl:y=_chunkE3CF3RKXcjs.e}){let c=_chunk3ZKZCSGDcjs.qe.call(void 0, y,s),g=new Date().getTime(),m=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),d;if(e){let T=(await _chunk3ZKZCSGDcjs.ed.call(void 0, c,e)).find(v=>v.title===e);if(!T)throw new Error(`Failed to find a template with title: "${e}"`);d=T}let p=await _chunk3ZKZCSGDcjs.ze.call(void 0, c,{actions:n,createdAtBefore:o,createdAtAfter:i,statuses:r,requestIds:l});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Canceling "${p.length}" requests${d?` Using template: ${d.title}`:""}.`));let f=0;m.start(p.length,0),await _chunk3ZKZCSGDcjs.b.call(void 0, p,async N=>{a&&new Date(a)>new Date(N.createdAt)&&await _chunk3ZKZCSGDcjs.$b.call(void 0, c,_chunk3ZKZCSGDcjs._,{input:{id:N.id,isSilent:!0}}),await _chunk3ZKZCSGDcjs.$b.call(void 0, c,_chunk3ZKZCSGDcjs.Z,{input:{requestId:N.id,...d?{subject:`Re: ${d.subject.defaultMessage}`,template:d.template.defaultMessage}:{}}}),f+=1,m.update(f)},{concurrency:t}),m.stop();let S=new Date().getTime()-g;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully canceled ${f} requests in "${S/1e3}" seconds!`)),p.length}async function Lt(n,e,s,l){let a=l.filter(({name:i})=>!s.getValue("attributeNames",i)),o=a.length===0?{}:await _inquirer2.default.prompt(a.map(({name:i})=>{let r=ae(e,i,!1);return{name:i,message:`Choose the column that will be used to map in the attribute: ${i}`,type:"list",default:r[0],choices:r}}));return await Promise.all(Object.entries(o).map(([i,r])=>s.setValue(r,"attributeNames",i))),{...s.getValue("attributeNames"),...o}}var $t=/{\\"message\\":\\"(.+?)\\",/;function Ie(n){return $t.test(n)?$t.exec(n)[1]:null}var _persistedstate = require('@transcend-io/persisted-state');async function sn({cacheFilepath:n,requestReceiptFolder:e,file:s,auth:l,sombraAuth:a,concurrency:o=100,defaultPhoneCountryCode:i="1",transcendUrl:r=_chunkE3CF3RKXcjs.e,attributes:t=[],emailIsVerified:y=!0,skipFilterStep:c=!1,skipSendingReceipt:g=!0,isTest:m=!1,isSilent:d=!0,debug:p=!1,dryRun:f=!1}){let h=new Date().getTime(),S=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),N=ut(t),T=new (0, _persistedstate.PersistedState)(n,rt,{columnNames:{},requestTypeToRequestAction:{},subjectTypeToSubjectName:{},languageToLocale:{},statusToRequestStatus:{},identifierNames:{},attributeNames:{},regionToCountrySubDivision:{},regionToCountry:{}}),v=_path.join.call(void 0, e,`tr-request-upload-${new Date().toISOString()}-${s.split("/").pop()}`.replace(".csv",".json")),x=new (0, _persistedstate.PersistedState)(v,st,{successfulRequests:[],duplicateRequests:[],failingRequests:[]}),K=await _chunk3ZKZCSGDcjs.re.call(void 0, r,l,a),$=ct(s,de.record(de.string,de.string)),_=_chunkY4BWTFTXcjs.j.call(void 0, $.map(U=>Object.keys(U)).flat());if($.length===0)throw new Error("No Requests found in list! Ensure the first row of the CSV is a header and the rest are requests.");if(p){let U=$[0];_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`First request: ${JSON.stringify(U,null,2)}`))}let z=c?$:await pt($),j=_chunk3ZKZCSGDcjs.qe.call(void 0, r,l),L=await _chunk3ZKZCSGDcjs.xe.call(void 0, j),B=await gt(_,T),Y=await vt(j,_,T),k=await Lt(j,_,T,L);await yt(j,z,{state:T,columnNameMap:B});let O=qt(z,T,{defaultPhoneCountryCode:i,columnNameMap:B,identifierNameMap:Y,attributeNameMap:k,requestAttributeKeys:L});p||S.start(O.length,0);let X=0;await _chunk3ZKZCSGDcjs.b.call(void 0, O,async([U,V],Q)=>{let _e=p?`email:${V.email} | coreIdentifier:${V.coreIdentifier}`:`row:${Q.toString()}`;if(p&&_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`[${Q+1}/${O.length}] Importing: ${JSON.stringify(V,null,2)}`)),f){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Bailing out on dry run because dryRun is set"));return}try{let ee=await It(K,V,{details:`Uploaded by Transcend Cli: "tr-request-upload" : ${JSON.stringify(U,null,2)}`,isTest:m,emailIsVerified:y,skipSendingReceipt:g,isSilent:d,additionalAttributes:N});p&&(_chunkZUNVPK23cjs.a.info(_colors2.default.green(`[${Q+1}/${O.length}] Successfully submitted the test data subject request: "${_e}"`)),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`[${Q+1}/${O.length}] View it at: "${ee.link}"`)));let oe=x.getValue("successfulRequests");oe.push({id:ee.id,link:ee.link,rowIndex:Q,coreIdentifier:ee.coreIdentifier,attemptedAt:new Date().toISOString()}),await x.setValue(oe,"successfulRequests")}catch(ee){let oe=`${ee.message} - ${JSON.stringify(_optionalChain([ee, 'access', _18 => _18.response, 'optionalAccess', _19 => _19.body]),null,2)}`,Pe=Ie(oe);if(Pe==="Client error: You have already made this request."){p&&_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`[${Q+1}/${O.length}] Skipping request as it is a duplicate`));let le=x.getValue("duplicateRequests");le.push({coreIdentifier:V.coreIdentifier,rowIndex:Q,attemptedAt:new Date().toISOString()}),await x.setValue(le,"duplicateRequests")}else{let le=x.getValue("failingRequests");le.push({...V,rowIndex:Q,error:Pe||oe,attemptedAt:new Date().toISOString()}),await x.setValue(le,"failingRequests"),p&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(Pe||oe)),_chunkZUNVPK23cjs.a.error(_colors2.default.red(`[${Q+1}/${O.length}] Failed to submit request for: "${_e}"`)))}}X+=1,p||S.update(X)},{concurrency:o}),S.stop();let ue=new Date().getTime()-h;_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Completed upload in "${ue/1e3}" seconds.`)),x.getValue("duplicateRequests").length>0&&_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`Encountered "${x.getValue("duplicateRequests").length}" duplicate requests. See "${v}" to review the core identifiers for these requests.`)),x.getValue("failingRequests").length>0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Encountered "${x.getValue("failingRequests").length}" errors. See "${v}" to review the error messages and inputs.`)),process.exit(1))}async function _t(n,e,{sendEmailReceipt:s=!1,skipWaitingPeriod:l=!1,emailIsVerified:a=!0,requestIdentifiers:o=[]}={}){let i=await n.post("v1/data-subject-request",{json:{type:e.type,subject:{coreIdentifier:e.coreIdentifier,email:e.email,emailIsVerified:a,...o.length>0?{attestedExtraIdentifiers:_typeutils.apply.call(void 0, _chunkY4BWTFTXcjs.d.call(void 0, o.filter(t=>!(t.name==="email"&&t.value===e.email)&&!be.includes(t.name)).map(t=>({...t,type:Object.values(_privacytypes.IdentifierType).includes(t.name)?t.name:_privacytypes.IdentifierType.Custom})),"type"),(t,y)=>t.map(({name:c,value:g})=>({...y===_privacytypes.IdentifierType.Custom?{name:c}:{},value:g})))}:{}},requestId:e.id,subjectType:e.subjectType,isSilent:e.isSilent,isTest:e.isTest,locale:e.locale,skipWaitingPeriod:l,createdAt:e.createdAt,details:`Restarted by Transcend cli: "tr-request-restart" - ${e.details}`,skipSendingReceipt:!s}}).json(),{request:r}=_typeutils.decodeCodec.call(void 0, Ft.type({request:Le}),i);return r}var Hr=M.intersection([Te,M.type({error:M.string})]),Xr=M.type({restartedRequests:M.array(Te),failingRequests:M.array(Hr)});async function wn({requestReceiptFolder:n,auth:e,sombraAuth:s,requestActions:l,requestStatuses:a,createdAtBefore:o,createdAtAfter:i,transcendUrl:r=_chunkE3CF3RKXcjs.e,requestIds:t=[],createdAt:y=new Date,silentModeBefore:c,sendEmailReceipt:g=!1,emailIsVerified:m=!0,copyIdentifiers:d=!1,skipWaitingPeriod:p=!1,concurrency:f=20}){let h=new Date().getTime(),S=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),N=_path.join.call(void 0, n,`tr-request-restart-${new Date().toISOString()}`),T=new (0, _persistedstate.PersistedState)(N,Xr,{restartedRequests:[],failingRequests:[]}),v=await _chunk3ZKZCSGDcjs.re.call(void 0, r,e,s),x=_chunk3ZKZCSGDcjs.qe.call(void 0, r,e),$=(await _chunk3ZKZCSGDcjs.ze.call(void 0, x,{actions:l,statuses:a,createdAtBefore:o,createdAtAfter:i})).filter(L=>new Date(L.createdAt)<y);if(_chunkZUNVPK23cjs.a.info(`Found ${$.length} requests to process`),d&&_chunkZUNVPK23cjs.a.info("copyIdentifiers detected - All Identifiers will be copied."),g&&_chunkZUNVPK23cjs.a.info("sendEmailReceipt detected - Email receipts will be sent."),p&&_chunkZUNVPK23cjs.a.info("skipWaitingPeriod detected - Waiting period will be skipped."),t.length>0&&t.length!==$.length){let L=_chunkY4BWTFTXcjs.c.call(void 0, t,$.map(({id:B})=>B));L.length>0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to find the following requests by ID: ${L.join(",")}.`)),process.exit(1))}let _=0;S.start($.length,0),await _chunk3ZKZCSGDcjs.b.call(void 0, $,async(L,B)=>{try{let Y=d?await _chunk3ZKZCSGDcjs.Be.call(void 0, x,v,{requestId:L.id}):[],k=await _t(v,{...L,isSilent:c&&new Date(L.createdAt)<c?!0:L.isSilent},{requestIdentifiers:Y,skipWaitingPeriod:p,sendEmailReceipt:g,emailIsVerified:m}),O=T.getValue("restartedRequests");O.push({id:k.id,link:k.link,rowIndex:B,coreIdentifier:k.coreIdentifier,attemptedAt:new Date().toISOString()}),await T.setValue(O,"restartedRequests")}catch(Y){let k=`${Y.message} - ${JSON.stringify(_optionalChain([Y, 'access', _20 => _20.response, 'optionalAccess', _21 => _21.body]),null,2)}`,O=Ie(k),X=T.getValue("failingRequests");X.push({id:L.id,link:L.link,rowIndex:B,coreIdentifier:L.coreIdentifier,attemptedAt:new Date().toISOString(),error:O||k}),await T.setValue(X,"failingRequests")}_+=1,S.update(_)},{concurrency:f}),S.stop();let j=new Date().getTime()-h;_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Completed restarting of requests in "${j/1e3}" seconds.`)),T.getValue("failingRequests").length>0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Encountered "${T.getValue("failingRequests").length}" errors. See "${N}" to review the error messages and inputs.`)),process.exit(1))}async function Ln({enricherIds:n,auth:e,concurrency:s=100,transcendUrl:l=_chunkE3CF3RKXcjs.e}){let a=_chunk3ZKZCSGDcjs.qe.call(void 0, l,e),o=new Date().getTime(),i=await _chunk3ZKZCSGDcjs.ze.call(void 0, a,{statuses:[_privacytypes.RequestStatus.Enriching]});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Processing enricher: "${n.join(",")}" fetched "${i.length}" in enriching status.`));let r=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),t=0;r.start(i.length,0);let y=0;await _chunk3ZKZCSGDcjs.b.call(void 0, i,async m=>{let p=(await _chunk3ZKZCSGDcjs.Ce.call(void 0, a,{requestId:m.id})).filter(f=>n.includes(f.enricher.id)&&![_privacytypes.RequestEnricherStatus.Resolved,_privacytypes.RequestEnricherStatus.Skipped].includes(f.status));p.length>0&&await _chunk3ZKZCSGDcjs.a.call(void 0, p,async f=>{try{await _chunk3ZKZCSGDcjs.$b.call(void 0, a,_chunk3ZKZCSGDcjs.ea,{requestEnricherId:f.id}),y+=1}catch(h){if(!h.message.includes("Client error: Cannot skip Request enricher because it has already completed"))throw h}}),t+=1,r.update(t)},{concurrency:s}),r.stop();let g=new Date().getTime()-o;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully skipped "${y}" for "${i.length}" requests in "${g/1e3}" seconds!`)),i.length}async function Qn({auth:n,requestActions:e=[],createdAtBefore:s,createdAtAfter:l,transcendUrl:a=_chunkE3CF3RKXcjs.e,requestEnricherStatuses:o=Object.values(_privacytypes.RequestEnricherStatus),requestIds:i=[],enricherId:r,concurrency:t=20}){let y=new Date().getTime(),c=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),g=_chunk3ZKZCSGDcjs.qe.call(void 0, a,n);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Fetching requests to restart..."));let m=await _chunk3ZKZCSGDcjs.ze.call(void 0, g,{actions:e,statuses:[_privacytypes.RequestStatus.Enriching],createdAtBefore:s,createdAtAfter:l,requestIds:i}),d=0;if(i.length>0&&i.length!==m.length){let S=_chunkY4BWTFTXcjs.c.call(void 0, i,m.map(({id:N})=>N));S.length>0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to find the following requests by ID: ${S.join(",")}.`)),process.exit(1))}let p=0;c.start(m.length,0),await _chunk3ZKZCSGDcjs.b.call(void 0, m,async S=>{let T=(await _chunk3ZKZCSGDcjs.Ce.call(void 0, g,{requestId:S.id})).filter(v=>v.enricher.id===r&&o.includes(v.status));await _chunk3ZKZCSGDcjs.b.call(void 0, T,async v=>{await _chunk3ZKZCSGDcjs.te.call(void 0, g,v.id),d+=1}),p+=1,c.update(p)},{concurrency:t}),c.stop();let h=new Date().getTime()-y;_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Completed restarting of ${m.length} requests and ${d} enrichers in "${h/1e3}" seconds.`))}async function ea({requestActions:n,dataSiloId:e,auth:s,concurrency:l=20,transcendUrl:a=_chunkE3CF3RKXcjs.e}){let o=_chunk3ZKZCSGDcjs.qe.call(void 0, a,s),i=new Date().getTime(),r=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),t=await _chunk3ZKZCSGDcjs.ze.call(void 0, o,{actions:n,statuses:[_privacytypes.RequestStatus.Compiling,_privacytypes.RequestStatus.Approving]});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Retrying requests for Data Silo: "${e}", restarting "${t.length}" requests.`));let y=0,c=0;r.start(t.length,0),await _chunk3ZKZCSGDcjs.b.call(void 0, t,async d=>{try{let p=await _chunk3ZKZCSGDcjs.Ee.call(void 0, o,{requestId:d.id,dataSiloId:e});await _chunk3ZKZCSGDcjs.$b.call(void 0, o,_chunk3ZKZCSGDcjs.xa,{requestDataSiloId:p.id})}catch(p){if(!p.message.includes("Failed to find RequestDataSilo"))throw p;c+=1}y+=1,r.update(y)},{concurrency:l}),r.stop();let m=new Date().getTime()-i;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully notified Transcend in "${m/1e3}" seconds for ${y} requests, ${c} requests were skipped because data silo was not attached to the request!`)),t.length}async function ca({auth:n,sombraAuth:e,actions:s=[],statuses:l=[],identifierSearch:a,pageLimit:o=100,transcendUrl:i=_chunkE3CF3RKXcjs.e,createdAtBefore:r,createdAtAfter:t,isTest:y}){let c=_chunk3ZKZCSGDcjs.qe.call(void 0, i,n),g=await _chunk3ZKZCSGDcjs.re.call(void 0, i,n,e),m="";r&&(m+=` before ${r.toISOString()}`),t&&(m+=`${m?", and":""} after ${t.toISOString()}`),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`${s.length>0?`Pulling requests of type "${s.join('" , "')}"`:"Pulling all requests"}${m}`));let d=await _chunk3ZKZCSGDcjs.ze.call(void 0, c,{actions:s,text:a,statuses:l,createdAtBefore:r,createdAtAfter:t,isTest:y}),p=await _chunk3ZKZCSGDcjs.b.call(void 0, d,async h=>{let S=await _chunk3ZKZCSGDcjs.Be.call(void 0, c,g,{requestId:h.id});return{...h,requestIdentifiers:S}},{concurrency:o});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Pulled ${p.length} requests`));let f=p.map(({attributeValues:h,requestIdentifiers:S,id:N,email:T,type:v,status:x,subjectType:K,details:$,createdAt:_,country:z,locale:j,origin:L,countrySubDivision:B,isSilent:Y,isTest:k,coreIdentifier:O,...X})=>({"Request ID":N,"Created At":_,Email:T,"Core Identifier":O,"Request Type":v,"Data Subject Type":K,Status:x,Country:z,"Country Sub Division":B,Details:$,Origin:L,"Silent Mode":Y,"Is Test Request":k,Language:j,...X,...Object.entries(_chunkY4BWTFTXcjs.d.call(void 0, h,"attributeKey.name")).reduce((ge,[ue,U])=>Object.assign(ge,{[ue]:U.map(({name:V})=>V).join(",")}),{}),...Object.entries(_chunkY4BWTFTXcjs.d.call(void 0, S,"name")).reduce((ge,[ue,U])=>Object.assign(ge,{[ue]:U.map(({value:V})=>V).join(",")}),{})}));return{requestsWithRequestIdentifiers:p,requestsFormattedForCsv:f}}async function ha({dataSiloId:n,auth:e,concurrency:s=100,status:l="SKIPPED",transcendUrl:a=_chunkE3CF3RKXcjs.e,requestStatuses:o=[_privacytypes.RequestStatus.Compiling,_privacytypes.RequestStatus.Secondary]}){let i=_chunk3ZKZCSGDcjs.qe.call(void 0, a,e),r=new Date().getTime(),t=await _chunk3ZKZCSGDcjs.De.call(void 0, i,{dataSiloId:n,requestStatuses:o});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Processing data silo: "${n}" marking "${t.length}" requests as skipped.`));let y=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),c=0;y.start(t.length,0),await _chunk3ZKZCSGDcjs.b.call(void 0, t,async d=>{try{await _chunk3ZKZCSGDcjs.$b.call(void 0, i,_chunk3ZKZCSGDcjs.wa,{requestDataSiloId:d.id,status:l})}catch(p){if(!p.message.includes("Client error: Request must be active:"))throw p}c+=1,y.update(c)},{concurrency:s}),y.stop();let m=new Date().getTime()-r;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully skipped "${t.length}" requests in "${m/1e3}" seconds!`)),t.length}async function Ea({requestActions:n,identifierNames:e,auth:s,concurrency:l=20,transcendUrl:a=_chunkE3CF3RKXcjs.e}){let o=_chunk3ZKZCSGDcjs.qe.call(void 0, a,s),i=new Date().getTime(),r=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),t=await _chunk3ZKZCSGDcjs.ze.call(void 0, o,{actions:n,statuses:[_privacytypes.RequestStatus.Enriching]});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Fetched requests in preflight/enriching state."));let y=0,c=0;r.start(t.length,0),await _chunk3ZKZCSGDcjs.b.call(void 0, t,async d=>{let f=(await _chunk3ZKZCSGDcjs.ve.call(void 0, o,{requestId:d.id})).filter(({isVerifiedAtLeastOnce:h,name:S})=>h===!1&&e.includes(S)).map(({id:h})=>h);f.length>0&&(await _chunk3ZKZCSGDcjs.$b.call(void 0, o,_chunk3ZKZCSGDcjs.Ca,{input:{requestId:d.id,requestIdentifierIds:f}}),c+=f.length),y+=1,r.update(y)},{concurrency:l}),r.stop();let m=new Date().getTime()-i;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully cleared out unverified identifiers "${m/1e3}" seconds for ${y} requests, ${c} identifiers were cleared out!`)),t.length}exports.a = A; exports.b = pe; exports.c = De; exports.d = be; exports.e = ne; exports.f = et; exports.g = tt; exports.h = rt; exports.i = Te; exports.j = st; exports.k = Ae; exports.l = ae; exports.m = te; exports.n = Ee; exports.o = at; exports.p = ut; exports.q = ct; exports.r = G; exports.s = pt; exports.t = Us; exports.u = gt; exports.v = yt; exports.w = Pr; exports.x = ho; exports.y = Dr; exports.z = qt; exports.A = St; exports.B = xr; exports.C = Lr; exports.D = bt; exports.E = Tt; exports.F = Uo; exports.G = Le; exports.H = It; exports.I = oi; exports.J = fi; exports.K = vt; exports.L = Ni; exports.M = Lt; exports.N = Ie; exports.O = sn; exports.P = _t; exports.Q = wn; exports.R = Ln; exports.S = Qn; exports.T = ea; exports.U = ca; exports.V = ha; exports.W = Ea;
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
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 _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 _chunk4VUILSBXcjs = require('./chunk-4VUILSBX.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkHVTVWP7Kcjs = require('./chunk-HVTVWP7K.cjs');var _chunkT7B5NTGFcjs = require('./chunk-T7B5NTGF.cjs');var _typeutils = require('@transcend-io/type-utils');var _internationalization = require('@transcend-io/internationalization');var _privacytypes = require('@transcend-io/privacy-types');var _iots = require('io-ts'); var R = _interopRequireWildcard(_iots); var re = _interopRequireWildcard(_iots); var lt = _interopRequireWildcard(_iots); var D = _interopRequireWildcard(_iots); var q = _interopRequireWildcard(_iots); var I = _interopRequireWildcard(_iots); var de = _interopRequireWildcard(_iots); var Ft = _interopRequireWildcard(_iots); var M = _interopRequireWildcard(_iots);var A="[NONE]",pe= exports.b ="[APPLY VALUE TO ALL ROWS]",De= exports.c ="<blank>",be= exports.d =["email","coreIdentifier"],ne= exports.e =(c=>(c.Email="email",c.CoreIdentifier="coreIdentifier",c.RequestType="requestType",c.SubjectType="subjectType",c.Locale="locale",c.Country="country",c.CountrySubDivision="countrySubDivision",c.RequestStatus="requestStatus",c.CreatedAt="createdAt",c.DataSiloIds="dataSiloIds",c))(ne||{}),et= exports.f ={email:!1,coreIdentifier:!0,requestType:!0,subjectType:!0,requestStatus:!1,createdAt:!1,dataSiloIds:!1,locale:!1,country:!1,countrySubDivision:!1},tt= exports.g ={requestType:!0,subjectType:!0},rt= exports.h =R.type({columnNames:R.partial(_typeutils.applyEnum.call(void 0, ne,()=>R.string)),identifierNames:R.record(R.string,R.string),attributeNames:R.record(R.string,R.string),requestTypeToRequestAction:R.record(R.string,_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction)),subjectTypeToSubjectName:R.record(R.string,R.string),languageToLocale:R.record(R.string,_typeutils.valuesOf.call(void 0, _internationalization.LanguageKey)),regionToCountry:R.record(R.string,_typeutils.valuesOf.call(void 0, {..._privacytypes.IsoCountryCode,[A]:A})),regionToCountrySubDivision:R.record(R.string,_typeutils.valuesOf.call(void 0, {..._privacytypes.IsoCountrySubdivisionCode,[A]:A})),statusToRequestStatus:R.record(R.string,_typeutils.valuesOf.call(void 0, {..._privacytypes.CompletedRequestStatus,[A]:A}))}),Te= exports.i =R.type({id:R.string,link:R.string,rowIndex:R.number,coreIdentifier:R.string,attemptedAt:R.string}),st= exports.j =R.type({failingRequests:R.array(R.record(R.string,R.any)),successfulRequests:R.array(Te),duplicateRequests:R.array(R.type({rowIndex:R.number,coreIdentifier:R.string,attemptedAt:R.string}))});var _inquirer = require('inquirer'); var _inquirer2 = _interopRequireDefault(_inquirer);var _fuzzysearch = require('fuzzysearch'); var _fuzzysearch2 = _interopRequireDefault(_fuzzysearch);function Ae(n,e){return _fuzzysearch2.default.call(void 0, n.toLowerCase(),e.toLowerCase())||_fuzzysearch2.default.call(void 0, e.toLowerCase(),n.toLowerCase())}function ae(n,e,s,l){let a=n.filter(o=>Ae(e.toLowerCase(),o.toLowerCase()));return[...a,new _inquirer2.default.Separator,...s?[]:[A],...l?[pe]:[],...n.filter(o=>!a.includes(o))]}var _inquirerautocompleteprompt = require('inquirer-autocomplete-prompt'); var _inquirerautocompleteprompt2 = _interopRequireDefault(_inquirerautocompleteprompt);async function te(n,e,s){_inquirer2.default.registerPrompt("autocomplete",_inquirerautocompleteprompt2.default);let l=n.map(o=>o||"<blank>").filter(o=>!s[o]);if(l.length===0)return s;let a=await _inquirer2.default.prompt(l.map(o=>({name:o,message:`Map value of: ${o}`,type:"autocomplete",default:e.find(i=>Ae(o,i)),source:(i,r)=>r?e.filter(t=>typeof t=="string"&&Ae(r,t)):e})));return{...s,..._typeutils.apply.call(void 0, a,o=>typeof o=="string"?o:Object.values(o)[0])}}function Ee(n){return n.split(",").map(e=>e.trim()).filter(e=>e)}var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var at=re.type({key:re.string,values:re.array(re.string)});function ut(n){let e=n.map(s=>{let[l,a]=s.trim().split(":");if(!a)throw new Error("Expected attributes in key:value1;value2,key2:value3;value4");let o=a.split(";");return{key:l,values:o}});return _chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Attributes to apply to all requests:")),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(JSON.stringify(e,null,2))),e}var _sync = require('csv-parse/sync');var _fs = require('fs');function ct(n,e,s={columns:!0}){let l=_sync.parse.call(void 0, _fs.readFileSync.call(void 0, n,"utf-8"),s);return _typeutils.decodeCodec.call(void 0, lt.array(e),l).map(i=>Object.entries(i).reduce((r,[t,y])=>Object.assign(r,{[t.replace(/[^a-z_.+\-A-Z -~]/g,"")]:y}),{}))}function G(n,e){return _chunkT7B5NTGFcjs.j.call(void 0, n.map(s=>s[e]||"").flat())}async function pt(n){let e=_chunkT7B5NTGFcjs.j.call(void 0, n.map(a=>Object.keys(a)).flat()),s=n,l=!0;for(;l;){let{filterColumnName:a}=await _inquirer2.default.prompt([{name:"filterColumnName",message:`If you need to filter the list of requests to import, choose the column to filter on. Currently ${s.length} rows.`,type:"list",default:e,choices:[A,...e]}]);if(l=A!==a,l){let o=G(s,a),{valuesToKeep:i}=await _inquirer2.default.prompt([{name:"valuesToKeep",message:"Keep rows matching this value",type:"checkbox",default:e,choices:o}]);s=s.filter(r=>i.includes(r[a]))}}return _chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Importing ${s.length} requests`)),s}var _cliprogress = require('cli-progress'); var _cliprogress2 = _interopRequireDefault(_cliprogress);async function Us({requestActions:n,auth:e,requestIds:s,statuses:l=[_privacytypes.RequestStatus.Compiling,_privacytypes.RequestStatus.RequestMade,_privacytypes.RequestStatus.Delayed,_privacytypes.RequestStatus.Approving,_privacytypes.RequestStatus.Secondary,_privacytypes.RequestStatus.Enriching,_privacytypes.RequestStatus.Waiting,_privacytypes.RequestStatus.SecondaryApproving],createdAtAfter:a,createdAtBefore:o,concurrency:i=100,transcendUrl:r=_chunkHVTVWP7Kcjs.e}){let t=_chunk4VUILSBXcjs.se.call(void 0, r,e),y=new Date().getTime(),c=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),g=await _chunk4VUILSBXcjs.Be.call(void 0, t,{actions:n,statuses:l,createdAtBefore:o,createdAtAfter:a,isSilent:!1,requestIds:s});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Marking "${g.length}" as silent mode.`));let m=0;c.start(g.length,0),await _chunk4VUILSBXcjs.b.call(void 0, g,async f=>{await _chunk4VUILSBXcjs.ac.call(void 0, t,_chunk4VUILSBXcjs._,{input:{id:f.id,isSilent:!0}}),m+=1,c.update(m)},{concurrency:i}),c.stop();let p=new Date().getTime()-y;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully marked ${m} requests as silent mode in "${p/1e3}" seconds!`)),g.length}async function gt(n,e){let s=_typeutils.getValues.call(void 0, ne).filter(a=>!e.getValue("columnNames",a)),l=s.length===0?{}:await _inquirer2.default.prompt(s.map(a=>{let o=_chunkT7B5NTGFcjs.h.call(void 0, a.replace("ColumnName","")),i=ae(n,o,et[a],!!tt[a]);return{name:a,message:`Choose the column that will be used to map in the field: ${o}`,type:"list",default:i[0],choices:i}}));return await Promise.all(_typeutils.getEntries.call(void 0, l).map(([a,o])=>e.setValue(o,"columnNames",a))),l}async function yt(n,e,{state:s,columnNameMap:l}){let a=f=>s.getValue("columnNames",f)||l[f],{internalSubjects:o}=await _chunk4VUILSBXcjs.ac.call(void 0, n,_chunk4VUILSBXcjs.y);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for request action"));let i=await te(G(e,a("requestType")),Object.values(_privacytypes.RequestAction),s.getValue("requestTypeToRequestAction"));await s.setValue(i,"requestTypeToRequestAction"),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for subject"));let r=await te(G(e,a("subjectType")),o.map(({type:f})=>f),s.getValue("subjectTypeToSubjectName"));await s.setValue(r,"subjectTypeToSubjectName"),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for locale"));let t=await te(G(e,a("locale")),Object.values(_internationalization.LanguageKey),s.getValue("languageToLocale"));await s.setValue(t,"languageToLocale"),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for request status")),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for request status"));let y=a("requestStatus"),c=y===A?{}:await te(G(e,y),[...Object.values(_privacytypes.CompletedRequestStatus),A],s.getValue("statusToRequestStatus"));await s.setValue(c,"statusToRequestStatus"),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for country"));let g=a("country"),m=g===A?{}:await te(G(e,g),[...Object.values(_privacytypes.IsoCountryCode),A],s.getValue("regionToCountry"));await s.setValue(m,"regionToCountry"),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for country sub division"));let d=a("countrySubDivision"),p=d===A?{}:await te(G(e,d),[...Object.values(_privacytypes.IsoCountrySubdivisionCode),A],s.getValue("regionToCountrySubDivision"));await s.setValue(p,"regionToCountrySubDivision")}var _iotstypes = require('io-ts-types');var Pr=D.record(D.string,D.array(D.intersection([D.type({value:D.string}),D.partial({name:D.string})]))),ho= exports.x =D.intersection([D.type({email:D.string,attestedExtraIdentifiers:Pr,coreIdentifier:D.string,requestType:_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction),subjectType:D.string}),D.partial({country:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode),countrySubDivision:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode),attributes:D.array(at),status:_typeutils.valuesOf.call(void 0, _privacytypes.CompletedRequestStatus),createdAt:_iotstypes.DateFromISOString,dataSiloIds:D.array(D.string),locale:_typeutils.valuesOf.call(void 0, _internationalization.LanguageKey)})]);function Dr(n,e,s){if(e===_privacytypes.IdentifierType.Email)return n.toLowerCase();if(e===_privacytypes.IdentifierType.Phone){let l=n.replace(_privacytypes.NORMALIZE_PHONE_NUMBER,"").replace(/[()]/g,"").replace(/[–]/g,"").replace(/[:]/g,"").replace(/[]/g,"").replace(/[A-Za-z]/g,"");return l?l.startsWith("+")?l:`+${s}${l}`:""}return n}function qt(n,e,{columnNameMap:s,identifierNameMap:l,attributeNameMap:a,requestAttributeKeys:o,defaultPhoneCountryCode:i="1"}){let r=t=>e.getValue("columnNames",t)||s[t];return n.map(t=>{let y={};Object.entries(l).filter(([,d])=>d!==A).forEach(([d,p])=>{let f=Object.values(_privacytypes.IdentifierType).includes(d)?d:_privacytypes.IdentifierType.Custom,h=t[p];if(h){let S=Dr(h,f,i);S&&(y[f]||(y[f]=[]),y[f].push({value:S,name:d}))}});let c=[];Object.entries(a).filter(([,d])=>d!==A).forEach(([d,p])=>{let f=t[p];if(f){let h=_optionalChain([o, 'access', _2 => _2.find, 'call', _3 => _3(S=>S.name===d), 'optionalAccess', _4 => _4.type])==="MULTI_SELECT";c.push({values:h?Ee(f):f,key:d})}});let g=r("requestType"),m=r("subjectType");return[t,{email:t[r("email")],attestedExtraIdentifiers:y,attributes:c,coreIdentifier:t[r("coreIdentifier")],requestType:g===pe?e.getValue("requestTypeToRequestAction",De):e.getValue("requestTypeToRequestAction",t[g]),subjectType:m===pe?e.getValue("subjectTypeToSubjectName",De):e.getValue("subjectTypeToSubjectName",t[m]),...r("locale")!==A&&t[r("locale")]?{locale:e.getValue("languageToLocale",t[r("locale")])}:{},...r("country")!==A&&t[r("country")]?{country:e.getValue("regionToCountry",t[r("country")])}:{},...r("countrySubDivision")!==A&&t[r("countrySubDivision")]?{countrySubDivision:e.getValue("regionToCountrySubDivision",t[r("countrySubDivision")])}:{},...r("requestStatus")!==A&&e.getValue("statusToRequestStatus",t[r("requestStatus")])!==A&&t[r("requestStatus")]?{status:e.getValue("statusToRequestStatus",t[r("requestStatus")])}:{},...r("createdAt")!==A&&t[r("createdAt")]?{createdAt:new Date(t[r("createdAt")])}:{},...r("dataSiloIds")!==A&&t[r("dataSiloIds")]?{dataSiloIds:Ee(t[r("dataSiloIds")])}:{}}]})}var St=q.type({defaultMessage:q.string,id:q.string}),xr= exports.B =q.type({downloadKey:q.string,error:q.union([q.null,q.string]),mimetype:q.string,size:q.string,fileName:q.string,dataPoint:q.type({id:q.string,title:q.union([St,q.null]),description:q.union([St,q.null]),name:q.string,slug:q.string,encryption:q.union([_typeutils.valuesOf.call(void 0, _privacytypes.TableEncryptionType),q.null]),dataSilo:q.type({id:q.string,title:q.string,description:q.string,type:q.string,outerType:q.union([q.string,q.null])}),path:q.array(q.string)})}),Lr= exports.C =q.type({nodes:q.array(xr),totalCount:q.number,_links:q.partial({next:q.union([q.string,q.null]),previous:q.union([q.string,q.null])})});async function bt(n,{sombra:e,concurrency:s=5,limit:l=100}){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Pulling file metadata for ${n.length} requests`));let a=new Date().getTime(),o=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),i=0;o.start(n.length,0);let r=await _chunk4VUILSBXcjs.b.call(void 0, n,async c=>{let g=[],m=!0,d=0;for(;m;){let p;try{let f=await e.get(`v1/data-subject-request/${c.id}/download-keys`,{searchParams:{limit:l,offset:d}}).json();p=_typeutils.decodeCodec.call(void 0, Lr,f),g.push(...p.nodes),d+=l,m=!!p._links.next&&p.nodes.length===l}catch(f){throw new Error(`Received an error from server: ${_optionalChain([f, 'optionalAccess', _5 => _5.response, 'optionalAccess', _6 => _6.body])||_optionalChain([f, 'optionalAccess', _7 => _7.message])}`)}}return i+=1,o.update(i),[c,g]},{concurrency:s});o.stop();let y=new Date().getTime()-a;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully downloaded file metadata ${n.length} requests in "${y/1e3}" seconds!`)),r}async function Tt(n,{requestId:e,sombra:s,onFileDownloaded:l,concurrency:a=20}){await _chunk4VUILSBXcjs.b.call(void 0, n,async o=>{try{await s.get("v1/files",{searchParams:{downloadKey:o.downloadKey}}).buffer().then(i=>l(o,i))}catch(i){if(_optionalChain([i, 'optionalAccess', _8 => _8.response, 'optionalAccess', _9 => _9.body, 'optionalAccess', _10 => _10.includes, 'call', _11 => _11("fileMetadata#verify")])){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to pull file for: ${o.fileName} (request:${e}) - JWT expired. This likely means that the file is no longer available. Try restarting the request from scratch in Transcend Admin Dashboard. Skipping the download of this file.`));return}throw new Error(`Received an error from server: ${_optionalChain([i, 'optionalAccess', _12 => _12.response, 'optionalAccess', _13 => _13.body])||_optionalChain([i, 'optionalAccess', _14 => _14.message])}`)}},{concurrency:a})}var _path = require('path');async function Uo({auth:n,folderPath:e,requestIds:s,createdAtBefore:l,sombraAuth:a,createdAtAfter:o,statuses:i=[_privacytypes.RequestStatus.Approving,_privacytypes.RequestStatus.Downloadable],concurrency:r=5,transcendUrl:t=_chunkHVTVWP7Kcjs.e,approveAfterDownload:y=!1}){let c=_chunk4VUILSBXcjs.se.call(void 0, t,n),g=await _chunk4VUILSBXcjs.te.call(void 0, t,n,a);_fs.existsSync.call(void 0, e)||_fs.mkdirSync.call(void 0, e);let m=await _chunk4VUILSBXcjs.Be.call(void 0, c,{actions:[_privacytypes.RequestAction.Access],createdAtBefore:l,createdAtAfter:o,statuses:i,requestIds:s}),d=await bt(m,{sombra:g,concurrency:r}),p=new Date().getTime(),f=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),h=0,S=0;f.start(m.length,0),await _chunk4VUILSBXcjs.b.call(void 0, d,async([v,x])=>{let K=_path.join.call(void 0, e,v.id);_fs.existsSync.call(void 0, K)||_fs.mkdirSync.call(void 0, K),await Tt(x,{sombra:g,requestId:v.id,onFileDownloaded:($,_)=>{let z=_path.join.call(void 0, K,$.fileName),j=_path.dirname.call(void 0, z);_fs.existsSync.call(void 0, j)||_fs.mkdirSync.call(void 0, j,{recursive:!0}),_fs.writeFileSync.call(void 0, z,_)}}),y&&v.status===_privacytypes.RequestStatus.Approving&&(await _chunk4VUILSBXcjs.ac.call(void 0, c,_chunk4VUILSBXcjs.Y,{input:{requestId:v.id}}),S+=1),h+=1,f.update(h)},{concurrency:r}),f.stop();let T=new Date().getTime()-p;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully downloaded ${h} requests in "${T/1e3}" seconds!`)),S>0&&_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Approved ${S} requests in Transcend.`)),m.length}var Le=I.type({id:I.string,link:I.string,status:_typeutils.valuesOf.call(void 0, _privacytypes.RequestStatus),type:_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction),subjectType:I.string,email:I.union([I.null,I.string]),coreIdentifier:I.string,isSilent:I.boolean,isTest:I.boolean,country:I.union([I.null,_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode)]),countrySubDivision:I.union([I.null,_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode)]),attributeValues:I.array(I.type({attributeKey:I.type({name:I.string}),name:I.string}))});async function It(n,e,{details:s="",isTest:l=!1,emailIsVerified:a=!0,skipSendingReceipt:o=!1,isSilent:i=!0,additionalAttributes:r=[]}={}){let t=[...r];(e.attributes||[]).forEach(g=>{let m=t.find(d=>d.key===g.key);m?(m.values.push(...g.values),m.values=_chunkT7B5NTGFcjs.j.call(void 0, m.values)):t.push(g)});let y;try{y=await n.post("v1/data-subject-request",{json:{type:e.requestType,subject:{coreIdentifier:e.coreIdentifier,email:e.email,emailIsVerified:a,attestedExtraIdentifiers:e.attestedExtraIdentifiers},subjectType:e.subjectType,isSilent:i,isTest:l,skipSendingReceipt:o,...e.locale?{locale:e.locale}:{},details:s,attributes:t,...e.country||e.countrySubDivision?{region:{...e.country?{country:e.country}:e.countrySubDivision?{country:e.countrySubDivision.split("-")[0]}:{},...e.countrySubDivision?{countrySubDivision:e.countrySubDivision}:{}}}:{},...e.createdAt?{createdAt:e.createdAt}:{},...e.dataSiloIds?{dataSiloIds:e.dataSiloIds}:{},...e.status?{completedRequestStatus:e.status}:{}}}).json()}catch(g){throw new Error(`Received an error from server: ${_optionalChain([g, 'optionalAccess', _15 => _15.response, 'optionalAccess', _16 => _16.body])||_optionalChain([g, 'optionalAccess', _17 => _17.message])}`)}let{request:c}=_typeutils.decodeCodec.call(void 0, I.type({request:Le}),y);return c}async function oi({requestActions:n,requestOrigins:e,auth:s,silentModeBefore:l,createdAtAfter:a,createdAtBefore:o,concurrency:i=50,transcendUrl:r=_chunkHVTVWP7Kcjs.e}){let t=_chunk4VUILSBXcjs.se.call(void 0, r,s),y=new Date().getTime(),c=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),g=await _chunk4VUILSBXcjs.Be.call(void 0, t,{actions:n,statuses:[_privacytypes.RequestStatus.Approving],createdAtAfter:a,origins:e,createdAtBefore:o});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Approving "${g.length}" requests.`));let m=0,d=0;c.start(g.length,0),await _chunk4VUILSBXcjs.b.call(void 0, g,async h=>{l&&new Date(l)>new Date(h.createdAt)&&await _chunk4VUILSBXcjs.ac.call(void 0, t,_chunk4VUILSBXcjs._,{input:{id:h.id,isSilent:!0}});try{await _chunk4VUILSBXcjs.ac.call(void 0, t,_chunk4VUILSBXcjs.Y,{input:{requestId:h.id}})}catch(S){S.message.includes("Request must be in an approving state,")&&(d+=1)}m+=1,c.update(m)},{concurrency:i}),c.stop();let f=new Date().getTime()-y;return d>0&&_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`${d} requests were skipped.`)),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully approved ${m} requests in "${f/1e3}" seconds!`)),g.length}async function fi({requestActions:n=Object.values(_privacytypes.RequestAction),auth:e,requestIds:s,createdAtBefore:l,days:a=45,daysLeft:o=10,createdAtAfter:i,emailTemplate:r="Additional Time Needed",concurrency:t=100,transcendUrl:y=_chunkHVTVWP7Kcjs.e}){let c=_chunk4VUILSBXcjs.se.call(void 0, y,e),g=new Date().getTime(),m=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),p=(await _chunk4VUILSBXcjs.fd.call(void 0, c,r)).find(T=>T.title===r);if(!p)throw new Error(`Failed to find a template with title: "${r}"`);let f=await _chunk4VUILSBXcjs.Be.call(void 0, c,{actions:n,createdAtBefore:l,createdAtAfter:i,isSilent:!1,isClosed:!1,requestIds:s});f=f.filter(T=>typeof T.daysRemaining=="number"&&T.daysRemaining<o),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Notifying "${f.length}" that more time is needed.`));let h=0;m.start(f.length,0),await _chunk4VUILSBXcjs.b.call(void 0, f,async T=>{await _chunk4VUILSBXcjs.ac.call(void 0, c,_chunk4VUILSBXcjs.$,{input:{requestId:T.id,template:p.template.defaultMessage,subject:p.subject.defaultMessage,additionalTime:a}}),h+=1,m.update(h)},{concurrency:t}),m.stop();let N=new Date().getTime()-g;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully marked ${h} requests as silent mode in "${N/1e3}" seconds!`)),f.length}async function vt(n,e,s){let{initializer:l}=await _chunk4VUILSBXcjs.ac.call(void 0, n,_chunk4VUILSBXcjs.q),a=l.identifiers.filter(({name:i})=>!s.getValue("identifierNames",i)&&!be.includes(i)),o=a.length===0?{}:await _inquirer2.default.prompt(a.map(({name:i})=>{let r=ae(e,i,!1);return{name:i,message:`Choose the column that will be used to map in the identifier: ${i}`,type:"list",default:r[0],choices:r}}));return await Promise.all(Object.entries(o).map(([i,r])=>s.setValue(r,"identifierNames",i))),{...s.getValue("identifierNames"),...o}}async function Ni({requestActions:n,cancellationTitle:e,auth:s,requestIds:l,silentModeBefore:a,createdAtBefore:o,createdAtAfter:i,statuses:r=[_privacytypes.RequestStatus.Compiling,_privacytypes.RequestStatus.RequestMade,_privacytypes.RequestStatus.Delayed,_privacytypes.RequestStatus.Approving,_privacytypes.RequestStatus.Secondary,_privacytypes.RequestStatus.Enriching,_privacytypes.RequestStatus.Waiting,_privacytypes.RequestStatus.SecondaryApproving],concurrency:t=50,transcendUrl:y=_chunkHVTVWP7Kcjs.e}){let c=_chunk4VUILSBXcjs.se.call(void 0, y,s),g=new Date().getTime(),m=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),d;if(e){let T=(await _chunk4VUILSBXcjs.fd.call(void 0, c,e)).find(v=>v.title===e);if(!T)throw new Error(`Failed to find a template with title: "${e}"`);d=T}let p=await _chunk4VUILSBXcjs.Be.call(void 0, c,{actions:n,createdAtBefore:o,createdAtAfter:i,statuses:r,requestIds:l});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Canceling "${p.length}" requests${d?` Using template: ${d.title}`:""}.`));let f=0;m.start(p.length,0),await _chunk4VUILSBXcjs.b.call(void 0, p,async N=>{a&&new Date(a)>new Date(N.createdAt)&&await _chunk4VUILSBXcjs.ac.call(void 0, c,_chunk4VUILSBXcjs._,{input:{id:N.id,isSilent:!0}}),await _chunk4VUILSBXcjs.ac.call(void 0, c,_chunk4VUILSBXcjs.Z,{input:{requestId:N.id,...d?{subject:`Re: ${d.subject.defaultMessage}`,template:d.template.defaultMessage}:{}}}),f+=1,m.update(f)},{concurrency:t}),m.stop();let S=new Date().getTime()-g;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully canceled ${f} requests in "${S/1e3}" seconds!`)),p.length}async function Lt(n,e,s,l){let a=l.filter(({name:i})=>!s.getValue("attributeNames",i)),o=a.length===0?{}:await _inquirer2.default.prompt(a.map(({name:i})=>{let r=ae(e,i,!1);return{name:i,message:`Choose the column that will be used to map in the attribute: ${i}`,type:"list",default:r[0],choices:r}}));return await Promise.all(Object.entries(o).map(([i,r])=>s.setValue(r,"attributeNames",i))),{...s.getValue("attributeNames"),...o}}var $t=/{\\"message\\":\\"(.+?)\\",/;function Ie(n){return $t.test(n)?$t.exec(n)[1]:null}var _persistedstate = require('@transcend-io/persisted-state');async function sn({cacheFilepath:n,requestReceiptFolder:e,file:s,auth:l,sombraAuth:a,concurrency:o=100,defaultPhoneCountryCode:i="1",transcendUrl:r=_chunkHVTVWP7Kcjs.e,attributes:t=[],emailIsVerified:y=!0,skipFilterStep:c=!1,skipSendingReceipt:g=!0,isTest:m=!1,isSilent:d=!0,debug:p=!1,dryRun:f=!1}){let h=new Date().getTime(),S=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),N=ut(t),T=new (0, _persistedstate.PersistedState)(n,rt,{columnNames:{},requestTypeToRequestAction:{},subjectTypeToSubjectName:{},languageToLocale:{},statusToRequestStatus:{},identifierNames:{},attributeNames:{},regionToCountrySubDivision:{},regionToCountry:{}}),v=_path.join.call(void 0, e,`tr-request-upload-${new Date().toISOString()}-${s.split("/").pop()}`.replace(".csv",".json")),x=new (0, _persistedstate.PersistedState)(v,st,{successfulRequests:[],duplicateRequests:[],failingRequests:[]}),K=await _chunk4VUILSBXcjs.te.call(void 0, r,l,a),$=ct(s,de.record(de.string,de.string)),_=_chunkT7B5NTGFcjs.j.call(void 0, $.map(U=>Object.keys(U)).flat());if($.length===0)throw new Error("No Requests found in list! Ensure the first row of the CSV is a header and the rest are requests.");if(p){let U=$[0];_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`First request: ${JSON.stringify(U,null,2)}`))}let z=c?$:await pt($),j=_chunk4VUILSBXcjs.se.call(void 0, r,l),L=await _chunk4VUILSBXcjs.ze.call(void 0, j),B=await gt(_,T),Y=await vt(j,_,T),k=await Lt(j,_,T,L);await yt(j,z,{state:T,columnNameMap:B});let O=qt(z,T,{defaultPhoneCountryCode:i,columnNameMap:B,identifierNameMap:Y,attributeNameMap:k,requestAttributeKeys:L});p||S.start(O.length,0);let X=0;await _chunk4VUILSBXcjs.b.call(void 0, O,async([U,V],Q)=>{let _e=p?`email:${V.email} | coreIdentifier:${V.coreIdentifier}`:`row:${Q.toString()}`;if(p&&_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`[${Q+1}/${O.length}] Importing: ${JSON.stringify(V,null,2)}`)),f){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Bailing out on dry run because dryRun is set"));return}try{let ee=await It(K,V,{details:`Uploaded by Transcend Cli: "tr-request-upload" : ${JSON.stringify(U,null,2)}`,isTest:m,emailIsVerified:y,skipSendingReceipt:g,isSilent:d,additionalAttributes:N});p&&(_chunkZUNVPK23cjs.a.info(_colors2.default.green(`[${Q+1}/${O.length}] Successfully submitted the test data subject request: "${_e}"`)),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`[${Q+1}/${O.length}] View it at: "${ee.link}"`)));let oe=x.getValue("successfulRequests");oe.push({id:ee.id,link:ee.link,rowIndex:Q,coreIdentifier:ee.coreIdentifier,attemptedAt:new Date().toISOString()}),await x.setValue(oe,"successfulRequests")}catch(ee){let oe=`${ee.message} - ${JSON.stringify(_optionalChain([ee, 'access', _18 => _18.response, 'optionalAccess', _19 => _19.body]),null,2)}`,Pe=Ie(oe);if(Pe==="Client error: You have already made this request."){p&&_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`[${Q+1}/${O.length}] Skipping request as it is a duplicate`));let le=x.getValue("duplicateRequests");le.push({coreIdentifier:V.coreIdentifier,rowIndex:Q,attemptedAt:new Date().toISOString()}),await x.setValue(le,"duplicateRequests")}else{let le=x.getValue("failingRequests");le.push({...V,rowIndex:Q,error:Pe||oe,attemptedAt:new Date().toISOString()}),await x.setValue(le,"failingRequests"),p&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(Pe||oe)),_chunkZUNVPK23cjs.a.error(_colors2.default.red(`[${Q+1}/${O.length}] Failed to submit request for: "${_e}"`)))}}X+=1,p||S.update(X)},{concurrency:o}),S.stop();let ue=new Date().getTime()-h;_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Completed upload in "${ue/1e3}" seconds.`)),x.getValue("duplicateRequests").length>0&&_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`Encountered "${x.getValue("duplicateRequests").length}" duplicate requests. See "${v}" to review the core identifiers for these requests.`)),x.getValue("failingRequests").length>0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Encountered "${x.getValue("failingRequests").length}" errors. See "${v}" to review the error messages and inputs.`)),process.exit(1))}async function _t(n,e,{sendEmailReceipt:s=!1,skipWaitingPeriod:l=!1,emailIsVerified:a=!0,requestIdentifiers:o=[]}={}){let i=await n.post("v1/data-subject-request",{json:{type:e.type,subject:{coreIdentifier:e.coreIdentifier,email:e.email,emailIsVerified:a,...o.length>0?{attestedExtraIdentifiers:_typeutils.apply.call(void 0, _chunkT7B5NTGFcjs.d.call(void 0, o.filter(t=>!(t.name==="email"&&t.value===e.email)&&!be.includes(t.name)).map(t=>({...t,type:Object.values(_privacytypes.IdentifierType).includes(t.name)?t.name:_privacytypes.IdentifierType.Custom})),"type"),(t,y)=>t.map(({name:c,value:g})=>({...y===_privacytypes.IdentifierType.Custom?{name:c}:{},value:g})))}:{}},requestId:e.id,subjectType:e.subjectType,isSilent:e.isSilent,isTest:e.isTest,locale:e.locale,skipWaitingPeriod:l,createdAt:e.createdAt,details:`Restarted by Transcend cli: "tr-request-restart" - ${e.details}`,skipSendingReceipt:!s}}).json(),{request:r}=_typeutils.decodeCodec.call(void 0, Ft.type({request:Le}),i);return r}var Hr=M.intersection([Te,M.type({error:M.string})]),Xr=M.type({restartedRequests:M.array(Te),failingRequests:M.array(Hr)});async function wn({requestReceiptFolder:n,auth:e,sombraAuth:s,requestActions:l,requestStatuses:a,createdAtBefore:o,createdAtAfter:i,transcendUrl:r=_chunkHVTVWP7Kcjs.e,requestIds:t=[],createdAt:y=new Date,silentModeBefore:c,sendEmailReceipt:g=!1,emailIsVerified:m=!0,copyIdentifiers:d=!1,skipWaitingPeriod:p=!1,concurrency:f=20}){let h=new Date().getTime(),S=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),N=_path.join.call(void 0, n,`tr-request-restart-${new Date().toISOString()}`),T=new (0, _persistedstate.PersistedState)(N,Xr,{restartedRequests:[],failingRequests:[]}),v=await _chunk4VUILSBXcjs.te.call(void 0, r,e,s),x=_chunk4VUILSBXcjs.se.call(void 0, r,e),$=(await _chunk4VUILSBXcjs.Be.call(void 0, x,{actions:l,statuses:a,createdAtBefore:o,createdAtAfter:i})).filter(L=>new Date(L.createdAt)<y);if(_chunkZUNVPK23cjs.a.info(`Found ${$.length} requests to process`),d&&_chunkZUNVPK23cjs.a.info("copyIdentifiers detected - All Identifiers will be copied."),g&&_chunkZUNVPK23cjs.a.info("sendEmailReceipt detected - Email receipts will be sent."),p&&_chunkZUNVPK23cjs.a.info("skipWaitingPeriod detected - Waiting period will be skipped."),t.length>0&&t.length!==$.length){let L=_chunkT7B5NTGFcjs.c.call(void 0, t,$.map(({id:B})=>B));L.length>0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to find the following requests by ID: ${L.join(",")}.`)),process.exit(1))}let _=0;S.start($.length,0),await _chunk4VUILSBXcjs.b.call(void 0, $,async(L,B)=>{try{let Y=d?await _chunk4VUILSBXcjs.De.call(void 0, x,v,{requestId:L.id}):[],k=await _t(v,{...L,isSilent:c&&new Date(L.createdAt)<c?!0:L.isSilent},{requestIdentifiers:Y,skipWaitingPeriod:p,sendEmailReceipt:g,emailIsVerified:m}),O=T.getValue("restartedRequests");O.push({id:k.id,link:k.link,rowIndex:B,coreIdentifier:k.coreIdentifier,attemptedAt:new Date().toISOString()}),await T.setValue(O,"restartedRequests")}catch(Y){let k=`${Y.message} - ${JSON.stringify(_optionalChain([Y, 'access', _20 => _20.response, 'optionalAccess', _21 => _21.body]),null,2)}`,O=Ie(k),X=T.getValue("failingRequests");X.push({id:L.id,link:L.link,rowIndex:B,coreIdentifier:L.coreIdentifier,attemptedAt:new Date().toISOString(),error:O||k}),await T.setValue(X,"failingRequests")}_+=1,S.update(_)},{concurrency:f}),S.stop();let j=new Date().getTime()-h;_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Completed restarting of requests in "${j/1e3}" seconds.`)),T.getValue("failingRequests").length>0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Encountered "${T.getValue("failingRequests").length}" errors. See "${N}" to review the error messages and inputs.`)),process.exit(1))}async function Ln({enricherIds:n,auth:e,concurrency:s=100,transcendUrl:l=_chunkHVTVWP7Kcjs.e}){let a=_chunk4VUILSBXcjs.se.call(void 0, l,e),o=new Date().getTime(),i=await _chunk4VUILSBXcjs.Be.call(void 0, a,{statuses:[_privacytypes.RequestStatus.Enriching]});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Processing enricher: "${n.join(",")}" fetched "${i.length}" in enriching status.`));let r=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),t=0;r.start(i.length,0);let y=0;await _chunk4VUILSBXcjs.b.call(void 0, i,async m=>{let p=(await _chunk4VUILSBXcjs.Ee.call(void 0, a,{requestId:m.id})).filter(f=>n.includes(f.enricher.id)&&![_privacytypes.RequestEnricherStatus.Resolved,_privacytypes.RequestEnricherStatus.Skipped].includes(f.status));p.length>0&&await _chunk4VUILSBXcjs.a.call(void 0, p,async f=>{try{await _chunk4VUILSBXcjs.ac.call(void 0, a,_chunk4VUILSBXcjs.ea,{requestEnricherId:f.id}),y+=1}catch(h){if(!h.message.includes("Client error: Cannot skip Request enricher because it has already completed"))throw h}}),t+=1,r.update(t)},{concurrency:s}),r.stop();let g=new Date().getTime()-o;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully skipped "${y}" for "${i.length}" requests in "${g/1e3}" seconds!`)),i.length}async function Qn({auth:n,requestActions:e=[],createdAtBefore:s,createdAtAfter:l,transcendUrl:a=_chunkHVTVWP7Kcjs.e,requestEnricherStatuses:o=Object.values(_privacytypes.RequestEnricherStatus),requestIds:i=[],enricherId:r,concurrency:t=20}){let y=new Date().getTime(),c=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),g=_chunk4VUILSBXcjs.se.call(void 0, a,n);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Fetching requests to restart..."));let m=await _chunk4VUILSBXcjs.Be.call(void 0, g,{actions:e,statuses:[_privacytypes.RequestStatus.Enriching],createdAtBefore:s,createdAtAfter:l,requestIds:i}),d=0;if(i.length>0&&i.length!==m.length){let S=_chunkT7B5NTGFcjs.c.call(void 0, i,m.map(({id:N})=>N));S.length>0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to find the following requests by ID: ${S.join(",")}.`)),process.exit(1))}let p=0;c.start(m.length,0),await _chunk4VUILSBXcjs.b.call(void 0, m,async S=>{let T=(await _chunk4VUILSBXcjs.Ee.call(void 0, g,{requestId:S.id})).filter(v=>v.enricher.id===r&&o.includes(v.status));await _chunk4VUILSBXcjs.b.call(void 0, T,async v=>{await _chunk4VUILSBXcjs.ve.call(void 0, g,v.id),d+=1}),p+=1,c.update(p)},{concurrency:t}),c.stop();let h=new Date().getTime()-y;_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Completed restarting of ${m.length} requests and ${d} enrichers in "${h/1e3}" seconds.`))}async function ea({requestActions:n,dataSiloId:e,auth:s,concurrency:l=20,transcendUrl:a=_chunkHVTVWP7Kcjs.e}){let o=_chunk4VUILSBXcjs.se.call(void 0, a,s),i=new Date().getTime(),r=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),t=await _chunk4VUILSBXcjs.Be.call(void 0, o,{actions:n,statuses:[_privacytypes.RequestStatus.Compiling,_privacytypes.RequestStatus.Approving]});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Retrying requests for Data Silo: "${e}", restarting "${t.length}" requests.`));let y=0,c=0;r.start(t.length,0),await _chunk4VUILSBXcjs.b.call(void 0, t,async d=>{try{let p=await _chunk4VUILSBXcjs.Ge.call(void 0, o,{requestId:d.id,dataSiloId:e});await _chunk4VUILSBXcjs.ac.call(void 0, o,_chunk4VUILSBXcjs.xa,{requestDataSiloId:p.id})}catch(p){if(!p.message.includes("Failed to find RequestDataSilo"))throw p;c+=1}y+=1,r.update(y)},{concurrency:l}),r.stop();let m=new Date().getTime()-i;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully notified Transcend in "${m/1e3}" seconds for ${y} requests, ${c} requests were skipped because data silo was not attached to the request!`)),t.length}async function ca({auth:n,sombraAuth:e,actions:s=[],statuses:l=[],identifierSearch:a,pageLimit:o=100,transcendUrl:i=_chunkHVTVWP7Kcjs.e,createdAtBefore:r,createdAtAfter:t,isTest:y}){let c=_chunk4VUILSBXcjs.se.call(void 0, i,n),g=await _chunk4VUILSBXcjs.te.call(void 0, i,n,e),m="";r&&(m+=` before ${r.toISOString()}`),t&&(m+=`${m?", and":""} after ${t.toISOString()}`),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`${s.length>0?`Pulling requests of type "${s.join('" , "')}"`:"Pulling all requests"}${m}`));let d=await _chunk4VUILSBXcjs.Be.call(void 0, c,{actions:s,text:a,statuses:l,createdAtBefore:r,createdAtAfter:t,isTest:y}),p=await _chunk4VUILSBXcjs.b.call(void 0, d,async h=>{let S=await _chunk4VUILSBXcjs.De.call(void 0, c,g,{requestId:h.id});return{...h,requestIdentifiers:S}},{concurrency:o});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Pulled ${p.length} requests`));let f=p.map(({attributeValues:h,requestIdentifiers:S,id:N,email:T,type:v,status:x,subjectType:K,details:$,createdAt:_,country:z,locale:j,origin:L,countrySubDivision:B,isSilent:Y,isTest:k,coreIdentifier:O,...X})=>({"Request ID":N,"Created At":_,Email:T,"Core Identifier":O,"Request Type":v,"Data Subject Type":K,Status:x,Country:z,"Country Sub Division":B,Details:$,Origin:L,"Silent Mode":Y,"Is Test Request":k,Language:j,...X,...Object.entries(_chunkT7B5NTGFcjs.d.call(void 0, h,"attributeKey.name")).reduce((ge,[ue,U])=>Object.assign(ge,{[ue]:U.map(({name:V})=>V).join(",")}),{}),...Object.entries(_chunkT7B5NTGFcjs.d.call(void 0, S,"name")).reduce((ge,[ue,U])=>Object.assign(ge,{[ue]:U.map(({value:V})=>V).join(",")}),{})}));return{requestsWithRequestIdentifiers:p,requestsFormattedForCsv:f}}async function ha({dataSiloId:n,auth:e,concurrency:s=100,status:l="SKIPPED",transcendUrl:a=_chunkHVTVWP7Kcjs.e,requestStatuses:o=[_privacytypes.RequestStatus.Compiling,_privacytypes.RequestStatus.Secondary]}){let i=_chunk4VUILSBXcjs.se.call(void 0, a,e),r=new Date().getTime(),t=await _chunk4VUILSBXcjs.Fe.call(void 0, i,{dataSiloId:n,requestStatuses:o});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Processing data silo: "${n}" marking "${t.length}" requests as skipped.`));let y=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),c=0;y.start(t.length,0),await _chunk4VUILSBXcjs.b.call(void 0, t,async d=>{try{await _chunk4VUILSBXcjs.ac.call(void 0, i,_chunk4VUILSBXcjs.wa,{requestDataSiloId:d.id,status:l})}catch(p){if(!p.message.includes("Client error: Request must be active:"))throw p}c+=1,y.update(c)},{concurrency:s}),y.stop();let m=new Date().getTime()-r;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully skipped "${t.length}" requests in "${m/1e3}" seconds!`)),t.length}async function Ea({requestActions:n,identifierNames:e,auth:s,concurrency:l=20,transcendUrl:a=_chunkHVTVWP7Kcjs.e}){let o=_chunk4VUILSBXcjs.se.call(void 0, a,s),i=new Date().getTime(),r=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),t=await _chunk4VUILSBXcjs.Be.call(void 0, o,{actions:n,statuses:[_privacytypes.RequestStatus.Enriching]});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Fetched requests in preflight/enriching state."));let y=0,c=0;r.start(t.length,0),await _chunk4VUILSBXcjs.b.call(void 0, t,async d=>{let f=(await _chunk4VUILSBXcjs.xe.call(void 0, o,{requestId:d.id})).filter(({isVerifiedAtLeastOnce:h,name:S})=>h===!1&&e.includes(S)).map(({id:h})=>h);f.length>0&&(await _chunk4VUILSBXcjs.ac.call(void 0, o,_chunk4VUILSBXcjs.Ca,{input:{requestId:d.id,requestIdentifierIds:f}}),c+=f.length),y+=1,r.update(y)},{concurrency:l}),r.stop();let m=new Date().getTime()-i;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully cleared out unverified identifiers "${m/1e3}" seconds for ${y} requests, ${c} identifiers were cleared out!`)),t.length}exports.a = A; exports.b = pe; exports.c = De; exports.d = be; exports.e = ne; exports.f = et; exports.g = tt; exports.h = rt; exports.i = Te; exports.j = st; exports.k = Ae; exports.l = ae; exports.m = te; exports.n = Ee; exports.o = at; exports.p = ut; exports.q = ct; exports.r = G; exports.s = pt; exports.t = Us; exports.u = gt; exports.v = yt; exports.w = Pr; exports.x = ho; exports.y = Dr; exports.z = qt; exports.A = St; exports.B = xr; exports.C = Lr; exports.D = bt; exports.E = Tt; exports.F = Uo; exports.G = Le; exports.H = It; exports.I = oi; exports.J = fi; exports.K = vt; exports.L = Ni; exports.M = Lt; exports.N = Ie; exports.O = sn; exports.P = _t; exports.Q = wn; exports.R = Ln; exports.S = Qn; exports.T = ea; exports.U = ca; exports.V = ha; exports.W = Ea;
|
|
2
|
+
//# sourceMappingURL=chunk-V73KHIHK.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/chunk-WIXQSFS6.cjs","../src/lib/requests/constants.ts","../src/lib/requests/fuzzyMatchColumns.ts","../src/lib/requests/mapEnumValues.ts"],"names":["NONE","BULK_APPLY","BLANK","IDENTIFIER_BLOCK_LIST","ColumnName","IS_REQUIRED","CAN_APPLY_IN_BULK","CachedFileState","applyEnum","valuesOf","IsoCountryCode","IsoCountrySubdivisionCode","CompletedRequestStatus","SuccessfulRequest","CachedRequestState","fuzzySearch","word1","word2","fuzzysearch","fuzzyMatchColumns","allColumnNames","fuzzyMapName","isRequired","canApplyAll","matchingColumnNames","x","inquirer","mapEnumValues","csvInputs","expectedOutputs","cache","autoCompletePrompt","inputs","item","value","result"],"mappings":"AAAA,u/BAAuO,wDAAyC,wDAAyC,wDAAiE,qDCAtV,0EACR,2DAMrB,yYACY,IAENA,CAAAA,CAAO,QAAA,CACPC,EAAAA,aAAa,2BAAA,CACbC,EAAAA,aAAQ,SAAA,CAGRC,EAAAA,aAAwB,CAAC,OAAA,CAAS,gBAAgB,CAAA,CAKnDC,EAAAA,aAAAA,CAAAA,CAAAA,EAAAA,CAEVA,CAAAA,CAAA,KAAA,CAAQ,OAAA,CAERA,CAAAA,CAAA,cAAA,CAAiB,gBAAA,CAEjBA,CAAAA,CAAA,WAAA,CAAc,aAAA,CAEdA,CAAAA,CAAA,WAAA,CAAc,aAAA,CAEdA,CAAAA,CAAA,MAAA,CAAS,QAAA,CAETA,CAAAA,CAAA,OAAA,CAAU,SAAA,CAEVA,CAAAA,CAAA,kBAAA,CAAqB,oBAAA,CAErBA,CAAAA,CAAA,aAAA,CAAgB,eAAA,CAEhBA,CAAAA,CAAA,SAAA,CAAY,WAAA,CAEZA,CAAAA,CAAA,WAAA,CAAc,aAAA,CApBJA,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,EAAA,CAAA,CAAA,CAAA,CAwBCC,EAAAA,aAA8C,CACxD,KAAA,CAAmB,CAAA,CAAA,CACnB,cAAA,CAA4B,CAAA,CAAA,CAC5B,WAAA,CAAyB,CAAA,CAAA,CACzB,WAAA,CAAyB,CAAA,CAAA,CACzB,aAAA,CAA2B,CAAA,CAAA,CAC3B,SAAA,CAAuB,CAAA,CAAA,CACvB,WAAA,CAAyB,CAAA,CAAA,CACzB,MAAA,CAAoB,CAAA,CAAA,CACpB,OAAA,CAAqB,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AAAA,CACH,IAAIE,kBAAAA,CAAS,SAAA,CACb,GAAIJ,CAAAA,CAAa,CAAC,CAAA,CAAI,CAACtB,CAAI,CAAA,CAC3B,GAAIuB,CAAAA,CAAc,CAACtB,EAAU,CAAA,CAAI,CAAC,CAAA,CAClC,GAAGmB,CAAAA,CAAe,MAAA,CAAQK,CAAAA,EAAM,CAACD,CAAAA,CAAoB,QAAA,CAASC,CAAC,CAAC,CAClE,CACF,CC7CA,kKAC+B,MAY/B,SAAsBE,EAAAA,CACpBC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CACoC,CACpCJ,kBAAAA,CAAS,cAAA,CAAe,cAAA,CAAgBK,oCAAkB,CAAA,CAE1D,IAAMC,CAAAA,CAASJ,CAAAA,CACZ,GAAA,CAAKK,CAAAA,EAASA,CAAAA,EAAQ,SAAS,CAAA,CAC/B,MAAA,CAAQC,CAAAA,EAAU,CAACJ,CAAAA,CAAMI,CAAK,CAAC,CAAA,CAClC,EAAA,CAAIF,CAAAA,CAAO,MAAA,GAAW,CAAA,CACpB,OAAOF,CAAAA,CAET,IAAMK,CAAAA,CAAS,MAAMT,kBAAAA,CAAS,MAAA,CAC5BM,CAAAA,CAAO,GAAA,CAAKE,CAAAA,EAAAA,CAAW,CACrB,IAAA,CAAMA,CAAAA,CACN,OAAA,CAAS,CAAA,cAAA,EAAiBA,CAAK,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/chunk-WIXQSFS6.cjs","sourcesContent":[null,"import { applyEnum, valuesOf } from '@transcend-io/type-utils';\nimport { LanguageKey } from '@transcend-io/internationalization';\nimport {\n CompletedRequestStatus,\n RequestAction,\n IsoCountryCode,\n IsoCountrySubdivisionCode,\n} from '@transcend-io/privacy-types';\nimport * as t from 'io-ts';\n\nexport const NONE = '[NONE]' as const;\nexport const BULK_APPLY = '[APPLY VALUE TO ALL ROWS]' as const;\nexport const BLANK = '<blank>' as const;\n\n/** These are uploaded at the top level of the request */\nexport const IDENTIFIER_BLOCK_LIST = ['email', 'coreIdentifier'];\n\n/**\n * Column names to map\n */\nexport enum ColumnName {\n /** The title of the email column */\n Email = 'email',\n /** The title of the core identifier column */\n CoreIdentifier = 'coreIdentifier',\n /** The title of the requestType column */\n RequestType = 'requestType',\n /** The title of the subjectType column */\n SubjectType = 'subjectType',\n /** The title of the locale column */\n Locale = 'locale',\n /** The country */\n Country = 'country',\n /** The country sub division */\n CountrySubDivision = 'countrySubDivision',\n /** The title of the requestStatus column */\n RequestStatus = 'requestStatus',\n /** The title of the createdAt column */\n CreatedAt = 'createdAt',\n /** The title of the dataSiloIds column */\n DataSiloIds = 'dataSiloIds',\n}\n\n/** These parameters are required in the Transcend DSR API */\nexport const IS_REQUIRED: { [k in ColumnName]: boolean } = {\n [ColumnName.Email]: false,\n [ColumnName.CoreIdentifier]: true,\n [ColumnName.RequestType]: true,\n [ColumnName.SubjectType]: true,\n [ColumnName.RequestStatus]: false,\n [ColumnName.CreatedAt]: false,\n [ColumnName.DataSiloIds]: false,\n [ColumnName.Locale]: false,\n [ColumnName.Country]: false,\n [ColumnName.CountrySubDivision]: false,\n};\n\n/** These parameters can be specified for the entire CSV set if needed */\nexport const CAN_APPLY_IN_BULK: { [k in ColumnName]?: boolean } = {\n [ColumnName.RequestType]: true,\n [ColumnName.SubjectType]: true,\n};\n\n// Cache state\nexport const CachedFileState = t.type({\n /** Mapping between the default request input column names and the CSV column name for that input */\n columnNames: t.partial(applyEnum(ColumnName, () => t.string)),\n /** Mapping between the identifier names and the CSV column name for that input */\n identifierNames: t.record(t.string, t.string),\n /** Mapping between the request attribute inputs and the CSV column name for that input */\n attributeNames: t.record(t.string, t.string),\n /** Mapping between CSV request type and Transcend Request Action */\n requestTypeToRequestAction: t.record(t.string, valuesOf(RequestAction)),\n /** Mapping between CSV data subject type and the name of the data subject in Transcend */\n subjectTypeToSubjectName: t.record(t.string, t.string),\n /** Mapping between language imported and Transcend locale code */\n languageToLocale: t.record(t.string, valuesOf(LanguageKey)),\n /** Mapping between region and country code */\n regionToCountry: t.record(\n t.string,\n valuesOf({ ...IsoCountryCode, [NONE]: NONE }),\n ),\n /** Mapping between region and country sub division code */\n regionToCountrySubDivision: t.record(\n t.string,\n valuesOf({ ...IsoCountrySubdivisionCode, [NONE]: NONE }),\n ),\n /** Mapping between request status in import to Transcend request status */\n statusToRequestStatus: t.record(\n t.string,\n valuesOf({ ...CompletedRequestStatus, [NONE]: NONE }),\n ),\n});\n\n/** Type override */\nexport type CachedFileState = t.TypeOf<typeof CachedFileState>;\n\n/**\n * Successfully processed request\n */\nexport const SuccessfulRequest = t.type({\n id: t.string,\n link: t.string,\n rowIndex: t.number,\n coreIdentifier: t.string,\n attemptedAt: t.string,\n});\n\n/** Type override */\nexport type SuccessfulRequest = t.TypeOf<typeof SuccessfulRequest>;\n\n// Cache state\nexport const CachedRequestState = t.type({\n /** Set of privacy requests that failed to upload */\n failingRequests: t.array(t.record(t.string, t.any)),\n /** Successfully uploaded requests */\n successfulRequests: t.array(SuccessfulRequest),\n /** Duplicate requests */\n duplicateRequests: t.array(\n t.type({\n rowIndex: t.number,\n coreIdentifier: t.string,\n attemptedAt: t.string,\n }),\n ),\n});\n\n/** Type override */\nexport type CachedRequestState = t.TypeOf<typeof CachedRequestState>;\n","import inquirer from 'inquirer';\nimport { NONE, BULK_APPLY } from './constants';\n\nimport fuzzysearch from 'fuzzysearch';\n\n/**\n * Check if word1 and word2 are a fuzzy match of each other.\n * Returns true if word1 is fuzzy match of word2 or vice versa.\n *\n * @param word1 - First word\n * @param word2 - Second word\n * @returns True if words are fuzzy match\n */\nexport function fuzzySearch(word1: string, word2: string): boolean {\n return (\n fuzzysearch(word1.toLowerCase(), word2.toLowerCase()) ||\n fuzzysearch(word2.toLowerCase(), word1.toLowerCase())\n );\n}\n\n/**\n * Fuzzy match column names for a particular field\n *\n * @param allColumnNames - List of all column names\n * @param fuzzyMapName - The name of field being mapped to\n * @param isRequired - When true, don't include \"NONE\" as an option\n * @param canApplyAll - When true, include an option to specify the value in bulk\n * @returns The list of suggestions for inquirer\n */\nexport function fuzzyMatchColumns(\n allColumnNames: string[],\n fuzzyMapName: string,\n isRequired: boolean,\n canApplyAll?: boolean,\n): (string | InstanceType<typeof inquirer.Separator>)[] {\n const matchingColumnNames = allColumnNames.filter((x) =>\n fuzzySearch(fuzzyMapName.toLowerCase(), x.toLowerCase()),\n );\n return [\n ...matchingColumnNames,\n new inquirer.Separator(),\n ...(isRequired ? [] : [NONE]),\n ...(canApplyAll ? [BULK_APPLY] : []),\n ...allColumnNames.filter((x) => !matchingColumnNames.includes(x)),\n ];\n}\n","import inquirer from 'inquirer';\nimport autoCompletePrompt from 'inquirer-autocomplete-prompt';\nimport { apply, ObjByString } from '@transcend-io/type-utils';\nimport { fuzzySearch } from './fuzzyMatchColumns';\n\n/**\n * Map a set of inputs to a set of outputs\n *\n * @param csvInputs - Input list\n * @param expectedOutputs - Output list\n * @param cache - Cache\n * @returns Mapping from row to enum value\n */\nexport async function mapEnumValues<TValue extends string>(\n csvInputs: string[],\n expectedOutputs: TValue[],\n cache: { [k in string]: TValue },\n): Promise<{ [k in string]: TValue }> {\n inquirer.registerPrompt('autocomplete', autoCompletePrompt);\n\n const inputs = csvInputs\n .map((item) => item || '<blank>')\n .filter((value) => !cache[value]);\n if (inputs.length === 0) {\n return cache;\n }\n const result = await inquirer.prompt<{ [k in string]: TValue }>(\n inputs.map((value) => ({\n name: value,\n message: `Map value of: ${value}`,\n type: 'autocomplete',\n default: expectedOutputs.find((x) => fuzzySearch(value, x)),\n source: (answersSoFar: ObjByString, input: string) =>\n !input\n ? expectedOutputs\n : expectedOutputs.filter(\n (x) => typeof x === 'string' && fuzzySearch(input, x),\n ),\n })),\n );\n return {\n ...cache,\n ...apply(result, (r) =>\n typeof r === 'string' ? (r as TValue) : (Object.values(r)[0] as TValue),\n ),\n };\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/cli/cli/dist/chunk-V73KHIHK.cjs","../src/lib/requests/constants.ts","../src/lib/requests/fuzzyMatchColumns.ts","../src/lib/requests/mapEnumValues.ts"],"names":["NONE","BULK_APPLY","BLANK","IDENTIFIER_BLOCK_LIST","ColumnName","IS_REQUIRED","CAN_APPLY_IN_BULK","CachedFileState","applyEnum","valuesOf","IsoCountryCode","IsoCountrySubdivisionCode","CompletedRequestStatus","SuccessfulRequest","CachedRequestState","fuzzySearch","word1","word2","fuzzysearch","fuzzyMatchColumns","allColumnNames","fuzzyMapName","isRequired","canApplyAll","matchingColumnNames","x","inquirer","mapEnumValues","csvInputs","expectedOutputs","cache","autoCompletePrompt","inputs","item","value","result"],"mappings":"AAAA,u/BAAuO,wDAAyC,wDAAyC,wDAAiE,qDCAtV,0EACR,2DAMrB,yYACY,IAENA,CAAAA,CAAO,QAAA,CACPC,EAAAA,aAAa,2BAAA,CACbC,EAAAA,aAAQ,SAAA,CAGRC,EAAAA,aAAwB,CAAC,OAAA,CAAS,gBAAgB,CAAA,CAKnDC,EAAAA,aAAAA,CAAAA,CAAAA,EAAAA,CAEVA,CAAAA,CAAA,KAAA,CAAQ,OAAA,CAERA,CAAAA,CAAA,cAAA,CAAiB,gBAAA,CAEjBA,CAAAA,CAAA,WAAA,CAAc,aAAA,CAEdA,CAAAA,CAAA,WAAA,CAAc,aAAA,CAEdA,CAAAA,CAAA,MAAA,CAAS,QAAA,CAETA,CAAAA,CAAA,OAAA,CAAU,SAAA,CAEVA,CAAAA,CAAA,kBAAA,CAAqB,oBAAA,CAErBA,CAAAA,CAAA,aAAA,CAAgB,eAAA,CAEhBA,CAAAA,CAAA,SAAA,CAAY,WAAA,CAEZA,CAAAA,CAAA,WAAA,CAAc,aAAA,CApBJA,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,EAAA,CAAA,CAAA,CAAA,CAwBCC,EAAAA,aAA8C,CACxD,KAAA,CAAmB,CAAA,CAAA,CACnB,cAAA,CAA4B,CAAA,CAAA,CAC5B,WAAA,CAAyB,CAAA,CAAA,CACzB,WAAA,CAAyB,CAAA,CAAA,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AA,CAAQK,CAAAA,EACjDV,EAAAA,CAAYM,CAAAA,CAAa,WAAA,CAAY,CAAA,CAAGI,CAAAA,CAAE,WAAA,CAAY,CAAC,CACzD,CAAA,CACA,MAAO,CACL,GAAGD,CAAAA,CACH,IAAIE,kBAAAA,CAAS,SAAA,CACb,GAAIJ,CAAAA,CAAa,CAAC,CAAA,CAAI,CAACtB,CAAI,CAAA,CAC3B,GAAIuB,CAAAA,CAAc,CAACtB,EAAU,CAAA,CAAI,CAAC,CAAA,CAClC,GAAGmB,CAAAA,CAAe,MAAA,CAAQK,CAAAA,EAAM,CAACD,CAAAA,CAAoB,QAAA,CAASC,CAAC,CAAC,CAClE,CACF,CC7CA,kKAC+B,MAY/B,SAAsBE,EAAAA,CACpBC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CACoC,CACpCJ,kBAAAA,CAAS,cAAA,CAAe,cAAA,CAAgBK,oCAAkB,CAAA,CAE1D,IAAMC,CAAAA,CAASJ,CAAAA,CACZ,GAAA,CAAKK,CAAAA,EAASA,CAAAA,EAAQ,SAAS,CAAA,CAC/B,MAAA,CAAQC,CAAAA,EAAU,CAACJ,CAAAA,CAAMI,CAAK,CAAC,CAAA,CAClC,EAAA,CAAIF,CAAAA,CAAO,MAAA,GAAW,CAAA,CACpB,OAAOF,CAAAA,CAET,IAAMK,CAAAA,CAAS,MAAMT,kBAAAA,CAAS,MAAA,CAC5BM,CAAAA,CAAO,GAAA,CAAKE,CAAAA,EAAAA,CAAW,CACrB,IAAA,CAAMA,CAAAA,CACN,OAAA,CAAS,CAAA,cAAA,EAAiBA,CAAK,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/chunk-V73KHIHK.cjs","sourcesContent":[null,"import { applyEnum, valuesOf } from '@transcend-io/type-utils';\nimport { LanguageKey } from '@transcend-io/internationalization';\nimport {\n CompletedRequestStatus,\n RequestAction,\n IsoCountryCode,\n IsoCountrySubdivisionCode,\n} from '@transcend-io/privacy-types';\nimport * as t from 'io-ts';\n\nexport const NONE = '[NONE]' as const;\nexport const BULK_APPLY = '[APPLY VALUE TO ALL ROWS]' as const;\nexport const BLANK = '<blank>' as const;\n\n/** These are uploaded at the top level of the request */\nexport const IDENTIFIER_BLOCK_LIST = ['email', 'coreIdentifier'];\n\n/**\n * Column names to map\n */\nexport enum ColumnName {\n /** The title of the email column */\n Email = 'email',\n /** The title of the core identifier column */\n CoreIdentifier = 'coreIdentifier',\n /** The title of the requestType column */\n RequestType = 'requestType',\n /** The title of the subjectType column */\n SubjectType = 'subjectType',\n /** The title of the locale column */\n Locale = 'locale',\n /** The country */\n Country = 'country',\n /** The country sub division */\n CountrySubDivision = 'countrySubDivision',\n /** The title of the requestStatus column */\n RequestStatus = 'requestStatus',\n /** The title of the createdAt column */\n CreatedAt = 'createdAt',\n /** The title of the dataSiloIds column */\n DataSiloIds = 'dataSiloIds',\n}\n\n/** These parameters are required in the Transcend DSR API */\nexport const IS_REQUIRED: { [k in ColumnName]: boolean } = {\n [ColumnName.Email]: false,\n [ColumnName.CoreIdentifier]: true,\n [ColumnName.RequestType]: true,\n [ColumnName.SubjectType]: true,\n [ColumnName.RequestStatus]: false,\n [ColumnName.CreatedAt]: false,\n [ColumnName.DataSiloIds]: false,\n [ColumnName.Locale]: false,\n [ColumnName.Country]: false,\n [ColumnName.CountrySubDivision]: false,\n};\n\n/** These parameters can be specified for the entire CSV set if needed */\nexport const CAN_APPLY_IN_BULK: { [k in ColumnName]?: boolean } = {\n [ColumnName.RequestType]: true,\n [ColumnName.SubjectType]: true,\n};\n\n// Cache state\nexport const CachedFileState = t.type({\n /** Mapping between the default request input column names and the CSV column name for that input */\n columnNames: t.partial(applyEnum(ColumnName, () => t.string)),\n /** Mapping between the identifier names and the CSV column name for that input */\n identifierNames: t.record(t.string, t.string),\n /** Mapping between the request attribute inputs and the CSV column name for that input */\n attributeNames: t.record(t.string, t.string),\n /** Mapping between CSV request type and Transcend Request Action */\n requestTypeToRequestAction: t.record(t.string, valuesOf(RequestAction)),\n /** Mapping between CSV data subject type and the name of the data subject in Transcend */\n subjectTypeToSubjectName: t.record(t.string, t.string),\n /** Mapping between language imported and Transcend locale code */\n languageToLocale: t.record(t.string, valuesOf(LanguageKey)),\n /** Mapping between region and country code */\n regionToCountry: t.record(\n t.string,\n valuesOf({ ...IsoCountryCode, [NONE]: NONE }),\n ),\n /** Mapping between region and country sub division code */\n regionToCountrySubDivision: t.record(\n t.string,\n valuesOf({ ...IsoCountrySubdivisionCode, [NONE]: NONE }),\n ),\n /** Mapping between request status in import to Transcend request status */\n statusToRequestStatus: t.record(\n t.string,\n valuesOf({ ...CompletedRequestStatus, [NONE]: NONE }),\n ),\n});\n\n/** Type override */\nexport type CachedFileState = t.TypeOf<typeof CachedFileState>;\n\n/**\n * Successfully processed request\n */\nexport const SuccessfulRequest = t.type({\n id: t.string,\n link: t.string,\n rowIndex: t.number,\n coreIdentifier: t.string,\n attemptedAt: t.string,\n});\n\n/** Type override */\nexport type SuccessfulRequest = t.TypeOf<typeof SuccessfulRequest>;\n\n// Cache state\nexport const CachedRequestState = t.type({\n /** Set of privacy requests that failed to upload */\n failingRequests: t.array(t.record(t.string, t.any)),\n /** Successfully uploaded requests */\n successfulRequests: t.array(SuccessfulRequest),\n /** Duplicate requests */\n duplicateRequests: t.array(\n t.type({\n rowIndex: t.number,\n coreIdentifier: t.string,\n attemptedAt: t.string,\n }),\n ),\n});\n\n/** Type override */\nexport type CachedRequestState = t.TypeOf<typeof CachedRequestState>;\n","import inquirer from 'inquirer';\nimport { NONE, BULK_APPLY } from './constants';\n\nimport fuzzysearch from 'fuzzysearch';\n\n/**\n * Check if word1 and word2 are a fuzzy match of each other.\n * Returns true if word1 is fuzzy match of word2 or vice versa.\n *\n * @param word1 - First word\n * @param word2 - Second word\n * @returns True if words are fuzzy match\n */\nexport function fuzzySearch(word1: string, word2: string): boolean {\n return (\n fuzzysearch(word1.toLowerCase(), word2.toLowerCase()) ||\n fuzzysearch(word2.toLowerCase(), word1.toLowerCase())\n );\n}\n\n/**\n * Fuzzy match column names for a particular field\n *\n * @param allColumnNames - List of all column names\n * @param fuzzyMapName - The name of field being mapped to\n * @param isRequired - When true, don't include \"NONE\" as an option\n * @param canApplyAll - When true, include an option to specify the value in bulk\n * @returns The list of suggestions for inquirer\n */\nexport function fuzzyMatchColumns(\n allColumnNames: string[],\n fuzzyMapName: string,\n isRequired: boolean,\n canApplyAll?: boolean,\n): (string | InstanceType<typeof inquirer.Separator>)[] {\n const matchingColumnNames = allColumnNames.filter((x) =>\n fuzzySearch(fuzzyMapName.toLowerCase(), x.toLowerCase()),\n );\n return [\n ...matchingColumnNames,\n new inquirer.Separator(),\n ...(isRequired ? [] : [NONE]),\n ...(canApplyAll ? [BULK_APPLY] : []),\n ...allColumnNames.filter((x) => !matchingColumnNames.includes(x)),\n ];\n}\n","import inquirer from 'inquirer';\nimport autoCompletePrompt from 'inquirer-autocomplete-prompt';\nimport { apply, ObjByString } from '@transcend-io/type-utils';\nimport { fuzzySearch } from './fuzzyMatchColumns';\n\n/**\n * Map a set of inputs to a set of outputs\n *\n * @param csvInputs - Input list\n * @param expectedOutputs - Output list\n * @param cache - Cache\n * @returns Mapping from row to enum value\n */\nexport async function mapEnumValues<TValue extends string>(\n csvInputs: string[],\n expectedOutputs: TValue[],\n cache: { [k in string]: TValue },\n): Promise<{ [k in string]: TValue }> {\n inquirer.registerPrompt('autocomplete', autoCompletePrompt);\n\n const inputs = csvInputs\n .map((item) => item || '<blank>')\n .filter((value) => !cache[value]);\n if (inputs.length === 0) {\n return cache;\n }\n const result = await inquirer.prompt<{ [k in string]: TValue }>(\n inputs.map((value) => ({\n name: value,\n message: `Map value of: ${value}`,\n type: 'autocomplete',\n default: expectedOutputs.find((x) => fuzzySearch(value, x)),\n source: (answersSoFar: ObjByString, input: string) =>\n !input\n ? expectedOutputs\n : expectedOutputs.filter(\n (x) => typeof x === 'string' && fuzzySearch(input, x),\n ),\n })),\n );\n return {\n ...cache,\n ...apply(result, (r) =>\n typeof r === 'string' ? (r as TValue) : (Object.values(r)[0] as TValue),\n ),\n };\n}\n"]}
|