@transcend-io/cli 8.1.1 → 8.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/README.md +2 -49
  2. package/dist/bin/bash-complete.cjs +1 -1
  3. package/dist/bin/cli.cjs +1 -1
  4. package/dist/bin/deprecated-command.cjs +2 -2
  5. package/dist/{chunk-QRDYTLVB.cjs → chunk-72QC4R7P.cjs} +2 -2
  6. package/dist/{chunk-QRDYTLVB.cjs.map → chunk-72QC4R7P.cjs.map} +1 -1
  7. package/dist/chunk-BIBIE2IP.cjs +2920 -0
  8. package/dist/{chunk-QPIUQDJ6.cjs.map → chunk-BIBIE2IP.cjs.map} +1 -1
  9. package/dist/{chunk-NC5QVXJW.cjs → chunk-DC2JALFL.cjs} +2 -2
  10. package/dist/{chunk-NC5QVXJW.cjs.map → chunk-DC2JALFL.cjs.map} +1 -1
  11. package/dist/{chunk-MRXBJEKL.cjs → chunk-F3MDX5XS.cjs} +20 -20
  12. package/dist/{chunk-MRXBJEKL.cjs.map → chunk-F3MDX5XS.cjs.map} +1 -1
  13. package/dist/{chunk-W6BLSHVE.cjs → chunk-GGXJ7ADF.cjs} +4 -4
  14. package/dist/{chunk-W6BLSHVE.cjs.map → chunk-GGXJ7ADF.cjs.map} +1 -1
  15. package/dist/{chunk-XKYSQSRO.cjs → chunk-MOKWLFGF.cjs} +2 -2
  16. package/dist/{chunk-XKYSQSRO.cjs.map → chunk-MOKWLFGF.cjs.map} +1 -1
  17. package/dist/{chunk-6CS4GCJ4.cjs → chunk-S7H3R3EJ.cjs} +2 -2
  18. package/dist/{chunk-6CS4GCJ4.cjs.map → chunk-S7H3R3EJ.cjs.map} +1 -1
  19. package/dist/{chunk-BICC2LJL.cjs → chunk-S7MCQ2HA.cjs} +3 -3
  20. package/dist/{chunk-BICC2LJL.cjs.map → chunk-S7MCQ2HA.cjs.map} +1 -1
  21. package/dist/{chunk-MGAJ7ILD.cjs → chunk-TO4YF4PG.cjs} +2 -2
  22. package/dist/{chunk-MGAJ7ILD.cjs.map → chunk-TO4YF4PG.cjs.map} +1 -1
  23. package/dist/{chunk-HI7ACKKB.cjs → chunk-TTRWG6N7.cjs} +2 -2
  24. package/dist/{chunk-HI7ACKKB.cjs.map → chunk-TTRWG6N7.cjs.map} +1 -1
  25. package/dist/{chunk-IFAKI5FF.cjs → chunk-UKOA2VXP.cjs} +2 -2
  26. package/dist/{chunk-IFAKI5FF.cjs.map → chunk-UKOA2VXP.cjs.map} +1 -1
  27. package/dist/{chunk-DVJLLHL3.cjs → chunk-WCYLJBE6.cjs} +2 -2
  28. package/dist/{chunk-DVJLLHL3.cjs.map → chunk-WCYLJBE6.cjs.map} +1 -1
  29. package/dist/{impl-TSGEOZLY.cjs → impl-25CYSQ2S.cjs} +2 -2
  30. package/dist/{impl-TSGEOZLY.cjs.map → impl-25CYSQ2S.cjs.map} +1 -1
  31. package/dist/{impl-NOS3MDB5.cjs → impl-4PUK52ET.cjs} +2 -2
  32. package/dist/{impl-NOS3MDB5.cjs.map → impl-4PUK52ET.cjs.map} +1 -1
  33. package/dist/{impl-BKEVLUMO.cjs → impl-5XNZFDPF.cjs} +2 -2
  34. package/dist/{impl-BKEVLUMO.cjs.map → impl-5XNZFDPF.cjs.map} +1 -1
  35. package/dist/{impl-BRUSOMXU.cjs → impl-5YC5FIG4.cjs} +2 -2
  36. package/dist/{impl-BRUSOMXU.cjs.map → impl-5YC5FIG4.cjs.map} +1 -1
  37. package/dist/{impl-O6ZZ6G7V.cjs → impl-6KDOZGUK.cjs} +2 -2
  38. package/dist/{impl-O6ZZ6G7V.cjs.map → impl-6KDOZGUK.cjs.map} +1 -1
  39. package/dist/{impl-I3QZ2ZHY.cjs → impl-6WAXJHLE.cjs} +2 -2
  40. package/dist/{impl-I3QZ2ZHY.cjs.map → impl-6WAXJHLE.cjs.map} +1 -1
  41. package/dist/{impl-BUQ2V3WM.cjs → impl-6YSJBMNC.cjs} +2 -2
  42. package/dist/{impl-BUQ2V3WM.cjs.map → impl-6YSJBMNC.cjs.map} +1 -1
  43. package/dist/{impl-P3ZEQOP4.cjs → impl-77RKZROM.cjs} +2 -2
  44. package/dist/{impl-P3ZEQOP4.cjs.map → impl-77RKZROM.cjs.map} +1 -1
  45. package/dist/{impl-ZWNKU6OC.cjs → impl-7P2JYKPQ.cjs} +2 -2
  46. package/dist/{impl-ZWNKU6OC.cjs.map → impl-7P2JYKPQ.cjs.map} +1 -1
  47. package/dist/{impl-SWFUVUV6.cjs → impl-AFZIHZEH.cjs} +2 -2
  48. package/dist/{impl-SWFUVUV6.cjs.map → impl-AFZIHZEH.cjs.map} +1 -1
  49. package/dist/impl-AGDQ26NT.cjs +12 -0
  50. package/dist/impl-AGDQ26NT.cjs.map +1 -0
  51. package/dist/{impl-X2FXS267.cjs → impl-AJFT5WGX.cjs} +2 -2
  52. package/dist/{impl-X2FXS267.cjs.map → impl-AJFT5WGX.cjs.map} +1 -1
  53. package/dist/{impl-PE35IGX2.cjs → impl-COO2M22A.cjs} +2 -2
  54. package/dist/{impl-PE35IGX2.cjs.map → impl-COO2M22A.cjs.map} +1 -1
  55. package/dist/{impl-ED76NZLR.cjs → impl-EKDXIUCJ.cjs} +3 -3
  56. package/dist/{impl-ED76NZLR.cjs.map → impl-EKDXIUCJ.cjs.map} +1 -1
  57. package/dist/{impl-OXVQMF3C.cjs → impl-EQV6T4R5.cjs} +2 -2
  58. package/dist/{impl-OXVQMF3C.cjs.map → impl-EQV6T4R5.cjs.map} +1 -1
  59. package/dist/{impl-FRDPRLKI.cjs → impl-I344Y4YA.cjs} +2 -2
  60. package/dist/{impl-FRDPRLKI.cjs.map → impl-I344Y4YA.cjs.map} +1 -1
  61. package/dist/{impl-4VPFFGGS.cjs → impl-I7VPHXCY.cjs} +2 -2
  62. package/dist/{impl-4VPFFGGS.cjs.map → impl-I7VPHXCY.cjs.map} +1 -1
  63. package/dist/{impl-GDONPQQ6.cjs → impl-IIYZ245Q.cjs} +2 -2
  64. package/dist/{impl-GDONPQQ6.cjs.map → impl-IIYZ245Q.cjs.map} +1 -1
  65. package/dist/{impl-DDOPMEH6.cjs → impl-IN53IGZO.cjs} +5 -5
  66. package/dist/{impl-DDOPMEH6.cjs.map → impl-IN53IGZO.cjs.map} +1 -1
  67. package/dist/impl-J6ENLPL7.cjs +2 -0
  68. package/dist/{impl-UZTSGARM.cjs.map → impl-J6ENLPL7.cjs.map} +1 -1
  69. package/dist/{impl-US4VOSBF.cjs → impl-JFHI2O55.cjs} +4 -4
  70. package/dist/{impl-US4VOSBF.cjs.map → impl-JFHI2O55.cjs.map} +1 -1
  71. package/dist/{impl-LV5VZGGG.cjs → impl-JL3ILIXJ.cjs} +2 -2
  72. package/dist/{impl-LV5VZGGG.cjs.map → impl-JL3ILIXJ.cjs.map} +1 -1
  73. package/dist/{impl-LNF5A3IV.cjs → impl-KFA3AMJD.cjs} +2 -2
  74. package/dist/{impl-LNF5A3IV.cjs.map → impl-KFA3AMJD.cjs.map} +1 -1
  75. package/dist/{impl-6JRE252A.cjs → impl-KQMEFEGS.cjs} +2 -2
  76. package/dist/{impl-6JRE252A.cjs.map → impl-KQMEFEGS.cjs.map} +1 -1
  77. package/dist/{impl-LBJYOQEP.cjs → impl-M2FUD3PD.cjs} +2 -2
  78. package/dist/{impl-LBJYOQEP.cjs.map → impl-M2FUD3PD.cjs.map} +1 -1
  79. package/dist/{impl-QPUYYCCD.cjs → impl-ME5ECUXX.cjs} +5 -5
  80. package/dist/{impl-QPUYYCCD.cjs.map → impl-ME5ECUXX.cjs.map} +1 -1
  81. package/dist/{impl-WO3LVKNE.cjs → impl-MXT5WXQL.cjs} +2 -2
  82. package/dist/{impl-WO3LVKNE.cjs.map → impl-MXT5WXQL.cjs.map} +1 -1
  83. package/dist/{impl-5H6DFFAS.cjs → impl-N42OQHZK.cjs} +2 -2
  84. package/dist/{impl-5H6DFFAS.cjs.map → impl-N42OQHZK.cjs.map} +1 -1
  85. package/dist/{impl-WVAGHUZI.cjs → impl-QIO7HI3C.cjs} +3 -3
  86. package/dist/{impl-WVAGHUZI.cjs.map → impl-QIO7HI3C.cjs.map} +1 -1
  87. package/dist/{impl-UZE2LR6H.cjs → impl-RWQGNFGA.cjs} +2 -2
  88. package/dist/{impl-UZE2LR6H.cjs.map → impl-RWQGNFGA.cjs.map} +1 -1
  89. package/dist/{impl-C7DRIULL.cjs → impl-U3QTUNKM.cjs} +2 -2
  90. package/dist/{impl-C7DRIULL.cjs.map → impl-U3QTUNKM.cjs.map} +1 -1
  91. package/dist/{impl-SCX5AEQB.cjs → impl-UAVSJRAQ.cjs} +2 -2
  92. package/dist/{impl-SCX5AEQB.cjs.map → impl-UAVSJRAQ.cjs.map} +1 -1
  93. package/dist/{impl-CK5QRU26.cjs → impl-V4DXFCLY.cjs} +2 -2
  94. package/dist/{impl-CK5QRU26.cjs.map → impl-V4DXFCLY.cjs.map} +1 -1
  95. package/dist/{impl-DYGW2VXN.cjs → impl-VLNYULEF.cjs} +2 -2
  96. package/dist/{impl-DYGW2VXN.cjs.map → impl-VLNYULEF.cjs.map} +1 -1
  97. package/dist/{impl-EL3GY7PX.cjs → impl-WLYSLIAY.cjs} +2 -2
  98. package/dist/{impl-EL3GY7PX.cjs.map → impl-WLYSLIAY.cjs.map} +1 -1
  99. package/dist/{impl-SC7VG3C5.cjs → impl-XW5NZCGW.cjs} +2 -2
  100. package/dist/{impl-SC7VG3C5.cjs.map → impl-XW5NZCGW.cjs.map} +1 -1
  101. package/dist/{impl-PKQQUVYK.cjs → impl-XYG2OLQG.cjs} +2 -2
  102. package/dist/{impl-PKQQUVYK.cjs.map → impl-XYG2OLQG.cjs.map} +1 -1
  103. package/dist/{impl-QAMYNNJD.cjs → impl-YKIGKPS6.cjs} +2 -2
  104. package/dist/{impl-QAMYNNJD.cjs.map → impl-YKIGKPS6.cjs.map} +1 -1
  105. package/dist/{impl-MT4XWK25.cjs → impl-YKOMPECQ.cjs} +2 -2
  106. package/dist/{impl-MT4XWK25.cjs.map → impl-YKOMPECQ.cjs.map} +1 -1
  107. package/dist/index.cjs +3 -3
  108. package/dist/index.cjs.map +1 -1
  109. package/dist/index.d.cts +53 -27
  110. package/package.json +1 -1
  111. package/dist/chunk-QPIUQDJ6.cjs +0 -2920
  112. package/dist/impl-7RJYKTCZ.cjs +0 -12
  113. package/dist/impl-7RJYKTCZ.cjs.map +0 -1
  114. package/dist/impl-UZTSGARM.cjs +0 -2
