ONE deal:list
← Receivers

deal:list

deal family

mcp

Lists the workspace's deals, newest first (a contact's deals when contact is named), or with view 'pipeline' reads the money: open value per stage, the open-value forecast by expected-close month, won and lost totals and why deals were lost, all per currency and never converted. truncated says when the workspace holds more deals than were read

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
manage_actors
The class of authority the caller must already hold, decided from the attested context with no round trip.
Cost
free
What one call costs, so you can budget before acting.
Reversible
yes
The effect can be undone by a later call.
Idempotent
yes
Safe to retry as-is.
Version
1.0.0
Pin this to keep a contract stable; additive bumps never break callers.

Send it with your agent

One click hands your coding agent a prompt that registers the substrate, reads this contract, and makes the call. Launch opens the app; the others copy the prompt.

Claude Code
Codex
Cursor
Gemini CLI
Claude Desktop
ChatGPT
curl -X POST https://one.ie/api/ask/deal:list \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "view": "pipeline" }}'

The key is never in a link. npx -y @oneie/cli login writes it to ~/.config/oneie/key on your machine.

Request

Validated before dispatch — an invalid payload is refused with the fix, never half-applied.

  • view pipeline optional pipeline = the sums: open value per stage and currency, the forecast, won and lost totals, lost reasons. Without it the deals themselves are listed
  • contact string optional Only this contact's deals; a contact of another workspace lists nothing
  • email string optional Only the deals of the contact this email matches
  • phone string optional Only the deals of the contact this phone matches
  • status open | won | lost optional
  • stage string optional
  • limit number optional At most this many deals; default 200, at most 5000
  • workspace string optional A client workspace to read; only one the caller controls. Defaults to the caller's own

Response

What comes back from the call.

  • ok boolean
  • workspace string
  • deals object[] | object The deals; with view pipeline, the count per status
  • truncated boolean true when the workspace holds more deals than this answer covers: a list is short, or a pipeline sum is a floor
  • stages object[] pipeline: open deals per stage and currency
  • forecast object[] pipeline: open value by expected-close month (YYYY-MM); month null = no close date
  • open object[]
  • won object[]
  • lost object[]
  • lostReasons object[] pipeline: why deals were lost, most value first
  • error string unauthenticated | no_db | forbidden | bad_view | bad_status

Traffic

Every call to deal:list, counted where it is dispatched — over HTTP or in-process alike. Aggregate only — no actor, no payload, no workspace.

Counting…

Wiring

Every place in the open source that names deal:list, and the file that answers it. Read from the tree at build time — a receiver is reached by NAME through one door, so there is no import edge to follow and a grep is the honest shape of the question. Structure, not volume — the count is in Traffic above.

Called from

API route 1
  • one.ie/web/src/lib/receiver-index.generated.ts:148
CLI 1
  • packages/cli/src/deals.ts:100
→

Answered by

deal:list one.ie/web/src/lib/resolvers/deals.ts:94 Dispatched through POST /api/ask/deal:list, after the envelope validates the payload.

deal family · 3 more

JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "view": {
      "description": "pipeline = the sums: open value per stage and currency, the forecast, won and lost totals, lost reasons. Without it the deals themselves are listed",
      "type": "string",
      "enum": [
        "pipeline"
      ]
    },
    "contact": {
      "description": "Only this contact's deals; a contact of another workspace lists nothing",
      "type": "string"
    },
    "email": {
      "description": "Only the deals of the contact this email matches",
      "type": "string"
    },
    "phone": {
      "description": "Only the deals of the contact this phone matches",
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "open",
        "won",
        "lost"
      ]
    },
    "stage": {
      "type": "string"
    },
    "limit": {
      "description": "At most this many deals; default 200, at most 5000",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "workspace": {
      "description": "A client workspace to read; only one the caller controls. Defaults to the caller's own",
      "type": "string"
    }
  },
  "additionalProperties": {}
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "workspace": {
      "type": "string"
    },
    "deals": {
      "description": "The deals; with view pipeline, the count per status",
      "anyOf": [
        {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tid": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "contact": {
                "type": "string"
              },
              "stage": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "open",
                  "won",
                  "lost"
                ]
              },
              "value_cents": {
                "type": "number"
              },
              "currency": {
                "type": "string"
              },
              "lost_reason": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "close_date": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "stage_changed_at": {
                "type": "number"
              },
              "created_at": {
                "type": "number"
              },
              "won_at": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "tid",
              "title",
              "contact",
              "stage",
              "status",
              "value_cents",
              "currency",
              "lost_reason",
              "close_date",
              "stage_changed_at",
              "created_at",
              "won_at"
            ]
          }
        },
        {
          "type": "object",
          "properties": {
            "open": {
              "type": "number"
            },
            "won": {
              "type": "number"
            },
            "lost": {
              "type": "number"
            }
          },
          "required": [
            "open",
            "won",
            "lost"
          ]
        }
      ]
    },
    "truncated": {
      "description": "true when the workspace holds more deals than this answer covers: a list is short, or a pipeline sum is a floor",
      "type": "boolean"
    },
    "stages": {
      "description": "pipeline: open deals per stage and currency",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "stage": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "deals": {
            "type": "number"
          },
          "value_cents": {
            "type": "number"
          }
        },
        "required": [
          "stage",
          "currency",
          "deals",
          "value_cents"
        ]
      }
    },
    "forecast": {
      "description": "pipeline: open value by expected-close month (YYYY-MM); month null = no close date",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "month": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": "string"
          },
          "deals": {
            "type": "number"
          },
          "value_cents": {
            "type": "number"
          }
        },
        "required": [
          "month",
          "currency",
          "deals",
          "value_cents"
        ]
      }
    },
    "open": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string"
          },
          "deals": {
            "type": "number"
          },
          "value_cents": {
            "type": "number"
          }
        },
        "required": [
          "currency",
          "deals",
          "value_cents"
        ]
      }
    },
    "won": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string"
          },
          "deals": {
            "type": "number"
          },
          "value_cents": {
            "type": "number"
          }
        },
        "required": [
          "currency",
          "deals",
          "value_cents"
        ]
      }
    },
    "lost": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string"
          },
          "deals": {
            "type": "number"
          },
          "value_cents": {
            "type": "number"
          }
        },
        "required": [
          "currency",
          "deals",
          "value_cents"
        ]
      }
    },
    "lostReasons": {
      "description": "pipeline: why deals were lost, most value first",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "deals": {
            "type": "number"
          },
          "value_cents": {
            "type": "number"
          }
        },
        "required": [
          "reason",
          "currency",
          "deals",
          "value_cents"
        ]
      }
    },
    "error": {
      "description": "unauthenticated | no_db | forbidden | bad_view | bad_status",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}