@transcend-io/cli 7.0.2 → 7.0.4
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.
- package/README.md +1816 -158
- package/dist/bin/bash-complete.cjs +1 -1
- package/dist/bin/cli.cjs +1 -1
- package/dist/bin/deprecated-command.cjs +2 -2
- package/dist/chunk-3ZKZCSGD.cjs +2847 -0
- package/dist/chunk-3ZKZCSGD.cjs.map +1 -0
- package/dist/{chunk-QXKWSBYR.cjs → chunk-6DWFLWWT.cjs} +2 -2
- package/dist/{chunk-QXKWSBYR.cjs.map → chunk-6DWFLWWT.cjs.map} +1 -1
- package/dist/chunk-6FGYCQAQ.cjs +2 -0
- package/dist/chunk-6FGYCQAQ.cjs.map +1 -0
- package/dist/chunk-BF5T3SGE.cjs +3 -0
- package/dist/chunk-BF5T3SGE.cjs.map +1 -0
- package/dist/chunk-E3CF3RKX.cjs +2 -0
- package/dist/chunk-E3CF3RKX.cjs.map +1 -0
- package/dist/chunk-EVZLUL56.cjs +75 -0
- package/dist/chunk-EVZLUL56.cjs.map +1 -0
- package/dist/{chunk-W5T3VHKD.cjs → chunk-FPXWBUHS.cjs} +2 -2
- package/dist/{chunk-W5T3VHKD.cjs.map → chunk-FPXWBUHS.cjs.map} +1 -1
- package/dist/chunk-G2T7YVBG.cjs +113 -0
- package/dist/chunk-G2T7YVBG.cjs.map +1 -0
- package/dist/{chunk-WAYG2MDL.cjs → chunk-IG65EYJY.cjs} +2 -2
- package/dist/{chunk-WAYG2MDL.cjs.map → chunk-IG65EYJY.cjs.map} +1 -1
- package/dist/chunk-L7YT5ETS.cjs +2 -0
- package/dist/{chunk-VFP6EKTE.cjs.map → chunk-L7YT5ETS.cjs.map} +1 -1
- package/dist/{chunk-U6G3J6VJ.cjs → chunk-R4IKDXM5.cjs} +2 -2
- package/dist/{chunk-U6G3J6VJ.cjs.map → chunk-R4IKDXM5.cjs.map} +1 -1
- package/dist/chunk-TS5EYI4O.cjs +12 -0
- package/dist/chunk-TS5EYI4O.cjs.map +1 -0
- package/dist/chunk-WIXQSFS6.cjs +2 -0
- package/dist/chunk-WIXQSFS6.cjs.map +1 -0
- package/dist/chunk-WKCTKYN4.cjs +2 -0
- package/dist/chunk-WKCTKYN4.cjs.map +1 -0
- package/dist/chunk-Y4BWTFTX.cjs +15 -0
- package/dist/chunk-Y4BWTFTX.cjs.map +1 -0
- package/dist/{chunk-XHS3FR6L.cjs → chunk-YA5UZ3YM.cjs} +2 -2
- package/dist/{chunk-XHS3FR6L.cjs.map → chunk-YA5UZ3YM.cjs.map} +1 -1
- package/dist/impl-24MFRX5R.cjs +2 -0
- package/dist/impl-24MFRX5R.cjs.map +1 -0
- package/dist/impl-2G6FOZLU.cjs +2 -0
- package/dist/impl-2G6FOZLU.cjs.map +1 -0
- package/dist/impl-4EDFESYC.cjs +2 -0
- package/dist/impl-4EDFESYC.cjs.map +1 -0
- package/dist/impl-5FO2QEHJ.cjs +2 -0
- package/dist/impl-5FO2QEHJ.cjs.map +1 -0
- package/dist/impl-6B7JDOM5.cjs +3 -0
- package/dist/impl-6B7JDOM5.cjs.map +1 -0
- package/dist/impl-AUOR6D3Q.cjs +2 -0
- package/dist/impl-AUOR6D3Q.cjs.map +1 -0
- package/dist/impl-B5HQXUMH.cjs +2 -0
- package/dist/impl-B5HQXUMH.cjs.map +1 -0
- package/dist/impl-BNFADMTO.cjs +2 -0
- package/dist/impl-BNFADMTO.cjs.map +1 -0
- package/dist/impl-BPWMOF4U.cjs +2 -0
- package/dist/impl-BPWMOF4U.cjs.map +1 -0
- package/dist/impl-CNCC36M6.cjs +9 -0
- package/dist/impl-CNCC36M6.cjs.map +1 -0
- package/dist/impl-DBDL4Z23.cjs +2 -0
- package/dist/impl-DBDL4Z23.cjs.map +1 -0
- package/dist/impl-FG47LALL.cjs +2 -0
- package/dist/impl-FG47LALL.cjs.map +1 -0
- package/dist/impl-GNB7TDFU.cjs +2 -0
- package/dist/impl-GNB7TDFU.cjs.map +1 -0
- package/dist/impl-HB3R7YDP.cjs +2 -0
- package/dist/impl-HB3R7YDP.cjs.map +1 -0
- package/dist/impl-ICI7EQKE.cjs +2 -0
- package/dist/impl-ICI7EQKE.cjs.map +1 -0
- package/dist/impl-KOMGU55G.cjs +2 -0
- package/dist/impl-KOMGU55G.cjs.map +1 -0
- package/dist/impl-KP27234L.cjs +2 -0
- package/dist/impl-KP27234L.cjs.map +1 -0
- package/dist/impl-KZ2L66Q3.cjs +2 -0
- package/dist/impl-KZ2L66Q3.cjs.map +1 -0
- package/dist/impl-L3M67IGI.cjs +7 -0
- package/dist/{impl-JH4KIP5U.cjs.map → impl-L3M67IGI.cjs.map} +1 -1
- package/dist/impl-LTOV5CHF.cjs +2 -0
- package/dist/impl-LTOV5CHF.cjs.map +1 -0
- package/dist/impl-MO6AOGQM.cjs +2 -0
- package/dist/impl-MO6AOGQM.cjs.map +1 -0
- package/dist/impl-MPGDZ2M2.cjs +12 -0
- package/dist/impl-MPGDZ2M2.cjs.map +1 -0
- package/dist/impl-N54C7NPT.cjs +2 -0
- package/dist/impl-N54C7NPT.cjs.map +1 -0
- package/dist/impl-N6ML5K5S.cjs +2 -0
- package/dist/impl-N6ML5K5S.cjs.map +1 -0
- package/dist/impl-NKLZ5RG4.cjs +2 -0
- package/dist/impl-NKLZ5RG4.cjs.map +1 -0
- package/dist/impl-NNOWJ4Q4.cjs +6 -0
- package/dist/impl-NNOWJ4Q4.cjs.map +1 -0
- package/dist/impl-OLEEHZUA.cjs +6 -0
- package/dist/impl-OLEEHZUA.cjs.map +1 -0
- package/dist/impl-Q6EQYFKN.cjs +4 -0
- package/dist/impl-Q6EQYFKN.cjs.map +1 -0
- package/dist/impl-QHTG36G3.cjs +2 -0
- package/dist/impl-QHTG36G3.cjs.map +1 -0
- package/dist/impl-QITUCVEV.cjs +2 -0
- package/dist/impl-QITUCVEV.cjs.map +1 -0
- package/dist/impl-R3KCARSP.cjs +2 -0
- package/dist/impl-R3KCARSP.cjs.map +1 -0
- package/dist/impl-RSHVCDLE.cjs +2 -0
- package/dist/impl-RSHVCDLE.cjs.map +1 -0
- package/dist/impl-SNLQCZOR.cjs +2 -0
- package/dist/impl-SNLQCZOR.cjs.map +1 -0
- package/dist/impl-TPVA6DLJ.cjs +2 -0
- package/dist/impl-TPVA6DLJ.cjs.map +1 -0
- package/dist/impl-TVNBHOR4.cjs +2 -0
- package/dist/impl-TVNBHOR4.cjs.map +1 -0
- package/dist/impl-TWLWQSZG.cjs +2 -0
- package/dist/impl-TWLWQSZG.cjs.map +1 -0
- package/dist/impl-UKOAB6ED.cjs +2 -0
- package/dist/impl-UKOAB6ED.cjs.map +1 -0
- package/dist/impl-ZKBMWGMK.cjs +2 -0
- package/dist/impl-ZKBMWGMK.cjs.map +1 -0
- package/dist/impl-ZTWLYZZO.cjs +2 -0
- package/dist/impl-ZTWLYZZO.cjs.map +1 -0
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +39 -7
- package/package.json +2 -1
- package/dist/chunk-25UGE4YY.cjs +0 -12
- package/dist/chunk-25UGE4YY.cjs.map +0 -1
- package/dist/chunk-EG4L6YAJ.cjs +0 -2
- package/dist/chunk-EG4L6YAJ.cjs.map +0 -1
- package/dist/chunk-FPTEK7BG.cjs +0 -2
- package/dist/chunk-FPTEK7BG.cjs.map +0 -1
- package/dist/chunk-HAOVN3XO.cjs +0 -75
- package/dist/chunk-HAOVN3XO.cjs.map +0 -1
- package/dist/chunk-KWG56BUX.cjs +0 -2
- package/dist/chunk-KWG56BUX.cjs.map +0 -1
- package/dist/chunk-NOF6QHE4.cjs +0 -2843
- package/dist/chunk-NOF6QHE4.cjs.map +0 -1
- package/dist/chunk-QY37PK62.cjs +0 -94
- package/dist/chunk-QY37PK62.cjs.map +0 -1
- package/dist/chunk-SHV6R64J.cjs +0 -2
- package/dist/chunk-SHV6R64J.cjs.map +0 -1
- package/dist/chunk-VFP6EKTE.cjs +0 -2
- package/dist/chunk-XBHJO2OX.cjs +0 -3
- package/dist/chunk-XBHJO2OX.cjs.map +0 -1
- package/dist/impl-2DZFILID.cjs +0 -2
- package/dist/impl-2DZFILID.cjs.map +0 -1
- package/dist/impl-3CTVL4TA.cjs +0 -2
- package/dist/impl-3CTVL4TA.cjs.map +0 -1
- package/dist/impl-3IN6AV44.cjs +0 -9
- package/dist/impl-3IN6AV44.cjs.map +0 -1
- package/dist/impl-3PSE2WEI.cjs +0 -2
- package/dist/impl-3PSE2WEI.cjs.map +0 -1
- package/dist/impl-4XMTTFXK.cjs +0 -2
- package/dist/impl-4XMTTFXK.cjs.map +0 -1
- package/dist/impl-5L4G73JT.cjs +0 -2
- package/dist/impl-5L4G73JT.cjs.map +0 -1
- package/dist/impl-6NO74W36.cjs +0 -2
- package/dist/impl-6NO74W36.cjs.map +0 -1
- package/dist/impl-6TJRZGRQ.cjs +0 -2
- package/dist/impl-6TJRZGRQ.cjs.map +0 -1
- package/dist/impl-7FHT7P3V.cjs +0 -2
- package/dist/impl-7FHT7P3V.cjs.map +0 -1
- package/dist/impl-7KOXTJKC.cjs +0 -2
- package/dist/impl-7KOXTJKC.cjs.map +0 -1
- package/dist/impl-BESS7RG2.cjs +0 -2
- package/dist/impl-BESS7RG2.cjs.map +0 -1
- package/dist/impl-COCUOYKI.cjs +0 -2
- package/dist/impl-COCUOYKI.cjs.map +0 -1
- package/dist/impl-ELOMI7JW.cjs +0 -6
- package/dist/impl-ELOMI7JW.cjs.map +0 -1
- package/dist/impl-EUJEQGOT.cjs +0 -2
- package/dist/impl-EUJEQGOT.cjs.map +0 -1
- package/dist/impl-F3OOKCK6.cjs +0 -2
- package/dist/impl-F3OOKCK6.cjs.map +0 -1
- package/dist/impl-GH42XS6I.cjs +0 -2
- package/dist/impl-GH42XS6I.cjs.map +0 -1
- package/dist/impl-GSD2LS72.cjs +0 -2
- package/dist/impl-GSD2LS72.cjs.map +0 -1
- package/dist/impl-IIP3SXEB.cjs +0 -6
- package/dist/impl-IIP3SXEB.cjs.map +0 -1
- package/dist/impl-JD4LU2UP.cjs +0 -4
- package/dist/impl-JD4LU2UP.cjs.map +0 -1
- package/dist/impl-JH4KIP5U.cjs +0 -7
- package/dist/impl-JVXU24DF.cjs +0 -2
- package/dist/impl-JVXU24DF.cjs.map +0 -1
- package/dist/impl-KO4JL735.cjs +0 -2
- package/dist/impl-KO4JL735.cjs.map +0 -1
- package/dist/impl-L464FWQF.cjs +0 -2
- package/dist/impl-L464FWQF.cjs.map +0 -1
- package/dist/impl-LH2NCUFY.cjs +0 -2
- package/dist/impl-LH2NCUFY.cjs.map +0 -1
- package/dist/impl-LTL4WYPE.cjs +0 -2
- package/dist/impl-LTL4WYPE.cjs.map +0 -1
- package/dist/impl-MHML3KTM.cjs +0 -2
- package/dist/impl-MHML3KTM.cjs.map +0 -1
- package/dist/impl-NKUI2BXG.cjs +0 -2
- package/dist/impl-NKUI2BXG.cjs.map +0 -1
- package/dist/impl-NXTGH73U.cjs +0 -2
- package/dist/impl-NXTGH73U.cjs.map +0 -1
- package/dist/impl-OAPUUSOI.cjs +0 -2
- package/dist/impl-OAPUUSOI.cjs.map +0 -1
- package/dist/impl-OCJDYVIR.cjs +0 -2
- package/dist/impl-OCJDYVIR.cjs.map +0 -1
- package/dist/impl-PDWZ4O5W.cjs +0 -2
- package/dist/impl-PDWZ4O5W.cjs.map +0 -1
- package/dist/impl-Q2MH6BDT.cjs +0 -2
- package/dist/impl-Q2MH6BDT.cjs.map +0 -1
- package/dist/impl-QV42ZSX6.cjs +0 -6
- package/dist/impl-QV42ZSX6.cjs.map +0 -1
- package/dist/impl-TEQOCEBB.cjs +0 -2
- package/dist/impl-TEQOCEBB.cjs.map +0 -1
- package/dist/impl-TXQ4XVDC.cjs +0 -12
- package/dist/impl-TXQ4XVDC.cjs.map +0 -1
- package/dist/impl-U744VBLW.cjs +0 -2
- package/dist/impl-U744VBLW.cjs.map +0 -1
- package/dist/impl-VEGPS7VZ.cjs +0 -2
- package/dist/impl-VEGPS7VZ.cjs.map +0 -1
- package/dist/impl-XBEBGY37.cjs +0 -2
- package/dist/impl-XBEBGY37.cjs.map +0 -1
- package/dist/impl-Y3YSZDVF.cjs +0 -2
- package/dist/impl-Y3YSZDVF.cjs.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as t from 'io-ts';
|
|
2
|
-
import { LogicOperator, RequestAction, RequestStatus, RequestActionObjectResolver, IdentifierType, ConsentTrackerStatus, CodePackageType, SubDataPointDataSubCategoryGuessStatus, ConfidenceLabel, IsoCountryCode, IsoCountrySubdivisionCode, PromptAVendorEmailSendType, PromptAVendorEmailCompletionLinkType, EnricherType, PreflightRequestStatus, DefaultConsentOption, PreferenceStoreAuthLevel, PreferenceTopicType, AttributeSupportedResourceType, RetentionScheduleType, RetentionScheduleOperation, AssessmentQuestionType, AssessmentQuestionSubType, AssessmentSyncModel, AssessmentSyncColumn, AssessmentFormStatus, DataCategoryType, ProcessingPurpose, AssessmentFormTemplateStatus, AssessmentFormTemplateSource, PrivacyCenterThemePartial, RequestOrigin, RequestEnricherStatus, RequestDataSiloStatus, AttributeKeyType, DataFlowScope, ConsentTrackerSource, TranscendProduct, ActionItemPriorityOverride, ActionItemCode, ConsentPrecedenceOption, UnknownRequestPolicy, TelemetryPartitionStrategy, SignedIabAgreementOption, RegionsOperator, BrowserTimeZone, RegionDetectionMethod, ScopeName, PromptStatus, PromptResponseFormat, ConsentBundleType, PromptRunProductArea, ChatCompletionRole, QueueStatus, LargeLanguageModelClient, PromptFilePurpose, UnstructuredSubDataPointRecommendationStatus } from '@transcend-io/privacy-types';
|
|
2
|
+
import { LogicOperator, RequestAction, RequestStatus, RequestActionObjectResolver, IdentifierType, ConsentTrackerStatus, CodePackageType, SubDataPointDataSubCategoryGuessStatus, ConfidenceLabel, IsoCountryCode, IsoCountrySubdivisionCode, PromptAVendorEmailSendType, PromptAVendorEmailCompletionLinkType, EnricherType, PreflightRequestStatus, DefaultConsentOption, PreferenceStoreAuthLevel, PreferenceTopicType, AttributeSupportedResourceType, RetentionScheduleType, RetentionScheduleOperation, AssessmentQuestionType, AssessmentQuestionSubType, AssessmentSyncModel, AssessmentSyncColumn, AssessmentFormStatus, DataCategoryType, ProcessingPurpose, AssessmentFormTemplateStatus, AssessmentFormTemplateSource, PrivacyCenterThemePartial, RequestOrigin, RequestEnricherStatus, RequestDataSiloStatus, AttributeKeyType, DataFlowScope, ConsentTrackerSource, TranscendProduct, ActionItemPriorityOverride, ActionItemCode, ConsentPrecedenceOption, UnknownRequestPolicy, TelemetryPartitionStrategy, SignedIabAgreementOption, RegionsOperator, BrowserTimeZone, RegionDetectionMethod, ScopeName, PromptStatus, PromptResponseFormat, ConsentBundleType, PromptRunProductArea, ChatCompletionRole, QueueStatus, LargeLanguageModelClient, PromptFilePurpose, ScopeDefinition, UnstructuredSubDataPointRecommendationStatus } from '@transcend-io/privacy-types';
|
|
3
3
|
import { ObjByString, Optionalize, Requirize } from '@transcend-io/type-utils';
|
|
4
4
|
import { GraphQLClient, Variables, RequestDocument } from 'graphql-request';
|
|
5
5
|
import inquirer from 'inquirer';
|
|
@@ -96845,6 +96845,7 @@ declare const REQUEST_IDENTIFIERS: string;
|
|
|
96845
96845
|
declare const USERS: string;
|
|
96846
96846
|
|
|
96847
96847
|
declare const REQUEST_FILES: string;
|
|
96848
|
+
declare const BULK_REQUEST_FILES: string;
|
|
96848
96849
|
|
|
96849
96850
|
declare const REPORT_PROMPT_RUN: string;
|
|
96850
96851
|
declare const ADD_MESSAGES_TO_PROMPT_RUN: string;
|
|
@@ -104304,24 +104305,47 @@ declare function updatePrompts(client: GraphQLClient, input: [PromptInput, strin
|
|
|
104304
104305
|
*/
|
|
104305
104306
|
declare function syncPrompts(client: GraphQLClient, prompts: PromptInput[], concurrency?: number): Promise<boolean>;
|
|
104306
104307
|
|
|
104308
|
+
interface RequestFileCursor {
|
|
104309
|
+
/** The ID of the request file */
|
|
104310
|
+
id: string;
|
|
104311
|
+
/** The created at timestamp */
|
|
104312
|
+
createdAt: string;
|
|
104313
|
+
}
|
|
104307
104314
|
interface RequestFile {
|
|
104308
104315
|
/** The remote ID */
|
|
104309
104316
|
remoteId: string;
|
|
104310
104317
|
/** The file name */
|
|
104311
104318
|
fileName: string;
|
|
104312
104319
|
}
|
|
104320
|
+
interface RequestFileResponse {
|
|
104321
|
+
/** RequestFiles */
|
|
104322
|
+
bulkRequestFiles: {
|
|
104323
|
+
/** List */
|
|
104324
|
+
nodes: RequestFile[];
|
|
104325
|
+
/** The page info */
|
|
104326
|
+
pageInfo: {
|
|
104327
|
+
/** Whether there is a next page */
|
|
104328
|
+
hasNextPage: boolean;
|
|
104329
|
+
/** The end cursor */
|
|
104330
|
+
endCursor: string;
|
|
104331
|
+
};
|
|
104332
|
+
};
|
|
104333
|
+
}
|
|
104313
104334
|
/**
|
|
104314
104335
|
* Fetch all RequestFiles for a single request
|
|
104315
104336
|
*
|
|
104316
104337
|
* @param client - GraphQL client
|
|
104338
|
+
* @param pageSize - How many request files to fetch per API call
|
|
104317
104339
|
* @param filterBy - Filter by
|
|
104318
104340
|
* @returns All RequestFiles in the organization
|
|
104319
104341
|
*/
|
|
104320
|
-
declare function fetchRequestFilesForRequest(client: GraphQLClient,
|
|
104321
|
-
|
|
104322
|
-
|
|
104342
|
+
declare function fetchRequestFilesForRequest(client: GraphQLClient,
|
|
104343
|
+
/** How many request files to fetch per API call */
|
|
104344
|
+
pageSize: number, filterBy: {
|
|
104345
|
+
/** Filter by request IDs */
|
|
104346
|
+
requestIds: string[];
|
|
104323
104347
|
/** Filter by data silo ID */
|
|
104324
|
-
|
|
104348
|
+
dataSiloIds: string[];
|
|
104325
104349
|
}): Promise<RequestFile[]>;
|
|
104326
104350
|
|
|
104327
104351
|
/**
|
|
@@ -116494,8 +116518,11 @@ declare function removeUnverifiedRequestIdentifiers({ requestActions, identifier
|
|
|
116494
116518
|
}): Promise<number>;
|
|
116495
116519
|
|
|
116496
116520
|
var description = "A command line interface for programmatic operations across Transcend.";
|
|
116497
|
-
var version = "7.0.
|
|
116521
|
+
var version = "7.0.4";
|
|
116498
116522
|
|
|
116523
|
+
/**
|
|
116524
|
+
* The name of the main binary for the CLI
|
|
116525
|
+
*/
|
|
116499
116526
|
declare const name = "transcend";
|
|
116500
116527
|
declare const ADMIN_DASH = "https://app.transcend.io";
|
|
116501
116528
|
declare const ADMIN_DASH_INTEGRATIONS = "https://app.transcend.io/infrastructure/integrations";
|
|
@@ -116523,6 +116550,11 @@ declare const TR_PULL_RESOURCE_SCOPE_MAP: {
|
|
|
116523
116550
|
[k in TranscendPullResource]: ScopeName[];
|
|
116524
116551
|
};
|
|
116525
116552
|
declare const TR_YML_RESOURCE_TO_FIELD_NAME: Record<TranscendPullResource, keyof TranscendInput>;
|
|
116553
|
+
declare const SCOPES_BY_TITLE: Record<string, ScopeDefinition & {
|
|
116554
|
+
/** The camelCased name which identifies the scope */
|
|
116555
|
+
name: ScopeName;
|
|
116556
|
+
}>;
|
|
116557
|
+
declare const SCOPE_TITLES: string[];
|
|
116526
116558
|
|
|
116527
116559
|
/**
|
|
116528
116560
|
* Update the consent manager to latest version
|
|
@@ -117643,4 +117675,4 @@ type EnrichPrivacyRequest = t.TypeOf<typeof EnrichPrivacyRequest>;
|
|
|
117643
117675
|
*/
|
|
117644
117676
|
declare function enrichPrivacyRequest(sombra: Got, { id: rawId, ...rest }: EnrichPrivacyRequest, enricherId: string, index?: number): Promise<boolean>;
|
|
117645
117677
|
|
|
117646
|
-
export { ACTIONS, ADD_MESSAGES_TO_PROMPT_RUN, ADD_SILO_DISCOVERY_RESULTS, ADMIN_DASH, ADMIN_DASH_DATAPOINTS, ADMIN_DASH_INTEGRATIONS, AGENTS, AGENT_FILES, AGENT_FUNCTIONS, type AIIntegrationC, API_KEYS, APPROVE_PRIVACY_REQUEST, ASSESSMENTS, ASSESSMENT_SECTION_FIELDS, ASSESSMENT_TEMPLATES, ASSUME_ROLE, ATTRIBUTES, ATTRIBUTE_KEYS_REQUESTS, ATTRIBUTE_VALUES, type Action, ActionInput, type ActionItem, ActionItemCollectionInput, ActionItemInput, type ActionItemRaw, type AddMessagesToPromptRunInput, type Agent, type AgentFile, type AgentFileFilterBy, AgentFileInput, type AgentFunction, AgentFunctionInput, AgentInput, type ApiKey, type ApiKeyGenerateError, ApiKeyInput, type Assessment, AssessmentAction, type AssessmentAnswer, type AssessmentAnswerOption, AssessmentAnswerOptionInput, type AssessmentComment, AssessmentDisplayLogicInput, type AssessmentGroup, AssessmentInput, AssessmentNestedRule, AssessmentNestedRuleInput, type AssessmentPreviousSubmission, type AssessmentQuestion, type AssessmentResource, AssessmentResourceInput, AssessmentRetentionScheduleInput, AssessmentRiskLogic, AssessmentRule, AssessmentRuleInput, type AssessmentSection, AssessmentSectionInput, AssessmentSectionQuestionInput, type AssessmentTemplate, AssessmentTemplateInput, AttestedExtraIdentifiers, type Attribute, AttributeInput, type AttributeKey, type AttributeNameMap, AttributePreview, type AttributeValue, AttributeValueInput, BLANK, BULK_APPLY, BUSINESS_ENTITIES, type BusinessEntity, BusinessEntityInput, CANCEL_PRIVACY_REQUEST, CAN_APPLY_IN_BULK, CATALOGS, CHANGE_REQUEST_DATA_SILO_STATUS, CODE_PACKAGES, CONSENT_MANAGER_ANALYTICS_DATA, CONSENT_PARTITIONS, COOKIES, CREATE_ACTION_ITEMS, CREATE_ACTION_ITEM_COLLECTION, CREATE_AGENT, CREATE_AGENT_FILE, CREATE_AGENT_FUNCTION, CREATE_API_KEY, CREATE_ATTRIBUTE, CREATE_ATTRIBUTE_VALUES, CREATE_BUSINESS_ENTITY, CREATE_CODE_PACKAGE, CREATE_CONSENT_EXPERIENCE, CREATE_CONSENT_MANAGER, CREATE_CONSENT_PARTITION, CREATE_DATA_FLOWS, CREATE_DATA_SILOS, CREATE_DATA_SUBJECT, CREATE_DATA_SUB_CATEGORY, CREATE_ENRICHER, CREATE_IDENTIFIER, CREATE_PROCESSING_PURPOSE_SUB_CATEGORY, CREATE_PROMPT, CREATE_PROMPT_GROUP, CREATE_PROMPT_PARTIAL, CREATE_REPOSITORY, CREATE_SOFTWARE_DEVELOPMENT_KIT, CREATE_TEAM, CREATE_TEMPLATE, CREATE_VENDOR, CachedFileState, CachedRequestState, type Catalog, CodePackageInput, CodePackageSdk, ColumnName, type ColumnNameMap, type ConsentExperience, ConsentManageExperienceInput, type ConsentManager, ConsentManagerInput, type ConsentManagerMetric, ConsentManagerMetricBin, ConsentManagerServiceMetadata, type ConsentManagerTheme, ConsentPreferenceResponse, ConsentPreferenceTopic, ConsentPreferenceTopicOptionValue, ConsentPurpose, type Cookie, CookieCsvInput, CookieInput, type CreatedApiKey, CronIdentifier, CronIdentifierPush, type CronIdentifierWithAction, type CsvFormattedIdentifier, DATAPOINT_EXPORT, DATA_FLOWS, DATA_POINTS, DATA_POINT_COUNT, DATA_SILOS, DATA_SILOS_ENRICHED, DATA_SILO_EXPORT, DATA_SUBJECTS, DATA_SUB_CATEGORIES, DEFAULT_TRANSCEND_API, DEFAULT_TRANSCEND_CONSENT_API, DEFAULT_TRANSCEND_PULL_RESOURCES, DELETE_API_KEY, DELETE_ATTRIBUTE_VALUE, DEPLOYED_PRIVACY_CENTER_URL, DEPLOY_CONSENT_MANAGER, DETERMINE_LOGIN_METHOD, DataCategoryGuessInput, DataCategoryInput, DataCategoryPreviewInput, DataCategoryRecommendationInput, type DataFlow, DataFlowCsvInput, DataFlowInput, type DataPointCsvPreview, type DataSilo, type DataSiloAttributeValue, type DataSiloCsvPreview, type DataSiloEnriched, DataSiloInput, type DataSubCategory, type DataSubject, DataSubjectInput, type DatapointFilterOptions, DatapointInput, ENABLED_PLUGINS, ENRICHERS, ENTRY_COUNT, EXPERIENCES, type EnabledRouteC, type EnabledRoutesC, EnrichPrivacyRequest, type Enricher, EnricherInput, type ExportedPrivacyRequest, type ExternalUser, FETCH_CONSENT_MANAGER, FETCH_CONSENT_MANAGER_ID, FETCH_CONSENT_MANAGER_THEME, FETCH_PRIVACY_CENTER_ID, FieldInput, GLOBAL_ACTION_ITEMS, GLOBAL_ACTION_ITEM_COLLECTIONS, type GetPromptParamType, type GetPromptResponseType, IDENTIFIERS, IDENTIFIER_BLOCK_LIST, IMPORT_ONE_TRUST_ASSESSMENT_FORMS, INITIALIZER, IP_ADDRESS_REGEX, IS_REQUIRED, type Identifier, IdentifierInput, type IdentifierNameMap, ImportOnetrustAssessmentsInput, type IndexedCatalogs, type Initializer, IntlMessage, IntlMessageInput, LARGE_LANGUAGE_MODELS, LOGIN, MESSAGES, type Message, NEW_IDENTIFIER_TYPES, NONE, NOTIFY_ADDITIONAL_TIME, ORGANIZATION, OneTrustFileFormat, OneTrustPullResource, OneTrustPullSource, OpenAIEnabledRoute, OpenAIEnabledRoutes, OpenAIIntegration, OpenAIRouteName, type OrganizationPreview, POLICIES, PREFERENCE_TOPICS, PRIVACY_CENTER, PROCESSING_PURPOSE_SUB_CATEGORIES, PROMPTS, PROMPTS_WITH_VARIABLES, PROMPT_GROUPS, PROMPT_PARTIALS, PROMPT_THREADS, PURPOSES, ParsedAttributeInput, PartitionInput, PathfinderPolicy, PathfinderPolicyName, PathfinderPolicyNameC, PathfinderPromptRunMetadata, type Plugin, type PluginResponse, type Policy, PolicyInput, type PreferenceTopic, type PrivacyCenter, PrivacyCenterInput, PrivacyRequest, PrivacyRequestInput, PrivacyRequestResponse, type PrivacyRequestWithIdentifiers, ProcessingPurposeInput, ProcessingPurposePreviewInput, type ProcessingPurposeSubCategory, type Prompt, PromptAVendorEmailSettings, type PromptCalculatedVariable, type PromptGroup, PromptGroupInput, PromptInput, type PromptPartial, PromptPartialInput, type PromptRunResult, type PromptRuntimeVariable, type PromptThread, type Purpose, PurposeMap, type PurposeWithPreferences, REDUCED_REQUESTS_FOR_DATA_SILO_COUNT, REMOVE_REQUEST_IDENTIFIERS, REPORT_PROMPT_RUN, REPOSITORIES, REQUESTS, REQUEST_DATA_SILOS, REQUEST_ENRICHERS, REQUEST_FILES, REQUEST_IDENTIFIERS, RETRY_REQUEST_DATA_SILO, RETRY_REQUEST_ENRICHER, type ReportPromptRunInput, type ReportPromptRunOptions, RepositoryInput, type RequestDataSilo, type RequestEnricher, type RequestFile, RequestFileMetadata, RequestFileMetadataResponse, RequestIdentifier, type RequestIdentifierMetadata, RequestIdentifiersResponse, type RetentionSchedule, RiskAssignmentInput, type RiskCategory, type RiskFramework, type RiskLevel, RiskLogicInput, type RiskMatrix, type RiskMatrixColumn, type RiskMatrixRow, SET_RESOURCE_ATTRIBUTES, SKIP_REQUEST_ENRICHER, SOFTWARE_DEVELOPMENT_KITS, SOMBRA_VERSION, SUB_DATA_POINTS, SUB_DATA_POINTS_COUNT, SUB_DATA_POINTS_WITH_GUESSES, SYNC_ATTRIBUTE_TYPES, SoftwareDevelopmentKitInput, StoredApiKey, type SubDataPoint, type SubDataPointCsvPreview, SuccessfulRequest, TEAMS, TEMPLATES, TOGGLE_CONSENT_PRECEDENCE, TOGGLE_DATA_SUBJECT, TOGGLE_TELEMETRY_PARTITION_STRATEGY, TOGGLE_UNKNOWN_COOKIE_POLICY, TOGGLE_UNKNOWN_REQUEST_POLICY, TR_PULL_RESOURCE_SCOPE_MAP, TR_PUSH_RESOURCE_SCOPE_MAP, TR_YML_RESOURCE_TO_FIELD_NAME, type Team, TeamInput, type Template, TemplateInput, TranscendInput, type TranscendPartition, type TranscendPrompt, TranscendPromptManager, type TranscendPromptPartialTemplated, type TranscendPromptTemplated, type TranscendPromptsAndVariables, type TranscendPullConfigurationInput, TranscendPullResource, UPDATE_ACTION, UPDATE_ACTION_ITEMS, UPDATE_ACTION_ITEM_COLLECTION, UPDATE_AGENTS, UPDATE_AGENT_FILES, UPDATE_AGENT_FUNCTIONS, UPDATE_ATTRIBUTE, UPDATE_ATTRIBUTE_VALUES, UPDATE_BUSINESS_ENTITIES, UPDATE_CODE_PACKAGES, UPDATE_CONSENT_EXPERIENCE, UPDATE_CONSENT_MANAGER_DOMAINS, UPDATE_CONSENT_MANAGER_PARTITION, UPDATE_CONSENT_MANAGER_THEME, UPDATE_CONSENT_MANAGER_TO_LATEST, UPDATE_CONSENT_MANAGER_VERSION, UPDATE_DATA_FLOWS, UPDATE_DATA_SILOS, UPDATE_DATA_SUBJECT, UPDATE_DATA_SUB_CATEGORIES, UPDATE_ENRICHER, UPDATE_IDENTIFIER, UPDATE_INTL_MESSAGES, UPDATE_LOAD_OPTIONS, UPDATE_OR_CREATE_COOKIES, UPDATE_OR_CREATE_DATA_POINT, UPDATE_POLICIES, UPDATE_PRIVACY_CENTER, UPDATE_PRIVACY_REQUEST, UPDATE_PROCESSING_PURPOSE_SUB_CATEGORIES, UPDATE_PROMPTS, UPDATE_PROMPT_GROUPS, UPDATE_PROMPT_PARTIALS, UPDATE_REPOSITORIES, UPDATE_SOFTWARE_DEVELOPMENT_KITS, UPDATE_TEAM, UPDATE_VENDORS, USERS, USP_STRING_REGEX, type User, type UserPreview, type UserRole, VARIABLE_PARAMETERS_NAME, VARIABLE_PARAMETERS_REGEXP, VENDORS, type Vendor, VendorInput, WebhookHeader, type XdiSyncGroups, addMessagesToPromptRun, appendCsvSync, approvePrivacyRequests, assumeRole, buildAIIntegrationType, buildEnabledRouteType, buildTranscendGraphQLClient, buildTranscendGraphQLClientGeneric, buildXdiSyncEndpoint, bulkRestartRequests, bulkRetryEnrichers, cancelPrivacyRequests, consentManagersToBusinessEntities, convertToDataSubjectAllowlist, convertToDataSubjectBlockList, createActionItemCollection, createActionItems, createAgent, createAgentFile, createAgentFunction, createApiKey, createBusinessEntity, createCodePackage, createConsentToken, createDataCategory, createDataFlows, createProcessingPurpose, createPrompt, createRegexForTag, createRepository, createSoftwareDevelopmentKit, createSombraGotInstance, createTranscendConsentGotInstance, createVendor, defineTranscendPrompts, deleteApiKey, deployConsentManager, description, domainToHost, downloadPrivacyRequestFiles, enrichPrivacyRequest, ensureAllDataSubjectsExist, extractClientError, fetchActiveSiloDiscoPlugin, fetchAllActionItems, fetchAllActions, fetchAllAgentFiles, fetchAllAgentFunctions, fetchAllAgents, fetchAllApiKeys, fetchAllAssessmentTemplates, fetchAllAssessments, fetchAllAttributeValues, fetchAllAttributes, fetchAllBusinessEntities, fetchAllCatalogs, fetchAllCookies, fetchAllDataCategories, fetchAllDataFlows, fetchAllDataPoints, fetchAllDataSilos, fetchAllDataSubjects, fetchAllEnrichers, fetchAllIdentifiers, fetchAllMessages, fetchAllPolicies, fetchAllPreferenceTopics, fetchAllPrivacyCenters, fetchAllProcessingPurposes, fetchAllPromptGroups, fetchAllPromptPartials, fetchAllPromptThreads, fetchAllPrompts, fetchAllPurposes, fetchAllPurposesAndPreferences, fetchAllRequestAttributeKeys, fetchAllRequestEnrichers, fetchAllRequestIdentifierMetadata, fetchAllRequestIdentifiers, fetchAllRequests, fetchAllSubDataPoints, fetchAllTeams, fetchAllTemplates, fetchAllUsers, fetchAllVendors, fetchAndIndexCatalogs, fetchApiKeys, fetchConsentManager, fetchConsentManagerAnalyticsData, fetchConsentManagerExperiences, fetchConsentManagerId, fetchConsentManagerTheme, fetchConsentPreferences, fetchEnrichedDataSilos, fetchIdentifiersAndCreateMissing, fetchPartitions, fetchPrivacyCenterId, fetchPrivacyCenterUrl, fetchPromptsWithVariables, fetchRequestDataSilo, fetchRequestDataSiloActiveCount, fetchRequestDataSilos, fetchRequestFilesForRequest, filterNullishValuesFromObject, filterRows, fuzzyMatchColumns, fuzzySearch, generateCrossAccountApiKeys, getFileMetadataForPrivacyRequests, getGitFilesThatChanged, getUniqueValuesForColumn, inquirerAutoComplete, inquirerConfirmBoolean, inquirerConfirmText, listDirectories, listFiles, loginUser, makeGraphQLRequest, mapColumnsToAttributes, mapColumnsToIdentifiers, mapCsvColumnsToApi, mapCsvRowsToRequestInputs, mapEnumValues, mapRequestEnumValues, markCronIdentifierCompleted, markRequestDataSiloIdsCompleted, markSilentPrivacyRequests, mergeTranscendInputs, name, normalizeIdentifierValue, notifyPrivacyRequestsAdditionalTime, parseAssessmentDisplayLogic, parseAssessmentRiskLogic, parseAttributesFromString, parseFilePath, parseVariablesFromString, pullAllDatapoints, pullChunkedCustomSiloOutstandingIdentifiers, pullConsentManagerMetrics, pullCronPageOfIdentifiers, pullManualEnrichmentIdentifiersToCsv, pullPrivacyRequests, pullTranscendConfiguration, pullUnstructuredSubDataPointRecommendations, pushCronIdentifiersFromCsv, pushManualEnrichmentIdentifiersFromCsv, readCsv, readTranscendYaml, removeLinks, removeUnverifiedRequestIdentifiers, replaceVariablesInYaml, reportPromptRun, restartPrivacyRequest, retryRequestDataSilos, retryRequestEnricher, setResourceAttributes, skipPreflightJobs, skipRequestDataSilos, splitCsvToList, streamPrivacyRequestFiles, submitPrivacyRequest, syncAction, syncActionItemCollections, syncActionItems, syncAgentFiles, syncAgentFunctions, syncAgents, syncAttribute, syncBusinessEntities, syncCodePackages, syncConfigurationToTranscend, syncConsentManager, syncConsentManagerExperiences, syncCookies, syncDataCategories, syncDataFlows, syncDataSiloDependencies, syncDataSilos, syncDataSubject, syncEnricher, syncIdentifier, syncIntlMessages, syncPartitions, syncPolicies, syncPrivacyCenter, syncProcessingPurposes, syncPrompts, syncRepositories, syncSoftwareDevelopmentKits, syncTemplate, syncVendors, updateActionItem, updateActionItemCollection, updateAgentFiles, updateAgentFunctions, updateAgents, updateBusinessEntities, updateCodePackages, updateConsentManagerToLatest, updateConsentManagerVersionToLatest, updateDataCategories, updateDataFlows, updateIntlMessages, updateOrCreateCookies, updatePolicies, updateProcessingPurposes, updatePrompts, updateRepositories, updateSoftwareDevelopmentKits, updateVendors, uploadConsents, uploadCookiesFromCsv, uploadDataFlowsFromCsv, uploadPrivacyRequestsFromCsv, uploadSiloDiscoveryResults, validateTranscendAuth, version, writeCsv, writeCsvSync, writeLargeCsv, writeTranscendYaml };
|
|
117678
|
+
export { ACTIONS, ADD_MESSAGES_TO_PROMPT_RUN, ADD_SILO_DISCOVERY_RESULTS, ADMIN_DASH, ADMIN_DASH_DATAPOINTS, ADMIN_DASH_INTEGRATIONS, AGENTS, AGENT_FILES, AGENT_FUNCTIONS, type AIIntegrationC, API_KEYS, APPROVE_PRIVACY_REQUEST, ASSESSMENTS, ASSESSMENT_SECTION_FIELDS, ASSESSMENT_TEMPLATES, ASSUME_ROLE, ATTRIBUTES, ATTRIBUTE_KEYS_REQUESTS, ATTRIBUTE_VALUES, type Action, ActionInput, type ActionItem, ActionItemCollectionInput, ActionItemInput, type ActionItemRaw, type AddMessagesToPromptRunInput, type Agent, type AgentFile, type AgentFileFilterBy, AgentFileInput, type AgentFunction, AgentFunctionInput, AgentInput, type ApiKey, type ApiKeyGenerateError, ApiKeyInput, type Assessment, AssessmentAction, type AssessmentAnswer, type AssessmentAnswerOption, AssessmentAnswerOptionInput, type AssessmentComment, AssessmentDisplayLogicInput, type AssessmentGroup, AssessmentInput, AssessmentNestedRule, AssessmentNestedRuleInput, type AssessmentPreviousSubmission, type AssessmentQuestion, type AssessmentResource, AssessmentResourceInput, AssessmentRetentionScheduleInput, AssessmentRiskLogic, AssessmentRule, AssessmentRuleInput, type AssessmentSection, AssessmentSectionInput, AssessmentSectionQuestionInput, type AssessmentTemplate, AssessmentTemplateInput, AttestedExtraIdentifiers, type Attribute, AttributeInput, type AttributeKey, type AttributeNameMap, AttributePreview, type AttributeValue, AttributeValueInput, BLANK, BULK_APPLY, BULK_REQUEST_FILES, BUSINESS_ENTITIES, type BusinessEntity, BusinessEntityInput, CANCEL_PRIVACY_REQUEST, CAN_APPLY_IN_BULK, CATALOGS, CHANGE_REQUEST_DATA_SILO_STATUS, CODE_PACKAGES, CONSENT_MANAGER_ANALYTICS_DATA, CONSENT_PARTITIONS, COOKIES, CREATE_ACTION_ITEMS, CREATE_ACTION_ITEM_COLLECTION, CREATE_AGENT, CREATE_AGENT_FILE, CREATE_AGENT_FUNCTION, CREATE_API_KEY, CREATE_ATTRIBUTE, CREATE_ATTRIBUTE_VALUES, CREATE_BUSINESS_ENTITY, CREATE_CODE_PACKAGE, CREATE_CONSENT_EXPERIENCE, CREATE_CONSENT_MANAGER, CREATE_CONSENT_PARTITION, CREATE_DATA_FLOWS, CREATE_DATA_SILOS, CREATE_DATA_SUBJECT, CREATE_DATA_SUB_CATEGORY, CREATE_ENRICHER, CREATE_IDENTIFIER, CREATE_PROCESSING_PURPOSE_SUB_CATEGORY, CREATE_PROMPT, CREATE_PROMPT_GROUP, CREATE_PROMPT_PARTIAL, CREATE_REPOSITORY, CREATE_SOFTWARE_DEVELOPMENT_KIT, CREATE_TEAM, CREATE_TEMPLATE, CREATE_VENDOR, CachedFileState, CachedRequestState, type Catalog, CodePackageInput, CodePackageSdk, ColumnName, type ColumnNameMap, type ConsentExperience, ConsentManageExperienceInput, type ConsentManager, ConsentManagerInput, type ConsentManagerMetric, ConsentManagerMetricBin, ConsentManagerServiceMetadata, type ConsentManagerTheme, ConsentPreferenceResponse, ConsentPreferenceTopic, ConsentPreferenceTopicOptionValue, ConsentPurpose, type Cookie, CookieCsvInput, CookieInput, type CreatedApiKey, CronIdentifier, CronIdentifierPush, type CronIdentifierWithAction, type CsvFormattedIdentifier, DATAPOINT_EXPORT, DATA_FLOWS, DATA_POINTS, DATA_POINT_COUNT, DATA_SILOS, DATA_SILOS_ENRICHED, DATA_SILO_EXPORT, DATA_SUBJECTS, DATA_SUB_CATEGORIES, DEFAULT_TRANSCEND_API, DEFAULT_TRANSCEND_CONSENT_API, DEFAULT_TRANSCEND_PULL_RESOURCES, DELETE_API_KEY, DELETE_ATTRIBUTE_VALUE, DEPLOYED_PRIVACY_CENTER_URL, DEPLOY_CONSENT_MANAGER, DETERMINE_LOGIN_METHOD, DataCategoryGuessInput, DataCategoryInput, DataCategoryPreviewInput, DataCategoryRecommendationInput, type DataFlow, DataFlowCsvInput, DataFlowInput, type DataPointCsvPreview, type DataSilo, type DataSiloAttributeValue, type DataSiloCsvPreview, type DataSiloEnriched, DataSiloInput, type DataSubCategory, type DataSubject, DataSubjectInput, type DatapointFilterOptions, DatapointInput, ENABLED_PLUGINS, ENRICHERS, ENTRY_COUNT, EXPERIENCES, type EnabledRouteC, type EnabledRoutesC, EnrichPrivacyRequest, type Enricher, EnricherInput, type ExportedPrivacyRequest, type ExternalUser, FETCH_CONSENT_MANAGER, FETCH_CONSENT_MANAGER_ID, FETCH_CONSENT_MANAGER_THEME, FETCH_PRIVACY_CENTER_ID, FieldInput, GLOBAL_ACTION_ITEMS, GLOBAL_ACTION_ITEM_COLLECTIONS, type GetPromptParamType, type GetPromptResponseType, IDENTIFIERS, IDENTIFIER_BLOCK_LIST, IMPORT_ONE_TRUST_ASSESSMENT_FORMS, INITIALIZER, IP_ADDRESS_REGEX, IS_REQUIRED, type Identifier, IdentifierInput, type IdentifierNameMap, ImportOnetrustAssessmentsInput, type IndexedCatalogs, type Initializer, IntlMessage, IntlMessageInput, LARGE_LANGUAGE_MODELS, LOGIN, MESSAGES, type Message, NEW_IDENTIFIER_TYPES, NONE, NOTIFY_ADDITIONAL_TIME, ORGANIZATION, OneTrustFileFormat, OneTrustPullResource, OneTrustPullSource, OpenAIEnabledRoute, OpenAIEnabledRoutes, OpenAIIntegration, OpenAIRouteName, type OrganizationPreview, POLICIES, PREFERENCE_TOPICS, PRIVACY_CENTER, PROCESSING_PURPOSE_SUB_CATEGORIES, PROMPTS, PROMPTS_WITH_VARIABLES, PROMPT_GROUPS, PROMPT_PARTIALS, PROMPT_THREADS, PURPOSES, ParsedAttributeInput, PartitionInput, PathfinderPolicy, PathfinderPolicyName, PathfinderPolicyNameC, PathfinderPromptRunMetadata, type Plugin, type PluginResponse, type Policy, PolicyInput, type PreferenceTopic, type PrivacyCenter, PrivacyCenterInput, PrivacyRequest, PrivacyRequestInput, PrivacyRequestResponse, type PrivacyRequestWithIdentifiers, ProcessingPurposeInput, ProcessingPurposePreviewInput, type ProcessingPurposeSubCategory, type Prompt, PromptAVendorEmailSettings, type PromptCalculatedVariable, type PromptGroup, PromptGroupInput, PromptInput, type PromptPartial, PromptPartialInput, type PromptRunResult, type PromptRuntimeVariable, type PromptThread, type Purpose, PurposeMap, type PurposeWithPreferences, REDUCED_REQUESTS_FOR_DATA_SILO_COUNT, REMOVE_REQUEST_IDENTIFIERS, REPORT_PROMPT_RUN, REPOSITORIES, REQUESTS, REQUEST_DATA_SILOS, REQUEST_ENRICHERS, REQUEST_FILES, REQUEST_IDENTIFIERS, RETRY_REQUEST_DATA_SILO, RETRY_REQUEST_ENRICHER, type ReportPromptRunInput, type ReportPromptRunOptions, RepositoryInput, type RequestDataSilo, type RequestEnricher, type RequestFile, type RequestFileCursor, RequestFileMetadata, RequestFileMetadataResponse, type RequestFileResponse, RequestIdentifier, type RequestIdentifierMetadata, RequestIdentifiersResponse, type RetentionSchedule, RiskAssignmentInput, type RiskCategory, type RiskFramework, type RiskLevel, RiskLogicInput, type RiskMatrix, type RiskMatrixColumn, type RiskMatrixRow, SCOPES_BY_TITLE, SCOPE_TITLES, SET_RESOURCE_ATTRIBUTES, SKIP_REQUEST_ENRICHER, SOFTWARE_DEVELOPMENT_KITS, SOMBRA_VERSION, SUB_DATA_POINTS, SUB_DATA_POINTS_COUNT, SUB_DATA_POINTS_WITH_GUESSES, SYNC_ATTRIBUTE_TYPES, SoftwareDevelopmentKitInput, StoredApiKey, type SubDataPoint, type SubDataPointCsvPreview, SuccessfulRequest, TEAMS, TEMPLATES, TOGGLE_CONSENT_PRECEDENCE, TOGGLE_DATA_SUBJECT, TOGGLE_TELEMETRY_PARTITION_STRATEGY, TOGGLE_UNKNOWN_COOKIE_POLICY, TOGGLE_UNKNOWN_REQUEST_POLICY, TR_PULL_RESOURCE_SCOPE_MAP, TR_PUSH_RESOURCE_SCOPE_MAP, TR_YML_RESOURCE_TO_FIELD_NAME, type Team, TeamInput, type Template, TemplateInput, TranscendInput, type TranscendPartition, type TranscendPrompt, TranscendPromptManager, type TranscendPromptPartialTemplated, type TranscendPromptTemplated, type TranscendPromptsAndVariables, type TranscendPullConfigurationInput, TranscendPullResource, UPDATE_ACTION, UPDATE_ACTION_ITEMS, UPDATE_ACTION_ITEM_COLLECTION, UPDATE_AGENTS, UPDATE_AGENT_FILES, UPDATE_AGENT_FUNCTIONS, UPDATE_ATTRIBUTE, UPDATE_ATTRIBUTE_VALUES, UPDATE_BUSINESS_ENTITIES, UPDATE_CODE_PACKAGES, UPDATE_CONSENT_EXPERIENCE, UPDATE_CONSENT_MANAGER_DOMAINS, UPDATE_CONSENT_MANAGER_PARTITION, UPDATE_CONSENT_MANAGER_THEME, UPDATE_CONSENT_MANAGER_TO_LATEST, UPDATE_CONSENT_MANAGER_VERSION, UPDATE_DATA_FLOWS, UPDATE_DATA_SILOS, UPDATE_DATA_SUBJECT, UPDATE_DATA_SUB_CATEGORIES, UPDATE_ENRICHER, UPDATE_IDENTIFIER, UPDATE_INTL_MESSAGES, UPDATE_LOAD_OPTIONS, UPDATE_OR_CREATE_COOKIES, UPDATE_OR_CREATE_DATA_POINT, UPDATE_POLICIES, UPDATE_PRIVACY_CENTER, UPDATE_PRIVACY_REQUEST, UPDATE_PROCESSING_PURPOSE_SUB_CATEGORIES, UPDATE_PROMPTS, UPDATE_PROMPT_GROUPS, UPDATE_PROMPT_PARTIALS, UPDATE_REPOSITORIES, UPDATE_SOFTWARE_DEVELOPMENT_KITS, UPDATE_TEAM, UPDATE_VENDORS, USERS, USP_STRING_REGEX, type User, type UserPreview, type UserRole, VARIABLE_PARAMETERS_NAME, VARIABLE_PARAMETERS_REGEXP, VENDORS, type Vendor, VendorInput, WebhookHeader, type XdiSyncGroups, addMessagesToPromptRun, appendCsvSync, approvePrivacyRequests, assumeRole, buildAIIntegrationType, buildEnabledRouteType, buildTranscendGraphQLClient, buildTranscendGraphQLClientGeneric, buildXdiSyncEndpoint, bulkRestartRequests, bulkRetryEnrichers, cancelPrivacyRequests, consentManagersToBusinessEntities, convertToDataSubjectAllowlist, convertToDataSubjectBlockList, createActionItemCollection, createActionItems, createAgent, createAgentFile, createAgentFunction, createApiKey, createBusinessEntity, createCodePackage, createConsentToken, createDataCategory, createDataFlows, createProcessingPurpose, createPrompt, createRegexForTag, createRepository, createSoftwareDevelopmentKit, createSombraGotInstance, createTranscendConsentGotInstance, createVendor, defineTranscendPrompts, deleteApiKey, deployConsentManager, description, domainToHost, downloadPrivacyRequestFiles, enrichPrivacyRequest, ensureAllDataSubjectsExist, extractClientError, fetchActiveSiloDiscoPlugin, fetchAllActionItems, fetchAllActions, fetchAllAgentFiles, fetchAllAgentFunctions, fetchAllAgents, fetchAllApiKeys, fetchAllAssessmentTemplates, fetchAllAssessments, fetchAllAttributeValues, fetchAllAttributes, fetchAllBusinessEntities, fetchAllCatalogs, fetchAllCookies, fetchAllDataCategories, fetchAllDataFlows, fetchAllDataPoints, fetchAllDataSilos, fetchAllDataSubjects, fetchAllEnrichers, fetchAllIdentifiers, fetchAllMessages, fetchAllPolicies, fetchAllPreferenceTopics, fetchAllPrivacyCenters, fetchAllProcessingPurposes, fetchAllPromptGroups, fetchAllPromptPartials, fetchAllPromptThreads, fetchAllPrompts, fetchAllPurposes, fetchAllPurposesAndPreferences, fetchAllRequestAttributeKeys, fetchAllRequestEnrichers, fetchAllRequestIdentifierMetadata, fetchAllRequestIdentifiers, fetchAllRequests, fetchAllSubDataPoints, fetchAllTeams, fetchAllTemplates, fetchAllUsers, fetchAllVendors, fetchAndIndexCatalogs, fetchApiKeys, fetchConsentManager, fetchConsentManagerAnalyticsData, fetchConsentManagerExperiences, fetchConsentManagerId, fetchConsentManagerTheme, fetchConsentPreferences, fetchEnrichedDataSilos, fetchIdentifiersAndCreateMissing, fetchPartitions, fetchPrivacyCenterId, fetchPrivacyCenterUrl, fetchPromptsWithVariables, fetchRequestDataSilo, fetchRequestDataSiloActiveCount, fetchRequestDataSilos, fetchRequestFilesForRequest, filterNullishValuesFromObject, filterRows, fuzzyMatchColumns, fuzzySearch, generateCrossAccountApiKeys, getFileMetadataForPrivacyRequests, getGitFilesThatChanged, getUniqueValuesForColumn, inquirerAutoComplete, inquirerConfirmBoolean, inquirerConfirmText, listDirectories, listFiles, loginUser, makeGraphQLRequest, mapColumnsToAttributes, mapColumnsToIdentifiers, mapCsvColumnsToApi, mapCsvRowsToRequestInputs, mapEnumValues, mapRequestEnumValues, markCronIdentifierCompleted, markRequestDataSiloIdsCompleted, markSilentPrivacyRequests, mergeTranscendInputs, name, normalizeIdentifierValue, notifyPrivacyRequestsAdditionalTime, parseAssessmentDisplayLogic, parseAssessmentRiskLogic, parseAttributesFromString, parseFilePath, parseVariablesFromString, pullAllDatapoints, pullChunkedCustomSiloOutstandingIdentifiers, pullConsentManagerMetrics, pullCronPageOfIdentifiers, pullManualEnrichmentIdentifiersToCsv, pullPrivacyRequests, pullTranscendConfiguration, pullUnstructuredSubDataPointRecommendations, pushCronIdentifiersFromCsv, pushManualEnrichmentIdentifiersFromCsv, readCsv, readTranscendYaml, removeLinks, removeUnverifiedRequestIdentifiers, replaceVariablesInYaml, reportPromptRun, restartPrivacyRequest, retryRequestDataSilos, retryRequestEnricher, setResourceAttributes, skipPreflightJobs, skipRequestDataSilos, splitCsvToList, streamPrivacyRequestFiles, submitPrivacyRequest, syncAction, syncActionItemCollections, syncActionItems, syncAgentFiles, syncAgentFunctions, syncAgents, syncAttribute, syncBusinessEntities, syncCodePackages, syncConfigurationToTranscend, syncConsentManager, syncConsentManagerExperiences, syncCookies, syncDataCategories, syncDataFlows, syncDataSiloDependencies, syncDataSilos, syncDataSubject, syncEnricher, syncIdentifier, syncIntlMessages, syncPartitions, syncPolicies, syncPrivacyCenter, syncProcessingPurposes, syncPrompts, syncRepositories, syncSoftwareDevelopmentKits, syncTemplate, syncVendors, updateActionItem, updateActionItemCollection, updateAgentFiles, updateAgentFunctions, updateAgents, updateBusinessEntities, updateCodePackages, updateConsentManagerToLatest, updateConsentManagerVersionToLatest, updateDataCategories, updateDataFlows, updateIntlMessages, updateOrCreateCookies, updatePolicies, updateProcessingPurposes, updatePrompts, updateRepositories, updateSoftwareDevelopmentKits, updateVendors, uploadConsents, uploadCookiesFromCsv, uploadDataFlowsFromCsv, uploadPrivacyRequestsFromCsv, uploadSiloDiscoveryResults, validateTranscendAuth, version, writeCsv, writeCsvSync, writeLargeCsv, writeTranscendYaml };
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"author": "Transcend Inc.",
|
|
3
3
|
"name": "@transcend-io/cli",
|
|
4
4
|
"description": "A command line interface for programmatic operations across Transcend.",
|
|
5
|
-
"version": "7.0.
|
|
5
|
+
"version": "7.0.4",
|
|
6
6
|
"homepage": "https://github.com/transcend-io/cli",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -143,6 +143,7 @@
|
|
|
143
143
|
"fdir": "^6.4.6",
|
|
144
144
|
"prettier": "^2.8.7",
|
|
145
145
|
"publint": "^0.3.12",
|
|
146
|
+
"shellcheck": "^3.1.0",
|
|
146
147
|
"tsup": "^8.5.0",
|
|
147
148
|
"tsx": "^4.20.3",
|
|
148
149
|
"typescript": "^5.0.4",
|
package/dist/chunk-25UGE4YY.cjs
DELETED
|
@@ -1,12 +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 _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 _chunkQXKWSBYRcjs = require('./chunk-QXKWSBYR.cjs');var _chunkSHV6R64Jcjs = require('./chunk-SHV6R64J.cjs');var _chunkZD2HOHJIcjs = require('./chunk-ZD2HOHJI.cjs');var _chunkNOF6QHE4cjs = require('./chunk-NOF6QHE4.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkEG4L6YAJcjs = require('./chunk-EG4L6YAJ.cjs');var _privacytypes = require('@transcend-io/privacy-types');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function at({auth:e,deploy:i=!1,transcendUrl:o=_chunkEG4L6YAJcjs.e,bundleTypes:t=Object.values(_privacytypes.ConsentBundleType)}){let r=_chunkNOF6QHE4cjs.xe.call(void 0, o,e),n=await _chunkNOF6QHE4cjs.yc.call(void 0, r);await _chunkNOF6QHE4cjs.a.call(void 0, t,async a=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Update Consent Manager bundle with ID "${n}" and type "${a}" to latest version...`)),await _chunkNOF6QHE4cjs.Ue.call(void 0, r,{id:n,bundleType:a}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Updated Consent Manager bundle with ID "${n}" and type "${a}" to latest version!`))}),i&&await _chunkNOF6QHE4cjs.a.call(void 0, t,async a=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Deploying Consent Manager bundle with ID "${n}" and type "${a}"...`)),await _chunkNOF6QHE4cjs.Te.call(void 0, r,{id:n,bundleType:a}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Deployed Consent Manager bundle with ID "${n}" and type "${a}"!`))})}var j=["ID","Activity","Encounters","Last Seen At","Has Native Do Not Sell/Share Support","IAB USP API Support","Service Description","Website URL","Categories of Recipients"];async function Ct({auth:e,trackerStatus:i,file:o,classifyService:t=!1,transcendUrl:r=_chunkEG4L6YAJcjs.e}){let n=_chunkNOF6QHE4cjs.xe.call(void 0, r,e);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Reading "${o}" from disk`));let l=_chunkSHV6R64Jcjs.q.call(void 0, o,_chunkZD2HOHJIcjs.ga).map(({Type:d,Notes:m,Service:f,Purpose:E,Status:g,Owners:I,Teams:T,"Connections Made To":v,...y})=>({value:v,type:d,description:m,trackingPurposes:_chunkSHV6R64Jcjs.n.call(void 0, E),status:g||i,owners:I?_chunkSHV6R64Jcjs.n.call(void 0, I):void 0,teams:T?_chunkSHV6R64Jcjs.n.call(void 0, T):void 0,attributes:Object.entries(y).filter(([h])=>!j.includes(h)).map(([h,H])=>({key:h,values:_chunkSHV6R64Jcjs.n.call(void 0, H)}))}));await _chunkNOF6QHE4cjs.jd.call(void 0, n,l,t)||(_chunkZUNVPK23cjs.a.error(_colors2.default.red("Encountered error(s) syncing data flows from CSV, see logs above for more info. ")),process.exit(1))}var Y=["ID","Activity","Encounters","Last Seen At","Has Native Do Not Sell/Share Support","IAB USP API Support","Service Description","Website URL","Categories of Recipients"];async function vt({auth:e,trackerStatus:i,file:o,transcendUrl:t=_chunkEG4L6YAJcjs.e}){let r=_chunkNOF6QHE4cjs.xe.call(void 0, t,e);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Reading "${o}" from disk`));let a=_chunkSHV6R64Jcjs.q.call(void 0, o,_chunkZD2HOHJIcjs.ha).map(({"Is Regex?":s,Notes:d,Service:m,Purpose:f,Status:E,Owners:g,Teams:I,Name:T,...v})=>({...typeof s=="string"?{isRegex:s.toLowerCase()==="true"}:{},name:T,description:d,trackingPurposes:_chunkSHV6R64Jcjs.n.call(void 0, f),status:E||i,owners:g?_chunkSHV6R64Jcjs.n.call(void 0, g):void 0,teams:I?_chunkSHV6R64Jcjs.n.call(void 0, I):void 0,attributes:Object.entries(v).filter(([y])=>!Y.includes(y)).map(([y,h])=>({key:y,values:_chunkSHV6R64Jcjs.n.call(void 0, h)}))}));await _chunkNOF6QHE4cjs.Ec.call(void 0, r,a)||(_chunkZUNVPK23cjs.a.error(_colors2.default.red("Encountered error(s) syncing cookies from CSV, see logs above for more info. ")),process.exit(1))}var Q=1e3,V=60*Q,X=60*V,z=24*X,W=7*z;async function Lt(e,{bin:i,start:o,end:t=new Date}){let r=await _chunkNOF6QHE4cjs.yc.call(void 0, e),n=Math.floor(o.getTime()/1e3),a=Math.floor(t.getTime()/1e3);if(n>a)throw new Error('Received "end" date that happened before "start" date');if(i==="1h"&&t.getTime()-o.getTime()>W*2)throw new Error("When using bin=1h, start and end time can be no more than 2 weeks apart");let l=o.toISOString(),s=t.toISOString(),[d,m,f]=await Promise.all([_chunkNOF6QHE4cjs.Bc.call(void 0, e,{dataSource:"PRIVACY_SIGNAL_TIMESERIES",startDate:l,endDate:s,forceRefetch:!0,airgapBundleId:r,binInterval:i,smoothTimeseries:!1}),_chunkNOF6QHE4cjs.Bc.call(void 0, e,{dataSource:"CONSENT_CHANGES_TIMESERIES",startDate:l,endDate:s,forceRefetch:!0,airgapBundleId:r,binInterval:i,smoothTimeseries:!1}),_chunkNOF6QHE4cjs.Bc.call(void 0, e,{dataSource:"CONSENT_SESSIONS_BY_REGIME",startDate:l,endDate:s,forceRefetch:!0,airgapBundleId:r,binInterval:i,smoothTimeseries:!1})]);return{PRIVACY_SIGNAL_TIMESERIES:d,CONSENT_CHANGES_TIMESERIES:m,CONSENT_SESSIONS_BY_REGIME:f}}var B=e=>new URL(`https://${e}`).hostname.split(".").slice(-2).join(".");var J=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;async function Ht(e,{xdiLocation:i,transcendUrl:o=_chunkEG4L6YAJcjs.e,removeIpAddresses:t=!0,domainBlockList:r=["localhost"],xdiAllowedCommands:n="ConsentManager:Sync"}){let a=Array.isArray(e)?e:[{apiKey:e,organizationId:"",organizationName:""}],l=await _chunkNOF6QHE4cjs.b.call(void 0, a,async m=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Pulling consent metadata for organization - ${m.organizationName}`));let f=_chunkNOF6QHE4cjs.xe.call(void 0, o,m.apiKey);return await _chunkNOF6QHE4cjs.xc.call(void 0, f)},{concurrency:5}),s={};return l.forEach(m=>{let f=_optionalChain([m, 'access', _2 => _2.partition, 'optionalAccess', _3 => _3.partition])||m.bundleURL.split("/").reverse()[1];s[f]||(s[f]=[]);let E=_chunkNOF6QHE4cjs.$b.call(void 0, m.configuration.domains.filter(g=>!t||!J.test(g)).map(g=>B(g)),r);s[f]=[...new Set([...s[f]||[],...E])]}),{html:`
|
|
2
|
-
<!DOCTYPE html>
|
|
3
|
-
<script
|
|
4
|
-
src="${i}"
|
|
5
|
-
data-sync-groups='${JSON.stringify(s,null,2)}'
|
|
6
|
-
data-xdi-commands="${n}"
|
|
7
|
-
></script>
|
|
8
|
-
`,syncGroups:s}}function Yt(e){let i=e.map(({name:o,input:t})=>({title:o.replace(".yml",""),attributes:[..._optionalChain([t, 'optionalAccess', _4 => _4.domains])?[{key:"Transcend Domain List",values:[...new Set(t.domains)]}]:[],..._optionalChain([t, 'optionalAccess', _5 => _5.bundleUrls])?[{key:"Airgap Production URL",values:[t.bundleUrls.PRODUCTION]},{key:"Airgap Test URL",values:[t.bundleUrls.TEST]},{key:"Airgap XDI URL",values:[t.bundleUrls.PRODUCTION.replace("airgap.js","xdi.js")]}]:[],..._optionalChain([t, 'optionalAccess', _6 => _6.partition])?[{key:"Consent Partition Key",values:[t.partition]}]:[]]}));return _chunkZUNVPK23cjs.a.info(`
|
|
9
|
-
|
|
10
|
-
~~~~~~~~~~~
|
|
11
|
-
Airgap scripts to host:`),i.forEach(({attributes:o,title:t},r)=>{_optionalChain([o, 'optionalAccess', _7 => _7.find, 'call', _8 => _8(n=>n.key==="Airgap Production URL"), 'optionalAccess', _9 => _9.values, 'optionalAccess', _10 => _10.forEach, 'call', _11 => _11(n=>{_chunkZUNVPK23cjs.a.info(`${r}) ${t} - ${n}`)})])}),i}var _iots = require('io-ts'); var p = _interopRequireWildcard(_iots);var _typeutils = require('@transcend-io/type-utils');var tt=p.intersection([p.type({nodes:p.array(_chunkQXKWSBYRcjs.c)}),p.partial({lastKey:p.partial({userId:p.string,partition:p.string,timestamp:p.string})})]);async function zt(e,{partition:i,filterBy:o={},limit:t=50}){let r,n=[],a=!0;for(;a;){let l=await e.post("v1/consent-preferences",{json:{partition:i,...o,startKey:r||void 0,limit:t}}).json(),{nodes:s,lastKey:d}=_typeutils.decodeCodec.call(void 0, tt,l);if(!s||s.length===0)break;n.push(...s),r=d,a=!!d&&Object.keys(d).length>0}return n}exports.a = at; exports.b = Ct; exports.c = vt; exports.d = Lt; exports.e = B; exports.f = J; exports.g = Ht; exports.h = Yt; exports.i = tt; exports.j = zt;
|
|
12
|
-
//# sourceMappingURL=chunk-25UGE4YY.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/chunk-25UGE4YY.cjs","../src/lib/consent-manager/updateConsentManagerVersionToLatest.ts","../src/lib/consent-manager/uploadDataFlowsFromCsv.ts","../src/lib/consent-manager/uploadCookiesFromCsv.ts","../src/lib/consent-manager/pullConsentManagerMetrics.ts","../src/lib/consent-manager/domainToHost.ts","../src/lib/consent-manager/buildXdiSyncEndpoint.ts","../src/lib/consent-manager/consentManagersToBusinessEntities.ts","../src/lib/consent-manager/fetchConsentPreferences.ts"],"names":["updateConsentManagerVersionToLatest","auth","deploy","transcendUrl","DEFAULT_TRANSCEND_API","bundleTypes","ConsentBundleType","client","buildTranscendGraphQLClient","consentManagerId","fetchConsentManagerId","mapSeries","bundleType","logger","colors","updateConsentManagerToLatest","deployConsentManager","OMIT_COLUMNS","uploadDataFlowsFromCsv","trackerStatus","file","classifyService","validatedDataFlowInputs","readCsv","DataFlowCsvInput","Type","Notes","Service","Purpose","Status","Owners","Teams","value","rest","splitCsvToList","key","syncDataFlows","uploadCookiesFromCsv","validatedCookieInputs","CookieCsvInput","isRegex","Name","syncCookies","ONE_SECOND","ONE_MINUTE","ONE_HOUR","ONE_DAY","ONE_WEEK","pullConsentManagerMetrics","bin","start","end","airgapBundleId","startTime","endTime","startDate","endDate","privacySignalData","consentChangesData","consentSessionsByRegimeData","fetchConsentManagerAnalyticsData","domainToHost","domain"],"mappings":"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","file":"/home/runner/work/cli/cli/dist/chunk-25UGE4YY.cjs","sourcesContent":[null,"import { ConsentBundleType } from '@transcend-io/privacy-types';\nimport { mapSeries } from '../bluebird-replace';\nimport {\n updateConsentManagerToLatest,\n buildTranscendGraphQLClient,\n fetchConsentManagerId,\n deployConsentManager,\n} from '../graphql';\nimport colors from 'colors';\n\nimport { logger } from '../../logger';\nimport { DEFAULT_TRANSCEND_API } from '../../constants';\n\n/**\n * Update the consent manager to latest version\n *\n * @param options - Options\n */\nexport async function updateConsentManagerVersionToLatest({\n auth,\n deploy = false,\n transcendUrl = DEFAULT_TRANSCEND_API,\n bundleTypes = Object.values(ConsentBundleType),\n}: {\n /** Transcend API key authentication */\n auth: string;\n /** API URL for Transcend backend */\n transcendUrl?: string;\n /** Deploy consent manager with this update */\n deploy?: boolean;\n /** The bundle types to update and deploy */\n bundleTypes?: ConsentBundleType[];\n}): Promise<void> {\n // Find all requests made before createdAt that are in a removing data state\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Grab Consent Manager ID\n const consentManagerId = await fetchConsentManagerId(client);\n\n // Update each bundle type to latest version\n await mapSeries(bundleTypes, async (bundleType) => {\n logger.info(\n colors.magenta(\n `Update Consent Manager bundle with ID \"${consentManagerId}\" and type \"${bundleType}\" to latest version...`,\n ),\n );\n await updateConsentManagerToLatest(client, {\n id: consentManagerId,\n bundleType,\n });\n logger.info(\n colors.green(\n `Updated Consent Manager bundle with ID \"${consentManagerId}\" and type \"${bundleType}\" to latest version!`,\n ),\n );\n });\n\n // deploy Consent Managers\n if (deploy) {\n // Update each bundle type to latest version\n await mapSeries(bundleTypes, async (bundleType) => {\n logger.info(\n colors.magenta(\n `Deploying Consent Manager bundle with ID \"${consentManagerId}\" and type \"${bundleType}\"...`,\n ),\n );\n await deployConsentManager(client, {\n id: consentManagerId,\n bundleType,\n });\n logger.info(\n colors.green(\n `Deployed Consent Manager bundle with ID \"${consentManagerId}\" and type \"${bundleType}\"!`,\n ),\n );\n });\n }\n}\n","import colors from 'colors';\nimport { logger } from '../../logger';\nimport { ConsentTrackerStatus } from '@transcend-io/privacy-types';\nimport { buildTranscendGraphQLClient, syncDataFlows } from '../graphql';\nimport { readCsv } from '../requests/readCsv';\nimport { DataFlowInput, DataFlowCsvInput } from '../../codecs';\nimport { splitCsvToList } from '../requests';\nimport { DEFAULT_TRANSCEND_API } from '../../constants';\n\nconst OMIT_COLUMNS = [\n 'ID',\n 'Activity',\n 'Encounters',\n 'Last Seen At',\n 'Has Native Do Not Sell/Share Support',\n 'IAB USP API Support',\n 'Service Description',\n 'Website URL',\n 'Categories of Recipients',\n];\n\n/**\n * Upload a set of data flows from CSV\n *\n * @param options - Options\n */\nexport async function uploadDataFlowsFromCsv({\n auth,\n trackerStatus,\n file,\n classifyService = false,\n transcendUrl = DEFAULT_TRANSCEND_API,\n}: {\n /** CSV file path */\n file: string;\n /** Transcend API key authentication */\n auth: string;\n /** Sombra API key authentication */\n trackerStatus: ConsentTrackerStatus;\n /** classify data flow service if missing */\n classifyService?: boolean;\n /** API URL for Transcend backend */\n transcendUrl?: string;\n}): Promise<void> {\n // Build a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Read from CSV the set of data flow inputs\n logger.info(colors.magenta(`Reading \"${file}\" from disk`));\n const dataFlowInputs = readCsv(file, DataFlowCsvInput);\n\n // Convert these data flow inputs into a format that the other function can use\n const validatedDataFlowInputs = dataFlowInputs.map(\n ({\n Type,\n Notes,\n // TODO: https://transcend.height.app/T-26391 - export in CSV\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Service,\n Purpose,\n Status,\n Owners,\n Teams,\n 'Connections Made To': value,\n ...rest\n }): DataFlowInput => ({\n value,\n type: Type,\n description: Notes,\n trackingPurposes: splitCsvToList(Purpose),\n // TODO: https://transcend.height.app/T-26391\n // service: Service,\n // Apply the trackerStatus to all values in the CSV -> allows for customer to define tracker status\n // on a row by row basis if needed\n status: Status || trackerStatus,\n owners: Owners ? splitCsvToList(Owners) : undefined,\n teams: Teams ? splitCsvToList(Teams) : undefined,\n // all remaining options are attribute\n attributes: Object.entries(rest)\n // filter out native columns that are exported from the admin dashboard\n // but not custom attributes\n .filter(([key]) => !OMIT_COLUMNS.includes(key))\n .map(([key, value]) => ({\n key,\n values: splitCsvToList(value),\n })),\n }),\n );\n\n // Upload the data flows into Transcend dashboard\n const syncedDataFlows = await syncDataFlows(\n client,\n validatedDataFlowInputs,\n classifyService,\n );\n\n // Log errors\n if (!syncedDataFlows) {\n logger.error(\n colors.red(\n 'Encountered error(s) syncing data flows from CSV, see logs above for more info. ',\n ),\n );\n process.exit(1);\n }\n}\n","import colors from 'colors';\nimport { logger } from '../../logger';\nimport { ConsentTrackerStatus } from '@transcend-io/privacy-types';\nimport { buildTranscendGraphQLClient, syncCookies } from '../graphql';\nimport { readCsv } from '../requests/readCsv';\nimport { CookieInput, CookieCsvInput } from '../../codecs';\nimport { splitCsvToList } from '../requests';\nimport { DEFAULT_TRANSCEND_API } from '../../constants';\n\nconst OMIT_COLUMNS = [\n 'ID',\n 'Activity',\n 'Encounters',\n 'Last Seen At',\n 'Has Native Do Not Sell/Share Support',\n 'IAB USP API Support',\n 'Service Description',\n 'Website URL',\n 'Categories of Recipients',\n];\n\n/**\n * Upload a set of cookies from CSV\n *\n * @param options - Options\n */\nexport async function uploadCookiesFromCsv({\n auth,\n trackerStatus,\n file,\n transcendUrl = DEFAULT_TRANSCEND_API,\n}: {\n /** CSV file path */\n file: string;\n /** Transcend API key authentication */\n auth: string;\n /** Sombra API key authentication */\n trackerStatus: ConsentTrackerStatus;\n /** API URL for Transcend backend */\n transcendUrl?: string;\n}): Promise<void> {\n // Build a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Read from CSV the set of cookie inputs\n logger.info(colors.magenta(`Reading \"${file}\" from disk`));\n const cookieInputs = readCsv(file, CookieCsvInput);\n\n // Convert these inputs into a format that the other function can use\n const validatedCookieInputs = cookieInputs.map(\n ({\n 'Is Regex?': isRegex,\n Notes,\n // TODO: https://transcend.height.app/T-26391 - export in CSV\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Service,\n Purpose,\n Status,\n Owners,\n Teams,\n Name,\n ...rest\n }): CookieInput => ({\n ...(typeof isRegex === 'string'\n ? { isRegex: isRegex.toLowerCase() === 'true' }\n : {}),\n name: Name,\n description: Notes,\n trackingPurposes: splitCsvToList(Purpose),\n // TODO: https://transcend.height.app/T-26391\n // service: Service,\n // Apply the trackerStatus to all values in the CSV -> allows for customer to define tracker status\n // on a row by row basis if needed\n status: Status || trackerStatus,\n owners: Owners ? splitCsvToList(Owners) : undefined,\n teams: Teams ? splitCsvToList(Teams) : undefined,\n // all remaining options are attribute\n attributes: Object.entries(rest)\n // filter out native columns that are exported from the admin dashboard\n // but not custom attributes\n .filter(([key]) => !OMIT_COLUMNS.includes(key))\n .map(([key, value]) => ({\n key,\n values: splitCsvToList(value),\n })),\n }),\n );\n\n // Upload the cookies into Transcend dashboard\n const syncedCookies = await syncCookies(client, validatedCookieInputs);\n\n // Log errors\n if (!syncedCookies) {\n logger.error(\n colors.red(\n 'Encountered error(s) syncing cookies from CSV, see logs above for more info. ',\n ),\n );\n process.exit(1);\n }\n}\n","import type { GraphQLClient } from 'graphql-request';\nimport {\n ConsentManagerMetric,\n ConsentManagerMetricBin,\n fetchConsentManagerAnalyticsData,\n fetchConsentManagerId,\n} from '../graphql';\n\n/**\n * One second of time in ms\n */\nconst ONE_SECOND = 1000;\nconst ONE_MINUTE = 60 * ONE_SECOND;\nconst ONE_HOUR = 60 * ONE_MINUTE;\nconst ONE_DAY = 24 * ONE_HOUR;\nconst ONE_WEEK = 7 * ONE_DAY;\n\n/**\n * Pull consent manager metrics in an organization\n *\n * @param client - GraphQL client\n * @param options - Options\n * @returns The consent manager metrics\n */\nexport async function pullConsentManagerMetrics(\n client: GraphQLClient,\n {\n bin,\n start,\n end = new Date(),\n }: {\n /** Start date to pull metrics from */\n start: Date;\n /** End date to pull metrics from (assumes now) */\n end?: Date;\n /** Bin size to pull metrics */\n bin: ConsentManagerMetricBin;\n },\n): Promise<{\n /** Privacy signal data */\n PRIVACY_SIGNAL_TIMESERIES: ConsentManagerMetric[];\n /** Consent changes data */\n CONSENT_CHANGES_TIMESERIES: ConsentManagerMetric[];\n /** Consent sessions by regime */\n CONSENT_SESSIONS_BY_REGIME: ConsentManagerMetric[];\n}> {\n // Grab the bundleId associated with this API key\n const airgapBundleId = await fetchConsentManagerId(client);\n\n // convert start and end to times\n const startTime = Math.floor(start.getTime() / 1000);\n const endTime = Math.floor(end.getTime() / 1000);\n if (startTime > endTime) {\n throw new Error('Received \"end\" date that happened before \"start\" date');\n }\n\n // do not allow hourly bins greater than 2 weeks\n if (bin === '1h' && end.getTime() - start.getTime() > ONE_WEEK * 2) {\n throw new Error(\n 'When using bin=1h, start and end time can be no more than 2 weeks apart',\n );\n }\n\n // Pull in the metrics\n const startDate = start.toISOString();\n const endDate = end.toISOString();\n const [privacySignalData, consentChangesData, consentSessionsByRegimeData] =\n await Promise.all([\n fetchConsentManagerAnalyticsData(client, {\n dataSource: 'PRIVACY_SIGNAL_TIMESERIES',\n startDate,\n endDate,\n forceRefetch: true,\n airgapBundleId,\n binInterval: bin,\n smoothTimeseries: false,\n }),\n fetchConsentManagerAnalyticsData(client, {\n dataSource: 'CONSENT_CHANGES_TIMESERIES',\n startDate,\n endDate,\n forceRefetch: true,\n airgapBundleId,\n binInterval: bin,\n smoothTimeseries: false,\n }),\n fetchConsentManagerAnalyticsData(client, {\n dataSource: 'CONSENT_SESSIONS_BY_REGIME',\n startDate,\n endDate,\n forceRefetch: true,\n airgapBundleId,\n binInterval: bin,\n smoothTimeseries: false,\n }),\n ]);\n\n return {\n PRIVACY_SIGNAL_TIMESERIES: privacySignalData,\n CONSENT_CHANGES_TIMESERIES: consentChangesData,\n CONSENT_SESSIONS_BY_REGIME: consentSessionsByRegimeData,\n };\n}\n","/**\n * Convert a domain to host\n *\n * @param domain - e.g. test.acme.com\n * @returns Host acme.com\n */\nexport const domainToHost = (domain: string): string =>\n new URL(`https://${domain}`).hostname.split('.').slice(-2).join('.');\n","import colors from 'colors';\n\nimport { buildTranscendGraphQLClient, fetchConsentManager } from '../graphql';\nimport { difference } from 'lodash-es';\nimport { map } from '../bluebird-replace';\nimport { StoredApiKey } from '../../codecs';\nimport { DEFAULT_TRANSCEND_API } from '../../constants';\nimport { logger } from '../../logger';\nimport { domainToHost } from './domainToHost';\n\n/**\n * Sync group configuration mapping\n * e.g.\n * {\n * \"abdb5e78-0d69-4554-a3bd-84b72ca3b3d9\": [\n * \"test.com\"\n * ],\n * \"f6b3ba87-c9df-444f-b420-6fac49e35910\": [\n * \"blue.com\"\n * ]\n * }\n */\nexport type XdiSyncGroups = { [k in string]: string[] };\n\n/** Regular expression for IP addresses - remove these from sync endpoint */\nexport const IP_ADDRESS_REGEX =\n // eslint-disable-next-line max-len\n /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;\n\n/**\n * Build the sync endpoint definition for a set of Transcend accounts\n *\n * @param apiKeys - The API keys that will be used to pull down configurations for\n * @param options - Options\n * @returns The XDI configuration\n */\nexport async function buildXdiSyncEndpoint(\n apiKeys: string | StoredApiKey[],\n {\n xdiLocation,\n transcendUrl = DEFAULT_TRANSCEND_API,\n removeIpAddresses = true,\n domainBlockList = ['localhost'],\n xdiAllowedCommands = 'ConsentManager:Sync',\n }: {\n /** The file location where the XDI file is hosted */\n xdiLocation: string;\n /** URL of Transcend API */\n transcendUrl?: string;\n /** When true, remove IP addresses (defaults to true) */\n removeIpAddresses?: boolean;\n /** Block list of domains to omit from sync endpoint - includes `localhost` by default */\n domainBlockList?: string[];\n /** Allows XDI commands */\n xdiAllowedCommands?: string;\n },\n): Promise<{\n /** Sync group configurations */\n syncGroups: XdiSyncGroups;\n /** The HTML string */\n html: string;\n}> {\n // Convert API keys to list\n const apiKeysAsList = Array.isArray(apiKeys)\n ? apiKeys\n : [{ apiKey: apiKeys, organizationId: '', organizationName: '' }];\n\n // Fetch configuration for each account\n const consentManagers = await map(\n apiKeysAsList,\n async (apiKey) => {\n logger.info(\n colors.magenta(\n `Pulling consent metadata for organization - ${apiKey.organizationName}`,\n ),\n );\n\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, apiKey.apiKey);\n\n // Grab consent manager\n const consentManager = await fetchConsentManager(client);\n return consentManager;\n },\n { concurrency: 5 },\n );\n\n // construct the sync groups\n const syncGroups: XdiSyncGroups = {};\n consentManagers.forEach((consentManager) => {\n // grab the partition key\n const partitionKey =\n // take explicit key first\n consentManager.partition?.partition ||\n // fallback to bundle ID\n consentManager.bundleURL.split('/').reverse()[1];\n\n // Ensure that partition exists in the sync groups\n if (!syncGroups[partitionKey]) {\n syncGroups[partitionKey] = [];\n }\n\n // Map domain list to a host list\n const hosts = difference(\n consentManager.configuration.domains\n .filter(\n // ignore IP addresses\n (domain) => !removeIpAddresses || !IP_ADDRESS_REGEX.test(domain),\n )\n .map((domain) => domainToHost(domain)),\n // ignore block list\n domainBlockList,\n );\n // merge existing sync group with hosts for this consent manager\n syncGroups[partitionKey] = [\n ...new Set([...(syncGroups[partitionKey] || []), ...hosts]),\n ];\n });\n\n // Construct the HTML\n const syncEndpointHtml = `\n<!DOCTYPE html>\n<script\nsrc=\"${xdiLocation}\"\ndata-sync-groups='${JSON.stringify(syncGroups, null, 2)}'\ndata-xdi-commands=\"${xdiAllowedCommands}\"\n></script>\n`;\n\n return {\n html: syncEndpointHtml,\n syncGroups,\n };\n}\n","import { BusinessEntityInput, ConsentManagerInput } from '../../codecs';\nimport { logger } from '../../logger';\n\n/**\n * Combine multiple consent manager configurations into a list of business entity configurations\n *\n * @param inputs - Consent manager configurations to combine\n * @returns Business entity configuration input\n */\nexport function consentManagersToBusinessEntities(\n inputs: {\n /** Name of business entity */\n name: string;\n /** Consent manager input */\n input?: ConsentManagerInput;\n }[],\n): BusinessEntityInput[] {\n // Construct the business entities YAML definition\n const businessEntities = inputs.map(\n ({ name, input }): BusinessEntityInput => ({\n // Title of Transcend Instance\n title: name.replace('.yml', ''),\n attributes: [\n // Sync domain list\n ...(input?.domains\n ? [\n {\n key: 'Transcend Domain List',\n values: [...new Set(input.domains)],\n },\n ]\n : []),\n // Sync bundle URLs\n ...(input?.bundleUrls\n ? [\n {\n key: 'Airgap Production URL',\n values: [input.bundleUrls.PRODUCTION],\n },\n {\n key: 'Airgap Test URL',\n values: [input.bundleUrls.TEST],\n },\n {\n key: 'Airgap XDI URL',\n values: [\n input.bundleUrls.PRODUCTION.replace('airgap.js', 'xdi.js'),\n ],\n },\n ]\n : []),\n // Sync partition keys\n ...(input?.partition\n ? [\n {\n key: 'Consent Partition Key',\n values: [input.partition],\n },\n ]\n : []),\n ],\n }),\n );\n\n // Log out info on airgap scripts to host\n logger.info('\\n\\n~~~~~~~~~~~\\nAirgap scripts to host:');\n businessEntities.forEach(({ attributes, title }, ind) => {\n attributes\n ?.find((attr) => attr.key === 'Airgap Production URL')\n ?.values?.forEach((url) => {\n logger.info(`${ind}) ${title} - ${url}`);\n });\n });\n\n return businessEntities;\n}\n","import * as t from 'io-ts';\nimport { decodeCodec } from '@transcend-io/type-utils';\nimport type { Got } from 'got';\nimport { ConsentPreferenceFetch } from './types';\n\nexport const ConsentPreferenceResponse = t.intersection([\n t.type({\n nodes: t.array(ConsentPreferenceFetch),\n }),\n t.partial({\n lastKey: t.partial({\n userId: t.string,\n partition: t.string,\n timestamp: t.string,\n }),\n }),\n]);\n\n/** Type override */\nexport type ConsentPreferenceResponse = t.TypeOf<\n typeof ConsentPreferenceResponse\n>;\n\n/**\n * Fetch consent preferences for the managed consent database\n *\n * @param sombra - Sombra instance configured to make requests\n * @param options - Additional options\n * @returns The consent preferences\n */\nexport async function fetchConsentPreferences(\n sombra: Got,\n {\n partition,\n filterBy = {},\n limit = 50,\n }: {\n /** Partition key to fetch */\n partition: string;\n /** Filter consent preferences */\n filterBy?: {\n /** Fetch specific identifiers */\n identifiers?: string[];\n /** Filter before timestamp */\n timestampBefore?: string;\n /** Filter after timestamp */\n timestampAfter?: string;\n };\n /** Number of items to pull back at once */\n limit?: number;\n },\n): Promise<ConsentPreferenceFetch[]> {\n let currentLastKey: ConsentPreferenceResponse['lastKey'];\n const data: ConsentPreferenceFetch[] = [];\n let shouldContinue = true;\n\n while (shouldContinue) {\n const response = await sombra\n .post('v1/consent-preferences', {\n json: {\n partition,\n ...filterBy,\n // using lastKey to paginate if it exists (will not for first iteration)\n startKey: currentLastKey || undefined,\n limit,\n },\n })\n .json();\n const { nodes, lastKey } = decodeCodec(ConsentPreferenceResponse, response);\n\n if (!nodes || nodes.length === 0) {\n break;\n }\n\n // Process the data received from the API call\n // For example, push the new data into an array\n data.push(...nodes);\n\n // Extract the lastKey from the API response\n currentLastKey = lastKey;\n shouldContinue = !!lastKey && Object.keys(lastKey).length > 0;\n }\n\n return data;\n}\n"]}
|
package/dist/chunk-EG4L6YAJ.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _privacytypes = require('@transcend-io/privacy-types');var r="transcend",s= exports.b ="https://app.transcend.io",c= exports.c =`${s}/infrastructure/integrations`,p= exports.d =`${s}/data-map/data-inventory/data-points`,g= exports.e =process.env.TRANSCEND_API_URL||"https://api.transcend.io",l= exports.f =process.env.TRANSCEND_CONSENT_API_URL||"https://consent.transcend.io",m= exports.g ={apiKeys:[_privacytypes.ScopeName.ViewApiKeys],templates:[_privacytypes.ScopeName.ManageEmailTemplates],dataSilos:[_privacytypes.ScopeName.ManageDataMap,_privacytypes.ScopeName.ConnectDataSilos],enrichers:[_privacytypes.ScopeName.ManageRequestIdentities],businessEntities:[_privacytypes.ScopeName.ManageDataInventory],identifiers:[_privacytypes.ScopeName.ManageRequestIdentities],customFields:[_privacytypes.ScopeName.ManageGlobalAttributes],dataFlows:[_privacytypes.ScopeName.ManageDataFlow],cookies:[_privacytypes.ScopeName.ManageDataFlow],consentManager:[_privacytypes.ScopeName.ManageConsentManagerDeveloperSettings],partitions:[_privacytypes.ScopeName.ManageConsentManagerDeveloperSettings],actions:[_privacytypes.ScopeName.ManageDataSubjectRequestSettings],dataSubjects:[_privacytypes.ScopeName.ManageDataSubjectRequestSettings],prompts:[_privacytypes.ScopeName.ManagePrompts],promptPartials:[_privacytypes.ScopeName.ManagePrompts],promptGroups:[_privacytypes.ScopeName.ManagePrompts],agents:[_privacytypes.ScopeName.ManagePathfinder],agentFunctions:[_privacytypes.ScopeName.ManagePathfinder],agentFiles:[_privacytypes.ScopeName.ManagePathfinder],vendors:[_privacytypes.ScopeName.ManageDataInventory],dataCategories:[_privacytypes.ScopeName.ManageDataInventory],processingPurposes:[_privacytypes.ScopeName.ManageDataInventory],actionItems:[_privacytypes.ScopeName.ManageAllActionItems,_privacytypes.ScopeName.ViewGlobalAttributes],actionItemCollections:[_privacytypes.ScopeName.ManageActionItemCollections],teams:[_privacytypes.ScopeName.ManageAccessControl],messages:[_privacytypes.ScopeName.ManageIntlMessages],privacyCenters:[_privacytypes.ScopeName.ManagePrivacyCenter],policies:[_privacytypes.ScopeName.ManagePolicies],assessments:[_privacytypes.ScopeName.ManageAssessments],assessmentTemplates:[_privacytypes.ScopeName.ManageAssessments],purposes:[_privacytypes.ScopeName.ManageConsentManager,_privacytypes.ScopeName.ManagePreferenceStoreSettings]},A= exports.h ={apiKeys:[_privacytypes.ScopeName.ViewApiKeys],templates:[_privacytypes.ScopeName.ViewEmailTemplates],dataSilos:[_privacytypes.ScopeName.ViewDataMap,_privacytypes.ScopeName.ViewDataSubjectRequestSettings],enrichers:[_privacytypes.ScopeName.ViewRequestIdentitySettings],businessEntities:[_privacytypes.ScopeName.ViewDataInventory],identifiers:[_privacytypes.ScopeName.ViewRequestIdentitySettings],customFields:[_privacytypes.ScopeName.ViewGlobalAttributes],dataFlows:[_privacytypes.ScopeName.ViewDataFlow],cookies:[_privacytypes.ScopeName.ViewDataFlow],consentManager:[_privacytypes.ScopeName.ViewConsentManager],partitions:[_privacytypes.ScopeName.ViewConsentManager],actions:[_privacytypes.ScopeName.ViewDataSubjectRequestSettings],dataSubjects:[_privacytypes.ScopeName.ViewDataSubjectRequestSettings],prompts:[_privacytypes.ScopeName.ViewPrompts],promptPartials:[_privacytypes.ScopeName.ViewPrompts],promptGroups:[_privacytypes.ScopeName.ViewPrompts],agents:[_privacytypes.ScopeName.ViewPathfinder],agentFunctions:[_privacytypes.ScopeName.ViewPathfinder],agentFiles:[_privacytypes.ScopeName.ViewPathfinder],vendors:[_privacytypes.ScopeName.ViewDataInventory],dataCategories:[_privacytypes.ScopeName.ViewDataInventory],processingPurposes:[_privacytypes.ScopeName.ViewDataInventory],actionItemCollections:[_privacytypes.ScopeName.ViewAllActionItems],actionItems:[_privacytypes.ScopeName.ViewAllActionItems],teams:[_privacytypes.ScopeName.ViewScopes],messages:[_privacytypes.ScopeName.ViewIntlMessages],privacyCenters:[_privacytypes.ScopeName.ViewPrivacyCenter],policies:[_privacytypes.ScopeName.ViewPolicies],assessments:[_privacytypes.ScopeName.ViewAssessments],assessmentTemplates:[_privacytypes.ScopeName.ViewAssessments],purposes:[_privacytypes.ScopeName.ViewConsentManager,_privacytypes.ScopeName.ViewPreferenceStoreSettings]},P= exports.i ={apiKeys:"api-keys",customFields:"attributes",dataFlows:"data-flows",cookies:"cookies",consentManager:"consent-manager",partitions:"partitions",actions:"actions",dataSubjects:"data-subjects",businessEntities:"business-entities",identifiers:"identifiers",enrichers:"enrichers",dataSilos:"data-silos",templates:"templates",prompts:"prompts",promptPartials:"prompt-partials",promptGroups:"prompt-groups",agents:"agents",agentFunctions:"agent-functions",agentFiles:"agent-files",vendors:"vendors",dataCategories:"data-categories",processingPurposes:"processing-purposes",actionItems:"action-items",actionItemCollections:"action-item-collections",teams:"teams",messages:"messages",privacyCenters:"privacy-center",policies:"policies",assessments:"assessments",assessmentTemplates:"assessment-templates",purposes:"purposes"};exports.a = r; exports.b = s; exports.c = c; exports.d = p; exports.e = g; exports.f = l; exports.g = m; exports.h = A; exports.i = P;
|
|
2
|
-
//# sourceMappingURL=chunk-EG4L6YAJ.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/constants.ts"],"names":["name","ADMIN_DASH","ADMIN_DASH_INTEGRATIONS"],"mappings":"AAAA,oIAA0B,IAKbA,CAAAA,CAAO,WAAA,CAEPC,CAAAA,aAAa,0BAAA,CAEbC,CAAAA,aAA0B,CAAA,EAAA","file":"/home/runner/work/cli/cli/dist/chunk-EG4L6YAJ.cjs","sourcesContent":["import { ScopeName } from '@transcend-io/privacy-types';\nimport { TranscendPullResource } from './enums';\nimport { TranscendInput } from './codecs';\n\nexport { description, version } from '../package.json';\nexport const name = 'transcend';\n\nexport const ADMIN_DASH = 'https://app.transcend.io';\n\nexport const ADMIN_DASH_INTEGRATIONS = `${ADMIN_DASH}/infrastructure/integrations`;\nexport const ADMIN_DASH_DATAPOINTS = `${ADMIN_DASH}/data-map/data-inventory/data-points`;\n\n/**\n * Override default transcend API url using\n * TRANSCEND_API_URL=https://api.us.transcend.io transcend ...\n */\nexport const DEFAULT_TRANSCEND_API =\n process.env.TRANSCEND_API_URL || 'https://api.transcend.io';\n\n/**\n * Override default transcend API url using\n * TRANSCEND_CONSENT_API_URL=https://consent.us.transcend.io transcend ...\n */\nexport const DEFAULT_TRANSCEND_CONSENT_API =\n process.env.TRANSCEND_CONSENT_API_URL || 'https://consent.transcend.io';\n\n/**\n * Mapping between resource type and scopes required for cli\n */\nexport const TR_PUSH_RESOURCE_SCOPE_MAP: {\n [k in TranscendPullResource]: ScopeName[];\n} = {\n [TranscendPullResource.ApiKeys]: [ScopeName.ViewApiKeys],\n [TranscendPullResource.Templates]: [ScopeName.ManageEmailTemplates],\n [TranscendPullResource.DataSilos]: [\n ScopeName.ManageDataMap,\n ScopeName.ConnectDataSilos,\n ],\n [TranscendPullResource.Enrichers]: [ScopeName.ManageRequestIdentities],\n [TranscendPullResource.BusinessEntities]: [ScopeName.ManageDataInventory],\n [TranscendPullResource.Identifiers]: [ScopeName.ManageRequestIdentities],\n [TranscendPullResource.Attributes]: [ScopeName.ManageGlobalAttributes],\n [TranscendPullResource.DataFlows]: [ScopeName.ManageDataFlow],\n [TranscendPullResource.Cookies]: [ScopeName.ManageDataFlow],\n [TranscendPullResource.ConsentManager]: [\n ScopeName.ManageConsentManagerDeveloperSettings,\n ],\n [TranscendPullResource.Partitions]: [\n ScopeName.ManageConsentManagerDeveloperSettings,\n ],\n [TranscendPullResource.Actions]: [ScopeName.ManageDataSubjectRequestSettings],\n [TranscendPullResource.DataSubjects]: [\n ScopeName.ManageDataSubjectRequestSettings,\n ],\n [TranscendPullResource.Prompts]: [ScopeName.ManagePrompts],\n [TranscendPullResource.PromptPartials]: [ScopeName.ManagePrompts],\n [TranscendPullResource.PromptGroups]: [ScopeName.ManagePrompts],\n [TranscendPullResource.Agents]: [ScopeName.ManagePathfinder],\n [TranscendPullResource.AgentFunctions]: [ScopeName.ManagePathfinder],\n [TranscendPullResource.AgentFiles]: [ScopeName.ManagePathfinder],\n [TranscendPullResource.Vendors]: [ScopeName.ManageDataInventory],\n [TranscendPullResource.DataCategories]: [ScopeName.ManageDataInventory],\n [TranscendPullResource.ProcessingPurposes]: [ScopeName.ManageDataInventory],\n [TranscendPullResource.ActionItems]: [\n ScopeName.ManageAllActionItems,\n ScopeName.ViewGlobalAttributes,\n ],\n [TranscendPullResource.ActionItemCollections]: [\n ScopeName.ManageActionItemCollections,\n ],\n [TranscendPullResource.Teams]: [ScopeName.ManageAccessControl],\n [TranscendPullResource.Messages]: [ScopeName.ManageIntlMessages],\n [TranscendPullResource.PrivacyCenters]: [ScopeName.ManagePrivacyCenter],\n [TranscendPullResource.Policies]: [ScopeName.ManagePolicies],\n [TranscendPullResource.Assessments]: [ScopeName.ManageAssessments],\n [TranscendPullResource.AssessmentTemplates]: [ScopeName.ManageAssessments],\n [TranscendPullResource.Purposes]: [\n ScopeName.ManageConsentManager,\n ScopeName.ManagePreferenceStoreSettings,\n ],\n};\n\n/**\n * Mapping between resource type and scopes required for cli\n */\nexport const TR_PULL_RESOURCE_SCOPE_MAP: {\n [k in TranscendPullResource]: ScopeName[];\n} = {\n [TranscendPullResource.ApiKeys]: [ScopeName.ViewApiKeys],\n [TranscendPullResource.Templates]: [ScopeName.ViewEmailTemplates],\n [TranscendPullResource.DataSilos]: [\n ScopeName.ViewDataMap,\n ScopeName.ViewDataSubjectRequestSettings,\n ],\n [TranscendPullResource.Enrichers]: [ScopeName.ViewRequestIdentitySettings],\n [TranscendPullResource.BusinessEntities]: [ScopeName.ViewDataInventory],\n [TranscendPullResource.Identifiers]: [ScopeName.ViewRequestIdentitySettings],\n [TranscendPullResource.Attributes]: [ScopeName.ViewGlobalAttributes],\n [TranscendPullResource.DataFlows]: [ScopeName.ViewDataFlow],\n [TranscendPullResource.Cookies]: [ScopeName.ViewDataFlow],\n [TranscendPullResource.ConsentManager]: [ScopeName.ViewConsentManager],\n [TranscendPullResource.Partitions]: [ScopeName.ViewConsentManager],\n [TranscendPullResource.Actions]: [ScopeName.ViewDataSubjectRequestSettings],\n [TranscendPullResource.DataSubjects]: [\n ScopeName.ViewDataSubjectRequestSettings,\n ],\n [TranscendPullResource.Prompts]: [ScopeName.ViewPrompts],\n [TranscendPullResource.PromptPartials]: [ScopeName.ViewPrompts],\n [TranscendPullResource.PromptGroups]: [ScopeName.ViewPrompts],\n [TranscendPullResource.Agents]: [ScopeName.ViewPathfinder],\n [TranscendPullResource.AgentFunctions]: [ScopeName.ViewPathfinder],\n [TranscendPullResource.AgentFiles]: [ScopeName.ViewPathfinder],\n [TranscendPullResource.Vendors]: [ScopeName.ViewDataInventory],\n [TranscendPullResource.DataCategories]: [ScopeName.ViewDataInventory],\n [TranscendPullResource.ProcessingPurposes]: [ScopeName.ViewDataInventory],\n [TranscendPullResource.ActionItemCollections]: [ScopeName.ViewAllActionItems],\n [TranscendPullResource.ActionItems]: [ScopeName.ViewAllActionItems],\n [TranscendPullResource.Teams]: [ScopeName.ViewScopes],\n [TranscendPullResource.Messages]: [ScopeName.ViewIntlMessages],\n [TranscendPullResource.PrivacyCenters]: [ScopeName.ViewPrivacyCenter],\n [TranscendPullResource.Policies]: [ScopeName.ViewPolicies],\n [TranscendPullResource.Assessments]: [ScopeName.ViewAssessments],\n [TranscendPullResource.AssessmentTemplates]: [ScopeName.ViewAssessments],\n [TranscendPullResource.Purposes]: [\n ScopeName.ViewConsentManager,\n ScopeName.ViewPreferenceStoreSettings,\n ],\n};\n\nexport const TR_YML_RESOURCE_TO_FIELD_NAME: Record<\n TranscendPullResource,\n keyof TranscendInput\n> = {\n [TranscendPullResource.ApiKeys]: 'api-keys',\n [TranscendPullResource.Attributes]: 'attributes',\n [TranscendPullResource.DataFlows]: 'data-flows',\n [TranscendPullResource.Cookies]: 'cookies',\n [TranscendPullResource.ConsentManager]: 'consent-manager',\n [TranscendPullResource.Partitions]: 'partitions',\n [TranscendPullResource.Actions]: 'actions',\n [TranscendPullResource.DataSubjects]: 'data-subjects',\n [TranscendPullResource.BusinessEntities]: 'business-entities',\n [TranscendPullResource.Identifiers]: 'identifiers',\n [TranscendPullResource.Enrichers]: 'enrichers',\n [TranscendPullResource.DataSilos]: 'data-silos',\n [TranscendPullResource.Templates]: 'templates',\n [TranscendPullResource.Prompts]: 'prompts',\n [TranscendPullResource.PromptPartials]: 'prompt-partials',\n [TranscendPullResource.PromptGroups]: 'prompt-groups',\n [TranscendPullResource.Agents]: 'agents',\n [TranscendPullResource.AgentFunctions]: 'agent-functions',\n [TranscendPullResource.AgentFiles]: 'agent-files',\n [TranscendPullResource.Vendors]: 'vendors',\n [TranscendPullResource.DataCategories]: 'data-categories',\n [TranscendPullResource.ProcessingPurposes]: 'processing-purposes',\n [TranscendPullResource.ActionItems]: 'action-items',\n [TranscendPullResource.ActionItemCollections]: 'action-item-collections',\n [TranscendPullResource.Teams]: 'teams',\n [TranscendPullResource.Messages]: 'messages',\n [TranscendPullResource.PrivacyCenters]: 'privacy-center',\n [TranscendPullResource.Policies]: 'policies',\n [TranscendPullResource.Assessments]: 'assessments',\n [TranscendPullResource.AssessmentTemplates]: 'assessment-templates',\n [TranscendPullResource.Purposes]: 'purposes',\n};\n"]}
|
package/dist/chunk-FPTEK7BG.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../package.json"],"names":["description","version"],"mappings":"AAGE,6EAAAA,CAAAA,CAAe,wEAAA,CACfC,CAAAA,aAAW,OAAA,CAAA,6BAAA","file":"/home/runner/work/cli/cli/dist/chunk-FPTEK7BG.cjs","sourcesContent":["{\n \"author\": \"Transcend Inc.\",\n \"name\": \"@transcend-io/cli\",\n \"description\": \"A command line interface for programmatic operations across Transcend.\",\n \"version\": \"7.0.2\",\n \"homepage\": \"https://github.com/transcend-io/cli\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/transcend-io/cli.git\"\n },\n \"type\": \"module\",\n \"license\": \"UNLICENSED\",\n \"main\": \"dist/index.cjs\",\n \"bin\": {\n \"transcend\": \"dist/bin/cli.cjs\",\n \"__transcend_bash_complete\": \"dist/bin/bash-complete.cjs\",\n \"__tr-build-xdi-sync-endpoint\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-consent-manager-service-json-to-yml\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-consent-managers-to-business-entities\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-cron-mark-identifiers-completed\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-cron-pull-identifiers\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-cron-pull-profiles\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-derive-data-silos-from-data-flows\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-derive-data-silos-from-data-flows-cross-instance\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-discover-silos\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-generate-api-keys\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-manual-enrichment-pull-identifiers\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-manual-enrichment-push-identifiers\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-mark-request-data-silos-completed\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-pull\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-pull-consent-metrics\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-pull-consent-preferences\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-pull-datapoints\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-pull-unstructured-discovery-files\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-push\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-request-approve\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-request-cancel\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-request-download-files\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-request-enricher-restart\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-request-export\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-request-mark-silent\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-request-notify-additional-time\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-request-reject-unverified-identifiers\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-request-restart\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-request-upload\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-retry-request-data-silos\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-scan-packages\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-skip-request-data-silos\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-sync-ot\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-update-consent-manager\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-upload-consent-preferences\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-upload-cookies-from-csv\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-upload-data-flows-from-csv\": \"dist/bin/deprecated-command.cjs\",\n \"__tr-upload-preferences\": \"dist/bin/deprecated-command.cjs\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"files\": [\n \"dist\"\n ],\n \"scripts\": {\n \"start\": \"./dist/bin/cli.cjs\",\n \"prebuild\": \"tsc -p tsconfig.json\",\n \"build\": \"tsup\",\n \"build:watch\": \"tsup --watch\",\n \"prepublishOnly\": \"pnpm lint && pnpm build && pnpm test && pnpm publint\",\n \"lint\": \"pnpm run /^lint:/\",\n \"lint:prettier\": \"prettier --check . --loglevel=warn\",\n \"lint:types\": \"tsc --noEmit\",\n \"lint:eslint\": \"eslint .\",\n \"format\": \"prettier --write . --loglevel=warn\",\n \"test\": \"vitest run\",\n \"script:transcend-json-schema\": \"tsx scripts/buildTranscendJsonSchema.ts && prettier ./transcend-yml-schema-*.json --write\",\n \"script:pathfinder-json-schema\": \"tsx scripts/buildPathfinderJsonSchema.ts && prettier ./pathfinder-policy-yml-schema.json --write\",\n \"docgen\": \"tsx scripts/buildReadmeDocs.ts\"\n },\n \"tsup\": {\n \"entry\": [\n \"src/bin/cli.ts\",\n \"src/bin/bash-complete.ts\",\n \"src/bin/deprecated-command.ts\",\n \"src/index.ts\"\n ],\n \"format\": [\n \"cjs\"\n ],\n \"sourcemap\": true,\n \"dts\": true,\n \"tsconfig\": \"tsconfig.json\",\n \"clean\": true,\n \"splitting\": true,\n \"minify\": true,\n \"noExternal\": [\n \"lodash-es\"\n ]\n },\n \"dependencies\": {\n \"@stricli/auto-complete\": \"^1.2.0\",\n \"@stricli/core\": \"^1.2.0\",\n \"@transcend-io/airgap.js-types\": \"^12.12.1\",\n \"@transcend-io/handlebars-utils\": \"^1.1.0\",\n \"@transcend-io/internationalization\": \"^1.6.0\",\n \"@transcend-io/persisted-state\": \"^1.0.4\",\n \"@transcend-io/privacy-types\": \"^4.124.1\",\n \"@transcend-io/secret-value\": \"^1.2.0\",\n \"@transcend-io/type-utils\": \"^1.8.0\",\n \"JSONStream\": \"^1.3.5\",\n \"cli-progress\": \"^3.11.2\",\n \"colors\": \"^1.4.0\",\n \"csv-parse\": \"^5.6.0\",\n \"fast-csv\": \"^4.3.6\",\n \"fast-glob\": \"^3.2.12\",\n \"fp-ts\": \"^2.16.1\",\n \"fuzzysearch\": \"^1.0.3\",\n \"global-agent\": \"^3.0.0\",\n \"got\": \"^11.8.5\",\n \"graphql\": \"^16.6.0\",\n \"graphql-request\": \"^5.0.0\",\n \"inquirer\": \"=7.3.3\",\n \"inquirer-autocomplete-prompt\": \"=1.3.0\",\n \"io-ts\": \"^2.2.21\",\n \"io-ts-types\": \"^0.5.16\",\n \"js-yaml\": \"^4.1.0\",\n \"jsonwebtoken\": \"^9.0.2\",\n \"lodash-es\": \"^4.17.21\",\n \"monocle-ts\": \"^2.3.13\",\n \"newtype-ts\": \"^0.3.5\",\n \"query-string\": \"=7.0.0\",\n \"semver\": \"^7.6.0\",\n \"undici\": \"^5.22.1\",\n \"yargs-parser\": \"^21.1.1\"\n },\n \"devDependencies\": {\n \"@types/JSONStream\": \"npm:@types/jsonstream@^0.8.33\",\n \"@types/cli-progress\": \"^3.11.0\",\n \"@types/colors\": \"^1.2.1\",\n \"@types/fuzzysearch\": \"^1.0.0\",\n \"@types/global-agent\": \"^2.1.1\",\n \"@types/inquirer\": \"^7.3.1\",\n \"@types/inquirer-autocomplete-prompt\": \"^3.0.0\",\n \"@types/js-yaml\": \"^4.0.5\",\n \"@types/json-schema\": \"^7.0.15\",\n \"@types/jsonwebtoken\": \"^9\",\n \"@types/lodash-es\": \"^4.17.12\",\n \"@types/node\": \"^18.15.11\",\n \"@types/semver\": \"^7\",\n \"@types/yargs-parser\": \"^21.0.0\",\n \"@typescript-eslint/eslint-plugin\": \"^5.58.0\",\n \"@typescript-eslint/parser\": \"^5.58.0\",\n \"depcheck\": \"^1.4.3\",\n \"doctoc\": \"^2.2.1\",\n \"eslint\": \"^8.38.0\",\n \"eslint-config-airbnb-base\": \"^15.0.0\",\n \"eslint-import-resolver-typescript\": \"^3.5.5\",\n \"eslint-plugin-eslint-comments\": \"^3.2.0\",\n \"eslint-plugin-import\": \"2.27.5\",\n \"eslint-plugin-jsdoc\": \"^41.1.1\",\n \"fdir\": \"^6.4.6\",\n \"prettier\": \"^2.8.7\",\n \"publint\": \"^0.3.12\",\n \"tsup\": \"^8.5.0\",\n \"tsx\": \"^4.20.3\",\n \"typescript\": \"^5.0.4\",\n \"vite-tsconfig-paths\": \"^5.1.4\",\n \"vitest\": \"^3.2.4\"\n },\n \"packageManager\": \"pnpm@10.12.4+sha512.5ea8b0deed94ed68691c9bad4c955492705c5eeb8a87ef86bc62c74a26b037b08ff9570f108b2e4dbd1dd1a9186fea925e527f141c648e85af45631074680184\"\n}\n"]}
|
package/dist/chunk-HAOVN3XO.cjs
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunkNOF6QHE4cjs = require('./chunk-NOF6QHE4.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _privacytypes = require('@transcend-io/privacy-types');var _cliprogress = require('cli-progress'); var _cliprogress2 = _interopRequireDefault(_cliprogress);var _graphqlrequest = require('graphql-request');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function q(u,{dataSiloIds:e=[],includeGuessedCategories:l,includeAttributes:a,parentCategories:c=[],subCategories:t=[],pageSize:p=1e3}={}){let n=[],m=new Date().getTime(),d=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),s={...c.length>0?{category:c}:{},...t.length>0?{subCategoryIds:t}:{},...c.length+t.length>0&&!l?{status:_privacytypes.SubDataPointDataSubCategoryGuessStatus.Approved}:{},...e.length>0?{dataSilos:e}:{}},{subDataPoints:{totalCount:o}}=await _chunkNOF6QHE4cjs.gc.call(void 0, u,_chunkNOF6QHE4cjs.f,{filterBy:s});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("[Step 1/3] Pulling in all subdatapoints")),d.start(o,0);let y=0,D=!1,r,b=0;do try{let{subDataPoints:{nodes:P}}=await _chunkNOF6QHE4cjs.gc.call(void 0, u,_graphqlrequest.gql`
|
|
2
|
-
query TranscendCliSubDataPointCsvExport(
|
|
3
|
-
$filterBy: SubDataPointFiltersInput
|
|
4
|
-
$first: Int!
|
|
5
|
-
$offset: Int!
|
|
6
|
-
) {
|
|
7
|
-
subDataPoints(
|
|
8
|
-
filterBy: $filterBy
|
|
9
|
-
first: $first
|
|
10
|
-
offset: $offset
|
|
11
|
-
useMaster: false
|
|
12
|
-
) {
|
|
13
|
-
nodes {
|
|
14
|
-
id
|
|
15
|
-
name
|
|
16
|
-
description
|
|
17
|
-
dataPointId
|
|
18
|
-
dataSiloId
|
|
19
|
-
purposes {
|
|
20
|
-
name
|
|
21
|
-
purpose
|
|
22
|
-
}
|
|
23
|
-
categories {
|
|
24
|
-
name
|
|
25
|
-
category
|
|
26
|
-
}
|
|
27
|
-
${l?`pendingCategoryGuesses {
|
|
28
|
-
category {
|
|
29
|
-
name
|
|
30
|
-
category
|
|
31
|
-
}
|
|
32
|
-
status
|
|
33
|
-
classifierVersion
|
|
34
|
-
}`:""}
|
|
35
|
-
${a?`attributeValues {
|
|
36
|
-
attributeKey {
|
|
37
|
-
name
|
|
38
|
-
}
|
|
39
|
-
name
|
|
40
|
-
}`:""}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
`,{first:p,offset:b,filterBy:{...s}});r=_optionalChain([P, 'access', _2 => _2[P.length-1], 'optionalAccess', _3 => _3.id]),n.push(...P),D=P.length===p,y+=P.length,b+=P.length,d.update(y)}catch(P){throw _chunkZUNVPK23cjs.a.error(_colors2.default.red(`An error fetching subdatapoints for cursor ${r} and offset ${b}`)),P}while(D);d.stop();let C=new Date().getTime()-m,g=_chunkNOF6QHE4cjs.cc.call(void 0, n,"name");return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully pulled in ${g.length} subdatapoints in ${C/1e3} seconds!`)),g}async function F(u,{dataPointIds:e=[],pageSize:l=100}){let a=[],c=new Date().getTime(),t=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`[Step 2/3] Fetching metadata for ${e.length} datapoints`));let p=_chunkNOF6QHE4cjs._b.call(void 0, e,l);t.start(e.length,0);let n=0;await _chunkNOF6QHE4cjs.a.call(void 0, p,async s=>{try{let{dataPoints:{nodes:o}}=await _chunkNOF6QHE4cjs.gc.call(void 0, u,_chunkNOF6QHE4cjs.i,{first:l,filterBy:{ids:s}});a.push(...o),n+=s.length,t.update(n)}catch(o){throw _chunkZUNVPK23cjs.a.error(_colors2.default.red(`An error fetching subdatapoints for IDs ${s.join(", ")}`)),o}}),t.stop();let d=new Date().getTime()-c;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully pulled in ${a.length} dataPoints in ${d/1e3} seconds!`)),a}async function Q(u,{dataSiloIds:e=[],pageSize:l=100}){let a=[],c=new Date().getTime(),t=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`[Step 3/3] Fetching metadata for ${e.length} data silos`));let p=_chunkNOF6QHE4cjs._b.call(void 0, e,l);t.start(e.length,0);let n=0;await _chunkNOF6QHE4cjs.a.call(void 0, p,async s=>{try{let{dataSilos:{nodes:o}}=await _chunkNOF6QHE4cjs.gc.call(void 0, u,_chunkNOF6QHE4cjs.l,{first:l,filterBy:{ids:s}});a.push(...o),n+=s.length,t.update(n)}catch(o){throw _chunkZUNVPK23cjs.a.error(_colors2.default.red(`An error fetching data silos for IDs ${s.join(", ")}`)),o}}),t.stop();let d=new Date().getTime()-c;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully pulled in ${a.length} data silos in ${d/1e3} seconds!`)),a}async function Y(u,{dataSiloIds:e=[],includeGuessedCategories:l,includeAttributes:a,parentCategories:c=[],subCategories:t=[],pageSize:p=1e3}={}){let n=await q(u,{dataSiloIds:e,includeGuessedCategories:l,includeAttributes:a,parentCategories:c,subCategories:t,pageSize:p}),m=_chunkNOF6QHE4cjs.fc.call(void 0, n.map(r=>r.dataPointId)),d=await F(u,{dataPointIds:m}),s=_chunkNOF6QHE4cjs.bc.call(void 0, d,"id"),o=_chunkNOF6QHE4cjs.fc.call(void 0, n.map(r=>r.dataSiloId)),y=await Q(u,{dataSiloIds:o}),D=_chunkNOF6QHE4cjs.bc.call(void 0, y,"id");return n.map(r=>({...r,dataPoint:s[r.dataPointId],dataSilo:D[r.dataSiloId]}))}async function nt(u,{dataSiloIds:e=[],status:l,subCategories:a=[],includeEncryptedSnippets:c,pageSize:t=100}={}){let p=[],n=new Date().getTime(),m=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),d={...a.length>0?{subCategoryIds:a}:{},...l?{status:l}:{},...e.length>0?{dataSilos:e}:{}},{unstructuredSubDataPointRecommendations:{totalCount:s}}=await _chunkNOF6QHE4cjs.gc.call(void 0, u,_chunkNOF6QHE4cjs.j,{filterBy:d});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("[Step 1/3] Pulling in all subdatapoints")),m.start(s,0);let o=0,y=!1,D,r=0;do try{let{unstructuredSubDataPointRecommendations:{nodes:g}}=await _chunkNOF6QHE4cjs.gc.call(void 0, u,_graphqlrequest.gql`
|
|
45
|
-
query TranscendCliUnstructuredSubDataPointRecommendationCsvExport(
|
|
46
|
-
$filterBy: UnstructuredSubDataPointRecommendationsFilterInput
|
|
47
|
-
$first: Int!
|
|
48
|
-
$offset: Int!
|
|
49
|
-
) {
|
|
50
|
-
unstructuredSubDataPointRecommendations(
|
|
51
|
-
filterBy: $filterBy
|
|
52
|
-
first: $first
|
|
53
|
-
offset: $offset
|
|
54
|
-
useMaster: false
|
|
55
|
-
) {
|
|
56
|
-
nodes {
|
|
57
|
-
id
|
|
58
|
-
dataSiloId
|
|
59
|
-
scannedObjectPathId
|
|
60
|
-
scannedObjectId
|
|
61
|
-
${c?"name":""}
|
|
62
|
-
${c?"contextSnippet":""}
|
|
63
|
-
dataSubCategory {
|
|
64
|
-
name
|
|
65
|
-
category
|
|
66
|
-
}
|
|
67
|
-
status
|
|
68
|
-
confidence
|
|
69
|
-
classificationMethod
|
|
70
|
-
classifierVersion
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
`,{first:t,offset:r,filterBy:{...d}});D=_optionalChain([g, 'access', _4 => _4[g.length-1], 'optionalAccess', _5 => _5.id]),p.push(...g),y=g.length===t,o+=g.length,r+=g.length,m.update(o)}catch(g){throw _chunkZUNVPK23cjs.a.error(_colors2.default.red(`An error fetching subdatapoints for cursor ${D} and offset ${r}`)),g}while(y);m.stop();let R=new Date().getTime()-n,C=_chunkNOF6QHE4cjs.cc.call(void 0, p,"name");return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully pulled in ${C.length} subdatapoints in ${R/1e3} seconds!`)),C}exports.a = Y; exports.b = nt;
|
|
75
|
-
//# sourceMappingURL=chunk-HAOVN3XO.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/chunk-HAOVN3XO.cjs","../src/lib/data-inventory/pullAllDatapoints.ts","../src/lib/data-inventory/pullUnstructuredSubDataPointRecommendations.ts"],"names":["pullSubDatapoints","client","dataSiloIds","includeGuessedCategories","includeAttributes","parentCategories","subCategories","pageSize","subDataPoints","t0","progressBar","cliProgress","filterBy","SubDataPointDataSubCategoryGuessStatus","totalCount","makeGraphQLRequest","SUB_DATA_POINTS_COUNT","logger","colors","total","shouldContinue","cursor","offset","nodes","gql","err"],"mappings":"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","file":"/home/runner/work/cli/cli/dist/chunk-HAOVN3XO.cjs","sourcesContent":[null,"/* eslint-disable max-lines */\nimport { keyBy, uniq, chunk, sortBy } from 'lodash-es';\nimport {\n type DataCategoryType,\n SubDataPointDataSubCategoryGuessStatus,\n} from '@transcend-io/privacy-types';\nimport cliProgress from 'cli-progress';\nimport { gql } from 'graphql-request';\nimport colors from 'colors';\nimport type { GraphQLClient } from 'graphql-request';\nimport {\n DATAPOINT_EXPORT,\n DATA_SILO_EXPORT,\n type DataSiloAttributeValue,\n SUB_DATA_POINTS_COUNT,\n makeGraphQLRequest,\n} from '../graphql';\nimport { logger } from '../../logger';\nimport type { DataCategoryInput, ProcessingPurposeInput } from '../../codecs';\nimport { mapSeries } from '../bluebird-replace';\n\nexport interface DataSiloCsvPreview {\n /** ID of dataSilo */\n id: string;\n /** Name of dataSilo */\n title: string;\n}\n\nexport interface DataPointCsvPreview {\n /** ID of dataPoint */\n id: string;\n /** The path to this data point */\n path: string[];\n /** Description */\n description: {\n /** Default message */\n defaultMessage: string;\n };\n /** Name */\n name: string;\n}\n\nexport interface SubDataPointCsvPreview {\n /** ID of subDatapoint */\n id: string;\n /** Name (or key) of the subdatapoint */\n name: string;\n /** The description */\n description?: string;\n /** Personal data category */\n categories: DataCategoryInput[];\n /** Data point ID */\n dataPointId: string;\n /** The data silo ID */\n dataSiloId: string;\n /** The processing purpose for this sub datapoint */\n purposes: ProcessingPurposeInput[];\n /** Attribute attached to subdatapoint */\n attributeValues?: DataSiloAttributeValue[];\n /** Data category guesses that are output by the classifier */\n pendingCategoryGuesses?: {\n /** Data category being guessed */\n category: DataCategoryInput;\n /** Status of guess */\n status: SubDataPointDataSubCategoryGuessStatus;\n /** classifier version that produced the guess */\n classifierVersion: number;\n }[];\n}\n\nexport interface DatapointFilterOptions {\n /** IDs of data silos to filter down */\n dataSiloIds?: string[];\n /** Whether to include guessed categories, defaults to only approved categories */\n includeGuessedCategories?: boolean;\n /** Whether or not to include attributes */\n includeAttributes?: boolean;\n /** Parent categories to filter down for */\n parentCategories?: DataCategoryType[];\n /** Sub categories to filter down for */\n subCategories?: string[]; // TODO: https://transcend.height.app/T-40482 - do by name not ID\n}\n\n/**\n * Pull subdatapoint information\n *\n * @param client - Client to use for the request\n * @param options - Options\n * @returns The subdatapoints\n */\nasync function pullSubDatapoints(\n client: GraphQLClient,\n {\n dataSiloIds = [],\n includeGuessedCategories,\n includeAttributes,\n parentCategories = [],\n subCategories = [],\n pageSize = 1000,\n }: DatapointFilterOptions & {\n /** Page size to pull in */\n pageSize?: number;\n } = {},\n): Promise<SubDataPointCsvPreview[]> {\n const subDataPoints: SubDataPointCsvPreview[] = [];\n\n // Time duration\n const t0 = new Date().getTime();\n\n // create a new progress bar instance and use shades_classic theme\n const progressBar = new cliProgress.SingleBar(\n {},\n cliProgress.Presets.shades_classic,\n );\n\n // Filters\n const filterBy = {\n ...(parentCategories.length > 0 ? { category: parentCategories } : {}),\n ...(subCategories.length > 0 ? { subCategoryIds: subCategories } : {}),\n // if parentCategories or subCategories and not includeGuessedCategories\n ...(parentCategories.length + subCategories.length > 0 &&\n !includeGuessedCategories\n ? // then only show data points with approved data categories\n { status: SubDataPointDataSubCategoryGuessStatus.Approved }\n : {}),\n ...(dataSiloIds.length > 0 ? { dataSilos: dataSiloIds } : {}),\n };\n\n // Build a GraphQL client\n const {\n subDataPoints: { totalCount },\n } = await makeGraphQLRequest<{\n /** Query response */\n subDataPoints: {\n /** Count */\n totalCount: number;\n };\n }>(client, SUB_DATA_POINTS_COUNT, {\n filterBy,\n });\n\n logger.info(colors.magenta('[Step 1/3] Pulling in all subdatapoints'));\n\n progressBar.start(totalCount, 0);\n let total = 0;\n let shouldContinue = false;\n let cursor: string | undefined;\n let offset = 0;\n do {\n try {\n const {\n subDataPoints: { nodes },\n } = await makeGraphQLRequest<{\n /** Query response */\n subDataPoints: {\n /** List of matches */\n nodes: SubDataPointCsvPreview[];\n };\n }>(\n client,\n gql`\n query TranscendCliSubDataPointCsvExport(\n $filterBy: SubDataPointFiltersInput\n $first: Int!\n $offset: Int!\n ) {\n subDataPoints(\n filterBy: $filterBy\n first: $first\n offset: $offset\n useMaster: false\n ) {\n nodes {\n id\n name\n description\n dataPointId\n dataSiloId\n purposes {\n name\n purpose\n }\n categories {\n name\n category\n }\n ${\n includeGuessedCategories\n ? `pendingCategoryGuesses {\n category {\n name\n category\n }\n status\n classifierVersion\n }`\n : ''\n }\n ${\n includeAttributes\n ? `attributeValues {\n attributeKey {\n name\n }\n name\n }`\n : ''\n }\n }\n }\n }\n `,\n {\n first: pageSize,\n offset,\n filterBy: {\n ...filterBy,\n // TODO: https://transcend.height.app/T-40484 - add cursor support\n // ...(cursor ? { cursor: { id: cursor } } : {}),\n },\n },\n );\n\n cursor = nodes[nodes.length - 1]?.id as string;\n subDataPoints.push(...nodes);\n shouldContinue = nodes.length === pageSize;\n total += nodes.length;\n offset += nodes.length;\n progressBar.update(total);\n } catch (err) {\n logger.error(\n colors.red(\n `An error fetching subdatapoints for cursor ${cursor} and offset ${offset}`,\n ),\n );\n throw err;\n }\n } while (shouldContinue);\n\n progressBar.stop();\n const t1 = new Date().getTime();\n const totalTime = t1 - t0;\n\n const sorted = sortBy(subDataPoints, 'name');\n\n logger.info(\n colors.green(\n `Successfully pulled in ${sorted.length} subdatapoints in ${\n totalTime / 1000\n } seconds!`,\n ),\n );\n return sorted;\n}\n\n/**\n * Pull datapoint information\n *\n * @param client - Client to use for the request\n * @param options - Options\n * @returns The datapoints\n */\nasync function pullDatapoints(\n client: GraphQLClient,\n {\n dataPointIds = [],\n pageSize = 100,\n }: {\n /** IDs of data points to filter down */\n dataPointIds: string[];\n /** Page size to pull in */\n pageSize?: number;\n },\n): Promise<DataPointCsvPreview[]> {\n const dataPoints: DataPointCsvPreview[] = [];\n\n // Time duration\n const t0 = new Date().getTime();\n\n // create a new progress bar instance and use shades_classic theme\n const progressBar = new cliProgress.SingleBar(\n {},\n cliProgress.Presets.shades_classic,\n );\n\n logger.info(\n colors.magenta(\n `[Step 2/3] Fetching metadata for ${dataPointIds.length} datapoints`,\n ),\n );\n\n // Group by 100\n const dataPointsGrouped = chunk(dataPointIds, pageSize);\n\n progressBar.start(dataPointIds.length, 0);\n let total = 0;\n await mapSeries(dataPointsGrouped, async (dataPointIdsGroup) => {\n try {\n const {\n dataPoints: { nodes },\n } = await makeGraphQLRequest<{\n /** Query response */\n dataPoints: {\n /** List of matches */\n nodes: DataPointCsvPreview[];\n };\n }>(client, DATAPOINT_EXPORT, {\n first: pageSize,\n filterBy: {\n ids: dataPointIdsGroup,\n },\n });\n\n dataPoints.push(...nodes);\n total += dataPointIdsGroup.length;\n progressBar.update(total);\n } catch (err) {\n logger.error(\n colors.red(\n `An error fetching subdatapoints for IDs ${dataPointIdsGroup.join(\n ', ',\n )}`,\n ),\n );\n throw err;\n }\n });\n\n progressBar.stop();\n const t1 = new Date().getTime();\n const totalTime = t1 - t0;\n\n logger.info(\n colors.green(\n `Successfully pulled in ${dataPoints.length} dataPoints in ${\n totalTime / 1000\n } seconds!`,\n ),\n );\n return dataPoints;\n}\n\n/**\n * Pull data silo information\n *\n * @param client - Client to use for the request\n * @param options - Options\n * @returns The data silos\n */\nasync function pullDataSilos(\n client: GraphQLClient,\n {\n dataSiloIds = [],\n pageSize = 100,\n }: {\n /** IDs of data silos to filter down */\n dataSiloIds: string[];\n /** Page size to pull in */\n pageSize?: number;\n },\n): Promise<DataSiloCsvPreview[]> {\n const dataSilos: DataSiloCsvPreview[] = [];\n\n // Time duration\n const t0 = new Date().getTime();\n\n // create a new progress bar instance and use shades_classic theme\n const progressBar = new cliProgress.SingleBar(\n {},\n cliProgress.Presets.shades_classic,\n );\n\n logger.info(\n colors.magenta(\n `[Step 3/3] Fetching metadata for ${dataSiloIds.length} data silos`,\n ),\n );\n\n // Group by 100\n const dataSilosGrouped = chunk(dataSiloIds, pageSize);\n\n progressBar.start(dataSiloIds.length, 0);\n let total = 0;\n await mapSeries(dataSilosGrouped, async (dataSiloIdsGroup) => {\n try {\n const {\n dataSilos: { nodes },\n } = await makeGraphQLRequest<{\n /** Query response */\n dataSilos: {\n /** List of matches */\n nodes: DataSiloCsvPreview[];\n };\n }>(client, DATA_SILO_EXPORT, {\n first: pageSize,\n filterBy: {\n ids: dataSiloIdsGroup,\n },\n });\n\n dataSilos.push(...nodes);\n total += dataSiloIdsGroup.length;\n progressBar.update(total);\n } catch (err) {\n logger.error(\n colors.red(\n `An error fetching data silos for IDs ${dataSiloIdsGroup.join(', ')}`,\n ),\n );\n throw err;\n }\n });\n\n progressBar.stop();\n const t1 = new Date().getTime();\n const totalTime = t1 - t0;\n\n logger.info(\n colors.green(\n `Successfully pulled in ${dataSilos.length} data silos in ${\n totalTime / 1000\n } seconds!`,\n ),\n );\n return dataSilos;\n}\n\n/**\n * Pull all datapoints from the data inventory.\n *\n * @param client - Client to use for the request\n * @param options - Options\n * @returns The datapoints and data silos\n */\nexport async function pullAllDatapoints(\n client: GraphQLClient,\n {\n dataSiloIds = [],\n includeGuessedCategories,\n includeAttributes,\n parentCategories = [],\n subCategories = [],\n pageSize = 1000,\n }: DatapointFilterOptions & {\n /** Page size to pull in */\n pageSize?: number;\n } = {},\n): Promise<\n (SubDataPointCsvPreview & {\n /** Data point information */\n dataPoint: DataPointCsvPreview;\n /** Data silo information */\n dataSilo: DataSiloCsvPreview;\n })[]\n> {\n // Subdatapoint information\n const subDatapoints = await pullSubDatapoints(client, {\n dataSiloIds,\n includeGuessedCategories,\n includeAttributes,\n parentCategories,\n subCategories,\n pageSize,\n });\n\n // The datapoint ids to grab\n const dataPointIds = uniq(subDatapoints.map((point) => point.dataPointId));\n const dataPoints = await pullDatapoints(client, {\n dataPointIds,\n });\n const dataPointById = keyBy(dataPoints, 'id');\n\n // The data silo IDs to grab\n const allDataSiloIds = uniq(subDatapoints.map((point) => point.dataSiloId));\n const dataSilos = await pullDataSilos(client, {\n dataSiloIds: allDataSiloIds,\n });\n const dataSiloById = keyBy(dataSilos, 'id');\n\n return subDatapoints.map((subDataPoint) => ({\n ...subDataPoint,\n dataPoint: dataPointById[subDataPoint.dataPointId],\n dataSilo: dataSiloById[subDataPoint.dataSiloId],\n }));\n}\n/* eslint-enable max-lines */\n","import type { UnstructuredSubDataPointRecommendationStatus } from '@transcend-io/privacy-types';\nimport cliProgress from 'cli-progress';\nimport colors from 'colors';\nimport { gql, type GraphQLClient } from 'graphql-request';\nimport { sortBy } from 'lodash-es';\nimport type { DataCategoryInput } from '../../codecs';\nimport { ENTRY_COUNT, makeGraphQLRequest } from '../graphql';\nimport { logger } from '../../logger';\n\ninterface UnstructuredSubDataPointRecommendationCsvPreview {\n /** ID of subDatapoint */\n id: string;\n /** Entry or Named Entity recognized by the classifier */\n name: string;\n /** Context snippet including entry */\n contextSnippet: string;\n /** Scanned object ID */\n scannedObjectId: string;\n /** Scanned object path ID */\n scannedObjectPathId: string;\n /** The data silo ID */\n dataSiloId: string;\n /** Personal data category */\n dataSubCategory: DataCategoryInput;\n /** Classification Status */\n status: UnstructuredSubDataPointRecommendationStatus;\n /** Confidence */\n confidence: number;\n /** Classification method */\n classificationMethod: string;\n /** Classifier version */\n classifierVersion: string;\n}\n\ninterface EntryFilterOptions {\n /** IDs of data silos to filter down */\n dataSiloIds?: string[];\n /** Parent categories to filter down for */\n status?: UnstructuredSubDataPointRecommendationStatus[];\n /** Sub categories to filter down for */\n subCategories?: string[]; // TODO: https://transcend.height.app/T-40482 - do by name not ID\n /** Include entry and snippet */\n includeEncryptedSnippets?: boolean;\n /** Include encryptedSamplesS3Key */\n includeEncryptedSamplesS3Key?: boolean;\n}\n/**\n * Pull unstructured subdatapoint information\n *\n * @param client - Client to use for the request\n * @param options - Options\n * @param options.dataSiloIds - IDs of data silos to filter down\n * @param options.status - Parent categories to filter down for\n * @param options.subCategories - Sub categories to filter down for\n * @param options.includeEncryptedSnippets - Include entry and snippet\n * @param options.includeEncryptedSamplesS3Key - Include encryptedSamplesS3Key\n * @param options.pageSize - Page size to pull in\n * @returns A promise that resolves to an array of unstructured subdatapoint recommendations\n */\nexport async function pullUnstructuredSubDataPointRecommendations(\n client: GraphQLClient,\n {\n dataSiloIds = [],\n status,\n subCategories = [],\n includeEncryptedSnippets,\n pageSize = 100,\n }: EntryFilterOptions & {\n /** Page size to pull in */\n pageSize?: number;\n } = {},\n): Promise<UnstructuredSubDataPointRecommendationCsvPreview[]> {\n const unstructuredSubDataPointRecommendations: UnstructuredSubDataPointRecommendationCsvPreview[] =\n [];\n\n // Time duration\n const t0 = new Date().getTime();\n\n // create a new progress bar instance and use shades_classic theme\n const progressBar = new cliProgress.SingleBar(\n {},\n cliProgress.Presets.shades_classic,\n );\n\n // Filters\n const filterBy = {\n ...(subCategories.length > 0 ? { subCategoryIds: subCategories } : {}),\n ...(status ? { status } : {}),\n ...(dataSiloIds.length > 0 ? { dataSilos: dataSiloIds } : {}),\n };\n\n // Build a GraphQL client\n const {\n unstructuredSubDataPointRecommendations: { totalCount },\n } = await makeGraphQLRequest<{\n /** Query response */\n unstructuredSubDataPointRecommendations: {\n /** Count */\n totalCount: number;\n };\n }>(client, ENTRY_COUNT, {\n filterBy,\n });\n\n logger.info(colors.magenta('[Step 1/3] Pulling in all subdatapoints'));\n\n progressBar.start(totalCount, 0);\n let total = 0;\n let shouldContinue = false;\n let cursor: string | undefined;\n let offset = 0;\n do {\n try {\n const {\n unstructuredSubDataPointRecommendations: { nodes },\n } = await makeGraphQLRequest<{\n /** Query response */\n unstructuredSubDataPointRecommendations: {\n /** List of matches */\n nodes: UnstructuredSubDataPointRecommendationCsvPreview[];\n };\n }>(\n client,\n gql`\n query TranscendCliUnstructuredSubDataPointRecommendationCsvExport(\n $filterBy: UnstructuredSubDataPointRecommendationsFilterInput\n $first: Int!\n $offset: Int!\n ) {\n unstructuredSubDataPointRecommendations(\n filterBy: $filterBy\n first: $first\n offset: $offset\n useMaster: false\n ) {\n nodes {\n id\n dataSiloId\n scannedObjectPathId\n scannedObjectId\n ${includeEncryptedSnippets ? 'name' : ''}\n ${includeEncryptedSnippets ? 'contextSnippet' : ''}\n dataSubCategory {\n name\n category\n }\n status\n confidence\n classificationMethod\n classifierVersion\n }\n }\n }\n `,\n {\n first: pageSize,\n offset,\n filterBy: {\n ...filterBy,\n },\n },\n );\n\n cursor = nodes[nodes.length - 1]?.id as string;\n unstructuredSubDataPointRecommendations.push(...nodes);\n shouldContinue = nodes.length === pageSize;\n total += nodes.length;\n offset += nodes.length;\n progressBar.update(total);\n } catch (err) {\n logger.error(\n colors.red(\n `An error fetching subdatapoints for cursor ${cursor} and offset ${offset}`,\n ),\n );\n throw err;\n }\n } while (shouldContinue);\n\n progressBar.stop();\n const t1 = new Date().getTime();\n const totalTime = t1 - t0;\n\n const sorted = sortBy(unstructuredSubDataPointRecommendations, 'name');\n\n logger.info(\n colors.green(\n `Successfully pulled in ${sorted.length} subdatapoints in ${\n totalTime / 1000\n } seconds!`,\n ),\n );\n return sorted;\n}\n"]}
|
package/dist/chunk-KWG56BUX.cjs
DELETED
|
@@ -1,2 +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 _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 _chunkSHV6R64Jcjs = require('./chunk-SHV6R64J.cjs');var _chunkNOF6QHE4cjs = require('./chunk-NOF6QHE4.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkEG4L6YAJcjs = require('./chunk-EG4L6YAJ.cjs');var _iots = require('io-ts'); var e = _interopRequireWildcard(_iots); var S = _interopRequireWildcard(_iots);var _typeutils = require('@transcend-io/type-utils');var Z=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 B(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(Z)}),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 j=S.type({nonce:S.string,identifier:S.string});async function W(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 _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _cliprogress = require('cli-progress'); var _cliprogress2 = _interopRequireDefault(_cliprogress);async function ue({file:r,dataSiloId:s,auth:c,sombraAuth:n,concurrency:a=100,transcendUrl:i=_chunkEG4L6YAJcjs.e,sleepSeconds:f=10}){let y=await _chunkNOF6QHE4cjs.ye.call(void 0, i,c,n);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Reading "${r}" from disk`));let o=_chunkSHV6R64Jcjs.q.call(void 0, r,j);_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=_chunkNOF6QHE4cjs._b.call(void 0, o,a),I=m.length;await _chunkNOF6QHE4cjs.a.call(void 0, m,async($,P)=>{_chunkZUNVPK23cjs.a.info(_colors2.default.blue(`Processing chunk ${P+1}/${I} (${_chunkNOF6QHE4cjs._b.length} items)`)),await _chunkNOF6QHE4cjs.b.call(void 0, $,async h=>{try{await W(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 x=new Date().getTime()-C;if(_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully notified Transcend for ${d} identifiers in "${x/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 Te({requestIds:r,dataSiloId:s,auth:c,concurrency:n=100,status:a=_privacytypes.RequestDataSiloStatus.Resolved,transcendUrl:i=_chunkEG4L6YAJcjs.e}){let f=_chunkNOF6QHE4cjs.xe.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 _chunkNOF6QHE4cjs.b.call(void 0, r,async u=>{let l=await _chunkNOF6QHE4cjs.Le.call(void 0, f,{requestId:u,dataSiloId:s});try{await _chunkNOF6QHE4cjs.gc.call(void 0, f,_chunkNOF6QHE4cjs.wa,{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 ke({dataSiloId:r,auth:s,sombraAuth:c,actions:n,apiPageSize:a=100,savePageSize:i=1e3,onSave:f,transcendUrl:y=_chunkEG4L6YAJcjs.e,skipRequestCount:o=!1}){if(i%a!==0)throw new Error(`savePageSize must be a multiple of apiPageSize. savePageSize: ${i}, apiPageSize: ${a}`);let C=await _chunkNOF6QHE4cjs.ye.call(void 0, y,s,c),w=_chunkNOF6QHE4cjs.xe.call(void 0, y,s),d=0;o||(d=await _chunkNOF6QHE4cjs.De.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 _chunkNOF6QHE4cjs.a.call(void 0, n,async $=>{let P=0,h=!0;for(;h;){let b=await B(C,{dataSiloId:r,limit:a,offset:P,requestType:$}),_=b.map(A=>(m.add(A.requestId),{...A,action:$})),M=_.map(({attributes:A,...V})=>({...V,...A.reduce((X,G)=>Object.assign(X,{[G.key]:G.values.join(",")}),{})}));I.push(..._),g.push(...M),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 x=new Date().getTime()-u;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully pulled ${I.length} outstanding identifiers from ${m.size} requests in "${x/1e3}" seconds!`)),{identifiers:I}}exports.a = Z; exports.b = B; exports.c = j; exports.d = W; exports.e = ue; exports.f = Te; exports.g = ke;
|
|
2
|
-
//# sourceMappingURL=chunk-KWG56BUX.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/chunk-KWG56BUX.cjs","../src/lib/cron/pullCronPageOfIdentifiers.ts"],"names":["CronIdentifier","pullCronPageOfIdentifiers","sombra","dataSiloId","limit","offset","requestType","response"],"mappings":"AAAA,u/BAAwC,wDAAwG,wDAAyC,wDAAyC,6GCA/M,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-KWG56BUX.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"]}
|