@transcend-io/cli 8.24.1 → 8.25.1
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 +36 -15
- 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-YFF6A56N.cjs → chunk-4AIAQD56.cjs} +2 -2
- package/dist/{chunk-YFF6A56N.cjs.map → chunk-4AIAQD56.cjs.map} +1 -1
- package/dist/{chunk-O3EACWMC.cjs → chunk-4MXXWDM2.cjs} +2 -2
- package/dist/{chunk-O3EACWMC.cjs.map → chunk-4MXXWDM2.cjs.map} +1 -1
- package/dist/{chunk-VY55L6P5.cjs → chunk-6WIX75ZF.cjs} +2 -2
- package/dist/{chunk-VY55L6P5.cjs.map → chunk-6WIX75ZF.cjs.map} +1 -1
- package/dist/{chunk-NA6JTKNJ.cjs → chunk-7UB5BB7K.cjs} +2 -2
- package/dist/{chunk-NA6JTKNJ.cjs.map → chunk-7UB5BB7K.cjs.map} +1 -1
- package/dist/chunk-CD32SMHC.cjs +3 -0
- package/dist/chunk-CD32SMHC.cjs.map +1 -0
- package/dist/chunk-FWTJQA4M.cjs +12 -0
- package/dist/{chunk-AOO3U7W3.cjs.map → chunk-FWTJQA4M.cjs.map} +1 -1
- package/dist/{chunk-KKAJPI6O.cjs → chunk-GC3HFDP4.cjs} +165 -161
- package/dist/chunk-GC3HFDP4.cjs.map +1 -0
- package/dist/{chunk-T5QZTOZC.cjs → chunk-JQY2DY4S.cjs} +2 -2
- package/dist/{chunk-T5QZTOZC.cjs.map → chunk-JQY2DY4S.cjs.map} +1 -1
- package/dist/chunk-LCL7BED2.cjs +12 -0
- package/dist/chunk-LCL7BED2.cjs.map +1 -0
- package/dist/chunk-M2ARSCLF.cjs +2 -0
- package/dist/chunk-M2ARSCLF.cjs.map +1 -0
- package/dist/{chunk-NNHHVBQP.cjs → chunk-OM2P5WDQ.cjs} +4 -4
- package/dist/{chunk-NNHHVBQP.cjs.map → chunk-OM2P5WDQ.cjs.map} +1 -1
- package/dist/{chunk-MWZABOIC.cjs → chunk-SY2KZA6N.cjs} +22 -22
- package/dist/chunk-SY2KZA6N.cjs.map +1 -0
- package/dist/{chunk-WAXPOCXW.cjs → chunk-UO63E354.cjs} +4 -4
- package/dist/{chunk-WAXPOCXW.cjs.map → chunk-UO63E354.cjs.map} +1 -1
- package/dist/{chunk-VTYBZZQ5.cjs → chunk-XMRABG76.cjs} +2 -2
- package/dist/{chunk-VTYBZZQ5.cjs.map → chunk-XMRABG76.cjs.map} +1 -1
- package/dist/{impl-MAHW2W43.cjs → impl-27RLTNE6.cjs} +2 -2
- package/dist/{impl-MAHW2W43.cjs.map → impl-27RLTNE6.cjs.map} +1 -1
- package/dist/impl-3QCQ57NL.cjs +2 -0
- package/dist/impl-3QCQ57NL.cjs.map +1 -0
- package/dist/{impl-YHIIZRG6.cjs → impl-4SDP76RG.cjs} +2 -2
- package/dist/{impl-YHIIZRG6.cjs.map → impl-4SDP76RG.cjs.map} +1 -1
- package/dist/{impl-WKBZDQYY.cjs → impl-5JGDZKKD.cjs} +2 -2
- package/dist/{impl-WKBZDQYY.cjs.map → impl-5JGDZKKD.cjs.map} +1 -1
- package/dist/{impl-TXQ7EFQE.cjs → impl-6WYAJQUE.cjs} +2 -2
- package/dist/{impl-TXQ7EFQE.cjs.map → impl-6WYAJQUE.cjs.map} +1 -1
- package/dist/{impl-OOQNMHTX.cjs → impl-77XWT55M.cjs} +2 -2
- package/dist/{impl-OOQNMHTX.cjs.map → impl-77XWT55M.cjs.map} +1 -1
- package/dist/impl-7WMPLPUZ.cjs +9 -0
- package/dist/impl-7WMPLPUZ.cjs.map +1 -0
- package/dist/impl-AXXSN2FC.cjs +2 -0
- package/dist/impl-AXXSN2FC.cjs.map +1 -0
- package/dist/{impl-7YED2CRU.cjs → impl-C43DSDWW.cjs} +2 -2
- package/dist/{impl-7YED2CRU.cjs.map → impl-C43DSDWW.cjs.map} +1 -1
- package/dist/impl-CWKT2AM2.cjs +2 -0
- package/dist/impl-CWKT2AM2.cjs.map +1 -0
- package/dist/impl-ELSZK5ML.cjs +2 -0
- package/dist/impl-ELSZK5ML.cjs.map +1 -0
- package/dist/{impl-2YVWUXEC.cjs → impl-EVOTRAAK.cjs} +2 -2
- package/dist/{impl-2YVWUXEC.cjs.map → impl-EVOTRAAK.cjs.map} +1 -1
- package/dist/{impl-ZVMYU6PT.cjs → impl-F2KNXXMR.cjs} +2 -2
- package/dist/{impl-ZVMYU6PT.cjs.map → impl-F2KNXXMR.cjs.map} +1 -1
- package/dist/{impl-IZTOX7X3.cjs → impl-FGPCTV3U.cjs} +2 -2
- package/dist/{impl-IZTOX7X3.cjs.map → impl-FGPCTV3U.cjs.map} +1 -1
- package/dist/{impl-YPKYWIYP.cjs → impl-GA66PSNM.cjs} +2 -2
- package/dist/{impl-YPKYWIYP.cjs.map → impl-GA66PSNM.cjs.map} +1 -1
- package/dist/impl-GHJXDRQX.cjs +2 -0
- package/dist/impl-GHJXDRQX.cjs.map +1 -0
- package/dist/impl-GNNLPQPB.cjs +2 -0
- package/dist/impl-GNNLPQPB.cjs.map +1 -0
- package/dist/{impl-VMV24ZJH.cjs → impl-HAWCNCIE.cjs} +2 -2
- package/dist/{impl-VMV24ZJH.cjs.map → impl-HAWCNCIE.cjs.map} +1 -1
- package/dist/{impl-IBGULX7G.cjs → impl-KLLNTGD6.cjs} +2 -2
- package/dist/{impl-IBGULX7G.cjs.map → impl-KLLNTGD6.cjs.map} +1 -1
- package/dist/{impl-VXHUL55C.cjs → impl-LLYATZKE.cjs} +2 -2
- package/dist/{impl-VXHUL55C.cjs.map → impl-LLYATZKE.cjs.map} +1 -1
- package/dist/{impl-FO3XHC3T.cjs → impl-MB2TL32H.cjs} +2 -2
- package/dist/{impl-FO3XHC3T.cjs.map → impl-MB2TL32H.cjs.map} +1 -1
- package/dist/{impl-2TS5SALN.cjs → impl-N5UML4V3.cjs} +2 -2
- package/dist/{impl-2TS5SALN.cjs.map → impl-N5UML4V3.cjs.map} +1 -1
- package/dist/{impl-RHAYM5BX.cjs → impl-OA7FQTRX.cjs} +4 -4
- package/dist/{impl-RHAYM5BX.cjs.map → impl-OA7FQTRX.cjs.map} +1 -1
- package/dist/impl-P4S3OGOU.cjs +2 -0
- package/dist/impl-P4S3OGOU.cjs.map +1 -0
- package/dist/impl-Q3D7NUNV.cjs +2 -0
- package/dist/{impl-R3RC2YP7.cjs.map → impl-Q3D7NUNV.cjs.map} +1 -1
- package/dist/impl-QFXCNJYB.cjs +2 -0
- package/dist/impl-QFXCNJYB.cjs.map +1 -0
- package/dist/{impl-MCE7B6NW.cjs → impl-QSLPHFXK.cjs} +2 -2
- package/dist/{impl-MCE7B6NW.cjs.map → impl-QSLPHFXK.cjs.map} +1 -1
- package/dist/impl-R3CFYSPV.cjs +2 -0
- package/dist/impl-R3CFYSPV.cjs.map +1 -0
- package/dist/{impl-FGLNPBNN.cjs → impl-RID2MAD7.cjs} +2 -2
- package/dist/{impl-FGLNPBNN.cjs.map → impl-RID2MAD7.cjs.map} +1 -1
- package/dist/impl-SHH4WC7J.cjs +2 -0
- package/dist/impl-SHH4WC7J.cjs.map +1 -0
- package/dist/{impl-3PH5TSFY.cjs → impl-SL744OKN.cjs} +3 -3
- package/dist/{impl-3PH5TSFY.cjs.map → impl-SL744OKN.cjs.map} +1 -1
- package/dist/{impl-4EEEQLZS.cjs → impl-SLYDJIQF.cjs} +3 -3
- package/dist/{impl-4EEEQLZS.cjs.map → impl-SLYDJIQF.cjs.map} +1 -1
- package/dist/impl-UCJNP22O.cjs +2 -0
- package/dist/impl-UCJNP22O.cjs.map +1 -0
- package/dist/{impl-OCLMWYMP.cjs → impl-URWHAZIO.cjs} +2 -2
- package/dist/{impl-OCLMWYMP.cjs.map → impl-URWHAZIO.cjs.map} +1 -1
- package/dist/impl-UVBO46MQ.cjs +2 -0
- package/dist/impl-UVBO46MQ.cjs.map +1 -0
- package/dist/{impl-L6F4PTY3.cjs → impl-VEU4X4HE.cjs} +2 -2
- package/dist/{impl-L6F4PTY3.cjs.map → impl-VEU4X4HE.cjs.map} +1 -1
- package/dist/impl-WAR6J2SL.cjs +2 -0
- package/dist/impl-WAR6J2SL.cjs.map +1 -0
- package/dist/{impl-2Y7WAQGJ.cjs → impl-WS774CEP.cjs} +2 -2
- package/dist/{impl-2Y7WAQGJ.cjs.map → impl-WS774CEP.cjs.map} +1 -1
- package/dist/{impl-CUNZ7YNN.cjs → impl-XAXZ5R2V.cjs} +2 -2
- package/dist/{impl-CUNZ7YNN.cjs.map → impl-XAXZ5R2V.cjs.map} +1 -1
- package/dist/{impl-IESXEP2S.cjs → impl-XFY3O27V.cjs} +2 -2
- package/dist/{impl-IESXEP2S.cjs.map → impl-XFY3O27V.cjs.map} +1 -1
- package/dist/{impl-WLYOQTIL.cjs → impl-ZCXWTUMJ.cjs} +2 -2
- package/dist/{impl-WLYOQTIL.cjs.map → impl-ZCXWTUMJ.cjs.map} +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +89 -136
- package/package.json +1 -1
- package/dist/chunk-AOO3U7W3.cjs +0 -12
- package/dist/chunk-KKAJPI6O.cjs.map +0 -1
- package/dist/chunk-LR3CPNDM.cjs +0 -6
- package/dist/chunk-LR3CPNDM.cjs.map +0 -1
- package/dist/chunk-MWZABOIC.cjs.map +0 -1
- package/dist/chunk-TRQBFWZP.cjs +0 -3
- package/dist/chunk-TRQBFWZP.cjs.map +0 -1
- package/dist/chunk-ZUT7UIQU.cjs +0 -2
- package/dist/chunk-ZUT7UIQU.cjs.map +0 -1
- package/dist/impl-4RXGRXXS.cjs +0 -2
- package/dist/impl-4RXGRXXS.cjs.map +0 -1
- package/dist/impl-6HWW3LAY.cjs +0 -2
- package/dist/impl-6HWW3LAY.cjs.map +0 -1
- package/dist/impl-6OZ2ZIVM.cjs +0 -2
- package/dist/impl-6OZ2ZIVM.cjs.map +0 -1
- package/dist/impl-AKKWJJRW.cjs +0 -2
- package/dist/impl-AKKWJJRW.cjs.map +0 -1
- package/dist/impl-DDDGYCKH.cjs +0 -2
- package/dist/impl-DDDGYCKH.cjs.map +0 -1
- package/dist/impl-DJCQNX56.cjs +0 -2
- package/dist/impl-DJCQNX56.cjs.map +0 -1
- package/dist/impl-JIVQZGAO.cjs +0 -2
- package/dist/impl-JIVQZGAO.cjs.map +0 -1
- package/dist/impl-KUZ5CZKZ.cjs +0 -2
- package/dist/impl-KUZ5CZKZ.cjs.map +0 -1
- package/dist/impl-OPBD2KMY.cjs +0 -9
- package/dist/impl-OPBD2KMY.cjs.map +0 -1
- package/dist/impl-R3RC2YP7.cjs +0 -2
- package/dist/impl-SMK2SUTD.cjs +0 -2
- package/dist/impl-SMK2SUTD.cjs.map +0 -1
- package/dist/impl-TJIMDEBN.cjs +0 -12
- package/dist/impl-TJIMDEBN.cjs.map +0 -1
- package/dist/impl-VKEICKZ7.cjs +0 -2
- package/dist/impl-VKEICKZ7.cjs.map +0 -1
- package/dist/impl-WIGDO7DS.cjs +0 -2
- package/dist/impl-WIGDO7DS.cjs.map +0 -1
- package/dist/impl-YEXHKEWQ.cjs +0 -2
- package/dist/impl-YEXHKEWQ.cjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class;var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class;var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunk6WIX75ZFcjs = require('./chunk-6WIX75ZF.cjs');var _graphqlrequest = require('graphql-request');var En=_graphqlrequest.gql`
|
|
2
2
|
query TranscendCliDataPoints(
|
|
3
3
|
$filterBy: DataPointFiltersInput
|
|
4
4
|
$first: Int!
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
`,
|
|
50
|
+
`,wf= exports.b =_graphqlrequest.gql`
|
|
51
51
|
query TranscendCliDataPointCount($filterBy: DataPointFiltersInput) {
|
|
52
52
|
dataPoints(filterBy: $filterBy, useMaster: false) {
|
|
53
53
|
totalCount
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
`,
|
|
56
|
+
`,Rn= exports.c =_graphqlrequest.gql`
|
|
57
57
|
query TranscendCliSubDataPoints(
|
|
58
58
|
$filterBy: SubDataPointFiltersInput
|
|
59
59
|
$first: Int!
|
|
@@ -88,13 +88,13 @@
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
|
|
91
|
+
`,$f= exports.d =_graphqlrequest.gql`
|
|
92
92
|
query TranscendCliSubDataPointsCount($filterBy: SubDataPointFiltersInput) {
|
|
93
93
|
subDataPoints(filterBy: $filterBy, useMaster: false) {
|
|
94
94
|
totalCount
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
`,
|
|
97
|
+
`,bn= exports.e =_graphqlrequest.gql`
|
|
98
98
|
query TranscendCliSubDataPointGuesses(
|
|
99
99
|
$filterBy: SubDataPointFiltersInput
|
|
100
100
|
$first: Int!
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
`,
|
|
141
|
+
`,wn= exports.f =_graphqlrequest.gql`
|
|
142
142
|
mutation TranscendCliUpdateOrCreateDataPoint(
|
|
143
143
|
$dataSiloId: ID!
|
|
144
144
|
$name: String!
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
`,
|
|
180
|
+
`,xf= exports.g =_graphqlrequest.gql`
|
|
181
181
|
query TranscendCliDataPointCsvExport(
|
|
182
182
|
$filterBy: DataPointFiltersInput
|
|
183
183
|
$first: Int!
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
`;var
|
|
205
|
+
`;var Lf=_graphqlrequest.gql`
|
|
206
206
|
query TranscendCliEntryCount(
|
|
207
207
|
$filterBy: UnstructuredSubDataPointRecommendationsFilterInput
|
|
208
208
|
) {
|
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
totalCount
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
|
-
`;var
|
|
216
|
+
`;var $n=_graphqlrequest.gql`
|
|
217
217
|
query TranscendCliDataSilos(
|
|
218
218
|
$filterBy: DataSiloFiltersInput!
|
|
219
219
|
$first: Int!
|
|
@@ -240,7 +240,7 @@
|
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
|
|
243
|
+
`,_f= exports.j =_graphqlrequest.gql`
|
|
244
244
|
query TranscendCliDataSiloExport(
|
|
245
245
|
$filterBy: DataSiloFiltersInput!
|
|
246
246
|
$first: Int!
|
|
@@ -252,7 +252,7 @@
|
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
|
-
|
|
255
|
+
`,xn= exports.k =_graphqlrequest.gql`
|
|
256
256
|
query TranscendCliDataSilosEnriched(
|
|
257
257
|
$filterBy: DataSiloFiltersInput!
|
|
258
258
|
$first: Int!
|
|
@@ -333,7 +333,7 @@
|
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
|
-
`,
|
|
336
|
+
`,Dn= exports.m =_graphqlrequest.gql`
|
|
337
337
|
mutation TranscendCliCreateDataSilo($input: [CreateDataSilosInput!]!) {
|
|
338
338
|
createDataSilos(input: $input) {
|
|
339
339
|
dataSilos {
|
|
@@ -342,7 +342,7 @@
|
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
|
-
`;var
|
|
345
|
+
`;var qn=_graphqlrequest.gql`
|
|
346
346
|
query TranscendCliEnrichers($title: String, $first: Int!, $offset: Int!) {
|
|
347
347
|
enrichers(
|
|
348
348
|
filterBy: { text: $title }
|
|
@@ -378,7 +378,7 @@
|
|
|
378
378
|
}
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
|
-
`,
|
|
381
|
+
`,Ln= exports.o =_graphqlrequest.gql`
|
|
382
382
|
query TranscendCliInitializer {
|
|
383
383
|
initializer {
|
|
384
384
|
id
|
|
@@ -387,19 +387,19 @@
|
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
389
|
}
|
|
390
|
-
`,
|
|
390
|
+
`,vn= exports.p =_graphqlrequest.gql`
|
|
391
391
|
mutation TranscendCliCreateEnricher($input: EnricherInput!) {
|
|
392
392
|
createEnricher(input: $input) {
|
|
393
393
|
clientMutationId
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
|
-
`,
|
|
396
|
+
`,kn= exports.q =_graphqlrequest.gql`
|
|
397
397
|
mutation TranscendCliUpdateEnricher($input: UpdateEnricherInput!) {
|
|
398
398
|
updateEnricher(input: $input) {
|
|
399
399
|
clientMutationId
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
|
-
`;var
|
|
402
|
+
`;var _n=_graphqlrequest.gql`
|
|
403
403
|
query TranscendCliCatalogs($first: Int!, $offset: Int!) {
|
|
404
404
|
catalogs(first: $first, offset: $offset, filterBy: {}, useMaster: false) {
|
|
405
405
|
nodes {
|
|
@@ -409,7 +409,7 @@
|
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
|
-
`;var
|
|
412
|
+
`;var On=_graphqlrequest.gql`
|
|
413
413
|
query TranscendCliIdentifiers($first: Int!, $offset: Int!) {
|
|
414
414
|
identifiers(
|
|
415
415
|
first: $first
|
|
@@ -443,13 +443,13 @@
|
|
|
443
443
|
}
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
|
-
`,
|
|
446
|
+
`,Gn= exports.t =_graphqlrequest.gql`
|
|
447
447
|
query TranscendCliNewIdentifierTypes {
|
|
448
448
|
newIdentifierTypes {
|
|
449
449
|
name
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
|
-
`,
|
|
452
|
+
`,Nn= exports.u =_graphqlrequest.gql`
|
|
453
453
|
mutation TranscendCliCreateIdentifier($input: IdentifierInput!) {
|
|
454
454
|
createIdentifier(input: $input) {
|
|
455
455
|
identifier {
|
|
@@ -458,7 +458,7 @@
|
|
|
458
458
|
}
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
`,
|
|
461
|
+
`,Mn= exports.v =_graphqlrequest.gql`
|
|
462
462
|
mutation TranscendCliUpdateIdentifier($input: UpdateIdentifierInput!) {
|
|
463
463
|
updateIdentifier(input: $input) {
|
|
464
464
|
clientMutationId
|
|
@@ -479,7 +479,7 @@
|
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
`,
|
|
482
|
+
`,Fn= exports.x =_graphqlrequest.gql`
|
|
483
483
|
mutation TranscendCliCreateDataSubject($type: String!) {
|
|
484
484
|
createSubject(input: { type: $type, title: $type, subjectClass: OTHER }) {
|
|
485
485
|
subject {
|
|
@@ -488,13 +488,13 @@
|
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
|
-
`,
|
|
491
|
+
`,Un= exports.y =_graphqlrequest.gql`
|
|
492
492
|
mutation TranscendCliUpdateDataSubject($input: UpdateSubjectInput!) {
|
|
493
493
|
updateSubject(input: $input) {
|
|
494
494
|
clientMutationId
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
|
-
`,
|
|
497
|
+
`,Bn= exports.z =_graphqlrequest.gql`
|
|
498
498
|
mutation TranscendCliToggleDataSubject($input: ToggleSubjectInput!) {
|
|
499
499
|
toggleSubject(input: $input) {
|
|
500
500
|
clientMutationId
|
|
@@ -531,7 +531,7 @@
|
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
|
-
`,
|
|
534
|
+
`,Vn= exports.B =_graphqlrequest.gql`
|
|
535
535
|
mutation TranscendCliUpdateRepositories($input: UpdateRepositoriesInput!) {
|
|
536
536
|
updateRepositories(input: $input) {
|
|
537
537
|
clientMutationId
|
|
@@ -550,7 +550,7 @@
|
|
|
550
550
|
}
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
|
-
`,
|
|
553
|
+
`,Kn= exports.C =_graphqlrequest.gql`
|
|
554
554
|
mutation TranscendCliCreateRepository($input: CreateRepositoryInput!) {
|
|
555
555
|
createRepository(input: $input) {
|
|
556
556
|
clientMutationId
|
|
@@ -569,7 +569,7 @@
|
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
|
-
`;var
|
|
572
|
+
`;var jn=_graphqlrequest.gql`
|
|
573
573
|
query TranscendCliApiKeys($first: Int!, $offset: Int!, $titles: [String!]) {
|
|
574
574
|
apiKeys(
|
|
575
575
|
first: $first
|
|
@@ -587,7 +587,7 @@
|
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
589
|
}
|
|
590
|
-
`,
|
|
590
|
+
`,Yn= exports.E =_graphqlrequest.gql`
|
|
591
591
|
mutation TranscendCliCreateApiKey($input: ApiKeyInput!) {
|
|
592
592
|
createApiKey(input: $input) {
|
|
593
593
|
apiKey {
|
|
@@ -597,13 +597,13 @@
|
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
599
|
}
|
|
600
|
-
`,
|
|
600
|
+
`,Zn= exports.F =_graphqlrequest.gql`
|
|
601
601
|
mutation TranscendCliDeleteApiKey($id: ID!) {
|
|
602
602
|
deleteApiKey(id: $id) {
|
|
603
603
|
clientMutationId
|
|
604
604
|
}
|
|
605
605
|
}
|
|
606
|
-
`;var
|
|
606
|
+
`;var zn=_graphqlrequest.gql`
|
|
607
607
|
mutation TranscendCliCreatePreferenceAccessTokens(
|
|
608
608
|
$input: CreatePrivacyCenterAccessTokensInput!
|
|
609
609
|
) {
|
|
@@ -613,7 +613,7 @@
|
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
|
-
`;var
|
|
616
|
+
`;var Hn=_graphqlrequest.gql`
|
|
617
617
|
mutation AddSiloDiscoveryResults(
|
|
618
618
|
$pluginId: ID!
|
|
619
619
|
$rawResults: [SiloDiscoveryRawResultInput!]!
|
|
@@ -624,7 +624,7 @@
|
|
|
624
624
|
success
|
|
625
625
|
}
|
|
626
626
|
}
|
|
627
|
-
`,
|
|
627
|
+
`,Jn= exports.I =_graphqlrequest.gql`
|
|
628
628
|
query Plugins($dataSiloId: String!, $type: PluginType!) {
|
|
629
629
|
plugins(filterBy: { dataSiloId: $dataSiloId, type: $type, enabled: true }) {
|
|
630
630
|
plugins {
|
|
@@ -636,7 +636,7 @@
|
|
|
636
636
|
totalCount
|
|
637
637
|
}
|
|
638
638
|
}
|
|
639
|
-
`;var
|
|
639
|
+
`;var eo=_graphqlrequest.gql`
|
|
640
640
|
query TranscendCliTemplates($title: String, $first: Int!, $offset: Int!) {
|
|
641
641
|
templates(
|
|
642
642
|
filterBy: { text: $title }
|
|
@@ -656,13 +656,13 @@
|
|
|
656
656
|
}
|
|
657
657
|
}
|
|
658
658
|
}
|
|
659
|
-
`,
|
|
659
|
+
`,to= exports.K =_graphqlrequest.gql`
|
|
660
660
|
mutation TranscendCliCreateTemplate($title: String!) {
|
|
661
661
|
createTemplate(input: { title: $title, template: "", subject: $title }) {
|
|
662
662
|
clientMutationId
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
|
-
`;var
|
|
665
|
+
`;var ro=_graphqlrequest.gql`
|
|
666
666
|
query TranscendCliOrganization {
|
|
667
667
|
organization {
|
|
668
668
|
sombra {
|
|
@@ -670,7 +670,7 @@
|
|
|
670
670
|
}
|
|
671
671
|
}
|
|
672
672
|
}
|
|
673
|
-
`;var
|
|
673
|
+
`;var io=_graphqlrequest.gql`
|
|
674
674
|
query TranscendCliAttributeKeys($first: Int!, $offset: Int!) {
|
|
675
675
|
attributeKeys(
|
|
676
676
|
filterBy: { enabledOn: [request] }
|
|
@@ -685,7 +685,7 @@
|
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
687
|
}
|
|
688
|
-
`;var
|
|
688
|
+
`;var no=_graphqlrequest.gql`
|
|
689
689
|
query TranscendCliSoftwareDevelopmentKits(
|
|
690
690
|
$first: Int!
|
|
691
691
|
$offset: Int!
|
|
@@ -718,7 +718,7 @@
|
|
|
718
718
|
}
|
|
719
719
|
}
|
|
720
720
|
}
|
|
721
|
-
`,
|
|
721
|
+
`,oo= exports.O =_graphqlrequest.gql`
|
|
722
722
|
mutation TranscendCliUpdateSoftwareDevelopmentKits(
|
|
723
723
|
$input: UpdateSoftwareDevelopmentKitsInput!
|
|
724
724
|
) {
|
|
@@ -742,7 +742,7 @@
|
|
|
742
742
|
}
|
|
743
743
|
}
|
|
744
744
|
}
|
|
745
|
-
`,
|
|
745
|
+
`,so= exports.P =_graphqlrequest.gql`
|
|
746
746
|
mutation TranscendCliCreateSoftwareDevelopmentKit(
|
|
747
747
|
$input: CreateSoftwareDevelopmentKitInput!
|
|
748
748
|
) {
|
|
@@ -766,7 +766,7 @@
|
|
|
766
766
|
}
|
|
767
767
|
}
|
|
768
768
|
}
|
|
769
|
-
`;var
|
|
769
|
+
`;var ao=_graphqlrequest.gql`
|
|
770
770
|
query TranscendCliCodePackages(
|
|
771
771
|
$first: Int!
|
|
772
772
|
$offset: Int!
|
|
@@ -807,7 +807,7 @@
|
|
|
807
807
|
}
|
|
808
808
|
}
|
|
809
809
|
}
|
|
810
|
-
`,
|
|
810
|
+
`,po= exports.R =_graphqlrequest.gql`
|
|
811
811
|
mutation TranscendCliUpdateCodePackages($input: UpdateCodePackagesInput!) {
|
|
812
812
|
updateCodePackages(input: $input) {
|
|
813
813
|
clientMutationId
|
|
@@ -837,7 +837,7 @@
|
|
|
837
837
|
}
|
|
838
838
|
}
|
|
839
839
|
}
|
|
840
|
-
`,
|
|
840
|
+
`,lo= exports.S =_graphqlrequest.gql`
|
|
841
841
|
mutation TranscendCliCreateCodePackage($input: CreateCodePackageInput!) {
|
|
842
842
|
createCodePackage(input: $input) {
|
|
843
843
|
clientMutationId
|
|
@@ -867,7 +867,7 @@
|
|
|
867
867
|
}
|
|
868
868
|
}
|
|
869
869
|
}
|
|
870
|
-
`;var
|
|
870
|
+
`;var co=_graphqlrequest.gql`
|
|
871
871
|
query TranscendCliPromptThreads(
|
|
872
872
|
$first: Int!
|
|
873
873
|
$offset: Int!
|
|
@@ -884,7 +884,7 @@
|
|
|
884
884
|
}
|
|
885
885
|
}
|
|
886
886
|
}
|
|
887
|
-
`;var
|
|
887
|
+
`;var mo=_graphqlrequest.gql`
|
|
888
888
|
query TranscendCliFetchPolicies($url: String!) {
|
|
889
889
|
privacyCenterPolicies(lookup: { url: $url }) {
|
|
890
890
|
id
|
|
@@ -901,7 +901,7 @@
|
|
|
901
901
|
}
|
|
902
902
|
}
|
|
903
903
|
}
|
|
904
|
-
`,
|
|
904
|
+
`,fo= exports.V =_graphqlrequest.gql`
|
|
905
905
|
mutation TranscendCliUpdatePolicies(
|
|
906
906
|
$policies: [PolicyInput!]!
|
|
907
907
|
$privacyCenterId: ID!
|
|
@@ -916,7 +916,7 @@
|
|
|
916
916
|
clientMutationId
|
|
917
917
|
}
|
|
918
918
|
}
|
|
919
|
-
`;var
|
|
919
|
+
`;var go=_graphqlrequest.gql`
|
|
920
920
|
query TranscendCliRequests(
|
|
921
921
|
$first: Int!
|
|
922
922
|
$offset: Int!
|
|
@@ -1006,7 +1006,7 @@
|
|
|
1006
1006
|
}
|
|
1007
1007
|
}
|
|
1008
1008
|
}
|
|
1009
|
-
`,
|
|
1009
|
+
`,yo= exports.Y =_graphqlrequest.gql`
|
|
1010
1010
|
mutation TranscendCliCancelPrivacyRequest($input: CommunicationInput!) {
|
|
1011
1011
|
cancelRequest(input: $input) {
|
|
1012
1012
|
request {
|
|
@@ -1022,13 +1022,13 @@
|
|
|
1022
1022
|
}
|
|
1023
1023
|
}
|
|
1024
1024
|
}
|
|
1025
|
-
`,
|
|
1025
|
+
`,ho= exports._ =_graphqlrequest.gql`
|
|
1026
1026
|
mutation TranscendCliNotifyAdditionalTime($input: AdditionalTimeInput!) {
|
|
1027
1027
|
notifyAdditionalTime(input: $input) {
|
|
1028
1028
|
clientMutationId
|
|
1029
1029
|
}
|
|
1030
1030
|
}
|
|
1031
|
-
`;var
|
|
1031
|
+
`;var Ao=_graphqlrequest.gql`
|
|
1032
1032
|
query TranscendCliFetchMessage {
|
|
1033
1033
|
translatedMessages {
|
|
1034
1034
|
id
|
|
@@ -1040,7 +1040,7 @@
|
|
|
1040
1040
|
}
|
|
1041
1041
|
}
|
|
1042
1042
|
}
|
|
1043
|
-
`,
|
|
1043
|
+
`,So= exports.aa =_graphqlrequest.gql`
|
|
1044
1044
|
mutation TranscendCliUpdateIntlMessages($messages: [MessageInput!]!) {
|
|
1045
1045
|
updateIntlMessages(input: { messages: $messages, skipPublish: true }) {
|
|
1046
1046
|
clientMutationId
|
|
@@ -1074,7 +1074,7 @@
|
|
|
1074
1074
|
totalCount
|
|
1075
1075
|
}
|
|
1076
1076
|
}
|
|
1077
|
-
`,
|
|
1077
|
+
`,To= exports.ca =_graphqlrequest.gql`
|
|
1078
1078
|
mutation TranscendCliRetryRequestEnricher($requestEnricherId: ID!) {
|
|
1079
1079
|
retryRequestEnricher(id: $requestEnricherId) {
|
|
1080
1080
|
requestEnricher {
|
|
@@ -1082,7 +1082,7 @@
|
|
|
1082
1082
|
}
|
|
1083
1083
|
}
|
|
1084
1084
|
}
|
|
1085
|
-
`,
|
|
1085
|
+
`,Po= exports.da =_graphqlrequest.gql`
|
|
1086
1086
|
mutation TranscendCliSkipRequestEnricher($requestEnricherId: ID!) {
|
|
1087
1087
|
skipRequestEnricher(id: $requestEnricherId) {
|
|
1088
1088
|
requestEnricher {
|
|
@@ -1090,7 +1090,7 @@
|
|
|
1090
1090
|
}
|
|
1091
1091
|
}
|
|
1092
1092
|
}
|
|
1093
|
-
`;var
|
|
1093
|
+
`;var zr=`
|
|
1094
1094
|
id
|
|
1095
1095
|
title
|
|
1096
1096
|
status
|
|
@@ -1219,7 +1219,7 @@
|
|
|
1219
1219
|
email
|
|
1220
1220
|
}
|
|
1221
1221
|
isReviewed
|
|
1222
|
-
`,
|
|
1222
|
+
`,Ro= exports.fa =_graphqlrequest.gql`
|
|
1223
1223
|
query TranscendCliAssessments(
|
|
1224
1224
|
$first: Int!
|
|
1225
1225
|
$offset: Int!
|
|
@@ -1279,7 +1279,7 @@
|
|
|
1279
1279
|
}
|
|
1280
1280
|
}
|
|
1281
1281
|
sections {
|
|
1282
|
-
${
|
|
1282
|
+
${zr}
|
|
1283
1283
|
}
|
|
1284
1284
|
assessmentGroup {
|
|
1285
1285
|
id
|
|
@@ -1363,7 +1363,7 @@
|
|
|
1363
1363
|
}
|
|
1364
1364
|
}
|
|
1365
1365
|
}
|
|
1366
|
-
`,
|
|
1366
|
+
`,Sg= exports.ga =_graphqlrequest.gql`
|
|
1367
1367
|
mutation TranscendCliImportOneTrustAssessmentForms(
|
|
1368
1368
|
$input: ImportOnetrustAssessmentsInput!
|
|
1369
1369
|
) {
|
|
@@ -1374,7 +1374,7 @@
|
|
|
1374
1374
|
}
|
|
1375
1375
|
}
|
|
1376
1376
|
}
|
|
1377
|
-
`;var
|
|
1377
|
+
`;var bo=_graphqlrequest.gql`
|
|
1378
1378
|
query TranscendCliPurposes(
|
|
1379
1379
|
$first: Int!
|
|
1380
1380
|
$offset: Int!
|
|
@@ -1406,7 +1406,7 @@
|
|
|
1406
1406
|
}
|
|
1407
1407
|
}
|
|
1408
1408
|
}
|
|
1409
|
-
`;var
|
|
1409
|
+
`;var wo=_graphqlrequest.gql`
|
|
1410
1410
|
query TranscendCliPreferenceTopics(
|
|
1411
1411
|
$first: Int!
|
|
1412
1412
|
$offset: Int!
|
|
@@ -1440,7 +1440,7 @@
|
|
|
1440
1440
|
}
|
|
1441
1441
|
}
|
|
1442
1442
|
}
|
|
1443
|
-
`;var
|
|
1443
|
+
`;var $o=_graphqlrequest.gql`
|
|
1444
1444
|
query TranscendCliAssessmentTemplates(
|
|
1445
1445
|
$first: Int!
|
|
1446
1446
|
$offset: Int!
|
|
@@ -1491,12 +1491,12 @@
|
|
|
1491
1491
|
}
|
|
1492
1492
|
}
|
|
1493
1493
|
sections {
|
|
1494
|
-
${
|
|
1494
|
+
${zr}
|
|
1495
1495
|
}
|
|
1496
1496
|
}
|
|
1497
1497
|
}
|
|
1498
1498
|
}
|
|
1499
|
-
`;var
|
|
1499
|
+
`;var xo=_graphqlrequest.gql`
|
|
1500
1500
|
query TranscendCliPrompts(
|
|
1501
1501
|
$first: Int!
|
|
1502
1502
|
$offset: Int!
|
|
@@ -1519,7 +1519,7 @@
|
|
|
1519
1519
|
}
|
|
1520
1520
|
}
|
|
1521
1521
|
}
|
|
1522
|
-
`,
|
|
1522
|
+
`,Do= exports.la =_graphqlrequest.gql`
|
|
1523
1523
|
query TranscendCliPromptPartials($first: Int!, $offset: Int!) {
|
|
1524
1524
|
promptPartials(first: $first, offset: $offset) {
|
|
1525
1525
|
nodes {
|
|
@@ -1529,7 +1529,7 @@
|
|
|
1529
1529
|
}
|
|
1530
1530
|
}
|
|
1531
1531
|
}
|
|
1532
|
-
`,
|
|
1532
|
+
`,qo= exports.ma =_graphqlrequest.gql`
|
|
1533
1533
|
query TranscendCliPromptGroups($first: Int!, $offset: Int!) {
|
|
1534
1534
|
promptGroups(
|
|
1535
1535
|
first: $first
|
|
@@ -1546,7 +1546,7 @@
|
|
|
1546
1546
|
}
|
|
1547
1547
|
}
|
|
1548
1548
|
}
|
|
1549
|
-
`,
|
|
1549
|
+
`,Lo= exports.na =_graphqlrequest.gql`
|
|
1550
1550
|
query TranscendCliPromptsWithVariables($input: PromptsWithVariablesInput!) {
|
|
1551
1551
|
promptsWithVariables(input: $input) {
|
|
1552
1552
|
prompts {
|
|
@@ -1574,13 +1574,13 @@
|
|
|
1574
1574
|
}
|
|
1575
1575
|
}
|
|
1576
1576
|
}
|
|
1577
|
-
`,
|
|
1577
|
+
`,vo= exports.oa =_graphqlrequest.gql`
|
|
1578
1578
|
mutation TranscendCliUpdatePrompts($input: UpdatePromptsInput!) {
|
|
1579
1579
|
updatePrompts(input: $input) {
|
|
1580
1580
|
clientMutationId
|
|
1581
1581
|
}
|
|
1582
1582
|
}
|
|
1583
|
-
`,
|
|
1583
|
+
`,ko= exports.pa =_graphqlrequest.gql`
|
|
1584
1584
|
mutation TranscendCliCreatePrompt($input: CreatePromptInput!) {
|
|
1585
1585
|
createPrompt(input: $input) {
|
|
1586
1586
|
clientMutationId
|
|
@@ -1589,7 +1589,7 @@
|
|
|
1589
1589
|
}
|
|
1590
1590
|
}
|
|
1591
1591
|
}
|
|
1592
|
-
`,
|
|
1592
|
+
`,_o= exports.qa =_graphqlrequest.gql`
|
|
1593
1593
|
mutation TranscendCliUpdatePromptPartials(
|
|
1594
1594
|
$input: UpdatePromptPartialsInput!
|
|
1595
1595
|
) {
|
|
@@ -1597,7 +1597,7 @@
|
|
|
1597
1597
|
clientMutationId
|
|
1598
1598
|
}
|
|
1599
1599
|
}
|
|
1600
|
-
`,
|
|
1600
|
+
`,Oo= exports.ra =_graphqlrequest.gql`
|
|
1601
1601
|
mutation TranscendCliCreatePromptPartial($input: CreatePromptPartialInput!) {
|
|
1602
1602
|
createPromptPartial(input: $input) {
|
|
1603
1603
|
clientMutationId
|
|
@@ -1606,13 +1606,13 @@
|
|
|
1606
1606
|
}
|
|
1607
1607
|
}
|
|
1608
1608
|
}
|
|
1609
|
-
`,
|
|
1609
|
+
`,Go= exports.sa =_graphqlrequest.gql`
|
|
1610
1610
|
mutation TranscendCliUpdatePromptGroups($input: UpdatePromptGroupsInput!) {
|
|
1611
1611
|
updatePromptGroups(input: $input) {
|
|
1612
1612
|
clientMutationId
|
|
1613
1613
|
}
|
|
1614
1614
|
}
|
|
1615
|
-
`,
|
|
1615
|
+
`,No= exports.ta =_graphqlrequest.gql`
|
|
1616
1616
|
mutation TranscendCliCreatePromptPartial($input: CreatePromptGroupInput!) {
|
|
1617
1617
|
createPromptGroup(input: $input) {
|
|
1618
1618
|
clientMutationId
|
|
@@ -1621,7 +1621,7 @@
|
|
|
1621
1621
|
}
|
|
1622
1622
|
}
|
|
1623
1623
|
}
|
|
1624
|
-
`;var
|
|
1624
|
+
`;var Wr=_graphqlrequest.gql`
|
|
1625
1625
|
query TranscendCliRequestDataSilos(
|
|
1626
1626
|
$first: Int!
|
|
1627
1627
|
$offset: Int!
|
|
@@ -1643,7 +1643,7 @@
|
|
|
1643
1643
|
totalCount
|
|
1644
1644
|
}
|
|
1645
1645
|
}
|
|
1646
|
-
`,
|
|
1646
|
+
`,Mo= exports.va =_graphqlrequest.gql`
|
|
1647
1647
|
mutation TranscendCliMarkRequestDataSiloCompleted(
|
|
1648
1648
|
$requestDataSiloId: ID!
|
|
1649
1649
|
$status: UpdateRequestDataSiloStatus!
|
|
@@ -1656,7 +1656,7 @@
|
|
|
1656
1656
|
}
|
|
1657
1657
|
}
|
|
1658
1658
|
}
|
|
1659
|
-
`,
|
|
1659
|
+
`,Fo= exports.wa =_graphqlrequest.gql`
|
|
1660
1660
|
mutation TranscendCliRetryRequestDataSilo($requestDataSiloId: ID!) {
|
|
1661
1661
|
retryRequestDataSilo(id: $requestDataSiloId) {
|
|
1662
1662
|
requestDataSilo {
|
|
@@ -1664,7 +1664,7 @@
|
|
|
1664
1664
|
}
|
|
1665
1665
|
}
|
|
1666
1666
|
}
|
|
1667
|
-
`,
|
|
1667
|
+
`,Uo= exports.xa =_graphqlrequest.gql`
|
|
1668
1668
|
query TranscendCliListReducedRequestsForDataSiloCount(
|
|
1669
1669
|
$input: BulkCompletionReducedRequestInput!
|
|
1670
1670
|
) {
|
|
@@ -1672,7 +1672,7 @@
|
|
|
1672
1672
|
totalCount
|
|
1673
1673
|
}
|
|
1674
1674
|
}
|
|
1675
|
-
`;var
|
|
1675
|
+
`;var Bo=_graphqlrequest.gql`
|
|
1676
1676
|
query TranscendCliTeams(
|
|
1677
1677
|
$first: Int!
|
|
1678
1678
|
$offset: Int!
|
|
@@ -1716,7 +1716,7 @@
|
|
|
1716
1716
|
}
|
|
1717
1717
|
}
|
|
1718
1718
|
}
|
|
1719
|
-
`,
|
|
1719
|
+
`,Vo= exports.Aa =_graphqlrequest.gql`
|
|
1720
1720
|
mutation TranscendCliUpdateTeam($input: UpdateTeamInput!) {
|
|
1721
1721
|
updateTeam(input: $input) {
|
|
1722
1722
|
team {
|
|
@@ -1725,7 +1725,7 @@
|
|
|
1725
1725
|
}
|
|
1726
1726
|
}
|
|
1727
1727
|
}
|
|
1728
|
-
`;var
|
|
1728
|
+
`;var jo=_graphqlrequest.gql`
|
|
1729
1729
|
mutation TranscendCliRemoveRequestIdentifiers(
|
|
1730
1730
|
$input: RemoveRequestIdentifiersInput!
|
|
1731
1731
|
) {
|
|
@@ -1733,7 +1733,7 @@
|
|
|
1733
1733
|
count
|
|
1734
1734
|
}
|
|
1735
1735
|
}
|
|
1736
|
-
`,
|
|
1736
|
+
`,Yo= exports.Ca =_graphqlrequest.gql`
|
|
1737
1737
|
query TranscendCliRequestIdentifiers(
|
|
1738
1738
|
$first: Int!
|
|
1739
1739
|
$offset: Int!
|
|
@@ -1757,7 +1757,7 @@
|
|
|
1757
1757
|
totalCount
|
|
1758
1758
|
}
|
|
1759
1759
|
}
|
|
1760
|
-
`;var
|
|
1760
|
+
`;var Zo=_graphqlrequest.gql`
|
|
1761
1761
|
query TranscendCliUsers(
|
|
1762
1762
|
$first: Int!
|
|
1763
1763
|
$offset: Int!
|
|
@@ -1779,7 +1779,7 @@
|
|
|
1779
1779
|
}
|
|
1780
1780
|
}
|
|
1781
1781
|
}
|
|
1782
|
-
`;var
|
|
1782
|
+
`;var Fg=_graphqlrequest.gql`
|
|
1783
1783
|
query TranscendCliRequestFiles(
|
|
1784
1784
|
$first: Int!
|
|
1785
1785
|
$offset: Int!
|
|
@@ -1800,7 +1800,7 @@
|
|
|
1800
1800
|
}
|
|
1801
1801
|
}
|
|
1802
1802
|
}
|
|
1803
|
-
`,
|
|
1803
|
+
`,Wo= exports.Fa =_graphqlrequest.gql`
|
|
1804
1804
|
query TranscendCliBulkRequestFiles(
|
|
1805
1805
|
$filterBy: BulkRequestFilesFiltersInput!
|
|
1806
1806
|
$first: Int!
|
|
@@ -1817,7 +1817,7 @@
|
|
|
1817
1817
|
}
|
|
1818
1818
|
}
|
|
1819
1819
|
}
|
|
1820
|
-
`;var
|
|
1820
|
+
`;var Jo=_graphqlrequest.gql`
|
|
1821
1821
|
mutation TranscendCliReportPromptRun($input: ReportPromptRunInput!) {
|
|
1822
1822
|
reportPromptRun(input: $input) {
|
|
1823
1823
|
clientMutationId
|
|
@@ -1826,7 +1826,7 @@
|
|
|
1826
1826
|
}
|
|
1827
1827
|
}
|
|
1828
1828
|
}
|
|
1829
|
-
`,
|
|
1829
|
+
`,Xo= exports.Ha =_graphqlrequest.gql`
|
|
1830
1830
|
mutation TranscendCliAddMessagesToPromptRun(
|
|
1831
1831
|
$input: AddMessagesToPromptRunInput!
|
|
1832
1832
|
) {
|
|
@@ -1837,7 +1837,7 @@
|
|
|
1837
1837
|
}
|
|
1838
1838
|
}
|
|
1839
1839
|
}
|
|
1840
|
-
`;var
|
|
1840
|
+
`;var es=_graphqlrequest.gql`
|
|
1841
1841
|
query TranscendCliGlobalActionItemCollectionss(
|
|
1842
1842
|
$filterBy: GlobalActionItemCollectionFiltersInput!
|
|
1843
1843
|
) {
|
|
@@ -1851,7 +1851,7 @@
|
|
|
1851
1851
|
}
|
|
1852
1852
|
}
|
|
1853
1853
|
}
|
|
1854
|
-
`,
|
|
1854
|
+
`,ts= exports.Ja =_graphqlrequest.gql`
|
|
1855
1855
|
mutation TranscendCliCreateActionItemCollection(
|
|
1856
1856
|
$input: CreateActionItemCollectionInput!
|
|
1857
1857
|
) {
|
|
@@ -1862,7 +1862,7 @@
|
|
|
1862
1862
|
}
|
|
1863
1863
|
}
|
|
1864
1864
|
}
|
|
1865
|
-
`,
|
|
1865
|
+
`,rs= exports.Ka =_graphqlrequest.gql`
|
|
1866
1866
|
mutation TranscendCliUpdateActionItemCollection(
|
|
1867
1867
|
$input: UpdateActionItemCollectionInput!
|
|
1868
1868
|
) {
|
|
@@ -1870,7 +1870,7 @@
|
|
|
1870
1870
|
clientMutationId
|
|
1871
1871
|
}
|
|
1872
1872
|
}
|
|
1873
|
-
`;var
|
|
1873
|
+
`;var is=_graphqlrequest.gql`
|
|
1874
1874
|
query TranscendCliAttributes($first: Int!, $offset: Int!) {
|
|
1875
1875
|
attributeKeys(first: $first, offset: $offset, useMaster: false) {
|
|
1876
1876
|
nodes {
|
|
@@ -1883,7 +1883,7 @@
|
|
|
1883
1883
|
}
|
|
1884
1884
|
}
|
|
1885
1885
|
}
|
|
1886
|
-
`,
|
|
1886
|
+
`,ns= exports.Ma =_graphqlrequest.gql`
|
|
1887
1887
|
mutation TranscendCliCreateAttributeValues(
|
|
1888
1888
|
$input: [CreateAttributeValuesInput!]!
|
|
1889
1889
|
) {
|
|
@@ -1891,7 +1891,7 @@
|
|
|
1891
1891
|
clientMutationId
|
|
1892
1892
|
}
|
|
1893
1893
|
}
|
|
1894
|
-
`,
|
|
1894
|
+
`,os= exports.Na =_graphqlrequest.gql`
|
|
1895
1895
|
mutation TranscendCliUpdateAttributeValues(
|
|
1896
1896
|
$input: [UpdateAttributeValueInput!]!
|
|
1897
1897
|
) {
|
|
@@ -1899,13 +1899,13 @@
|
|
|
1899
1899
|
clientMutationId
|
|
1900
1900
|
}
|
|
1901
1901
|
}
|
|
1902
|
-
`,
|
|
1902
|
+
`,ss= exports.Oa =_graphqlrequest.gql`
|
|
1903
1903
|
mutation TranscendCliDeleteAttributeValue($id: ID!) {
|
|
1904
1904
|
deleteAttributeValue(id: $id) {
|
|
1905
1905
|
clientMutationId
|
|
1906
1906
|
}
|
|
1907
1907
|
}
|
|
1908
|
-
`,
|
|
1908
|
+
`,as= exports.Pa =_graphqlrequest.gql`
|
|
1909
1909
|
query TranscendCliAttributeValues(
|
|
1910
1910
|
$first: Int!
|
|
1911
1911
|
$offset: Int!
|
|
@@ -1925,7 +1925,7 @@
|
|
|
1925
1925
|
}
|
|
1926
1926
|
}
|
|
1927
1927
|
}
|
|
1928
|
-
`,
|
|
1928
|
+
`,ps= exports.Qa =_graphqlrequest.gql`
|
|
1929
1929
|
mutation TranscendCliCreateAttribute(
|
|
1930
1930
|
$name: String!
|
|
1931
1931
|
$type: AttributeKeyType!
|
|
@@ -1946,7 +1946,7 @@
|
|
|
1946
1946
|
}
|
|
1947
1947
|
}
|
|
1948
1948
|
}
|
|
1949
|
-
`,
|
|
1949
|
+
`,ls= exports.Ra =_graphqlrequest.gql`
|
|
1950
1950
|
mutation TranscendCliCreateAttribute(
|
|
1951
1951
|
$attributeKeyId: ID!
|
|
1952
1952
|
$description: String
|
|
@@ -1965,7 +1965,7 @@
|
|
|
1965
1965
|
}
|
|
1966
1966
|
}
|
|
1967
1967
|
}
|
|
1968
|
-
`,
|
|
1968
|
+
`,cs= exports.Sa =_graphqlrequest.gql`
|
|
1969
1969
|
mutation TranscendCliSetResourceAttributes(
|
|
1970
1970
|
$input: SetResourceAttributesInput!
|
|
1971
1971
|
) {
|
|
@@ -1973,7 +1973,7 @@
|
|
|
1973
1973
|
clientMutationId
|
|
1974
1974
|
}
|
|
1975
1975
|
}
|
|
1976
|
-
`;var
|
|
1976
|
+
`;var us=_graphqlrequest.gql`
|
|
1977
1977
|
query TranscendCliExperiences($first: Int!, $offset: Int!) {
|
|
1978
1978
|
experiences(first: $first, offset: $offset, useMaster: false) {
|
|
1979
1979
|
nodes {
|
|
@@ -2002,7 +2002,7 @@
|
|
|
2002
2002
|
}
|
|
2003
2003
|
}
|
|
2004
2004
|
}
|
|
2005
|
-
`,
|
|
2005
|
+
`,ms= exports.Ua =_graphqlrequest.gql`
|
|
2006
2006
|
query TranscendCliConsentPartitions($first: Int!, $offset: Int!) {
|
|
2007
2007
|
consentPartitions(first: $first, offset: $offset) {
|
|
2008
2008
|
nodes {
|
|
@@ -2012,7 +2012,7 @@
|
|
|
2012
2012
|
}
|
|
2013
2013
|
}
|
|
2014
2014
|
}
|
|
2015
|
-
`,
|
|
2015
|
+
`,ds= exports.Va =_graphqlrequest.gql`
|
|
2016
2016
|
mutation TranscendCliCreateDataFlows(
|
|
2017
2017
|
$dataFlows: [DataFlowInput!]!
|
|
2018
2018
|
$airgapBundleId: ID!
|
|
@@ -2030,7 +2030,7 @@
|
|
|
2030
2030
|
}
|
|
2031
2031
|
}
|
|
2032
2032
|
}
|
|
2033
|
-
`,
|
|
2033
|
+
`,fs= exports.Wa =_graphqlrequest.gql`
|
|
2034
2034
|
mutation TranscendCliUpdateDataFlows(
|
|
2035
2035
|
$airgapBundleId: ID!
|
|
2036
2036
|
$dataFlows: [UpdateDataFlowInput!]!
|
|
@@ -2048,7 +2048,7 @@
|
|
|
2048
2048
|
}
|
|
2049
2049
|
}
|
|
2050
2050
|
}
|
|
2051
|
-
`,
|
|
2051
|
+
`,gs= exports.Xa =_graphqlrequest.gql`
|
|
2052
2052
|
mutation TranscendCliUpdateOrCreateCookies(
|
|
2053
2053
|
$cookies: [UpdateOrCreateCookieInput!]!
|
|
2054
2054
|
$airgapBundleId: ID!
|
|
@@ -2059,7 +2059,7 @@
|
|
|
2059
2059
|
clientMutationId
|
|
2060
2060
|
}
|
|
2061
2061
|
}
|
|
2062
|
-
`,
|
|
2062
|
+
`,ys= exports.Ya =_graphqlrequest.gql`
|
|
2063
2063
|
query TranscendCliDataFlows(
|
|
2064
2064
|
$first: Int!
|
|
2065
2065
|
$airgapBundleId: ID!
|
|
@@ -2104,7 +2104,7 @@
|
|
|
2104
2104
|
}
|
|
2105
2105
|
}
|
|
2106
2106
|
}
|
|
2107
|
-
`,
|
|
2107
|
+
`,hs= exports.Za =_graphqlrequest.gql`
|
|
2108
2108
|
query TranscendCliCookies(
|
|
2109
2109
|
$first: Int!
|
|
2110
2110
|
$offset: Int!
|
|
@@ -2148,7 +2148,7 @@
|
|
|
2148
2148
|
}
|
|
2149
2149
|
}
|
|
2150
2150
|
}
|
|
2151
|
-
`,
|
|
2151
|
+
`,Cs= exports._a =_graphqlrequest.gql`
|
|
2152
2152
|
query TranscendCliFetchConsentManagerId {
|
|
2153
2153
|
consentManager {
|
|
2154
2154
|
consentManager {
|
|
@@ -2156,7 +2156,7 @@
|
|
|
2156
2156
|
}
|
|
2157
2157
|
}
|
|
2158
2158
|
}
|
|
2159
|
-
`,
|
|
2159
|
+
`,As= exports.$a =_graphqlrequest.gql`
|
|
2160
2160
|
query TranscendCliFetchConsentManager {
|
|
2161
2161
|
consentManager {
|
|
2162
2162
|
consentManager {
|
|
@@ -2180,7 +2180,7 @@
|
|
|
2180
2180
|
}
|
|
2181
2181
|
}
|
|
2182
2182
|
}
|
|
2183
|
-
`,
|
|
2183
|
+
`,Ss= exports.ab =_graphqlrequest.gql`
|
|
2184
2184
|
query TranscendCliFetchConsentManagerTheme($airgapBundleId: ID!) {
|
|
2185
2185
|
consentManagerTheme(input: { airgapBundleId: $airgapBundleId }) {
|
|
2186
2186
|
theme {
|
|
@@ -2199,7 +2199,7 @@
|
|
|
2199
2199
|
}
|
|
2200
2200
|
}
|
|
2201
2201
|
}
|
|
2202
|
-
`,
|
|
2202
|
+
`,Ts= exports.cb =_graphqlrequest.gql`
|
|
2203
2203
|
mutation TranscendCliUpdateConsentManager(
|
|
2204
2204
|
$airgapBundleId: ID!
|
|
2205
2205
|
$version: String!
|
|
@@ -2208,7 +2208,7 @@
|
|
|
2208
2208
|
clientMutationId
|
|
2209
2209
|
}
|
|
2210
2210
|
}
|
|
2211
|
-
`,
|
|
2211
|
+
`,Ps= exports.db =_graphqlrequest.gql`
|
|
2212
2212
|
mutation TranscendCliUpdateConsentManagerToLatest(
|
|
2213
2213
|
$airgapBundleId: ID!
|
|
2214
2214
|
$bundleType: ConsentBundleType!
|
|
@@ -2220,7 +2220,7 @@
|
|
|
2220
2220
|
clientMutationId
|
|
2221
2221
|
}
|
|
2222
2222
|
}
|
|
2223
|
-
`,
|
|
2223
|
+
`,Es= exports.eb =_graphqlrequest.gql`
|
|
2224
2224
|
mutation TranscendCliDeployConsentManager(
|
|
2225
2225
|
$airgapBundleId: ID!
|
|
2226
2226
|
$bundleType: ConsentBundleType!
|
|
@@ -2232,7 +2232,7 @@
|
|
|
2232
2232
|
clientMutationId
|
|
2233
2233
|
}
|
|
2234
2234
|
}
|
|
2235
|
-
`,
|
|
2235
|
+
`,Rs= exports.fb =_graphqlrequest.gql`
|
|
2236
2236
|
mutation TranscendCliUpdateConsentManagerDomains(
|
|
2237
2237
|
$airgapBundleId: ID!
|
|
2238
2238
|
$domains: [String!]!
|
|
@@ -2243,7 +2243,7 @@
|
|
|
2243
2243
|
clientMutationId
|
|
2244
2244
|
}
|
|
2245
2245
|
}
|
|
2246
|
-
`,
|
|
2246
|
+
`,bs= exports.gb =_graphqlrequest.gql`
|
|
2247
2247
|
mutation TranscendCliUpdateConsentManagerPartition(
|
|
2248
2248
|
$airgapBundleId: ID!
|
|
2249
2249
|
$partitionId: ID!
|
|
@@ -2254,13 +2254,13 @@
|
|
|
2254
2254
|
clientMutationId
|
|
2255
2255
|
}
|
|
2256
2256
|
}
|
|
2257
|
-
`,
|
|
2257
|
+
`,ws= exports.hb =_graphqlrequest.gql`
|
|
2258
2258
|
mutation TranscendCliUpdateLoadOptions($input: UpdateLoadOptionsInput!) {
|
|
2259
2259
|
updateLoadOptions(input: $input) {
|
|
2260
2260
|
clientMutationId
|
|
2261
2261
|
}
|
|
2262
2262
|
}
|
|
2263
|
-
|
|
2263
|
+
`,$s= exports.ib =_graphqlrequest.gql`
|
|
2264
2264
|
mutation TranscendCliToggleUnknownRequestPolicy(
|
|
2265
2265
|
$input: ToggleUnknownRequestPolicyInput!
|
|
2266
2266
|
) {
|
|
@@ -2268,7 +2268,7 @@
|
|
|
2268
2268
|
clientMutationId
|
|
2269
2269
|
}
|
|
2270
2270
|
}
|
|
2271
|
-
|
|
2271
|
+
`,xs= exports.jb =_graphqlrequest.gql`
|
|
2272
2272
|
mutation TranscendCliToggleUnknownCookiePolicy(
|
|
2273
2273
|
$input: ToggleUnknownCookiePolicyInput!
|
|
2274
2274
|
) {
|
|
@@ -2276,7 +2276,7 @@
|
|
|
2276
2276
|
clientMutationId
|
|
2277
2277
|
}
|
|
2278
2278
|
}
|
|
2279
|
-
`,
|
|
2279
|
+
`,Ds= exports.kb =_graphqlrequest.gql`
|
|
2280
2280
|
mutation TranscendCliToggleTelemetryPartitionStrategy(
|
|
2281
2281
|
$input: ToggleTelemetryPartitionStrategyInput!
|
|
2282
2282
|
) {
|
|
@@ -2284,7 +2284,7 @@
|
|
|
2284
2284
|
clientMutationId
|
|
2285
2285
|
}
|
|
2286
2286
|
}
|
|
2287
|
-
`,
|
|
2287
|
+
`,qs= exports.lb =_graphqlrequest.gql`
|
|
2288
2288
|
mutation TranscendCliToggleConsentPrecedence(
|
|
2289
2289
|
$input: ToggleConsentPrecedenceInput!
|
|
2290
2290
|
) {
|
|
@@ -2292,7 +2292,7 @@
|
|
|
2292
2292
|
clientMutationId
|
|
2293
2293
|
}
|
|
2294
2294
|
}
|
|
2295
|
-
`,
|
|
2295
|
+
`,Ls= exports.mb =_graphqlrequest.gql`
|
|
2296
2296
|
mutation TranscendCliUpdateConsentManagerTheme(
|
|
2297
2297
|
$input: UpdateConsentManagerThemeInput!
|
|
2298
2298
|
) {
|
|
@@ -2300,19 +2300,19 @@
|
|
|
2300
2300
|
clientMutationId
|
|
2301
2301
|
}
|
|
2302
2302
|
}
|
|
2303
|
-
`,
|
|
2303
|
+
`,vs= exports.nb =_graphqlrequest.gql`
|
|
2304
2304
|
mutation TranscendCliUpdateConsentExperience($input: UpdateExperienceInput!) {
|
|
2305
2305
|
updateExperience(input: $input) {
|
|
2306
2306
|
clientMutationId
|
|
2307
2307
|
}
|
|
2308
2308
|
}
|
|
2309
|
-
`,
|
|
2309
|
+
`,ks= exports.ob =_graphqlrequest.gql`
|
|
2310
2310
|
mutation TranscendCliCreateConsentExperience($input: CreateExperienceInput!) {
|
|
2311
2311
|
createExperience(input: $input) {
|
|
2312
2312
|
clientMutationId
|
|
2313
2313
|
}
|
|
2314
2314
|
}
|
|
2315
|
-
`,
|
|
2315
|
+
`,_s= exports.pb =_graphqlrequest.gql`
|
|
2316
2316
|
mutation TranscendCliCreateConsentPartition(
|
|
2317
2317
|
$input: CreateConsentPartitionInput!
|
|
2318
2318
|
) {
|
|
@@ -2320,7 +2320,7 @@
|
|
|
2320
2320
|
clientMutationId
|
|
2321
2321
|
}
|
|
2322
2322
|
}
|
|
2323
|
-
`;var
|
|
2323
|
+
`;var Os=_graphqlrequest.gql`
|
|
2324
2324
|
query TranscendCliConsentManagerAnalyticsData($input: AnalyticsInput!) {
|
|
2325
2325
|
analyticsData(input: $input) {
|
|
2326
2326
|
series {
|
|
@@ -2332,7 +2332,7 @@
|
|
|
2332
2332
|
}
|
|
2333
2333
|
}
|
|
2334
2334
|
}
|
|
2335
|
-
`;var
|
|
2335
|
+
`;var Gs=_graphqlrequest.gql`
|
|
2336
2336
|
query TranscendCliBusinessEntities($first: Int!, $offset: Int!) {
|
|
2337
2337
|
businessEntities(
|
|
2338
2338
|
first: $first
|
|
@@ -2361,7 +2361,7 @@
|
|
|
2361
2361
|
}
|
|
2362
2362
|
}
|
|
2363
2363
|
}
|
|
2364
|
-
`,
|
|
2364
|
+
`,Ns= exports.sb =_graphqlrequest.gql`
|
|
2365
2365
|
mutation TranscendCliCreateBusinessEntity(
|
|
2366
2366
|
$input: CreateBusinessEntityInput!
|
|
2367
2367
|
) {
|
|
@@ -2384,7 +2384,7 @@
|
|
|
2384
2384
|
}
|
|
2385
2385
|
}
|
|
2386
2386
|
}
|
|
2387
|
-
`,
|
|
2387
|
+
`,Ms= exports.tb =_graphqlrequest.gql`
|
|
2388
2388
|
mutation TranscendCliUpdateBusinessEntities(
|
|
2389
2389
|
$input: [UpdateBusinessEntityInput!]!
|
|
2390
2390
|
) {
|
|
@@ -2392,7 +2392,7 @@
|
|
|
2392
2392
|
clientMutationId
|
|
2393
2393
|
}
|
|
2394
2394
|
}
|
|
2395
|
-
`;var
|
|
2395
|
+
`;var Us=_graphqlrequest.gql`
|
|
2396
2396
|
query TranscendCliActions($first: Int!, $offset: Int!) {
|
|
2397
2397
|
actions(
|
|
2398
2398
|
first: $first
|
|
@@ -2412,7 +2412,7 @@
|
|
|
2412
2412
|
}
|
|
2413
2413
|
}
|
|
2414
2414
|
}
|
|
2415
|
-
`,
|
|
2415
|
+
`,Bs= exports.vb =_graphqlrequest.gql`
|
|
2416
2416
|
mutation TranscendCliUpdateAction($input: UpdateActionInput!) {
|
|
2417
2417
|
updateAction(input: $input) {
|
|
2418
2418
|
clientMutationId
|
|
@@ -2465,31 +2465,31 @@
|
|
|
2465
2465
|
}
|
|
2466
2466
|
}
|
|
2467
2467
|
}
|
|
2468
|
-
`,
|
|
2468
|
+
`,Vs= exports.xb =_graphqlrequest.gql`
|
|
2469
2469
|
mutation TranscendCliUpdateActionItems($input: UpdateActionItemsInput!) {
|
|
2470
2470
|
updateActionItems(input: $input) {
|
|
2471
2471
|
clientMutationId
|
|
2472
2472
|
}
|
|
2473
2473
|
}
|
|
2474
|
-
`,
|
|
2474
|
+
`,Ks= exports.yb =_graphqlrequest.gql`
|
|
2475
2475
|
mutation TranscendCliCreateActionItems($input: [CreateActionItemsInput!]!) {
|
|
2476
2476
|
createActionItems(input: $input) {
|
|
2477
2477
|
clientMutationId
|
|
2478
2478
|
}
|
|
2479
2479
|
}
|
|
2480
|
-
`;var
|
|
2480
|
+
`;var js=_graphqlrequest.gql`
|
|
2481
2481
|
query TranscendCliFetchPrivacyCenterId($url: String!) {
|
|
2482
2482
|
privacyCenter(lookup: { url: $url }) {
|
|
2483
2483
|
id
|
|
2484
2484
|
}
|
|
2485
2485
|
}
|
|
2486
|
-
`,
|
|
2486
|
+
`,Ys= exports.Ab =_graphqlrequest.gql`
|
|
2487
2487
|
query TranscendCliDeployedPrivacyCenterUrl {
|
|
2488
2488
|
organization {
|
|
2489
2489
|
deployedPrivacyCenterUrl
|
|
2490
2490
|
}
|
|
2491
2491
|
}
|
|
2492
|
-
`,
|
|
2492
|
+
`,Zs= exports.Bb =_graphqlrequest.gql`
|
|
2493
2493
|
query TranscendCliFetchPrivacyCenters($url: String!) {
|
|
2494
2494
|
privacyCenter(lookup: { url: $url }) {
|
|
2495
2495
|
id
|
|
@@ -2514,13 +2514,13 @@
|
|
|
2514
2514
|
themeStr
|
|
2515
2515
|
}
|
|
2516
2516
|
}
|
|
2517
|
-
`,
|
|
2517
|
+
`,zs= exports.Cb =_graphqlrequest.gql`
|
|
2518
2518
|
mutation TranscendCliUpdatePrivacyCenter($input: UpdatePrivacyCenterInput!) {
|
|
2519
2519
|
updatePrivacyCenter(input: $input) {
|
|
2520
2520
|
clientMutationId
|
|
2521
2521
|
}
|
|
2522
2522
|
}
|
|
2523
|
-
`;var
|
|
2523
|
+
`;var ri=_graphqlrequest.gql`
|
|
2524
2524
|
mutation TranscendCliDetermineLoginMethod($email: String!) {
|
|
2525
2525
|
determineLoginMethod(input: { email: $email }) {
|
|
2526
2526
|
loginMethod {
|
|
@@ -2529,7 +2529,7 @@
|
|
|
2529
2529
|
}
|
|
2530
2530
|
}
|
|
2531
2531
|
}
|
|
2532
|
-
`,
|
|
2532
|
+
`,Ws= exports.Eb =_graphqlrequest.gql`
|
|
2533
2533
|
mutation TranscendCliLogin(
|
|
2534
2534
|
$email: String!
|
|
2535
2535
|
$password: String!
|
|
@@ -2552,13 +2552,13 @@
|
|
|
2552
2552
|
}
|
|
2553
2553
|
}
|
|
2554
2554
|
}
|
|
2555
|
-
`,
|
|
2555
|
+
`,Hs= exports.Fb =_graphqlrequest.gql`
|
|
2556
2556
|
mutation TranscendCliAssumeRole($id: ID!, $publicKey: String!) {
|
|
2557
2557
|
assumeRole(id: $id, publicKey: $publicKey) {
|
|
2558
2558
|
clientMutationId
|
|
2559
2559
|
}
|
|
2560
2560
|
}
|
|
2561
|
-
`;var
|
|
2561
|
+
`;var ly=_graphqlrequest.gql`
|
|
2562
2562
|
query TranscendCliLargeLanguageModels(
|
|
2563
2563
|
$first: Int!
|
|
2564
2564
|
$offset: Int!
|
|
@@ -2582,7 +2582,7 @@
|
|
|
2582
2582
|
}
|
|
2583
2583
|
}
|
|
2584
2584
|
}
|
|
2585
|
-
`;var
|
|
2585
|
+
`;var Js=_graphqlrequest.gql`
|
|
2586
2586
|
query TranscendCliAgents(
|
|
2587
2587
|
$first: Int!
|
|
2588
2588
|
$offset: Int!
|
|
@@ -2627,7 +2627,7 @@
|
|
|
2627
2627
|
}
|
|
2628
2628
|
}
|
|
2629
2629
|
}
|
|
2630
|
-
`,
|
|
2630
|
+
`,Xs= exports.Ib =_graphqlrequest.gql`
|
|
2631
2631
|
mutation TranscendCliCreateAgent($input: CreateAgentInput!) {
|
|
2632
2632
|
createAgent(input: $input) {
|
|
2633
2633
|
agent {
|
|
@@ -2637,13 +2637,13 @@
|
|
|
2637
2637
|
}
|
|
2638
2638
|
}
|
|
2639
2639
|
}
|
|
2640
|
-
`,
|
|
2640
|
+
`,ea= exports.Jb =_graphqlrequest.gql`
|
|
2641
2641
|
mutation TranscendCliUpdateAgents($input: UpdateAgentsInput!) {
|
|
2642
2642
|
updateAgents(input: $input) {
|
|
2643
2643
|
clientMutationId
|
|
2644
2644
|
}
|
|
2645
2645
|
}
|
|
2646
|
-
`;var
|
|
2646
|
+
`;var ta=_graphqlrequest.gql`
|
|
2647
2647
|
query TranscendCliAgentFiles(
|
|
2648
2648
|
$first: Int!
|
|
2649
2649
|
$offset: Int!
|
|
@@ -2669,7 +2669,7 @@
|
|
|
2669
2669
|
}
|
|
2670
2670
|
}
|
|
2671
2671
|
}
|
|
2672
|
-
`,
|
|
2672
|
+
`,ra= exports.Lb =_graphqlrequest.gql`
|
|
2673
2673
|
mutation TranscendCliCreateAgentFile($input: CreateAgentFileInput!) {
|
|
2674
2674
|
createAgentFile(input: $input) {
|
|
2675
2675
|
agentFile {
|
|
@@ -2680,13 +2680,13 @@
|
|
|
2680
2680
|
}
|
|
2681
2681
|
}
|
|
2682
2682
|
}
|
|
2683
|
-
`,
|
|
2683
|
+
`,ia= exports.Mb =_graphqlrequest.gql`
|
|
2684
2684
|
mutation TranscendCliUpdateAgentFiles($input: UpdateAgentFilesInput!) {
|
|
2685
2685
|
updateAgentFiles(input: $input) {
|
|
2686
2686
|
clientMutationId
|
|
2687
2687
|
}
|
|
2688
2688
|
}
|
|
2689
|
-
`;var
|
|
2689
|
+
`;var na=_graphqlrequest.gql`
|
|
2690
2690
|
query TranscendCliAgentFunctions($first: Int!, $offset: Int!) {
|
|
2691
2691
|
agentFunctions(
|
|
2692
2692
|
first: $first
|
|
@@ -2704,7 +2704,7 @@
|
|
|
2704
2704
|
}
|
|
2705
2705
|
}
|
|
2706
2706
|
}
|
|
2707
|
-
`,
|
|
2707
|
+
`,oa= exports.Ob =_graphqlrequest.gql`
|
|
2708
2708
|
mutation TranscendCliCreateAgentFunction($input: CreateAgentFunctionInput!) {
|
|
2709
2709
|
createAgentFunction(input: $input) {
|
|
2710
2710
|
agentFunction {
|
|
@@ -2713,7 +2713,7 @@
|
|
|
2713
2713
|
}
|
|
2714
2714
|
}
|
|
2715
2715
|
}
|
|
2716
|
-
`,
|
|
2716
|
+
`,sa= exports.Pb =_graphqlrequest.gql`
|
|
2717
2717
|
mutation TranscendCliUpdateAgentFunctions(
|
|
2718
2718
|
$input: UpdateAgentFunctionsInput!
|
|
2719
2719
|
) {
|
|
@@ -2721,7 +2721,7 @@
|
|
|
2721
2721
|
clientMutationId
|
|
2722
2722
|
}
|
|
2723
2723
|
}
|
|
2724
|
-
`;var
|
|
2724
|
+
`;var aa=_graphqlrequest.gql`
|
|
2725
2725
|
query TranscendCliVendors($first: Int!, $offset: Int!) {
|
|
2726
2726
|
vendors(
|
|
2727
2727
|
first: $first
|
|
@@ -2763,7 +2763,7 @@
|
|
|
2763
2763
|
}
|
|
2764
2764
|
}
|
|
2765
2765
|
}
|
|
2766
|
-
`,
|
|
2766
|
+
`,pa= exports.Rb =_graphqlrequest.gql`
|
|
2767
2767
|
mutation TranscendCliCreateVendor($input: CreateVendorInput!) {
|
|
2768
2768
|
createVendor(input: $input) {
|
|
2769
2769
|
vendor {
|
|
@@ -2772,13 +2772,13 @@
|
|
|
2772
2772
|
}
|
|
2773
2773
|
}
|
|
2774
2774
|
}
|
|
2775
|
-
`,
|
|
2775
|
+
`,la= exports.Sb =_graphqlrequest.gql`
|
|
2776
2776
|
mutation TranscendCliUpdateVendor($input: UpdateVendorsInput!) {
|
|
2777
2777
|
updateVendors(input: $input) {
|
|
2778
2778
|
clientMutationId
|
|
2779
2779
|
}
|
|
2780
2780
|
}
|
|
2781
|
-
`;var
|
|
2781
|
+
`;var ca=_graphqlrequest.gql`
|
|
2782
2782
|
query TranscendCliDataSubCategories($first: Int!, $offset: Int!) {
|
|
2783
2783
|
dataSubCategories(
|
|
2784
2784
|
first: $first
|
|
@@ -2807,7 +2807,7 @@
|
|
|
2807
2807
|
}
|
|
2808
2808
|
}
|
|
2809
2809
|
}
|
|
2810
|
-
`,
|
|
2810
|
+
`,ua= exports.Ub =_graphqlrequest.gql`
|
|
2811
2811
|
mutation TranscendCliCreateDataSubCategory(
|
|
2812
2812
|
$input: CreateDataInventorySubCategoryInput!
|
|
2813
2813
|
) {
|
|
@@ -2819,7 +2819,7 @@
|
|
|
2819
2819
|
}
|
|
2820
2820
|
}
|
|
2821
2821
|
}
|
|
2822
|
-
`,
|
|
2822
|
+
`,ma= exports.Vb =_graphqlrequest.gql`
|
|
2823
2823
|
mutation TranscendCliUpdateDataSubCategories(
|
|
2824
2824
|
$input: UpdateDataSubCategoriesInput!
|
|
2825
2825
|
) {
|
|
@@ -2827,7 +2827,7 @@
|
|
|
2827
2827
|
clientMutationId
|
|
2828
2828
|
}
|
|
2829
2829
|
}
|
|
2830
|
-
`;var
|
|
2830
|
+
`;var da=_graphqlrequest.gql`
|
|
2831
2831
|
query TranscendCliProcessingPurposeSubCategories(
|
|
2832
2832
|
$first: Int!
|
|
2833
2833
|
$offset: Int!
|
|
@@ -2858,7 +2858,7 @@
|
|
|
2858
2858
|
}
|
|
2859
2859
|
}
|
|
2860
2860
|
}
|
|
2861
|
-
`,
|
|
2861
|
+
`,fa= exports.Xb =_graphqlrequest.gql`
|
|
2862
2862
|
mutation TranscendCliCreateProcessingPurposeSubCategory(
|
|
2863
2863
|
$input: CreateProcessingPurposeCategoryInput!
|
|
2864
2864
|
) {
|
|
@@ -2870,7 +2870,7 @@
|
|
|
2870
2870
|
}
|
|
2871
2871
|
}
|
|
2872
2872
|
}
|
|
2873
|
-
`,
|
|
2873
|
+
`,ga= exports.Yb =_graphqlrequest.gql`
|
|
2874
2874
|
mutation TranscendCliUpdateProcessingPurposeSubCategories(
|
|
2875
2875
|
$input: UpdateProcessingPurposeSubCategoriesInput!
|
|
2876
2876
|
) {
|
|
@@ -2878,7 +2878,7 @@
|
|
|
2878
2878
|
clientMutationId
|
|
2879
2879
|
}
|
|
2880
2880
|
}
|
|
2881
|
-
`;var
|
|
2881
|
+
`;var ya=_graphqlrequest.gql`
|
|
2882
2882
|
query TranscendCliProcessingActivities($first: Int!, $offset: Int!) {
|
|
2883
2883
|
processingActivities(first: $first, offset: $offset, useMaster: false) {
|
|
2884
2884
|
nodes {
|
|
@@ -2931,7 +2931,7 @@
|
|
|
2931
2931
|
}
|
|
2932
2932
|
}
|
|
2933
2933
|
}
|
|
2934
|
-
`,
|
|
2934
|
+
`,ha= exports._b =_graphqlrequest.gql`
|
|
2935
2935
|
mutation TranscendCliCreateProcessingActivity(
|
|
2936
2936
|
$input: CreateProcessingActivityInput!
|
|
2937
2937
|
) {
|
|
@@ -2942,7 +2942,7 @@
|
|
|
2942
2942
|
}
|
|
2943
2943
|
}
|
|
2944
2944
|
}
|
|
2945
|
-
`,
|
|
2945
|
+
`,Ca= exports.$b =_graphqlrequest.gql`
|
|
2946
2946
|
mutation TranscendCliUpdateProcessingActivities(
|
|
2947
2947
|
$input: UpdateProcessingActivitiesInput!
|
|
2948
2948
|
) {
|
|
@@ -2950,7 +2950,7 @@
|
|
|
2950
2950
|
clientMutationId
|
|
2951
2951
|
}
|
|
2952
2952
|
}
|
|
2953
|
-
`;var
|
|
2953
|
+
`;var Aa=_graphqlrequest.gql`
|
|
2954
2954
|
query TranscendSombraVersion {
|
|
2955
2955
|
organization {
|
|
2956
2956
|
sombra {
|
|
@@ -2958,14 +2958,18 @@
|
|
|
2958
2958
|
}
|
|
2959
2959
|
}
|
|
2960
2960
|
}
|
|
2961
|
-
`;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 D = _interopRequireWildcard(_iots); var dt = _interopRequireWildcard(_iots); var $a = _interopRequireWildcard(_iots); var Je = _interopRequireWildcard(_iots); var P = _interopRequireWildcard(_iots); var V = _interopRequireWildcard(_iots); var be = _interopRequireWildcard(_iots); var ae = _interopRequireWildcard(_iots); var x = _interopRequireWildcard(_iots); var re = _interopRequireWildcard(_iots); var Xt = _interopRequireWildcard(_iots); var Ye = _interopRequireWildcard(_iots); var El = _interopRequireWildcard(_iots);var Y="[NONE]",Kt= exports.cc ="[APPLY VALUE TO ALL ROWS]",li= exports.dc ="<blank>",pr= exports.ec =["email","coreIdentifier"],It= exports.fc =(m=>(m.Email="email",m.CoreIdentifier="coreIdentifier",m.RequestType="requestType",m.SubjectType="subjectType",m.Locale="locale",m.Country="country",m.CountrySubDivision="countrySubDivision",m.RequestStatus="requestStatus",m.CreatedAt="createdAt",m.DataSiloIds="dataSiloIds",m))(It||{}),Aa= exports.gc ={email:!1,coreIdentifier:!0,requestType:!0,subjectType:!0,requestStatus:!1,createdAt:!1,dataSiloIds:!1,locale:!1,country:!1,countrySubDivision:!1},Ia= exports.hc ={requestType:!0,subjectType:!0},Sa= exports.ic =D.type({columnNames:D.partial(_typeutils.applyEnum.call(void 0, It,()=>D.string)),identifierNames:D.record(D.string,D.string),attributeNames:D.record(D.string,D.string),requestTypeToRequestAction:D.record(D.string,_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction)),subjectTypeToSubjectName:D.record(D.string,D.string),languageToLocale:D.record(D.string,_typeutils.valuesOf.call(void 0, _internationalization.LOCALE_KEY)),regionToCountry:D.record(D.string,_typeutils.valuesOf.call(void 0, {..._privacytypes.IsoCountryCode,[Y]:Y})),regionToCountrySubDivision:D.record(D.string,_typeutils.valuesOf.call(void 0, {..._privacytypes.IsoCountrySubdivisionCode,[Y]:Y})),statusToRequestStatus:D.record(D.string,_typeutils.valuesOf.call(void 0, {..._privacytypes.CompletedRequestStatus,[Y]:Y}))}),lr= exports.jc =D.type({id:D.string,link:D.string,rowIndex:D.number,coreIdentifier:D.string,attemptedAt:D.string}),Ta= exports.kc =D.type({failingRequests:D.array(D.record(D.string,D.any)),successfulRequests:D.array(lr),duplicateRequests:D.array(D.type({rowIndex:D.number,coreIdentifier:D.string,attemptedAt:D.string}))});var _inquirer = require('inquirer'); var _inquirer2 = _interopRequireDefault(_inquirer);var _fuzzysearch = require('fuzzysearch'); var _fuzzysearch2 = _interopRequireDefault(_fuzzysearch);function St(t,e){return _fuzzysearch2.default.call(void 0, t.toLowerCase(),e.toLowerCase())||_fuzzysearch2.default.call(void 0, e.toLowerCase(),t.toLowerCase())}function Tt(t,e,r,n){let i=t.filter(s=>St(e.toLowerCase(),s.toLowerCase()));return[...i,new _inquirer2.default.Separator,...r?[]:[Y],...n?[Kt]:[],...t.filter(s=>!i.includes(s))]}var _inquirerautocompleteprompt = require('inquirer-autocomplete-prompt'); var _inquirerautocompleteprompt2 = _interopRequireDefault(_inquirerautocompleteprompt);async function mt(t,e,r){_inquirer2.default.registerPrompt("autocomplete",_inquirerautocompleteprompt2.default);let n=t.map(s=>s||"<blank>").filter(s=>!r[s]);if(n.length===0)return r;let i=await _inquirer2.default.prompt(n.map(s=>({name:s,message:`Map value of: ${s}`,type:"autocomplete",default:e.find(o=>St(s,o)),source:(o,p)=>p?e.filter(c=>typeof c=="string"&&St(p,c)):e})));return{...r,..._typeutils.apply.call(void 0, i,s=>typeof s=="string"?s:Object.values(s)[0])}}function ci(t){return t.split(",").map(e=>e.trim()).filter(e=>e)}var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var ba=dt.type({key:dt.string,values:dt.array(dt.string)});function wa(t){let e=t.map(r=>{let[n,i]=r.trim().split(":");if(!i)throw new Error("Expected attributes in key:value1;value2,key2:value3;value4");let s=i.split(";");return{key:n,values:s}});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 xa(t,e,r={columns:!0}){let n=_sync.parse.call(void 0, _fs.readFileSync.call(void 0, t,"utf-8"),r);return _typeutils.decodeCodec.call(void 0, $a.array(e),n).map(o=>Object.entries(o).reduce((p,[c,u])=>Object.assign(p,{[c.replace(/[^a-z_.+\-A-Z -~]/g,"")]:u}),{}))}function He(t,e){return _chunkVY55L6P5cjs.j.call(void 0, t.map(r=>r[e]||"").flat())}async function qa(t){let e=_chunkVY55L6P5cjs.j.call(void 0, t.map(i=>Object.keys(i)).flat()),r=t,n=!0;for(;n;){let{filterColumnName:i}=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 ${r.length} rows.`,type:"list",default:e,choices:[Y,...e]}]);if(n=Y!==i,n){let s=He(r,i),{valuesToKeep:o}=await _inquirer2.default.prompt([{name:"valuesToKeep",message:"Keep rows matching this value",type:"checkbox",default:e,choices:s}]);r=r.filter(p=>o.includes(p[i]))}}return _chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Importing ${r.length} requests`)),r}var _bluebird = require('bluebird');function kc(t,e){return new (0, _graphqlrequest.GraphQLClient)(`${t}/graphql`,{headers:{...e,version:_chunkVY55L6P5cjs.m}})}function Z(t,e){return kc(t,{Authorization:`Bearer ${e}`})}var _got = require('got'); var _got2 = _interopRequireDefault(_got);async function nt(t,e,r){let n=Z(t,e),{organization:i}=await l(n,to),{customerUrl:s}=i.sombra;if(["https://sombra-reverse-tunnel.transcend.io","https://sombra-reverse-tunnel.us.transcend.io"].includes(s))throw new Error("It looks like your Sombra customer ingress URL has not been set up. Please follow the instructions here to configure networking for Sombra: https://docs.transcend.io/docs/articles/sombra/deploying/customizing-sombra/networking");return _got2.default.extend({prefixUrl:s,headers:{Authorization:`Bearer ${e}`,...r?{"X-Sombra-Authorization":`Bearer ${r}`}:{}}})}function sC(t){return _got2.default.extend({prefixUrl:t})}async function cC(t,{id:e,bundleType:r}){await l(t,Ps,{airgapBundleId:e,bundleType:r})}async function uC(t,{id:e,bundleType:r}){await l(t,Ts,{airgapBundleId:e,bundleType:r})}async function yC(t,e){let r=await l(t,Hn,{dataSiloId:e,type:"DATA_SILO_DISCOVERY"}),{plugins:n,totalCount:i}=r.plugins;return i===0&&(_chunkZUNVPK23cjs.a.error("No active data silo plugins found for this data silo."),process.exit(1)),n[0]}var ui=20;async function cr(t,e={}){let r=[],n=0,i=!1;do{let{globalActionItems:{nodes:s}}=await l(t,Qs,{first:ui,offset:n,filterBy:{...e,...e.startDueDate?{startDueDate:e.startDueDate.toISOString()}:{},...e.endDueDate?{endDueDate:e.endDueDate.toISOString()}:{}}});r.push(...s.map(o=>({...o,id:o.ids[0],title:o.titles[0],notes:o.notes[0],link:o.links[0]}))),n+=ui,i=s.length===ui}while(i);return r}var mi=20;async function ur(t){let e=[],r=0,n=!1;do{let{actions:{nodes:i}}=await l(t,Fs,{first:mi,offset:r});e.push(...i),r+=mi,n=i.length===mi}while(n);return e.sort((i,s)=>i.type.localeCompare(s.type))}var di=20;async function mr(t,e={}){let r=[],n=0,i=!1;do{let{agentFiles:{nodes:s}}=await l(t,ea,{first:di,offset:n,filterBy:e});r.push(...s),n+=di,i=s.length===di}while(i);return r.sort((s,o)=>s.name.localeCompare(o.name))}var fi=20;async function dr(t){let e=[],r=0,n=!1;do{let{agentFunctions:{nodes:i}}=await l(t,ia,{first:fi,offset:r});e.push(...i.map(s=>({...s,parameters:JSON.parse(s.parameters)}))),r+=fi,n=i.length===fi}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var gi=20;async function fr(t,e={}){let r=[],n=0,i=!1;do{let{agents:{nodes:s}}=await l(t,Hs,{first:gi,offset:n,filterBy:e});r.push(...s),n+=gi,i=s.length===gi}while(i);return r.sort((s,o)=>s.name.localeCompare(o.name))}var yi=20;async function La(t){let e=[],r=0,n=!1;do{let{assessmentForms:{nodes:i}}=await l(t,Eo,{first:yi,offset:r});e.push(...i),r+=yi,n=i.length===yi}while(n);return e.sort((i,s)=>i.title.localeCompare(s.title))}var hi=20;async function va(t){let e=[],r=0,n=!1;do{let{assessmentFormTemplates:{nodes:i}}=await l(t,wo,{first:hi,offset:r});e.push(...i),r+=hi,n=i.length===hi}while(n);return e.sort((i,s)=>i.title.localeCompare(s.title))}var Nc=50;async function Mc(t,e){let{createPrivacyCenterAccessTokens:{nodes:r}}=await l(t,Zn,{input:{records:e}});return r.map(n=>n.token)}async function BC(t,e,r,n=10){let i=0;r&&r(0);let s=[];return await _bluebird.map.call(void 0, _chunkVY55L6P5cjs.b.call(void 0, e,Nc),async o=>{let c=(await Mc(t,o)).map((u,m)=>({input:o[m],accessToken:u}));s.push(...c),i+=o.length,r&&r(i)},{concurrency:n}),s}var Ci=20;async function ka(t){let e=[],r=0,n=!1;do{let{attributeKeys:{nodes:i}}=await l(t,ro,{first:Ci,offset:r});e.push(...i),r+=Ci,n=i.length===Ci}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var Pt=100;async function Fc(t,e){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Fetching all attribute values for ${e}...`));let r=[],n=0,i=!1;do{let{attributeValues:{nodes:s}}=await l(t,ss,{first:Pt,offset:n,attributeKeyId:e});r.push(...s),n+=Pt,i=s.length===Pt}while(i);return r.sort((s,o)=>s.name.localeCompare(o.name))}var Uc=[_privacytypes.AttributeKeyType.MultiSelect,_privacytypes.AttributeKeyType.SingleSelect];async function Et(t){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Fetching all attributes..."));let e=[],r=0,n=!1;do{let{attributeKeys:{nodes:i}}=await l(t,rs,{first:Pt,offset:r});e.push(...await Promise.all(i.map(async s=>({...s,values:Uc.includes(s.type)?await Fc(t,s.id):[]})))),r+=Pt,n=i.length===Pt}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var Ai=20;async function gr(t){let e=[],r=0,n=!1;do{let{businessEntities:{nodes:i}}=await l(t,Os,{first:Ai,offset:r});e.push(...i),r+=Ai,n=i.length===Ai}while(n);return e.sort((i,s)=>i.title.localeCompare(s.title))}async function Ga(t){let{consentManager:{consentManager:e}}=await l(t,Cs);return e}async function De(t,e){let{consentManager:{consentManager:r}}=await l(t,hs,{},{},e);return r.id}var Ii=50;async function yr(t){let e=[],r=0,n=!1;do{let{experiences:{nodes:i}}=await l(t,cs,{first:Ii,offset:r});e.push(...i),r+=Ii,n=i.length===Ii}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var Qc=(r=>(r.Hourly="1h",r.Daily="1d",r))(Qc||{});async function sA(t,e){let{analyticsData:{series:r}}=await l(t,_s,{input:e});return r}async function Na(t,e){let{consentManagerTheme:{theme:r}}=await l(t,As,{airgapBundleId:e});return r}var Si=20;async function Ti(t,e=_privacytypes.ConsentTrackerStatus.Live){let r=[],n=0,i=await De(t),s=!1;do{let{cookies:{nodes:o}}=await l(t,ys,{first:Si,offset:n,airgapBundleId:i,status:e});r.push(...o),n+=Si,s=o.length===Si}while(s);return r.sort((o,p)=>o.name.localeCompare(p.name))}var Pi=20;async function hr(t){let e=[],r=0,n=!1;do{let{dataSubCategories:{nodes:i}}=await l(t,la,{first:Pi,offset:r});e.push(...i),r+=Pi,n=i.length===Pi}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var Ei=20;async function Rt(t,e=_privacytypes.ConsentTrackerStatus.Live){let r=[],n=0,i=await De(t),s=!1;do{let{dataFlows:{nodes:o}}=await l(t,gs,{first:Ei,offset:n,airgapBundleId:i,status:e,...e===_privacytypes.ConsentTrackerStatus.NeedsReview?{showZeroActivity:!0}:{}});r.push(...o),n+=Ei,s=o.length===Ei}while(s);return r.sort((o,p)=>o.value.localeCompare(p.value))}async function Fa(t){let{translatedMessages:e}=await l(t,Co,{});return e}async function jt(t){let{organization:e}=await l(t,js);return e.deployedPrivacyCenterUrl}async function bt(t,e){let r=e;r||(r=await jt(t));let{privacyCenter:n}=await l(t,Ks,{url:r});return n.id}async function Cr(t){let e=await jt(t),{privacyCenterPolicies:r}=await l(t,uo,{url:e});return r.sort((n,i)=>n.title.defaultMessage.localeCompare(i.title.defaultMessage))}function ve(t){let e=[];return t.map(r=>{let n=e.find(i=>i.key===r.attributeKey.name);return n===void 0?(n={key:r.attributeKey.name,values:[r.name]},e.push(n)):n.values.push(r.name),e}),e}var Ri=20;async function Ua(t){let e=[],r=0,n=!1;do{let{preferenceTopics:{nodes:i}}=await l(t,bo,{first:Ri,offset:r});e.push(...i),r+=Ri,n=i.length===Ri}while(n);return e.sort((i,s)=>`${i.slug}:${i.purpose.trackingType}`.localeCompare(`${s.slug}:${s.purpose.trackingType}`))}async function Qa(t){let e=await jt(t),{privacyCenter:{themeStr:r,...n}}=await l(t,Ys,{url:e});return[{...n,theme:JSON.parse(r)}]}var bi=20;async function Ar(t){let e=[],r=0,n=!1;do{let{processingActivities:{nodes:i}}=await l(t,ga,{first:bi,offset:r});e.push(...i),r+=bi,n=i.length===bi}while(n);return e.sort((i,s)=>i.title.localeCompare(s.title))}var wi=20;async function Ir(t){let e=[],r=0,n=!1;do{let{processingPurposeSubCategories:{nodes:i}}=await l(t,ma,{first:wi,offset:r});e.push(...i),r+=wi,n=i.length===wi}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var $i=20;async function Sr(t,{includeDeleted:e=!1}={}){let r=[],n=0,i=!1;do{let{purposes:{nodes:s}}=await l(t,Ro,{first:$i,offset:n,input:{includeDeleted:e}});r.push(...s),n+=$i,i=s.length===$i}while(i);return r.sort((s,o)=>s.trackingType.localeCompare(o.trackingType))}async function Ba(t){let[e,r]=await Promise.all([Sr(t),Ua(t)]);return e.map(n=>{let i=r.filter(s=>s.purpose.trackingType===n.trackingType);return{...n,topics:i}})}var xi=50;async function Tr(t,{requestId:e}){let r=[],n=0,i=!1;do{let{requestEnrichers:{nodes:s}}=await l(t,Io,{first:xi,offset:n,requestId:e});r.push(...s),n+=xi,i=s.length===xi}while(i);return r}var Di=50;async function Va(t,{requestId:e}){let r=[],n=0,i=!1;do{let{requestIdentifiers:{nodes:s}}=await l(t,jo,{first:Di,offset:n,requestIds:[e]});r.push(...s),n+=Di,i=s.length===Di}while(i);return r}var _semver = require('semver'); var _semver2 = _interopRequireDefault(_semver);var Ka="7.180.0",Zc=Je.type({id:Je.string,name:Je.string,value:Je.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.IdentifierType)}),qi=50,zc= exports.jd =Je.type({identifiers:Je.array(Zc)});async function Pr(t,e,{requestId:r}){let n=[],i=0,s=!1,{organization:{sombra:{version:o}}}=await l(t,Ca);if(o&&_semver2.default.lt(o,Ka))throw new Error(`Please upgrade Sombra to ${Ka} or greater to use this command.`);do{let p;try{p=await e.post("v1/request-identifiers",{json:{first:qi,offset:i,requestId:r}}).json()}catch(u){throw new Error(`Failed to fetch request identifiers: ${_optionalChain([u, 'optionalAccess', _2 => _2.response, 'optionalAccess', _3 => _3.body])||_optionalChain([u, 'optionalAccess', _4 => _4.message])}`)}let{identifiers:c}=_typeutils.decodeCodec.call(void 0, zc,p);n.push(...c),i+=qi,s=c.length===qi}while(s);return n}var _cliprogress = require('cli-progress'); var _cliprogress2 = _interopRequireDefault(_cliprogress);var ru=P.type({title:P.string,name:P.string,consent:P.boolean,enrichedPreferences:P.array(P.type({topic:P.string,selectValues:P.array(P.type({id:P.string,name:P.string,preferenceOption:P.type({id:P.string,slug:P.string,title:P.type({defaultMessage:P.string})})})),selectValue:P.type({id:P.string,name:P.string}),preferenceTopic:P.type({title:P.type({defaultMessage:P.string}),id:P.string,slug:P.string}),name:P.string,id:P.string,booleanValue:P.boolean}))}),TI= exports.md =P.intersection([P.type({id:P.string,createdAt:P.string,email:P.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction),link:P.string,isSilent:P.boolean,origin:_typeutils.valuesOf.call(void 0, _privacytypes.RequestOrigin),isTest:P.boolean,coreIdentifier:P.string,details:P.string,locale:_typeutils.valuesOf.call(void 0, _internationalization.LOCALE_KEY),status:_typeutils.valuesOf.call(void 0, _privacytypes.RequestStatus),subjectType:P.string,country:P.union([P.null,_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode)]),countrySubDivision:P.union([P.null,_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode)]),attributeValues:P.array(P.type({id:P.string,attributeKey:P.type({name:P.string,id:P.string}),name:P.string}))}),P.partial({daysRemaining:P.union([P.null,P.number]),purpose:ru})]),Rr=50;async function le(t,{actions:e=[],statuses:r=[],origins:n=[],text:i,createdAtBefore:s,createdAtAfter:o,isTest:p,isSilent:c,isClosed:u,requestIds:m=[]}={}){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Fetching requests..."));let d=new Date().getTime(),f=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),g=[],y=0,A=!1;do{let{requests:{nodes:C,totalCount:_}}=await l(t,fo,{first:Rr,offset:y,filterBy:{text:i,type:e.length>0?e:void 0,status:r.length>0?r:void 0,origin:n.length>0?n:void 0,isTest:p,isSilent:c,isClosed:u,createdAtBefore:s?s.toISOString():void 0,createdAtAfter:o?o.toISOString():void 0}});y===0&&_>Rr&&(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Fetching ${_} requests`)),f.start(_,0)),g.push(...C),y+=Rr,f.update(y),A=C.length===Rr}while(A);f.stop();let S=new Date().getTime()-d;_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Completed fetching of ${g.length} request in "${S/1e3}" seconds.`));let L=g;return m&&m.length>0&&(L=L.filter(C=>m.includes(C.id)),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Filtered down to ${L.length} requests based on ${m.length} provided IDs.`))),L}var Li=20;async function br(t){let e=[],r=0,n=!1;do{let{teams:{nodes:i}}=await l(t,Uo,{first:Li,offset:r});e.push(...i),r+=Li,n=i.length===Li}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var vi=20;async function xI(t){let e=[],r=0,n=!1;do{let{users:{nodes:i}}=await l(t,Yo,{first:vi,offset:r});e.push(...i),r+=vi,n=i.length===vi}while(n);return e.sort((i,s)=>i.email.localeCompare(s.email))}var ki=20;async function wr(t){let e=[],r=0,n=!1;do{let{vendors:{nodes:i}}=await l(t,sa,{first:ki,offset:r});e.push(...i),r+=ki,n=i.length===ki}while(n);return e.sort((i,s)=>i.title.localeCompare(s.title))}var _i=20,iu="https://app.transcend.io/infrastructure/api-keys";async function nu(t,e){let r=[],n=0,i=!1;do{let{apiKeys:{nodes:s}}=await l(t,Kn,{first:_i,offset:n,titles:e});r.push(...s),n+=_i,i=s.length===_i}while(i);return r.sort((s,o)=>s.title.localeCompare(o.title))}async function $r({"api-keys":t=[],"data-silos":e=[]},r,n=!1){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Fetching ${n?"all":t.length} API keys...`));let i=t.map(({title:m})=>m),s=_chunkVY55L6P5cjs.j.call(void 0, e.map(m=>m["api-key-title"]).filter(m=>!!m)),o=[...s,...i],p=await nu(r,n?void 0:[...s,...i]),c=_chunkVY55L6P5cjs.e.call(void 0, p,"title"),u=_chunkVY55L6P5cjs.c.call(void 0, o,p.map(({title:m})=>m));return u.length>0&&(_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to find API keys "${u.join('", "')}"! Make sure these API keys are created at: ${iu}`)),process.exit(1)),c}var Oi=100;async function ou(t){let e=[],r=0,n=!1;do{let{catalogs:{nodes:i}}=await l(t,kn,{first:Oi,offset:r});e.push(...i),r+=Oi,n=i.length===Oi}while(n);return e.sort((i,s)=>i.integrationName.localeCompare(s.integrationName))}async function QI(t){let e=await ou(t),r=e.reduce((i,s)=>Object.assign(i,{[s.integrationName]:s.title}),{}),n=e.reduce((i,s)=>Object.assign(i,{[s.integrationName]:s.hasApiFunctionality}),{});return{catalogs:e,serviceToTitle:r,serviceToSupportedIntegration:n}}async function Yt(t){let{internalSubjects:e}=await l(t,nr);return e}async function Za({"data-silos":t=[],"data-subjects":e=[],"processing-activities":r=[],enrichers:n=[]},i,s=!1){let o=_chunkVY55L6P5cjs.j.call(void 0, [..._chunkVY55L6P5cjs.a.call(void 0, t.map(m=>m["data-subjects"]||[])||[]),..._chunkVY55L6P5cjs.a.call(void 0, _nullishCoalesce(r.map(({dataSubjectTypes:m})=>_nullishCoalesce(m, () => ([]))), () => ([]))),..._chunkVY55L6P5cjs.a.call(void 0, n.map(m=>m["data-subjects"]||[])||[]),...e.map(m=>m.type)]);if(o.length===0&&!s)return{};let p=await Yt(i),c=_chunkVY55L6P5cjs.e.call(void 0, p,"type"),u=_chunkVY55L6P5cjs.c.call(void 0, o,p.map(({type:m})=>m));return u.length>0&&(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating ${u.length} new data subjects...`)),await _bluebird.mapSeries.call(void 0, u,async m=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating data subject ${m}...`));let{createSubject:d}=await l(i,Mn,{type:m,skipPublish:!0});_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Created data subject ${m}!`)),c[m]=d.subject})),c}function za(t,e){return t.forEach(r=>{if(!e[r])throw new Error(`Expected to find data subject definition: ${r}`)}),Object.values(e).filter(r=>!t.includes(r.type)).map(({id:r})=>r)}function Wa(t,e){return t.forEach(r=>{if(!e[r])throw new Error(`Expected to find data subject definition: ${r}`)}),Object.values(e).filter(r=>!t.includes(r.type)).map(({type:r})=>r)}var Mi=20;async function Fi(t){let e=[],r=0,n=!1;do{let{identifiers:{nodes:i}}=await l(t,_n,{first:Mi,offset:r});e.push(...i),r+=Mi,n=i.length===Mi}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}async function Ha({enrichers:t=[],"data-silos":e=[],identifiers:r=[]},n,i=!1){let s=await Fi(n),o=_chunkVY55L6P5cjs.e.call(void 0, s,"name"),p=_chunkVY55L6P5cjs.j.call(void 0, [..._chunkVY55L6P5cjs.a.call(void 0, t.map(u=>[u["input-identifier"],...u["output-identifiers"]])),..._chunkVY55L6P5cjs.a.call(void 0, e.map(u=>u["identity-keys"])),...r.map(({name:u})=>u)]).filter(u=>!!u),c=_chunkVY55L6P5cjs.c.call(void 0, p,s.map(({name:u})=>u));if(c.length>0){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating ${c.length} new identifiers...`));let{newIdentifierTypes:u}=await l(n,On),m=u.map(({name:d})=>d);await _bluebird.mapSeries.call(void 0, c,async d=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating identifier ${d}...`));let{createIdentifier:f}=await l(n,Gn,{input:{name:d,type:m.includes(d)?d:"custom",skipPublish:i}});_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Created identifier ${d}!`)),o[d]=f.identifier})}return o}var Ui=20;async function xr(t){let e=[],r=0,n=!1;do{let{promptGroups:{nodes:i}}=await l(t,Do,{first:Ui,offset:r});e.push(...i),r+=Ui,n=i.length===Ui}while(n);return e.sort((i,s)=>i.title.localeCompare(s.title))}var Qi=20;async function Dr(t){let e=[],r=0,n=!1;do{let{promptPartials:{nodes:i}}=await l(t,xo,{first:Qi,offset:r});e.push(...i),r+=Qi,n=i.length===Qi}while(n);return e.sort((i,s)=>i.title.localeCompare(s.title))}var Bi=20;async function $t(t,{text:e,titles:r=[],ids:n=[]}={}){let i=[],s=0,o=!1;do{let{prompts:{nodes:p}}=await l(t,$o,{first:Bi,offset:s,filterBy:{...e?{text:e}:{},...r.length>0?{title:r}:{},...n.length>0?{id:n}:{}}});i.push(...p),s+=Bi,o=p.length===Bi}while(o);return i.sort((p,c)=>p.title.localeCompare(c.title))}async function mS(t,{promptTitles:e=[],promptIds:r=[]}={}){let{promptsWithVariables:n}=await l(t,qo,{input:{...e.length>0?{promptTitles:e}:{},...r.length>0?{promptIds:r}:{}}});return n}var Vi=20;async function yS(t,e){let r=[],n=0,i=!1;do{let{promptThreads:{nodes:s}}=await l(t,lo,{first:Vi,offset:n,filterBy:e});r.push(...s),n+=Vi,i=s.length===Vi}while(i);return r.sort((s,o)=>s.threadId.localeCompare(o.threadId))}async function Ja(t,{requestId:e,dataSiloId:r,requestStatuses:n,statuses:i}){let{requestDataSilos:{totalCount:s}}=await l(t,zr,{first:1,offset:0,filterBy:{dataSiloId:r,requestId:e,status:i,requestStatus:n}});return s}var Ki=100;async function ji(t,{requestId:e,dataSiloId:r,requestStatuses:n,statuses:i,limit:s,onProgress:o}){let p=[],c=0,u=!1;do{let{requestDataSilos:{nodes:m}}=await l(t,zr,{first:Ki,offset:c,filterBy:{dataSiloId:r,requestId:e,status:i,requestStatus:n}});p.push(...m),c+=Ki,u=m.length===Ki,_optionalChain([o, 'optionalCall', _5 => _5(m.length)])}while(u&&(!s||c<s));return p}async function Xa(t,{requestId:e,dataSiloId:r}){let n=await ji(t,{requestId:e,dataSiloId:r});if(n.length!==1)throw new Error(`Failed to find RequestDataSilo with requestId:${e},dataSiloId:${r}`);return n[0]}async function PS(t,{dataSiloId:e}){let{listReducedRequestsForDataSilo:{totalCount:r}}=await l(t,Fo,{input:{dataSiloId:e,isResolved:!1}});return r}async function wS(t,e,r){let n=[],i=null,s=!1;do{let o=await l(t,zo,{filterBy:{...r},first:e,after:_nullishCoalesce(i, () => (void 0))}),{bulkRequestFiles:{nodes:p,pageInfo:c}}=o;n.push(...p),s=c.hasNextPage,i=c.endCursor}while(s);return n.sort((o,p)=>o.remoteId.localeCompare(p.remoteId))}async function qS(t,{email:e,password:r}){let{determineLoginMethod:{loginMethod:n}}=await l(t,ti,{email:e}),i=await t.rawRequest(zs,{email:e,password:r,publicKey:n.sombraPublicKey}),{login:{user:s}}=i.data,o=i.headers.get("set-cookie");if(!o||!o.includes("laravel"))throw new Error("Failed to get login cookie in response");return{roles:s.roles,loginCookie:o}}async function LS(t,{email:e,roleId:r}){let{determineLoginMethod:{loginMethod:n}}=await l(t,ti,{email:e,userId:r});await t.rawRequest(Ws,{id:r,publicKey:n.sombraPublicKey})}async function OS(t,e){let{createApiKey:{apiKey:r}}=await l(t,jn,{input:e});return r}async function GS(t,e){await l(t,Yn,{id:e})}var uu=V.type({dependsOnQuestionReferenceId:V.string,comparisonOperator:V.union([V.literal(_privacytypes.ComparisonOperator.IsEqualTo),V.literal(_privacytypes.ComparisonOperator.IsNotEqualTo),V.literal(_privacytypes.ComparisonOperator.IsOneOf),V.literal(_privacytypes.ComparisonOperator.IsNotOneOf),V.literal(_privacytypes.ComparisonOperator.Contains)]),comparisonOperands:V.array(V.string)}),mu= exports.Od =V.type({dependsOnQuestionReferenceId:V.string,comparisonOperator:V.union([V.literal(_privacytypes.ComparisonOperator.IsNotShown),V.literal(_privacytypes.ComparisonOperator.IsShown)])}),tp= exports.Pd =V.union([uu,mu]),du= exports.Qd =V.recursion("AssessmentNestedRule",t=>V.intersection([V.type({logicOperator:_typeutils.valuesOf.call(void 0, _privacytypes.LogicOperator)}),V.partial({rules:V.array(tp),nestedRules:V.array(t)})])),fu= exports.Rd =V.partial({action:_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentsDisplayLogicAction),rule:tp,nestedRule:du});function Yi(t){return _typeutils.decodeCodec.call(void 0, fu,t)}var Cu=be.intersection([be.partial({riskAssignment:be.partial({riskLevelId:be.string,riskMatrixRowId:be.string,riskMatrixColumnId:be.string})}),be.type({comparisonOperands:be.array(be.string),comparisonOperator:_typeutils.valuesOf.call(void 0, _privacytypes.ComparisonOperator)})]);function Zi(t){return _typeutils.decodeCodec.call(void 0, Cu,t)}var zi=20;async function np(t,{titles:e,pageSize:r,ids:n=[],gql:i=wn,integrationNames:s=[]}){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Fetching ${n.length===0?"all":n.length} Data Silos...`));let o=[],p=0,c=!1;do{let{dataSilos:{nodes:u}}=await l(t,i,{filterBy:{ids:n.length>0?n:void 0,type:s.length>0?s:void 0,titles:e},first:r,offset:p});o.push(...u),p+=r,c=u.length===r}while(c);return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Found a total of ${o.length} data silo${n.length>0?` matching IDs ${n.join(",")}`:""}s${s.length>0?` matching integrationNames ${s.join(",")}`:""}`)),o.sort((u,m)=>u.title.localeCompare(m.title))}async function Iu(t,e,{debug:r,includeGuessedCategories:n,pageSize:i}){let s=[],o=0,p=!1;do try{r&&_chunkZUNVPK23cjs.a.log(_colors2.default.magenta(`Pulling in subdatapoints for offset ${o}`));let{subDataPoints:{nodes:c}}=await l(t,n?Rn:En,{first:i,filterBy:{dataPoints:[e]},offset:o});s.push(...c),o+=i,p=c.length===i,r&&_chunkZUNVPK23cjs.a.log(_colors2.default.green(`Pulled in subdatapoints for offset ${o} for dataPointId=${e}`))}catch(c){throw _chunkZUNVPK23cjs.a.error(_colors2.default.red(`An error fetching subdatapoints for offset ${o} for dataPointId=${e}`)),c}while(p);return _chunkVY55L6P5cjs.g.call(void 0, s,"name")}async function Su(t,e,{debug:r,pageSize:n,skipSubDatapoints:i,includeGuessedCategories:s}){let o=[],p=0,c=!1;do{r&&_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Fetching datapoints with offset: ${p}`));let{dataPoints:{nodes:u}}=await l(t,Pn,{first:n,filterBy:{dataSilos:[e]},offset:p});r&&_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Fetched ${u.length} datapoints at offset: ${p}`)),i||(await _bluebird.map.call(void 0, u,async m=>{try{r&&_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Fetching subdatapoints for ${m.name} for datapoint offset ${p}`));let d=await Iu(t,m.id,{pageSize:1e3,debug:r,includeGuessedCategories:s});o.push({...m,subDataPoints:d.sort((f,g)=>f.name.localeCompare(g.name))}),r&&_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully fetched subdatapoints for ${m.name}`))}catch(d){throw _chunkZUNVPK23cjs.a.error(_colors2.default.red(`An error fetching subdatapoints for ${m.name} datapoint offset ${p}`)),d}},{concurrency:5}),r&&_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Fetched all subdatapoints for page of datapoints at offset: ${p}`))),p+=n,c=u.length===n}while(c);return o.sort((u,m)=>u.name.localeCompare(m.name))}async function op(t,{ids:e,pageSize:r,titles:n,debug:i,skipDatapoints:s,skipSubDatapoints:o,includeGuessedCategories:p,integrationNames:c}){let u=[],m=await np(t,{titles:n,ids:e,integrationNames:c,pageSize:r,gql:$n});return s||await _bluebird.mapSeries.call(void 0, m,async(d,f)=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`[${f+1}/${m.length}] Fetching data silo - ${d.title}`));let g=await Su(t,d.id,{debug:i,pageSize:r,skipSubDatapoints:o,includeGuessedCategories:p});i&&_chunkZUNVPK23cjs.a.info(_colors2.default.green(`[${f+1}/${m.length}] Successfully fetched datapoint for - ${d.title}`)),u.push([d,g])}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully fetched all ${m.length} data silo configurations`)),u}async function sp(t,e,{pageSize:r,dataSubjectsByName:n,apiKeysByTitle:i}){let s=!1,o=new Date().getTime();_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${t.length}" data silos...`));let p=await np(e,{titles:t.map(({title:S})=>S),pageSize:r}),c=_chunkVY55L6P5cjs.e.call(void 0, p,"title"),u=t.filter(({title:S})=>!c[S]);if(u.length>0){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating "${u.length}" data silos that did not exist...`));let S=_chunkVY55L6P5cjs.b.call(void 0, u,zi);await _bluebird.mapSeries.call(void 0, S,async L=>{let{createDataSilos:{dataSilos:C}}=await l(e,xn,{input:L.map(_=>({name:_["outer-type"]||_.integrationName,title:_.title,country:_.country,countrySubDivision:_.countrySubDivision}))});C.forEach(_=>{c[_.title]=_})}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created "${u.length}" data silos!`))}let m=_chunkVY55L6P5cjs.b.call(void 0, t,zi);await _bluebird.mapSeries.call(void 0, m,async(S,L)=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`[Batch ${L+1}/${m.length}] Syncing "${S.length}" data silos`)),await l(e,Qr,{input:{dataSilos:S.map(C=>({id:c[C.title].id,country:C.country,countrySubDivision:C.countrySubDivision,url:C.url,headers:C.headers,description:C.description,identifiers:C["identity-keys"],isLive:!C.disabled,ownerEmails:C.owners,teamNames:C.teams,dependedOnDataSiloTitles:C["deletion-dependencies"]?void 0:[],apiKeyId:C["api-key-title"]?i[C["api-key-title"]].id:void 0,dataSubjectBlockListIds:C["data-subjects"]?za(C["data-subjects"],n):void 0,attributes:C.attributes,businessEntityTitles:C.businessEntityTitles,notifyEmailAddress:_optionalChain([C, 'access', _6 => _6["email-settings"], 'optionalAccess', _7 => _7["notify-email-address"]]),promptAVendorEmailSendFrequency:_optionalChain([C, 'access', _8 => _8["email-settings"], 'optionalAccess', _9 => _9["send-frequency"]]),promptAVendorEmailSendType:_optionalChain([C, 'access', _10 => _10["email-settings"], 'optionalAccess', _11 => _11["send-type"]]),promptAVendorEmailIncludeIdentifiersAttachment:_optionalChain([C, 'access', _12 => _12["email-settings"], 'optionalAccess', _13 => _13["include-identifiers-attachment"]]),promptAVendorEmailCompletionLinkType:_optionalChain([C, 'access', _14 => _14["email-settings"], 'optionalAccess', _15 => _15["completion-link-type"]]),manualWorkRetryFrequency:_optionalChain([C, 'access', _16 => _16["email-settings"], 'optionalAccess', _17 => _17["manual-work-retry-frequency"]])}))}}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`[Batch ${L+1}/${m.length}] Synced "${S.length}" data silos!`))});let d=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),f=t.filter(({datapoints:S=[]})=>S.length>0),g=t.map(({datapoints:S=[]})=>S.length).reduce((S,L)=>S+L,0);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${g}" datapoints from "${f.length}" data silos...`)),d.start(g,0);let y=0;await _bluebird.map.call(void 0, f,async({datapoints:S,title:L})=>{S&&await _bluebird.mapSeries.call(void 0, S,async C=>{let _=C.fields?C.fields.map(({key:J,description:me,categories:ce,purposes:X,attributes:Ie,...Se})=>({name:J,description:me,categories:ce?ce.map(pe=>({...pe,name:pe.name||"Other"})):void 0,purposes:X?X.map(pe=>({...pe,name:pe.name||"Other"})):void 0,attributes:Ie,accessRequestVisibilityEnabled:Se["access-request-visibility-enabled"],erasureRequestRedactionEnabled:Se["erasure-request-redaction-enabled"]})):void 0,H={dataSiloId:c[L].id,path:C.path,name:C.key,title:C.title,description:C.description,...C.owners?{ownerEmails:C.owners}:{},...C.teams?{teamNames:C.teams}:{},...C["data-collection-tag"]?{dataCollectionTag:C["data-collection-tag"]}:{},querySuggestions:C["privacy-action-queries"]?Object.entries(C["privacy-action-queries"]).map(([J,me])=>({requestType:J,suggestedQuery:me})):void 0,enabledActions:C["privacy-actions"]||[],subDataPoints:_},K=(H.subDataPoints||[]).map(({name:J})=>J),se=K.filter((J,me)=>K.indexOf(J)!==me);if(se.length>0)_chunkZUNVPK23cjs.a.info(_colors2.default.red(`
|
|
2961
|
+
`;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 D = _interopRequireWildcard(_iots); var dt = _interopRequireWildcard(_iots); var xa = _interopRequireWildcard(_iots); var Je = _interopRequireWildcard(_iots); var P = _interopRequireWildcard(_iots); var V = _interopRequireWildcard(_iots); var be = _interopRequireWildcard(_iots); var ae = _interopRequireWildcard(_iots); var x = _interopRequireWildcard(_iots); var re = _interopRequireWildcard(_iots); var Xt = _interopRequireWildcard(_iots); var Ye = _interopRequireWildcard(_iots); var Rl = _interopRequireWildcard(_iots);var Y="[NONE]",Kt= exports.cc ="[APPLY VALUE TO ALL ROWS]",ci= exports.dc ="<blank>",pr= exports.ec =["email","coreIdentifier"],St= exports.fc =(m=>(m.Email="email",m.CoreIdentifier="coreIdentifier",m.RequestType="requestType",m.SubjectType="subjectType",m.Locale="locale",m.Country="country",m.CountrySubDivision="countrySubDivision",m.RequestStatus="requestStatus",m.CreatedAt="createdAt",m.DataSiloIds="dataSiloIds",m))(St||{}),Sa= exports.gc ={email:!1,coreIdentifier:!0,requestType:!0,subjectType:!0,requestStatus:!1,createdAt:!1,dataSiloIds:!1,locale:!1,country:!1,countrySubDivision:!1},Ia= exports.hc ={requestType:!0,subjectType:!0},Ta= exports.ic =D.type({columnNames:D.partial(_typeutils.applyEnum.call(void 0, St,()=>D.string)),identifierNames:D.record(D.string,D.string),attributeNames:D.record(D.string,D.string),requestTypeToRequestAction:D.record(D.string,_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction)),subjectTypeToSubjectName:D.record(D.string,D.string),languageToLocale:D.record(D.string,_typeutils.valuesOf.call(void 0, _internationalization.LOCALE_KEY)),regionToCountry:D.record(D.string,_typeutils.valuesOf.call(void 0, {..._privacytypes.IsoCountryCode,[Y]:Y})),regionToCountrySubDivision:D.record(D.string,_typeutils.valuesOf.call(void 0, {..._privacytypes.IsoCountrySubdivisionCode,[Y]:Y})),statusToRequestStatus:D.record(D.string,_typeutils.valuesOf.call(void 0, {..._privacytypes.CompletedRequestStatus,[Y]:Y}))}),lr= exports.jc =D.type({id:D.string,link:D.string,rowIndex:D.number,coreIdentifier:D.string,attemptedAt:D.string}),Pa= exports.kc =D.type({failingRequests:D.array(D.record(D.string,D.any)),successfulRequests:D.array(lr),duplicateRequests:D.array(D.type({rowIndex:D.number,coreIdentifier:D.string,attemptedAt:D.string}))});var _inquirer = require('inquirer'); var _inquirer2 = _interopRequireDefault(_inquirer);var _fuzzysearch = require('fuzzysearch'); var _fuzzysearch2 = _interopRequireDefault(_fuzzysearch);function It(t,e){return _fuzzysearch2.default.call(void 0, t.toLowerCase(),e.toLowerCase())||_fuzzysearch2.default.call(void 0, e.toLowerCase(),t.toLowerCase())}function Tt(t,e,r,n){let i=t.filter(s=>It(e.toLowerCase(),s.toLowerCase()));return[...i,new _inquirer2.default.Separator,...r?[]:[Y],...n?[Kt]:[],...t.filter(s=>!i.includes(s))]}var _inquirerautocompleteprompt = require('inquirer-autocomplete-prompt'); var _inquirerautocompleteprompt2 = _interopRequireDefault(_inquirerautocompleteprompt);async function mt(t,e,r){_inquirer2.default.registerPrompt("autocomplete",_inquirerautocompleteprompt2.default);let n=t.map(s=>s||"<blank>").filter(s=>!r[s]);if(n.length===0)return r;let i=await _inquirer2.default.prompt(n.map(s=>({name:s,message:`Map value of: ${s}`,type:"autocomplete",default:e.find(o=>It(s,o)),source:(o,p)=>p?e.filter(c=>typeof c=="string"&&It(p,c)):e})));return{...r,..._typeutils.apply.call(void 0, i,s=>typeof s=="string"?s:Object.values(s)[0])}}function ui(t){return t.split(",").map(e=>e.trim()).filter(e=>e)}var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var wa=dt.type({key:dt.string,values:dt.array(dt.string)});function $a(t){let e=t.map(r=>{let[n,i]=r.trim().split(":");if(!i)throw new Error("Expected attributes in key:value1;value2,key2:value3;value4");let s=i.split(";");return{key:n,values:s}});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 Da(t,e,r={columns:!0}){let n=_sync.parse.call(void 0, _fs.readFileSync.call(void 0, t,"utf-8"),r);return _typeutils.decodeCodec.call(void 0, xa.array(e),n).map(o=>Object.entries(o).reduce((p,[c,u])=>Object.assign(p,{[c.replace(/[^a-z_.+\-A-Z -~]/g,"")]:u}),{}))}function He(t,e){return _chunk6WIX75ZFcjs.j.call(void 0, t.map(r=>r[e]||"").flat())}async function La(t){let e=_chunk6WIX75ZFcjs.j.call(void 0, t.map(i=>Object.keys(i)).flat()),r=t,n=!0;for(;n;){let{filterColumnName:i}=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 ${r.length} rows.`,type:"list",default:e,choices:[Y,...e]}]);if(n=Y!==i,n){let s=He(r,i),{valuesToKeep:o}=await _inquirer2.default.prompt([{name:"valuesToKeep",message:"Keep rows matching this value",type:"checkbox",default:e,choices:s}]);r=r.filter(p=>o.includes(p[i]))}}return _chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Importing ${r.length} requests`)),r}var _bluebird = require('bluebird');function Gc(t,e){return new (0, _graphqlrequest.GraphQLClient)(`${t}/graphql`,{headers:{...e,version:_chunk6WIX75ZFcjs.m}})}function Z(t,e){return Gc(t,{Authorization:`Bearer ${e}`})}var _got = require('got'); var _got2 = _interopRequireDefault(_got);async function nt(t,e,r){let n=Z(t,e),{organization:i}=await l(n,ro),{customerUrl:s}=i.sombra;if(["https://sombra-reverse-tunnel.transcend.io","https://sombra-reverse-tunnel.us.transcend.io"].includes(s))throw new Error("It looks like your Sombra customer ingress URL has not been set up. Please follow the instructions here to configure networking for Sombra: https://docs.transcend.io/docs/articles/sombra/deploying/customizing-sombra/networking");return _got2.default.extend({prefixUrl:s,headers:{Authorization:`Bearer ${e}`,...r?{"X-Sombra-Authorization":`Bearer ${r}`}:{}}})}function dC(t){return _got2.default.extend({prefixUrl:t})}async function hC(t,{id:e,bundleType:r}){await l(t,Es,{airgapBundleId:e,bundleType:r})}async function CC(t,{id:e,bundleType:r}){await l(t,Ps,{airgapBundleId:e,bundleType:r})}async function PC(t,e){let r=await l(t,Jn,{dataSiloId:e,type:"DATA_SILO_DISCOVERY"}),{plugins:n,totalCount:i}=r.plugins;return i===0&&(_chunkZUNVPK23cjs.a.error("No active data silo plugins found for this data silo."),process.exit(1)),n[0]}var mi=20;async function cr(t,e={}){let r=[],n=0,i=!1;do{let{globalActionItems:{nodes:s}}=await l(t,Qs,{first:mi,offset:n,filterBy:{...e,...e.startDueDate?{startDueDate:e.startDueDate.toISOString()}:{},...e.endDueDate?{endDueDate:e.endDueDate.toISOString()}:{}}});r.push(...s.map(o=>({...o,id:o.ids[0],title:o.titles[0],notes:o.notes[0],link:o.links[0]}))),n+=mi,i=s.length===mi}while(i);return r}var di=20;async function ur(t){let e=[],r=0,n=!1;do{let{actions:{nodes:i}}=await l(t,Us,{first:di,offset:r});e.push(...i),r+=di,n=i.length===di}while(n);return e.sort((i,s)=>i.type.localeCompare(s.type))}var fi=20;async function mr(t,e={}){let r=[],n=0,i=!1;do{let{agentFiles:{nodes:s}}=await l(t,ta,{first:fi,offset:n,filterBy:e});r.push(...s),n+=fi,i=s.length===fi}while(i);return r.sort((s,o)=>s.name.localeCompare(o.name))}var gi=20;async function dr(t){let e=[],r=0,n=!1;do{let{agentFunctions:{nodes:i}}=await l(t,na,{first:gi,offset:r});e.push(...i.map(s=>({...s,parameters:JSON.parse(s.parameters)}))),r+=gi,n=i.length===gi}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var yi=20;async function fr(t,e={}){let r=[],n=0,i=!1;do{let{agents:{nodes:s}}=await l(t,Js,{first:yi,offset:n,filterBy:e});r.push(...s),n+=yi,i=s.length===yi}while(i);return r.sort((s,o)=>s.name.localeCompare(o.name))}var hi=20;async function va(t){let e=[],r=0,n=!1;do{let{assessmentForms:{nodes:i}}=await l(t,Ro,{first:hi,offset:r});e.push(...i),r+=hi,n=i.length===hi}while(n);return e.sort((i,s)=>i.title.localeCompare(s.title))}var Ci=20;async function ka(t){let e=[],r=0,n=!1;do{let{assessmentFormTemplates:{nodes:i}}=await l(t,$o,{first:Ci,offset:r});e.push(...i),r+=Ci,n=i.length===Ci}while(n);return e.sort((i,s)=>i.title.localeCompare(s.title))}var Uc=50;async function Bc(t,e){let{createPrivacyCenterAccessTokens:{nodes:r}}=await l(t,zn,{input:{records:e}});return r.map(n=>n.token)}async function WC(t,e,r,n=10){let i=0;r&&r(0);let s=[];return await _bluebird.map.call(void 0, _chunk6WIX75ZFcjs.b.call(void 0, e,Uc),async o=>{let c=(await Bc(t,o)).map((u,m)=>({input:o[m],accessToken:u}));s.push(...c),i+=o.length,r&&r(i)},{concurrency:n}),s}var Ai=20;async function _a(t){let e=[],r=0,n=!1;do{let{attributeKeys:{nodes:i}}=await l(t,io,{first:Ai,offset:r});e.push(...i),r+=Ai,n=i.length===Ai}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var Pt=100;async function Qc(t,e){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Fetching all attribute values for ${e}...`));let r=[],n=0,i=!1;do{let{attributeValues:{nodes:s}}=await l(t,as,{first:Pt,offset:n,attributeKeyId:e});r.push(...s),n+=Pt,i=s.length===Pt}while(i);return r.sort((s,o)=>s.name.localeCompare(o.name))}var Vc=[_privacytypes.AttributeKeyType.MultiSelect,_privacytypes.AttributeKeyType.SingleSelect];async function Et(t){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Fetching all attributes..."));let e=[],r=0,n=!1;do{let{attributeKeys:{nodes:i}}=await l(t,is,{first:Pt,offset:r});e.push(...await Promise.all(i.map(async s=>({...s,values:Vc.includes(s.type)?await Qc(t,s.id):[]})))),r+=Pt,n=i.length===Pt}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var Si=20;async function gr(t){let e=[],r=0,n=!1;do{let{businessEntities:{nodes:i}}=await l(t,Gs,{first:Si,offset:r});e.push(...i),r+=Si,n=i.length===Si}while(n);return e.sort((i,s)=>i.title.localeCompare(s.title))}async function Na(t){let{consentManager:{consentManager:e}}=await l(t,As);return e}async function De(t,e){let{consentManager:{consentManager:r}}=await l(t,Cs,{},{},e);return r.id}var Ii=50;async function yr(t){let e=[],r=0,n=!1;do{let{experiences:{nodes:i}}=await l(t,us,{first:Ii,offset:r});e.push(...i),r+=Ii,n=i.length===Ii}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var Kc=(r=>(r.Hourly="1h",r.Daily="1d",r))(Kc||{});async function dA(t,e){let{analyticsData:{series:r}}=await l(t,Os,{input:e});return r}async function Ma(t,e){let{consentManagerTheme:{theme:r}}=await l(t,Ss,{airgapBundleId:e});return r}var Ti=20;async function Pi(t,e=_privacytypes.ConsentTrackerStatus.Live){let r=[],n=0,i=await De(t),s=!1;do{let{cookies:{nodes:o}}=await l(t,hs,{first:Ti,offset:n,airgapBundleId:i,status:e});r.push(...o),n+=Ti,s=o.length===Ti}while(s);return r.sort((o,p)=>o.name.localeCompare(p.name))}var Ei=20;async function hr(t){let e=[],r=0,n=!1;do{let{dataSubCategories:{nodes:i}}=await l(t,ca,{first:Ei,offset:r});e.push(...i),r+=Ei,n=i.length===Ei}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var Ri=20;async function Rt(t,e=_privacytypes.ConsentTrackerStatus.Live){let r=[],n=0,i=await De(t),s=!1;do{let{dataFlows:{nodes:o}}=await l(t,ys,{first:Ri,offset:n,airgapBundleId:i,status:e,...e===_privacytypes.ConsentTrackerStatus.NeedsReview?{showZeroActivity:!0}:{}});r.push(...o),n+=Ri,s=o.length===Ri}while(s);return r.sort((o,p)=>o.value.localeCompare(p.value))}async function Ua(t){let{translatedMessages:e}=await l(t,Ao,{});return e}async function jt(t){let{organization:e}=await l(t,Ys);return e.deployedPrivacyCenterUrl}async function bt(t,e){let r=e;r||(r=await jt(t));let{privacyCenter:n}=await l(t,js,{url:r});return n.id}async function Cr(t){let e=await jt(t),{privacyCenterPolicies:r}=await l(t,mo,{url:e});return r.sort((n,i)=>n.title.defaultMessage.localeCompare(i.title.defaultMessage))}function ve(t){let e=[];return t.map(r=>{let n=e.find(i=>i.key===r.attributeKey.name);return n===void 0?(n={key:r.attributeKey.name,values:[r.name]},e.push(n)):n.values.push(r.name),e}),e}var bi=20;async function Ba(t){let e=[],r=0,n=!1;do{let{preferenceTopics:{nodes:i}}=await l(t,wo,{first:bi,offset:r});e.push(...i),r+=bi,n=i.length===bi}while(n);return e.sort((i,s)=>`${i.slug}:${i.purpose.trackingType}`.localeCompare(`${s.slug}:${s.purpose.trackingType}`))}async function Qa(t){let e=await jt(t),{privacyCenter:{themeStr:r,...n}}=await l(t,Zs,{url:e});return[{...n,theme:JSON.parse(r)}]}var wi=20;async function Ar(t){let e=[],r=0,n=!1;do{let{processingActivities:{nodes:i}}=await l(t,ya,{first:wi,offset:r});e.push(...i),r+=wi,n=i.length===wi}while(n);return e.sort((i,s)=>i.title.localeCompare(s.title))}var $i=20;async function Sr(t){let e=[],r=0,n=!1;do{let{processingPurposeSubCategories:{nodes:i}}=await l(t,da,{first:$i,offset:r});e.push(...i),r+=$i,n=i.length===$i}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var xi=20;async function Ir(t,{includeDeleted:e=!1}={}){let r=[],n=0,i=!1;do{let{purposes:{nodes:s}}=await l(t,bo,{first:xi,offset:n,input:{includeDeleted:e}});r.push(...s),n+=xi,i=s.length===xi}while(i);return r.sort((s,o)=>s.trackingType.localeCompare(o.trackingType))}async function Va(t){let[e,r]=await Promise.all([Ir(t),Ba(t)]);return e.map(n=>{let i=r.filter(s=>s.purpose.trackingType===n.trackingType);return{...n,topics:i}})}var Di=50;async function Tr(t,{requestId:e}){let r=[],n=0,i=!1;do{let{requestEnrichers:{nodes:s}}=await l(t,Io,{first:Di,offset:n,requestId:e});r.push(...s),n+=Di,i=s.length===Di}while(i);return r}var qi=50;async function Ka(t,{requestId:e}){let r=[],n=0,i=!1;do{let{requestIdentifiers:{nodes:s}}=await l(t,Yo,{first:qi,offset:n,requestIds:[e]});r.push(...s),n+=qi,i=s.length===qi}while(i);return r}var _semver = require('semver'); var _semver2 = _interopRequireDefault(_semver);var ja="7.180.0",Hc=Je.type({id:Je.string,name:Je.string,value:Je.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.IdentifierType)}),Li=50,Jc= exports.jd =Je.type({identifiers:Je.array(Hc)});async function Pr(t,e,{requestId:r}){let n=[],i=0,s=!1,{organization:{sombra:{version:o}}}=await l(t,Aa);if(o&&_semver2.default.lt(o,ja))throw new Error(`Please upgrade Sombra to ${ja} or greater to use this command.`);do{let p;try{p=await e.post("v1/request-identifiers",{json:{first:Li,offset:i,requestId:r}}).json()}catch(u){throw new Error(`Failed to fetch request identifiers: ${_optionalChain([u, 'optionalAccess', _2 => _2.response, 'optionalAccess', _3 => _3.body])||_optionalChain([u, 'optionalAccess', _4 => _4.message])}`)}let{identifiers:c}=_typeutils.decodeCodec.call(void 0, Jc,p);n.push(...c),i+=Li,s=c.length===Li}while(s);return n}var _cliprogress = require('cli-progress'); var _cliprogress2 = _interopRequireDefault(_cliprogress);var ou=P.type({title:P.string,name:P.string,consent:P.boolean,enrichedPreferences:P.array(P.type({topic:P.string,selectValues:P.array(P.type({id:P.string,name:P.string,preferenceOption:P.type({id:P.string,slug:P.string,title:P.type({defaultMessage:P.string})})})),selectValue:P.type({id:P.string,name:P.string}),preferenceTopic:P.type({title:P.type({defaultMessage:P.string}),id:P.string,slug:P.string}),name:P.string,id:P.string,booleanValue:P.boolean}))}),xS= exports.md =P.intersection([P.type({id:P.string,createdAt:P.string,email:P.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction),link:P.string,isSilent:P.boolean,origin:_typeutils.valuesOf.call(void 0, _privacytypes.RequestOrigin),isTest:P.boolean,coreIdentifier:P.string,details:P.string,locale:_typeutils.valuesOf.call(void 0, _internationalization.LOCALE_KEY),status:_typeutils.valuesOf.call(void 0, _privacytypes.RequestStatus),subjectType:P.string,country:P.union([P.null,_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode)]),countrySubDivision:P.union([P.null,_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode)]),attributeValues:P.array(P.type({id:P.string,attributeKey:P.type({name:P.string,id:P.string}),name:P.string}))}),P.partial({daysRemaining:P.union([P.null,P.number]),purpose:ou})]),Rr=50;async function le(t,{actions:e=[],statuses:r=[],origins:n=[],text:i,createdAtBefore:s,createdAtAfter:o,isTest:p,isSilent:c,isClosed:u,requestIds:m=[]}={}){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Fetching requests..."));let d=new Date().getTime(),f=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),g=[],y=0,A=!1;do{let{requests:{nodes:C,totalCount:_}}=await l(t,go,{first:Rr,offset:y,filterBy:{text:i,type:e.length>0?e:void 0,status:r.length>0?r:void 0,origin:n.length>0?n:void 0,isTest:p,isSilent:c,isClosed:u,createdAtBefore:s?s.toISOString():void 0,createdAtAfter:o?o.toISOString():void 0}});y===0&&_>Rr&&(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Fetching ${_} requests`)),f.start(_,0)),g.push(...C),y+=Rr,f.update(y),A=C.length===Rr}while(A);f.stop();let I=new Date().getTime()-d;_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Completed fetching of ${g.length} request in "${I/1e3}" seconds.`));let L=g;return m&&m.length>0&&(L=L.filter(C=>m.includes(C.id)),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Filtered down to ${L.length} requests based on ${m.length} provided IDs.`))),L}var vi=20;async function br(t){let e=[],r=0,n=!1;do{let{teams:{nodes:i}}=await l(t,Bo,{first:vi,offset:r});e.push(...i),r+=vi,n=i.length===vi}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var ki=20;async function OS(t){let e=[],r=0,n=!1;do{let{users:{nodes:i}}=await l(t,Zo,{first:ki,offset:r});e.push(...i),r+=ki,n=i.length===ki}while(n);return e.sort((i,s)=>i.email.localeCompare(s.email))}var _i=20;async function wr(t){let e=[],r=0,n=!1;do{let{vendors:{nodes:i}}=await l(t,aa,{first:_i,offset:r});e.push(...i),r+=_i,n=i.length===_i}while(n);return e.sort((i,s)=>i.title.localeCompare(s.title))}var Oi=20,su="https://app.transcend.io/infrastructure/api-keys";async function au(t,e){let r=[],n=0,i=!1;do{let{apiKeys:{nodes:s}}=await l(t,jn,{first:Oi,offset:n,titles:e});r.push(...s),n+=Oi,i=s.length===Oi}while(i);return r.sort((s,o)=>s.title.localeCompare(o.title))}async function $r({"api-keys":t=[],"data-silos":e=[]},r,n=!1){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Fetching ${n?"all":t.length} API keys...`));let i=t.map(({title:m})=>m),s=_chunk6WIX75ZFcjs.j.call(void 0, e.map(m=>m["api-key-title"]).filter(m=>!!m)),o=[...s,...i],p=await au(r,n?void 0:[...s,...i]),c=_chunk6WIX75ZFcjs.e.call(void 0, p,"title"),u=_chunk6WIX75ZFcjs.c.call(void 0, o,p.map(({title:m})=>m));return u.length>0&&(_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to find API keys "${u.join('", "')}"! Make sure these API keys are created at: ${su}`)),process.exit(1)),c}var Gi=100;async function pu(t){let e=[],r=0,n=!1;do{let{catalogs:{nodes:i}}=await l(t,_n,{first:Gi,offset:r});e.push(...i),r+=Gi,n=i.length===Gi}while(n);return e.sort((i,s)=>i.integrationName.localeCompare(s.integrationName))}async function zS(t){let e=await pu(t),r=e.reduce((i,s)=>Object.assign(i,{[s.integrationName]:s.title}),{}),n=e.reduce((i,s)=>Object.assign(i,{[s.integrationName]:s.hasApiFunctionality}),{});return{catalogs:e,serviceToTitle:r,serviceToSupportedIntegration:n}}async function Yt(t){let{internalSubjects:e}=await l(t,nr);return e}async function za({"data-silos":t=[],"data-subjects":e=[],"processing-activities":r=[],enrichers:n=[]},i,s=!1){let o=_chunk6WIX75ZFcjs.j.call(void 0, [..._chunk6WIX75ZFcjs.a.call(void 0, t.map(m=>m["data-subjects"]||[])||[]),..._chunk6WIX75ZFcjs.a.call(void 0, _nullishCoalesce(r.map(({dataSubjectTypes:m})=>_nullishCoalesce(m, () => ([]))), () => ([]))),..._chunk6WIX75ZFcjs.a.call(void 0, n.map(m=>m["data-subjects"]||[])||[]),...e.map(m=>m.type)]);if(o.length===0&&!s)return{};let p=await Yt(i),c=_chunk6WIX75ZFcjs.e.call(void 0, p,"type"),u=_chunk6WIX75ZFcjs.c.call(void 0, o,p.map(({type:m})=>m));return u.length>0&&(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating ${u.length} new data subjects...`)),await _bluebird.mapSeries.call(void 0, u,async m=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating data subject ${m}...`));let{createSubject:d}=await l(i,Fn,{type:m,skipPublish:!0});_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Created data subject ${m}!`)),c[m]=d.subject})),c}function Wa(t,e){return t.forEach(r=>{if(!e[r])throw new Error(`Expected to find data subject definition: ${r}`)}),Object.values(e).filter(r=>!t.includes(r.type)).map(({id:r})=>r)}function Ha(t,e){return t.forEach(r=>{if(!e[r])throw new Error(`Expected to find data subject definition: ${r}`)}),Object.values(e).filter(r=>!t.includes(r.type)).map(({type:r})=>r)}var Fi=20;async function Ui(t){let e=[],r=0,n=!1;do{let{identifiers:{nodes:i}}=await l(t,On,{first:Fi,offset:r});e.push(...i),r+=Fi,n=i.length===Fi}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}async function Ja({enrichers:t=[],"data-silos":e=[],identifiers:r=[]},n,i=!1){let s=await Ui(n),o=_chunk6WIX75ZFcjs.e.call(void 0, s,"name"),p=_chunk6WIX75ZFcjs.j.call(void 0, [..._chunk6WIX75ZFcjs.a.call(void 0, t.map(u=>[u["input-identifier"],...u["output-identifiers"]])),..._chunk6WIX75ZFcjs.a.call(void 0, e.map(u=>u["identity-keys"])),...r.map(({name:u})=>u)]).filter(u=>!!u),c=_chunk6WIX75ZFcjs.c.call(void 0, p,s.map(({name:u})=>u));if(c.length>0){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating ${c.length} new identifiers...`));let{newIdentifierTypes:u}=await l(n,Gn),m=u.map(({name:d})=>d);await _bluebird.mapSeries.call(void 0, c,async d=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating identifier ${d}...`));let{createIdentifier:f}=await l(n,Nn,{input:{name:d,type:m.includes(d)?d:"custom",skipPublish:i}});_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Created identifier ${d}!`)),o[d]=f.identifier})}return o}var Bi=20;async function xr(t){let e=[],r=0,n=!1;do{let{promptGroups:{nodes:i}}=await l(t,qo,{first:Bi,offset:r});e.push(...i),r+=Bi,n=i.length===Bi}while(n);return e.sort((i,s)=>i.title.localeCompare(s.title))}var Qi=20;async function Dr(t){let e=[],r=0,n=!1;do{let{promptPartials:{nodes:i}}=await l(t,Do,{first:Qi,offset:r});e.push(...i),r+=Qi,n=i.length===Qi}while(n);return e.sort((i,s)=>i.title.localeCompare(s.title))}var Vi=20;async function $t(t,{text:e,titles:r=[],ids:n=[]}={}){let i=[],s=0,o=!1;do{let{prompts:{nodes:p}}=await l(t,xo,{first:Vi,offset:s,filterBy:{...e?{text:e}:{},...r.length>0?{title:r}:{},...n.length>0?{id:n}:{}}});i.push(...p),s+=Vi,o=p.length===Vi}while(o);return i.sort((p,c)=>p.title.localeCompare(c.title))}async function AI(t,{promptTitles:e=[],promptIds:r=[]}={}){let{promptsWithVariables:n}=await l(t,Lo,{input:{...e.length>0?{promptTitles:e}:{},...r.length>0?{promptIds:r}:{}}});return n}var Ki=20;async function PI(t,e){let r=[],n=0,i=!1;do{let{promptThreads:{nodes:s}}=await l(t,co,{first:Ki,offset:n,filterBy:e});r.push(...s),n+=Ki,i=s.length===Ki}while(i);return r.sort((s,o)=>s.threadId.localeCompare(o.threadId))}async function Xa(t,{requestId:e,dataSiloId:r,requestStatuses:n,statuses:i}){let{requestDataSilos:{totalCount:s}}=await l(t,Wr,{first:1,offset:0,filterBy:{dataSiloId:r,requestId:e,status:i,requestStatus:n}});return s}var ji=100;async function Yi(t,{requestId:e,dataSiloId:r,requestStatuses:n,statuses:i,limit:s,onProgress:o}){let p=[],c=0,u=!1;do{let{requestDataSilos:{nodes:m}}=await l(t,Wr,{first:ji,offset:c,filterBy:{dataSiloId:r,requestId:e,status:i,requestStatus:n}});p.push(...m),c+=ji,u=m.length===ji,_optionalChain([o, 'optionalCall', _5 => _5(m.length)])}while(u&&(!s||c<s));return p}async function ep(t,{requestId:e,dataSiloId:r}){let n=await Yi(t,{requestId:e,dataSiloId:r});if(n.length!==1)throw new Error(`Failed to find RequestDataSilo with requestId:${e},dataSiloId:${r}`);return n[0]}async function DI(t,{dataSiloId:e}){let{listReducedRequestsForDataSilo:{totalCount:r}}=await l(t,Uo,{input:{dataSiloId:e,isResolved:!1}});return r}async function kI(t,e,r){let n=[],i=null,s=!1;do{let o=await l(t,Wo,{filterBy:{...r},first:e,after:_nullishCoalesce(i, () => (void 0))}),{bulkRequestFiles:{nodes:p,pageInfo:c}}=o;n.push(...p),s=c.hasNextPage,i=c.endCursor}while(s);return n.sort((o,p)=>o.remoteId.localeCompare(p.remoteId))}async function NI(t,{email:e,password:r}){let{determineLoginMethod:{loginMethod:n}}=await l(t,ri,{email:e}),i=await t.rawRequest(Ws,{email:e,password:r,publicKey:n.sombraPublicKey}),{login:{user:s}}=i.data,o=i.headers.get("set-cookie");if(!o||!o.includes("laravel"))throw new Error("Failed to get login cookie in response");return{roles:s.roles,loginCookie:o}}async function MI(t,{email:e,roleId:r}){let{determineLoginMethod:{loginMethod:n}}=await l(t,ri,{email:e,userId:r});await t.rawRequest(Hs,{id:r,publicKey:n.sombraPublicKey})}async function QI(t,e){let{createApiKey:{apiKey:r}}=await l(t,Yn,{input:e});return r}async function VI(t,e){await l(t,Zn,{id:e})}var fu=V.type({dependsOnQuestionReferenceId:V.string,comparisonOperator:V.union([V.literal(_privacytypes.ComparisonOperator.IsEqualTo),V.literal(_privacytypes.ComparisonOperator.IsNotEqualTo),V.literal(_privacytypes.ComparisonOperator.IsOneOf),V.literal(_privacytypes.ComparisonOperator.IsNotOneOf),V.literal(_privacytypes.ComparisonOperator.Contains)]),comparisonOperands:V.array(V.string)}),gu= exports.Od =V.type({dependsOnQuestionReferenceId:V.string,comparisonOperator:V.union([V.literal(_privacytypes.ComparisonOperator.IsNotShown),V.literal(_privacytypes.ComparisonOperator.IsShown)])}),rp= exports.Pd =V.union([fu,gu]),yu= exports.Qd =V.recursion("AssessmentNestedRule",t=>V.intersection([V.type({logicOperator:_typeutils.valuesOf.call(void 0, _privacytypes.LogicOperator)}),V.partial({rules:V.array(rp),nestedRules:V.array(t)})])),hu= exports.Rd =V.partial({action:_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentsDisplayLogicAction),rule:rp,nestedRule:yu});function Zi(t){return _typeutils.decodeCodec.call(void 0, hu,t)}var Iu=be.intersection([be.partial({riskAssignment:be.partial({riskLevelId:be.string,riskMatrixRowId:be.string,riskMatrixColumnId:be.string})}),be.type({comparisonOperands:be.array(be.string),comparisonOperator:_typeutils.valuesOf.call(void 0, _privacytypes.ComparisonOperator)})]);function zi(t){return _typeutils.decodeCodec.call(void 0, Iu,t)}var Wi=20;async function op(t,{titles:e,pageSize:r,ids:n=[],gql:i=$n,integrationNames:s=[]}){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Fetching ${n.length===0?"all":n.length} Data Silos...`));let o=[],p=0,c=!1;do{let{dataSilos:{nodes:u}}=await l(t,i,{filterBy:{ids:n.length>0?n:void 0,type:s.length>0?s:void 0,titles:e},first:r,offset:p});o.push(...u),p+=r,c=u.length===r}while(c);return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Found a total of ${o.length} data silo${n.length>0?` matching IDs ${n.join(",")}`:""}s${s.length>0?` matching integrationNames ${s.join(",")}`:""}`)),o.sort((u,m)=>u.title.localeCompare(m.title))}async function Pu(t,e,{debug:r,includeGuessedCategories:n,pageSize:i}){let s=[],o=0,p=!1;do try{r&&_chunkZUNVPK23cjs.a.log(_colors2.default.magenta(`Pulling in subdatapoints for offset ${o}`));let{subDataPoints:{nodes:c}}=await l(t,n?bn:Rn,{first:i,filterBy:{dataPoints:[e]},offset:o});s.push(...c),o+=i,p=c.length===i,r&&_chunkZUNVPK23cjs.a.log(_colors2.default.green(`Pulled in subdatapoints for offset ${o} for dataPointId=${e}`))}catch(c){throw _chunkZUNVPK23cjs.a.error(_colors2.default.red(`An error fetching subdatapoints for offset ${o} for dataPointId=${e}`)),c}while(p);return _chunk6WIX75ZFcjs.g.call(void 0, s,"name")}async function Eu(t,e,{debug:r,pageSize:n,skipSubDatapoints:i,includeGuessedCategories:s}){let o=[],p=0,c=!1;do{r&&_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Fetching datapoints with offset: ${p}`));let{dataPoints:{nodes:u}}=await l(t,En,{first:n,filterBy:{dataSilos:[e]},offset:p});r&&_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Fetched ${u.length} datapoints at offset: ${p}`)),i||(await _bluebird.map.call(void 0, u,async m=>{try{r&&_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Fetching subdatapoints for ${m.name} for datapoint offset ${p}`));let d=await Pu(t,m.id,{pageSize:1e3,debug:r,includeGuessedCategories:s});o.push({...m,subDataPoints:d.sort((f,g)=>f.name.localeCompare(g.name))}),r&&_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully fetched subdatapoints for ${m.name}`))}catch(d){throw _chunkZUNVPK23cjs.a.error(_colors2.default.red(`An error fetching subdatapoints for ${m.name} datapoint offset ${p}`)),d}},{concurrency:5}),r&&_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Fetched all subdatapoints for page of datapoints at offset: ${p}`))),p+=n,c=u.length===n}while(c);return o.sort((u,m)=>u.name.localeCompare(m.name))}async function sp(t,{ids:e,pageSize:r,titles:n,debug:i,skipDatapoints:s,skipSubDatapoints:o,includeGuessedCategories:p,integrationNames:c}){let u=[],m=await op(t,{titles:n,ids:e,integrationNames:c,pageSize:r,gql:xn});return s||await _bluebird.mapSeries.call(void 0, m,async(d,f)=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`[${f+1}/${m.length}] Fetching data silo - ${d.title}`));let g=await Eu(t,d.id,{debug:i,pageSize:r,skipSubDatapoints:o,includeGuessedCategories:p});i&&_chunkZUNVPK23cjs.a.info(_colors2.default.green(`[${f+1}/${m.length}] Successfully fetched datapoint for - ${d.title}`)),u.push([d,g])}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully fetched all ${m.length} data silo configurations`)),u}async function ap(t,e,{pageSize:r,dataSubjectsByName:n,apiKeysByTitle:i}){let s=!1,o=new Date().getTime();_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${t.length}" data silos...`));let p=await op(e,{titles:t.map(({title:I})=>I),pageSize:r}),c=_chunk6WIX75ZFcjs.e.call(void 0, p,"title"),u=t.filter(({title:I})=>!c[I]);if(u.length>0){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating "${u.length}" data silos that did not exist...`));let I=_chunk6WIX75ZFcjs.b.call(void 0, u,Wi);await _bluebird.mapSeries.call(void 0, I,async L=>{let{createDataSilos:{dataSilos:C}}=await l(e,Dn,{input:L.map(_=>({name:_["outer-type"]||_.integrationName,title:_.title,country:_.country,countrySubDivision:_.countrySubDivision}))});C.forEach(_=>{c[_.title]=_})}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created "${u.length}" data silos!`))}let m=_chunk6WIX75ZFcjs.b.call(void 0, t,Wi);await _bluebird.mapSeries.call(void 0, m,async(I,L)=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`[Batch ${L+1}/${m.length}] Syncing "${I.length}" data silos`)),await l(e,Qr,{input:{dataSilos:I.map(C=>({id:c[C.title].id,country:C.country,countrySubDivision:C.countrySubDivision,url:C.url,headers:C.headers,description:C.description,identifiers:C["identity-keys"],isLive:!C.disabled,ownerEmails:C.owners,teamNames:C.teams,dependedOnDataSiloTitles:C["deletion-dependencies"]?void 0:[],apiKeyId:C["api-key-title"]?i[C["api-key-title"]].id:void 0,dataSubjectBlockListIds:C["data-subjects"]?Wa(C["data-subjects"],n):void 0,attributes:C.attributes,businessEntityTitles:C.businessEntityTitles,notifyEmailAddress:_optionalChain([C, 'access', _6 => _6["email-settings"], 'optionalAccess', _7 => _7["notify-email-address"]]),promptAVendorEmailSendFrequency:_optionalChain([C, 'access', _8 => _8["email-settings"], 'optionalAccess', _9 => _9["send-frequency"]]),promptAVendorEmailSendType:_optionalChain([C, 'access', _10 => _10["email-settings"], 'optionalAccess', _11 => _11["send-type"]]),promptAVendorEmailIncludeIdentifiersAttachment:_optionalChain([C, 'access', _12 => _12["email-settings"], 'optionalAccess', _13 => _13["include-identifiers-attachment"]]),promptAVendorEmailCompletionLinkType:_optionalChain([C, 'access', _14 => _14["email-settings"], 'optionalAccess', _15 => _15["completion-link-type"]]),manualWorkRetryFrequency:_optionalChain([C, 'access', _16 => _16["email-settings"], 'optionalAccess', _17 => _17["manual-work-retry-frequency"]])}))}}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`[Batch ${L+1}/${m.length}] Synced "${I.length}" data silos!`))});let d=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),f=t.filter(({datapoints:I=[]})=>I.length>0),g=t.map(({datapoints:I=[]})=>I.length).reduce((I,L)=>I+L,0);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${g}" datapoints from "${f.length}" data silos...`)),d.start(g,0);let y=0;await _bluebird.map.call(void 0, f,async({datapoints:I,title:L})=>{I&&await _bluebird.mapSeries.call(void 0, I,async C=>{let _=C.fields?C.fields.map(({key:J,description:me,categories:ce,purposes:X,attributes:Se,...Ie})=>({name:J,description:me,categories:ce?ce.map(pe=>({...pe,name:pe.name||"Other"})):void 0,purposes:X?X.map(pe=>({...pe,name:pe.name||"Other"})):void 0,attributes:Se,accessRequestVisibilityEnabled:Ie["access-request-visibility-enabled"],erasureRequestRedactionEnabled:Ie["erasure-request-redaction-enabled"]})):void 0,H={dataSiloId:c[L].id,path:C.path,name:C.key,title:C.title,description:C.description,...C.owners?{ownerEmails:C.owners}:{},...C.teams?{teamNames:C.teams}:{},...C["data-collection-tag"]?{dataCollectionTag:C["data-collection-tag"]}:{},querySuggestions:C["privacy-action-queries"]?Object.entries(C["privacy-action-queries"]).map(([J,me])=>({requestType:J,suggestedQuery:me})):void 0,enabledActions:C["privacy-actions"]||[],subDataPoints:_},K=(H.subDataPoints||[]).map(({name:J})=>J),se=K.filter((J,me)=>K.indexOf(J)!==me);if(se.length>0)_chunkZUNVPK23cjs.a.info(_colors2.default.red(`
|
|
2962
2962
|
Cannot update datapoint "${C.key}" as it has duplicate sub-datapoints with the same name:
|
|
2963
2963
|
${se.join(`
|
|
2964
|
-
`)}`)),s=!0;else try{await l(e,
|
|
2964
|
+
`)}`)),s=!0;else try{await l(e,wn,H)}catch(J){_chunkZUNVPK23cjs.a.info(_colors2.default.red(`
|
|
2965
2965
|
Failed to update datapoint "${C.key}" for data silo "${L}"! -
|
|
2966
|
-
${J.message}`)),s=!0}y+=1,d.update(y)})},{concurrency:10}),d.stop();let R=new Date().getTime()-o;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${t.length}" data silos and "${g}" datapoints in "${R/1e3}" seconds!`)),{success:!s,dataSiloTitleToId:_typeutils.apply.call(void 0, c,({id:S})=>S)}}async function ap(t,e){let r=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" data silo dependencies...`));let n=_chunkVY55L6P5cjs.b.call(void 0, e,zi);return await _bluebird.mapSeries.call(void 0, n,async(i,s)=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`[Batch ${s}/${i.length}] Updating "${i.length}" data silos...`));try{await l(t,Qr,{input:{dataSilos:i.map(([o,p])=>({id:o,dependedOnDataSiloTitles:p}))}}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`[Batch ${s+1}/${i.length}] Synced "${i.length}" data silos!`))}catch(o){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`[Batch ${s+1}/${i.length}] Failed to update "${i.length}" silos! - ${o.message}`))}}),!r}var Wi=20;async function Hi(t,e){let r=[],n=0,i=!1;do{let{enrichers:{nodes:s}}=await l(t,Dn,{first:Wi,offset:n,title:e});r.push(...s),n+=Wi,i=s.length===Wi}while(i);return r.sort((s,o)=>s.title.localeCompare(o.title))}async function lp(t,{enricher:e,identifierByName:r,dataSubjectsByName:n}){let s=(await Hi(t,e.title)).find(({title:u})=>u===e.title),o=_optionalChain([e, 'access', _18 => _18["data-subjects"], 'optionalAccess', _19 => _19.map, 'call', _20 => _20(u=>{let m=n[u];if(!m)throw new Error(`Failed to find a data subject with name: ${u}`);return m.id})]),p=e["input-identifier"],c=e["privacy-actions"]||Object.values(_privacytypes.RequestAction);s?await l(t,vn,{input:{id:s.id,title:e.title,url:e.url,headers:e.headers,testRegex:e.testRegex,lookerQueryTitle:e.lookerQueryTitle,expirationDuration:typeof e.expirationDuration=="number"?e.expirationDuration.toString():void 0,transitionRequestStatus:e.transitionRequestStatus,phoneNumbers:e.phoneNumbers,regionList:e.regionList,dataSubjectIds:o,description:e.description||"",inputIdentifier:p?r[p].id:void 0,identifiers:e["output-identifiers"].map(u=>r[u].id),...s.type===_privacytypes.EnricherType.Sombra?{}:{actions:c}}}):p&&await l(t,Ln,{input:{title:e.title,url:e.url,type:e.type||_privacytypes.EnricherType.Server,headers:e.headers,testRegex:e.testRegex,lookerQueryTitle:e.lookerQueryTitle,expirationDuration:typeof e.expirationDuration=="number"?e.expirationDuration.toString():void 0,transitionRequestStatus:e.transitionRequestStatus,phoneNumbers:e.phoneNumbers,dataSubjectIds:o,regionList:e.regionList,description:e.description||"",inputIdentifier:r[p].id,identifiers:e["output-identifiers"].map(u=>r[u].id),actions:c}})}var Ji=20;async function gt(t,e){let r=[],n=0,i=!1;do{let{templates:{nodes:s}}=await l(t,Xn,{first:Ji,offset:n,title:e});r.push(...s),n+=Ji,i=s.length===Ji}while(i);return r.sort((s,o)=>s.title.localeCompare(o.title))}async function cp(t,e){(await gt(e,t.title)).find(({title:i})=>i===t.title)||await l(e,eo,{title:t.title})}function Xi(t){return t.map(({country:e,countrySubDivision:r})=>({country:e,...r?{countrySubDivision:r}:{}}))}async function xt(t,e={}){let{globalActionItemCollections:{nodes:r}}=await l(t,Xo,{filterBy:{...e}});return r}var en=50;async function zt(t){let e=[],r=0,n=!1;do{let{consentPartitions:{nodes:i}}=await l(t,us,{first:en,offset:r});e.push(...i),r+=en,n=i.length===en}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}async function mp(t,e){let r=await De(t),n=!1,i=await zt(t),s=_chunkVY55L6P5cjs.c.call(void 0, e.map(({name:o})=>o),i.map(({name:o})=>o));return await _bluebird.mapSeries.call(void 0, s,async o=>{try{await l(t,ks,{input:{id:r,name:o}}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created consent partition: ${o}!`))}catch(p){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to create consent partition: ${o}! - ${p.message}`)),n=!0}}),!n}var wu=["dataSilos","enrichers","templates","apiKeys"];async function mP(t,{dataSiloIds:e,integrationNames:r,debug:n,resources:i=wu,pageSize:s,skipDatapoints:o,includeGuessedCategories:p,skipSubDatapoints:c,trackerStatuses:u=Object.values(_privacytypes.ConsentTrackerStatus)}){if(e.length>0&&r.length>0)throw new Error("Only 1 of integrationNames OR dataSiloIds can be provided");_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Fetching data with page size ${s}...`));let[m,d,f,g,y,A,R,S,L,C,_,H,K,se,J,me,ce,X,Ie,Se,pe,de,we,ke,Ze,Ae,ne,ue,Ee,I,O,fe,ge]=await Promise.all([i.includes("dataSilos")||i.includes("dataSubjects")?Yt(t):[],i.includes("apiKeys")?$r({},t,!0):[],i.includes("dataSilos")?op(t,{ids:e,integrationNames:r,pageSize:s,debug:n,includeGuessedCategories:p,skipDatapoints:o,skipSubDatapoints:c}):[],i.includes("enrichers")?Hi(t):[],i.includes("dataFlows")?[...u.includes(_privacytypes.ConsentTrackerStatus.Live)?await Rt(t,_privacytypes.ConsentTrackerStatus.Live):[],...u.includes(_privacytypes.ConsentTrackerStatus.NeedsReview)?await Rt(t,_privacytypes.ConsentTrackerStatus.NeedsReview):[]]:[],i.includes("cookies")?[...u.includes(_privacytypes.ConsentTrackerStatus.Live)?await Ti(t,_privacytypes.ConsentTrackerStatus.Live):[],...u.includes(_privacytypes.ConsentTrackerStatus.NeedsReview)?await Ti(t,_privacytypes.ConsentTrackerStatus.NeedsReview):[]]:[],i.includes("customFields")?Et(t):[],i.includes("templates")?gt(t):[],i.includes("identifiers")?Fi(t):[],i.includes("actions")?ur(t):[],i.includes("businessEntities")?gr(t):[],i.includes("processingActivities")?Ar(t):[],i.includes("consentManager")?Ga(t):void 0,i.includes("consentManager")?yr(t):[],i.includes("prompts")?$t(t):[],i.includes("promptPartials")?Dr(t):[],i.includes("promptGroups")?xr(t):[],i.includes("agents")?fr(t):[],i.includes("agentFunctions")?dr(t):[],i.includes("agentFiles")?mr(t):[],i.includes("vendors")?wr(t):[],i.includes("dataCategories")?hr(t):[],i.includes("processingPurposes")?Ir(t):[],i.includes("actionItems")?cr(t,{type:[_privacytypes.ActionItemCode.Onboarding]}):[],i.includes("actionItemCollections")?xt(t):[],i.includes("teams")?br(t):[],i.includes("policies")?Cr(t):[],i.includes("privacyCenters")?Qa(t):[],i.includes("messages")?Fa(t):[],i.includes("partitions")?zt(t):[],i.includes("assessments")?La(t):[],i.includes("assessmentTemplates")?va(t):[],i.includes("purposes")?Ba(t):[]]),Ft=i.includes("consentManager")&&K?await Na(t,K.id):void 0,U={},jl=_chunkVY55L6P5cjs.a.call(void 0, f.map(([{apiKeys:h}])=>h.map(({title:T})=>T))),hn=Object.values(d).filter(({title:h})=>i.includes("apiKeys")?!0:jl.includes(h));if(hn.length>0&&i.includes("apiKeys")&&(U["api-keys"]=hn.map(({title:h})=>({title:h}))),I.length>0&&i.includes("partitions")&&(U.partitions=I.map(({name:h,partition:T})=>({name:h,partition:T}))),K&&i.includes("consentManager")&&(U["consent-manager"]={bundleUrls:{TEST:K.testBundleURL,PRODUCTION:K.bundleURL},domains:K.configuration.domains||void 0,partition:K.configuration.partition||void 0,consentPrecedence:K.configuration.consentPrecedence||void 0,unknownRequestPolicy:K.configuration.unknownRequestPolicy||void 0,unknownCookiePolicy:K.configuration.unknownCookiePolicy||void 0,syncEndpoint:K.configuration.syncEndpoint||void 0,telemetryPartitioning:K.configuration.telemetryPartitioning||void 0,signedIabAgreement:K.configuration.signedIabAgreement||void 0,syncGroups:K.configuration.syncGroups||void 0,theme:Ft?{primaryColor:Ft.primaryColor||void 0,fontColor:Ft.fontColor||void 0,privacyPolicy:Ft.privacyPolicy||void 0,prompt:Ft.prompt}:void 0,experiences:se.map(h=>({name:h.name,displayName:h.displayName||void 0,regions:h.regions.map(T=>({countrySubDivision:T.countrySubDivision||void 0,country:T.country||void 0})),onConsentExpiry:h.onConsentExpiry,consentExpiry:h.consentExpiry,operator:h.operator,displayPriority:h.displayPriority,viewState:h.viewState,purposes:h.purposes.map(T=>({trackingType:T.trackingType})),optedOutPurposes:h.optedOutPurposes.map(T=>({trackingType:T.trackingType})),browserLanguages:h.browserLanguages,browserTimeZones:h.browserTimeZones}))}),O.length>0&&i.includes("assessments")&&(U.assessments=O.map(({title:h,assessmentGroup:T,sections:b,creator:w,description:$,status:q,assignees:k,externalAssignees:G,reviewers:B,isLocked:Q,isArchived:ee,isExternallyCreated:j,dueDate:M,createdAt:ye,assignedAt:_e,submittedAt:Ne,approvedAt:Me,rejectedAt:Fe,titleIsInternal:oe,retentionSchedule:Re,attributeValues:ze,resources:Ut,syncedRows:at})=>({title:h,group:T.title,sections:b.map(({title:Te,status:Ue,questions:$e,assignees:v,isReviewed:N,externalAssignees:he})=>({title:Te,status:Ue,questions:$e.map(({title:pt,type:Mr,subType:xe,placeholder:qe,description:lt,isRequired:Yl,referenceId:Zl,displayLogic:Cn,riskLogic:zl,riskCategories:Wl,riskFramework:Hl,answerOptions:Jl,selectedAnswers:Xl,allowedMimeTypes:ec,allowSelectOther:tc,syncModel:rc,syncColumn:ic,attributeKey:nc,requireRiskEvaluation:oc,requireRiskMatrixEvaluation:sc})=>{let Oe=Cn?Yi(Cn):void 0;return{title:pt,type:Mr,"sub-type":xe,placeholder:qe,description:lt,"is-required":Yl,"reference-id":Zl,"display-logic":Oe&&Object.keys(Oe).length>0?{action:Oe.action,rule:Oe.rule?{"depends-on-question-reference-id":Oe.rule.dependsOnQuestionReferenceId,"comparison-operator":Oe.rule.comparisonOperator,"comparison-operands":"comparisonOperands"in Oe.rule?Oe.rule.comparisonOperands:void 0}:void 0,"nested-rule":Oe.nestedRule?{"logic-operator":Oe.nestedRule.logicOperator,rules:(Oe.nestedRule.rules||[]).map(Le=>({"depends-on-question-reference-id":Le.dependsOnQuestionReferenceId,"comparison-operator":Le.comparisonOperator,"comparison-operands":"comparisonOperands"in Le?Le.comparisonOperands:void 0}))}:void 0}:void 0,"risk-logic":zl.map(Le=>{let Fr=Zi(Le);return{"risk-level":_optionalChain([Fr, 'access', _21 => _21.riskAssignment, 'optionalAccess', _22 => _22.riskLevelId]),"comparison-operands":Fr.comparisonOperands,"comparison-operator":Fr.comparisonOperator}}),"risk-categories":Wl.map(({title:Le})=>Le),"risk-framework":_optionalChain([Hl, 'optionalAccess', _23 => _23.title]),"answer-options":Jl.map(({value:Le})=>({value:Le})),"selected-answers":Xl.map(({value:Le})=>Le),"allowed-mime-types":ec,"allow-select-other":tc,"sync-model":rc||void 0,"sync-column":ic||void 0,"attribute-key":_optionalChain([nc, 'optionalAccess', _24 => _24.name]),"require-risk-evaluation":oc,"require-risk-matrix-evaluation":sc}}),assignees:v.map(({email:pt})=>pt),"external-assignees":he.map(({email:pt})=>pt),"is-reviewed":N})),creator:_optionalChain([w, 'optionalAccess', _25 => _25.email]),description:$,status:q,assignees:k.map(({email:Te})=>Te),"external-assignees":G.map(({email:Te})=>Te),reviewers:B.map(({email:Te})=>Te),locked:Q,archived:ee,external:j,"title-is-internal":oe,"due-date":M||void 0,"created-at":ye||void 0,"assigned-at":_e||void 0,"submitted-at":Ne||void 0,"approved-at":Me||void 0,"rejected-at":Fe||void 0,"retention-schedule":Re?{type:Re.type,"duration-days":Re.durationDays,operand:Re.operation}:void 0,attributes:ze!==void 0&&ze.length>0?ve(ze):void 0,resources:Ut.map(({resourceType:Te,title:Ue,name:$e,category:v,type:N,purpose:he})=>({type:Te,title:v?`${v} - ${$e}`:he?`${he} - ${$e}`:Ue||$e||N||""})),rows:at.map(({resourceType:Te,title:Ue,name:$e,category:v,type:N,purpose:he})=>({type:Te,title:v?`${v} - ${$e}`:he?`${he} - ${$e}`:Ue||$e||N||""}))}))),fe.length>0&&i.includes("assessmentTemplates")&&(U["assessment-templates"]=fe.map(({title:h,description:T,sections:b,status:w,source:$,creator:q,isLocked:k,isArchived:G,createdAt:B,retentionSchedule:Q})=>({title:h,description:T,sections:b.map(({title:ee,questions:j})=>({title:ee,questions:j.map(({title:M,type:ye,subType:_e,placeholder:Ne,description:Me,isRequired:Fe,referenceId:oe,displayLogic:Re,riskLogic:ze,riskCategories:Ut,riskFramework:at,answerOptions:Te,allowedMimeTypes:Ue,allowSelectOther:$e,syncModel:v,syncColumn:N,attributeKey:he,requireRiskEvaluation:pt,requireRiskMatrixEvaluation:Mr})=>{let xe=Re?Yi(Re):void 0;return{title:M,type:ye,"sub-type":_e,placeholder:Ne,description:Me,"is-required":Fe,"reference-id":oe,"display-logic":xe&&Object.keys(xe).length>0?{action:xe.action,rule:xe.rule?{"depends-on-question-reference-id":xe.rule.dependsOnQuestionReferenceId,"comparison-operator":xe.rule.comparisonOperator,"comparison-operands":"comparisonOperands"in xe.rule?xe.rule.comparisonOperands:void 0}:void 0,"nested-rule":xe.nestedRule?{"logic-operator":xe.nestedRule.logicOperator,rules:(xe.nestedRule.rules||[]).map(qe=>({"depends-on-question-reference-id":qe.dependsOnQuestionReferenceId,"comparison-operator":qe.comparisonOperator,"comparison-operands":"comparisonOperands"in qe?qe.comparisonOperands:void 0}))}:void 0}:void 0,"risk-logic":ze.map(qe=>{let lt=Zi(qe);return{"risk-level":_optionalChain([lt, 'access', _26 => _26.riskAssignment, 'optionalAccess', _27 => _27.riskLevelId]),"risk-matrix-row":_optionalChain([lt, 'access', _28 => _28.riskAssignment, 'optionalAccess', _29 => _29.riskMatrixRowId]),"risk-matrix-column":_optionalChain([lt, 'access', _30 => _30.riskAssignment, 'optionalAccess', _31 => _31.riskMatrixColumnId]),"comparison-operands":lt.comparisonOperands,"comparison-operator":lt.comparisonOperator}}),"risk-categories":Ut.map(({title:qe})=>qe),"risk-framework":_optionalChain([at, 'optionalAccess', _32 => _32.title]),"answer-options":Te.map(({value:qe})=>({value:qe})),"allowed-mime-types":Ue,"allow-select-other":$e,"sync-model":v||void 0,"sync-column":N||void 0,"attribute-key":_optionalChain([he, 'optionalAccess', _33 => _33.name]),"require-risk-evaluation":pt,"require-risk-matrix-evaluation":Mr}})})),status:w,source:$,creator:_optionalChain([q, 'optionalAccess', _34 => _34.email]),locked:k,archived:G,"created-at":B||void 0,"retention-schedule":Q?{type:Q.type,"duration-days":Q.durationDays,operand:Q.operation}:void 0}))),J.length>0&&i.includes("prompts")&&(U.prompts=J.map(({title:h,content:T})=>({title:h,content:T}))),me.length>0&&i.includes("promptPartials")&&(U["prompt-partials"]=me.map(({title:h,content:T})=>({title:h,content:T}))),ce.length>0&&i.includes("promptGroups")&&(U["prompt-groups"]=ce.map(({title:h,description:T,prompts:b})=>({title:h,description:T,prompts:b.map(({title:w})=>w)}))),Ae.length>0&&i.includes("teams")&&(U.teams=Ae.map(({name:h,description:T,ssoDepartment:b,ssoGroup:w,ssoTitle:$,users:q,scopes:k})=>({name:h,description:T,"sso-department":b||void 0,"sso-group":w||void 0,"sso-title":$||void 0,users:q.map(({email:G})=>G),scopes:k.map(({name:G})=>G)}))),m.length>0&&i.includes("dataSubjects")&&(U["data-subjects"]=m.map(({type:h,title:T,active:b,adminDashboardDefaultSilentMode:w,actions:$})=>({type:h,title:_optionalChain([T, 'optionalAccess', _35 => _35.defaultMessage]),active:b,adminDashboardDefaultSilentMode:w,actions:$.map(({type:q})=>q)}))),ne.length>0&&(U.policies=ne.map(({title:h,versions:T,disabledLocales:b})=>({title:_optionalChain([h, 'optionalAccess', _36 => _36.defaultMessage]),content:_optionalChain([T, 'optionalAccess', _37 => _37[0], 'optionalAccess', _38 => _38.content, 'optionalAccess', _39 => _39.defaultMessage]),disabledLocales:b}))),Ee.length>0&&(U.messages=Ee.map(({id:h,defaultMessage:T,targetReactIntlId:b,translations:w})=>({id:h,defaultMessage:T,targetReactIntlId:b||void 0,translations:w.reduce(($,{locale:q,value:k})=>Object.assign($,{[q]:k}),{})}))),ue.length>0){let h=ue[0];U["privacy-center"]={isDisabled:h.isDisabled,showPrivacyRequestButton:h.showPrivacyRequestButton,showPolicies:h.showPolicies,showTrackingTechnologies:h.showTrackingTechnologies,showCookies:h.showCookies,showDataFlows:h.showDataFlows,showConsentManager:h.showConsentManager,showManageYourPrivacy:h.showManageYourPrivacy,showMarketingPreferences:h.showMarketingPreferences,locales:h.locales,defaultLocale:h.defaultLocale,preferBrowserDefaultLocale:h.preferBrowserDefaultLocale,supportEmail:h.supportEmail||void 0,replyToEmail:h.replyToEmail||void 0,useNoReplyEmailAddress:h.useNoReplyEmailAddress,useCustomEmailDomain:h.useCustomEmailDomain,transformAccessReportJsonToCsv:h.transformAccessReportJsonToCsv,theme:h.theme}}if(_.length>0&&i.includes("businessEntities")&&(U["business-entities"]=_.map(({title:h,description:T,address:b,headquarterCountry:w,headquarterSubDivision:$,dataProtectionOfficerName:q,dataProtectionOfficerEmail:k,attributeValues:G})=>({title:h,description:T||void 0,address:b||void 0,headquarterCountry:w||void 0,headquarterSubDivision:$||void 0,dataProtectionOfficerName:q||void 0,dataProtectionOfficerEmail:k||void 0,attributes:G!==void 0&&G.length>0?ve(G):void 0}))),H.length>0&&i.includes("processingActivities")&&(U["processing-activities"]=H.map(({title:h,description:T,securityMeasureDetails:b,controllerships:w,storageRegions:$,transferRegions:q,retentionType:k,retentionPeriod:G,dataProtectionImpactAssessmentLink:B,dataProtectionImpactAssessmentStatus:Q,attributeValues:ee,dataSilos:j,dataSubjects:M,teams:ye,owners:_e,processingPurposeSubCategories:Ne,dataSubCategories:Me,saaSCategories:Fe})=>({title:h,description:T,securityMeasureDetails:_nullishCoalesce(b, () => (void 0)),controllerships:w.length>0?w:void 0,storageRegions:$.length>0?Xi($):void 0,transferRegions:q.length>0?Xi(q):void 0,retentionType:k,retentionPeriod:k===_privacytypes.RetentionType.StatedPeriod?G:void 0,dataProtectionImpactAssessmentLink:_nullishCoalesce(B, () => (void 0)),dataProtectionImpactAssessmentStatus:Q,attributes:ee!==void 0&&ee.length>0?ve(ee):void 0,dataSiloTitles:j.length>0?j.map(({title:oe})=>oe):void 0,dataSubjectTypes:M.length>0?M.map(({type:oe})=>oe):void 0,teamNames:ye.length>0?ye.map(({name:oe})=>oe):void 0,ownerEmails:_e.length>0?_e.map(({email:oe})=>oe):void 0,processingSubPurposes:Ne.length>0?Ne.map(({name:oe,purpose:Re})=>({purpose:Re,...oe?{name:oe}:{}})):void 0,dataSubCategories:Me.length>0?Me.map(({name:oe,category:Re})=>({category:Re,...oe?{name:oe}:{}})):void 0,saaSCategories:Fe.length>0?Fe.map(({title:oe})=>oe):void 0}))),C.length>0&&i.includes("actions")&&(U.actions=C.map(({type:h,skipSecondaryIfNoFiles:T,skipDownloadableStep:b,requiresReview:w,regionList:$,regionDetectionMethod:q,waitingPeriod:k})=>({type:h,...h===_privacytypes.RequestAction.Erasure?{skipSecondaryIfNoFiles:T,skipDownloadableStep:b}:{},requiresReview:w,waitingPeriod:k,regionDetectionMethod:q,regionList:$.length>0?$:void 0}))),L.length>0&&i.includes("identifiers")&&(U.identifiers=L.map(({name:h,type:T,regex:b,selectOptions:w,privacyCenterVisibility:$,isRequiredInForm:q,placeholder:k,displayTitle:G,dataSubjects:B,displayDescription:Q,displayOrder:ee,isUniqueOnPreferenceStore:j})=>({name:h,type:T,regex:b,selectOptions:w.length>0?w:void 0,privacyCenterVisibility:$.length>0?$:void 0,isRequiredInForm:q,placeholder:k||void 0,dataSubjects:B.length>0?B.map(({type:M})=>M):void 0,displayTitle:_optionalChain([G, 'optionalAccess', _40 => _40.defaultMessage]),displayDescription:_optionalChain([Q, 'optionalAccess', _41 => _41.defaultMessage]),displayOrder:ee,isUniqueOnPreferenceStore:j}))),X.length>0&&i.includes("agents")&&(U.agents=X.map(({name:h,agentId:T,description:b,instructions:w,codeInterpreterEnabled:$,retrievalEnabled:q,prompt:k,largeLanguageModel:G,teams:B,owners:Q,agentFunctions:ee,agentFiles:j})=>({name:h,agentId:T,description:b||void 0,instructions:w,codeInterpreterEnabled:$,retrievalEnabled:q,prompt:_optionalChain([k, 'optionalAccess', _42 => _42.title]),"large-language-model":{name:G.name,client:G.client},teams:B&&B.length>0?B.map(({name:M})=>M):void 0,owners:Q&&Q.length>0?Q.map(({email:M})=>M):void 0,"agent-functions":ee&&ee.length>0?ee.map(({name:M})=>M):void 0,"agent-files":j&&j.length>0?j.map(({name:M})=>M):void 0}))),ke.length>0&&i.includes("actionItems")&&(U["action-items"]=ke.map(({teams:h,users:T,customerExperienceActionItemIds:[b],dueDate:w,priority:$,resolved:q,collections:k,notes:G,link:B,title:Q,type:ee,attributeValues:j})=>({teams:h.map(({name:M})=>M),users:T.map(({email:M})=>M),dueDate:w||void 0,title:Q,notes:G,customerExperienceActionItemId:b,collections:k.map(({title:M})=>M),link:B,priority:$||void 0,resolved:q,type:ee,attributes:j!==void 0&&j.length>0?ve(j):void 0}))),Ze.length>0&&i.includes("actionItemCollections")&&(U["action-item-collections"]=Ze.map(({title:h,description:T,hidden:b,productLine:w})=>({title:h,description:T||void 0,hidden:b,productLine:w}))),Ie.length>0&&i.includes("agentFunctions")&&(U["agent-functions"]=Ie.map(({name:h,description:T,parameters:b})=>({name:h,description:T,parameters:JSON.stringify(b)}))),Se.length>0&&i.includes("agentFiles")&&(U["agent-files"]=Se.map(({name:h,description:T,fileId:b,size:w,purpose:$})=>({name:h,description:T,fileId:b,size:w,purpose:$}))),pe.length>0&&i.includes("vendors")&&(U.vendors=pe.map(({title:h,description:T,dataProcessingAgreementLink:b,contactName:w,contactPhone:$,address:q,headquarterCountry:k,headquarterSubDivision:G,websiteUrl:B,businessEntity:Q,teams:ee,owners:j,attributeValues:M})=>({title:h,description:T||void 0,dataProcessingAgreementLink:b||void 0,contactName:w||void 0,contactPhone:$||void 0,address:q||void 0,headquarterCountry:k||void 0,headquarterSubDivision:G||void 0,websiteUrl:B||void 0,businessEntity:_optionalChain([Q, 'optionalAccess', _43 => _43.title]),teams:ee&&ee.length>0?ee.map(({name:ye})=>ye):void 0,owners:j&&j.length>0?j.map(({email:ye})=>ye):void 0,attributes:M!==void 0&&M.length>0?ve(M):void 0}))),de.length>0&&i.includes("dataCategories")&&(U["data-categories"]=de.map(({name:h,category:T,description:b,regex:w,owners:$,teams:q,attributeValues:k})=>({name:h,category:T,description:b||void 0,regex:w||void 0,owners:$&&$.length>0?$.map(({email:G})=>G):void 0,teams:q&&q.length>0?q.map(({name:G})=>G):void 0,attributes:k!==void 0&&k.length>0?ve(k):void 0}))),we.length>0&&i.includes("processingPurposes")&&(U["processing-purposes"]=we.map(({name:h,purpose:T,description:b,owners:w,teams:$,attributeValues:q})=>({name:h,purpose:T,description:b||void 0,owners:w&&w.length>0?w.map(({email:k})=>k):void 0,teams:$&&$.length>0?$.map(({name:k})=>k):void 0,attributes:q!==void 0&&q.length>0?ve(q):void 0}))),y.length>0&&i.includes("dataFlows")&&(U["data-flows"]=y.map(({value:h,type:T,description:b,trackingType:w,service:$,status:q,owners:k,teams:G,attributeValues:B})=>({value:h,type:T,description:b||void 0,trackingPurposes:w,status:q,service:_optionalChain([$, 'optionalAccess', _44 => _44.integrationName]),owners:k.map(({email:Q})=>Q),teams:G.map(({name:Q})=>Q),attributes:B!==void 0&&B.length>0?ve(B):void 0}))),A.length>0&&i.includes("cookies")&&(U.cookies=A.map(({name:h,isRegex:T,description:b,trackingPurposes:w,service:$,status:q,owners:k,teams:G,attributeValues:B})=>({name:h,isRegex:T,description:b||void 0,trackingPurposes:w,status:q,service:_optionalChain([$, 'optionalAccess', _45 => _45.integrationName]),owners:k.map(({email:Q})=>Q),teams:G.map(({name:Q})=>Q),attributes:B!==void 0&&B.length>0?ve(B):void 0}))),R.length>0&&i.includes("customFields")&&(U.attributes=R.map(({description:h,name:T,type:b,values:w,enabledOn:$=[]})=>({description:h||void 0,resources:$,name:T,type:b,values:w.map(({name:q,color:k,description:G})=>({name:q,color:k||void 0,description:G}))}))),ge.length>0&&(U.purposes=ge.map(({name:h,description:T,trackingType:b,defaultConsent:w,configurable:$,showInConsentManager:q,isActive:k,displayOrder:G,optOutSignals:B,authLevel:Q,topics:ee,showInPrivacyCenter:j,title:M})=>({name:h,title:M,description:T||void 0,trackingType:b,"default-consent":w,configurable:$,"show-in-consent-manager":q,"show-in-privacy-center":j,"is-active":k,"display-order":G,"opt-out-signals":B.length>0?B:void 0,"auth-level":Q||void 0,"preference-topics":ee.map(({title:ye,type:_e,displayDescription:Ne,defaultConfiguration:Me,showInPrivacyCenter:Fe,preferenceOptionValues:oe})=>({title:ye.defaultMessage,type:_e,description:Ne.defaultMessage,"default-configuration":Me,"show-in-privacy-center":Fe,...oe.length>0?{options:oe.map(({title:Re,slug:ze})=>({title:Re.defaultMessage,slug:ze}))}:{}}))}))),e.length===0&&S.length>0&&i.includes("templates")&&(U.templates=S.map(({title:h})=>({title:h}))),g.length>0&&i.includes("enrichers")&&(U.enrichers=g.map(({title:h,url:T,type:b,inputIdentifier:w,identifiers:$,actions:q,testRegex:k,dataSubjects:G,expirationDuration:B,lookerQueryTitle:Q,transitionRequestStatus:ee,phoneNumbers:j,regionList:M})=>({title:h,url:T||void 0,type:b,"input-identifier":_optionalChain([w, 'optionalAccess', _46 => _46.name]),"output-identifiers":$.map(({name:ye})=>ye),"privacy-actions":Object.values(_privacytypes.RequestAction).length===q.length?void 0:q,testRegex:k||void 0,lookerQueryTitle:Q||void 0,expirationDuration:parseInt(B,10),transitionRequestStatus:ee||void 0,phoneNumbers:j&&j.length>0?j:void 0,regionList:M&&M.length>0?M:void 0,"data-subjects":G.map(({type:ye})=>ye)}))),f.length>0&&i.includes("dataSilos")){let h=_chunkVY55L6P5cjs.e.call(void 0, m,"type");U["data-silos"]=f.map(([{title:T,description:b,url:w,type:$,outerType:q,apiKeys:k,notifyEmailAddress:G,identifiers:B,dependentDataSilos:Q,owners:ee,country:j,countrySubDivision:M,teams:ye,subjectBlocklist:_e,isLive:Ne,promptAVendorEmailSendFrequency:Me,promptAVendorEmailSendType:Fe,promptAVendorEmailIncludeIdentifiersAttachment:oe,promptAVendorEmailCompletionLinkType:Re,manualWorkRetryFrequency:ze,catalog:Ut,attributeValues:at,discoveredBy:Te,businessEntities:Ue},$e])=>({title:T,description:b,integrationName:$,"outer-type":q||void 0,url:w||void 0,"api-key-title":_optionalChain([k, 'access', _47 => _47[0], 'optionalAccess', _48 => _48.title]),"identity-keys":B.filter(({isConnected:v})=>v).map(({name:v})=>v),...Q.length>0?{"deletion-dependencies":Q.map(({title:v})=>v)}:{},...ee.length>0?{owners:ee.map(({email:v})=>v)}:{},...ye.length>0?{teams:ye.map(({name:v})=>v)}:{},...Te.length>0?{discoveredBy:Te.map(({title:v})=>v)}:{},...Ue.length>0?{businessEntities:Ue.map(({title:v})=>v)}:{},country:j||void 0,countrySubDivision:M||void 0,disabled:!Ne,"data-subjects":_e.length>0?Wa(_e.map(({type:v})=>v),h):void 0,...Ut.hasAvcFunctionality?{"email-settings":{"notify-email-address":G||void 0,"send-frequency":Me,"send-type":Fe,"include-identifiers-attachment":oe,"completion-link-type":Re,"manual-work-retry-frequency":ze}}:{},attributes:at!==void 0&&at.length>0?ve(at):void 0,datapoints:$e.map(v=>({key:v.name,title:_optionalChain([v, 'access', _49 => _49.title, 'optionalAccess', _50 => _50.defaultMessage]),description:_optionalChain([v, 'access', _51 => _51.description, 'optionalAccess', _52 => _52.defaultMessage]),owners:v.owners.map(({email:N})=>N),teams:v.teams.map(({name:N})=>N),...v.path.length>0?{path:v.path}:{},..._optionalChain([v, 'access', _53 => _53.dataCollection, 'optionalAccess', _54 => _54.title])?{"data-collection-tag":v.dataCollection.title.defaultMessage}:{},...v.dbIntegrationQueries.length>0?{"privacy-action-queries":_chunkVY55L6P5cjs.f.call(void 0, _chunkVY55L6P5cjs.e.call(void 0, v.dbIntegrationQueries,"requestType"),N=>N.suggestedQuery||N.query||void 0)}:{},...v.subDataPoints.length>0?{fields:v.subDataPoints.map(N=>({key:N.name,description:N.description,purposes:N.purposes,categories:N.categories,...p&&N.pendingCategoryGuesses?{"guessed-categories":N.pendingCategoryGuesses.filter(he=>he.status==="PENDING").map(he=>({category:{name:he.category.name,category:he.category.category},status:he.status,confidence:he.confidence,classifierVersion:he.classifierVersion||void 0}))}:{},"access-request-visibility-enabled":N.accessRequestVisibilityEnabled,"erasure-request-redaction-enabled":N.erasureRequestRedactionEnabled,attributes:N.attributeValues!==void 0&&N.attributeValues.length>0?ve(N.attributeValues):void 0})).sort((N,he)=>N.key.localeCompare(he.key))}:{},"privacy-actions":v.actionSettings.filter(({active:N})=>N).map(({type:N})=>N)})).sort((v,N)=>[..._nullishCoalesce(v.path, () => ([])),v.key].join(".").localeCompare([..._nullishCoalesce(N.path, () => ([])),N.key].join(".")))}))}return U}async function yP(t,e){let{reportPromptRun:{promptRun:r}}=await l(t,Ho,{input:{...e,promptRunMessages:e.promptRunMessages.map(({content:n,...i})=>({...i,message:n}))}});return r.id}async function fp(t,e){await l(t,So,{requestEnricherId:e})}async function PP(t,e){await l(t,ls,{input:e})}var Du=[...Object.values(_privacytypes.IsoCountryCode),...Object.values(_privacytypes.IsoCountrySubdivisionCode)];async function gp(t,{action:e,actionId:r,skipPublish:n=!1}){await l(t,Us,{input:{id:r,skipSecondaryIfNoFiles:e.skipSecondaryIfNoFiles,skipDownloadableStep:e.skipDownloadableStep,requiresReview:e.requiresReview,waitingPeriod:e.waitingPeriod,skipPublish:n,regionList:e.regionBlockList?_chunkVY55L6P5cjs.c.call(void 0, Du,e.regionBlockList):e.regionList,regionDetectionMethod:e.regionDetectionMethod}})}async function qu(t,e){let r={title:e.title,description:e.description||"",hidden:e.hidden||!1,productLine:e.productLine},{createActionItemCollection:n}=await l(t,es,{input:r});return n.created}async function Lu(t,e,r){await l(t,ts,{input:{id:r,title:e.title,description:e.description,hidden:e.hidden,productLine:e.productLine}})}async function hp(t,e){let r=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" action item collections...`));let n=await xt(t),i=_chunkVY55L6P5cjs.e.call(void 0, n,"title"),s=e.filter(p=>!i[p.title]);await _bluebird.mapSeries.call(void 0, s,async p=>{try{await qu(t,p),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created action item collection "${p.title}"!`))}catch(c){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create action item collection "${p.title}"! - ${c.message}`))}});let o=e.map(p=>[p,_optionalChain([i, 'access', _55 => _55[p.title], 'optionalAccess', _56 => _56.id])]).filter(p=>!!p[1]);return await _bluebird.mapSeries.call(void 0, o,async([p,c])=>{try{await Lu(t,p,c),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced action item collection "${p.title}"!`))}catch(u){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync action item collection "${p.title}"! - ${u.message}`))}}),!r}async function vu(t,e,r,n={}){let i=_chunkVY55L6P5cjs.b.call(void 0, e,100);await _bluebird.mapSeries.call(void 0, i,async s=>{await l(t,Vs,{input:s.map(o=>({title:o.title,type:o.type,priorityOverride:o.priority,dueDate:o.dueDate,customerExperienceActionItemId:o.customerExperienceActionItemId,resolved:o.resolved,notes:o.notes,link:o.link,assigneesUserEmails:o.users,assigneesTeamNames:o.teams,...o.attributes?{}:{},collectionIds:o.collections.map(p=>r[p].id)}))})})}async function ku(t,e,r,n={}){let i=s=>{let o=n[s];if(!o)throw new Error(`Attribute key "${s}" does not exist!`);return o.id};await l(t,Bs,{input:{ids:[r],title:e.title,priorityOverride:e.priority,dueDate:e.dueDate,resolved:e.resolved,customerExperienceActionItemId:e.customerExperienceActionItemId,notes:e.notes,link:e.link,assigneesUserEmails:e.users,assigneesTeamNames:e.teams,...e.attributes?{attributes:e.attributes.map(({key:s,values:o})=>({attributeKeyId:i(s),attributeValueNames:o}))}:{}}})}function _u({title:t,collections:e}){return`${t}-${e.map(r=>r.title).sort().join("-")}`}function Cp({title:t,collections:e}){return`${t}-${e.sort().join("-")}`}async function Ip(t,e){let r=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" actionItems...`));let n=e.some(y=>y.attributes&&y.attributes.length>0),[i,s,o]=await Promise.all([cr(t),xt(t),n?Et(t):[]]),p=_chunkVY55L6P5cjs.e.call(void 0, s,"title"),c=_chunkVY55L6P5cjs.e.call(void 0, i,_u),u=_chunkVY55L6P5cjs.e.call(void 0, o,"name"),m=_chunkVY55L6P5cjs.e.call(void 0, i.filter(y=>!!y.customerExperienceActionItemIds),({customerExperienceActionItemIds:y})=>y[0]),d=_chunkVY55L6P5cjs.j.call(void 0, e.map(y=>y.collections).flat()).filter(y=>!p[y]);if(d.length>0)return _chunkZUNVPK23cjs.a.info(_colors2.default.red(`Missing action item collections: "${d.join('", "')}" - please create them first!`)),!1;let f=e.filter(y=>!c[Cp(y)]&&!m[y.customerExperienceActionItemId]);if(f.length>0)try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating "${f.length}" actionItems...`)),await vu(t,f,p,u),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created "${f.length}" actionItems!`))}catch(y){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create action items! - ${y.message}`))}let g=e.map(y=>[y,_optionalChain([c, 'access', _57 => _57[Cp(y)], 'optionalAccess', _58 => _58.id])||_optionalChain([m, 'access', _59 => _59[y.customerExperienceActionItemId], 'optionalAccess', _60 => _60.id])]).filter(y=>!!y[1]);return await _bluebird.mapSeries.call(void 0, g,async([y,A])=>{try{await ku(t,y,A,u),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced action item "${y.title}"!`))}catch(R){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync action item "${y.title}"! - ${R.message}`))}}),!r}async function Gu(t,e){let r={name:e.name,description:e.description,fileId:e.fileId,size:e.size,purpose:e.purpose,fileUploadedAt:new Date,agentIds:[]},{createAgentFile:n}=await l(t,ta,{input:r});return n.agentFile}async function Nu(t,e){await l(t,ra,{input:{agentFiles:e.map(([r,n])=>({id:n,name:r.name,description:r.description,fileId:r.fileId,size:r.size,purpose:r.purpose}))}})}async function Sp(t,e){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" agent files...`));let r=!1,n=await mr(t),i=_chunkVY55L6P5cjs.e.call(void 0, n,"name"),s=e.filter(o=>!i[o.name]);await _bluebird.mapSeries.call(void 0, s,async o=>{try{let p=await Gu(t,o);i[p.name]=p,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced agent file "${o.name}"!`))}catch(p){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync agent file "${o.name}"! - ${p.message}`))}});try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${e.length}" agent files!`)),await Nu(t,e.map(o=>[o,i[o.name].id])),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced "${e.length}" agent files!`))}catch(o){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync "${e.length}" agent files! - ${o.message}`))}return!r}async function Fu(t,e){let r={name:e.name,description:e.description,parameters:e.parameters,agentIds:[]},{createAgentFunction:n}=await l(t,na,{input:r});return n.agentFunction}async function Uu(t,e){await l(t,oa,{input:{agentFunctions:e.map(([r,n])=>({id:n,name:r.name,description:r.description,parameters:r.parameters}))}})}async function Tp(t,e){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" agent functions...`));let r=!1,n=await dr(t),i=_chunkVY55L6P5cjs.e.call(void 0, n,"name"),s=e.filter(o=>!i[o.name]);await _bluebird.mapSeries.call(void 0, s,async o=>{try{let p=await Fu(t,o);i[p.name]=p,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced agent function "${o.name}"!`))}catch(p){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync agent function "${o.name}"! - ${p.message}`))}});try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${e.length}" agent functions!`)),await Uu(t,e.map(o=>[o,i[o.name].id])),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced "${e.length}" agent functions!`))}catch(o){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync "${e.length}" agent functions! - ${o.message}`))}return!r}async function Bu(t,e){let r={name:e.name,description:e.description,codeInterpreterEnabled:e.codeInterpreterEnabled,retrievalEnabled:e.retrievalEnabled,promptTitle:e.prompt,largeLanguageModelName:e["large-language-model"].name,largeLanguageModelClient:e["large-language-model"].client},{createAgent:n}=await l(t,Js,{input:r});return n.agent}async function Vu(t,e){await l(t,Xs,{input:{agents:e.map(([r,n])=>({id:n,name:r.name,description:r.description,codeInterpreterEnabled:r.codeInterpreterEnabled,retrievalEnabled:r.retrievalEnabled}))}})}async function Pp(t,e){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" agents...`));let r=!1,n=await fr(t),i=_chunkVY55L6P5cjs.e.call(void 0, n,"name"),s=e.filter(o=>!i[o.name]);await _bluebird.mapSeries.call(void 0, s,async o=>{try{let p=await Bu(t,o);i[p.name]=p,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced agent "${o.name}"!`))}catch(p){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync agent "${o.name}"! - ${p.message}`))}});try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${e.length}" agents!`)),await Vu(t,e.map(o=>[o,i[o.name].id])),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced "${e.length}" agents!`))}catch(o){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync "${e.length}" agents ! - ${o.message}`))}return!r}async function Ep(t,e,{existingAttribute:r,deleteExtraAttributeValues:n}){let i={name:e.name,enabledOn:e.resources},s;if(r)await l(t,ps,{attributeKeyId:r.id,description:r.isCustom?e.description:void 0,...i}),s=r.id;else{let{createAttributeKey:{attributeKey:m}}=await l(t,as,{type:e.type,description:e.description,...i});s=m.id}let o=_chunkVY55L6P5cjs.e.call(void 0, _optionalChain([r, 'optionalAccess', _61 => _61.values])||[],"name"),{existingValues:p=[],newValues:c=[]}=_chunkVY55L6P5cjs.d.call(void 0, e.values||[],m=>o[m.name]?"existingValues":"newValues"),u=_chunkVY55L6P5cjs.c.call(void 0, (_optionalChain([r, 'optionalAccess', _62 => _62.values])||[]).map(({name:m})=>m),(e.values||[]).map(({name:m})=>m));c.length>0&&(await l(t,is,{input:c.map(({name:m,...d})=>({name:m,attributeKeyId:s,...d}))}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Created ${c.length} attribute values`))),p.length>0&&(await l(t,ns,{input:p.map(({name:m,...d})=>({id:o[m].id,name:m,description:o[m].description,color:o[m].color,...d,attributeKeyId:s}))}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Updated ${p.length} attribute values`))),u.length>0&&n&&(await _bluebird.map.call(void 0, u,async m=>{await l(t,os,{id:o[m].id})},{concurrency:10}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Deleted ${u.length} attribute values`)))}async function ju(t,e){let r={title:e.title,description:e.description,address:e.address,headquarterCountry:e.headquarterCountry,headquarterSubDivision:e.headquarterSubDivision,dataProtectionOfficerName:e.dataProtectionOfficerName,dataProtectionOfficerEmail:e.dataProtectionOfficerEmail,attributes:e.attributes,teamNames:e.teams,ownerEmails:e.owners},{createBusinessEntity:n}=await l(t,Gs,{input:r});return n.businessEntity}async function Yu(t,e){let r=_chunkVY55L6P5cjs.b.call(void 0, e,100);await _bluebird.mapSeries.call(void 0, r,async n=>{await l(t,Ns,{input:n.map(([i,s])=>({id:s,title:i.title,description:i.description,address:i.address,headquarterCountry:i.headquarterCountry,headquarterSubDivision:i.headquarterSubDivision,dataProtectionOfficerName:i.dataProtectionOfficerName,dataProtectionOfficerEmail:i.dataProtectionOfficerEmail,attributes:i.attributes,teamNames:i.teams,ownerEmails:i.owners}))})})}async function bp(t,e){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" business entities...`));let r=!1,n=await gr(t),i=_chunkVY55L6P5cjs.e.call(void 0, n,"title"),s=e.filter(o=>!i[o.title]);await _bluebird.mapSeries.call(void 0, s,async o=>{try{let p=await ju(t,o);i[p.title]=p,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced business entity "${o.title}"!`))}catch(p){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync business entity "${o.title}"! - ${p.message}`))}});try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${e.length}" business entities!`)),await Yu(t,e.map(o=>[o,i[o.title].id])),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced "${e.length}" business entities!`))}catch(o){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync "${e.length}" business entities ! - ${o.message}`))}return!r}var rn=20;async function wp(t){let e=[],r=0,n=!1;do{let{codePackages:{nodes:i}}=await l(t,so,{first:rn,offset:r});e.push(...i),r+=rn,n=i.length===rn}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var nn=20;async function $p(t){let e=[],r=0,n=!1;do{let{softwareDevelopmentKits:{nodes:i}}=await l(t,io,{first:nn,offset:r});e.push(...i),r+=nn,n=i.length===nn}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var Wu=100;async function Hu(t,e){let{createSoftwareDevelopmentKit:{softwareDevelopmentKit:r}}=await l(t,oo,{input:e});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created software development kit "${e.name}"!`)),r}async function Ju(t,e){let{updateSoftwareDevelopmentKits:{softwareDevelopmentKits:r}}=await l(t,no,{input:{softwareDevelopmentKits:e}});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated ${e.length} software development kits!`)),r}async function xp(t,e,r=20){let n=!1,i=[];_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Syncing software development kits..."));let s=await $p(t),o=_chunkVY55L6P5cjs.e.call(void 0, s,({name:d,codePackageType:f})=>JSON.stringify({name:d,codePackageType:f})),p=e.map(d=>[d,_optionalChain([o, 'access', _63 => _63[JSON.stringify({name:d.name,codePackageType:d.codePackageType})], 'optionalAccess', _64 => _64.id])]),c=p.filter(([,d])=>!d).map(([d])=>d);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating "${c.length}" new software development kits...`)),await _bluebird.map.call(void 0, c,async d=>{let f=await Hu(t,d);i.push(f)},{concurrency:r}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced ${c.length} software development kits!`))}catch(d){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create software development kits! - ${d.message}`))}let u=p.filter(d=>!!d[1]),m=_chunkVY55L6P5cjs.b.call(void 0, u,Wu);return _chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${u.length}" software development kits...`)),await _bluebird.mapSeries.call(void 0, m,async d=>{try{let f=await Ju(t,d.map(([{codePackageType:g,...y},A])=>({...y,id:A})));i.push(...f),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated "${u.length}" software development kits!`))}catch(f){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to update software development kits! - ${f.message}`))}_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${e.length}" software development kits!`))}),{softwareDevelopmentKits:i,success:!n}}var on=20;async function Dp(t){let e=[],r=0,n=!1;do{let{repositories:{nodes:i}}=await l(t,Qn,{first:on,offset:r});e.push(...i),r+=on,n=i.length===on}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var tm=100;async function rm(t,e){let{createRepository:{repository:r}}=await l(t,Vn,{input:e});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created repository "${e.name}"!`)),r}async function im(t,e){let{updateRepositories:{repositories:r}}=await l(t,Bn,{input:{repositories:e}});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated ${e.length} repositories!`)),r}async function qp(t,e,r=20){let n=!1,i=[],s=await Dp(t),o=_chunkVY55L6P5cjs.e.call(void 0, s,"name"),p=e.map(d=>[d,_optionalChain([o, 'access', _65 => _65[d.name], 'optionalAccess', _66 => _66.id])]),c=p.filter(([,d])=>!d).map(([d])=>d);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating "${c.length}" new repositories...`)),await _bluebird.map.call(void 0, c,async d=>{let f=await rm(t,d);i.push(f)},{concurrency:r}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced ${c.length} repositories!`))}catch(d){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create repositories! - ${d.message}`))}let u=p.filter(d=>!!d[1]),m=_chunkVY55L6P5cjs.b.call(void 0, u,tm);return _chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${u.length}" repositories...`)),await _bluebird.mapSeries.call(void 0, m,async d=>{try{let f=await im(t,d.map(([g,y])=>({...g,id:y})));i.push(...f),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated "${u.length}" repositories!`))}catch(f){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to update repositories! - ${f.message}`))}_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${e.length}" repositories!`))}),{repositories:i,success:!n}}var sm=100,kt="%%%%";async function am(t,e){let{createCodePackage:{codePackage:r}}=await l(t,po,{input:e});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created code package "${e.name}"!`)),r}async function pm(t,e){let{updateCodePackages:{codePackages:r}}=await l(t,ao,{input:{codePackages:e}});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated ${e.length} code packages!`)),r}async function ER(t,e,r=20){let n=!1,[i,{softwareDevelopmentKits:s}]=await Promise.all([wp(t),xp(t,_chunkVY55L6P5cjs.k.call(void 0, e.map(({type:f,softwareDevelopmentKits:g=[]})=>g.map(({name:y})=>({name:y,codePackageType:f}))).flat(),({name:f,codePackageType:g})=>`${f}${kt}${g}`),r),qp(t,_chunkVY55L6P5cjs.k.call(void 0, e,"repositoryName").map(({repositoryName:f})=>({name:f,url:`https://github.com/${f}`})))]),o=_chunkVY55L6P5cjs.e.call(void 0, s,({name:f,codePackageType:g})=>`${f}${kt}${g}`),p=_chunkVY55L6P5cjs.e.call(void 0, i,({name:f,type:g})=>`${f}${kt}${g}`),c=e.map(f=>[f,_optionalChain([p, 'access', _67 => _67[`${f.name}${kt}${f.type}`], 'optionalAccess', _68 => _68.id])]),u=c.filter(([,f])=>!f).map(([f])=>f);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating "${u.length}" new code packages...`)),await _bluebird.map.call(void 0, u,async({softwareDevelopmentKits:f,...g})=>{await am(t,{...g,...f?{softwareDevelopmentKitIds:_chunkVY55L6P5cjs.j.call(void 0, f.map(({name:y})=>{let A=o[`${y}${kt}${g.type}`];if(!A)throw new Error(`Failed to find SDK with name: "${y}"`);return A.id}))}:{}})},{concurrency:r}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced ${u.length} code packages!`))}catch(f){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create code packages! - ${f.message}`))}let m=c.filter(f=>!!f[1]);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${m.length}" code packages...`));let d=_chunkVY55L6P5cjs.b.call(void 0, m,sm);return await _bluebird.mapSeries.call(void 0, d,async f=>{try{await pm(t,f.map(([{softwareDevelopmentKits:g,repositoryName:y,...A},R])=>({...A,...g?{softwareDevelopmentKitIds:_chunkVY55L6P5cjs.j.call(void 0, g.map(({name:S})=>{let L=o[`${S}${kt}${A.type}`];if(!L)throw new Error(`Failed to find SDK with name: "${S}"`);return L.id}))}:{},id:R}))),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated "${f.length}" code packages!`))}catch(g){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to update code packages! - ${g.message}`))}}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${e.length}" code packages!`)),!n}async function Lp(t,{identifier:e,dataSubjectsByName:r,identifierId:n,skipPublish:i=!1}){await l(t,Nn,{input:{id:n,selectOptions:e.selectOptions,isRequiredInForm:e.isRequiredInForm,regex:e.regex,placeholder:e.placeholder,displayTitle:e.displayTitle,displayDescription:e.displayDescription,displayOrder:e.displayOrder,isUniqueOnPreferenceStore:e.isUniqueOnPreferenceStore,privacyCenterVisibility:e.privacyCenterVisibility,dataSubjectIds:e.dataSubjects?e.dataSubjects.map(s=>r[s].id):void 0,skipPublish:i}})}var cm=100;async function um(t,e){let r=await De(t);await _bluebird.mapSeries.call(void 0, _chunkVY55L6P5cjs.b.call(void 0, e,cm),async n=>{await l(t,fs,{airgapBundleId:r,cookies:n.map(i=>({name:i.name,trackingPurposes:i.trackingPurposes&&i.trackingPurposes.length>0?i.trackingPurposes:void 0,description:i.description,service:i.service,status:i.status,attributes:i.attributes,isRegex:i.isRegex}))})})}async function vp(t,e){let r=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" cookies...`));let n=e.filter(i=>e.filter(s=>i.name===s.name&&i.isRegex===s.isRegex).length>1);if(n.length>0)throw new Error(`Failed to upload cookies as there were non-unique entries found: ${n.map(({name:i})=>i).join(",")}`);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Upserting "${e.length}" new cookies...`)),await um(t,e),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced ${e.length} cookies!`))}catch(i){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create cookies! - ${i.message}`))}return!r}async function mm(t,e){let r={name:e.name,description:e.description,ssoTitle:e["sso-title"],ssoDepartment:e["sso-department"],ssoGroup:e["sso-group"],scopes:e.scopes,userEmails:e.users},{createTeam:n}=await l(t,Qo,{input:r});return n.team}async function dm(t,e,r){let{updateTeam:n}=await l(t,Bo,{input:{id:r,name:e.name,description:e.description,ssoTitle:e["sso-title"],ssoDepartment:e["sso-department"],ssoGroup:e["sso-group"],scopes:e.scopes,userEmails:e.users}});return n.team}async function _p(t,e){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" teams...`));let r=!1,n=await br(t),i=_chunkVY55L6P5cjs.e.call(void 0, n,"name"),s=e.filter(p=>!i[p.name]),o=e.filter(p=>!!i[p.name]);return await _bluebird.mapSeries.call(void 0, s,async p=>{try{let c=await mm(t,p);i[c.name]=c,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created team "${p.name}"!`))}catch(c){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync team "${p.name}"! - ${c.message}`))}}),await _bluebird.mapSeries.call(void 0, o,async p=>{try{let c=await dm(t,p,i[p.name].id);i[c.name]=c,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated team "${p.name}"!`))}catch(c){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync team "${p.name}"! - ${c.message}`))}}),!r}async function Op(t,{dataSubject:e,dataSubjectId:r,skipPublish:n=!1}){await l(t,Fn,{input:{id:r,title:e.title,adminDashboardDefaultSilentMode:e.adminDashboardDefaultSilentMode,actions:e.actions,skipPublish:n&&typeof e.active>"u"}}),typeof e.active=="boolean"&&await l(t,Un,{input:{id:r,active:e.active,skipPublish:n}})}async function gm(t,e){let{createPrompt:{prompt:r}}=await l(t,vo,{input:e});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created prompt "${e.title}"!`)),r.id}async function ym(t,e){await l(t,Lo,{input:{prompts:e.map(([r,n])=>({...r,id:n}))}}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated ${e.length} prompts!`))}async function Gp(t,e,r=20){let n=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" prompts...`));let i=await $t(t),s=_chunkVY55L6P5cjs.e.call(void 0, i,"title"),o=e.map(u=>[u,_optionalChain([s, 'access', _69 => _69[u.title], 'optionalAccess', _70 => _70.id])]),p=o.filter(([,u])=>!u).map(([u])=>u);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating "${p.length}" new prompts...`)),await _bluebird.map.call(void 0, p,async u=>{await gm(t,u)},{concurrency:r}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced ${p.length} prompts!`))}catch(u){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create prompts! - ${u.message}`))}let c=o.filter(u=>!!u[1]);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${c.length}" prompts...`)),await ym(t,c),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated "${c.length}" prompts!`))}catch(u){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create prompts! - ${u.message}`))}return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${e.length}" prompts!`)),!n}var Cm=100;async function Am(t,e){let r=await bt(t);await _bluebird.mapSeries.call(void 0, _chunkVY55L6P5cjs.b.call(void 0, e,Cm),async n=>{await l(t,mo,{privacyCenterId:r,policies:n.map(([i,s])=>({id:s,title:i.title,disableEffectiveOn:i.disableEffectiveOn,disabledLocales:i.disabledLocales,...i.effectiveOn||i.content?{version:{...i.effectiveOn?{effectiveOn:i.effectiveOn}:{},...i.content?{content:{defaultMessage:i.content}}:{}}}:{}}))})})}async function Np(t,e){let r=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" policies...`));let n=e.filter(o=>e.filter(p=>o.title===p.title).length>1);if(n.length>0)throw new Error(`Failed to upload policies as there were non-unique entries found: ${n.map(({title:o})=>o).join(",")}`);let i=await Cr(t),s=_chunkVY55L6P5cjs.e.call(void 0, i,({title:o})=>o.defaultMessage);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Upserting "${e.length}" new policies...`)),await Am(t,e.map(o=>[o,_optionalChain([s, 'access', _71 => _71[o.title], 'optionalAccess', _72 => _72.id])])),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced ${e.length} policies!`))}catch(o){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create policies! - ${o.message}`))}return!r}var Sm=100;async function Tm(t,e){await _bluebird.mapSeries.call(void 0, _chunkVY55L6P5cjs.b.call(void 0, e,Sm),async r=>{await l(t,Ao,{messages:r.map(n=>({...n.id.includes(".")?{}:{id:n.id},defaultMessage:n.defaultMessage,targetReactIntlId:n.targetReactIntlId,translations:n.translations?Object.entries(n.translations).map(([i,s])=>({locale:i,value:s})):void 0}))})})}async function Mp(t,e){let r=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" messages...`));let n=e.filter(i=>e.filter(s=>i.id===s.id).length>1);if(n.length>0)throw new Error(`Failed to upload messages as there were non-unique entries found: ${n.map(({id:i})=>i).join(",")}`);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Upserting "${e.length}" new messages...`)),await Tm(t,e),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced ${e.length} messages!`))}catch(i){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create messages! - ${i.message}`))}return!r}async function Fp(t,e){let r=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Syncing privacy center..."));let n=await bt(t);try{await l(t,Zs,{input:{privacyCenterId:n,transformAccessReportJsonToCsv:e.transformAccessReportJsonToCsv,useCustomEmailDomain:e.useCustomEmailDomain,useNoReplyEmailAddress:e.useNoReplyEmailAddress,replyToEmail:e.replyToEmail,supportEmail:e.supportEmail,preferBrowserDefaultLocale:e.preferBrowserDefaultLocale,defaultLocale:e.defaultLocale,locales:e.locales,showMarketingPreferences:e.showMarketingPreferences,showManageYourPrivacy:e.showManageYourPrivacy,showPolicies:e.showPolicies,showConsentManager:e.showConsentManager,showDataFlows:e.showDataFlows,showCookies:e.showCookies,showTrackingTechnologies:e.showTrackingTechnologies,showPrivacyRequestButton:e.showPrivacyRequestButton,isDisabled:e.isDisabled,...e.theme?{colorPalette:e.theme.colors,componentStyles:e.theme.componentStyles,textStyles:e.theme.textStyles}:{}}}),_chunkZUNVPK23cjs.a.info(_colors2.default.green("Successfully synced privacy center!"))}catch(i){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create privacy center! - ${i.message}`))}return!r}var _airgapjstypes = require('@transcend-io/airgap.js-types');var Qp="https://app.transcend.io/consent-manager/regional-experiences/purposes";async function bm(t,e){let r=await yr(t),n=_chunkVY55L6P5cjs.e.call(void 0, r,"name"),i=await Sr(t),s=_chunkVY55L6P5cjs.e.call(void 0, i,"trackingType");await _bluebird.map.call(void 0, e,async(o,p)=>{let c=_optionalChain([o, 'access', _73 => _73.purposes, 'optionalAccess', _74 => _74.map, 'call', _75 => _75((d,f)=>{let g=s[d.trackingType];if(!g)throw new Error(`Invalid purpose trackingType provided at consentManager.experiences[${p}].purposes[${f}]: ${d.trackingType}. See list of valid purposes ${Qp}`);return g.id})]),u=_optionalChain([o, 'access', _76 => _76.optedOutPurposes, 'optionalAccess', _77 => _77.map, 'call', _78 => _78((d,f)=>{let g=s[d.trackingType];if(!g)throw new Error(`Invalid purpose trackingType provided at consentManager.experiences[${p}].optedOutPurposes[${f}]: ${d.trackingType}. See list of valid purposes ${Qp}`);return g.id})]),m=n[o.name];m?(await l(t,Ls,{input:{id:m.id,name:o.displayName,regions:o.regions,operator:o.operator,onConsentExpiry:o.onConsentExpiry,consentExpiry:o.consentExpiry,displayPriority:o.displayPriority!==m.displayPriority?o.displayPriority:void 0,viewState:o.viewState,purposes:c,optedOutPurposes:u,browserLanguages:o.browserLanguages,browserTimeZones:o.browserTimeZones}}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced consent experience "${o.name}"!`))):(await l(t,vs,{input:{name:o.name,displayName:o.displayName,regions:o.regions,operator:o.operator,onConsentExpiry:o.onConsentExpiry||_airgapjstypes.OnConsentExpiry.Prompt,consentExpiry:o.consentExpiry,displayPriority:o.displayPriority,viewState:o.viewState||_airgapjstypes.InitialViewState.Hidden,purposes:c||[],optedOutPurposes:u||[],browserLanguages:o.browserLanguages,browserTimeZones:o.browserTimeZones}}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created consent experience "${o.name}"!`)))},{concurrency:10})}async function Bp(t,e){let r;try{r=await De(t,1)}catch(n){if(n.message.includes("AirgapBundle not found")){let i=await bt(t),{createConsentManager:s}=await l(t,Is,{domains:e.domains,privacyCenterId:i});r=s.consentManager.id}else throw n}if(e.domains&&await l(t,Es,{domains:e.domains,airgapBundleId:r}),e.partition){let i=(await zt(t)).find(s=>s.name===e.partition);if(!i)throw new Error(`Partition "${e.partition}" not found. Please create the partition first.`);await l(t,Rs,{partitionId:i.id,airgapBundleId:r})}e.version&&await l(t,Ss,{airgapBundleId:r,version:e.version}),e.signedIabAgreement&&await l(t,bs,{input:{id:r,...e.signedIabAgreement?{signedIabAgreement:e.signedIabAgreement}:{}}}),e.unknownRequestPolicy&&await l(t,ws,{input:{id:r,unknownRequestPolicy:e.unknownRequestPolicy}}),e.unknownRequestPolicy&&await l(t,$s,{input:{id:r,unknownCookiePolicy:e.unknownCookiePolicy}}),e.telemetryPartitioning&&await l(t,xs,{input:{id:r,strategy:e.telemetryPartitioning}}),e.consentPrecedence&&await l(t,Ds,{input:{id:r,consentPrecedence:e.consentPrecedence}}),e.experiences&&await bm(t,e.experiences),e.theme&&await l(t,qs,{input:{airgapBundleId:r,...e.theme}})}var jp=100;async function wm(t,e,r=!1){let n=await De(t);await _bluebird.mapSeries.call(void 0, _chunkVY55L6P5cjs.b.call(void 0, e,jp),async i=>{await l(t,ds,{airgapBundleId:n,dataFlows:i.map(([s,o])=>({id:o,value:s.value,type:s.type,trackingType:s.trackingPurposes&&s.trackingPurposes.length>0?s.trackingPurposes:void 0,description:s.description,service:s.service,status:s.status,attributes:s.attributes})),classifyService:r})})}async function $m(t,e,r=!1){let n=await De(t);await _bluebird.mapSeries.call(void 0, _chunkVY55L6P5cjs.b.call(void 0, e,jp),async i=>{await l(t,ms,{airgapBundleId:n,dataFlows:i.map(s=>({value:s.value,type:s.type,trackingType:s.trackingPurposes&&s.trackingPurposes.length>0?s.trackingPurposes:void 0,description:s.description,service:s.service,status:s.status,attributes:s.attributes})),dropMatchingDataFlowsInTriage:!0,classifyService:r})})}async function Yp(t,e,r){let n=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" data flows...`));let i=e.filter(d=>e.filter(f=>d.value===f.value&&d.type===f.type).length>1);if(i.length>0)throw new Error(`Failed to upload data flows as there were non-unique entries found: ${i.map(({value:d})=>d).join(",")}`);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Fetching data flows..."));let[s,o]=await Promise.all([Rt(t,_privacytypes.ConsentTrackerStatus.Live),Rt(t,_privacytypes.ConsentTrackerStatus.NeedsReview)]),p=[...s,...o],c=e.map(d=>[d,_optionalChain([p, 'access', _79 => _79.find, 'call', _80 => _80(f=>d.value===f.value&&d.type===f.type), 'optionalAccess', _81 => _81.id])]),u=c.filter(([,d])=>!d).map(([d])=>d);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating "${u.length}" new data flows...`)),await $m(t,u,r),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced ${u.length} data flows!`))}catch(d){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create data flows! - ${d.message}`))}let m=c.filter(d=>!!d[1]);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${m.length}" data flows...`)),await wm(t,m,r),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated "${m.length}" data flows!`))}catch(d){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create data flows! - ${d.message}`))}return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${e.length}" data flows!`)),!n}async function Dm(t,e){let{createPromptPartial:{promptPartial:r}}=await l(t,_o,{input:e});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created prompt partial "${e.title}"!`)),r.id}async function qm(t,e){await l(t,ko,{input:{promptPartials:e.map(([r,n])=>({...r,id:n}))}}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated ${e.length} prompt partials!`))}async function Zp(t,e,r=20){let n=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" prompt partials...`));let i=await Dr(t),s=_chunkVY55L6P5cjs.e.call(void 0, i,"title"),o=e.map(u=>[u,_optionalChain([s, 'access', _82 => _82[u.title], 'optionalAccess', _83 => _83.id])]),p=o.filter(([,u])=>!u).map(([u])=>u);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating "${p.length}" new prompt partials...`)),await _bluebird.map.call(void 0, p,async u=>{await Dm(t,u)},{concurrency:r}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced ${p.length} prompt partials!`))}catch(u){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create prompt partials! - ${u.message}`))}let c=o.filter(u=>!!u[1]);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${c.length}" prompt partials...`)),await qm(t,c),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated "${c.length}" prompt partials!`))}catch(u){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create prompt partials! - ${u.message}`))}return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${e.length}" prompt partials!`)),!n}async function vm(t,e){let{createPromptGroup:{promptGroup:r}}=await l(t,Go,{input:e});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created prompt group "${e.title}"!`)),r.id}async function km(t,e){await l(t,Oo,{input:{promptGroups:e.map(([r,n])=>({...r,id:n}))}}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated ${e.length} prompt groups!`))}async function zp(t,e,r=20){let n=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" prompt groups...`));let i=await xr(t),s=await $t(t),o=_chunkVY55L6P5cjs.e.call(void 0, s,"title"),p=_chunkVY55L6P5cjs.e.call(void 0, i,"title"),c=e.map(d=>[d,_optionalChain([p, 'access', _84 => _84[d.title], 'optionalAccess', _85 => _85.id])]),u=c.filter(([,d])=>!d).map(([d])=>d);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating "${u.length}" new prompt groups...`)),await _bluebird.map.call(void 0, u,async d=>{await vm(t,{...d,promptIds:d.prompts.map(f=>{let g=o[f];if(!g)throw new Error(`Failed to find prompt with title: "${f}"`);return g.id})})},{concurrency:r}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced ${u.length} prompt groups!`))}catch(d){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create prompt groups! - ${d.message}`))}let m=c.filter(d=>!!d[1]);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${m.length}" prompt groups...`)),await km(t,m.map(([{prompts:d,...f},g])=>[{...f,promptIds:d.map(y=>{let A=o[y];if(!A)throw new Error(`Failed to find prompt with title: "${y}"`);return A.id})},g])),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated "${m.length}" prompt groups!`))}catch(d){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create prompt groups! - ${d.message}`))}return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${e.length}" prompt groups!`)),!n}async function Om(t,e){let r={title:e.title,description:e.description,address:e.address,headquarterCountry:e.headquarterCountry,headquarterSubDivision:e.headquarterSubDivision,dataProcessingAgreementLink:e.dataProcessingAgreementLink,contactName:e.contactName,contactPhone:e.contactPhone,websiteUrl:e.websiteUrl},{createVendor:n}=await l(t,aa,{input:r});return n.vendor}async function Gm(t,e){await l(t,pa,{input:{vendors:e.map(([r,n])=>({id:n,title:r.title,description:r.description,address:r.address,headquarterCountry:r.headquarterCountry,headquarterSubDivision:r.headquarterSubDivision,dataProcessingAgreementLink:r.dataProcessingAgreementLink,contactName:r.contactName,contactPhone:r.contactPhone,websiteUrl:r.websiteUrl,attributes:r.attributes}))}})}async function Wp(t,e){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" vendors...`));let r=!1,n=await wr(t),i=_chunkVY55L6P5cjs.e.call(void 0, n,"title"),s=e.filter(o=>!i[o.title]);await _bluebird.mapSeries.call(void 0, s,async o=>{try{let p=await Om(t,o);i[p.title]=p,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced vendor "${o.title}"!`))}catch(p){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync vendor "${o.title}"! - ${p.message}`))}});try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${e.length}" vendors!`)),await Gm(t,e.map(o=>[o,i[o.title].id])),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced "${e.length}" vendors!`))}catch(o){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync "${e.length}" vendors ! - ${o.message}`))}return!r}async function Mm(t,e){let r={name:e.name,category:e.category,description:e.description},{createDataCategory:n}=await l(t,ca,{input:r});return n.dataCategory}async function Fm(t,e){await l(t,ua,{input:{dataSubCategories:e.map(([r,n])=>({id:n,description:r.description,attributes:r.attributes}))}})}async function Hp(t,e){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" data categories...`));let r=!1,n=await hr(t),i=_chunkVY55L6P5cjs.e.call(void 0, n,({name:o,category:p})=>`${o}:${p}`),s=e.filter(o=>!i[`${o.name}:${o.category}`]);await _bluebird.mapSeries.call(void 0, s,async o=>{try{let p=await Mm(t,o);i[`${p.name}:${p.category}`]=p,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced data category "${o.name}"!`))}catch(p){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync data category "${o.name}"! - ${p.message}`))}});try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${e.length}" data categories!`)),await Fm(t,e.map(o=>[o,i[`${o.name}:${o.category}`].id])),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced "${e.length}" data categories!`))}catch(o){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync "${e.length}" data categories ! - ${o.message}`))}return!r}async function Qm(t,e){let r={name:e.name,purpose:e.purpose,description:e.description},{createProcessingPurposeSubCategory:n}=await l(t,da,{input:r});return n.processingPurposeSubCategory}async function Bm(t,e){await l(t,fa,{input:{processingPurposeSubCategories:e.map(([r,n])=>({id:n,description:r.description,attributes:r.attributes}))}})}async function Jp(t,e){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" processing purposes...`));let r=!1,n=await Ir(t),i=_chunkVY55L6P5cjs.e.call(void 0, n,({name:o,purpose:p})=>`${o}:${p}`),s=e.filter(o=>!i[`${o.name}:${o.purpose}`]);await _bluebird.mapSeries.call(void 0, s,async o=>{try{let p=await Qm(t,o);i[`${p.name}:${p.purpose}`]=p,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced processing purpose "${o.name}"!`))}catch(p){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync processing purpose "${o.name}"! - ${p.message}`))}});try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${e.length}" processing purposes!`)),await Bm(t,e.map(o=>[o,i[`${o.name}:${o.purpose}`].id])),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced "${e.length}" processing purposes!`))}catch(o){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync "${e.length}" processing purposes ! - ${o.message}`))}return!r}async function Km(t,e){let r={title:e.title,description:e.description},{createProcessingActivity:n}=await l(t,ya,{input:r});return n.processingActivity}async function jm(t,e){let r=e.filter(([,n])=>n===void 0).map(([{title:n}])=>n);if(r.length>0)throw new Error(`The following ${r.length} processing activities do not exist and thus can't be updated: "${r.join('", "')}"`);await l(t,ha,{input:{processingActivities:e.map(([{processingSubPurposes:n,dataSubCategories:i,saaSCategories:s,...o},p])=>({dataSubCategoryInputs:_optionalChain([i, 'optionalAccess', _86 => _86.map, 'call', _87 => _87(({category:c,name:u})=>({category:c,name:_nullishCoalesce(u, () => (""))}))]),processingPurposeSubCategoryInputs:_optionalChain([n, 'optionalAccess', _88 => _88.map, 'call', _89 => _89(({purpose:c,name:u})=>({purpose:c,name:_nullishCoalesce(u, () => ("Other"))}))]),saaSCategoryTitles:s,...o,id:p}))}})}async function Xp(t,e){let r=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" processing activities...`));let n=await Ar(t),i=_chunkVY55L6P5cjs.e.call(void 0, n,"title"),s=e.filter(o=>!i[o.title]);s.length>0&&_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating "${s.length}" new processing activities...`)),await _bluebird.mapSeries.call(void 0, s,async o=>{try{let p=await Km(t,o);i[p.title]=p,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created processing activity "${o.title}"!`))}catch(p){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create processing activity "${o.title}"! - ${p.message}`))}});try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${e.length}" processing activities!`)),await jm(t,e.map(o=>[o,_optionalChain([i, 'access', _90 => _90[o.title], 'optionalAccess', _91 => _91.id])])),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced "${e.length}" processingActivities!`))}catch(o){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync "${e.length}" processingActivities! - ${o.message}`))}return!r}var Mt=10;async function x$(t,e,{pageSize:r=50,publishToPrivacyCenter:n=!0,classifyService:i=!1,deleteExtraAttributeValues:s=!1}){let o=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Fetching data with page size ${r}...`));let{templates:p,attributes:c,actions:u,identifiers:m,"data-subjects":d,"business-entities":f,enrichers:g,cookies:y,"consent-manager":A,"data-silos":R,"data-flows":S,prompts:L,"prompt-groups":C,"prompt-partials":_,agents:H,"agent-functions":K,"agent-files":se,vendors:J,"data-categories":me,"processing-activities":ce,"processing-purposes":X,"action-items":Ie,"action-item-collections":Se,teams:pe,"privacy-center":de,messages:we,policies:ke,partitions:Ze}=t,[Ae,ne,ue]=await Promise.all([g||m?Ha(t,e,!n):{},R||d||g||ce?Za(t,e):{},R&&R.map(I=>I["api-key-title"]||[]).reduce((I,O)=>I+O.length,0)>0?$r(t,e):{}]);if(A){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Syncing consent manager..."));try{await Bp(e,A),_chunkZUNVPK23cjs.a.info(_colors2.default.green("Successfully synced consent manager!"))}catch(I){o=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync consent manager! - ${I.message}`))}}if(L){let I=await Gp(e,L);o=o||!I}if(_){let I=await Zp(e,_);o=o||!I}if(C){let I=await zp(e,C);o=o||!I}if(pe){let I=await _p(e,pe);o=o||!I}if(p&&(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${p.length}" email templates...`)),await _bluebird.map.call(void 0, p,async I=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing template "${I.title}"...`));try{await cp(I,e),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced template "${I.title}"!`))}catch(O){o=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync template "${I.title}"! - ${O.message}`))}},{concurrency:Mt}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${p.length}" email templates!`))),f){let I=await bp(e,f);o=o||!I}if(J){let I=await Wp(e,J);o=o||!I}if(me){let I=await Hp(e,me);o=o||!I}if(X){let I=await Jp(e,X);o=o||!I}if(Ze){let I=await mp(e,Ze);o=o||!I}if(H){let I=await Pp(e,H);o=o||!I}if(K){let I=await Tp(e,K);o=o||!I}if(se){let I=await Sp(e,se);o=o||!I}if(y){let I=await vp(e,y);o=o||!I}if(Se){let I=await hp(e,Se);o=o||!I}if(c){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${c.length}" attributes...`));let I=await Et(e);await _bluebird.map.call(void 0, c,async O=>{let fe=I.find(ge=>ge.name===O.name);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing attribute "${O.name}"...`));try{await Ep(e,O,{existingAttribute:fe,deleteExtraAttributeValues:s}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced attribute "${O.name}"!`))}catch(ge){o=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync attribute "${O.name}"! - ${ge.message}`))}},{concurrency:Mt}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${c.length}" attributes!`))}if(Ie){let I=await Ip(e,Ie);o=o||!I}if(g&&(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${g.length}" enrichers...`)),await _bluebird.map.call(void 0, g,async I=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing enricher "${I.title}"...`));try{await lp(e,{enricher:I,identifierByName:Ae,dataSubjectsByName:ne}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced enricher "${I.title}"!`))}catch(O){o=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync enricher "${I.title}"! - ${O.message}`))}},{concurrency:Mt}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${g.length}" enrichers!`))),m&&(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${m.length}" identifiers...`)),await _bluebird.map.call(void 0, m,async I=>{let O=Ae[I.name];if(!O)throw new Error(`Failed to find identifier with name: ${I.type}. Should have been auto-created by cli.`);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing identifier "${I.type}"...`));try{await Lp(e,{identifier:I,dataSubjectsByName:ne,identifierId:O.id,skipPublish:!n}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced identifier "${I.type}"!`))}catch(fe){o=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync identifier "${I.type}"! - ${fe.message}`))}},{concurrency:Mt}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${m.length}" identifiers!`))),u){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${u.length}" actions...`));let I=await ur(e);await _bluebird.map.call(void 0, u,async O=>{let fe=I.find(ge=>ge.type===O.type);if(!fe)throw new Error(`Failed to find action with type: ${O.type}. Should have already existing in the organization.`);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing action "${O.type}"...`));try{await gp(e,{action:O,actionId:fe.id,skipPublish:!n}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced action "${O.type}"!`))}catch(ge){o=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync action "${O.type}"! - ${ge.message}`))}},{concurrency:Mt}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${u.length}" actions!`))}if(d){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${d.length}" data subjects...`));let I=await Yt(e);await _bluebird.map.call(void 0, d,async O=>{let fe=I.find(ge=>ge.type===O.type);if(!fe)throw new Error(`Failed to find data subject with type: ${O.type}. Should have already existing in the organization.`);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing data subject "${O.type}"...`));try{await Op(e,{dataSubject:O,dataSubjectId:fe.id,skipPublish:!n}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced data subject "${O.type}"!`))}catch(ge){o=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync data subject "${O.type}"! - ${ge.message}`))}},{concurrency:Mt}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${d.length}" data subjects!`))}if(S){let I=await Yp(e,S,i);o=o||!I}if(de){let I=await Fp(e,de);o=o||!I}if(we){let I=await Mp(e,we);o=o||!I}if(ke){let I=await Np(e,ke);o=o||!I}let Ee=[];if(R){let{success:I,dataSiloTitleToId:O}=await sp(R,e,{dataSubjectsByName:ne,apiKeysByTitle:ue,pageSize:r});_optionalChain([R, 'optionalAccess', _92 => _92.forEach, 'call', _93 => _93(fe=>{fe["deletion-dependencies"]&&Ee.push([O[fe.title],fe["deletion-dependencies"]])})]),o=o||!I}if(Ee.length>0&&await ap(e,Ee),ce){let I=await Xp(e,ce);o=o||!I}return o}var Zm=1e3;async function _$(t,e,r){let n=_chunkVY55L6P5cjs.b.call(void 0, r,Zm);await _bluebird.mapSeries.call(void 0, n,async i=>{await l(t,Wn,{pluginId:e,rawResults:i})})}async function $D({requestActions:t,auth:e,requestIds:r,statuses:n=[_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:i,createdAtBefore:s,concurrency:o=100,transcendUrl:p=_chunkVY55L6P5cjs.r}){let c=Z(p,e),u=new Date().getTime(),m=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),d=await le(c,{actions:t,statuses:n,createdAtBefore:s,createdAtAfter:i,isSilent:!1,requestIds:r});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Marking "${d.length}" as silent mode.`));let f=0;m.start(d.length,0),await _bluebird.map.call(void 0, d,async A=>{await l(c,At,{input:{id:A.id,isSilent:!0}}),f+=1,m.update(f)},{concurrency:o}),m.stop();let y=new Date().getTime()-u;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully marked ${f} requests as silent mode in "${y/1e3}" seconds!`)),d.length}async function rl(t,e){let r=_typeutils.getValues.call(void 0, It).filter(i=>!e.getValue("columnNames",i)),n=r.length===0?{}:await _inquirer2.default.prompt(r.map(i=>{let s=_chunkVY55L6P5cjs.h.call(void 0, i.replace("ColumnName","")),o=Tt(t,s,Aa[i],!!Ia[i]);return{name:i,message:`Choose the column that will be used to map in the field: ${s}`,type:"list",default:o[0],choices:o}}));return await Promise.all(_typeutils.getEntries.call(void 0, n).map(([i,s])=>e.setValue(s,"columnNames",i))),n}async function il(t,e,{state:r,columnNameMap:n}){let i=A=>r.getValue("columnNames",A)||n[A],{internalSubjects:s}=await l(t,nr);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for request action"));let o=await mt(He(e,i("requestType")),Object.values(_privacytypes.RequestAction),r.getValue("requestTypeToRequestAction"));await r.setValue(o,"requestTypeToRequestAction"),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for subject"));let p=await mt(He(e,i("subjectType")),s.map(({type:A})=>A),r.getValue("subjectTypeToSubjectName"));await r.setValue(p,"subjectTypeToSubjectName"),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for locale"));let c=await mt(He(e,i("locale")),Object.values(_internationalization.LOCALE_KEY),r.getValue("languageToLocale"));await r.setValue(c,"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 u=i("requestStatus"),m=u===Y?{}:await mt(He(e,u),[...Object.values(_privacytypes.CompletedRequestStatus),Y],r.getValue("statusToRequestStatus"));await r.setValue(m,"statusToRequestStatus"),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for country"));let d=i("country"),f=d===Y?{}:await mt(He(e,d),[...Object.values(_privacytypes.IsoCountryCode),Y],r.getValue("regionToCountry"));await r.setValue(f,"regionToCountry"),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for country sub division"));let g=i("countrySubDivision"),y=g===Y?{}:await mt(He(e,g),[...Object.values(_privacytypes.IsoCountrySubdivisionCode),Y],r.getValue("regionToCountrySubDivision"));await r.setValue(y,"regionToCountrySubDivision")}var _iotstypes = require('io-ts-types');var ud=ae.record(ae.string,ae.array(ae.intersection([ae.type({value:ae.string}),ae.partial({name:ae.string})]))),iq= exports.rf =ae.intersection([ae.type({email:ae.string,attestedExtraIdentifiers:ud,coreIdentifier:ae.string,requestType:_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction),subjectType:ae.string}),ae.partial({country:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode),countrySubDivision:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode),attributes:ae.array(ba),status:_typeutils.valuesOf.call(void 0, _privacytypes.CompletedRequestStatus),createdAt:_iotstypes.DateFromISOString,dataSiloIds:ae.array(ae.string),locale:_typeutils.valuesOf.call(void 0, _internationalization.LOCALE_KEY)})]);function md(t,e,r){if(e===_privacytypes.IdentifierType.Email)return t.toLowerCase();if(e===_privacytypes.IdentifierType.Phone){let n=t.replace(_privacytypes.NORMALIZE_PHONE_NUMBER,"").replace(/[()]/g,"").replace(/[–]/g,"").replace(/[:]/g,"").replace(/[]/g,"").replace(/[A-Za-z]/g,"");return n?n.startsWith("+")?n:`+${r}${n}`:""}return t}function nl(t,e,{columnNameMap:r,identifierNameMap:n,attributeNameMap:i,requestAttributeKeys:s,defaultPhoneCountryCode:o="1"}){let p=c=>e.getValue("columnNames",c)||r[c];return t.map(c=>{let u={};Object.entries(n).filter(([,g])=>g!==Y).forEach(([g,y])=>{let A=Object.values(_privacytypes.IdentifierType).includes(g)?g:_privacytypes.IdentifierType.Custom,R=c[y];if(R){let S=md(R,A,o);S&&(u[A]||(u[A]=[]),u[A].push({value:S,name:g}))}});let m=[];Object.entries(i).filter(([,g])=>g!==Y).forEach(([g,y])=>{let A=c[y];if(A){let R=_optionalChain([s, 'access', _94 => _94.find, 'call', _95 => _95(S=>S.name===g), 'optionalAccess', _96 => _96.type])==="MULTI_SELECT";m.push({values:R?ci(A):A,key:g})}});let d=p("requestType"),f=p("subjectType");return[c,{email:c[p("email")],attestedExtraIdentifiers:u,attributes:m,coreIdentifier:c[p("coreIdentifier")],requestType:d===Kt?e.getValue("requestTypeToRequestAction",li):e.getValue("requestTypeToRequestAction",c[d]),subjectType:f===Kt?e.getValue("subjectTypeToSubjectName",li):e.getValue("subjectTypeToSubjectName",c[f]),...p("locale")!==Y&&c[p("locale")]?{locale:e.getValue("languageToLocale",c[p("locale")])}:{},...p("country")!==Y&&c[p("country")]?{country:e.getValue("regionToCountry",c[p("country")])}:{},...p("countrySubDivision")!==Y&&c[p("countrySubDivision")]?{countrySubDivision:e.getValue("regionToCountrySubDivision",c[p("countrySubDivision")])}:{},...p("requestStatus")!==Y&&e.getValue("statusToRequestStatus",c[p("requestStatus")])!==Y&&c[p("requestStatus")]?{status:e.getValue("statusToRequestStatus",c[p("requestStatus")])}:{},...p("createdAt")!==Y&&c[p("createdAt")]?{createdAt:new Date(c[p("createdAt")])}:{},...p("dataSiloIds")!==Y&&c[p("dataSiloIds")]?{dataSiloIds:ci(c[p("dataSiloIds")])}:{}}]})}var _path = require('path');var al=x.type({defaultMessage:x.string,id:x.string}),hd= exports.vf =x.type({downloadKey:x.string,error:x.union([x.null,x.string]),mimetype:x.string,size:x.string,fileName:x.string,dataPoint:x.type({id:x.string,title:x.union([al,x.null]),description:x.union([al,x.null]),name:x.string,slug:x.string,encryption:x.union([_typeutils.valuesOf.call(void 0, _privacytypes.TableEncryptionType),x.null]),dataSilo:x.type({id:x.string,title:x.string,description:x.string,type:x.string,outerType:x.union([x.string,x.null])}),path:x.array(x.string)})}),Cd= exports.wf =x.type({nodes:x.array(hd),totalCount:x.number,_links:x.partial({next:x.union([x.string,x.null]),previous:x.union([x.string,x.null])})});async function pl(t,{sombra:e,concurrency:r=5,limit:n=100}){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Pulling file metadata for ${t.length} requests`));let i=new Date().getTime(),s=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),o=0;s.start(t.length,0);let p=await _bluebird.map.call(void 0, t,async m=>{let d=[],f=!0,g=0;for(;f;){let y;try{let A=await e.get(`v1/data-subject-request/${m.id}/download-keys`,{searchParams:{limit:n,offset:g}}).json();y=_typeutils.decodeCodec.call(void 0, Cd,A),d.push(...y.nodes),g+=n,f=!!y._links.next&&y.nodes.length===n}catch(A){throw new Error(`Received an error from server: ${_optionalChain([A, 'optionalAccess', _97 => _97.response, 'optionalAccess', _98 => _98.body])||_optionalChain([A, 'optionalAccess', _99 => _99.message])}`)}}return o+=1,s.update(o),[m,d]},{concurrency:r});s.stop();let u=new Date().getTime()-i;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully downloaded file metadata ${t.length} requests in "${u/1e3}" seconds!`)),p}async function ll(t,{requestId:e,sombra:r,onFileDownloaded:n,concurrency:i=20}){await _bluebird.map.call(void 0, t,async s=>{try{await r.get("v1/files",{searchParams:{downloadKey:s.downloadKey}}).buffer().then(o=>n(s,o))}catch(o){if(_optionalChain([o, 'optionalAccess', _100 => _100.response, 'optionalAccess', _101 => _101.body, 'optionalAccess', _102 => _102.includes, 'call', _103 => _103("fileMetadata#verify")])){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to pull file for: ${s.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([o, 'optionalAccess', _104 => _104.response, 'optionalAccess', _105 => _105.body])||_optionalChain([o, 'optionalAccess', _106 => _106.message])}`)}},{concurrency:i})}async function wq({auth:t,folderPath:e,requestIds:r,createdAtBefore:n,sombraAuth:i,createdAtAfter:s,statuses:o=[_privacytypes.RequestStatus.Approving,_privacytypes.RequestStatus.Downloadable],concurrency:p=5,transcendUrl:c=_chunkVY55L6P5cjs.r,approveAfterDownload:u=!1}){let m=Z(c,t),d=await nt(c,t,i);_fs.existsSync.call(void 0, e)||_fs.mkdirSync.call(void 0, e);let f=await le(m,{actions:[_privacytypes.RequestAction.Access],createdAtBefore:n,createdAtAfter:s,statuses:o,requestIds:r}),g=await pl(f,{sombra:d,concurrency:p}),y=new Date().getTime(),A=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),R=0,S=0;A.start(f.length,0),await _bluebird.map.call(void 0, g,async([_,H])=>{let K=_path.join.call(void 0, e,_.id);_fs.existsSync.call(void 0, K)||_fs.mkdirSync.call(void 0, K),await ll(H,{sombra:d,requestId:_.id,onFileDownloaded:(se,J)=>{let me=_path.join.call(void 0, K,se.fileName),ce=_path.dirname.call(void 0, me);_fs.existsSync.call(void 0, ce)||_fs.mkdirSync.call(void 0, ce,{recursive:!0}),_fs.writeFileSync.call(void 0, me,J)}}),u&&_.status===_privacytypes.RequestStatus.Approving&&(await l(m,or,{input:{requestId:_.id}}),S+=1),R+=1,A.update(R)},{concurrency:p}),A.stop();let C=new Date().getTime()-y;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully downloaded ${R} requests in "${C/1e3}" seconds!`)),S>0&&_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Approved ${S} requests in Transcend.`)),f.length}var cn=re.type({id:re.string,link:re.string,status:_typeutils.valuesOf.call(void 0, _privacytypes.RequestStatus),type:_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction),subjectType:re.string,email:re.union([re.null,re.string]),coreIdentifier:re.string,isSilent:re.boolean,isTest:re.boolean,country:re.union([re.null,_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode)]),countrySubDivision:re.union([re.null,_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode)]),attributeValues:re.array(re.type({attributeKey:re.type({name:re.string}),name:re.string}))});async function dl(t,e,{details:r="",isTest:n=!1,emailIsVerified:i=!0,skipSendingReceipt:s=!1,isSilent:o=!0,additionalAttributes:p=[]}={}){let c=[...p];(e.attributes||[]).forEach(d=>{let f=c.find(g=>g.key===d.key);f?(f.values.push(...d.values),f.values=_chunkVY55L6P5cjs.j.call(void 0, f.values)):c.push(d)});let u;try{u=await t.post("v1/data-subject-request",{json:{type:e.requestType,subject:{coreIdentifier:e.coreIdentifier,email:e.email,emailIsVerified:i,attestedExtraIdentifiers:e.attestedExtraIdentifiers},subjectType:e.subjectType,isSilent:o,isTest:n,skipSendingReceipt:s,...e.locale?{locale:e.locale}:{},details:r,attributes:c,...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(d){throw new Error(`Received an error from server: ${_optionalChain([d, 'optionalAccess', _107 => _107.response, 'optionalAccess', _108 => _108.body])||_optionalChain([d, 'optionalAccess', _109 => _109.message])}`)}let{request:m}=_typeutils.decodeCodec.call(void 0, re.type({request:cn}),u);return m}async function Qq({requestActions:t,requestOrigins:e,auth:r,silentModeBefore:n,createdAtAfter:i,createdAtBefore:s,concurrency:o=50,transcendUrl:p=_chunkVY55L6P5cjs.r}){let c=Z(p,r),u=new Date().getTime(),m=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),d=await le(c,{actions:t,statuses:[_privacytypes.RequestStatus.Approving],createdAtAfter:i,origins:e,createdAtBefore:s});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Approving "${d.length}" requests.`));let f=0,g=0;m.start(d.length,0),await _bluebird.map.call(void 0, d,async R=>{n&&new Date(n)>new Date(R.createdAt)&&await l(c,At,{input:{id:R.id,isSilent:!0}});try{await l(c,or,{input:{requestId:R.id}})}catch(S){S.message.includes("Request must be in an approving state,")&&(g+=1)}f+=1,m.update(f)},{concurrency:o}),m.stop();let A=new Date().getTime()-u;return g>0&&_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`${g} requests were skipped.`)),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully approved ${f} requests in "${A/1e3}" seconds!`)),d.length}async function Hq({requestActions:t=Object.values(_privacytypes.RequestAction),auth:e,requestIds:r,createdAtBefore:n,days:i=45,daysLeft:s=10,createdAtAfter:o,emailTemplate:p="Additional Time Needed",concurrency:c=100,transcendUrl:u=_chunkVY55L6P5cjs.r}){let m=Z(u,e),d=new Date().getTime(),f=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),y=(await gt(m,p)).find(C=>C.title===p);if(!y)throw new Error(`Failed to find a template with title: "${p}"`);let A=await le(m,{actions:t,createdAtBefore:n,createdAtAfter:o,isSilent:!1,isClosed:!1,requestIds:r});A=A.filter(C=>typeof C.daysRemaining=="number"&&C.daysRemaining<s),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Notifying "${A.length}" that more time is needed.`));let R=0;f.start(A.length,0),await _bluebird.map.call(void 0, A,async C=>{await l(m,yo,{input:{requestId:C.id,template:y.template.defaultMessage,subject:y.subject.defaultMessage,additionalTime:i}}),R+=1,f.update(R)},{concurrency:c}),f.stop();let L=new Date().getTime()-d;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully marked ${R} requests as silent mode in "${L/1e3}" seconds!`)),A.length}async function hl(t,e,r){let{initializer:n}=await l(t,qn),i=n.identifiers.filter(({name:o})=>!r.getValue("identifierNames",o)&&!pr.includes(o)),s=i.length===0?{}:await _inquirer2.default.prompt(i.map(({name:o})=>{let p=Tt(e,o,!1);return{name:o,message:`Choose the column that will be used to map in the identifier: ${o}`,type:"list",default:p[0],choices:p}}));return await Promise.all(Object.entries(s).map(([o,p])=>r.setValue(p,"identifierNames",o))),{...r.getValue("identifierNames"),...s}}async function gL({requestActions:t,cancellationTitle:e,auth:r,requestIds:n,silentModeBefore:i,createdAtBefore:s,createdAtAfter:o,statuses:p=[_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:c=50,transcendUrl:u=_chunkVY55L6P5cjs.r}){let m=Z(u,r),d=new Date().getTime(),f=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),g;if(e){let C=(await gt(m,e)).find(_=>_.title===e);if(!C)throw new Error(`Failed to find a template with title: "${e}"`);g=C}let y=await le(m,{actions:t,createdAtBefore:s,createdAtAfter:o,statuses:p,requestIds:n});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Canceling "${y.length}" requests${g?` Using template: ${g.title}`:""}.`));let A=0;f.start(y.length,0),await _bluebird.map.call(void 0, y,async L=>{i&&new Date(i)>new Date(L.createdAt)&&await l(m,At,{input:{id:L.id,isSilent:!0}}),await l(m,go,{input:{requestId:L.id,...g?{subject:`Re: ${g.subject.defaultMessage}`,template:g.template.defaultMessage}:{}}}),A+=1,f.update(A)},{concurrency:c}),f.stop();let S=new Date().getTime()-d;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully canceled ${A} requests in "${S/1e3}" seconds!`)),y.length}async function Il(t,e,r,n){let i=n.filter(({name:o})=>!r.getValue("attributeNames",o)),s=i.length===0?{}:await _inquirer2.default.prompt(i.map(({name:o})=>{let p=Tt(e,o,!1);return{name:o,message:`Choose the column that will be used to map in the attribute: ${o}`,type:"list",default:p[0],choices:p}}));return await Promise.all(Object.entries(s).map(([o,p])=>r.setValue(p,"attributeNames",o))),{...r.getValue("attributeNames"),...s}}var Sl=/{\\"message\\":\\"(.+?)\\",/;function Or(t){return Sl.test(t)?Sl.exec(t)[1]:null}var _persistedstate = require('@transcend-io/persisted-state');async function UL({cacheFilepath:t,requestReceiptFolder:e,file:r,auth:n,sombraAuth:i,concurrency:s=100,defaultPhoneCountryCode:o="1",transcendUrl:p=_chunkVY55L6P5cjs.r,attributes:c=[],emailIsVerified:u=!0,skipFilterStep:m=!1,skipSendingReceipt:d=!0,isTest:f=!1,isSilent:g=!0,debug:y=!1,dryRun:A=!1}){let R=new Date().getTime(),S=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),L=wa(c),C=new (0, _persistedstate.PersistedState)(t,Sa,{columnNames:{},requestTypeToRequestAction:{},subjectTypeToSubjectName:{},languageToLocale:{},statusToRequestStatus:{},identifierNames:{},attributeNames:{},regionToCountrySubDivision:{},regionToCountry:{}}),_=_path.join.call(void 0, e,`tr-request-upload-${new Date().toISOString()}-${r.split("/").pop()}`.replace(".csv",".json")),H=new (0, _persistedstate.PersistedState)(_,Ta,{successfulRequests:[],duplicateRequests:[],failingRequests:[]}),K=await nt(p,n,i),se=xa(r,Xt.record(Xt.string,Xt.string)),J=_chunkVY55L6P5cjs.j.call(void 0, se.map(Ae=>Object.keys(Ae)).flat());if(se.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(y){let Ae=se[0];_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`First request: ${JSON.stringify(Ae,null,2)}`))}let me=m?se:await qa(se),ce=Z(p,n),X=await ka(ce),Ie=await rl(J,C),Se=await hl(ce,J,C),pe=await Il(ce,J,C,X);await il(ce,me,{state:C,columnNameMap:Ie});let de=nl(me,C,{defaultPhoneCountryCode:o,columnNameMap:Ie,identifierNameMap:Se,attributeNameMap:pe,requestAttributeKeys:X});y||S.start(de.length,0);let we=0;await _bluebird.map.call(void 0, de,async([Ae,ne],ue)=>{let Ee=y?`email:${ne.email} | coreIdentifier:${ne.coreIdentifier}`:`row:${ue.toString()}`;if(y&&_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`[${ue+1}/${de.length}] Importing: ${JSON.stringify(ne,null,2)}`)),A){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Bailing out on dry run because dryRun is set"));return}try{let I=await dl(K,ne,{details:`Uploaded by Transcend Cli: "tr-request-upload" : ${JSON.stringify(Ae,null,2)}`,isTest:f,emailIsVerified:u,skipSendingReceipt:d,isSilent:g,additionalAttributes:L});y&&(_chunkZUNVPK23cjs.a.info(_colors2.default.green(`[${ue+1}/${de.length}] Successfully submitted the test data subject request: "${Ee}"`)),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`[${ue+1}/${de.length}] View it at: "${I.link}"`)));let O=H.getValue("successfulRequests");O.push({id:I.id,link:I.link,rowIndex:ue,coreIdentifier:I.coreIdentifier,attemptedAt:new Date().toISOString()}),await H.setValue(O,"successfulRequests")}catch(I){let O=`${I.message} - ${JSON.stringify(_optionalChain([I, 'access', _110 => _110.response, 'optionalAccess', _111 => _111.body]),null,2)}`,fe=Or(O);if(fe==="Client error: You have already made this request."){y&&_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`[${ue+1}/${de.length}] Skipping request as it is a duplicate`));let ge=H.getValue("duplicateRequests");ge.push({coreIdentifier:ne.coreIdentifier,rowIndex:ue,attemptedAt:new Date().toISOString()}),await H.setValue(ge,"duplicateRequests")}else{let ge=H.getValue("failingRequests");ge.push({...ne,rowIndex:ue,error:fe||O,attemptedAt:new Date().toISOString()}),await H.setValue(ge,"failingRequests"),y&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(fe||O)),_chunkZUNVPK23cjs.a.error(_colors2.default.red(`[${ue+1}/${de.length}] Failed to submit request for: "${Ee}"`)))}}we+=1,y||S.update(we)},{concurrency:s}),S.stop();let Ze=new Date().getTime()-R;_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Completed upload in "${Ze/1e3}" seconds.`)),H.getValue("duplicateRequests").length>0&&_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`Encountered "${H.getValue("duplicateRequests").length}" duplicate requests. See "${_}" to review the core identifiers for these requests.`)),H.getValue("failingRequests").length>0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Encountered "${H.getValue("failingRequests").length}" errors. See "${_}" to review the error messages and inputs.`)),process.exit(1))}async function Rl(t,e,{sendEmailReceipt:r=!1,skipWaitingPeriod:n=!1,emailIsVerified:i=!0,requestIdentifiers:s=[]}={}){let o=await t.post("v1/data-subject-request",{json:{type:e.type,subject:{coreIdentifier:e.coreIdentifier,email:e.email,emailIsVerified:i,...s.length>0?{attestedExtraIdentifiers:_typeutils.apply.call(void 0, _chunkVY55L6P5cjs.d.call(void 0, s.filter(c=>!(c.name==="email"&&c.value===e.email)&&!pr.includes(c.name)).map(c=>({...c,type:Object.values(_privacytypes.IdentifierType).includes(c.name)?c.name:_privacytypes.IdentifierType.Custom})),"type"),(c,u)=>c.map(({name:m,value:d})=>({...u===_privacytypes.IdentifierType.Custom?{name:m}:{},value:d})))}:{}},requestId:e.id,subjectType:e.subjectType,isSilent:e.isSilent,isTest:e.isTest,locale:e.locale,skipWaitingPeriod:n,createdAt:e.createdAt,details:`Restarted by Transcend cli: "tr-request-restart" - ${e.details}`,skipSendingReceipt:!r}}).json(),{request:p}=_typeutils.decodeCodec.call(void 0, El.type({request:cn}),o);return p}var Kd=Ye.intersection([lr,Ye.type({error:Ye.string})]),jd=Ye.type({restartedRequests:Ye.array(lr),failingRequests:Ye.array(Kd)});async function av({requestReceiptFolder:t,auth:e,sombraAuth:r,requestActions:n,requestStatuses:i,createdAtBefore:s,createdAtAfter:o,transcendUrl:p=_chunkVY55L6P5cjs.r,requestIds:c=[],createdAt:u=new Date,silentModeBefore:m,sendEmailReceipt:d=!1,emailIsVerified:f=!0,copyIdentifiers:g=!1,skipWaitingPeriod:y=!1,concurrency:A=20}){let R=new Date().getTime(),S=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),L=_path.join.call(void 0, t,`tr-request-restart-${new Date().toISOString()}.json`),C=new (0, _persistedstate.PersistedState)(L,jd,{restartedRequests:[],failingRequests:[]}),_=await nt(p,e,r),H=Z(p,e),se=(await le(H,{requestIds:c,actions:n,statuses:i,createdAtBefore:s,createdAtAfter:o})).filter(X=>new Date(X.createdAt)<u);if(_chunkZUNVPK23cjs.a.info(`Found ${se.length} requests to restart`),g&&_chunkZUNVPK23cjs.a.info("copyIdentifiers detected - All Identifiers will be copied."),d&&_chunkZUNVPK23cjs.a.info("sendEmailReceipt detected - Email receipts will be sent."),y&&_chunkZUNVPK23cjs.a.info("skipWaitingPeriod detected - Waiting period will be skipped."),c.length>0&&c.length!==se.length){let X=_chunkVY55L6P5cjs.c.call(void 0, c,se.map(({id:Ie})=>Ie));X.length>0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to find the following requests by ID: ${X.join(",")}.`)),process.exit(1))}let J=0;S.start(se.length,0),await _bluebird.map.call(void 0, se,async(X,Ie)=>{try{let Se=g?await Pr(H,_,{requestId:X.id}):[],pe=await Rl(_,{...X,isSilent:m&&new Date(X.createdAt)<m?!0:X.isSilent},{requestIdentifiers:Se,skipWaitingPeriod:y,sendEmailReceipt:d,emailIsVerified:f}),de=C.getValue("restartedRequests");de.push({id:pe.id,link:pe.link,rowIndex:Ie,coreIdentifier:pe.coreIdentifier,attemptedAt:new Date().toISOString()}),await C.setValue(de,"restartedRequests")}catch(Se){let pe=`${Se.message} - ${JSON.stringify(_optionalChain([Se, 'access', _112 => _112.response, 'optionalAccess', _113 => _113.body]),null,2)}`,de=Or(pe),we=C.getValue("failingRequests");we.push({id:X.id,link:X.link,rowIndex:Ie,coreIdentifier:X.coreIdentifier,attemptedAt:new Date().toISOString(),error:de||pe}),await C.setValue(we,"failingRequests")}J+=1,S.update(J)},{concurrency:A}),S.stop();let ce=new Date().getTime()-R;_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Completed restarting of requests in "${ce/1e3}" seconds.`)),C.getValue("failingRequests").length>0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Encountered "${C.getValue("failingRequests").length}" errors. See "${_path.resolve.call(void 0, L)}" to review the error messages and inputs.`)),process.exit(1))}async function yv({enricherIds:t,auth:e,concurrency:r=100,transcendUrl:n=_chunkVY55L6P5cjs.r}){let i=Z(n,e),s=new Date().getTime(),o=await le(i,{statuses:[_privacytypes.RequestStatus.Enriching]});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Processing enricher: "${t.join(",")}" fetched "${o.length}" in enriching status.`));let p=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),c=0;p.start(o.length,0);let u=0;await _bluebird.map.call(void 0, o,async f=>{let y=(await Tr(i,{requestId:f.id})).filter(A=>t.includes(A.enricher.id)&&![_privacytypes.RequestEnricherStatus.Resolved,_privacytypes.RequestEnricherStatus.Skipped].includes(A.status));y.length>0&&await _bluebird.mapSeries.call(void 0, y,async A=>{try{await l(i,To,{requestEnricherId:A.id}),u+=1}catch(R){if(!R.message.includes("Client error: Cannot skip Request enricher because it has already completed"))throw R}}),c+=1,p.update(c)},{concurrency:r}),p.stop();let d=new Date().getTime()-s;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully skipped "${u}" for "${o.length}" requests in "${d/1e3}" seconds!`)),o.length}async function wv({auth:t,requestActions:e=[],createdAtBefore:r,createdAtAfter:n,transcendUrl:i=_chunkVY55L6P5cjs.r,requestEnricherStatuses:s=Object.values(_privacytypes.RequestEnricherStatus),requestIds:o=[],enricherId:p,concurrency:c=20}){let u=new Date().getTime(),m=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),d=Z(i,t);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Fetching requests to restart..."));let f=await le(d,{actions:e,statuses:[_privacytypes.RequestStatus.Enriching],createdAtBefore:r,createdAtAfter:n,requestIds:o}),g=0;if(o.length>0&&o.length!==f.length){let S=_chunkVY55L6P5cjs.c.call(void 0, o,f.map(({id:L})=>L));S.length>0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to find the following requests by ID: ${S.join(",")}.`)),process.exit(1))}let y=0;m.start(f.length,0),await _bluebird.map.call(void 0, f,async S=>{let C=(await Tr(d,{requestId:S.id})).filter(_=>_.enricher.id===p&&s.includes(_.status));await _bluebird.map.call(void 0, C,async _=>{await fp(d,_.id),g+=1}),y+=1,m.update(y)},{concurrency:c}),m.stop();let R=new Date().getTime()-u;_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Completed restarting of ${f.length} requests and ${g} enrichers in "${R/1e3}" seconds.`))}async function Gv({requestActions:t,dataSiloId:e,auth:r,concurrency:n=20,transcendUrl:i=_chunkVY55L6P5cjs.r}){let s=Z(i,r),o=new Date().getTime(),p=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),c=await le(s,{actions:t,statuses:[_privacytypes.RequestStatus.Compiling,_privacytypes.RequestStatus.Approving]});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Retrying requests for Data Silo: "${e}", restarting "${c.length}" requests.`));let u=0,m=0;p.start(c.length,0),await _bluebird.map.call(void 0, c,async g=>{try{let y=await Xa(s,{requestId:g.id,dataSiloId:e});await l(s,Mo,{requestDataSiloId:y.id})}catch(y){if(!y.message.includes("Failed to find RequestDataSilo"))throw y;m+=1}u+=1,p.update(u)},{concurrency:n}),p.stop();let f=new Date().getTime()-o;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully notified Transcend in "${f/1e3}" seconds for ${u} requests, ${m} requests were skipped because data silo was not attached to the request!`)),c.length}async function Yv({auth:t,sombraAuth:e,actions:r=[],statuses:n=[],identifierSearch:i,pageLimit:s=100,transcendUrl:o=_chunkVY55L6P5cjs.r,createdAtBefore:p,skipRequestIdentifiers:c=!1,createdAtAfter:u,isTest:m}){let d=Z(o,t),f=await nt(o,t,e),g="";p&&(g+=` before ${p.toISOString()}`),u&&(g+=`${g?", and":""} after ${u.toISOString()}`),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`${r.length>0?`Pulling requests of type "${r.join('" , "')}"`:"Pulling all requests"}${g}`));let y=await le(d,{actions:r,text:i,statuses:n,createdAtBefore:p,createdAtAfter:u,isTest:m}),A=c?y.map(S=>({...S,requestIdentifiers:[]})):await _bluebird.map.call(void 0, y,async S=>{let L=await Pr(d,f,{requestId:S.id});return{...S,requestIdentifiers:L}},{concurrency:s});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Pulled ${A.length} requests`));let R=A.map(({attributeValues:S,requestIdentifiers:L,id:C,email:_,type:H,status:K,subjectType:se,details:J,createdAt:me,country:ce,locale:X,origin:Ie,countrySubDivision:Se,isSilent:pe,isTest:de,coreIdentifier:we,purpose:ke,...Ze})=>({"Request ID":C,"Created At":me,Email:_,"Core Identifier":we,"Request Type":H,"Data Subject Type":se,Status:K,Country:ce,"Country Sub Division":Se,Details:J,Origin:Ie,"Silent Mode":pe,"Is Test Request":de,Language:X,"Purpose Trigger Name":_optionalChain([ke, 'optionalAccess', _114 => _114.title])||_optionalChain([ke, 'optionalAccess', _115 => _115.name])||"","Purpose Trigger Value":_optionalChain([ke, 'optionalAccess', _116 => _116.consent, 'optionalAccess', _117 => _117.toString, 'call', _118 => _118()])||"",...(_optionalChain([ke, 'optionalAccess', _119 => _119.enrichedPreferences])||[]).reduce((Ae,ne)=>{let ue=_optionalChain([ne, 'access', _120 => _120.preferenceTopic, 'optionalAccess', _121 => _121.title, 'access', _122 => _122.defaultMessage])||ne.name;return ue?{...Ae,[ue]:ne.selectValues?ne.selectValues.map(Ee=>Ee.name).join(";"):_optionalChain([ne, 'access', _123 => _123.selectValue, 'optionalAccess', _124 => _124.name])||ne.booleanValue}:Ae},{}),...Ze,...Object.entries(_chunkVY55L6P5cjs.d.call(void 0, S,"attributeKey.name")).reduce((Ae,[ne,ue])=>Object.assign(Ae,{[ne]:ue.map(({name:Ee})=>Ee).join(",")}),{}),...Object.entries(_chunkVY55L6P5cjs.d.call(void 0, L,"name")).reduce((Ae,[ne,ue])=>Object.assign(Ae,{[ne]:ue.map(({value:Ee})=>Ee).join(",")}),{})}));return{requestsWithRequestIdentifiers:A,requestsFormattedForCsv:R}}async function rk({dataSiloId:t,auth:e,concurrency:r=50,maxUploadPerChunk:n=5e4,status:i="SKIPPED",transcendUrl:s=_chunkVY55L6P5cjs.r,requestStatuses:o=[_privacytypes.RequestStatus.Compiling,_privacytypes.RequestStatus.Secondary]}){let p=Z(s,e),c=new Date().getTime(),u=await Ja(p,{dataSiloId:t,requestStatuses:o});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Marking ${u} request data silos as completed`));let m=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),d=0;for(m.start(u,0);d<u;){let y=await ji(p,{dataSiloId:t,requestStatuses:o,limit:n,onProgress:A=>{d+=A/2,m.update(d)}});await _bluebird.map.call(void 0, y,async A=>{try{await l(p,No,{requestDataSiloId:A.id,status:i})}catch(R){if(!R.message.includes("Client error: Request must be active:"))throw R}d+=.5,m.update(d)},{concurrency:r})}m.stop();let g=new Date().getTime()-c;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully skipped "${u}" requests in "${g/1e3}" seconds!`)),u}async function mk({requestActions:t,identifierNames:e,auth:r,concurrency:n=20,transcendUrl:i=_chunkVY55L6P5cjs.r}){let s=Z(i,r),o=new Date().getTime(),p=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),c=await le(s,{actions:t,statuses:[_privacytypes.RequestStatus.Enriching]});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Fetched requests in preflight/enriching state."));let u=0,m=0;p.start(c.length,0),await _bluebird.map.call(void 0, c,async g=>{let A=(await Va(s,{requestId:g.id})).filter(({isVerifiedAtLeastOnce:R,name:S})=>R===!1&&e.includes(S)).map(({id:R})=>R);A.length>0&&(await l(s,Ko,{input:{requestId:g.id,requestIdentifierIds:A}}),m+=A.length),u+=1,p.update(u)},{concurrency:n}),p.stop();let f=new Date().getTime()-o;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully cleared out unverified identifiers "${f/1e3}" seconds for ${u} requests, ${m} identifiers were cleared out!`)),c.length}async function zk({message:t}){let{response:e}=await _inquirer2.default.prompt([{name:"response",message:t,type:"confirm"}]);return e}async function Wk({message:t}){let{response:e}=await _inquirer2.default.prompt([{name:"response",message:t,type:"text",validate:r=>r.trim().length>0}]);return e}async function Hk({defaultValue:t,values:e,message:r}){_inquirer2.default.registerPrompt("autocomplete",_inquirerautocompleteprompt2.default);let{response:n}=await _inquirer2.default.prompt([{name:"response",message:r,type:"autocomplete",default:t,source:(i,s)=>s?e.filter(o=>typeof o=="string"&&St(s,o)):e}]);return n}function Xk(t){let e=t.split(",").filter(n=>!!n),r={};return e.forEach(n=>{let[i,s]=n.split(":");if(!i||!s)throw new Error(`Invalid variable: ${n}. Expected format: key:value`);r[i]=s}),r}function Ul(t){let e=t;return _nullishCoalesce(_optionalChain([e, 'optionalAccess', _125 => _125.response, 'optionalAccess', _126 => _126.statusCode]), () => (_optionalChain([e, 'optionalAccess', _127 => _127.response, 'optionalAccess', _128 => _128.status])))}function Ql(t){let e=t,r=_optionalChain([e, 'optionalAccess', _129 => _129.response, 'optionalAccess', _130 => _130.body])||_optionalChain([e, 'optionalAccess', _131 => _131.message])||"Unknown error";try{let n=JSON.parse(r),i=n.errors||_optionalChain([n, 'access', _132 => _132.error, 'optionalAccess', _133 => _133.errors])||[_optionalChain([n, 'access', _134 => _134.error, 'optionalAccess', _135 => _135.message])||n.error];r=(Array.isArray(i)?i:[i]).filter(Boolean).join(", ")}catch (e2){}return r}function Nr(t){return new Promise(e=>{setTimeout(()=>e(t),t)})}function n_(t){let e=Math.floor(t.length/2);return[t.slice(0,e),t.slice(e)]}async function l_(t,e,r){let n=0;for(;;)try{return await t()}catch(i){n+=1;let s=Ul(i),o=Ql(i);if(!(n<=e.maxAttempts&&e.shouldRetry(s,o)))throw i;r(`Retrying after status=${s} attempt=${n}/${e.maxAttempts} \u2014 ${o}`),await Nr(e.delayMs)}}function u_(t,e){return Object.entries(t).reduce((r,[n,i],s)=>(r[n]=s<e?i:!0,r),{})}var Bl= (_class =class{constructor() { _class.prototype.__init.call(this); }__init() {this.buckets=[]}add(e){let r=Date.now();this.buckets.push({t:r,n:e});let n=r-12e4;for(;this.buckets.length&&this.buckets[0].t<n;)this.buckets.shift()}rate(e){let n=Date.now()-e,i=0;for(let s=this.buckets.length-1;s>=0;s-=1){let o=this.buckets[s];if(o.t<n)break;i+=o.n}return i/(e/1e3)}}, _class);function g_(t){try{return t?_fs.readFileSync.call(void 0, t,"utf8"):""}catch (e3){return""}}function S_(t,e){t||(_chunkZUNVPK23cjs.a.error(_colors2.default.red("A --directory must be provided.")),e.process.exit(1));let r=[];try{r=_fs.readdirSync.call(void 0, t).filter(i=>i.endsWith(".parquet")).map(i=>_path.join.call(void 0, t,i)).filter(i=>{try{return _fs.statSync.call(void 0, i).isFile()}catch (e4){return!1}})}catch(n){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to read directory: ${t}`)),_chunkZUNVPK23cjs.a.error(_colors2.default.red(n.message)),e.process.exit(1)}return r.length===0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`No Parquet files found in directory: ${t}`)),e.process.exit(1)),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Found: ${r.join(", ")} parquet files`)),r}var _nodeapi = require('@duckdb/node-api');async function $_(t){let{filePath:e,outputDir:r,clearOutputDir:n,onProgress:i}=t,s=r||_path.dirname.call(void 0, e),{name:o}=_path.parse.call(void 0, e),p=_path.join.call(void 0, s,`${o}.csv`);if(_fs.mkdirSync.call(void 0, s,{recursive:!0}),n&&_fs.existsSync.call(void 0, p))try{_fs.rmSync.call(void 0, p,{force:!0})}catch(m){_chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`Could not remove existing output file ${p}: ${m.message}`))}let c=await _nodeapi.DuckDBInstance.create(":memory:"),u=await c.connect();try{await yf(u,"PRAGMA temp_directory='';");let m=f=>`'${f.replace(/'/g,"''")}'`,d=`
|
|
2966
|
+
${J.message}`)),s=!0}y+=1,d.update(y)})},{concurrency:10}),d.stop();let R=new Date().getTime()-o;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${t.length}" data silos and "${g}" datapoints in "${R/1e3}" seconds!`)),{success:!s,dataSiloTitleToId:_typeutils.apply.call(void 0, c,({id:I})=>I)}}async function pp(t,e){let r=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" data silo dependencies...`));let n=_chunk6WIX75ZFcjs.b.call(void 0, e,Wi);return await _bluebird.mapSeries.call(void 0, n,async(i,s)=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`[Batch ${s}/${i.length}] Updating "${i.length}" data silos...`));try{await l(t,Qr,{input:{dataSilos:i.map(([o,p])=>({id:o,dependedOnDataSiloTitles:p}))}}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`[Batch ${s+1}/${i.length}] Synced "${i.length}" data silos!`))}catch(o){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`[Batch ${s+1}/${i.length}] Failed to update "${i.length}" silos! - ${o.message}`))}}),!r}var Hi=20;async function Ji(t,e){let r=[],n=0,i=!1;do{let{enrichers:{nodes:s}}=await l(t,qn,{first:Hi,offset:n,title:e});r.push(...s),n+=Hi,i=s.length===Hi}while(i);return r.sort((s,o)=>s.title.localeCompare(o.title))}async function cp(t,{enricher:e,identifierByName:r,dataSubjectsByName:n}){let s=(await Ji(t,e.title)).find(({title:u})=>u===e.title),o=_optionalChain([e, 'access', _18 => _18["data-subjects"], 'optionalAccess', _19 => _19.map, 'call', _20 => _20(u=>{let m=n[u];if(!m)throw new Error(`Failed to find a data subject with name: ${u}`);return m.id})]),p=e["input-identifier"],c=e["privacy-actions"]||Object.values(_privacytypes.RequestAction);s?await l(t,kn,{input:{id:s.id,title:e.title,url:e.url,headers:e.headers,testRegex:e.testRegex,lookerQueryTitle:e.lookerQueryTitle,expirationDuration:typeof e.expirationDuration=="number"?e.expirationDuration.toString():void 0,transitionRequestStatus:e.transitionRequestStatus,phoneNumbers:e.phoneNumbers,regionList:e.regionList,dataSubjectIds:o,description:e.description||"",inputIdentifier:p?r[p].id:void 0,identifiers:e["output-identifiers"].map(u=>r[u].id),...s.type===_privacytypes.EnricherType.Sombra?{}:{actions:c}}}):p&&await l(t,vn,{input:{title:e.title,url:e.url,type:e.type||_privacytypes.EnricherType.Server,headers:e.headers,testRegex:e.testRegex,lookerQueryTitle:e.lookerQueryTitle,expirationDuration:typeof e.expirationDuration=="number"?e.expirationDuration.toString():void 0,transitionRequestStatus:e.transitionRequestStatus,phoneNumbers:e.phoneNumbers,dataSubjectIds:o,regionList:e.regionList,description:e.description||"",inputIdentifier:r[p].id,identifiers:e["output-identifiers"].map(u=>r[u].id),actions:c}})}var Xi=20;async function gt(t,e){let r=[],n=0,i=!1;do{let{templates:{nodes:s}}=await l(t,eo,{first:Xi,offset:n,title:e});r.push(...s),n+=Xi,i=s.length===Xi}while(i);return r.sort((s,o)=>s.title.localeCompare(o.title))}async function up(t,e){(await gt(e,t.title)).find(({title:i})=>i===t.title)||await l(e,to,{title:t.title})}function en(t){return t.map(({country:e,countrySubDivision:r})=>({country:e,...r?{countrySubDivision:r}:{}}))}async function xt(t,e={}){let{globalActionItemCollections:{nodes:r}}=await l(t,es,{filterBy:{...e}});return r}var tn=50;async function zt(t){let e=[],r=0,n=!1;do{let{consentPartitions:{nodes:i}}=await l(t,ms,{first:tn,offset:r});e.push(...i),r+=tn,n=i.length===tn}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}async function dp(t,e){let r=await De(t),n=!1,i=await zt(t),s=_chunk6WIX75ZFcjs.c.call(void 0, e.map(({name:o})=>o),i.map(({name:o})=>o));return await _bluebird.mapSeries.call(void 0, s,async o=>{try{await l(t,_s,{input:{id:r,name:o}}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created consent partition: ${o}!`))}catch(p){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to create consent partition: ${o}! - ${p.message}`)),n=!0}}),!n}var Du=["dataSilos","enrichers","templates","apiKeys"];async function AP(t,{dataSiloIds:e,integrationNames:r,debug:n,resources:i=Du,pageSize:s,skipDatapoints:o,includeGuessedCategories:p,skipSubDatapoints:c,trackerStatuses:u=Object.values(_privacytypes.ConsentTrackerStatus)}){if(e.length>0&&r.length>0)throw new Error("Only 1 of integrationNames OR dataSiloIds can be provided");_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Fetching data with page size ${s}...`));let[m,d,f,g,y,A,R,I,L,C,_,H,K,se,J,me,ce,X,Se,Ie,pe,de,we,ke,Ze,Ae,ne,ue,Ee,S,O,fe,ge]=await Promise.all([i.includes("dataSilos")||i.includes("dataSubjects")?Yt(t):[],i.includes("apiKeys")?$r({},t,!0):[],i.includes("dataSilos")?sp(t,{ids:e,integrationNames:r,pageSize:s,debug:n,includeGuessedCategories:p,skipDatapoints:o,skipSubDatapoints:c}):[],i.includes("enrichers")?Ji(t):[],i.includes("dataFlows")?[...u.includes(_privacytypes.ConsentTrackerStatus.Live)?await Rt(t,_privacytypes.ConsentTrackerStatus.Live):[],...u.includes(_privacytypes.ConsentTrackerStatus.NeedsReview)?await Rt(t,_privacytypes.ConsentTrackerStatus.NeedsReview):[]]:[],i.includes("cookies")?[...u.includes(_privacytypes.ConsentTrackerStatus.Live)?await Pi(t,_privacytypes.ConsentTrackerStatus.Live):[],...u.includes(_privacytypes.ConsentTrackerStatus.NeedsReview)?await Pi(t,_privacytypes.ConsentTrackerStatus.NeedsReview):[]]:[],i.includes("customFields")?Et(t):[],i.includes("templates")?gt(t):[],i.includes("identifiers")?Ui(t):[],i.includes("actions")?ur(t):[],i.includes("businessEntities")?gr(t):[],i.includes("processingActivities")?Ar(t):[],i.includes("consentManager")?Na(t):void 0,i.includes("consentManager")?yr(t):[],i.includes("prompts")?$t(t):[],i.includes("promptPartials")?Dr(t):[],i.includes("promptGroups")?xr(t):[],i.includes("agents")?fr(t):[],i.includes("agentFunctions")?dr(t):[],i.includes("agentFiles")?mr(t):[],i.includes("vendors")?wr(t):[],i.includes("dataCategories")?hr(t):[],i.includes("processingPurposes")?Sr(t):[],i.includes("actionItems")?cr(t,{type:[_privacytypes.ActionItemCode.Onboarding]}):[],i.includes("actionItemCollections")?xt(t):[],i.includes("teams")?br(t):[],i.includes("policies")?Cr(t):[],i.includes("privacyCenters")?Qa(t):[],i.includes("messages")?Ua(t):[],i.includes("partitions")?zt(t):[],i.includes("assessments")?va(t):[],i.includes("assessmentTemplates")?ka(t):[],i.includes("purposes")?Va(t):[]]),Ft=i.includes("consentManager")&&K?await Ma(t,K.id):void 0,U={},zl=_chunk6WIX75ZFcjs.a.call(void 0, f.map(([{apiKeys:h}])=>h.map(({title:T})=>T))),Cn=Object.values(d).filter(({title:h})=>i.includes("apiKeys")?!0:zl.includes(h));if(Cn.length>0&&i.includes("apiKeys")&&(U["api-keys"]=Cn.map(({title:h})=>({title:h}))),S.length>0&&i.includes("partitions")&&(U.partitions=S.map(({name:h,partition:T})=>({name:h,partition:T}))),K&&i.includes("consentManager")&&(U["consent-manager"]={bundleUrls:{TEST:K.testBundleURL,PRODUCTION:K.bundleURL},domains:K.configuration.domains||void 0,partition:K.configuration.partition||void 0,consentPrecedence:K.configuration.consentPrecedence||void 0,unknownRequestPolicy:K.configuration.unknownRequestPolicy||void 0,unknownCookiePolicy:K.configuration.unknownCookiePolicy||void 0,syncEndpoint:K.configuration.syncEndpoint||void 0,telemetryPartitioning:K.configuration.telemetryPartitioning||void 0,signedIabAgreement:K.configuration.signedIabAgreement||void 0,syncGroups:K.configuration.syncGroups||void 0,theme:Ft?{primaryColor:Ft.primaryColor||void 0,fontColor:Ft.fontColor||void 0,privacyPolicy:Ft.privacyPolicy||void 0,prompt:Ft.prompt}:void 0,experiences:se.map(h=>({name:h.name,displayName:h.displayName||void 0,regions:h.regions.map(T=>({countrySubDivision:T.countrySubDivision||void 0,country:T.country||void 0})),onConsentExpiry:h.onConsentExpiry,consentExpiry:h.consentExpiry,operator:h.operator,displayPriority:h.displayPriority,viewState:h.viewState,purposes:h.purposes.map(T=>({trackingType:T.trackingType})),optedOutPurposes:h.optedOutPurposes.map(T=>({trackingType:T.trackingType})),browserLanguages:h.browserLanguages,browserTimeZones:h.browserTimeZones}))}),O.length>0&&i.includes("assessments")&&(U.assessments=O.map(({title:h,assessmentGroup:T,sections:b,creator:w,description:$,status:q,assignees:k,externalAssignees:G,reviewers:Q,isLocked:B,isArchived:ee,isExternallyCreated:j,dueDate:M,createdAt:ye,assignedAt:_e,submittedAt:Ne,approvedAt:Me,rejectedAt:Fe,titleIsInternal:oe,retentionSchedule:Re,attributeValues:ze,resources:Ut,syncedRows:at})=>({title:h,group:T.title,sections:b.map(({title:Te,status:Ue,questions:$e,assignees:v,isReviewed:N,externalAssignees:he})=>({title:Te,status:Ue,questions:$e.map(({title:pt,type:Fr,subType:xe,placeholder:qe,description:lt,isRequired:Wl,referenceId:Hl,displayLogic:An,riskLogic:Jl,riskCategories:Xl,riskFramework:ec,answerOptions:tc,selectedAnswers:rc,allowedMimeTypes:ic,allowSelectOther:nc,syncModel:oc,syncColumn:sc,attributeKey:ac,requireRiskEvaluation:pc,requireRiskMatrixEvaluation:lc})=>{let Oe=An?Zi(An):void 0;return{title:pt,type:Fr,"sub-type":xe,placeholder:qe,description:lt,"is-required":Wl,"reference-id":Hl,"display-logic":Oe&&Object.keys(Oe).length>0?{action:Oe.action,rule:Oe.rule?{"depends-on-question-reference-id":Oe.rule.dependsOnQuestionReferenceId,"comparison-operator":Oe.rule.comparisonOperator,"comparison-operands":"comparisonOperands"in Oe.rule?Oe.rule.comparisonOperands:void 0}:void 0,"nested-rule":Oe.nestedRule?{"logic-operator":Oe.nestedRule.logicOperator,rules:(Oe.nestedRule.rules||[]).map(Le=>({"depends-on-question-reference-id":Le.dependsOnQuestionReferenceId,"comparison-operator":Le.comparisonOperator,"comparison-operands":"comparisonOperands"in Le?Le.comparisonOperands:void 0}))}:void 0}:void 0,"risk-logic":Jl.map(Le=>{let Ur=zi(Le);return{"risk-level":_optionalChain([Ur, 'access', _21 => _21.riskAssignment, 'optionalAccess', _22 => _22.riskLevelId]),"comparison-operands":Ur.comparisonOperands,"comparison-operator":Ur.comparisonOperator}}),"risk-categories":Xl.map(({title:Le})=>Le),"risk-framework":_optionalChain([ec, 'optionalAccess', _23 => _23.title]),"answer-options":tc.map(({value:Le})=>({value:Le})),"selected-answers":rc.map(({value:Le})=>Le),"allowed-mime-types":ic,"allow-select-other":nc,"sync-model":oc||void 0,"sync-column":sc||void 0,"attribute-key":_optionalChain([ac, 'optionalAccess', _24 => _24.name]),"require-risk-evaluation":pc,"require-risk-matrix-evaluation":lc}}),assignees:v.map(({email:pt})=>pt),"external-assignees":he.map(({email:pt})=>pt),"is-reviewed":N})),creator:_optionalChain([w, 'optionalAccess', _25 => _25.email]),description:$,status:q,assignees:k.map(({email:Te})=>Te),"external-assignees":G.map(({email:Te})=>Te),reviewers:Q.map(({email:Te})=>Te),locked:B,archived:ee,external:j,"title-is-internal":oe,"due-date":M||void 0,"created-at":ye||void 0,"assigned-at":_e||void 0,"submitted-at":Ne||void 0,"approved-at":Me||void 0,"rejected-at":Fe||void 0,"retention-schedule":Re?{type:Re.type,"duration-days":Re.durationDays,operand:Re.operation}:void 0,attributes:ze!==void 0&&ze.length>0?ve(ze):void 0,resources:Ut.map(({resourceType:Te,title:Ue,name:$e,category:v,type:N,purpose:he})=>({type:Te,title:v?`${v} - ${$e}`:he?`${he} - ${$e}`:Ue||$e||N||""})),rows:at.map(({resourceType:Te,title:Ue,name:$e,category:v,type:N,purpose:he})=>({type:Te,title:v?`${v} - ${$e}`:he?`${he} - ${$e}`:Ue||$e||N||""}))}))),fe.length>0&&i.includes("assessmentTemplates")&&(U["assessment-templates"]=fe.map(({title:h,description:T,sections:b,status:w,source:$,creator:q,isLocked:k,isArchived:G,createdAt:Q,retentionSchedule:B})=>({title:h,description:T,sections:b.map(({title:ee,questions:j})=>({title:ee,questions:j.map(({title:M,type:ye,subType:_e,placeholder:Ne,description:Me,isRequired:Fe,referenceId:oe,displayLogic:Re,riskLogic:ze,riskCategories:Ut,riskFramework:at,answerOptions:Te,allowedMimeTypes:Ue,allowSelectOther:$e,syncModel:v,syncColumn:N,attributeKey:he,requireRiskEvaluation:pt,requireRiskMatrixEvaluation:Fr})=>{let xe=Re?Zi(Re):void 0;return{title:M,type:ye,"sub-type":_e,placeholder:Ne,description:Me,"is-required":Fe,"reference-id":oe,"display-logic":xe&&Object.keys(xe).length>0?{action:xe.action,rule:xe.rule?{"depends-on-question-reference-id":xe.rule.dependsOnQuestionReferenceId,"comparison-operator":xe.rule.comparisonOperator,"comparison-operands":"comparisonOperands"in xe.rule?xe.rule.comparisonOperands:void 0}:void 0,"nested-rule":xe.nestedRule?{"logic-operator":xe.nestedRule.logicOperator,rules:(xe.nestedRule.rules||[]).map(qe=>({"depends-on-question-reference-id":qe.dependsOnQuestionReferenceId,"comparison-operator":qe.comparisonOperator,"comparison-operands":"comparisonOperands"in qe?qe.comparisonOperands:void 0}))}:void 0}:void 0,"risk-logic":ze.map(qe=>{let lt=zi(qe);return{"risk-level":_optionalChain([lt, 'access', _26 => _26.riskAssignment, 'optionalAccess', _27 => _27.riskLevelId]),"risk-matrix-row":_optionalChain([lt, 'access', _28 => _28.riskAssignment, 'optionalAccess', _29 => _29.riskMatrixRowId]),"risk-matrix-column":_optionalChain([lt, 'access', _30 => _30.riskAssignment, 'optionalAccess', _31 => _31.riskMatrixColumnId]),"comparison-operands":lt.comparisonOperands,"comparison-operator":lt.comparisonOperator}}),"risk-categories":Ut.map(({title:qe})=>qe),"risk-framework":_optionalChain([at, 'optionalAccess', _32 => _32.title]),"answer-options":Te.map(({value:qe})=>({value:qe})),"allowed-mime-types":Ue,"allow-select-other":$e,"sync-model":v||void 0,"sync-column":N||void 0,"attribute-key":_optionalChain([he, 'optionalAccess', _33 => _33.name]),"require-risk-evaluation":pt,"require-risk-matrix-evaluation":Fr}})})),status:w,source:$,creator:_optionalChain([q, 'optionalAccess', _34 => _34.email]),locked:k,archived:G,"created-at":Q||void 0,"retention-schedule":B?{type:B.type,"duration-days":B.durationDays,operand:B.operation}:void 0}))),J.length>0&&i.includes("prompts")&&(U.prompts=J.map(({title:h,content:T})=>({title:h,content:T}))),me.length>0&&i.includes("promptPartials")&&(U["prompt-partials"]=me.map(({title:h,content:T})=>({title:h,content:T}))),ce.length>0&&i.includes("promptGroups")&&(U["prompt-groups"]=ce.map(({title:h,description:T,prompts:b})=>({title:h,description:T,prompts:b.map(({title:w})=>w)}))),Ae.length>0&&i.includes("teams")&&(U.teams=Ae.map(({name:h,description:T,ssoDepartment:b,ssoGroup:w,ssoTitle:$,users:q,scopes:k})=>({name:h,description:T,"sso-department":b||void 0,"sso-group":w||void 0,"sso-title":$||void 0,users:q.map(({email:G})=>G),scopes:k.map(({name:G})=>G)}))),m.length>0&&i.includes("dataSubjects")&&(U["data-subjects"]=m.map(({type:h,title:T,active:b,adminDashboardDefaultSilentMode:w,actions:$})=>({type:h,title:_optionalChain([T, 'optionalAccess', _35 => _35.defaultMessage]),active:b,adminDashboardDefaultSilentMode:w,actions:$.map(({type:q})=>q)}))),ne.length>0&&(U.policies=ne.map(({title:h,versions:T,disabledLocales:b})=>({title:_optionalChain([h, 'optionalAccess', _36 => _36.defaultMessage]),content:_optionalChain([T, 'optionalAccess', _37 => _37[0], 'optionalAccess', _38 => _38.content, 'optionalAccess', _39 => _39.defaultMessage]),disabledLocales:b}))),Ee.length>0&&(U.messages=Ee.map(({id:h,defaultMessage:T,targetReactIntlId:b,translations:w})=>({id:h,defaultMessage:T,targetReactIntlId:b||void 0,translations:w.reduce(($,{locale:q,value:k})=>Object.assign($,{[q]:k}),{})}))),ue.length>0){let h=ue[0];U["privacy-center"]={isDisabled:h.isDisabled,showPrivacyRequestButton:h.showPrivacyRequestButton,showPolicies:h.showPolicies,showTrackingTechnologies:h.showTrackingTechnologies,showCookies:h.showCookies,showDataFlows:h.showDataFlows,showConsentManager:h.showConsentManager,showManageYourPrivacy:h.showManageYourPrivacy,showMarketingPreferences:h.showMarketingPreferences,locales:h.locales,defaultLocale:h.defaultLocale,preferBrowserDefaultLocale:h.preferBrowserDefaultLocale,supportEmail:h.supportEmail||void 0,replyToEmail:h.replyToEmail||void 0,useNoReplyEmailAddress:h.useNoReplyEmailAddress,useCustomEmailDomain:h.useCustomEmailDomain,transformAccessReportJsonToCsv:h.transformAccessReportJsonToCsv,theme:h.theme}}if(_.length>0&&i.includes("businessEntities")&&(U["business-entities"]=_.map(({title:h,description:T,address:b,headquarterCountry:w,headquarterSubDivision:$,dataProtectionOfficerName:q,dataProtectionOfficerEmail:k,attributeValues:G})=>({title:h,description:T||void 0,address:b||void 0,headquarterCountry:w||void 0,headquarterSubDivision:$||void 0,dataProtectionOfficerName:q||void 0,dataProtectionOfficerEmail:k||void 0,attributes:G!==void 0&&G.length>0?ve(G):void 0}))),H.length>0&&i.includes("processingActivities")&&(U["processing-activities"]=H.map(({title:h,description:T,securityMeasureDetails:b,controllerships:w,storageRegions:$,transferRegions:q,retentionType:k,retentionPeriod:G,dataProtectionImpactAssessmentLink:Q,dataProtectionImpactAssessmentStatus:B,attributeValues:ee,dataSilos:j,dataSubjects:M,teams:ye,owners:_e,processingPurposeSubCategories:Ne,dataSubCategories:Me,saaSCategories:Fe})=>({title:h,description:T,securityMeasureDetails:_nullishCoalesce(b, () => (void 0)),controllerships:w.length>0?w:void 0,storageRegions:$.length>0?en($):void 0,transferRegions:q.length>0?en(q):void 0,retentionType:k,retentionPeriod:k===_privacytypes.RetentionType.StatedPeriod?G:void 0,dataProtectionImpactAssessmentLink:_nullishCoalesce(Q, () => (void 0)),dataProtectionImpactAssessmentStatus:B,attributes:ee!==void 0&&ee.length>0?ve(ee):void 0,dataSiloTitles:j.length>0?j.map(({title:oe})=>oe):void 0,dataSubjectTypes:M.length>0?M.map(({type:oe})=>oe):void 0,teamNames:ye.length>0?ye.map(({name:oe})=>oe):void 0,ownerEmails:_e.length>0?_e.map(({email:oe})=>oe):void 0,processingSubPurposes:Ne.length>0?Ne.map(({name:oe,purpose:Re})=>({purpose:Re,...oe?{name:oe}:{}})):void 0,dataSubCategories:Me.length>0?Me.map(({name:oe,category:Re})=>({category:Re,...oe?{name:oe}:{}})):void 0,saaSCategories:Fe.length>0?Fe.map(({title:oe})=>oe):void 0}))),C.length>0&&i.includes("actions")&&(U.actions=C.map(({type:h,skipSecondaryIfNoFiles:T,skipDownloadableStep:b,requiresReview:w,regionList:$,regionDetectionMethod:q,waitingPeriod:k})=>({type:h,...h===_privacytypes.RequestAction.Erasure?{skipSecondaryIfNoFiles:T,skipDownloadableStep:b}:{},requiresReview:w,waitingPeriod:k,regionDetectionMethod:q,regionList:$.length>0?$:void 0}))),L.length>0&&i.includes("identifiers")&&(U.identifiers=L.map(({name:h,type:T,regex:b,selectOptions:w,privacyCenterVisibility:$,isRequiredInForm:q,placeholder:k,displayTitle:G,dataSubjects:Q,displayDescription:B,displayOrder:ee,isUniqueOnPreferenceStore:j})=>({name:h,type:T,regex:b,selectOptions:w.length>0?w:void 0,privacyCenterVisibility:$.length>0?$:void 0,isRequiredInForm:q,placeholder:k||void 0,dataSubjects:Q.length>0?Q.map(({type:M})=>M):void 0,displayTitle:_optionalChain([G, 'optionalAccess', _40 => _40.defaultMessage]),displayDescription:_optionalChain([B, 'optionalAccess', _41 => _41.defaultMessage]),displayOrder:ee,isUniqueOnPreferenceStore:j}))),X.length>0&&i.includes("agents")&&(U.agents=X.map(({name:h,agentId:T,description:b,instructions:w,codeInterpreterEnabled:$,retrievalEnabled:q,prompt:k,largeLanguageModel:G,teams:Q,owners:B,agentFunctions:ee,agentFiles:j})=>({name:h,agentId:T,description:b||void 0,instructions:w,codeInterpreterEnabled:$,retrievalEnabled:q,prompt:_optionalChain([k, 'optionalAccess', _42 => _42.title]),"large-language-model":{name:G.name,client:G.client},teams:Q&&Q.length>0?Q.map(({name:M})=>M):void 0,owners:B&&B.length>0?B.map(({email:M})=>M):void 0,"agent-functions":ee&&ee.length>0?ee.map(({name:M})=>M):void 0,"agent-files":j&&j.length>0?j.map(({name:M})=>M):void 0}))),ke.length>0&&i.includes("actionItems")&&(U["action-items"]=ke.map(({teams:h,users:T,customerExperienceActionItemIds:[b],dueDate:w,priority:$,resolved:q,collections:k,notes:G,link:Q,title:B,type:ee,attributeValues:j})=>({teams:h.map(({name:M})=>M),users:T.map(({email:M})=>M),dueDate:w||void 0,title:B,notes:G,customerExperienceActionItemId:b,collections:k.map(({title:M})=>M),link:Q,priority:$||void 0,resolved:q,type:ee,attributes:j!==void 0&&j.length>0?ve(j):void 0}))),Ze.length>0&&i.includes("actionItemCollections")&&(U["action-item-collections"]=Ze.map(({title:h,description:T,hidden:b,productLine:w})=>({title:h,description:T||void 0,hidden:b,productLine:w}))),Se.length>0&&i.includes("agentFunctions")&&(U["agent-functions"]=Se.map(({name:h,description:T,parameters:b})=>({name:h,description:T,parameters:JSON.stringify(b)}))),Ie.length>0&&i.includes("agentFiles")&&(U["agent-files"]=Ie.map(({name:h,description:T,fileId:b,size:w,purpose:$})=>({name:h,description:T,fileId:b,size:w,purpose:$}))),pe.length>0&&i.includes("vendors")&&(U.vendors=pe.map(({title:h,description:T,dataProcessingAgreementLink:b,contactName:w,contactPhone:$,address:q,headquarterCountry:k,headquarterSubDivision:G,websiteUrl:Q,businessEntity:B,teams:ee,owners:j,attributeValues:M})=>({title:h,description:T||void 0,dataProcessingAgreementLink:b||void 0,contactName:w||void 0,contactPhone:$||void 0,address:q||void 0,headquarterCountry:k||void 0,headquarterSubDivision:G||void 0,websiteUrl:Q||void 0,businessEntity:_optionalChain([B, 'optionalAccess', _43 => _43.title]),teams:ee&&ee.length>0?ee.map(({name:ye})=>ye):void 0,owners:j&&j.length>0?j.map(({email:ye})=>ye):void 0,attributes:M!==void 0&&M.length>0?ve(M):void 0}))),de.length>0&&i.includes("dataCategories")&&(U["data-categories"]=de.map(({name:h,category:T,description:b,regex:w,owners:$,teams:q,attributeValues:k})=>({name:h,category:T,description:b||void 0,regex:w||void 0,owners:$&&$.length>0?$.map(({email:G})=>G):void 0,teams:q&&q.length>0?q.map(({name:G})=>G):void 0,attributes:k!==void 0&&k.length>0?ve(k):void 0}))),we.length>0&&i.includes("processingPurposes")&&(U["processing-purposes"]=we.map(({name:h,purpose:T,description:b,owners:w,teams:$,attributeValues:q})=>({name:h,purpose:T,description:b||void 0,owners:w&&w.length>0?w.map(({email:k})=>k):void 0,teams:$&&$.length>0?$.map(({name:k})=>k):void 0,attributes:q!==void 0&&q.length>0?ve(q):void 0}))),y.length>0&&i.includes("dataFlows")&&(U["data-flows"]=y.map(({value:h,type:T,description:b,trackingType:w,service:$,status:q,owners:k,teams:G,attributeValues:Q})=>({value:h,type:T,description:b||void 0,trackingPurposes:w,status:q,service:_optionalChain([$, 'optionalAccess', _44 => _44.integrationName]),owners:k.map(({email:B})=>B),teams:G.map(({name:B})=>B),attributes:Q!==void 0&&Q.length>0?ve(Q):void 0}))),A.length>0&&i.includes("cookies")&&(U.cookies=A.map(({name:h,isRegex:T,description:b,trackingPurposes:w,service:$,status:q,owners:k,teams:G,attributeValues:Q})=>({name:h,isRegex:T,description:b||void 0,trackingPurposes:w,status:q,service:_optionalChain([$, 'optionalAccess', _45 => _45.integrationName]),owners:k.map(({email:B})=>B),teams:G.map(({name:B})=>B),attributes:Q!==void 0&&Q.length>0?ve(Q):void 0}))),R.length>0&&i.includes("customFields")&&(U.attributes=R.map(({description:h,name:T,type:b,values:w,enabledOn:$=[]})=>({description:h||void 0,resources:$,name:T,type:b,values:w.map(({name:q,color:k,description:G})=>({name:q,color:k||void 0,description:G}))}))),ge.length>0&&(U.purposes=ge.map(({name:h,description:T,trackingType:b,defaultConsent:w,configurable:$,showInConsentManager:q,isActive:k,displayOrder:G,optOutSignals:Q,authLevel:B,topics:ee,showInPrivacyCenter:j,title:M})=>({name:h,title:M,description:T||void 0,trackingType:b,"default-consent":w,configurable:$,"show-in-consent-manager":q,"show-in-privacy-center":j,"is-active":k,"display-order":G,"opt-out-signals":Q.length>0?Q:void 0,"auth-level":B||void 0,"preference-topics":ee.map(({title:ye,type:_e,displayDescription:Ne,defaultConfiguration:Me,showInPrivacyCenter:Fe,preferenceOptionValues:oe})=>({title:ye.defaultMessage,type:_e,description:Ne.defaultMessage,"default-configuration":Me,"show-in-privacy-center":Fe,...oe.length>0?{options:oe.map(({title:Re,slug:ze})=>({title:Re.defaultMessage,slug:ze}))}:{}}))}))),e.length===0&&I.length>0&&i.includes("templates")&&(U.templates=I.map(({title:h})=>({title:h}))),g.length>0&&i.includes("enrichers")&&(U.enrichers=g.map(({title:h,url:T,type:b,inputIdentifier:w,identifiers:$,actions:q,testRegex:k,dataSubjects:G,expirationDuration:Q,lookerQueryTitle:B,transitionRequestStatus:ee,phoneNumbers:j,regionList:M})=>({title:h,url:T||void 0,type:b,"input-identifier":_optionalChain([w, 'optionalAccess', _46 => _46.name]),"output-identifiers":$.map(({name:ye})=>ye),"privacy-actions":Object.values(_privacytypes.RequestAction).length===q.length?void 0:q,testRegex:k||void 0,lookerQueryTitle:B||void 0,expirationDuration:parseInt(Q,10),transitionRequestStatus:ee||void 0,phoneNumbers:j&&j.length>0?j:void 0,regionList:M&&M.length>0?M:void 0,"data-subjects":G.map(({type:ye})=>ye)}))),f.length>0&&i.includes("dataSilos")){let h=_chunk6WIX75ZFcjs.e.call(void 0, m,"type");U["data-silos"]=f.map(([{title:T,description:b,url:w,type:$,outerType:q,apiKeys:k,notifyEmailAddress:G,identifiers:Q,dependentDataSilos:B,owners:ee,country:j,countrySubDivision:M,teams:ye,subjectBlocklist:_e,isLive:Ne,promptAVendorEmailSendFrequency:Me,promptAVendorEmailSendType:Fe,promptAVendorEmailIncludeIdentifiersAttachment:oe,promptAVendorEmailCompletionLinkType:Re,manualWorkRetryFrequency:ze,catalog:Ut,attributeValues:at,discoveredBy:Te,businessEntities:Ue},$e])=>({title:T,description:b,integrationName:$,"outer-type":q||void 0,url:w||void 0,"api-key-title":_optionalChain([k, 'access', _47 => _47[0], 'optionalAccess', _48 => _48.title]),"identity-keys":Q.filter(({isConnected:v})=>v).map(({name:v})=>v),...B.length>0?{"deletion-dependencies":B.map(({title:v})=>v)}:{},...ee.length>0?{owners:ee.map(({email:v})=>v)}:{},...ye.length>0?{teams:ye.map(({name:v})=>v)}:{},...Te.length>0?{discoveredBy:Te.map(({title:v})=>v)}:{},...Ue.length>0?{businessEntities:Ue.map(({title:v})=>v)}:{},country:j||void 0,countrySubDivision:M||void 0,disabled:!Ne,"data-subjects":_e.length>0?Ha(_e.map(({type:v})=>v),h):void 0,...Ut.hasAvcFunctionality?{"email-settings":{"notify-email-address":G||void 0,"send-frequency":Me,"send-type":Fe,"include-identifiers-attachment":oe,"completion-link-type":Re,"manual-work-retry-frequency":ze}}:{},attributes:at!==void 0&&at.length>0?ve(at):void 0,datapoints:$e.map(v=>({key:v.name,title:_optionalChain([v, 'access', _49 => _49.title, 'optionalAccess', _50 => _50.defaultMessage]),description:_optionalChain([v, 'access', _51 => _51.description, 'optionalAccess', _52 => _52.defaultMessage]),owners:v.owners.map(({email:N})=>N),teams:v.teams.map(({name:N})=>N),...v.path.length>0?{path:v.path}:{},..._optionalChain([v, 'access', _53 => _53.dataCollection, 'optionalAccess', _54 => _54.title])?{"data-collection-tag":v.dataCollection.title.defaultMessage}:{},...v.dbIntegrationQueries.length>0?{"privacy-action-queries":_chunk6WIX75ZFcjs.f.call(void 0, _chunk6WIX75ZFcjs.e.call(void 0, v.dbIntegrationQueries,"requestType"),N=>N.suggestedQuery||N.query||void 0)}:{},...v.subDataPoints.length>0?{fields:v.subDataPoints.map(N=>({key:N.name,description:N.description,purposes:N.purposes,categories:N.categories,...p&&N.pendingCategoryGuesses?{"guessed-categories":N.pendingCategoryGuesses.filter(he=>he.status==="PENDING").map(he=>({category:{name:he.category.name,category:he.category.category},status:he.status,confidence:he.confidence,classifierVersion:he.classifierVersion||void 0}))}:{},"access-request-visibility-enabled":N.accessRequestVisibilityEnabled,"erasure-request-redaction-enabled":N.erasureRequestRedactionEnabled,attributes:N.attributeValues!==void 0&&N.attributeValues.length>0?ve(N.attributeValues):void 0})).sort((N,he)=>N.key.localeCompare(he.key))}:{},"privacy-actions":v.actionSettings.filter(({active:N})=>N).map(({type:N})=>N)})).sort((v,N)=>[..._nullishCoalesce(v.path, () => ([])),v.key].join(".").localeCompare([..._nullishCoalesce(N.path, () => ([])),N.key].join(".")))}))}return U}async function PP(t,e){let{reportPromptRun:{promptRun:r}}=await l(t,Jo,{input:{...e,promptRunMessages:e.promptRunMessages.map(({content:n,...i})=>({...i,message:n}))}});return r.id}async function gp(t,e){await l(t,To,{requestEnricherId:e})}async function DP(t,e){await l(t,cs,{input:e})}var vu=[...Object.values(_privacytypes.IsoCountryCode),...Object.values(_privacytypes.IsoCountrySubdivisionCode)];async function yp(t,{action:e,actionId:r,skipPublish:n=!1}){await l(t,Bs,{input:{id:r,skipSecondaryIfNoFiles:e.skipSecondaryIfNoFiles,skipDownloadableStep:e.skipDownloadableStep,requiresReview:e.requiresReview,waitingPeriod:e.waitingPeriod,skipPublish:n,regionList:e.regionBlockList?_chunk6WIX75ZFcjs.c.call(void 0, vu,e.regionBlockList):e.regionList,regionDetectionMethod:e.regionDetectionMethod}})}async function ku(t,e){let r={title:e.title,description:e.description||"",hidden:e.hidden||!1,productLine:e.productLine},{createActionItemCollection:n}=await l(t,ts,{input:r});return n.created}async function _u(t,e,r){await l(t,rs,{input:{id:r,title:e.title,description:e.description,hidden:e.hidden,productLine:e.productLine}})}async function Cp(t,e){let r=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" action item collections...`));let n=await xt(t),i=_chunk6WIX75ZFcjs.e.call(void 0, n,"title"),s=e.filter(p=>!i[p.title]);await _bluebird.mapSeries.call(void 0, s,async p=>{try{await ku(t,p),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created action item collection "${p.title}"!`))}catch(c){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create action item collection "${p.title}"! - ${c.message}`))}});let o=e.map(p=>[p,_optionalChain([i, 'access', _55 => _55[p.title], 'optionalAccess', _56 => _56.id])]).filter(p=>!!p[1]);return await _bluebird.mapSeries.call(void 0, o,async([p,c])=>{try{await _u(t,p,c),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced action item collection "${p.title}"!`))}catch(u){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync action item collection "${p.title}"! - ${u.message}`))}}),!r}async function Ou(t,e,r,n={}){let i=_chunk6WIX75ZFcjs.b.call(void 0, e,100);await _bluebird.mapSeries.call(void 0, i,async s=>{await l(t,Ks,{input:s.map(o=>({title:o.title,type:o.type,priorityOverride:o.priority,dueDate:o.dueDate,customerExperienceActionItemId:o.customerExperienceActionItemId,resolved:o.resolved,notes:o.notes,link:o.link,assigneesUserEmails:o.users,assigneesTeamNames:o.teams,...o.attributes?{}:{},collectionIds:o.collections.map(p=>r[p].id)}))})})}async function Gu(t,e,r,n={}){let i=s=>{let o=n[s];if(!o)throw new Error(`Attribute key "${s}" does not exist!`);return o.id};await l(t,Vs,{input:{ids:[r],title:e.title,priorityOverride:e.priority,dueDate:e.dueDate,resolved:e.resolved,customerExperienceActionItemId:e.customerExperienceActionItemId,notes:e.notes,link:e.link,assigneesUserEmails:e.users,assigneesTeamNames:e.teams,...e.attributes?{attributes:e.attributes.map(({key:s,values:o})=>({attributeKeyId:i(s),attributeValueNames:o}))}:{}}})}function Nu({title:t,collections:e}){return`${t}-${e.map(r=>r.title).sort().join("-")}`}function Ap({title:t,collections:e}){return`${t}-${e.sort().join("-")}`}async function Ip(t,e){let r=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" actionItems...`));let n=e.some(y=>y.attributes&&y.attributes.length>0),[i,s,o]=await Promise.all([cr(t),xt(t),n?Et(t):[]]),p=_chunk6WIX75ZFcjs.e.call(void 0, s,"title"),c=_chunk6WIX75ZFcjs.e.call(void 0, i,Nu),u=_chunk6WIX75ZFcjs.e.call(void 0, o,"name"),m=_chunk6WIX75ZFcjs.e.call(void 0, i.filter(y=>!!y.customerExperienceActionItemIds),({customerExperienceActionItemIds:y})=>y[0]),d=_chunk6WIX75ZFcjs.j.call(void 0, e.map(y=>y.collections).flat()).filter(y=>!p[y]);if(d.length>0)return _chunkZUNVPK23cjs.a.info(_colors2.default.red(`Missing action item collections: "${d.join('", "')}" - please create them first!`)),!1;let f=e.filter(y=>!c[Ap(y)]&&!m[y.customerExperienceActionItemId]);if(f.length>0)try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating "${f.length}" actionItems...`)),await Ou(t,f,p,u),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created "${f.length}" actionItems!`))}catch(y){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create action items! - ${y.message}`))}let g=e.map(y=>[y,_optionalChain([c, 'access', _57 => _57[Ap(y)], 'optionalAccess', _58 => _58.id])||_optionalChain([m, 'access', _59 => _59[y.customerExperienceActionItemId], 'optionalAccess', _60 => _60.id])]).filter(y=>!!y[1]);return await _bluebird.mapSeries.call(void 0, g,async([y,A])=>{try{await Gu(t,y,A,u),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced action item "${y.title}"!`))}catch(R){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync action item "${y.title}"! - ${R.message}`))}}),!r}async function Fu(t,e){let r={name:e.name,description:e.description,fileId:e.fileId,size:e.size,purpose:e.purpose,fileUploadedAt:new Date,agentIds:[]},{createAgentFile:n}=await l(t,ra,{input:r});return n.agentFile}async function Uu(t,e){await l(t,ia,{input:{agentFiles:e.map(([r,n])=>({id:n,name:r.name,description:r.description,fileId:r.fileId,size:r.size,purpose:r.purpose}))}})}async function Tp(t,e){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" agent files...`));let r=!1,n=await mr(t),i=_chunk6WIX75ZFcjs.e.call(void 0, n,"name"),s=e.filter(o=>!i[o.name]);await _bluebird.mapSeries.call(void 0, s,async o=>{try{let p=await Fu(t,o);i[p.name]=p,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced agent file "${o.name}"!`))}catch(p){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync agent file "${o.name}"! - ${p.message}`))}});try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${e.length}" agent files!`)),await Uu(t,e.map(o=>[o,i[o.name].id])),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced "${e.length}" agent files!`))}catch(o){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync "${e.length}" agent files! - ${o.message}`))}return!r}async function Qu(t,e){let r={name:e.name,description:e.description,parameters:e.parameters,agentIds:[]},{createAgentFunction:n}=await l(t,oa,{input:r});return n.agentFunction}async function Vu(t,e){await l(t,sa,{input:{agentFunctions:e.map(([r,n])=>({id:n,name:r.name,description:r.description,parameters:r.parameters}))}})}async function Pp(t,e){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" agent functions...`));let r=!1,n=await dr(t),i=_chunk6WIX75ZFcjs.e.call(void 0, n,"name"),s=e.filter(o=>!i[o.name]);await _bluebird.mapSeries.call(void 0, s,async o=>{try{let p=await Qu(t,o);i[p.name]=p,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced agent function "${o.name}"!`))}catch(p){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync agent function "${o.name}"! - ${p.message}`))}});try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${e.length}" agent functions!`)),await Vu(t,e.map(o=>[o,i[o.name].id])),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced "${e.length}" agent functions!`))}catch(o){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync "${e.length}" agent functions! - ${o.message}`))}return!r}async function ju(t,e){let r={name:e.name,description:e.description,codeInterpreterEnabled:e.codeInterpreterEnabled,retrievalEnabled:e.retrievalEnabled,promptTitle:e.prompt,largeLanguageModelName:e["large-language-model"].name,largeLanguageModelClient:e["large-language-model"].client},{createAgent:n}=await l(t,Xs,{input:r});return n.agent}async function Yu(t,e){await l(t,ea,{input:{agents:e.map(([r,n])=>({id:n,name:r.name,description:r.description,codeInterpreterEnabled:r.codeInterpreterEnabled,retrievalEnabled:r.retrievalEnabled}))}})}async function Ep(t,e){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" agents...`));let r=!1,n=await fr(t),i=_chunk6WIX75ZFcjs.e.call(void 0, n,"name"),s=e.filter(o=>!i[o.name]);await _bluebird.mapSeries.call(void 0, s,async o=>{try{let p=await ju(t,o);i[p.name]=p,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced agent "${o.name}"!`))}catch(p){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync agent "${o.name}"! - ${p.message}`))}});try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${e.length}" agents!`)),await Yu(t,e.map(o=>[o,i[o.name].id])),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced "${e.length}" agents!`))}catch(o){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync "${e.length}" agents ! - ${o.message}`))}return!r}async function Rp(t,e,{existingAttribute:r,deleteExtraAttributeValues:n}){let i={name:e.name,enabledOn:e.resources},s;if(r)await l(t,ls,{attributeKeyId:r.id,description:r.isCustom?e.description:void 0,...i}),s=r.id;else{let{createAttributeKey:{attributeKey:m}}=await l(t,ps,{type:e.type,description:e.description,...i});s=m.id}let o=_chunk6WIX75ZFcjs.e.call(void 0, _optionalChain([r, 'optionalAccess', _61 => _61.values])||[],"name"),{existingValues:p=[],newValues:c=[]}=_chunk6WIX75ZFcjs.d.call(void 0, e.values||[],m=>o[m.name]?"existingValues":"newValues"),u=_chunk6WIX75ZFcjs.c.call(void 0, (_optionalChain([r, 'optionalAccess', _62 => _62.values])||[]).map(({name:m})=>m),(e.values||[]).map(({name:m})=>m));c.length>0&&(await l(t,ns,{input:c.map(({name:m,...d})=>({name:m,attributeKeyId:s,...d}))}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Created ${c.length} attribute values`))),p.length>0&&(await l(t,os,{input:p.map(({name:m,...d})=>({id:o[m].id,name:m,description:o[m].description,color:o[m].color,...d,attributeKeyId:s}))}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Updated ${p.length} attribute values`))),u.length>0&&n&&(await _bluebird.map.call(void 0, u,async m=>{await l(t,ss,{id:o[m].id})},{concurrency:10}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Deleted ${u.length} attribute values`)))}async function zu(t,e){let r={title:e.title,description:e.description,address:e.address,headquarterCountry:e.headquarterCountry,headquarterSubDivision:e.headquarterSubDivision,dataProtectionOfficerName:e.dataProtectionOfficerName,dataProtectionOfficerEmail:e.dataProtectionOfficerEmail,attributes:e.attributes,teamNames:e.teams,ownerEmails:e.owners},{createBusinessEntity:n}=await l(t,Ns,{input:r});return n.businessEntity}async function Wu(t,e){let r=_chunk6WIX75ZFcjs.b.call(void 0, e,100);await _bluebird.mapSeries.call(void 0, r,async n=>{await l(t,Ms,{input:n.map(([i,s])=>({id:s,title:i.title,description:i.description,address:i.address,headquarterCountry:i.headquarterCountry,headquarterSubDivision:i.headquarterSubDivision,dataProtectionOfficerName:i.dataProtectionOfficerName,dataProtectionOfficerEmail:i.dataProtectionOfficerEmail,attributes:i.attributes,teamNames:i.teams,ownerEmails:i.owners}))})})}async function wp(t,e){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" business entities...`));let r=!1,n=await gr(t),i=_chunk6WIX75ZFcjs.e.call(void 0, n,"title"),s=e.filter(o=>!i[o.title]);await _bluebird.mapSeries.call(void 0, s,async o=>{try{let p=await zu(t,o);i[p.title]=p,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced business entity "${o.title}"!`))}catch(p){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync business entity "${o.title}"! - ${p.message}`))}});try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${e.length}" business entities!`)),await Wu(t,e.map(o=>[o,i[o.title].id])),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced "${e.length}" business entities!`))}catch(o){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync "${e.length}" business entities ! - ${o.message}`))}return!r}var nn=20;async function $p(t){let e=[],r=0,n=!1;do{let{codePackages:{nodes:i}}=await l(t,ao,{first:nn,offset:r});e.push(...i),r+=nn,n=i.length===nn}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var on=20;async function xp(t){let e=[],r=0,n=!1;do{let{softwareDevelopmentKits:{nodes:i}}=await l(t,no,{first:on,offset:r});e.push(...i),r+=on,n=i.length===on}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var Xu=100;async function em(t,e){let{createSoftwareDevelopmentKit:{softwareDevelopmentKit:r}}=await l(t,so,{input:e});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created software development kit "${e.name}"!`)),r}async function tm(t,e){let{updateSoftwareDevelopmentKits:{softwareDevelopmentKits:r}}=await l(t,oo,{input:{softwareDevelopmentKits:e}});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated ${e.length} software development kits!`)),r}async function Dp(t,e,r=20){let n=!1,i=[];_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Syncing software development kits..."));let s=await xp(t),o=_chunk6WIX75ZFcjs.e.call(void 0, s,({name:d,codePackageType:f})=>JSON.stringify({name:d,codePackageType:f})),p=e.map(d=>[d,_optionalChain([o, 'access', _63 => _63[JSON.stringify({name:d.name,codePackageType:d.codePackageType})], 'optionalAccess', _64 => _64.id])]),c=p.filter(([,d])=>!d).map(([d])=>d);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating "${c.length}" new software development kits...`)),await _bluebird.map.call(void 0, c,async d=>{let f=await em(t,d);i.push(f)},{concurrency:r}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced ${c.length} software development kits!`))}catch(d){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create software development kits! - ${d.message}`))}let u=p.filter(d=>!!d[1]),m=_chunk6WIX75ZFcjs.b.call(void 0, u,Xu);return _chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${u.length}" software development kits...`)),await _bluebird.mapSeries.call(void 0, m,async d=>{try{let f=await tm(t,d.map(([{codePackageType:g,...y},A])=>({...y,id:A})));i.push(...f),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated "${u.length}" software development kits!`))}catch(f){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to update software development kits! - ${f.message}`))}_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${e.length}" software development kits!`))}),{softwareDevelopmentKits:i,success:!n}}var sn=20;async function qp(t){let e=[],r=0,n=!1;do{let{repositories:{nodes:i}}=await l(t,Qn,{first:sn,offset:r});e.push(...i),r+=sn,n=i.length===sn}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var nm=100;async function om(t,e){let{createRepository:{repository:r}}=await l(t,Kn,{input:e});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created repository "${e.name}"!`)),r}async function sm(t,e){let{updateRepositories:{repositories:r}}=await l(t,Vn,{input:{repositories:e}});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated ${e.length} repositories!`)),r}async function Lp(t,e,r=20){let n=!1,i=[],s=await qp(t),o=_chunk6WIX75ZFcjs.e.call(void 0, s,"name"),p=e.map(d=>[d,_optionalChain([o, 'access', _65 => _65[d.name], 'optionalAccess', _66 => _66.id])]),c=p.filter(([,d])=>!d).map(([d])=>d);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating "${c.length}" new repositories...`)),await _bluebird.map.call(void 0, c,async d=>{let f=await om(t,d);i.push(f)},{concurrency:r}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced ${c.length} repositories!`))}catch(d){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create repositories! - ${d.message}`))}let u=p.filter(d=>!!d[1]),m=_chunk6WIX75ZFcjs.b.call(void 0, u,nm);return _chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${u.length}" repositories...`)),await _bluebird.mapSeries.call(void 0, m,async d=>{try{let f=await sm(t,d.map(([g,y])=>({...g,id:y})));i.push(...f),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated "${u.length}" repositories!`))}catch(f){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to update repositories! - ${f.message}`))}_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${e.length}" repositories!`))}),{repositories:i,success:!n}}var lm=100,kt="%%%%";async function cm(t,e){let{createCodePackage:{codePackage:r}}=await l(t,lo,{input:e});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created code package "${e.name}"!`)),r}async function um(t,e){let{updateCodePackages:{codePackages:r}}=await l(t,po,{input:{codePackages:e}});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated ${e.length} code packages!`)),r}async function qR(t,e,r=20){let n=!1,[i,{softwareDevelopmentKits:s}]=await Promise.all([$p(t),Dp(t,_chunk6WIX75ZFcjs.k.call(void 0, e.map(({type:f,softwareDevelopmentKits:g=[]})=>g.map(({name:y})=>({name:y,codePackageType:f}))).flat(),({name:f,codePackageType:g})=>`${f}${kt}${g}`),r),Lp(t,_chunk6WIX75ZFcjs.k.call(void 0, e,"repositoryName").map(({repositoryName:f})=>({name:f,url:`https://github.com/${f}`})))]),o=_chunk6WIX75ZFcjs.e.call(void 0, s,({name:f,codePackageType:g})=>`${f}${kt}${g}`),p=_chunk6WIX75ZFcjs.e.call(void 0, i,({name:f,type:g})=>`${f}${kt}${g}`),c=e.map(f=>[f,_optionalChain([p, 'access', _67 => _67[`${f.name}${kt}${f.type}`], 'optionalAccess', _68 => _68.id])]),u=c.filter(([,f])=>!f).map(([f])=>f);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating "${u.length}" new code packages...`)),await _bluebird.map.call(void 0, u,async({softwareDevelopmentKits:f,...g})=>{await cm(t,{...g,...f?{softwareDevelopmentKitIds:_chunk6WIX75ZFcjs.j.call(void 0, f.map(({name:y})=>{let A=o[`${y}${kt}${g.type}`];if(!A)throw new Error(`Failed to find SDK with name: "${y}"`);return A.id}))}:{}})},{concurrency:r}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced ${u.length} code packages!`))}catch(f){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create code packages! - ${f.message}`))}let m=c.filter(f=>!!f[1]);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${m.length}" code packages...`));let d=_chunk6WIX75ZFcjs.b.call(void 0, m,lm);return await _bluebird.mapSeries.call(void 0, d,async f=>{try{await um(t,f.map(([{softwareDevelopmentKits:g,repositoryName:y,...A},R])=>({...A,...g?{softwareDevelopmentKitIds:_chunk6WIX75ZFcjs.j.call(void 0, g.map(({name:I})=>{let L=o[`${I}${kt}${A.type}`];if(!L)throw new Error(`Failed to find SDK with name: "${I}"`);return L.id}))}:{},id:R}))),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated "${f.length}" code packages!`))}catch(g){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to update code packages! - ${g.message}`))}}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${e.length}" code packages!`)),!n}async function vp(t,{identifier:e,dataSubjectsByName:r,identifierId:n,skipPublish:i=!1}){await l(t,Mn,{input:{id:n,selectOptions:e.selectOptions,isRequiredInForm:e.isRequiredInForm,regex:e.regex,placeholder:e.placeholder,displayTitle:e.displayTitle,displayDescription:e.displayDescription,displayOrder:e.displayOrder,isUniqueOnPreferenceStore:e.isUniqueOnPreferenceStore,privacyCenterVisibility:e.privacyCenterVisibility,dataSubjectIds:e.dataSubjects?e.dataSubjects.map(s=>r[s].id):void 0,skipPublish:i}})}var dm=100;async function fm(t,e){let r=await De(t);await _bluebird.mapSeries.call(void 0, _chunk6WIX75ZFcjs.b.call(void 0, e,dm),async n=>{await l(t,gs,{airgapBundleId:r,cookies:n.map(i=>({name:i.name,trackingPurposes:i.trackingPurposes&&i.trackingPurposes.length>0?i.trackingPurposes:void 0,description:i.description,service:i.service,status:i.status,attributes:i.attributes,isRegex:i.isRegex}))})})}async function kp(t,e){let r=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" cookies...`));let n=e.filter(i=>e.filter(s=>i.name===s.name&&i.isRegex===s.isRegex).length>1);if(n.length>0)throw new Error(`Failed to upload cookies as there were non-unique entries found: ${n.map(({name:i})=>i).join(",")}`);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Upserting "${e.length}" new cookies...`)),await fm(t,e),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced ${e.length} cookies!`))}catch(i){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create cookies! - ${i.message}`))}return!r}async function gm(t,e){let r={name:e.name,description:e.description,ssoTitle:e["sso-title"],ssoDepartment:e["sso-department"],ssoGroup:e["sso-group"],scopes:e.scopes,userEmails:e.users},{createTeam:n}=await l(t,Qo,{input:r});return n.team}async function ym(t,e,r){let{updateTeam:n}=await l(t,Vo,{input:{id:r,name:e.name,description:e.description,ssoTitle:e["sso-title"],ssoDepartment:e["sso-department"],ssoGroup:e["sso-group"],scopes:e.scopes,userEmails:e.users}});return n.team}async function Op(t,e){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" teams...`));let r=!1,n=await br(t),i=_chunk6WIX75ZFcjs.e.call(void 0, n,"name"),s=e.filter(p=>!i[p.name]),o=e.filter(p=>!!i[p.name]);return await _bluebird.mapSeries.call(void 0, s,async p=>{try{let c=await gm(t,p);i[c.name]=c,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created team "${p.name}"!`))}catch(c){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync team "${p.name}"! - ${c.message}`))}}),await _bluebird.mapSeries.call(void 0, o,async p=>{try{let c=await ym(t,p,i[p.name].id);i[c.name]=c,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated team "${p.name}"!`))}catch(c){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync team "${p.name}"! - ${c.message}`))}}),!r}async function Gp(t,{dataSubject:e,dataSubjectId:r,skipPublish:n=!1}){await l(t,Un,{input:{id:r,title:e.title,adminDashboardDefaultSilentMode:e.adminDashboardDefaultSilentMode,actions:e.actions,skipPublish:n&&typeof e.active>"u"}}),typeof e.active=="boolean"&&await l(t,Bn,{input:{id:r,active:e.active,skipPublish:n}})}async function Cm(t,e){let{createPrompt:{prompt:r}}=await l(t,ko,{input:e});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created prompt "${e.title}"!`)),r.id}async function Am(t,e){await l(t,vo,{input:{prompts:e.map(([r,n])=>({...r,id:n}))}}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated ${e.length} prompts!`))}async function Np(t,e,r=20){let n=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" prompts...`));let i=await $t(t),s=_chunk6WIX75ZFcjs.e.call(void 0, i,"title"),o=e.map(u=>[u,_optionalChain([s, 'access', _69 => _69[u.title], 'optionalAccess', _70 => _70.id])]),p=o.filter(([,u])=>!u).map(([u])=>u);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating "${p.length}" new prompts...`)),await _bluebird.map.call(void 0, p,async u=>{await Cm(t,u)},{concurrency:r}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced ${p.length} prompts!`))}catch(u){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create prompts! - ${u.message}`))}let c=o.filter(u=>!!u[1]);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${c.length}" prompts...`)),await Am(t,c),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated "${c.length}" prompts!`))}catch(u){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create prompts! - ${u.message}`))}return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${e.length}" prompts!`)),!n}var Im=100;async function Tm(t,e){let r=await bt(t);await _bluebird.mapSeries.call(void 0, _chunk6WIX75ZFcjs.b.call(void 0, e,Im),async n=>{await l(t,fo,{privacyCenterId:r,policies:n.map(([i,s])=>({id:s,title:i.title,disableEffectiveOn:i.disableEffectiveOn,disabledLocales:i.disabledLocales,...i.effectiveOn||i.content?{version:{...i.effectiveOn?{effectiveOn:i.effectiveOn}:{},...i.content?{content:{defaultMessage:i.content}}:{}}}:{}}))})})}async function Mp(t,e){let r=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" policies...`));let n=e.filter(o=>e.filter(p=>o.title===p.title).length>1);if(n.length>0)throw new Error(`Failed to upload policies as there were non-unique entries found: ${n.map(({title:o})=>o).join(",")}`);let i=await Cr(t),s=_chunk6WIX75ZFcjs.e.call(void 0, i,({title:o})=>o.defaultMessage);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Upserting "${e.length}" new policies...`)),await Tm(t,e.map(o=>[o,_optionalChain([s, 'access', _71 => _71[o.title], 'optionalAccess', _72 => _72.id])])),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced ${e.length} policies!`))}catch(o){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create policies! - ${o.message}`))}return!r}var Em=100;async function Rm(t,e){await _bluebird.mapSeries.call(void 0, _chunk6WIX75ZFcjs.b.call(void 0, e,Em),async r=>{await l(t,So,{messages:r.map(n=>({...n.id.includes(".")?{}:{id:n.id},defaultMessage:n.defaultMessage,targetReactIntlId:n.targetReactIntlId,translations:n.translations?Object.entries(n.translations).map(([i,s])=>({locale:i,value:s})):void 0}))})})}async function Fp(t,e){let r=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" messages...`));let n=e.filter(i=>e.filter(s=>i.id===s.id).length>1);if(n.length>0)throw new Error(`Failed to upload messages as there were non-unique entries found: ${n.map(({id:i})=>i).join(",")}`);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Upserting "${e.length}" new messages...`)),await Rm(t,e),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced ${e.length} messages!`))}catch(i){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create messages! - ${i.message}`))}return!r}async function Up(t,e){let r=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Syncing privacy center..."));let n=await bt(t);try{await l(t,zs,{input:{privacyCenterId:n,transformAccessReportJsonToCsv:e.transformAccessReportJsonToCsv,useCustomEmailDomain:e.useCustomEmailDomain,useNoReplyEmailAddress:e.useNoReplyEmailAddress,replyToEmail:e.replyToEmail,supportEmail:e.supportEmail,preferBrowserDefaultLocale:e.preferBrowserDefaultLocale,defaultLocale:e.defaultLocale,locales:e.locales,showMarketingPreferences:e.showMarketingPreferences,showManageYourPrivacy:e.showManageYourPrivacy,showPolicies:e.showPolicies,showConsentManager:e.showConsentManager,showDataFlows:e.showDataFlows,showCookies:e.showCookies,showTrackingTechnologies:e.showTrackingTechnologies,showPrivacyRequestButton:e.showPrivacyRequestButton,isDisabled:e.isDisabled,...e.theme?{colorPalette:e.theme.colors,componentStyles:e.theme.componentStyles,textStyles:e.theme.textStyles}:{}}}),_chunkZUNVPK23cjs.a.info(_colors2.default.green("Successfully synced privacy center!"))}catch(i){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create privacy center! - ${i.message}`))}return!r}var _airgapjstypes = require('@transcend-io/airgap.js-types');var Qp="https://app.transcend.io/consent-manager/regional-experiences/purposes";async function xm(t,e){let r=await yr(t),n=_chunk6WIX75ZFcjs.e.call(void 0, r,"name"),i=await Ir(t),s=_chunk6WIX75ZFcjs.e.call(void 0, i,"trackingType");await _bluebird.map.call(void 0, e,async(o,p)=>{let c=_optionalChain([o, 'access', _73 => _73.purposes, 'optionalAccess', _74 => _74.map, 'call', _75 => _75((d,f)=>{let g=s[d.trackingType];if(!g)throw new Error(`Invalid purpose trackingType provided at consentManager.experiences[${p}].purposes[${f}]: ${d.trackingType}. See list of valid purposes ${Qp}`);return g.id})]),u=_optionalChain([o, 'access', _76 => _76.optedOutPurposes, 'optionalAccess', _77 => _77.map, 'call', _78 => _78((d,f)=>{let g=s[d.trackingType];if(!g)throw new Error(`Invalid purpose trackingType provided at consentManager.experiences[${p}].optedOutPurposes[${f}]: ${d.trackingType}. See list of valid purposes ${Qp}`);return g.id})]),m=n[o.name];m?(await l(t,vs,{input:{id:m.id,name:o.displayName,regions:o.regions,operator:o.operator,onConsentExpiry:o.onConsentExpiry,consentExpiry:o.consentExpiry,displayPriority:o.displayPriority!==m.displayPriority?o.displayPriority:void 0,viewState:o.viewState,purposes:c,optedOutPurposes:u,browserLanguages:o.browserLanguages,browserTimeZones:o.browserTimeZones}}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced consent experience "${o.name}"!`))):(await l(t,ks,{input:{name:o.name,displayName:o.displayName,regions:o.regions,operator:o.operator,onConsentExpiry:o.onConsentExpiry||_airgapjstypes.OnConsentExpiry.Prompt,consentExpiry:o.consentExpiry,displayPriority:o.displayPriority,viewState:o.viewState||_airgapjstypes.InitialViewState.Hidden,purposes:c||[],optedOutPurposes:u||[],browserLanguages:o.browserLanguages,browserTimeZones:o.browserTimeZones}}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created consent experience "${o.name}"!`)))},{concurrency:10})}async function Vp(t,e){let r;try{r=await De(t,1)}catch(n){if(n.message.includes("AirgapBundle not found")){let i=await bt(t),{createConsentManager:s}=await l(t,Is,{domains:e.domains,privacyCenterId:i});r=s.consentManager.id}else throw n}if(e.domains&&await l(t,Rs,{domains:e.domains,airgapBundleId:r}),e.partition){let i=(await zt(t)).find(s=>s.name===e.partition);if(!i)throw new Error(`Partition "${e.partition}" not found. Please create the partition first.`);await l(t,bs,{partitionId:i.id,airgapBundleId:r})}e.version&&await l(t,Ts,{airgapBundleId:r,version:e.version}),e.signedIabAgreement&&await l(t,ws,{input:{id:r,...e.signedIabAgreement?{signedIabAgreement:e.signedIabAgreement}:{}}}),e.unknownRequestPolicy&&await l(t,$s,{input:{id:r,unknownRequestPolicy:e.unknownRequestPolicy}}),e.unknownRequestPolicy&&await l(t,xs,{input:{id:r,unknownCookiePolicy:e.unknownCookiePolicy}}),e.telemetryPartitioning&&await l(t,Ds,{input:{id:r,strategy:e.telemetryPartitioning}}),e.consentPrecedence&&await l(t,qs,{input:{id:r,consentPrecedence:e.consentPrecedence}}),e.experiences&&await xm(t,e.experiences),e.theme&&await l(t,Ls,{input:{airgapBundleId:r,...e.theme}})}var Yp=100;async function Dm(t,e,r=!1){let n=await De(t);await _bluebird.mapSeries.call(void 0, _chunk6WIX75ZFcjs.b.call(void 0, e,Yp),async i=>{await l(t,fs,{airgapBundleId:n,dataFlows:i.map(([s,o])=>({id:o,value:s.value,type:s.type,trackingType:s.trackingPurposes&&s.trackingPurposes.length>0?s.trackingPurposes:void 0,description:s.description,service:s.service,status:s.status,attributes:s.attributes})),classifyService:r})})}async function qm(t,e,r=!1){let n=await De(t);await _bluebird.mapSeries.call(void 0, _chunk6WIX75ZFcjs.b.call(void 0, e,Yp),async i=>{await l(t,ds,{airgapBundleId:n,dataFlows:i.map(s=>({value:s.value,type:s.type,trackingType:s.trackingPurposes&&s.trackingPurposes.length>0?s.trackingPurposes:void 0,description:s.description,service:s.service,status:s.status,attributes:s.attributes})),dropMatchingDataFlowsInTriage:!0,classifyService:r})})}async function Zp(t,e,r){let n=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" data flows...`));let i=e.filter(d=>e.filter(f=>d.value===f.value&&d.type===f.type).length>1);if(i.length>0)throw new Error(`Failed to upload data flows as there were non-unique entries found: ${i.map(({value:d})=>d).join(",")}`);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Fetching data flows..."));let[s,o]=await Promise.all([Rt(t,_privacytypes.ConsentTrackerStatus.Live),Rt(t,_privacytypes.ConsentTrackerStatus.NeedsReview)]),p=[...s,...o],c=e.map(d=>[d,_optionalChain([p, 'access', _79 => _79.find, 'call', _80 => _80(f=>d.value===f.value&&d.type===f.type), 'optionalAccess', _81 => _81.id])]),u=c.filter(([,d])=>!d).map(([d])=>d);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating "${u.length}" new data flows...`)),await qm(t,u,r),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced ${u.length} data flows!`))}catch(d){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create data flows! - ${d.message}`))}let m=c.filter(d=>!!d[1]);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${m.length}" data flows...`)),await Dm(t,m,r),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated "${m.length}" data flows!`))}catch(d){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create data flows! - ${d.message}`))}return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${e.length}" data flows!`)),!n}async function vm(t,e){let{createPromptPartial:{promptPartial:r}}=await l(t,Oo,{input:e});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created prompt partial "${e.title}"!`)),r.id}async function km(t,e){await l(t,_o,{input:{promptPartials:e.map(([r,n])=>({...r,id:n}))}}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated ${e.length} prompt partials!`))}async function zp(t,e,r=20){let n=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" prompt partials...`));let i=await Dr(t),s=_chunk6WIX75ZFcjs.e.call(void 0, i,"title"),o=e.map(u=>[u,_optionalChain([s, 'access', _82 => _82[u.title], 'optionalAccess', _83 => _83.id])]),p=o.filter(([,u])=>!u).map(([u])=>u);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating "${p.length}" new prompt partials...`)),await _bluebird.map.call(void 0, p,async u=>{await vm(t,u)},{concurrency:r}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced ${p.length} prompt partials!`))}catch(u){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create prompt partials! - ${u.message}`))}let c=o.filter(u=>!!u[1]);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${c.length}" prompt partials...`)),await km(t,c),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated "${c.length}" prompt partials!`))}catch(u){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create prompt partials! - ${u.message}`))}return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${e.length}" prompt partials!`)),!n}async function Om(t,e){let{createPromptGroup:{promptGroup:r}}=await l(t,No,{input:e});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created prompt group "${e.title}"!`)),r.id}async function Gm(t,e){await l(t,Go,{input:{promptGroups:e.map(([r,n])=>({...r,id:n}))}}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated ${e.length} prompt groups!`))}async function Wp(t,e,r=20){let n=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" prompt groups...`));let i=await xr(t),s=await $t(t),o=_chunk6WIX75ZFcjs.e.call(void 0, s,"title"),p=_chunk6WIX75ZFcjs.e.call(void 0, i,"title"),c=e.map(d=>[d,_optionalChain([p, 'access', _84 => _84[d.title], 'optionalAccess', _85 => _85.id])]),u=c.filter(([,d])=>!d).map(([d])=>d);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating "${u.length}" new prompt groups...`)),await _bluebird.map.call(void 0, u,async d=>{await Om(t,{...d,promptIds:d.prompts.map(f=>{let g=o[f];if(!g)throw new Error(`Failed to find prompt with title: "${f}"`);return g.id})})},{concurrency:r}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced ${u.length} prompt groups!`))}catch(d){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create prompt groups! - ${d.message}`))}let m=c.filter(d=>!!d[1]);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${m.length}" prompt groups...`)),await Gm(t,m.map(([{prompts:d,...f},g])=>[{...f,promptIds:d.map(y=>{let A=o[y];if(!A)throw new Error(`Failed to find prompt with title: "${y}"`);return A.id})},g])),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated "${m.length}" prompt groups!`))}catch(d){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create prompt groups! - ${d.message}`))}return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${e.length}" prompt groups!`)),!n}async function Mm(t,e){let r={title:e.title,description:e.description,address:e.address,headquarterCountry:e.headquarterCountry,headquarterSubDivision:e.headquarterSubDivision,dataProcessingAgreementLink:e.dataProcessingAgreementLink,contactName:e.contactName,contactPhone:e.contactPhone,websiteUrl:e.websiteUrl},{createVendor:n}=await l(t,pa,{input:r});return n.vendor}async function Fm(t,e){await l(t,la,{input:{vendors:e.map(([r,n])=>({id:n,title:r.title,description:r.description,address:r.address,headquarterCountry:r.headquarterCountry,headquarterSubDivision:r.headquarterSubDivision,dataProcessingAgreementLink:r.dataProcessingAgreementLink,contactName:r.contactName,contactPhone:r.contactPhone,websiteUrl:r.websiteUrl,attributes:r.attributes}))}})}async function Hp(t,e){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" vendors...`));let r=!1,n=await wr(t),i=_chunk6WIX75ZFcjs.e.call(void 0, n,"title"),s=e.filter(o=>!i[o.title]);await _bluebird.mapSeries.call(void 0, s,async o=>{try{let p=await Mm(t,o);i[p.title]=p,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced vendor "${o.title}"!`))}catch(p){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync vendor "${o.title}"! - ${p.message}`))}});try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${e.length}" vendors!`)),await Fm(t,e.map(o=>[o,i[o.title].id])),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced "${e.length}" vendors!`))}catch(o){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync "${e.length}" vendors ! - ${o.message}`))}return!r}async function Bm(t,e){let r={name:e.name,category:e.category,description:e.description},{createDataCategory:n}=await l(t,ua,{input:r});return n.dataCategory}async function Qm(t,e){await l(t,ma,{input:{dataSubCategories:e.map(([r,n])=>({id:n,description:r.description,attributes:r.attributes}))}})}async function Jp(t,e){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" data categories...`));let r=!1,n=await hr(t),i=_chunk6WIX75ZFcjs.e.call(void 0, n,({name:o,category:p})=>`${o}:${p}`),s=e.filter(o=>!i[`${o.name}:${o.category}`]);await _bluebird.mapSeries.call(void 0, s,async o=>{try{let p=await Bm(t,o);i[`${p.name}:${p.category}`]=p,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced data category "${o.name}"!`))}catch(p){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync data category "${o.name}"! - ${p.message}`))}});try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${e.length}" data categories!`)),await Qm(t,e.map(o=>[o,i[`${o.name}:${o.category}`].id])),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced "${e.length}" data categories!`))}catch(o){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync "${e.length}" data categories ! - ${o.message}`))}return!r}async function Km(t,e){let r={name:e.name,purpose:e.purpose,description:e.description},{createProcessingPurposeSubCategory:n}=await l(t,fa,{input:r});return n.processingPurposeSubCategory}async function jm(t,e){await l(t,ga,{input:{processingPurposeSubCategories:e.map(([r,n])=>({id:n,description:r.description,attributes:r.attributes}))}})}async function Xp(t,e){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" processing purposes...`));let r=!1,n=await Sr(t),i=_chunk6WIX75ZFcjs.e.call(void 0, n,({name:o,purpose:p})=>`${o}:${p}`),s=e.filter(o=>!i[`${o.name}:${o.purpose}`]);await _bluebird.mapSeries.call(void 0, s,async o=>{try{let p=await Km(t,o);i[`${p.name}:${p.purpose}`]=p,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced processing purpose "${o.name}"!`))}catch(p){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync processing purpose "${o.name}"! - ${p.message}`))}});try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${e.length}" processing purposes!`)),await jm(t,e.map(o=>[o,i[`${o.name}:${o.purpose}`].id])),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced "${e.length}" processing purposes!`))}catch(o){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync "${e.length}" processing purposes ! - ${o.message}`))}return!r}async function Zm(t,e){let r={title:e.title,description:e.description},{createProcessingActivity:n}=await l(t,ha,{input:r});return n.processingActivity}async function zm(t,e){let r=e.filter(([,n])=>n===void 0).map(([{title:n}])=>n);if(r.length>0)throw new Error(`The following ${r.length} processing activities do not exist and thus can't be updated: "${r.join('", "')}"`);await l(t,Ca,{input:{processingActivities:e.map(([{processingSubPurposes:n,dataSubCategories:i,saaSCategories:s,...o},p])=>({dataSubCategoryInputs:_optionalChain([i, 'optionalAccess', _86 => _86.map, 'call', _87 => _87(({category:c,name:u})=>({category:c,name:_nullishCoalesce(u, () => (""))}))]),processingPurposeSubCategoryInputs:_optionalChain([n, 'optionalAccess', _88 => _88.map, 'call', _89 => _89(({purpose:c,name:u})=>({purpose:c,name:_nullishCoalesce(u, () => ("Other"))}))]),saaSCategoryTitles:s,...o,id:p}))}})}async function el(t,e){let r=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" processing activities...`));let n=await Ar(t),i=_chunk6WIX75ZFcjs.e.call(void 0, n,"title"),s=e.filter(o=>!i[o.title]);s.length>0&&_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating "${s.length}" new processing activities...`)),await _bluebird.mapSeries.call(void 0, s,async o=>{try{let p=await Zm(t,o);i[p.title]=p,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created processing activity "${o.title}"!`))}catch(p){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create processing activity "${o.title}"! - ${p.message}`))}});try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${e.length}" processing activities!`)),await zm(t,e.map(o=>[o,_optionalChain([i, 'access', _90 => _90[o.title], 'optionalAccess', _91 => _91.id])])),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced "${e.length}" processingActivities!`))}catch(o){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync "${e.length}" processingActivities! - ${o.message}`))}return!r}var Mt=10;async function O$(t,e,{pageSize:r=50,publishToPrivacyCenter:n=!0,classifyService:i=!1,deleteExtraAttributeValues:s=!1}){let o=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Fetching data with page size ${r}...`));let{templates:p,attributes:c,actions:u,identifiers:m,"data-subjects":d,"business-entities":f,enrichers:g,cookies:y,"consent-manager":A,"data-silos":R,"data-flows":I,prompts:L,"prompt-groups":C,"prompt-partials":_,agents:H,"agent-functions":K,"agent-files":se,vendors:J,"data-categories":me,"processing-activities":ce,"processing-purposes":X,"action-items":Se,"action-item-collections":Ie,teams:pe,"privacy-center":de,messages:we,policies:ke,partitions:Ze}=t,[Ae,ne,ue]=await Promise.all([g||m?Ja(t,e,!n):{},R||d||g||ce?za(t,e):{},R&&R.map(S=>S["api-key-title"]||[]).reduce((S,O)=>S+O.length,0)>0?$r(t,e):{}]);if(A){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Syncing consent manager..."));try{await Vp(e,A),_chunkZUNVPK23cjs.a.info(_colors2.default.green("Successfully synced consent manager!"))}catch(S){o=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync consent manager! - ${S.message}`))}}if(L){let S=await Np(e,L);o=o||!S}if(_){let S=await zp(e,_);o=o||!S}if(C){let S=await Wp(e,C);o=o||!S}if(pe){let S=await Op(e,pe);o=o||!S}if(p&&(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${p.length}" email templates...`)),await _bluebird.map.call(void 0, p,async S=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing template "${S.title}"...`));try{await up(S,e),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced template "${S.title}"!`))}catch(O){o=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync template "${S.title}"! - ${O.message}`))}},{concurrency:Mt}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${p.length}" email templates!`))),f){let S=await wp(e,f);o=o||!S}if(J){let S=await Hp(e,J);o=o||!S}if(me){let S=await Jp(e,me);o=o||!S}if(X){let S=await Xp(e,X);o=o||!S}if(Ze){let S=await dp(e,Ze);o=o||!S}if(H){let S=await Ep(e,H);o=o||!S}if(K){let S=await Pp(e,K);o=o||!S}if(se){let S=await Tp(e,se);o=o||!S}if(y){let S=await kp(e,y);o=o||!S}if(Ie){let S=await Cp(e,Ie);o=o||!S}if(c){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${c.length}" attributes...`));let S=await Et(e);await _bluebird.map.call(void 0, c,async O=>{let fe=S.find(ge=>ge.name===O.name);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing attribute "${O.name}"...`));try{await Rp(e,O,{existingAttribute:fe,deleteExtraAttributeValues:s}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced attribute "${O.name}"!`))}catch(ge){o=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync attribute "${O.name}"! - ${ge.message}`))}},{concurrency:Mt}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${c.length}" attributes!`))}if(Se){let S=await Ip(e,Se);o=o||!S}if(g&&(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${g.length}" enrichers...`)),await _bluebird.map.call(void 0, g,async S=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing enricher "${S.title}"...`));try{await cp(e,{enricher:S,identifierByName:Ae,dataSubjectsByName:ne}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced enricher "${S.title}"!`))}catch(O){o=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync enricher "${S.title}"! - ${O.message}`))}},{concurrency:Mt}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${g.length}" enrichers!`))),m&&(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${m.length}" identifiers...`)),await _bluebird.map.call(void 0, m,async S=>{let O=Ae[S.name];if(!O)throw new Error(`Failed to find identifier with name: ${S.type}. Should have been auto-created by cli.`);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing identifier "${S.type}"...`));try{await vp(e,{identifier:S,dataSubjectsByName:ne,identifierId:O.id,skipPublish:!n}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced identifier "${S.type}"!`))}catch(fe){o=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync identifier "${S.type}"! - ${fe.message}`))}},{concurrency:Mt}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${m.length}" identifiers!`))),u){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${u.length}" actions...`));let S=await ur(e);await _bluebird.map.call(void 0, u,async O=>{let fe=S.find(ge=>ge.type===O.type);if(!fe)throw new Error(`Failed to find action with type: ${O.type}. Should have already existing in the organization.`);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing action "${O.type}"...`));try{await yp(e,{action:O,actionId:fe.id,skipPublish:!n}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced action "${O.type}"!`))}catch(ge){o=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync action "${O.type}"! - ${ge.message}`))}},{concurrency:Mt}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${u.length}" actions!`))}if(d){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${d.length}" data subjects...`));let S=await Yt(e);await _bluebird.map.call(void 0, d,async O=>{let fe=S.find(ge=>ge.type===O.type);if(!fe)throw new Error(`Failed to find data subject with type: ${O.type}. Should have already existing in the organization.`);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing data subject "${O.type}"...`));try{await Gp(e,{dataSubject:O,dataSubjectId:fe.id,skipPublish:!n}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced data subject "${O.type}"!`))}catch(ge){o=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync data subject "${O.type}"! - ${ge.message}`))}},{concurrency:Mt}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${d.length}" data subjects!`))}if(I){let S=await Zp(e,I,i);o=o||!S}if(de){let S=await Up(e,de);o=o||!S}if(we){let S=await Fp(e,we);o=o||!S}if(ke){let S=await Mp(e,ke);o=o||!S}let Ee=[];if(R){let{success:S,dataSiloTitleToId:O}=await ap(R,e,{dataSubjectsByName:ne,apiKeysByTitle:ue,pageSize:r});_optionalChain([R, 'optionalAccess', _92 => _92.forEach, 'call', _93 => _93(fe=>{fe["deletion-dependencies"]&&Ee.push([O[fe.title],fe["deletion-dependencies"]])})]),o=o||!S}if(Ee.length>0&&await pp(e,Ee),ce){let S=await el(e,ce);o=o||!S}return o}var Hm=1e3;async function B$(t,e,r){let n=_chunk6WIX75ZFcjs.b.call(void 0, r,Hm);await _bluebird.mapSeries.call(void 0, n,async i=>{await l(t,Hn,{pluginId:e,rawResults:i})})}async function _D({requestActions:t,auth:e,requestIds:r,statuses:n=[_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:i,createdAtBefore:s,concurrency:o=100,transcendUrl:p=_chunk6WIX75ZFcjs.r}){let c=Z(p,e),u=new Date().getTime(),m=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),d=await le(c,{actions:t,statuses:n,createdAtBefore:s,createdAtAfter:i,isSilent:!1,requestIds:r});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Marking "${d.length}" as silent mode.`));let f=0;m.start(d.length,0),await _bluebird.map.call(void 0, d,async A=>{await l(c,At,{input:{id:A.id,isSilent:!0}}),f+=1,m.update(f)},{concurrency:o}),m.stop();let y=new Date().getTime()-u;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully marked ${f} requests as silent mode in "${y/1e3}" seconds!`)),d.length}async function il(t,e){let r=_typeutils.getValues.call(void 0, St).filter(i=>!e.getValue("columnNames",i)),n=r.length===0?{}:await _inquirer2.default.prompt(r.map(i=>{let s=_chunk6WIX75ZFcjs.h.call(void 0, i.replace("ColumnName","")),o=Tt(t,s,Sa[i],!!Ia[i]);return{name:i,message:`Choose the column that will be used to map in the field: ${s}`,type:"list",default:o[0],choices:o}}));return await Promise.all(_typeutils.getEntries.call(void 0, n).map(([i,s])=>e.setValue(s,"columnNames",i))),n}async function nl(t,e,{state:r,columnNameMap:n}){let i=A=>r.getValue("columnNames",A)||n[A],{internalSubjects:s}=await l(t,nr);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for request action"));let o=await mt(He(e,i("requestType")),Object.values(_privacytypes.RequestAction),r.getValue("requestTypeToRequestAction"));await r.setValue(o,"requestTypeToRequestAction"),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for subject"));let p=await mt(He(e,i("subjectType")),s.map(({type:A})=>A),r.getValue("subjectTypeToSubjectName"));await r.setValue(p,"subjectTypeToSubjectName"),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for locale"));let c=await mt(He(e,i("locale")),Object.values(_internationalization.LOCALE_KEY),r.getValue("languageToLocale"));await r.setValue(c,"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 u=i("requestStatus"),m=u===Y?{}:await mt(He(e,u),[...Object.values(_privacytypes.CompletedRequestStatus),Y],r.getValue("statusToRequestStatus"));await r.setValue(m,"statusToRequestStatus"),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for country"));let d=i("country"),f=d===Y?{}:await mt(He(e,d),[...Object.values(_privacytypes.IsoCountryCode),Y],r.getValue("regionToCountry"));await r.setValue(f,"regionToCountry"),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for country sub division"));let g=i("countrySubDivision"),y=g===Y?{}:await mt(He(e,g),[...Object.values(_privacytypes.IsoCountrySubdivisionCode),Y],r.getValue("regionToCountrySubDivision"));await r.setValue(y,"regionToCountrySubDivision")}var _iotstypes = require('io-ts-types');var fd=ae.record(ae.string,ae.array(ae.intersection([ae.type({value:ae.string}),ae.partial({name:ae.string})]))),cq= exports.rf =ae.intersection([ae.type({email:ae.string,attestedExtraIdentifiers:fd,coreIdentifier:ae.string,requestType:_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction),subjectType:ae.string}),ae.partial({country:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode),countrySubDivision:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode),attributes:ae.array(wa),status:_typeutils.valuesOf.call(void 0, _privacytypes.CompletedRequestStatus),createdAt:_iotstypes.DateFromISOString,dataSiloIds:ae.array(ae.string),locale:_typeutils.valuesOf.call(void 0, _internationalization.LOCALE_KEY)})]);function gd(t,e,r){if(e===_privacytypes.IdentifierType.Email)return t.toLowerCase();if(e===_privacytypes.IdentifierType.Phone){let n=t.replace(_privacytypes.NORMALIZE_PHONE_NUMBER,"").replace(/[()]/g,"").replace(/[–]/g,"").replace(/[:]/g,"").replace(/[]/g,"").replace(/[A-Za-z]/g,"");return n?n.startsWith("+")?n:`+${r}${n}`:""}return t}function ol(t,e,{columnNameMap:r,identifierNameMap:n,attributeNameMap:i,requestAttributeKeys:s,defaultPhoneCountryCode:o="1"}){let p=c=>e.getValue("columnNames",c)||r[c];return t.map(c=>{let u={};Object.entries(n).filter(([,g])=>g!==Y).forEach(([g,y])=>{let A=Object.values(_privacytypes.IdentifierType).includes(g)?g:_privacytypes.IdentifierType.Custom,R=c[y];if(R){let I=gd(R,A,o);I&&(u[A]||(u[A]=[]),u[A].push({value:I,name:g}))}});let m=[];Object.entries(i).filter(([,g])=>g!==Y).forEach(([g,y])=>{let A=c[y];if(A){let R=_optionalChain([s, 'access', _94 => _94.find, 'call', _95 => _95(I=>I.name===g), 'optionalAccess', _96 => _96.type])==="MULTI_SELECT";m.push({values:R?ui(A):A,key:g})}});let d=p("requestType"),f=p("subjectType");return[c,{email:c[p("email")],attestedExtraIdentifiers:u,attributes:m,coreIdentifier:c[p("coreIdentifier")],requestType:d===Kt?e.getValue("requestTypeToRequestAction",ci):e.getValue("requestTypeToRequestAction",c[d]),subjectType:f===Kt?e.getValue("subjectTypeToSubjectName",ci):e.getValue("subjectTypeToSubjectName",c[f]),...p("locale")!==Y&&c[p("locale")]?{locale:e.getValue("languageToLocale",c[p("locale")])}:{},...p("country")!==Y&&c[p("country")]?{country:e.getValue("regionToCountry",c[p("country")])}:{},...p("countrySubDivision")!==Y&&c[p("countrySubDivision")]?{countrySubDivision:e.getValue("regionToCountrySubDivision",c[p("countrySubDivision")])}:{},...p("requestStatus")!==Y&&e.getValue("statusToRequestStatus",c[p("requestStatus")])!==Y&&c[p("requestStatus")]?{status:e.getValue("statusToRequestStatus",c[p("requestStatus")])}:{},...p("createdAt")!==Y&&c[p("createdAt")]?{createdAt:new Date(c[p("createdAt")])}:{},...p("dataSiloIds")!==Y&&c[p("dataSiloIds")]?{dataSiloIds:ui(c[p("dataSiloIds")])}:{}}]})}var _path = require('path');var pl=x.type({defaultMessage:x.string,id:x.string}),Sd= exports.vf =x.type({downloadKey:x.string,error:x.union([x.null,x.string]),mimetype:x.string,size:x.string,fileName:x.string,dataPoint:x.type({id:x.string,title:x.union([pl,x.null]),description:x.union([pl,x.null]),name:x.string,slug:x.string,encryption:x.union([_typeutils.valuesOf.call(void 0, _privacytypes.TableEncryptionType),x.null]),dataSilo:x.type({id:x.string,title:x.string,description:x.string,type:x.string,outerType:x.union([x.string,x.null])}),path:x.array(x.string)})}),Id= exports.wf =x.type({nodes:x.array(Sd),totalCount:x.number,_links:x.partial({next:x.union([x.string,x.null]),previous:x.union([x.string,x.null])})});async function ll(t,{sombra:e,concurrency:r=5,limit:n=100}){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Pulling file metadata for ${t.length} requests`));let i=new Date().getTime(),s=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),o=0;s.start(t.length,0);let p=await _bluebird.map.call(void 0, t,async m=>{let d=[],f=!0,g=0;for(;f;){let y;try{let A=await e.get(`v1/data-subject-request/${m.id}/download-keys`,{searchParams:{limit:n,offset:g}}).json();y=_typeutils.decodeCodec.call(void 0, Id,A),d.push(...y.nodes),g+=n,f=!!y._links.next&&y.nodes.length===n}catch(A){throw new Error(`Received an error from server: ${_optionalChain([A, 'optionalAccess', _97 => _97.response, 'optionalAccess', _98 => _98.body])||_optionalChain([A, 'optionalAccess', _99 => _99.message])}`)}}return o+=1,s.update(o),[m,d]},{concurrency:r});s.stop();let u=new Date().getTime()-i;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully downloaded file metadata ${t.length} requests in "${u/1e3}" seconds!`)),p}async function cl(t,{requestId:e,sombra:r,onFileDownloaded:n,concurrency:i=20}){await _bluebird.map.call(void 0, t,async s=>{try{await r.get("v1/files",{searchParams:{downloadKey:s.downloadKey}}).buffer().then(o=>n(s,o))}catch(o){if(_optionalChain([o, 'optionalAccess', _100 => _100.response, 'optionalAccess', _101 => _101.body, 'optionalAccess', _102 => _102.includes, 'call', _103 => _103("fileMetadata#verify")])){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to pull file for: ${s.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([o, 'optionalAccess', _104 => _104.response, 'optionalAccess', _105 => _105.body])||_optionalChain([o, 'optionalAccess', _106 => _106.message])}`)}},{concurrency:i})}async function kq({auth:t,folderPath:e,requestIds:r,createdAtBefore:n,sombraAuth:i,createdAtAfter:s,statuses:o=[_privacytypes.RequestStatus.Approving,_privacytypes.RequestStatus.Downloadable],concurrency:p=5,transcendUrl:c=_chunk6WIX75ZFcjs.r,approveAfterDownload:u=!1}){let m=Z(c,t),d=await nt(c,t,i);_fs.existsSync.call(void 0, e)||_fs.mkdirSync.call(void 0, e);let f=await le(m,{actions:[_privacytypes.RequestAction.Access],createdAtBefore:n,createdAtAfter:s,statuses:o,requestIds:r}),g=await ll(f,{sombra:d,concurrency:p}),y=new Date().getTime(),A=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),R=0,I=0;A.start(f.length,0),await _bluebird.map.call(void 0, g,async([_,H])=>{let K=_path.join.call(void 0, e,_.id);_fs.existsSync.call(void 0, K)||_fs.mkdirSync.call(void 0, K),await cl(H,{sombra:d,requestId:_.id,onFileDownloaded:(se,J)=>{let me=_path.join.call(void 0, K,se.fileName),ce=_path.dirname.call(void 0, me);_fs.existsSync.call(void 0, ce)||_fs.mkdirSync.call(void 0, ce,{recursive:!0}),_fs.writeFileSync.call(void 0, me,J)}}),u&&_.status===_privacytypes.RequestStatus.Approving&&(await l(m,or,{input:{requestId:_.id}}),I+=1),R+=1,A.update(R)},{concurrency:p}),A.stop();let C=new Date().getTime()-y;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully downloaded ${R} requests in "${C/1e3}" seconds!`)),I>0&&_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Approved ${I} requests in Transcend.`)),f.length}var un=re.type({id:re.string,link:re.string,status:_typeutils.valuesOf.call(void 0, _privacytypes.RequestStatus),type:_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction),subjectType:re.string,email:re.union([re.null,re.string]),coreIdentifier:re.string,isSilent:re.boolean,isTest:re.boolean,country:re.union([re.null,_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode)]),countrySubDivision:re.union([re.null,_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode)]),attributeValues:re.array(re.type({attributeKey:re.type({name:re.string}),name:re.string}))});async function fl(t,e,{details:r="",isTest:n=!1,emailIsVerified:i=!0,skipSendingReceipt:s=!1,isSilent:o=!0,additionalAttributes:p=[]}={}){let c=[...p];(e.attributes||[]).forEach(d=>{let f=c.find(g=>g.key===d.key);f?(f.values.push(...d.values),f.values=_chunk6WIX75ZFcjs.j.call(void 0, f.values)):c.push(d)});let u;try{u=await t.post("v1/data-subject-request",{json:{type:e.requestType,subject:{coreIdentifier:e.coreIdentifier,email:e.email,emailIsVerified:i,attestedExtraIdentifiers:e.attestedExtraIdentifiers},subjectType:e.subjectType,isSilent:o,isTest:n,skipSendingReceipt:s,...e.locale?{locale:e.locale}:{},details:r,attributes:c,...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(d){throw new Error(`Received an error from server: ${_optionalChain([d, 'optionalAccess', _107 => _107.response, 'optionalAccess', _108 => _108.body])||_optionalChain([d, 'optionalAccess', _109 => _109.message])}`)}let{request:m}=_typeutils.decodeCodec.call(void 0, re.type({request:un}),u);return m}async function zq({requestActions:t,requestOrigins:e,auth:r,silentModeBefore:n,createdAtAfter:i,createdAtBefore:s,concurrency:o=50,transcendUrl:p=_chunk6WIX75ZFcjs.r}){let c=Z(p,r),u=new Date().getTime(),m=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),d=await le(c,{actions:t,statuses:[_privacytypes.RequestStatus.Approving],createdAtAfter:i,origins:e,createdAtBefore:s});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Approving "${d.length}" requests.`));let f=0,g=0;m.start(d.length,0),await _bluebird.map.call(void 0, d,async R=>{n&&new Date(n)>new Date(R.createdAt)&&await l(c,At,{input:{id:R.id,isSilent:!0}});try{await l(c,or,{input:{requestId:R.id}})}catch(I){I.message.includes("Request must be in an approving state,")&&(g+=1)}f+=1,m.update(f)},{concurrency:o}),m.stop();let A=new Date().getTime()-u;return g>0&&_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`${g} requests were skipped.`)),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully approved ${f} requests in "${A/1e3}" seconds!`)),d.length}async function nL({requestActions:t=Object.values(_privacytypes.RequestAction),auth:e,requestIds:r,createdAtBefore:n,days:i=45,daysLeft:s=10,createdAtAfter:o,emailTemplate:p="Additional Time Needed",concurrency:c=100,transcendUrl:u=_chunk6WIX75ZFcjs.r}){let m=Z(u,e),d=new Date().getTime(),f=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),y=(await gt(m,p)).find(C=>C.title===p);if(!y)throw new Error(`Failed to find a template with title: "${p}"`);let A=await le(m,{actions:t,createdAtBefore:n,createdAtAfter:o,isSilent:!1,isClosed:!1,requestIds:r});A=A.filter(C=>typeof C.daysRemaining=="number"&&C.daysRemaining<s),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Notifying "${A.length}" that more time is needed.`));let R=0;f.start(A.length,0),await _bluebird.map.call(void 0, A,async C=>{await l(m,ho,{input:{requestId:C.id,template:y.template.defaultMessage,subject:y.subject.defaultMessage,additionalTime:i}}),R+=1,f.update(R)},{concurrency:c}),f.stop();let L=new Date().getTime()-d;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully marked ${R} requests as silent mode in "${L/1e3}" seconds!`)),A.length}async function Cl(t,e,r){let{initializer:n}=await l(t,Ln),i=n.identifiers.filter(({name:o})=>!r.getValue("identifierNames",o)&&!pr.includes(o)),s=i.length===0?{}:await _inquirer2.default.prompt(i.map(({name:o})=>{let p=Tt(e,o,!1);return{name:o,message:`Choose the column that will be used to map in the identifier: ${o}`,type:"list",default:p[0],choices:p}}));return await Promise.all(Object.entries(s).map(([o,p])=>r.setValue(p,"identifierNames",o))),{...r.getValue("identifierNames"),...s}}async function TL({requestActions:t,cancellationTitle:e,auth:r,requestIds:n,silentModeBefore:i,createdAtBefore:s,createdAtAfter:o,statuses:p=[_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:c=50,transcendUrl:u=_chunk6WIX75ZFcjs.r}){let m=Z(u,r),d=new Date().getTime(),f=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),g;if(e){let C=(await gt(m,e)).find(_=>_.title===e);if(!C)throw new Error(`Failed to find a template with title: "${e}"`);g=C}let y=await le(m,{actions:t,createdAtBefore:s,createdAtAfter:o,statuses:p,requestIds:n});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Canceling "${y.length}" requests${g?` Using template: ${g.title}`:""}.`));let A=0;f.start(y.length,0),await _bluebird.map.call(void 0, y,async L=>{i&&new Date(i)>new Date(L.createdAt)&&await l(m,At,{input:{id:L.id,isSilent:!0}}),await l(m,yo,{input:{requestId:L.id,...g?{subject:`Re: ${g.subject.defaultMessage}`,template:g.template.defaultMessage}:{}}}),A+=1,f.update(A)},{concurrency:c}),f.stop();let I=new Date().getTime()-d;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully canceled ${A} requests in "${I/1e3}" seconds!`)),y.length}async function Il(t,e,r,n){let i=n.filter(({name:o})=>!r.getValue("attributeNames",o)),s=i.length===0?{}:await _inquirer2.default.prompt(i.map(({name:o})=>{let p=Tt(e,o,!1);return{name:o,message:`Choose the column that will be used to map in the attribute: ${o}`,type:"list",default:p[0],choices:p}}));return await Promise.all(Object.entries(s).map(([o,p])=>r.setValue(p,"attributeNames",o))),{...r.getValue("attributeNames"),...s}}var Tl=/{\\"message\\":\\"(.+?)\\",/;function Or(t){return Tl.test(t)?Tl.exec(t)[1]:null}var _persistedstate = require('@transcend-io/persisted-state');async function ZL({cacheFilepath:t,requestReceiptFolder:e,file:r,auth:n,sombraAuth:i,concurrency:s=100,defaultPhoneCountryCode:o="1",transcendUrl:p=_chunk6WIX75ZFcjs.r,attributes:c=[],emailIsVerified:u=!0,skipFilterStep:m=!1,skipSendingReceipt:d=!0,isTest:f=!1,isSilent:g=!0,debug:y=!1,dryRun:A=!1}){let R=new Date().getTime(),I=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),L=$a(c),C=new (0, _persistedstate.PersistedState)(t,Ta,{columnNames:{},requestTypeToRequestAction:{},subjectTypeToSubjectName:{},languageToLocale:{},statusToRequestStatus:{},identifierNames:{},attributeNames:{},regionToCountrySubDivision:{},regionToCountry:{}}),_=_path.join.call(void 0, e,`tr-request-upload-${new Date().toISOString()}-${r.split("/").pop()}`.replace(".csv",".json")),H=new (0, _persistedstate.PersistedState)(_,Pa,{successfulRequests:[],duplicateRequests:[],failingRequests:[]}),K=await nt(p,n,i),se=Da(r,Xt.record(Xt.string,Xt.string)),J=_chunk6WIX75ZFcjs.j.call(void 0, se.map(Ae=>Object.keys(Ae)).flat());if(se.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(y){let Ae=se[0];_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`First request: ${JSON.stringify(Ae,null,2)}`))}let me=m?se:await La(se),ce=Z(p,n),X=await _a(ce),Se=await il(J,C),Ie=await Cl(ce,J,C),pe=await Il(ce,J,C,X);await nl(ce,me,{state:C,columnNameMap:Se});let de=ol(me,C,{defaultPhoneCountryCode:o,columnNameMap:Se,identifierNameMap:Ie,attributeNameMap:pe,requestAttributeKeys:X});y||I.start(de.length,0);let we=0;await _bluebird.map.call(void 0, de,async([Ae,ne],ue)=>{let Ee=y?`email:${ne.email} | coreIdentifier:${ne.coreIdentifier}`:`row:${ue.toString()}`;if(y&&_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`[${ue+1}/${de.length}] Importing: ${JSON.stringify(ne,null,2)}`)),A){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Bailing out on dry run because dryRun is set"));return}try{let S=await fl(K,ne,{details:`Uploaded by Transcend Cli: "tr-request-upload" : ${JSON.stringify(Ae,null,2)}`,isTest:f,emailIsVerified:u,skipSendingReceipt:d,isSilent:g,additionalAttributes:L});y&&(_chunkZUNVPK23cjs.a.info(_colors2.default.green(`[${ue+1}/${de.length}] Successfully submitted the test data subject request: "${Ee}"`)),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`[${ue+1}/${de.length}] View it at: "${S.link}"`)));let O=H.getValue("successfulRequests");O.push({id:S.id,link:S.link,rowIndex:ue,coreIdentifier:S.coreIdentifier,attemptedAt:new Date().toISOString()}),await H.setValue(O,"successfulRequests")}catch(S){let O=`${S.message} - ${JSON.stringify(_optionalChain([S, 'access', _110 => _110.response, 'optionalAccess', _111 => _111.body]),null,2)}`,fe=Or(O);if(fe==="Client error: You have already made this request."){y&&_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`[${ue+1}/${de.length}] Skipping request as it is a duplicate`));let ge=H.getValue("duplicateRequests");ge.push({coreIdentifier:ne.coreIdentifier,rowIndex:ue,attemptedAt:new Date().toISOString()}),await H.setValue(ge,"duplicateRequests")}else{let ge=H.getValue("failingRequests");ge.push({...ne,rowIndex:ue,error:fe||O,attemptedAt:new Date().toISOString()}),await H.setValue(ge,"failingRequests"),y&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(fe||O)),_chunkZUNVPK23cjs.a.error(_colors2.default.red(`[${ue+1}/${de.length}] Failed to submit request for: "${Ee}"`)))}}we+=1,y||I.update(we)},{concurrency:s}),I.stop();let Ze=new Date().getTime()-R;_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Completed upload in "${Ze/1e3}" seconds.`)),H.getValue("duplicateRequests").length>0&&_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`Encountered "${H.getValue("duplicateRequests").length}" duplicate requests. See "${_}" to review the core identifiers for these requests.`)),H.getValue("failingRequests").length>0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Encountered "${H.getValue("failingRequests").length}" errors. See "${_}" to review the error messages and inputs.`)),process.exit(1))}async function bl(t,e,{sendEmailReceipt:r=!1,skipWaitingPeriod:n=!1,emailIsVerified:i=!0,requestIdentifiers:s=[]}={}){let o=await t.post("v1/data-subject-request",{json:{type:e.type,subject:{coreIdentifier:e.coreIdentifier,email:e.email,emailIsVerified:i,...s.length>0?{attestedExtraIdentifiers:_typeutils.apply.call(void 0, _chunk6WIX75ZFcjs.d.call(void 0, s.filter(c=>!(c.name==="email"&&c.value===e.email)&&!pr.includes(c.name)).map(c=>({...c,type:Object.values(_privacytypes.IdentifierType).includes(c.name)?c.name:_privacytypes.IdentifierType.Custom})),"type"),(c,u)=>c.map(({name:m,value:d})=>({...u===_privacytypes.IdentifierType.Custom?{name:m}:{},value:d})))}:{}},requestId:e.id,subjectType:e.subjectType,isSilent:e.isSilent,isTest:e.isTest,locale:e.locale,skipWaitingPeriod:n,createdAt:e.createdAt,details:`Restarted by Transcend cli: "tr-request-restart" - ${e.details}`,skipSendingReceipt:!r}}).json(),{request:p}=_typeutils.decodeCodec.call(void 0, Rl.type({request:un}),o);return p}var Zd=Ye.intersection([lr,Ye.type({error:Ye.string})]),zd=Ye.type({restartedRequests:Ye.array(lr),failingRequests:Ye.array(Zd)});async function fv({requestReceiptFolder:t,auth:e,sombraAuth:r,requestActions:n,requestStatuses:i,createdAtBefore:s,createdAtAfter:o,transcendUrl:p=_chunk6WIX75ZFcjs.r,requestIds:c=[],createdAt:u=new Date,silentModeBefore:m,sendEmailReceipt:d=!1,emailIsVerified:f=!0,copyIdentifiers:g=!1,skipWaitingPeriod:y=!1,concurrency:A=20}){let R=new Date().getTime(),I=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),L=_path.join.call(void 0, t,`tr-request-restart-${new Date().toISOString()}.json`),C=new (0, _persistedstate.PersistedState)(L,zd,{restartedRequests:[],failingRequests:[]}),_=await nt(p,e,r),H=Z(p,e),se=(await le(H,{requestIds:c,actions:n,statuses:i,createdAtBefore:s,createdAtAfter:o})).filter(X=>new Date(X.createdAt)<u);if(_chunkZUNVPK23cjs.a.info(`Found ${se.length} requests to restart`),g&&_chunkZUNVPK23cjs.a.info("copyIdentifiers detected - All Identifiers will be copied."),d&&_chunkZUNVPK23cjs.a.info("sendEmailReceipt detected - Email receipts will be sent."),y&&_chunkZUNVPK23cjs.a.info("skipWaitingPeriod detected - Waiting period will be skipped."),c.length>0&&c.length!==se.length){let X=_chunk6WIX75ZFcjs.c.call(void 0, c,se.map(({id:Se})=>Se));X.length>0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to find the following requests by ID: ${X.join(",")}.`)),process.exit(1))}let J=0;I.start(se.length,0),await _bluebird.map.call(void 0, se,async(X,Se)=>{try{let Ie=g?await Pr(H,_,{requestId:X.id}):[],pe=await bl(_,{...X,isSilent:m&&new Date(X.createdAt)<m?!0:X.isSilent},{requestIdentifiers:Ie,skipWaitingPeriod:y,sendEmailReceipt:d,emailIsVerified:f}),de=C.getValue("restartedRequests");de.push({id:pe.id,link:pe.link,rowIndex:Se,coreIdentifier:pe.coreIdentifier,attemptedAt:new Date().toISOString()}),await C.setValue(de,"restartedRequests")}catch(Ie){let pe=`${Ie.message} - ${JSON.stringify(_optionalChain([Ie, 'access', _112 => _112.response, 'optionalAccess', _113 => _113.body]),null,2)}`,de=Or(pe),we=C.getValue("failingRequests");we.push({id:X.id,link:X.link,rowIndex:Se,coreIdentifier:X.coreIdentifier,attemptedAt:new Date().toISOString(),error:de||pe}),await C.setValue(we,"failingRequests")}J+=1,I.update(J)},{concurrency:A}),I.stop();let ce=new Date().getTime()-R;_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Completed restarting of requests in "${ce/1e3}" seconds.`)),C.getValue("failingRequests").length>0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Encountered "${C.getValue("failingRequests").length}" errors. See "${_path.resolve.call(void 0, L)}" to review the error messages and inputs.`)),process.exit(1))}async function Pv({enricherIds:t,auth:e,concurrency:r=100,transcendUrl:n=_chunk6WIX75ZFcjs.r}){let i=Z(n,e),s=new Date().getTime(),o=await le(i,{statuses:[_privacytypes.RequestStatus.Enriching]});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Processing enricher: "${t.join(",")}" fetched "${o.length}" in enriching status.`));let p=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),c=0;p.start(o.length,0);let u=0;await _bluebird.map.call(void 0, o,async f=>{let y=(await Tr(i,{requestId:f.id})).filter(A=>t.includes(A.enricher.id)&&![_privacytypes.RequestEnricherStatus.Resolved,_privacytypes.RequestEnricherStatus.Skipped].includes(A.status));y.length>0&&await _bluebird.mapSeries.call(void 0, y,async A=>{try{await l(i,Po,{requestEnricherId:A.id}),u+=1}catch(R){if(!R.message.includes("Client error: Cannot skip Request enricher because it has already completed"))throw R}}),c+=1,p.update(c)},{concurrency:r}),p.stop();let d=new Date().getTime()-s;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully skipped "${u}" for "${o.length}" requests in "${d/1e3}" seconds!`)),o.length}async function kv({auth:t,requestActions:e=[],createdAtBefore:r,createdAtAfter:n,transcendUrl:i=_chunk6WIX75ZFcjs.r,requestEnricherStatuses:s=Object.values(_privacytypes.RequestEnricherStatus),requestIds:o=[],enricherId:p,concurrency:c=20}){let u=new Date().getTime(),m=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),d=Z(i,t);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Fetching requests to restart..."));let f=await le(d,{actions:e,statuses:[_privacytypes.RequestStatus.Enriching],createdAtBefore:r,createdAtAfter:n,requestIds:o}),g=0;if(o.length>0&&o.length!==f.length){let I=_chunk6WIX75ZFcjs.c.call(void 0, o,f.map(({id:L})=>L));I.length>0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to find the following requests by ID: ${I.join(",")}.`)),process.exit(1))}let y=0;m.start(f.length,0),await _bluebird.map.call(void 0, f,async I=>{let C=(await Tr(d,{requestId:I.id})).filter(_=>_.enricher.id===p&&s.includes(_.status));await _bluebird.map.call(void 0, C,async _=>{await gp(d,_.id),g+=1}),y+=1,m.update(y)},{concurrency:c}),m.stop();let R=new Date().getTime()-u;_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Completed restarting of ${f.length} requests and ${g} enrichers in "${R/1e3}" seconds.`))}async function Vv({requestActions:t,dataSiloId:e,auth:r,concurrency:n=20,transcendUrl:i=_chunk6WIX75ZFcjs.r}){let s=Z(i,r),o=new Date().getTime(),p=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),c=await le(s,{actions:t,statuses:[_privacytypes.RequestStatus.Compiling,_privacytypes.RequestStatus.Approving]});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Retrying requests for Data Silo: "${e}", restarting "${c.length}" requests.`));let u=0,m=0;p.start(c.length,0),await _bluebird.map.call(void 0, c,async g=>{try{let y=await ep(s,{requestId:g.id,dataSiloId:e});await l(s,Fo,{requestDataSiloId:y.id})}catch(y){if(!y.message.includes("Failed to find RequestDataSilo"))throw y;m+=1}u+=1,p.update(u)},{concurrency:n}),p.stop();let f=new Date().getTime()-o;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully notified Transcend in "${f/1e3}" seconds for ${u} requests, ${m} requests were skipped because data silo was not attached to the request!`)),c.length}async function ek({auth:t,sombraAuth:e,actions:r=[],statuses:n=[],identifierSearch:i,pageLimit:s=100,transcendUrl:o=_chunk6WIX75ZFcjs.r,createdAtBefore:p,skipRequestIdentifiers:c=!1,createdAtAfter:u,isTest:m}){let d=Z(o,t),f=await nt(o,t,e),g="";p&&(g+=` before ${p.toISOString()}`),u&&(g+=`${g?", and":""} after ${u.toISOString()}`),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`${r.length>0?`Pulling requests of type "${r.join('" , "')}"`:"Pulling all requests"}${g}`));let y=await le(d,{actions:r,text:i,statuses:n,createdAtBefore:p,createdAtAfter:u,isTest:m}),A=c?y.map(I=>({...I,requestIdentifiers:[]})):await _bluebird.map.call(void 0, y,async I=>{let L=await Pr(d,f,{requestId:I.id});return{...I,requestIdentifiers:L}},{concurrency:s});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Pulled ${A.length} requests`));let R=A.map(({attributeValues:I,requestIdentifiers:L,id:C,email:_,type:H,status:K,subjectType:se,details:J,createdAt:me,country:ce,locale:X,origin:Se,countrySubDivision:Ie,isSilent:pe,isTest:de,coreIdentifier:we,purpose:ke,...Ze})=>({"Request ID":C,"Created At":me,Email:_,"Core Identifier":we,"Request Type":H,"Data Subject Type":se,Status:K,Country:ce,"Country Sub Division":Ie,Details:J,Origin:Se,"Silent Mode":pe,"Is Test Request":de,Language:X,"Purpose Trigger Name":_optionalChain([ke, 'optionalAccess', _114 => _114.title])||_optionalChain([ke, 'optionalAccess', _115 => _115.name])||"","Purpose Trigger Value":_optionalChain([ke, 'optionalAccess', _116 => _116.consent, 'optionalAccess', _117 => _117.toString, 'call', _118 => _118()])||"",...(_optionalChain([ke, 'optionalAccess', _119 => _119.enrichedPreferences])||[]).reduce((Ae,ne)=>{let ue=_optionalChain([ne, 'access', _120 => _120.preferenceTopic, 'optionalAccess', _121 => _121.title, 'access', _122 => _122.defaultMessage])||ne.name;return ue?{...Ae,[ue]:ne.selectValues?ne.selectValues.map(Ee=>Ee.name).join(";"):_optionalChain([ne, 'access', _123 => _123.selectValue, 'optionalAccess', _124 => _124.name])||ne.booleanValue}:Ae},{}),...Ze,...Object.entries(_chunk6WIX75ZFcjs.d.call(void 0, I,"attributeKey.name")).reduce((Ae,[ne,ue])=>Object.assign(Ae,{[ne]:ue.map(({name:Ee})=>Ee).join(",")}),{}),...Object.entries(_chunk6WIX75ZFcjs.d.call(void 0, L,"name")).reduce((Ae,[ne,ue])=>Object.assign(Ae,{[ne]:ue.map(({value:Ee})=>Ee).join(",")}),{})}));return{requestsWithRequestIdentifiers:A,requestsFormattedForCsv:R}}async function lk({dataSiloId:t,auth:e,concurrency:r=50,maxUploadPerChunk:n=5e4,status:i="SKIPPED",transcendUrl:s=_chunk6WIX75ZFcjs.r,requestStatuses:o=[_privacytypes.RequestStatus.Compiling,_privacytypes.RequestStatus.Secondary]}){let p=Z(s,e),c=new Date().getTime(),u=await Xa(p,{dataSiloId:t,requestStatuses:o});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Marking ${u} request data silos as completed`));let m=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),d=0;for(m.start(u,0);d<u;){let y=await Yi(p,{dataSiloId:t,requestStatuses:o,limit:n,onProgress:A=>{d+=A/2,m.update(d)}});await _bluebird.map.call(void 0, y,async A=>{try{await l(p,Mo,{requestDataSiloId:A.id,status:i})}catch(R){if(!R.message.includes("Client error: Request must be active:"))throw R}d+=.5,m.update(d)},{concurrency:r})}m.stop();let g=new Date().getTime()-c;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully skipped "${u}" requests in "${g/1e3}" seconds!`)),u}async function Ak({requestActions:t,identifierNames:e,auth:r,concurrency:n=20,transcendUrl:i=_chunk6WIX75ZFcjs.r}){let s=Z(i,r),o=new Date().getTime(),p=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),c=await le(s,{actions:t,statuses:[_privacytypes.RequestStatus.Enriching]});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Fetched requests in preflight/enriching state."));let u=0,m=0;p.start(c.length,0),await _bluebird.map.call(void 0, c,async g=>{let A=(await Ka(s,{requestId:g.id})).filter(({isVerifiedAtLeastOnce:R,name:I})=>R===!1&&e.includes(I)).map(({id:R})=>R);A.length>0&&(await l(s,jo,{input:{requestId:g.id,requestIdentifierIds:A}}),m+=A.length),u+=1,p.update(u)},{concurrency:n}),p.stop();let f=new Date().getTime()-o;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully cleared out unverified identifiers "${f/1e3}" seconds for ${u} requests, ${m} identifiers were cleared out!`)),c.length}async function r_({message:t}){let{response:e}=await _inquirer2.default.prompt([{name:"response",message:t,type:"confirm"}]);return e}async function i_({message:t}){let{response:e}=await _inquirer2.default.prompt([{name:"response",message:t,type:"text",validate:r=>r.trim().length>0}]);return e}async function n_({defaultValue:t,values:e,message:r}){_inquirer2.default.registerPrompt("autocomplete",_inquirerautocompleteprompt2.default);let{response:n}=await _inquirer2.default.prompt([{name:"response",message:r,type:"autocomplete",default:t,source:(i,s)=>s?e.filter(o=>typeof o=="string"&&It(s,o)):e}]);return n}function s_(t){let e=t.split(",").filter(n=>!!n),r={};return e.forEach(n=>{let[i,s]=n.split(":");if(!i||!s)throw new Error(`Invalid variable: ${n}. Expected format: key:value`);r[i]=s}),r}function Bl(t){let e=t;return _nullishCoalesce(_optionalChain([e, 'optionalAccess', _125 => _125.response, 'optionalAccess', _126 => _126.statusCode]), () => (_optionalChain([e, 'optionalAccess', _127 => _127.response, 'optionalAccess', _128 => _128.status])))}function Ql(t){let e=t,r=_optionalChain([e, 'optionalAccess', _129 => _129.response, 'optionalAccess', _130 => _130.body])||_optionalChain([e, 'optionalAccess', _131 => _131.message])||"Unknown error";try{let n=JSON.parse(r),i=n.errors||_optionalChain([n, 'access', _132 => _132.error, 'optionalAccess', _133 => _133.errors])||[_optionalChain([n, 'access', _134 => _134.error, 'optionalAccess', _135 => _135.message])||n.error];r=(Array.isArray(i)?i:[i]).filter(Boolean).join(", ")}catch (e2){}return r}function Nr(t){return new Promise(e=>{setTimeout(()=>e(t),t)})}function u_(t){let e=Math.floor(t.length/2);return[t.slice(0,e),t.slice(e)]}async function y_(t,e,r){let n=0;for(;;)try{return await t()}catch(i){n+=1;let s=Bl(i),o=Ql(i);if(!(n<=e.maxAttempts&&e.shouldRetry(s,o)))throw i;r(`Retrying after status=${s} attempt=${n}/${e.maxAttempts} \u2014 ${o}`),await Nr(e.delayMs)}}function C_(t,e){return Object.entries(t).reduce((r,[n,i],s)=>(r[n]=s<e?i:!0,r),{})}var Vl= (_class =class{constructor() { _class.prototype.__init.call(this); }__init() {this.buckets=[]}add(e){let r=Date.now();this.buckets.push({t:r,n:e});let n=r-12e4;for(;this.buckets.length&&this.buckets[0].t<n;)this.buckets.shift()}rate(e){let n=Date.now()-e,i=0;for(let s=this.buckets.length-1;s>=0;s-=1){let o=this.buckets[s];if(o.t<n)break;i+=o.n}return i/(e/1e3)}}, _class);function T_(t){try{return t?_fs.readFileSync.call(void 0, t,"utf8"):""}catch (e3){return""}}function $_(t,e){t||(_chunkZUNVPK23cjs.a.error(_colors2.default.red("A --directory must be provided.")),e.process.exit(1));let r=[];try{r=_fs.readdirSync.call(void 0, t).filter(i=>i.endsWith(".parquet")).map(i=>_path.join.call(void 0, t,i)).filter(i=>{try{return _fs.statSync.call(void 0, i).isFile()}catch (e4){return!1}})}catch(n){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to read directory: ${t}`)),_chunkZUNVPK23cjs.a.error(_colors2.default.red(n.message)),e.process.exit(1)}return r.length===0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`No Parquet files found in directory: ${t}`)),e.process.exit(1)),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Found: ${r.join(", ")} parquet files`)),r}var _nodeapi = require('@duckdb/node-api');async function __(t){let{filePath:e,outputDir:r,clearOutputDir:n,onProgress:i}=t,s=r||_path.dirname.call(void 0, e),{name:o}=_path.parse.call(void 0, e),p=_path.join.call(void 0, s,`${o}.csv`);if(_fs.mkdirSync.call(void 0, s,{recursive:!0}),n&&_fs.existsSync.call(void 0, p))try{_fs.rmSync.call(void 0, p,{force:!0})}catch(m){_chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`Could not remove existing output file ${p}: ${m.message}`))}let c=await _nodeapi.DuckDBInstance.create(":memory:"),u=await c.connect();try{await Af(u,"PRAGMA temp_directory='';");let m=f=>`'${f.replace(/'/g,"''")}'`,d=`
|
|
2967
2967
|
COPY (SELECT * FROM read_parquet(${m(e)}))
|
|
2968
2968
|
TO ${m(p)}
|
|
2969
2969
|
(HEADER, DELIMITER ',', QUOTE '"', ESCAPE '"', NULL '');
|
|
2970
|
-
`;await
|
|
2971
|
-
|
|
2970
|
+
`;await jl(u,d),_optionalChain([i, 'optionalCall', _136 => _136(0,void 0)]),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Wrote CSV \u2192 ${p}`))}finally{await yn(u),await yn(c)}}async function jl(t,e){let r=await t.run(e);await yn(r)}async function Af(t,e){try{await jl(t,e)}catch (e5){}}async function yn(t){if(!(!t||typeof t.dispose!="function"))try{await t.dispose()}catch (e6){}}var G_=864e5,N_= exports.eg =36e5,M_= exports.fg =t=>Math.max(1,Math.min(50,_nullishCoalesce(t, () => (50)))),F_= exports.gg =t=>new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate())),U_= exports.hg =t=>new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours())),B_= exports.ig =(t,e)=>new Date(t.getTime()+e),Q_= exports.jg =(t,e)=>new Date(t.getTime()+e*864e5);var _fastcsv = require('fast-csv'); var Mr = _interopRequireWildcard(_fastcsv);function Zl(t){return t.includes('"')||t.includes(",")||t.includes(`
|
|
2971
|
+
`)?`"${t.replace(/"/g,'""')}"`:t}function j_(t,e,r){let n=[];n.push(r),n.push(...e.map(s=>Object.values(s)));let i=n.map(s=>s.map(Zl).join(",")).join(`
|
|
2972
|
+
`);_fs.writeFileSync.call(void 0, t,i)}function Y_(t,e){let n=e.map(i=>Object.values(i)).map(i=>i.map(Zl).join(",")).join(`
|
|
2973
|
+
`);_fs.appendFileSync.call(void 0, t,`
|
|
2974
|
+
${n}`)}async function Z_(t,e,r=!0){let n=_fs.createWriteStream.call(void 0, t);await new Promise((i,s)=>{try{let o=Mr.write(e,{headers:r,objectMode:!0}).on("error",s);n.on("error",s),n.on("finish",()=>i()),o.pipe(n)}catch(o){s(o)}})}function z_(t){let e=t.lastIndexOf(".");return{baseName:e!==-1?t.substring(0,e):t,extension:e!==-1?t.substring(e):".csv"}}function Tf(t,e){let r={};for(let n of e)r[n]=t[n];return r}function Pf(t){return new Promise(e=>{t.once("drain",e)})}async function W_(t,e,r=!0){let n;Array.isArray(r)?n=r:r===!0?n=e.length>0?Object.keys(e[0]):[]:n=!1;let i=_fs.createWriteStream.call(void 0, t),s=Mr.format({headers:n||void 0,objectMode:!0}),o=s.pipe(i),p=new Promise((c,u)=>{o.on("finish",()=>c()),o.on("error",u),s.on("error",u),i.on("error",u)});for(let c of e){let u=n?Tf(c,n):c;s.write(u)||await Pf(s)}return s.end(),await p,[t]}var Ef=4,Rf=["syntax error","got invalid value","Client error","cannot affect row a second time","GRAPHQL_VALIDATION_FAILED"];async function l(t,e,r,n,i=Ef){let s=0;for(;;)try{return await t.request(e,r,n)}catch(o){if(o.message.includes("API key is invalid")&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red("API key is invalid. Please ensure that the key provided to `transcendAuth` has the proper scope and is not expired, and that `transcendUrl` corresponds to the correct backend for your organization.")),process.exit(1)),Rf.some(p=>o.message.includes(p)))throw o;if(o.message.startsWith("Client error: Too many requests")){let p=_optionalChain([o, 'access', _137 => _137.response, 'access', _138 => _138.headers, 'optionalAccess', _139 => _139.get, 'call', _140 => _140("x-ratelimit-reset")]),c=p?new Date(p).getTime()-new Date().getTime()+100:1e3*10;_chunkZUNVPK23cjs.a.log(_colors2.default.yellow(`DETECTED RATE LIMIT: ${o.message}. Sleeping for ${c}ms`)),await Nr(c)}if(s>=i)throw o;s+=1,_chunkZUNVPK23cjs.a.log(_colors2.default.yellow(`Retrying failed request (${s/i}): ${o.message}`))}}async function IO(t,{promptRunId:e,promptRunMessages:r=[],...n}){let{addMessagesToPromptRun:{promptRun:i}}=await l(t,Xo,{input:{...n,...e,promptRunMessages:r.map(({content:s,...o})=>({...o,message:s}))}});return i.id}exports.a = En; exports.b = wf; exports.c = Rn; exports.d = $f; exports.e = bn; exports.f = wn; exports.g = xf; exports.h = Lf; exports.i = $n; exports.j = _f; exports.k = xn; exports.l = Qr; exports.m = Dn; exports.n = qn; exports.o = Ln; exports.p = vn; exports.q = kn; exports.r = _n; exports.s = On; exports.t = Gn; exports.u = Nn; exports.v = Mn; exports.w = nr; exports.x = Fn; exports.y = Un; exports.z = Bn; exports.A = Qn; exports.B = Vn; exports.C = Kn; exports.D = jn; exports.E = Yn; exports.F = Zn; exports.G = zn; exports.H = Hn; exports.I = Jn; exports.J = eo; exports.K = to; exports.L = ro; exports.M = io; exports.N = no; exports.O = oo; exports.P = so; exports.Q = ao; exports.R = po; exports.S = lo; exports.T = co; exports.U = mo; exports.V = fo; exports.W = go; exports.X = or; exports.Y = yo; exports.Z = At; exports._ = ho; exports.$ = Ao; exports.aa = So; exports.ba = Io; exports.ca = To; exports.da = Po; exports.ea = zr; exports.fa = Ro; exports.ga = Sg; exports.ha = bo; exports.ia = wo; exports.ja = $o; exports.ka = xo; exports.la = Do; exports.ma = qo; exports.na = Lo; exports.oa = vo; exports.pa = ko; exports.qa = _o; exports.ra = Oo; exports.sa = Go; exports.ta = No; exports.ua = Wr; exports.va = Mo; exports.wa = Fo; exports.xa = Uo; exports.ya = Bo; exports.za = Qo; exports.Aa = Vo; exports.Ba = jo; exports.Ca = Yo; exports.Da = Zo; exports.Ea = Fg; exports.Fa = Wo; exports.Ga = Jo; exports.Ha = Xo; exports.Ia = es; exports.Ja = ts; exports.Ka = rs; exports.La = is; exports.Ma = ns; exports.Na = os; exports.Oa = ss; exports.Pa = as; exports.Qa = ps; exports.Ra = ls; exports.Sa = cs; exports.Ta = us; exports.Ua = ms; exports.Va = ds; exports.Wa = fs; exports.Xa = gs; exports.Ya = ys; exports.Za = hs; exports._a = Cs; exports.$a = As; exports.ab = Ss; exports.bb = Is; exports.cb = Ts; exports.db = Ps; exports.eb = Es; exports.fb = Rs; exports.gb = bs; exports.hb = ws; exports.ib = $s; exports.jb = xs; exports.kb = Ds; exports.lb = qs; exports.mb = Ls; exports.nb = vs; exports.ob = ks; exports.pb = _s; exports.qb = Os; exports.rb = Gs; exports.sb = Ns; exports.tb = Ms; exports.ub = Us; exports.vb = Bs; exports.wb = Qs; exports.xb = Vs; exports.yb = Ks; exports.zb = js; exports.Ab = Ys; exports.Bb = Zs; exports.Cb = zs; exports.Db = ri; exports.Eb = Ws; exports.Fb = Hs; exports.Gb = ly; exports.Hb = Js; exports.Ib = Xs; exports.Jb = ea; exports.Kb = ta; exports.Lb = ra; exports.Mb = ia; exports.Nb = na; exports.Ob = oa; exports.Pb = sa; exports.Qb = aa; exports.Rb = pa; exports.Sb = la; exports.Tb = ca; exports.Ub = ua; exports.Vb = ma; exports.Wb = da; exports.Xb = fa; exports.Yb = ga; exports.Zb = ya; exports._b = ha; exports.$b = Ca; exports.ac = Aa; exports.bc = Y; exports.cc = Kt; exports.dc = ci; exports.ec = pr; exports.fc = St; exports.gc = Sa; exports.hc = Ia; exports.ic = Ta; exports.jc = lr; exports.kc = Pa; exports.lc = It; exports.mc = Tt; exports.nc = mt; exports.oc = ui; exports.pc = wa; exports.qc = $a; exports.rc = Da; exports.sc = He; exports.tc = La; exports.uc = IO; exports.vc = Gc; exports.wc = Z; exports.xc = nt; exports.yc = dC; exports.zc = hC; exports.Ac = CC; exports.Bc = PC; exports.Cc = cr; exports.Dc = ur; exports.Ec = mr; exports.Fc = dr; exports.Gc = fr; exports.Hc = va; exports.Ic = ka; exports.Jc = WC; exports.Kc = _a; exports.Lc = Qc; exports.Mc = Vc; exports.Nc = Et; exports.Oc = gr; exports.Pc = Na; exports.Qc = De; exports.Rc = yr; exports.Sc = Kc; exports.Tc = dA; exports.Uc = Ma; exports.Vc = Pi; exports.Wc = hr; exports.Xc = Rt; exports.Yc = Ua; exports.Zc = jt; exports._c = bt; exports.$c = Cr; exports.ad = ve; exports.bd = Ba; exports.cd = Qa; exports.dd = Ar; exports.ed = Sr; exports.fd = Ir; exports.gd = Va; exports.hd = Tr; exports.id = Ka; exports.jd = Jc; exports.kd = Pr; exports.ld = ou; exports.md = xS; exports.nd = le; exports.od = br; exports.pd = OS; exports.qd = wr; exports.rd = au; exports.sd = $r; exports.td = pu; exports.ud = zS; exports.vd = Yt; exports.wd = za; exports.xd = Wa; exports.yd = Ha; exports.zd = xr; exports.Ad = Dr; exports.Bd = $t; exports.Cd = AI; exports.Dd = PI; exports.Ed = Xa; exports.Fd = Yi; exports.Gd = ep; exports.Hd = DI; exports.Id = kI; exports.Jd = NI; exports.Kd = MI; exports.Ld = QI; exports.Md = VI; exports.Nd = fu; exports.Od = gu; exports.Pd = rp; exports.Qd = yu; exports.Rd = hu; exports.Sd = Zi; exports.Td = Iu; exports.Ud = zi; exports.Vd = op; exports.Wd = Pu; exports.Xd = Eu; exports.Yd = sp; exports.Zd = ap; exports._d = pp; exports.$d = Ji; exports.ae = cp; exports.be = gt; exports.ce = up; exports.de = zt; exports.ee = dp; exports.fe = Du; exports.ge = AP; exports.he = PP; exports.ie = gp; exports.je = DP; exports.ke = yp; exports.le = ku; exports.me = _u; exports.ne = Cp; exports.oe = Ou; exports.pe = Gu; exports.qe = Ip; exports.re = Fu; exports.se = Uu; exports.te = Tp; exports.ue = Qu; exports.ve = Vu; exports.we = Pp; exports.xe = ju; exports.ye = Yu; exports.ze = Ep; exports.Ae = Rp; exports.Be = zu; exports.Ce = Wu; exports.De = wp; exports.Ee = em; exports.Fe = tm; exports.Ge = Dp; exports.He = om; exports.Ie = sm; exports.Je = Lp; exports.Ke = cm; exports.Le = um; exports.Me = qR; exports.Ne = xm; exports.Oe = Vp; exports.Pe = fm; exports.Qe = kp; exports.Re = Bm; exports.Se = Qm; exports.Te = Jp; exports.Ue = Dm; exports.Ve = qm; exports.We = Zp; exports.Xe = Gp; exports.Ye = vp; exports.Ze = Rm; exports._e = Fp; exports.$e = Tm; exports.af = Mp; exports.bf = Up; exports.cf = el; exports.df = Km; exports.ef = jm; exports.ff = Xp; exports.gf = Cm; exports.hf = Am; exports.if = Np; exports.jf = Mm; exports.kf = Fm; exports.lf = Hp; exports.mf = B$; exports.nf = _D; exports.of = il; exports.pf = nl; exports.qf = fd; exports.rf = cq; exports.sf = gd; exports.tf = ol; exports.uf = pl; exports.vf = Sd; exports.wf = Id; exports.xf = ll; exports.yf = cl; exports.zf = kq; exports.Af = un; exports.Bf = fl; exports.Cf = zq; exports.Df = nL; exports.Ef = Cl; exports.Ff = TL; exports.Gf = Il; exports.Hf = Or; exports.If = ZL; exports.Jf = bl; exports.Kf = fv; exports.Lf = Pv; exports.Mf = kv; exports.Nf = Vv; exports.Of = ek; exports.Pf = lk; exports.Qf = Ak; exports.Rf = r_; exports.Sf = i_; exports.Tf = n_; exports.Uf = s_; exports.Vf = Bl; exports.Wf = Ql; exports.Xf = Nr; exports.Yf = u_; exports.Zf = y_; exports._f = C_; exports.$f = Vl; exports.ag = T_; exports.bg = $_; exports.cg = __; exports.dg = G_; exports.eg = N_; exports.fg = M_; exports.gg = F_; exports.hg = U_; exports.ig = B_; exports.jg = Q_; exports.kg = j_; exports.lg = Y_; exports.mg = Z_; exports.ng = z_; exports.og = W_; exports.pg = l; exports.qg = Ui; exports.rg = Ja; exports.sg = O$;
|
|
2975
|
+
//# sourceMappingURL=chunk-GC3HFDP4.cjs.map
|