Skip to content

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:

FilterTypeDescription
standardstringFilter by standard (e.g., 'ISO 27001')
overduebooleanOnly overdue tasks
dueSoonbooleanTasks due soon
assigneestringFilter by assignee
includeDeletedbooleanInclude 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:

NameTypeDescription
idstringTask ID
evidencestring[]Evidence file references
notesstringCompletion 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;
}

Released under the MIT License.