Skip to content

FrameworksResource

API reference for the Frameworks resource.

Methods

list

List all frameworks.

typescript
async list(options?: ListOptions): Promise<ListResponse<Framework>>

get

Get a single framework by ID.

typescript
async get(id: string): Promise<Framework>

getAvailable

Get all available frameworks.

typescript
async getAvailable(): Promise<Framework[]>

getActive

Get active frameworks for the organization.

typescript
async getActive(): Promise<Framework[]>

activate

Activate a framework.

typescript
async activate(id: string): Promise<Framework>

deactivate

Deactivate a framework.

typescript
async deactivate(id: string): Promise<Framework>

Types

Framework

typescript
interface Framework {
  id: string;
  type: 'framework';
  name: string;
  displayName?: string;
  version?: string;
  description?: string;
  active: boolean;
  controlCount?: number;
  createdAt: Date;
  updatedAt: Date;
}

Example

typescript
// List all frameworks
const response = await client.frameworks.list();

for (const framework of response.data) {
  console.log(`${framework.name} v${framework.version}`);
  console.log(`  Controls: ${framework.controlCount}`);
  console.log(`  Active: ${framework.active}`);
}

// Activate a framework
await client.frameworks.activate('soc2');

Released under the MIT License.