Skip to main content

Documentation Index

Fetch the complete documentation index at: https://grantmaster.dev/llms.txt

Use this file to discover all available pages before exploring further.

tRPC Procedures Reference

Complete catalog of all tRPC procedures exposed by the GrantMaster API gateway. Each procedure is accessed via trpc.<router>.<procedure> from the frontend.

Overview

MetricValue
Total procedures164
Routers22 (+ 1 root-level procedure)
Queries107
Mutations57

How to call from React

All tRPC procedures are consumed via @tanstack/react-query hooks auto-generated by the tRPC client:
// Query
const { data } = trpc.projects.list.useQuery({ page: 1, pageSize: 20 });

// Mutation
const mutation = trpc.expenses.create.useMutation();
mutation.mutate({ employeeId: '...', amount: 100, ... });

Authentication

All procedures require a valid Firebase Auth token passed via the Authorization header unless noted otherwise. Three middleware tiers are used:
MiddlewareDescription
publicProcedureNo auth required (health check, grant ingest)
protectedProcedureRequires authenticated Firebase user
permissionProcedure(P)Requires authenticated user with specific permission(s)
superAdminProcedureRequires authenticated user with isSuperAdmin: true

Transport

tRPC is served via Hono at /api/trpc/* on the api Cloud Function (region: europe-west1). The transport uses superjson as the serializer.

Root

File: functions/src/api/routers/index.ts
ProcedureTypeInputAuthDescription
healthquerynonepublicReturns { status, timestamp, version } health check

Router: projects

File: functions/src/api/routers/projects.ts
ProcedureTypeInputAuthDescription
listquery{ page?: int, pageSize?: int, sortBy?: string, sortOrder?: 'asc'|'desc', status?: string }VIEW_PROJECTSList projects for the authenticated organization
getquery{ id: string }VIEW_PROJECTSGet a single project by ID (with budget data)
statsquerynoneVIEW_PROJECTSGet organization-level project statistics
createmutation{ name: string, description?: string, status?: string, phase?: ProjectPhase, startDate?: string, endDate?: string, budget?: { total: number, spent?: number, currency?: string }, grantId?: string, managerId?: string, managerName?: string, teamMemberIds?: string[], tags?: string[] }MANAGE_PROJECTSCreate a new project
updatemutation{ id: string, data: { name?, description?, status?, phase?, startDate?, endDate?, budget?, managerId?, managerName?, teamMemberIds?, tags? } }MANAGE_PROJECTSUpdate an existing project
deletemutation{ id: string, hard?: boolean }MANAGE_PROJECTSDelete a project (soft delete by default)

Router: uploads

File: functions/src/api/routers/uploads.ts
ProcedureTypeInputAuthDescription
requestIntentmutation{ filename: string, contentType: string, domainContext: string }protectedRequest a signed upload intent for a file
finalizemutation{ uploadToken: string, metadata?: Record<string, unknown> }protectedFinalize an upload after the file has been transferred

Router: expenses

File: functions/src/api/routers/expenses.ts
ProcedureTypeInputAuthDescription
listquery{ page?: int, pageSize?: int, sortBy?: string, sortOrder?: 'asc'|'desc', status?: ExpenseStatus, projectId?: string, employeeId?: string }VIEW_EXPENSESList expenses with optional filters
getquery{ id: string }VIEW_EXPENSESGet a single expense by ID
statsquerynoneVIEW_EXPENSESGet organization-level expense statistics
createmutation{ employeeId: string, projectId: string, merchant: string, date: string, amount: number, currency?: string, category: string, description: string, budgetLineId?: string, receiptUrl?: string, receiptStoragePath?: string }MANAGE_EXPENSESCreate a new expense (status defaults to Draft)
updatemutation{ id: string, data: { merchant?, date?, amount?, currency?, category?, description?, budgetLineId?, projectId?, receiptUrl?, receiptStoragePath? } }MANAGE_EXPENSESUpdate an existing expense
submitmutation{ id: string }MANAGE_EXPENSESSubmit an expense for approval
processReceiptmutation{ storagePath: string, mimeType?: string }MANAGE_EXPENSESProcess a receipt image (AI extraction)
approvemutation{ id: string, notes?: string }APPROVE_EXPENSESApprove a submitted expense
rejectmutation{ id: string, reason: string }APPROVE_EXPENSESReject a submitted expense
deletemutation{ id: string, hard?: boolean }MANAGE_EXPENSESDelete an expense (soft delete by default)
listCategoriesquery{ page?: int, pageSize?: int }VIEW_EXPENSESList distinct expense categories with counts and totals
listReceiptsquery{ page?: int, pageSize?: int, status?: 'pending'|'processed'|'failed' }VIEW_EXPENSESList expenses that have receipt data
listReportsquery{ page?: int, pageSize?: int }VIEW_EXPENSESList expense reports (stub — returns empty)

Router: journals

File: functions/src/api/routers/journals.ts

Daily Entries

ProcedureTypeInputAuthDescription
listEntriesquery{ page?: int, pageSize?: int, sortBy?: string, sortOrder?: 'asc'|'desc', employeeId?: string, projectId?: string, status?: JournalStatus }VIEW_JOURNALSList journal entries with optional filters
getEntryquery{ id: string }VIEW_JOURNALSGet a single journal entry by ID
createEntrymutation{ employeeId: string, projectId: string, date: string, hours: number, activityType: string, description: string, entryType?: string, leaveType?: string }EDIT_OWN_ENTRIESCreate a new journal entry (status defaults to draft)
updateEntrymutation{ id: string, data: { projectId?, hours?, activityType?, description?, entryType? } }EDIT_OWN_ENTRIESUpdate an existing journal entry
lockEntrymutation{ id: string }APPROVE_JOURNALSLock a journal entry to prevent further edits

Monthly Submissions

ProcedureTypeInputAuthDescription
listMonthlyquery{ page?: int, pageSize?: int, sortBy?: string, sortOrder?: 'asc'|'desc', employeeId?: string, status?: SubmissionStatus, month?: string }VIEW_JOURNALSList monthly journal submissions
getMonthlyquery{ id: string }VIEW_JOURNALSGet a single monthly submission by ID
submitMonthlymutation{ id: string }EDIT_OWN_ENTRIESSubmit a monthly journal for approval
approveMonthlymutation{ id: string }APPROVE_JOURNALSApprove a monthly journal submission
rejectMonthlymutation{ id: string, reason: string }APPROVE_JOURNALSReject a monthly journal submission

Timesheet Sub-domain

ProcedureTypeInputAuthDescription
timesheetMatrixquery{ weekStartDate: string, employeeId?: string }VIEW_JOURNALSGet the weekly timesheet matrix (entries grouped by project x day)
timesheetReportsquery{ page?: int, pageSize?: int, period?: string }VIEW_JOURNALSList timesheet reports (stub — returns empty)

Router: people

File: functions/src/api/routers/people.ts
ProcedureTypeInputAuthDescription
listquery{ page?: int, pageSize?: int, sortBy?: string, sortOrder?: 'asc'|'desc', status?: UserStatus, department?: string, managerId?: string, staffType?: StaffType }VIEW_EMPLOYEESList people/employees with optional filters
getquery{ id: string }VIEW_EMPLOYEESGet a single person by ID
statsquerynoneVIEW_EMPLOYEESGet organization-level people statistics
createmutation{ name: string, email: string, phone?: string, role?: string, department?: string, costCenter?: string, managerId?: string, managerName?: string, contractHours?: number, fteRatio?: number, startDate?: string, contractType?: string, staffType?: StaffType, staffCategory?: string }MANAGE_EMPLOYEESCreate a new person/employee
updatemutation{ id: string, data: { name?, email?, phone?, department?, costCenter?, managerId?, managerName?, contractHours?, fteRatio?, contractType?, staffType?, staffCategory? } }MANAGE_EMPLOYEESUpdate an existing person
getCostAllocationquery{ id: string }VIEW_EMPLOYEESGet cost allocation breakdown for a person
updateCostAllocationmutation{ id: string, allocations: [{ projectId: string, projectName: string, fte: number, hourlyRate: number, currency?: string }] }MANAGE_EMPLOYEESUpdate cost allocation for a person
deactivatemutation{ id: string }MANAGE_EMPLOYEESDeactivate a person
deletemutation{ id: string, hard?: boolean }MANAGE_EMPLOYEESDelete a person (soft delete by default)

Router: grants

File: functions/src/api/routers/grants.ts

Opportunities

ProcedureTypeInputAuthDescription
searchOpportunitiesquery{ page?: int, pageSize?: int, sortBy?: string, sortOrder?: 'asc'|'desc', grantType?: string, grantorType?: string, query?: string }VIEW_PROJECTSSearch grant opportunities with optional filters
getOpportunityquery{ id: string }VIEW_PROJECTSGet a single grant opportunity by ID

Pipeline

ProcedureTypeInputAuthDescription
listPipelinequery{ page?: int, pageSize?: int, sortBy?: string, sortOrder?: 'asc'|'desc', stage?: string }VIEW_PROJECTSList pipeline entries filtered by stage
getPipelineEntryquery{ id: string }VIEW_PROJECTSGet a single pipeline entry by ID
pipelineStatsquerynoneVIEW_PROJECTSGet pipeline-level statistics (counts by stage, totals)
createPipelineEntrymutation{ title: string, grantOpportunityId?: string, grantorName?: string, stage?: string, amount?: number, currency?: string, probability?: number, deadline?: string, assignedTo?: string, assignedToName?: string, notes?: string }MANAGE_PROJECTSCreate a new pipeline entry
updatePipelineEntrymutation{ id: string, data: { title?, grantorName?, amount?, currency?, probability?, deadline?, assignedTo?, assignedToName?, notes? } }MANAGE_PROJECTSUpdate a pipeline entry
changeStagemutation{ id: string, stage: string }MANAGE_PROJECTSChange the stage of a pipeline entry
deletePipelineEntrymutation{ id: string, hard?: boolean }MANAGE_PROJECTSDelete a pipeline entry

Applications

ProcedureTypeInputAuthDescription
listApplicationsquery{ page?: int, pageSize?: int, sortBy?: string, sortOrder?: 'asc'|'desc', status?: string, projectId?: string }VIEW_PROJECTSList grant applications with optional filters
getApplicationquery{ id: string }VIEW_PROJECTSGet a single application by ID
createApplicationmutation{ title: string, pipelineEntryId?: string, grantOpportunityId?: string, grantorName?: string, amount?: number, currency?: string, projectId?: string, assignedTo?: string }MANAGE_PROJECTSCreate a new grant application (status defaults to draft)
updateApplicationmutation{ id: string, data: { title?, grantorName?, amount?, status?, projectId?, assignedTo? } }MANAGE_PROJECTSUpdate an existing application
submitApplicationmutation{ id: string }MANAGE_PROJECTSSubmit an application for review
deleteApplicationmutation{ id: string, hard?: boolean }MANAGE_PROJECTSDelete an application

Active Grants

ProcedureTypeInputAuthDescription
listActiveGrantsquery{ page?: int, pageSize?: int, sortBy?: string, sortOrder?: 'asc'|'desc', status?: string }VIEW_PROJECTSList active (awarded) grants
convertToActiveGrantmutation{ pipelineEntryId: string, opportunityId: string, applicationId: string, grantDetails?: { status?, awardedAmount?, currency?, startDate?, endDate? } }MANAGE_PROJECTSConvert a pipeline entry + application into an active grant
updateActiveGrantmutation{ id: string, data: { status?, awardedAmount?, currency?, startDate?, endDate? } }MANAGE_PROJECTSUpdate an active grant

Router: grantAdmin

File: functions/src/api/routers/grantAdmin.ts All procedures require superadmin access.
ProcedureTypeInputAuthDescription
listSourceConfigsquerynonesuperAdminList all grant ingestion source configurations
updateSourceConfigmutation{ sourceId: GrantSourceId, enabled?: boolean, schedule?: string }superAdminUpdate a grant source configuration (enable/disable, schedule)
triggerSyncmutation{ sourceId: GrantSourceId }superAdminManually trigger a sync for a grant source (calls n8n webhook)
listSyncHistoryquery{ sourceId?: GrantSourceId, limit?: int (1-100, default 25), cursor?: string }superAdminList sync history with cursor-based pagination
listScrapingTargetsquery{ sourceId: GrantSourceId }superAdminList scraping targets for a specific grant source
upsertScrapingTargetmutation{ id?: string, sourceId: GrantSourceId, url: string, name: string, extractionSchema?: Record, enabled?: boolean, frequency?: 'daily'|'weekly'|'monthly' }superAdminCreate or update a scraping target
deleteScrapingTargetmutation{ id: string }superAdminDelete a scraping target

Router: compliance

File: functions/src/api/routers/compliance.ts

Policies

ProcedureTypeInputAuthDescription
listPoliciesquery{ page?: int, pageSize?: int, sortBy?: string, sortOrder?: 'asc'|'desc', status?: string, category?: string, severity?: string }VIEW_PROJECTSList compliance policies with filters
getPolicyquery{ id: string }VIEW_PROJECTSGet a single policy by ID
createPolicymutation{ name: string, description?: string, category: string, severity?: string, status?: string, frequency?: string, projectIds?: string[] }MANAGE_PROJECTSCreate a new compliance policy
updatePolicymutation{ id: string, data: { name?, description?, category?, severity?, status?, frequency?, projectIds? } }MANAGE_PROJECTSUpdate an existing policy
deletePolicymutation{ id: string, hard?: boolean }MANAGE_PROJECTSDelete a policy

Alerts

ProcedureTypeInputAuthDescription
listAlertsquery{ page?: int, pageSize?: int, sortBy?: string, sortOrder?: 'asc'|'desc', status?: string, type?: string, severity?: string, projectId?: string }VIEW_PROJECTSList compliance alerts with filters
getAlertquery{ id: string }VIEW_PROJECTSGet a single alert by ID
acknowledgeAlertmutation{ id: string }MANAGE_PROJECTSAcknowledge a compliance alert
resolveAlertmutation{ id: string, notes?: string }MANAGE_PROJECTSResolve a compliance alert with optional notes

Scoring

ProcedureTypeInputAuthDescription
scorequerynoneVIEW_PROJECTSGet the organization’s compliance score

Router: billing

File: functions/src/api/routers/billing.ts
ProcedureTypeInputAuthDescription
getTiersquerynoneprotectedGet all active subscription pricing tiers
getPlatformStatsquerynoneprotectedGet platform-wide billing statistics (MRR, ARR, churn, etc.)
getOrganizationHistoryquery{ organizationId: string }protectedGet billing transaction history for an organization

Router: notifications

File: functions/src/api/routers/notifications.ts
ProcedureTypeInputAuthDescription
markAsReadmutation{ id: string }protectedMark a single notification as read
markAllReadmutation{ organizationId: string, userId: string }protectedMark all notifications as read for a user
deletemutation{ id: string }protectedDelete a notification
updatemutation{ id: string, data: Record<string, any> }protectedUpdate a notification (versatile/generic)
updatePreferencesmutationnotificationPreferencesSchema (partial)protectedUpdate notification preferences (channels, frequency, quiet hours)

Router: contacts

File: functions/src/api/routers/contacts.ts
ProcedureTypeInputAuthDescription
listquery{ page?: int, pageSize?: int, sortBy?: string, sortOrder?: 'asc'|'desc', recordType?: string, relationshipGroup?: string, search?: string }VIEW_TEAM_DIRECTORYList contacts/stakeholders with filters
getquery{ id: string }VIEW_TEAM_DIRECTORYGet a contact with interaction history
createmutation{ recordType?: string, displayName: string, firstName?: string, lastName?: string, organizationName?: string, email?: string, phoneNumber?: string, relationshipGroups?: string[], tags?: string[], consents?: Record[], owner?: string, ownerName?: string, notes?: string, customFields?: Record }MANAGE_TEAMCreate a new contact
updatemutation{ id: string, data: { ...contactCreateFields (all optional) } }MANAGE_TEAMUpdate an existing contact
deletemutation{ id: string, hard?: boolean }MANAGE_TEAMDelete a contact
addInteractionmutation{ contactId: string, type: string, title: string, description?: string, timestamp: string }MANAGE_TEAMAdd an interaction record to a contact

Router: documents

File: functions/src/api/routers/documents.ts
ProcedureTypeInputAuthDescription
listquery{ page?: int, pageSize?: int, sortBy?: string, sortOrder?: 'asc'|'desc', projectId?: string, status?: string, documentType?: string, approvedForUse?: boolean, funderId?: string }VIEW_PROJECTSList documents with filters
getquery{ id: string }VIEW_PROJECTSGet a single document by ID
getUploadUrlmutation{ fileName: string, mimeType: string }UPLOAD_ATTACHMENTSGet a signed upload URL for a document
createmutation{ fileName: string, title: string, description?: string, documentType?: string, size: int, mimeType: string, storagePath: string, downloadUrl?: string, projectIds?: string[], funderId?: string, tags?: string[], sensitivity?: 'public'|'internal'|'confidential'|'restricted' }UPLOAD_ATTACHMENTSCreate a document record
classifymutation{ id: string }UPLOAD_ATTACHMENTSClassify a document using AI
deletemutation{ id: string, hard?: boolean }MANAGE_PROJECTSDelete a document

Router: procurement

File: functions/src/api/routers/procurement.ts Service: ServerProcurementService (4 service classes: requests, vendors, purchase orders, approvals) Schemas: @grantmaster/domain-schema/trpc (procurement*.ts)

Procurement Requests

ProcedureTypeInputAuthDescription
listRequestsquery{ page, pageSize, status?, priority?, projectId?, categoryCode? }VIEW_PROCUREMENTList procurement requests with filtering
getRequestquery{ id }VIEW_PROCUREMENTGet a single procurement request
createRequestmutation{ title, requester, department, amount, currency?, justification, projectId?, budgetLineId?, grantId?, categoryCode?, estimatedDelivery?, tags? }MANAGE_PROCUREMENTCreate a draft procurement request
updateRequestmutation{ id, data: Partial<Request> }MANAGE_PROCUREMENTUpdate a procurement request
submitRequestmutation{ id }MANAGE_PROCUREMENTSubmit request for review (draft → submitted)
approveRequestmutation{ id, notes? }APPROVE_PROCUREMENTApprove a request
rejectRequestmutation{ id, reason }APPROVE_PROCUREMENTReject a request with mandatory reason
deleteRequestmutation{ id, hard? }MANAGE_PROCUREMENTSoft/hard delete a request

Vendors

ProcedureTypeInputAuthDescription
listVendorsquery{ page, pageSize, type?, compliance?, isPreferred? }VIEW_PROCUREMENTList vendors with filtering
getVendorquery{ id }VIEW_PROCUREMENTGet a single vendor
createVendormutation{ name, type?, category, email, phone?, website?, registrationNumber?, taxId?, contractExpiry?, certifications?, tags? }MANAGE_VENDORSCreate a vendor (starts in pending_review compliance)
updateVendormutation{ id, data: Partial<Vendor> }MANAGE_VENDORSUpdate a vendor
deleteVendormutation{ id, hard? }MANAGE_VENDORSSoft/hard delete a vendor

Purchase Orders

ProcedureTypeInputAuthDescription
listPurchaseOrdersquery{ page, pageSize, status?, vendorId?, projectId? }VIEW_PROCUREMENTList purchase orders with filtering
getPurchaseOrderquery{ id }VIEW_PROCUREMENTGet a single purchase order
createPurchaseOrdermutation{ vendorId, requestId?, projectId?, lineItems[], terms?, deliveryDate? }MANAGE_PROCUREMENTCreate a purchase order
updatePurchaseOrdermutation{ id, data: Partial<PO> }MANAGE_PROCUREMENTUpdate a purchase order
receivePurchaseOrdermutation{ id }MANAGE_PROCUREMENTMark PO as received
deletePurchaseOrdermutation{ id, hard? }MANAGE_PROCUREMENTSoft/hard delete a PO

Procurement Approvals

ProcedureTypeInputAuthDescription
listApprovalsquery{ page, pageSize, status?, type? }VIEW_PROCUREMENTList approval queue
approveApprovalmutation{ id, notes? }APPROVE_PROCUREMENTApprove a procurement approval
rejectApprovalmutation{ id, reason }APPROVE_PROCUREMENTReject a procurement approval

Router: audit

File: functions/src/api/routers/audit.ts
ProcedureTypeInputAuthDescription
listFindingsquery{ page?: int, pageSize?: int, severity?: string }VIEW_AUDIT_REPORTSList audit findings with optional severity filter
listReportsquery{ page?: int, pageSize?: int }VIEW_AUDIT_REPORTSList audit reports
getAuditLogquery{ page?: int, pageSize?: int }VIEW_AUDIT_REPORTSGet the audit log (sorted by timestamp desc)

Router: risk

File: functions/src/api/routers/risk.ts
ProcedureTypeInputAuthDescription
listRisksquery{ page?: int, pageSize?: int }VIEW_PROJECTSList all risks in the register
getMatrixquery{}VIEW_PROJECTSGet the risk matrix (all risks with 5x5 probability/impact dimensions)
listMitigationsquery{ page?: int, pageSize?: int }VIEW_PROJECTSList risk mitigation plans
listEscalationsquery{ page?: int, pageSize?: int }VIEW_PROJECTSList risk escalations

Router: mission

File: functions/src/api/routers/mission.ts
ProcedureTypeInputAuthDescription
listPillarsquery{ page?: int, pageSize?: int }VIEW_PROJECTSList mission/strategic pillars
listGoalsquery{ page?: int, pageSize?: int }VIEW_PROJECTSList mission goals
getAllocationquery{}VIEW_PROJECTSGet budget allocation across pillars

Router: impact

File: functions/src/api/routers/impact.ts
ProcedureTypeInputAuthDescription
listIndicatorsquery{ page?: int, pageSize?: int }VIEW_PROJECTSList M&E indicators
listCollectionsquery{ page?: int, pageSize?: int }VIEW_PROJECTSList data collection entries
getDashboardquery{}VIEW_PROJECTSGet impact dashboard summary (on-target, below-target, overdue counts)

Router: marketing

File: functions/src/api/routers/marketing.ts
ProcedureTypeInputAuthDescription
listPagesquery{ page?: int, pageSize?: int }VIEW_PROJECTSList CMS pages
listMediaquery{ page?: int, pageSize?: int }VIEW_PROJECTSList media assets
listPublishingquery{ page?: int, pageSize?: int }VIEW_PROJECTSList publishing schedule entries

Router: partnerships

File: functions/src/api/routers/partnerships.ts
ProcedureTypeInputAuthDescription
listPartnersquery{ page?: int, pageSize?: int }VIEW_PROJECTSList partners
listAgreementsquery{ page?: int, pageSize?: int }VIEW_PROJECTSList partnership agreements
listPipelinequery{ page?: int, pageSize?: int }VIEW_PROJECTSList partnership pipeline (prospects only)

Router: referrals

File: functions/src/api/routers/referrals.ts
ProcedureTypeInputAuthDescription
listProgramsquery{ page?: int, pageSize?: int }VIEW_PROJECTSList referral programs
listTrackingquery{ page?: int, pageSize?: int }VIEW_PROJECTSList referral tracking entries
listRewardsquery{ page?: int, pageSize?: int }VIEW_PROJECTSList referral rewards

Router: support

File: functions/src/api/routers/support.ts
ProcedureTypeInputAuthDescription
listTutorialsquery{ page?: int, pageSize?: int }VIEW_PROJECTSList support tutorials
listArticlesquery{ page?: int, pageSize?: int }VIEW_PROJECTSList knowledge base articles
listVideosquery{ page?: int, pageSize?: int }VIEW_PROJECTSList support videos

Router: platformApi

File: functions/src/api/routers/platformApi.ts All procedures require superadmin access and return stub data ({ items: [], total: 0 } or {}) until platform services are built. All accept { page?: int, pageSize?: int } unless noted.

Tenants

ProcedureTypeInputAuthDescription
listTenantsquery{ page?, pageSize? }superAdminList all tenants
tenantHealthquery{ page?, pageSize? }superAdminGet tenant health metrics

Subscriptions

ProcedureTypeInputAuthDescription
listPlansquery{ page?, pageSize? }superAdminList subscription plans
listTrialsquery{ page?, pageSize? }superAdminList active trials
revenuequery{ page?, pageSize? }superAdminGet revenue data
churnquery{ page?, pageSize? }superAdminGet churn metrics
listCouponsquery{ page?, pageSize? }superAdminList coupon codes

Email

ProcedureTypeInputAuthDescription
listEmailProvidersquery{ page?, pageSize? }superAdminList email providers
listEmailTemplatesquery{ page?, pageSize? }superAdminList email templates
emailLogsquery{ page?, pageSize? }superAdminGet email delivery logs

Orchestration

ProcedureTypeInputAuthDescription
listWorkflowsquery{ page?, pageSize? }superAdminList workflow definitions
jobQueuequery{ page?, pageSize? }superAdminGet background job queue status
schedulerquery{ page?, pageSize? }superAdminGet scheduled task status

EventBus

ProcedureTypeInputAuthDescription
listEventTopicsquery{ page?, pageSize? }superAdminList event topics
deadLetterQueuequery{ page?, pageSize? }superAdminGet dead letter queue entries

Notifications

ProcedureTypeInputAuthDescription
listNotifChannelsquery{ page?, pageSize? }superAdminList notification channels
listNotifTemplatesquery{ page?, pageSize? }superAdminList notification templates

Config

ProcedureTypeInputAuthDescription
getConfigquery{}superAdminGet platform configuration

Intelligence (AI)

ProcedureTypeInputAuthDescription
listModelsquery{ page?, pageSize? }superAdminList AI models
listPromptsquery{ page?, pageSize? }superAdminList prompt templates
listRAGPipelinesquery{ page?, pageSize? }superAdminList RAG pipelines
aiCostsquery{ page?, pageSize? }superAdminGet AI cost analytics

Agentics

ProcedureTypeInputAuthDescription
listAgentsquery{ page?, pageSize? }superAdminList AI agents
agentLogsquery{ page?, pageSize? }superAdminGet agent execution logs

Extensions

ProcedureTypeInputAuthDescription
extRegistryquery{ page?, pageSize? }superAdminBrowse the extension registry
extReviewsquery{ page?, pageSize? }superAdminList extension reviews
extAnalyticsquery{ page?, pageSize? }superAdminGet extension usage analytics

Integrations

ProcedureTypeInputAuthDescription
listIntegrationsquery{ page?, pageSize? }superAdminList third-party integrations
listWebhooksquery{ page?, pageSize? }superAdminList webhooks
listAPIKeysquery{ page?, pageSize? }superAdminList API keys

Policies

ProcedureTypeInputAuthDescription
listPoliciesquery{ page?, pageSize? }superAdminList platform policies
policyEnforcementquery{ page?, pageSize? }superAdminGet policy enforcement data

Referrals

ProcedureTypeInputAuthDescription
listReferralProgramsquery{ page?, pageSize? }superAdminList referral programs
referralTrackingquery{ page?, pageSize? }superAdminGet referral tracking data
listReferralPayoutsquery{ page?, pageSize? }superAdminList referral payouts

SuperAdmin

ProcedureTypeInputAuthDescription
listSuperAdminsquery{ page?, pageSize? }superAdminList superadmin users
superAdminLogsquery{ page?, pageSize? }superAdminGet superadmin activity logs

Unmounted Routers

The following router is defined but not mounted in the app router. It is exposed via the REST API only:

grantIngest

File: functions/src/api/routers/grantIngest.ts
ProcedureTypeInputAuthDescription
ingestmutationGrantIngestPayload (grant data from n8n)API key (public procedure with key validation)Receive grant data from external ingestion workflows

Maintenance

Update this document when adding or removing tRPC procedures. The canonical source of truth is functions/src/api/routers/index.ts (the root app router) and the individual router files in functions/src/api/routers/. Input schemas are defined in packages/domain-schema/src/trpc/ and shared across the monorepo.