AssuranceResource
API reference for the Assurance resource.
Methods
list
List all assurance tasks with optional filtering.
typescript
async list(options?: ListOptions): Promise<ListResponse<AssuranceTask>>Filter Options:
| Filter | Type | Description |
|---|---|---|
standard | string | Filter by standard (e.g., 'ISO 27001') |
overdue | boolean | Only overdue tasks |
dueSoon | boolean | Tasks due soon |
assignee | string | Filter by assignee |
includeDeleted | boolean | Include deleted tasks |
Example:
typescript
const tasks = await client.assurance.list({
filter: { overdue: true }
});get
Get a single task by ID.
typescript
async get(id: string, options?: { include?: string[] }): Promise<AssuranceTask>create
Create a new assurance task.
typescript
async create(data: CreateAssuranceTaskInput): Promise<AssuranceTask>Parameters:
typescript
interface CreateAssuranceTaskInput {
description: string;
controlId?: string;
assignedTo?: string;
dueDate?: Date;
frequency?: 'once' | 'weekly' | 'monthly' | 'quarterly' | 'annually';
evidenceRequired?: boolean;
}update
Update an existing task.
typescript
async update(id: string, data: UpdateAssuranceTaskInput): Promise<AssuranceTask>delete
Delete a task.
typescript
async delete(id: string): Promise<void>complete
Complete a task with evidence.
typescript
async complete(id: string, evidence?: string[], notes?: string): Promise<AssuranceTask>Parameters:
| Name | Type | Description |
|---|---|---|
id | string | Task ID |
evidence | string[] | Evidence file references |
notes | string | Completion notes |
getByControl
Get tasks associated with a control.
typescript
async getByControl(controlId: string): Promise<AssuranceTask[]>getOverdue
Get all overdue tasks.
typescript
async getOverdue(): Promise<AssuranceTask[]>Types
AssuranceTask
typescript
interface AssuranceTask {
id: string;
type: 'assurance_task';
description: string;
controlId?: string;
assignedTo?: string;
status: 'pending' | 'in_progress' | 'completed' | 'overdue';
dueDate?: Date | null;
completedDate?: Date | null;
frequency?: 'once' | 'weekly' | 'monthly' | 'quarterly' | 'annually' | string;
evidence?: string[];
evidenceRequired?: boolean;
createdAt: Date;
updatedAt: Date;
componentId?: string;
assID?: string;
checkDetail?: Record<string, unknown>;
checkFrequency?: Record<string, unknown>;
checkHistory?: Record<string, unknown>;
priority?: string;
}