import { PromptDefinition, ToolClients, ToolDefinition, TranscendGraphQLBase, z } from "@transcend-io/mcp-server-base"; import { ConsentTrackerStatus, ScopeName } from "@transcend-io/privacy-types"; import * as _$zod_v4_core0 from "zod/v4/core"; import * as _$zod from "zod"; //#region src/tools/index.d.ts declare function getConsentTools(clients: ToolClients): ToolDefinition[]; //#endregion //#region src/prompts/index.d.ts /** * Returns consent workflow prompt templates for MCP prompts/list and prompts/get. * * @param _clients - Unused; accepted so createMCPServer can pass the same factory shape as getTools */ declare function getConsentPrompts(_clients?: ToolClients): PromptDefinition[]; //#endregion //#region src/scopes.d.ts /** OAuth scopes required for Consent MCP tools (offline_access added by base). */ declare const CONSENT_OAUTH_SCOPES: readonly [ScopeName.ViewConsentManager, ScopeName.ViewAssignedConsentManager, ScopeName.ManageConsentManager, ScopeName.ManageAssignedConsentManager, ScopeName.ViewDataFlow, ScopeName.ManageDataFlow, ScopeName.ViewManagedConsentDatabaseAdminApi]; //#endregion //#region src/resolveAirgapBundleId.d.ts /** * Lazily resolve the airgap bundle ID from the API key / session org. * * In HTTP mode, caches per tenant (org / credential) so sessions that swap * per-request auth do not reuse another organization's consent manager ID. * In stdio mode, uses a stable process key so OAuth token refresh does not * force a re-resolve. */ declare function resolveAirgapBundleId(graphql: TranscendGraphQLBase): Promise; //#endregion //#region src/analyticsDateRange.d.ts interface ResolvedAnalyticsDateRange { /** Start time as epoch seconds */ startEpoch: number; /** End time as epoch seconds */ endEpoch: number; /** Start time as ISO string (for legacy analyticsData API) */ startIso: string; /** End time as ISO string (for legacy analyticsData API) */ endIso: string; } /** * Resolve a date range from explicit ISO timestamps or a lookback window. */ declare function resolveAnalyticsDateRange(args: { /** Explicit start datetime (ISO 8601) */start?: string; /** Explicit end datetime (ISO 8601) */ end?: string; /** Lookback window in days when start is omitted (default 7) */ days?: number; }): ResolvedAnalyticsDateRange; //#endregion //#region src/tools/consent_get_preferences.d.ts declare const GetPreferencesSchema: z.ZodObject<{ identifier: z.ZodString; partition: z.ZodOptional; }, z.core.$strip>; type GetPreferencesInput = z.infer; //#endregion //#region src/tools/consent_list_airgap_bundles.d.ts declare const ListAirgapBundlesSchema: _$zod.ZodObject<{}, _$zod_v4_core0.$strip>; type ListAirgapBundlesInput = Record; //#endregion //#region src/tools/consent_list_cookies.d.ts declare const ListCookiesSchema: z.ZodObject<{ limit: z.ZodDefault>>; offset: z.ZodDefault>>; status: z.ZodEnum; isJunk: z.ZodOptional; showZeroActivity: z.ZodOptional; text: z.ZodOptional; service: z.ZodOptional; trackingPurposes: z.ZodOptional>; minOccurrences: z.ZodOptional; lastDiscoveredAtBefore: z.ZodOptional; lastDiscoveredAtAfter: z.ZodOptional; orderField: z.ZodOptional>; orderDirection: z.ZodOptional>; }, z.core.$strip>; type ListCookiesInput = z.infer; //#endregion //#region src/tools/consent_list_data_flows.d.ts declare const ListDataFlowsSchema: z.ZodObject<{ limit: z.ZodDefault>>; offset: z.ZodDefault>>; status: z.ZodEnum; isJunk: z.ZodOptional; showZeroActivity: z.ZodOptional; text: z.ZodOptional; service: z.ZodOptional; unmappedOnly: z.ZodOptional; type: z.ZodOptional>; trackingTypes: z.ZodOptional>; minOccurrences: z.ZodOptional; lastDiscoveredAtBefore: z.ZodOptional; lastDiscoveredAtAfter: z.ZodOptional; orderField: z.ZodOptional>; orderDirection: z.ZodOptional>; }, z.core.$strip>; type ListDataFlowsInput = z.infer; //#endregion //#region src/tools/consent_list_purposes.d.ts declare const ListPurposesSchema: z.ZodObject<{ limit: z.ZodDefault>>; offset: z.ZodDefault>>; }, z.core.$strip>; type ListPurposesInput = z.infer; //#endregion //#region src/tools/consent_list_regimes.d.ts declare const ListRegimesSchema: z.ZodObject<{ limit: z.ZodDefault>>; offset: z.ZodDefault>>; }, z.core.$strip>; type ListRegimesInput = z.infer; //#endregion //#region src/tools/consent_get_inventory_stats.d.ts declare const GetInventoryStatsSchema: z.ZodObject<{}, z.core.$strip>; type GetInventoryStatsInput = z.infer; //#endregion //#region src/tools/consent_get_aggregate_analytics.d.ts declare const GetAggregateAnalyticsSchema: z.ZodObject<{ metric: z.ZodPreprocess>; start: z.ZodOptional; end: z.ZodOptional; days: z.ZodOptional>; include_dimensions: z.ZodOptional>>; }, z.core.$strip>; type GetAggregateAnalyticsInput = z.infer; //#endregion //#region src/tools/consent_get_timeseries_analytics.d.ts declare const GetTimeseriesAnalyticsSchema: z.ZodObject<{ metric: z.ZodPreprocess>; start: z.ZodOptional; end: z.ZodOptional; days: z.ZodOptional>; bin_interval: z.ZodDefault>>; }, z.core.$strip>; type GetTimeseriesAnalyticsInput = z.infer; //#endregion //#region src/tools/consent_get_analytics_data.d.ts declare const GetAnalyticsDataSchema: z.ZodObject<{ data_source: z.ZodEnum<{ PrivacySignalTimeseries: "PRIVACY_SIGNAL_TIMESERIES"; ConsentChangesTimeseries: "CONSENT_CHANGES_TIMESERIES"; ConsentSessionsByRegime: "CONSENT_SESSIONS_BY_REGIME"; }>; start: z.ZodOptional; end: z.ZodOptional; days: z.ZodOptional>; bin: z.ZodDefault>>; }, z.core.$strip>; type GetAnalyticsDataInput = z.infer; //#endregion //#region src/tools/consent_update_cookies.d.ts declare const UpdateCookieItemSchema: z.ZodObject<{ name: z.ZodString; trackingPurposes: z.ZodOptional>; description: z.ZodOptional; service: z.ZodOptional; isJunk: z.ZodOptional; status: z.ZodOptional>; }, z.core.$strip>; type UpdateCookieItemInput = z.infer; declare const UpdateCookiesSchema: z.ZodObject<{ cookies: z.ZodArray>; description: z.ZodOptional; service: z.ZodOptional; isJunk: z.ZodOptional; status: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strip>; type UpdateCookiesInput = z.infer; //#endregion //#region src/tools/consent_delete_cookies.d.ts declare const DeleteCookiesSchema: z.ZodObject<{ ids: z.ZodArray; }, z.core.$strip>; type DeleteCookiesInput = z.infer; //#endregion //#region src/tools/consent_delete_data_flows.d.ts declare const DeleteDataFlowsSchema: z.ZodObject<{ ids: z.ZodArray; }, z.core.$strip>; type DeleteDataFlowsInput = z.infer; //#endregion //#region src/tools/consent_update_data_flows.d.ts declare const UpdateDataFlowItemSchema: z.ZodObject<{ id: z.ZodString; trackingPurposes: z.ZodOptional>; description: z.ZodOptional; service: z.ZodOptional; isJunk: z.ZodOptional; status: z.ZodOptional>; }, z.core.$strip>; type UpdateDataFlowItemInput = z.infer; declare const UpdateDataFlowsSchema: z.ZodObject<{ dataFlows: z.ZodArray>; description: z.ZodOptional; service: z.ZodOptional; isJunk: z.ZodOptional; status: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strip>; type UpdateDataFlowsInput = z.infer; //#endregion //#region src/tools/consent_bulk_triage.d.ts declare const BulkTriageItemSchema: z.ZodObject<{ type: z.ZodEnum<{ Cookie: "cookie"; DataFlow: "data_flow"; }>; id: z.ZodString; action: z.ZodEnum<{ Approve: "APPROVE"; Junk: "JUNK"; }>; trackingPurposes: z.ZodOptional>; service: z.ZodOptional; }, z.core.$strip>; type BulkTriageItemInput = z.infer; declare const BulkTriageSchema: z.ZodObject<{ items: z.ZodArray; id: z.ZodString; action: z.ZodEnum<{ Approve: "APPROVE"; Junk: "JUNK"; }>; trackingPurposes: z.ZodOptional>; service: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>; type BulkTriageInput = z.infer; //#endregion //#region src/tools/cookie_triage_app.d.ts declare const ConsentTriageTypeSchema: z.ZodEnum<{ cookies: "cookies"; data_flows: "data_flows"; }>; declare const CookieTriageAppSchema: z.ZodObject<{ triageType: z.ZodEnum<{ cookies: "cookies"; data_flows: "data_flows"; }>; }, z.core.$strip>; //#endregion //#region src/lib/cookieTriageConfig.d.ts /** * Tunable constants and shared enums for the consent triage MCP App. * * Keep experience knobs here so purpose tabs, fetch caps, and suggestion * thresholds can be adjusted in one place. */ /** Page size the triage view requests from list tools */ declare const COOKIE_TRIAGE_UI_PAGE_SIZE = 20; /** Max cookies shown per purpose bucket in the triage UI */ declare const COOKIE_TRIAGE_MAX_PER_PURPOSE = 100; /** Page size when the triage app pulls NEEDS_REVIEW items (baseline hosts) */ declare const COOKIE_TRIAGE_FETCH_PAGE_SIZE = 100; /** Soft cap for a single triage app open across all purpose tabs */ declare const COOKIE_TRIAGE_FETCH_MAX: number; /** Encounter count below which a row is suggested as junk */ declare const COOKIE_TRIAGE_MIN_OCCURRENCES = 5; /** Primary purpose bucket used when grouping cookies for triage */ declare const CookieTriagePurposeCategory: { /** No assigned tracking purpose */Unknown: "Unknown"; /** Org-defined non-default purposes */ Custom: "Custom"; /** Strictly necessary */ Essential: "Essential"; /** Functional / preference */ Functional: "Functional"; /** Advertising / marketing */ Advertising: "Advertising"; /** Analytics / measurement */ Analytics: "Analytics"; /** Sale of personal information */ SaleOfInfo: "SaleOfInfo"; }; /** Override type */ type CookieTriagePurposeCategory = (typeof CookieTriagePurposeCategory)[keyof typeof CookieTriagePurposeCategory]; /** Display order for purpose tabs in the cookie triage UI */ declare const COOKIE_TRIAGE_PURPOSE_ORDER: readonly CookieTriagePurposeCategory[]; //#endregion //#region src/lib/cookieTriageTypes.d.ts /** What the consent triage review app loads from the API */ declare const ConsentTriageType: { /** Cookie inventory triage */Cookies: "cookies"; /** Data-flow inventory triage */ DataFlows: "data_flows"; }; /** Override type */ type ConsentTriageType = (typeof ConsentTriageType)[keyof typeof ConsentTriageType]; /** User triage decision for a cookie or data-flow row */ declare const CookieTriageDecision: { /** Approve and mark LIVE */Approve: "approve"; /** Mark LIVE + junk */ Junk: "junk"; /** Keep in review (explicit review decision) */ Review: "review"; }; /** Override type */ type CookieTriageDecision = (typeof CookieTriageDecision)[keyof typeof CookieTriageDecision]; /** Per-tab / overview fetch status */ declare const CookieTriageLoadStatus: { /** Not started */Idle: "idle"; /** In flight */ Loading: "loading"; /** Succeeded */ Ready: "ready"; /** Failed */ Error: "error"; }; /** Override type */ type CookieTriageLoadStatus = (typeof CookieTriageLoadStatus)[keyof typeof CookieTriageLoadStatus]; /** Cookie or data-flow item shown in the triage view */ interface CookieTriageAnalysis { /** Cookie name or data-flow value (upsert / row key) */ name: string; /** Transcend cookie or data-flow ID when available */ id: string; /** Service or vendor title when known */ service?: string; /** Notes / description from the dashboard when known */ description?: string; /** Current assigned purpose slugs from the API (used to group into purpose tabs) */ trackingPurposes?: string[]; /** Telemetry occurrences when available */ occurrences?: number; /** ISO 8601 timestamp when the item was last seen in telemetry */ lastActivityAt?: string; } /** Input passed to `consent_cookie_triage_review_app` */ interface CookieTriageAppInput { /** * Whether to open the review UI for cookies or data flows needing review. * Baseline hosts fetch organization name and NEEDS_REVIEW items in the tool * handler; MCP App hosts open a shell and the view pages list tools itself. */ triageType: ConsentTriageType; } /** Category payload returned to baseline hosts and the MCP App view */ interface CookieTriageCategoryPayload { /** Primary purpose bucket for this group */ purpose: CookieTriagePurposeCategory; /** Total items in this bucket after grouping (may exceed cookies.length when capped) */ totalCount: number; /** Items passed for display (capped, sorted by occurrences) */ cookies: CookieTriageAnalysis[]; /** Number of items included in this payload (cookies.length) */ shownCount: number; } /** Payload shared by the baseline tool and the MCP App view */ interface CookieTriageAppPayload { /** Whether this payload is cookies or data flows */ triageType: ConsentTriageType; /** * Admin dashboard base URL for deep links * (`TRANSCEND_DASHBOARD_URL` when set, else production default). */ dashboardUrl: string; /** Display name of the organization being triaged */ organizationName: string; /** Purpose categories with items to review */ categories: CookieTriageCategoryPayload[]; /** * Whether NEEDS_REVIEW rows have been fetched. * MCP App open returns `false` (fast shell); the baseline tool returns `true`. */ loaded: boolean; /** * Whether the host can invoke the app-only permanent-delete tools. * False on hosts (Cursor) that cannot `callServerTool` for `visibility: ['app']` * companions; the view hides the delete button and users should Junk instead. */ supportsPermanentDelete: boolean; /** * Agent-facing instruction on MCP App shell opens so the model does not * immediately re-fetch list tools after mounting the interactive UI. */ message?: string; } //#endregion //#region src/lib/fetchConsentTriageItems.d.ts /** * Fetch the organization display name for the triage header. * * @param clients - MCP tool GraphQL clients * @returns Organization name, or a fallback when missing */ declare function fetchTriageOrganizationName(clients: ToolClients): Promise; /** * Paginate NEEDS_REVIEW cookies up to {@link COOKIE_TRIAGE_FETCH_MAX}. * * @param clients - MCP tool GraphQL clients * @returns Projected cookie rows for the triage UI */ declare function fetchCookiesForTriage(clients: ToolClients): Promise; /** * Paginate NEEDS_REVIEW data flows up to {@link COOKIE_TRIAGE_FETCH_MAX}. * * @param clients - MCP tool GraphQL clients * @returns Projected data-flow rows for the triage UI */ declare function fetchDataFlowsForTriage(clients: ToolClients): Promise; /** * Fetch NEEDS_REVIEW cookies or data flows for the triage app. * * @param clients - MCP tool GraphQL clients * @param triageType - Whether to load cookies or data flows * @returns Projected triage rows */ declare function fetchConsentTriageItems(clients: ToolClients, triageType: ConsentTriageType): Promise; //#endregion //#region src/lib/projectTriageItem.d.ts /** Structural cookie/data-flow list node the triage view can project without SDK imports. */ interface ConsentTriageListNode { /** Transcend cookie or data-flow ID */ id?: string; /** Cookie name when the node is a cookie */ name?: string; /** Data-flow value (URL/host) when the node is a data flow */ value?: string; /** Associated service when known */ service?: { /** Service or vendor display title */title?: string; }; /** Notes / description from the dashboard */ description?: string; /** Cookie tracking purpose slugs */ trackingPurposes?: string[]; /** Data-flow tracking purpose slugs */ trackingType?: string[]; /** Telemetry occurrence count */ occurrences?: number; /** ISO 8601 timestamp when the item was last seen in telemetry */ lastDiscoveredAt?: string; } /** Project a cookie list node into the slim triage row shape. */ declare function projectCookieForTriage(cookie: ConsentTriageListNode): CookieTriageAnalysis; /** Project a data-flow list node into the slim triage row shape. */ declare function projectDataFlowForTriage(flow: ConsentTriageListNode): CookieTriageAnalysis; /** Project an unknown list-tool row, or `undefined` when it cannot be shown. */ declare function projectListNodeForTriage(triageType: ConsentTriageType, node: unknown): CookieTriageAnalysis | undefined; //#endregion //#region src/lib/groupCookiesForTriage.d.ts /** Sort cookies highest traffic first; missing occurrences rank last. */ declare function compareCookiesByOccurrencesDesc(a: CookieTriageAnalysis, b: CookieTriageAnalysis): number; /** * Group flat triage items by primary purpose, sort by occurrences, and cap per bucket. * * Primary purpose uses {@link resolvePrimaryCookiePurpose} on each item's `trackingPurposes`. * `totalCount` is the full grouped size; `cookies` / `shownCount` are capped at * {@link COOKIE_TRIAGE_MAX_PER_PURPOSE}. */ declare function groupCookiesForTriage(cookies: readonly CookieTriageAnalysis[]): CookieTriageCategoryPayload[]; //#endregion //#region src/lib/resolvePrimaryCookiePurpose.d.ts /** * Pick the highest-ranked purpose slug when a cookie has multiple assigned purposes. * * Rank (highest first): Essential, Functional, Advertising, Analytics, SaleOfInfo. * Returns `Unknown` when the list is empty or only `Unknown`, or `Custom` when only * other non-default slugs are present. */ declare function resolvePrimaryCookiePurpose(trackingPurposes: string[] | undefined | null): CookieTriagePurposeCategory; //#endregion export { type BulkTriageInput, type BulkTriageItemInput, BulkTriageItemSchema, BulkTriageSchema, CONSENT_OAUTH_SCOPES, COOKIE_TRIAGE_FETCH_MAX, COOKIE_TRIAGE_FETCH_PAGE_SIZE, COOKIE_TRIAGE_MAX_PER_PURPOSE, COOKIE_TRIAGE_MIN_OCCURRENCES, COOKIE_TRIAGE_PURPOSE_ORDER, COOKIE_TRIAGE_UI_PAGE_SIZE, type ConsentTriageListNode, ConsentTriageType, ConsentTriageTypeSchema, type CookieTriageAnalysis, type CookieTriageAppInput, type CookieTriageAppPayload, CookieTriageAppSchema, type CookieTriageCategoryPayload, CookieTriageDecision, CookieTriageLoadStatus, CookieTriagePurposeCategory, type DeleteCookiesInput, DeleteCookiesSchema, type DeleteDataFlowsInput, DeleteDataFlowsSchema, type GetAggregateAnalyticsInput, GetAggregateAnalyticsSchema, type GetAnalyticsDataInput, GetAnalyticsDataSchema, type GetInventoryStatsInput, GetInventoryStatsSchema, type GetPreferencesInput, GetPreferencesSchema, type GetTimeseriesAnalyticsInput, GetTimeseriesAnalyticsSchema, type ListAirgapBundlesInput, ListAirgapBundlesSchema, type ListCookiesInput, ListCookiesSchema, type ListDataFlowsInput, ListDataFlowsSchema, type ListPurposesInput, ListPurposesSchema, type ListRegimesInput, ListRegimesSchema, type UpdateCookieItemInput, UpdateCookieItemSchema, type UpdateCookiesInput, UpdateCookiesSchema, type UpdateDataFlowItemInput, UpdateDataFlowItemSchema, type UpdateDataFlowsInput, UpdateDataFlowsSchema, compareCookiesByOccurrencesDesc, fetchConsentTriageItems, fetchCookiesForTriage, fetchDataFlowsForTriage, fetchTriageOrganizationName, getConsentPrompts, getConsentTools, groupCookiesForTriage, projectCookieForTriage, projectDataFlowForTriage, projectListNodeForTriage, resolveAirgapBundleId, resolveAnalyticsDateRange, resolvePrimaryCookiePurpose }; //# sourceMappingURL=index.d.mts.map