@transcend-io/cli 4.57.0 → 4.59.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/README.md +82 -13
  2. package/build/cli-request-approve.js +1 -1
  3. package/build/cli-request-cancel.d.ts +3 -0
  4. package/build/cli-request-cancel.d.ts.map +1 -0
  5. package/build/cli-request-cancel.js +66 -0
  6. package/build/cli-request-cancel.js.map +1 -0
  7. package/build/graphql/gqls/consentManager.d.ts +2 -0
  8. package/build/graphql/gqls/consentManager.d.ts.map +1 -1
  9. package/build/graphql/gqls/consentManager.js +15 -1
  10. package/build/graphql/gqls/consentManager.js.map +1 -1
  11. package/build/graphql/gqls/request.d.ts +2 -1
  12. package/build/graphql/gqls/request.d.ts.map +1 -1
  13. package/build/graphql/gqls/request.js +11 -2
  14. package/build/graphql/gqls/request.js.map +1 -1
  15. package/build/graphql/gqls/template.d.ts.map +1 -1
  16. package/build/graphql/gqls/template.js +6 -0
  17. package/build/graphql/gqls/template.js.map +1 -1
  18. package/build/graphql/syncConsentManager.d.ts +8 -1
  19. package/build/graphql/syncConsentManager.d.ts.map +1 -1
  20. package/build/graphql/syncConsentManager.js +88 -1
  21. package/build/graphql/syncConsentManager.js.map +1 -1
  22. package/build/graphql/syncTemplates.d.ts +10 -0
  23. package/build/graphql/syncTemplates.d.ts.map +1 -1
  24. package/build/graphql/syncTemplates.js.map +1 -1
  25. package/build/requests/approvePrivacyRequests.js +5 -5
  26. package/build/requests/approvePrivacyRequests.js.map +1 -1
  27. package/build/requests/cancelPrivacyRequests.d.ts +24 -0
  28. package/build/requests/cancelPrivacyRequests.d.ts.map +1 -0
  29. package/build/requests/cancelPrivacyRequests.js +90 -0
  30. package/build/requests/cancelPrivacyRequests.js.map +1 -0
  31. package/build/requests/index.d.ts +1 -0
  32. package/build/requests/index.d.ts.map +1 -1
  33. package/build/requests/index.js +1 -0
  34. package/build/requests/index.js.map +1 -1
  35. package/build/tsbuildinfo +1 -1
  36. package/package.json +2 -1