package/README.md CHANGED
@@ -1,98 +1,55 @@
1
1
  # Transcend CLI
2
2
 
3
+ A command line interface that allows you to programatically interact with the Transcend.
4
+
3
5
  <!-- START doctoc generated TOC please keep comment here to allow auto update -->
4
6
  <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
5
7
 
6
8
  ## Table of Contents
7
9
 
8
10
  - [Changelog](#changelog)
9
- - [Overview](#overview)
10
11
  - [Installation](#installation)
11
12
  - [transcend.yml](#transcendyml)
12
13
  - [Usage](#usage)
13
14
  - [`transcend request approve`](#transcend-request-approve)
14
- - [Examples](#examples)
15
15
  - [`transcend request upload`](#transcend-request-upload)
16
- - [Examples](#examples-1)
17
16
  - [`transcend request download-files`](#transcend-request-download-files)
18
- - [Examples](#examples-2)
19
17
  - [`transcend request cancel`](#transcend-request-cancel)
20
- - [Examples](#examples-3)
21
18
  - [`transcend request restart`](#transcend-request-restart)
22
- - [Examples](#examples-4)
23
19
  - [`transcend request notify-additional-time`](#transcend-request-notify-additional-time)
24
- - [Examples](#examples-5)
25
20
  - [`transcend request mark-silent`](#transcend-request-mark-silent)
26
- - [Examples](#examples-6)
27
21
  - [`transcend request enricher-restart`](#transcend-request-enricher-restart)
28
- - [Examples](#examples-7)
29
22
  - [`transcend request reject-unverified-identifiers`](#transcend-request-reject-unverified-identifiers)
30
- - [Examples](#examples-8)
31
23
  - [`transcend request export`](#transcend-request-export)
32
- - [Examples](#examples-9)
33
24
  - [`transcend request skip-preflight-jobs`](#transcend-request-skip-preflight-jobs)
34
- - [Examples](#examples-10)
35
25
  - [`transcend request system mark-request-data-silos-completed`](#transcend-request-system-mark-request-data-silos-completed)
36
- - [Examples](#examples-11)
37
26
  - [`transcend request system retry-request-data-silos`](#transcend-request-system-retry-request-data-silos)
38
- - [Examples](#examples-12)
39
27
  - [`transcend request system skip-request-data-silos`](#transcend-request-system-skip-request-data-silos)
40
- - [Examples](#examples-13)
41
28
  - [`transcend request preflight pull-identifiers`](#transcend-request-preflight-pull-identifiers)
42
- - [Examples](#examples-14)
43
29
  - [`transcend request preflight push-identifiers`](#transcend-request-preflight-push-identifiers)
44
- - [Examples](#examples-15)
45
30
  - [`transcend request cron pull-identifiers`](#transcend-request-cron-pull-identifiers)
46
- - [Examples](#examples-16)
47
31
  - [`transcend request cron mark-identifiers-completed`](#transcend-request-cron-mark-identifiers-completed)
48
- - [Examples](#examples-17)
49
32
  - [`transcend consent build-xdi-sync-endpoint`](#transcend-consent-build-xdi-sync-endpoint)
50
- - [Examples](#examples-18)
51
33
  - [`transcend consent pull-consent-metrics`](#transcend-consent-pull-consent-metrics)
52
- - [Examples](#examples-19)
53
34
  - [`transcend consent pull-consent-preferences`](#transcend-consent-pull-consent-preferences)
54
- - [Examples](#examples-20)
55
35
  - [`transcend consent update-consent-manager`](#transcend-consent-update-consent-manager)
56
- - [Examples](#examples-21)
57
36
  - [`transcend consent upload-consent-preferences`](#transcend-consent-upload-consent-preferences)
58
- - [Examples](#examples-22)
59
37
  - [`transcend consent upload-cookies-from-csv`](#transcend-consent-upload-cookies-from-csv)
60
- - [Examples](#examples-23)
61
38
  - [`transcend consent upload-data-flows-from-csv`](#transcend-consent-upload-data-flows-from-csv)
62
- - [Examples](#examples-24)
63
39
  - [`transcend consent upload-preferences`](#transcend-consent-upload-preferences)
64
- - [Examples](#examples-25)
65
40
  - [`transcend inventory pull`](#transcend-inventory-pull)
66
- - [Scopes](#scopes)
67
- - [Examples](#examples-26)
68
41
  - [`transcend inventory push`](#transcend-inventory-push)
69
- - [Scopes](#scopes-1)
70
- - [Examples](#examples-27)
71
- - [CI Integration](#ci-integration)
72
- - [Dynamic Variables](#dynamic-variables)
73
42
  - [`transcend inventory scan-packages`](#transcend-inventory-scan-packages)
74
- - [Examples](#examples-28)
75
43
  - [`transcend inventory discover-silos`](#transcend-inventory-discover-silos)
76
- - [Examples](#examples-29)
77
44
  - [`transcend inventory pull-datapoints`](#transcend-inventory-pull-datapoints)
78
- - [Examples](#examples-30)
79
45
  - [`transcend inventory pull-unstructured-discovery-files`](#transcend-inventory-pull-unstructured-discovery-files)
80
- - [Examples](#examples-31)
81
46
  - [`transcend inventory derive-data-silos-from-data-flows`](#transcend-inventory-derive-data-silos-from-data-flows)
82
- - [Examples](#examples-32)
83
47
  - [`transcend inventory derive-data-silos-from-data-flows-cross-instance`](#transcend-inventory-derive-data-silos-from-data-flows-cross-instance)
84
- - [Examples](#examples-33)
85
48
  - [`transcend inventory consent-manager-service-json-to-yml`](#transcend-inventory-consent-manager-service-json-to-yml)
86
- - [Examples](#examples-34)
87
49
  - [`transcend inventory consent-managers-to-business-entities`](#transcend-inventory-consent-managers-to-business-entities)
88
- - [Examples](#examples-35)
89
50
  - [`transcend admin generate-api-keys`](#transcend-admin-generate-api-keys)
90
- - [Examples](#examples-36)
91
51
  - [`transcend admin chunk-csv`](#transcend-admin-chunk-csv)
92
- - [Examples](#examples-37)
93
52
  - [`transcend migration sync-ot`](#transcend-migration-sync-ot)
94
- - [Authentication](#authentication)
95
- - [Examples](#examples-38)
96
53
  - [Prompt Manager](#prompt-manager)
97
54
  - [Proxy usage](#proxy-usage)
98
55
 
@@ -102,10 +59,6 @@
102
59
 
103
60
  To stay up to date on breaking changes to the CLI between major version updates, please refer to [CHANGELOG.md](CHANGELOG.md).
104
61
 
105
- ## Overview
106
-
107
- A command line interface that allows you to programatically interact with the Transcend.
108
-
109
62
  ## Installation
110
63
 
111
64
  This package is distributed through npm, and assumes an installation of [npm and Node](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm).
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- "use strict"; 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 _chunkT462ONFXcjs = require('../chunk-T462ONFX.cjs');var _chunkMRXBJEKLcjs = require('../chunk-MRXBJEKL.cjs');require('../chunk-6CS4GCJ4.cjs');require('../chunk-MGAJ7ILD.cjs');require('../chunk-Q7I37FJV.cjs');var _core = require('@stricli/core');async function e(){let o=process.argv.slice(3);_optionalChain([process, 'access', _ => _.env, 'access', _2 => _2.COMP_LINE, 'optionalAccess', _3 => _3.endsWith, 'call', _4 => _4(" ")])&&o.push(""),await _core.proposeCompletions.call(void 0, _chunkMRXBJEKLcjs.a,o,_chunkT462ONFXcjs.a.call(void 0, process));try{for(let{completion:r}of await _core.proposeCompletions.call(void 0, _chunkMRXBJEKLcjs.a,o,_chunkT462ONFXcjs.a.call(void 0, process)))process.stdout.write(`${r}
2
+ "use strict"; 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 _chunkT462ONFXcjs = require('../chunk-T462ONFX.cjs');var _chunkF3MDX5XScjs = require('../chunk-F3MDX5XS.cjs');require('../chunk-S7H3R3EJ.cjs');require('../chunk-TO4YF4PG.cjs');require('../chunk-Q7I37FJV.cjs');var _core = require('@stricli/core');async function e(){let o=process.argv.slice(3);_optionalChain([process, 'access', _ => _.env, 'access', _2 => _2.COMP_LINE, 'optionalAccess', _3 => _3.endsWith, 'call', _4 => _4(" ")])&&o.push(""),await _core.proposeCompletions.call(void 0, _chunkF3MDX5XScjs.a,o,_chunkT462ONFXcjs.a.call(void 0, process));try{for(let{completion:r}of await _core.proposeCompletions.call(void 0, _chunkF3MDX5XScjs.a,o,_chunkT462ONFXcjs.a.call(void 0, process)))process.stdout.write(`${r}
3
3
  `)}catch (e2){}}e();
4
4
  //# sourceMappingURL=bash-complete.cjs.map
package/dist/bin/cli.cjs CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var _chunkT462ONFXcjs = require('../chunk-T462ONFX.cjs');var _chunkMRXBJEKLcjs = require('../chunk-MRXBJEKL.cjs');require('../chunk-6CS4GCJ4.cjs');require('../chunk-MGAJ7ILD.cjs');require('../chunk-Q7I37FJV.cjs');var _core = require('@stricli/core');async function n(){await _core.run.call(void 0, _chunkMRXBJEKLcjs.a,process.argv.slice(2),_chunkT462ONFXcjs.a.call(void 0, process))}n();
2
+ "use strict";var _chunkT462ONFXcjs = require('../chunk-T462ONFX.cjs');var _chunkF3MDX5XScjs = require('../chunk-F3MDX5XS.cjs');require('../chunk-S7H3R3EJ.cjs');require('../chunk-TO4YF4PG.cjs');require('../chunk-Q7I37FJV.cjs');var _core = require('@stricli/core');async function n(){await _core.run.call(void 0, _chunkF3MDX5XScjs.a,process.argv.slice(2),_chunkT462ONFXcjs.a.call(void 0, process))}n();
3
3
  //# sourceMappingURL=cli.cjs.map
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- "use strict"; 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 _chunkMRXBJEKLcjs = require('../chunk-MRXBJEKL.cjs');require('../chunk-6CS4GCJ4.cjs');var _chunkZUNVPK23cjs = require('../chunk-ZUNVPK23.cjs');require('../chunk-MGAJ7ILD.cjs');require('../chunk-Q7I37FJV.cjs');var _core = require('@stricli/core');var o={"tr-build-xdi-sync-endpoint":["consent","build-xdi-sync-endpoint"],"tr-consent-manager-service-json-to-yml":["inventory","consent-manager-service-json-to-yml"],"tr-consent-managers-to-business-entities":["inventory","consent-managers-to-business-entities"],"tr-cron-mark-identifiers-completed":["request","cron","mark-identifiers-completed"],"tr-cron-pull-identifiers":["request","cron","pull-identifiers"],"tr-derive-data-silos-from-data-flows":["inventory","derive-data-silos-from-data-flows"],"tr-derive-data-silos-from-data-flows-cross-instance":["inventory","derive-data-silos-from-data-flows-cross-instance"],"tr-discover-silos":["inventory","discover-silos"],"tr-generate-api-keys":["admin","generate-api-keys"],"tr-manual-enrichment-pull-identifiers":["request","preflight","pull-identifiers"],"tr-manual-enrichment-push-identifiers":["request","preflight","push-identifiers"],"tr-mark-request-data-silos-completed":["request","system","mark-request-data-silos-completed"],"tr-pull":["inventory","pull"],"tr-pull-consent-metrics":["consent","pull-consent-metrics"],"tr-pull-consent-preferences":["consent","pull-consent-preferences"],"tr-pull-datapoints":["inventory","pull-datapoints"],"tr-pull-pull-unstructured-discovery-files":["inventory","pull-unstructured-discovery-files"],"tr-push":["inventory","push"],"tr-request-approve":["request","approve"],"tr-request-cancel":["request","cancel"],"tr-request-download-files":["request","download-files"],"tr-request-enricher-restart":["request","enricher-restart"],"tr-request-export":["request","export"],"tr-request-mark-silent":["request","mark-silent"],"tr-request-notify-additional-time":["request","notify-additional-time"],"tr-request-reject-unverified-identifiers":["request","reject-unverified-identifiers"],"tr-request-restart":["request","restart"],"tr-request-upload":["request","upload"],"tr-retry-request-data-silos":["request","system","retry-request-data-silos"],"tr-scan-packages":["inventory","scan-packages"],"tr-skip-preflight-jobs":["request","skip-preflight-jobs"],"tr-skip-request-data-silos":["request","system","skip-request-data-silos"],"tr-sync-ot":["migration","sync-ot"],"tr-update-consent-manager":["consent","update-consent-manager"],"tr-upload-consent-preferences":["consent","upload-consent-preferences"],"tr-upload-cookies-from-csv":["consent","upload-cookies-from-csv"],"tr-upload-data-flows-from-csv":["consent","upload-data-flows-from-csv"],"tr-upload-preferences":["consent","upload-preferences"]};function p(t){return _optionalChain([_core.generateHelpTextForAllCommands.call(void 0, _chunkMRXBJEKLcjs.a), 'access', _ => _.find, 'call', _2 => _2(s=>s[0]===`${_chunkMRXBJEKLcjs.a.config.name} ${t.join(" ")}`), 'optionalAccess', _3 => _3[1]])}function i(t){_chunkZUNVPK23cjs.a.log("[DEPRECATION NOTICE]");let e=o[t];if(!e){let a=Object.entries(o).map(([l,d])=>`\`${l}\` -> \`${_chunkMRXBJEKLcjs.a.config.name} ${d.join(" ")}\``).join(`
2
+ "use strict"; 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 _chunkF3MDX5XScjs = require('../chunk-F3MDX5XS.cjs');require('../chunk-S7H3R3EJ.cjs');var _chunkZUNVPK23cjs = require('../chunk-ZUNVPK23.cjs');require('../chunk-TO4YF4PG.cjs');require('../chunk-Q7I37FJV.cjs');var _core = require('@stricli/core');var o={"tr-build-xdi-sync-endpoint":["consent","build-xdi-sync-endpoint"],"tr-consent-manager-service-json-to-yml":["inventory","consent-manager-service-json-to-yml"],"tr-consent-managers-to-business-entities":["inventory","consent-managers-to-business-entities"],"tr-cron-mark-identifiers-completed":["request","cron","mark-identifiers-completed"],"tr-cron-pull-identifiers":["request","cron","pull-identifiers"],"tr-derive-data-silos-from-data-flows":["inventory","derive-data-silos-from-data-flows"],"tr-derive-data-silos-from-data-flows-cross-instance":["inventory","derive-data-silos-from-data-flows-cross-instance"],"tr-discover-silos":["inventory","discover-silos"],"tr-generate-api-keys":["admin","generate-api-keys"],"tr-manual-enrichment-pull-identifiers":["request","preflight","pull-identifiers"],"tr-manual-enrichment-push-identifiers":["request","preflight","push-identifiers"],"tr-mark-request-data-silos-completed":["request","system","mark-request-data-silos-completed"],"tr-pull":["inventory","pull"],"tr-pull-consent-metrics":["consent","pull-consent-metrics"],"tr-pull-consent-preferences":["consent","pull-consent-preferences"],"tr-pull-datapoints":["inventory","pull-datapoints"],"tr-pull-pull-unstructured-discovery-files":["inventory","pull-unstructured-discovery-files"],"tr-push":["inventory","push"],"tr-request-approve":["request","approve"],"tr-request-cancel":["request","cancel"],"tr-request-download-files":["request","download-files"],"tr-request-enricher-restart":["request","enricher-restart"],"tr-request-export":["request","export"],"tr-request-mark-silent":["request","mark-silent"],"tr-request-notify-additional-time":["request","notify-additional-time"],"tr-request-reject-unverified-identifiers":["request","reject-unverified-identifiers"],"tr-request-restart":["request","restart"],"tr-request-upload":["request","upload"],"tr-retry-request-data-silos":["request","system","retry-request-data-silos"],"tr-scan-packages":["inventory","scan-packages"],"tr-skip-preflight-jobs":["request","skip-preflight-jobs"],"tr-skip-request-data-silos":["request","system","skip-request-data-silos"],"tr-sync-ot":["migration","sync-ot"],"tr-update-consent-manager":["consent","update-consent-manager"],"tr-upload-consent-preferences":["consent","upload-consent-preferences"],"tr-upload-cookies-from-csv":["consent","upload-cookies-from-csv"],"tr-upload-data-flows-from-csv":["consent","upload-data-flows-from-csv"],"tr-upload-preferences":["consent","upload-preferences"]};function p(t){return _optionalChain([_core.generateHelpTextForAllCommands.call(void 0, _chunkF3MDX5XScjs.a), 'access', _ => _.find, 'call', _2 => _2(s=>s[0]===`${_chunkF3MDX5XScjs.a.config.name} ${t.join(" ")}`), 'optionalAccess', _3 => _3[1]])}function i(t){_chunkZUNVPK23cjs.a.log("[DEPRECATION NOTICE]");let e=o[t];if(!e){let a=Object.entries(o).map(([l,d])=>`\`${l}\` -> \`${_chunkF3MDX5XScjs.a.config.name} ${d.join(" ")}\``).join(`
3
3
  `);_chunkZUNVPK23cjs.a.log(`This command is deprecated as of v7.0.0. Here is a list of new commands, mapped to their legacy command names:
4
4
  ${a}`);return}_chunkZUNVPK23cjs.a.log(`\`${t}\` is deprecated as of v7.0.0.
5
- Use \`${_chunkMRXBJEKLcjs.a.config.name} ${e.join(" ")}\` instead.
5
+ Use \`${_chunkF3MDX5XScjs.a.config.name} ${e.join(" ")}\` instead.
6
6
  `);let s=p(e);if(!s)throw new Error(`Failed to get help text for command: \`${e.join(" ")}\``);_chunkZUNVPK23cjs.a.log(s)}function m(){let e=_optionalChain([process, 'access', _4 => _4.argv, 'access', _5 => _5.at, 'call', _6 => _6(-1), 'optionalAccess', _7 => _7.split, 'call', _8 => _8("/"), 'access', _9 => _9.pop, 'call', _10 => _10(), 'optionalAccess', _11 => _11.trim, 'call', _12 => _12()]);if(e)i(e);else throw new Error("Deprecated command");process.exit(1)}m();
7
7
  //# sourceMappingURL=deprecated-command.cjs.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkQPIUQDJ6cjs = require('./chunk-QPIUQDJ6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkMGAJ7ILDcjs = require('./chunk-MGAJ7ILD.cjs');var _iots = require('io-ts'); var e = _interopRequireWildcard(_iots); var S = _interopRequireWildcard(_iots);var _typeutils = require('@transcend-io/type-utils');var X=e.type({identifier:e.string,type:e.string,coreIdentifier:e.string,dataSiloId:e.string,requestId:e.string,nonce:e.string,requestCreatedAt:e.string,daysUntilOverdue:e.number,attributes:e.array(e.type({key:e.string,values:e.array(e.string)}))});async function U(r,{dataSiloId:s,limit:c=100,offset:n=0,requestType:a}){try{let i=await r.get(`v1/data-silo/${s}/pending-requests/${a}`,{searchParams:{offset:n,limit:c}}).json(),{items:f}=_typeutils.decodeCodec.call(void 0, e.type({items:e.array(X)}),i);return f}catch(i){throw new Error(`Received an error from server: ${_optionalChain([i, 'optionalAccess', _2 => _2.response, 'optionalAccess', _3 => _3.body])||_optionalChain([i, 'optionalAccess', _4 => _4.message])}`)}}var L=S.type({nonce:S.string,identifier:S.string});async function B(r,{nonce:s,identifier:c}){try{return await r.put("v1/data-silo",{headers:{"x-transcend-nonce":s},json:{profiles:[{profileId:c}]}}),!0}catch(n){if(_optionalChain([n, 'access', _5 => _5.response, 'optionalAccess', _6 => _6.statusCode])===409)return!1;throw new Error(`Received an error from server: ${_optionalChain([n, 'optionalAccess', _7 => _7.response, 'optionalAccess', _8 => _8.body])||_optionalChain([n, 'optionalAccess', _9 => _9.message])}`)}}var _bluebird = require('bluebird');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _cliprogress = require('cli-progress'); var _cliprogress2 = _interopRequireDefault(_cliprogress);async function ge({file:r,dataSiloId:s,auth:c,sombraAuth:n,concurrency:a=100,transcendUrl:i=_chunkMGAJ7ILDcjs.r,sleepSeconds:f=10}){let y=await _chunkQPIUQDJ6cjs.wc.call(void 0, i,c,n);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Reading "${r}" from disk`));let o=_chunkQPIUQDJ6cjs.qc.call(void 0, r,L);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Notifying Transcend for data silo "${s}" marking "${o.length}" identifiers as completed.`));let C=new Date().getTime(),w=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),d=0,u=0,l=0;w.start(o.length,0);let m=_chunkMGAJ7ILDcjs.b.call(void 0, o,a),I=m.length;await _bluebird.mapSeries.call(void 0, m,async($,P)=>{_chunkZUNVPK23cjs.a.info(_colors2.default.blue(`Processing chunk ${P+1}/${I} (${_chunkMGAJ7ILDcjs.b.length} items)`)),await _bluebird.map.call(void 0, $,async h=>{try{await B(y,h)?d+=1:u+=1}catch(b){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Error notifying Transcend for identifier "${h.identifier}" - ${_optionalChain([b, 'optionalAccess', _10 => _10.message])}`)),l+=1}w.update(d+u)}),f>0&&P<I-1&&(_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`Sleeping for ${f}s before next chunk...`)),await new Promise(h=>{setTimeout(h,f*1e3)}))}),w.stop();let D=new Date().getTime()-C;if(_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully notified Transcend for ${d} identifiers in "${D/1e3}" seconds!`)),u&&_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`There were ${u} identifiers that were not in a state to be updated.They likely have already been resolved.`)),l)throw _chunkZUNVPK23cjs.a.error(_colors2.default.red(`There were ${l} identifiers that failed to be updated. Please review the logs for more information.`)),new Error("Failed to update all identifiers");return o.length}var _privacytypes = require('@transcend-io/privacy-types');async function Se({requestIds:r,dataSiloId:s,auth:c,concurrency:n=100,status:a=_privacytypes.RequestDataSiloStatus.Resolved,transcendUrl:i=_chunkMGAJ7ILDcjs.r}){let f=_chunkQPIUQDJ6cjs.vc.call(void 0, i,c),y=new Date().getTime(),o=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Notifying Transcend for data silo "${s}" marking "${r.length}" requests as completed.`));let C=0;o.start(r.length,0),await _bluebird.map.call(void 0, r,async u=>{let l=await _chunkQPIUQDJ6cjs.Cd.call(void 0, f,{requestId:u,dataSiloId:s});try{await _chunkQPIUQDJ6cjs.Xf.call(void 0, f,_chunkQPIUQDJ6cjs.ua,{requestDataSiloId:l.id,status:a})}catch(m){if(!m.message.includes("Client error: Request must be active:"))throw m}C+=1,o.update(C)},{concurrency:n}),o.stop();let d=new Date().getTime()-y;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully notified Transcend in "${d/1e3}" seconds!`)),r.length}async function _e({dataSiloId:r,auth:s,sombraAuth:c,actions:n,apiPageSize:a=100,savePageSize:i=1e3,onSave:f,transcendUrl:y=_chunkMGAJ7ILDcjs.r,skipRequestCount:o=!1}){if(i%a!==0)throw new Error(`savePageSize must be a multiple of apiPageSize. savePageSize: ${i}, apiPageSize: ${a}`);let C=await _chunkQPIUQDJ6cjs.wc.call(void 0, y,s,c),w=_chunkQPIUQDJ6cjs.vc.call(void 0, y,s),d=0;o||(d=await _chunkQPIUQDJ6cjs.Dd.call(void 0, w,{dataSiloId:r})),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Pulling ${o?"all":d} outstanding request identifiers for data silo: "${r}" for requests of types "${n.join('", "')}"`));let u=new Date().getTime(),l=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),m=new Set,I=[],g=[];o||l.start(d,0),await _bluebird.mapSeries.call(void 0, n,async $=>{let P=0,h=!0;for(;h;){let b=await U(C,{dataSiloId:r,limit:a,offset:P,requestType:$}),k=b.map(A=>(m.add(A.requestId),{...A,action:$})),J=k.map(({attributes:A,...K})=>({...K,...A.reduce((M,E)=>Object.assign(M,{[E.key]:E.values.join(",")}),{})}));I.push(...k),g.push(...J),g.length>=i&&(await f(g),g=[]),h=b.length===a,P+=a,o?_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Pulled ${b.length} outstanding identifiers for ${m.size} requests`)):l.update(m.size)}}),g.length>0&&await f(g),o||l.stop();let D=new Date().getTime()-u;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully pulled ${I.length} outstanding identifiers from ${m.size} requests in "${D/1e3}" seconds!`)),{identifiers:I}}exports.a = X; exports.b = U; exports.c = L; exports.d = B; exports.e = ge; exports.f = Se; exports.g = _e;
2
- //# sourceMappingURL=chunk-QRDYTLVB.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkBIBIE2IPcjs = require('./chunk-BIBIE2IP.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkTO4YF4PGcjs = require('./chunk-TO4YF4PG.cjs');var _iots = require('io-ts'); var e = _interopRequireWildcard(_iots); var S = _interopRequireWildcard(_iots);var _typeutils = require('@transcend-io/type-utils');var X=e.type({identifier:e.string,type:e.string,coreIdentifier:e.string,dataSiloId:e.string,requestId:e.string,nonce:e.string,requestCreatedAt:e.string,daysUntilOverdue:e.number,attributes:e.array(e.type({key:e.string,values:e.array(e.string)}))});async function U(r,{dataSiloId:s,limit:c=100,offset:n=0,requestType:a}){try{let i=await r.get(`v1/data-silo/${s}/pending-requests/${a}`,{searchParams:{offset:n,limit:c}}).json(),{items:f}=_typeutils.decodeCodec.call(void 0, e.type({items:e.array(X)}),i);return f}catch(i){throw new Error(`Received an error from server: ${_optionalChain([i, 'optionalAccess', _2 => _2.response, 'optionalAccess', _3 => _3.body])||_optionalChain([i, 'optionalAccess', _4 => _4.message])}`)}}var L=S.type({nonce:S.string,identifier:S.string});async function B(r,{nonce:s,identifier:c}){try{return await r.put("v1/data-silo",{headers:{"x-transcend-nonce":s},json:{profiles:[{profileId:c}]}}),!0}catch(n){if(_optionalChain([n, 'access', _5 => _5.response, 'optionalAccess', _6 => _6.statusCode])===409)return!1;throw new Error(`Received an error from server: ${_optionalChain([n, 'optionalAccess', _7 => _7.response, 'optionalAccess', _8 => _8.body])||_optionalChain([n, 'optionalAccess', _9 => _9.message])}`)}}var _bluebird = require('bluebird');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _cliprogress = require('cli-progress'); var _cliprogress2 = _interopRequireDefault(_cliprogress);async function ge({file:r,dataSiloId:s,auth:c,sombraAuth:n,concurrency:a=100,transcendUrl:i=_chunkTO4YF4PGcjs.r,sleepSeconds:f=10}){let y=await _chunkBIBIE2IPcjs.wc.call(void 0, i,c,n);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Reading "${r}" from disk`));let o=_chunkBIBIE2IPcjs.qc.call(void 0, r,L);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Notifying Transcend for data silo "${s}" marking "${o.length}" identifiers as completed.`));let C=new Date().getTime(),w=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),d=0,u=0,l=0;w.start(o.length,0);let m=_chunkTO4YF4PGcjs.b.call(void 0, o,a),I=m.length;await _bluebird.mapSeries.call(void 0, m,async($,P)=>{_chunkZUNVPK23cjs.a.info(_colors2.default.blue(`Processing chunk ${P+1}/${I} (${_chunkTO4YF4PGcjs.b.length} items)`)),await _bluebird.map.call(void 0, $,async h=>{try{await B(y,h)?d+=1:u+=1}catch(b){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Error notifying Transcend for identifier "${h.identifier}" - ${_optionalChain([b, 'optionalAccess', _10 => _10.message])}`)),l+=1}w.update(d+u)}),f>0&&P<I-1&&(_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`Sleeping for ${f}s before next chunk...`)),await new Promise(h=>{setTimeout(h,f*1e3)}))}),w.stop();let D=new Date().getTime()-C;if(_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully notified Transcend for ${d} identifiers in "${D/1e3}" seconds!`)),u&&_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`There were ${u} identifiers that were not in a state to be updated.They likely have already been resolved.`)),l)throw _chunkZUNVPK23cjs.a.error(_colors2.default.red(`There were ${l} identifiers that failed to be updated. Please review the logs for more information.`)),new Error("Failed to update all identifiers");return o.length}var _privacytypes = require('@transcend-io/privacy-types');async function Se({requestIds:r,dataSiloId:s,auth:c,concurrency:n=100,status:a=_privacytypes.RequestDataSiloStatus.Resolved,transcendUrl:i=_chunkTO4YF4PGcjs.r}){let f=_chunkBIBIE2IPcjs.vc.call(void 0, i,c),y=new Date().getTime(),o=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Notifying Transcend for data silo "${s}" marking "${r.length}" requests as completed.`));let C=0;o.start(r.length,0),await _bluebird.map.call(void 0, r,async u=>{let l=await _chunkBIBIE2IPcjs.Dd.call(void 0, f,{requestId:u,dataSiloId:s});try{await _chunkBIBIE2IPcjs._f.call(void 0, f,_chunkBIBIE2IPcjs.ua,{requestDataSiloId:l.id,status:a})}catch(m){if(!m.message.includes("Client error: Request must be active:"))throw m}C+=1,o.update(C)},{concurrency:n}),o.stop();let d=new Date().getTime()-y;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully notified Transcend in "${d/1e3}" seconds!`)),r.length}async function _e({dataSiloId:r,auth:s,sombraAuth:c,actions:n,apiPageSize:a=100,savePageSize:i=1e3,onSave:f,transcendUrl:y=_chunkTO4YF4PGcjs.r,skipRequestCount:o=!1}){if(i%a!==0)throw new Error(`savePageSize must be a multiple of apiPageSize. savePageSize: ${i}, apiPageSize: ${a}`);let C=await _chunkBIBIE2IPcjs.wc.call(void 0, y,s,c),w=_chunkBIBIE2IPcjs.vc.call(void 0, y,s),d=0;o||(d=await _chunkBIBIE2IPcjs.Ed.call(void 0, w,{dataSiloId:r})),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Pulling ${o?"all":d} outstanding request identifiers for data silo: "${r}" for requests of types "${n.join('", "')}"`));let u=new Date().getTime(),l=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),m=new Set,I=[],g=[];o||l.start(d,0),await _bluebird.mapSeries.call(void 0, n,async $=>{let P=0,h=!0;for(;h;){let b=await U(C,{dataSiloId:r,limit:a,offset:P,requestType:$}),k=b.map(A=>(m.add(A.requestId),{...A,action:$})),J=k.map(({attributes:A,...K})=>({...K,...A.reduce((M,E)=>Object.assign(M,{[E.key]:E.values.join(",")}),{})}));I.push(...k),g.push(...J),g.length>=i&&(await f(g),g=[]),h=b.length===a,P+=a,o?_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Pulled ${b.length} outstanding identifiers for ${m.size} requests`)):l.update(m.size)}}),g.length>0&&await f(g),o||l.stop();let D=new Date().getTime()-u;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully pulled ${I.length} outstanding identifiers from ${m.size} requests in "${D/1e3}" seconds!`)),{identifiers:I}}exports.a = X; exports.b = U; exports.c = L; exports.d = B; exports.e = ge; exports.f = Se; exports.g = _e;
2
+ //# sourceMappingURL=chunk-72QC4R7P.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/chunk-QRDYTLVB.cjs","../src/lib/cron/pullCronPageOfIdentifiers.ts"],"names":["CronIdentifier","pullCronPageOfIdentifiers","sombra","dataSiloId","limit","offset","requestType","response"],"mappings":"AAAA,u/BAAyF,wDAAyC,wDAAgD,6GCA/J,qDACS,IAIfA,CAAAA,CAAmB,CAAA,CAAA,IAAA,CAAK,CAEnC,UAAA,CAAc,CAAA,CAAA,MAAA,CAEd,IAAA,CAAQ,CAAA,CAAA,MAAA,CAER,cAAA,CAAkB,CAAA,CAAA,MAAA,CAElB,UAAA,CAAc,CAAA,CAAA,MAAA,CAEd,SAAA,CAAa,CAAA,CAAA,MAAA,CAEb,KAAA,CAAS,CAAA,CAAA,MAAA,CAET,gBAAA,CAAoB,CAAA,CAAA,MAAA,CAEpB,gBAAA,CAAoB,CAAA,CAAA,MAAA,CAEpB,UAAA,CAAc,CAAA,CAAA,KAAA,CACV,CAAA,CAAA,IAAA,CAAK,CACL,GAAA,CAAO,CAAA,CAAA,MAAA,CACP,MAAA,CAAU,CAAA,CAAA,KAAA,CAAQ,CAAA,CAAA,MAAM,CAC1B,CAAC,CACH,CACF,CAAC,CAAA,CAaD,MAAA,SAAsBC,CAAAA,CACpBC,CAAAA,CACA,CACE,UAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CAAQ,GAAA,CACR,MAAA,CAAAC,CAAAA,CAAS,CAAA,CACT,WAAA,CAAAC,CACF,CAAA,CAU2B,CAC3B,GAAI,CAEF,IAAMC,CAAAA,CAAW,MAAML,CAAAA,CACpB,GAAA,CAAI,CAAA,aAAA,EAAgBC,CAAU,CAAA,kBAAA,EAAqBG,CAAW,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/chunk-QRDYTLVB.cjs","sourcesContent":[null,"import * as t from 'io-ts';\nimport { decodeCodec } from '@transcend-io/type-utils';\nimport { RequestAction } from '@transcend-io/privacy-types';\nimport type { Got } from 'got';\n\nexport const CronIdentifier = t.type({\n /** The identifier value */\n identifier: t.string,\n /** The type of identifier */\n type: t.string,\n /** The core identifier of the request */\n coreIdentifier: t.string,\n /** The ID of the underlying data silo */\n dataSiloId: t.string,\n /** The ID of the underlying request */\n requestId: t.string,\n /** The request nonce */\n nonce: t.string,\n /** The time the request was created */\n requestCreatedAt: t.string,\n /** The number of days until the request is overdue */\n daysUntilOverdue: t.number,\n /** Request attributes */\n attributes: t.array(\n t.type({\n key: t.string,\n values: t.array(t.string),\n }),\n ),\n});\n\n/** Type override */\nexport type CronIdentifier = t.TypeOf<typeof CronIdentifier>;\n\n/**\n * Pull a offset of identifiers for a cron job\n *\n * @see https://docs.transcend.io/docs/api-reference/GET/v1/data-silo/(id)/pending-requests/(type)\n * @param sombra - Sombra instance configured to make requests\n * @param options - Additional options\n * @returns Successfully submitted request\n */\nexport async function pullCronPageOfIdentifiers(\n sombra: Got,\n {\n dataSiloId,\n limit = 100,\n offset = 0,\n requestType,\n }: {\n /** Data Silo ID */\n dataSiloId: string;\n /** Type of request */\n requestType: RequestAction;\n /** Number of identifiers to pull in */\n limit?: number;\n /** Page to pull in */\n offset?: number;\n },\n): Promise<CronIdentifier[]> {\n try {\n // Make the GraphQL request\n const response = await sombra\n .get(`v1/data-silo/${dataSiloId}/pending-requests/${requestType}`, {\n searchParams: {\n offset,\n limit,\n },\n })\n .json();\n\n const { items } = decodeCodec(\n t.type({\n items: t.array(CronIdentifier),\n }),\n response,\n );\n return items;\n } catch (err) {\n throw new Error(\n `Received an error from server: ${err?.response?.body || err?.message}`,\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/chunk-72QC4R7P.cjs","../src/lib/cron/pullCronPageOfIdentifiers.ts"],"names":["CronIdentifier","pullCronPageOfIdentifiers","sombra","dataSiloId","limit","offset","requestType","response"],"mappings":"AAAA,u/BAAyF,wDAAyC,wDAAgD,6GCA/J,qDACS,IAIfA,CAAAA,CAAmB,CAAA,CAAA,IAAA,CAAK,CAEnC,UAAA,CAAc,CAAA,CAAA,MAAA,CAEd,IAAA,CAAQ,CAAA,CAAA,MAAA,CAER,cAAA,CAAkB,CAAA,CAAA,MAAA,CAElB,UAAA,CAAc,CAAA,CAAA,MAAA,CAEd,SAAA,CAAa,CAAA,CAAA,MAAA,CAEb,KAAA,CAAS,CAAA,CAAA,MAAA,CAET,gBAAA,CAAoB,CAAA,CAAA,MAAA,CAEpB,gBAAA,CAAoB,CAAA,CAAA,MAAA,CAEpB,UAAA,CAAc,CAAA,CAAA,KAAA,CACV,CAAA,CAAA,IAAA,CAAK,CACL,GAAA,CAAO,CAAA,CAAA,MAAA,CACP,MAAA,CAAU,CAAA,CAAA,KAAA,CAAQ,CAAA,CAAA,MAAM,CAC1B,CAAC,CACH,CACF,CAAC,CAAA,CAaD,MAAA,SAAsBC,CAAAA,CACpBC,CAAAA,CACA,CACE,UAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CAAQ,GAAA,CACR,MAAA,CAAAC,CAAAA,CAAS,CAAA,CACT,WAAA,CAAAC,CACF,CAAA,CAU2B,CAC3B,GAAI,CAEF,IAAMC,CAAAA,CAAW,MAAML,CAAAA,CACpB,GAAA,CAAI,CAAA,aAAA,EAAgBC,CAAU,CAAA,kBAAA,EAAqBG,CAAW,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/chunk-72QC4R7P.cjs","sourcesContent":[null,"import * as t from 'io-ts';\nimport { decodeCodec } from '@transcend-io/type-utils';\nimport { RequestAction } from '@transcend-io/privacy-types';\nimport type { Got } from 'got';\n\nexport const CronIdentifier = t.type({\n /** The identifier value */\n identifier: t.string,\n /** The type of identifier */\n type: t.string,\n /** The core identifier of the request */\n coreIdentifier: t.string,\n /** The ID of the underlying data silo */\n dataSiloId: t.string,\n /** The ID of the underlying request */\n requestId: t.string,\n /** The request nonce */\n nonce: t.string,\n /** The time the request was created */\n requestCreatedAt: t.string,\n /** The number of days until the request is overdue */\n daysUntilOverdue: t.number,\n /** Request attributes */\n attributes: t.array(\n t.type({\n key: t.string,\n values: t.array(t.string),\n }),\n ),\n});\n\n/** Type override */\nexport type CronIdentifier = t.TypeOf<typeof CronIdentifier>;\n\n/**\n * Pull a offset of identifiers for a cron job\n *\n * @see https://docs.transcend.io/docs/api-reference/GET/v1/data-silo/(id)/pending-requests/(type)\n * @param sombra - Sombra instance configured to make requests\n * @param options - Additional options\n * @returns Successfully submitted request\n */\nexport async function pullCronPageOfIdentifiers(\n sombra: Got,\n {\n dataSiloId,\n limit = 100,\n offset = 0,\n requestType,\n }: {\n /** Data Silo ID */\n dataSiloId: string;\n /** Type of request */\n requestType: RequestAction;\n /** Number of identifiers to pull in */\n limit?: number;\n /** Page to pull in */\n offset?: number;\n },\n): Promise<CronIdentifier[]> {\n try {\n // Make the GraphQL request\n const response = await sombra\n .get(`v1/data-silo/${dataSiloId}/pending-requests/${requestType}`, {\n searchParams: {\n offset,\n limit,\n },\n })\n .json();\n\n const { items } = decodeCodec(\n t.type({\n items: t.array(CronIdentifier),\n }),\n response,\n );\n return items;\n } catch (err) {\n throw new Error(\n `Received an error from server: ${err?.response?.body || err?.message}`,\n );\n }\n}\n"]}