@transcend-io/cli 8.1.2 → 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 (111) hide show
  1. package/dist/bin/bash-complete.cjs +1 -1
  2. package/dist/bin/cli.cjs +1 -1
  3. package/dist/bin/deprecated-command.cjs +2 -2
  4. package/dist/{chunk-E3HBS2DS.cjs → chunk-72QC4R7P.cjs} +2 -2
  5. package/dist/{chunk-E3HBS2DS.cjs.map → chunk-72QC4R7P.cjs.map} +1 -1
  6. package/dist/chunk-BIBIE2IP.cjs +2920 -0
  7. package/dist/{chunk-EMB64AC3.cjs.map → chunk-BIBIE2IP.cjs.map} +1 -1
  8. package/dist/{chunk-CVQWA6RN.cjs → chunk-DC2JALFL.cjs} +2 -2
  9. package/dist/{chunk-CVQWA6RN.cjs.map → chunk-DC2JALFL.cjs.map} +1 -1
  10. package/dist/{chunk-CUTZDENX.cjs → chunk-F3MDX5XS.cjs} +20 -20
  11. package/dist/{chunk-CUTZDENX.cjs.map → chunk-F3MDX5XS.cjs.map} +1 -1
  12. package/dist/{chunk-YYYG72XH.cjs → chunk-GGXJ7ADF.cjs} +4 -4
  13. package/dist/{chunk-YYYG72XH.cjs.map → chunk-GGXJ7ADF.cjs.map} +1 -1
  14. package/dist/{chunk-DQ4R65RB.cjs → chunk-MOKWLFGF.cjs} +2 -2
  15. package/dist/{chunk-DQ4R65RB.cjs.map → chunk-MOKWLFGF.cjs.map} +1 -1
  16. package/dist/{chunk-LOWUINKF.cjs → chunk-S7H3R3EJ.cjs} +2 -2
  17. package/dist/{chunk-LOWUINKF.cjs.map → chunk-S7H3R3EJ.cjs.map} +1 -1
  18. package/dist/{chunk-V4GIAIGU.cjs → chunk-S7MCQ2HA.cjs} +3 -3
  19. package/dist/{chunk-V4GIAIGU.cjs.map → chunk-S7MCQ2HA.cjs.map} +1 -1
  20. package/dist/{chunk-4U57O4PS.cjs → chunk-TO4YF4PG.cjs} +2 -2
  21. package/dist/{chunk-4U57O4PS.cjs.map → chunk-TO4YF4PG.cjs.map} +1 -1
  22. package/dist/{chunk-KUOWI5XE.cjs → chunk-TTRWG6N7.cjs} +2 -2
  23. package/dist/{chunk-KUOWI5XE.cjs.map → chunk-TTRWG6N7.cjs.map} +1 -1
  24. package/dist/{chunk-BZI5QRMD.cjs → chunk-UKOA2VXP.cjs} +2 -2
  25. package/dist/{chunk-BZI5QRMD.cjs.map → chunk-UKOA2VXP.cjs.map} +1 -1
  26. package/dist/{chunk-FIPM3WX2.cjs → chunk-WCYLJBE6.cjs} +2 -2
  27. package/dist/{chunk-FIPM3WX2.cjs.map → chunk-WCYLJBE6.cjs.map} +1 -1
  28. package/dist/{impl-OKUMBOKA.cjs → impl-25CYSQ2S.cjs} +2 -2
  29. package/dist/{impl-OKUMBOKA.cjs.map → impl-25CYSQ2S.cjs.map} +1 -1
  30. package/dist/{impl-PERSC7WX.cjs → impl-4PUK52ET.cjs} +2 -2
  31. package/dist/{impl-PERSC7WX.cjs.map → impl-4PUK52ET.cjs.map} +1 -1
  32. package/dist/{impl-VNONBZAR.cjs → impl-5XNZFDPF.cjs} +2 -2
  33. package/dist/{impl-VNONBZAR.cjs.map → impl-5XNZFDPF.cjs.map} +1 -1
  34. package/dist/{impl-L5IP2CI4.cjs → impl-5YC5FIG4.cjs} +2 -2
  35. package/dist/{impl-L5IP2CI4.cjs.map → impl-5YC5FIG4.cjs.map} +1 -1
  36. package/dist/{impl-KL5OOY5U.cjs → impl-6KDOZGUK.cjs} +2 -2
  37. package/dist/{impl-KL5OOY5U.cjs.map → impl-6KDOZGUK.cjs.map} +1 -1
  38. package/dist/{impl-QS3G7FDW.cjs → impl-6WAXJHLE.cjs} +2 -2
  39. package/dist/{impl-QS3G7FDW.cjs.map → impl-6WAXJHLE.cjs.map} +1 -1
  40. package/dist/{impl-UVWK5LEC.cjs → impl-6YSJBMNC.cjs} +2 -2
  41. package/dist/{impl-UVWK5LEC.cjs.map → impl-6YSJBMNC.cjs.map} +1 -1
  42. package/dist/{impl-DOQM27FH.cjs → impl-77RKZROM.cjs} +2 -2
  43. package/dist/{impl-DOQM27FH.cjs.map → impl-77RKZROM.cjs.map} +1 -1
  44. package/dist/{impl-JDTKIRQY.cjs → impl-7P2JYKPQ.cjs} +2 -2
  45. package/dist/{impl-JDTKIRQY.cjs.map → impl-7P2JYKPQ.cjs.map} +1 -1
  46. package/dist/{impl-ABCJ37Z7.cjs → impl-AFZIHZEH.cjs} +2 -2
  47. package/dist/{impl-ABCJ37Z7.cjs.map → impl-AFZIHZEH.cjs.map} +1 -1
  48. package/dist/{impl-A6YXWSI5.cjs → impl-AGDQ26NT.cjs} +6 -6
  49. package/dist/{impl-A6YXWSI5.cjs.map → impl-AGDQ26NT.cjs.map} +1 -1
  50. package/dist/{impl-2REOS3PC.cjs → impl-AJFT5WGX.cjs} +2 -2
  51. package/dist/{impl-2REOS3PC.cjs.map → impl-AJFT5WGX.cjs.map} +1 -1
  52. package/dist/{impl-3M5H66QQ.cjs → impl-COO2M22A.cjs} +2 -2
  53. package/dist/{impl-3M5H66QQ.cjs.map → impl-COO2M22A.cjs.map} +1 -1
  54. package/dist/{impl-QR72P4GY.cjs → impl-EKDXIUCJ.cjs} +3 -3
  55. package/dist/{impl-QR72P4GY.cjs.map → impl-EKDXIUCJ.cjs.map} +1 -1
  56. package/dist/{impl-CW4P3FBU.cjs → impl-EQV6T4R5.cjs} +2 -2
  57. package/dist/{impl-CW4P3FBU.cjs.map → impl-EQV6T4R5.cjs.map} +1 -1
  58. package/dist/{impl-WP4DZVLN.cjs → impl-I344Y4YA.cjs} +2 -2
  59. package/dist/{impl-WP4DZVLN.cjs.map → impl-I344Y4YA.cjs.map} +1 -1
  60. package/dist/{impl-6H2SEINI.cjs → impl-I7VPHXCY.cjs} +2 -2
  61. package/dist/{impl-6H2SEINI.cjs.map → impl-I7VPHXCY.cjs.map} +1 -1
  62. package/dist/{impl-Y6UD6TEX.cjs → impl-IIYZ245Q.cjs} +2 -2
  63. package/dist/{impl-Y6UD6TEX.cjs.map → impl-IIYZ245Q.cjs.map} +1 -1
  64. package/dist/{impl-DUTLZXI4.cjs → impl-IN53IGZO.cjs} +5 -5
  65. package/dist/{impl-DUTLZXI4.cjs.map → impl-IN53IGZO.cjs.map} +1 -1
  66. package/dist/impl-J6ENLPL7.cjs +2 -0
  67. package/dist/{impl-KFCSSBYU.cjs.map → impl-J6ENLPL7.cjs.map} +1 -1
  68. package/dist/{impl-U5EBZCIQ.cjs → impl-JFHI2O55.cjs} +4 -4
  69. package/dist/{impl-U5EBZCIQ.cjs.map → impl-JFHI2O55.cjs.map} +1 -1
  70. package/dist/{impl-E2HT5BNA.cjs → impl-JL3ILIXJ.cjs} +2 -2
  71. package/dist/{impl-E2HT5BNA.cjs.map → impl-JL3ILIXJ.cjs.map} +1 -1
  72. package/dist/{impl-FNQYLHQP.cjs → impl-KFA3AMJD.cjs} +2 -2
  73. package/dist/{impl-FNQYLHQP.cjs.map → impl-KFA3AMJD.cjs.map} +1 -1
  74. package/dist/{impl-5MZPCJWM.cjs → impl-KQMEFEGS.cjs} +2 -2
  75. package/dist/{impl-5MZPCJWM.cjs.map → impl-KQMEFEGS.cjs.map} +1 -1
  76. package/dist/{impl-ANMYZBXH.cjs → impl-M2FUD3PD.cjs} +2 -2
  77. package/dist/{impl-ANMYZBXH.cjs.map → impl-M2FUD3PD.cjs.map} +1 -1
  78. package/dist/{impl-ABEIAAXG.cjs → impl-ME5ECUXX.cjs} +5 -5
  79. package/dist/{impl-ABEIAAXG.cjs.map → impl-ME5ECUXX.cjs.map} +1 -1
  80. package/dist/{impl-GXF6DOD3.cjs → impl-MXT5WXQL.cjs} +2 -2
  81. package/dist/{impl-GXF6DOD3.cjs.map → impl-MXT5WXQL.cjs.map} +1 -1
  82. package/dist/{impl-M6QIFDQJ.cjs → impl-N42OQHZK.cjs} +2 -2
  83. package/dist/{impl-M6QIFDQJ.cjs.map → impl-N42OQHZK.cjs.map} +1 -1
  84. package/dist/{impl-Q2YWAZ5V.cjs → impl-QIO7HI3C.cjs} +3 -3
  85. package/dist/{impl-Q2YWAZ5V.cjs.map → impl-QIO7HI3C.cjs.map} +1 -1
  86. package/dist/{impl-2FDYPU4D.cjs → impl-RWQGNFGA.cjs} +2 -2
  87. package/dist/{impl-2FDYPU4D.cjs.map → impl-RWQGNFGA.cjs.map} +1 -1
  88. package/dist/{impl-VQHQ7BUI.cjs → impl-U3QTUNKM.cjs} +2 -2
  89. package/dist/{impl-VQHQ7BUI.cjs.map → impl-U3QTUNKM.cjs.map} +1 -1
  90. package/dist/{impl-GVGOIIHI.cjs → impl-UAVSJRAQ.cjs} +2 -2
  91. package/dist/{impl-GVGOIIHI.cjs.map → impl-UAVSJRAQ.cjs.map} +1 -1
  92. package/dist/{impl-ES6WNRK2.cjs → impl-V4DXFCLY.cjs} +2 -2
  93. package/dist/{impl-ES6WNRK2.cjs.map → impl-V4DXFCLY.cjs.map} +1 -1
  94. package/dist/{impl-PF2UNMEM.cjs → impl-VLNYULEF.cjs} +2 -2
  95. package/dist/{impl-PF2UNMEM.cjs.map → impl-VLNYULEF.cjs.map} +1 -1
  96. package/dist/{impl-KBO3FFYP.cjs → impl-WLYSLIAY.cjs} +2 -2
  97. package/dist/{impl-KBO3FFYP.cjs.map → impl-WLYSLIAY.cjs.map} +1 -1
  98. package/dist/{impl-IFO7BHTL.cjs → impl-XW5NZCGW.cjs} +2 -2
  99. package/dist/{impl-IFO7BHTL.cjs.map → impl-XW5NZCGW.cjs.map} +1 -1
  100. package/dist/{impl-DN2UQJ3S.cjs → impl-XYG2OLQG.cjs} +2 -2
  101. package/dist/{impl-DN2UQJ3S.cjs.map → impl-XYG2OLQG.cjs.map} +1 -1
  102. package/dist/{impl-LRWZARHM.cjs → impl-YKIGKPS6.cjs} +2 -2
  103. package/dist/{impl-LRWZARHM.cjs.map → impl-YKIGKPS6.cjs.map} +1 -1
  104. package/dist/{impl-3VIMVUBA.cjs → impl-YKOMPECQ.cjs} +2 -2
  105. package/dist/{impl-3VIMVUBA.cjs.map → impl-YKOMPECQ.cjs.map} +1 -1
  106. package/dist/index.cjs +3 -3
  107. package/dist/index.cjs.map +1 -1
  108. package/dist/index.d.cts +53 -27
  109. package/package.json +1 -1
  110. package/dist/chunk-EMB64AC3.cjs +0 -2920
  111. package/dist/impl-KFCSSBYU.cjs +0 -2
