# Engagements

Engagements in Prism / Objects — Micro TypeScript reference.

Reference for TypeScript SDK **0.14.0**.

[Release source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/api.md) · [Setup and client configuration](/docs/reference/typescript)

## create

`POST /v2/prism/{teamId}/engagement`

````text
client.prism.objects.engagements.create({ ...params }) -> EngagementCreateResponse
````

Creates a record. For `document`, writing `content` (or HTML) stores the
property and reads back, but the in-app editor is CRDT-backed and will render a
blank page until that document has been opened and saved in the app. Treat
API-created docs as data records, not as collaboratively edited pages, unless
you only need the stored property values.

```ts
const engagement =
  await client.prism.objects.engagements.create({
    default: {
      full_name: 'Sarah Chen',
      email: 'sarah@example.com',
      title: 'Partner',
      organization: 'Acme Ventures',
    },
  });
```

## update

`PATCH /v2/prism/{teamId}/engagement/{engagementId}`

````text
client.prism.objects.engagements.update(engagementID, { ...params }) -> EngagementUpdateResponse
````

Patch object

```ts
const engagement =
  await client.prism.objects.engagements.update(
    '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
    { default: { title: 'General Partner' } },
  );
```

## list

`GET /v2/prism/{teamId}/engagement`

````text
client.prism.objects.engagements.list({ ...params }) -> EngagementListResponse
````

Convenience list endpoint. Equivalent to
`POST /v2/prism/{teamId}/{objectType}/query` with an empty body, plus
query-string sugar for the common cases. Any unrecognized query parameter is
interpreted as an equality filter on a property of that name; pass arrays for
`in`. Values are received as strings, so non-string property filters via this
endpoint may not work — use the `query` endpoint for typed comparisons or
anything beyond simple equality.

```ts
const engagements =
  await client.prism.objects.engagements.list();
```

## delete

`DELETE /v2/prism/{teamId}/engagement/{engagementId}`

````text
client.prism.objects.engagements.delete(engagementID, { ...params }) -> void
````

Delete object

```ts
await client.prism.objects.engagements.delete(
  '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
);
```

## bulkCreate

`POST /v2/prism/{teamId}/engagement/import`

````text
client.prism.objects.engagements.bulkCreate({ ...params }) -> EngagementBulkCreateResponse
````

Import multiple objects in batch. Properties are keyed by slug. Automatically
routes based on size: small batches complete synchronously and return 200 with
the final `ImportJob`; large batches start an async job, return 202 with
`status: processing` and a `Location` header, and can be polled via
`GET /v2/prism/{teamId}/imports/{jobId}`.

```ts
const response =
  await client.prism.objects.engagements.bulkCreate({
    objects: [{}],
  });
```

## bulkDelete

`POST /v2/prism/{teamId}/engagement/batch/delete`

````text
client.prism.objects.engagements.bulkDelete({ ...params }) -> EngagementBulkDeleteResponse
````

Soft-delete up to 100 records in a single call. Same partial-success contract as
batch/update.

```ts
const response =
  await client.prism.objects.engagements.bulkDelete({
    ids: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'],
  });
```

## bulkUpdate

`POST /v2/prism/{teamId}/engagement/batch/update`

````text
client.prism.objects.engagements.bulkUpdate({ ...params }) -> EngagementBulkUpdateResponse
````

Patch up to 100 records in a single call. Each item is attempted independently —
failures don't abort the batch. Inspect `results[].status` per item.

```ts
const response =
  await client.prism.objects.engagements.bulkUpdate({
    items: [{ id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }],
  });
```

## count

`GET /v2/prism/{teamId}/engagement/count`

````text
client.prism.objects.engagements.count({ ...params }) -> EngagementCountResponse
````

Returns the total number of records of this object type that the caller can see.
Avoids the page-overshoot anti-pattern — clients no longer need to keep paging
until `has_more` flips false to discover the total. Currently does not apply
query filters; for a filtered total, pass `include_total: true` in a POST
`/query` body. Unfiltered counts on high-cardinality types (especially
`engagement`) scan the full access-scoped set and can take tens of seconds or
time out; prefer a filtered `include_total` query or accept that this endpoint
is expensive there.

```ts
const response =
  await client.prism.objects.engagements.count();
```

