# Brief

## Delete

`client.projects.brief.delete(stringprojectID, RequestOptionsoptions?): BriefDeleteResponse`

**delete** `/projects/{projectId}/brief`

Delete the project's Quality Gate brief

### Parameters

- `projectID: string`

### Returns

- `BriefDeleteResponse`

  - `deleted: boolean`

### Example

```typescript
import Scenario from '@scenario-labs/sdk';

const client = new Scenario({
  apiKey: process.env['SCENARIO_SDK_API_KEY'], // This is the default and can be omitted
  apiSecret: process.env['SCENARIO_SDK_API_SECRET'], // This is the default and can be omitted
});

const brief = await client.projects.brief.delete('projectId');

console.log(brief.deleted);
```

#### Response

```json
{
  "deleted": true
}
```

## Retrieve

`client.projects.brief.retrieve(stringprojectID, RequestOptionsoptions?): BriefRetrieveResponse`

**get** `/projects/{projectId}/brief`

Get the project's Quality Gate brief

### Parameters

- `projectID: string`

### Returns

- `BriefRetrieveResponse`

  - `brief: Brief`

    A brand-style / project-rules / campaign-context brief stored at one scope.

    - `id: string`

      Stable identifier derived from level + scopeId

    - `body: string`

      Free-text brief: brand style, rules, campaign context

    - `createdAt: string`

      ISO-8601 creation timestamp

    - `createdBy: string`

      User id that last wrote the brief

    - `enabled: boolean`

      Whether the brief is applied during verification

    - `level: "project" | "team"`

      Scope this brief applies to: team or project

      - `"project"`

      - `"team"`

    - `referenceAssetIds: Array<string>`

      Reference assets the verifier compares the image against

    - `scopeId: string`

      The id of the team or project that owns this brief

    - `updatedAt: string`

      ISO-8601 last-update timestamp

    - `sensitivity?: "high" | "low" | "medium"`

      Threshold strictness applied when verifying against this scope

      - `"high"`

      - `"low"`

      - `"medium"`

### Example

```typescript
import Scenario from '@scenario-labs/sdk';

const client = new Scenario({
  apiKey: process.env['SCENARIO_SDK_API_KEY'], // This is the default and can be omitted
  apiSecret: process.env['SCENARIO_SDK_API_SECRET'], // This is the default and can be omitted
});

const brief = await client.projects.brief.retrieve('projectId');

console.log(brief.brief);
```

#### Response

```json
{
  "brief": {
    "id": "id",
    "body": "body",
    "createdAt": "createdAt",
    "createdBy": "createdBy",
    "enabled": true,
    "level": "project",
    "referenceAssetIds": [
      "string"
    ],
    "scopeId": "scopeId",
    "updatedAt": "updatedAt",
    "sensitivity": "high"
  }
}
```

## Update

`client.projects.brief.update(stringprojectID, BriefUpdateParamsbody, RequestOptionsoptions?): BriefUpdateResponse`

**put** `/projects/{projectId}/brief`

Create or update the project's Quality Gate brief

### Parameters

- `projectID: string`

- `body: BriefUpdateParams`

  - `body: string`

    Free-text brief content

  - `enabled?: boolean`

    Whether the brief is applied during verification (default true)

  - `referenceAssetIds?: Array<string>`

    Reference assets the verifier compares against (max 10). Send [] to clear.

  - `sensitivity?: "high" | "low" | "medium"`

    Threshold strictness stored for this scope: low, medium, or high. Applied
    to verifications unless the verify call passes its own sensitivity.

    - `"high"`

    - `"low"`

    - `"medium"`

### Returns

- `BriefUpdateResponse`

  - `brief: Brief`

    A brand-style / project-rules / campaign-context brief stored at one scope.

    - `id: string`

      Stable identifier derived from level + scopeId

    - `body: string`

      Free-text brief: brand style, rules, campaign context

    - `createdAt: string`

      ISO-8601 creation timestamp

    - `createdBy: string`

      User id that last wrote the brief

    - `enabled: boolean`

      Whether the brief is applied during verification

    - `level: "project" | "team"`

      Scope this brief applies to: team or project

      - `"project"`

      - `"team"`

    - `referenceAssetIds: Array<string>`

      Reference assets the verifier compares the image against

    - `scopeId: string`

      The id of the team or project that owns this brief

    - `updatedAt: string`

      ISO-8601 last-update timestamp

    - `sensitivity?: "high" | "low" | "medium"`

      Threshold strictness applied when verifying against this scope

      - `"high"`

      - `"low"`

      - `"medium"`

### Example

```typescript
import Scenario from '@scenario-labs/sdk';

const client = new Scenario({
  apiKey: process.env['SCENARIO_SDK_API_KEY'], // This is the default and can be omitted
  apiSecret: process.env['SCENARIO_SDK_API_SECRET'], // This is the default and can be omitted
});

const brief = await client.projects.brief.update('projectId', { body: 'x' });

console.log(brief.brief);
```

#### Response

```json
{
  "brief": {
    "id": "id",
    "body": "body",
    "createdAt": "createdAt",
    "createdBy": "createdBy",
    "enabled": true,
    "level": "project",
    "referenceAssetIds": [
      "string"
    ],
    "scopeId": "scopeId",
    "updatedAt": "updatedAt",
    "sensitivity": "high"
  }
}
```

## Domain Types

### Brief Delete Response

- `BriefDeleteResponse`

  - `deleted: boolean`

### Brief Retrieve Response

- `BriefRetrieveResponse`

  - `brief: Brief`

    A brand-style / project-rules / campaign-context brief stored at one scope.

    - `id: string`

      Stable identifier derived from level + scopeId

    - `body: string`

      Free-text brief: brand style, rules, campaign context

    - `createdAt: string`

      ISO-8601 creation timestamp

    - `createdBy: string`

      User id that last wrote the brief

    - `enabled: boolean`

      Whether the brief is applied during verification

    - `level: "project" | "team"`

      Scope this brief applies to: team or project

      - `"project"`

      - `"team"`

    - `referenceAssetIds: Array<string>`

      Reference assets the verifier compares the image against

    - `scopeId: string`

      The id of the team or project that owns this brief

    - `updatedAt: string`

      ISO-8601 last-update timestamp

    - `sensitivity?: "high" | "low" | "medium"`

      Threshold strictness applied when verifying against this scope

      - `"high"`

      - `"low"`

      - `"medium"`

### Brief Update Response

- `BriefUpdateResponse`

  - `brief: Brief`

    A brand-style / project-rules / campaign-context brief stored at one scope.

    - `id: string`

      Stable identifier derived from level + scopeId

    - `body: string`

      Free-text brief: brand style, rules, campaign context

    - `createdAt: string`

      ISO-8601 creation timestamp

    - `createdBy: string`

      User id that last wrote the brief

    - `enabled: boolean`

      Whether the brief is applied during verification

    - `level: "project" | "team"`

      Scope this brief applies to: team or project

      - `"project"`

      - `"team"`

    - `referenceAssetIds: Array<string>`

      Reference assets the verifier compares the image against

    - `scopeId: string`

      The id of the team or project that owns this brief

    - `updatedAt: string`

      ISO-8601 last-update timestamp

    - `sensitivity?: "high" | "low" | "medium"`

      Threshold strictness applied when verifying against this scope

      - `"high"`

      - `"low"`

      - `"medium"`
