ComplianceResource
API reference for the Compliance resource.
Methods
getAllData
Fetch all compliance data in a single call.
typescript
async getAllData(): Promise<ComplianceData>Returns:
typescript
interface ComplianceData {
assignees: Assignee[];
assuranceTasks: AssuranceTask[];
assets: Asset[];
risks: Risk[];
documents: SupportingDoc[];
policies: Policy[];
checklists: Checklist[];
correctiveActions: CorrectiveAction[];
processes: ComplianceProcess[];
}getCalendar
Get compliance calendar with optional filtering.
typescript
async getCalendar(options?: CalendarOptions): Promise<CalendarResponse>Parameters:
typescript
interface CalendarOptions {
year?: number;
month?: number;
startDate?: Date | string;
endDate?: Date | string;
}Returns:
typescript
interface CalendarResponse {
summary: CalendarSummary;
calendar: CalendarStructure;
events: CalendarEvent[];
}getCalendarByYear
Get calendar for a specific year.
typescript
async getCalendarByYear(year: number): Promise<CalendarResponse>getCalendarByMonth
Get calendar for a specific month.
typescript
async getCalendarByMonth(year: number, month: number): Promise<CalendarResponse>getCalendarByDateRange
Get calendar for a date range.
typescript
async getCalendarByDateRange(startDate: Date | string, endDate: Date | string): Promise<CalendarResponse>getAssignees
Get all assignees.
typescript
async getAssignees(): Promise<Assignee[]>getAssuranceTasks
Get all assurance tasks.
typescript
async getAssuranceTasks(): Promise<AssuranceTask[]>getAssets
Get all assets.
typescript
async getAssets(): Promise<Asset[]>getRisks
Get all risks.
typescript
async getRisks(): Promise<Risk[]>getDocuments
Get all documents.
typescript
async getDocuments(): Promise<SupportingDoc[]>getPolicies
Get all policies.
typescript
async getPolicies(): Promise<Policy[]>getChecklists
Get all checklists.
typescript
async getChecklists(): Promise<Checklist[]>getCorrectiveActions
Get all corrective actions.
typescript
async getCorrectiveActions(): Promise<CorrectiveAction[]>getProcesses
Get all processes.
typescript
async getProcesses(): Promise<ComplianceProcess[]>Types
CalendarEvent
typescript
interface CalendarEvent {
id: string;
type: 'assurance-task' | 'checklist' | 'corrective-action' | 'process' |
'risk-review' | 'asset-review' | 'document-review' | 'policy-review';
title: string;
date: Date | string;
dateFormatted?: string;
assignee?: string;
status?: string;
riskLevel?: string;
category?: string;
documentType?: string;
}CalendarSummary
typescript
interface CalendarSummary {
totalEvents: number;
byType: {
'assurance-task': number;
'checklist': number;
'corrective-action': number;
'process': number;
'risk-review': number;
'asset-review': number;
'document-review': number;
'policy-review': number;
};
yearsCount: number;
}