## duplicate

`POST /v2/prism/{teamId}/engagement/{engagementId}/duplicate`

````text
client.prism.objects.engagements.duplicate(engagementID, { ...params }) -> EngagementDuplicateResponse
````

Duplicate object

```ts
const response =
  await client.prism.objects.engagements.duplicate(
    '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
  );
```

## find

`GET /v2/prism/{teamId}/engagement/by/{slug}/{value}`

````text
client.prism.objects.engagements.find(value, { ...params }) -> EngagementFindResponse
````

Returns the single record whose property `{slug}` equals `{value}`. 404 if
nothing matches; 409 if more than one record matches.

```ts
const response =
  await client.prism.objects.engagements.find('value', {
    slug: 'slug',
  });
```

## get

`GET /v2/prism/{teamId}/engagement/{engagementId}`

````text
client.prism.objects.engagements.get(engagementID, { ...params }) -> EngagementGetResponse
````

Get object

```ts
const engagement =
  await client.prism.objects.engagements.get(
    '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
  );
```

## query

`POST /v2/prism/{teamId}/engagement/query`

````text
client.prism.objects.engagements.query({ ...params }) -> EngagementQueryResponse
````

Query

```ts
const response =
  await client.prism.objects.engagements.query({
    query: {
      select: [
        'full_name',
        'email',
        'title',
        'organization',
      ],
      filter: [{ full_name: { '=': 'Sarah Chen' } }],
      limit: 10,
    },
    include_total: true,
  });
```

## restore

`POST /v2/prism/{teamId}/engagement/{engagementId}/restore`

````text
client.prism.objects.engagements.restore(engagementID, { ...params }) -> EngagementRestoreResponse
````

Restore object

```ts
const response =
  await client.prism.objects.engagements.restore(
    '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
  );
```

## upsert

`PUT /v2/prism/{teamId}/engagement/by/{slug}/{value}`

````text
client.prism.objects.engagements.upsert(value, { ...params }) -> EngagementUpsertResponse
````

Idempotent create-or-update keyed on `{slug}={value}`. If exactly one record
matches, it is patched and 200 is returned. If none match, a new record is
created (with the lookup property set if absent) and 201 is returned. If
multiple records match, 409 is returned and you should patch by id instead.

```ts
const response =
  await client.prism.objects.engagements.upsert('value', {
    slug: 'slug',
  });
```

## Parameter and response types

These declarations show the request parameters and response shapes used by the methods above.

### Engagement

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
export interface Engagement {
  /**
   * Properties keyed by property slug. Values can be strings, numbers, booleans,
   * arrays, or null. For select/multiselect properties, values may be option slugs
   * or option UUIDs on write; option slugs are returned on read.
   */
  default?: { [key: string]: unknown };

  list?: unknown;
}
````


### EngagementCreateResponse

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
/**
 * Object returned by reads (get/create/patch/restore). id is always present.
 */
export interface EngagementCreateResponse {
  id: string;

  /**
   * Properties keyed by property slug.
   */
  default?: { [key: string]: unknown };

  list?: unknown;
}
````


### EngagementUpdateResponse

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
/**
 * Object returned by reads (get/create/patch/restore). id is always present.
 */
export interface EngagementUpdateResponse {
  id: string;

  /**
   * Properties keyed by property slug.
   */
  default?: { [key: string]: unknown };

  list?: unknown;
}
````


### EngagementListResponse

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
export interface EngagementListResponse {
  data: Array<EngagementListResponse.Data>;

  /**
   * Accurate end-of-data signal — false on the last page, never forces clients to
   * overshoot.
   */
  has_more: boolean;

  next_cursor?: string | null;

  /**
   * Populated only when `?include_total=true` was passed.
   */
  total?: number | null;
}
````


### EngagementListResponse

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
export namespace EngagementListResponse {
  /**
   * Row returned by the query endpoint. `id` is always present at the top level.
   * Selected property values are returned under `properties`, keyed by property
   * slug. Reference-typed values are returned as nested `{ id, properties }`
   * objects.
   */
  export interface Data {
    id: string;

    is_user_object?: boolean;

