@transcend-io/cli 8.1.1 → 8.1.5

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 (114) hide show
  1. package/README.md +2 -49
  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-QRDYTLVB.cjs → chunk-72QC4R7P.cjs} +2 -2
  6. package/dist/{chunk-QRDYTLVB.cjs.map → chunk-72QC4R7P.cjs.map} +1 -1
  7. package/dist/chunk-BIBIE2IP.cjs +2920 -0
  8. package/dist/{chunk-QPIUQDJ6.cjs.map → chunk-BIBIE2IP.cjs.map} +1 -1
  9. package/dist/{chunk-NC5QVXJW.cjs → chunk-DC2JALFL.cjs} +2 -2
  10. package/dist/{chunk-NC5QVXJW.cjs.map → chunk-DC2JALFL.cjs.map} +1 -1
  11. package/dist/{chunk-MRXBJEKL.cjs → chunk-F3MDX5XS.cjs} +20 -20
  12. package/dist/{chunk-MRXBJEKL.cjs.map → chunk-F3MDX5XS.cjs.map} +1 -1
  13. package/dist/{chunk-W6BLSHVE.cjs → chunk-GGXJ7ADF.cjs} +4 -4
  14. package/dist/{chunk-W6BLSHVE.cjs.map → chunk-GGXJ7ADF.cjs.map} +1 -1
  15. package/dist/{chunk-XKYSQSRO.cjs → chunk-MOKWLFGF.cjs} +2 -2
  16. package/dist/{chunk-XKYSQSRO.cjs.map → chunk-MOKWLFGF.cjs.map} +1 -1
  17. package/dist/{chunk-6CS4GCJ4.cjs → chunk-S7H3R3EJ.cjs} +2 -2
  18. package/dist/{chunk-6CS4GCJ4.cjs.map → chunk-S7H3R3EJ.cjs.map} +1 -1
  19. package/dist/{chunk-BICC2LJL.cjs → chunk-S7MCQ2HA.cjs} +3 -3
  20. package/dist/{chunk-BICC2LJL.cjs.map → chunk-S7MCQ2HA.cjs.map} +1 -1
  21. package/dist/{chunk-MGAJ7ILD.cjs → chunk-TO4YF4PG.cjs} +2 -2
  22. package/dist/{chunk-MGAJ7ILD.cjs.map → chunk-TO4YF4PG.cjs.map} +1 -1
  23. package/dist/{chunk-HI7ACKKB.cjs → chunk-TTRWG6N7.cjs} +2 -2
  24. package/dist/{chunk-HI7ACKKB.cjs.map → chunk-TTRWG6N7.cjs.map} +1 -1
  25. package/dist/{chunk-IFAKI5FF.cjs → chunk-UKOA2VXP.cjs} +2 -2
  26. package/dist/{chunk-IFAKI5FF.cjs.map → chunk-UKOA2VXP.cjs.map} +1 -1
  27. package/dist/{chunk-DVJLLHL3.cjs → chunk-WCYLJBE6.cjs} +2 -2
  28. package/dist/{chunk-DVJLLHL3.cjs.map → chunk-WCYLJBE6.cjs.map} +1 -1
  29. package/dist/{impl-TSGEOZLY.cjs → impl-25CYSQ2S.cjs} +2 -2
  30. package/dist/{impl-TSGEOZLY.cjs.map → impl-25CYSQ2S.cjs.map} +1 -1
  31. package/dist/{impl-NOS3MDB5.cjs → impl-4PUK52ET.cjs} +2 -2
  32. package/dist/{impl-NOS3MDB5.cjs.map → impl-4PUK52ET.cjs.map} +1 -1
  33. package/dist/{impl-BKEVLUMO.cjs → impl-5XNZFDPF.cjs} +2 -2
  34. package/dist/{impl-BKEVLUMO.cjs.map → impl-5XNZFDPF.cjs.map} +1 -1
  35. package/dist/{impl-BRUSOMXU.cjs → impl-5YC5FIG4.cjs} +2 -2
  36. package/dist/{impl-BRUSOMXU.cjs.map → impl-5YC5FIG4.cjs.map} +1 -1
  37. package/dist/{impl-O6ZZ6G7V.cjs → impl-6KDOZGUK.cjs} +2 -2
  38. package/dist/{impl-O6ZZ6G7V.cjs.map → impl-6KDOZGUK.cjs.map} +1 -1
  39. package/dist/{impl-I3QZ2ZHY.cjs → impl-6WAXJHLE.cjs} +2 -2
  40. package/dist/{impl-I3QZ2ZHY.cjs.map → impl-6WAXJHLE.cjs.map} +1 -1
  41. package/dist/{impl-BUQ2V3WM.cjs → impl-6YSJBMNC.cjs} +2 -2
  42. package/dist/{impl-BUQ2V3WM.cjs.map → impl-6YSJBMNC.cjs.map} +1 -1
  43. package/dist/{impl-P3ZEQOP4.cjs → impl-77RKZROM.cjs} +2 -2
  44. package/dist/{impl-P3ZEQOP4.cjs.map → impl-77RKZROM.cjs.map} +1 -1
  45. package/dist/{impl-ZWNKU6OC.cjs → impl-7P2JYKPQ.cjs} +2 -2
  46. package/dist/{impl-ZWNKU6OC.cjs.map → impl-7P2JYKPQ.cjs.map} +1 -1
  47. package/dist/{impl-SWFUVUV6.cjs → impl-AFZIHZEH.cjs} +2 -2
  48. package/dist/{impl-SWFUVUV6.cjs.map → impl-AFZIHZEH.cjs.map} +1 -1
  49. package/dist/impl-AGDQ26NT.cjs +12 -0
  50. package/dist/impl-AGDQ26NT.cjs.map +1 -0
  51. package/dist/{impl-X2FXS267.cjs → impl-AJFT5WGX.cjs} +2 -2
  52. package/dist/{impl-X2FXS267.cjs.map → impl-AJFT5WGX.cjs.map} +1 -1
  53. package/dist/{impl-PE35IGX2.cjs → impl-COO2M22A.cjs} +2 -2
  54. package/dist/{impl-PE35IGX2.cjs.map → impl-COO2M22A.cjs.map} +1 -1
  55. package/dist/{impl-ED76NZLR.cjs → impl-EKDXIUCJ.cjs} +3 -3
  56. package/dist/{impl-ED76NZLR.cjs.map → impl-EKDXIUCJ.cjs.map} +1 -1
  57. package/dist/{impl-OXVQMF3C.cjs → impl-EQV6T4R5.cjs} +2 -2
  58. package/dist/{impl-OXVQMF3C.cjs.map → impl-EQV6T4R5.cjs.map} +1 -1
  59. package/dist/{impl-FRDPRLKI.cjs → impl-I344Y4YA.cjs} +2 -2
  60. package/dist/{impl-FRDPRLKI.cjs.map → impl-I344Y4YA.cjs.map} +1 -1
  61. package/dist/{impl-4VPFFGGS.cjs → impl-I7VPHXCY.cjs} +2 -2
  62. package/dist/{impl-4VPFFGGS.cjs.map → impl-I7VPHXCY.cjs.map} +1 -1
  63. package/dist/{impl-GDONPQQ6.cjs → impl-IIYZ245Q.cjs} +2 -2
  64. package/dist/{impl-GDONPQQ6.cjs.map → impl-IIYZ245Q.cjs.map} +1 -1
  65. package/dist/{impl-DDOPMEH6.cjs → impl-IN53IGZO.cjs} +5 -5
  66. package/dist/{impl-DDOPMEH6.cjs.map → impl-IN53IGZO.cjs.map} +1 -1
  67. package/dist/impl-J6ENLPL7.cjs +2 -0
  68. package/dist/{impl-UZTSGARM.cjs.map → impl-J6ENLPL7.cjs.map} +1 -1
  69. package/dist/{impl-US4VOSBF.cjs → impl-JFHI2O55.cjs} +4 -4
  70. package/dist/{impl-US4VOSBF.cjs.map → impl-JFHI2O55.cjs.map} +1 -1
  71. package/dist/{impl-LV5VZGGG.cjs → impl-JL3ILIXJ.cjs} +2 -2
  72. package/dist/{impl-LV5VZGGG.cjs.map → impl-JL3ILIXJ.cjs.map} +1 -1
  73. package/dist/{impl-LNF5A3IV.cjs → impl-KFA3AMJD.cjs} +2 -2
  74. package/dist/{impl-LNF5A3IV.cjs.map → impl-KFA3AMJD.cjs.map} +1 -1
  75. package/dist/{impl-6JRE252A.cjs → impl-KQMEFEGS.cjs} +2 -2
  76. package/dist/{impl-6JRE252A.cjs.map → impl-KQMEFEGS.cjs.map} +1 -1
  77. package/dist/{impl-LBJYOQEP.cjs → impl-M2FUD3PD.cjs} +2 -2
  78. package/dist/{impl-LBJYOQEP.cjs.map → impl-M2FUD3PD.cjs.map} +1 -1
  79. package/dist/{impl-QPUYYCCD.cjs → impl-ME5ECUXX.cjs} +5 -5
  80. package/dist/{impl-QPUYYCCD.cjs.map → impl-ME5ECUXX.cjs.map} +1 -1
  81. package/dist/{impl-WO3LVKNE.cjs → impl-MXT5WXQL.cjs} +2 -2
  82. package/dist/{impl-WO3LVKNE.cjs.map → impl-MXT5WXQL.cjs.map} +1 -1
  83. package/dist/{impl-5H6DFFAS.cjs → impl-N42OQHZK.cjs} +2 -2
  84. package/dist/{impl-5H6DFFAS.cjs.map → impl-N42OQHZK.cjs.map} +1 -1
  85. package/dist/{impl-WVAGHUZI.cjs → impl-QIO7HI3C.cjs} +3 -3
  86. package/dist/{impl-WVAGHUZI.cjs.map → impl-QIO7HI3C.cjs.map} +1 -1
  87. package/dist/{impl-UZE2LR6H.cjs → impl-RWQGNFGA.cjs} +2 -2
  88. package/dist/{impl-UZE2LR6H.cjs.map → impl-RWQGNFGA.cjs.map} +1 -1
  89. package/dist/{impl-C7DRIULL.cjs → impl-U3QTUNKM.cjs} +2 -2
  90. package/dist/{impl-C7DRIULL.cjs.map → impl-U3QTUNKM.cjs.map} +1 -1
  91. package/dist/{impl-SCX5AEQB.cjs → impl-UAVSJRAQ.cjs} +2 -2
  92. package/dist/{impl-SCX5AEQB.cjs.map → impl-UAVSJRAQ.cjs.map} +1 -1
  93. package/dist/{impl-CK5QRU26.cjs → impl-V4DXFCLY.cjs} +2 -2
  94. package/dist/{impl-CK5QRU26.cjs.map → impl-V4DXFCLY.cjs.map} +1 -1
  95. package/dist/{impl-DYGW2VXN.cjs → impl-VLNYULEF.cjs} +2 -2
  96. package/dist/{impl-DYGW2VXN.cjs.map → impl-VLNYULEF.cjs.map} +1 -1
  97. package/dist/{impl-EL3GY7PX.cjs → impl-WLYSLIAY.cjs} +2 -2
  98. package/dist/{impl-EL3GY7PX.cjs.map → impl-WLYSLIAY.cjs.map} +1 -1
  99. package/dist/{impl-SC7VG3C5.cjs → impl-XW5NZCGW.cjs} +2 -2
  100. package/dist/{impl-SC7VG3C5.cjs.map → impl-XW5NZCGW.cjs.map} +1 -1
  101. package/dist/{impl-PKQQUVYK.cjs → impl-XYG2OLQG.cjs} +2 -2
  102. package/dist/{impl-PKQQUVYK.cjs.map → impl-XYG2OLQG.cjs.map} +1 -1
  103. package/dist/{impl-QAMYNNJD.cjs → impl-YKIGKPS6.cjs} +2 -2
  104. package/dist/{impl-QAMYNNJD.cjs.map → impl-YKIGKPS6.cjs.map} +1 -1
  105. package/dist/{impl-MT4XWK25.cjs → impl-YKOMPECQ.cjs} +2 -2
  106. package/dist/{impl-MT4XWK25.cjs.map → impl-YKOMPECQ.cjs.map} +1 -1
  107. package/dist/index.cjs +3 -3
  108. package/dist/index.cjs.map +1 -1
  109. package/dist/index.d.cts +53 -27
  110. package/package.json +1 -1
  111. package/dist/chunk-QPIUQDJ6.cjs +0 -2920
  112. package/dist/impl-7RJYKTCZ.cjs +0 -12
  113. package/dist/impl-7RJYKTCZ.cjs.map +0 -1
  114. package/dist/impl-UZTSGARM.cjs +0 -2
