@transcend-io/mcp-server-inventory 0.3.4 → 0.4.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 +36 -10
- package/dist/cli.mjs +5 -3
- package/dist/cli.mjs.map +1 -1
- package/dist/graphql-BJIrpomr.mjs +951 -0
- package/dist/graphql-BJIrpomr.mjs.map +1 -0
- package/dist/index.d.mts +14 -9
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -2
- package/package.json +6 -3
- package/dist/graphql-0tHfKnDD.mjs +0 -557
- package/dist/graphql-0tHfKnDD.mjs.map +0 -1
|
@@ -1,557 +0,0 @@
|
|
|
1
|
-
import { EmptySchema, TranscendGraphQLBase, createListResult, createToolResult, defineTool, groupBy, z } from "@transcend-io/mcp-server-base";
|
|
2
|
-
//#region src/tools/inventory_analyze.ts
|
|
3
|
-
function createInventoryAnalyzeTool(clients) {
|
|
4
|
-
const graphql = clients.graphql;
|
|
5
|
-
return defineTool({
|
|
6
|
-
name: "inventory_analyze",
|
|
7
|
-
description: "Analyze your data inventory including data silos by type, vendor distribution, and data point coverage",
|
|
8
|
-
category: "Data Inventory",
|
|
9
|
-
readOnly: true,
|
|
10
|
-
annotations: {
|
|
11
|
-
readOnlyHint: true,
|
|
12
|
-
destructiveHint: false,
|
|
13
|
-
idempotentHint: true
|
|
14
|
-
},
|
|
15
|
-
zodSchema: EmptySchema,
|
|
16
|
-
handler: async (_args) => {
|
|
17
|
-
const [dataSilosResult, vendorsResult, identifiersResult, categoriesResult] = await Promise.all([
|
|
18
|
-
graphql.listDataSilos({ first: 100 }),
|
|
19
|
-
graphql.listVendors({ first: 100 }),
|
|
20
|
-
graphql.listIdentifiers({ first: 100 }),
|
|
21
|
-
graphql.listDataCategories({ first: 100 })
|
|
22
|
-
]);
|
|
23
|
-
const dataSilos = dataSilosResult.nodes;
|
|
24
|
-
const vendors = vendorsResult.nodes;
|
|
25
|
-
const identifiers = identifiersResult.nodes;
|
|
26
|
-
const categories = categoriesResult.nodes;
|
|
27
|
-
const liveDataSilos = dataSilos.filter((ds) => ds.isLive);
|
|
28
|
-
return createToolResult(true, {
|
|
29
|
-
summary: {
|
|
30
|
-
totalDataSilos: dataSilos.length,
|
|
31
|
-
liveDataSilos: liveDataSilos.length,
|
|
32
|
-
totalVendors: vendors.length,
|
|
33
|
-
totalIdentifiers: identifiers.length,
|
|
34
|
-
totalCategories: categories.length
|
|
35
|
-
},
|
|
36
|
-
breakdown: {
|
|
37
|
-
dataSilosByType: groupBy(dataSilos, "type"),
|
|
38
|
-
dataSilosByOuterType: groupBy(dataSilos.filter((ds) => ds.outerType), "outerType")
|
|
39
|
-
},
|
|
40
|
-
topIdentifiers: identifiers.slice(0, 10).map((id) => ({
|
|
41
|
-
name: id.name,
|
|
42
|
-
type: id.type,
|
|
43
|
-
isRequired: id.isRequiredInForm
|
|
44
|
-
})),
|
|
45
|
-
topCategories: categories.slice(0, 10).map((cat) => ({
|
|
46
|
-
name: cat.name,
|
|
47
|
-
category: cat.category
|
|
48
|
-
})),
|
|
49
|
-
recommendations: [
|
|
50
|
-
dataSilos.length === 0 ? "Add data silos to map your data landscape" : null,
|
|
51
|
-
liveDataSilos.length < dataSilos.length ? `${dataSilos.length - liveDataSilos.length} data silos are not live - consider activating them` : null,
|
|
52
|
-
vendors.length === 0 ? "Add vendors to track third-party data processors" : null
|
|
53
|
-
].filter(Boolean)
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
//#endregion
|
|
59
|
-
//#region src/tools/inventory_create_data_silo.ts
|
|
60
|
-
const CreateDataSiloSchema = z.object({ title: z.string().describe("Name/title of the data silo (must match an integrationName in the Transcend catalog, e.g. \"Salesforce\", \"Stripe\")") });
|
|
61
|
-
function createInventoryCreateDataSiloTool(clients) {
|
|
62
|
-
const graphql = clients.graphql;
|
|
63
|
-
return defineTool({
|
|
64
|
-
name: "inventory_create_data_silo",
|
|
65
|
-
description: "Create a new data silo (data system or integration). The name must match an integration name from the Transcend catalog.",
|
|
66
|
-
category: "Data Inventory",
|
|
67
|
-
readOnly: false,
|
|
68
|
-
confirmationHint: "Creates a new data silo in the inventory",
|
|
69
|
-
annotations: {
|
|
70
|
-
readOnlyHint: false,
|
|
71
|
-
destructiveHint: true,
|
|
72
|
-
idempotentHint: false
|
|
73
|
-
},
|
|
74
|
-
zodSchema: CreateDataSiloSchema,
|
|
75
|
-
handler: async ({ title }) => {
|
|
76
|
-
return createToolResult(true, {
|
|
77
|
-
dataSilo: await graphql.createDataSilo({ name: title }),
|
|
78
|
-
message: `Data silo "${title}" created successfully`
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
//#endregion
|
|
84
|
-
//#region src/tools/inventory_get_data_silo.ts
|
|
85
|
-
const GetDataSiloSchema = z.object({ data_silo_id: z.string().describe("ID of the data silo to retrieve") });
|
|
86
|
-
function createInventoryGetDataSiloTool(clients) {
|
|
87
|
-
const graphql = clients.graphql;
|
|
88
|
-
return defineTool({
|
|
89
|
-
name: "inventory_get_data_silo",
|
|
90
|
-
description: "Get detailed information about a specific data silo including its data points and identifiers",
|
|
91
|
-
category: "Data Inventory",
|
|
92
|
-
readOnly: true,
|
|
93
|
-
annotations: {
|
|
94
|
-
readOnlyHint: true,
|
|
95
|
-
destructiveHint: false,
|
|
96
|
-
idempotentHint: true
|
|
97
|
-
},
|
|
98
|
-
zodSchema: GetDataSiloSchema,
|
|
99
|
-
handler: async ({ data_silo_id }) => {
|
|
100
|
-
return createToolResult(true, await graphql.getDataSilo(data_silo_id));
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
//#endregion
|
|
105
|
-
//#region src/tools/inventory_list_categories.ts
|
|
106
|
-
const ListCategoriesSchema = z.object({
|
|
107
|
-
limit: z.coerce.number().min(1).max(100).optional().default(50).describe("Results per page (1-100, default: 50)"),
|
|
108
|
-
cursor: z.string().optional().describe("Pagination cursor from previous response (where supported)")
|
|
109
|
-
});
|
|
110
|
-
function createInventoryListCategoriesTool(clients) {
|
|
111
|
-
const graphql = clients.graphql;
|
|
112
|
-
return defineTool({
|
|
113
|
-
name: "inventory_list_categories",
|
|
114
|
-
description: "List all data categories (PII types) configured in your organization. Note: API does not support cursor pagination (max ~100 results).",
|
|
115
|
-
category: "Data Inventory",
|
|
116
|
-
readOnly: true,
|
|
117
|
-
annotations: {
|
|
118
|
-
readOnlyHint: true,
|
|
119
|
-
destructiveHint: false,
|
|
120
|
-
idempotentHint: true
|
|
121
|
-
},
|
|
122
|
-
zodSchema: ListCategoriesSchema,
|
|
123
|
-
handler: async ({ limit, cursor }) => {
|
|
124
|
-
const result = await graphql.listDataCategories({
|
|
125
|
-
first: limit,
|
|
126
|
-
after: cursor
|
|
127
|
-
});
|
|
128
|
-
return createListResult(result.nodes, {
|
|
129
|
-
totalCount: result.totalCount,
|
|
130
|
-
hasNextPage: result.pageInfo?.hasNextPage
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
//#endregion
|
|
136
|
-
//#region src/tools/inventory_list_data_points.ts
|
|
137
|
-
const ListDataPointsSchema = z.object({
|
|
138
|
-
limit: z.coerce.number().min(1).max(100).optional().default(50).describe("Results per page (1-100, default: 50)"),
|
|
139
|
-
cursor: z.string().optional().describe("Pagination cursor from previous response (where supported)")
|
|
140
|
-
});
|
|
141
|
-
function createInventoryListDataPointsTool(clients) {
|
|
142
|
-
const graphql = clients.graphql;
|
|
143
|
-
return defineTool({
|
|
144
|
-
name: "inventory_list_data_points",
|
|
145
|
-
description: "List data points (collections of personal data). Note: API does not support cursor pagination or data_silo filtering (max ~100 results).",
|
|
146
|
-
category: "Data Inventory",
|
|
147
|
-
readOnly: true,
|
|
148
|
-
annotations: {
|
|
149
|
-
readOnlyHint: true,
|
|
150
|
-
destructiveHint: false,
|
|
151
|
-
idempotentHint: true
|
|
152
|
-
},
|
|
153
|
-
zodSchema: ListDataPointsSchema,
|
|
154
|
-
handler: async ({ limit, cursor }) => {
|
|
155
|
-
const result = await graphql.listDataPoints(void 0, {
|
|
156
|
-
first: limit,
|
|
157
|
-
after: cursor
|
|
158
|
-
});
|
|
159
|
-
return createListResult(result.nodes, {
|
|
160
|
-
totalCount: result.totalCount,
|
|
161
|
-
hasNextPage: result.pageInfo?.hasNextPage
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
//#endregion
|
|
167
|
-
//#region src/tools/inventory_list_data_silos.ts
|
|
168
|
-
const ListDataSilosSchema = z.object({
|
|
169
|
-
limit: z.coerce.number().min(1).max(100).optional().default(50).describe("Results per page (1-100, default: 50)"),
|
|
170
|
-
cursor: z.string().optional().describe("Pagination cursor from previous response (where supported)")
|
|
171
|
-
});
|
|
172
|
-
function createInventoryListDataSilosTool(clients) {
|
|
173
|
-
const graphql = clients.graphql;
|
|
174
|
-
return defineTool({
|
|
175
|
-
name: "inventory_list_data_silos",
|
|
176
|
-
description: "List all data silos (data systems and integrations) in your organization. Note: API does not support cursor pagination (max ~100 results).",
|
|
177
|
-
category: "Data Inventory",
|
|
178
|
-
readOnly: true,
|
|
179
|
-
annotations: {
|
|
180
|
-
readOnlyHint: true,
|
|
181
|
-
destructiveHint: false,
|
|
182
|
-
idempotentHint: true
|
|
183
|
-
},
|
|
184
|
-
zodSchema: ListDataSilosSchema,
|
|
185
|
-
handler: async ({ limit, cursor }) => {
|
|
186
|
-
const result = await graphql.listDataSilos({
|
|
187
|
-
first: limit,
|
|
188
|
-
after: cursor
|
|
189
|
-
});
|
|
190
|
-
return createListResult(result.nodes, {
|
|
191
|
-
totalCount: result.totalCount,
|
|
192
|
-
hasNextPage: result.pageInfo?.hasNextPage
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
//#endregion
|
|
198
|
-
//#region src/tools/inventory_list_identifiers.ts
|
|
199
|
-
const ListIdentifiersSchema = z.object({
|
|
200
|
-
limit: z.coerce.number().min(1).max(100).optional().default(50).describe("Results per page (1-100, default: 50)"),
|
|
201
|
-
cursor: z.string().optional().describe("Pagination cursor from previous response (where supported)")
|
|
202
|
-
});
|
|
203
|
-
function createInventoryListIdentifiersTool(clients) {
|
|
204
|
-
const graphql = clients.graphql;
|
|
205
|
-
return defineTool({
|
|
206
|
-
name: "inventory_list_identifiers",
|
|
207
|
-
description: "List all identifier types (email, user ID, etc.) configured in your organization. Note: API does not support cursor pagination (max ~100 results).",
|
|
208
|
-
category: "Data Inventory",
|
|
209
|
-
readOnly: true,
|
|
210
|
-
annotations: {
|
|
211
|
-
readOnlyHint: true,
|
|
212
|
-
destructiveHint: false,
|
|
213
|
-
idempotentHint: true
|
|
214
|
-
},
|
|
215
|
-
zodSchema: ListIdentifiersSchema,
|
|
216
|
-
handler: async ({ limit, cursor }) => {
|
|
217
|
-
const result = await graphql.listIdentifiers({
|
|
218
|
-
first: limit,
|
|
219
|
-
after: cursor
|
|
220
|
-
});
|
|
221
|
-
return createListResult(result.nodes, {
|
|
222
|
-
totalCount: result.totalCount,
|
|
223
|
-
hasNextPage: result.pageInfo?.hasNextPage
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
//#endregion
|
|
229
|
-
//#region src/tools/inventory_list_sub_data_points.ts
|
|
230
|
-
const ListSubDataPointsSchema = z.object({
|
|
231
|
-
data_point_id: z.string().describe("ID of the parent data point"),
|
|
232
|
-
limit: z.coerce.number().min(1).max(100).optional().default(50).describe("Results per page (1-100, default: 50)"),
|
|
233
|
-
offset: z.coerce.number().min(0).optional().default(0).describe("Number of results to skip (default: 0)")
|
|
234
|
-
});
|
|
235
|
-
function createInventoryListSubDataPointsTool(clients) {
|
|
236
|
-
const graphql = clients.graphql;
|
|
237
|
-
return defineTool({
|
|
238
|
-
name: "inventory_list_sub_data_points",
|
|
239
|
-
description: "List sub-data points (individual data fields) for a specific data point. Note: This feature may have limited availability.",
|
|
240
|
-
category: "Data Inventory",
|
|
241
|
-
readOnly: true,
|
|
242
|
-
annotations: {
|
|
243
|
-
readOnlyHint: true,
|
|
244
|
-
destructiveHint: false,
|
|
245
|
-
idempotentHint: true
|
|
246
|
-
},
|
|
247
|
-
zodSchema: ListSubDataPointsSchema,
|
|
248
|
-
handler: async ({ data_point_id, limit, offset }) => {
|
|
249
|
-
const result = await graphql.listSubDataPoints(data_point_id, {
|
|
250
|
-
first: limit,
|
|
251
|
-
offset
|
|
252
|
-
});
|
|
253
|
-
return createListResult(result.nodes, {
|
|
254
|
-
totalCount: result.totalCount,
|
|
255
|
-
hasNextPage: result.pageInfo?.hasNextPage
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
//#endregion
|
|
261
|
-
//#region src/tools/inventory_list_vendors.ts
|
|
262
|
-
const ListVendorsSchema = z.object({
|
|
263
|
-
limit: z.coerce.number().min(1).max(100).optional().default(50).describe("Results per page (1-100, default: 50)"),
|
|
264
|
-
cursor: z.string().optional().describe("Pagination cursor from previous response (where supported)")
|
|
265
|
-
});
|
|
266
|
-
function createInventoryListVendorsTool(clients) {
|
|
267
|
-
const graphql = clients.graphql;
|
|
268
|
-
return defineTool({
|
|
269
|
-
name: "inventory_list_vendors",
|
|
270
|
-
description: "List all vendors (third-party data processors) in your organization. Note: API does not support cursor pagination (max ~100 results).",
|
|
271
|
-
category: "Data Inventory",
|
|
272
|
-
readOnly: true,
|
|
273
|
-
annotations: {
|
|
274
|
-
readOnlyHint: true,
|
|
275
|
-
destructiveHint: false,
|
|
276
|
-
idempotentHint: true
|
|
277
|
-
},
|
|
278
|
-
zodSchema: ListVendorsSchema,
|
|
279
|
-
handler: async ({ limit, cursor }) => {
|
|
280
|
-
const result = await graphql.listVendors({
|
|
281
|
-
first: limit,
|
|
282
|
-
after: cursor
|
|
283
|
-
});
|
|
284
|
-
return createListResult(result.nodes, {
|
|
285
|
-
totalCount: result.totalCount,
|
|
286
|
-
hasNextPage: result.pageInfo?.hasNextPage
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
});
|
|
290
|
-
}
|
|
291
|
-
//#endregion
|
|
292
|
-
//#region src/tools/inventory_update_data_silo.ts
|
|
293
|
-
const UpdateDataSiloSchema = z.object({
|
|
294
|
-
data_silo_id: z.string().describe("ID of the data silo to update"),
|
|
295
|
-
title: z.string().optional().describe("New title for the data silo"),
|
|
296
|
-
description: z.string().optional().describe("New description")
|
|
297
|
-
});
|
|
298
|
-
function createInventoryUpdateDataSiloTool(clients) {
|
|
299
|
-
const graphql = clients.graphql;
|
|
300
|
-
return defineTool({
|
|
301
|
-
name: "inventory_update_data_silo",
|
|
302
|
-
description: "Update an existing data silo",
|
|
303
|
-
category: "Data Inventory",
|
|
304
|
-
readOnly: false,
|
|
305
|
-
confirmationHint: "Updates the data silo configuration",
|
|
306
|
-
annotations: {
|
|
307
|
-
readOnlyHint: false,
|
|
308
|
-
destructiveHint: false,
|
|
309
|
-
idempotentHint: true
|
|
310
|
-
},
|
|
311
|
-
zodSchema: UpdateDataSiloSchema,
|
|
312
|
-
handler: async ({ data_silo_id, title, description }) => {
|
|
313
|
-
return createToolResult(true, {
|
|
314
|
-
dataSilo: await graphql.updateDataSilo({
|
|
315
|
-
id: data_silo_id,
|
|
316
|
-
title,
|
|
317
|
-
description
|
|
318
|
-
}),
|
|
319
|
-
message: "Data silo updated successfully"
|
|
320
|
-
});
|
|
321
|
-
}
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
//#endregion
|
|
325
|
-
//#region src/tools/index.ts
|
|
326
|
-
function getInventoryTools(clients) {
|
|
327
|
-
return [
|
|
328
|
-
createInventoryListDataSilosTool(clients),
|
|
329
|
-
createInventoryGetDataSiloTool(clients),
|
|
330
|
-
createInventoryCreateDataSiloTool(clients),
|
|
331
|
-
createInventoryUpdateDataSiloTool(clients),
|
|
332
|
-
createInventoryListVendorsTool(clients),
|
|
333
|
-
createInventoryListDataPointsTool(clients),
|
|
334
|
-
createInventoryListSubDataPointsTool(clients),
|
|
335
|
-
createInventoryListIdentifiersTool(clients),
|
|
336
|
-
createInventoryListCategoriesTool(clients),
|
|
337
|
-
createInventoryAnalyzeTool(clients)
|
|
338
|
-
];
|
|
339
|
-
}
|
|
340
|
-
//#endregion
|
|
341
|
-
//#region src/graphql.ts
|
|
342
|
-
var InventoryMixin = class extends TranscendGraphQLBase {
|
|
343
|
-
async listDataSilos(options) {
|
|
344
|
-
const data = await this.makeRequest(`
|
|
345
|
-
query ListDataSilos($first: Int) {
|
|
346
|
-
dataSilos(first: $first) {
|
|
347
|
-
nodes {
|
|
348
|
-
id
|
|
349
|
-
title
|
|
350
|
-
type
|
|
351
|
-
}
|
|
352
|
-
totalCount
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
`, { first: Math.min(options?.first || 100, 100) });
|
|
356
|
-
return {
|
|
357
|
-
nodes: data.dataSilos.nodes,
|
|
358
|
-
pageInfo: {
|
|
359
|
-
hasNextPage: data.dataSilos.nodes.length < data.dataSilos.totalCount,
|
|
360
|
-
hasPreviousPage: false
|
|
361
|
-
},
|
|
362
|
-
totalCount: data.dataSilos.totalCount
|
|
363
|
-
};
|
|
364
|
-
}
|
|
365
|
-
async getDataSilo(id) {
|
|
366
|
-
return (await this.makeRequest(`
|
|
367
|
-
query GetDataSilo($id: String!) {
|
|
368
|
-
dataSilo(id: $id) {
|
|
369
|
-
id
|
|
370
|
-
title
|
|
371
|
-
type
|
|
372
|
-
description
|
|
373
|
-
link
|
|
374
|
-
isLive
|
|
375
|
-
outerType
|
|
376
|
-
createdAt
|
|
377
|
-
connectionState
|
|
378
|
-
identifiers {
|
|
379
|
-
id
|
|
380
|
-
name
|
|
381
|
-
type
|
|
382
|
-
isRequiredInForm
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
`, { id })).dataSilo;
|
|
387
|
-
}
|
|
388
|
-
async createDataSilo(input) {
|
|
389
|
-
const created = (await this.makeRequest(`
|
|
390
|
-
mutation CreateDataSilos($input: [CreateDataSilosInput!]!) {
|
|
391
|
-
createDataSilos(input: $input) {
|
|
392
|
-
dataSilos {
|
|
393
|
-
id
|
|
394
|
-
title
|
|
395
|
-
type
|
|
396
|
-
description
|
|
397
|
-
isLive
|
|
398
|
-
createdAt
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
`, { input: [input] })).createDataSilos.dataSilos[0];
|
|
403
|
-
if (!created) throw new Error("createDataSilos returned an empty array");
|
|
404
|
-
return created;
|
|
405
|
-
}
|
|
406
|
-
async updateDataSilo(input) {
|
|
407
|
-
const mutation = `
|
|
408
|
-
mutation UpdateDataSilos($input: UpdateDataSilosInput!) {
|
|
409
|
-
updateDataSilos(input: $input) {
|
|
410
|
-
dataSilos {
|
|
411
|
-
id
|
|
412
|
-
title
|
|
413
|
-
type
|
|
414
|
-
description
|
|
415
|
-
isLive
|
|
416
|
-
createdAt
|
|
417
|
-
updatedAt
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
`;
|
|
422
|
-
const wrappedInput = { dataSilos: [input] };
|
|
423
|
-
const updated = (await this.makeRequest(mutation, { input: wrappedInput })).updateDataSilos.dataSilos[0];
|
|
424
|
-
if (!updated) throw new Error("updateDataSilos returned an empty array");
|
|
425
|
-
return updated;
|
|
426
|
-
}
|
|
427
|
-
async listVendors(options) {
|
|
428
|
-
const data = await this.makeRequest(`
|
|
429
|
-
query ListVendors($first: Int) {
|
|
430
|
-
vendors(first: $first) {
|
|
431
|
-
nodes {
|
|
432
|
-
id
|
|
433
|
-
title
|
|
434
|
-
}
|
|
435
|
-
totalCount
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
`, { first: Math.min(options?.first || 100, 100) });
|
|
439
|
-
return {
|
|
440
|
-
nodes: data.vendors.nodes,
|
|
441
|
-
pageInfo: {
|
|
442
|
-
hasNextPage: data.vendors.nodes.length < data.vendors.totalCount,
|
|
443
|
-
hasPreviousPage: false
|
|
444
|
-
},
|
|
445
|
-
totalCount: data.vendors.totalCount
|
|
446
|
-
};
|
|
447
|
-
}
|
|
448
|
-
async listDataPoints(_dataSiloId, options) {
|
|
449
|
-
const data = await this.makeRequest(`
|
|
450
|
-
query ListDataPoints($first: Int) {
|
|
451
|
-
dataPoints(first: $first) {
|
|
452
|
-
nodes {
|
|
453
|
-
id
|
|
454
|
-
name
|
|
455
|
-
title {
|
|
456
|
-
defaultMessage
|
|
457
|
-
}
|
|
458
|
-
description {
|
|
459
|
-
defaultMessage
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
totalCount
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
`, { first: Math.min(options?.first || 100, 100) });
|
|
466
|
-
const points = data.dataPoints.nodes.map((dp) => ({
|
|
467
|
-
id: dp.id,
|
|
468
|
-
name: dp.name,
|
|
469
|
-
title: dp.title?.defaultMessage,
|
|
470
|
-
description: dp.description?.defaultMessage,
|
|
471
|
-
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
472
|
-
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
473
|
-
}));
|
|
474
|
-
return {
|
|
475
|
-
nodes: points,
|
|
476
|
-
pageInfo: {
|
|
477
|
-
hasNextPage: points.length < data.dataPoints.totalCount,
|
|
478
|
-
hasPreviousPage: false
|
|
479
|
-
},
|
|
480
|
-
totalCount: data.dataPoints.totalCount
|
|
481
|
-
};
|
|
482
|
-
}
|
|
483
|
-
async listSubDataPoints(dataPointId, options) {
|
|
484
|
-
const data = await this.makeRequest(`
|
|
485
|
-
query ListSubDataPoints($first: Int, $offset: Int, $filterBy: SubDataPointFiltersInput) {
|
|
486
|
-
subDataPoints(first: $first, offset: $offset, filterBy: $filterBy) {
|
|
487
|
-
nodes {
|
|
488
|
-
id
|
|
489
|
-
name
|
|
490
|
-
description
|
|
491
|
-
accessRequestVisibilityEnabled
|
|
492
|
-
}
|
|
493
|
-
totalCount
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
`, {
|
|
497
|
-
first: Math.min(options?.first || 100, 100),
|
|
498
|
-
offset: options?.offset || 0,
|
|
499
|
-
filterBy: { dataPoints: [dataPointId] }
|
|
500
|
-
});
|
|
501
|
-
return {
|
|
502
|
-
nodes: data.subDataPoints.nodes,
|
|
503
|
-
pageInfo: {
|
|
504
|
-
hasNextPage: data.subDataPoints.nodes.length < data.subDataPoints.totalCount,
|
|
505
|
-
hasPreviousPage: false
|
|
506
|
-
},
|
|
507
|
-
totalCount: data.subDataPoints.totalCount
|
|
508
|
-
};
|
|
509
|
-
}
|
|
510
|
-
async listIdentifiers(options) {
|
|
511
|
-
const data = await this.makeRequest(`
|
|
512
|
-
query ListIdentifiers($first: Int) {
|
|
513
|
-
identifiers(first: $first) {
|
|
514
|
-
nodes {
|
|
515
|
-
id
|
|
516
|
-
name
|
|
517
|
-
type
|
|
518
|
-
}
|
|
519
|
-
totalCount
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
`, { first: Math.min(options?.first || 100, 100) });
|
|
523
|
-
return {
|
|
524
|
-
nodes: data.identifiers.nodes,
|
|
525
|
-
pageInfo: {
|
|
526
|
-
hasNextPage: data.identifiers.nodes.length < data.identifiers.totalCount,
|
|
527
|
-
hasPreviousPage: false
|
|
528
|
-
},
|
|
529
|
-
totalCount: data.identifiers.totalCount
|
|
530
|
-
};
|
|
531
|
-
}
|
|
532
|
-
async listDataCategories(options) {
|
|
533
|
-
const data = await this.makeRequest(`
|
|
534
|
-
query ListDataCategories($first: Int) {
|
|
535
|
-
dataCategories(first: $first) {
|
|
536
|
-
nodes {
|
|
537
|
-
name
|
|
538
|
-
category
|
|
539
|
-
}
|
|
540
|
-
totalCount
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
`, { first: Math.min(options?.first || 100, 100) });
|
|
544
|
-
return {
|
|
545
|
-
nodes: data.dataCategories.nodes,
|
|
546
|
-
pageInfo: {
|
|
547
|
-
hasNextPage: data.dataCategories.nodes.length < data.dataCategories.totalCount,
|
|
548
|
-
hasPreviousPage: false
|
|
549
|
-
},
|
|
550
|
-
totalCount: data.dataCategories.totalCount
|
|
551
|
-
};
|
|
552
|
-
}
|
|
553
|
-
};
|
|
554
|
-
//#endregion
|
|
555
|
-
export { ListSubDataPointsSchema as a, ListDataPointsSchema as c, CreateDataSiloSchema as d, ListVendorsSchema as i, ListCategoriesSchema as l, getInventoryTools as n, ListIdentifiersSchema as o, UpdateDataSiloSchema as r, ListDataSilosSchema as s, InventoryMixin as t, GetDataSiloSchema as u };
|
|
556
|
-
|
|
557
|
-
//# sourceMappingURL=graphql-0tHfKnDD.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"graphql-0tHfKnDD.mjs","names":[],"sources":["../src/tools/inventory_analyze.ts","../src/tools/inventory_create_data_silo.ts","../src/tools/inventory_get_data_silo.ts","../src/tools/inventory_list_categories.ts","../src/tools/inventory_list_data_points.ts","../src/tools/inventory_list_data_silos.ts","../src/tools/inventory_list_identifiers.ts","../src/tools/inventory_list_sub_data_points.ts","../src/tools/inventory_list_vendors.ts","../src/tools/inventory_update_data_silo.ts","../src/tools/index.ts","../src/graphql.ts"],"sourcesContent":["import {\n createToolResult,\n defineTool,\n EmptySchema,\n groupBy,\n type ToolClients,\n} from '@transcend-io/mcp-server-base';\n\nimport type { InventoryMixin } from '../graphql.js';\n\nexport function createInventoryAnalyzeTool(clients: ToolClients) {\n const graphql = clients.graphql as InventoryMixin;\n return defineTool({\n name: 'inventory_analyze',\n description:\n 'Analyze your data inventory including data silos by type, vendor distribution, and data point coverage',\n category: 'Data Inventory',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: EmptySchema,\n handler: async (_args) => {\n const [dataSilosResult, vendorsResult, identifiersResult, categoriesResult] =\n await Promise.all([\n graphql.listDataSilos({ first: 100 }),\n graphql.listVendors({ first: 100 }),\n graphql.listIdentifiers({ first: 100 }),\n graphql.listDataCategories({ first: 100 }),\n ]);\n\n const dataSilos = dataSilosResult.nodes;\n const vendors = vendorsResult.nodes;\n const identifiers = identifiersResult.nodes;\n const categories = categoriesResult.nodes;\n\n const liveDataSilos = dataSilos.filter((ds) => ds.isLive);\n\n return createToolResult(true, {\n summary: {\n totalDataSilos: dataSilos.length,\n liveDataSilos: liveDataSilos.length,\n totalVendors: vendors.length,\n totalIdentifiers: identifiers.length,\n totalCategories: categories.length,\n },\n breakdown: {\n dataSilosByType: groupBy(dataSilos, 'type'),\n dataSilosByOuterType: groupBy(\n dataSilos.filter((ds) => ds.outerType),\n 'outerType' as keyof (typeof dataSilos)[0],\n ),\n },\n topIdentifiers: identifiers.slice(0, 10).map((id) => ({\n name: id.name,\n type: id.type,\n isRequired: id.isRequiredInForm,\n })),\n topCategories: categories.slice(0, 10).map((cat) => ({\n name: cat.name,\n category: cat.category,\n })),\n recommendations: [\n dataSilos.length === 0 ? 'Add data silos to map your data landscape' : null,\n liveDataSilos.length < dataSilos.length\n ? `${dataSilos.length - liveDataSilos.length} data silos are not live - consider activating them`\n : null,\n vendors.length === 0 ? 'Add vendors to track third-party data processors' : null,\n ].filter(Boolean),\n });\n },\n });\n}\n","import { createToolResult, defineTool, z, type ToolClients } from '@transcend-io/mcp-server-base';\n\nimport type { InventoryMixin } from '../graphql.js';\n\nexport const CreateDataSiloSchema = z.object({\n title: z\n .string()\n .describe(\n 'Name/title of the data silo (must match an integrationName in the Transcend catalog, e.g. \"Salesforce\", \"Stripe\")',\n ),\n});\nexport type CreateDataSiloInput = z.infer<typeof CreateDataSiloSchema>;\n\nexport function createInventoryCreateDataSiloTool(clients: ToolClients) {\n const graphql = clients.graphql as InventoryMixin;\n return defineTool({\n name: 'inventory_create_data_silo',\n description:\n 'Create a new data silo (data system or integration). The name must match an integration name from the Transcend catalog.',\n category: 'Data Inventory',\n readOnly: false,\n confirmationHint: 'Creates a new data silo in the inventory',\n annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },\n zodSchema: CreateDataSiloSchema,\n handler: async ({ title }) => {\n const result = await graphql.createDataSilo({\n name: title,\n });\n return createToolResult(true, {\n dataSilo: result,\n message: `Data silo \"${title}\" created successfully`,\n });\n },\n });\n}\n","import { createToolResult, defineTool, z, type ToolClients } from '@transcend-io/mcp-server-base';\n\nimport type { InventoryMixin } from '../graphql.js';\n\nexport const GetDataSiloSchema = z.object({\n data_silo_id: z.string().describe('ID of the data silo to retrieve'),\n});\nexport type GetDataSiloInput = z.infer<typeof GetDataSiloSchema>;\n\nexport function createInventoryGetDataSiloTool(clients: ToolClients) {\n const graphql = clients.graphql as InventoryMixin;\n return defineTool({\n name: 'inventory_get_data_silo',\n description:\n 'Get detailed information about a specific data silo including its data points and identifiers',\n category: 'Data Inventory',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: GetDataSiloSchema,\n handler: async ({ data_silo_id }) => {\n const result = await graphql.getDataSilo(data_silo_id);\n return createToolResult(true, result);\n },\n });\n}\n","import { createListResult, defineTool, z, type ToolClients } from '@transcend-io/mcp-server-base';\n\nimport type { InventoryMixin } from '../graphql.js';\n\nexport const ListCategoriesSchema = z.object({\n limit: z.coerce\n .number()\n .min(1)\n .max(100)\n .optional()\n .default(50)\n .describe('Results per page (1-100, default: 50)'),\n cursor: z\n .string()\n .optional()\n .describe('Pagination cursor from previous response (where supported)'),\n});\nexport type ListCategoriesInput = z.infer<typeof ListCategoriesSchema>;\n\nexport function createInventoryListCategoriesTool(clients: ToolClients) {\n const graphql = clients.graphql as InventoryMixin;\n return defineTool({\n name: 'inventory_list_categories',\n description:\n 'List all data categories (PII types) configured in your organization. Note: API does not support cursor pagination (max ~100 results).',\n category: 'Data Inventory',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: ListCategoriesSchema,\n handler: async ({ limit, cursor }) => {\n const result = await graphql.listDataCategories({\n first: limit,\n after: cursor,\n });\n\n return createListResult(result.nodes, {\n totalCount: result.totalCount,\n hasNextPage: result.pageInfo?.hasNextPage,\n });\n },\n });\n}\n","import { createListResult, defineTool, z, type ToolClients } from '@transcend-io/mcp-server-base';\n\nimport type { InventoryMixin } from '../graphql.js';\n\nexport const ListDataPointsSchema = z.object({\n limit: z.coerce\n .number()\n .min(1)\n .max(100)\n .optional()\n .default(50)\n .describe('Results per page (1-100, default: 50)'),\n cursor: z\n .string()\n .optional()\n .describe('Pagination cursor from previous response (where supported)'),\n});\nexport type ListDataPointsInput = z.infer<typeof ListDataPointsSchema>;\n\nexport function createInventoryListDataPointsTool(clients: ToolClients) {\n const graphql = clients.graphql as InventoryMixin;\n return defineTool({\n name: 'inventory_list_data_points',\n description:\n 'List data points (collections of personal data). Note: API does not support cursor pagination or data_silo filtering (max ~100 results).',\n category: 'Data Inventory',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: ListDataPointsSchema,\n handler: async ({ limit, cursor }) => {\n const result = await graphql.listDataPoints(\n undefined, // dataSiloId not supported by API\n {\n first: limit,\n after: cursor,\n },\n );\n\n return createListResult(result.nodes, {\n totalCount: result.totalCount,\n hasNextPage: result.pageInfo?.hasNextPage,\n });\n },\n });\n}\n","import { createListResult, defineTool, z, type ToolClients } from '@transcend-io/mcp-server-base';\n\nimport type { InventoryMixin } from '../graphql.js';\n\nexport const ListDataSilosSchema = z.object({\n limit: z.coerce\n .number()\n .min(1)\n .max(100)\n .optional()\n .default(50)\n .describe('Results per page (1-100, default: 50)'),\n cursor: z\n .string()\n .optional()\n .describe('Pagination cursor from previous response (where supported)'),\n});\nexport type ListDataSilosInput = z.infer<typeof ListDataSilosSchema>;\n\nexport function createInventoryListDataSilosTool(clients: ToolClients) {\n const graphql = clients.graphql as InventoryMixin;\n return defineTool({\n name: 'inventory_list_data_silos',\n description:\n 'List all data silos (data systems and integrations) in your organization. Note: API does not support cursor pagination (max ~100 results).',\n category: 'Data Inventory',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: ListDataSilosSchema,\n handler: async ({ limit, cursor }) => {\n const result = await graphql.listDataSilos({\n first: limit,\n after: cursor,\n });\n\n return createListResult(result.nodes, {\n totalCount: result.totalCount,\n hasNextPage: result.pageInfo?.hasNextPage,\n });\n },\n });\n}\n","import { createListResult, defineTool, z, type ToolClients } from '@transcend-io/mcp-server-base';\n\nimport type { InventoryMixin } from '../graphql.js';\n\nexport const ListIdentifiersSchema = z.object({\n limit: z.coerce\n .number()\n .min(1)\n .max(100)\n .optional()\n .default(50)\n .describe('Results per page (1-100, default: 50)'),\n cursor: z\n .string()\n .optional()\n .describe('Pagination cursor from previous response (where supported)'),\n});\nexport type ListIdentifiersInput = z.infer<typeof ListIdentifiersSchema>;\n\nexport function createInventoryListIdentifiersTool(clients: ToolClients) {\n const graphql = clients.graphql as InventoryMixin;\n return defineTool({\n name: 'inventory_list_identifiers',\n description:\n 'List all identifier types (email, user ID, etc.) configured in your organization. Note: API does not support cursor pagination (max ~100 results).',\n category: 'Data Inventory',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: ListIdentifiersSchema,\n handler: async ({ limit, cursor }) => {\n const result = await graphql.listIdentifiers({\n first: limit,\n after: cursor,\n });\n\n return createListResult(result.nodes, {\n totalCount: result.totalCount,\n hasNextPage: result.pageInfo?.hasNextPage,\n });\n },\n });\n}\n","import { createListResult, defineTool, z, type ToolClients } from '@transcend-io/mcp-server-base';\n\nimport type { InventoryMixin } from '../graphql.js';\n\nexport const ListSubDataPointsSchema = z.object({\n data_point_id: z.string().describe('ID of the parent data point'),\n limit: z.coerce\n .number()\n .min(1)\n .max(100)\n .optional()\n .default(50)\n .describe('Results per page (1-100, default: 50)'),\n offset: z.coerce\n .number()\n .min(0)\n .optional()\n .default(0)\n .describe('Number of results to skip (default: 0)'),\n});\nexport type ListSubDataPointsInput = z.infer<typeof ListSubDataPointsSchema>;\n\nexport function createInventoryListSubDataPointsTool(clients: ToolClients) {\n const graphql = clients.graphql as InventoryMixin;\n return defineTool({\n name: 'inventory_list_sub_data_points',\n description:\n 'List sub-data points (individual data fields) for a specific data point. Note: This feature may have limited availability.',\n category: 'Data Inventory',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: ListSubDataPointsSchema,\n handler: async ({ data_point_id, limit, offset }) => {\n const result = await graphql.listSubDataPoints(data_point_id, {\n first: limit,\n offset,\n });\n\n return createListResult(result.nodes, {\n totalCount: result.totalCount,\n hasNextPage: result.pageInfo?.hasNextPage,\n });\n },\n });\n}\n","import { createListResult, defineTool, z, type ToolClients } from '@transcend-io/mcp-server-base';\n\nimport type { InventoryMixin } from '../graphql.js';\n\nexport const ListVendorsSchema = z.object({\n limit: z.coerce\n .number()\n .min(1)\n .max(100)\n .optional()\n .default(50)\n .describe('Results per page (1-100, default: 50)'),\n cursor: z\n .string()\n .optional()\n .describe('Pagination cursor from previous response (where supported)'),\n});\nexport type ListVendorsInput = z.infer<typeof ListVendorsSchema>;\n\nexport function createInventoryListVendorsTool(clients: ToolClients) {\n const graphql = clients.graphql as InventoryMixin;\n return defineTool({\n name: 'inventory_list_vendors',\n description:\n 'List all vendors (third-party data processors) in your organization. Note: API does not support cursor pagination (max ~100 results).',\n category: 'Data Inventory',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: ListVendorsSchema,\n handler: async ({ limit, cursor }) => {\n const result = await graphql.listVendors({\n first: limit,\n after: cursor,\n });\n\n return createListResult(result.nodes, {\n totalCount: result.totalCount,\n hasNextPage: result.pageInfo?.hasNextPage,\n });\n },\n });\n}\n","import { createToolResult, defineTool, z, type ToolClients } from '@transcend-io/mcp-server-base';\n\nimport type { InventoryMixin } from '../graphql.js';\n\nexport const UpdateDataSiloSchema = z.object({\n data_silo_id: z.string().describe('ID of the data silo to update'),\n title: z.string().optional().describe('New title for the data silo'),\n description: z.string().optional().describe('New description'),\n});\nexport type UpdateDataSiloInput = z.infer<typeof UpdateDataSiloSchema>;\n\nexport function createInventoryUpdateDataSiloTool(clients: ToolClients) {\n const graphql = clients.graphql as InventoryMixin;\n return defineTool({\n name: 'inventory_update_data_silo',\n description: 'Update an existing data silo',\n category: 'Data Inventory',\n readOnly: false,\n confirmationHint: 'Updates the data silo configuration',\n annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },\n zodSchema: UpdateDataSiloSchema,\n handler: async ({ data_silo_id, title, description }) => {\n const result = await graphql.updateDataSilo({\n id: data_silo_id,\n title,\n description,\n });\n return createToolResult(true, {\n dataSilo: result,\n message: 'Data silo updated successfully',\n });\n },\n });\n}\n","import type { ToolDefinition, ToolClients } from '@transcend-io/mcp-server-base';\n\nimport { createInventoryAnalyzeTool } from './inventory_analyze.js';\nimport { createInventoryCreateDataSiloTool } from './inventory_create_data_silo.js';\nimport { createInventoryGetDataSiloTool } from './inventory_get_data_silo.js';\nimport { createInventoryListCategoriesTool } from './inventory_list_categories.js';\nimport { createInventoryListDataPointsTool } from './inventory_list_data_points.js';\nimport { createInventoryListDataSilosTool } from './inventory_list_data_silos.js';\nimport { createInventoryListIdentifiersTool } from './inventory_list_identifiers.js';\nimport { createInventoryListSubDataPointsTool } from './inventory_list_sub_data_points.js';\nimport { createInventoryListVendorsTool } from './inventory_list_vendors.js';\nimport { createInventoryUpdateDataSiloTool } from './inventory_update_data_silo.js';\n\nexport function getInventoryTools(clients: ToolClients): ToolDefinition[] {\n return [\n createInventoryListDataSilosTool(clients),\n createInventoryGetDataSiloTool(clients),\n createInventoryCreateDataSiloTool(clients),\n createInventoryUpdateDataSiloTool(clients),\n createInventoryListVendorsTool(clients),\n createInventoryListDataPointsTool(clients),\n createInventoryListSubDataPointsTool(clients),\n createInventoryListIdentifiersTool(clients),\n createInventoryListCategoriesTool(clients),\n createInventoryAnalyzeTool(clients),\n ];\n}\n","import {\n TranscendGraphQLBase,\n type DataCategory,\n type DataPoint,\n type DataSilo,\n type DataSiloCreateInput,\n type DataSiloDetails,\n type DataSiloUpdateInput,\n type Identifier,\n type ListOptions,\n type PaginatedResponse,\n type SubDataPoint,\n type Vendor,\n} from '@transcend-io/mcp-server-base';\n\nexport class InventoryMixin extends TranscendGraphQLBase {\n async listDataSilos(options?: ListOptions): Promise<PaginatedResponse<DataSilo>> {\n const query = `\n query ListDataSilos($first: Int) {\n dataSilos(first: $first) {\n nodes {\n id\n title\n type\n }\n totalCount\n }\n }\n `;\n const data = await this.makeRequest<{ dataSilos: { nodes: DataSilo[]; totalCount: number } }>(\n query,\n { first: Math.min(options?.first || 100, 100) },\n );\n return {\n nodes: data.dataSilos.nodes,\n pageInfo: {\n hasNextPage: data.dataSilos.nodes.length < data.dataSilos.totalCount,\n hasPreviousPage: false,\n },\n totalCount: data.dataSilos.totalCount,\n };\n }\n\n async getDataSilo(id: string): Promise<DataSiloDetails> {\n const query = `\n query GetDataSilo($id: String!) {\n dataSilo(id: $id) {\n id\n title\n type\n description\n link\n isLive\n outerType\n createdAt\n connectionState\n identifiers {\n id\n name\n type\n isRequiredInForm\n }\n }\n }\n `;\n const data = await this.makeRequest<{ dataSilo: DataSiloDetails }>(query, { id });\n return data.dataSilo;\n }\n\n async createDataSilo(input: DataSiloCreateInput): Promise<DataSilo> {\n const mutation = `\n mutation CreateDataSilos($input: [CreateDataSilosInput!]!) {\n createDataSilos(input: $input) {\n dataSilos {\n id\n title\n type\n description\n isLive\n createdAt\n }\n }\n }\n `;\n const data = await this.makeRequest<{ createDataSilos: { dataSilos: DataSilo[] } }>(mutation, {\n input: [input],\n });\n const created = data.createDataSilos.dataSilos[0];\n if (!created) throw new Error('createDataSilos returned an empty array');\n return created;\n }\n\n async updateDataSilo(input: DataSiloUpdateInput): Promise<DataSilo> {\n const mutation = `\n mutation UpdateDataSilos($input: UpdateDataSilosInput!) {\n updateDataSilos(input: $input) {\n dataSilos {\n id\n title\n type\n description\n isLive\n createdAt\n updatedAt\n }\n }\n }\n `;\n const wrappedInput = { dataSilos: [input] };\n const data = await this.makeRequest<{ updateDataSilos: { dataSilos: DataSilo[] } }>(mutation, {\n input: wrappedInput,\n });\n const updated = data.updateDataSilos.dataSilos[0];\n if (!updated) throw new Error('updateDataSilos returned an empty array');\n return updated;\n }\n\n async listVendors(options?: ListOptions): Promise<PaginatedResponse<Vendor>> {\n const query = `\n query ListVendors($first: Int) {\n vendors(first: $first) {\n nodes {\n id\n title\n }\n totalCount\n }\n }\n `;\n const data = await this.makeRequest<{ vendors: { nodes: Vendor[]; totalCount: number } }>(\n query,\n { first: Math.min(options?.first || 100, 100) },\n );\n return {\n nodes: data.vendors.nodes,\n pageInfo: {\n hasNextPage: data.vendors.nodes.length < data.vendors.totalCount,\n hasPreviousPage: false,\n },\n totalCount: data.vendors.totalCount,\n };\n }\n\n async listDataPoints(\n _dataSiloId?: string,\n options?: ListOptions,\n ): Promise<PaginatedResponse<DataPoint>> {\n const query = `\n query ListDataPoints($first: Int) {\n dataPoints(first: $first) {\n nodes {\n id\n name\n title {\n defaultMessage\n }\n description {\n defaultMessage\n }\n }\n totalCount\n }\n }\n `;\n const data = await this.makeRequest<{\n dataPoints: {\n nodes: Array<{\n id: string;\n name: string;\n title: { defaultMessage: string };\n description: { defaultMessage: string } | null;\n }>;\n totalCount: number;\n };\n }>(query, { first: Math.min(options?.first || 100, 100) });\n const points: DataPoint[] = data.dataPoints.nodes.map((dp) => ({\n id: dp.id,\n name: dp.name,\n title: dp.title?.defaultMessage,\n description: dp.description?.defaultMessage,\n createdAt: new Date().toISOString(),\n updatedAt: new Date().toISOString(),\n }));\n return {\n nodes: points,\n pageInfo: { hasNextPage: points.length < data.dataPoints.totalCount, hasPreviousPage: false },\n totalCount: data.dataPoints.totalCount,\n };\n }\n\n async listSubDataPoints(\n dataPointId: string,\n options?: ListOptions,\n ): Promise<PaginatedResponse<SubDataPoint>> {\n const query = `\n query ListSubDataPoints($first: Int, $offset: Int, $filterBy: SubDataPointFiltersInput) {\n subDataPoints(first: $first, offset: $offset, filterBy: $filterBy) {\n nodes {\n id\n name\n description\n accessRequestVisibilityEnabled\n }\n totalCount\n }\n }\n `;\n const data = await this.makeRequest<{\n subDataPoints: { nodes: SubDataPoint[]; totalCount: number };\n }>(query, {\n first: Math.min(options?.first || 100, 100),\n offset: options?.offset || 0,\n filterBy: { dataPoints: [dataPointId] },\n });\n return {\n nodes: data.subDataPoints.nodes,\n pageInfo: {\n hasNextPage: data.subDataPoints.nodes.length < data.subDataPoints.totalCount,\n hasPreviousPage: false,\n },\n totalCount: data.subDataPoints.totalCount,\n };\n }\n\n async listIdentifiers(options?: ListOptions): Promise<PaginatedResponse<Identifier>> {\n const query = `\n query ListIdentifiers($first: Int) {\n identifiers(first: $first) {\n nodes {\n id\n name\n type\n }\n totalCount\n }\n }\n `;\n const data = await this.makeRequest<{\n identifiers: { nodes: Identifier[]; totalCount: number };\n }>(query, { first: Math.min(options?.first || 100, 100) });\n return {\n nodes: data.identifiers.nodes,\n pageInfo: {\n hasNextPage: data.identifiers.nodes.length < data.identifiers.totalCount,\n hasPreviousPage: false,\n },\n totalCount: data.identifiers.totalCount,\n };\n }\n\n async listDataCategories(options?: ListOptions): Promise<PaginatedResponse<DataCategory>> {\n const query = `\n query ListDataCategories($first: Int) {\n dataCategories(first: $first) {\n nodes {\n name\n category\n }\n totalCount\n }\n }\n `;\n const data = await this.makeRequest<{\n dataCategories: { nodes: DataCategory[]; totalCount: number };\n }>(query, { first: Math.min(options?.first || 100, 100) });\n return {\n nodes: data.dataCategories.nodes,\n pageInfo: {\n hasNextPage: data.dataCategories.nodes.length < data.dataCategories.totalCount,\n hasPreviousPage: false,\n },\n totalCount: data.dataCategories.totalCount,\n };\n }\n}\n"],"mappings":";;AAUA,SAAgB,2BAA2B,SAAsB;CAC/D,MAAM,UAAU,QAAQ;AACxB,QAAO,WAAW;EAChB,MAAM;EACN,aACE;EACF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