    /**
     * Selected property values keyed by property slug. For select/multiselect
     * properties, option slugs are returned. For reference properties, values are
     * nested `{ id, properties }` objects.
     */
    properties?: { [key: string]: unknown };

    source?: Array<string> | null;
  }
}
````


### EngagementBulkCreateResponse

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
/**
 * Status snapshot of an import job. Same shape used by the POST /import response
 * and by GET /imports/{jobId}.
 */
export interface EngagementBulkCreateResponse {
  /**
   * Null for sync imports (results inlined). Set for async imports.
   */
  job_id: string | null;

  status: 'complete' | 'processing' | 'failed';

  /**
   * Total number of rows in the import.
   */
  total: number;

  created_at?: string;

  /**
   * Set when status=failed; describes the job-level failure (not per-row).
   */
  error?: EngagementBulkCreateResponse.Error;

  expires_at?: string;

  failed?: number;

  /**
   * Rows that have been attempted (succeeded + failed).
   */
  processed?: number;

  /**
   * Per-row outcomes. Always present for sync imports; populated for async imports
   * once the job reaches `complete`.
   */
  results?: Array<EngagementBulkCreateResponse.Result>;

  succeeded?: number;

  updated_at?: string;
}
````


### EngagementBulkCreateResponse

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
export namespace EngagementBulkCreateResponse {
  /**
   * Set when status=failed; describes the job-level failure (not per-row).
   */
  export interface Error {
    code?: string;

    message?: string;
  }

  export interface Result {
    id?: string | null;

    created?: boolean;

    error?: Result.Error;

    /**
     * True if the row matched an existing record via the dedupe key.
     */
    existing?: boolean;

    /**
     * Zero-based position of this row in the request.
     */
    input_index?: number;

    /**
     * True if a matching record was updated.
     */
    updated?: boolean;
  }

  export namespace Result {
    export interface Error {
      code?: string;

      message?: string;
    }
  }
}
````


### EngagementBulkDeleteResponse

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
/**
 * Partial-success bulk operation result. Inspect `results[].status` per item; the
 * operation as a whole returns 200 even if some items failed.
 */
export interface EngagementBulkDeleteResponse {
  results: Array<EngagementBulkDeleteResponse.Result>;

  summary: EngagementBulkDeleteResponse.Summary;
}
````


### EngagementBulkDeleteResponse

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
export namespace EngagementBulkDeleteResponse {
  export interface Result {
    /**
     * Item ID, or null if the input was unparseable.
     */
    id: string | null;

    status: 'ok' | 'error';

    error?: Result.Error;

    /**
     * Object returned by reads (get/create/patch/restore). id is always present.
     */
    record?: Result.Record;
  }

  export namespace Result {
    export interface Error {
      code?: string;

      message?: string;
    }

    /**
     * Object returned by reads (get/create/patch/restore). id is always present.
     */
    export interface Record {
      id: string;

      /**
       * Properties keyed by property slug.
       */
      default?: { [key: string]: unknown };

      list?: unknown;
    }
  }

  export interface Summary {
    failed: number;

    succeeded: number;

    total: number;
  }
}
````


### EngagementBulkUpdateResponse

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
/**
 * Partial-success bulk operation result. Inspect `results[].status` per item; the
 * operation as a whole returns 200 even if some items failed.
 */
export interface EngagementBulkUpdateResponse {
  results: Array<EngagementBulkUpdateResponse.Result>;

  summary: EngagementBulkUpdateResponse.Summary;
}
````


### EngagementBulkUpdateResponse

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
export namespace EngagementBulkUpdateResponse {
  export interface Result {
    /**
     * Item ID, or null if the input was unparseable.
     */
    id: string | null;

    status: 'ok' | 'error';

    error?: Result.Error;

    /**
     * Object returned by reads (get/create/patch/restore). id is always present.
     */
    record?: Result.Record;
  }

  export namespace Result {
    export interface Error {
      code?: string;

      message?: string;
    }

    /**
     * Object returned by reads (get/create/patch/restore). id is always present.
     */
    export interface Record {
      id: string;

      /**
       * Properties keyed by property slug.
       */
      default?: { [key: string]: unknown };

      list?: unknown;
    }
  }

  export interface Summary {
    failed: number;

    succeeded: number;

    total: number;
  }
}
````