@@ -1,2920 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class;var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunk4U57O4PScjs = require('./chunk-4U57O4PS.cjs');var _graphqlrequest = require('graphql-request');var In=_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
- `,Sn= 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
- `,Wd= exports.d =_graphqlrequest.gql`
92
- query TranscendCliSubDataPointsCount($filterBy: SubDataPointFiltersInput) {
93
- subDataPoints(filterBy: $filterBy, useMaster: false) {
94
- totalCount
95
- }
96
- }
97
- `,Tn= 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
- `,Pn= 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
- `,Jd= 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 tf=_graphqlrequest.gql`
206
- query TranscendCliEntryCount(
207
- $filterBy: UnstructuredSubDataPointRecommendationsFilterInput
208
- ) {
209
- unstructuredSubDataPointRecommendations(
210
- filterBy: $filterBy
211
- useMaster: false
212
- ) {
213
- totalCount
214
- }
215
- }
216
- `;var En=_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
- `,of= 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
- `,Rn= 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
- `,bn= exports.m =_graphqlrequest.gql`
337
- mutation TranscendCliCreateDataSilo($input: [CreateDataSilosInput!]!) {
338
- createDataSilos(input: $input) {
339
- dataSilos {
340
- id
341
- title
342
- }
343
- }
344
- }
345
- `;var wn=_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
- `,$n= exports.o =_graphqlrequest.gql`
382
- query TranscendCliInitializer {
383
- initializer {
384
- id
385
- identifiers {
386
- name
387
- }
388
- }
389
- }
390
- `,xn= exports.p =_graphqlrequest.gql`
391
- mutation TranscendCliCreateEnricher($input: EnricherInput!) {
392
- createEnricher(input: $input) {
393
- clientMutationId
394
- }
395
- }
396
- `,Dn= exports.q =_graphqlrequest.gql`
397
- mutation TranscendCliUpdateEnricher($input: UpdateEnricherInput!) {
398
- updateEnricher(input: $input) {
399
- clientMutationId
400
- }
401
- }
402
- `;var qn=_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 Ln=_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
- `,vn= exports.t =_graphqlrequest.gql`
447
- query TranscendCliNewIdentifierTypes {
448
- newIdentifierTypes {
449
- name
450
- }
451
- }
452
- `,kn= exports.u =_graphqlrequest.gql`
453
- mutation TranscendCliCreateIdentifier($input: IdentifierInput!) {
454
- createIdentifier(input: $input) {
455
- identifier {
456
- id
457
- name
458
- }
459
- }
460
- }
461
- `,_n= exports.v =_graphqlrequest.gql`
462
- mutation TranscendCliUpdateIdentifier($input: UpdateIdentifierInput!) {
463
- updateIdentifier(input: $input) {
464
- clientMutationId
465
- }
466
- }
467
- `;var rr=_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
- `,On= exports.y =_graphqlrequest.gql`
492
- mutation TranscendCliUpdateDataSubject($input: UpdateSubjectInput!) {
493
- updateSubject(input: $input) {
494
- clientMutationId
495
- }
496
- }
497
- `,Nn= exports.z =_graphqlrequest.gql`
498
- mutation TranscendCliToggleDataSubject($input: ToggleSubjectInput!) {
499
- toggleSubject(input: $input) {
500
- clientMutationId
501
- }
502
- }
503
- `;var Mn=_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
- `,Fn= 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
- `,Un= 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
- `,Qn= 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
- `,Vn= exports.F =_graphqlrequest.gql`
601
- mutation TranscendCliDeleteApiKey($id: ID!) {
602
- deleteApiKey(id: $id) {
603
- clientMutationId
604
- }
605
- }
606
- `;var jn=_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
- `,Yn= 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 zn=_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 Wn=_graphqlrequest.gql`
656
- query TranscendCliOrganization {
657
- organization {
658
- sombra {
659
- customerUrl
660
- }
661
- }
662
- }
663
- `;var Jn=_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 Xn=_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
- `,eo= 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
- `,to= 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 ro=_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
- `,io= 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
- `,no= 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 oo=_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 ao=_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
- `,po= 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 lo=_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
- `,ir= exports.W =_graphqlrequest.gql`
955
- mutation TranscendCliApprovePrivacyRequest($input: CommunicationInput!) {
956
- approveRequest(input: $input) {
957
- request {
958
- id
959
- }
960
- }
961
- }
962
- `,co= exports.X =_graphqlrequest.gql`
963
- mutation TranscendCliCancelPrivacyRequest($input: CommunicationInput!) {
964
- cancelRequest(input: $input) {
965
- request {
966
- id
967
- }
968
- }
969
- }
970
- `,Ct= exports.Y =_graphqlrequest.gql`
971
- mutation TranscendCliUpdatePrivacyRequest($input: UpdateRequestInput!) {
972
- updateRequest(input: $input) {
973
- request {
974
- id
975
- }
976
- }
977
- }
978
- `,uo= exports.Z =_graphqlrequest.gql`
979
- mutation TranscendCliNotifyAdditionalTime($input: AdditionalTimeInput!) {
980
- notifyAdditionalTime(input: $input) {
981
- clientMutationId
982
- }
983
- }
984
- `;var fo=_graphqlrequest.gql`
985
- query TranscendCliFetchMessage {
986
- translatedMessages {
987
- id
988
- defaultMessage
989
- targetReactIntlId
990
- translations {
991
- locale
992
- value
993
- }
994
- }
995
- }
996
- `,go= exports.$ =_graphqlrequest.gql`
997
- mutation TranscendCliUpdateIntlMessages($messages: [MessageInput!]!) {
998
- updateIntlMessages(input: { messages: $messages, skipPublish: true }) {
999
- clientMutationId
1000
- }
1001
- }
1002
- `;var yo=_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
- `,ho= exports.ba =_graphqlrequest.gql`
1031
- mutation TranscendCliRetryRequestEnricher($requestEnricherId: ID!) {
1032
- retryRequestEnricher(id: $requestEnricherId) {
1033
- requestEnricher {
1034
- id
1035
- }
1036
- }
1037
- }
1038
- `,Co= 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
- `,Io= 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 So=_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 To=_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 Po=_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 Eo=_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
- `,Ro= 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
- `,bo= 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
- `,wo= 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
- `,$o= exports.na =_graphqlrequest.gql`
1531
- mutation TranscendCliUpdatePrompts($input: UpdatePromptsInput!) {
1532
- updatePrompts(input: $input) {
1533
- clientMutationId
1534
- }
1535
- }
1536
- `,xo= exports.oa =_graphqlrequest.gql`
1537
- mutation TranscendCliCreatePrompt($input: CreatePromptInput!) {
1538
- createPrompt(input: $input) {
1539
- clientMutationId
1540
- prompt {
1541
- id
1542
- }
1543
- }
1544
- }
1545
- `,Do= exports.pa =_graphqlrequest.gql`
1546
- mutation TranscendCliUpdatePromptPartials(
1547
- $input: UpdatePromptPartialsInput!
1548
- ) {
1549
- updatePromptPartials(input: $input) {
1550
- clientMutationId
1551
- }
1552
- }
1553
- `,qo= exports.qa =_graphqlrequest.gql`
1554
- mutation TranscendCliCreatePromptPartial($input: CreatePromptPartialInput!) {
1555
- createPromptPartial(input: $input) {
1556
- clientMutationId
1557
- promptPartial {
1558
- id
1559
- }
1560
- }
1561
- }
1562
- `,Lo= exports.ra =_graphqlrequest.gql`
1563
- mutation TranscendCliUpdatePromptGroups($input: UpdatePromptGroupsInput!) {
1564
- updatePromptGroups(input: $input) {
1565
- clientMutationId
1566
- }
1567
- }
1568
- `,vo= exports.sa =_graphqlrequest.gql`
1569
- mutation TranscendCliCreatePromptPartial($input: CreatePromptGroupInput!) {
1570
- createPromptGroup(input: $input) {
1571
- clientMutationId
1572
- promptGroup {
1573
- id
1574
- }
1575
- }
1576
- }
1577
- `;var ko=_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
- `,Go= exports.va =_graphqlrequest.gql`
1613
- mutation TranscendCliRetryRequestDataSilo($requestDataSiloId: ID!) {
1614
- retryRequestDataSilo(id: $requestDataSiloId) {
1615
- requestDataSilo {
1616
- id
1617
- }
1618
- }
1619
- }
1620
- `,Oo= 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 Bo=_graphqlrequest.gql`
1682
- mutation TranscendCliRemoveRequestIdentifiers(
1683
- $input: RemoveRequestIdentifiersInput!
1684
- ) {
1685
- removeRequestIdentifiers(input: $input) {
1686
- count
1687
- }
1688
- }
1689
- `,Qo= 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 pg=_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 Ho=_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
- `,Wo= 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 Os=_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 Bs=_graphqlrequest.gql`
2434
- query TranscendCliFetchPrivacyCenterId($url: String!) {
2435
- privacyCenter(lookup: { url: $url }) {
2436
- id
2437
- }
2438
- }
2439
- `,Qs= 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 Xr=_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 qg=_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
- `,Hs= exports.Ib =_graphqlrequest.gql`
2594
- mutation TranscendCliUpdateAgents($input: UpdateAgentsInput!) {
2595
- updateAgents(input: $input) {
2596
- clientMutationId
2597
- }
2598
- }
2599
- `;var Ws=_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 Ae = _interopRequireWildcard(_iots); var Re = _interopRequireWildcard(_iots); var oe = _interopRequireWildcard(_iots); var $ = _interopRequireWildcard(_iots); var ee = _interopRequireWildcard(_iots); var Jt = _interopRequireWildcard(_iots); var Ye = _interopRequireWildcard(_iots); var Sl = _interopRequireWildcard(_iots);var j="[NONE]",Vt= exports.bc ="[APPLY VALUE TO ALL ROWS]",ai= exports.cc ="<blank>",sr= exports.dc =["email","coreIdentifier"],At= 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))(At||{}),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, At,()=>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,[j]:j})),regionToCountrySubDivision:x.record(x.string,_typeutils.valuesOf.call(void 0, {..._privacytypes.IsoCountrySubdivisionCode,[j]:j})),statusToRequestStatus:x.record(x.string,_typeutils.valuesOf.call(void 0, {..._privacytypes.CompletedRequestStatus,[j]:j}))}),ar= 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(ar),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 It(t,e){return _fuzzysearch2.default.call(void 0, t.toLowerCase(),e.toLowerCase())||_fuzzysearch2.default.call(void 0, e.toLowerCase(),t.toLowerCase())}function St(t,e,r,n){let i=t.filter(s=>It(e.toLowerCase(),s.toLowerCase()));return[...i,new _inquirer2.default.Separator,...r?[]:[j],...n?[Vt]:[],...t.filter(s=>!i.includes(s))]}var _inquirerautocompleteprompt = require('inquirer-autocomplete-prompt'); var _inquirerautocompleteprompt2 = _interopRequireDefault(_inquirerautocompleteprompt);async function mt(t,e,r){_inquirer2.default.registerPrompt("autocomplete",_inquirerautocompleteprompt2.default);let n=t.map(s=>s||"<blank>").filter(s=>!r[s]);if(n.length===0)return r;let i=await _inquirer2.default.prompt(n.map(s=>({name:s,message:`Map value of: ${s}`,type:"autocomplete",default:e.find(o=>It(s,o)),source:(o,p)=>p?e.filter(c=>typeof c=="string"&&It(p,c)):e})));return{...r,..._typeutils.apply.call(void 0, i,s=>typeof s=="string"?s:Object.values(s)[0])}}function pi(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 We(t,e){return _chunk4U57O4PScjs.j.call(void 0, t.map(r=>r[e]||"").flat())}async function $a(t){let e=_chunk4U57O4PScjs.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:[j,...e]}]);if(n=j!==i,n){let s=We(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:_chunk4U57O4PScjs.m}})}function Y(t,e){return $c(t,{Authorization:`Bearer ${e}`})}var _got = require('got'); var _got2 = _interopRequireDefault(_got);async function nt(t,e,r){let n=Y(t,e),{organization:i}=await l(n,Wn),{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 kh(t){return _got2.default.extend({prefixUrl:t})}async function Nh(t,{id:e,bundleType:r}){await l(t,Is,{airgapBundleId:e,bundleType:r})}async function Mh(t,{id:e,bundleType:r}){await l(t,As,{airgapBundleId:e,bundleType:r})}async function Vh(t,e){let r=await l(t,Yn,{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 li=20;async function pr(t,e={}){let r=[],n=0,i=!1;do{let{globalActionItems:{nodes:s}}=await l(t,Ms,{first:li,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+=li,i=s.length===li}while(i);return r}var ci=20;async function lr(t){let e=[],r=0,n=!1;do{let{actions:{nodes:i}}=await l(t,Os,{first:ci,offset:r});e.push(...i),r+=ci,n=i.length===ci}while(n);return e.sort((i,s)=>i.type.localeCompare(s.type))}var ui=20;async function cr(t,e={}){let r=[],n=0,i=!1;do{let{agentFiles:{nodes:s}}=await l(t,Ws,{first:ui,offset:n,filterBy:e});r.push(...s),n+=ui,i=s.length===ui}while(i);return r.sort((s,o)=>s.name.localeCompare(o.name))}var mi=20;async function ur(t){let e=[],r=0,n=!1;do{let{agentFunctions:{nodes:i}}=await l(t,ea,{first:mi,offset:r});e.push(...i.map(s=>({...s,parameters:JSON.parse(s.parameters)}))),r+=mi,n=i.length===mi}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var di=20;async function mr(t,e={}){let r=[],n=0,i=!1;do{let{agents:{nodes:s}}=await l(t,Zs,{first:di,offset:n,filterBy:e});r.push(...s),n+=di,i=s.length===di}while(i);return r.sort((s,o)=>s.name.localeCompare(o.name))}var fi=20;async function xa(t){let e=[],r=0,n=!1;do{let{assessmentForms:{nodes:i}}=await l(t,Io,{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 gi=20;async function Da(t){let e=[],r=0,n=!1;do{let{assessmentFormTemplates:{nodes:i}}=await l(t,Po,{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 qa(t){let e=[],r=0,n=!1;do{let{attributeKeys:{nodes:i}}=await l(t,Jn,{first:yi,offset:r});e.push(...i),r+=yi,n=i.length===yi}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var Tt=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:Tt,offset:n,attributeKeyId:e});r.push(...s),n+=Tt,i=s.length===Tt}while(i);return r.sort((s,o)=>s.name.localeCompare(o.name))}var Lc=[_privacytypes.AttributeKeyType.MultiSelect,_privacytypes.AttributeKeyType.SingleSelect];async function Pt(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:Tt,offset:r});e.push(...await Promise.all(i.map(async s=>({...s,values:Lc.includes(s.type)?await qc(t,s.id):[]})))),r+=Tt,n=i.length===Tt}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var hi=20;async function dr(t){let e=[],r=0,n=!1;do{let{businessEntities:{nodes:i}}=await l(t,vs,{first:hi,offset:r});e.push(...i),r+=hi,n=i.length===hi}while(n);return e.sort((i,s)=>i.title.localeCompare(s.title))}async function ka(t){let{consentManager:{consentManager:e}}=await l(t,gs);return e}async function $e(t,e){let{consentManager:{consentManager:r}}=await l(t,fs,{},{},e);return r.id}var Ci=50;async function fr(t){let e=[],r=0,n=!1;do{let{experiences:{nodes:i}}=await l(t,as,{first:Ci,offset:r});e.push(...i),r+=Ci,n=i.length===Ci}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var vc=(r=>(r.Hourly="1h",r.Daily="1d",r))(vc||{});async function $C(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 Ai=20;async function Ii(t,e=_privacytypes.ConsentTrackerStatus.Live){let r=[],n=0,i=await $e(t),s=!1;do{let{cookies:{nodes:o}}=await l(t,ds,{first:Ai,offset:n,airgapBundleId:i,status:e});r.push(...o),n+=Ai,s=o.length===Ai}while(s);return r.sort((o,p)=>o.name.localeCompare(p.name))}var Si=20;async function gr(t){let e=[],r=0,n=!1;do{let{dataSubCategories:{nodes:i}}=await l(t,sa,{first:Si,offset:r});e.push(...i),r+=Si,n=i.length===Si}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var Ti=20;async function Et(t,e=_privacytypes.ConsentTrackerStatus.Live){let r=[],n=0,i=await $e(t),s=!1;do{let{dataFlows:{nodes:o}}=await l(t,ms,{first:Ti,offset:n,airgapBundleId:i,status:e,...e===_privacytypes.ConsentTrackerStatus.NeedsReview?{showZeroActivity:!0}:{}});r.push(...o),n+=Ti,s=o.length===Ti}while(s);return r.sort((o,p)=>o.value.localeCompare(p.value))}async function Oa(t){let{translatedMessages:e}=await l(t,fo,{});return e}async function Kt(t){let{organization:e}=await l(t,Qs);return e.deployedPrivacyCenterUrl}async function Rt(t,e){let r=e;r||(r=await Kt(t));let{privacyCenter:n}=await l(t,Bs,{url:r});return n.id}async function yr(t){let e=await Kt(t),{privacyCenterPolicies:r}=await l(t,ao,{url:e});return r.sort((n,i)=>n.title.defaultMessage.localeCompare(i.title.defaultMessage))}function De(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 Pi=20;async function Na(t){let e=[],r=0,n=!1;do{let{preferenceTopics:{nodes:i}}=await l(t,To,{first:Pi,offset:r});e.push(...i),r+=Pi,n=i.length===Pi}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 Kt(t),{privacyCenter:{themeStr:r,...n}}=await l(t,Vs,{url:e});return[{...n,theme:JSON.parse(r)}]}var Ei=20;async function hr(t){let e=[],r=0,n=!1;do{let{processingActivities:{nodes:i}}=await l(t,ma,{first:Ei,offset:r});e.push(...i),r+=Ei,n=i.length===Ei}while(n);return e.sort((i,s)=>i.title.localeCompare(s.title))}var Ri=20;async function Cr(t){let e=[],r=0,n=!1;do{let{processingPurposeSubCategories:{nodes:i}}=await l(t,la,{first:Ri,offset:r});e.push(...i),r+=Ri,n=i.length===Ri}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var bi=20;async function Ar(t,{includeDeleted:e=!1}={}){let r=[],n=0,i=!1;do{let{purposes:{nodes:s}}=await l(t,So,{first:bi,offset:n,input:{includeDeleted:e}});r.push(...s),n+=bi,i=s.length===bi}while(i);return r.sort((s,o)=>s.trackingType.localeCompare(o.trackingType))}async function Fa(t){let[e,r]=await Promise.all([Ar(t),Na(t)]);return e.map(n=>{let i=r.filter(s=>s.purpose.trackingType===n.trackingType);return{...n,topics:i}})}var wi=50;async function Ir(t,{requestId:e}){let r=[],n=0,i=!1;do{let{requestEnrichers:{nodes:s}}=await l(t,yo,{first:wi,offset:n,requestId:e});r.push(...s),n+=wi,i=s.length===wi}while(i);return r}var $i=50;async function Ua(t,{requestId:e}){let r=[],n=0,i=!1;do{let{requestIdentifiers:{nodes:s}}=await l(t,Qo,{first:$i,offset:n,requestIds:[e]});r.push(...s),n+=$i,i=s.length===$i}while(i);return r}var _semver = require('semver'); var _semver2 = _interopRequireDefault(_semver);var Ba="7.180",Mc=Je.type({id:Je.string,name:Je.string,value:Je.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.IdentifierType)}),xi=50,Fc= exports.hd =Je.type({identifiers:Je.array(Mc)});async function Sr(t,e,{requestId:r}){let n=[],i=0,s=!1,{organization:{sombra:{version:o}}}=await l(t,ga);if(o&&_semver2.default.lt(o,Ba))throw new Error(`Please upgrade Sombra to ${Ba} or greater to use this command.`);do{let p;try{p=await e.post("v1/request-identifiers",{json:{first:xi,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+=xi,s=c.length===xi}while(s);return n}var _cliprogress = require('cli-progress'); var _cliprogress2 = _interopRequireDefault(_cliprogress);var VA=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])})]),Pr=50;async function ae(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,lo,{first:Pr,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>Pr&&(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Fetching ${k} requests`)),f.start(k,0)),y.push(...C),g+=Pr,f.update(g),I=C.length===Pr}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 Di=20;async function Er(t){let e=[],r=0,n=!1;do{let{teams:{nodes:i}}=await l(t,No,{first:Di,offset:r});e.push(...i),r+=Di,n=i.length===Di}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var qi=20;async function WA(t){let e=[],r=0,n=!1;do{let{users:{nodes:i}}=await l(t,Vo,{first:qi,offset:r});e.push(...i),r+=qi,n=i.length===qi}while(n);return e.sort((i,s)=>i.email.localeCompare(s.email))}var Li=20;async function Rr(t){let e=[],r=0,n=!1;do{let{vendors:{nodes:i}}=await l(t,ia,{first:Li,offset:r});e.push(...i),r+=Li,n=i.length===Li}while(n);return e.sort((i,s)=>i.title.localeCompare(s.title))}var vi=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:vi,offset:n,titles:e});r.push(...s),n+=vi,i=s.length===vi}while(i);return r.sort((s,o)=>s.title.localeCompare(o.title))}async function br({"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=_chunk4U57O4PScjs.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=_chunk4U57O4PScjs.e.call(void 0, p,"title"),u=_chunk4U57O4PScjs.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 ki=100;async function zc(t){let e=[],r=0,n=!1;do{let{catalogs:{nodes:i}}=await l(t,qn,{first:ki,offset:r});e.push(...i),r+=ki,n=i.length===ki}while(n);return e.sort((i,s)=>i.integrationName.localeCompare(s.integrationName))}async function cI(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 jt(t){let{internalSubjects:e}=await l(t,rr);return e}async function Ka({"data-silos":t=[],"data-subjects":e=[],"processing-activities":r=[],enrichers:n=[]},i,s=!1){let o=_chunk4U57O4PScjs.j.call(void 0, [..._chunk4U57O4PScjs.a.call(void 0, t.map(d=>d["data-subjects"]||[])||[]),..._chunk4U57O4PScjs.a.call(void 0, _nullishCoalesce(r.map(({dataSubjectTypes:d})=>_nullishCoalesce(d, () => ([]))), () => ([]))),..._chunk4U57O4PScjs.a.call(void 0, n.map(d=>d["data-subjects"]||[])||[]),...e.map(d=>d.type)]);if(o.length===0&&!s)return{};let p=await jt(i),c=_chunk4U57O4PScjs.e.call(void 0, p,"type"),u=_chunk4U57O4PScjs.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 Oi=20;async function Ni(t){let e=[],r=0,n=!1;do{let{identifiers:{nodes:i}}=await l(t,Ln,{first:Oi,offset:r});e.push(...i),r+=Oi,n=i.length===Oi}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 Ni(n),o=_chunk4U57O4PScjs.e.call(void 0, s,"name"),p=_chunk4U57O4PScjs.j.call(void 0, [..._chunk4U57O4PScjs.a.call(void 0, t.map(u=>[u["input-identifier"],...u["output-identifiers"]])),..._chunk4U57O4PScjs.a.call(void 0, e.map(u=>u["identity-keys"])),...r.map(({name:u})=>u)]).filter(u=>!!u),c=_chunk4U57O4PScjs.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,vn),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,kn,{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 Mi=20;async function wr(t){let e=[],r=0,n=!1;do{let{promptGroups:{nodes:i}}=await l(t,bo,{first:Mi,offset:r});e.push(...i),r+=Mi,n=i.length===Mi}while(n);return e.sort((i,s)=>i.title.localeCompare(s.title))}var Fi=20;async function $r(t){let e=[],r=0,n=!1;do{let{promptPartials:{nodes:i}}=await l(t,Ro,{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 wt(t,{text:e,titles:r=[],ids:n=[]}={}){let i=[],s=0,o=!1;do{let{prompts:{nodes:p}}=await l(t,Eo,{first:Ui,offset:s,filterBy:{...e?{text:e}:{},...r.length>0?{title:r}:{},...n.length>0?{id:n}:{}}});i.push(...p),s+=Ui,o=p.length===Ui}while(o);return i.sort((p,c)=>p.title.localeCompare(c.title))}async function kI(t,{promptTitles:e=[],promptIds:r=[]}={}){let{promptsWithVariables:n}=await l(t,wo,{input:{...e.length>0?{promptTitles:e}:{},...r.length>0?{promptIds:r}:{}}});return n}var Bi=20;async function NI(t,e){let r=[],n=0,i=!1;do{let{promptThreads:{nodes:s}}=await l(t,oo,{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))}var xr=100;async function Qi(t,{requestId:e,dataSiloId:r,requestStatuses:n,statuses:i,skipLog:s=!1}){let o=new Date().getTime(),p=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),c=[],u=0,d=!1;do{let{requestDataSilos:{nodes:y,totalCount:g}}=await l(t,ko,{first:xr,offset:u,filterBy:{dataSiloId:r,requestId:e,status:i,requestStatus:n}});c.push(...y),u===0&&g>xr&&(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Fetching ${g} requests`)),p.start(g,0)),u+=xr,d=y.length===xr,p.update(u)}while(d);p.stop();let f=new Date().getTime()-o;return s||_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Completed fetching of ${c.length} request data silos in "${f/1e3}" seconds.`)),c}async function Wa(t,{requestId:e,dataSiloId:r}){let n=await Qi(t,{requestId:e,dataSiloId:r,skipLog:!0});if(n.length!==1)throw new Error(`Failed to find RequestDataSilo with requestId:${e},dataSiloId:${r}`);return n[0]}async function ZI(t,{dataSiloId:e}){let{listReducedRequestsForDataSilo:{totalCount:r}}=await l(t,Oo,{input:{dataSiloId:e,isResolved:!1}});return r}async function JI(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 rS(t,{email:e,password:r}){let{determineLoginMethod:{loginMethod:n}}=await l(t,Xr,{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 iS(t,{email:e,roleId:r}){let{determineLoginMethod:{loginMethod:n}}=await l(t,Xr,{email:e,userId:r});await t.rawRequest(Ys,{id:r,publicKey:n.sombraPublicKey})}async function aS(t,e){let{createApiKey:{apiKey:r}}=await l(t,Qn,{input:e});return r}async function pS(t,e){await l(t,Vn,{id:e})}var Ja=Ae.type({dependsOnQuestionReferenceId:Ae.string,comparisonOperator:_typeutils.valuesOf.call(void 0, _privacytypes.ComparisonOperator),comparisonOperands:Ae.array(Ae.string)}),ru= exports.Kd =Ae.recursion("AssessmentNestedRule",t=>Ae.intersection([Ae.type({logicOperator:_typeutils.valuesOf.call(void 0, _privacytypes.LogicOperator)}),Ae.partial({rules:Ae.array(Ja),nestedRules:Ae.array(t)})])),iu= exports.Ld =Ae.partial({action:_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentsDisplayLogicAction),rule:Ja,nestedRule:ru});function Ki(t){return _typeutils.decodeCodec.call(void 0, iu,t)}var au=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 ji(t){return _typeutils.decodeCodec.call(void 0, au,t)}var Yi=20;async function tp(t,{titles:e,pageSize:r,ids:n=[],gql:i=En,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 lu(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?Tn:Sn,{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 _chunk4U57O4PScjs.g.call(void 0, s,"name")}async function cu(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,In,{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 lu(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:Rn});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 cu(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=_chunk4U57O4PScjs.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=_chunk4U57O4PScjs.b.call(void 0, u,Yi);await _bluebird.mapSeries.call(void 0, S,async v=>{let{createDataSilos:{dataSilos:C}}=await l(e,bn,{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=_chunk4U57O4PScjs.b.call(void 0, t,Yi);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', _5 => _5["email-settings"], 'optionalAccess', _6 => _6["notify-email-address"]]),promptAVendorEmailSendFrequency:_optionalChain([C, 'access', _7 => _7["email-settings"], 'optionalAccess', _8 => _8["send-frequency"]]),promptAVendorEmailSendType:_optionalChain([C, 'access', _9 => _9["email-settings"], 'optionalAccess', _10 => _10["send-type"]]),promptAVendorEmailIncludeIdentifiersAttachment:_optionalChain([C, 'access', _11 => _11["email-settings"], 'optionalAccess', _12 => _12["include-identifiers-attachment"]]),promptAVendorEmailCompletionLinkType:_optionalChain([C, 'access', _13 => _13["email-settings"], 'optionalAccess', _14 => _14["completion-link-type"]]),manualWorkRetryFrequency:_optionalChain([C, 'access', _15 => _15["email-settings"], 'optionalAccess', _16 => _16["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:le,categories:pe,purposes:W,attributes:ye,...he})=>({name:H,description:le,categories:pe?pe.map(se=>({...se,name:se.name||"Other"})):void 0,purposes:W?W.map(se=>({...se,name:se.name||"Other"})):void 0,attributes:ye,accessRequestVisibilityEnabled:he["access-request-visibility-enabled"],erasureRequestRedactionEnabled:he["erasure-request-redaction-enabled"]})):void 0,z={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,le])=>({requestType:H,suggestedQuery:le})):void 0,enabledActions:C["privacy-actions"]||[],subDataPoints:k},V=(z.subDataPoints||[]).map(({name:H})=>H),ne=V.filter((H,le)=>V.indexOf(H)!==le);if(ne.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
- ${ne.join(`
2917
- `)}`)),s=!0;else try{await l(e,Pn,z)}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=_chunk4U57O4PScjs.b.call(void 0, e,Yi);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 zi(t,e){let r=[],n=0,i=!1;do{let{enrichers:{nodes:s}}=await l(t,wn,{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 zi(t,e.title)).find(({title:u})=>u===e.title),o=_optionalChain([e, 'access', _17 => _17["data-subjects"], 'optionalAccess', _18 => _18.map, 'call', _19 => _19(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,Dn,{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,xn,{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 ft(t,e){let r=[],n=0,i=!1;do{let{templates:{nodes:s}}=await l(t,zn,{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 ft(e,t.title)).find(({title:i})=>i===t.title)||await l(e,Hn,{title:t.title})}function Wi(t){return t.map(({country:e,countrySubDivision:r})=>({country:e,...r?{countrySubDivision:r}:{}}))}async function $t(t,e={}){let{globalActionItemCollections:{nodes:r}}=await l(t,Ho,{filterBy:{...e}});return r}var Ji=50;async function Zt(t){let e=[],r=0,n=!1;do{let{consentPartitions:{nodes:i}}=await l(t,ps,{first:Ji,offset:r});e.push(...i),r+=Ji,n=i.length===Ji}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}async function lp(t,e){let r=await $e(t),n=!1,i=await Zt(t),s=_chunk4U57O4PScjs.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 yu=["dataSilos","enrichers","templates","apiKeys"];async function NT(t,{dataSiloIds:e,integrationNames:r,debug:n,resources:i=yu,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,z,V,ne,H,le,pe,W,ye,he,se,ce,be,Ge,qe,Te,Ce,Ee,Ze,A,_,ue,me]=await Promise.all([i.includes("dataSilos")||i.includes("dataSubjects")?jt(t):[],i.includes("apiKeys")?br({},t,!0):[],i.includes("dataSilos")?rp(t,{ids:e,integrationNames:r,pageSize:s,debug:n,includeGuessedCategories:p,skipDatapoints:o,skipSubDatapoints:c}):[],i.includes("enrichers")?zi(t):[],i.includes("dataFlows")?[...u.includes(_privacytypes.ConsentTrackerStatus.Live)?await Et(t,_privacytypes.ConsentTrackerStatus.Live):[],...u.includes(_privacytypes.ConsentTrackerStatus.NeedsReview)?await Et(t,_privacytypes.ConsentTrackerStatus.NeedsReview):[]]:[],i.includes("cookies")?[...u.includes(_privacytypes.ConsentTrackerStatus.Live)?await Ii(t,_privacytypes.ConsentTrackerStatus.Live):[],...u.includes(_privacytypes.ConsentTrackerStatus.NeedsReview)?await Ii(t,_privacytypes.ConsentTrackerStatus.NeedsReview):[]]:[],i.includes("customFields")?Pt(t):[],i.includes("templates")?ft(t):[],i.includes("identifiers")?Ni(t):[],i.includes("actions")?lr(t):[],i.includes("businessEntities")?dr(t):[],i.includes("processingActivities")?hr(t):[],i.includes("consentManager")?ka(t):void 0,i.includes("consentManager")?fr(t):[],i.includes("prompts")?wt(t):[],i.includes("promptPartials")?$r(t):[],i.includes("promptGroups")?wr(t):[],i.includes("agents")?mr(t):[],i.includes("agentFunctions")?ur(t):[],i.includes("agentFiles")?cr(t):[],i.includes("vendors")?Rr(t):[],i.includes("dataCategories")?gr(t):[],i.includes("processingPurposes")?Cr(t):[],i.includes("actionItems")?pr(t,{type:[_privacytypes.ActionItemCode.Onboarding]}):[],i.includes("actionItemCollections")?$t(t):[],i.includes("teams")?Er(t):[],i.includes("policies")?yr(t):[],i.includes("privacyCenters")?Ma(t):[],i.includes("messages")?Oa(t):[],i.includes("partitions")?Zt(t):[],i.includes("assessments")?xa(t):[],i.includes("assessmentTemplates")?Da(t):[],i.includes("purposes")?Fa(t):[]]),Mt=i.includes("consentManager")&&V?await _a(t,V.id):void 0,U={},Ul=_chunk4U57O4PScjs.a.call(void 0, f.map(([{apiKeys:h}])=>h.map(({title:T})=>T))),fn=Object.values(m).filter(({title:h})=>i.includes("apiKeys")?!0:Ul.includes(h));if(fn.length>0&&i.includes("apiKeys")&&(U["api-keys"]=fn.map(({title:h})=>({title:h}))),A.length>0&&i.includes("partitions")&&(U.partitions=A.map(({name:h,partition:T})=>({name:h,partition:T}))),V&&i.includes("consentManager")&&(U["consent-manager"]={bundleUrls:{TEST:V.testBundleURL,PRODUCTION:V.bundleURL},domains:V.configuration.domains||void 0,partition:V.configuration.partition||void 0,consentPrecedence:V.configuration.consentPrecedence||void 0,unknownRequestPolicy:V.configuration.unknownRequestPolicy||void 0,unknownCookiePolicy:V.configuration.unknownCookiePolicy||void 0,syncEndpoint:V.configuration.syncEndpoint||void 0,telemetryPartitioning:V.configuration.telemetryPartitioning||void 0,signedIabAgreement:V.configuration.signedIabAgreement||void 0,syncGroups:V.configuration.syncGroups||void 0,theme:Mt?{primaryColor:Mt.primaryColor||void 0,fontColor:Mt.fontColor||void 0,privacyPolicy:Mt.privacyPolicy||void 0,prompt:Mt.prompt}:void 0,experiences:ne.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:G,reviewers:Q,isLocked:B,isArchived:J,isExternallyCreated:K,dueDate:M,createdAt:de,assignedAt:Le,submittedAt:Oe,approvedAt:Ne,rejectedAt:Me,titleIsInternal:ie,retentionSchedule:Pe,attributeValues:ze,resources:Ft,syncedRows:at})=>({title:h,group:T.title,sections:R.map(({title:Ie,status:Fe,questions:we,assignees:q,isReviewed:O,externalAssignees:fe})=>({title:Ie,status:Fe,questions:we.map(({title:pt,type:Nr,subType:xe,placeholder:ve,description:lt,isRequired:Bl,referenceId:Ql,displayLogic:gn,riskLogic:Vl,riskCategories:Kl,riskFramework:jl,answerOptions:Yl,selectedAnswers:Zl,allowedMimeTypes:zl,allowSelectOther:Hl,syncModel:Wl,syncColumn:Jl,attributeKey:Xl,requireRiskEvaluation:ec,requireRiskMatrixEvaluation:tc})=>{let Ue=gn?Ki(gn):void 0;return{title:pt,type:Nr,"sub-type":xe,placeholder:ve,description:lt,"is-required":Bl,"reference-id":Ql,"display-logic":Ue&&Object.keys(Ue).length>0?{action:Ue.action,rule:Ue.rule?{"depends-on-question-reference-id":Ue.rule.dependsOnQuestionReferenceId,"comparison-operator":Ue.rule.comparisonOperator,"comparison-operands":Ue.rule.comparisonOperands}:void 0,"nested-rule":Ue.nestedRule?{"logic-operator":Ue.nestedRule.logicOperator,rules:(Ue.nestedRule.rules||[]).map(ke=>({"depends-on-question-reference-id":ke.dependsOnQuestionReferenceId,"comparison-operator":ke.comparisonOperator,"comparison-operands":ke.comparisonOperands}))}:void 0}:void 0,"risk-logic":Vl.map(ke=>{let Mr=ji(ke);return{"risk-level":_optionalChain([Mr, 'access', _20 => _20.riskAssignment, 'optionalAccess', _21 => _21.riskLevelId]),"comparison-operands":Mr.comparisonOperands,"comparison-operator":Mr.comparisonOperator}}),"risk-categories":Kl.map(({title:ke})=>ke),"risk-framework":_optionalChain([jl, 'optionalAccess', _22 => _22.title]),"answer-options":Yl.map(({value:ke})=>({value:ke})),"selected-answers":Zl.map(({value:ke})=>ke),"allowed-mime-types":zl,"allow-select-other":Hl,"sync-model":Wl||void 0,"sync-column":Jl||void 0,"attribute-key":_optionalChain([Xl, 'optionalAccess', _23 => _23.name]),"require-risk-evaluation":ec,"require-risk-matrix-evaluation":tc}}),assignees:q.map(({email:pt})=>pt),"external-assignees":fe.map(({email:pt})=>pt),"is-reviewed":O})),creator:_optionalChain([b, 'optionalAccess', _24 => _24.email]),description:w,status:D,assignees:L.map(({email:Ie})=>Ie),"external-assignees":G.map(({email:Ie})=>Ie),reviewers:Q.map(({email:Ie})=>Ie),locked:B,archived:J,external:K,"title-is-internal":ie,"due-date":M||void 0,"created-at":de||void 0,"assigned-at":Le||void 0,"submitted-at":Oe||void 0,"approved-at":Ne||void 0,"rejected-at":Me||void 0,"retention-schedule":Pe?{type:Pe.type,"duration-days":Pe.durationDays,operand:Pe.operation}:void 0,attributes:ze!==void 0&&ze.length>0?De(ze):void 0,resources:Ft.map(({resourceType:Ie,title:Fe,name:we,category:q,type:O,purpose:fe})=>({type:Ie,title:q?`${q} - ${we}`:fe?`${fe} - ${we}`:Fe||we||O||""})),rows:at.map(({resourceType:Ie,title:Fe,name:we,category:q,type:O,purpose:fe})=>({type:Ie,title:q?`${q} - ${we}`:fe?`${fe} - ${we}`:Fe||we||O||""}))}))),ue.length>0&&i.includes("assessmentTemplates")&&(U["assessment-templates"]=ue.map(({title:h,description:T,sections:R,status:b,source:w,creator:D,isLocked:L,isArchived:G,createdAt:Q,retentionSchedule:B})=>({title:h,description:T,sections:R.map(({title:J,questions:K})=>({title:J,questions:K.map(({title:M,type:de,subType:Le,placeholder:Oe,description:Ne,isRequired:Me,referenceId:ie,displayLogic:Pe,riskLogic:ze,riskCategories:Ft,riskFramework:at,answerOptions:Ie,allowedMimeTypes:Fe,allowSelectOther:we,syncModel:q,syncColumn:O,attributeKey:fe,requireRiskEvaluation:pt,requireRiskMatrixEvaluation:Nr})=>{let xe=Pe?Ki(Pe):void 0;return{title:M,type:de,"sub-type":Le,placeholder:Oe,description:Ne,"is-required":Me,"reference-id":ie,"display-logic":xe&&Object.keys(xe).length>0?{action:xe.action,rule:xe.rule?{"depends-on-question-reference-id":xe.rule.dependsOnQuestionReferenceId,"comparison-operator":xe.rule.comparisonOperator,"comparison-operands":xe.rule.comparisonOperands}:void 0,"nested-rule":xe.nestedRule?{"logic-operator":xe.nestedRule.logicOperator,rules:(xe.nestedRule.rules||[]).map(ve=>({"depends-on-question-reference-id":ve.dependsOnQuestionReferenceId,"comparison-operator":ve.comparisonOperator,"comparison-operands":ve.comparisonOperands}))}:void 0}:void 0,"risk-logic":ze.map(ve=>{let lt=ji(ve);return{"risk-level":_optionalChain([lt, 'access', _25 => _25.riskAssignment, 'optionalAccess', _26 => _26.riskLevelId]),"risk-matrix-row":_optionalChain([lt, 'access', _27 => _27.riskAssignment, 'optionalAccess', _28 => _28.riskMatrixRowId]),"risk-matrix-column":_optionalChain([lt, 'access', _29 => _29.riskAssignment, 'optionalAccess', _30 => _30.riskMatrixColumnId]),"comparison-operands":lt.comparisonOperands,"comparison-operator":lt.comparisonOperator}}),"risk-categories":Ft.map(({title:ve})=>ve),"risk-framework":_optionalChain([at, 'optionalAccess', _31 => _31.title]),"answer-options":Ie.map(({value:ve})=>({value:ve})),"allowed-mime-types":Fe,"allow-select-other":we,"sync-model":q||void 0,"sync-column":O||void 0,"attribute-key":_optionalChain([fe, 'optionalAccess', _32 => _32.name]),"require-risk-evaluation":pt,"require-risk-matrix-evaluation":Nr}})})),status:b,source:w,creator:_optionalChain([D, 'optionalAccess', _33 => _33.email]),locked:L,archived:G,"created-at":Q||void 0,"retention-schedule":B?{type:B.type,"duration-days":B.durationDays,operand:B.operation}:void 0}))),H.length>0&&i.includes("prompts")&&(U.prompts=H.map(({title:h,content:T})=>({title:h,content:T}))),le.length>0&&i.includes("promptPartials")&&(U["prompt-partials"]=le.map(({title:h,content:T})=>({title:h,content:T}))),pe.length>0&&i.includes("promptGroups")&&(U["prompt-groups"]=pe.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:G})=>G),scopes:L.map(({name:G})=>G)}))),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', _34 => _34.defaultMessage]),active:R,adminDashboardDefaultSilentMode:b,actions:w.map(({type:D})=>D)}))),Ce.length>0&&(U.policies=Ce.map(({title:h,versions:T,disabledLocales:R})=>({title:_optionalChain([h, 'optionalAccess', _35 => _35.defaultMessage]),content:_optionalChain([T, 'optionalAccess', _36 => _36[0], 'optionalAccess', _37 => _37.content, 'optionalAccess', _38 => _38.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:G})=>({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:G!==void 0&&G.length>0?De(G):void 0}))),z.length>0&&i.includes("processingActivities")&&(U["processing-activities"]=z.map(({title:h,description:T,securityMeasureDetails:R,controllerships:b,storageRegions:w,transferRegions:D,retentionType:L,retentionPeriod:G,dataProtectionImpactAssessmentLink:Q,dataProtectionImpactAssessmentStatus:B,attributeValues:J,dataSilos:K,dataSubjects:M,teams:de,owners:Le,processingPurposeSubCategories:Oe,dataSubCategories:Ne,saaSCategories:Me})=>({title:h,description:T,securityMeasureDetails:_nullishCoalesce(R, () => (void 0)),controllerships:b.length>0?b:void 0,storageRegions:w.length>0?Wi(w):void 0,transferRegions:D.length>0?Wi(D):void 0,retentionType:L,retentionPeriod:L===_privacytypes.RetentionType.StatedPeriod?G:void 0,dataProtectionImpactAssessmentLink:_nullishCoalesce(Q, () => (void 0)),dataProtectionImpactAssessmentStatus:B,attributes:J!==void 0&&J.length>0?De(J):void 0,dataSiloTitles:K.length>0?K.map(({title:ie})=>ie):void 0,dataSubjectTypes:M.length>0?M.map(({type:ie})=>ie):void 0,teamNames:de.length>0?de.map(({name:ie})=>ie):void 0,ownerEmails:Le.length>0?Le.map(({email:ie})=>ie):void 0,processingSubPurposes:Oe.length>0?Oe.map(({name:ie,purpose:Pe})=>({purpose:Pe,...ie?{name:ie}:{}})):void 0,dataSubCategories:Ne.length>0?Ne.map(({name:ie,category:Pe})=>({category:Pe,...ie?{name:ie}:{}})):void 0,saaSCategories:Me.length>0?Me.map(({title:ie})=>ie):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:G,dataSubjects:Q,displayDescription:B,displayOrder:J,isUniqueOnPreferenceStore:K})=>({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:Q.length>0?Q.map(({type:M})=>M):void 0,displayTitle:_optionalChain([G, 'optionalAccess', _39 => _39.defaultMessage]),displayDescription:_optionalChain([B, 'optionalAccess', _40 => _40.defaultMessage]),displayOrder:J,isUniqueOnPreferenceStore:K}))),W.length>0&&i.includes("agents")&&(U.agents=W.map(({name:h,agentId:T,description:R,instructions:b,codeInterpreterEnabled:w,retrievalEnabled:D,prompt:L,largeLanguageModel:G,teams:Q,owners:B,agentFunctions:J,agentFiles:K})=>({name:h,agentId:T,description:R||void 0,instructions:b,codeInterpreterEnabled:w,retrievalEnabled:D,prompt:_optionalChain([L, 'optionalAccess', _41 => _41.title]),"large-language-model":{name:G.name,client:G.client},teams:Q&&Q.length>0?Q.map(({name:M})=>M):void 0,owners:B&&B.length>0?B.map(({email:M})=>M):void 0,"agent-functions":J&&J.length>0?J.map(({name:M})=>M):void 0,"agent-files":K&&K.length>0?K.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:G,link:Q,title:B,type:J,attributeValues:K})=>({teams:h.map(({name:M})=>M),users:T.map(({email:M})=>M),dueDate:b||void 0,title:B,notes:G,customerExperienceActionItemId:R,collections:L.map(({title:M})=>M),link:Q,priority:w||void 0,resolved:D,type:J,attributes:K!==void 0&&K.length>0?De(K):void 0}))),qe.length>0&&i.includes("actionItemCollections")&&(U["action-item-collections"]=qe.map(({title:h,description:T,hidden:R,productLine:b})=>({title:h,description:T||void 0,hidden:R,productLine:b}))),ye.length>0&&i.includes("agentFunctions")&&(U["agent-functions"]=ye.map(({name:h,description:T,parameters:R})=>({name:h,description:T,parameters:JSON.stringify(R)}))),he.length>0&&i.includes("agentFiles")&&(U["agent-files"]=he.map(({name:h,description:T,fileId:R,size:b,purpose:w})=>({name:h,description:T,fileId:R,size:b,purpose:w}))),se.length>0&&i.includes("vendors")&&(U.vendors=se.map(({title:h,description:T,dataProcessingAgreementLink:R,contactName:b,contactPhone:w,address:D,headquarterCountry:L,headquarterSubDivision:G,websiteUrl:Q,businessEntity:B,teams:J,owners:K,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:G||void 0,websiteUrl:Q||void 0,businessEntity:_optionalChain([B, 'optionalAccess', _42 => _42.title]),teams:J&&J.length>0?J.map(({name:de})=>de):void 0,owners:K&&K.length>0?K.map(({email:de})=>de):void 0,attributes:M!==void 0&&M.length>0?De(M):void 0}))),ce.length>0&&i.includes("dataCategories")&&(U["data-categories"]=ce.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:G})=>G):void 0,teams:D&&D.length>0?D.map(({name:G})=>G):void 0,attributes:L!==void 0&&L.length>0?De(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?De(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:G,attributeValues:Q})=>({value:h,type:T,description:R||void 0,trackingPurposes:b,status:D,service:_optionalChain([w, 'optionalAccess', _43 => _43.integrationName]),owners:L.map(({email:B})=>B),teams:G.map(({name:B})=>B),attributes:Q!==void 0&&Q.length>0?De(Q):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:G,attributeValues:Q})=>({name:h,isRegex:T,description:R||void 0,trackingPurposes:b,status:D,service:_optionalChain([w, 'optionalAccess', _44 => _44.integrationName]),owners:L.map(({email:B})=>B),teams:G.map(({name:B})=>B),attributes:Q!==void 0&&Q.length>0?De(Q):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:G})=>({name:D,color:L||void 0,description:G}))}))),me.length>0&&(U.purposes=me.map(({name:h,description:T,trackingType:R,defaultConsent:b,configurable:w,showInConsentManager:D,isActive:L,displayOrder:G,optOutSignals:Q,authLevel:B,topics:J,showInPrivacyCenter:K,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":K,"is-active":L,"display-order":G,"opt-out-signals":Q.length>0?Q:void 0,"auth-level":B||void 0,"preference-topics":J.map(({title:de,type:Le,displayDescription:Oe,defaultConfiguration:Ne,showInPrivacyCenter:Me,preferenceOptionValues:ie})=>({title:de.defaultMessage,type:Le,description:Oe.defaultMessage,"default-configuration":Ne,"show-in-privacy-center":Me,...ie.length>0?{options:ie.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:G,expirationDuration:Q,lookerQueryTitle:B,transitionRequestStatus:J,phoneNumbers:K,regionList:M})=>({title:h,url:T||void 0,type:R,"input-identifier":_optionalChain([b, 'optionalAccess', _45 => _45.name]),"output-identifiers":w.map(({name:de})=>de),"privacy-actions":Object.values(_privacytypes.RequestAction).length===D.length?void 0:D,testRegex:L||void 0,lookerQueryTitle:B||void 0,expirationDuration:parseInt(Q,10),transitionRequestStatus:J||void 0,phoneNumbers:K&&K.length>0?K:void 0,regionList:M&&M.length>0?M:void 0,"data-subjects":G.map(({type:de})=>de)}))),f.length>0&&i.includes("dataSilos")){let h=_chunk4U57O4PScjs.e.call(void 0, d,"type");U["data-silos"]=f.map(([{title:T,description:R,url:b,type:w,outerType:D,apiKeys:L,notifyEmailAddress:G,identifiers:Q,dependentDataSilos:B,owners:J,country:K,countrySubDivision:M,teams:de,subjectBlocklist:Le,isLive:Oe,promptAVendorEmailSendFrequency:Ne,promptAVendorEmailSendType:Me,promptAVendorEmailIncludeIdentifiersAttachment:ie,promptAVendorEmailCompletionLinkType:Pe,manualWorkRetryFrequency:ze,catalog:Ft,attributeValues:at,discoveredBy:Ie,businessEntities:Fe},we])=>({title:T,description:R,integrationName:w,"outer-type":D||void 0,url:b||void 0,"api-key-title":_optionalChain([L, 'access', _46 => _46[0], 'optionalAccess', _47 => _47.title]),"identity-keys":Q.filter(({isConnected:q})=>q).map(({name:q})=>q),...B.length>0?{"deletion-dependencies":B.map(({title:q})=>q)}:{},...J.length>0?{owners:J.map(({email:q})=>q)}:{},...de.length>0?{teams:de.map(({name:q})=>q)}:{},...Ie.length>0?{discoveredBy:Ie.map(({title:q})=>q)}:{},...Fe.length>0?{businessEntities:Fe.map(({title:q})=>q)}:{},country:K||void 0,countrySubDivision:M||void 0,disabled:!Oe,"data-subjects":Le.length>0?Ya(Le.map(({type:q})=>q),h):void 0,...Ft.hasAvcFunctionality?{"email-settings":{"notify-email-address":G||void 0,"send-frequency":Ne,"send-type":Me,"include-identifiers-attachment":ie,"completion-link-type":Pe,"manual-work-retry-frequency":ze}}:{},attributes:at!==void 0&&at.length>0?De(at):void 0,datapoints:we.map(q=>({key:q.name,title:_optionalChain([q, 'access', _48 => _48.title, 'optionalAccess', _49 => _49.defaultMessage]),description:_optionalChain([q, 'access', _50 => _50.description, 'optionalAccess', _51 => _51.defaultMessage]),owners:q.owners.map(({email:O})=>O),teams:q.teams.map(({name:O})=>O),...q.path.length>0?{path:q.path}:{},..._optionalChain([q, 'access', _52 => _52.dataCollection, 'optionalAccess', _53 => _53.title])?{"data-collection-tag":q.dataCollection.title.defaultMessage}:{},...q.dbIntegrationQueries.length>0?{"privacy-action-queries":_chunk4U57O4PScjs.f.call(void 0, _chunk4U57O4PScjs.e.call(void 0, q.dbIntegrationQueries,"requestType"),O=>O.suggestedQuery||O.query||void 0)}:{},...q.subDataPoints.length>0?{fields:q.subDataPoints.map(O=>({key:O.name,description:O.description,purposes:O.purposes,categories:O.categories,...p&&O.pendingCategoryGuesses?{"guessed-categories":O.pendingCategoryGuesses.filter(fe=>fe.status==="PENDING").map(fe=>({category:{name:fe.category.name,category:fe.category.category},status:fe.status,confidence:fe.confidence,classifierVersion:fe.classifierVersion||void 0}))}:{},"access-request-visibility-enabled":O.accessRequestVisibilityEnabled,"erasure-request-redaction-enabled":O.erasureRequestRedactionEnabled,attributes:O.attributeValues!==void 0&&O.attributeValues.length>0?De(O.attributeValues):void 0})).sort((O,fe)=>O.key.localeCompare(fe.key))}:{},"privacy-actions":q.actionSettings.filter(({active:O})=>O).map(({type:O})=>O)})).sort((q,O)=>[..._nullishCoalesce(q.path, () => ([])),q.key].join(".").localeCompare([..._nullishCoalesce(O.path, () => ([])),O.key].join(".")))}))}return U}async function BT(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,ho,{requestEnricherId:e})}async function zT(t,e){await l(t,ss,{input:e})}var Au=[...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?_chunk4U57O4PScjs.c.call(void 0, Au,e.regionBlockList):e.regionList,regionDetectionMethod:e.regionDetectionMethod}})}async function Iu(t,e){let r={title:e.title,description:e.description||"",hidden:e.hidden||!1,productLine:e.productLine},{createActionItemCollection:n}=await l(t,Wo,{input:r});return n.created}async function Su(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 $t(t),i=_chunk4U57O4PScjs.e.call(void 0, n,"title"),s=e.filter(p=>!i[p.title]);await _bluebird.mapSeries.call(void 0, s,async p=>{try{await Iu(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', _54 => _54[p.title], 'optionalAccess', _55 => _55.id])]).filter(p=>!!p[1]);return await _bluebird.mapSeries.call(void 0, o,async([p,c])=>{try{await Su(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 Tu(t,e,r,n={}){let i=_chunk4U57O4PScjs.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 Pu(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 Eu({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([pr(t),$t(t),n?Pt(t):[]]),p=_chunk4U57O4PScjs.e.call(void 0, s,"title"),c=_chunk4U57O4PScjs.e.call(void 0, i,Eu),u=_chunk4U57O4PScjs.e.call(void 0, o,"name"),d=_chunk4U57O4PScjs.e.call(void 0, i.filter(g=>!!g.customerExperienceActionItemIds),({customerExperienceActionItemIds:g})=>g[0]),m=_chunk4U57O4PScjs.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 Tu(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', _56 => _56[gp(g)], 'optionalAccess', _57 => _57.id])||_optionalChain([d, 'access', _58 => _58[g.customerExperienceActionItemId], 'optionalAccess', _59 => _59.id])]).filter(g=>!!g[1]);return await _bluebird.mapSeries.call(void 0, y,async([g,I])=>{try{await Pu(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 bu(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 wu(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 cr(t),i=_chunk4U57O4PScjs.e.call(void 0, n,"name"),s=e.filter(o=>!i[o.name]);await _bluebird.mapSeries.call(void 0, s,async o=>{try{let p=await bu(t,o);i[p.name]=p,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced agent 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 wu(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 xu(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 Du(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 ur(t),i=_chunk4U57O4PScjs.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 xu(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 Du(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 Lu(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 vu(t,e){await l(t,Hs,{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 mr(t),i=_chunk4U57O4PScjs.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 Lu(t,o);i[p.name]=p,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced agent "${o.name}"!`))}catch(p){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync agent "${o.name}"! - ${p.message}`))}});try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${e.length}" agents!`)),await vu(t,e.map(o=>[o,i[o.name].id])),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced "${e.length}" agents!`))}catch(o){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync "${e.length}" agents ! - ${o.message}`))}return!r}async function 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=_chunk4U57O4PScjs.e.call(void 0, _optionalChain([r, 'optionalAccess', _60 => _60.values])||[],"name"),{existingValues:p=[],newValues:c=[]}=_chunk4U57O4PScjs.d.call(void 0, e.values||[],d=>o[d.name]?"existingValues":"newValues"),u=_chunk4U57O4PScjs.c.call(void 0, (_optionalChain([r, 'optionalAccess', _61 => _61.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 _u(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=_chunk4U57O4PScjs.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 dr(t),i=_chunk4U57O4PScjs.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 _u(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 en=20;async function Ep(t){let e=[],r=0,n=!1;do{let{codePackages:{nodes:i}}=await l(t,ro,{first:en,offset:r});e.push(...i),r+=en,n=i.length===en}while(n);return e.sort((i,s)=>i.name.localeCompare(s.name))}var tn=20;async function Rp(t){let e=[],r=0,n=!1;do{let{softwareDevelopmentKits:{nodes:i}}=await l(t,Xn,{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 Mu=100;async function Fu(t,e){let{createSoftwareDevelopmentKit:{softwareDevelopmentKit:r}}=await l(t,to,{input:e});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created software development kit "${e.name}"!`)),r}async function Uu(t,e){let{updateSoftwareDevelopmentKits:{softwareDevelopmentKits:r}}=await l(t,eo,{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=_chunk4U57O4PScjs.e.call(void 0, s,({name:m,codePackageType:f})=>JSON.stringify({name:m,codePackageType:f})),p=e.map(m=>[m,_optionalChain([o, 'access', _62 => _62[JSON.stringify({name:m.name,codePackageType:m.codePackageType})], 'optionalAccess', _63 => _63.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 Fu(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=_chunk4U57O4PScjs.b.call(void 0, u,Mu);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 Uu(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 rn=20;async function wp(t){let e=[],r=0,n=!1;do{let{repositories:{nodes:i}}=await l(t,Mn,{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 Vu=100;async function Ku(t,e){let{createRepository:{repository:r}}=await l(t,Un,{input:e});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created repository "${e.name}"!`)),r}async function ju(t,e){let{updateRepositories:{repositories:r}}=await l(t,Fn,{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=_chunk4U57O4PScjs.e.call(void 0, s,"name"),p=e.map(m=>[m,_optionalChain([o, 'access', _64 => _64[m.name], 'optionalAccess', _65 => _65.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 Ku(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=_chunk4U57O4PScjs.b.call(void 0, u,Vu);return _chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${u.length}" repositories...`)),await _bluebird.mapSeries.call(void 0, d,async m=>{try{let f=await ju(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 zu=100,vt="%%%%";async function Hu(t,e){let{createCodePackage:{codePackage:r}}=await l(t,no,{input:e});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created code package "${e.name}"!`)),r}async function Wu(t,e){let{updateCodePackages:{codePackages:r}}=await l(t,io,{input:{codePackages:e}});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully updated ${e.length} code packages!`)),r}async function HE(t,e,r=20){let n=!1,[i,{softwareDevelopmentKits:s}]=await Promise.all([Ep(t),bp(t,_chunk4U57O4PScjs.k.call(void 0, e.map(({type:f,softwareDevelopmentKits:y=[]})=>y.map(({name:g})=>({name:g,codePackageType:f}))).flat(),({name:f,codePackageType:y})=>`${f}${vt}${y}`),r),$p(t,_chunk4U57O4PScjs.k.call(void 0, e,"repositoryName").map(({repositoryName:f})=>({name:f,url:`https://github.com/${f}`})))]),o=_chunk4U57O4PScjs.e.call(void 0, s,({name:f,codePackageType:y})=>`${f}${vt}${y}`),p=_chunk4U57O4PScjs.e.call(void 0, i,({name:f,type:y})=>`${f}${vt}${y}`),c=e.map(f=>[f,_optionalChain([p, 'access', _66 => _66[`${f.name}${vt}${f.type}`], 'optionalAccess', _67 => _67.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:_chunk4U57O4PScjs.j.call(void 0, f.map(({name:g})=>{let I=o[`${g}${vt}${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=_chunk4U57O4PScjs.b.call(void 0, d,zu);return await _bluebird.mapSeries.call(void 0, m,async f=>{try{await Wu(t,f.map(([{softwareDevelopmentKits:y,repositoryName:g,...I},E])=>({...I,...y?{softwareDevelopmentKitIds:_chunk4U57O4PScjs.j.call(void 0, y.map(({name:S})=>{let v=o[`${S}${vt}${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,_n,{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 Xu=100;async function em(t,e){let r=await $e(t);await _bluebird.mapSeries.call(void 0, _chunk4U57O4PScjs.b.call(void 0, e,Xu),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 em(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 tm(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 rm(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 Er(t),i=_chunk4U57O4PScjs.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 tm(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 rm(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,On,{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,Nn,{input:{id:r,active:e.active,skipPublish:n}})}async function nm(t,e){let{createPrompt:{prompt:r}}=await l(t,xo,{input:e});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created prompt "${e.title}"!`)),r.id}async function om(t,e){await l(t,$o,{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 wt(t),s=_chunk4U57O4PScjs.e.call(void 0, i,"title"),o=e.map(u=>[u,_optionalChain([s, 'access', _68 => _68[u.title], 'optionalAccess', _69 => _69.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 nm(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 om(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 am=100;async function pm(t,e){let r=await Rt(t);await _bluebird.mapSeries.call(void 0, _chunk4U57O4PScjs.b.call(void 0, e,am),async n=>{await l(t,po,{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 yr(t),s=_chunk4U57O4PScjs.e.call(void 0, i,({title:o})=>o.defaultMessage);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Upserting "${e.length}" new policies...`)),await pm(t,e.map(o=>[o,_optionalChain([s, 'access', _70 => _70[o.title], 'optionalAccess', _71 => _71.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 cm=100;async function um(t,e){await _bluebird.mapSeries.call(void 0, _chunk4U57O4PScjs.b.call(void 0, e,cm),async r=>{await l(t,go,{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 Gp(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 um(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 Op(t,e){let r=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Syncing privacy center..."));let n=await Rt(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 gm(t,e){let r=await fr(t),n=_chunk4U57O4PScjs.e.call(void 0, r,"name"),i=await Ar(t),s=_chunk4U57O4PScjs.e.call(void 0, i,"trackingType");await _bluebird.map.call(void 0, e,async(o,p)=>{let c=_optionalChain([o, 'access', _72 => _72.purposes, 'optionalAccess', _73 => _73.map, 'call', _74 => _74((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', _75 => _75.optedOutPurposes, 'optionalAccess', _76 => _76.map, 'call', _77 => _77((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 $e(t,1)}catch(n){if(n.message.includes("AirgapBundle not found")){let i=await Rt(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 gm(t,e.experiences),e.theme&&await l(t,$s,{input:{airgapBundleId:r,...e.theme}})}var Qp=100;async function ym(t,e,r=!1){let n=await $e(t);await _bluebird.mapSeries.call(void 0, _chunk4U57O4PScjs.b.call(void 0, e,Qp),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 hm(t,e,r=!1){let n=await $e(t);await _bluebird.mapSeries.call(void 0, _chunk4U57O4PScjs.b.call(void 0, e,Qp),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([Et(t,_privacytypes.ConsentTrackerStatus.Live),Et(t,_privacytypes.ConsentTrackerStatus.NeedsReview)]),p=[...s,...o],c=e.map(m=>[m,_optionalChain([p, 'access', _78 => _78.find, 'call', _79 => _79(f=>m.value===f.value&&m.type===f.type), 'optionalAccess', _80 => _80.id])]),u=c.filter(([,m])=>!m).map(([m])=>m);try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating "${u.length}" new data flows...`)),await hm(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 ym(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 Am(t,e){let{createPromptPartial:{promptPartial:r}}=await l(t,qo,{input:e});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created prompt partial "${e.title}"!`)),r.id}async function Im(t,e){await l(t,Do,{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 $r(t),s=_chunk4U57O4PScjs.e.call(void 0, i,"title"),o=e.map(u=>[u,_optionalChain([s, 'access', _81 => _81[u.title], 'optionalAccess', _82 => _82.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 Am(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 Im(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 Tm(t,e){let{createPromptGroup:{promptGroup:r}}=await l(t,vo,{input:e});return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created prompt group "${e.title}"!`)),r.id}async function Pm(t,e){await l(t,Lo,{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 wr(t),s=await wt(t),o=_chunk4U57O4PScjs.e.call(void 0, s,"title"),p=_chunk4U57O4PScjs.e.call(void 0, i,"title"),c=e.map(m=>[m,_optionalChain([p, 'access', _83 => _83[m.title], 'optionalAccess', _84 => _84.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 Tm(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 Pm(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 Rm(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 bm(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 Rr(t),i=_chunk4U57O4PScjs.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 Rm(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 bm(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 $m(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 xm(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 gr(t),i=_chunk4U57O4PScjs.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 $m(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 xm(t,e.map(o=>[o,i[`${o.name}:${o.category}`].id])),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced "${e.length}" data categories!`))}catch(o){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync "${e.length}" data categories ! - ${o.message}`))}return!r}async function qm(t,e){let r={name:e.name,purpose:e.purpose,description:e.description},{createProcessingPurposeSubCategory:n}=await l(t,ca,{input:r});return n.processingPurposeSubCategory}async function Lm(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 Cr(t),i=_chunk4U57O4PScjs.e.call(void 0, n,({name:o,purpose:p})=>`${o}:${p}`),s=e.filter(o=>!i[`${o.name}:${o.purpose}`]);await _bluebird.mapSeries.call(void 0, s,async o=>{try{let p=await qm(t,o);i[`${p.name}:${p.purpose}`]=p,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced processing purpose "${o.name}"!`))}catch(p){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync processing purpose "${o.name}"! - ${p.message}`))}});try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${e.length}" processing purposes!`)),await Lm(t,e.map(o=>[o,i[`${o.name}:${o.purpose}`].id])),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced "${e.length}" processing purposes!`))}catch(o){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync "${e.length}" processing purposes ! - ${o.message}`))}return!r}async function km(t,e){let r={title:e.title,description:e.description},{createProcessingActivity:n}=await l(t,da,{input:r});return n.processingActivity}async function _m(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', _85 => _85.map, 'call', _86 => _86(({category:c,name:u})=>({category:c,name:_nullishCoalesce(u, () => (""))}))]),processingPurposeSubCategoryInputs:_optionalChain([n, 'optionalAccess', _87 => _87.map, 'call', _88 => _88(({purpose:c,name:u})=>({purpose:c,name:_nullishCoalesce(u, () => ("Other"))}))]),saaSCategoryTitles:s,...o,id:p}))}})}async function Hp(t,e){let r=!1;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${e.length}" processing activities...`));let n=await hr(t),i=_chunk4U57O4PScjs.e.call(void 0, n,"title"),s=e.filter(o=>!i[o.title]);s.length>0&&_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating "${s.length}" new processing activities...`)),await _bluebird.mapSeries.call(void 0, s,async o=>{try{let p=await km(t,o);i[p.title]=p,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created processing activity "${o.title}"!`))}catch(p){r=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to create processing activity "${o.title}"! - ${p.message}`))}});try{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Updating "${e.length}" processing activities!`)),await _m(t,e.map(o=>[o,_optionalChain([i, 'access', _89 => _89[o.title], 'optionalAccess', _90 => _90.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 Nt=10;async function t$(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:z,"agent-functions":V,"agent-files":ne,vendors:H,"data-categories":le,"processing-activities":pe,"processing-purposes":W,"action-items":ye,"action-item-collections":he,teams:se,"privacy-center":ce,messages:be,policies:Ge,partitions:qe}=t,[Te,Ce,Ee]=await Promise.all([y||d?Za(t,e,!n):{},E||m||y||pe?Ka(t,e):{},E&&E.map(A=>A["api-key-title"]||[]).reduce((A,_)=>A+_.length,0)>0?br(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(se){let A=await Lp(e,se);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:Nt}),_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(le){let A=await Zp(e,le);o=o||!A}if(W){let A=await zp(e,W);o=o||!A}if(qe){let A=await lp(e,qe);o=o||!A}if(z){let A=await Ip(e,z);o=o||!A}if(V){let A=await Ap(e,V);o=o||!A}if(ne){let A=await Cp(e,ne);o=o||!A}if(g){let A=await Dp(e,g);o=o||!A}if(he){let A=await fp(e,he);o=o||!A}if(c){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${c.length}" attributes...`));let A=await Pt(e);await _bluebird.map.call(void 0, c,async _=>{let ue=A.find(me=>me.name===_.name);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing attribute "${_.name}"...`));try{await Sp(e,_,{existingAttribute:ue,deleteExtraAttributeValues:s}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced attribute "${_.name}"!`))}catch(me){o=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync attribute "${_.name}"! - ${me.message}`))}},{concurrency:Nt}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${c.length}" attributes!`))}if(ye){let A=await hp(e,ye);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:Ce}),_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:Nt}),_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:Ce,identifierId:_.id,skipPublish:!n}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced identifier "${A.type}"!`))}catch(ue){o=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync identifier "${A.type}"! - ${ue.message}`))}},{concurrency:Nt}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${d.length}" identifiers!`))),u){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Syncing "${u.length}" actions...`));let A=await lr(e);await _bluebird.map.call(void 0, u,async _=>{let ue=A.find(me=>me.type===_.type);if(!ue)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:ue.id,skipPublish:!n}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced action "${_.type}"!`))}catch(me){o=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync action "${_.type}"! - ${me.message}`))}},{concurrency:Nt}),_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 jt(e);await _bluebird.map.call(void 0, m,async _=>{let ue=A.find(me=>me.type===_.type);if(!ue)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:ue.id,skipPublish:!n}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced data subject "${_.type}"!`))}catch(me){o=!0,_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Failed to sync data subject "${_.type}"! - ${me.message}`))}},{concurrency:Nt}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Synced "${m.length}" data subjects!`))}if(S){let A=await Vp(e,S,i);o=o||!A}if(ce){let A=await Op(e,ce);o=o||!A}if(be){let A=await Gp(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:Ce,apiKeysByTitle:Ee,pageSize:r});_optionalChain([E, 'optionalAccess', _91 => _91.forEach, 'call', _92 => _92(ue=>{ue["deletion-dependencies"]&&Ze.push([_[ue.title],ue["deletion-dependencies"]])})]),o=o||!A}if(Ze.length>0&&await np(e,Ze),pe){let A=await Hp(e,pe);o=o||!A}return o}var Om=1e3;async function a$(t,e,r){let n=_chunk4U57O4PScjs.b.call(void 0, r,Om);await _bluebird.mapSeries.call(void 0, n,async i=>{await l(t,jn,{pluginId:e,rawResults:i})})}async function Xx({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=_chunk4U57O4PScjs.r}){let c=Y(p,e),u=new Date().getTime(),d=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),m=await ae(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,Ct,{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, At).filter(i=>!e.getValue("columnNames",i)),n=r.length===0?{}:await _inquirer2.default.prompt(r.map(i=>{let s=_chunk4U57O4PScjs.h.call(void 0, i.replace("ColumnName","")),o=St(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,rr);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for request action"));let o=await mt(We(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(We(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(We(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===j?{}:await mt(We(e,u),[...Object.values(_privacytypes.CompletedRequestStatus),j],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===j?{}:await mt(We(e,m),[...Object.values(_privacytypes.IsoCountryCode),j],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===j?{}:await mt(We(e,y),[...Object.values(_privacytypes.IsoCountrySubdivisionCode),j],r.getValue("regionToCountrySubDivision"));await r.setValue(g,"regionToCountrySubDivision")}var _iotstypes = require('io-ts-types');var ed=oe.record(oe.string,oe.array(oe.intersection([oe.type({value:oe.string}),oe.partial({name:oe.string})]))),$D= exports.lf =oe.intersection([oe.type({email:oe.string,attestedExtraIdentifiers:ed,coreIdentifier:oe.string,requestType:_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction),subjectType:oe.string}),oe.partial({country:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode),countrySubDivision:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode),attributes:oe.array(Pa),status:_typeutils.valuesOf.call(void 0, _privacytypes.CompletedRequestStatus),createdAt:_iotstypes.DateFromISOString,dataSiloIds:oe.array(oe.string),locale:_typeutils.valuesOf.call(void 0, _internationalization.LanguageKey)})]);function td(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!==j).forEach(([y,g])=>{let I=Object.values(_privacytypes.IdentifierType).includes(y)?y:_privacytypes.IdentifierType.Custom,E=c[g];if(E){let S=td(E,I,o);S&&(u[I]||(u[I]=[]),u[I].push({value:S,name:y}))}});let d=[];Object.entries(i).filter(([,y])=>y!==j).forEach(([y,g])=>{let I=c[g];if(I){let E=_optionalChain([s, 'access', _93 => _93.find, 'call', _94 => _94(S=>S.name===y), 'optionalAccess', _95 => _95.type])==="MULTI_SELECT";d.push({values:E?pi(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===Vt?e.getValue("requestTypeToRequestAction",ai):e.getValue("requestTypeToRequestAction",c[m]),subjectType:f===Vt?e.getValue("subjectTypeToSubjectName",ai):e.getValue("subjectTypeToSubjectName",c[f]),...p("locale")!==j&&c[p("locale")]?{locale:e.getValue("languageToLocale",c[p("locale")])}:{},...p("country")!==j&&c[p("country")]?{country:e.getValue("regionToCountry",c[p("country")])}:{},...p("countrySubDivision")!==j&&c[p("countrySubDivision")]?{countrySubDivision:e.getValue("regionToCountrySubDivision",c[p("countrySubDivision")])}:{},...p("requestStatus")!==j&&e.getValue("statusToRequestStatus",c[p("requestStatus")])!==j&&c[p("requestStatus")]?{status:e.getValue("statusToRequestStatus",c[p("requestStatus")])}:{},...p("createdAt")!==j&&c[p("createdAt")]?{createdAt:new Date(c[p("createdAt")])}:{},...p("dataSiloIds")!==j&&c[p("dataSiloIds")]?{dataSiloIds:pi(c[p("dataSiloIds")])}:{}}]})}var _path = require('path');var nl=$.type({defaultMessage:$.string,id:$.string}),sd= exports.pf =$.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)})}),ad= exports.qf =$.type({nodes:$.array(sd),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, ad,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', _96 => _96.response, 'optionalAccess', _97 => _97.body])||_optionalChain([I, 'optionalAccess', _98 => _98.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', _99 => _99.response, 'optionalAccess', _100 => _100.body, 'optionalAccess', _101 => _101.includes, 'call', _102 => _102("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', _103 => _103.response, 'optionalAccess', _104 => _104.body])||_optionalChain([o, 'optionalAccess', _105 => _105.message])}`)}},{concurrency:i})}async function JD({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=_chunk4U57O4PScjs.r,approveAfterDownload:u=!1}){let d=Y(c,t),m=await nt(c,t,i);_fs.existsSync.call(void 0, e)||_fs.mkdirSync.call(void 0, e);let f=await ae(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,z])=>{let V=_path.join.call(void 0, e,k.id);_fs.existsSync.call(void 0, V)||_fs.mkdirSync.call(void 0, V),await sl(z,{sombra:m,requestId:k.id,onFileDownloaded:(ne,H)=>{let le=_path.join.call(void 0, V,ne.fileName),pe=_path.dirname.call(void 0, le);_fs.existsSync.call(void 0, pe)||_fs.mkdirSync.call(void 0, pe,{recursive:!0}),_fs.writeFileSync.call(void 0, le,H)}}),u&&k.status===_privacytypes.RequestStatus.Approving&&(await l(d,ir,{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 pn=ee.type({id:ee.string,link:ee.string,status:_typeutils.valuesOf.call(void 0, _privacytypes.RequestStatus),type:_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction),subjectType:ee.string,email:ee.union([ee.null,ee.string]),coreIdentifier:ee.string,isSilent:ee.boolean,isTest:ee.boolean,country:ee.union([ee.null,_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode)]),countrySubDivision:ee.union([ee.null,_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode)]),attributeValues:ee.array(ee.type({attributeKey:ee.type({name:ee.string}),name:ee.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=_chunk4U57O4PScjs.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', _106 => _106.response, 'optionalAccess', _107 => _107.body])||_optionalChain([m, 'optionalAccess', _108 => _108.message])}`)}let{request:d}=_typeutils.decodeCodec.call(void 0, ee.type({request:pn}),u);return d}async function dq({requestActions:t,requestOrigins:e,auth:r,silentModeBefore:n,createdAtAfter:i,createdAtBefore:s,concurrency:o=50,transcendUrl:p=_chunk4U57O4PScjs.r}){let c=Y(p,r),u=new Date().getTime(),d=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),m=await ae(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,Ct,{input:{id:E.id,isSilent:!0}});try{await l(c,ir,{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 Tq({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=_chunk4U57O4PScjs.r}){let d=Y(u,e),m=new Date().getTime(),f=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),g=(await ft(d,p)).find(C=>C.title===p);if(!g)throw new Error(`Failed to find a template with title: "${p}"`);let I=await ae(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,uo,{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,$n),i=n.identifiers.filter(({name:o})=>!r.getValue("identifierNames",o)&&!sr.includes(o)),s=i.length===0?{}:await _inquirer2.default.prompt(i.map(({name:o})=>{let p=St(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 Fq({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=_chunk4U57O4PScjs.r}){let d=Y(u,r),m=new Date().getTime(),f=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),y;if(e){let C=(await ft(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 ae(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,Ct,{input:{id:v.id,isSilent:!0}}),await l(d,co,{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=St(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 mL({cacheFilepath:t,requestReceiptFolder:e,file:r,auth:n,sombraAuth:i,concurrency:s=100,defaultPhoneCountryCode:o="1",transcendUrl:p=_chunk4U57O4PScjs.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")),z=new (0, _persistedstate.PersistedState)(k,Aa,{successfulRequests:[],duplicateRequests:[],failingRequests:[]}),V=await nt(p,n,i),ne=ba(r,Jt.record(Jt.string,Jt.string)),H=_chunk4U57O4PScjs.j.call(void 0, ne.map(Te=>Object.keys(Te)).flat());if(ne.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=ne[0];_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`First request: ${JSON.stringify(Te,null,2)}`))}let le=d?ne:await $a(ne),pe=Y(p,n),W=await qa(pe),ye=await Xp(H,C),he=await fl(pe,H,C),se=await hl(pe,H,C,W);await el(pe,le,{state:C,columnNameMap:ye});let ce=tl(le,C,{defaultPhoneCountryCode:o,columnNameMap:ye,identifierNameMap:he,attributeNameMap:se,requestAttributeKeys:W});g||S.start(ce.length,0);let be=0;await _bluebird.map.call(void 0, ce,async([Te,Ce],Ee)=>{let Ze=g?`email:${Ce.email} | coreIdentifier:${Ce.coreIdentifier}`:`row:${Ee.toString()}`;if(g&&_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`[${Ee+1}/${ce.length}] Importing: ${JSON.stringify(Ce,null,2)}`)),I){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Bailing out on dry run because dryRun is set"));return}try{let A=await cl(V,Ce,{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}/${ce.length}] Successfully submitted the test data subject request: "${Ze}"`)),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`[${Ee+1}/${ce.length}] View it at: "${A.link}"`)));let _=z.getValue("successfulRequests");_.push({id:A.id,link:A.link,rowIndex:Ee,coreIdentifier:A.coreIdentifier,attemptedAt:new Date().toISOString()}),await z.setValue(_,"successfulRequests")}catch(A){let _=`${A.message} - ${JSON.stringify(_optionalChain([A, 'access', _109 => _109.response, 'optionalAccess', _110 => _110.body]),null,2)}`,ue=_r(_);if(ue==="Client error: You have already made this request."){g&&_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`[${Ee+1}/${ce.length}] Skipping request as it is a duplicate`));let me=z.getValue("duplicateRequests");me.push({coreIdentifier:Ce.coreIdentifier,rowIndex:Ee,attemptedAt:new Date().toISOString()}),await z.setValue(me,"duplicateRequests")}else{let me=z.getValue("failingRequests");me.push({...Ce,rowIndex:Ee,error:ue||_,attemptedAt:new Date().toISOString()}),await z.setValue(me,"failingRequests"),g&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(ue||_)),_chunkZUNVPK23cjs.a.error(_colors2.default.red(`[${Ee+1}/${ce.length}] Failed to submit request for: "${Ze}"`)))}}be+=1,g||S.update(be)},{concurrency:s}),S.stop();let qe=new Date().getTime()-E;_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Completed upload in "${qe/1e3}" seconds.`)),z.getValue("duplicateRequests").length>0&&_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`Encountered "${z.getValue("duplicateRequests").length}" duplicate requests. See "${k}" to review the core identifiers for these requests.`)),z.getValue("failingRequests").length>0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Encountered "${z.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, _chunk4U57O4PScjs.d.call(void 0, s.filter(c=>!(c.name==="email"&&c.value===e.email)&&!sr.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:pn}),o);return p}var vd=Ye.intersection([ar,Ye.type({error:Ye.string})]),kd=Ye.type({restartedRequests:Ye.array(ar),failingRequests:Ye.array(vd)});async function LL({requestReceiptFolder:t,auth:e,sombraAuth:r,requestActions:n,requestStatuses:i,createdAtBefore:s,createdAtAfter:o,transcendUrl:p=_chunk4U57O4PScjs.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,kd,{restartedRequests:[],failingRequests:[]}),k=await nt(p,e,r),z=Y(p,e),ne=(await ae(z,{actions:n,statuses:i,createdAtBefore:s,createdAtAfter:o})).filter(W=>new Date(W.createdAt)<u);if(_chunkZUNVPK23cjs.a.info(`Found ${ne.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!==ne.length){let W=_chunk4U57O4PScjs.c.call(void 0, c,ne.map(({id:ye})=>ye));W.length>0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to find the following requests by ID: ${W.join(",")}.`)),process.exit(1))}let H=0;S.start(ne.length,0),await _bluebird.map.call(void 0, ne,async(W,ye)=>{try{let he=y?await Sr(z,k,{requestId:W.id}):[],se=await Tl(k,{...W,isSilent:d&&new Date(W.createdAt)<d?!0:W.isSilent},{requestIdentifiers:he,skipWaitingPeriod:g,sendEmailReceipt:m,emailIsVerified:f}),ce=C.getValue("restartedRequests");ce.push({id:se.id,link:se.link,rowIndex:ye,coreIdentifier:se.coreIdentifier,attemptedAt:new Date().toISOString()}),await C.setValue(ce,"restartedRequests")}catch(he){let se=`${he.message} - ${JSON.stringify(_optionalChain([he, 'access', _111 => _111.response, 'optionalAccess', _112 => _112.body]),null,2)}`,ce=_r(se),be=C.getValue("failingRequests");be.push({id:W.id,link:W.link,rowIndex:ye,coreIdentifier:W.coreIdentifier,attemptedAt:new Date().toISOString(),error:ce||se}),await C.setValue(be,"failingRequests")}H+=1,S.update(H)},{concurrency:I}),S.stop();let pe=new Date().getTime()-E;_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Completed restarting of requests in "${pe/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 UL({enricherIds:t,auth:e,concurrency:r=100,transcendUrl:n=_chunk4U57O4PScjs.r}){let i=Y(n,e),s=new Date().getTime(),o=await ae(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 Ir(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,Co,{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 JL({auth:t,requestActions:e=[],createdAtBefore:r,createdAtAfter:n,transcendUrl:i=_chunk4U57O4PScjs.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=Y(i,t);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Fetching requests to restart..."));let f=await ae(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=_chunk4U57O4PScjs.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 Ir(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 pv({requestActions:t,dataSiloId:e,auth:r,concurrency:n=20,transcendUrl:i=_chunk4U57O4PScjs.r}){let s=Y(i,r),o=new Date().getTime(),p=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),c=await ae(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,Go,{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 Cv({auth:t,sombraAuth:e,actions:r=[],statuses:n=[],identifierSearch:i,pageLimit:s=100,transcendUrl:o=_chunk4U57O4PScjs.r,createdAtBefore:p,createdAtAfter:c,isTest:u}){let d=Y(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 ae(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 Sr(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:z,subjectType:V,details:ne,createdAt:H,country:le,locale:pe,origin:W,countrySubDivision:ye,isSilent:he,isTest:se,coreIdentifier:ce,...be})=>({"Request ID":v,"Created At":H,Email:C,"Core Identifier":ce,"Request Type":k,"Data Subject Type":V,Status:z,Country:le,"Country Sub Division":ye,Details:ne,Origin:W,"Silent Mode":he,"Is Test Request":se,Language:pe,...be,...Object.entries(_chunk4U57O4PScjs.d.call(void 0, E,"attributeKey.name")).reduce((Ge,[qe,Te])=>Object.assign(Ge,{[qe]:Te.map(({name:Ce})=>Ce).join(",")}),{}),...Object.entries(_chunk4U57O4PScjs.d.call(void 0, S,"name")).reduce((Ge,[qe,Te])=>Object.assign(Ge,{[qe]:Te.map(({value:Ce})=>Ce).join(",")}),{})}));return{requestsWithRequestIdentifiers:g,requestsFormattedForCsv:I}}async function wv({dataSiloId:t,auth:e,concurrency:r=100,status:n="SKIPPED",transcendUrl:i=_chunk4U57O4PScjs.r,requestStatuses:s=[_privacytypes.RequestStatus.Compiling,_privacytypes.RequestStatus.Secondary]}){let o=Y(i,e),p=new Date().getTime(),c=await Qi(o,{dataSiloId:t,requestStatuses:s});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Processing data silo: "${t}" marking "${c.length}" requests as skipped.`));let u=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),d=0;u.start(c.length,0),await _bluebird.map.call(void 0, c,async y=>{try{await l(o,_o,{requestDataSiloId:y.id,status:n})}catch(g){if(!g.message.includes("Client error: Request must be active:"))throw g}d+=1,u.update(d)},{concurrency:r}),u.stop();let f=new Date().getTime()-p;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully skipped "${c.length}" requests in "${f/1e3}" seconds!`)),c.length}async function Ov({requestActions:t,identifierNames:e,auth:r,concurrency:n=20,transcendUrl:i=_chunk4U57O4PScjs.r}){let s=Y(i,r),o=new Date().getTime(),p=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),c=await ae(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,Bo,{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 Ik({message:t}){let{response:e}=await _inquirer2.default.prompt([{name:"response",message:t,type:"confirm"}]);return e}async function Sk({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 Tk({defaultValue:t,values:e,message:r}){_inquirer2.default.registerPrompt("autocomplete",_inquirerautocompleteprompt2.default);let{response:n}=await _inquirer2.default.prompt([{name:"response",message:r,type:"autocomplete",default:t,source:(i,s)=>s?e.filter(o=>typeof o=="string"&&It(s,o)):e}]);return n}function Ek(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', _113 => _113.response, 'optionalAccess', _114 => _114.statusCode]), () => (_optionalChain([e, 'optionalAccess', _115 => _115.response, 'optionalAccess', _116 => _116.status])))}function Ml(t){let e=t,r=_optionalChain([e, 'optionalAccess', _117 => _117.response, 'optionalAccess', _118 => _118.body])||_optionalChain([e, 'optionalAccess', _119 => _119.message])||"Unknown error";try{let n=JSON.parse(r),i=n.errors||_optionalChain([n, 'access', _120 => _120.error, 'optionalAccess', _121 => _121.errors])||[_optionalChain([n, 'access', _122 => _122.error, 'optionalAccess', _123 => _123.message])||n.error];r=(Array.isArray(i)?i:[i]).filter(Boolean).join(", ")}catch (e2){}return r}function Or(t){return new Promise(e=>{setTimeout(()=>e(t),t)})}function xk(t){let e=Math.floor(t.length/2);return[t.slice(0,e),t.slice(e)]}async function kk(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 Or(e.delayMs)}}function Gk(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 Fk(t){try{return t?_fs.readFileSync.call(void 0, t,"utf8"):""}catch (e3){return""}}var Yd=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=Yd){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', _124 => _124.response, 'access', _125 => _125.headers, 'optionalAccess', _126 => _126.get, 'call', _127 => _127("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 Or(c)}if(s>=i)throw o;s+=1,_chunkZUNVPK23cjs.a.log(_colors2.default.yellow(`REQUEST FAILED: ${o.message}. Retrying ${s}/${i}...`))}}async function a_(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 = In; exports.b = Hd; exports.c = Sn; exports.d = Wd; exports.e = Tn; exports.f = Pn; exports.g = Jd; exports.h = tf; exports.i = En; exports.j = of; exports.k = Rn; exports.l = Ur; exports.m = bn; exports.n = wn; exports.o = $n; exports.p = xn; exports.q = Dn; exports.r = qn; exports.s = Ln; exports.t = vn; exports.u = kn; exports.v = _n; exports.w = rr; exports.x = Gn; exports.y = On; exports.z = Nn; exports.A = Mn; exports.B = Fn; exports.C = Un; exports.D = Bn; exports.E = Qn; exports.F = Vn; exports.G = jn; exports.H = Yn; exports.I = zn; exports.J = Hn; exports.K = Wn; exports.L = Jn; exports.M = Xn; exports.N = eo; exports.O = to; exports.P = ro; exports.Q = io; exports.R = no; exports.S = oo; exports.T = ao; exports.U = po; exports.V = lo; exports.W = ir; exports.X = co; exports.Y = Ct; exports.Z = uo; exports._ = fo; exports.$ = go; exports.aa = yo; exports.ba = ho; exports.ca = Co; exports.da = Yr; exports.ea = Io; exports.fa = Bf; exports.ga = So; exports.ha = To; exports.ia = Po; exports.ja = Eo; exports.ka = Ro; exports.la = bo; exports.ma = wo; exports.na = $o; exports.oa = xo; exports.pa = Do; exports.qa = qo; exports.ra = Lo; exports.sa = vo; exports.ta = ko; exports.ua = _o; exports.va = Go; exports.wa = Oo; exports.xa = No; exports.ya = Mo; exports.za = Fo; exports.Aa = Bo; exports.Ba = Qo; exports.Ca = Vo; exports.Da = pg; exports.Ea = jo; exports.Fa = Zo; exports.Ga = zo; exports.Ha = Ho; exports.Ia = Wo; 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 = Os; exports.ub = Ns; exports.vb = Ms; exports.wb = Fs; exports.xb = Us; exports.yb = Bs; exports.zb = Qs; exports.Ab = Vs; exports.Bb = Ks; exports.Cb = Xr; exports.Db = js; exports.Eb = Ys; exports.Fb = qg; exports.Gb = Zs; exports.Hb = zs; exports.Ib = Hs; exports.Jb = Ws; 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 = j; exports.bc = Vt; exports.cc = ai; exports.dc = sr; exports.ec = At; exports.fc = ya; exports.gc = ha; exports.hc = Ca; exports.ic = ar; exports.jc = Aa; exports.kc = It; exports.lc = St; exports.mc = mt; exports.nc = pi; exports.oc = Pa; exports.pc = Ea; exports.qc = ba; exports.rc = We; exports.sc = $a; exports.tc = a_; exports.uc = $c; exports.vc = Y; exports.wc = nt; exports.xc = kh; exports.yc = Nh; exports.zc = Mh; exports.Ac = Vh; exports.Bc = pr; exports.Cc = lr; exports.Dc = cr; exports.Ec = ur; exports.Fc = mr; exports.Gc = xa; exports.Hc = Da; exports.Ic = qa; exports.Jc = qc; exports.Kc = Lc; exports.Lc = Pt; exports.Mc = dr; exports.Nc = ka; exports.Oc = $e; exports.Pc = fr; exports.Qc = vc; exports.Rc = $C; exports.Sc = _a; exports.Tc = Ii; exports.Uc = gr; exports.Vc = Et; exports.Wc = Oa; exports.Xc = Kt; exports.Yc = Rt; exports.Zc = yr; exports._c = De; exports.$c = Na; exports.ad = Ma; exports.bd = hr; exports.cd = Cr; exports.dd = Ar; exports.ed = Fa; exports.fd = Ir; exports.gd = Ua; exports.hd = Fc; exports.id = Sr; exports.jd = VA; exports.kd = ae; exports.ld = Er; exports.md = WA; exports.nd = Rr; exports.od = Zc; exports.pd = br; exports.qd = zc; exports.rd = cI; exports.sd = jt; exports.td = Ka; exports.ud = ja; exports.vd = Ya; exports.wd = wr; exports.xd = $r; exports.yd = wt; exports.zd = kI; exports.Ad = NI; exports.Bd = Qi; exports.Cd = Wa; exports.Dd = ZI; exports.Ed = JI; exports.Fd = rS; exports.Gd = iS; exports.Hd = aS; exports.Id = pS; exports.Jd = Ja; exports.Kd = ru; exports.Ld = iu; exports.Md = Ki; exports.Nd = au; exports.Od = ji; exports.Pd = tp; exports.Qd = lu; exports.Rd = cu; exports.Sd = rp; exports.Td = ip; exports.Ud = np; exports.Vd = zi; exports.Wd = sp; exports.Xd = ft; exports.Yd = ap; exports.Zd = Zt; exports._d = lp; exports.$d = yu; exports.ae = NT; exports.be = BT; exports.ce = up; exports.de = zT; exports.ee = mp; exports.fe = Iu; exports.ge = Su; exports.he = fp; exports.ie = Tu; exports.je = Pu; exports.ke = hp; exports.le = bu; exports.me = wu; exports.ne = Cp; exports.oe = xu; exports.pe = Du; exports.qe = Ap; exports.re = Lu; exports.se = vu; exports.te = Ip; exports.ue = Sp; exports.ve = _u; exports.we = Gu; exports.xe = Pp; exports.ye = Fu; exports.ze = Uu; exports.Ae = bp; exports.Be = Ku; exports.Ce = ju; exports.De = $p; exports.Ee = Hu; exports.Fe = Wu; exports.Ge = HE; exports.He = gm; exports.Ie = Fp; exports.Je = em; exports.Ke = Dp; exports.Le = $m; exports.Me = xm; exports.Ne = Zp; exports.Oe = ym; exports.Pe = hm; exports.Qe = Vp; exports.Re = vp; exports.Se = xp; exports.Te = um; exports.Ue = Gp; exports.Ve = pm; exports.We = _p; exports.Xe = Op; exports.Ye = Hp; exports.Ze = qm; exports._e = Lm; exports.$e = zp; exports.af = nm; exports.bf = om; exports.cf = kp; exports.df = Rm; exports.ef = bm; exports.ff = Yp; exports.gf = a$; exports.hf = Xx; exports.if = Xp; exports.jf = el; exports.kf = ed; exports.lf = $D; exports.mf = td; exports.nf = tl; exports.of = nl; exports.pf = sd; exports.qf = ad; exports.rf = ol; exports.sf = sl; exports.tf = JD; exports.uf = pn; exports.vf = cl; exports.wf = dq; exports.xf = Tq; exports.yf = fl; exports.zf = Fq; exports.Af = hl; exports.Bf = _r; exports.Cf = mL; exports.Df = Tl; exports.Ef = LL; exports.Ff = UL; exports.Gf = JL; exports.Hf = pv; exports.If = Cv; exports.Jf = wv; exports.Kf = Ov; exports.Lf = Ik; exports.Mf = Sk; exports.Nf = Tk; exports.Of = Ek; exports.Pf = Nl; exports.Qf = Ml; exports.Rf = Or; exports.Sf = xk; exports.Tf = kk; exports.Uf = Gk; exports.Vf = Fl; exports.Wf = Fk; exports.Xf = l; exports.Yf = Ni; exports.Zf = Za; exports._f = t$;
2920
- //# sourceMappingURL=chunk-EMB64AC3.cjs.map