Skip to content
API Reference
Lists and views

View records

View records in Views — Micro TypeScript reference.

Reference for TypeScript SDK 0.14.0.

Release source · Setup and client configuration

list

GET /v2/prism/{teamId}/{objectType}/views/{viewId}/records

client.views.records.list(viewID, { ...params }) -> RecordListResponse

List records selected by a view (filters and sorts applied; pinned record_order overlaid first)

pin

POST /v2/prism/{teamId}/{objectType}/views/{viewId}/records/{objectId}

client.views.records.pin(objectID, { ...params }) -> void

Pin a record to the view (append to record_order)

reorder

PATCH /v2/prism/{teamId}/{objectType}/views/{viewId}/records

client.views.records.reorder(viewID, { ...params }) -> void

Bulk reorder pinned records

unpin

DELETE /v2/prism/{teamId}/{objectType}/views/{viewId}/records/{objectId}

client.views.records.unpin(objectID, { ...params }) -> void

Unpin a record from the view

Parameter and response types

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

RecordListResponse

Source

export interface RecordListResponse {
  data: Array<{ [key: string]: unknown }>;

  /**
   * True if more records exist beyond this page.
   */
  has_more: boolean;

  /**
   * Opaque cursor for the next page; null when `has_more` is false.
   */
  next_cursor?: string | null;
}

RecordListParams

Source

export interface RecordListParams {
  /**
   * Path param
   */
  teamId?: string;

  /**
   * Path param
   */
  objectType:
    | 'comment'
    | 'action'
    | 'deal'
    | 'engagement'
    | 'document'
    | 'event'
    | 'identity'
    | 'organization';

  /**
   * Query param: 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.
   */
  cursor?: string;

  /**
   * Query param
   */
  limit?: number;

  /**
   * Query param: Page number (1-based). Prefer `cursor`.
   */
  page?: number;
}

RecordPinParams

Source

export interface RecordPinParams {
  /**
   * Path param
   */
  teamId?: string;

  /**
   * Path param
   */
  objectType:
    | 'comment'
    | 'action'
    | 'deal'
    | 'engagement'
    | 'document'
    | 'event'
    | 'identity'
    | 'organization';

  /**
   * Path param
   */
  viewId: 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;
}

RecordReorderParams

Source

export interface RecordReorderParams {
  /**
   * Path param
   */
  teamId?: string;

  /**
   * Path param
   */
  objectType:
    | 'comment'
    | 'action'
    | 'deal'
    | 'engagement'
    | 'document'
    | 'event'
    | 'identity'
    | 'organization';

  /**
   * Body param
   */
  object_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;
}

RecordUnpinParams

Source

export interface RecordUnpinParams {
  teamId?: string;

  objectType:
    | 'comment'
    | 'action'
    | 'deal'
    | 'engagement'
    | 'document'
    | 'event'
    | 'identity'
    | 'organization';

  viewId: string;
}

Records

Source

export declare namespace Records {
  export {
    type RecordListResponse as RecordListResponse,
    type RecordListParams as RecordListParams,
    type RecordPinParams as RecordPinParams,
    type RecordReorderParams as RecordReorderParams,
    type RecordUnpinParams as RecordUnpinParams,
  };
}
micro.so