### EngagementCountResponse

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
export interface EngagementCountResponse {
  /**
   * Number of records matching the access scope.
   */
  total: number;
}
````


### EngagementDuplicateResponse

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
/**
 * Object returned by reads (get/create/patch/restore). id is always present.
 */
export interface EngagementDuplicateResponse {
  id: string;

  /**
   * Properties keyed by property slug.
   */
  default?: { [key: string]: unknown };

  list?: unknown;
}
````


### EngagementFindResponse

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
/**
 * Object returned by reads (get/create/patch/restore). id is always present.
 */
export interface EngagementFindResponse {
  id: string;

  /**
   * Properties keyed by property slug.
   */
  default?: { [key: string]: unknown };

  list?: unknown;
}
````


### EngagementGetResponse

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
/**
 * Object returned by reads (get/create/patch/restore). id is always present.
 */
export interface EngagementGetResponse {
  id: string;

  /**
   * Properties keyed by property slug.
   */
  default?: { [key: string]: unknown };

  list?: unknown;
}
````


### EngagementQueryResponse

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
export interface EngagementQueryResponse {
  data: Array<EngagementQueryResponse.Data>;

  /**
   * Accurate end-of-data signal. False when this page contains the last record; true
   * only when at least one more record exists. (Implementation note: the server
   * fetches one extra row internally to determine this — clients never need to
   * overshoot to discover the end.)
   */
  has_more: boolean;

  /**
   * Opaque cursor pointing at the next page. Pass it back unchanged. Do not parse
   * it. The current encoding is offset-based (page + limit), so it has the same
   * concurrent-write drift the deprecated `page` parameter has; treat it as a black
   * box so a future keyset cursor is a drop-in. Null when `has_more` is false.
   */
  next_cursor?: string | null;

  /**
   * Only populated when the request set `include_total: true`. Total number of
   * records matching the query, ignoring pagination. Opt-in because it costs an
   * additional pass over the result set.
   */
  total?: number | null;
}
````


### EngagementQueryResponse

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
export namespace EngagementQueryResponse {
  /**
   * Row returned by the query endpoint. `id` is always present at the top level.
   * Selected property values are returned under `properties`, keyed by property
   * slug. Reference-typed values are returned as nested `{ id, properties }`
   * objects.
   */
  export interface Data {
    id: string;

    is_user_object?: boolean;

    /**
     * Selected property values keyed by property slug. For select/multiselect
     * properties, option slugs are returned. For reference properties, values are
     * nested `{ id, properties }` objects.
     */
    properties?: { [key: string]: unknown };

    source?: Array<string> | null;
  }
}
````


### EngagementRestoreResponse

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
/**
 * Object returned by reads (get/create/patch/restore). id is always present.
 */
export interface EngagementRestoreResponse {
  id: string;

  /**
   * Properties keyed by property slug.
   */
  default?: { [key: string]: unknown };

  list?: unknown;
}
````


### EngagementUpsertResponse

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
/**
 * Object returned by reads (get/create/patch/restore). id is always present.
 */
export interface EngagementUpsertResponse {
  id: string;

  /**
   * Properties keyed by property slug.
   */
  default?: { [key: string]: unknown };

  list?: unknown;
}
````


### EngagementCreateParams

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
export interface EngagementCreateParams {
  /**
   * Path param
   */
  teamId?: string;

  /**
   * Body param: Properties keyed by property slug. Values can be strings, numbers,
   * booleans, arrays, or null. For select/multiselect properties, values may be
   * option slugs or option UUIDs on write; option slugs are returned on read.
   */
  default?: { [key: string]: unknown };

  /**
   * Body param
   */
  list?: unknown;

  /**
   * Header param: A unique key (UUID or any opaque string up to 255 chars) for an
   * authenticated POST, PUT, or PATCH request. The server retains the initial claim
   * for 24 hours and replays a completed non-5xx response only when the method,
   * path, and request body all match. Reusing a non-expired key with a different
   * method, path, or body returns 409 `idempotency_key_mismatch`; reusing it after
   * expiry returns 409 `idempotency_key_stale`, so use a new key. Replays include
   * the `idempotent-replay: true` response header.
   */
  'Idempotency-Key'?: string;
}
````


