@transcend-io/cli 6.6.0 → 6.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +138 -20
- package/build/cli-pull-datapoints.d.ts +3 -0
- package/build/cli-pull-datapoints.d.ts.map +1 -0
- package/build/cli-pull-datapoints.js +93 -0
- package/build/cli-pull-datapoints.js.map +1 -0
- package/build/cli-request-export.js.map +1 -1
- package/build/cli-request-reject-unverified-identifiers.d.ts +3 -0
- package/build/cli-request-reject-unverified-identifiers.d.ts.map +1 -0
- package/build/cli-request-reject-unverified-identifiers.js +57 -0
- package/build/cli-request-reject-unverified-identifiers.js.map +1 -0
- package/build/codecs.d.ts +2 -0
- package/build/codecs.d.ts.map +1 -1
- package/build/constants.d.ts +1 -0
- package/build/constants.d.ts.map +1 -1
- package/build/constants.js +2 -1
- package/build/constants.js.map +1 -1
- package/build/data-inventory/index.d.ts +2 -0
- package/build/data-inventory/index.d.ts.map +1 -0
- package/build/data-inventory/index.js +18 -0
- package/build/data-inventory/index.js.map +1 -0
- package/build/data-inventory/pullAllDatapoints.d.ts +78 -0
- package/build/data-inventory/pullAllDatapoints.d.ts.map +1 -0
- package/build/data-inventory/pullAllDatapoints.js +242 -0
- package/build/data-inventory/pullAllDatapoints.js.map +1 -0
- package/build/graphql/fetchAllRequestEnrichers.d.ts +1 -1
- package/build/graphql/fetchAllRequestEnrichers.d.ts.map +1 -1
- package/build/graphql/fetchAllRequestIdentifierMetadata.d.ts +21 -0
- package/build/graphql/fetchAllRequestIdentifierMetadata.d.ts.map +1 -0
- package/build/graphql/fetchAllRequestIdentifierMetadata.js +34 -0
- package/build/graphql/fetchAllRequestIdentifierMetadata.js.map +1 -0
- package/build/graphql/gqls/RequestIdentifier.d.ts +3 -0
- package/build/graphql/gqls/RequestIdentifier.d.ts.map +1 -0
- package/build/graphql/gqls/RequestIdentifier.js +41 -0
- package/build/graphql/gqls/RequestIdentifier.js.map +1 -0
- package/build/graphql/gqls/dataPoint.d.ts +3 -0
- package/build/graphql/gqls/dataPoint.d.ts.map +1 -1
- package/build/graphql/gqls/dataPoint.js +51 -12
- package/build/graphql/gqls/dataPoint.js.map +1 -1
- package/build/graphql/gqls/dataSilo.d.ts +1 -0
- package/build/graphql/gqls/dataSilo.d.ts.map +1 -1
- package/build/graphql/gqls/dataSilo.js +16 -1
- package/build/graphql/gqls/dataSilo.js.map +1 -1
- package/build/graphql/gqls/index.d.ts +1 -0
- package/build/graphql/gqls/index.d.ts.map +1 -1
- package/build/graphql/gqls/index.js +1 -0
- package/build/graphql/gqls/index.js.map +1 -1
- package/build/graphql/index.d.ts +1 -0
- package/build/graphql/index.d.ts.map +1 -1
- package/build/graphql/index.js +1 -0
- package/build/graphql/index.js.map +1 -1
- package/build/graphql/syncDataSilos.d.ts +1 -1
- package/build/graphql/syncDataSilos.d.ts.map +1 -1
- package/build/graphql/syncDataSilos.js +8 -3
- package/build/graphql/syncDataSilos.js.map +1 -1
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -0
- package/build/index.js.map +1 -1
- package/build/manual-enrichment/pullManualEnrichmentIdentifiersToCsv.d.ts.map +1 -1
- package/build/manual-enrichment/pullManualEnrichmentIdentifiersToCsv.js.map +1 -1
- package/build/requests/bulkRestartRequests.js.map +1 -1
- package/build/requests/index.d.ts +1 -0
- package/build/requests/index.d.ts.map +1 -1
- package/build/requests/index.js +1 -0
- package/build/requests/index.js.map +1 -1
- package/build/requests/pullPrivacyRequests.d.ts.map +1 -1
- package/build/requests/pullPrivacyRequests.js.map +1 -1
- package/build/requests/removeUnverifiedRequestIdentifiers.d.ts +20 -0
- package/build/requests/removeUnverifiedRequestIdentifiers.d.ts.map +1 -0
- package/build/requests/removeUnverifiedRequestIdentifiers.js +61 -0
- package/build/requests/removeUnverifiedRequestIdentifiers.js.map +1 -0
- package/build/tsbuildinfo +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { DataCategoryType, SubDataPointDataSubCategoryGuessStatus } from '@transcend-io/privacy-types';
|
|
2
|
+
import type { GraphQLClient } from 'graphql-request';
|
|
3
|
+
import { DataSiloAttributeValue } from '../graphql';
|
|
4
|
+
import { DataCategoryInput, ProcessingPurposeInput } from '../codecs';
|
|
5
|
+
export interface DataSiloCsvPreview {
|
|
6
|
+
/** ID of dataSilo */
|
|
7
|
+
id: string;
|
|
8
|
+
/** Name of dataSilo */
|
|
9
|
+
title: string;
|
|
10
|
+
}
|
|
11
|
+
export interface DataPointCsvPreview {
|
|
12
|
+
/** ID of dataPoint */
|
|
13
|
+
id: string;
|
|
14
|
+
/** The path to this data point */
|
|
15
|
+
path: string[];
|
|
16
|
+
/** Description */
|
|
17
|
+
description: {
|
|
18
|
+
/** Default message */
|
|
19
|
+
defaultMessage: string;
|
|
20
|
+
};
|
|
21
|
+
/** Name */
|
|
22
|
+
name: string;
|
|
23
|
+
}
|
|
24
|
+
export interface SubDataPointCsvPreview {
|
|
25
|
+
/** ID of subDatapoint */
|
|
26
|
+
id: string;
|
|
27
|
+
/** Name (or key) of the subdatapoint */
|
|
28
|
+
name: string;
|
|
29
|
+
/** The description */
|
|
30
|
+
description?: string;
|
|
31
|
+
/** Personal data category */
|
|
32
|
+
categories: DataCategoryInput[];
|
|
33
|
+
/** Data point ID */
|
|
34
|
+
dataPointId: string;
|
|
35
|
+
/** The data silo ID */
|
|
36
|
+
dataSiloId: string;
|
|
37
|
+
/** The processing purpose for this sub datapoint */
|
|
38
|
+
purposes: ProcessingPurposeInput[];
|
|
39
|
+
/** Attribute attached to subdatapoint */
|
|
40
|
+
attributeValues?: DataSiloAttributeValue[];
|
|
41
|
+
/** Data category guesses that are output by the classifier */
|
|
42
|
+
pendingCategoryGuesses?: {
|
|
43
|
+
/** Data category being guessed */
|
|
44
|
+
category: DataCategoryInput;
|
|
45
|
+
/** Status of guess */
|
|
46
|
+
status: SubDataPointDataSubCategoryGuessStatus;
|
|
47
|
+
/** classifier version that produced the guess */
|
|
48
|
+
classifierVersion: number;
|
|
49
|
+
}[];
|
|
50
|
+
}
|
|
51
|
+
export interface DatapointFilterOptions {
|
|
52
|
+
/** IDs of data silos to filter down */
|
|
53
|
+
dataSiloIds?: string[];
|
|
54
|
+
/** Whether to include guessed categories, defaults to only approved categories */
|
|
55
|
+
includeGuessedCategories?: boolean;
|
|
56
|
+
/** Whether or not to include attributes */
|
|
57
|
+
includeAttributes?: boolean;
|
|
58
|
+
/** Parent categories to filter down for */
|
|
59
|
+
parentCategories?: DataCategoryType[];
|
|
60
|
+
/** Sub categories to filter down for */
|
|
61
|
+
subCategories?: string[];
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Pull all datapoints from the data inventory.
|
|
65
|
+
*
|
|
66
|
+
* @param client - Client to use for the request
|
|
67
|
+
* @param options - Options
|
|
68
|
+
*/
|
|
69
|
+
export declare function pullAllDatapoints(client: GraphQLClient, { dataSiloIds, includeGuessedCategories, includeAttributes, parentCategories, subCategories, pageSize, }?: DatapointFilterOptions & {
|
|
70
|
+
/** Page size to pull in */
|
|
71
|
+
pageSize?: number;
|
|
72
|
+
}): Promise<(SubDataPointCsvPreview & {
|
|
73
|
+
/** Data point information */
|
|
74
|
+
dataPoint: DataPointCsvPreview;
|
|
75
|
+
/** Data silo information */
|
|
76
|
+
dataSilo: DataSiloCsvPreview;
|
|
77
|
+
})[]>;
|
|
78
|
+
//# sourceMappingURL=pullAllDatapoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pullAllDatapoints.d.ts","sourceRoot":"","sources":["../../src/data-inventory/pullAllDatapoints.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,gBAAgB,EAChB,sCAAsC,EACvC,MAAM,6BAA6B,CAAC;AAOrC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAGL,sBAAsB,EAGvB,MAAM,YAAY,CAAC;AAEpB,OAAO,EA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O,CAAC;IAC5B,2CAA2C;IAC3C,gBAAgB,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACtC,wCAAwC;IACxC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAkVD;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,aAAa,EACrB,EACE,WAAgB,EAChB,wBAAwB,EACxB,iBAAiB,EACjB,gBAAqB,EACrB,aAAkB,EAClB,QAAe,GAChB,GAAE,sBAAsB,GAAG;IAC1B,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACd,GACL,OAAO,CACR,CAAC,sBAAsB,GAAG;IACxB,6BAA6B;IAC7B,SAAS,EAAE,mBAAmB,CAAC;IAC/B,4BAA4B;IAC5B,QAAQ,EAAE,kBAAkB,CAAC;CAC9B,CAAC,EAAE,CACL,CA8BA"}
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.pullAllDatapoints = void 0;
|
|
7
|
+
/* eslint-disable max-lines */
|
|
8
|
+
const keyBy_1 = __importDefault(require("lodash/keyBy"));
|
|
9
|
+
const uniq_1 = __importDefault(require("lodash/uniq"));
|
|
10
|
+
const chunk_1 = __importDefault(require("lodash/chunk"));
|
|
11
|
+
const cli_progress_1 = __importDefault(require("cli-progress"));
|
|
12
|
+
const graphql_request_1 = require("graphql-request");
|
|
13
|
+
const colors_1 = __importDefault(require("colors"));
|
|
14
|
+
const sortBy_1 = __importDefault(require("lodash/sortBy"));
|
|
15
|
+
const graphql_1 = require("../graphql");
|
|
16
|
+
const logger_1 = require("../logger");
|
|
17
|
+
const bluebird_1 = require("bluebird");
|
|
18
|
+
/**
|
|
19
|
+
* Pull subdatapoint information
|
|
20
|
+
*
|
|
21
|
+
* @param client - Client to use for the request
|
|
22
|
+
* @param options - Options
|
|
23
|
+
*/
|
|
24
|
+
async function pullSubDatapoints(client, { dataSiloIds = [], includeGuessedCategories, includeAttributes, parentCategories = [], subCategories = [], pageSize = 1000, } = {}) {
|
|
25
|
+
var _a;
|
|
26
|
+
const subDataPoints = [];
|
|
27
|
+
// Time duration
|
|
28
|
+
const t0 = new Date().getTime();
|
|
29
|
+
// create a new progress bar instance and use shades_classic theme
|
|
30
|
+
const progressBar = new cli_progress_1.default.SingleBar({}, cli_progress_1.default.Presets.shades_classic);
|
|
31
|
+
// Filters
|
|
32
|
+
const filterBy = {
|
|
33
|
+
...(parentCategories.length > 0 ? { category: parentCategories } : {}),
|
|
34
|
+
...(subCategories.length > 0 ? { subCategoryIds: subCategories } : {}),
|
|
35
|
+
...(dataSiloIds.length > 0 ? { dataSilos: dataSiloIds } : {}),
|
|
36
|
+
};
|
|
37
|
+
// Build a GraphQL client
|
|
38
|
+
const { subDataPoints: { totalCount }, } = await (0, graphql_1.makeGraphQLRequest)(client, graphql_1.SUB_DATA_POINTS_COUNT, {
|
|
39
|
+
filterBy,
|
|
40
|
+
});
|
|
41
|
+
logger_1.logger.info(colors_1.default.magenta('[Step 1/3] Pulling in all subdatapoints'));
|
|
42
|
+
progressBar.start(totalCount, 0);
|
|
43
|
+
let total = 0;
|
|
44
|
+
let shouldContinue = false;
|
|
45
|
+
let cursor;
|
|
46
|
+
let offset = 0;
|
|
47
|
+
do {
|
|
48
|
+
try {
|
|
49
|
+
const { subDataPoints: { nodes },
|
|
50
|
+
// eslint-disable-next-line no-await-in-loop
|
|
51
|
+
} = await (0, graphql_1.makeGraphQLRequest)(client, (0, graphql_request_1.gql) `
|
|
52
|
+
query TranscendCliSubDataPointCsvExport(
|
|
53
|
+
$filterBy: SubDataPointFiltersInput
|
|
54
|
+
$first: Int!
|
|
55
|
+
$offset: Int!
|
|
56
|
+
) {
|
|
57
|
+
subDataPoints(
|
|
58
|
+
filterBy: $filterBy
|
|
59
|
+
first: $first
|
|
60
|
+
offset: $offset
|
|
61
|
+
useMaster: false
|
|
62
|
+
) {
|
|
63
|
+
nodes {
|
|
64
|
+
id
|
|
65
|
+
name
|
|
66
|
+
description
|
|
67
|
+
dataPointId
|
|
68
|
+
dataSiloId
|
|
69
|
+
purposes {
|
|
70
|
+
name
|
|
71
|
+
purpose
|
|
72
|
+
}
|
|
73
|
+
categories {
|
|
74
|
+
name
|
|
75
|
+
category
|
|
76
|
+
}
|
|
77
|
+
${includeGuessedCategories
|
|
78
|
+
? `pendingCategoryGuesses {
|
|
79
|
+
category {
|
|
80
|
+
name
|
|
81
|
+
category
|
|
82
|
+
}
|
|
83
|
+
status
|
|
84
|
+
classifierVersion
|
|
85
|
+
}`
|
|
86
|
+
: ''}
|
|
87
|
+
${includeAttributes
|
|
88
|
+
? `attributeValues {
|
|
89
|
+
attributeKey {
|
|
90
|
+
name
|
|
91
|
+
}
|
|
92
|
+
name
|
|
93
|
+
}`
|
|
94
|
+
: ''}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
`, {
|
|
99
|
+
first: pageSize,
|
|
100
|
+
offset,
|
|
101
|
+
filterBy: {
|
|
102
|
+
...filterBy,
|
|
103
|
+
// TODO: https://transcend.height.app/T-40484 - add cursor support
|
|
104
|
+
// ...(cursor ? { cursor: { id: cursor } } : {}),
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
cursor = (_a = nodes[nodes.length - 1]) === null || _a === void 0 ? void 0 : _a.id;
|
|
108
|
+
subDataPoints.push(...nodes);
|
|
109
|
+
shouldContinue = nodes.length === pageSize;
|
|
110
|
+
total += nodes.length;
|
|
111
|
+
offset += nodes.length;
|
|
112
|
+
progressBar.update(total);
|
|
113
|
+
}
|
|
114
|
+
catch (err) {
|
|
115
|
+
logger_1.logger.error(colors_1.default.red(`An error fetching subdatapoints for cursor ${cursor} and offset ${offset}`));
|
|
116
|
+
throw err;
|
|
117
|
+
}
|
|
118
|
+
} while (shouldContinue);
|
|
119
|
+
progressBar.stop();
|
|
120
|
+
const t1 = new Date().getTime();
|
|
121
|
+
const totalTime = t1 - t0;
|
|
122
|
+
const sorted = (0, sortBy_1.default)(subDataPoints, 'name');
|
|
123
|
+
logger_1.logger.info(colors_1.default.green(`Successfully pulled in ${sorted.length} subdatapoints in ${totalTime / 1000} seconds!`));
|
|
124
|
+
return sorted;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Pull datapoint information
|
|
128
|
+
*
|
|
129
|
+
* @param client - Client to use for the request
|
|
130
|
+
* @param options - Options
|
|
131
|
+
*/
|
|
132
|
+
async function pullDatapoints(client, { dataPointIds = [], pageSize = 100, }) {
|
|
133
|
+
const dataPoints = [];
|
|
134
|
+
// Time duration
|
|
135
|
+
const t0 = new Date().getTime();
|
|
136
|
+
// create a new progress bar instance and use shades_classic theme
|
|
137
|
+
const progressBar = new cli_progress_1.default.SingleBar({}, cli_progress_1.default.Presets.shades_classic);
|
|
138
|
+
logger_1.logger.info(colors_1.default.magenta(`[Step 2/3] Fetching metadata for ${dataPointIds.length} datapoints`));
|
|
139
|
+
// Group by 100
|
|
140
|
+
const dataPointsGrouped = (0, chunk_1.default)(dataPointIds, pageSize);
|
|
141
|
+
progressBar.start(dataPointIds.length, 0);
|
|
142
|
+
let total = 0;
|
|
143
|
+
await (0, bluebird_1.mapSeries)(dataPointsGrouped, async (dataPointIdsGroup) => {
|
|
144
|
+
try {
|
|
145
|
+
const { dataPoints: { nodes }, } = await (0, graphql_1.makeGraphQLRequest)(client, graphql_1.DATAPOINT_EXPORT, {
|
|
146
|
+
first: pageSize,
|
|
147
|
+
filterBy: {
|
|
148
|
+
ids: dataPointIdsGroup,
|
|
149
|
+
},
|
|
150
|
+
});
|
|
151
|
+
dataPoints.push(...nodes);
|
|
152
|
+
total += dataPointIdsGroup.length;
|
|
153
|
+
progressBar.update(total);
|
|
154
|
+
}
|
|
155
|
+
catch (err) {
|
|
156
|
+
logger_1.logger.error(colors_1.default.red(`An error fetching subdatapoints for IDs ${dataPointIdsGroup.join(', ')}`));
|
|
157
|
+
throw err;
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
progressBar.stop();
|
|
161
|
+
const t1 = new Date().getTime();
|
|
162
|
+
const totalTime = t1 - t0;
|
|
163
|
+
logger_1.logger.info(colors_1.default.green(`Successfully pulled in ${dataPoints.length} dataPoints in ${totalTime / 1000} seconds!`));
|
|
164
|
+
return dataPoints;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Pull data silo information
|
|
168
|
+
*
|
|
169
|
+
* @param client - Client to use for the request
|
|
170
|
+
* @param options - Options
|
|
171
|
+
*/
|
|
172
|
+
async function pullDataSilos(client, { dataSiloIds = [], pageSize = 100, }) {
|
|
173
|
+
const dataSilos = [];
|
|
174
|
+
// Time duration
|
|
175
|
+
const t0 = new Date().getTime();
|
|
176
|
+
// create a new progress bar instance and use shades_classic theme
|
|
177
|
+
const progressBar = new cli_progress_1.default.SingleBar({}, cli_progress_1.default.Presets.shades_classic);
|
|
178
|
+
logger_1.logger.info(colors_1.default.magenta(`[Step 3/3] Fetching metadata for ${dataSiloIds.length} data silos`));
|
|
179
|
+
// Group by 100
|
|
180
|
+
const dataSilosGrouped = (0, chunk_1.default)(dataSiloIds, pageSize);
|
|
181
|
+
progressBar.start(dataSiloIds.length, 0);
|
|
182
|
+
let total = 0;
|
|
183
|
+
await (0, bluebird_1.mapSeries)(dataSilosGrouped, async (dataSiloIdsGroup) => {
|
|
184
|
+
try {
|
|
185
|
+
const { dataSilos: { nodes }, } = await (0, graphql_1.makeGraphQLRequest)(client, graphql_1.DATA_SILO_EXPORT, {
|
|
186
|
+
first: pageSize,
|
|
187
|
+
filterBy: {
|
|
188
|
+
ids: dataSiloIdsGroup,
|
|
189
|
+
},
|
|
190
|
+
});
|
|
191
|
+
dataSilos.push(...nodes);
|
|
192
|
+
total += dataSiloIdsGroup.length;
|
|
193
|
+
progressBar.update(total);
|
|
194
|
+
}
|
|
195
|
+
catch (err) {
|
|
196
|
+
logger_1.logger.error(colors_1.default.red(`An error fetching data silos for IDs ${dataSiloIdsGroup.join(', ')}`));
|
|
197
|
+
throw err;
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
progressBar.stop();
|
|
201
|
+
const t1 = new Date().getTime();
|
|
202
|
+
const totalTime = t1 - t0;
|
|
203
|
+
logger_1.logger.info(colors_1.default.green(`Successfully pulled in ${dataSilos.length} data silos in ${totalTime / 1000} seconds!`));
|
|
204
|
+
return dataSilos;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Pull all datapoints from the data inventory.
|
|
208
|
+
*
|
|
209
|
+
* @param client - Client to use for the request
|
|
210
|
+
* @param options - Options
|
|
211
|
+
*/
|
|
212
|
+
async function pullAllDatapoints(client, { dataSiloIds = [], includeGuessedCategories, includeAttributes, parentCategories = [], subCategories = [], pageSize = 1000, } = {}) {
|
|
213
|
+
// Subdatapoint information
|
|
214
|
+
const subDatapoints = await pullSubDatapoints(client, {
|
|
215
|
+
dataSiloIds,
|
|
216
|
+
includeGuessedCategories,
|
|
217
|
+
includeAttributes,
|
|
218
|
+
parentCategories,
|
|
219
|
+
subCategories,
|
|
220
|
+
pageSize,
|
|
221
|
+
});
|
|
222
|
+
// The datapoint ids to grab
|
|
223
|
+
const dataPointIds = (0, uniq_1.default)(subDatapoints.map((point) => point.dataPointId));
|
|
224
|
+
const dataPoints = await pullDatapoints(client, {
|
|
225
|
+
dataPointIds,
|
|
226
|
+
});
|
|
227
|
+
const dataPointById = (0, keyBy_1.default)(dataPoints, 'id');
|
|
228
|
+
// The data silo IDs to grab
|
|
229
|
+
const allDataSiloIds = (0, uniq_1.default)(subDatapoints.map((point) => point.dataSiloId));
|
|
230
|
+
const dataSilos = await pullDataSilos(client, {
|
|
231
|
+
dataSiloIds: allDataSiloIds,
|
|
232
|
+
});
|
|
233
|
+
const dataSiloById = (0, keyBy_1.default)(dataSilos, 'id');
|
|
234
|
+
return subDatapoints.map((subDataPoint) => ({
|
|
235
|
+
...subDataPoint,
|
|
236
|
+
dataPoint: dataPointById[subDataPoint.dataPointId],
|
|
237
|
+
dataSilo: dataSiloById[subDataPoint.dataSiloId],
|
|
238
|
+
}));
|
|
239
|
+
}
|
|
240
|
+
exports.pullAllDatapoints = pullAllDatapoints;
|
|
241
|
+
/* eslint-enable max-lines */
|
|
242
|
+
//# sourceMappingURL=pullAllDatapoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pullAllDatapoints.js","sourceRoot":"","sources":["../../src/data-inventory/pullAllDatapoints.ts"],"names":[],"mappings":";;;;;;AAAA,8BAA8B;AAC9B,yDAAiC;AAKjC,uDAA+B;AAC/B,yDAAiC;AACjC,gEAAuC;AACvC,qDAAsC;AACtC,oDAA4B;AAC5B,2DAAmC;AAEnC,wCAMoB;AACpB,sCAAmC;AAEnC,uCAAqC;AAgErC;;;;;GAKG;AACH,KAAK,UAAU,iBAAiB,CAC9B,MAAqB,EACrB,EACE,WAAW,GAAG,EAAE,EAChB,wBAAwB,EACxB,iBAAiB,EACjB,gBAAgB,GAAG,EAAE,EACrB,aAAa,GAAG,EAAE,EAClB,QAAQ,GAAG,IAAI,MAIb,EAAE;;IAEN,MAAM,aAAa,GAA6B,EAAE,CAAC;IAEnD,gBAAgB;IAChB,MAAM,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;IAEhC,kEAAkE;IAClE,MAAM,WAAW,GAAG,IAAI,sBAAW,CAAC,SAAS,CAC3C,EAAE,EACF,sBAAW,CAAC,OAAO,CAAC,cAAc,CACnC,CAAC;IAEF,UAAU;IACV,MAAM,QAAQ,GAAG;QACf,GAAG,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACtE,GAAG,CAAC,aAAa,C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CAAC,MAAM,EAAE;QAC5C,WAAW,EAAE,cAAc;KAC5B,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,IAAA,eAAK,EAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAE5C,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;QAC1C,GAAG,YAAY;QACf,SAAS,EAAE,aAAa,CAAC,YAAY,CAAC,WAAW,CAAC;QAClD,QAAQ,EAAE,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC;KAChD,CAAC,CAAC,CAAC;AACN,CAAC;AAlDD,8CAkDC;AACD,6BAA6B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GraphQLClient } from 'graphql-request';
|
|
2
2
|
import { RequestEnricherStatus } from '@transcend-io/privacy-types';
|
|
3
3
|
export interface RequestEnricher {
|
|
4
|
-
/** ID of request */
|
|
4
|
+
/** ID of request enricher */
|
|
5
5
|
id: string;
|
|
6
6
|
/** Name of identifier */
|
|
7
7
|
enricher: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchAllRequestEnrichers.d.ts","sourceRoot":"","sources":["../../src/graphql/fetchAllRequestEnrichers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAIpE,MAAM,WAAW,eAAe;IAC9B,
|
|
1
|
+
{"version":3,"file":"fetchAllRequestEnrichers.d.ts","sourceRoot":"","sources":["../../src/graphql/fetchAllRequestEnrichers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAIpE,MAAM,WAAW,eAAe;IAC9B,6BAA6B;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,yBAAyB;IACzB,QAAQ,EAAE;QACR,qBAAqB;QACrB,EAAE,EAAE,MAAM,CAAC;QACX,wBAAwB;QACxB,KAAK,EAAE,MAAM,CAAC;QACd,yBAAyB;QACzB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,iCAAiC;IACjC,MAAM,EAAE,qBAAqB,CAAC;CAC/B;AAID;;;;;;GAMG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,aAAa,EACrB,EACE,SAAS,GACV,EAAE;IACD,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;CACnB,GACA,OAAO,CAAC,eAAe,EAAE,CAAC,CA2B5B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { GraphQLClient } from 'graphql-request';
|
|
2
|
+
export interface RequestIdentifierMetadata {
|
|
3
|
+
/** ID of request identifier */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Name of identifier */
|
|
6
|
+
name: string;
|
|
7
|
+
/** Status of identifier */
|
|
8
|
+
isVerifiedAtLeastOnce: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Fetch all request identifier metadata for a particular request
|
|
12
|
+
*
|
|
13
|
+
* @param client - GraphQL client
|
|
14
|
+
* @param options - Filter options
|
|
15
|
+
* @returns List of request identifiers
|
|
16
|
+
*/
|
|
17
|
+
export declare function fetchAllRequestIdentifierMetadata(client: GraphQLClient, { requestId, }: {
|
|
18
|
+
/** ID of request to filter on */
|
|
19
|
+
requestId: string;
|
|
20
|
+
}): Promise<RequestIdentifierMetadata[]>;
|
|
21
|
+
//# sourceMappingURL=fetchAllRequestIdentifierMetadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchAllRequestIdentifierMetadata.d.ts","sourceRoot":"","sources":["../../src/graphql/fetchAllRequestIdentifierMetadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIhD,MAAM,WAAW,yBAAyB;IACxC,+BAA+B;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,2BAA2B;IAC3B,qBAAqB,EAAE,OAAO,CAAC;CAChC;AAID;;;;;;GAMG;AACH,wBAAsB,iCAAiC,CACrD,MAAM,EAAE,aAAa,EACrB,EACE,SAAS,GACV,EAAE;IACD,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;CACnB,GACA,OAAO,CAAC,yBAAyB,EAAE,CAAC,CA2BtC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchAllRequestIdentifierMetadata = void 0;
|
|
4
|
+
const gqls_1 = require("./gqls");
|
|
5
|
+
const makeGraphQLRequest_1 = require("./makeGraphQLRequest");
|
|
6
|
+
const PAGE_SIZE = 50;
|
|
7
|
+
/**
|
|
8
|
+
* Fetch all request identifier metadata for a particular request
|
|
9
|
+
*
|
|
10
|
+
* @param client - GraphQL client
|
|
11
|
+
* @param options - Filter options
|
|
12
|
+
* @returns List of request identifiers
|
|
13
|
+
*/
|
|
14
|
+
async function fetchAllRequestIdentifierMetadata(client, { requestId, }) {
|
|
15
|
+
const requestIdentifiers = [];
|
|
16
|
+
let offset = 0;
|
|
17
|
+
// Paginate
|
|
18
|
+
let shouldContinue = false;
|
|
19
|
+
do {
|
|
20
|
+
const { requestIdentifiers: { nodes },
|
|
21
|
+
// eslint-disable-next-line no-await-in-loop
|
|
22
|
+
} = await (0, makeGraphQLRequest_1.makeGraphQLRequest)(client, gqls_1.REQUEST_IDENTIFIERS, {
|
|
23
|
+
first: PAGE_SIZE,
|
|
24
|
+
offset,
|
|
25
|
+
requestIds: [requestId],
|
|
26
|
+
});
|
|
27
|
+
requestIdentifiers.push(...nodes);
|
|
28
|
+
offset += PAGE_SIZE;
|
|
29
|
+
shouldContinue = nodes.length === PAGE_SIZE;
|
|
30
|
+
} while (shouldContinue);
|
|
31
|
+
return requestIdentifiers;
|
|
32
|
+
}
|
|
33
|
+
exports.fetchAllRequestIdentifierMetadata = fetchAllRequestIdentifierMetadata;
|
|
34
|
+
//# sourceMappingURL=fetchAllRequestIdentifierMetadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchAllRequestIdentifierMetadata.js","sourceRoot":"","sources":["../../src/graphql/fetchAllRequestIdentifierMetadata.ts"],"names":[],"mappings":";;;AACA,iCAA6C;AAC7C,6DAA0D;AAW1D,MAAM,SAAS,GAAG,EAAE,CAAC;AAErB;;;;;;GAMG;AACI,KAAK,UAAU,iCAAiC,CACrD,MAAqB,EACrB,EACE,SAAS,GAIV;IAED,MAAM,kBAAkB,GAAgC,EAAE,CAAC;IAC3D,IAAI,MAAM,GAAG,CAAC,CAAC;IAEf,WAAW;IACX,IAAI,cAAc,GAAG,KAAK,CAAC;IAC3B,GAAG;QACD,MAAM,EACJ,kBAAkB,EAAE,EAAE,KAAK,EAAE;QAC7B,4CAA4C;UAC7C,GAAG,MAAM,IAAA,uCAAkB,EAMzB,MAAM,EAAE,0BAAmB,EAAE;YAC9B,KAAK,EAAE,SAAS;YAChB,MAAM;YACN,UAAU,EAAE,CAAC,SAAS,CAAC;SACxB,CAAC,CAAC;QACH,kBAAkB,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;QAClC,MAAM,IAAI,SAAS,CAAC;QACpB,cAAc,GAAG,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC;KAC7C,QAAQ,cAAc,EAAE;IAEzB,OAAO,kBAAkB,CAAC;AAC5B,CAAC;AAnCD,8EAmCC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequestIdentifier.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/RequestIdentifier.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,0BAA0B,QAQtC,CAAC;AAIF,eAAO,MAAM,mBAAmB,QAwB/B,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.REQUEST_IDENTIFIERS = exports.REMOVE_REQUEST_IDENTIFIERS = void 0;
|
|
4
|
+
const graphql_request_1 = require("graphql-request");
|
|
5
|
+
exports.REMOVE_REQUEST_IDENTIFIERS = (0, graphql_request_1.gql) `
|
|
6
|
+
mutation TranscendCliRemoveRequestIdentifiers(
|
|
7
|
+
$input: RemoveRequestIdentifiersInput!
|
|
8
|
+
) {
|
|
9
|
+
removeRequestIdentifiers(input: $input) {
|
|
10
|
+
count
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
`;
|
|
14
|
+
// TODO: https://transcend.height.app/T-27909 - enable optimizations
|
|
15
|
+
// isExportCsv: true
|
|
16
|
+
exports.REQUEST_IDENTIFIERS = (0, graphql_request_1.gql) `
|
|
17
|
+
query TranscendCliRequestIdentifiers(
|
|
18
|
+
$first: Int!
|
|
19
|
+
$offset: Int!
|
|
20
|
+
$requestIds: [ID!]!
|
|
21
|
+
) {
|
|
22
|
+
requestIdentifiers(
|
|
23
|
+
input: { requestIds: $requestIds }
|
|
24
|
+
first: $first
|
|
25
|
+
offset: $offset
|
|
26
|
+
useMaster: false
|
|
27
|
+
orderBy: [
|
|
28
|
+
{ field: createdAt, direction: ASC }
|
|
29
|
+
{ field: name, direction: ASC }
|
|
30
|
+
]
|
|
31
|
+
) {
|
|
32
|
+
nodes {
|
|
33
|
+
id
|
|
34
|
+
name
|
|
35
|
+
isVerifiedAtLeastOnce
|
|
36
|
+
}
|
|
37
|
+
totalCount
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
`;
|
|
41
|
+
//# sourceMappingURL=RequestIdentifier.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequestIdentifier.js","sourceRoot":"","sources":["../../../src/graphql/gqls/RequestIdentifier.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEzB,QAAA,0BAA0B,GAAG,IAAA,qBAAG,EAAA;;;;;;;;CAQ5C,CAAC;AAEF,oEAAoE;AACpE,oBAAoB;AACP,QAAA,mBAAmB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;CAwBrC,CAAC"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export declare const DATA_POINTS: string;
|
|
2
|
+
export declare const DATA_POINT_COUNT: string;
|
|
2
3
|
export declare const SUB_DATA_POINTS: string;
|
|
4
|
+
export declare const SUB_DATA_POINTS_COUNT: string;
|
|
3
5
|
export declare const SUB_DATA_POINTS_WITH_GUESSES: string;
|
|
4
6
|
export declare const UPDATE_OR_CREATE_DATA_POINT: string;
|
|
7
|
+
export declare const DATAPOINT_EXPORT: string;
|
|
5
8
|
//# sourceMappingURL=dataPoint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataPoint.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/dataPoint.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"dataPoint.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/dataPoint.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,QAiDvB,CAAC;AAIF,eAAO,MAAM,gBAAgB,QAM5B,CAAC;AAIF,eAAO,MAAM,eAAe,QAmC3B,CAAC;AAEF,eAAO,MAAM,qBAAqB,QAMjC,CAAC;AAEF,eAAO,MAAM,4BAA4B,QA6CxC,CAAC;AAEF,eAAO,MAAM,2BAA2B,QAuCvC,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAyB5B,CAAC"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UPDATE_OR_CREATE_DATA_POINT = exports.SUB_DATA_POINTS_WITH_GUESSES = exports.SUB_DATA_POINTS = exports.DATA_POINTS = void 0;
|
|
3
|
+
exports.DATAPOINT_EXPORT = exports.UPDATE_OR_CREATE_DATA_POINT = exports.SUB_DATA_POINTS_WITH_GUESSES = exports.SUB_DATA_POINTS_COUNT = exports.SUB_DATA_POINTS = exports.DATA_POINT_COUNT = exports.DATA_POINTS = void 0;
|
|
4
4
|
const graphql_request_1 = require("graphql-request");
|
|
5
5
|
// TODO: https://transcend.height.app/T-27909 - enable optimizations
|
|
6
6
|
// isExportCsv: true
|
|
7
7
|
exports.DATA_POINTS = (0, graphql_request_1.gql) `
|
|
8
8
|
query TranscendCliDataPoints(
|
|
9
|
-
$
|
|
9
|
+
$filterBy: DataPointFiltersInput
|
|
10
10
|
$first: Int!
|
|
11
11
|
$offset: Int!
|
|
12
12
|
) {
|
|
13
13
|
dataPoints(
|
|
14
|
-
filterBy:
|
|
14
|
+
filterBy: $filterBy
|
|
15
15
|
first: $first
|
|
16
16
|
offset: $offset
|
|
17
17
|
useMaster: false
|
|
@@ -20,7 +20,6 @@ exports.DATA_POINTS = (0, graphql_request_1.gql) `
|
|
|
20
20
|
{ field: name, direction: ASC }
|
|
21
21
|
]
|
|
22
22
|
) {
|
|
23
|
-
totalCount
|
|
24
23
|
nodes {
|
|
25
24
|
id
|
|
26
25
|
title {
|
|
@@ -55,21 +54,29 @@ exports.DATA_POINTS = (0, graphql_request_1.gql) `
|
|
|
55
54
|
}
|
|
56
55
|
}
|
|
57
56
|
`;
|
|
57
|
+
// TODO: https://transcend.height.app/T-27909 - enable optimizations
|
|
58
|
+
// isExportCsv: true
|
|
59
|
+
exports.DATA_POINT_COUNT = (0, graphql_request_1.gql) `
|
|
60
|
+
query TranscendCliDataPointCount($filterBy: DataPointFiltersInput) {
|
|
61
|
+
dataPoints(filterBy: $filterBy, useMaster: false) {
|
|
62
|
+
totalCount
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
`;
|
|
58
66
|
// TODO: https://transcend.height.app/T-27909 - add orderBy
|
|
59
67
|
// isExportCsv: true
|
|
60
68
|
exports.SUB_DATA_POINTS = (0, graphql_request_1.gql) `
|
|
61
|
-
query
|
|
62
|
-
$
|
|
69
|
+
query TranscendCliSubDataPoints(
|
|
70
|
+
$filterBy: SubDataPointFiltersInput
|
|
63
71
|
$first: Int!
|
|
64
72
|
$offset: Int!
|
|
65
73
|
) {
|
|
66
74
|
subDataPoints(
|
|
67
|
-
filterBy:
|
|
75
|
+
filterBy: $filterBy
|
|
68
76
|
first: $first
|
|
69
77
|
offset: $offset
|
|
70
78
|
useMaster: false
|
|
71
79
|
) {
|
|
72
|
-
totalCount
|
|
73
80
|
nodes {
|
|
74
81
|
id
|
|
75
82
|
name
|
|
@@ -94,19 +101,25 @@ exports.SUB_DATA_POINTS = (0, graphql_request_1.gql) `
|
|
|
94
101
|
}
|
|
95
102
|
}
|
|
96
103
|
`;
|
|
104
|
+
exports.SUB_DATA_POINTS_COUNT = (0, graphql_request_1.gql) `
|
|
105
|
+
query TranscendCliSubDataPointsCount($filterBy: SubDataPointFiltersInput) {
|
|
106
|
+
subDataPoints(filterBy: $filterBy, useMaster: false) {
|
|
107
|
+
totalCount
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
`;
|
|
97
111
|
exports.SUB_DATA_POINTS_WITH_GUESSES = (0, graphql_request_1.gql) `
|
|
98
|
-
query
|
|
99
|
-
$
|
|
112
|
+
query TranscendCliSubDataPointGuesses(
|
|
113
|
+
$filterBy: SubDataPointFiltersInput
|
|
100
114
|
$first: Int!
|
|
101
115
|
$offset: Int!
|
|
102
116
|
) {
|
|
103
117
|
subDataPoints(
|
|
104
|
-
filterBy:
|
|
118
|
+
filterBy: $filterBy
|
|
105
119
|
first: $first
|
|
106
120
|
offset: $offset
|
|
107
121
|
useMaster: false
|
|
108
122
|
) {
|
|
109
|
-
totalCount
|
|
110
123
|
nodes {
|
|
111
124
|
id
|
|
112
125
|
name
|
|
@@ -181,4 +194,30 @@ exports.UPDATE_OR_CREATE_DATA_POINT = (0, graphql_request_1.gql) `
|
|
|
181
194
|
}
|
|
182
195
|
}
|
|
183
196
|
`;
|
|
197
|
+
exports.DATAPOINT_EXPORT = (0, graphql_request_1.gql) `
|
|
198
|
+
query TranscendCliDataPointCsvExport(
|
|
199
|
+
$filterBy: DataPointFiltersInput
|
|
200
|
+
$first: Int!
|
|
201
|
+
) {
|
|
202
|
+
dataPoints(filterBy: $filterBy, first: $first, useMaster: false) {
|
|
203
|
+
nodes {
|
|
204
|
+
id
|
|
205
|
+
title {
|
|
206
|
+
defaultMessage
|
|
207
|
+
}
|
|
208
|
+
description {
|
|
209
|
+
defaultMessage
|
|
210
|
+
}
|
|
211
|
+
owners {
|
|
212
|
+
email
|
|
213
|
+
}
|
|
214
|
+
teams {
|
|
215
|
+
name
|
|
216
|
+
}
|
|
217
|
+
name
|
|
218
|
+
path
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
`;
|
|
184
223
|
//# sourceMappingURL=dataPoint.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataPoint.js","sourceRoot":"","sources":["../../../src/graphql/gqls/dataPoint.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEtC,oEAAoE;AACpE,oBAAoB;AACP,QAAA,WAAW,GAAG,IAAA,qBAAG,EAAA
|
|
1
|
+
{"version":3,"file":"dataPoint.js","sourceRoot":"","sources":["../../../src/graphql/gqls/dataPoint.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEtC,oEAAoE;AACpE,oBAAoB;AACP,QAAA,WAAW,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiD7B,CAAC;AAEF,oEAAoE;AACpE,oBAAoB;AACP,QAAA,gBAAgB,GAAG,IAAA,qBAAG,EAAA;;;;;;CAMlC,CAAC;AAEF,2DAA2D;AAC3D,oBAAoB;AACP,QAAA,eAAe,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCjC,CAAC;AAEW,QAAA,qBAAqB,GAAG,IAAA,qBAAG,EAAA;;;;;;CAMvC,CAAC;AAEW,QAAA,4BAA4B,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6C9C,CAAC;AAEW,QAAA,2BAA2B,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuC7C,CAAC;AAEW,QAAA,gBAAgB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;CAyBlC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataSilo.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/dataSilo.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU,QA2BtB,CAAC;AAIF,eAAO,MAAM,mBAAmB,QAiE/B,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAU7B,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAS7B,CAAC"}
|
|
1
|
+
{"version":3,"file":"dataSilo.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/dataSilo.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU,QA2BtB,CAAC;AAIF,eAAO,MAAM,gBAAgB,QAY5B,CAAC;AAIF,eAAO,MAAM,mBAAmB,QAiE/B,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAU7B,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAS7B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CREATE_DATA_SILOS = exports.UPDATE_DATA_SILOS = exports.DATA_SILOS_ENRICHED = exports.DATA_SILOS = void 0;
|
|
3
|
+
exports.CREATE_DATA_SILOS = exports.UPDATE_DATA_SILOS = exports.DATA_SILOS_ENRICHED = exports.DATA_SILO_EXPORT = exports.DATA_SILOS = void 0;
|
|
4
4
|
const graphql_request_1 = require("graphql-request");
|
|
5
5
|
// TODO: https://transcend.height.app/T-27909 - enable optimizations
|
|
6
6
|
// isExportCsv: true
|
|
@@ -34,6 +34,21 @@ exports.DATA_SILOS = (0, graphql_request_1.gql) `
|
|
|
34
34
|
`;
|
|
35
35
|
// TODO: https://transcend.height.app/T-27909 - enable optimizations
|
|
36
36
|
// isExportCsv: true
|
|
37
|
+
exports.DATA_SILO_EXPORT = (0, graphql_request_1.gql) `
|
|
38
|
+
query TranscendCliDataSiloExport(
|
|
39
|
+
$filterBy: DataSiloFiltersInput!
|
|
40
|
+
$first: Int!
|
|
41
|
+
) {
|
|
42
|
+
dataSilos(filterBy: $filterBy, first: $first, useMaster: false) {
|
|
43
|
+
nodes {
|
|
44
|
+
id
|
|
45
|
+
title
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
50
|
+
// TODO: https://transcend.height.app/T-27909 - enable optimizations
|
|
51
|
+
// isExportCsv: true
|
|
37
52
|
exports.DATA_SILOS_ENRICHED = (0, graphql_request_1.gql) `
|
|
38
53
|
query TranscendCliDataSilosEnriched(
|
|
39
54
|
$filterBy: DataSiloFiltersInput!
|