@transcend-io/cli 8.22.0 → 8.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/README.md +66 -2
  2. package/dist/bin/bash-complete.cjs +1 -1
  3. package/dist/bin/cli.cjs +1 -1
  4. package/dist/bin/deprecated-command.cjs +2 -2
  5. package/dist/{chunk-C5NJNKVT.cjs → chunk-2BE66TWZ.cjs} +2 -2
  6. package/dist/{chunk-C5NJNKVT.cjs.map → chunk-2BE66TWZ.cjs.map} +1 -1
  7. package/dist/{chunk-KYDVTWBL.cjs → chunk-2XQSEYJN.cjs} +4 -4
  8. package/dist/{chunk-KYDVTWBL.cjs.map → chunk-2XQSEYJN.cjs.map} +1 -1
  9. package/dist/{chunk-2NPTXG4Q.cjs → chunk-35M2UHP3.cjs} +20 -20
  10. package/dist/chunk-35M2UHP3.cjs.map +1 -0
  11. package/dist/{chunk-VD7RHIZE.cjs → chunk-3XTF7VNH.cjs} +2 -2
  12. package/dist/{chunk-VD7RHIZE.cjs.map → chunk-3XTF7VNH.cjs.map} +1 -1
  13. package/dist/{chunk-B4SOWGXW.cjs → chunk-6PBRBEB6.cjs} +2 -2
  14. package/dist/{chunk-B4SOWGXW.cjs.map → chunk-6PBRBEB6.cjs.map} +1 -1
  15. package/dist/{chunk-PEGEJINF.cjs → chunk-6UHNAU5E.cjs} +3 -3
  16. package/dist/{chunk-PEGEJINF.cjs.map → chunk-6UHNAU5E.cjs.map} +1 -1
  17. package/dist/chunk-7G4GYNZW.cjs +2967 -0
  18. package/dist/chunk-7G4GYNZW.cjs.map +1 -0
  19. package/dist/{chunk-NOWRZX7L.cjs → chunk-7GQWWCZJ.cjs} +2 -2
  20. package/dist/{chunk-NOWRZX7L.cjs.map → chunk-7GQWWCZJ.cjs.map} +1 -1
  21. package/dist/{chunk-2PSFXDKU.cjs → chunk-7XHY3X33.cjs} +2 -2
  22. package/dist/{chunk-2PSFXDKU.cjs.map → chunk-7XHY3X33.cjs.map} +1 -1
  23. package/dist/{chunk-2FX6UYVO.cjs → chunk-ADSUB7N2.cjs} +2 -2
  24. package/dist/{chunk-2FX6UYVO.cjs.map → chunk-ADSUB7N2.cjs.map} +1 -1
  25. package/dist/chunk-FYAACPAM.cjs +9 -0
  26. package/dist/chunk-FYAACPAM.cjs.map +1 -0
  27. package/dist/{chunk-OTIT6UGG.cjs → chunk-NAVO6PKA.cjs} +2 -2
  28. package/dist/{chunk-OTIT6UGG.cjs.map → chunk-NAVO6PKA.cjs.map} +1 -1
  29. package/dist/{impl-UBQSBBQ2.cjs → impl-2YA5HNSO.cjs} +2 -2
  30. package/dist/{impl-UBQSBBQ2.cjs.map → impl-2YA5HNSO.cjs.map} +1 -1
  31. package/dist/impl-4A4YOBQJ.cjs +2 -0
  32. package/dist/impl-4A4YOBQJ.cjs.map +1 -0
  33. package/dist/{impl-PL43BXBL.cjs → impl-4ENRMBVJ.cjs} +2 -2
  34. package/dist/{impl-PL43BXBL.cjs.map → impl-4ENRMBVJ.cjs.map} +1 -1
  35. package/dist/{impl-CORCBVSB.cjs → impl-6MNESSNI.cjs} +2 -2
  36. package/dist/{impl-CORCBVSB.cjs.map → impl-6MNESSNI.cjs.map} +1 -1
  37. package/dist/{impl-GNNYZPIO.cjs → impl-B5FR6WOP.cjs} +2 -2
  38. package/dist/{impl-GNNYZPIO.cjs.map → impl-B5FR6WOP.cjs.map} +1 -1
  39. package/dist/impl-DB36HMJD.cjs +2 -0
  40. package/dist/{impl-EQV67XCQ.cjs.map → impl-DB36HMJD.cjs.map} +1 -1
  41. package/dist/{impl-CKK4FPQU.cjs → impl-FCYBMIEG.cjs} +2 -2
  42. package/dist/{impl-CKK4FPQU.cjs.map → impl-FCYBMIEG.cjs.map} +1 -1
  43. package/dist/{impl-ZFQ6LKZE.cjs → impl-GSYCR26M.cjs} +2 -2
  44. package/dist/{impl-ZFQ6LKZE.cjs.map → impl-GSYCR26M.cjs.map} +1 -1
  45. package/dist/{impl-MCC55AYP.cjs → impl-IJTGXEUO.cjs} +2 -2
  46. package/dist/{impl-MCC55AYP.cjs.map → impl-IJTGXEUO.cjs.map} +1 -1
  47. package/dist/{impl-PGTIDK6M.cjs → impl-JWSUBLDR.cjs} +2 -2
  48. package/dist/{impl-PGTIDK6M.cjs.map → impl-JWSUBLDR.cjs.map} +1 -1
  49. package/dist/{impl-FNZT2TMA.cjs → impl-K6YYKYK6.cjs} +2 -2
  50. package/dist/{impl-FNZT2TMA.cjs.map → impl-K6YYKYK6.cjs.map} +1 -1
  51. package/dist/{impl-5V23OWYE.cjs → impl-KXUFD4EL.cjs} +3 -3
  52. package/dist/{impl-5V23OWYE.cjs.map → impl-KXUFD4EL.cjs.map} +1 -1
  53. package/dist/{impl-2UX5JCKQ.cjs → impl-LXNBRK64.cjs} +6 -6
  54. package/dist/{impl-2UX5JCKQ.cjs.map → impl-LXNBRK64.cjs.map} +1 -1
  55. package/dist/{impl-2BWD4YFV.cjs → impl-MCWW7F2X.cjs} +2 -2
  56. package/dist/{impl-2BWD4YFV.cjs.map → impl-MCWW7F2X.cjs.map} +1 -1
  57. package/dist/{impl-CEJFEMFU.cjs → impl-MKKN64FR.cjs} +2 -2
  58. package/dist/{impl-CEJFEMFU.cjs.map → impl-MKKN64FR.cjs.map} +1 -1
  59. package/dist/{impl-W2ATNS5R.cjs → impl-O7AF2R3R.cjs} +2 -2
  60. package/dist/{impl-W2ATNS5R.cjs.map → impl-O7AF2R3R.cjs.map} +1 -1
  61. package/dist/{impl-RZMPDQSO.cjs → impl-OTAZIKC5.cjs} +2 -2
  62. package/dist/{impl-RZMPDQSO.cjs.map → impl-OTAZIKC5.cjs.map} +1 -1
  63. package/dist/{impl-7SWDIF6R.cjs → impl-PA7CTDIF.cjs} +2 -2
  64. package/dist/{impl-7SWDIF6R.cjs.map → impl-PA7CTDIF.cjs.map} +1 -1
  65. package/dist/{impl-K6EY75SW.cjs → impl-QPEOUZY4.cjs} +2 -2
  66. package/dist/{impl-K6EY75SW.cjs.map → impl-QPEOUZY4.cjs.map} +1 -1
  67. package/dist/{impl-NNILSKEN.cjs → impl-QTONR67X.cjs} +2 -2
  68. package/dist/{impl-NNILSKEN.cjs.map → impl-QTONR67X.cjs.map} +1 -1
  69. package/dist/{impl-3ZVLFX4Q.cjs → impl-QTRXSBGD.cjs} +2 -2
  70. package/dist/{impl-3ZVLFX4Q.cjs.map → impl-QTRXSBGD.cjs.map} +1 -1
  71. package/dist/{impl-MJASP74U.cjs → impl-RGWK7VXC.cjs} +2 -2
  72. package/dist/{impl-MJASP74U.cjs.map → impl-RGWK7VXC.cjs.map} +1 -1
  73. package/dist/{impl-HFJOEEOI.cjs → impl-SNQVMKXB.cjs} +5 -5
  74. package/dist/{impl-HFJOEEOI.cjs.map → impl-SNQVMKXB.cjs.map} +1 -1
  75. package/dist/{impl-ODFDFL7V.cjs → impl-SNZNR565.cjs} +2 -2
  76. package/dist/{impl-ODFDFL7V.cjs.map → impl-SNZNR565.cjs.map} +1 -1
  77. package/dist/{impl-PFXTUJB5.cjs → impl-SW3WWCBX.cjs} +5 -5
  78. package/dist/{impl-PFXTUJB5.cjs.map → impl-SW3WWCBX.cjs.map} +1 -1
  79. package/dist/{impl-74SRCY2G.cjs → impl-SZWQVSVF.cjs} +2 -2
  80. package/dist/{impl-74SRCY2G.cjs.map → impl-SZWQVSVF.cjs.map} +1 -1
  81. package/dist/{impl-DMVYONWP.cjs → impl-UL4K2BKX.cjs} +2 -2
  82. package/dist/{impl-DMVYONWP.cjs.map → impl-UL4K2BKX.cjs.map} +1 -1
  83. package/dist/{impl-YTZMHOQ5.cjs → impl-VHP2K6TJ.cjs} +4 -4
  84. package/dist/{impl-YTZMHOQ5.cjs.map → impl-VHP2K6TJ.cjs.map} +1 -1
  85. package/dist/{impl-QHD2MO76.cjs → impl-VMK4MQWE.cjs} +2 -2
  86. package/dist/{impl-QHD2MO76.cjs.map → impl-VMK4MQWE.cjs.map} +1 -1
  87. package/dist/{impl-SJM642T5.cjs → impl-VSRZJJTS.cjs} +2 -2
  88. package/dist/{impl-SJM642T5.cjs.map → impl-VSRZJJTS.cjs.map} +1 -1
  89. package/dist/{impl-E3FJ2YBV.cjs → impl-W3CT5UPE.cjs} +3 -3
  90. package/dist/{impl-E3FJ2YBV.cjs.map → impl-W3CT5UPE.cjs.map} +1 -1
  91. package/dist/{impl-N3YTKGTI.cjs → impl-WN4LJFWV.cjs} +2 -2
  92. package/dist/{impl-N3YTKGTI.cjs.map → impl-WN4LJFWV.cjs.map} +1 -1
  93. package/dist/{impl-75UGTFO7.cjs → impl-WRM4G5MC.cjs} +2 -2
  94. package/dist/{impl-75UGTFO7.cjs.map → impl-WRM4G5MC.cjs.map} +1 -1
  95. package/dist/{impl-I3JIDHDO.cjs → impl-WUDP3CLG.cjs} +2 -2
  96. package/dist/{impl-I3JIDHDO.cjs.map → impl-WUDP3CLG.cjs.map} +1 -1
  97. package/dist/{impl-2L3QQZXF.cjs → impl-XAXNZHAR.cjs} +2 -2
  98. package/dist/{impl-2L3QQZXF.cjs.map → impl-XAXNZHAR.cjs.map} +1 -1
  99. package/dist/{impl-L375M254.cjs → impl-XEKCOKH7.cjs} +2 -2
  100. package/dist/{impl-L375M254.cjs.map → impl-XEKCOKH7.cjs.map} +1 -1
  101. package/dist/{impl-BIG2D6IR.cjs → impl-XYTJWYAB.cjs} +2 -2
  102. package/dist/{impl-BIG2D6IR.cjs.map → impl-XYTJWYAB.cjs.map} +1 -1
  103. package/dist/{impl-HD5KMFQF.cjs → impl-Y7SPHGE6.cjs} +2 -2
  104. package/dist/{impl-HD5KMFQF.cjs.map → impl-Y7SPHGE6.cjs.map} +1 -1
  105. package/dist/{impl-PT2CPB3V.cjs → impl-YA22OKOZ.cjs} +2 -2
  106. package/dist/{impl-PT2CPB3V.cjs.map → impl-YA22OKOZ.cjs.map} +1 -1
  107. package/dist/{impl-2TXAFNME.cjs → impl-Z4EPY44K.cjs} +2 -2
  108. package/dist/{impl-2TXAFNME.cjs.map → impl-Z4EPY44K.cjs.map} +1 -1
  109. package/dist/index.cjs +3 -3
  110. package/dist/index.cjs.map +1 -1
  111. package/dist/index.d.cts +36 -14
  112. package/package.json +6 -5
  113. package/dist/chunk-2NPTXG4Q.cjs.map +0 -1
  114. package/dist/chunk-3VLAP7X6.cjs +0 -9
  115. package/dist/chunk-3VLAP7X6.cjs.map +0 -1
  116. package/dist/chunk-FUYFDEYI.cjs +0 -2957
  117. package/dist/chunk-FUYFDEYI.cjs.map +0 -1
  118. package/dist/impl-EQV67XCQ.cjs +0 -2