### EngagementUpdateParams

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
export interface EngagementUpdateParams {
  /**
   * Path param
   */
  teamId?: string;

  /**
   * Body param: Properties keyed by property slug. Values can be strings, numbers,
   * booleans, arrays, or null. For select/multiselect properties, values may be
   * option slugs or option UUIDs on write; option slugs are returned on read.
   */
  default?: { [key: string]: unknown };

  /**
   * Body param
   */
  list?: unknown;

  /**
   * Header param: A unique key (UUID or any opaque string up to 255 chars) for an
   * authenticated POST, PUT, or PATCH request. The server retains the initial claim
   * for 24 hours and replays a completed non-5xx response only when the method,
   * path, and request body all match. Reusing a non-expired key with a different
   * method, path, or body returns 409 `idempotency_key_mismatch`; reusing it after
   * expiry returns 409 `idempotency_key_stale`, so use a new key. Replays include
   * the `idempotent-replay: true` response header.
   */
  'Idempotency-Key'?: string;

  /**
   * Header param: Optimistic concurrency. Pass back the `etag` header from a
   * previous GET of this record; the write only proceeds if the record hasn't
   * changed since. Mismatch → 412 `precondition_failed`. Use `*` to require the
   * record exists (any ETag accepted).
   */
  'If-Match'?: string;
}
````


### EngagementListParams

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
export interface EngagementListParams {
  /**
   * Path param
   */
  teamId?: string;

  /**
   * Query param: Opaque cursor from a previous response's `next_cursor`. Pass it
   * back unchanged to fetch the next page.
   */
  cursor?: string;

  /**
   * Query param: Include soft-deleted records. Pass the literal string `true`.
   */
  deleted?: boolean;

  /**
   * Query param: When set to `true`, the response includes a `total` field with the
   * unpaginated row count. Costs an extra pass; prefer `GET .../count` for the
   * unfiltered total.
   */
  include_total?: boolean;

  /**
   * Query param: Maximum number of rows to return. Capped server-side at 50.
   */
  limit?: number;

  /**
   * Query param: Scope properties to a specific list/app.
   */
  list_id?: string;

  /**
   * Query param: Comma-separated property slugs to return. Use dot notation for
   * relationships. `id` is always returned at the top level. Defaults to all
   * properties.
   */
  select?: string;

  /**
   * Query param: Comma-separated list of slugs. Prefix with `-` for descending.
   * Example: `sort=-updated_at,name`.
   */
  sort?: string;
}
````


### EngagementDeleteParams

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
export interface EngagementDeleteParams {
  /**
   * Path param
   */
  teamId?: string;

  /**
   * Header param: Optimistic concurrency. Pass back the `etag` header from a
   * previous GET of this record; the write only proceeds if the record hasn't
   * changed since. Mismatch → 412 `precondition_failed`. Use `*` to require the
   * record exists (any ETag accepted).
   */
  'If-Match'?: string;
}
````


### EngagementBulkCreateParams

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
export interface EngagementBulkCreateParams {
  /**
   * Path param
   */
  teamId?: string;

  /**
   * Body param: Array of objects to import with property values keyed by slug
   */
  objects: Array<PrismAPI.PrismObjectProperties>;

  /**
   * Body param
   */
  options?: EngagementBulkCreateParams.Options;

  /**
   * Header param: A unique key (UUID or any opaque string up to 255 chars) for an
   * authenticated POST, PUT, or PATCH request. The server retains the initial claim
   * for 24 hours and replays a completed non-5xx response only when the method,
   * path, and request body all match. Reusing a non-expired key with a different
   * method, path, or body returns 409 `idempotency_key_mismatch`; reusing it after
   * expiry returns 409 `idempotency_key_stale`, so use a new key. Replays include
   * the `idempotent-replay: true` response header.
   */
  'Idempotency-Key'?: string;
}
````


### EngagementBulkCreateParams

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
export namespace EngagementBulkCreateParams {
  export interface Options {
    /**
     * Whether deduplication should be case insensitive
     */
    caseInsensitive?: boolean;

    /**
     * When true, unknown values for select/multiselect properties are created as new
     * options instead of failing the import
     */
    create_missing_options?: boolean;