package/README.md CHANGED
@@ -25,54 +25,58 @@
25
25
  - [Authentication](#authentication-3)
26
26
  - [Arguments](#arguments-3)
27
27
  - [Usage](#usage-4)
28
- - [tr-request-upload](#tr-request-upload)
28
+ - [tr-request-cancel](#tr-request-cancel)
29
29
  - [Authentication](#authentication-4)
30
30
  - [Arguments](#arguments-4)
31
31
  - [Usage](#usage-5)
32
- - [tr-request-restart](#tr-request-restart)
32
+ - [tr-request-upload](#tr-request-upload)
33
33
  - [Authentication](#authentication-5)
34
34
  - [Arguments](#arguments-5)
35
35
  - [Usage](#usage-6)
36
- - [tr-request-export](#tr-request-export)
36
+ - [tr-request-restart](#tr-request-restart)
37
37
  - [Authentication](#authentication-6)
38
38
  - [Arguments](#arguments-6)
39
39
  - [Usage](#usage-7)
40
- - [tr-cron-pull-identifiers](#tr-cron-pull-identifiers)
40
+ - [tr-request-export](#tr-request-export)
41
41
  - [Authentication](#authentication-7)
42
42
  - [Arguments](#arguments-7)
43
43
  - [Usage](#usage-8)
44
- - [tr-cron-mark-identifiers-completed](#tr-cron-mark-identifiers-completed)
44
+ - [tr-cron-pull-identifiers](#tr-cron-pull-identifiers)
45
45
  - [Authentication](#authentication-8)
46
46
  - [Arguments](#arguments-8)
47
47
  - [Usage](#usage-9)
48
- - [tr-manual-enrichment-pull-identifiers](#tr-manual-enrichment-pull-identifiers)
48
+ - [tr-cron-mark-identifiers-completed](#tr-cron-mark-identifiers-completed)
49
49
  - [Authentication](#authentication-9)
50
50
  - [Arguments](#arguments-9)
51
51
  - [Usage](#usage-10)
52
- - [tr-manual-enrichment-push-identifiers](#tr-manual-enrichment-push-identifiers)
52
+ - [tr-manual-enrichment-pull-identifiers](#tr-manual-enrichment-pull-identifiers)
53
53
  - [Authentication](#authentication-10)
54
54
  - [Arguments](#arguments-10)
55
55
  - [Usage](#usage-11)
56
- - [tr-mark-request-data-silos-completed](#tr-mark-request-data-silos-completed)
56
+ - [tr-manual-enrichment-push-identifiers](#tr-manual-enrichment-push-identifiers)
57
57
  - [Authentication](#authentication-11)
58
58
  - [Arguments](#arguments-11)
59
59
  - [Usage](#usage-12)
60
- - [tr-retry-request-data-silos](#tr-retry-request-data-silos)
60
+ - [tr-mark-request-data-silos-completed](#tr-mark-request-data-silos-completed)
61
61
  - [Authentication](#authentication-12)
62
62
  - [Arguments](#arguments-12)
63
63
  - [Usage](#usage-13)
64
- - [tr-update-consent-manager](#tr-update-consent-manager)
64
+ - [tr-retry-request-data-silos](#tr-retry-request-data-silos)
65
65
  - [Authentication](#authentication-13)
66
66
  - [Arguments](#arguments-13)
67
67
  - [Usage](#usage-14)
68
- - [tr-upload-data-flows-from-csv](#tr-upload-data-flows-from-csv)
68
+ - [tr-update-consent-manager](#tr-update-consent-manager)
69
69
  - [Authentication](#authentication-14)
70
70
  - [Arguments](#arguments-14)
71
71
  - [Usage](#usage-15)
72
- - [tr-generate-api-keys](#tr-generate-api-keys)
72
+ - [tr-upload-data-flows-from-csv](#tr-upload-data-flows-from-csv)
73
73
  - [Authentication](#authentication-15)
74
74
  - [Arguments](#arguments-15)
75
75
  - [Usage](#usage-16)
76
+ - [tr-generate-api-keys](#tr-generate-api-keys)
77
+ - [Authentication](#authentication-16)
78
+ - [Arguments](#arguments-16)
79
+ - [Usage](#usage-17)
76
80
 
77
81
  <!-- END doctoc generated TOC please keep comment here to allow auto update -->
78
82
 
@@ -95,6 +99,7 @@ yarn tr-pull --auth=$TRANSCEND_API_KEY
95
99
  yarn tr-push --auth=$TRANSCEND_API_KEY
96
100
  yarn tr-discover-silos --auth=$TRANSCEND_API_KEY
97
101
  yarn tr-request-approve --auth=$TRANSCEND_API_KEY
102
+ yarn tr-request-cancel --auth=$TRANSCEND_API_KEY
98
103
  yarn tr-request-upload --auth=$TRANSCEND_API_KEY
99
104
  yarn tr-request-export --auth=$TRANSCEND_API_KEY
100
105
  yarn tr-request-restart --auth=$TRANSCEND_API_KEY
@@ -119,6 +124,7 @@ tr-pull --auth=$TRANSCEND_API_KEY
119
124
  tr-push --auth=$TRANSCEND_API_KEY
120
125
  tr-discover-silos --auth=$TRANSCEND_API_KEY
121
126
  tr-request-approve --auth=$TRANSCEND_API_KEY
127
+ tr-request-cancel --auth=$TRANSCEND_API_KEY
122
128
  tr-request-upload --auth=$TRANSCEND_API_KEY
123
129
  tr-request-export --auth=$TRANSCEND_API_KEY
124
130
  tr-request-restart --auth=$TRANSCEND_API_KEY
@@ -639,7 +645,7 @@ Specifying the backend URL, needed for US hosted backend infrastructure.
639
645
  yarn tr-request-approve --auth=$TRANSCEND_API_KEY --actions=ERASURE --transcendUrl=https://api.us.transcend.io
640
646
  ```
641
647
 
642
- Approve all requests, but mark any request made before 05/03/2023 as silent mode to prevent emailing the individual.
648
+ Approve all requests, but mark any request made before 05/03/2023 as silent mode to prevent emailing those requests. When not provided, the existing silent mode state of that request will be used to determine if emails are sent.
643
649
 
644
650
  ```sh
645
651
  yarn tr-request-approve --auth=$TRANSCEND_API_KEY --actions=SALE_OPT_OUT --silentModeBefore=05/03/2023
@@ -651,6 +657,69 @@ Increase the concurrency (defaults to 100)
651
657
  yarn tr-request-approve --auth=$TRANSCEND_API_KEY --actions=ERASURE --concurrency=500
652
658
  ```
653
659
 
660
+ ### tr-request-cancel
661
+
662
+ Bulk cancel a set of privacy requests from the [Privacy Requests -> Incoming Requests](https://app.transcend.io/privacy-requests/incoming-requests) tab.
663
+
664
+ #### Authentication
665
+
666
+ In order to use this cli, you will first need to generate an API key on the Transcend Admin Dashboard (https://app.transcend.io/infrastructure/api-keys).
667
+
668
+ The API key needs the following scopes:
669
+
670
+ - Request Approval and Communication
671
+ - View Incoming Requests
672
+
673
+ #### Arguments
674
+
675
+ | Argument | Description | Type | Default | Required |
676
+ | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | ---------------------------------------------------------------------------------------- | -------- |
677
+ | auth | The Transcend API key with the scopes necessary for the command. | string | N/A | true |
678
+ | actions | The [request actions](https://docs.transcend.io/docs/privacy-requests/configuring-requests/data-subject-requests#data-actions) to cancel. | RequestAction[] | N/A | true |
679
+ | statuses | The [request statuses](https://docs.transcend.io/docs/privacy-requests/overview#request-statuses) to cancel. | RequestStatus[] | REQUEST_MADE,WAITING.ENRICHING,COMPILING,DELAYED,APPROVING,SECONDARY,SECONDARY_APPROVING | false |
680
+ | silentModeBefore | Any requests made before this date should be marked as silent mode for canceling to skip email sending | Date | N/A | false |
681
+ | cancellationTitle | The title of the [email template](https://app.transcend.io/privacy-requests/email-templates) that should be sent to the requests upon cancelation. Any request in silent mode will not be emailed. | string | Request Canceled | false |
682
+ | transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
683
+ | concurrency | The concurrency to use when uploading requests in parallel. | number | 100 | false |
684
+
685
+ #### Usage
686
+
687
+ Bulk cancel all open SALE_OPT_OUT and ERASURE requests.
688
+
689
+ ```sh
690
+ yarn tr-request-cancel --auth=$TRANSCEND_API_KEY --actions=SALE_OPT_OUT,ERASURE
691
+ ```
692
+
693
+ Specifying the backend URL, needed for US hosted backend infrastructure.
694
+
695
+ ```sh
696
+ yarn tr-request-cancel --auth=$TRANSCEND_API_KEY --actions=ERASURE --transcendUrl=https://api.us.transcend.io
697
+ ```
698
+
699
+ Bulk cancel all Erasure (request.type=ERASURE) requests that are in an enriching state (request.status=ENRICHING)
700
+
701
+ ```sh
702
+ yarn tr-request-cancel --auth=$TRANSCEND_API_KEY --actions=ERASURE --statuses=ENRICHING
703
+ ```
704
+
705
+ Send a specific email template to the request that are being canceled. When not provided, the default cancellation template is used ("Request Canceled").
706
+
707
+ ```sh
708
+ yarn tr-request-cancel --auth=$TRANSCEND_API_KEY --actions=ERASURE --cancellationTitle="Custom Email Template"
709
+ ```
710
+
711
+ Cancel all open SALE_OPT_OUT, but mark any request made before 05/03/2023 as silent mode to prevent emailing those requests. When not provided, the existing silent mode state of that request will be used to determine if emails are sent.
712
+
713
+ ```sh
714
+ yarn tr-request-cancel --auth=$TRANSCEND_API_KEY --actions=SALE_OPT_OUT --silentModeBefore=05/03/2023
715
+ ```
716
+
717
+ Increase the concurrency (defaults to 100)
718
+
719
+ ```sh
720
+ yarn tr-request-cancel --auth=$TRANSCEND_API_KEY --actions=ERASURE --concurrency=500
721
+ ```
722
+
654
723
  ### tr-request-upload
655
724
 
656
725
  If you need to upload a set of requests from a CSV, you can run this command.
@@ -22,7 +22,7 @@ const requests_1 = require("./requests");
22
22
  * --requestType=ERASURE --silentModeBefore=06/23/2023
23
23
  *
24
24
  * Standard usage:
25
- * yarn tr-request-export --auth=asd123 \
25
+ * yarn tr-request-approve --auth=asd123 \
26
26
  * --requestType=ERASURE --silentModeBefore=06/23/2023
27
27
  */
28
28
  async function main() {
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli-request-cancel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-request-cancel.d.ts","sourceRoot":"","sources":["../src/cli-request-cancel.ts"],"names":[],"mappings":""}
@@ -0,0 +1,66 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ const yargs_parser_1 = __importDefault(require("yargs-parser"));
8
+ const colors_1 = __importDefault(require("colors"));
9
+ const logger_1 = require("./logger");
10
+ const privacy_types_1 = require("@transcend-io/privacy-types");
11
+ const requests_1 = require("./requests");
12
+ /**
13
+ * Cancel requests based on some filter criteria
14
+ *
15
+ * Requires scopes:
16
+ * - Request Approval and Communication
17
+ *
18
+ * Dev Usage:
19
+ * yarn ts-node ./src/cli-request-cancel.ts --auth=asd123 \
20
+ * --requestType=ERASURE --silentModeBefore=06/23/2023
21
+ *
22
+ * Standard usage:
23
+ * yarn tr-request-cancel --auth=asd123 \
24
+ * --requestType=ERASURE --silentModeBefore=06/23/2023
25
+ */
26
+ async function main() {
27
+ // Parse command line arguments
28
+ const { transcendUrl = 'https://api.transcend.io', auth, actions = '', statuses = '', silentModeBefore, cancellationTitle, concurrency = '100', } = (0, yargs_parser_1.default)(process.argv.slice(2));
29
+ // Ensure auth is passed
30
+ if (!auth) {
31
+ logger_1.logger.error(colors_1.default.red('A Transcend API key must be provided. You can specify using --auth=asd123'));
32
+ process.exit(1);
33
+ }
34
+ // Validate actions
35
+ const parsedActions = (0, requests_1.splitCsvToList)(actions);
36
+ const invalidActions = parsedActions.filter(
37
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
38
+ (type) => !Object.values(privacy_types_1.RequestAction).includes(type));
39
+ if (invalidActions.length > 0) {
40
+ logger_1.logger.error(colors_1.default.red(`Failed to parse actions:"${invalidActions.join(',')}".\n` +
41
+ `Expected one of: \n${Object.values(privacy_types_1.RequestAction).join('\n')}`));
42
+ process.exit(1);
43
+ }
44
+ // Validate statuses
45
+ const parsedStatuses = (0, requests_1.splitCsvToList)(statuses);
46
+ const invalidStatues = parsedStatuses.filter(
47
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
48
+ (type) => !Object.values(privacy_types_1.RequestStatus).includes(type));
49
+ if (invalidStatues.length > 0) {
50
+ logger_1.logger.error(colors_1.default.red(`Failed to parse statuses:"${invalidStatues.join(',')}".\n` +
51
+ `Expected one of: \n${Object.values(privacy_types_1.RequestStatus).join('\n')}`));
52
+ process.exit(1);
53
+ }
54
+ // Pull privacy requests
55
+ await (0, requests_1.cancelPrivacyRequests)({
56
+ transcendUrl,
57
+ requestActions: parsedActions,
58
+ auth,
59
+ cancellationTitle,
60
+ statuses: parsedStatuses.length > 0 ? parsedStatuses : undefined,
61
+ concurrency: parseInt(concurrency, 10),
62
+ silentModeBefore: silentModeBefore ? new Date(silentModeBefore) : undefined,
63
+ });
64
+ }
65
+ main();
66
+ //# sourceMappingURL=cli-request-cancel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli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AAA,yBAAc,EAAC,QAAQ,CAAoB,CAAC;IACnE,MAAM,cAAc,GAAG,cAAc,CAAC,MAAM;IAC1C,8DAA8D;IAC9D,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,6BAAa,CAAC,CAAC,QAAQ,CAAC,IAAW,CAAC,CAC9D,CAAC;IACF,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE;QAC7B,eAAM,CAAC,KAAK,CACV,gBAAM,CAAC,GAAG,CACR,6BAA6B,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM;YACzD,sBAAsB,MAAM,CAAC,MAAM,CAAC,6BAAa,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAClE,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,wBAAwB;IACxB,MAAM,IAAA,gCAAqB,EAAC;QAC1B,YAAY;QACZ,cAAc,EAAE,aAAa;QAC7B,IAAI;QACJ,iBAAiB;QACjB,QAAQ,EAAE,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS;QAChE,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC;QACtC,gBAAgB,EAAE,gBAAgB,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,SAAS;KAC5E,CAAC,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC"}
@@ -17,4 +17,6 @@ export declare const TOGGLE_UNKNOWN_REQUEST_POLICY: string;
17
17
  export declare const TOGGLE_UNKNOWN_COOKIE_POLICY: string;
18
18
  export declare const TOGGLE_TELEMETRY_PARTITION_STRATEGY: string;
19
19
  export declare const TOGGLE_CONSENT_PRECEDENCE: string;
20
+ export declare const UPDATE_CONSENT_EXPERIENCE: string;
21
+ export declare const CREATE_CONSENT_EXPERIENCE: string;
20
22
  //# sourceMappingURL=consentManager.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"consentManager.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/consentManager.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,QASpB,CAAC;AAEF,eAAO,MAAM,WAAW,QAyBvB,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAkB7B,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAkB7B,CAAC;AAEF,eAAO,MAAM,wBAAwB,QAWpC,CAAC;AAEF,eAAO,MAAM,UAAU,QAwCtB,CAAC;AAEF,eAAO,MAAM,OAAO,QAuCnB,CAAC;AAEF,eAAO,MAAM,wBAAwB,QAQpC,CAAC;AAEF,eAAO,MAAM,qBAAqB,QAsBjC,CAAC;AAEF,eAAO,MAAM,sBAAsB,QAQlC,CAAC;AAEF,eAAO,MAAM,gCAAgC,QAY5C,CAAC;AAEF,eAAO,MAAM,sBAAsB,QAYlC,CAAC;AAEF,eAAO,MAAM,8BAA8B,QAW1C,CAAC;AAEF,eAAO,MAAM,gCAAgC,QAW5C,CAAC;AAEF,eAAO,MAAM,qBAAqB,QAMjC,CAAC;AAEF,eAAO,MAAM,6BAA6B,QAQzC,CAAC;AAEF,eAAO,MAAM,4BAA4B,QAQxC,CAAC;AAEF,eAAO,MAAM,mCAAmC,QAQ/C,CAAC;AAEF,eAAO,MAAM,yBAAyB,QAQrC,CAAC"}
1
+ {"version":3,"file":"consentManager.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/consentManager.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,QASpB,CAAC;AAEF,eAAO,MAAM,WAAW,QAyBvB,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAkB7B,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAkB7B,CAAC;AAEF,eAAO,MAAM,wBAAwB,QAWpC,CAAC;AAEF,eAAO,MAAM,UAAU,QAwCtB,CAAC;AAEF,eAAO,MAAM,OAAO,QAuCnB,CAAC;AAEF,eAAO,MAAM,wBAAwB,QAQpC,CAAC;AAEF,eAAO,MAAM,qBAAqB,QAsBjC,CAAC;AAEF,eAAO,MAAM,sBAAsB,QAQlC,CAAC;AAEF,eAAO,MAAM,gCAAgC,QAY5C,CAAC;AAEF,eAAO,MAAM,sBAAsB,QAYlC,CAAC;AAEF,eAAO,MAAM,8BAA8B,QAW1C,CAAC;AAEF,eAAO,MAAM,gCAAgC,QAW5C,CAAC;AAEF,eAAO,MAAM,qBAAqB,QAMjC,CAAC;AAEF,eAAO,MAAM,6BAA6B,QAQzC,CAAC;AAEF,eAAO,MAAM,4BAA4B,QAQxC,CAAC;AAEF,eAAO,MAAM,mCAAmC,QAQ/C,CAAC;AAEF,eAAO,MAAM,yBAAyB,QAQrC,CAAC;AAEF,eAAO,MAAM,yBAAyB,QAMrC,CAAC;AAEF,eAAO,MAAM,yBAAyB,QAMrC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TOGGLE_CONSENT_PRECEDENCE = exports.TOGGLE_TELEMETRY_PARTITION_STRATEGY = exports.TOGGLE_UNKNOWN_COOKIE_POLICY = exports.TOGGLE_UNKNOWN_REQUEST_POLICY = exports.UPDATE_TOGGLE_USP_API = exports.UPDATE_CONSENT_MANAGER_PARTITION = exports.UPDATE_CONSENT_MANAGER_DOMAINS = exports.DEPLOY_CONSENT_MANAGER = exports.UPDATE_CONSENT_MANAGER_TO_LATEST = exports.CREATE_CONSENT_MANAGER = exports.FETCH_CONSENT_MANAGER = exports.FETCH_CONSENT_MANAGER_ID = exports.COOKIES = exports.DATA_FLOWS = exports.UPDATE_OR_CREATE_COOKIES = exports.UPDATE_DATA_FLOWS = exports.CREATE_DATA_FLOWS = exports.EXPERIENCES = exports.PURPOSES = void 0;
3
+ exports.CREATE_CONSENT_EXPERIENCE = exports.UPDATE_CONSENT_EXPERIENCE = exports.TOGGLE_CONSENT_PRECEDENCE = exports.TOGGLE_TELEMETRY_PARTITION_STRATEGY = exports.TOGGLE_UNKNOWN_COOKIE_POLICY = exports.TOGGLE_UNKNOWN_REQUEST_POLICY = exports.UPDATE_TOGGLE_USP_API = exports.UPDATE_CONSENT_MANAGER_PARTITION = exports.UPDATE_CONSENT_MANAGER_DOMAINS = exports.DEPLOY_CONSENT_MANAGER = exports.UPDATE_CONSENT_MANAGER_TO_LATEST = exports.CREATE_CONSENT_MANAGER = exports.FETCH_CONSENT_MANAGER = exports.FETCH_CONSENT_MANAGER_ID = exports.COOKIES = exports.DATA_FLOWS = exports.UPDATE_OR_CREATE_COOKIES = exports.UPDATE_DATA_FLOWS = exports.CREATE_DATA_FLOWS = exports.EXPERIENCES = exports.PURPOSES = void 0;
4
4
  const graphql_request_1 = require("graphql-request");
5
5
  exports.PURPOSES = (0, graphql_request_1.gql) `
6
6
  query TranscendCliPurposes {
@@ -303,4 +303,18 @@ exports.TOGGLE_CONSENT_PRECEDENCE = (0, graphql_request_1.gql) `
303
303
  }
304
304
  }
305
305
  `;
306
+ exports.UPDATE_CONSENT_EXPERIENCE = (0, graphql_request_1.gql) `
307
+ mutation TranscendCliUpdateConsentExperience($input: UpdateExperienceInput!) {
308
+ updateExperience(input: $input) {
309
+ clientMutationId
310
+ }
311
+ }
312
+ `;
313
+ exports.CREATE_CONSENT_EXPERIENCE = (0, graphql_request_1.gql) `
314
+ mutation TranscendCliCreateConsentExperience($input: CreateExperienceInput!) {
315
+ createExperience(input: $input) {
316
+ clientMutationId
317
+ }
318
+ }
319
+ `;
306
320
  //# sourceMappingURL=consentManager.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"consentManager.js","sourceRoot":"","sources":["../../../src/graphql/gqls/consentManager.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEzB,QAAA,QAAQ,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;CAS1B,CAAC;AAEW,QAAA,WAAW,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;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A,qBAAG,EAAA;;;;;;;;;;;CAWlD,CAAC;AAEW,QAAA,qBAAqB,GAAG,IAAA,qBAAG,EAAA;;;;;;CAMvC,CAAC;AAEW,QAAA,6BAA6B,GAAG,IAAA,qBAAG,EAAA;;;;;;;;CAQ/C,CAAC;AAEW,QAAA,4BAA4B,GAAG,IAAA,qBAAG,EAAA;;;;;;;;CAQ9C,CAAC;AAEW,QAAA,mCAAmC,GAAG,IAAA,qBAAG,EAAA;;;;;;;;CAQrD,CAAC;AAEW,QAAA,yBAAyB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;CAQ3C,CAAC;AAEW,QAAA,yBAAyB,GAAG,IAAA,qBAAG,EAAA;;;;;;CAM3C,CAAC;AAEW,QAAA,yBAAyB,GAAG,IAAA,qBAAG,EAAA;;;;;;CAM3C,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export declare const REQUESTS: string;
2
- export declare const APPROVE_PRIVACY_REQUESTS: string;
2
+ export declare const APPROVE_PRIVACY_REQUEST: string;
3
+ export declare const CANCEL_PRIVACY_REQUEST: string;
3
4
  export declare const UPDATE_PRIVACY_REQUEST: string;
4
5
  //# sourceMappingURL=request.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/request.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,QAmCpB,CAAC;AAEF,eAAO,MAAM,wBAAwB,QAQpC,CAAC;AAEF,eAAO,MAAM,sBAAsB,QAQlC,CAAC"}
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/request.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,QAmCpB,CAAC;AAEF,eAAO,MAAM,uBAAuB,QAQnC,CAAC;AACF,eAAO,MAAM,sBAAsB,QAQlC,CAAC;AAEF,eAAO,MAAM,sBAAsB,QAQlC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UPDATE_PRIVACY_REQUEST = exports.APPROVE_PRIVACY_REQUESTS = exports.REQUESTS = void 0;
3
+ exports.UPDATE_PRIVACY_REQUEST = exports.CANCEL_PRIVACY_REQUEST = exports.APPROVE_PRIVACY_REQUEST = exports.REQUESTS = void 0;
4
4
  const graphql_request_1 = require("graphql-request");
5
5
  exports.REQUESTS = (0, graphql_request_1.gql) `
6
6
  query TranscendCliRequests(
@@ -38,7 +38,7 @@ exports.REQUESTS = (0, graphql_request_1.gql) `
38
38
  }
39
39
  }
40
40
  `;
41
- exports.APPROVE_PRIVACY_REQUESTS = (0, graphql_request_1.gql) `
41
+ exports.APPROVE_PRIVACY_REQUEST = (0, graphql_request_1.gql) `
42
42
  mutation TranscendCliApprovePrivacyRequest($input: CommunicationInput!) {
43
43
  approveRequest(input: $input) {
44
44
  request {
@@ -47,6 +47,15 @@ exports.APPROVE_PRIVACY_REQUESTS = (0, graphql_request_1.gql) `
47
47
  }
48
48
  }
49
49
  `;
50
+ exports.CANCEL_PRIVACY_REQUEST = (0, graphql_request_1.gql) `
51
+ mutation TranscendCliCancelPrivacyRequest($input: CommunicationInput!) {
52
+ cancelRequest(input: $input) {
53
+ request {
54
+ id
55
+ }
56
+ }
57
+ }
58
+ `;
50
59
  exports.UPDATE_PRIVACY_REQUEST = (0, graphql_request_1.gql) `
51
60
  mutation TranscendCliUpdatePrivacyRequest($input: UpdateRequestInput!) {
52
61
  updateRequest(input: $input) {
@@ -1 +1 @@
1
- {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/graphql/gqls/request.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEzB,QAAA,QAAQ,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmC1B,CAAC;AAEW,QAAA,wBAAwB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;CAQ1C,CAAC;AAEW,QAAA,sBAAsB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;CAQxC,CAAC"}
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/graphql/gqls/request.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEzB,QAAA,QAAQ,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmC1B,CAAC;AAEW,QAAA,uBAAuB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;CAQzC,CAAC;AACW,QAAA,sBAAsB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;CAQxC,CAAC;AAEW,QAAA,sBAAsB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;CAQxC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/template.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,QASrB,CAAC;AAEF,eAAO,MAAM,eAAe,QAM3B,CAAC"}
1
+ {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/template.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,QAerB,CAAC;AAEF,eAAO,MAAM,eAAe,QAM3B,CAAC"}
@@ -8,6 +8,12 @@ exports.TEMPLATES = (0, graphql_request_1.gql) `
8
8
  nodes {
9
9
  id
10
10
  title
11
+ subject {
12
+ defaultMessage
13
+ }
14
+ template {
15
+ defaultMessage
16
+ }
11
17
  }
12
18
  }
13
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"template.js","sourceRoot":"","sources":["../../../src/graphql/gqls/template.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEzB,QAAA,SAAS,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;CAS3B,CAAC;AAEW,QAAA,eAAe,GAAG,IAAA,qBAAG,EAAA;;;;;;CAMjC,CAAC"}
1
+ {"version":3,"file":"template.js","sourceRoot":"","sources":["../../../src/graphql/gqls/template.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEzB,QAAA,SAAS,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;CAe3B,CAAC;AAEW,QAAA,eAAe,GAAG,IAAA,qBAAG,EAAA;;;;;;CAMjC,CAAC"}
@@ -1,5 +1,12 @@
1
- import { ConsentManagerInput } from '../codecs';
1
+ import { ConsentManageExperienceInput, ConsentManagerInput } from '../codecs';
2
2
  import { GraphQLClient } from 'graphql-request';
3
+ /**
4
+ * Sync consent manager experiences up to Transcend
5
+ *
6
+ * @param client - GraphQL client
7
+ * @param experiences - The experience inputs
8
+ */
9
+ export declare function syncConsentManagerExperiences(client: GraphQLClient, experiences: ConsentManageExperienceInput[]): Promise<void>;
3
10
  /**
4
11
  * Sync the consent manager
5
12
  *
@@ -1 +1 @@
1
- {"version":3,"file":"syncConsentManager.d.ts","sourceRoot":"","sources":["../../src/graphql/syncConsentManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAgBhD;;;;;GAKG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,aAAa,EACrB,cAAc,EAAE,mBAAmB,GAClC,OAAO,CAAC,IAAI,CAAC,CAuHf"}
1
+ {"version":3,"file":"syncConsentManager.d.ts","sourceRoot":"","sources":["../../src/graphql/syncConsentManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AA4BhD;;;;;GAKG;AACH,wBAAsB,6BAA6B,CACjD,MAAM,EAAE,aAAa,EACrB,WAAW,EAAE,4BAA4B,EAAE,GAC1C,OAAO,CAAC,IAAI,CAAC,CA8Ef;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,aAAa,EACrB,cAAc,EAAE,mBAAmB,GAClC,OAAO,CAAC,IAAI,CAAC,CA4Hf"}
@@ -1,9 +1,92 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.syncConsentManager = void 0;
6
+ exports.syncConsentManager = exports.syncConsentManagerExperiences = void 0;
4
7
  const gqls_1 = require("./gqls");
5
8
  const makeGraphQLRequest_1 = require("./makeGraphQLRequest");
6
9
  const fetchConsentManagerId_1 = require("./fetchConsentManagerId");
10
+ const keyBy_1 = __importDefault(require("lodash/keyBy"));
11
+ const bluebird_1 = require("bluebird");
12
+ const airgap_js_types_1 = require("@transcend-io/airgap.js-types");
13
+ const PURPOSES_LINK = 'https://app.transcend.io/consent-manager/regional-experiences/purposes';
14
+ /**
15
+ * Sync consent manager experiences up to Transcend
16
+ *
17
+ * @param client - GraphQL client
18
+ * @param experiences - The experience inputs
19
+ */
20
+ async function syncConsentManagerExperiences(client, experiences) {
21
+ // Fetch existing experiences
22
+ const existingExperiences = await (0, fetchConsentManagerId_1.fetchConsentManagerExperiences)(client);
23
+ const experienceLookup = (0, keyBy_1.default)(existingExperiences, 'name');
24
+ // Fetch existing purposes
25
+ const purposes = await (0, fetchConsentManagerId_1.fetchPurposes)(client);
26
+ const purposeLookup = (0, keyBy_1.default)(purposes, 'name');
27
+ // Bulk update or create experiences
28
+ await (0, bluebird_1.map)(experiences, async (exp, ind) => {
29
+ var _a, _b;
30
+ // Purpose IDs
31
+ const purposeIds = (_a = exp.purposes) === null || _a === void 0 ? void 0 : _a.map((purpose, ind2) => {
32
+ const existingPurpose = purposeLookup[purpose.name];
33
+ if (!existingPurpose) {
34
+ throw new Error(`Invalid purpose name provided at consentManager.experiences[${ind}].purposes[${ind2}]: ` +
35
+ `${purpose.name}. See list of valid purposes ${PURPOSES_LINK}`);
36
+ }
37
+ return existingPurpose.id;
38
+ });
39
+ const optedOutPurposeIds = (_b = exp.optedOutPurposes) === null || _b === void 0 ? void 0 : _b.map((purpose, ind2) => {
40
+ const existingPurpose = purposeLookup[purpose.name];
41
+ if (!existingPurpose) {
42
+ throw new Error(`Invalid purpose name provided at consentManager.experiences[${ind}].optedOutPurposes[${ind2}]: ` +
43
+ `${purpose.name}. See list of valid purposes ${PURPOSES_LINK}`);
44
+ }
45
+ return existingPurpose.id;
46
+ });
47
+ // update experience
48
+ const existingExperience = experienceLookup[exp.name];
49
+ if (existingExperience) {
50
+ await (0, makeGraphQLRequest_1.makeGraphQLRequest)(client, gqls_1.UPDATE_CONSENT_EXPERIENCE, {
51
+ input: {
52
+ id: existingExperience.id,
53
+ name: exp.name,
54
+ displayName: exp.displayName,
55
+ regions: exp.regions,
56
+ operator: exp.operator,
57
+ displayPriority: exp.displayPriority !== existingExperience.displayPriority
58
+ ? exp.displayPriority
59
+ : undefined,
60
+ viewState: exp.viewState,
61
+ purposes: purposeIds,
62
+ optedOutPurposes: optedOutPurposeIds,
63
+ browserLanguages: exp.browserLanguages,
64
+ browserTimeZones: exp.browserTimeZones,
65
+ },
66
+ });
67
+ }
68
+ else {
69
+ // create new experience
70
+ await (0, makeGraphQLRequest_1.makeGraphQLRequest)(client, gqls_1.CREATE_CONSENT_EXPERIENCE, {
71
+ input: {
72
+ name: exp.name,
73
+ displayName: exp.displayName,
74
+ regions: exp.regions,
75
+ operator: exp.operator,
76
+ displayPriority: exp.displayPriority,
77
+ viewState: exp.viewState || airgap_js_types_1.InitialViewState.Hidden,
78
+ purposes: purposeIds || [],
79
+ optedOutPurposes: optedOutPurposeIds || [],
80
+ browserLanguages: exp.browserLanguages,
81
+ browserTimeZones: exp.browserTimeZones,
82
+ },
83
+ });
84
+ }
85
+ }, {
86
+ concurrency: 10,
87
+ });
88
+ }
89
+ exports.syncConsentManagerExperiences = syncConsentManagerExperiences;
7
90
  /**
8
91
  * Sync the consent manager
9
92
  *
@@ -95,6 +178,10 @@ async function syncConsentManager(client, consentManager) {
95
178
  },
96
179
  });
97
180
  }
181
+ // Update experience configurations
182
+ if (consentManager.experiences) {
183
+ await syncConsentManagerExperiences(client, consentManager.experiences);
184
+ }
98
185
  // TODO: https://transcend.height.app/T-23875
99
186
  // syncEndpoint: string;
100
187
  // TODO: https://transcend.height.app/T-23919
@@ -1 +1 @@
1
- {"version":3,"file":"syncConsentManager.js","sourceRoot":"","sources":["../../src/graphql/syncConsentManager.ts"],"names":[],"mappings":";;;AAEA,iCAWgB;AAChB,6DAA0D;AAC1D,mEAAgE;AAEhE;;;;;GAKG;AACI,KAAK,UAAU,kBAAkB,CACtC,MAAqB,EACrB,cAAmC;IAEnC,IAAI,cAAsB,CAAC;IAE3B,qDAAqD;IACrD,IAAI;QACF,cAAc,GAAG,MAAM,IAAA,6CAAqB,EAAC,MAAM,EAAE,CAAC,CAAC,CAAC;KACzD;IAAC,OAAO,GAAG,EAAE;QACZ,6CAA6C;QAC7C,IAAI,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAC,EAAE;YAClD,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,IAAA,uCAAkB,EAM9C,MAAM,EAAE,kCAA2B,CAAC,CAAC;YAExC,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,IAAA,uCAAkB,EAM/C,MAAM,EAAE,8BAAuB,EAAE;gBAClC,GAAG,EAAE,YAAY,CAAC,wBAAwB;aAC3C,CAAC,CAAC;YAEH,MAAM,EAAE,oBAAoB,EAAE,GAAG,MAAM,IAAA,uCAAkB,EAStD,MAAM,EAAE,6BAAsB,EAAE;gBACjC,OAAO,EAAE,cAAc,CAAC,OAAO;gBAC/B,eAAe,EAAE,aAAa,CAAC,EAAE;aAClC,CAAC,CAAC;YACH,cAAc,GAAG,oBAAoB,CAAC,cAAc,CAAC,EAAE,CAAC;SACzD;aAAM;YACL,MAAM,GAAG,CAAC;SACX;KACF;IAED,eAAe;IACf,IAAI,cAAc,CAAC,OAAO,EAAE;QAC1B,MAAM,IAAA,uCAAkB,EAAC,MAAM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 export interface Template {
5
5
  id: string;
6
6
  /** Title of Template */
7
7
  title: string;
8
+ /** Template subject (e.g. email subject) */
9
+ subject: {
10
+ /** Default message for template subject */
11
+ defaultMessage: string;
12
+ };
13
+ /** Template body - rich text HTML */
14
+ template: {
15
+ /** Default message for template body */
16
+ defaultMessage: string;
17
+ };
8
18
  }
9
19
  /**
10
20
  * Fetch all Templates in the organization
@@ -1 +1 @@
1
- {"version":3,"file":"syncTemplates.d.ts","sourceRoot":"","sources":["../../src/graphql/syncTemplates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIhD,MAAM,WAAW,QAAQ;IACvB,qBAAqB;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,wBAAwB;IACxB,KAAK,EAAE,MAAM,CAAC;CACf;AAID;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,aAAa,EACrB,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,QAAQ,EAAE,CAAC,CA2BrB;AAED;;;;;GAKG;AACH,wBAAsB,YAAY,CAChC,QAAQ,EAAE,aAAa,EACvB,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,IAAI,CAAC,CAaf"}
1
+ {"version":3,"file":"syncTemplates.d.ts","sourceRoot":"","sources":["../../src/graphql/syncTemplates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIhD,MAAM,WAAW,QAAQ;IACvB,qBAAqB;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,wBAAwB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,4CAA4C;IAC5C,OAAO,EAAE;QACP,2CAA2C;QAC3C,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,qCAAqC;IACrC,QAAQ,EA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,MAAM,iBAAiB,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChE,MAAM,gBAAgB,GAAG,OAAO,CAAC,IAAI,CACnC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CACxC,CAAC;IAEF,gCAAgC;IAChC,IAAI,CAAC,gBAAgB,EAAE;QACrB,MAAM,IAAA,uCAAkB,EAAC,MAAM,EAAE,sBAAe,EAAE;YAChD,KAAK,EAAE,QAAQ,CAAC,KAAK;SACtB,CAAC,CAAC;KACJ;AACH,CAAC;AAhBD,oCAgBC"}
@@ -32,21 +32,21 @@ async function approvePrivacyRequests({ requestActions, auth, silentModeBefore,
32
32
  logger_1.logger.info(colors_1.default.magenta(`Approving "${allRequests.length}" requests.`));
33
33
  let total = 0;
34
34
  progressBar.start(allRequests.length, 0);
35
- await (0, bluebird_1.map)(allRequests, async (requestToRestart) => {
35
+ await (0, bluebird_1.map)(allRequests, async (requestToApprove) => {
36
36
  // update request to silent mode if silentModeBefore is defined
37
37
  // and the request was created before silentModeBefore
38
38
  if (silentModeBefore &&
39
- new Date(silentModeBefore) > new Date(requestToRestart.createdAt)) {
39
+ new Date(silentModeBefore) > new Date(requestToApprove.createdAt)) {
40
40
  await (0, graphql_1.makeGraphQLRequest)(client, graphql_1.UPDATE_PRIVACY_REQUEST, {
41
41
  input: {
42
- id: requestToRestart.id,
42
+ id: requestToApprove.id,
43
43
  isSilent: true,
44
44
  },
45
45
  });
46
46
  }
47
47
  // approve the request
48
- await (0, graphql_1.makeGraphQLRequest)(client, graphql_1.APPROVE_PRIVACY_REQUESTS, {
49
- input: { requestId: requestToRestart.id },
48
+ await (0, graphql_1.makeGraphQLRequest)(client, graphql_1.APPROVE_PRIVACY_REQUEST, {
49
+ input: { requestId: requestToApprove.id },
50
50
  });
51
51
  total += 1;
52
52
  progressBar.update(total);
@@ -1 +1 @@
1
- {"version":3,"file":"approvePrivacyRequests.js","sour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C,MAAM,EAAE,gCAAsB,EAAE;gBACvD,KAAK,EAAE;oBACL,EAAE,EAAE,gBAAgB,CAAC,EAAE;oBACvB,QAAQ,EAAE,IAAI;iBACf;aACF,CAAC,CAAC;SACJ;QAED,sBAAsB;QACtB,MAAM,IAAA,4BAAkB,EAAC,MAAM,EAAE,kCAAwB,EAAE;YACzD,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,CAAC,EAAE,EAAE;SAC1C,CAAC,CAAC;QAEH,KAAK,IAAI,CAAC,CAAC;QACX,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC,EACD,EAAE,WAAW,EAAE,CAChB,CAAC;IAEF,WAAW,CAAC,IAAI,EAAE,CAAC;IACnB,MAAM,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;IAChC,MAAM,SAAS,GAAG,EAAE,GAAG,EAAE,CAAC;IAE1B,eAAM,CAAC,IAAI,CACT,gBAAM,CAAC,KAAK,CACV,yBAAyB,KAAK,iBAC5B,SAAS,GAAG,IACd,YAAY,CACb,CACF,CAAC;IACF,OAAO,WAAW,CAAC,MAAM,CAAC;AAC5B,CAAC;AAhFD,wDAgFC"}
1
+ {"version":3,"file":"approvePrivacyRequests.js","sourceRoot":"","sources":["../../src/requests/approvePrivacyRequests.ts"],"names":[],"mappings":";;;;;;AAAA,uCAA+B;AAC/B,oDAA4B;AAC5B,sCAAmC;AACnC,+DAA2E;AAC3E,wCAMoB;AACpB,gEAAuC;AAEvC;;;;;GAKG;AACI,KAAK,UAAU,sBAAsB,CAAC,EAC3C,cAAc,EACd,IAAI,EACJ,gBAAgB,EAChB,WAAW,GAAG,GAAG,EACjB,YAAY,GAAG,0BAA0B,GAY1C;IACC,4EAA4E;IAC5E,MAAM,MAAM,GAAG,IAAA,qCAA2B,EAAC,YAAY,EAAE,IAAI,CAAC,CAAC;IAE/D,gBAAgB;IAChB,MAAM,EAAE,GAAG,IAAI,IAAI,EAAE,CA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,EAAE,CAAC;IACnB,MAAM,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;IAChC,MAAM,SAAS,GAAG,EAAE,GAAG,EAAE,CAAC;IAE1B,eAAM,CAAC,IAAI,CACT,gBAAM,CAAC,KAAK,CACV,yBAAyB,KAAK,iBAC5B,SAAS,GAAG,IACd,YAAY,CACb,CACF,CAAC;IACF,OAAO,WAAW,CAAC,MAAM,CAAC;AAC5B,CAAC;AAhFD,wDAgFC"}
@@ -0,0 +1,24 @@
1
+ import { RequestAction, RequestStatus } from '@transcend-io/privacy-types';
2
+ /**
3
+ * Cancel a set of privacy requests
4
+ *
5
+ * @param options - Options
6
+ * @returns The number of requests canceled
7
+ */
8
+ export declare function cancelPrivacyRequests({ requestActions, cancellationTitle, auth, silentModeBefore, statuses, concurrency, transcendUrl, }: {
9
+ /** The request actions that should be restarted */
10
+ requestActions: RequestAction[];
11
+ /** Transcend API key authentication */
12
+ auth: string;
13
+ /** Concurrency limit for approving */
14
+ concurrency?: number;
15
+ /** The request statuses to cancel */
16
+ statuses?: RequestStatus[];
17
+ /** Mark these requests as silent mode if they were created before this date */
18
+ silentModeBefore?: Date;
19
+ /** API URL for Transcend backend */
20
+ transcendUrl?: string;
21
+ /** The email template to use when canceling the requests */
22
+ cancellationTitle?: string;
23
+ }): Promise<number>;
24
+ //# sourceMappingURL=cancelPrivacyRequests.d.ts.map