@transcend-io/mcp-server-dsr 0.3.19 → 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.
@@ -1,484 +0,0 @@
1
- import { PaginationSchema, TranscendGraphQLBase, createListResult, createToolResult, defineTool, groupBy, z } from "@transcend-io/mcp-server-base";
2
- import { RequestAction } from "@transcend-io/privacy-types";
3
- //#region src/tools/dsr_analyze.ts
4
- const analyzeDsrSchema = z.object({ days: z.coerce.number().optional().describe("Filter analysis to requests within N days (default: 30). Only analyzes from the 100 most recent requests.") });
5
- function createDsrAnalyzeTool(clients) {
6
- const graphql = clients.graphql;
7
- return defineTool({
8
- name: "dsr_analyze",
9
- description: "Summarize the 100 most recent DSRs: counts by type and status, completion rate, and a configurable recent-days window (default 30). For full-fleet analytics, page through dsr_list and aggregate yourself.",
10
- category: "DSR Automation",
11
- readOnly: true,
12
- annotations: {
13
- readOnlyHint: true,
14
- destructiveHint: false,
15
- idempotentHint: true
16
- },
17
- zodSchema: analyzeDsrSchema,
18
- handler: async ({ days }) => {
19
- const result = await graphql.listRequests({ first: 100 });
20
- const requests = result.nodes;
21
- const periodDays = days ?? 30;
22
- const cutoffDate = /* @__PURE__ */ new Date(Date.now() - periodDays * 24 * 60 * 60 * 1e3);
23
- const recentRequests = requests.filter((r) => new Date(r.createdAt) > cutoffDate);
24
- const completedRequests = requests.filter((r) => r.status === "COMPLETED");
25
- const pendingRequests = requests.filter((r) => [
26
- "REQUEST_MADE",
27
- "ENRICHING",
28
- "ON_HOLD",
29
- "WAITING",
30
- "COMPILING",
31
- "APPROVING",
32
- "DELAYED",
33
- "SECONDARY",
34
- "SECONDARY_APPROVING"
35
- ].includes(r.status));
36
- return createToolResult(true, {
37
- summary: {
38
- analyzedRequests: requests.length,
39
- totalRequestsInSystem: result.totalCount,
40
- recentRequests: recentRequests.length,
41
- completedRequests: completedRequests.length,
42
- pendingRequests: pendingRequests.length,
43
- completionRate: requests.length > 0 ? Math.round(completedRequests.length / requests.length * 100) : 0
44
- },
45
- breakdown: {
46
- byType: groupBy(requests, "type"),
47
- byStatus: groupBy(requests, "status"),
48
- recentByType: groupBy(recentRequests, "type"),
49
- recentByStatus: groupBy(recentRequests, "status")
50
- },
51
- period: {
52
- days: periodDays,
53
- startDate: cutoffDate.toISOString(),
54
- endDate: (/* @__PURE__ */ new Date()).toISOString()
55
- },
56
- limitation: (result.totalCount || 0) > 100 ? `This analysis is based on the 100 most recent requests out of ${result.totalCount} total. For complete analysis, use dsr_list with pagination to fetch all requests.` : void 0
57
- });
58
- }
59
- });
60
- }
61
- //#endregion
62
- //#region src/tools/dsr_cancel.ts
63
- const cancelDsrSchema = z.object({
64
- request_id: z.string().describe("ID of the DSR to cancel"),
65
- reason: z.string().optional().describe("Reason for cancellation (optional)")
66
- });
67
- function createDsrCancelTool(clients) {
68
- const graphql = clients.graphql;
69
- return defineTool({
70
- name: "dsr_cancel",
71
- description: "Cancel a Data Subject Request",
72
- category: "DSR Automation",
73
- readOnly: false,
74
- confirmationHint: "Cancels the specified request permanently",
75
- annotations: {
76
- readOnlyHint: false,
77
- destructiveHint: true,
78
- idempotentHint: false
79
- },
80
- zodSchema: cancelDsrSchema,
81
- handler: async ({ request_id, reason }) => {
82
- const input = { requestId: request_id };
83
- if (reason) input.subject = reason;
84
- return createToolResult(true, {
85
- request: (await graphql.cancelRequest(input)).request,
86
- message: "DSR canceled successfully"
87
- });
88
- }
89
- });
90
- }
91
- //#endregion
92
- //#region src/tools/dsr_download_keys.ts
93
- const downloadKeysSchema = z.object({ request_id: z.string().describe("ID of the completed DSR") });
94
- function createDsrDownloadKeysTool(clients) {
95
- const { rest } = clients;
96
- return defineTool({
97
- name: "dsr_download_keys",
98
- description: "Get download keys for a completed Data Subject Request. These keys can be used to download the DSR results.",
99
- category: "DSR Automation",
100
- readOnly: true,
101
- annotations: {
102
- readOnlyHint: true,
103
- destructiveHint: false,
104
- idempotentHint: true
105
- },
106
- zodSchema: downloadKeysSchema,
107
- handler: async ({ request_id }) => {
108
- const keys = await rest.getDSRDownloadKeys(request_id);
109
- return createToolResult(true, {
110
- downloadKeys: keys,
111
- count: keys.length
112
- });
113
- }
114
- });
115
- }
116
- //#endregion
117
- //#region src/tools/dsr_enrich_identifiers.ts
118
- const enrichIdentifiersSchema = z.object({
119
- request_id: z.string().describe("ID of the DSR to enrich"),
120
- identifiers: z.record(z.string(), z.string()).describe("Key-value pairs of identifier names and values to add")
121
- });
122
- function createDsrEnrichIdentifiersTool(clients) {
123
- const { rest } = clients;
124
- return defineTool({
125
- name: "dsr_enrich_identifiers",
126
- description: "Enrich a Data Subject Request with additional identifiers during preflight processing",
127
- category: "DSR Automation",
128
- readOnly: false,
129
- confirmationHint: "Adds identifiers to the DSR during preflight",
130
- annotations: {
131
- readOnlyHint: false,
132
- destructiveHint: false,
133
- idempotentHint: false
134
- },
135
- zodSchema: enrichIdentifiersSchema,
136
- handler: async ({ request_id, identifiers }) => {
137
- return createToolResult(true, {
138
- ...await rest.enrichIdentifiers({
139
- requestId: request_id,
140
- identifiers
141
- }),
142
- message: "Identifiers enriched successfully"
143
- });
144
- }
145
- });
146
- }
147
- //#endregion
148
- //#region src/tools/dsr_get_details.ts
149
- const getDetailsSchema = z.object({ request_id: z.string().describe("ID of the DSR to retrieve") });
150
- function createDsrGetDetailsTool(clients) {
151
- const graphql = clients.graphql;
152
- return defineTool({
153
- name: "dsr_get_details",
154
- description: "Get detailed information about a specific Data Subject Request",
155
- category: "DSR Automation",
156
- readOnly: true,
157
- annotations: {
158
- readOnlyHint: true,
159
- destructiveHint: false,
160
- idempotentHint: true
161
- },
162
- zodSchema: getDetailsSchema,
163
- handler: async ({ request_id }) => {
164
- return createToolResult(true, await graphql.getRequest(request_id));
165
- }
166
- });
167
- }
168
- //#endregion
169
- //#region src/tools/dsr_list.ts
170
- function createDsrListTool(clients) {
171
- const graphql = clients.graphql;
172
- return defineTool({
173
- name: "dsr_list",
174
- description: "List all Data Subject Requests. Use cursor pagination to retrieve all results (max 100 per page). Note: Server-side date filtering is not available - filter results client-side if needed.",
175
- category: "DSR Automation",
176
- readOnly: true,
177
- annotations: {
178
- readOnlyHint: true,
179
- destructiveHint: false,
180
- idempotentHint: true
181
- },
182
- zodSchema: PaginationSchema,
183
- handler: async ({ limit, cursor }) => {
184
- const result = await graphql.listRequests({
185
- first: limit,
186
- after: cursor
187
- });
188
- return createListResult(result.nodes, {
189
- totalCount: result.totalCount,
190
- hasNextPage: result.pageInfo?.hasNextPage,
191
- cursor: result.pageInfo?.endCursor,
192
- paginationNote: result.pageInfo?.hasNextPage ? "More results available. Pass the cursor value to fetch the next page." : "No more results."
193
- });
194
- }
195
- });
196
- }
197
- //#endregion
198
- //#region src/tools/dsr_list_identifiers.ts
199
- const listIdentifiersSchema = z.object({ request_id: z.string().describe("ID of the DSR") }).merge(PaginationSchema);
200
- function createDsrListIdentifiersTool(clients) {
201
- const { rest } = clients;
202
- return defineTool({
203
- name: "dsr_list_identifiers",
204
- description: "List all identifiers attached to a Data Subject Request",
205
- category: "DSR Automation",
206
- readOnly: true,
207
- annotations: {
208
- readOnlyHint: true,
209
- destructiveHint: false,
210
- idempotentHint: true
211
- },
212
- zodSchema: listIdentifiersSchema,
213
- handler: async ({ request_id }) => {
214
- return createListResult(await rest.listRequestIdentifiers(request_id));
215
- }
216
- });
217
- }
218
- //#endregion
219
- //#region src/tools/dsr_poll_status.ts
220
- const pollStatusSchema = z.object({ request_id: z.string().describe("ID of the DSR to check") });
221
- function createDsrPollStatusTool(clients) {
222
- const { rest } = clients;
223
- return defineTool({
224
- name: "dsr_poll_status",
225
- description: "Poll the current status of a Data Subject Request",
226
- category: "DSR Automation",
227
- readOnly: true,
228
- annotations: {
229
- readOnlyHint: true,
230
- destructiveHint: false,
231
- idempotentHint: true
232
- },
233
- zodSchema: pollStatusSchema,
234
- handler: async ({ request_id }) => {
235
- return createToolResult(true, await rest.getDSRStatus(request_id));
236
- }
237
- });
238
- }
239
- //#endregion
240
- //#region src/tools/dsr_respond_access.ts
241
- const respondAccessSchema = z.object({
242
- request_id: z.string().describe("ID of the DSR"),
243
- data_silo_id: z.string().describe("ID of the data silo responding"),
244
- profiles: z.array(z.record(z.string(), z.unknown())).optional().describe("Array of profile data objects to return")
245
- });
246
- function createDsrRespondAccessTool(clients) {
247
- const { rest } = clients;
248
- return defineTool({
249
- name: "dsr_respond_access",
250
- description: "Respond to an ACCESS request by uploading user data",
251
- category: "DSR Automation",
252
- readOnly: false,
253
- confirmationHint: "Uploads access response data for the DSR",
254
- annotations: {
255
- readOnlyHint: false,
256
- destructiveHint: false,
257
- idempotentHint: false
258
- },
259
- zodSchema: respondAccessSchema,
260
- handler: async ({ request_id, data_silo_id, profiles }) => {
261
- return createToolResult(true, {
262
- ...await rest.respondToAccess({
263
- requestId: request_id,
264
- dataSiloId: data_silo_id,
265
- profiles
266
- }),
267
- message: "Access response submitted successfully"
268
- });
269
- }
270
- });
271
- }
272
- //#endregion
273
- //#region src/tools/dsr_respond_erasure.ts
274
- const respondErasureSchema = z.object({
275
- request_id: z.string().describe("ID of the DSR"),
276
- data_silo_id: z.string().describe("ID of the data silo that completed erasure"),
277
- profile_ids: z.array(z.string()).optional().describe("IDs of profiles that were erased (optional)")
278
- });
279
- function createDsrRespondErasureTool(clients) {
280
- const { rest } = clients;
281
- return defineTool({
282
- name: "dsr_respond_erasure",
283
- description: "Confirm that data erasure has been completed for a data silo",
284
- category: "DSR Automation",
285
- readOnly: false,
286
- confirmationHint: "Confirms erasure completion for the data silo",
287
- annotations: {
288
- readOnlyHint: false,
289
- destructiveHint: false,
290
- idempotentHint: true
291
- },
292
- zodSchema: respondErasureSchema,
293
- handler: async ({ request_id, data_silo_id, profile_ids }) => {
294
- return createToolResult(true, {
295
- ...await rest.confirmErasure({
296
- requestId: request_id,
297
- dataSiloId: data_silo_id,
298
- profileIds: profile_ids
299
- }),
300
- message: "Erasure confirmation submitted successfully"
301
- });
302
- }
303
- });
304
- }
305
- //#endregion
306
- //#region src/tools/dsr_submit.ts
307
- const submitDsrSchema = z.object({
308
- type: z.nativeEnum(RequestAction).describe("Type of DSR request"),
309
- email: z.string().describe("Email address of the data subject"),
310
- subjectType: z.string().describe("Type of data subject (e.g., customer, employee, prospect). Required by the Transcend API."),
311
- coreIdentifier: z.string().optional().describe("Core identifier for the data subject (defaults to email if not provided)"),
312
- name: z.string().optional().describe("Name of the data subject (optional)"),
313
- locale: z.string().optional().describe("Locale for communications (e.g., en-US)"),
314
- isSilent: z.boolean().optional().describe("Whether to suppress email notifications")
315
- });
316
- function createDsrSubmitTool(clients) {
317
- const { rest } = clients;
318
- return defineTool({
319
- name: "dsr_submit",
320
- description: "Submit a Data Subject Request as the data subject (public DSR API; e.g. Privacy Center flow). Supports ACCESS, ERASURE, RECTIFICATION, etc. coreIdentifier defaults to email. Use dsr_submit_on_behalf when an admin is filing on behalf of a data subject.",
321
- category: "DSR Automation",
322
- readOnly: false,
323
- confirmationHint: "Creates a new data subject request",
324
- annotations: {
325
- readOnlyHint: false,
326
- destructiveHint: false,
327
- idempotentHint: false
328
- },
329
- zodSchema: submitDsrSchema,
330
- handler: async ({ type, email, subjectType, coreIdentifier, name, locale, isSilent }) => {
331
- return createToolResult(true, {
332
- request: await rest.submitDSR({
333
- type,
334
- email,
335
- subjectType,
336
- coreIdentifier,
337
- name,
338
- locale,
339
- isSilent
340
- }),
341
- message: `DSR of type ${type} submitted successfully`
342
- });
343
- }
344
- });
345
- }
346
- //#endregion
347
- //#region src/tools/dsr_submit_on_behalf.ts
348
- const submitDsrOnBehalfSchema = z.object({
349
- type: z.nativeEnum(RequestAction).describe("Type of DSR request"),
350
- email: z.string().describe("Email address of the data subject"),
351
- subjectType: z.string().describe("Type of data subject (e.g., customer, employee). Required by the Transcend API."),
352
- coreIdentifier: z.string().optional().describe("Core identifier for the data subject (optional)"),
353
- locale: z.string().optional().describe("Locale for communications (e.g., en-US)"),
354
- isSilent: z.boolean().optional().describe("Whether to suppress email notifications")
355
- });
356
- function createDsrSubmitOnBehalfTool(clients) {
357
- const graphql = clients.graphql;
358
- return defineTool({
359
- name: "dsr_submit_on_behalf",
360
- description: "Submit a Data Subject Request as an admin on behalf of a data subject (admin-dashboard flow). Use dsr_submit when the data subject is submitting their own.",
361
- category: "DSR Automation",
362
- readOnly: false,
363
- confirmationHint: "Creates a new data subject request on behalf of a data subject",
364
- annotations: {
365
- readOnlyHint: false,
366
- destructiveHint: false,
367
- idempotentHint: false
368
- },
369
- zodSchema: submitDsrOnBehalfSchema,
370
- handler: async ({ type, email, subjectType, coreIdentifier, locale, isSilent }) => {
371
- const result = await graphql.employeeMakeDataSubjectRequest({
372
- type,
373
- email,
374
- subjectType,
375
- coreIdentifier,
376
- locale,
377
- isSilent
378
- });
379
- return createToolResult(true, {
380
- request: result.request,
381
- clientMutationId: result.clientMutationId,
382
- message: `DSR of type ${type} submitted on behalf of data subject`
383
- });
384
- }
385
- });
386
- }
387
- //#endregion
388
- //#region src/tools/index.ts
389
- function getDSRTools(clients) {
390
- return [
391
- createDsrSubmitTool(clients),
392
- createDsrPollStatusTool(clients),
393
- createDsrListTool(clients),
394
- createDsrGetDetailsTool(clients),
395
- createDsrDownloadKeysTool(clients),
396
- createDsrListIdentifiersTool(clients),
397
- createDsrEnrichIdentifiersTool(clients),
398
- createDsrRespondAccessTool(clients),
399
- createDsrRespondErasureTool(clients),
400
- createDsrCancelTool(clients),
401
- createDsrSubmitOnBehalfTool(clients),
402
- createDsrAnalyzeTool(clients)
403
- ];
404
- }
405
- //#endregion
406
- //#region src/graphql.ts
407
- var DSRMixin = class extends TranscendGraphQLBase {
408
- async listRequests(options) {
409
- return (await this.makeRequest(`
410
- query ListRequests($first: Int, $after: String) {
411
- requests(first: $first, after: $after) {
412
- nodes {
413
- id
414
- type
415
- status
416
- createdAt
417
- updatedAt
418
- }
419
- pageInfo {
420
- hasNextPage
421
- endCursor
422
- }
423
- totalCount
424
- }
425
- }
426
- `, {
427
- first: Math.min(options?.first || 50, 100),
428
- after: options?.after
429
- })).requests;
430
- }
431
- async getRequest(id) {
432
- return (await this.makeRequest(`
433
- query GetRequest($id: ID!) {
434
- request(id: $id) {
435
- id
436
- type
437
- status
438
- createdAt
439
- updatedAt
440
- daysRemaining
441
- link
442
- locale
443
- isSilent
444
- }
445
- }
446
- `, { id })).request;
447
- }
448
- async employeeMakeDataSubjectRequest(input) {
449
- return (await this.makeRequest(`
450
- mutation EmployeeMakeDataSubjectRequest($input: EmployeeRequestInput!) {
451
- employeeMakeDataSubjectRequest(input: $input) {
452
- clientMutationId
453
- request {
454
- id
455
- type
456
- status
457
- createdAt
458
- updatedAt
459
- }
460
- }
461
- }
462
- `, { input })).employeeMakeDataSubjectRequest;
463
- }
464
- async cancelRequest(input) {
465
- return (await this.makeRequest(`
466
- mutation CancelRequest($input: CommunicationInput!) {
467
- cancelRequest(input: $input) {
468
- clientMutationId
469
- request {
470
- id
471
- type
472
- status
473
- createdAt
474
- updatedAt
475
- }
476
- }
477
- }
478
- `, { input })).cancelRequest;
479
- }
480
- };
481
- //#endregion
482
- export { respondErasureSchema as a, listIdentifiersSchema as c, downloadKeysSchema as d, cancelDsrSchema as f, submitDsrSchema as i, getDetailsSchema as l, getDSRTools as n, respondAccessSchema as o, analyzeDsrSchema as p, submitDsrOnBehalfSchema as r, pollStatusSchema as s, DSRMixin as t, enrichIdentifiersSchema as u };
483
-
484
- //# sourceMappingURL=graphql-CSrIBjNn.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"graphql-CSrIBjNn.mjs","names":[],"sources":["../src/tools/dsr_analyze.ts","../src/tools/dsr_cancel.ts","../src/tools/dsr_download_keys.ts","../src/tools/dsr_enrich_identifiers.ts","../src/tools/dsr_get_details.ts","../src/tools/dsr_list.ts","../src/tools/dsr_list_identifiers.ts","../src/tools/dsr_poll_status.ts","../src/tools/dsr_respond_access.ts","../src/tools/dsr_respond_erasure.ts","../src/tools/dsr_submit.ts","../src/tools/dsr_submit_on_behalf.ts","../src/tools/index.ts","../src/graphql.ts"],"sourcesContent":["import {\n createToolResult,\n defineTool,\n groupBy,\n type ToolClients,\n z,\n} from '@transcend-io/mcp-server-base';\n\nimport type { DSRMixin } from '../graphql.js';\n\nexport const analyzeDsrSchema = z.object({\n days: z.coerce\n .number()\n .optional()\n .describe(\n 'Filter analysis to requests within N days (default: 30). Only analyzes from the 100 most recent requests.',\n ),\n});\nexport type AnalyzeDsrInput = z.infer<typeof analyzeDsrSchema>;\n\nexport function createDsrAnalyzeTool(clients: ToolClients) {\n const graphql = clients.graphql as DSRMixin;\n\n return defineTool({\n name: 'dsr_analyze',\n description:\n 'Summarize the 100 most recent DSRs: counts by type and status, completion rate, and a configurable recent-days window (default 30). For full-fleet analytics, page through dsr_list and aggregate yourself.',\n category: 'DSR Automation',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: analyzeDsrSchema,\n handler: async ({ days }) => {\n const result = await graphql.listRequests({ first: 100 });\n const requests = result.nodes;\n const periodDays = days ?? 30;\n const cutoffDate = new Date(Date.now() - periodDays * 24 * 60 * 60 * 1000);\n\n const recentRequests = requests.filter((r) => new Date(r.createdAt) > cutoffDate);\n const completedRequests = requests.filter((r) => r.status === 'COMPLETED');\n const pendingRequests = requests.filter((r) =>\n [\n 'REQUEST_MADE',\n 'ENRICHING',\n 'ON_HOLD',\n 'WAITING',\n 'COMPILING',\n 'APPROVING',\n 'DELAYED',\n 'SECONDARY',\n 'SECONDARY_APPROVING',\n ].includes(r.status),\n );\n\n return createToolResult(true, {\n summary: {\n analyzedRequests: requests.length,\n totalRequestsInSystem: result.totalCount,\n recentRequests: recentRequests.length,\n completedRequests: completedRequests.length,\n pendingRequests: pendingRequests.length,\n completionRate:\n requests.length > 0\n ? Math.round((completedRequests.length / requests.length) * 100)\n : 0,\n },\n breakdown: {\n byType: groupBy(requests, 'type'),\n byStatus: groupBy(requests, 'status'),\n recentByType: groupBy(recentRequests, 'type'),\n recentByStatus: groupBy(recentRequests, 'status'),\n },\n period: {\n days: periodDays,\n startDate: cutoffDate.toISOString(),\n endDate: new Date().toISOString(),\n },\n limitation:\n (result.totalCount || 0) > 100\n ? `This analysis is based on the 100 most recent requests out of ${result.totalCount} total. For complete analysis, use dsr_list with pagination to fetch all requests.`\n : undefined,\n });\n },\n });\n}\n","import { createToolResult, defineTool, type ToolClients, z } from '@transcend-io/mcp-server-base';\n\nimport type { DSRMixin } from '../graphql.js';\n\nexport const cancelDsrSchema = z.object({\n request_id: z.string().describe('ID of the DSR to cancel'),\n reason: z.string().optional().describe('Reason for cancellation (optional)'),\n});\nexport type CancelDsrInput = z.infer<typeof cancelDsrSchema>;\n\nexport function createDsrCancelTool(clients: ToolClients) {\n const graphql = clients.graphql as DSRMixin;\n\n return defineTool({\n name: 'dsr_cancel',\n description: 'Cancel a Data Subject Request',\n category: 'DSR Automation',\n readOnly: false,\n confirmationHint: 'Cancels the specified request permanently',\n annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },\n zodSchema: cancelDsrSchema,\n handler: async ({ request_id, reason }) => {\n const input: { requestId: string; template?: string; subject?: string } = {\n requestId: request_id,\n };\n if (reason) {\n input.subject = reason;\n }\n const result = await graphql.cancelRequest(input);\n return createToolResult(true, {\n request: result.request,\n message: 'DSR canceled successfully',\n });\n },\n });\n}\n","import { createToolResult, defineTool, type ToolClients, z } from '@transcend-io/mcp-server-base';\n\nexport const downloadKeysSchema = z.object({\n request_id: z.string().describe('ID of the completed DSR'),\n});\nexport type DownloadKeysInput = z.infer<typeof downloadKeysSchema>;\n\nexport function createDsrDownloadKeysTool(clients: ToolClients) {\n const { rest } = clients;\n\n return defineTool({\n name: 'dsr_download_keys',\n description:\n 'Get download keys for a completed Data Subject Request. These keys can be used to download the DSR results.',\n category: 'DSR Automation',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: downloadKeysSchema,\n handler: async ({ request_id }) => {\n const keys = await rest.getDSRDownloadKeys(request_id);\n return createToolResult(true, {\n downloadKeys: keys,\n count: keys.length,\n });\n },\n });\n}\n","import { createToolResult, defineTool, type ToolClients, z } from '@transcend-io/mcp-server-base';\n\nexport const enrichIdentifiersSchema = z.object({\n request_id: z.string().describe('ID of the DSR to enrich'),\n identifiers: z\n .record(z.string(), z.string())\n .describe('Key-value pairs of identifier names and values to add'),\n});\nexport type EnrichIdentifiersInput = z.infer<typeof enrichIdentifiersSchema>;\n\nexport function createDsrEnrichIdentifiersTool(clients: ToolClients) {\n const { rest } = clients;\n\n return defineTool({\n name: 'dsr_enrich_identifiers',\n description:\n 'Enrich a Data Subject Request with additional identifiers during preflight processing',\n category: 'DSR Automation',\n readOnly: false,\n confirmationHint: 'Adds identifiers to the DSR during preflight',\n annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },\n zodSchema: enrichIdentifiersSchema,\n handler: async ({ request_id, identifiers }) => {\n const result = await rest.enrichIdentifiers({\n requestId: request_id,\n identifiers,\n });\n return createToolResult(true, {\n ...result,\n message: 'Identifiers enriched successfully',\n });\n },\n });\n}\n","import { createToolResult, defineTool, type ToolClients, z } from '@transcend-io/mcp-server-base';\n\nimport type { DSRMixin } from '../graphql.js';\n\nexport const getDetailsSchema = z.object({\n request_id: z.string().describe('ID of the DSR to retrieve'),\n});\nexport type GetDetailsInput = z.infer<typeof getDetailsSchema>;\n\nexport function createDsrGetDetailsTool(clients: ToolClients) {\n const graphql = clients.graphql as DSRMixin;\n\n return defineTool({\n name: 'dsr_get_details',\n description: 'Get detailed information about a specific Data Subject Request',\n category: 'DSR Automation',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: getDetailsSchema,\n handler: async ({ request_id }) => {\n const result = await graphql.getRequest(request_id);\n return createToolResult(true, result);\n },\n });\n}\n","import {\n createListResult,\n defineTool,\n PaginationSchema,\n type ToolClients,\n} from '@transcend-io/mcp-server-base';\n\nimport type { DSRMixin } from '../graphql.js';\n\nexport function createDsrListTool(clients: ToolClients) {\n const graphql = clients.graphql as DSRMixin;\n\n return defineTool({\n name: 'dsr_list',\n description:\n 'List all Data Subject Requests. Use cursor pagination to retrieve all results (max 100 per page). Note: Server-side date filtering is not available - filter results client-side if needed.',\n category: 'DSR Automation',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: PaginationSchema,\n handler: async ({ limit, cursor }) => {\n const result = await graphql.listRequests({\n first: limit,\n after: cursor,\n });\n\n return createListResult(result.nodes, {\n totalCount: result.totalCount,\n hasNextPage: result.pageInfo?.hasNextPage,\n cursor: result.pageInfo?.endCursor,\n paginationNote: result.pageInfo?.hasNextPage\n ? 'More results available. Pass the cursor value to fetch the next page.'\n : 'No more results.',\n });\n },\n });\n}\n","import {\n createListResult,\n defineTool,\n PaginationSchema,\n type ToolClients,\n z,\n} from '@transcend-io/mcp-server-base';\n\nexport const listIdentifiersSchema = z\n .object({\n request_id: z.string().describe('ID of the DSR'),\n })\n .merge(PaginationSchema);\nexport type ListIdentifiersInput = z.infer<typeof listIdentifiersSchema>;\n\nexport function createDsrListIdentifiersTool(clients: ToolClients) {\n const { rest } = clients;\n\n return defineTool({\n name: 'dsr_list_identifiers',\n description: 'List all identifiers attached to a Data Subject Request',\n category: 'DSR Automation',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: listIdentifiersSchema,\n handler: async ({ request_id }) => {\n const identifiers = await rest.listRequestIdentifiers(request_id);\n return createListResult(identifiers);\n },\n });\n}\n","import { createToolResult, defineTool, type ToolClients, z } from '@transcend-io/mcp-server-base';\n\nexport const pollStatusSchema = z.object({\n request_id: z.string().describe('ID of the DSR to check'),\n});\nexport type PollStatusInput = z.infer<typeof pollStatusSchema>;\n\nexport function createDsrPollStatusTool(clients: ToolClients) {\n const { rest } = clients;\n\n return defineTool({\n name: 'dsr_poll_status',\n description: 'Poll the current status of a Data Subject Request',\n category: 'DSR Automation',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: pollStatusSchema,\n handler: async ({ request_id }) => {\n const result = await rest.getDSRStatus(request_id);\n return createToolResult(true, result);\n },\n });\n}\n","import { createToolResult, defineTool, type ToolClients, z } from '@transcend-io/mcp-server-base';\n\nexport const respondAccessSchema = z.object({\n request_id: z.string().describe('ID of the DSR'),\n data_silo_id: z.string().describe('ID of the data silo responding'),\n profiles: z\n .array(z.record(z.string(), z.unknown()))\n .optional()\n .describe('Array of profile data objects to return'),\n});\nexport type RespondAccessInput = z.infer<typeof respondAccessSchema>;\n\nexport function createDsrRespondAccessTool(clients: ToolClients) {\n const { rest } = clients;\n\n return defineTool({\n name: 'dsr_respond_access',\n description: 'Respond to an ACCESS request by uploading user data',\n category: 'DSR Automation',\n readOnly: false,\n confirmationHint: 'Uploads access response data for the DSR',\n annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },\n zodSchema: respondAccessSchema,\n handler: async ({ request_id, data_silo_id, profiles }) => {\n const result = await rest.respondToAccess({\n requestId: request_id,\n dataSiloId: data_silo_id,\n profiles: profiles as Record<string, unknown>[] | undefined,\n });\n return createToolResult(true, {\n ...result,\n message: 'Access response submitted successfully',\n });\n },\n });\n}\n","import { createToolResult, defineTool, type ToolClients, z } from '@transcend-io/mcp-server-base';\n\nexport const respondErasureSchema = z.object({\n request_id: z.string().describe('ID of the DSR'),\n data_silo_id: z.string().describe('ID of the data silo that completed erasure'),\n profile_ids: z\n .array(z.string())\n .optional()\n .describe('IDs of profiles that were erased (optional)'),\n});\nexport type RespondErasureInput = z.infer<typeof respondErasureSchema>;\n\nexport function createDsrRespondErasureTool(clients: ToolClients) {\n const { rest } = clients;\n\n return defineTool({\n name: 'dsr_respond_erasure',\n description: 'Confirm that data erasure has been completed for a data silo',\n category: 'DSR Automation',\n readOnly: false,\n confirmationHint: 'Confirms erasure completion for the data silo',\n annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },\n zodSchema: respondErasureSchema,\n handler: async ({ request_id, data_silo_id, profile_ids }) => {\n const result = await rest.confirmErasure({\n requestId: request_id,\n dataSiloId: data_silo_id,\n profileIds: profile_ids,\n });\n return createToolResult(true, {\n ...result,\n message: 'Erasure confirmation submitted successfully',\n });\n },\n });\n}\n","import { createToolResult, defineTool, type ToolClients, z } from '@transcend-io/mcp-server-base';\nimport { RequestAction } from '@transcend-io/privacy-types';\n\nexport const submitDsrSchema = z.object({\n type: z.nativeEnum(RequestAction).describe('Type of DSR request'),\n email: z.string().describe('Email address of the data subject'),\n subjectType: z\n .string()\n .describe(\n 'Type of data subject (e.g., customer, employee, prospect). Required by the Transcend API.',\n ),\n coreIdentifier: z\n .string()\n .optional()\n .describe('Core identifier for the data subject (defaults to email if not provided)'),\n name: z.string().optional().describe('Name of the data subject (optional)'),\n locale: z.string().optional().describe('Locale for communications (e.g., en-US)'),\n isSilent: z.boolean().optional().describe('Whether to suppress email notifications'),\n});\nexport type SubmitDsrInput = z.infer<typeof submitDsrSchema>;\n\nexport function createDsrSubmitTool(clients: ToolClients) {\n const { rest } = clients;\n\n return defineTool({\n name: 'dsr_submit',\n description:\n 'Submit a Data Subject Request as the data subject (public DSR API; e.g. Privacy Center flow). Supports ACCESS, ERASURE, RECTIFICATION, etc. coreIdentifier defaults to email. Use dsr_submit_on_behalf when an admin is filing on behalf of a data subject.',\n category: 'DSR Automation',\n readOnly: false,\n confirmationHint: 'Creates a new data subject request',\n annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },\n zodSchema: submitDsrSchema,\n handler: async ({ type, email, subjectType, coreIdentifier, name, locale, isSilent }) => {\n const result = await rest.submitDSR({\n type,\n email,\n subjectType,\n coreIdentifier,\n name,\n locale,\n isSilent,\n });\n return createToolResult(true, {\n request: result,\n message: `DSR of type ${type} submitted successfully`,\n });\n },\n });\n}\n","import { createToolResult, defineTool, type ToolClients, z } from '@transcend-io/mcp-server-base';\nimport { RequestAction } from '@transcend-io/privacy-types';\n\nimport type { DSRMixin } from '../graphql.js';\n\nexport const submitDsrOnBehalfSchema = z.object({\n type: z.nativeEnum(RequestAction).describe('Type of DSR request'),\n email: z.string().describe('Email address of the data subject'),\n subjectType: z\n .string()\n .describe('Type of data subject (e.g., customer, employee). Required by the Transcend API.'),\n coreIdentifier: z.string().optional().describe('Core identifier for the data subject (optional)'),\n locale: z.string().optional().describe('Locale for communications (e.g., en-US)'),\n isSilent: z.boolean().optional().describe('Whether to suppress email notifications'),\n});\nexport type SubmitDsrOnBehalfInput = z.infer<typeof submitDsrOnBehalfSchema>;\n\nexport function createDsrSubmitOnBehalfTool(clients: ToolClients) {\n const graphql = clients.graphql as DSRMixin;\n\n return defineTool({\n name: 'dsr_submit_on_behalf',\n description:\n 'Submit a Data Subject Request as an admin on behalf of a data subject (admin-dashboard flow). Use dsr_submit when the data subject is submitting their own.',\n category: 'DSR Automation',\n readOnly: false,\n confirmationHint: 'Creates a new data subject request on behalf of a data subject',\n annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },\n zodSchema: submitDsrOnBehalfSchema,\n handler: async ({ type, email, subjectType, coreIdentifier, locale, isSilent }) => {\n const result = await graphql.employeeMakeDataSubjectRequest({\n type,\n email,\n subjectType,\n coreIdentifier,\n locale,\n isSilent,\n });\n return createToolResult(true, {\n request: result.request,\n clientMutationId: result.clientMutationId,\n message: `DSR of type ${type} submitted on behalf of data subject`,\n });\n },\n });\n}\n","import type { ToolDefinition, ToolClients } from '@transcend-io/mcp-server-base';\n\nimport { createDsrAnalyzeTool } from './dsr_analyze.js';\nimport { createDsrCancelTool } from './dsr_cancel.js';\nimport { createDsrDownloadKeysTool } from './dsr_download_keys.js';\nimport { createDsrEnrichIdentifiersTool } from './dsr_enrich_identifiers.js';\nimport { createDsrGetDetailsTool } from './dsr_get_details.js';\nimport { createDsrListTool } from './dsr_list.js';\nimport { createDsrListIdentifiersTool } from './dsr_list_identifiers.js';\nimport { createDsrPollStatusTool } from './dsr_poll_status.js';\nimport { createDsrRespondAccessTool } from './dsr_respond_access.js';\nimport { createDsrRespondErasureTool } from './dsr_respond_erasure.js';\nimport { createDsrSubmitTool } from './dsr_submit.js';\nimport { createDsrSubmitOnBehalfTool } from './dsr_submit_on_behalf.js';\n\nexport function getDSRTools(clients: ToolClients): ToolDefinition[] {\n return [\n createDsrSubmitTool(clients),\n createDsrPollStatusTool(clients),\n createDsrListTool(clients),\n createDsrGetDetailsTool(clients),\n createDsrDownloadKeysTool(clients),\n createDsrListIdentifiersTool(clients),\n createDsrEnrichIdentifiersTool(clients),\n createDsrRespondAccessTool(clients),\n createDsrRespondErasureTool(clients),\n createDsrCancelTool(clients),\n createDsrSubmitOnBehalfTool(clients),\n createDsrAnalyzeTool(clients),\n ];\n}\n","import {\n TranscendGraphQLBase,\n type ListOptions,\n type PaginatedResponse,\n type Request,\n type RequestDetails,\n type RequestType,\n} from '@transcend-io/mcp-server-base';\n\nexport class DSRMixin extends TranscendGraphQLBase {\n async listRequests(options?: ListOptions): Promise<PaginatedResponse<Request>> {\n const query = `\n query ListRequests($first: Int, $after: String) {\n requests(first: $first, after: $after) {\n nodes {\n id\n type\n status\n createdAt\n updatedAt\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n totalCount\n }\n }\n `;\n const data = await this.makeRequest<{ requests: PaginatedResponse<Request> }>(query, {\n first: Math.min(options?.first || 50, 100),\n after: options?.after,\n });\n return data.requests;\n }\n\n async getRequest(id: string): Promise<RequestDetails> {\n const query = `\n query GetRequest($id: ID!) {\n request(id: $id) {\n id\n type\n status\n createdAt\n updatedAt\n daysRemaining\n link\n locale\n isSilent\n }\n }\n `;\n const data = await this.makeRequest<{ request: RequestDetails }>(query, { id });\n return data.request;\n }\n\n async employeeMakeDataSubjectRequest(input: {\n type: RequestType;\n email: string;\n coreIdentifier?: string;\n locale?: string;\n isSilent?: boolean;\n subjectType: string;\n attributes?: Record<string, unknown>;\n clientMutationId?: string;\n }): Promise<{ request: Request; clientMutationId?: string }> {\n const mutation = `\n mutation EmployeeMakeDataSubjectRequest($input: EmployeeRequestInput!) {\n employeeMakeDataSubjectRequest(input: $input) {\n clientMutationId\n request {\n id\n type\n status\n createdAt\n updatedAt\n }\n }\n }\n `;\n const data = await this.makeRequest<{\n employeeMakeDataSubjectRequest: { request: Request; clientMutationId?: string };\n }>(mutation, { input });\n return data.employeeMakeDataSubjectRequest;\n }\n\n async cancelRequest(input: {\n requestId: string;\n template?: string;\n subject?: string;\n }): Promise<{ request: Request; clientMutationId?: string }> {\n const mutation = `\n mutation CancelRequest($input: CommunicationInput!) {\n cancelRequest(input: $input) {\n clientMutationId\n request {\n id\n type\n status\n createdAt\n updatedAt\n }\n }\n }\n `;\n const data = await this.makeRequest<{\n cancelRequest: { request: Request; clientMutationId?: string };\n }>(mutation, { input });\n return data.cancelRequest;\n }\n}\n"],"mappings":";;;AAUA,MAAa,mBAAmB,EAAE,OAAO,EACvC,MAAM,EAAE,OACL,QAAQ,CACR,UAAU,CACV,SACC,4GACD,EACJ,CAAC;AAGF,SAAgB,qBAAqB,SAAsB;CACzD,MAAM,UAAU,QAAQ;AAExB,QAAO,WAAW;EAChB,MAAM;EACN,aACE;EACF,UAAU;EACV,UAAU;EACV,aAAa;GAAE,cAAc;GAAM,iBAAiB;GAAO,gBAAgB;GAAM;EACjF,WAAW;EACX,SAAS,OAAO,EAAE,WAAW;GAC3B,MAAM,SAAS,MAAM,QAAQ,aAAa,EAAE,OAAO,KAAK,CAAC;GACzD,MAAM,WAAW,OAAO;GACxB,MAAM,aAAa,QAAQ;GAC3B,MAAM,6BAAa,IAAI,KAAK,KAAK,KAAK,GAAG,aAAa,KAAK,KAAK,KAAK,IAAK;GAE1E,MAAM,iBAAiB,SAAS,QAAQ,MAAM,IAAI,KAAK,EAAE,UAAU,GAAG,WAAW;GACjF,MAAM,oBAAoB,SAAS,QAAQ,MAAM,EAAE,WAAW,YAAY;GAC1E,MAAM,kBAAkB,SAAS,QAAQ,MACvC;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACD,CAAC,SAAS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