    /**
     * @deprecated Deprecated alias for list_id.
     */
    crm_id?: string;

    /**
     * Property slug to deduplicate on. A single-element array is also accepted;
     * compound (multi-slug) dedupe is not supported yet and is rejected with guidance.
     */
    dedupe_by?: string | Array<string>;

    /**
     * App/CRM ID for context (optional)
     */
    list_id?: string;

    /**
     * Require app_stage for every row in the selected list. app_stage is a reserved
     * list-scoped alias for native status.
     */
    require_list_stage?: boolean;

    /**
     * Patch a deduplicated record with the supplied properties instead of skipping it.
     */
    update_existing?: boolean;
  }
}
````


### EngagementBulkDeleteParams

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
export interface EngagementBulkDeleteParams {
  /**
   * Path param
   */
  teamId?: string;

  /**
   * Body param
   */
  ids: Array<string>;

  /**
   * Header param: A unique key (UUID or any opaque string up to 255 chars) for an
   * authenticated POST, PUT, or PATCH request. The server retains the initial claim
   * for 24 hours and replays a completed non-5xx response only when the method,
   * path, and request body all match. Reusing a non-expired key with a different
   * method, path, or body returns 409 `idempotency_key_mismatch`; reusing it after
   * expiry returns 409 `idempotency_key_stale`, so use a new key. Replays include
   * the `idempotent-replay: true` response header.
   */
  'Idempotency-Key'?: string;
}
````


### EngagementBulkUpdateParams

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
export interface EngagementBulkUpdateParams {
  /**
   * Path param
   */
  teamId?: string;

  /**
   * Body param
   */
  items: Array<EngagementBulkUpdateParams.Item>;

  /**
   * Header param: A unique key (UUID or any opaque string up to 255 chars) for an
   * authenticated POST, PUT, or PATCH request. The server retains the initial claim
   * for 24 hours and replays a completed non-5xx response only when the method,
   * path, and request body all match. Reusing a non-expired key with a different
   * method, path, or body returns 409 `idempotency_key_mismatch`; reusing it after
   * expiry returns 409 `idempotency_key_stale`, so use a new key. Replays include
   * the `idempotent-replay: true` response header.
   */
  'Idempotency-Key'?: string;
}
````


### EngagementBulkUpdateParams

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
export namespace EngagementBulkUpdateParams {
  /**
   * Object with `id` plus the same property body shape as PATCH
   * (`default`/`list`/`extended`).
   */
  export interface Item {
    id: string;

    [k: string]: unknown;
  }
}
````


### EngagementCountParams

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
export interface EngagementCountParams {
  /**
   * Path param
   */
  teamId?: string;

  /**
   * Query param: Scope the count to a specific list/app.
   */
  list_id?: string;
}
````


### EngagementDuplicateParams

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
export interface EngagementDuplicateParams {
  /**
   * Path param
   */
  teamId?: string;

  /**
   * Header param: A unique key (UUID or any opaque string up to 255 chars) for an
   * authenticated POST, PUT, or PATCH request. The server retains the initial claim
   * for 24 hours and replays a completed non-5xx response only when the method,
   * path, and request body all match. Reusing a non-expired key with a different
   * method, path, or body returns 409 `idempotency_key_mismatch`; reusing it after
   * expiry returns 409 `idempotency_key_stale`, so use a new key. Replays include
   * the `idempotent-replay: true` response header.
   */
  'Idempotency-Key'?: string;
}
````


### EngagementFindParams

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
export interface EngagementFindParams {
  /**
   * Path param
   */
  teamId?: string;

  /**
   * Path param: Property slug to match (e.g. `email`).
   */
  slug: string;

  /**
   * Query param: Scope the lookup to a specific list/app.
   */
  list_id?: string;
}
````


### EngagementGetParams

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
export interface EngagementGetParams {
  /**
   * Path param
   */
  teamId?: string;

  /**
   * Query param: Comma-separated property slugs to return. Use dot notation for
   * relationships. `id` is always returned at the top level. Defaults to all
   * properties.
   */
  select?: string;
}
````


### EngagementQueryParams

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
export interface EngagementQueryParams {
  /**
   * Path param
   */
  teamId?: string;

  /**
   * Body param
   */
  query: EngagementQueryParams.Query;