@@ -0,0 +1,2920 @@
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 _chunkTO4YF4PGcjs = require('./chunk-TO4YF4PG.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
+ `,Hd= 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
+ `,Jd= 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
+ `,Xd= 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 rf=_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
+ `,sf= 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
+ attributeValues {
943
+ id
944
+ name
945
+ attributeKey {
946
+ id
947
+ name
948
+ }
949
+ }
950
+ }
951
+ totalCount
952
+ }
953
+ }
954
+ `,nr= exports.W =_graphqlrequest.gql`
955
+ mutation TranscendCliApprovePrivacyRequest($input: CommunicationInput!) {
956
+ approveRequest(input: $input) {
957
+ request {
958
+ id
959
+ }
960
+ }
961
+ }
962
+ `,uo= exports.X =_graphqlrequest.gql`
963
+ mutation TranscendCliCancelPrivacyRequest($input: CommunicationInput!) {
964
+ cancelRequest(input: $input) {
965
+ request {
966
+ id
967
+ }
968
+ }
969
+ }
970
+ `,At= exports.Y =_graphqlrequest.gql`
971
+ mutation TranscendCliUpdatePrivacyRequest($input: UpdateRequestInput!) {
972
+ updateRequest(input: $input) {
973
+ request {
974
+ id
975
+ }
976
+ }
977
+ }
978
+ `,mo= exports.Z =_graphqlrequest.gql`
979
+ mutation TranscendCliNotifyAdditionalTime($input: AdditionalTimeInput!) {
980
+ notifyAdditionalTime(input: $input) {
981
+ clientMutationId
982
+ }
983
+ }
984
+ `;var go=_graphqlrequest.gql`
985
+ query TranscendCliFetchMessage {
986
+ translatedMessages {
987
+ id
988
+ defaultMessage
989
+ targetReactIntlId
990
+ translations {
991
+ locale
992
+ value
993
+ }
994
+ }
995
+ }
996
+ `,yo= exports.$ =_graphqlrequest.gql`
997
+ mutation TranscendCliUpdateIntlMessages($messages: [MessageInput!]!) {
998
+ updateIntlMessages(input: { messages: $messages, skipPublish: true }) {
999
+ clientMutationId
1000
+ }
1001
+ }
1002
+ `;var ho=_graphqlrequest.gql`
1003
+ query TranscendCliRequestEnrichers(
1004
+ $first: Int!
1005
+ $offset: Int!
1006
+ $requestId: ID!
1007
+ ) {
1008
+ requestEnrichers(
1009
+ input: { requestId: $requestId }
1010
+ first: $first
1011
+ offset: $offset
1012
+ useMaster: false
1013
+ orderBy: [
1014
+ { field: createdAt, direction: ASC }
1015
+ { field: title, direction: ASC, model: enricher }
1016
+ ]
1017
+ ) {
1018
+ nodes {
1019
+ id
1020
+ status
1021
+ enricher {
1022
+ id
1023
+ type
1024
+ title
1025
+ }
1026
+ }
1027
+ totalCount
1028
+ }
1029
+ }
1030
+ `,Co= exports.ba =_graphqlrequest.gql`
1031
+ mutation TranscendCliRetryRequestEnricher($requestEnricherId: ID!) {
1032
+ retryRequestEnricher(id: $requestEnricherId) {
1033
+ requestEnricher {
1034
+ id
1035
+ }
1036
+ }
1037
+ }
1038
+ `,Ao= exports.ca =_graphqlrequest.gql`
1039
+ mutation TranscendCliSkipRequestEnricher($requestEnricherId: ID!) {
1040
+ skipRequestEnricher(id: $requestEnricherId) {
1041
+ requestEnricher {
1042
+ id
1043
+ }
1044
+ }
1045
+ }
1046
+ `;var Yr=`
1047
+ id
1048
+ title
1049
+ status
1050
+ index
1051
+ questions {
1052
+ id
1053
+ title
1054
+ index
1055
+ type
1056
+ subType
1057
+ placeholder
1058
+ description
1059
+ isRequired
1060
+ displayLogic
1061
+ riskLogic
1062
+ requireRiskEvaluation
1063
+ requireRiskMatrixEvaluation
1064
+ riskCategories {
1065
+ id
1066
+ title
1067
+ }
1068
+ riskFramework {
1069
+ id
1070
+ title
1071
+ description
1072
+ riskLevels {
1073
+ id
1074
+ title
1075
+ }
1076
+ riskCategories {
1077
+ id
1078
+ title
1079
+ }
1080
+ riskMatrixColumns {
1081
+ id
1082
+ title
1083
+ }
1084
+ riskMatrixRows {
1085
+ id
1086
+ title
1087
+ }
1088
+ riskMatrix {
1089
+ id
1090
+ title
1091
+ }
1092
+ creator {
1093
+ id
1094
+ email
1095
+ name
1096
+ }
1097
+ riskMatrixRowTitle
1098
+ riskMatrixColumnTitle
1099
+ }
1100
+ riskLevel {
1101
+ id
1102
+ title
1103
+ }
1104
+ reviewerRiskLevel {
1105
+ id
1106
+ title
1107
+ }
1108
+ riskLevelFromRiskMatrix {
1109
+ id
1110
+ title
1111
+ }
1112
+ answerOptions {
1113
+ id
1114
+ index
1115
+ value
1116
+ }
1117
+ selectedAnswers {
1118
+ ... on AssessmentAnswerInterface {
1119
+ id
1120
+ index
1121
+ value
1122
+ }
1123
+ }
1124
+ respondent {
1125
+ id
1126
+ email
1127
+ name
1128
+ }
1129
+ attributeKey {
1130
+ name
1131
+ }
1132
+ externalRespondentEmail
1133
+ comments {
1134
+ id
1135
+ content
1136
+ createdAt
1137
+ updatedAt
1138
+ author {
1139
+ id
1140
+ email
1141
+ name
1142
+ }
1143
+ }
1144
+ allowedMimeTypes
1145
+ updatedAt
1146
+ referenceId
1147
+ previousSubmissions {
1148
+ id
1149
+ updatedAt
1150
+ assessmentQuestionId
1151
+ answers {
1152
+ ... on AssessmentAnswerInterface {
1153
+ id
1154
+ index
1155
+ value
1156
+ }
1157
+ }
1158
+ }
1159
+ allowSelectOther
1160
+ syncModel
1161
+ syncColumn
1162
+ syncRowIds
1163
+ syncOverride
1164
+ }
1165
+ assignees {
1166
+ id
1167
+ email
1168
+ name
1169
+ }
1170
+ externalAssignees {
1171
+ id
1172
+ email
1173
+ }
1174
+ isReviewed
1175
+ `,So= exports.ea =_graphqlrequest.gql`
1176
+ query TranscendCliAssessments(
1177
+ $first: Int!
1178
+ $offset: Int!
1179
+ $filterBy: AssessmentFormFiltersInput
1180
+ ) {
1181
+ assessmentForms(first: $first, offset: $offset, filterBy: $filterBy) {
1182
+ nodes {
1183
+ id
1184
+ creator {
1185
+ id
1186
+ email
1187
+ name
1188
+ }
1189
+ lastEditor {
1190
+ id
1191
+ email
1192
+ name
1193
+ }
1194
+ title
1195
+ description
1196
+ status
1197
+ assignees {
1198
+ id
1199
+ email
1200
+ name
1201
+ }
1202
+ externalAssignees {
1203
+ id
1204
+ email
1205
+ }
1206
+ reviewers {
1207
+ id
1208
+ email
1209
+ name
1210
+ }
1211
+ isLocked
1212
+ isArchived
1213
+ isExternallyCreated
1214
+ dueDate
1215
+ createdAt
1216
+ updatedAt
1217
+ assignedAt
1218
+ submittedAt
1219
+ approvedAt
1220
+ rejectedAt
1221
+ titleIsInternal
1222
+ retentionSchedule {
1223
+ id
1224
+ type
1225
+ durationDays
1226
+ operation
1227
+ }
1228
+ attributeValues {
1229
+ name
1230
+ attributeKey {
1231
+ name
1232
+ }
1233
+ }
1234
+ sections {
1235
+ ${Yr}
1236
+ }
1237
+ assessmentGroup {
1238
+ id
1239
+ title
1240
+ description
1241
+ }
1242
+ resources {
1243
+ resourceType
1244
+ ... on AttributeBusinessEntityResource {
1245
+ id
1246
+ title
1247
+ }
1248
+ ... on AttributeDataSiloResource {
1249
+ id
1250
+ title
1251
+ }
1252
+ ... on AttributeDataSubCategoryResource {
1253
+ id
1254
+ name
1255
+ category
1256
+ }
1257
+ ... on AttributeSubDataPointResource {
1258
+ id
1259
+ name
1260
+ }
1261
+ ... on AttributeProcessingPurposeSubCategoryResource {
1262
+ id
1263
+ name
1264
+ purpose
1265
+ }
1266
+ ... on AttributeRequestResource {
1267
+ id
1268
+ type
1269
+ }
1270
+ ... on AttributeVendorResource {
1271
+ id
1272
+ title
1273
+ }
1274
+ ... on AttributePromptResource {
1275
+ id
1276
+ title
1277
+ }
1278
+ ... on AttributePromptRunResource {
1279
+ id
1280
+ title
1281
+ }
1282
+ ... on AttributePromptGroupResource {
1283
+ id
1284
+ title
1285
+ }
1286
+ }
1287
+ syncedRows {
1288
+ resourceType
1289
+ ... on AttributeBusinessEntityResource {
1290
+ id
1291
+ title
1292
+ }
1293
+ ... on AttributeDataSiloResource {
1294
+ id
1295
+ title
1296
+ }
1297
+ ... on AttributeDataSubCategoryResource {
1298
+ id
1299
+ name
1300
+ category
1301
+ }
1302
+ ... on AttributeSubDataPointResource {
1303
+ id
1304
+ name
1305
+ }
1306
+ ... on AttributeProcessingPurposeSubCategoryResource {
1307
+ id
1308
+ name
1309
+ purpose
1310
+ }
1311
+ ... on AttributeVendorResource {
1312
+ id
1313
+ title
1314
+ }
1315
+ }
1316
+ }
1317
+ }
1318
+ }
1319
+ `,Bf= exports.fa =_graphqlrequest.gql`
1320
+ mutation TranscendCliImportOneTrustAssessmentForms(
1321
+ $input: ImportOnetrustAssessmentsInput!
1322
+ ) {
1323
+ importOneTrustAssessmentForms(input: $input) {
1324
+ assessmentForms {
1325
+ id
1326
+ title
1327
+ }
1328
+ }
1329
+ }
1330
+ `;var To=_graphqlrequest.gql`
1331
+ query TranscendCliPurposes(
1332
+ $first: Int!
1333
+ $offset: Int!
1334
+ $filterBy: TrackingPurposeFiltersInput
1335
+ $input: TrackingPurposeInput!
1336
+ ) {
1337
+ purposes(
1338
+ first: $first
1339
+ offset: $offset
1340
+ filterBy: $filterBy
1341
+ input: $input
1342
+ ) {
1343
+ nodes {
1344
+ id
1345
+ name
1346
+ description
1347
+ defaultConsent
1348
+ trackingType
1349
+ configurable
1350
+ essential
1351
+ showInConsentManager
1352
+ isActive
1353
+ displayOrder
1354
+ optOutSignals
1355
+ deletedAt
1356
+ authLevel
1357
+ showInPrivacyCenter
1358
+ title
1359
+ }
1360
+ }
1361
+ }
1362
+ `;var Po=_graphqlrequest.gql`
1363
+ query TranscendCliPreferenceTopics(
1364
+ $first: Int!
1365
+ $offset: Int!
1366
+ $filterBy: PreferenceTopicFilterInput
1367
+ ) {
1368
+ preferenceTopics(first: $first, offset: $offset, filterBy: $filterBy) {
1369
+ nodes {
1370
+ id
1371
+ slug
1372
+ type
1373
+ title {
1374
+ id
1375
+ defaultMessage
1376
+ }
1377
+ showInPrivacyCenter
1378
+ displayDescription {
1379
+ id
1380
+ defaultMessage
1381
+ }
1382
+ defaultConfiguration
1383
+ preferenceOptionValues {
1384
+ slug
1385
+ title {
1386
+ id
1387
+ defaultMessage
1388
+ }
1389
+ }
1390
+ purpose {
1391
+ trackingType
1392
+ }
1393
+ }
1394
+ }
1395
+ }
1396
+ `;var Eo=_graphqlrequest.gql`
1397
+ query TranscendCliAssessmentTemplates(
1398
+ $first: Int!
1399
+ $offset: Int!
1400
+ $filterBy: AssessmentFormTemplateFiltersInput
1401
+ ) {
1402
+ assessmentFormTemplates(
1403
+ first: $first
1404
+ offset: $offset
1405
+ filterBy: $filterBy
1406
+ ) {
1407
+ nodes {
1408
+ id
1409
+ creator {
1410
+ id
1411
+ email
1412
+ name
1413
+ }
1414
+ lastEditor {
1415
+ id
1416
+ email
1417
+ name
1418
+ }
1419
+ title
1420
+ description
1421
+ status
1422
+ source
1423
+ parentId
1424
+ isLocked
1425
+ isArchived
1426
+ createdAt
1427
+ updatedAt
1428
+ retentionSchedule {
1429
+ id
1430
+ type
1431
+ durationDays
1432
+ operation
1433
+ createdAt
1434
+ updatedAt
1435
+ }
1436
+ assessmentEmailSet {
1437
+ id
1438
+ title
1439
+ description
1440
+ isDefault
1441
+ templates {
1442
+ id
1443
+ title
1444
+ }
1445
+ }
1446
+ sections {
1447
+ ${Yr}
1448
+ }
1449
+ }
1450
+ }
1451
+ }
1452
+ `;var Ro=_graphqlrequest.gql`
1453
+ query TranscendCliPrompts(
1454
+ $first: Int!
1455
+ $offset: Int!
1456
+ $filterBy: PromptFiltersInput
1457
+ ) {
1458
+ prompts(
1459
+ first: $first
1460
+ orderBy: [{ field: title, direction: ASC }]
1461
+ offset: $offset
1462
+ filterBy: $filterBy
1463
+ ) {
1464
+ nodes {
1465
+ id
1466
+ title
1467
+ status
1468
+ content
1469
+ temperature
1470
+ topP
1471
+ maxTokensToSample
1472
+ }
1473
+ }
1474
+ }
1475
+ `,bo= exports.ka =_graphqlrequest.gql`
1476
+ query TranscendCliPromptPartials($first: Int!, $offset: Int!) {
1477
+ promptPartials(first: $first, offset: $offset) {
1478
+ nodes {
1479
+ id
1480
+ title
1481
+ content
1482
+ }
1483
+ }
1484
+ }
1485
+ `,wo= exports.la =_graphqlrequest.gql`
1486
+ query TranscendCliPromptGroups($first: Int!, $offset: Int!) {
1487
+ promptGroups(
1488
+ first: $first
1489
+
1490
+ offset: $offset
1491
+ ) {
1492
+ nodes {
1493
+ id
1494
+ title
1495
+ description
1496
+ prompts {
1497
+ title
1498
+ }
1499
+ }
1500
+ }
1501
+ }
1502
+ `,$o= exports.ma =_graphqlrequest.gql`
1503
+ query TranscendCliPromptsWithVariables($input: PromptsWithVariablesInput!) {
1504
+ promptsWithVariables(input: $input) {
1505
+ prompts {
1506
+ id
1507
+ title
1508
+ content
1509
+ status
1510
+ temperature
1511
+ topP
1512
+ maxTokensToSample
1513
+ responseFormat
1514
+ }
1515
+ promptPartials {
1516
+ id
1517
+ title
1518
+ content
1519
+ slug
1520
+ }
1521
+ calculatedVariables {
1522
+ data
1523
+ name
1524
+ }
1525
+ runtimeVariables {
1526
+ name
1527
+ }
1528
+ }
1529
+ }
1530
+ `,xo= exports.na =_graphqlrequest.gql`
1531
+ mutation TranscendCliUpdatePrompts($input: UpdatePromptsInput!) {
1532
+ updatePrompts(input: $input) {
1533
+ clientMutationId
1534
+ }
1535
+ }
1536
+ `,Do= exports.oa =_graphqlrequest.gql`
1537
+ mutation TranscendCliCreatePrompt($input: CreatePromptInput!) {
1538
+ createPrompt(input: $input) {
1539
+ clientMutationId
1540
+ prompt {
1541
+ id
1542
+ }
1543
+ }
1544
+ }
1545
+ `,qo= exports.pa =_graphqlrequest.gql`
1546
+ mutation TranscendCliUpdatePromptPartials(
1547
+ $input: UpdatePromptPartialsInput!
1548
+ ) {
1549
+ updatePromptPartials(input: $input) {
1550
+ clientMutationId
1551
+ }
1552
+ }
1553
+ `,Lo= exports.qa =_graphqlrequest.gql`
1554
+ mutation TranscendCliCreatePromptPartial($input: CreatePromptPartialInput!) {
1555
+ createPromptPartial(input: $input) {
1556
+ clientMutationId
1557
+ promptPartial {
1558
+ id
1559
+ }
1560
+ }
1561
+ }
1562
+ `,vo= exports.ra =_graphqlrequest.gql`
1563
+ mutation TranscendCliUpdatePromptGroups($input: UpdatePromptGroupsInput!) {
1564
+ updatePromptGroups(input: $input) {
1565
+ clientMutationId
1566
+ }
1567
+ }
1568
+ `,ko= exports.sa =_graphqlrequest.gql`
1569
+ mutation TranscendCliCreatePromptPartial($input: CreatePromptGroupInput!) {
1570
+ createPromptGroup(input: $input) {
1571
+ clientMutationId
1572
+ promptGroup {
1573
+ id
1574
+ }
1575
+ }
1576
+ }
1577
+ `;var Zr=_graphqlrequest.gql`
1578
+ query TranscendCliRequestDataSilos(
1579
+ $first: Int!
1580
+ $offset: Int!
1581
+ $filterBy: RequestDataSiloFiltersInput!
1582
+ ) {
1583
+ requestDataSilos(
1584
+ filterBy: $filterBy
1585
+ first: $first
1586
+ offset: $offset
1587
+ useMaster: false
1588
+ orderBy: [
1589
+ { field: createdAt, direction: DESC }
1590
+ { field: title, direction: ASC, model: dataSilo }
1591
+ ]
1592
+ ) {
1593
+ nodes {
1594
+ id
1595
+ }
1596
+ totalCount
1597
+ }
1598
+ }
1599
+ `,_o= exports.ua =_graphqlrequest.gql`
1600
+ mutation TranscendCliMarkRequestDataSiloCompleted(
1601
+ $requestDataSiloId: ID!
1602
+ $status: UpdateRequestDataSiloStatus!
1603
+ ) {
1604
+ changeRequestDataSiloStatus(
1605
+ input: { id: $requestDataSiloId, status: $status }
1606
+ ) {
1607
+ requestDataSilo {
1608
+ id
1609
+ }
1610
+ }
1611
+ }
1612
+ `,Oo= exports.va =_graphqlrequest.gql`
1613
+ mutation TranscendCliRetryRequestDataSilo($requestDataSiloId: ID!) {
1614
+ retryRequestDataSilo(id: $requestDataSiloId) {
1615
+ requestDataSilo {
1616
+ id
1617
+ }
1618
+ }
1619
+ }
1620
+ `,Go= exports.wa =_graphqlrequest.gql`
1621
+ query TranscendCliListReducedRequestsForDataSiloCount(
1622
+ $input: BulkCompletionReducedRequestInput!
1623
+ ) {
1624
+ listReducedRequestsForDataSilo(input: $input) {
1625
+ totalCount
1626
+ }
1627
+ }
1628
+ `;var No=_graphqlrequest.gql`
1629
+ query TranscendCliTeams(
1630
+ $first: Int!
1631
+ $offset: Int!
1632
+ $input: TeamFiltersInput
1633
+ ) {
1634
+ teams(
1635
+ first: $first
1636
+ offset: $offset
1637
+ filterBy: $input
1638
+ orderBy: [
1639
+ { field: createdAt, direction: ASC }
1640
+ { field: name, direction: ASC }
1641
+ ]
1642
+ ) {
1643
+ nodes {
1644
+ id
1645
+ name
1646
+ description
1647
+ ssoDepartment
1648
+ ssoGroup
1649
+ ssoTitle
1650
+ users {
1651
+ id
1652
+ email
1653
+ name
1654
+ }
1655
+ scopes {
1656
+ id
1657
+ name
1658
+ title
1659
+ }
1660
+ }
1661
+ }
1662
+ }
1663
+ `,Mo= exports.ya =_graphqlrequest.gql`
1664
+ mutation TranscendCliCreateTeam($input: TeamInput!) {
1665
+ createTeam(input: $input) {
1666
+ team {
1667
+ id
1668
+ name
1669
+ }
1670
+ }
1671
+ }
1672
+ `,Fo= exports.za =_graphqlrequest.gql`
1673
+ mutation TranscendCliUpdateTeam($input: UpdateTeamInput!) {
1674
+ updateTeam(input: $input) {
1675
+ team {
1676
+ id
1677
+ name
1678
+ }
1679
+ }
1680
+ }
1681
+ `;var Qo=_graphqlrequest.gql`
1682
+ mutation TranscendCliRemoveRequestIdentifiers(
1683
+ $input: RemoveRequestIdentifiersInput!
1684
+ ) {
1685
+ removeRequestIdentifiers(input: $input) {
1686
+ count
1687
+ }
1688
+ }
1689
+ `,Bo= exports.Ba =_graphqlrequest.gql`
1690
+ query TranscendCliRequestIdentifiers(
1691
+ $first: Int!
1692
+ $offset: Int!
1693
+ $requestIds: [ID!]!
1694
+ ) {
1695
+ requestIdentifiers(
1696
+ input: { requestIds: $requestIds }
1697
+ first: $first
1698
+ offset: $offset
1699
+ useMaster: false
1700
+ orderBy: [
1701
+ { field: createdAt, direction: ASC }
1702
+ { field: name, direction: ASC }
1703
+ ]
1704
+ ) {
1705
+ nodes {
1706
+ id
1707
+ name
1708
+ isVerifiedAtLeastOnce
1709
+ }
1710
+ totalCount
1711
+ }
1712
+ }
1713
+ `;var Vo=_graphqlrequest.gql`
1714
+ query TranscendCliUsers(
1715
+ $first: Int!
1716
+ $offset: Int!
1717
+ $input: UserFiltersInput
1718
+ ) {
1719
+ users(
1720
+ first: $first
1721
+ offset: $offset
1722
+ filterBy: $input
1723
+ orderBy: [
1724
+ { field: createdAt, direction: ASC }
1725
+ { field: name, direction: ASC }
1726
+ ]
1727
+ ) {
1728
+ nodes {
1729
+ id
1730
+ name
1731
+ email
1732
+ }
1733
+ }
1734
+ }
1735
+ `;var lg=_graphqlrequest.gql`
1736
+ query TranscendCliRequestFiles(
1737
+ $first: Int!
1738
+ $offset: Int!
1739
+ $filterBy: RequestFileFiltersInput!
1740
+ ) {
1741
+ requestFiles(
1742
+ filterBy: $filterBy
1743
+ first: $first
1744
+ offset: $offset
1745
+ orderBy: [
1746
+ { field: createdAt, direction: ASC }
1747
+ { field: id, direction: ASC }
1748
+ ]
1749
+ ) {
1750
+ nodes {
1751
+ remoteId
1752
+ fileName
1753
+ }
1754
+ }
1755
+ }
1756
+ `,jo= exports.Ea =_graphqlrequest.gql`
1757
+ query TranscendCliBulkRequestFiles(
1758
+ $filterBy: BulkRequestFilesFiltersInput!
1759
+ $first: Int!
1760
+ $after: String
1761
+ ) {
1762
+ bulkRequestFiles(filterBy: $filterBy, first: $first, after: $after) {
1763
+ nodes {
1764
+ remoteId
1765
+ fileName
1766
+ }
1767
+ pageInfo {
1768
+ hasNextPage
1769
+ endCursor
1770
+ }
1771
+ }
1772
+ }
1773
+ `;var Zo=_graphqlrequest.gql`
1774
+ mutation TranscendCliReportPromptRun($input: ReportPromptRunInput!) {
1775
+ reportPromptRun(input: $input) {
1776
+ clientMutationId
1777
+ promptRun {
1778
+ id
1779
+ }
1780
+ }
1781
+ }
1782
+ `,zo= exports.Ga =_graphqlrequest.gql`
1783
+ mutation TranscendCliAddMessagesToPromptRun(
1784
+ $input: AddMessagesToPromptRunInput!
1785
+ ) {
1786
+ addMessagesToPromptRun(input: $input) {
1787
+ clientMutationId
1788
+ promptRun {
1789
+ id
1790
+ }
1791
+ }
1792
+ }
1793
+ `;var Wo=_graphqlrequest.gql`
1794
+ query TranscendCliGlobalActionItemCollectionss(
1795
+ $filterBy: GlobalActionItemCollectionFiltersInput!
1796
+ ) {
1797
+ globalActionItemCollections(filterBy: $filterBy) {
1798
+ nodes {
1799
+ id
1800
+ title
1801
+ description
1802
+ hidden
1803
+ productLine
1804
+ }
1805
+ }
1806
+ }
1807
+ `,Ho= exports.Ia =_graphqlrequest.gql`
1808
+ mutation TranscendCliCreateActionItemCollection(
1809
+ $input: CreateActionItemCollectionInput!
1810
+ ) {
1811
+ createActionItemCollection(input: $input) {
1812
+ created {
1813
+ id
1814
+ title
1815
+ }
1816
+ }
1817
+ }
1818
+ `,Jo= exports.Ja =_graphqlrequest.gql`
1819
+ mutation TranscendCliUpdateActionItemCollection(
1820
+ $input: UpdateActionItemCollectionInput!
1821
+ ) {
1822
+ updateActionItemCollection(input: $input) {
1823
+ clientMutationId
1824
+ }
1825
+ }
1826
+ `;var Xo=_graphqlrequest.gql`
1827
+ query TranscendCliAttributes($first: Int!, $offset: Int!) {
1828
+ attributeKeys(first: $first, offset: $offset, useMaster: false) {
1829
+ nodes {
1830
+ id
1831
+ isCustom
1832
+ description
1833
+ enabledOn
1834
+ name
1835
+ type
1836
+ }
1837
+ }
1838
+ }
1839
+ `,es= exports.La =_graphqlrequest.gql`
1840
+ mutation TranscendCliCreateAttributeValues(
1841
+ $input: [CreateAttributeValuesInput!]!
1842
+ ) {
1843
+ createAttributeValues(input: $input) {
1844
+ clientMutationId
1845
+ }
1846
+ }
1847
+ `,ts= exports.Ma =_graphqlrequest.gql`
1848
+ mutation TranscendCliUpdateAttributeValues(
1849
+ $input: [UpdateAttributeValueInput!]!
1850
+ ) {
1851
+ updateAttributeValues(input: $input) {
1852
+ clientMutationId
1853
+ }
1854
+ }
1855
+ `,rs= exports.Na =_graphqlrequest.gql`
1856
+ mutation TranscendCliDeleteAttributeValue($id: ID!) {
1857
+ deleteAttributeValue(id: $id) {
1858
+ clientMutationId
1859
+ }
1860
+ }
1861
+ `,is= exports.Oa =_graphqlrequest.gql`
1862
+ query TranscendCliAttributeValues(
1863
+ $first: Int!
1864
+ $offset: Int!
1865
+ $attributeKeyId: ID!
1866
+ ) {
1867
+ attributeValues(
1868
+ first: $first
1869
+ offset: $offset
1870
+ useMaster: false
1871
+ filterBy: { attributeKeys: [$attributeKeyId] }
1872
+ ) {
1873
+ nodes {
1874
+ id
1875
+ name
1876
+ description
1877
+ color
1878
+ }
1879
+ }
1880
+ }
1881
+ `,ns= exports.Pa =_graphqlrequest.gql`
1882
+ mutation TranscendCliCreateAttribute(
1883
+ $name: String!
1884
+ $type: AttributeKeyType!
1885
+ $description: String
1886
+ $enabledOn: [AttributeSupportedResourceType!]
1887
+ ) {
1888
+ createAttributeKey(
1889
+ input: {
1890
+ name: $name
1891
+ type: $type
1892
+ description: $description
1893
+ enabledOn: $enabledOn
1894
+ }
1895
+ ) {
1896
+ clientMutationId
1897
+ attributeKey {
1898
+ id
1899
+ }
1900
+ }
1901
+ }
1902
+ `,os= exports.Qa =_graphqlrequest.gql`
1903
+ mutation TranscendCliCreateAttribute(
1904
+ $attributeKeyId: ID!
1905
+ $description: String
1906
+ $enabledOn: [AttributeSupportedResourceType!]
1907
+ ) {
1908
+ updateAttributeKey(
1909
+ input: {
1910
+ id: $attributeKeyId
1911
+ description: $description
1912
+ enabledOn: $enabledOn
1913
+ }
1914
+ ) {
1915
+ clientMutationId
1916
+ attributeKey {
1917
+ id
1918
+ }
1919
+ }
1920
+ }
1921
+ `,ss= exports.Ra =_graphqlrequest.gql`
1922
+ mutation TranscendCliSetResourceAttributes(
1923
+ $input: SetResourceAttributesInput!
1924
+ ) {
1925
+ setResourceAttributes(input: $input) {
1926
+ clientMutationId
1927
+ }
1928
+ }
1929
+ `;var as=_graphqlrequest.gql`
1930
+ query TranscendCliExperiences($first: Int!, $offset: Int!) {
1931
+ experiences(first: $first, offset: $offset, useMaster: false) {
1932
+ nodes {
1933
+ id
1934
+ name
1935
+ displayName
1936
+ regions {
1937
+ countrySubDivision
1938
+ country
1939
+ }
1940
+ operator
1941
+ displayPriority
1942
+ onConsentExpiry
1943
+ consentExpiry
1944
+ viewState
1945
+ purposes {
1946
+ name
1947
+ trackingType
1948
+ }
1949
+ optedOutPurposes {
1950
+ name
1951
+ trackingType
1952
+ }
1953
+ browserLanguages
1954
+ browserTimeZones
1955
+ }
1956
+ }
1957
+ }
1958
+ `,ps= exports.Ta =_graphqlrequest.gql`
1959
+ query TranscendCliConsentPartitions($first: Int!, $offset: Int!) {
1960
+ consentPartitions(first: $first, offset: $offset) {
1961
+ nodes {
1962
+ id
1963
+ name
1964
+ partition
1965
+ }
1966
+ }
1967
+ }
1968
+ `,ls= exports.Ua =_graphqlrequest.gql`
1969
+ mutation TranscendCliCreateDataFlows(
1970
+ $dataFlows: [DataFlowInput!]!
1971
+ $airgapBundleId: ID!
1972
+ $classifyService: Boolean
1973
+ ) {
1974
+ createDataFlows(
1975
+ input: {
1976
+ airgapBundleId: $airgapBundleId
1977
+ dataFlows: $dataFlows
1978
+ classifyService: $classifyService
1979
+ }
1980
+ ) {
1981
+ dataFlows {
1982
+ id
1983
+ }
1984
+ }
1985
+ }
1986
+ `,cs= exports.Va =_graphqlrequest.gql`
1987
+ mutation TranscendCliUpdateDataFlows(
1988
+ $airgapBundleId: ID!
1989
+ $dataFlows: [UpdateDataFlowInput!]!
1990
+ $classifyService: Boolean
1991
+ ) {
1992
+ updateDataFlows(
1993
+ input: {
1994
+ airgapBundleId: $airgapBundleId
1995
+ dataFlows: $dataFlows
1996
+ classifyService: $classifyService
1997
+ }
1998
+ ) {
1999
+ dataFlows {
2000
+ id
2001
+ }
2002
+ }
2003
+ }
2004
+ `,us= exports.Wa =_graphqlrequest.gql`
2005
+ mutation TranscendCliUpdateOrCreateCookies(
2006
+ $cookies: [UpdateOrCreateCookieInput!]!
2007
+ $airgapBundleId: ID!
2008
+ ) {
2009
+ updateOrCreateCookies(
2010
+ input: { airgapBundleId: $airgapBundleId, cookies: $cookies }
2011
+ ) {
2012
+ clientMutationId
2013
+ }
2014
+ }
2015
+ `,ms= exports.Xa =_graphqlrequest.gql`
2016
+ query TranscendCliDataFlows(
2017
+ $first: Int!
2018
+ $airgapBundleId: ID!
2019
+ $offset: Int!
2020
+ $status: ConsentTrackerStatus
2021
+ $showZeroActivity: Boolean
2022
+ ) {
2023
+ dataFlows(
2024
+ first: $first
2025
+ offset: $offset
2026
+ filterBy: { status: $status, showZeroActivity: $showZeroActivity }
2027
+ input: { airgapBundleId: $airgapBundleId }
2028
+ orderBy: [
2029
+ { field: createdAt, direction: ASC }
2030
+ { field: value, direction: ASC }
2031
+ ]
2032
+ useMaster: false
2033
+ ) {
2034
+ nodes {
2035
+ id
2036
+ value
2037
+ type
2038
+ description
2039
+ trackingType
2040
+ service {
2041
+ integrationName
2042
+ }
2043
+ source
2044
+ status
2045
+ owners {
2046
+ email
2047
+ }
2048
+ teams {
2049
+ name
2050
+ }
2051
+ attributeValues {
2052
+ name
2053
+ attributeKey {
2054
+ name
2055
+ }
2056
+ }
2057
+ }
2058
+ }
2059
+ }
2060
+ `,ds= exports.Ya =_graphqlrequest.gql`
2061
+ query TranscendCliCookies(
2062
+ $first: Int!
2063
+ $offset: Int!
2064
+ $airgapBundleId: ID!
2065
+ $status: ConsentTrackerStatus
2066
+ ) {
2067
+ cookies(
2068
+ first: $first
2069
+ offset: $offset
2070
+ filterBy: { status: $status }
2071
+ input: { airgapBundleId: $airgapBundleId }
2072
+ orderBy: [
2073
+ { field: createdAt, direction: ASC }
2074
+ { field: name, direction: ASC }
2075
+ ]
2076
+ useMaster: false
2077
+ ) {
2078
+ nodes {
2079
+ id
2080
+ name
2081
+ isRegex
2082
+ description
2083
+ trackingPurposes
2084
+ service {
2085
+ integrationName
2086
+ }
2087
+ source
2088
+ status
2089
+ owners {
2090
+ email
2091
+ }
2092
+ teams {
2093
+ name
2094
+ }
2095
+ attributeValues {
2096
+ name
2097
+ attributeKey {
2098
+ name
2099
+ }
2100
+ }
2101
+ }
2102
+ }
2103
+ }
2104
+ `,fs= exports.Za =_graphqlrequest.gql`
2105
+ query TranscendCliFetchConsentManagerId {
2106
+ consentManager {
2107
+ consentManager {
2108
+ id
2109
+ }
2110
+ }
2111
+ }
2112
+ `,gs= exports._a =_graphqlrequest.gql`
2113
+ query TranscendCliFetchConsentManager {
2114
+ consentManager {
2115
+ consentManager {
2116
+ id
2117
+ bundleURL
2118
+ testBundleURL
2119
+ configuration {
2120
+ domains
2121
+ consentPrecedence
2122
+ unknownRequestPolicy
2123
+ unknownCookiePolicy
2124
+ syncEndpoint
2125
+ telemetryPartitioning
2126
+ signedIabAgreement
2127
+ syncGroups
2128
+ partition
2129
+ }
2130
+ partition {
2131
+ partition
2132
+ }
2133
+ }
2134
+ }
2135
+ }
2136
+ `,ys= exports.$a =_graphqlrequest.gql`
2137
+ query TranscendCliFetchConsentManagerTheme($airgapBundleId: ID!) {
2138
+ consentManagerTheme(input: { airgapBundleId: $airgapBundleId }) {
2139
+ theme {
2140
+ primaryColor
2141
+ fontColor
2142
+ privacyPolicy
2143
+ prompt
2144
+ }
2145
+ }
2146
+ }
2147
+ `,hs= exports.ab =_graphqlrequest.gql`
2148
+ mutation TranscendCliCreateConsentManager($privacyCenterId: ID!) {
2149
+ createConsentManager(input: { privacyCenterId: $privacyCenterId }) {
2150
+ consentManager {
2151
+ id
2152
+ }
2153
+ }
2154
+ }
2155
+ `,Cs= exports.bb =_graphqlrequest.gql`
2156
+ mutation TranscendCliUpdateConsentManager(
2157
+ $airgapBundleId: ID!
2158
+ $version: String!
2159
+ ) {
2160
+ updateConsentManager(id: $airgapBundleId, input: { version: $version }) {
2161
+ clientMutationId
2162
+ }
2163
+ }
2164
+ `,As= exports.cb =_graphqlrequest.gql`
2165
+ mutation TranscendCliUpdateConsentManagerToLatest(
2166
+ $airgapBundleId: ID!
2167
+ $bundleType: ConsentBundleType!
2168
+ ) {
2169
+ updateConsentManagerToLatestVersion(
2170
+ id: $airgapBundleId
2171
+ input: { bundleType: $bundleType }
2172
+ ) {
2173
+ clientMutationId
2174
+ }
2175
+ }
2176
+ `,Is= exports.db =_graphqlrequest.gql`
2177
+ mutation TranscendCliDeployConsentManager(
2178
+ $airgapBundleId: ID!
2179
+ $bundleType: ConsentBundleType!
2180
+ ) {
2181
+ deployConsentManagerBundle(
2182
+ id: $airgapBundleId
2183
+ input: { bundleType: $bundleType }
2184
+ ) {
2185
+ clientMutationId
2186
+ }
2187
+ }
2188
+ `,Ss= exports.eb =_graphqlrequest.gql`
2189
+ mutation TranscendCliUpdateConsentManagerDomains(
2190
+ $airgapBundleId: ID!
2191
+ $domains: [String!]!
2192
+ ) {
2193
+ updateConsentManagerDomains(
2194
+ input: { id: $airgapBundleId, domains: $domains }
2195
+ ) {
2196
+ clientMutationId
2197
+ }
2198
+ }
2199
+ `,Ts= exports.fb =_graphqlrequest.gql`
2200
+ mutation TranscendCliUpdateConsentManagerPartition(
2201
+ $airgapBundleId: ID!
2202
+ $partitionId: ID!
2203
+ ) {
2204
+ updateConsentManagerPartition(
2205
+ input: { id: $airgapBundleId, partitionId: $partitionId }
2206
+ ) {
2207
+ clientMutationId
2208
+ }
2209
+ }
2210
+ `,Ps= exports.gb =_graphqlrequest.gql`
2211
+ mutation TranscendCliUpdateLoadOptions($input: UpdateLoadOptionsInput!) {
2212
+ updateLoadOptions(input: $input) {
2213
+ clientMutationId
2214
+ }
2215
+ }
2216
+ `,Es= exports.hb =_graphqlrequest.gql`
2217
+ mutation TranscendCliToggleUnknownRequestPolicy(
2218
+ $input: ToggleUnknownRequestPolicyInput!
2219
+ ) {
2220
+ toggleUnknownRequestPolicy(input: $input) {
2221
+ clientMutationId
2222
+ }
2223
+ }
2224
+ `,Rs= exports.ib =_graphqlrequest.gql`
2225
+ mutation TranscendCliToggleUnknownCookiePolicy(
2226
+ $input: ToggleUnknownCookiePolicyInput!
2227
+ ) {
2228
+ toggleUnknownCookiePolicy(input: $input) {
2229
+ clientMutationId
2230
+ }
2231
+ }
2232
+ `,bs= exports.jb =_graphqlrequest.gql`
2233
+ mutation TranscendCliToggleTelemetryPartitionStrategy(
2234
+ $input: ToggleTelemetryPartitionStrategyInput!
2235
+ ) {
2236
+ toggleTelemetryPartitioning(input: $input) {
2237
+ clientMutationId
2238
+ }
2239
+ }
2240
+ `,ws= exports.kb =_graphqlrequest.gql`
2241
+ mutation TranscendCliToggleConsentPrecedence(
2242
+ $input: ToggleConsentPrecedenceInput!
2243
+ ) {
2244
+ toggleConsentPrecedence(input: $input) {
2245
+ clientMutationId
2246
+ }
2247
+ }
2248
+ `,$s= exports.lb =_graphqlrequest.gql`
2249
+ mutation TranscendCliUpdateConsentManagerTheme(
2250
+ $input: UpdateConsentManagerThemeInput!
2251
+ ) {
2252
+ updateConsentManagerTheme(input: $input) {
2253
+ clientMutationId
2254
+ }
2255
+ }
2256
+ `,xs= exports.mb =_graphqlrequest.gql`
2257
+ mutation TranscendCliUpdateConsentExperience($input: UpdateExperienceInput!) {
2258
+ updateExperience(input: $input) {
2259
+ clientMutationId
2260
+ }
2261
+ }
2262
+ `,Ds= exports.nb =_graphqlrequest.gql`
2263
+ mutation TranscendCliCreateConsentExperience($input: CreateExperienceInput!) {
2264
+ createExperience(input: $input) {
2265
+ clientMutationId
2266
+ }
2267
+ }
2268
+ `,qs= exports.ob =_graphqlrequest.gql`
2269
+ mutation TranscendCliCreateConsentPartition(
2270
+ $input: CreateConsentPartitionInput!
2271
+ ) {
2272
+ createConsentPartition(input: $input) {
2273
+ clientMutationId
2274
+ }
2275
+ }
2276
+ `;var Ls=_graphqlrequest.gql`
2277
+ query TranscendCliConsentManagerAnalyticsData($input: AnalyticsInput!) {
2278
+ analyticsData(input: $input) {
2279
+ series {
2280
+ name
2281
+ points {
2282
+ key
2283
+ value
2284
+ }
2285
+ }
2286
+ }
2287
+ }
2288
+ `;var vs=_graphqlrequest.gql`
2289
+ query TranscendCliBusinessEntities($first: Int!, $offset: Int!) {
2290
+ businessEntities(
2291
+ first: $first
2292
+ offset: $offset
2293
+ orderBy: [
2294
+ { field: createdAt, direction: ASC }
2295
+ { field: title, direction: ASC }
2296
+ ]
2297
+ useMaster: false
2298
+ ) {
2299
+ nodes {
2300
+ id
2301
+ title
2302
+ description
2303
+ dataProtectionOfficerName
2304
+ dataProtectionOfficerEmail
2305
+ address
2306
+ headquarterCountry
2307
+ headquarterSubDivision
2308
+ attributeValues {
2309
+ name
2310
+ attributeKey {
2311
+ name
2312
+ }
2313
+ }
2314
+ }
2315
+ }
2316
+ }
2317
+ `,ks= exports.rb =_graphqlrequest.gql`
2318
+ mutation TranscendCliCreateBusinessEntity(
2319
+ $input: CreateBusinessEntityInput!
2320
+ ) {
2321
+ createBusinessEntity(input: $input) {
2322
+ businessEntity {
2323
+ id
2324
+ title
2325
+ description
2326
+ dataProtectionOfficerName
2327
+ dataProtectionOfficerEmail
2328
+ address
2329
+ headquarterCountry
2330
+ headquarterSubDivision
2331
+ attributeValues {
2332
+ name
2333
+ attributeKey {
2334
+ name
2335
+ }
2336
+ }
2337
+ }
2338
+ }
2339
+ }
2340
+ `,_s= exports.sb =_graphqlrequest.gql`
2341
+ mutation TranscendCliUpdateBusinessEntities(
2342
+ $input: [UpdateBusinessEntityInput!]!
2343
+ ) {
2344
+ updateBusinessEntities(input: { businessEntities: $input }) {
2345
+ clientMutationId
2346
+ }
2347
+ }
2348
+ `;var Gs=_graphqlrequest.gql`
2349
+ query TranscendCliActions($first: Int!, $offset: Int!) {
2350
+ actions(
2351
+ first: $first
2352
+ offset: $offset
2353
+ useMaster: false
2354
+ orderBy: [{ field: type, direction: ASC }]
2355
+ ) {
2356
+ nodes {
2357
+ id
2358
+ type
2359
+ skipSecondaryIfNoFiles
2360
+ skipDownloadableStep
2361
+ requiresReview
2362
+ regionList
2363
+ regionDetectionMethod
2364
+ waitingPeriod
2365
+ }
2366
+ }
2367
+ }
2368
+ `,Ns= exports.ub =_graphqlrequest.gql`
2369
+ mutation TranscendCliUpdateAction($input: UpdateActionInput!) {
2370
+ updateAction(input: $input) {
2371
+ clientMutationId
2372
+ }
2373
+ }
2374
+ `;var Ms=_graphqlrequest.gql`
2375
+ query TranscendCliGlobalActionItems(
2376
+ $first: Int!
2377
+ $offset: Int!
2378
+ $filterBy: GlobalActionItemFiltersInput!
2379
+ ) {
2380
+ globalActionItems(first: $first, offset: $offset, filterBy: $filterBy) {
2381
+ nodes {
2382
+ ids
2383
+ count
2384
+ teams {
2385
+ id
2386
+ name
2387
+ }
2388
+ customerExperienceActionItemIds
2389
+ users {
2390
+ id
2391
+ email
2392
+ }
2393
+ collections {
2394
+ title
2395
+ id
2396
+ }
2397
+ dueDate
2398
+ priority
2399
+ titles
2400
+ resolved
2401
+ notes
2402
+ links
2403
+ type
2404
+ additionalContexts {
2405
+ iconOverride
2406
+ requestId
2407
+ dataSiloId
2408
+ requestType
2409
+ latestAirgapVersion
2410
+ parentTitle
2411
+ }
2412
+ attributeValues {
2413
+ name
2414
+ attributeKey {
2415
+ name
2416
+ }
2417
+ }
2418
+ }
2419
+ }
2420
+ }
2421
+ `,Fs= exports.wb =_graphqlrequest.gql`
2422
+ mutation TranscendCliUpdateActionItems($input: UpdateActionItemsInput!) {
2423
+ updateActionItems(input: $input) {
2424
+ clientMutationId
2425
+ }
2426
+ }
2427
+ `,Us= exports.xb =_graphqlrequest.gql`
2428
+ mutation TranscendCliCreateActionItems($input: [CreateActionItemsInput!]!) {
2429
+ createActionItems(input: $input) {
2430
+ clientMutationId
2431
+ }
2432
+ }
2433
+ `;var Qs=_graphqlrequest.gql`
2434
+ query TranscendCliFetchPrivacyCenterId($url: String!) {
2435
+ privacyCenter(lookup: { url: $url }) {
2436
+ id
2437
+ }
2438
+ }
2439
+ `,Bs= exports.zb =_graphqlrequest.gql`
2440
+ query TranscendCliDeployedPrivacyCenterUrl {
2441
+ organization {
2442
+ deployedPrivacyCenterUrl
2443
+ }
2444
+ }
2445
+ `,Vs= exports.Ab =_graphqlrequest.gql`
2446
+ query TranscendCliFetchPrivacyCenters($url: String!) {
2447
+ privacyCenter(lookup: { url: $url }) {
2448
+ id
2449
+ url
2450
+ isDisabled
2451
+ showPrivacyRequestButton
2452
+ showPolicies
2453
+ showTrackingTechnologies
2454
+ showCookies
2455
+ showDataFlows
2456
+ showConsentManager
2457
+ showManageYourPrivacy
2458
+ showMarketingPreferences
2459
+ locales
2460
+ defaultLocale
2461
+ preferBrowserDefaultLocale
2462
+ supportEmail
2463
+ replyToEmail
2464
+ useNoReplyEmailAddress
2465
+ useCustomEmailDomain
2466
+ transformAccessReportJsonToCsv
2467
+ themeStr
2468
+ }
2469
+ }
2470
+ `,Ks= exports.Bb =_graphqlrequest.gql`
2471
+ mutation TranscendCliUpdatePrivacyCenter($input: UpdatePrivacyCenterInput!) {
2472
+ updatePrivacyCenter(input: $input) {
2473
+ clientMutationId
2474
+ }
2475
+ }
2476
+ `;var ei=_graphqlrequest.gql`
2477
+ mutation TranscendCliDetermineLoginMethod($email: String!) {
2478
+ determineLoginMethod(input: { email: $email }) {
2479
+ loginMethod {
2480
+ email
2481
+ sombraPublicKey
2482
+ }
2483
+ }
2484
+ }
2485
+ `,js= exports.Db =_graphqlrequest.gql`
2486
+ mutation TranscendCliLogin(
2487
+ $email: String!
2488
+ $password: String!
2489
+ $publicKey: String!
2490
+ ) {
2491
+ login(
2492
+ input: { email: $email, password: $password }
2493
+ publicKey: $publicKey
2494
+ ) {
2495
+ user {
2496
+ roles {
2497
+ id
2498
+ organization {
2499
+ name
2500
+ id
2501
+ uri
2502
+ parentOrganizationId
2503
+ }
2504
+ }
2505
+ }
2506
+ }
2507
+ }
2508
+ `,Ys= exports.Eb =_graphqlrequest.gql`
2509
+ mutation TranscendCliAssumeRole($id: ID!, $publicKey: String!) {
2510
+ assumeRole(id: $id, publicKey: $publicKey) {
2511
+ clientMutationId
2512
+ }
2513
+ }
2514
+ `;var Lg=_graphqlrequest.gql`
2515
+ query TranscendCliLargeLanguageModels(
2516
+ $first: Int!
2517
+ $offset: Int!
2518
+ $filterBy: LargeLanguageModelFiltersInput
2519
+ ) {
2520
+ largeLanguageModels(
2521
+ first: $first
2522
+ orderBy: [
2523
+ { field: name, direction: ASC }
2524
+ { field: client, direction: ASC }
2525
+ { field: isTranscendHosted, direction: ASC }
2526
+ ]
2527
+ offset: $offset
2528
+ filterBy: $filterBy
2529
+ ) {
2530
+ nodes {
2531
+ id
2532
+ name
2533
+ client
2534
+ isTranscendHosted
2535
+ }
2536
+ }
2537
+ }
2538
+ `;var Zs=_graphqlrequest.gql`
2539
+ query TranscendCliAgents(
2540
+ $first: Int!
2541
+ $offset: Int!
2542
+ $filterBy: AgentFiltersInput
2543
+ ) {
2544
+ agents(
2545
+ first: $first
2546
+ offset: $offset
2547
+ filterBy: $filterBy
2548
+ orderBy: [
2549
+ { field: createdAt, direction: ASC }
2550
+ { field: name, direction: ASC }
2551
+ ]
2552
+ ) {
2553
+ nodes {
2554
+ id
2555
+ name
2556
+ agentId
2557
+ instructions
2558
+ description
2559
+ codeInterpreterEnabled
2560
+ retrievalEnabled
2561
+ prompt {
2562
+ title
2563
+ }
2564
+ largeLanguageModel {
2565
+ name
2566
+ client
2567
+ }
2568
+ teams {
2569
+ name
2570
+ }
2571
+ owners {
2572
+ email
2573
+ }
2574
+ agentFunctions {
2575
+ name
2576
+ }
2577
+ agentFiles {
2578
+ name
2579
+ }
2580
+ }
2581
+ }
2582
+ }
2583
+ `,zs= exports.Hb =_graphqlrequest.gql`
2584
+ mutation TranscendCliCreateAgent($input: CreateAgentInput!) {
2585
+ createAgent(input: $input) {
2586
+ agent {
2587
+ id
2588
+ name
2589
+ agentId
2590
+ }
2591
+ }
2592
+ }
2593
+ `,Ws= exports.Ib =_graphqlrequest.gql`
2594
+ mutation TranscendCliUpdateAgents($input: UpdateAgentsInput!) {
2595
+ updateAgents(input: $input) {
2596
+ clientMutationId
2597
+ }
2598
+ }
2599
+ `;var Hs=_graphqlrequest.gql`
2600
+ query TranscendCliAgentFiles(
2601
+ $first: Int!
2602
+ $offset: Int!
2603
+ $filterBy: AgentFileFiltersInput
2604
+ ) {
2605
+ agentFiles(
2606
+ first: $first
2607
+ offset: $offset
2608
+ filterBy: $filterBy
2609
+ orderBy: [
2610
+ { field: createdAt, direction: ASC }
2611
+ { field: name, direction: ASC }
2612
+ ]
2613
+ ) {
2614
+ nodes {
2615
+ id
2616
+ name
2617
+ description
2618
+ fileId
2619
+ size
2620
+ purpose
2621
+ initialFileName
2622
+ }
2623
+ }
2624
+ }
2625
+ `,Js= exports.Kb =_graphqlrequest.gql`
2626
+ mutation TranscendCliCreateAgentFile($input: CreateAgentFileInput!) {
2627
+ createAgentFile(input: $input) {
2628
+ agentFile {
2629
+ id
2630
+ name
2631
+ fileId
2632
+ initialFileName
2633
+ }
2634
+ }
2635
+ }
2636
+ `,Xs= exports.Lb =_graphqlrequest.gql`
2637
+ mutation TranscendCliUpdateAgentFiles($input: UpdateAgentFilesInput!) {
2638
+ updateAgentFiles(input: $input) {
2639
+ clientMutationId
2640
+ }
2641
+ }
2642
+ `;var ea=_graphqlrequest.gql`
2643
+ query TranscendCliAgentFunctions($first: Int!, $offset: Int!) {
2644
+ agentFunctions(
2645
+ first: $first
2646
+ offset: $offset
2647
+ orderBy: [
2648
+ { field: createdAt, direction: ASC }
2649
+ { field: name, direction: ASC }
2650
+ ]
2651
+ ) {
2652
+ nodes {
2653
+ id
2654
+ name
2655
+ description
2656
+ parameters
2657
+ }
2658
+ }
2659
+ }
2660
+ `,ta= exports.Nb =_graphqlrequest.gql`
2661
+ mutation TranscendCliCreateAgentFunction($input: CreateAgentFunctionInput!) {
2662
+ createAgentFunction(input: $input) {
2663
+ agentFunction {
2664
+ id
2665
+ name
2666
+ }
2667
+ }
2668
+ }
2669
+ `,ra= exports.Ob =_graphqlrequest.gql`
2670
+ mutation TranscendCliUpdateAgentFunctions(
2671
+ $input: UpdateAgentFunctionsInput!
2672
+ ) {
2673
+ updateAgentFunctions(input: $input) {
2674
+ clientMutationId
2675
+ }
2676
+ }
2677
+ `;var ia=_graphqlrequest.gql`
2678
+ query TranscendCliVendors($first: Int!, $offset: Int!) {
2679
+ vendors(
2680
+ first: $first
2681
+ offset: $offset
2682
+ useMaster: false
2683
+ isExportCsv: true
2684
+ orderBy: [
2685
+ { field: createdAt, direction: ASC }
2686
+ { field: title, direction: ASC }
2687
+ ]
2688
+ ) {
2689
+ nodes {
2690
+ id
2691
+ title
2692
+ description
2693
+ dataProcessingAgreementLink
2694
+ contactName
2695
+ contactEmail
2696
+ contactPhone
2697
+ address
2698
+ headquarterCountry
2699
+ headquarterSubDivision
2700
+ websiteUrl
2701
+ businessEntity {
2702
+ title
2703
+ }
2704
+ teams {
2705
+ name
2706
+ }
2707
+ owners {
2708
+ email
2709
+ }
2710
+ attributeValues {
2711
+ attributeKey {
2712
+ name
2713
+ }
2714
+ name
2715
+ }
2716
+ }
2717
+ }
2718
+ }
2719
+ `,na= exports.Qb =_graphqlrequest.gql`
2720
+ mutation TranscendCliCreateVendor($input: CreateVendorInput!) {
2721
+ createVendor(input: $input) {
2722
+ vendor {
2723
+ id
2724
+ title
2725
+ }
2726
+ }
2727
+ }
2728
+ `,oa= exports.Rb =_graphqlrequest.gql`
2729
+ mutation TranscendCliUpdateVendor($input: UpdateVendorsInput!) {
2730
+ updateVendors(input: $input) {
2731
+ clientMutationId
2732
+ }
2733
+ }
2734
+ `;var sa=_graphqlrequest.gql`
2735
+ query TranscendCliDataSubCategories($first: Int!, $offset: Int!) {
2736
+ dataSubCategories(
2737
+ first: $first
2738
+ offset: $offset
2739
+ isExportCsv: true
2740
+ useMaster: false
2741
+ ) {
2742
+ nodes {
2743
+ id
2744
+ name
2745
+ category
2746
+ description
2747
+ regex
2748
+ teams {
2749
+ name
2750
+ }
2751
+ owners {
2752
+ email
2753
+ }
2754
+ attributeValues {
2755
+ attributeKey {
2756
+ name
2757
+ }
2758
+ name
2759
+ }
2760
+ }
2761
+ }
2762
+ }
2763
+ `,aa= exports.Tb =_graphqlrequest.gql`
2764
+ mutation TranscendCliCreateDataSubCategory(
2765
+ $input: CreateDataInventorySubCategoryInput!
2766
+ ) {
2767
+ createDataSubCategory(input: $input) {
2768
+ dataSubCategory {
2769
+ id
2770
+ name
2771
+ category
2772
+ }
2773
+ }
2774
+ }
2775
+ `,pa= exports.Ub =_graphqlrequest.gql`
2776
+ mutation TranscendCliUpdateDataSubCategories(
2777
+ $input: UpdateDataSubCategoriesInput!
2778
+ ) {
2779
+ updateDataSubCategories(input: $input) {
2780
+ clientMutationId
2781
+ }
2782
+ }
2783
+ `;var la=_graphqlrequest.gql`
2784
+ query TranscendCliProcessingPurposeSubCategories(
2785
+ $first: Int!
2786
+ $offset: Int!
2787
+ ) {
2788
+ processingPurposeSubCategories(
2789
+ first: $first
2790
+ offset: $offset
2791
+ isExportCsv: true
2792
+ useMaster: false
2793
+ ) {
2794
+ nodes {
2795
+ id
2796
+ name
2797
+ purpose
2798
+ description
2799
+ teams {
2800
+ name
2801
+ }
2802
+ owners {
2803
+ email
2804
+ }
2805
+ attributeValues {
2806
+ attributeKey {
2807
+ name
2808
+ }
2809
+ name
2810
+ }
2811
+ }
2812
+ }
2813
+ }
2814
+ `,ca= exports.Wb =_graphqlrequest.gql`
2815
+ mutation TranscendCliCreateProcessingPurposeSubCategory(
2816
+ $input: CreateProcessingPurposeCategoryInput!
2817
+ ) {
2818
+ createProcessingPurposeSubCategory(input: $input) {
2819
+ processingPurposeSubCategory {
2820
+ id
2821
+ name
2822
+ purpose
2823
+ }
2824
+ }
2825
+ }
2826
+ `,ua= exports.Xb =_graphqlrequest.gql`
2827
+ mutation TranscendCliUpdateProcessingPurposeSubCategories(
2828
+ $input: UpdateProcessingPurposeSubCategoriesInput!
2829
+ ) {
2830
+ updateProcessingPurposeSubCategories(input: $input) {
2831
+ clientMutationId
2832
+ }
2833
+ }
2834
+ `;var ma=_graphqlrequest.gql`
2835
+ query TranscendCliProcessingActivities($first: Int!, $offset: Int!) {
2836
+ processingActivities(first: $first, offset: $offset, useMaster: false) {
2837
+ nodes {
2838
+ id
2839
+ title
2840
+ description
2841
+ securityMeasureDetails
2842
+ controllerships
2843
+ storageRegions {
2844
+ countrySubDivision
2845
+ country
2846
+ }
2847
+ transferRegions {
2848
+ countrySubDivision
2849
+ country
2850
+ }
2851
+ retentionType
2852
+ retentionPeriod
2853
+ dataProtectionImpactAssessmentLink
2854
+ dataProtectionImpactAssessmentStatus
2855
+ attributeValues {
2856
+ name
2857
+ attributeKey {
2858
+ name
2859
+ }
2860
+ }
2861
+ dataSilos {
2862
+ title
2863
+ }
2864
+ dataSubjects {
2865
+ type
2866
+ }
2867
+ teams {
2868
+ name
2869
+ }
2870
+ owners {
2871
+ email
2872
+ }
2873
+ processingPurposeSubCategories {
2874
+ name
2875
+ purpose
2876
+ }
2877
+ dataSubCategories {
2878
+ name
2879
+ category
2880
+ }
2881
+ saaSCategories {
2882
+ title
2883
+ }
2884
+ }
2885
+ }
2886
+ }
2887
+ `,da= exports.Zb =_graphqlrequest.gql`
2888
+ mutation TranscendCliCreateProcessingActivity(
2889
+ $input: CreateProcessingActivityInput!
2890
+ ) {
2891
+ createProcessingActivity(input: $input) {
2892
+ processingActivity {
2893
+ id
2894
+ title
2895
+ }
2896
+ }
2897
+ }
2898
+ `,fa= exports._b =_graphqlrequest.gql`
2899
+ mutation TranscendCliUpdateProcessingActivities(
2900
+ $input: UpdateProcessingActivitiesInput!
2901
+ ) {
2902
+ updateProcessingActivities(input: $input) {
2903
+ clientMutationId
2904
+ }
2905
+ }
2906
+ `;var ga=_graphqlrequest.gql`
2907
+ query TranscendSombraVersion {
2908
+ organization {
2909
+ sombra {
2910
+ version
2911
+ }
2912
+ }
2913
+ }
2914
+ `;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 x = _interopRequireWildcard(_iots); var dt = _interopRequireWildcard(_iots); var Ra = _interopRequireWildcard(_iots); var Je = _interopRequireWildcard(_iots); var N = _interopRequireWildcard(_iots); var V = _interopRequireWildcard(_iots); var Re = _interopRequireWildcard(_iots); var se = _interopRequireWildcard(_iots); var $ = _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 =x.type({columnNames:x.partial(_typeutils.applyEnum.call(void 0, It,()=>x.string)),identifierNames:x.record(x.string,x.string),attributeNames:x.record(x.string,x.string),requestTypeToRequestAction:x.record(x.string,_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction)),subjectTypeToSubjectName:x.record(x.string,x.string),languageToLocale:x.record(x.string,_typeutils.valuesOf.call(void 0, _internationalization.LanguageKey)),regionToCountry:x.record(x.string,_typeutils.valuesOf.call(void 0, {..._privacytypes.IsoCountryCode,[Y]:Y})),regionToCountrySubDivision:x.record(x.string,_typeutils.valuesOf.call(void 0, {..._privacytypes.IsoCountrySubdivisionCode,[Y]:Y})),statusToRequestStatus:x.record(x.string,_typeutils.valuesOf.call(void 0, {..._privacytypes.CompletedRequestStatus,[Y]:Y}))}),pr= exports.ic =x.type({id:x.string,link:x.string,rowIndex:x.number,coreIdentifier:x.string,attemptedAt:x.string}),Aa= exports.jc =x.type({failingRequests:x.array(x.record(x.string,x.any)),successfulRequests:x.array(pr),duplicateRequests:x.array(x.type({rowIndex:x.number,coreIdentifier:x.string,attemptedAt:x.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 _chunkTO4YF4PGcjs.j.call(void 0, t.map(r=>r[e]||"").flat())}async function $a(t){let e=_chunkTO4YF4PGcjs.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:_chunkTO4YF4PGcjs.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 _h(t){return _got2.default.extend({prefixUrl:t})}async function Mh(t,{id:e,bundleType:r}){await l(t,Is,{airgapBundleId:e,bundleType:r})}async function Fh(t,{id:e,bundleType:r}){await l(t,As,{airgapBundleId:e,bundleType:r})}async function Kh(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 xe(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 xC(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 xe(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 xe(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 Le(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 KA=N.intersection([N.type({id:N.string,createdAt:N.string,email:N.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction),link:N.string,isSilent:N.boolean,origin:_typeutils.valuesOf.call(void 0, _privacytypes.RequestOrigin),isTest:N.boolean,coreIdentifier:N.string,details:N.string,locale:_typeutils.valuesOf.call(void 0, _internationalization.LanguageKey),status:_typeutils.valuesOf.call(void 0, _privacytypes.RequestStatus),subjectType:N.string,country:N.union([N.null,_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode)]),countrySubDivision:N.union([N.null,_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode)]),attributeValues:N.array(N.type({id:N.string,attributeKey:N.type({name:N.string,id:N.string}),name:N.string}))}),N.partial({daysRemaining:N.union([N.null,N.number])})]),Er=50;async function pe(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),y=[],g=0,I=!1;do{let{requests:{nodes:C,totalCount:k}}=await l(t,co,{first:Er,offset:g,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}});g===0&&k>Er&&(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Fetching ${k} requests`)),f.start(k,0)),y.push(...C),g+=Er,f.update(g),I=C.length===Er}while(I);f.stop();let S=new Date().getTime()-m;_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Completed fetching of ${y.length} request in "${S/1e3}" seconds.`));let v=y;return d&&d.length>0&&(v=v.filter(C=>d.includes(C.id)),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Filtered down to ${v.length} requests based on ${d.length} provided IDs.`))),v}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 JA(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,Yc="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=_chunkTO4YF4PGcjs.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=_chunkTO4YF4PGcjs.e.call(void 0, p,"title"),u=_chunkTO4YF4PGcjs.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: ${Yc}`)),process.exit(1)),c}var _i=100;async function zc(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 uI(t){let e=await zc(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=_chunkTO4YF4PGcjs.j.call(void 0, [..._chunkTO4YF4PGcjs.a.call(void 0, t.map(d=>d["data-subjects"]||[])||[]),..._chunkTO4YF4PGcjs.a.call(void 0, _nullishCoalesce(r.map(({dataSubjectTypes:d})=>_nullishCoalesce(d, () => ([]))), () => ([]))),..._chunkTO4YF4PGcjs.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=_chunkTO4YF4PGcjs.e.call(void 0, p,"type"),u=_chunkTO4YF4PGcjs.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=_chunkTO4YF4PGcjs.e.call(void 0, s,"name"),p=_chunkTO4YF4PGcjs.j.call(void 0, [..._chunkTO4YF4PGcjs.a.call(void 0, t.map(u=>[u["input-identifier"],...u["output-identifiers"]])),..._chunkTO4YF4PGcjs.a.call(void 0, e.map(u=>u["identity-keys"])),...r.map(({name:u})=>u)]).filter(u=>!!u),c=_chunkTO4YF4PGcjs.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 _I(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 MI(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 jI(t,{dataSiloId:e}){let{listReducedRequestsForDataSilo:{totalCount:r}}=await l(t,Go,{input:{dataSiloId:e,isResolved:!1}});return r}async function WI(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 eS(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 tS(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 oS(t,e){let{createApiKey:{apiKey:r}}=await l(t,Vn,{input:e});return r}async function sS(t,e){await l(t,Kn,{id:e})}var tu=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),V.literal(_privacytypes.ComparisonOperator.IsShown)]),comparisonOperands:V.array(V.string)}),ru= exports.Ld =V.type({dependsOnQuestionReferenceId:V.string,comparisonOperator:V.literal(_privacytypes.ComparisonOperator.IsNotShown)}),Ja= exports.Md =V.union([tu,ru]),iu= exports.Nd =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)})])),nu= exports.Od =V.partial({action:_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentsDisplayLogicAction),rule:Ja,nestedRule:iu});function ji(t){return _typeutils.decodeCodec.call(void 0, nu,t)}var pu=Re.intersection([Re.partial({riskAssignment:Re.partial({riskLevelId:Re.string,riskMatrixRowId:Re.string,riskMatrixColumnId:Re.string})}),Re.type({comparisonOperands:Re.array(Re.string),comparisonOperator:_typeutils.valuesOf.call(void 0, _privacytypes.ComparisonOperator)})]);function Yi(t){return _typeutils.decodeCodec.call(void 0, pu,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 cu(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 _chunkTO4YF4PGcjs.g.call(void 0, s,"name")}async function uu(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 cu(t,d.id,{pageSize:1e3,debug:r,includeGuessedCategories:s});o.push({...d,subDataPoints:m.sort((f,y)=>f.name.localeCompare(y.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 y=await uu(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,y])}),_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=_chunkTO4YF4PGcjs.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=_chunkTO4YF4PGcjs.b.call(void 0, u,Zi);await _bluebird.mapSeries.call(void 0, S,async v=>{let{createDataSilos:{dataSilos:C}}=await l(e,wn,{input:v.map(k=>({name:k["outer-type"]||k.integrationName,title:k.title,country:k.country,countrySubDivision:k.countrySubDivision}))});C.forEach(k=>{c[k.title]=k})}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created "${u.length}" data silos!`))}let d=_chunkTO4YF4PGcjs.b.call(void 0, t,Zi);await _bluebird.mapSeries.call(void 0, d,async(S,v)=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`[Batch ${v+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 ${v+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),y=t.map(({datapoints:S=[]})=>S.length).reduce((S,v)=>S+v,0);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${y}" datapoints from "${f.length}" data silos...`)),m.start(y,0);let g=0;await _bluebird.map.call(void 0, f,async({datapoints:S,title:v})=>{S&&await _bluebird.mapSeries.call(void 0, S,async C=>{let k=C.fields?C.fields.map(({key:H,description:ce,categories:le,purposes:J,attributes:he,...Ce})=>({name:H,description:ce,categories:le?le.map(ae=>({...ae,name:ae.name||"Other"})):void 0,purposes:J?J.map(ae=>({...ae,name:ae.name||"Other"})):void 0,attributes:he,accessRequestVisibilityEnabled:Ce["access-request-visibility-enabled"],erasureRequestRedactionEnabled:Ce["erasure-request-redaction-enabled"]})):void 0,W={dataSiloId:c[v].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,ce])=>({requestType:H,suggestedQuery:ce})):void 0,enabledActions:C["privacy-actions"]||[],subDataPoints:k},K=(W.subDataPoints||[]).map(({name:H})=>H),oe=K.filter((H,ce)=>K.indexOf(H)!==ce);if(oe.length>0)_chunkZUNVPK23cjs.a.info(_colors2.default.red(`
2915
+ Cannot update datapoint "${C.key}" as it has duplicate sub-datapoints with the same name:
2916
+ ${oe.join(`
2917
+ `)}`)),s=!0;else try{await l(e,En,W)}catch(H){_chunkZUNVPK23cjs.a.info(_colors2.default.red(`
2918
+ Failed to update datapoint "${C.key}" for data silo "${v}"! -
2919
+ ${H.message}`)),s=!0}g+=1,m.update(g)})},{concurrency:10}),m.stop();let E=new Date().getTime()-o;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${t.length}" data silos and "${y}" datapoints in "${E/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=_chunkTO4YF4PGcjs.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 xe(t),n=!1,i=await zt(t),s=_chunkTO4YF4PGcjs.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 hu=["dataSilos","enrichers","templates","apiKeys"];async function _T(t,{dataSiloIds:e,integrationNames:r,debug:n,resources:i=hu,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,y,g,I,E,S,v,C,k,W,K,oe,H,ce,le,J,he,Ce,ae,ue,be,Ge,ve,Te,Ae,Ee,Ze,A,_,me,de]=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=_chunkTO4YF4PGcjs.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}))),A.length>0&&i.includes("partitions")&&(U.partitions=A.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:oe.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}))}),_.length>0&&i.includes("assessments")&&(U.assessments=_.map(({title:h,assessmentGroup:T,sections:R,creator:b,description:w,status:D,assignees:L,externalAssignees:O,reviewers:B,isLocked:Q,isArchived:X,isExternallyCreated:j,dueDate:M,createdAt:fe,assignedAt:ke,submittedAt:Ne,approvedAt:Me,rejectedAt:Fe,titleIsInternal:ne,retentionSchedule:Pe,attributeValues:ze,resources:Ut,syncedRows:at})=>({title:h,group:T.title,sections:R.map(({title:Ie,status:Ue,questions:we,assignees:q,isReviewed:G,externalAssignees:ge})=>({title:Ie,status:Ue,questions:we.map(({title:pt,type:Nr,subType:$e,placeholder:De,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 _e=yn?ji(yn):void 0;return{title:pt,type:Nr,"sub-type":$e,placeholder:De,description:lt,"is-required":Ql,"reference-id":Bl,"display-logic":_e&&Object.keys(_e).length>0?{action:_e.action,rule:_e.rule?{"depends-on-question-reference-id":_e.rule.dependsOnQuestionReferenceId,"comparison-operator":_e.rule.comparisonOperator,"comparison-operands":"comparisonOperands"in _e.rule?_e.rule.comparisonOperands:void 0}:void 0,"nested-rule":_e.nestedRule?{"logic-operator":_e.nestedRule.logicOperator,rules:(_e.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":Vl.map(qe=>{let Mr=Yi(qe);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:qe})=>qe),"risk-framework":_optionalChain([jl, 'optionalAccess', _23 => _23.title]),"answer-options":Yl.map(({value:qe})=>({value:qe})),"selected-answers":Zl.map(({value:qe})=>qe),"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:q.map(({email:pt})=>pt),"external-assignees":ge.map(({email:pt})=>pt),"is-reviewed":G})),creator:_optionalChain([b, 'optionalAccess', _25 => _25.email]),description:w,status:D,assignees:L.map(({email:Ie})=>Ie),"external-assignees":O.map(({email:Ie})=>Ie),reviewers:B.map(({email:Ie})=>Ie),locked:Q,archived:X,external:j,"title-is-internal":ne,"due-date":M||void 0,"created-at":fe||void 0,"assigned-at":ke||void 0,"submitted-at":Ne||void 0,"approved-at":Me||void 0,"rejected-at":Fe||void 0,"retention-schedule":Pe?{type:Pe.type,"duration-days":Pe.durationDays,operand:Pe.operation}:void 0,attributes:ze!==void 0&&ze.length>0?Le(ze):void 0,resources:Ut.map(({resourceType:Ie,title:Ue,name:we,category:q,type:G,purpose:ge})=>({type:Ie,title:q?`${q} - ${we}`:ge?`${ge} - ${we}`:Ue||we||G||""})),rows:at.map(({resourceType:Ie,title:Ue,name:we,category:q,type:G,purpose:ge})=>({type:Ie,title:q?`${q} - ${we}`:ge?`${ge} - ${we}`:Ue||we||G||""}))}))),me.length>0&&i.includes("assessmentTemplates")&&(U["assessment-templates"]=me.map(({title:h,description:T,sections:R,status:b,source:w,creator:D,isLocked:L,isArchived:O,createdAt:B,retentionSchedule:Q})=>({title:h,description:T,sections:R.map(({title:X,questions:j})=>({title:X,questions:j.map(({title:M,type:fe,subType:ke,placeholder:Ne,description:Me,isRequired:Fe,referenceId:ne,displayLogic:Pe,riskLogic:ze,riskCategories:Ut,riskFramework:at,answerOptions:Ie,allowedMimeTypes:Ue,allowSelectOther:we,syncModel:q,syncColumn:G,attributeKey:ge,requireRiskEvaluation:pt,requireRiskMatrixEvaluation:Nr})=>{let $e=Pe?ji(Pe):void 0;return{title:M,type:fe,"sub-type":ke,placeholder:Ne,description:Me,"is-required":Fe,"reference-id":ne,"display-logic":$e&&Object.keys($e).length>0?{action:$e.action,rule:$e.rule?{"depends-on-question-reference-id":$e.rule.dependsOnQuestionReferenceId,"comparison-operator":$e.rule.comparisonOperator,"comparison-operands":"comparisonOperands"in $e.rule?$e.rule.comparisonOperands:void 0}:void 0,"nested-rule":$e.nestedRule?{"logic-operator":$e.nestedRule.logicOperator,rules:($e.nestedRule.rules||[]).map(De=>({"depends-on-question-reference-id":De.dependsOnQuestionReferenceId,"comparison-operator":De.comparisonOperator,"comparison-operands":"comparisonOperands"in De?De.comparisonOperands:void 0}))}:void 0}:void 0,"risk-logic":ze.map(De=>{let lt=Yi(De);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:De})=>De),"risk-framework":_optionalChain([at, 'optionalAccess', _32 => _32.title]),"answer-options":Ie.map(({value:De})=>({value:De})),"allowed-mime-types":Ue,"allow-select-other":we,"sync-model":q||void 0,"sync-column":G||void 0,"attribute-key":_optionalChain([ge, 'optionalAccess', _33 => _33.name]),"require-risk-evaluation":pt,"require-risk-matrix-evaluation":Nr}})})),status:b,source:w,creator:_optionalChain([D, 'optionalAccess', _34 => _34.email]),locked:L,archived:O,"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}))),ce.length>0&&i.includes("promptPartials")&&(U["prompt-partials"]=ce.map(({title:h,content:T})=>({title:h,content:T}))),le.length>0&&i.includes("promptGroups")&&(U["prompt-groups"]=le.map(({title:h,description:T,prompts:R})=>({title:h,description:T,prompts:R.map(({title:b})=>b)}))),Te.length>0&&i.includes("teams")&&(U.teams=Te.map(({name:h,description:T,ssoDepartment:R,ssoGroup:b,ssoTitle:w,users:D,scopes:L})=>({name:h,description:T,"sso-department":R||void 0,"sso-group":b||void 0,"sso-title":w||void 0,users:D.map(({email:O})=>O),scopes:L.map(({name:O})=>O)}))),d.length>0&&i.includes("dataSubjects")&&(U["data-subjects"]=d.map(({type:h,title:T,active:R,adminDashboardDefaultSilentMode:b,actions:w})=>({type:h,title:_optionalChain([T, 'optionalAccess', _35 => _35.defaultMessage]),active:R,adminDashboardDefaultSilentMode:b,actions:w.map(({type:D})=>D)}))),Ae.length>0&&(U.policies=Ae.map(({title:h,versions:T,disabledLocales:R})=>({title:_optionalChain([h, 'optionalAccess', _36 => _36.defaultMessage]),content:_optionalChain([T, 'optionalAccess', _37 => _37[0], 'optionalAccess', _38 => _38.content, 'optionalAccess', _39 => _39.defaultMessage]),disabledLocales:R}))),Ze.length>0&&(U.messages=Ze.map(({id:h,defaultMessage:T,targetReactIntlId:R,translations:b})=>({id:h,defaultMessage:T,targetReactIntlId:R||void 0,translations:b.reduce((w,{locale:D,value:L})=>Object.assign(w,{[D]:L}),{})}))),Ee.length>0){let h=Ee[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(k.length>0&&i.includes("businessEntities")&&(U["business-entities"]=k.map(({title:h,description:T,address:R,headquarterCountry:b,headquarterSubDivision:w,dataProtectionOfficerName:D,dataProtectionOfficerEmail:L,attributeValues:O})=>({title:h,description:T||void 0,address:R||void 0,headquarterCountry:b||void 0,headquarterSubDivision:w||void 0,dataProtectionOfficerName:D||void 0,dataProtectionOfficerEmail:L||void 0,attributes:O!==void 0&&O.length>0?Le(O):void 0}))),W.length>0&&i.includes("processingActivities")&&(U["processing-activities"]=W.map(({title:h,description:T,securityMeasureDetails:R,controllerships:b,storageRegions:w,transferRegions:D,retentionType:L,retentionPeriod:O,dataProtectionImpactAssessmentLink:B,dataProtectionImpactAssessmentStatus:Q,attributeValues:X,dataSilos:j,dataSubjects:M,teams:fe,owners:ke,processingPurposeSubCategories:Ne,dataSubCategories:Me,saaSCategories:Fe})=>({title:h,description:T,securityMeasureDetails:_nullishCoalesce(R, () => (void 0)),controllerships:b.length>0?b:void 0,storageRegions:w.length>0?Ji(w):void 0,transferRegions:D.length>0?Ji(D):void 0,retentionType:L,retentionPeriod:L===_privacytypes.RetentionType.StatedPeriod?O:void 0,dataProtectionImpactAssessmentLink:_nullishCoalesce(B, () => (void 0)),dataProtectionImpactAssessmentStatus:Q,attributes:X!==void 0&&X.length>0?Le(X):void 0,dataSiloTitles:j.length>0?j.map(({title:ne})=>ne):void 0,dataSubjectTypes:M.length>0?M.map(({type:ne})=>ne):void 0,teamNames:fe.length>0?fe.map(({name:ne})=>ne):void 0,ownerEmails:ke.length>0?ke.map(({email:ne})=>ne):void 0,processingSubPurposes:Ne.length>0?Ne.map(({name:ne,purpose:Pe})=>({purpose:Pe,...ne?{name:ne}:{}})):void 0,dataSubCategories:Me.length>0?Me.map(({name:ne,category:Pe})=>({category:Pe,...ne?{name:ne}:{}})):void 0,saaSCategories:Fe.length>0?Fe.map(({title:ne})=>ne):void 0}))),C.length>0&&i.includes("actions")&&(U.actions=C.map(({type:h,skipSecondaryIfNoFiles:T,skipDownloadableStep:R,requiresReview:b,regionList:w,regionDetectionMethod:D,waitingPeriod:L})=>({type:h,...h===_privacytypes.RequestAction.Erasure?{skipSecondaryIfNoFiles:T,skipDownloadableStep:R}:{},requiresReview:b,waitingPeriod:L,regionDetectionMethod:D,regionList:w.length>0?w:void 0}))),v.length>0&&i.includes("identifiers")&&(U.identifiers=v.map(({name:h,type:T,regex:R,selectOptions:b,privacyCenterVisibility:w,isRequiredInForm:D,placeholder:L,displayTitle:O,dataSubjects:B,displayDescription:Q,displayOrder:X,isUniqueOnPreferenceStore:j})=>({name:h,type:T,regex:R,selectOptions:b.length>0?b:void 0,privacyCenterVisibility:w.length>0?w:void 0,isRequiredInForm:D,placeholder:L||void 0,dataSubjects:B.length>0?B.map(({type:M})=>M):void 0,displayTitle:_optionalChain([O, '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:R,instructions:b,codeInterpreterEnabled:w,retrievalEnabled:D,prompt:L,largeLanguageModel:O,teams:B,owners:Q,agentFunctions:X,agentFiles:j})=>({name:h,agentId:T,description:R||void 0,instructions:b,codeInterpreterEnabled:w,retrievalEnabled:D,prompt:_optionalChain([L, 'optionalAccess', _42 => _42.title]),"large-language-model":{name:O.name,client:O.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}))),Ge.length>0&&i.includes("actionItems")&&(U["action-items"]=Ge.map(({teams:h,users:T,customerExperienceActionItemIds:[R],dueDate:b,priority:w,resolved:D,collections:L,notes:O,link:B,title:Q,type:X,attributeValues:j})=>({teams:h.map(({name:M})=>M),users:T.map(({email:M})=>M),dueDate:b||void 0,title:Q,notes:O,customerExperienceActionItemId:R,collections:L.map(({title:M})=>M),link:B,priority:w||void 0,resolved:D,type:X,attributes:j!==void 0&&j.length>0?Le(j):void 0}))),ve.length>0&&i.includes("actionItemCollections")&&(U["action-item-collections"]=ve.map(({title:h,description:T,hidden:R,productLine:b})=>({title:h,description:T||void 0,hidden:R,productLine:b}))),he.length>0&&i.includes("agentFunctions")&&(U["agent-functions"]=he.map(({name:h,description:T,parameters:R})=>({name:h,description:T,parameters:JSON.stringify(R)}))),Ce.length>0&&i.includes("agentFiles")&&(U["agent-files"]=Ce.map(({name:h,description:T,fileId:R,size:b,purpose:w})=>({name:h,description:T,fileId:R,size:b,purpose:w}))),ae.length>0&&i.includes("vendors")&&(U.vendors=ae.map(({title:h,description:T,dataProcessingAgreementLink:R,contactName:b,contactPhone:w,address:D,headquarterCountry:L,headquarterSubDivision:O,websiteUrl:B,businessEntity:Q,teams:X,owners:j,attributeValues:M})=>({title:h,description:T||void 0,dataProcessingAgreementLink:R||void 0,contactName:b||void 0,contactPhone:w||void 0,address:D||void 0,headquarterCountry:L||void 0,headquarterSubDivision:O||void 0,websiteUrl:B||void 0,businessEntity:_optionalChain([Q, 'optionalAccess', _43 => _43.title]),teams:X&&X.length>0?X.map(({name:fe})=>fe):void 0,owners:j&&j.length>0?j.map(({email:fe})=>fe):void 0,attributes:M!==void 0&&M.length>0?Le(M):void 0}))),ue.length>0&&i.includes("dataCategories")&&(U["data-categories"]=ue.map(({name:h,category:T,description:R,regex:b,owners:w,teams:D,attributeValues:L})=>({name:h,category:T,description:R||void 0,regex:b||void 0,owners:w&&w.length>0?w.map(({email:O})=>O):void 0,teams:D&&D.length>0?D.map(({name:O})=>O):void 0,attributes:L!==void 0&&L.length>0?Le(L):void 0}))),be.length>0&&i.includes("processingPurposes")&&(U["processing-purposes"]=be.map(({name:h,purpose:T,description:R,owners:b,teams:w,attributeValues:D})=>({name:h,purpose:T,description:R||void 0,owners:b&&b.length>0?b.map(({email:L})=>L):void 0,teams:w&&w.length>0?w.map(({name:L})=>L):void 0,attributes:D!==void 0&&D.length>0?Le(D):void 0}))),g.length>0&&i.includes("dataFlows")&&(U["data-flows"]=g.map(({value:h,type:T,description:R,trackingType:b,service:w,status:D,owners:L,teams:O,attributeValues:B})=>({value:h,type:T,description:R||void 0,trackingPurposes:b,status:D,service:_optionalChain([w, 'optionalAccess', _44 => _44.integrationName]),owners:L.map(({email:Q})=>Q),teams:O.map(({name:Q})=>Q),attributes:B!==void 0&&B.length>0?Le(B):void 0}))),I.length>0&&i.includes("cookies")&&(U.cookies=I.map(({name:h,isRegex:T,description:R,trackingPurposes:b,service:w,status:D,owners:L,teams:O,attributeValues:B})=>({name:h,isRegex:T,description:R||void 0,trackingPurposes:b,status:D,service:_optionalChain([w, 'optionalAccess', _45 => _45.integrationName]),owners:L.map(({email:Q})=>Q),teams:O.map(({name:Q})=>Q),attributes:B!==void 0&&B.length>0?Le(B):void 0}))),E.length>0&&i.includes("customFields")&&(U.attributes=E.map(({description:h,name:T,type:R,values:b,enabledOn:w=[]})=>({description:h||void 0,resources:w,name:T,type:R,values:b.map(({name:D,color:L,description:O})=>({name:D,color:L||void 0,description:O}))}))),de.length>0&&(U.purposes=de.map(({name:h,description:T,trackingType:R,defaultConsent:b,configurable:w,showInConsentManager:D,isActive:L,displayOrder:O,optOutSignals:B,authLevel:Q,topics:X,showInPrivacyCenter:j,title:M})=>({name:h,title:M,description:T||void 0,trackingType:R,"default-consent":b,configurable:w,"show-in-consent-manager":D,"show-in-privacy-center":j,"is-active":L,"display-order":O,"opt-out-signals":B.length>0?B:void 0,"auth-level":Q||void 0,"preference-topics":X.map(({title:fe,type:ke,displayDescription:Ne,defaultConfiguration:Me,showInPrivacyCenter:Fe,preferenceOptionValues:ne})=>({title:fe.defaultMessage,type:ke,description:Ne.defaultMessage,"default-configuration":Me,"show-in-privacy-center":Fe,...ne.length>0?{options:ne.map(({title:Pe,slug:ze})=>({title:Pe.defaultMessage,slug:ze}))}:{}}))}))),e.length===0&&S.length>0&&i.includes("templates")&&(U.templates=S.map(({title:h})=>({title:h}))),y.length>0&&i.includes("enrichers")&&(U.enrichers=y.map(({title:h,url:T,type:R,inputIdentifier:b,identifiers:w,actions:D,testRegex:L,dataSubjects:O,expirationDuration:B,lookerQueryTitle:Q,transitionRequestStatus:X,phoneNumbers:j,regionList:M})=>({title:h,url:T||void 0,type:R,"input-identifier":_optionalChain([b, 'optionalAccess', _46 => _46.name]),"output-identifiers":w.map(({name:fe})=>fe),"privacy-actions":Object.values(_privacytypes.RequestAction).length===D.length?void 0:D,testRegex:L||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":O.map(({type:fe})=>fe)}))),f.length>0&&i.includes("dataSilos")){let h=_chunkTO4YF4PGcjs.e.call(void 0, d,"type");U["data-silos"]=f.map(([{title:T,description:R,url:b,type:w,outerType:D,apiKeys:L,notifyEmailAddress:O,identifiers:B,dependentDataSilos:Q,owners:X,country:j,countrySubDivision:M,teams:fe,subjectBlocklist:ke,isLive:Ne,promptAVendorEmailSendFrequency:Me,promptAVendorEmailSendType:Fe,promptAVendorEmailIncludeIdentifiersAttachment:ne,promptAVendorEmailCompletionLinkType:Pe,manualWorkRetryFrequency:ze,catalog:Ut,attributeValues:at,discoveredBy:Ie,businessEntities:Ue},we])=>({title:T,description:R,integrationName:w,"outer-type":D||void 0,url:b||void 0,"api-key-title":_optionalChain([L, 'access', _47 => _47[0], 'optionalAccess', _48 => _48.title]),"identity-keys":B.filter(({isConnected:q})=>q).map(({name:q})=>q),...Q.length>0?{"deletion-dependencies":Q.map(({title:q})=>q)}:{},...X.length>0?{owners:X.map(({email:q})=>q)}:{},...fe.length>0?{teams:fe.map(({name:q})=>q)}:{},...Ie.length>0?{discoveredBy:Ie.map(({title:q})=>q)}:{},...Ue.length>0?{businessEntities:Ue.map(({title:q})=>q)}:{},country:j||void 0,countrySubDivision:M||void 0,disabled:!Ne,"data-subjects":ke.length>0?Ya(ke.map(({type:q})=>q),h):void 0,...Ut.hasAvcFunctionality?{"email-settings":{"notify-email-address":O||void 0,"send-frequency":Me,"send-type":Fe,"include-identifiers-attachment":ne,"completion-link-type":Pe,"manual-work-retry-frequency":ze}}:{},attributes:at!==void 0&&at.length>0?Le(at):void 0,datapoints:we.map(q=>({key:q.name,title:_optionalChain([q, 'access', _49 => _49.title, 'optionalAccess', _50 => _50.defaultMessage]),description:_optionalChain([q, 'access', _51 => _51.description, 'optionalAccess', _52 => _52.defaultMessage]),owners:q.owners.map(({email:G})=>G),teams:q.teams.map(({name:G})=>G),...q.path.length>0?{path:q.path}:{},..._optionalChain([q, 'access', _53 => _53.dataCollection, 'optionalAccess', _54 => _54.title])?{"data-collection-tag":q.dataCollection.title.defaultMessage}:{},...q.dbIntegrationQueries.length>0?{"privacy-action-queries":_chunkTO4YF4PGcjs.f.call(void 0, _chunkTO4YF4PGcjs.e.call(void 0, q.dbIntegrationQueries,"requestType"),G=>G.suggestedQuery||G.query||void 0)}:{},...q.subDataPoints.length>0?{fields:q.subDataPoints.map(G=>({key:G.name,description:G.description,purposes:G.purposes,categories:G.categories,...p&&G.pendingCategoryGuesses?{"guessed-categories":G.pendingCategoryGuesses.filter(ge=>ge.status==="PENDING").map(ge=>({category:{name:ge.category.name,category:ge.category.category},status:ge.status,confidence:ge.confidence,classifierVersion:ge.classifierVersion||void 0}))}:{},"access-request-visibility-enabled":G.accessRequestVisibilityEnabled,"erasure-request-redaction-enabled":G.erasureRequestRedactionEnabled,attributes:G.attributeValues!==void 0&&G.attributeValues.length>0?Le(G.attributeValues):void 0})).sort((G,ge)=>G.key.localeCompare(ge.key))}:{},"privacy-actions":q.actionSettings.filter(({active:G})=>G).map(({type:G})=>G)})).sort((q,G)=>[..._nullishCoalesce(q.path, () => ([])),q.key].join(".").localeCompare([..._nullishCoalesce(G.path, () => ([])),G.key].join(".")))}))}return U}async function MT(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 jT(t,e){await l(t,ss,{input:e})}var Iu=[...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?_chunkTO4YF4PGcjs.c.call(void 0, Iu,e.regionBlockList):e.regionList,regionDetectionMethod:e.regionDetectionMethod}})}async function Su(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 Tu(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=_chunkTO4YF4PGcjs.e.call(void 0, n,"title"),s=e.filter(p=>!i[p.title]);await _bluebird.mapSeries.call(void 0, s,async p=>{try{await Su(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 Tu(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 Pu(t,e,r,n={}){let i=_chunkTO4YF4PGcjs.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 Eu(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 Ru({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(g=>g.attributes&&g.attributes.length>0),[i,s,o]=await Promise.all([lr(t),xt(t),n?Et(t):[]]),p=_chunkTO4YF4PGcjs.e.call(void 0, s,"title"),c=_chunkTO4YF4PGcjs.e.call(void 0, i,Ru),u=_chunkTO4YF4PGcjs.e.call(void 0, o,"name"),d=_chunkTO4YF4PGcjs.e.call(void 0, i.filter(g=>!!g.customerExperienceActionItemIds),({customerExperienceActionItemIds:g})=>g[0]),m=_chunkTO4YF4PGcjs.j.call(void 0, e.map(g=>g.collections).flat()).filter(g=>!p[g]);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(g=>!c[gp(g)]&&!d[g.customerExperienceActionItemId]);if(f.length>0)try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating "${f.length}" actionItems...`)),await Pu(t,f,p,u),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created "${f.length}" actionItems!`))}catch(g){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create action items! - ${g.message}`))}let y=e.map(g=>[g,_optionalChain([c, 'access', _57 => _57[gp(g)], 'optionalAccess', _58 => _58.id])||_optionalChain([d, 'access', _59 => _59[g.customerExperienceActionItemId], 'optionalAccess', _60 => _60.id])]).filter(g=>!!g[1]);return await _bluebird.mapSeries.call(void 0, y,async([g,I])=>{try{await Eu(t,g,I,u),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced action item "${g.title}"!`))}catch(E){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync action item "${g.title}"! - ${E.message}`))}}),!r}async function wu(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 $u(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=_chunkTO4YF4PGcjs.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 wu(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 $u(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 Du(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 qu(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=_chunkTO4YF4PGcjs.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 Du(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 qu(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 vu(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 ku(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=_chunkTO4YF4PGcjs.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 vu(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 ku(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=_chunkTO4YF4PGcjs.e.call(void 0, _optionalChain([r, 'optionalAccess', _61 => _61.values])||[],"name"),{existingValues:p=[],newValues:c=[]}=_chunkTO4YF4PGcjs.d.call(void 0, e.values||[],d=>o[d.name]?"existingValues":"newValues"),u=_chunkTO4YF4PGcjs.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 Ou(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 Gu(t,e){let r=_chunkTO4YF4PGcjs.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=_chunkTO4YF4PGcjs.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 Ou(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 Gu(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 Fu=100;async function Uu(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 Qu(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=_chunkTO4YF4PGcjs.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 Uu(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=_chunkTO4YF4PGcjs.b.call(void 0, u,Fu);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 Qu(t,m.map(([{codePackageType:y,...g},I])=>({...g,id:I})));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 Ku=100;async function ju(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 Yu(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=_chunkTO4YF4PGcjs.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 ju(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=_chunkTO4YF4PGcjs.b.call(void 0, u,Ku);return _chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${u.length}" repositories...`)),await _bluebird.mapSeries.call(void 0, d,async m=>{try{let f=await Yu(t,m.map(([y,g])=>({...y,id:g})));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 Wu=100,kt="%%%%";async function Hu(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 Ju(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 YE(t,e,r=20){let n=!1,[i,{softwareDevelopmentKits:s}]=await Promise.all([Ep(t),bp(t,_chunkTO4YF4PGcjs.k.call(void 0, e.map(({type:f,softwareDevelopmentKits:y=[]})=>y.map(({name:g})=>({name:g,codePackageType:f}))).flat(),({name:f,codePackageType:y})=>`${f}${kt}${y}`),r),$p(t,_chunkTO4YF4PGcjs.k.call(void 0, e,"repositoryName").map(({repositoryName:f})=>({name:f,url:`https://github.com/${f}`})))]),o=_chunkTO4YF4PGcjs.e.call(void 0, s,({name:f,codePackageType:y})=>`${f}${kt}${y}`),p=_chunkTO4YF4PGcjs.e.call(void 0, i,({name:f,type:y})=>`${f}${kt}${y}`),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,...y})=>{await Hu(t,{...y,...f?{softwareDevelopmentKitIds:_chunkTO4YF4PGcjs.j.call(void 0, f.map(({name:g})=>{let I=o[`${g}${kt}${y.type}`];if(!I)throw new Error(`Failed to find SDK with name: "${g}"`);return I.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=_chunkTO4YF4PGcjs.b.call(void 0, d,Wu);return await _bluebird.mapSeries.call(void 0, m,async f=>{try{await Ju(t,f.map(([{softwareDevelopmentKits:y,repositoryName:g,...I},E])=>({...I,...y?{softwareDevelopmentKitIds:_chunkTO4YF4PGcjs.j.call(void 0, y.map(({name:S})=>{let v=o[`${S}${kt}${I.type}`];if(!v)throw new Error(`Failed to find SDK with name: "${S}"`);return v.id}))}:{},id:E}))),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated "${f.length}" code packages!`))}catch(y){n=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to update code packages! - ${y.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 em=100;async function tm(t,e){let r=await xe(t);await _bluebird.mapSeries.call(void 0, _chunkTO4YF4PGcjs.b.call(void 0, e,em),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 tm(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 rm(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 im(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=_chunkTO4YF4PGcjs.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 rm(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 im(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 om(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 sm(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=_chunkTO4YF4PGcjs.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 om(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 sm(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 pm=100;async function lm(t,e){let r=await bt(t);await _bluebird.mapSeries.call(void 0, _chunkTO4YF4PGcjs.b.call(void 0, e,pm),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=_chunkTO4YF4PGcjs.e.call(void 0, i,({title:o})=>o.defaultMessage);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Upserting "${e.length}" new policies...`)),await lm(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 um=100;async function mm(t,e){await _bluebird.mapSeries.call(void 0, _chunkTO4YF4PGcjs.b.call(void 0, e,um),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 mm(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 ym(t,e){let r=await gr(t),n=_chunkTO4YF4PGcjs.e.call(void 0, r,"name"),i=await Ir(t),s=_chunkTO4YF4PGcjs.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 y=s[m.trackingType];if(!y)throw new Error(`Invalid purpose trackingType provided at consentManager.experiences[${p}].purposes[${f}]: ${m.trackingType}. See list of valid purposes ${Mp}`);return y.id})]),u=_optionalChain([o, 'access', _76 => _76.optedOutPurposes, 'optionalAccess', _77 => _77.map, 'call', _78 => _78((m,f)=>{let y=s[m.trackingType];if(!y)throw new Error(`Invalid purpose trackingType provided at consentManager.experiences[${p}].optedOutPurposes[${f}]: ${m.trackingType}. See list of valid purposes ${Mp}`);return y.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 xe(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 ym(t,e.experiences),e.theme&&await l(t,$s,{input:{airgapBundleId:r,...e.theme}})}var Bp=100;async function hm(t,e,r=!1){let n=await xe(t);await _bluebird.mapSeries.call(void 0, _chunkTO4YF4PGcjs.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 Cm(t,e,r=!1){let n=await xe(t);await _bluebird.mapSeries.call(void 0, _chunkTO4YF4PGcjs.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 Cm(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 hm(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 Im(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 Sm(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=_chunkTO4YF4PGcjs.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 Im(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 Sm(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 Pm(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 Em(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=_chunkTO4YF4PGcjs.e.call(void 0, s,"title"),p=_chunkTO4YF4PGcjs.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 Pm(t,{...m,promptIds:m.prompts.map(f=>{let y=o[f];if(!y)throw new Error(`Failed to find prompt with title: "${f}"`);return y.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 Em(t,d.map(([{prompts:m,...f},y])=>[{...f,promptIds:m.map(g=>{let I=o[g];if(!I)throw new Error(`Failed to find prompt with title: "${g}"`);return I.id})},y])),_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 bm(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 wm(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=_chunkTO4YF4PGcjs.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 bm(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 wm(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 xm(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 Dm(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=_chunkTO4YF4PGcjs.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 xm(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 Dm(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 Lm(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 vm(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=_chunkTO4YF4PGcjs.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 Lm(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 vm(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 _m(t,e){let r={title:e.title,description:e.description},{createProcessingActivity:n}=await l(t,da,{input:r});return n.processingActivity}async function Om(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=_chunkTO4YF4PGcjs.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 _m(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 Om(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 Jw(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:y,cookies:g,"consent-manager":I,"data-silos":E,"data-flows":S,prompts:v,"prompt-groups":C,"prompt-partials":k,agents:W,"agent-functions":K,"agent-files":oe,vendors:H,"data-categories":ce,"processing-activities":le,"processing-purposes":J,"action-items":he,"action-item-collections":Ce,teams:ae,"privacy-center":ue,messages:be,policies:Ge,partitions:ve}=t,[Te,Ae,Ee]=await Promise.all([y||d?Za(t,e,!n):{},E||m||y||le?Ka(t,e):{},E&&E.map(A=>A["api-key-title"]||[]).reduce((A,_)=>A+_.length,0)>0?wr(t,e):{}]);if(I){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Syncing consent manager..."));try{await Fp(e,I),_chunkZUNVPK23cjs.a.info(_colors2.default.green("Successfully synced consent manager!"))}catch(A){o=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync consent manager! - ${A.message}`))}}if(v){let A=await kp(e,v);o=o||!A}if(k){let A=await Kp(e,k);o=o||!A}if(C){let A=await jp(e,C);o=o||!A}if(ae){let A=await Lp(e,ae);o=o||!A}if(p&&(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${p.length}" email templates...`)),await _bluebird.map.call(void 0, p,async A=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing template "${A.title}"...`));try{await ap(A,e),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced template "${A.title}"!`))}catch(_){o=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync template "${A.title}"! - ${_.message}`))}},{concurrency:Mt}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${p.length}" email templates!`))),f){let A=await Pp(e,f);o=o||!A}if(H){let A=await Yp(e,H);o=o||!A}if(ce){let A=await Zp(e,ce);o=o||!A}if(J){let A=await zp(e,J);o=o||!A}if(ve){let A=await lp(e,ve);o=o||!A}if(W){let A=await Ip(e,W);o=o||!A}if(K){let A=await Ap(e,K);o=o||!A}if(oe){let A=await Cp(e,oe);o=o||!A}if(g){let A=await Dp(e,g);o=o||!A}if(Ce){let A=await fp(e,Ce);o=o||!A}if(c){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${c.length}" attributes...`));let A=await Et(e);await _bluebird.map.call(void 0, c,async _=>{let me=A.find(de=>de.name===_.name);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing attribute "${_.name}"...`));try{await Sp(e,_,{existingAttribute:me,deleteExtraAttributeValues:s}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced attribute "${_.name}"!`))}catch(de){o=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync attribute "${_.name}"! - ${de.message}`))}},{concurrency:Mt}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${c.length}" attributes!`))}if(he){let A=await hp(e,he);o=o||!A}if(y&&(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${y.length}" enrichers...`)),await _bluebird.map.call(void 0, y,async A=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing enricher "${A.title}"...`));try{await sp(e,{enricher:A,identifierByName:Te,dataSubjectsByName:Ae}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced enricher "${A.title}"!`))}catch(_){o=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync enricher "${A.title}"! - ${_.message}`))}},{concurrency:Mt}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${y.length}" enrichers!`))),d&&(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${d.length}" identifiers...`)),await _bluebird.map.call(void 0, d,async A=>{let _=Te[A.name];if(!_)throw new Error(`Failed to find identifier with name: ${A.type}. Should have been auto-created by cli.`);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing identifier "${A.type}"...`));try{await xp(e,{identifier:A,dataSubjectsByName:Ae,identifierId:_.id,skipPublish:!n}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced identifier "${A.type}"!`))}catch(me){o=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync identifier "${A.type}"! - ${me.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 A=await cr(e);await _bluebird.map.call(void 0, u,async _=>{let me=A.find(de=>de.type===_.type);if(!me)throw new Error(`Failed to find action with type: ${_.type}. Should have already existing in the organization.`);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing action "${_.type}"...`));try{await mp(e,{action:_,actionId:me.id,skipPublish:!n}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced action "${_.type}"!`))}catch(de){o=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync action "${_.type}"! - ${de.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 A=await Yt(e);await _bluebird.map.call(void 0, m,async _=>{let me=A.find(de=>de.type===_.type);if(!me)throw new Error(`Failed to find data subject with type: ${_.type}. Should have already existing in the organization.`);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing data subject "${_.type}"...`));try{await vp(e,{dataSubject:_,dataSubjectId:me.id,skipPublish:!n}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced data subject "${_.type}"!`))}catch(de){o=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync data subject "${_.type}"! - ${de.message}`))}},{concurrency:Mt}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${m.length}" data subjects!`))}if(S){let A=await Vp(e,S,i);o=o||!A}if(ue){let A=await Gp(e,ue);o=o||!A}if(be){let A=await Op(e,be);o=o||!A}if(Ge){let A=await _p(e,Ge);o=o||!A}let Ze=[];if(E){let{success:A,dataSiloTitleToId:_}=await ip(E,e,{dataSubjectsByName:Ae,apiKeysByTitle:Ee,pageSize:r});_optionalChain([E, 'optionalAccess', _92 => _92.forEach, 'call', _93 => _93(me=>{me["deletion-dependencies"]&&Ze.push([_[me.title],me["deletion-dependencies"]])})]),o=o||!A}if(Ze.length>0&&await np(e,Ze),le){let A=await Wp(e,le);o=o||!A}return o}var Nm=1e3;async function n$(t,e,r){let n=_chunkTO4YF4PGcjs.b.call(void 0, r,Nm);await _bluebird.mapSeries.call(void 0, n,async i=>{await l(t,Yn,{pluginId:e,rawResults:i})})}async function Wx({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=_chunkTO4YF4PGcjs.r}){let c=Z(p,e),u=new Date().getTime(),d=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),m=await pe(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 I=>{await l(c,At,{input:{id:I.id,isSilent:!0}}),f+=1,d.update(f)},{concurrency:o}),d.stop();let g=new Date().getTime()-u;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully marked ${f} requests as silent mode in "${g/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=_chunkTO4YF4PGcjs.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=I=>r.getValue("columnNames",I)||n[I],{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:I})=>I),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.LanguageKey),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 y=i("countrySubDivision"),g=y===Y?{}:await mt(He(e,y),[...Object.values(_privacytypes.IsoCountrySubdivisionCode),Y],r.getValue("regionToCountrySubDivision"));await r.setValue(g,"regionToCountrySubDivision")}var _iotstypes = require('io-ts-types');var td=se.record(se.string,se.array(se.intersection([se.type({value:se.string}),se.partial({name:se.string})]))),RD= exports.of =se.intersection([se.type({email:se.string,attestedExtraIdentifiers:td,coreIdentifier:se.string,requestType:_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction),subjectType:se.string}),se.partial({country:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode),countrySubDivision:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode),attributes:se.array(Pa),status:_typeutils.valuesOf.call(void 0, _privacytypes.CompletedRequestStatus),createdAt:_iotstypes.DateFromISOString,dataSiloIds:se.array(se.string),locale:_typeutils.valuesOf.call(void 0, _internationalization.LanguageKey)})]);function rd(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(([,y])=>y!==Y).forEach(([y,g])=>{let I=Object.values(_privacytypes.IdentifierType).includes(y)?y:_privacytypes.IdentifierType.Custom,E=c[g];if(E){let S=rd(E,I,o);S&&(u[I]||(u[I]=[]),u[I].push({value:S,name:y}))}});let d=[];Object.entries(i).filter(([,y])=>y!==Y).forEach(([y,g])=>{let I=c[g];if(I){let E=_optionalChain([s, 'access', _94 => _94.find, 'call', _95 => _95(S=>S.name===y), 'optionalAccess', _96 => _96.type])==="MULTI_SELECT";d.push({values:E?li(I):I,key:y})}});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=$.type({defaultMessage:$.string,id:$.string}),ad= exports.sf =$.type({downloadKey:$.string,error:$.union([$.null,$.string]),mimetype:$.string,size:$.string,fileName:$.string,dataPoint:$.type({id:$.string,title:$.union([nl,$.null]),description:$.union([nl,$.null]),name:$.string,slug:$.string,encryption:$.union([_typeutils.valuesOf.call(void 0, _privacytypes.TableEncryptionType),$.null]),dataSilo:$.type({id:$.string,title:$.string,description:$.string,type:$.string,outerType:$.union([$.string,$.null])}),path:$.array($.string)})}),pd= exports.tf =$.type({nodes:$.array(ad),totalCount:$.number,_links:$.partial({next:$.union([$.string,$.null]),previous:$.union([$.string,$.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,y=0;for(;f;){let g;try{let I=await e.get(`v1/data-subject-request/${d.id}/download-keys`,{searchParams:{limit:n,offset:y}}).json();g=_typeutils.decodeCodec.call(void 0, pd,I),m.push(...g.nodes),y+=n,f=!!g._links.next&&g.nodes.length===n}catch(I){throw new Error(`Received an error from server: ${_optionalChain([I, 'optionalAccess', _97 => _97.response, 'optionalAccess', _98 => _98.body])||_optionalChain([I, '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 zD({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=_chunkTO4YF4PGcjs.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 pe(d,{actions:[_privacytypes.RequestAction.Access],createdAtBefore:n,createdAtAfter:s,statuses:o,requestIds:r}),y=await ol(f,{sombra:m,concurrency:p}),g=new Date().getTime(),I=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),E=0,S=0;I.start(f.length,0),await _bluebird.map.call(void 0, y,async([k,W])=>{let K=_path.join.call(void 0, e,k.id);_fs.existsSync.call(void 0, K)||_fs.mkdirSync.call(void 0, K),await sl(W,{sombra:m,requestId:k.id,onFileDownloaded:(oe,H)=>{let ce=_path.join.call(void 0, K,oe.fileName),le=_path.dirname.call(void 0, ce);_fs.existsSync.call(void 0, le)||_fs.mkdirSync.call(void 0, le,{recursive:!0}),_fs.writeFileSync.call(void 0, ce,H)}}),u&&k.status===_privacytypes.RequestStatus.Approving&&(await l(d,nr,{input:{requestId:k.id}}),S+=1),E+=1,I.update(E)},{concurrency:p}),I.stop();let C=new Date().getTime()-g;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully downloaded ${E} 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(y=>y.key===m.key);f?(f.values.push(...m.values),f.values=_chunkTO4YF4PGcjs.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 cq({requestActions:t,requestOrigins:e,auth:r,silentModeBefore:n,createdAtAfter:i,createdAtBefore:s,concurrency:o=50,transcendUrl:p=_chunkTO4YF4PGcjs.r}){let c=Z(p,r),u=new Date().getTime(),d=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),m=await pe(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,y=0;d.start(m.length,0),await _bluebird.map.call(void 0, m,async E=>{n&&new Date(n)>new Date(E.createdAt)&&await l(c,At,{input:{id:E.id,isSilent:!0}});try{await l(c,nr,{input:{requestId:E.id}})}catch(S){S.message.includes("Request must be in an approving state,")&&(y+=1)}f+=1,d.update(f)},{concurrency:o}),d.stop();let I=new Date().getTime()-u;return y>0&&_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`${y} requests were skipped.`)),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully approved ${f} requests in "${I/1e3}" seconds!`)),m.length}async function Aq({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=_chunkTO4YF4PGcjs.r}){let d=Z(u,e),m=new Date().getTime(),f=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),g=(await gt(d,p)).find(C=>C.title===p);if(!g)throw new Error(`Failed to find a template with title: "${p}"`);let I=await pe(d,{actions:t,createdAtBefore:n,createdAtAfter:o,isSilent:!1,isClosed:!1,requestIds:r});I=I.filter(C=>typeof C.daysRemaining=="number"&&C.daysRemaining<s),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Notifying "${I.length}" that more time is needed.`));let E=0;f.start(I.length,0),await _bluebird.map.call(void 0, I,async C=>{await l(d,mo,{input:{requestId:C.id,template:g.template.defaultMessage,subject:g.subject.defaultMessage,additionalTime:i}}),E+=1,f.update(E)},{concurrency:c}),f.stop();let v=new Date().getTime()-m;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully marked ${E} requests as silent mode in "${v/1e3}" seconds!`)),I.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 Gq({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=_chunkTO4YF4PGcjs.r}){let d=Z(u,r),m=new Date().getTime(),f=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),y;if(e){let C=(await gt(d,e)).find(k=>k.title===e);if(!C)throw new Error(`Failed to find a template with title: "${e}"`);y=C}let g=await pe(d,{actions:t,createdAtBefore:s,createdAtAfter:o,statuses:p,requestIds:n});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Canceling "${g.length}" requests${y?` Using template: ${y.title}`:""}.`));let I=0;f.start(g.length,0),await _bluebird.map.call(void 0, g,async v=>{i&&new Date(i)>new Date(v.createdAt)&&await l(d,At,{input:{id:v.id,isSilent:!0}}),await l(d,uo,{input:{requestId:v.id,...y?{subject:`Re: ${y.subject.defaultMessage}`,template:y.template.defaultMessage}:{}}}),I+=1,f.update(I)},{concurrency:c}),f.stop();let S=new Date().getTime()-m;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully canceled ${I} requests in "${S/1e3}" seconds!`)),g.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 lL({cacheFilepath:t,requestReceiptFolder:e,file:r,auth:n,sombraAuth:i,concurrency:s=100,defaultPhoneCountryCode:o="1",transcendUrl:p=_chunkTO4YF4PGcjs.r,attributes:c=[],emailIsVerified:u=!0,skipFilterStep:d=!1,skipSendingReceipt:m=!0,isTest:f=!1,isSilent:y=!0,debug:g=!1,dryRun:I=!1}){let E=new Date().getTime(),S=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),v=Ea(c),C=new (0, _persistedstate.PersistedState)(t,Ca,{columnNames:{},requestTypeToRequestAction:{},subjectTypeToSubjectName:{},languageToLocale:{},statusToRequestStatus:{},identifierNames:{},attributeNames:{},regionToCountrySubDivision:{},regionToCountry:{}}),k=_path.join.call(void 0, e,`tr-request-upload-${new Date().toISOString()}-${r.split("/").pop()}`.replace(".csv",".json")),W=new (0, _persistedstate.PersistedState)(k,Aa,{successfulRequests:[],duplicateRequests:[],failingRequests:[]}),K=await nt(p,n,i),oe=ba(r,Xt.record(Xt.string,Xt.string)),H=_chunkTO4YF4PGcjs.j.call(void 0, oe.map(Te=>Object.keys(Te)).flat());if(oe.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(g){let Te=oe[0];_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`First request: ${JSON.stringify(Te,null,2)}`))}let ce=d?oe:await $a(oe),le=Z(p,n),J=await qa(le),he=await Xp(H,C),Ce=await fl(le,H,C),ae=await hl(le,H,C,J);await el(le,ce,{state:C,columnNameMap:he});let ue=tl(ce,C,{defaultPhoneCountryCode:o,columnNameMap:he,identifierNameMap:Ce,attributeNameMap:ae,requestAttributeKeys:J});g||S.start(ue.length,0);let be=0;await _bluebird.map.call(void 0, ue,async([Te,Ae],Ee)=>{let Ze=g?`email:${Ae.email} | coreIdentifier:${Ae.coreIdentifier}`:`row:${Ee.toString()}`;if(g&&_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`[${Ee+1}/${ue.length}] Importing: ${JSON.stringify(Ae,null,2)}`)),I){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Bailing out on dry run because dryRun is set"));return}try{let A=await cl(K,Ae,{details:`Uploaded by Transcend Cli: "tr-request-upload" : ${JSON.stringify(Te,null,2)}`,isTest:f,emailIsVerified:u,skipSendingReceipt:m,isSilent:y,additionalAttributes:v});g&&(_chunkZUNVPK23cjs.a.info(_colors2.default.green(`[${Ee+1}/${ue.length}] Successfully submitted the test data subject request: "${Ze}"`)),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`[${Ee+1}/${ue.length}] View it at: "${A.link}"`)));let _=W.getValue("successfulRequests");_.push({id:A.id,link:A.link,rowIndex:Ee,coreIdentifier:A.coreIdentifier,attemptedAt:new Date().toISOString()}),await W.setValue(_,"successfulRequests")}catch(A){let _=`${A.message} - ${JSON.stringify(_optionalChain([A, 'access', _110 => _110.response, 'optionalAccess', _111 => _111.body]),null,2)}`,me=_r(_);if(me==="Client error: You have already made this request."){g&&_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`[${Ee+1}/${ue.length}] Skipping request as it is a duplicate`));let de=W.getValue("duplicateRequests");de.push({coreIdentifier:Ae.coreIdentifier,rowIndex:Ee,attemptedAt:new Date().toISOString()}),await W.setValue(de,"duplicateRequests")}else{let de=W.getValue("failingRequests");de.push({...Ae,rowIndex:Ee,error:me||_,attemptedAt:new Date().toISOString()}),await W.setValue(de,"failingRequests"),g&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(me||_)),_chunkZUNVPK23cjs.a.error(_colors2.default.red(`[${Ee+1}/${ue.length}] Failed to submit request for: "${Ze}"`)))}}be+=1,g||S.update(be)},{concurrency:s}),S.stop();let ve=new Date().getTime()-E;_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Completed upload in "${ve/1e3}" seconds.`)),W.getValue("duplicateRequests").length>0&&_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`Encountered "${W.getValue("duplicateRequests").length}" duplicate requests. See "${k}" 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 "${k}" 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, _chunkTO4YF4PGcjs.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 kd=Ye.intersection([pr,Ye.type({error:Ye.string})]),_d=Ye.type({restartedRequests:Ye.array(pr),failingRequests:Ye.array(kd)});async function xL({requestReceiptFolder:t,auth:e,sombraAuth:r,requestActions:n,requestStatuses:i,createdAtBefore:s,createdAtAfter:o,transcendUrl:p=_chunkTO4YF4PGcjs.r,requestIds:c=[],createdAt:u=new Date,silentModeBefore:d,sendEmailReceipt:m=!1,emailIsVerified:f=!0,copyIdentifiers:y=!1,skipWaitingPeriod:g=!1,concurrency:I=20}){let E=new Date().getTime(),S=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),v=_path.join.call(void 0, t,`tr-request-restart-${new Date().toISOString()}`),C=new (0, _persistedstate.PersistedState)(v,_d,{restartedRequests:[],failingRequests:[]}),k=await nt(p,e,r),W=Z(p,e),oe=(await pe(W,{actions:n,statuses:i,createdAtBefore:s,createdAtAfter:o})).filter(J=>new Date(J.createdAt)<u);if(_chunkZUNVPK23cjs.a.info(`Found ${oe.length} requests to process`),y&&_chunkZUNVPK23cjs.a.info("copyIdentifiers detected - All Identifiers will be copied."),m&&_chunkZUNVPK23cjs.a.info("sendEmailReceipt detected - Email receipts will be sent."),g&&_chunkZUNVPK23cjs.a.info("skipWaitingPeriod detected - Waiting period will be skipped."),c.length>0&&c.length!==oe.length){let J=_chunkTO4YF4PGcjs.c.call(void 0, c,oe.map(({id:he})=>he));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(oe.length,0),await _bluebird.map.call(void 0, oe,async(J,he)=>{try{let Ce=y?await Tr(W,k,{requestId:J.id}):[],ae=await Tl(k,{...J,isSilent:d&&new Date(J.createdAt)<d?!0:J.isSilent},{requestIdentifiers:Ce,skipWaitingPeriod:g,sendEmailReceipt:m,emailIsVerified:f}),ue=C.getValue("restartedRequests");ue.push({id:ae.id,link:ae.link,rowIndex:he,coreIdentifier:ae.coreIdentifier,attemptedAt:new Date().toISOString()}),await C.setValue(ue,"restartedRequests")}catch(Ce){let ae=`${Ce.message} - ${JSON.stringify(_optionalChain([Ce, 'access', _112 => _112.response, 'optionalAccess', _113 => _113.body]),null,2)}`,ue=_r(ae),be=C.getValue("failingRequests");be.push({id:J.id,link:J.link,rowIndex:he,coreIdentifier:J.coreIdentifier,attemptedAt:new Date().toISOString(),error:ue||ae}),await C.setValue(be,"failingRequests")}H+=1,S.update(H)},{concurrency:I}),S.stop();let le=new Date().getTime()-E;_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Completed restarting of requests in "${le/1e3}" seconds.`)),C.getValue("failingRequests").length>0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Encountered "${C.getValue("failingRequests").length}" errors. See "${v}" to review the error messages and inputs.`)),process.exit(1))}async function NL({enricherIds:t,auth:e,concurrency:r=100,transcendUrl:n=_chunkTO4YF4PGcjs.r}){let i=Z(n,e),s=new Date().getTime(),o=await pe(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 g=(await Sr(i,{requestId:f.id})).filter(I=>t.includes(I.enricher.id)&&![_privacytypes.RequestEnricherStatus.Resolved,_privacytypes.RequestEnricherStatus.Skipped].includes(I.status));g.length>0&&await _bluebird.mapSeries.call(void 0, g,async I=>{try{await l(i,Ao,{requestEnricherId:I.id}),u+=1}catch(E){if(!E.message.includes("Client error: Cannot skip Request enricher because it has already completed"))throw E}}),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 zL({auth:t,requestActions:e=[],createdAtBefore:r,createdAtAfter:n,transcendUrl:i=_chunkTO4YF4PGcjs.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 pe(m,{actions:e,statuses:[_privacytypes.RequestStatus.Enriching],createdAtBefore:r,createdAtAfter:n,requestIds:o}),y=0;if(o.length>0&&o.length!==f.length){let S=_chunkTO4YF4PGcjs.c.call(void 0, o,f.map(({id:v})=>v));S.length>0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to find the following requests by ID: ${S.join(",")}.`)),process.exit(1))}let g=0;d.start(f.length,0),await _bluebird.map.call(void 0, f,async S=>{let C=(await Sr(m,{requestId:S.id})).filter(k=>k.enricher.id===p&&s.includes(k.status));await _bluebird.map.call(void 0, C,async k=>{await up(m,k.id),y+=1}),g+=1,d.update(g)},{concurrency:c}),d.stop();let E=new Date().getTime()-u;_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Completed restarting of ${f.length} requests and ${y} enrichers in "${E/1e3}" seconds.`))}async function ov({requestActions:t,dataSiloId:e,auth:r,concurrency:n=20,transcendUrl:i=_chunkTO4YF4PGcjs.r}){let s=Z(i,r),o=new Date().getTime(),p=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),c=await pe(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 y=>{try{let g=await Wa(s,{requestId:y.id,dataSiloId:e});await l(s,Oo,{requestDataSiloId:g.id})}catch(g){if(!g.message.includes("Failed to find RequestDataSilo"))throw g;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 gv({auth:t,sombraAuth:e,actions:r=[],statuses:n=[],identifierSearch:i,pageLimit:s=100,transcendUrl:o=_chunkTO4YF4PGcjs.r,createdAtBefore:p,createdAtAfter:c,isTest:u}){let d=Z(o,t),m=await nt(o,t,e),f="";p&&(f+=` before ${p.toISOString()}`),c&&(f+=`${f?", and":""} after ${c.toISOString()}`),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`${r.length>0?`Pulling requests of type "${r.join('" , "')}"`:"Pulling all requests"}${f}`));let y=await pe(d,{actions:r,text:i,statuses:n,createdAtBefore:p,createdAtAfter:c,isTest:u}),g=await _bluebird.map.call(void 0, y,async E=>{let S=await Tr(d,m,{requestId:E.id});return{...E,requestIdentifiers:S}},{concurrency:s});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Pulled ${g.length} requests`));let I=g.map(({attributeValues:E,requestIdentifiers:S,id:v,email:C,type:k,status:W,subjectType:K,details:oe,createdAt:H,country:ce,locale:le,origin:J,countrySubDivision:he,isSilent:Ce,isTest:ae,coreIdentifier:ue,...be})=>({"Request ID":v,"Created At":H,Email:C,"Core Identifier":ue,"Request Type":k,"Data Subject Type":K,Status:W,Country:ce,"Country Sub Division":he,Details:oe,Origin:J,"Silent Mode":Ce,"Is Test Request":ae,Language:le,...be,...Object.entries(_chunkTO4YF4PGcjs.d.call(void 0, E,"attributeKey.name")).reduce((Ge,[ve,Te])=>Object.assign(Ge,{[ve]:Te.map(({name:Ae})=>Ae).join(",")}),{}),...Object.entries(_chunkTO4YF4PGcjs.d.call(void 0, S,"name")).reduce((Ge,[ve,Te])=>Object.assign(Ge,{[ve]:Te.map(({value:Ae})=>Ae).join(",")}),{})}));return{requestsWithRequestIdentifiers:g,requestsFormattedForCsv:I}}async function Ev({dataSiloId:t,auth:e,concurrency:r=50,maxUploadPerChunk:n=5e4,status:i="SKIPPED",transcendUrl:s=_chunkTO4YF4PGcjs.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 g=await Ki(p,{dataSiloId:t,requestStatuses:o,limit:n,onProgress:I=>{m+=I/2,d.update(m)}});await _bluebird.map.call(void 0, g,async I=>{try{await l(p,_o,{requestDataSiloId:I.id,status:i})}catch(E){if(!E.message.includes("Client error: Request must be active:"))throw E}m+=.5,d.update(m)},{concurrency:r})}d.stop();let y=new Date().getTime()-c;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully skipped "${u}" requests in "${y/1e3}" seconds!`)),u}async function kv({requestActions:t,identifierNames:e,auth:r,concurrency:n=20,transcendUrl:i=_chunkTO4YF4PGcjs.r}){let s=Z(i,r),o=new Date().getTime(),p=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),c=await pe(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 y=>{let I=(await Ua(s,{requestId:y.id})).filter(({isVerifiedAtLeastOnce:E,name:S})=>E===!1&&e.includes(S)).map(({id:E})=>E);I.length>0&&(await l(s,Qo,{input:{requestId:y.id,requestIdentifierIds:I}}),d+=I.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 hk({message:t}){let{response:e}=await _inquirer2.default.prompt([{name:"response",message:t,type:"confirm"}]);return e}async function Ck({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 Ak({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 Sk(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', _114 => _114.response, 'optionalAccess', _115 => _115.statusCode]), () => (_optionalChain([e, 'optionalAccess', _116 => _116.response, 'optionalAccess', _117 => _117.status])))}function Ml(t){let e=t,r=_optionalChain([e, 'optionalAccess', _118 => _118.response, 'optionalAccess', _119 => _119.body])||_optionalChain([e, 'optionalAccess', _120 => _120.message])||"Unknown error";try{let n=JSON.parse(r),i=n.errors||_optionalChain([n, 'access', _121 => _121.error, 'optionalAccess', _122 => _122.errors])||[_optionalChain([n, 'access', _123 => _123.error, 'optionalAccess', _124 => _124.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 bk(t){let e=Math.floor(t.length/2);return[t.slice(0,e),t.slice(e)]}async function qk(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 vk(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 Gk(t){try{return t?_fs.readFileSync.call(void 0, t,"utf8"):""}catch (e3){return""}}var Zd=4,zd=["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)),zd.some(p=>o.message.includes(p)))throw o;if(o.message.startsWith("Client error: Too many requests")){let p=_optionalChain([o, 'access', _125 => _125.response, 'access', _126 => _126.headers, 'optionalAccess', _127 => _127.get, 'call', _128 => _128("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 n_(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 = Hd; exports.c = Tn; exports.d = Jd; exports.e = Pn; exports.f = En; exports.g = Xd; exports.h = rf; exports.i = Rn; exports.j = sf; 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 = Bf; 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 = lg; 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 = Lg; 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 = n_; exports.uc = $c; exports.vc = Z; exports.wc = nt; exports.xc = _h; exports.yc = Mh; exports.zc = Fh; exports.Ac = Kh; 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 = xe; exports.Pc = gr; exports.Qc = vc; exports.Rc = xC; 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 = Le; 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 = KA; exports.kd = pe; exports.ld = Rr; exports.md = JA; exports.nd = br; exports.od = Zc; exports.pd = wr; exports.qd = zc; exports.rd = uI; exports.sd = Yt; exports.td = Ka; exports.ud = ja; exports.vd = Ya; exports.wd = $r; exports.xd = xr; exports.yd = $t; exports.zd = _I; exports.Ad = MI; exports.Bd = za; exports.Cd = Ki; exports.Dd = Wa; exports.Ed = jI; exports.Fd = WI; exports.Gd = eS; exports.Hd = tS; exports.Id = oS; exports.Jd = sS; exports.Kd = tu; exports.Ld = ru; exports.Md = Ja; exports.Nd = iu; exports.Od = nu; exports.Pd = ji; exports.Qd = pu; exports.Rd = Yi; exports.Sd = tp; exports.Td = cu; exports.Ud = uu; exports.Vd = rp; exports.Wd = ip; exports.Xd = np; exports.Yd = Wi; exports.Zd = sp; exports._d = gt; exports.$d = ap; exports.ae = zt; exports.be = lp; exports.ce = hu; exports.de = _T; exports.ee = MT; exports.fe = up; exports.ge = jT; exports.he = mp; exports.ie = Su; exports.je = Tu; exports.ke = fp; exports.le = Pu; exports.me = Eu; exports.ne = hp; exports.oe = wu; exports.pe = $u; exports.qe = Cp; exports.re = Du; exports.se = qu; exports.te = Ap; exports.ue = vu; exports.ve = ku; exports.we = Ip; exports.xe = Sp; exports.ye = Ou; exports.ze = Gu; exports.Ae = Pp; exports.Be = Uu; exports.Ce = Qu; exports.De = bp; exports.Ee = ju; exports.Fe = Yu; exports.Ge = $p; exports.He = Hu; exports.Ie = Ju; exports.Je = YE; exports.Ke = ym; exports.Le = Fp; exports.Me = tm; exports.Ne = Dp; exports.Oe = xm; exports.Pe = Dm; exports.Qe = Zp; exports.Re = hm; exports.Se = Cm; exports.Te = Vp; exports.Ue = vp; exports.Ve = xp; exports.We = mm; exports.Xe = Op; exports.Ye = lm; exports.Ze = _p; exports._e = Gp; exports.$e = Wp; exports.af = Lm; exports.bf = vm; exports.cf = zp; exports.df = om; exports.ef = sm; exports.ff = kp; exports.gf = bm; exports.hf = wm; exports.if = Yp; exports.jf = n$; exports.kf = Wx; exports.lf = Xp; exports.mf = el; exports.nf = td; exports.of = RD; exports.pf = rd; exports.qf = tl; exports.rf = nl; exports.sf = ad; exports.tf = pd; exports.uf = ol; exports.vf = sl; exports.wf = zD; exports.xf = ln; exports.yf = cl; exports.zf = cq; exports.Af = Aq; exports.Bf = fl; exports.Cf = Gq; exports.Df = hl; exports.Ef = _r; exports.Ff = lL; exports.Gf = Tl; exports.Hf = xL; exports.If = NL; exports.Jf = zL; exports.Kf = ov; exports.Lf = gv; exports.Mf = Ev; exports.Nf = kv; exports.Of = hk; exports.Pf = Ck; exports.Qf = Ak; exports.Rf = Sk; exports.Sf = Nl; exports.Tf = Ml; exports.Uf = Gr; exports.Vf = bk; exports.Wf = qk; exports.Xf = vk; exports.Yf = Fl; exports.Zf = Gk; exports._f = l; exports.$f = Mi; exports.ag = Za; exports.bg = Jw;
2920
+ //# sourceMappingURL=chunk-BIBIE2IP.cjs.map