@@ -1,2957 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class;var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunk2FX6UYVOcjs = require('./chunk-2FX6UYVO.cjs');var _graphqlrequest = require('graphql-request');var Sn=_graphqlrequest.gql`
2
- query TranscendCliDataPoints(
3
- $filterBy: DataPointFiltersInput
4
- $first: Int!
5
- $offset: Int!
6
- ) {
7
- dataPoints(
8
- filterBy: $filterBy
9
- first: $first
10
- offset: $offset
11
- useMaster: false
12
- orderBy: [
13
- { field: createdAt, direction: ASC }
14
- { field: name, direction: ASC }
15
- ]
16
- ) {
17
- nodes {
18
- id
19
- title {
20
- defaultMessage
21
- }
22
- description {
23
- defaultMessage
24
- }
25
- owners {
26
- email
27
- }
28
- teams {
29
- name
30
- }
31
- name
32
- path
33
- actionSettings {
34
- type
35
- active
36
- }
37
- dataCollection {
38
- title {
39
- defaultMessage
40
- }
41
- }
42
- dbIntegrationQueries {
43
- query
44
- suggestedQuery
45
- requestType
46
- }
47
- }
48
- }
49
- }
50
- `,Jd= exports.b =_graphqlrequest.gql`
51
- query TranscendCliDataPointCount($filterBy: DataPointFiltersInput) {
52
- dataPoints(filterBy: $filterBy, useMaster: false) {
53
- totalCount
54
- }
55
- }
56
- `,Tn= exports.c =_graphqlrequest.gql`
57
- query TranscendCliSubDataPoints(
58
- $filterBy: SubDataPointFiltersInput
59
- $first: Int!
60
- $offset: Int!
61
- ) {
62
- subDataPoints(
63
- filterBy: $filterBy
64
- first: $first
65
- offset: $offset
66
- useMaster: false
67
- ) {
68
- nodes {
69
- id
70
- name
71
- description
72
- purposes {
73
- name
74
- purpose
75
- }
76
- categories {
77
- name
78
- category
79
- }
80
- accessRequestVisibilityEnabled
81
- erasureRequestRedactionEnabled
82
- attributeValues {
83
- attributeKey {
84
- name
85
- }
86
- name
87
- }
88
- }
89
- }
90
- }
91
- `,Xd= exports.d =_graphqlrequest.gql`
92
- query TranscendCliSubDataPointsCount($filterBy: SubDataPointFiltersInput) {
93
- subDataPoints(filterBy: $filterBy, useMaster: false) {
94
- totalCount
95
- }
96
- }
97
- `,Pn= exports.e =_graphqlrequest.gql`
98
- query TranscendCliSubDataPointGuesses(
99
- $filterBy: SubDataPointFiltersInput
100
- $first: Int!
101
- $offset: Int!
102
- ) {
103
- subDataPoints(
104
- filterBy: $filterBy
105
- first: $first
106
- offset: $offset
107
- useMaster: false
108
- ) {
109
- nodes {
110
- id
111
- name
112
- description
113
- purposes {
114
- name
115
- purpose
116
- }
117
- categories {
118
- name
119
- category
120
- }
121
- pendingCategoryGuesses {
122
- category {
123
- name
124
- category
125
- }
126
- status
127
- confidence
128
- classifierVersion
129
- }
130
- accessRequestVisibilityEnabled
131
- erasureRequestRedactionEnabled
132
- attributeValues {
133
- attributeKey {
134
- name
135
- }
136
- name
137
- }
138
- }
139
- }
140
- }
141
- `,En= exports.f =_graphqlrequest.gql`
142
- mutation TranscendCliUpdateOrCreateDataPoint(
143
- $dataSiloId: ID!
144
- $name: String!
145
- $path: [String!]
146
- $title: String
147
- $description: String
148
- $ownerIds: [ID!]
149
- $ownerEmails: [String!]
150
- $teamNames: [String!]
151
- $teamIds: [ID!]
152
- $dataCollectionTag: String
153
- $querySuggestions: [DbIntegrationQuerySuggestionInput!]
154
- $enabledActions: [RequestActionObjectResolver!]
155
- $subDataPoints: [DataPointSubDataPointInput!]
156
- ) {
157
- updateOrCreateDataPoint(
158
- input: {
159
- dataSiloId: $dataSiloId
160
- name: $name
161
- path: $path
162
- title: $title
163
- teamNames: $teamNames
164
- ownerEmails: $ownerEmails
165
- dataCollectionTag: $dataCollectionTag
166
- description: $description
167
- ownerIds: $ownerIds
168
- teamIds: $teamIds
169
- querySuggestions: $querySuggestions
170
- enabledActions: $enabledActions
171
- subDataPoints: $subDataPoints
172
- }
173
- ) {
174
- dataPoint {
175
- id
176
- name
177
- }
178
- }
179
- }
180
- `,ef= exports.g =_graphqlrequest.gql`
181
- query TranscendCliDataPointCsvExport(
182
- $filterBy: DataPointFiltersInput
183
- $first: Int!
184
- ) {
185
- dataPoints(filterBy: $filterBy, first: $first, useMaster: false) {
186
- nodes {
187
- id
188
- title {
189
- defaultMessage
190
- }
191
- description {
192
- defaultMessage
193
- }
194
- owners {
195
- email
196
- }
197
- teams {
198
- name
199
- }
200
- name
201
- path
202
- }
203
- }
204
- }
205
- `;var nf=_graphqlrequest.gql`
206
- query TranscendCliEntryCount(
207
- $filterBy: UnstructuredSubDataPointRecommendationsFilterInput
208
- ) {
209
- unstructuredSubDataPointRecommendations(
210
- filterBy: $filterBy
211
- useMaster: false
212
- ) {
213
- totalCount
214
- }
215
- }
216
- `;var Rn=_graphqlrequest.gql`
217
- query TranscendCliDataSilos(
218
- $filterBy: DataSiloFiltersInput!
219
- $first: Int!
220
- $offset: Int!
221
- ) {
222
- dataSilos(
223
- filterBy: $filterBy
224
- first: $first
225
- offset: $offset
226
- orderBy: [
227
- { field: createdAt, direction: ASC }
228
- { field: title, direction: ASC }
229
- ]
230
- useMaster: false
231
- ) {
232
- nodes {
233
- id
234
- title
235
- link
236
- type
237
- catalog {
238
- hasAvcFunctionality
239
- }
240
- }
241
- }
242
- }
243
- `,af= exports.j =_graphqlrequest.gql`
244
- query TranscendCliDataSiloExport(
245
- $filterBy: DataSiloFiltersInput!
246
- $first: Int!
247
- ) {
248
- dataSilos(filterBy: $filterBy, first: $first, useMaster: false) {
249
- nodes {
250
- id
251
- title
252
- }
253
- }
254
- }
255
- `,bn= exports.k =_graphqlrequest.gql`
256
- query TranscendCliDataSilosEnriched(
257
- $filterBy: DataSiloFiltersInput!
258
- $first: Int!
259
- $offset: Int!
260
- ) {
261
- dataSilos(
262
- filterBy: $filterBy
263
- first: $first
264
- offset: $offset
265
- orderBy: [
266
- { field: createdAt, direction: ASC }
267
- { field: title, direction: ASC }
268
- ]
269
- useMaster: false
270
- ) {
271
- nodes {
272
- id
273
- title
274
- description
275
- type
276
- outerType
277
- link
278
- country
279
- countrySubDivision
280
- url
281
- notifyEmailAddress
282
- attributeValues {
283
- attributeKey {
284
- name
285
- }
286
- name
287
- }
288
- apiKeys {
289
- title
290
- }
291
- subjectBlocklist {
292
- type
293
- }
294
- identifiers {
295
- name
296
- isConnected
297
- }
298
- dependentDataSilos {
299
- title
300
- }
301
- owners {
302
- email
303
- }
304
- teams {
305
- id
306
- name
307
- }
308
- catalog {
309
- hasAvcFunctionality
310
- }
311
- isLive
312
- promptAVendorEmailSendFrequency
313
- promptAVendorEmailSendType
314
- promptAVendorEmailIncludeIdentifiersAttachment
315
- promptAVendorEmailCompletionLinkType
316
- manualWorkRetryFrequency
317
- discoveredBy {
318
- title
319
- }
320
- businessEntities {
321
- title
322
- }
323
- }
324
- }
325
- }
326
- `,Ur= exports.l =_graphqlrequest.gql`
327
- mutation TranscendCliUpdateDataSilo($input: UpdateDataSilosInput!) {
328
- updateDataSilos(input: $input) {
329
- clientMutationId
330
- dataSilos {
331
- id
332
- title
333
- }
334
- }
335
- }
336
- `,wn= exports.m =_graphqlrequest.gql`
337
- mutation TranscendCliCreateDataSilo($input: [CreateDataSilosInput!]!) {
338
- createDataSilos(input: $input) {
339
- dataSilos {
340
- id
341
- title
342
- }
343
- }
344
- }
345
- `;var $n=_graphqlrequest.gql`
346
- query TranscendCliEnrichers($title: String, $first: Int!, $offset: Int!) {
347
- enrichers(
348
- filterBy: { text: $title }
349
- first: $first
350
- offset: $offset
351
- useMaster: false
352
- orderBy: [
353
- { field: createdAt, direction: ASC }
354
- { field: title, direction: ASC }
355
- ]
356
- ) {
357
- nodes {
358
- id
359
- title
360
- url
361
- type
362
- expirationDuration
363
- lookerQueryTitle
364
- testRegex
365
- transitionRequestStatus
366
- phoneNumbers
367
- regionList
368
- inputIdentifier {
369
- name
370
- }
371
- identifiers {
372
- name
373
- }
374
- dataSubjects {
375
- type
376
- }
377
- actions
378
- }
379
- }
380
- }
381
- `,xn= exports.o =_graphqlrequest.gql`
382
- query TranscendCliInitializer {
383
- initializer {
384
- id
385
- identifiers {
386
- name
387
- }
388
- }
389
- }
390
- `,Dn= exports.p =_graphqlrequest.gql`
391
- mutation TranscendCliCreateEnricher($input: EnricherInput!) {
392
- createEnricher(input: $input) {
393
- clientMutationId
394
- }
395
- }
396
- `,qn= exports.q =_graphqlrequest.gql`
397
- mutation TranscendCliUpdateEnricher($input: UpdateEnricherInput!) {
398
- updateEnricher(input: $input) {
399
- clientMutationId
400
- }
401
- }
402
- `;var Ln=_graphqlrequest.gql`
403
- query TranscendCliCatalogs($first: Int!, $offset: Int!) {
404
- catalogs(first: $first, offset: $offset, filterBy: {}, useMaster: false) {
405
- nodes {
406
- integrationName
407
- title
408
- hasApiFunctionality
409
- }
410
- }
411
- }
412
- `;var vn=_graphqlrequest.gql`
413
- query TranscendCliIdentifiers($first: Int!, $offset: Int!) {
414
- identifiers(
415
- first: $first
416
- offset: $offset
417
- useMaster: false
418
- orderBy: [
419
- { field: createdAt, direction: ASC }
420
- { field: name, direction: ASC }
421
- ]
422
- ) {
423
- nodes {
424
- id
425
- name
426
- type
427
- regex
428
- selectOptions
429
- privacyCenterVisibility
430
- dataSubjects {
431
- type
432
- }
433
- isRequiredInForm
434
- placeholder
435
- displayTitle {
436
- defaultMessage
437
- }
438
- displayDescription {
439
- defaultMessage
440
- }
441
- displayOrder
442
- isUniqueOnPreferenceStore
443
- }
444
- }
445
- }
446
- `,kn= exports.t =_graphqlrequest.gql`
447
- query TranscendCliNewIdentifierTypes {
448
- newIdentifierTypes {
449
- name
450
- }
451
- }
452
- `,_n= exports.u =_graphqlrequest.gql`
453
- mutation TranscendCliCreateIdentifier($input: IdentifierInput!) {
454
- createIdentifier(input: $input) {
455
- identifier {
456
- id
457
- name
458
- }
459
- }
460
- }
461
- `,On= exports.v =_graphqlrequest.gql`
462
- mutation TranscendCliUpdateIdentifier($input: UpdateIdentifierInput!) {
463
- updateIdentifier(input: $input) {
464
- clientMutationId
465
- }
466
- }
467
- `;var ir=_graphqlrequest.gql`
468
- query TranscendCliDataSubjects {
469
- internalSubjects {
470
- id
471
- title {
472
- defaultMessage
473
- }
474
- active
475
- type
476
- adminDashboardDefaultSilentMode
477
- actions {
478
- type
479
- }
480
- }
481
- }
482
- `,Gn= exports.x =_graphqlrequest.gql`
483
- mutation TranscendCliCreateDataSubject($type: String!) {
484
- createSubject(input: { type: $type, title: $type, subjectClass: OTHER }) {
485
- subject {
486
- id
487
- type
488
- }
489
- }
490
- }
491
- `,Nn= exports.y =_graphqlrequest.gql`
492
- mutation TranscendCliUpdateDataSubject($input: UpdateSubjectInput!) {
493
- updateSubject(input: $input) {
494
- clientMutationId
495
- }
496
- }
497
- `,Mn= exports.z =_graphqlrequest.gql`
498
- mutation TranscendCliToggleDataSubject($input: ToggleSubjectInput!) {
499
- toggleSubject(input: $input) {
500
- clientMutationId
501
- }
502
- }
503
- `;var Fn=_graphqlrequest.gql`
504
- query TranscendCliRepositories(
505
- $first: Int!
506
- $offset: Int!
507
- $input: RepositoryFiltersInput
508
- ) {
509
- repositories(
510
- first: $first
511
- offset: $offset
512
- filterBy: $input
513
- orderBy: [
514
- { field: createdAt, direction: ASC }
515
- { field: name, direction: ASC }
516
- ]
517
- ) {
518
- nodes {
519
- id
520
- name
521
- description
522
- url
523
- teams {
524
- id
525
- name
526
- }
527
- owners {
528
- id
529
- email
530
- }
531
- }
532
- }
533
- }
534
- `,Un= exports.B =_graphqlrequest.gql`
535
- mutation TranscendCliUpdateRepositories($input: UpdateRepositoriesInput!) {
536
- updateRepositories(input: $input) {
537
- clientMutationId
538
- repositories {
539
- id
540
- name
541
- url
542
- teams {
543
- id
544
- name
545
- }
546
- owners {
547
- id
548
- email
549
- }
550
- }
551
- }
552
- }
553
- `,Qn= exports.C =_graphqlrequest.gql`
554
- mutation TranscendCliCreateRepository($input: CreateRepositoryInput!) {
555
- createRepository(input: $input) {
556
- clientMutationId
557
- repository {
558
- id
559
- name
560
- url
561
- teams {
562
- id
563
- name
564
- }
565
- owners {
566
- id
567
- email
568
- }
569
- }
570
- }
571
- }
572
- `;var Bn=_graphqlrequest.gql`
573
- query TranscendCliApiKeys($first: Int!, $offset: Int!, $titles: [String!]) {
574
- apiKeys(
575
- first: $first
576
- offset: $offset
577
- filterBy: { titles: $titles }
578
- useMaster: false
579
- orderBy: [
580
- { field: createdAt, direction: ASC }
581
- { field: title, direction: ASC }
582
- ]
583
- ) {
584
- nodes {
585
- id
586
- title
587
- }
588
- }
589
- }
590
- `,Vn= exports.E =_graphqlrequest.gql`
591
- mutation TranscendCliCreateApiKey($input: ApiKeyInput!) {
592
- createApiKey(input: $input) {
593
- apiKey {
594
- id
595
- apiKey
596
- title
597
- }
598
- }
599
- }
600
- `,Kn= exports.F =_graphqlrequest.gql`
601
- mutation TranscendCliDeleteApiKey($id: ID!) {
602
- deleteApiKey(id: $id) {
603
- clientMutationId
604
- }
605
- }
606
- `;var Yn=_graphqlrequest.gql`
607
- mutation AddSiloDiscoveryResults(
608
- $pluginId: ID!
609
- $rawResults: [SiloDiscoveryRawResultInput!]!
610
- ) {
611
- addSiloDiscoveryResults(
612
- input: { pluginId: $pluginId, rawResults: $rawResults }
613
- ) {
614
- success
615
- }
616
- }
617
- `,Zn= exports.H =_graphqlrequest.gql`
618
- query Plugins($dataSiloId: String!, $type: PluginType!) {
619
- plugins(filterBy: { dataSiloId: $dataSiloId, type: $type, enabled: true }) {
620
- plugins {
621
- id
622
- dataSilo {
623
- type
624
- }
625
- }
626
- totalCount
627
- }
628
- }
629
- `;var Wn=_graphqlrequest.gql`
630
- query TranscendCliTemplates($title: String, $first: Int!, $offset: Int!) {
631
- templates(
632
- filterBy: { text: $title }
633
- first: $first
634
- offset: $offset
635
- useMaster: false
636
- ) {
637
- nodes {
638
- id
639
- title
640
- subject {
641
- defaultMessage
642
- }
643
- template {
644
- defaultMessage
645
- }
646
- }
647
- }
648
- }
649
- `,Hn= exports.J =_graphqlrequest.gql`
650
- mutation TranscendCliCreateTemplate($title: String!) {
651
- createTemplate(input: { title: $title, template: "", subject: $title }) {
652
- clientMutationId
653
- }
654
- }
655
- `;var Jn=_graphqlrequest.gql`
656
- query TranscendCliOrganization {
657
- organization {
658
- sombra {
659
- customerUrl
660
- }
661
- }
662
- }
663
- `;var Xn=_graphqlrequest.gql`
664
- query TranscendCliAttributeKeys($first: Int!, $offset: Int!) {
665
- attributeKeys(
666
- filterBy: { enabledOn: [request] }
667
- first: $first
668
- useMaster: false
669
- offset: $offset
670
- ) {
671
- nodes {
672
- id
673
- name
674
- type
675
- }
676
- }
677
- }
678
- `;var eo=_graphqlrequest.gql`
679
- query TranscendCliSoftwareDevelopmentKits(
680
- $first: Int!
681
- $offset: Int!
682
- $input: SoftwareDevelopmentKitFiltersInput
683
- ) {
684
- softwareDevelopmentKits(
685
- first: $first
686
- offset: $offset
687
- filterBy: $input
688
- orderBy: [
689
- { field: createdAt, direction: ASC }
690
- { field: name, direction: ASC }
691
- ]
692
- ) {
693
- nodes {
694
- id
695
- name
696
- description
697
- codePackageType
698
- documentationLinks
699
- repositoryUrl
700
- teams {
701
- id
702
- name
703
- }
704
- owners {
705
- id
706
- email
707
- }
708
- }
709
- }
710
- }
711
- `,to= exports.N =_graphqlrequest.gql`
712
- mutation TranscendCliUpdateSoftwareDevelopmentKits(
713
- $input: UpdateSoftwareDevelopmentKitsInput!
714
- ) {
715
- updateSoftwareDevelopmentKits(input: $input) {
716
- clientMutationId
717
- softwareDevelopmentKits {
718
- id
719
- name
720
- description
721
- codePackageType
722
- documentationLinks
723
- repositoryUrl
724
- teams {
725
- id
726
- name
727
- }
728
- owners {
729
- id
730
- email
731
- }
732
- }
733
- }
734
- }
735
- `,ro= exports.O =_graphqlrequest.gql`
736
- mutation TranscendCliCreateSoftwareDevelopmentKit(
737
- $input: CreateSoftwareDevelopmentKitInput!
738
- ) {
739
- createSoftwareDevelopmentKit(input: $input) {
740
- clientMutationId
741
- softwareDevelopmentKit {
742
- id
743
- name
744
- description
745
- codePackageType
746
- documentationLinks
747
- repositoryUrl
748
- teams {
749
- id
750
- name
751
- }
752
- owners {
753
- id
754
- email
755
- }
756
- }
757
- }
758
- }
759
- `;var io=_graphqlrequest.gql`
760
- query TranscendCliCodePackages(
761
- $first: Int!
762
- $offset: Int!
763
- $input: CodePackageFiltersInput
764
- ) {
765
- codePackages(
766
- first: $first
767
- offset: $offset
768
- filterBy: $input
769
- orderBy: [
770
- { field: createdAt, direction: ASC }
771
- { field: name, direction: ASC }
772
- ]
773
- ) {
774
- nodes {
775
- id
776
- name
777
- description
778
- type
779
- relativePath
780
- teams {
781
- id
782
- name
783
- }
784
- owners {
785
- id
786
- email
787
- }
788
- repository {
789
- id
790
- name
791
- }
792
- dataSilo {
793
- id
794
- title
795
- type
796
- }
797
- }
798
- }
799
- }
800
- `,no= exports.Q =_graphqlrequest.gql`
801
- mutation TranscendCliUpdateCodePackages($input: UpdateCodePackagesInput!) {
802
- updateCodePackages(input: $input) {
803
- clientMutationId
804
- codePackages {
805
- id
806
- name
807
- description
808
- type
809
- relativePath
810
- teams {
811
- id
812
- name
813
- }
814
- owners {
815
- id
816
- email
817
- }
818
- repository {
819
- id
820
- name
821
- }
822
- dataSilo {
823
- id
824
- title
825
- type
826
- }
827
- }
828
- }
829
- }
830
- `,oo= exports.R =_graphqlrequest.gql`
831
- mutation TranscendCliCreateCodePackage($input: CreateCodePackageInput!) {
832
- createCodePackage(input: $input) {
833
- clientMutationId
834
- codePackage {
835
- id
836
- name
837
- description
838
- type
839
- relativePath
840
- teams {
841
- id
842
- name
843
- }
844
- owners {
845
- id
846
- email
847
- }
848
- repository {
849
- id
850
- name
851
- }
852
- dataSilo {
853
- id
854
- title
855
- type
856
- }
857
- }
858
- }
859
- }
860
- `;var so=_graphqlrequest.gql`
861
- query TranscendCliPromptThreads(
862
- $first: Int!
863
- $offset: Int!
864
- $filterBy: PromptThreadFiltersInput!
865
- ) {
866
- promptThreads(first: $first, offset: $offset, filterBy: $filterBy) {
867
- nodes {
868
- id
869
- threadId
870
- slackMessageTs
871
- slackTeamId
872
- slackChannelId
873
- slackChannelName
874
- }
875
- }
876
- }
877
- `;var po=_graphqlrequest.gql`
878
- query TranscendCliFetchPolicies($url: String!) {
879
- privacyCenterPolicies(lookup: { url: $url }) {
880
- id
881
- title {
882
- defaultMessage
883
- }
884
- disableEffectiveOn
885
- disabledLocales
886
- versions {
887
- effectiveOn
888
- content {
889
- defaultMessage
890
- }
891
- }
892
- }
893
- }
894
- `,lo= exports.U =_graphqlrequest.gql`
895
- mutation TranscendCliUpdatePolicies(
896
- $policies: [PolicyInput!]!
897
- $privacyCenterId: ID!
898
- ) {
899
- updatePolicies(
900
- input: {
901
- privacyCenterId: $privacyCenterId
902
- policies: $policies
903
- skipPublish: true
904
- }
905
- ) {
906
- clientMutationId
907
- }
908
- }
909
- `;var co=_graphqlrequest.gql`
910
- query TranscendCliRequests(
911
- $first: Int!
912
- $offset: Int!
913
- $filterBy: RequestFiltersInput!
914
- ) {
915
- requests(
916
- filterBy: $filterBy
917
- first: $first
918
- offset: $offset
919
- orderBy: [
920
- { field: createdAt, direction: ASC }
921
- { field: id, direction: ASC }
922
- ]
923
- useMaster: false
924
- ) {
925
- nodes {
926
- id
927
- createdAt
928
- email
929
- link
930
- status
931
- details
932
- isTest
933
- locale
934
- origin
935
- isSilent
936
- coreIdentifier
937
- daysRemaining
938
- type
939
- subjectType
940
- country
941
- countrySubDivision
942
- purpose {
943
- title
944
- name
945
- consent
946
- enrichedPreferences {
947
- topic
948
- selectValues {
949
- id
950
- name
951
- preferenceOption {
952
- id
953
- slug
954
- title {
955
- defaultMessage
956
- }
957
- }
958
- }
959
- selectValue {
960
- id
961
- name
962
- }
963
- selectValue {
964
- id
965
- name
966
- }
967
- preferenceTopic {
968
- title {
969
- defaultMessage
970
- }
971
- id
972
- slug
973
- }
974
- name
975
- id
976
- booleanValue
977
- }
978
- }
979
- attributeValues {
980
- id
981
- name
982
- attributeKey {
983
- id
984
- name
985
- }
986
- }
987
- }
988
- totalCount
989
- }
990
- }
991
- `,nr= exports.W =_graphqlrequest.gql`
992
- mutation TranscendCliApprovePrivacyRequest($input: CommunicationInput!) {
993
- approveRequest(input: $input) {
994
- request {
995
- id
996
- }
997
- }
998
- }
999
- `,uo= exports.X =_graphqlrequest.gql`
1000
- mutation TranscendCliCancelPrivacyRequest($input: CommunicationInput!) {
1001
- cancelRequest(input: $input) {
1002
- request {
1003
- id
1004
- }
1005
- }
1006
- }
1007
- `,At= exports.Y =_graphqlrequest.gql`
1008
- mutation TranscendCliUpdatePrivacyRequest($input: UpdateRequestInput!) {
1009
- updateRequest(input: $input) {
1010
- request {
1011
- id
1012
- }
1013
- }
1014
- }
1015
- `,mo= exports.Z =_graphqlrequest.gql`
1016
- mutation TranscendCliNotifyAdditionalTime($input: AdditionalTimeInput!) {
1017
- notifyAdditionalTime(input: $input) {
1018
- clientMutationId
1019
- }
1020
- }
1021
- `;var go=_graphqlrequest.gql`
1022
- query TranscendCliFetchMessage {
1023
- translatedMessages {
1024
- id
1025
- defaultMessage
1026
- targetReactIntlId
1027
- translations {
1028
- locale
1029
- value
1030
- }
1031
- }
1032
- }
1033
- `,yo= exports.$ =_graphqlrequest.gql`
1034
- mutation TranscendCliUpdateIntlMessages($messages: [MessageInput!]!) {
1035
- updateIntlMessages(input: { messages: $messages, skipPublish: true }) {
1036
- clientMutationId
1037
- }
1038
- }
1039
- `;var ho=_graphqlrequest.gql`
1040
- query TranscendCliRequestEnrichers(
1041
- $first: Int!
1042
- $offset: Int!
1043
- $requestId: ID!
1044
- ) {
1045
- requestEnrichers(
1046
- input: { requestId: $requestId }
1047
- first: $first
1048
- offset: $offset
1049
- useMaster: false
1050
- orderBy: [
1051
- { field: createdAt, direction: ASC }
1052
- { field: title, direction: ASC, model: enricher }
1053
- ]
1054
- ) {
1055
- nodes {
1056
- id
1057
- status
1058
- enricher {
1059
- id
1060
- type
1061
- title
1062
- }
1063
- }
1064
- totalCount
1065
- }
1066
- }
1067
- `,Co= exports.ba =_graphqlrequest.gql`
1068
- mutation TranscendCliRetryRequestEnricher($requestEnricherId: ID!) {
1069
- retryRequestEnricher(id: $requestEnricherId) {
1070
- requestEnricher {
1071
- id
1072
- }
1073
- }
1074
- }
1075
- `,Ao= exports.ca =_graphqlrequest.gql`
1076
- mutation TranscendCliSkipRequestEnricher($requestEnricherId: ID!) {
1077
- skipRequestEnricher(id: $requestEnricherId) {
1078
- requestEnricher {
1079
- id
1080
- }
1081
- }
1082
- }
1083
- `;var Yr=`
1084
- id
1085
- title
1086
- status
1087
- index
1088
- questions {
1089
- id
1090
- title
1091
- index
1092
- type
1093
- subType
1094
- placeholder
1095
- description
1096
- isRequired
1097
- displayLogic
1098
- riskLogic
1099
- requireRiskEvaluation
1100
- requireRiskMatrixEvaluation
1101
- riskCategories {
1102
- id
1103
- title
1104
- }
1105
- riskFramework {
1106
- id
1107
- title
1108
- description
1109
- riskLevels {
1110
- id
1111
- title
1112
- }
1113
- riskCategories {
1114
- id
1115
- title
1116
- }
1117
- riskMatrixColumns {
1118
- id
1119
- title
1120
- }
1121
- riskMatrixRows {
1122
- id
1123
- title
1124
- }
1125
- riskMatrix {
1126
- id
1127
- title
1128
- }
1129
- creator {
1130
- id
1131
- email
1132
- name
1133
- }
1134
- riskMatrixRowTitle
1135
- riskMatrixColumnTitle
1136
- }
1137
- riskLevel {
1138
- id
1139
- title
1140
- }
1141
- reviewerRiskLevel {
1142
- id
1143
- title
1144
- }
1145
- riskLevelFromRiskMatrix {
1146
- id
1147
- title
1148
- }
1149
- answerOptions {
1150
- id
1151
- index
1152
- value
1153
- }
1154
- selectedAnswers {
1155
- ... on AssessmentAnswerInterface {
1156
- id
1157
- index
1158
- value
1159
- }
1160
- }
1161
- respondent {
1162
- id
1163
- email
1164
- name
1165
- }
1166
- attributeKey {
1167
- name
1168
- }
1169
- externalRespondentEmail
1170
- comments {
1171
- id
1172
- content
1173
- createdAt
1174
- updatedAt
1175
- author {
1176
- id
1177
- email
1178
- name
1179
- }
1180
- }
1181
- allowedMimeTypes
1182
- updatedAt
1183
- referenceId
1184
- previousSubmissions {
1185
- id
1186
- updatedAt
1187
- assessmentQuestionId
1188
- answers {
1189
- ... on AssessmentAnswerInterface {
1190
- id
1191
- index
1192
- value
1193
- }
1194
- }
1195
- }
1196
- allowSelectOther
1197
- syncModel
1198
- syncColumn
1199
- syncRowIds
1200
- syncOverride
1201
- }
1202
- assignees {
1203
- id
1204
- email
1205
- name
1206
- }
1207
- externalAssignees {
1208
- id
1209
- email
1210
- }
1211
- isReviewed
1212
- `,So= exports.ea =_graphqlrequest.gql`
1213
- query TranscendCliAssessments(
1214
- $first: Int!
1215
- $offset: Int!
1216
- $filterBy: AssessmentFormFiltersInput
1217
- ) {
1218
- assessmentForms(first: $first, offset: $offset, filterBy: $filterBy) {
1219
- nodes {
1220
- id
1221
- creator {
1222
- id
1223
- email
1224
- name
1225
- }
1226
- lastEditor {
1227
- id
1228
- email
1229
- name
1230
- }
1231
- title
1232
- description
1233
- status
1234
- assignees {
1235
- id
1236
- email
1237
- name
1238
- }
1239
- externalAssignees {
1240
- id
1241
- email
1242
- }
1243
- reviewers {
1244
- id
1245
- email
1246
- name
1247
- }
1248
- isLocked
1249
- isArchived
1250
- isExternallyCreated
1251
- dueDate
1252
- createdAt
1253
- updatedAt
1254
- assignedAt
1255
- submittedAt
1256
- approvedAt
1257
- rejectedAt
1258
- titleIsInternal
1259
- retentionSchedule {
1260
- id
1261
- type
1262
- durationDays
1263
- operation
1264
- }
1265
- attributeValues {
1266
- name
1267
- attributeKey {
1268
- name
1269
- }
1270
- }
1271
- sections {
1272
- ${Yr}
1273
- }
1274
- assessmentGroup {
1275
- id
1276
- title
1277
- description
1278
- }
1279
- resources {
1280
- resourceType
1281
- ... on AttributeBusinessEntityResource {
1282
- id
1283
- title
1284
- }
1285
- ... on AttributeDataSiloResource {
1286
- id
1287
- title
1288
- }
1289
- ... on AttributeDataSubCategoryResource {
1290
- id
1291
- name
1292
- category
1293
- }
1294
- ... on AttributeSubDataPointResource {
1295
- id
1296
- name
1297
- }
1298
- ... on AttributeProcessingPurposeSubCategoryResource {
1299
- id
1300
- name
1301
- purpose
1302
- }
1303
- ... on AttributeRequestResource {
1304
- id
1305
- type
1306
- }
1307
- ... on AttributeVendorResource {
1308
- id
1309
- title
1310
- }
1311
- ... on AttributePromptResource {
1312
- id
1313
- title
1314
- }
1315
- ... on AttributePromptRunResource {
1316
- id
1317
- title
1318
- }
1319
- ... on AttributePromptGroupResource {
1320
- id
1321
- title
1322
- }
1323
- }
1324
- syncedRows {
1325
- resourceType
1326
- ... on AttributeBusinessEntityResource {
1327
- id
1328
- title
1329
- }
1330
- ... on AttributeDataSiloResource {
1331
- id
1332
- title
1333
- }
1334
- ... on AttributeDataSubCategoryResource {
1335
- id
1336
- name
1337
- category
1338
- }
1339
- ... on AttributeSubDataPointResource {
1340
- id
1341
- name
1342
- }
1343
- ... on AttributeProcessingPurposeSubCategoryResource {
1344
- id
1345
- name
1346
- purpose
1347
- }
1348
- ... on AttributeVendorResource {
1349
- id
1350
- title
1351
- }
1352
- }
1353
- }
1354
- }
1355
- }
1356
- `,Vf= exports.fa =_graphqlrequest.gql`
1357
- mutation TranscendCliImportOneTrustAssessmentForms(
1358
- $input: ImportOnetrustAssessmentsInput!
1359
- ) {
1360
- importOneTrustAssessmentForms(input: $input) {
1361
- assessmentForms {
1362
- id
1363
- title
1364
- }
1365
- }
1366
- }
1367
- `;var To=_graphqlrequest.gql`
1368
- query TranscendCliPurposes(
1369
- $first: Int!
1370
- $offset: Int!
1371
- $filterBy: TrackingPurposeFiltersInput
1372
- $input: TrackingPurposeInput!
1373
- ) {
1374
- purposes(
1375
- first: $first
1376
- offset: $offset
1377
- filterBy: $filterBy
1378
- input: $input
1379
- ) {
1380
- nodes {
1381
- id
1382
- name
1383
- description
1384
- defaultConsent
1385
- trackingType
1386
- configurable
1387
- essential
1388
- showInConsentManager
1389
- isActive
1390
- displayOrder
1391
- optOutSignals
1392
- deletedAt
1393
- authLevel
1394
- showInPrivacyCenter
1395
- title
1396
- }
1397
- }
1398
- }
1399
- `;var Po=_graphqlrequest.gql`
1400
- query TranscendCliPreferenceTopics(
1401
- $first: Int!
1402
- $offset: Int!
1403
- $filterBy: PreferenceTopicFilterInput
1404
- ) {
1405
- preferenceTopics(first: $first, offset: $offset, filterBy: $filterBy) {
1406
- nodes {
1407
- id
1408
- slug
1409
- type
1410
- title {
1411
- id
1412
- defaultMessage
1413
- }
1414
- showInPrivacyCenter
1415
- displayDescription {
1416
- id
1417
- defaultMessage
1418
- }
1419
- defaultConfiguration
1420
- preferenceOptionValues {
1421
- slug
1422
- title {
1423
- id
1424
- defaultMessage
1425
- }
1426
- }
1427
- purpose {
1428
- trackingType
1429
- }
1430
- }
1431
- }
1432
- }
1433
- `;var Eo=_graphqlrequest.gql`
1434
- query TranscendCliAssessmentTemplates(
1435
- $first: Int!
1436
- $offset: Int!
1437
- $filterBy: AssessmentFormTemplateFiltersInput
1438
- ) {
1439
- assessmentFormTemplates(
1440
- first: $first
1441
- offset: $offset
1442
- filterBy: $filterBy
1443
- ) {
1444
- nodes {
1445
- id
1446
- creator {
1447
- id
1448
- email
1449
- name
1450
- }
1451
- lastEditor {
1452
- id
1453
- email
1454
- name
1455
- }
1456
- title
1457
- description
1458
- status
1459
- source
1460
- parentId
1461
- isLocked
1462
- isArchived
1463
- createdAt
1464
- updatedAt
1465
- retentionSchedule {
1466
- id
1467
- type
1468
- durationDays
1469
- operation
1470
- createdAt
1471
- updatedAt
1472
- }
1473
- assessmentEmailSet {
1474
- id
1475
- title
1476
- description
1477
- isDefault
1478
- templates {
1479
- id
1480
- title
1481
- }
1482
- }
1483
- sections {
1484
- ${Yr}
1485
- }
1486
- }
1487
- }
1488
- }
1489
- `;var Ro=_graphqlrequest.gql`
1490
- query TranscendCliPrompts(
1491
- $first: Int!
1492
- $offset: Int!
1493
- $filterBy: PromptFiltersInput
1494
- ) {
1495
- prompts(
1496
- first: $first
1497
- orderBy: [{ field: title, direction: ASC }]
1498
- offset: $offset
1499
- filterBy: $filterBy
1500
- ) {
1501
- nodes {
1502
- id
1503
- title
1504
- status
1505
- content
1506
- temperature
1507
- topP
1508
- maxTokensToSample
1509
- }
1510
- }
1511
- }
1512
- `,bo= exports.ka =_graphqlrequest.gql`
1513
- query TranscendCliPromptPartials($first: Int!, $offset: Int!) {
1514
- promptPartials(first: $first, offset: $offset) {
1515
- nodes {
1516
- id
1517
- title
1518
- content
1519
- }
1520
- }
1521
- }
1522
- `,wo= exports.la =_graphqlrequest.gql`
1523
- query TranscendCliPromptGroups($first: Int!, $offset: Int!) {
1524
- promptGroups(
1525
- first: $first
1526
-
1527
- offset: $offset
1528
- ) {
1529
- nodes {
1530
- id
1531
- title
1532
- description
1533
- prompts {
1534
- title
1535
- }
1536
- }
1537
- }
1538
- }
1539
- `,$o= exports.ma =_graphqlrequest.gql`
1540
- query TranscendCliPromptsWithVariables($input: PromptsWithVariablesInput!) {
1541
- promptsWithVariables(input: $input) {
1542
- prompts {
1543
- id
1544
- title
1545
- content
1546
- status
1547
- temperature
1548
- topP
1549
- maxTokensToSample
1550
- responseFormat
1551
- }
1552
- promptPartials {
1553
- id
1554
- title
1555
- content
1556
- slug
1557
- }
1558
- calculatedVariables {
1559
- data
1560
- name
1561
- }
1562
- runtimeVariables {
1563
- name
1564
- }
1565
- }
1566
- }
1567
- `,xo= exports.na =_graphqlrequest.gql`
1568
- mutation TranscendCliUpdatePrompts($input: UpdatePromptsInput!) {
1569
- updatePrompts(input: $input) {
1570
- clientMutationId
1571
- }
1572
- }
1573
- `,Do= exports.oa =_graphqlrequest.gql`
1574
- mutation TranscendCliCreatePrompt($input: CreatePromptInput!) {
1575
- createPrompt(input: $input) {
1576
- clientMutationId
1577
- prompt {
1578
- id
1579
- }
1580
- }
1581
- }
1582
- `,qo= exports.pa =_graphqlrequest.gql`
1583
- mutation TranscendCliUpdatePromptPartials(
1584
- $input: UpdatePromptPartialsInput!
1585
- ) {
1586
- updatePromptPartials(input: $input) {
1587
- clientMutationId
1588
- }
1589
- }
1590
- `,Lo= exports.qa =_graphqlrequest.gql`
1591
- mutation TranscendCliCreatePromptPartial($input: CreatePromptPartialInput!) {
1592
- createPromptPartial(input: $input) {
1593
- clientMutationId
1594
- promptPartial {
1595
- id
1596
- }
1597
- }
1598
- }
1599
- `,vo= exports.ra =_graphqlrequest.gql`
1600
- mutation TranscendCliUpdatePromptGroups($input: UpdatePromptGroupsInput!) {
1601
- updatePromptGroups(input: $input) {
1602
- clientMutationId
1603
- }
1604
- }
1605
- `,ko= exports.sa =_graphqlrequest.gql`
1606
- mutation TranscendCliCreatePromptPartial($input: CreatePromptGroupInput!) {
1607
- createPromptGroup(input: $input) {
1608
- clientMutationId
1609
- promptGroup {
1610
- id
1611
- }
1612
- }
1613
- }
1614
- `;var Zr=_graphqlrequest.gql`
1615
- query TranscendCliRequestDataSilos(
1616
- $first: Int!
1617
- $offset: Int!
1618
- $filterBy: RequestDataSiloFiltersInput!
1619
- ) {
1620
- requestDataSilos(
1621
- filterBy: $filterBy
1622
- first: $first
1623
- offset: $offset
1624
- useMaster: false
1625
- orderBy: [
1626
- { field: createdAt, direction: DESC }
1627
- { field: title, direction: ASC, model: dataSilo }
1628
- ]
1629
- ) {
1630
- nodes {
1631
- id
1632
- }
1633
- totalCount
1634
- }
1635
- }
1636
- `,_o= exports.ua =_graphqlrequest.gql`
1637
- mutation TranscendCliMarkRequestDataSiloCompleted(
1638
- $requestDataSiloId: ID!
1639
- $status: UpdateRequestDataSiloStatus!
1640
- ) {
1641
- changeRequestDataSiloStatus(
1642
- input: { id: $requestDataSiloId, status: $status }
1643
- ) {
1644
- requestDataSilo {
1645
- id
1646
- }
1647
- }
1648
- }
1649
- `,Oo= exports.va =_graphqlrequest.gql`
1650
- mutation TranscendCliRetryRequestDataSilo($requestDataSiloId: ID!) {
1651
- retryRequestDataSilo(id: $requestDataSiloId) {
1652
- requestDataSilo {
1653
- id
1654
- }
1655
- }
1656
- }
1657
- `,Go= exports.wa =_graphqlrequest.gql`
1658
- query TranscendCliListReducedRequestsForDataSiloCount(
1659
- $input: BulkCompletionReducedRequestInput!
1660
- ) {
1661
- listReducedRequestsForDataSilo(input: $input) {
1662
- totalCount
1663
- }
1664
- }
1665
- `;var No=_graphqlrequest.gql`
1666
- query TranscendCliTeams(
1667
- $first: Int!
1668
- $offset: Int!
1669
- $input: TeamFiltersInput
1670
- ) {
1671
- teams(
1672
- first: $first
1673
- offset: $offset
1674
- filterBy: $input
1675
- orderBy: [
1676
- { field: createdAt, direction: ASC }
1677
- { field: name, direction: ASC }
1678
- ]
1679
- ) {
1680
- nodes {
1681
- id
1682
- name
1683
- description
1684
- ssoDepartment
1685
- ssoGroup
1686
- ssoTitle
1687
- users {
1688
- id
1689
- email
1690
- name
1691
- }
1692
- scopes {
1693
- id
1694
- name
1695
- title
1696
- }
1697
- }
1698
- }
1699
- }
1700
- `,Mo= exports.ya =_graphqlrequest.gql`
1701
- mutation TranscendCliCreateTeam($input: TeamInput!) {
1702
- createTeam(input: $input) {
1703
- team {
1704
- id
1705
- name
1706
- }
1707
- }
1708
- }
1709
- `,Fo= exports.za =_graphqlrequest.gql`
1710
- mutation TranscendCliUpdateTeam($input: UpdateTeamInput!) {
1711
- updateTeam(input: $input) {
1712
- team {
1713
- id
1714
- name
1715
- }
1716
- }
1717
- }
1718
- `;var Qo=_graphqlrequest.gql`
1719
- mutation TranscendCliRemoveRequestIdentifiers(
1720
- $input: RemoveRequestIdentifiersInput!
1721
- ) {
1722
- removeRequestIdentifiers(input: $input) {
1723
- count
1724
- }
1725
- }
1726
- `,Bo= exports.Ba =_graphqlrequest.gql`
1727
- query TranscendCliRequestIdentifiers(
1728
- $first: Int!
1729
- $offset: Int!
1730
- $requestIds: [ID!]!
1731
- ) {
1732
- requestIdentifiers(
1733
- input: { requestIds: $requestIds }
1734
- first: $first
1735
- offset: $offset
1736
- useMaster: false
1737
- orderBy: [
1738
- { field: createdAt, direction: ASC }
1739
- { field: name, direction: ASC }
1740
- ]
1741
- ) {
1742
- nodes {
1743
- id
1744
- name
1745
- isVerifiedAtLeastOnce
1746
- }
1747
- totalCount
1748
- }
1749
- }
1750
- `;var Vo=_graphqlrequest.gql`
1751
- query TranscendCliUsers(
1752
- $first: Int!
1753
- $offset: Int!
1754
- $input: UserFiltersInput
1755
- ) {
1756
- users(
1757
- first: $first
1758
- offset: $offset
1759
- filterBy: $input
1760
- orderBy: [
1761
- { field: createdAt, direction: ASC }
1762
- { field: name, direction: ASC }
1763
- ]
1764
- ) {
1765
- nodes {
1766
- id
1767
- name
1768
- email
1769
- }
1770
- }
1771
- }
1772
- `;var cg=_graphqlrequest.gql`
1773
- query TranscendCliRequestFiles(
1774
- $first: Int!
1775
- $offset: Int!
1776
- $filterBy: RequestFileFiltersInput!
1777
- ) {
1778
- requestFiles(
1779
- filterBy: $filterBy
1780
- first: $first
1781
- offset: $offset
1782
- orderBy: [
1783
- { field: createdAt, direction: ASC }
1784
- { field: id, direction: ASC }
1785
- ]
1786
- ) {
1787
- nodes {
1788
- remoteId
1789
- fileName
1790
- }
1791
- }
1792
- }
1793
- `,jo= exports.Ea =_graphqlrequest.gql`
1794
- query TranscendCliBulkRequestFiles(
1795
- $filterBy: BulkRequestFilesFiltersInput!
1796
- $first: Int!
1797
- $after: String
1798
- ) {
1799
- bulkRequestFiles(filterBy: $filterBy, first: $first, after: $after) {
1800
- nodes {
1801
- remoteId
1802
- fileName
1803
- }
1804
- pageInfo {
1805
- hasNextPage
1806
- endCursor
1807
- }
1808
- }
1809
- }
1810
- `;var Zo=_graphqlrequest.gql`
1811
- mutation TranscendCliReportPromptRun($input: ReportPromptRunInput!) {
1812
- reportPromptRun(input: $input) {
1813
- clientMutationId
1814
- promptRun {
1815
- id
1816
- }
1817
- }
1818
- }
1819
- `,zo= exports.Ga =_graphqlrequest.gql`
1820
- mutation TranscendCliAddMessagesToPromptRun(
1821
- $input: AddMessagesToPromptRunInput!
1822
- ) {
1823
- addMessagesToPromptRun(input: $input) {
1824
- clientMutationId
1825
- promptRun {
1826
- id
1827
- }
1828
- }
1829
- }
1830
- `;var Wo=_graphqlrequest.gql`
1831
- query TranscendCliGlobalActionItemCollectionss(
1832
- $filterBy: GlobalActionItemCollectionFiltersInput!
1833
- ) {
1834
- globalActionItemCollections(filterBy: $filterBy) {
1835
- nodes {
1836
- id
1837
- title
1838
- description
1839
- hidden
1840
- productLine
1841
- }
1842
- }
1843
- }
1844
- `,Ho= exports.Ia =_graphqlrequest.gql`
1845
- mutation TranscendCliCreateActionItemCollection(
1846
- $input: CreateActionItemCollectionInput!
1847
- ) {
1848
- createActionItemCollection(input: $input) {
1849
- created {
1850
- id
1851
- title
1852
- }
1853
- }
1854
- }
1855
- `,Jo= exports.Ja =_graphqlrequest.gql`
1856
- mutation TranscendCliUpdateActionItemCollection(
1857
- $input: UpdateActionItemCollectionInput!
1858
- ) {
1859
- updateActionItemCollection(input: $input) {
1860
- clientMutationId
1861
- }
1862
- }
1863
- `;var Xo=_graphqlrequest.gql`
1864
- query TranscendCliAttributes($first: Int!, $offset: Int!) {
1865
- attributeKeys(first: $first, offset: $offset, useMaster: false) {
1866
- nodes {
1867
- id
1868
- isCustom
1869
- description
1870
- enabledOn
1871
- name
1872
- type
1873
- }
1874
- }
1875
- }
1876
- `,es= exports.La =_graphqlrequest.gql`
1877
- mutation TranscendCliCreateAttributeValues(
1878
- $input: [CreateAttributeValuesInput!]!
1879
- ) {
1880
- createAttributeValues(input: $input) {
1881
- clientMutationId
1882
- }
1883
- }
1884
- `,ts= exports.Ma =_graphqlrequest.gql`
1885
- mutation TranscendCliUpdateAttributeValues(
1886
- $input: [UpdateAttributeValueInput!]!
1887
- ) {
1888
- updateAttributeValues(input: $input) {
1889
- clientMutationId
1890
- }
1891
- }
1892
- `,rs= exports.Na =_graphqlrequest.gql`
1893
- mutation TranscendCliDeleteAttributeValue($id: ID!) {
1894
- deleteAttributeValue(id: $id) {
1895
- clientMutationId
1896
- }
1897
- }
1898
- `,is= exports.Oa =_graphqlrequest.gql`
1899
- query TranscendCliAttributeValues(
1900
- $first: Int!
1901
- $offset: Int!
1902
- $attributeKeyId: ID!
1903
- ) {
1904
- attributeValues(
1905
- first: $first
1906
- offset: $offset
1907
- useMaster: false
1908
- filterBy: { attributeKeys: [$attributeKeyId] }
1909
- ) {
1910
- nodes {
1911
- id
1912
- name
1913
- description
1914
- color
1915
- }
1916
- }
1917
- }
1918
- `,ns= exports.Pa =_graphqlrequest.gql`
1919
- mutation TranscendCliCreateAttribute(
1920
- $name: String!
1921
- $type: AttributeKeyType!
1922
- $description: String
1923
- $enabledOn: [AttributeSupportedResourceType!]
1924
- ) {
1925
- createAttributeKey(
1926
- input: {
1927
- name: $name
1928
- type: $type
1929
- description: $description
1930
- enabledOn: $enabledOn
1931
- }
1932
- ) {
1933
- clientMutationId
1934
- attributeKey {
1935
- id
1936
- }
1937
- }
1938
- }
1939
- `,os= exports.Qa =_graphqlrequest.gql`
1940
- mutation TranscendCliCreateAttribute(
1941
- $attributeKeyId: ID!
1942
- $description: String
1943
- $enabledOn: [AttributeSupportedResourceType!]
1944
- ) {
1945
- updateAttributeKey(
1946
- input: {
1947
- id: $attributeKeyId
1948
- description: $description
1949
- enabledOn: $enabledOn
1950
- }
1951
- ) {
1952
- clientMutationId
1953
- attributeKey {
1954
- id
1955
- }
1956
- }
1957
- }
1958
- `,ss= exports.Ra =_graphqlrequest.gql`
1959
- mutation TranscendCliSetResourceAttributes(
1960
- $input: SetResourceAttributesInput!
1961
- ) {
1962
- setResourceAttributes(input: $input) {
1963
- clientMutationId
1964
- }
1965
- }
1966
- `;var as=_graphqlrequest.gql`
1967
- query TranscendCliExperiences($first: Int!, $offset: Int!) {
1968
- experiences(first: $first, offset: $offset, useMaster: false) {
1969
- nodes {
1970
- id
1971
- name
1972
- displayName
1973
- regions {
1974
- countrySubDivision
1975
- country
1976
- }
1977
- operator
1978
- displayPriority
1979
- onConsentExpiry
1980
- consentExpiry
1981
- viewState
1982
- purposes {
1983
- name
1984
- trackingType
1985
- }
1986
- optedOutPurposes {
1987
- name
1988
- trackingType
1989
- }
1990
- browserLanguages
1991
- browserTimeZones
1992
- }
1993
- }
1994
- }
1995
- `,ps= exports.Ta =_graphqlrequest.gql`
1996
- query TranscendCliConsentPartitions($first: Int!, $offset: Int!) {
1997
- consentPartitions(first: $first, offset: $offset) {
1998
- nodes {
1999
- id
2000
- name
2001
- partition
2002
- }
2003
- }
2004
- }
2005
- `,ls= exports.Ua =_graphqlrequest.gql`
2006
- mutation TranscendCliCreateDataFlows(
2007
- $dataFlows: [DataFlowInput!]!
2008
- $airgapBundleId: ID!
2009
- $classifyService: Boolean
2010
- ) {
2011
- createDataFlows(
2012
- input: {
2013
- airgapBundleId: $airgapBundleId
2014
- dataFlows: $dataFlows
2015
- classifyService: $classifyService
2016
- }
2017
- ) {
2018
- dataFlows {
2019
- id
2020
- }
2021
- }
2022
- }
2023
- `,cs= exports.Va =_graphqlrequest.gql`
2024
- mutation TranscendCliUpdateDataFlows(
2025
- $airgapBundleId: ID!
2026
- $dataFlows: [UpdateDataFlowInput!]!
2027
- $classifyService: Boolean
2028
- ) {
2029
- updateDataFlows(
2030
- input: {
2031
- airgapBundleId: $airgapBundleId
2032
- dataFlows: $dataFlows
2033
- classifyService: $classifyService
2034
- }
2035
- ) {
2036
- dataFlows {
2037
- id
2038
- }
2039
- }
2040
- }
2041
- `,us= exports.Wa =_graphqlrequest.gql`
2042
- mutation TranscendCliUpdateOrCreateCookies(
2043
- $cookies: [UpdateOrCreateCookieInput!]!
2044
- $airgapBundleId: ID!
2045
- ) {
2046
- updateOrCreateCookies(
2047
- input: { airgapBundleId: $airgapBundleId, cookies: $cookies }
2048
- ) {
2049
- clientMutationId
2050
- }
2051
- }
2052
- `,ms= exports.Xa =_graphqlrequest.gql`
2053
- query TranscendCliDataFlows(
2054
- $first: Int!
2055
- $airgapBundleId: ID!
2056
- $offset: Int!
2057
- $status: ConsentTrackerStatus
2058
- $showZeroActivity: Boolean
2059
- ) {
2060
- dataFlows(
2061
- first: $first
2062
- offset: $offset
2063
- filterBy: { status: $status, showZeroActivity: $showZeroActivity }
2064
- input: { airgapBundleId: $airgapBundleId }
2065
- orderBy: [
2066
- { field: createdAt, direction: ASC }
2067
- { field: value, direction: ASC }
2068
- ]
2069
- useMaster: false
2070
- ) {
2071
- nodes {
2072
- id
2073
- value
2074
- type
2075
- description
2076
- trackingType
2077
- service {
2078
- integrationName
2079
- }
2080
- source
2081
- status
2082
- owners {
2083
- email
2084
- }
2085
- teams {
2086
- name
2087
- }
2088
- attributeValues {
2089
- name
2090
- attributeKey {
2091
- name
2092
- }
2093
- }
2094
- }
2095
- }
2096
- }
2097
- `,ds= exports.Ya =_graphqlrequest.gql`
2098
- query TranscendCliCookies(
2099
- $first: Int!
2100
- $offset: Int!
2101
- $airgapBundleId: ID!
2102
- $status: ConsentTrackerStatus
2103
- ) {
2104
- cookies(
2105
- first: $first
2106
- offset: $offset
2107
- filterBy: { status: $status }
2108
- input: { airgapBundleId: $airgapBundleId }
2109
- orderBy: [
2110
- { field: createdAt, direction: ASC }
2111
- { field: name, direction: ASC }
2112
- ]
2113
- useMaster: false
2114
- ) {
2115
- nodes {
2116
- id
2117
- name
2118
- isRegex
2119
- description
2120
- trackingPurposes
2121
- service {
2122
- integrationName
2123
- }
2124
- source
2125
- status
2126
- owners {
2127
- email
2128
- }
2129
- teams {
2130
- name
2131
- }
2132
- attributeValues {
2133
- name
2134
- attributeKey {
2135
- name
2136
- }
2137
- }
2138
- }
2139
- }
2140
- }
2141
- `,fs= exports.Za =_graphqlrequest.gql`
2142
- query TranscendCliFetchConsentManagerId {
2143
- consentManager {
2144
- consentManager {
2145
- id
2146
- }
2147
- }
2148
- }
2149
- `,gs= exports._a =_graphqlrequest.gql`
2150
- query TranscendCliFetchConsentManager {
2151
- consentManager {
2152
- consentManager {
2153
- id
2154
- bundleURL
2155
- testBundleURL
2156
- configuration {
2157
- domains
2158
- consentPrecedence
2159
- unknownRequestPolicy
2160
- unknownCookiePolicy
2161
- syncEndpoint
2162
- telemetryPartitioning
2163
- signedIabAgreement
2164
- syncGroups
2165
- partition
2166
- }
2167
- partition {
2168
- partition
2169
- }
2170
- }
2171
- }
2172
- }
2173
- `,ys= exports.$a =_graphqlrequest.gql`
2174
- query TranscendCliFetchConsentManagerTheme($airgapBundleId: ID!) {
2175
- consentManagerTheme(input: { airgapBundleId: $airgapBundleId }) {
2176
- theme {
2177
- primaryColor
2178
- fontColor
2179
- privacyPolicy
2180
- prompt
2181
- }
2182
- }
2183
- }
2184
- `,hs= exports.ab =_graphqlrequest.gql`
2185
- mutation TranscendCliCreateConsentManager($privacyCenterId: ID!) {
2186
- createConsentManager(input: { privacyCenterId: $privacyCenterId }) {
2187
- consentManager {
2188
- id
2189
- }
2190
- }
2191
- }
2192
- `,Cs= exports.bb =_graphqlrequest.gql`
2193
- mutation TranscendCliUpdateConsentManager(
2194
- $airgapBundleId: ID!
2195
- $version: String!
2196
- ) {
2197
- updateConsentManager(id: $airgapBundleId, input: { version: $version }) {
2198
- clientMutationId
2199
- }
2200
- }
2201
- `,As= exports.cb =_graphqlrequest.gql`
2202
- mutation TranscendCliUpdateConsentManagerToLatest(
2203
- $airgapBundleId: ID!
2204
- $bundleType: ConsentBundleType!
2205
- ) {
2206
- updateConsentManagerToLatestVersion(
2207
- id: $airgapBundleId
2208
- input: { bundleType: $bundleType }
2209
- ) {
2210
- clientMutationId
2211
- }
2212
- }
2213
- `,Is= exports.db =_graphqlrequest.gql`
2214
- mutation TranscendCliDeployConsentManager(
2215
- $airgapBundleId: ID!
2216
- $bundleType: ConsentBundleType!
2217
- ) {
2218
- deployConsentManagerBundle(
2219
- id: $airgapBundleId
2220
- input: { bundleType: $bundleType }
2221
- ) {
2222
- clientMutationId
2223
- }
2224
- }
2225
- `,Ss= exports.eb =_graphqlrequest.gql`
2226
- mutation TranscendCliUpdateConsentManagerDomains(
2227
- $airgapBundleId: ID!
2228
- $domains: [String!]!
2229
- ) {
2230
- updateConsentManagerDomains(
2231
- input: { id: $airgapBundleId, domains: $domains }
2232
- ) {
2233
- clientMutationId
2234
- }
2235
- }
2236
- `,Ts= exports.fb =_graphqlrequest.gql`
2237
- mutation TranscendCliUpdateConsentManagerPartition(
2238
- $airgapBundleId: ID!
2239
- $partitionId: ID!
2240
- ) {
2241
- updateConsentManagerPartition(
2242
- input: { id: $airgapBundleId, partitionId: $partitionId }
2243
- ) {
2244
- clientMutationId
2245
- }
2246
- }
2247
- `,Ps= exports.gb =_graphqlrequest.gql`
2248
- mutation TranscendCliUpdateLoadOptions($input: UpdateLoadOptionsInput!) {
2249
- updateLoadOptions(input: $input) {
2250
- clientMutationId
2251
- }
2252
- }
2253
- `,Es= exports.hb =_graphqlrequest.gql`
2254
- mutation TranscendCliToggleUnknownRequestPolicy(
2255
- $input: ToggleUnknownRequestPolicyInput!
2256
- ) {
2257
- toggleUnknownRequestPolicy(input: $input) {
2258
- clientMutationId
2259
- }
2260
- }
2261
- `,Rs= exports.ib =_graphqlrequest.gql`
2262
- mutation TranscendCliToggleUnknownCookiePolicy(
2263
- $input: ToggleUnknownCookiePolicyInput!
2264
- ) {
2265
- toggleUnknownCookiePolicy(input: $input) {
2266
- clientMutationId
2267
- }
2268
- }
2269
- `,bs= exports.jb =_graphqlrequest.gql`
2270
- mutation TranscendCliToggleTelemetryPartitionStrategy(
2271
- $input: ToggleTelemetryPartitionStrategyInput!
2272
- ) {
2273
- toggleTelemetryPartitioning(input: $input) {
2274
- clientMutationId
2275
- }
2276
- }
2277
- `,ws= exports.kb =_graphqlrequest.gql`
2278
- mutation TranscendCliToggleConsentPrecedence(
2279
- $input: ToggleConsentPrecedenceInput!
2280
- ) {
2281
- toggleConsentPrecedence(input: $input) {
2282
- clientMutationId
2283
- }
2284
- }
2285
- `,$s= exports.lb =_graphqlrequest.gql`
2286
- mutation TranscendCliUpdateConsentManagerTheme(
2287
- $input: UpdateConsentManagerThemeInput!
2288
- ) {
2289
- updateConsentManagerTheme(input: $input) {
2290
- clientMutationId
2291
- }
2292
- }
2293
- `,xs= exports.mb =_graphqlrequest.gql`
2294
- mutation TranscendCliUpdateConsentExperience($input: UpdateExperienceInput!) {
2295
- updateExperience(input: $input) {
2296
- clientMutationId
2297
- }
2298
- }
2299
- `,Ds= exports.nb =_graphqlrequest.gql`
2300
- mutation TranscendCliCreateConsentExperience($input: CreateExperienceInput!) {
2301
- createExperience(input: $input) {
2302
- clientMutationId
2303
- }
2304
- }
2305
- `,qs= exports.ob =_graphqlrequest.gql`
2306
- mutation TranscendCliCreateConsentPartition(
2307
- $input: CreateConsentPartitionInput!
2308
- ) {
2309
- createConsentPartition(input: $input) {
2310
- clientMutationId
2311
- }
2312
- }
2313
- `;var Ls=_graphqlrequest.gql`
2314
- query TranscendCliConsentManagerAnalyticsData($input: AnalyticsInput!) {
2315
- analyticsData(input: $input) {
2316
- series {
2317
- name
2318
- points {
2319
- key
2320
- value
2321
- }
2322
- }
2323
- }
2324
- }
2325
- `;var vs=_graphqlrequest.gql`
2326
- query TranscendCliBusinessEntities($first: Int!, $offset: Int!) {
2327
- businessEntities(
2328
- first: $first
2329
- offset: $offset
2330
- orderBy: [
2331
- { field: createdAt, direction: ASC }
2332
- { field: title, direction: ASC }
2333
- ]
2334
- useMaster: false
2335
- ) {
2336
- nodes {
2337
- id
2338
- title
2339
- description
2340
- dataProtectionOfficerName
2341
- dataProtectionOfficerEmail
2342
- address
2343
- headquarterCountry
2344
- headquarterSubDivision
2345
- attributeValues {
2346
- name
2347
- attributeKey {
2348
- name
2349
- }
2350
- }
2351
- }
2352
- }
2353
- }
2354
- `,ks= exports.rb =_graphqlrequest.gql`
2355
- mutation TranscendCliCreateBusinessEntity(
2356
- $input: CreateBusinessEntityInput!
2357
- ) {
2358
- createBusinessEntity(input: $input) {
2359
- businessEntity {
2360
- id
2361
- title
2362
- description
2363
- dataProtectionOfficerName
2364
- dataProtectionOfficerEmail
2365
- address
2366
- headquarterCountry
2367
- headquarterSubDivision
2368
- attributeValues {
2369
- name
2370
- attributeKey {
2371
- name
2372
- }
2373
- }
2374
- }
2375
- }
2376
- }
2377
- `,_s= exports.sb =_graphqlrequest.gql`
2378
- mutation TranscendCliUpdateBusinessEntities(
2379
- $input: [UpdateBusinessEntityInput!]!
2380
- ) {
2381
- updateBusinessEntities(input: { businessEntities: $input }) {
2382
- clientMutationId
2383
- }
2384
- }
2385
- `;var Gs=_graphqlrequest.gql`
2386
- query TranscendCliActions($first: Int!, $offset: Int!) {
2387
- actions(
2388
- first: $first
2389
- offset: $offset
2390
- useMaster: false
2391
- orderBy: [{ field: type, direction: ASC }]
2392
- ) {
2393
- nodes {
2394
- id
2395
- type
2396
- skipSecondaryIfNoFiles
2397
- skipDownloadableStep
2398
- requiresReview
2399
- regionList
2400
- regionDetectionMethod
2401
- waitingPeriod
2402
- }
2403
- }
2404
- }
2405
- `,Ns= exports.ub =_graphqlrequest.gql`
2406
- mutation TranscendCliUpdateAction($input: UpdateActionInput!) {
2407
- updateAction(input: $input) {
2408
- clientMutationId
2409
- }
2410
- }
2411
- `;var Ms=_graphqlrequest.gql`
2412
- query TranscendCliGlobalActionItems(
2413
- $first: Int!
2414
- $offset: Int!
2415
- $filterBy: GlobalActionItemFiltersInput!
2416
- ) {
2417
- globalActionItems(first: $first, offset: $offset, filterBy: $filterBy) {
2418
- nodes {
2419
- ids
2420
- count
2421
- teams {
2422
- id
2423
- name
2424
- }
2425
- customerExperienceActionItemIds
2426
- users {
2427
- id
2428
- email
2429
- }
2430
- collections {
2431
- title
2432
- id
2433
- }
2434
- dueDate
2435
- priority
2436
- titles
2437
- resolved
2438
- notes
2439
- links
2440
- type
2441
- additionalContexts {
2442
- iconOverride
2443
- requestId
2444
- dataSiloId
2445
- requestType
2446
- latestAirgapVersion
2447
- parentTitle
2448
- }
2449
- attributeValues {
2450
- name
2451
- attributeKey {
2452
- name
2453
- }
2454
- }
2455
- }
2456
- }
2457
- }
2458
- `,Fs= exports.wb =_graphqlrequest.gql`
2459
- mutation TranscendCliUpdateActionItems($input: UpdateActionItemsInput!) {
2460
- updateActionItems(input: $input) {
2461
- clientMutationId
2462
- }
2463
- }
2464
- `,Us= exports.xb =_graphqlrequest.gql`
2465
- mutation TranscendCliCreateActionItems($input: [CreateActionItemsInput!]!) {
2466
- createActionItems(input: $input) {
2467
- clientMutationId
2468
- }
2469
- }
2470
- `;var Qs=_graphqlrequest.gql`
2471
- query TranscendCliFetchPrivacyCenterId($url: String!) {
2472
- privacyCenter(lookup: { url: $url }) {
2473
- id
2474
- }
2475
- }
2476
- `,Bs= exports.zb =_graphqlrequest.gql`
2477
- query TranscendCliDeployedPrivacyCenterUrl {
2478
- organization {
2479
- deployedPrivacyCenterUrl
2480
- }
2481
- }
2482
- `,Vs= exports.Ab =_graphqlrequest.gql`
2483
- query TranscendCliFetchPrivacyCenters($url: String!) {
2484
- privacyCenter(lookup: { url: $url }) {
2485
- id
2486
- url
2487
- isDisabled
2488
- showPrivacyRequestButton
2489
- showPolicies
2490
- showTrackingTechnologies
2491
- showCookies
2492
- showDataFlows
2493
- showConsentManager
2494
- showManageYourPrivacy
2495
- showMarketingPreferences
2496
- locales
2497
- defaultLocale
2498
- preferBrowserDefaultLocale
2499
- supportEmail
2500
- replyToEmail
2501
- useNoReplyEmailAddress
2502
- useCustomEmailDomain
2503
- transformAccessReportJsonToCsv
2504
- themeStr
2505
- }
2506
- }
2507
- `,Ks= exports.Bb =_graphqlrequest.gql`
2508
- mutation TranscendCliUpdatePrivacyCenter($input: UpdatePrivacyCenterInput!) {
2509
- updatePrivacyCenter(input: $input) {
2510
- clientMutationId
2511
- }
2512
- }
2513
- `;var ei=_graphqlrequest.gql`
2514
- mutation TranscendCliDetermineLoginMethod($email: String!) {
2515
- determineLoginMethod(input: { email: $email }) {
2516
- loginMethod {
2517
- email
2518
- sombraPublicKey
2519
- }
2520
- }
2521
- }
2522
- `,js= exports.Db =_graphqlrequest.gql`
2523
- mutation TranscendCliLogin(
2524
- $email: String!
2525
- $password: String!
2526
- $publicKey: String!
2527
- ) {
2528
- login(
2529
- input: { email: $email, password: $password }
2530
- publicKey: $publicKey
2531
- ) {
2532
- user {
2533
- roles {
2534
- id
2535
- organization {
2536
- name
2537
- id
2538
- uri
2539
- parentOrganizationId
2540
- }
2541
- }
2542
- }
2543
- }
2544
- }
2545
- `,Ys= exports.Eb =_graphqlrequest.gql`
2546
- mutation TranscendCliAssumeRole($id: ID!, $publicKey: String!) {
2547
- assumeRole(id: $id, publicKey: $publicKey) {
2548
- clientMutationId
2549
- }
2550
- }
2551
- `;var vg=_graphqlrequest.gql`
2552
- query TranscendCliLargeLanguageModels(
2553
- $first: Int!
2554
- $offset: Int!
2555
- $filterBy: LargeLanguageModelFiltersInput
2556
- ) {
2557
- largeLanguageModels(
2558
- first: $first
2559
- orderBy: [
2560
- { field: name, direction: ASC }
2561
- { field: client, direction: ASC }
2562
- { field: isTranscendHosted, direction: ASC }
2563
- ]
2564
- offset: $offset
2565
- filterBy: $filterBy
2566
- ) {
2567
- nodes {
2568
- id
2569
- name
2570
- client
2571
- isTranscendHosted
2572
- }
2573
- }
2574
- }
2575
- `;var Zs=_graphqlrequest.gql`
2576
- query TranscendCliAgents(
2577
- $first: Int!
2578
- $offset: Int!
2579
- $filterBy: AgentFiltersInput
2580
- ) {
2581
- agents(
2582
- first: $first
2583
- offset: $offset
2584
- filterBy: $filterBy
2585
- orderBy: [
2586
- { field: createdAt, direction: ASC }
2587
- { field: name, direction: ASC }
2588
- ]
2589
- ) {
2590
- nodes {
2591
- id
2592
- name
2593
- agentId
2594
- instructions
2595
- description
2596
- codeInterpreterEnabled
2597
- retrievalEnabled
2598
- prompt {
2599
- title
2600
- }
2601
- largeLanguageModel {
2602
- name
2603
- client
2604
- }
2605
- teams {
2606
- name
2607
- }
2608
- owners {
2609
- email
2610
- }
2611
- agentFunctions {
2612
- name
2613
- }
2614
- agentFiles {
2615
- name
2616
- }
2617
- }
2618
- }
2619
- }
2620
- `,zs= exports.Hb =_graphqlrequest.gql`
2621
- mutation TranscendCliCreateAgent($input: CreateAgentInput!) {
2622
- createAgent(input: $input) {
2623
- agent {
2624
- id
2625
- name
2626
- agentId
2627
- }
2628
- }
2629
- }
2630
- `,Ws= exports.Ib =_graphqlrequest.gql`
2631
- mutation TranscendCliUpdateAgents($input: UpdateAgentsInput!) {
2632
- updateAgents(input: $input) {
2633
- clientMutationId
2634
- }
2635
- }
2636
- `;var Hs=_graphqlrequest.gql`
2637
- query TranscendCliAgentFiles(
2638
- $first: Int!
2639
- $offset: Int!
2640
- $filterBy: AgentFileFiltersInput
2641
- ) {
2642
- agentFiles(
2643
- first: $first
2644
- offset: $offset
2645
- filterBy: $filterBy
2646
- orderBy: [
2647
- { field: createdAt, direction: ASC }
2648
- { field: name, direction: ASC }
2649
- ]
2650
- ) {
2651
- nodes {
2652
- id
2653
- name
2654
- description
2655
- fileId
2656
- size
2657
- purpose
2658
- initialFileName
2659
- }
2660
- }
2661
- }
2662
- `,Js= exports.Kb =_graphqlrequest.gql`
2663
- mutation TranscendCliCreateAgentFile($input: CreateAgentFileInput!) {
2664
- createAgentFile(input: $input) {
2665
- agentFile {
2666
- id
2667
- name
2668
- fileId
2669
- initialFileName
2670
- }
2671
- }
2672
- }
2673
- `,Xs= exports.Lb =_graphqlrequest.gql`
2674
- mutation TranscendCliUpdateAgentFiles($input: UpdateAgentFilesInput!) {
2675
- updateAgentFiles(input: $input) {
2676
- clientMutationId
2677
- }
2678
- }
2679
- `;var ea=_graphqlrequest.gql`
2680
- query TranscendCliAgentFunctions($first: Int!, $offset: Int!) {
2681
- agentFunctions(
2682
- first: $first
2683
- offset: $offset
2684
- orderBy: [
2685
- { field: createdAt, direction: ASC }
2686
- { field: name, direction: ASC }
2687
- ]
2688
- ) {
2689
- nodes {
2690
- id
2691
- name
2692
- description
2693
- parameters
2694
- }
2695
- }
2696
- }
2697
- `,ta= exports.Nb =_graphqlrequest.gql`
2698
- mutation TranscendCliCreateAgentFunction($input: CreateAgentFunctionInput!) {
2699
- createAgentFunction(input: $input) {
2700
- agentFunction {
2701
- id
2702
- name
2703
- }
2704
- }
2705
- }
2706
- `,ra= exports.Ob =_graphqlrequest.gql`
2707
- mutation TranscendCliUpdateAgentFunctions(
2708
- $input: UpdateAgentFunctionsInput!
2709
- ) {
2710
- updateAgentFunctions(input: $input) {
2711
- clientMutationId
2712
- }
2713
- }
2714
- `;var ia=_graphqlrequest.gql`
2715
- query TranscendCliVendors($first: Int!, $offset: Int!) {
2716
- vendors(
2717
- first: $first
2718
- offset: $offset
2719
- useMaster: false
2720
- isExportCsv: true
2721
- orderBy: [
2722
- { field: createdAt, direction: ASC }
2723
- { field: title, direction: ASC }
2724
- ]
2725
- ) {
2726
- nodes {
2727
- id
2728
- title
2729
- description
2730
- dataProcessingAgreementLink
2731
- contactName
2732
- contactEmail
2733
- contactPhone
2734
- address
2735
- headquarterCountry
2736
- headquarterSubDivision
2737
- websiteUrl
2738
- businessEntity {
2739
- title
2740
- }
2741
- teams {
2742
- name
2743
- }
2744
- owners {
2745
- email
2746
- }
2747
- attributeValues {
2748
- attributeKey {
2749
- name
2750
- }
2751
- name
2752
- }
2753
- }
2754
- }
2755
- }
2756
- `,na= exports.Qb =_graphqlrequest.gql`
2757
- mutation TranscendCliCreateVendor($input: CreateVendorInput!) {
2758
- createVendor(input: $input) {
2759
- vendor {
2760
- id
2761
- title
2762
- }
2763
- }
2764
- }
2765
- `,oa= exports.Rb =_graphqlrequest.gql`
2766
- mutation TranscendCliUpdateVendor($input: UpdateVendorsInput!) {
2767
- updateVendors(input: $input) {
2768
- clientMutationId
2769
- }
2770
- }
2771
- `;var sa=_graphqlrequest.gql`
2772
- query TranscendCliDataSubCategories($first: Int!, $offset: Int!) {
2773
- dataSubCategories(
2774
- first: $first
2775
- offset: $offset
2776
- isExportCsv: true
2777
- useMaster: false
2778
- ) {
2779
- nodes {
2780
- id
2781
- name
2782
- category
2783
- description
2784
- regex
2785
- teams {
2786
- name
2787
- }
2788
- owners {
2789
- email
2790
- }
2791
- attributeValues {
2792
- attributeKey {
2793
- name
2794
- }
2795
- name
2796
- }
2797
- }
2798
- }
2799
- }
2800
- `,aa= exports.Tb =_graphqlrequest.gql`
2801
- mutation TranscendCliCreateDataSubCategory(
2802
- $input: CreateDataInventorySubCategoryInput!
2803
- ) {
2804
- createDataSubCategory(input: $input) {
2805
- dataSubCategory {
2806
- id
2807
- name
2808
- category
2809
- }
2810
- }
2811
- }
2812
- `,pa= exports.Ub =_graphqlrequest.gql`
2813
- mutation TranscendCliUpdateDataSubCategories(
2814
- $input: UpdateDataSubCategoriesInput!
2815
- ) {
2816
- updateDataSubCategories(input: $input) {
2817
- clientMutationId
2818
- }
2819
- }
2820
- `;var la=_graphqlrequest.gql`
2821
- query TranscendCliProcessingPurposeSubCategories(
2822
- $first: Int!
2823
- $offset: Int!
2824
- ) {
2825
- processingPurposeSubCategories(
2826
- first: $first
2827
- offset: $offset
2828
- isExportCsv: true
2829
- useMaster: false
2830
- ) {
2831
- nodes {
2832
- id
2833
- name
2834
- purpose
2835
- description
2836
- teams {
2837
- name
2838
- }
2839
- owners {
2840
- email
2841
- }
2842
- attributeValues {
2843
- attributeKey {
2844
- name
2845
- }
2846
- name
2847
- }
2848
- }
2849
- }
2850
- }
2851
- `,ca= exports.Wb =_graphqlrequest.gql`
2852
- mutation TranscendCliCreateProcessingPurposeSubCategory(
2853
- $input: CreateProcessingPurposeCategoryInput!
2854
- ) {
2855
- createProcessingPurposeSubCategory(input: $input) {
2856
- processingPurposeSubCategory {
2857
- id
2858
- name
2859
- purpose
2860
- }
2861
- }
2862
- }
2863
- `,ua= exports.Xb =_graphqlrequest.gql`
2864
- mutation TranscendCliUpdateProcessingPurposeSubCategories(
2865
- $input: UpdateProcessingPurposeSubCategoriesInput!
2866
- ) {
2867
- updateProcessingPurposeSubCategories(input: $input) {
2868
- clientMutationId
2869
- }
2870
- }
2871
- `;var ma=_graphqlrequest.gql`
2872
- query TranscendCliProcessingActivities($first: Int!, $offset: Int!) {
2873
- processingActivities(first: $first, offset: $offset, useMaster: false) {
2874
- nodes {
2875
- id
2876
- title
2877
- description
2878
- securityMeasureDetails
2879
- controllerships
2880
- storageRegions {
2881
- countrySubDivision
2882
- country
2883
- }
2884
- transferRegions {
2885
- countrySubDivision
2886
- country
2887
- }
2888
- retentionType
2889
- retentionPeriod
2890
- dataProtectionImpactAssessmentLink
2891
- dataProtectionImpactAssessmentStatus
2892
- attributeValues {
2893
- name
2894
- attributeKey {
2895
- name
2896
- }
2897
- }
2898
- dataSilos {
2899
- title
2900
- }
2901
- dataSubjects {
2902
- type
2903
- }
2904
- teams {
2905
- name
2906
- }
2907
- owners {
2908
- email
2909
- }
2910
- processingPurposeSubCategories {
2911
- name
2912
- purpose
2913
- }
2914
- dataSubCategories {
2915
- name
2916
- category
2917
- }
2918
- saaSCategories {
2919
- title
2920
- }
2921
- }
2922
- }
2923
- }
2924
- `,da= exports.Zb =_graphqlrequest.gql`
2925
- mutation TranscendCliCreateProcessingActivity(
2926
- $input: CreateProcessingActivityInput!
2927
- ) {
2928
- createProcessingActivity(input: $input) {
2929
- processingActivity {
2930
- id
2931
- title
2932
- }
2933
- }
2934
- }
2935
- `,fa= exports._b =_graphqlrequest.gql`
2936
- mutation TranscendCliUpdateProcessingActivities(
2937
- $input: UpdateProcessingActivitiesInput!
2938
- ) {
2939
- updateProcessingActivities(input: $input) {
2940
- clientMutationId
2941
- }
2942
- }
2943
- `;var ga=_graphqlrequest.gql`
2944
- query TranscendSombraVersion {
2945
- organization {
2946
- sombra {
2947
- version
2948
- }
2949
- }
2950
- }
2951
- `;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 Ra = _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 te = _interopRequireWildcard(_iots); var Xt = _interopRequireWildcard(_iots); var Ye = _interopRequireWildcard(_iots); var Sl = _interopRequireWildcard(_iots);var Y="[NONE]",Kt= exports.bc ="[APPLY VALUE TO ALL ROWS]",pi= exports.cc ="<blank>",ar= exports.dc =["email","coreIdentifier"],It= exports.ec =(d=>(d.Email="email",d.CoreIdentifier="coreIdentifier",d.RequestType="requestType",d.SubjectType="subjectType",d.Locale="locale",d.Country="country",d.CountrySubDivision="countrySubDivision",d.RequestStatus="requestStatus",d.CreatedAt="createdAt",d.DataSiloIds="dataSiloIds",d))(It||{}),ya= exports.fc ={email:!1,coreIdentifier:!0,requestType:!0,subjectType:!0,requestStatus:!1,createdAt:!1,dataSiloIds:!1,locale:!1,country:!1,countrySubDivision:!1},ha= exports.gc ={requestType:!0,subjectType:!0},Ca= exports.hc =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}))}),pr= exports.ic =D.type({id:D.string,link:D.string,rowIndex:D.number,coreIdentifier:D.string,attemptedAt:D.string}),Aa= exports.jc =D.type({failingRequests:D.array(D.record(D.string,D.any)),successfulRequests:D.array(pr),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 li(t){return t.split(",").map(e=>e.trim()).filter(e=>e)}var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var Pa=dt.type({key:dt.string,values:dt.array(dt.string)});function Ea(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 ba(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, Ra.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 _chunk2FX6UYVOcjs.j.call(void 0, t.map(r=>r[e]||"").flat())}async function $a(t){let e=_chunk2FX6UYVOcjs.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 $c(t,e){return new (0, _graphqlrequest.GraphQLClient)(`${t}/graphql`,{headers:{...e,version:_chunk2FX6UYVOcjs.m}})}function Z(t,e){return $c(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,Jn),{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 Oh(t){return _got2.default.extend({prefixUrl:t})}async function Fh(t,{id:e,bundleType:r}){await l(t,Is,{airgapBundleId:e,bundleType:r})}async function Uh(t,{id:e,bundleType:r}){await l(t,As,{airgapBundleId:e,bundleType:r})}async function jh(t,e){let r=await l(t,Zn,{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 ci=20;async function lr(t,e={}){let r=[],n=0,i=!1;do{let{globalActionItems:{nodes:s}}=await l(t,Ms,{first:ci,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+=ci,i=s.length===ci}while(i);return r}var ui=20;async function cr(t){let e=[],r=0,n=!1;do{let{actions:{nodes:i}}=await l(t,Gs,{first:ui,offset:r});e.push(...i),r+=ui,n=i.length===ui}while(n);return e.sort((i,s)=>i.type.localeCompare(s.type))}var mi=20;async function ur(t,e={}){let r=[],n=0,i=!1;do{let{agentFiles:{nodes:s}}=await l(t,Hs,{first:mi,offset:n,filterBy:e});r.push(...s),n+=mi,i=s.length===mi}while(i);return r.sort((s,o)=>s.name.localeCompare(o.name))}var di=20;async function mr(t){let e=[],r=0,n=!1;do{let{agentFunctions:{nodes:i}}=await l(t,ea,{first:di,offset:r});e.push(...i.map(s=>({...s,parameters:JSON.parse(s.parameters)}))),r+=di,n=i.length===di}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var fi=20;async function dr(t,e={}){let r=[],n=0,i=!1;do{let{agents:{nodes:s}}=await l(t,Zs,{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 xa(t){let e=[],r=0,n=!1;do{let{assessmentForms:{nodes:i}}=await l(t,So,{first:gi,offset:r});e.push(...i),r+=gi,n=i.length===gi}while(n);return e.sort((i,s)=>i.title.localeCompare(s.title))}var yi=20;async function Da(t){let e=[],r=0,n=!1;do{let{assessmentFormTemplates:{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 qa(t){let e=[],r=0,n=!1;do{let{attributeKeys:{nodes:i}}=await l(t,Xn,{first:hi,offset:r});e.push(...i),r+=hi,n=i.length===hi}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,is,{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 Lc=[_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,Xo,{first:Pt,offset:r});e.push(...await Promise.all(i.map(async s=>({...s,values:Lc.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 Ci=20;async function fr(t){let e=[],r=0,n=!1;do{let{businessEntities:{nodes:i}}=await l(t,vs,{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))}async function ka(t){let{consentManager:{consentManager:e}}=await l(t,gs);return e}async function De(t,e){let{consentManager:{consentManager:r}}=await l(t,fs,{},{},e);return r.id}var Ai=50;async function gr(t){let e=[],r=0,n=!1;do{let{experiences:{nodes:i}}=await l(t,as,{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 vc=(r=>(r.Hourly="1h",r.Daily="1d",r))(vc||{});async function DC(t,e){let{analyticsData:{series:r}}=await l(t,Ls,{input:e});return r}async function _a(t,e){let{consentManagerTheme:{theme:r}}=await l(t,ys,{airgapBundleId:e});return r}var Ii=20;async function Si(t,e=_privacytypes.ConsentTrackerStatus.Live){let r=[],n=0,i=await De(t),s=!1;do{let{cookies:{nodes:o}}=await l(t,ds,{first:Ii,offset:n,airgapBundleId:i,status:e});r.push(...o),n+=Ii,s=o.length===Ii}while(s);return r.sort((o,p)=>o.name.localeCompare(p.name))}var Ti=20;async function yr(t){let e=[],r=0,n=!1;do{let{dataSubCategories:{nodes:i}}=await l(t,sa,{first:Ti,offset:r});e.push(...i),r+=Ti,n=i.length===Ti}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var Pi=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,ms,{first:Pi,offset:n,airgapBundleId:i,status:e,...e===_privacytypes.ConsentTrackerStatus.NeedsReview?{showZeroActivity:!0}:{}});r.push(...o),n+=Pi,s=o.length===Pi}while(s);return r.sort((o,p)=>o.value.localeCompare(p.value))}async function Ga(t){let{translatedMessages:e}=await l(t,go,{});return e}async function jt(t){let{organization:e}=await l(t,Bs);return e.deployedPrivacyCenterUrl}async function bt(t,e){let r=e;r||(r=await jt(t));let{privacyCenter:n}=await l(t,Qs,{url:r});return n.id}async function hr(t){let e=await jt(t),{privacyCenterPolicies:r}=await l(t,po,{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 Ei=20;async function Na(t){let e=[],r=0,n=!1;do{let{preferenceTopics:{nodes:i}}=await l(t,Po,{first:Ei,offset:r});e.push(...i),r+=Ei,n=i.length===Ei}while(n);return e.sort((i,s)=>`${i.slug}:${i.purpose.trackingType}`.localeCompare(`${s.slug}:${s.purpose.trackingType}`))}async function Ma(t){let e=await jt(t),{privacyCenter:{themeStr:r,...n}}=await l(t,Vs,{url:e});return[{...n,theme:JSON.parse(r)}]}var Ri=20;async function Cr(t){let e=[],r=0,n=!1;do{let{processingActivities:{nodes:i}}=await l(t,ma,{first:Ri,offset:r});e.push(...i),r+=Ri,n=i.length===Ri}while(n);return e.sort((i,s)=>i.title.localeCompare(s.title))}var bi=20;async function Ar(t){let e=[],r=0,n=!1;do{let{processingPurposeSubCategories:{nodes:i}}=await l(t,la,{first:bi,offset:r});e.push(...i),r+=bi,n=i.length===bi}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var wi=20;async function Ir(t,{includeDeleted:e=!1}={}){let r=[],n=0,i=!1;do{let{purposes:{nodes:s}}=await l(t,To,{first:wi,offset:n,input:{includeDeleted:e}});r.push(...s),n+=wi,i=s.length===wi}while(i);return r.sort((s,o)=>s.trackingType.localeCompare(o.trackingType))}async function Fa(t){let[e,r]=await Promise.all([Ir(t),Na(t)]);return e.map(n=>{let i=r.filter(s=>s.purpose.trackingType===n.trackingType);return{...n,topics:i}})}var $i=50;async function Sr(t,{requestId:e}){let r=[],n=0,i=!1;do{let{requestEnrichers:{nodes:s}}=await l(t,ho,{first:$i,offset:n,requestId:e});r.push(...s),n+=$i,i=s.length===$i}while(i);return r}var xi=50;async function Ua(t,{requestId:e}){let r=[],n=0,i=!1;do{let{requestIdentifiers:{nodes:s}}=await l(t,Bo,{first:xi,offset:n,requestIds:[e]});r.push(...s),n+=xi,i=s.length===xi}while(i);return r}var _semver = require('semver'); var _semver2 = _interopRequireDefault(_semver);var Qa="7.180.0",Mc=Je.type({id:Je.string,name:Je.string,value:Je.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.IdentifierType)}),Di=50,Fc= exports.hd =Je.type({identifiers:Je.array(Mc)});async function Tr(t,e,{requestId:r}){let n=[],i=0,s=!1,{organization:{sombra:{version:o}}}=await l(t,ga);if(o&&_semver2.default.lt(o,Qa))throw new Error(`Please upgrade Sombra to ${Qa} or greater to use this command.`);do{let p;try{p=await e.post("v1/request-identifiers",{json:{first:Di,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, Fc,p);n.push(...c),i+=Di,s=c.length===Di}while(s);return n}var _cliprogress = require('cli-progress'); var _cliprogress2 = _interopRequireDefault(_cliprogress);var Yc=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}))}),jA= exports.kd =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:Yc})]),Er=50;async function le(t,{actions:e=[],statuses:r=[],origins:n=[],text:i,createdAtBefore:s,createdAtAfter:o,isTest:p,isSilent:c,isClosed:u,requestIds:d=[]}={}){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Fetching requests..."));let m=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,co,{first:Er,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&&_>Er&&(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Fetching ${_} requests`)),f.start(_,0)),g.push(...C),y+=Er,f.update(y),A=C.length===Er}while(A);f.stop();let S=new Date().getTime()-m;_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Completed fetching of ${g.length} request in "${S/1e3}" seconds.`));let L=g;return d&&d.length>0&&(L=L.filter(C=>d.includes(C.id)),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Filtered down to ${L.length} requests based on ${d.length} provided IDs.`))),L}var qi=20;async function Rr(t){let e=[],r=0,n=!1;do{let{teams:{nodes:i}}=await l(t,No,{first:qi,offset:r});e.push(...i),r+=qi,n=i.length===qi}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var Li=20;async function XA(t){let e=[],r=0,n=!1;do{let{users:{nodes:i}}=await l(t,Vo,{first:Li,offset:r});e.push(...i),r+=Li,n=i.length===Li}while(n);return e.sort((i,s)=>i.email.localeCompare(s.email))}var vi=20;async function br(t){let e=[],r=0,n=!1;do{let{vendors:{nodes:i}}=await l(t,ia,{first:vi,offset:r});e.push(...i),r+=vi,n=i.length===vi}while(n);return e.sort((i,s)=>i.title.localeCompare(s.title))}var ki=20,Zc="https://app.transcend.io/infrastructure/api-keys";async function zc(t,e){let r=[],n=0,i=!1;do{let{apiKeys:{nodes:s}}=await l(t,Bn,{first:ki,offset:n,titles:e});r.push(...s),n+=ki,i=s.length===ki}while(i);return r.sort((s,o)=>s.title.localeCompare(o.title))}async function wr({"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:d})=>d),s=_chunk2FX6UYVOcjs.j.call(void 0, e.map(d=>d["api-key-title"]).filter(d=>!!d)),o=[...s,...i],p=await zc(r,n?void 0:[...s,...i]),c=_chunk2FX6UYVOcjs.e.call(void 0, p,"title"),u=_chunk2FX6UYVOcjs.c.call(void 0, o,p.map(({title:d})=>d));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: ${Zc}`)),process.exit(1)),c}var _i=100;async function Wc(t){let e=[],r=0,n=!1;do{let{catalogs:{nodes:i}}=await l(t,Ln,{first:_i,offset:r});e.push(...i),r+=_i,n=i.length===_i}while(n);return e.sort((i,s)=>i.integrationName.localeCompare(s.integrationName))}async function mI(t){let e=await Wc(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,ir);return e}async function Ka({"data-silos":t=[],"data-subjects":e=[],"processing-activities":r=[],enrichers:n=[]},i,s=!1){let o=_chunk2FX6UYVOcjs.j.call(void 0, [..._chunk2FX6UYVOcjs.a.call(void 0, t.map(d=>d["data-subjects"]||[])||[]),..._chunk2FX6UYVOcjs.a.call(void 0, _nullishCoalesce(r.map(({dataSubjectTypes:d})=>_nullishCoalesce(d, () => ([]))), () => ([]))),..._chunk2FX6UYVOcjs.a.call(void 0, n.map(d=>d["data-subjects"]||[])||[]),...e.map(d=>d.type)]);if(o.length===0&&!s)return{};let p=await Yt(i),c=_chunk2FX6UYVOcjs.e.call(void 0, p,"type"),u=_chunk2FX6UYVOcjs.c.call(void 0, o,p.map(({type:d})=>d));return u.length>0&&(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating ${u.length} new data subjects...`)),await _bluebird.mapSeries.call(void 0, u,async d=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating data subject ${d}...`));let{createSubject:m}=await l(i,Gn,{type:d,skipPublish:!0});_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Created data subject ${d}!`)),c[d]=m.subject})),c}function ja(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 Ya(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 Ni=20;async function Mi(t){let e=[],r=0,n=!1;do{let{identifiers:{nodes:i}}=await l(t,vn,{first:Ni,offset:r});e.push(...i),r+=Ni,n=i.length===Ni}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}async function Za({enrichers:t=[],"data-silos":e=[],identifiers:r=[]},n,i=!1){let s=await Mi(n),o=_chunk2FX6UYVOcjs.e.call(void 0, s,"name"),p=_chunk2FX6UYVOcjs.j.call(void 0, [..._chunk2FX6UYVOcjs.a.call(void 0, t.map(u=>[u["input-identifier"],...u["output-identifiers"]])),..._chunk2FX6UYVOcjs.a.call(void 0, e.map(u=>u["identity-keys"])),...r.map(({name:u})=>u)]).filter(u=>!!u),c=_chunk2FX6UYVOcjs.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,kn),d=u.map(({name:m})=>m);await _bluebird.mapSeries.call(void 0, c,async m=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating identifier ${m}...`));let{createIdentifier:f}=await l(n,_n,{input:{name:m,type:d.includes(m)?m:"custom",skipPublish:i}});_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Created identifier ${m}!`)),o[m]=f.identifier})}return o}var Fi=20;async function $r(t){let e=[],r=0,n=!1;do{let{promptGroups:{nodes:i}}=await l(t,wo,{first:Fi,offset:r});e.push(...i),r+=Fi,n=i.length===Fi}while(n);return e.sort((i,s)=>i.title.localeCompare(s.title))}var Ui=20;async function xr(t){let e=[],r=0,n=!1;do{let{promptPartials:{nodes:i}}=await l(t,bo,{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 $t(t,{text:e,titles:r=[],ids:n=[]}={}){let i=[],s=0,o=!1;do{let{prompts:{nodes:p}}=await l(t,Ro,{first:Qi,offset:s,filterBy:{...e?{text:e}:{},...r.length>0?{title:r}:{},...n.length>0?{id:n}:{}}});i.push(...p),s+=Qi,o=p.length===Qi}while(o);return i.sort((p,c)=>p.title.localeCompare(c.title))}async function OI(t,{promptTitles:e=[],promptIds:r=[]}={}){let{promptsWithVariables:n}=await l(t,$o,{input:{...e.length>0?{promptTitles:e}:{},...r.length>0?{promptIds:r}:{}}});return n}var Bi=20;async function FI(t,e){let r=[],n=0,i=!1;do{let{promptThreads:{nodes:s}}=await l(t,so,{first:Bi,offset:n,filterBy:e});r.push(...s),n+=Bi,i=s.length===Bi}while(i);return r.sort((s,o)=>s.threadId.localeCompare(o.threadId))}async function za(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 Vi=100;async function Ki(t,{requestId:e,dataSiloId:r,requestStatuses:n,statuses:i,limit:s,onProgress:o}){let p=[],c=0,u=!1;do{let{requestDataSilos:{nodes:d}}=await l(t,Zr,{first:Vi,offset:c,filterBy:{dataSiloId:r,requestId:e,status:i,requestStatus:n}});p.push(...d),c+=Vi,u=d.length===Vi,_optionalChain([o, 'optionalCall', _5 => _5(d.length)])}while(u&&(!s||c<s));return p}async function Wa(t,{requestId:e,dataSiloId:r}){let n=await Ki(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 YI(t,{dataSiloId:e}){let{listReducedRequestsForDataSilo:{totalCount:r}}=await l(t,Go,{input:{dataSiloId:e,isResolved:!1}});return r}async function HI(t,e,r){let n=[],i=null,s=!1;do{let o=await l(t,jo,{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 tS(t,{email:e,password:r}){let{determineLoginMethod:{loginMethod:n}}=await l(t,ei,{email:e}),i=await t.rawRequest(js,{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 rS(t,{email:e,roleId:r}){let{determineLoginMethod:{loginMethod:n}}=await l(t,ei,{email:e,userId:r});await t.rawRequest(Ys,{id:r,publicKey:n.sombraPublicKey})}async function sS(t,e){let{createApiKey:{apiKey:r}}=await l(t,Vn,{input:e});return r}async function aS(t,e){await l(t,Kn,{id:e})}var ru=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)}),iu= exports.Md =V.type({dependsOnQuestionReferenceId:V.string,comparisonOperator:V.union([V.literal(_privacytypes.ComparisonOperator.IsNotShown),V.literal(_privacytypes.ComparisonOperator.IsShown)])}),Ja= exports.Nd =V.union([ru,iu]),nu= exports.Od =V.recursion("AssessmentNestedRule",t=>V.intersection([V.type({logicOperator:_typeutils.valuesOf.call(void 0, _privacytypes.LogicOperator)}),V.partial({rules:V.array(Ja),nestedRules:V.array(t)})])),ou= exports.Pd =V.partial({action:_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentsDisplayLogicAction),rule:Ja,nestedRule:nu});function ji(t){return _typeutils.decodeCodec.call(void 0, ou,t)}var lu=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 Yi(t){return _typeutils.decodeCodec.call(void 0, lu,t)}var Zi=20;async function tp(t,{titles:e,pageSize:r,ids:n=[],gql:i=Rn,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,d)=>u.title.localeCompare(d.title))}async function uu(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?Pn:Tn,{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 _chunk2FX6UYVOcjs.g.call(void 0, s,"name")}async function mu(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,Sn,{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 d=>{try{r&&_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Fetching subdatapoints for ${d.name} for datapoint offset ${p}`));let m=await uu(t,d.id,{pageSize:1e3,debug:r,includeGuessedCategories:s});o.push({...d,subDataPoints:m.sort((f,g)=>f.name.localeCompare(g.name))}),r&&_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully fetched subdatapoints for ${d.name}`))}catch(m){throw _chunkZUNVPK23cjs.a.error(_colors2.default.red(`An error fetching subdatapoints for ${d.name} datapoint offset ${p}`)),m}},{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,d)=>u.name.localeCompare(d.name))}async function rp(t,{ids:e,pageSize:r,titles:n,debug:i,skipDatapoints:s,skipSubDatapoints:o,includeGuessedCategories:p,integrationNames:c}){let u=[],d=await tp(t,{titles:n,ids:e,integrationNames:c,pageSize:r,gql:bn});return s||await _bluebird.mapSeries.call(void 0, d,async(m,f)=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`[${f+1}/${d.length}] Fetching data silo - ${m.title}`));let g=await mu(t,m.id,{debug:i,pageSize:r,skipSubDatapoints:o,includeGuessedCategories:p});i&&_chunkZUNVPK23cjs.a.info(_colors2.default.green(`[${f+1}/${d.length}] Successfully fetched datapoint for - ${m.title}`)),u.push([m,g])}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully fetched all ${d.length} data silo configurations`)),u}async function ip(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 tp(e,{titles:t.map(({title:S})=>S),pageSize:r}),c=_chunk2FX6UYVOcjs.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=_chunk2FX6UYVOcjs.b.call(void 0, u,Zi);await _bluebird.mapSeries.call(void 0, S,async L=>{let{createDataSilos:{dataSilos:C}}=await l(e,wn,{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 d=_chunk2FX6UYVOcjs.b.call(void 0, t,Zi);await _bluebird.mapSeries.call(void 0, d,async(S,L)=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`[Batch ${L+1}/${d.length}] Syncing "${S.length}" data silos`)),await l(e,Ur,{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"]?ja(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}/${d.length}] Synced "${S.length}" data silos!`))});let m=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...`)),m.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:H,description:me,categories:ce,purposes:J,attributes:Ie,...Se})=>({name:H,description:me,categories:ce?ce.map(pe=>({...pe,name:pe.name||"Other"})):void 0,purposes:J?J.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,W={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(([H,me])=>({requestType:H,suggestedQuery:me})):void 0,enabledActions:C["privacy-actions"]||[],subDataPoints:_},K=(W.subDataPoints||[]).map(({name:H})=>H),se=K.filter((H,me)=>K.indexOf(H)!==me);if(se.length>0)_chunkZUNVPK23cjs.a.info(_colors2.default.red(`
2952
- Cannot update datapoint "${C.key}" as it has duplicate sub-datapoints with the same name:
2953
- ${se.join(`
2954
- `)}`)),s=!0;else try{await l(e,En,W)}catch(H){_chunkZUNVPK23cjs.a.info(_colors2.default.red(`
2955
- Failed to update datapoint "${C.key}" for data silo "${L}"! -
2956
- ${H.message}`)),s=!0}y+=1,m.update(y)})},{concurrency:10}),m.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 np(t,e){let r=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" data silo dependencies...`));let n=_chunk2FX6UYVOcjs.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,Ur,{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 zi=20;async function Wi(t,e){let r=[],n=0,i=!1;do{let{enrichers:{nodes:s}}=await l(t,$n,{first:zi,offset:n,title:e});r.push(...s),n+=zi,i=s.length===zi}while(i);return r.sort((s,o)=>s.title.localeCompare(o.title))}async function sp(t,{enricher:e,identifierByName:r,dataSubjectsByName:n}){let s=(await Wi(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 d=n[u];if(!d)throw new Error(`Failed to find a data subject with name: ${u}`);return d.id})]),p=e["input-identifier"],c=e["privacy-actions"]||Object.values(_privacytypes.RequestAction);s?await l(t,qn,{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,Dn,{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 Hi=20;async function gt(t,e){let r=[],n=0,i=!1;do{let{templates:{nodes:s}}=await l(t,Wn,{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 ap(t,e){(await gt(e,t.title)).find(({title:i})=>i===t.title)||await l(e,Hn,{title:t.title})}function Ji(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,Wo,{filterBy:{...e}});return r}var Xi=50;async function zt(t){let e=[],r=0,n=!1;do{let{consentPartitions:{nodes:i}}=await l(t,ps,{first:Xi,offset:r});e.push(...i),r+=Xi,n=i.length===Xi}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}async function lp(t,e){let r=await De(t),n=!1,i=await zt(t),s=_chunk2FX6UYVOcjs.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,qs,{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 Cu=["dataSilos","enrichers","templates","apiKeys"];async function OT(t,{dataSiloIds:e,integrationNames:r,debug:n,resources:i=Cu,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[d,m,f,g,y,A,R,S,L,C,_,W,K,se,H,me,ce,J,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")?wr({},t,!0):[],i.includes("dataSilos")?rp(t,{ids:e,integrationNames:r,pageSize:s,debug:n,includeGuessedCategories:p,skipDatapoints:o,skipSubDatapoints:c}):[],i.includes("enrichers")?Wi(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 Si(t,_privacytypes.ConsentTrackerStatus.Live):[],...u.includes(_privacytypes.ConsentTrackerStatus.NeedsReview)?await Si(t,_privacytypes.ConsentTrackerStatus.NeedsReview):[]]:[],i.includes("customFields")?Et(t):[],i.includes("templates")?gt(t):[],i.includes("identifiers")?Mi(t):[],i.includes("actions")?cr(t):[],i.includes("businessEntities")?fr(t):[],i.includes("processingActivities")?Cr(t):[],i.includes("consentManager")?ka(t):void 0,i.includes("consentManager")?gr(t):[],i.includes("prompts")?$t(t):[],i.includes("promptPartials")?xr(t):[],i.includes("promptGroups")?$r(t):[],i.includes("agents")?dr(t):[],i.includes("agentFunctions")?mr(t):[],i.includes("agentFiles")?ur(t):[],i.includes("vendors")?br(t):[],i.includes("dataCategories")?yr(t):[],i.includes("processingPurposes")?Ar(t):[],i.includes("actionItems")?lr(t,{type:[_privacytypes.ActionItemCode.Onboarding]}):[],i.includes("actionItemCollections")?xt(t):[],i.includes("teams")?Rr(t):[],i.includes("policies")?hr(t):[],i.includes("privacyCenters")?Ma(t):[],i.includes("messages")?Ga(t):[],i.includes("partitions")?zt(t):[],i.includes("assessments")?xa(t):[],i.includes("assessmentTemplates")?Da(t):[],i.includes("purposes")?Fa(t):[]]),Ft=i.includes("consentManager")&&K?await _a(t,K.id):void 0,U={},Ul=_chunk2FX6UYVOcjs.a.call(void 0, f.map(([{apiKeys:h}])=>h.map(({title:T})=>T))),gn=Object.values(m).filter(({title:h})=>i.includes("apiKeys")?!0:Ul.includes(h));if(gn.length>0&&i.includes("apiKeys")&&(U["api-keys"]=gn.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:X,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:Nr,subType:xe,placeholder:qe,description:lt,isRequired:Ql,referenceId:Bl,displayLogic:yn,riskLogic:Vl,riskCategories:Kl,riskFramework:jl,answerOptions:Yl,selectedAnswers:Zl,allowedMimeTypes:zl,allowSelectOther:Wl,syncModel:Hl,syncColumn:Jl,attributeKey:Xl,requireRiskEvaluation:ec,requireRiskMatrixEvaluation:tc})=>{let Oe=yn?ji(yn):void 0;return{title:pt,type:Nr,"sub-type":xe,placeholder:qe,description:lt,"is-required":Ql,"reference-id":Bl,"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":Vl.map(Le=>{let Mr=Yi(Le);return{"risk-level":_optionalChain([Mr, 'access', _21 => _21.riskAssignment, 'optionalAccess', _22 => _22.riskLevelId]),"comparison-operands":Mr.comparisonOperands,"comparison-operator":Mr.comparisonOperator}}),"risk-categories":Kl.map(({title:Le})=>Le),"risk-framework":_optionalChain([jl, 'optionalAccess', _23 => _23.title]),"answer-options":Yl.map(({value:Le})=>({value:Le})),"selected-answers":Zl.map(({value:Le})=>Le),"allowed-mime-types":zl,"allow-select-other":Wl,"sync-model":Hl||void 0,"sync-column":Jl||void 0,"attribute-key":_optionalChain([Xl, 'optionalAccess', _24 => _24.name]),"require-risk-evaluation":ec,"require-risk-matrix-evaluation":tc}}),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:X,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:X,questions:j})=>({title:X,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:Nr})=>{let xe=Re?ji(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=Yi(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":Nr}})})),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}))),H.length>0&&i.includes("prompts")&&(U.prompts=H.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)}))),d.length>0&&i.includes("dataSubjects")&&(U["data-subjects"]=d.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}))),W.length>0&&i.includes("processingActivities")&&(U["processing-activities"]=W.map(({title:h,description:T,securityMeasureDetails:b,controllerships:w,storageRegions:$,transferRegions:q,retentionType:k,retentionPeriod:G,dataProtectionImpactAssessmentLink:B,dataProtectionImpactAssessmentStatus:Q,attributeValues:X,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?Ji($):void 0,transferRegions:q.length>0?Ji(q):void 0,retentionType:k,retentionPeriod:k===_privacytypes.RetentionType.StatedPeriod?G:void 0,dataProtectionImpactAssessmentLink:_nullishCoalesce(B, () => (void 0)),dataProtectionImpactAssessmentStatus:Q,attributes:X!==void 0&&X.length>0?ve(X):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:X,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:X,isUniqueOnPreferenceStore:j}))),J.length>0&&i.includes("agents")&&(U.agents=J.map(({name:h,agentId:T,description:b,instructions:w,codeInterpreterEnabled:$,retrievalEnabled:q,prompt:k,largeLanguageModel:G,teams:B,owners:Q,agentFunctions:X,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":X&&X.length>0?X.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:X,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:X,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:X,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:X&&X.length>0?X.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:X,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":X.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:X,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:X||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=_chunk2FX6UYVOcjs.e.call(void 0, d,"type");U["data-silos"]=f.map(([{title:T,description:b,url:w,type:$,outerType:q,apiKeys:k,notifyEmailAddress:G,identifiers:B,dependentDataSilos:Q,owners:X,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)}:{},...X.length>0?{owners:X.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?Ya(_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":_chunk2FX6UYVOcjs.f.call(void 0, _chunk2FX6UYVOcjs.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 FT(t,e){let{reportPromptRun:{promptRun:r}}=await l(t,Zo,{input:{...e,promptRunMessages:e.promptRunMessages.map(({content:n,...i})=>({...i,message:n}))}});return r.id}async function up(t,e){await l(t,Co,{requestEnricherId:e})}async function YT(t,e){await l(t,ss,{input:e})}var Su=[...Object.values(_privacytypes.IsoCountryCode),...Object.values(_privacytypes.IsoCountrySubdivisionCode)];async function mp(t,{action:e,actionId:r,skipPublish:n=!1}){await l(t,Ns,{input:{id:r,skipSecondaryIfNoFiles:e.skipSecondaryIfNoFiles,skipDownloadableStep:e.skipDownloadableStep,requiresReview:e.requiresReview,waitingPeriod:e.waitingPeriod,skipPublish:n,regionList:e.regionBlockList?_chunk2FX6UYVOcjs.c.call(void 0, Su,e.regionBlockList):e.regionList,regionDetectionMethod:e.regionDetectionMethod}})}async function Tu(t,e){let r={title:e.title,description:e.description||"",hidden:e.hidden||!1,productLine:e.productLine},{createActionItemCollection:n}=await l(t,Ho,{input:r});return n.created}async function Pu(t,e,r){await l(t,Jo,{input:{id:r,title:e.title,description:e.description,hidden:e.hidden,productLine:e.productLine}})}async function fp(t,e){let r=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" action item collections...`));let n=await xt(t),i=_chunk2FX6UYVOcjs.e.call(void 0, n,"title"),s=e.filter(p=>!i[p.title]);await _bluebird.mapSeries.call(void 0, s,async p=>{try{await Tu(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 Pu(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 Eu(t,e,r,n={}){let i=_chunk2FX6UYVOcjs.b.call(void 0, e,100);await _bluebird.mapSeries.call(void 0, i,async s=>{await l(t,Us,{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 Ru(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,Fs,{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 bu({title:t,collections:e}){return`${t}-${e.map(r=>r.title).sort().join("-")}`}function gp({title:t,collections:e}){return`${t}-${e.sort().join("-")}`}async function hp(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([lr(t),xt(t),n?Et(t):[]]),p=_chunk2FX6UYVOcjs.e.call(void 0, s,"title"),c=_chunk2FX6UYVOcjs.e.call(void 0, i,bu),u=_chunk2FX6UYVOcjs.e.call(void 0, o,"name"),d=_chunk2FX6UYVOcjs.e.call(void 0, i.filter(y=>!!y.customerExperienceActionItemIds),({customerExperienceActionItemIds:y})=>y[0]),m=_chunk2FX6UYVOcjs.j.call(void 0, e.map(y=>y.collections).flat()).filter(y=>!p[y]);if(m.length>0)return _chunkZUNVPK23cjs.a.info(_colors2.default.red(`Missing action item collections: "${m.join('", "')}" - please create them first!`)),!1;let f=e.filter(y=>!c[gp(y)]&&!d[y.customerExperienceActionItemId]);if(f.length>0)try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating "${f.length}" actionItems...`)),await Eu(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[gp(y)], 'optionalAccess', _58 => _58.id])||_optionalChain([d, '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 Ru(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 $u(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,Js,{input:r});return n.agentFile}async function xu(t,e){await l(t,Xs,{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 Cp(t,e){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" agent files...`));let r=!1,n=await ur(t),i=_chunk2FX6UYVOcjs.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 $u(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 xu(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,ta,{input:r});return n.agentFunction}async function Lu(t,e){await l(t,ra,{input:{agentFunctions:e.map(([r,n])=>({id:n,name:r.name,description:r.description,parameters:r.parameters}))}})}async function Ap(t,e){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" agent functions...`));let r=!1,n=await mr(t),i=_chunk2FX6UYVOcjs.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 Lu(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 ku(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,zs,{input:r});return n.agent}async function _u(t,e){await l(t,Ws,{input:{agents:e.map(([r,n])=>({id:n,name:r.name,description:r.description,codeInterpreterEnabled:r.codeInterpreterEnabled,retrievalEnabled:r.retrievalEnabled}))}})}async function Ip(t,e){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" agents...`));let r=!1,n=await dr(t),i=_chunk2FX6UYVOcjs.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 ku(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 _u(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 Sp(t,e,{existingAttribute:r,deleteExtraAttributeValues:n}){let i={name:e.name,enabledOn:e.resources},s;if(r)await l(t,os,{attributeKeyId:r.id,description:r.isCustom?e.description:void 0,...i}),s=r.id;else{let{createAttributeKey:{attributeKey:d}}=await l(t,ns,{type:e.type,description:e.description,...i});s=d.id}let o=_chunk2FX6UYVOcjs.e.call(void 0, _optionalChain([r, 'optionalAccess', _61 => _61.values])||[],"name"),{existingValues:p=[],newValues:c=[]}=_chunk2FX6UYVOcjs.d.call(void 0, e.values||[],d=>o[d.name]?"existingValues":"newValues"),u=_chunk2FX6UYVOcjs.c.call(void 0, (_optionalChain([r, 'optionalAccess', _62 => _62.values])||[]).map(({name:d})=>d),(e.values||[]).map(({name:d})=>d));c.length>0&&(await l(t,es,{input:c.map(({name:d,...m})=>({name:d,attributeKeyId:s,...m}))}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Created ${c.length} attribute values`))),p.length>0&&(await l(t,ts,{input:p.map(({name:d,...m})=>({id:o[d].id,name:d,description:o[d].description,color:o[d].color,...m,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 d=>{await l(t,rs,{id:o[d].id})},{concurrency:10}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Deleted ${u.length} attribute values`)))}async function Gu(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,ks,{input:r});return n.businessEntity}async function Nu(t,e){let r=_chunk2FX6UYVOcjs.b.call(void 0, e,100);await _bluebird.mapSeries.call(void 0, r,async n=>{await l(t,_s,{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 Pp(t,e){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" business entities...`));let r=!1,n=await fr(t),i=_chunk2FX6UYVOcjs.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 Gu(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 Nu(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 tn=20;async function Ep(t){let e=[],r=0,n=!1;do{let{codePackages:{nodes:i}}=await l(t,io,{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))}var rn=20;async function Rp(t){let e=[],r=0,n=!1;do{let{softwareDevelopmentKits:{nodes:i}}=await l(t,eo,{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 Uu=100;async function Qu(t,e){let{createSoftwareDevelopmentKit:{softwareDevelopmentKit:r}}=await l(t,ro,{input:e});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created software development kit "${e.name}"!`)),r}async function Bu(t,e){let{updateSoftwareDevelopmentKits:{softwareDevelopmentKits:r}}=await l(t,to,{input:{softwareDevelopmentKits:e}});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated ${e.length} software development kits!`)),r}async function bp(t,e,r=20){let n=!1,i=[];_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Syncing software development kits..."));let s=await Rp(t),o=_chunk2FX6UYVOcjs.e.call(void 0, s,({name:m,codePackageType:f})=>JSON.stringify({name:m,codePackageType:f})),p=e.map(m=>[m,_optionalChain([o, 'access', _63 => _63[JSON.stringify({name:m.name,codePackageType:m.codePackageType})], 'optionalAccess', _64 => _64.id])]),c=p.filter(([,m])=>!m).map(([m])=>m);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating "${c.length}" new software development kits...`)),await _bluebird.map.call(void 0, c,async m=>{let f=await Qu(t,m);i.push(f)},{concurrency:r}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced ${c.length} software development kits!`))}catch(m){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create software development kits! - ${m.message}`))}let u=p.filter(m=>!!m[1]),d=_chunk2FX6UYVOcjs.b.call(void 0, u,Uu);return _chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${u.length}" software development kits...`)),await _bluebird.mapSeries.call(void 0, d,async m=>{try{let f=await Bu(t,m.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 nn=20;async function wp(t){let e=[],r=0,n=!1;do{let{repositories:{nodes:i}}=await l(t,Fn,{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 ju=100;async function Yu(t,e){let{createRepository:{repository:r}}=await l(t,Qn,{input:e});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created repository "${e.name}"!`)),r}async function Zu(t,e){let{updateRepositories:{repositories:r}}=await l(t,Un,{input:{repositories:e}});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated ${e.length} repositories!`)),r}async function $p(t,e,r=20){let n=!1,i=[],s=await wp(t),o=_chunk2FX6UYVOcjs.e.call(void 0, s,"name"),p=e.map(m=>[m,_optionalChain([o, 'access', _65 => _65[m.name], 'optionalAccess', _66 => _66.id])]),c=p.filter(([,m])=>!m).map(([m])=>m);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating "${c.length}" new repositories...`)),await _bluebird.map.call(void 0, c,async m=>{let f=await Yu(t,m);i.push(f)},{concurrency:r}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced ${c.length} repositories!`))}catch(m){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create repositories! - ${m.message}`))}let u=p.filter(m=>!!m[1]),d=_chunk2FX6UYVOcjs.b.call(void 0, u,ju);return _chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${u.length}" repositories...`)),await _bluebird.mapSeries.call(void 0, d,async m=>{try{let f=await Zu(t,m.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 Hu=100,kt="%%%%";async function Ju(t,e){let{createCodePackage:{codePackage:r}}=await l(t,oo,{input:e});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created code package "${e.name}"!`)),r}async function Xu(t,e){let{updateCodePackages:{codePackages:r}}=await l(t,no,{input:{codePackages:e}});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated ${e.length} code packages!`)),r}async function ZE(t,e,r=20){let n=!1,[i,{softwareDevelopmentKits:s}]=await Promise.all([Ep(t),bp(t,_chunk2FX6UYVOcjs.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),$p(t,_chunk2FX6UYVOcjs.k.call(void 0, e,"repositoryName").map(({repositoryName:f})=>({name:f,url:`https://github.com/${f}`})))]),o=_chunk2FX6UYVOcjs.e.call(void 0, s,({name:f,codePackageType:g})=>`${f}${kt}${g}`),p=_chunk2FX6UYVOcjs.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 Ju(t,{...g,...f?{softwareDevelopmentKitIds:_chunk2FX6UYVOcjs.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 d=c.filter(f=>!!f[1]);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${d.length}" code packages...`));let m=_chunk2FX6UYVOcjs.b.call(void 0, d,Hu);return await _bluebird.mapSeries.call(void 0, m,async f=>{try{await Xu(t,f.map(([{softwareDevelopmentKits:g,repositoryName:y,...A},R])=>({...A,...g?{softwareDevelopmentKitIds:_chunk2FX6UYVOcjs.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 xp(t,{identifier:e,dataSubjectsByName:r,identifierId:n,skipPublish:i=!1}){await l(t,On,{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 tm=100;async function rm(t,e){let r=await De(t);await _bluebird.mapSeries.call(void 0, _chunk2FX6UYVOcjs.b.call(void 0, e,tm),async n=>{await l(t,us,{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 Dp(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 rm(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 im(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,Mo,{input:r});return n.team}async function nm(t,e,r){let{updateTeam:n}=await l(t,Fo,{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 Lp(t,e){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" teams...`));let r=!1,n=await Rr(t),i=_chunk2FX6UYVOcjs.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 im(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 nm(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 vp(t,{dataSubject:e,dataSubjectId:r,skipPublish:n=!1}){await l(t,Nn,{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,Mn,{input:{id:r,active:e.active,skipPublish:n}})}async function sm(t,e){let{createPrompt:{prompt:r}}=await l(t,Do,{input:e});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created prompt "${e.title}"!`)),r.id}async function am(t,e){await l(t,xo,{input:{prompts:e.map(([r,n])=>({...r,id:n}))}}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated ${e.length} prompts!`))}async function kp(t,e,r=20){let n=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" prompts...`));let i=await $t(t),s=_chunk2FX6UYVOcjs.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 sm(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 lm=100;async function cm(t,e){let r=await bt(t);await _bluebird.mapSeries.call(void 0, _chunk2FX6UYVOcjs.b.call(void 0, e,lm),async n=>{await l(t,lo,{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 _p(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 hr(t),s=_chunk2FX6UYVOcjs.e.call(void 0, i,({title:o})=>o.defaultMessage);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Upserting "${e.length}" new policies...`)),await cm(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 mm=100;async function dm(t,e){await _bluebird.mapSeries.call(void 0, _chunk2FX6UYVOcjs.b.call(void 0, e,mm),async r=>{await l(t,yo,{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 Op(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 dm(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 Gp(t,e){let r=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Syncing privacy center..."));let n=await bt(t);try{await l(t,Ks,{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 Mp="https://app.transcend.io/consent-manager/regional-experiences/purposes";async function hm(t,e){let r=await gr(t),n=_chunk2FX6UYVOcjs.e.call(void 0, r,"name"),i=await Ir(t),s=_chunk2FX6UYVOcjs.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((m,f)=>{let g=s[m.trackingType];if(!g)throw new Error(`Invalid purpose trackingType provided at consentManager.experiences[${p}].purposes[${f}]: ${m.trackingType}. See list of valid purposes ${Mp}`);return g.id})]),u=_optionalChain([o, 'access', _76 => _76.optedOutPurposes, 'optionalAccess', _77 => _77.map, 'call', _78 => _78((m,f)=>{let g=s[m.trackingType];if(!g)throw new Error(`Invalid purpose trackingType provided at consentManager.experiences[${p}].optedOutPurposes[${f}]: ${m.trackingType}. See list of valid purposes ${Mp}`);return g.id})]),d=n[o.name];d?(await l(t,xs,{input:{id:d.id,name:o.displayName,regions:o.regions,operator:o.operator,onConsentExpiry:o.onConsentExpiry,consentExpiry:o.consentExpiry,displayPriority:o.displayPriority!==d.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,Ds,{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 Fp(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,hs,{domains:e.domains,privacyCenterId:i});r=s.consentManager.id}else throw n}if(e.domains&&await l(t,Ss,{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,Ts,{partitionId:i.id,airgapBundleId:r})}e.version&&await l(t,Cs,{airgapBundleId:r,version:e.version}),e.signedIabAgreement&&await l(t,Ps,{input:{id:r,...e.signedIabAgreement?{signedIabAgreement:e.signedIabAgreement}:{}}}),e.unknownRequestPolicy&&await l(t,Es,{input:{id:r,unknownRequestPolicy:e.unknownRequestPolicy}}),e.unknownRequestPolicy&&await l(t,Rs,{input:{id:r,unknownCookiePolicy:e.unknownCookiePolicy}}),e.telemetryPartitioning&&await l(t,bs,{input:{id:r,strategy:e.telemetryPartitioning}}),e.consentPrecedence&&await l(t,ws,{input:{id:r,consentPrecedence:e.consentPrecedence}}),e.experiences&&await hm(t,e.experiences),e.theme&&await l(t,$s,{input:{airgapBundleId:r,...e.theme}})}var Bp=100;async function Cm(t,e,r=!1){let n=await De(t);await _bluebird.mapSeries.call(void 0, _chunk2FX6UYVOcjs.b.call(void 0, e,Bp),async i=>{await l(t,cs,{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 Am(t,e,r=!1){let n=await De(t);await _bluebird.mapSeries.call(void 0, _chunk2FX6UYVOcjs.b.call(void 0, e,Bp),async i=>{await l(t,ls,{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 Vp(t,e,r){let n=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" data flows...`));let i=e.filter(m=>e.filter(f=>m.value===f.value&&m.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:m})=>m).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(m=>[m,_optionalChain([p, 'access', _79 => _79.find, 'call', _80 => _80(f=>m.value===f.value&&m.type===f.type), 'optionalAccess', _81 => _81.id])]),u=c.filter(([,m])=>!m).map(([m])=>m);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating "${u.length}" new data flows...`)),await Am(t,u,r),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced ${u.length} data flows!`))}catch(m){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create data flows! - ${m.message}`))}let d=c.filter(m=>!!m[1]);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${d.length}" data flows...`)),await Cm(t,d,r),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated "${d.length}" data flows!`))}catch(m){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create data flows! - ${m.message}`))}return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${e.length}" data flows!`)),!n}async function Sm(t,e){let{createPromptPartial:{promptPartial:r}}=await l(t,Lo,{input:e});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created prompt partial "${e.title}"!`)),r.id}async function Tm(t,e){await l(t,qo,{input:{promptPartials:e.map(([r,n])=>({...r,id:n}))}}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated ${e.length} prompt partials!`))}async function Kp(t,e,r=20){let n=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" prompt partials...`));let i=await xr(t),s=_chunk2FX6UYVOcjs.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 Sm(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 Tm(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 Em(t,e){let{createPromptGroup:{promptGroup:r}}=await l(t,ko,{input:e});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created prompt group "${e.title}"!`)),r.id}async function Rm(t,e){await l(t,vo,{input:{promptGroups:e.map(([r,n])=>({...r,id:n}))}}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated ${e.length} prompt groups!`))}async function jp(t,e,r=20){let n=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" prompt groups...`));let i=await $r(t),s=await $t(t),o=_chunk2FX6UYVOcjs.e.call(void 0, s,"title"),p=_chunk2FX6UYVOcjs.e.call(void 0, i,"title"),c=e.map(m=>[m,_optionalChain([p, 'access', _84 => _84[m.title], 'optionalAccess', _85 => _85.id])]),u=c.filter(([,m])=>!m).map(([m])=>m);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating "${u.length}" new prompt groups...`)),await _bluebird.map.call(void 0, u,async m=>{await Em(t,{...m,promptIds:m.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(m){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create prompt groups! - ${m.message}`))}let d=c.filter(m=>!!m[1]);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${d.length}" prompt groups...`)),await Rm(t,d.map(([{prompts:m,...f},g])=>[{...f,promptIds:m.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 "${d.length}" prompt groups!`))}catch(m){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create prompt groups! - ${m.message}`))}return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${e.length}" prompt groups!`)),!n}async function wm(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,na,{input:r});return n.vendor}async function $m(t,e){await l(t,oa,{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 Yp(t,e){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" vendors...`));let r=!1,n=await br(t),i=_chunk2FX6UYVOcjs.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 wm(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 $m(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 Dm(t,e){let r={name:e.name,category:e.category,description:e.description},{createDataCategory:n}=await l(t,aa,{input:r});return n.dataCategory}async function qm(t,e){await l(t,pa,{input:{dataSubCategories:e.map(([r,n])=>({id:n,description:r.description,attributes:r.attributes}))}})}async function Zp(t,e){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" data categories...`));let r=!1,n=await yr(t),i=_chunk2FX6UYVOcjs.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 Dm(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 vm(t,e){let r={name:e.name,purpose:e.purpose,description:e.description},{createProcessingPurposeSubCategory:n}=await l(t,ca,{input:r});return n.processingPurposeSubCategory}async function km(t,e){await l(t,ua,{input:{processingPurposeSubCategories:e.map(([r,n])=>({id:n,description:r.description,attributes:r.attributes}))}})}async function zp(t,e){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" processing purposes...`));let r=!1,n=await Ar(t),i=_chunk2FX6UYVOcjs.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 vm(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 km(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 Om(t,e){let r={title:e.title,description:e.description},{createProcessingActivity:n}=await l(t,da,{input:r});return n.processingActivity}async function Gm(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,fa,{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 Wp(t,e){let r=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" processing activities...`));let n=await Cr(t),i=_chunk2FX6UYVOcjs.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 Om(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 Gm(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 Xw(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:d,"data-subjects":m,"business-entities":f,enrichers:g,cookies:y,"consent-manager":A,"data-silos":R,"data-flows":S,prompts:L,"prompt-groups":C,"prompt-partials":_,agents:W,"agent-functions":K,"agent-files":se,vendors:H,"data-categories":me,"processing-activities":ce,"processing-purposes":J,"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||d?Za(t,e,!n):{},R||m||g||ce?Ka(t,e):{},R&&R.map(I=>I["api-key-title"]||[]).reduce((I,O)=>I+O.length,0)>0?wr(t,e):{}]);if(A){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Syncing consent manager..."));try{await Fp(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 kp(e,L);o=o||!I}if(_){let I=await Kp(e,_);o=o||!I}if(C){let I=await jp(e,C);o=o||!I}if(pe){let I=await Lp(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 ap(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 Pp(e,f);o=o||!I}if(H){let I=await Yp(e,H);o=o||!I}if(me){let I=await Zp(e,me);o=o||!I}if(J){let I=await zp(e,J);o=o||!I}if(Ze){let I=await lp(e,Ze);o=o||!I}if(W){let I=await Ip(e,W);o=o||!I}if(K){let I=await Ap(e,K);o=o||!I}if(se){let I=await Cp(e,se);o=o||!I}if(y){let I=await Dp(e,y);o=o||!I}if(Se){let I=await fp(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 Sp(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 hp(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 sp(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!`))),d&&(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${d.length}" identifiers...`)),await _bluebird.map.call(void 0, d,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 xp(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 "${d.length}" identifiers!`))),u){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${u.length}" actions...`));let I=await cr(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 mp(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(m){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${m.length}" data subjects...`));let I=await Yt(e);await _bluebird.map.call(void 0, m,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 vp(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 "${m.length}" data subjects!`))}if(S){let I=await Vp(e,S,i);o=o||!I}if(de){let I=await Gp(e,de);o=o||!I}if(we){let I=await Op(e,we);o=o||!I}if(ke){let I=await _p(e,ke);o=o||!I}let Ee=[];if(R){let{success:I,dataSiloTitleToId:O}=await ip(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 np(e,Ee),ce){let I=await Wp(e,ce);o=o||!I}return o}var Mm=1e3;async function o$(t,e,r){let n=_chunk2FX6UYVOcjs.b.call(void 0, r,Mm);await _bluebird.mapSeries.call(void 0, n,async i=>{await l(t,Yn,{pluginId:e,rawResults:i})})}async function Hx({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=_chunk2FX6UYVOcjs.r}){let c=Z(p,e),u=new Date().getTime(),d=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),m=await le(c,{actions:t,statuses:n,createdAtBefore:s,createdAtAfter:i,isSilent:!1,requestIds:r});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Marking "${m.length}" as silent mode.`));let f=0;d.start(m.length,0),await _bluebird.map.call(void 0, m,async A=>{await l(c,At,{input:{id:A.id,isSilent:!0}}),f+=1,d.update(f)},{concurrency:o}),d.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!`)),m.length}async function Xp(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=_chunk2FX6UYVOcjs.h.call(void 0, i.replace("ColumnName","")),o=Tt(t,s,ya[i],!!ha[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 el(t,e,{state:r,columnNameMap:n}){let i=A=>r.getValue("columnNames",A)||n[A],{internalSubjects:s}=await l(t,ir);_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"),d=u===Y?{}:await mt(He(e,u),[...Object.values(_privacytypes.CompletedRequestStatus),Y],r.getValue("statusToRequestStatus"));await r.setValue(d,"statusToRequestStatus"),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for country"));let m=i("country"),f=m===Y?{}:await mt(He(e,m),[...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 rd=ae.record(ae.string,ae.array(ae.intersection([ae.type({value:ae.string}),ae.partial({name:ae.string})]))),bD= exports.pf =ae.intersection([ae.type({email:ae.string,attestedExtraIdentifiers:rd,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(Pa),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 id(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 tl(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=id(R,A,o);S&&(u[A]||(u[A]=[]),u[A].push({value:S,name:g}))}});let d=[];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";d.push({values:R?li(A):A,key:g})}});let m=p("requestType"),f=p("subjectType");return[c,{email:c[p("email")],attestedExtraIdentifiers:u,attributes:d,coreIdentifier:c[p("coreIdentifier")],requestType:m===Kt?e.getValue("requestTypeToRequestAction",pi):e.getValue("requestTypeToRequestAction",c[m]),subjectType:f===Kt?e.getValue("subjectTypeToSubjectName",pi):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:li(c[p("dataSiloIds")])}:{}}]})}var _path = require('path');var nl=x.type({defaultMessage:x.string,id:x.string}),pd= exports.tf =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([nl,x.null]),description:x.union([nl,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)})}),ld= exports.uf =x.type({nodes:x.array(pd),totalCount:x.number,_links:x.partial({next:x.union([x.string,x.null]),previous:x.union([x.string,x.null])})});async function ol(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 d=>{let m=[],f=!0,g=0;for(;f;){let y;try{let A=await e.get(`v1/data-subject-request/${d.id}/download-keys`,{searchParams:{limit:n,offset:g}}).json();y=_typeutils.decodeCodec.call(void 0, ld,A),m.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),[d,m]},{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 sl(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 WD({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=_chunk2FX6UYVOcjs.r,approveAfterDownload:u=!1}){let d=Z(c,t),m=await nt(c,t,i);_fs.existsSync.call(void 0, e)||_fs.mkdirSync.call(void 0, e);let f=await le(d,{actions:[_privacytypes.RequestAction.Access],createdAtBefore:n,createdAtAfter:s,statuses:o,requestIds:r}),g=await ol(f,{sombra:m,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([_,W])=>{let K=_path.join.call(void 0, e,_.id);_fs.existsSync.call(void 0, K)||_fs.mkdirSync.call(void 0, K),await sl(W,{sombra:m,requestId:_.id,onFileDownloaded:(se,H)=>{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,H)}}),u&&_.status===_privacytypes.RequestStatus.Approving&&(await l(d,nr,{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 ln=te.type({id:te.string,link:te.string,status:_typeutils.valuesOf.call(void 0, _privacytypes.RequestStatus),type:_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction),subjectType:te.string,email:te.union([te.null,te.string]),coreIdentifier:te.string,isSilent:te.boolean,isTest:te.boolean,country:te.union([te.null,_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode)]),countrySubDivision:te.union([te.null,_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode)]),attributeValues:te.array(te.type({attributeKey:te.type({name:te.string}),name:te.string}))});async function cl(t,e,{details:r="",isTest:n=!1,emailIsVerified:i=!0,skipSendingReceipt:s=!1,isSilent:o=!0,additionalAttributes:p=[]}={}){let c=[...p];(e.attributes||[]).forEach(m=>{let f=c.find(g=>g.key===m.key);f?(f.values.push(...m.values),f.values=_chunk2FX6UYVOcjs.j.call(void 0, f.values)):c.push(m)});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(m){throw new Error(`Received an error from server: ${_optionalChain([m, 'optionalAccess', _107 => _107.response, 'optionalAccess', _108 => _108.body])||_optionalChain([m, 'optionalAccess', _109 => _109.message])}`)}let{request:d}=_typeutils.decodeCodec.call(void 0, te.type({request:ln}),u);return d}async function uq({requestActions:t,requestOrigins:e,auth:r,silentModeBefore:n,createdAtAfter:i,createdAtBefore:s,concurrency:o=50,transcendUrl:p=_chunk2FX6UYVOcjs.r}){let c=Z(p,r),u=new Date().getTime(),d=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),m=await le(c,{actions:t,statuses:[_privacytypes.RequestStatus.Approving],createdAtAfter:i,origins:e,createdAtBefore:s});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Approving "${m.length}" requests.`));let f=0,g=0;d.start(m.length,0),await _bluebird.map.call(void 0, m,async R=>{n&&new Date(n)>new Date(R.createdAt)&&await l(c,At,{input:{id:R.id,isSilent:!0}});try{await l(c,nr,{input:{requestId:R.id}})}catch(S){S.message.includes("Request must be in an approving state,")&&(g+=1)}f+=1,d.update(f)},{concurrency:o}),d.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!`)),m.length}async function Iq({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=_chunk2FX6UYVOcjs.r}){let d=Z(u,e),m=new Date().getTime(),f=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),y=(await gt(d,p)).find(C=>C.title===p);if(!y)throw new Error(`Failed to find a template with title: "${p}"`);let A=await le(d,{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(d,mo,{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()-m;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully marked ${R} requests as silent mode in "${L/1e3}" seconds!`)),A.length}async function fl(t,e,r){let{initializer:n}=await l(t,xn),i=n.identifiers.filter(({name:o})=>!r.getValue("identifierNames",o)&&!ar.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 Nq({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=_chunk2FX6UYVOcjs.r}){let d=Z(u,r),m=new Date().getTime(),f=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),g;if(e){let C=(await gt(d,e)).find(_=>_.title===e);if(!C)throw new Error(`Failed to find a template with title: "${e}"`);g=C}let y=await le(d,{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(d,At,{input:{id:L.id,isSilent:!0}}),await l(d,uo,{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()-m;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully canceled ${A} requests in "${S/1e3}" seconds!`)),y.length}async function hl(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 Cl=/{\\"message\\":\\"(.+?)\\",/;function _r(t){return Cl.test(t)?Cl.exec(t)[1]:null}var _persistedstate = require('@transcend-io/persisted-state');async function cL({cacheFilepath:t,requestReceiptFolder:e,file:r,auth:n,sombraAuth:i,concurrency:s=100,defaultPhoneCountryCode:o="1",transcendUrl:p=_chunk2FX6UYVOcjs.r,attributes:c=[],emailIsVerified:u=!0,skipFilterStep:d=!1,skipSendingReceipt:m=!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=Ea(c),C=new (0, _persistedstate.PersistedState)(t,Ca,{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")),W=new (0, _persistedstate.PersistedState)(_,Aa,{successfulRequests:[],duplicateRequests:[],failingRequests:[]}),K=await nt(p,n,i),se=ba(r,Xt.record(Xt.string,Xt.string)),H=_chunk2FX6UYVOcjs.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=d?se:await $a(se),ce=Z(p,n),J=await qa(ce),Ie=await Xp(H,C),Se=await fl(ce,H,C),pe=await hl(ce,H,C,J);await el(ce,me,{state:C,columnNameMap:Ie});let de=tl(me,C,{defaultPhoneCountryCode:o,columnNameMap:Ie,identifierNameMap:Se,attributeNameMap:pe,requestAttributeKeys:J});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 cl(K,ne,{details:`Uploaded by Transcend Cli: "tr-request-upload" : ${JSON.stringify(Ae,null,2)}`,isTest:f,emailIsVerified:u,skipSendingReceipt:m,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=W.getValue("successfulRequests");O.push({id:I.id,link:I.link,rowIndex:ue,coreIdentifier:I.coreIdentifier,attemptedAt:new Date().toISOString()}),await W.setValue(O,"successfulRequests")}catch(I){let O=`${I.message} - ${JSON.stringify(_optionalChain([I, 'access', _110 => _110.response, 'optionalAccess', _111 => _111.body]),null,2)}`,fe=_r(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=W.getValue("duplicateRequests");ge.push({coreIdentifier:ne.coreIdentifier,rowIndex:ue,attemptedAt:new Date().toISOString()}),await W.setValue(ge,"duplicateRequests")}else{let ge=W.getValue("failingRequests");ge.push({...ne,rowIndex:ue,error:fe||O,attemptedAt:new Date().toISOString()}),await W.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.`)),W.getValue("duplicateRequests").length>0&&_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`Encountered "${W.getValue("duplicateRequests").length}" duplicate requests. See "${_}" to review the core identifiers for these requests.`)),W.getValue("failingRequests").length>0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Encountered "${W.getValue("failingRequests").length}" errors. See "${_}" to review the error messages and inputs.`)),process.exit(1))}async function Tl(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, _chunk2FX6UYVOcjs.d.call(void 0, s.filter(c=>!(c.name==="email"&&c.value===e.email)&&!ar.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:d,value:m})=>({...u===_privacytypes.IdentifierType.Custom?{name:d}:{},value:m})))}:{}},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, Sl.type({request:ln}),o);return p}var _d=Ye.intersection([pr,Ye.type({error:Ye.string})]),Od=Ye.type({restartedRequests:Ye.array(pr),failingRequests:Ye.array(_d)});async function DL({requestReceiptFolder:t,auth:e,sombraAuth:r,requestActions:n,requestStatuses:i,createdAtBefore:s,createdAtAfter:o,transcendUrl:p=_chunk2FX6UYVOcjs.r,requestIds:c=[],createdAt:u=new Date,silentModeBefore:d,sendEmailReceipt:m=!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()}`),C=new (0, _persistedstate.PersistedState)(L,Od,{restartedRequests:[],failingRequests:[]}),_=await nt(p,e,r),W=Z(p,e),se=(await le(W,{actions:n,statuses:i,createdAtBefore:s,createdAtAfter:o})).filter(J=>new Date(J.createdAt)<u);if(_chunkZUNVPK23cjs.a.info(`Found ${se.length} requests to process`),g&&_chunkZUNVPK23cjs.a.info("copyIdentifiers detected - All Identifiers will be copied."),m&&_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 J=_chunk2FX6UYVOcjs.c.call(void 0, c,se.map(({id:Ie})=>Ie));J.length>0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to find the following requests by ID: ${J.join(",")}.`)),process.exit(1))}let H=0;S.start(se.length,0),await _bluebird.map.call(void 0, se,async(J,Ie)=>{try{let Se=g?await Tr(W,_,{requestId:J.id}):[],pe=await Tl(_,{...J,isSilent:d&&new Date(J.createdAt)<d?!0:J.isSilent},{requestIdentifiers:Se,skipWaitingPeriod:y,sendEmailReceipt:m,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=_r(pe),we=C.getValue("failingRequests");we.push({id:J.id,link:J.link,rowIndex:Ie,coreIdentifier:J.coreIdentifier,attemptedAt:new Date().toISOString(),error:de||pe}),await C.setValue(we,"failingRequests")}H+=1,S.update(H)},{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 "${L}" to review the error messages and inputs.`)),process.exit(1))}async function ML({enricherIds:t,auth:e,concurrency:r=100,transcendUrl:n=_chunk2FX6UYVOcjs.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 Sr(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,Ao,{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 m=new Date().getTime()-s;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully skipped "${u}" for "${o.length}" requests in "${m/1e3}" seconds!`)),o.length}async function WL({auth:t,requestActions:e=[],createdAtBefore:r,createdAtAfter:n,transcendUrl:i=_chunk2FX6UYVOcjs.r,requestEnricherStatuses:s=Object.values(_privacytypes.RequestEnricherStatus),requestIds:o=[],enricherId:p,concurrency:c=20}){let u=new Date().getTime(),d=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),m=Z(i,t);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Fetching requests to restart..."));let f=await le(m,{actions:e,statuses:[_privacytypes.RequestStatus.Enriching],createdAtBefore:r,createdAtAfter:n,requestIds:o}),g=0;if(o.length>0&&o.length!==f.length){let S=_chunk2FX6UYVOcjs.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;d.start(f.length,0),await _bluebird.map.call(void 0, f,async S=>{let C=(await Sr(m,{requestId:S.id})).filter(_=>_.enricher.id===p&&s.includes(_.status));await _bluebird.map.call(void 0, C,async _=>{await up(m,_.id),g+=1}),y+=1,d.update(y)},{concurrency:c}),d.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 sv({requestActions:t,dataSiloId:e,auth:r,concurrency:n=20,transcendUrl:i=_chunk2FX6UYVOcjs.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,d=0;p.start(c.length,0),await _bluebird.map.call(void 0, c,async g=>{try{let y=await Wa(s,{requestId:g.id,dataSiloId:e});await l(s,Oo,{requestDataSiloId:y.id})}catch(y){if(!y.message.includes("Failed to find RequestDataSilo"))throw y;d+=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, ${d} 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=_chunk2FX6UYVOcjs.r,createdAtBefore:p,skipRequestIdentifiers:c=!1,createdAtAfter:u,isTest:d}){let m=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(m,{actions:r,text:i,statuses:n,createdAtBefore:p,createdAtAfter:u,isTest:d}),A=c?y.map(S=>({...S,requestIdentifiers:[]})):await _bluebird.map.call(void 0, y,async S=>{let L=await Tr(m,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:W,status:K,subjectType:se,details:H,createdAt:me,country:ce,locale:J,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":W,"Data Subject Type":se,Status:K,Country:ce,"Country Sub Division":Se,Details:H,Origin:Ie,"Silent Mode":pe,"Is Test Request":de,Language:J,"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(_chunk2FX6UYVOcjs.d.call(void 0, S,"attributeKey.name")).reduce((Ae,[ne,ue])=>Object.assign(Ae,{[ne]:ue.map(({name:Ee})=>Ee).join(",")}),{}),...Object.entries(_chunk2FX6UYVOcjs.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 Rv({dataSiloId:t,auth:e,concurrency:r=50,maxUploadPerChunk:n=5e4,status:i="SKIPPED",transcendUrl:s=_chunk2FX6UYVOcjs.r,requestStatuses:o=[_privacytypes.RequestStatus.Compiling,_privacytypes.RequestStatus.Secondary]}){let p=Z(s,e),c=new Date().getTime(),u=await za(p,{dataSiloId:t,requestStatuses:o});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Marking ${u} request data silos as completed`));let d=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),m=0;for(d.start(u,0);m<u;){let y=await Ki(p,{dataSiloId:t,requestStatuses:o,limit:n,onProgress:A=>{m+=A/2,d.update(m)}});await _bluebird.map.call(void 0, y,async A=>{try{await l(p,_o,{requestDataSiloId:A.id,status:i})}catch(R){if(!R.message.includes("Client error: Request must be active:"))throw R}m+=.5,d.update(m)},{concurrency:r})}d.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 _v({requestActions:t,identifierNames:e,auth:r,concurrency:n=20,transcendUrl:i=_chunk2FX6UYVOcjs.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,d=0;p.start(c.length,0),await _bluebird.map.call(void 0, c,async g=>{let A=(await Ua(s,{requestId:g.id})).filter(({isVerifiedAtLeastOnce:R,name:S})=>R===!1&&e.includes(S)).map(({id:R})=>R);A.length>0&&(await l(s,Qo,{input:{requestId:g.id,requestIdentifierIds:A}}),d+=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, ${d} identifiers were cleared out!`)),c.length}async function Ck({message:t}){let{response:e}=await _inquirer2.default.prompt([{name:"response",message:t,type:"confirm"}]);return e}async function Ak({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 Ik({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 Tk(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 Nl(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 Ml(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 Gr(t){return new Promise(e=>{setTimeout(()=>e(t),t)})}function wk(t){let e=Math.floor(t.length/2);return[t.slice(0,e),t.slice(e)]}async function Lk(t,e,r){let n=0;for(;;)try{return await t()}catch(i){n+=1;let s=Nl(i),o=Ml(i);if(!(n<=e.maxAttempts&&e.shouldRetry(s,o)))throw i;r(`Retrying after status=${s} attempt=${n}/${e.maxAttempts} \u2014 ${o}`),await Gr(e.delayMs)}}function kk(t,e){return Object.entries(t).reduce((r,[n,i],s)=>(r[n]=s<e?i:!0,r),{})}var Fl= (_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 Nk(t){try{return t?_fs.readFileSync.call(void 0, t,"utf8"):""}catch (e3){return""}}var zd=4,Wd=["syntax error","got invalid value","Client error","cannot affect row a second time","GRAPHQL_VALIDATION_FAILED"];async function l(t,e,r,n,i=zd){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)),Wd.some(p=>o.message.includes(p)))throw o;if(o.message.startsWith("Client error: Too many requests")){let p=_optionalChain([o, 'access', _136 => _136.response, 'access', _137 => _137.headers, 'optionalAccess', _138 => _138.get, 'call', _139 => _139("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 Gr(c)}if(s>=i)throw o;s+=1,_chunkZUNVPK23cjs.a.log(_colors2.default.yellow(`Retrying failed request (${s/i}): ${o.message}`))}}async function o_(t,{promptRunId:e,promptRunMessages:r=[],...n}){let{addMessagesToPromptRun:{promptRun:i}}=await l(t,zo,{input:{...n,...e,promptRunMessages:r.map(({content:s,...o})=>({...o,message:s}))}});return i.id}exports.a = Sn; exports.b = Jd; exports.c = Tn; exports.d = Xd; exports.e = Pn; exports.f = En; exports.g = ef; exports.h = nf; exports.i = Rn; exports.j = af; exports.k = bn; exports.l = Ur; exports.m = wn; exports.n = $n; exports.o = xn; exports.p = Dn; exports.q = qn; exports.r = Ln; exports.s = vn; exports.t = kn; exports.u = _n; exports.v = On; exports.w = ir; exports.x = Gn; exports.y = Nn; exports.z = Mn; exports.A = Fn; exports.B = Un; exports.C = Qn; exports.D = Bn; exports.E = Vn; exports.F = Kn; exports.G = Yn; exports.H = Zn; exports.I = Wn; exports.J = Hn; exports.K = Jn; exports.L = Xn; exports.M = eo; exports.N = to; exports.O = ro; exports.P = io; exports.Q = no; exports.R = oo; exports.S = so; exports.T = po; exports.U = lo; exports.V = co; exports.W = nr; exports.X = uo; exports.Y = At; exports.Z = mo; exports._ = go; exports.$ = yo; exports.aa = ho; exports.ba = Co; exports.ca = Ao; exports.da = Yr; exports.ea = So; exports.fa = Vf; exports.ga = To; exports.ha = Po; exports.ia = Eo; exports.ja = Ro; exports.ka = bo; exports.la = wo; exports.ma = $o; exports.na = xo; exports.oa = Do; exports.pa = qo; exports.qa = Lo; exports.ra = vo; exports.sa = ko; exports.ta = Zr; exports.ua = _o; exports.va = Oo; exports.wa = Go; exports.xa = No; exports.ya = Mo; exports.za = Fo; exports.Aa = Qo; exports.Ba = Bo; exports.Ca = Vo; exports.Da = cg; exports.Ea = jo; exports.Fa = Zo; exports.Ga = zo; exports.Ha = Wo; exports.Ia = Ho; exports.Ja = Jo; exports.Ka = Xo; exports.La = es; exports.Ma = ts; exports.Na = rs; exports.Oa = is; exports.Pa = ns; exports.Qa = os; exports.Ra = ss; exports.Sa = as; exports.Ta = ps; exports.Ua = ls; exports.Va = cs; exports.Wa = us; exports.Xa = ms; exports.Ya = ds; exports.Za = fs; exports._a = gs; exports.$a = ys; exports.ab = hs; exports.bb = Cs; exports.cb = As; exports.db = Is; exports.eb = Ss; exports.fb = Ts; exports.gb = Ps; exports.hb = Es; exports.ib = Rs; exports.jb = bs; exports.kb = ws; exports.lb = $s; exports.mb = xs; exports.nb = Ds; exports.ob = qs; exports.pb = Ls; exports.qb = vs; exports.rb = ks; exports.sb = _s; exports.tb = Gs; exports.ub = Ns; exports.vb = Ms; exports.wb = Fs; exports.xb = Us; exports.yb = Qs; exports.zb = Bs; exports.Ab = Vs; exports.Bb = Ks; exports.Cb = ei; exports.Db = js; exports.Eb = Ys; exports.Fb = vg; exports.Gb = Zs; exports.Hb = zs; exports.Ib = Ws; exports.Jb = Hs; exports.Kb = Js; exports.Lb = Xs; exports.Mb = ea; exports.Nb = ta; exports.Ob = ra; exports.Pb = ia; exports.Qb = na; exports.Rb = oa; exports.Sb = sa; exports.Tb = aa; exports.Ub = pa; exports.Vb = la; exports.Wb = ca; exports.Xb = ua; exports.Yb = ma; exports.Zb = da; exports._b = fa; exports.$b = ga; exports.ac = Y; exports.bc = Kt; exports.cc = pi; exports.dc = ar; exports.ec = It; exports.fc = ya; exports.gc = ha; exports.hc = Ca; exports.ic = pr; exports.jc = Aa; exports.kc = St; exports.lc = Tt; exports.mc = mt; exports.nc = li; exports.oc = Pa; exports.pc = Ea; exports.qc = ba; exports.rc = He; exports.sc = $a; exports.tc = o_; exports.uc = $c; exports.vc = Z; exports.wc = nt; exports.xc = Oh; exports.yc = Fh; exports.zc = Uh; exports.Ac = jh; exports.Bc = lr; exports.Cc = cr; exports.Dc = ur; exports.Ec = mr; exports.Fc = dr; exports.Gc = xa; exports.Hc = Da; exports.Ic = qa; exports.Jc = qc; exports.Kc = Lc; exports.Lc = Et; exports.Mc = fr; exports.Nc = ka; exports.Oc = De; exports.Pc = gr; exports.Qc = vc; exports.Rc = DC; exports.Sc = _a; exports.Tc = Si; exports.Uc = yr; exports.Vc = Rt; exports.Wc = Ga; exports.Xc = jt; exports.Yc = bt; exports.Zc = hr; exports._c = ve; exports.$c = Na; exports.ad = Ma; exports.bd = Cr; exports.cd = Ar; exports.dd = Ir; exports.ed = Fa; exports.fd = Sr; exports.gd = Ua; exports.hd = Fc; exports.id = Tr; exports.jd = Yc; exports.kd = jA; exports.ld = le; exports.md = Rr; exports.nd = XA; exports.od = br; exports.pd = zc; exports.qd = wr; exports.rd = Wc; exports.sd = mI; exports.td = Yt; exports.ud = Ka; exports.vd = ja; exports.wd = Ya; exports.xd = $r; exports.yd = xr; exports.zd = $t; exports.Ad = OI; exports.Bd = FI; exports.Cd = za; exports.Dd = Ki; exports.Ed = Wa; exports.Fd = YI; exports.Gd = HI; exports.Hd = tS; exports.Id = rS; exports.Jd = sS; exports.Kd = aS; exports.Ld = ru; exports.Md = iu; exports.Nd = Ja; exports.Od = nu; exports.Pd = ou; exports.Qd = ji; exports.Rd = lu; exports.Sd = Yi; exports.Td = tp; exports.Ud = uu; exports.Vd = mu; exports.Wd = rp; exports.Xd = ip; exports.Yd = np; exports.Zd = Wi; exports._d = sp; exports.$d = gt; exports.ae = ap; exports.be = zt; exports.ce = lp; exports.de = Cu; exports.ee = OT; exports.fe = FT; exports.ge = up; exports.he = YT; exports.ie = mp; exports.je = Tu; exports.ke = Pu; exports.le = fp; exports.me = Eu; exports.ne = Ru; exports.oe = hp; exports.pe = $u; exports.qe = xu; exports.re = Cp; exports.se = qu; exports.te = Lu; exports.ue = Ap; exports.ve = ku; exports.we = _u; exports.xe = Ip; exports.ye = Sp; exports.ze = Gu; exports.Ae = Nu; exports.Be = Pp; exports.Ce = Qu; exports.De = Bu; exports.Ee = bp; exports.Fe = Yu; exports.Ge = Zu; exports.He = $p; exports.Ie = Ju; exports.Je = Xu; exports.Ke = ZE; exports.Le = hm; exports.Me = Fp; exports.Ne = rm; exports.Oe = Dp; exports.Pe = Dm; exports.Qe = qm; exports.Re = Zp; exports.Se = Cm; exports.Te = Am; exports.Ue = Vp; exports.Ve = vp; exports.We = xp; exports.Xe = dm; exports.Ye = Op; exports.Ze = cm; exports._e = _p; exports.$e = Gp; exports.af = Wp; exports.bf = vm; exports.cf = km; exports.df = zp; exports.ef = sm; exports.ff = am; exports.gf = kp; exports.hf = wm; exports.if = $m; exports.jf = Yp; exports.kf = o$; exports.lf = Hx; exports.mf = Xp; exports.nf = el; exports.of = rd; exports.pf = bD; exports.qf = id; exports.rf = tl; exports.sf = nl; exports.tf = pd; exports.uf = ld; exports.vf = ol; exports.wf = sl; exports.xf = WD; exports.yf = ln; exports.zf = cl; exports.Af = uq; exports.Bf = Iq; exports.Cf = fl; exports.Df = Nq; exports.Ef = hl; exports.Ff = _r; exports.Gf = cL; exports.Hf = Tl; exports.If = DL; exports.Jf = ML; exports.Kf = WL; exports.Lf = sv; exports.Mf = yv; exports.Nf = Rv; exports.Of = _v; exports.Pf = Ck; exports.Qf = Ak; exports.Rf = Ik; exports.Sf = Tk; exports.Tf = Nl; exports.Uf = Ml; exports.Vf = Gr; exports.Wf = wk; exports.Xf = Lk; exports.Yf = kk; exports.Zf = Fl; exports._f = Nk; exports.$f = l; exports.ag = Mi; exports.bg = Za; exports.cg = Xw;
2957
- //# sourceMappingURL=chunk-FUYFDEYI.cjs.map