  /**
   * Body param
   */
  id?: string | Array<string>;

  /**
   * Body param
   */
  boxes?: Array<string>;

  /**
   * Body param: Alternative location for the opaque cursor (a sibling of `query`).
   * Use whichever feels more natural; if both are present, `query.cursor` wins.
   */
  cursor?: string;

  /**
   * Body param
   */
  deleted?: boolean;

  /**
   * Body param: When true, the response includes a `total` field with the
   * unpaginated row count. Costs an additional pass over the result set — for
   * unfiltered totals prefer `GET /v2/prism/{teamId}/{objectType}/count` instead.
   */
  include_total?: boolean;

  /**
   * Body param
   */
  sources?: Array<string>;

  /**
   * Header param: A unique key (UUID or any opaque string up to 255 chars) for an
   * authenticated POST, PUT, or PATCH request. The server retains the initial claim
   * for 24 hours and replays a completed non-5xx response only when the method,
   * path, and request body all match. Reusing a non-expired key with a different
   * method, path, or body returns 409 `idempotency_key_mismatch`; reusing it after
   * expiry returns 409 `idempotency_key_stale`, so use a new key. Replays include
   * the `idempotent-replay: true` response header.
   */
  'Idempotency-Key'?: string;
}
````


### EngagementQueryParams

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
export namespace EngagementQueryParams {
  export interface Query {
    /**
     * Property slugs to select. Use dot notation for relationships (e.g.
     * attendee.contact.first_name). `id` is always returned at the top level of each
     * row and does not need to be selected.
     */
    select: Array<string>;

    /**
     * Logical operator for combining filters
     */
    combinator?: 'AND' | 'OR';

    /**
     * Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged
     * to fetch the next page. When set, `page` and `limit` are derived from the cursor
     * and any explicit values are ignored.
     */
    cursor?: string;

    /**
     * Filters as [{ slug: { operator: value } }]. For select/multiselect properties,
     * values may be option slugs or option UUIDs.
     */
    filter?: Array<{
      [key: string]:
        | Query.PrismQueryFilterEq
        | Query.PrismQueryFilterNe
        | Query.PrismQueryFilterLt
        | Query.PrismQueryFilterGt
        | Query.PrismQueryFilterLte
        | Query.PrismQueryFilterGte
        | Query.Contains
        | Query.BeginsWith
        | Query.EndsWith
        | Query.NotContains
        | Query.Exists
        | Query.NotExists
        | Query.IsNull
        | Query.IsNotNull
        | Query.Between
        | Query.In
        | Query.NotIn;
    }>;

    /**
     * Maximum number of rows to return. Capped server-side at 50; requests above the
     * cap are rejected.
     */
    limit?: number;

    list_id?: string;

    /**
     * @deprecated Page number (1-based). Prefer `cursor`. Page-number pagination
     * drifts under concurrent writes; use it only for one-shot exports.
     */
    page?: number;

    /**
     * Sort order as [{ slug: direction }]. Array order determines sort priority
     */
    sort?: Array<{ [key: string]: 'asc' | 'desc' }>;
  }

  export namespace Query {
    export interface PrismQueryFilterEq {
      '=': string | boolean;
    }

    export interface PrismQueryFilterNe {
      '!=': string | boolean;
    }

    export interface PrismQueryFilterLt {
      '<': string;
    }

    export interface PrismQueryFilterGt {
      '>': string;
    }

    export interface PrismQueryFilterLte {
      '<=': string;
    }

    export interface PrismQueryFilterGte {
      '>=': string;
    }

    export interface Contains {
      contains: string | boolean | Array<string>;
    }

    export interface BeginsWith {
      begins_with: string;
    }

    export interface EndsWith {
      ends_with: string;
    }

    export interface NotContains {
      not_contains: string;
    }

    export interface Exists {
      exists: boolean;
    }

    export interface NotExists {
      not_exists: boolean;
    }

    export interface IsNull {
      is_null: string | boolean | Array<string>;
    }

    export interface IsNotNull {
      is_not_null: string | boolean | Array<string>;
    }

    export interface Between {
      between: string | boolean | Array<string>;
    }

    export interface In {
      in: Array<string>;
    }

    export interface NotIn {
      not_in: Array<string>;
    }
  }
}
````


### EngagementRestoreParams

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
export interface EngagementRestoreParams {
  /**
   * Path param
   */
  teamId?: string;

  /**
   * Header param: A unique key (UUID or any opaque string up to 255 chars) for an
   * authenticated POST, PUT, or PATCH request. The server retains the initial claim
   * for 24 hours and replays a completed non-5xx response only when the method,
   * path, and request body all match. Reusing a non-expired key with a different
   * method, path, or body returns 409 `idempotency_key_mismatch`; reusing it after
   * expiry returns 409 `idempotency_key_stale`, so use a new key. Replays include
   * the `idempotent-replay: true` response header.
   */
  'Idempotency-Key'?: string;
}
````


### EngagementUpsertParams

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
export interface EngagementUpsertParams {
  /**
   * Path param
   */
  teamId?: string;

  /**
   * Path param
   */
  slug: string;

  /**
   * Query param: Scope the upsert to a specific list/app. Required to match or write
   * list-scoped properties, including `app_stage`.
   */
  list_id?: string;

  /**
   * Body param: Properties keyed by property slug. Values can be strings, numbers,
   * booleans, arrays, or null. For select/multiselect properties, values may be
   * option slugs or option UUIDs on write; option slugs are returned on read.
   */
  default?: { [key: string]: unknown };

  /**
   * Body param
   */
  list?: unknown;

  /**
   * Header param: A unique key (UUID or any opaque string up to 255 chars) for an
   * authenticated POST, PUT, or PATCH request. The server retains the initial claim
   * for 24 hours and replays a completed non-5xx response only when the method,
   * path, and request body all match. Reusing a non-expired key with a different
   * method, path, or body returns 409 `idempotency_key_mismatch`; reusing it after
   * expiry returns 409 `idempotency_key_stale`, so use a new key. Replays include
   * the `idempotent-replay: true` response header.
   */
  'Idempotency-Key'?: string;
}
````


### Engagements

[Source](https://github.com/micro-so/micro-sdk-ts/blob/v0.14.0/src/resources/prism/objects/engagements/engagements.ts)

````text
export declare namespace Engagements {
  export {
    type Engagement as Engagement,
    type EngagementCreateResponse as EngagementCreateResponse,
    type EngagementUpdateResponse as EngagementUpdateResponse,
    type EngagementListResponse as EngagementListResponse,
    type EngagementBulkCreateResponse as EngagementBulkCreateResponse,
    type EngagementBulkDeleteResponse as EngagementBulkDeleteResponse,
    type EngagementBulkUpdateResponse as EngagementBulkUpdateResponse,
    type EngagementCountResponse as EngagementCountResponse,
    type EngagementDuplicateResponse as EngagementDuplicateResponse,
    type EngagementFindResponse as EngagementFindResponse,
    type EngagementGetResponse as EngagementGetResponse,
    type EngagementQueryResponse as EngagementQueryResponse,
    type EngagementRestoreResponse as EngagementRestoreResponse,
    type EngagementUpsertResponse as EngagementUpsertResponse,
    type EngagementCreateParams as EngagementCreateParams,
    type EngagementUpdateParams as EngagementUpdateParams,
    type EngagementListParams as EngagementListParams,
    type EngagementDeleteParams as EngagementDeleteParams,
    type EngagementBulkCreateParams as EngagementBulkCreateParams,
    type EngagementBulkDeleteParams as EngagementBulkDeleteParams,
    type EngagementBulkUpdateParams as EngagementBulkUpdateParams,
    type EngagementCountParams as EngagementCountParams,
    type EngagementDuplicateParams as EngagementDuplicateParams,
    type EngagementFindParams as EngagementFindParams,
    type EngagementGetParams as EngagementGetParams,
    type EngagementQueryParams as EngagementQueryParams,
    type EngagementRestoreParams as EngagementRestoreParams,
    type EngagementUpsertParams as EngagementUpsertParams,
  };

  export {
    Grant as Grant,
    type GrantUpdateResponse as GrantUpdateResponse,
    type GrantGetResponse as GrantGetResponse,
    type GrantUpdateParams as GrantUpdateParams,
    type GrantGetParams as GrantGetParams,
  };
}
````
