picked 0.0.104-next.2 → 0.0.104

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,9 +5,10 @@ layout: docs
5
5
 
6
6
  # Lead search
7
7
 
8
- A lead is one set of answers that a visitor gave to your flow. The **Leads** page lists
9
- them, and it has one search box. The box accepts a plain word, a filter, or both. The
10
- dashboard holds the query in the address, so you can share the link.
8
+ A lead is one set of answers that a visitor gave to your flow. The
9
+ [**Leads**](/reference/dashboard/leads) page lists them, and it has one search box. The
10
+ box accepts a plain word, a filter, or both. The dashboard holds the query in the address,
11
+ so you can share the link.
11
12
 
12
13
  ## The parts of a lead that a query reads
13
14
 
@@ -224,12 +225,15 @@ You can also do this task with the [Management API](/reference/management-api/sc
224
225
 
225
226
  | Task | GraphQL | MCP tool | Run |
226
227
  | --- | --- | --- | --- |
227
- | Search the leads | [`project`](/reference/management-api/schema/project#project) | None | None |
228
+ | Search the leads | [`project`](/reference/management-api/schema/project#project) | [`search_leads`](/reference/tools/mcp#search_leads) | `tools.search_leads({ project_id, query })` |
229
+ | List the fields that a query reads | None | [`list_lead_fields`](/reference/tools/mcp#list_lead_fields) | `tools.list_lead_fields({ project_id })` |
228
230
 
229
231
  The `leads` field of the `project` query takes the same search text in its `query`
230
- argument.
232
+ argument. The `search_leads` tool gives the number of leads that match, and a link to the
233
+ **Leads** page with the search.
231
234
 
232
235
  ## Related
233
236
 
237
+ - [Leads](/reference/dashboard/leads) — the page that lists the leads
234
238
  - [Fields](/reference/dashboard/fields) — the keys that name each answer
235
239
  - [Glossary](/reference/glossary) — lead, label, and the other terms
@@ -0,0 +1,132 @@
1
+ ---
2
+ type: reference
3
+ layout: docs
4
+ ---
5
+
6
+ # Leads
7
+
8
+ A lead is one set of answers that a visitor gave to a flow. The **Leads** page lists the
9
+ leads of a project, and the Lead page shows one lead.
10
+
11
+ ## Where leads show
12
+
13
+ | Page | Address | Content |
14
+ | ----- | ---------------- | ------------------------------------------------------------------------- |
15
+ | Leads | `…/leads` | The leads of the project, the newest lead first. |
16
+ | Lead | `…/leads/<lead>` | One lead. A row of the **Leads** list opens it. The title is the lead ID. |
17
+
18
+ The table shows 50 leads. The two buttons below the table show the previous 50 leads and
19
+ the next 50 leads. The text above the table shows the number of leads in the table and in
20
+ the list, for example `50 of 230 leads`.
21
+
22
+ The address of the **Leads** page holds the search, the columns, the sort and the
23
+ **Hide duplicates** setting. A link to the same address opens the same list.
24
+
25
+ ## Search
26
+
27
+ The search box takes the syntax of [Lead search](/reference/dashboard/lead-search). While
28
+ the box is empty, it shows a **Search syntax** link to that page. The link shows only while
29
+ the box has space for the placeholder and the link.
30
+
31
+ A clause on the visit changes the order of the list and the text above the table. Refer to
32
+ [The visit that captured the lead](/reference/dashboard/lead-search#the-visit-that-captured-the-lead).
33
+
34
+ ## Columns
35
+
36
+ The table shows the **ID** and **Created At** columns until you change them. **Columns**
37
+ opens **Table columns**, where you add, remove and move the columns.
38
+
39
+ **Add a column** lists these columns:
40
+
41
+ | Group | Columns |
42
+ | ----------------- | ------------------------------------------------------------------------------------------------------- |
43
+ | **Lead** | **ID**, **User ID** and **Created At**. |
44
+ | **Session** | The fields of the visit that captured the lead, such as **Session started** and **Session page views**. |
45
+ | **Responses** | The key of each answer of the leads in the table. |
46
+ | A label namespace | Each label without an expiry on the leads in the table. |
47
+
48
+ **Add a column** also accepts a full path that starts with `responses.` or `labels.`, such
49
+ as `responses.suburb` or `labels.acme.status`. This path adds a column that the leads in
50
+ the table do not have.
51
+
52
+ ## Sort
53
+
54
+ The list shows the newest lead first. A click on a column header sorts the list by that
55
+ column. A second click reverses the order. A lead without a value in the column is always
56
+ last. A **Session** column does not sort.
57
+
58
+ ## Hide duplicates
59
+
60
+ One visit can capture more than one lead. When **Hide duplicates** is on, the list shows
61
+ one lead for each visit: the newest lead that matches the search. **Hide duplicates** is
62
+ on by default.
63
+
64
+ While the search has a clause on the visit, the list shows each lead, and you cannot turn
65
+ on **Hide duplicates**.
66
+
67
+ ## Saved views
68
+
69
+ A saved view is a name for one search, one set of columns and one sort. All the users of
70
+ the project see the same saved views. The saved views show above the table. A saved view
71
+ does not keep the **Hide duplicates** setting.
72
+
73
+ | Control | Result |
74
+ | ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
75
+ | A saved view | Opens the list with the search, the columns and the sort of the view. |
76
+ | **Save view** | Saves the list as a new view. It shows when the **Leads** list has no saved views. It also shows when you change the search, the columns, the sort or **Hide duplicates**, and no saved view has these settings. |
77
+ | The settings button of a view | Changes the name of the view, or makes it the default view. It also holds **Delete view**. |
78
+ | **Delete view** | Deletes the view. The leads do not change. |
79
+
80
+ The list opens with the default view when its address has no parameters. The **Leads**
81
+ list of a project has a maximum of one default view.
82
+
83
+ ## Lead page
84
+
85
+ The Lead page shows one lead in these cards:
86
+
87
+ | Card | Content |
88
+ | --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
89
+ | **Captured** | The date and the time of the capture. |
90
+ | **Responses** | The answers of the lead. A lead from a workspace preview shows the keys of the fields, not their labels. |
91
+ | **Other leads from this session** | The other leads that the same visit captured. **Show older leads** adds the leads before them. |
92
+ | **Session** | The details of the visit that captured the lead, and its events up to the capture, the newest event first. **Show earlier** and **Show later** add more events. |
93
+ | **Workflow runs** | The runs that created or changed the lead. Refer to [Leads and runs](/reference/dashboard/workflow-runs#leads-and-runs). |
94
+ | **Labels** | The labels of the lead. Refer to [Labels in the dashboard](/reference/dashboard/labels#labels-in-the-dashboard). |
95
+
96
+ On a narrow screen, the page shows the cards on three tabs.
97
+
98
+ **Delete lead** deletes the lead and all its labels. You cannot reverse a delete.
99
+
100
+ ## Access
101
+
102
+ | Surface | Scopes |
103
+ | ---------------------- | ------------------------------------------------------------------------------------------------------------ |
104
+ | Leads, Lead | `ORGANIZATION_LEADS_READ` |
105
+ | Saved views | `ORGANIZATION_PROJECTS_READ` to see them, and `ORGANIZATION_PROJECTS_UPDATE` to save, change and delete them |
106
+ | The labels of a lead | Refer to [Owners](/reference/dashboard/labels#owners). |
107
+ | **Workflow runs** card | Refer to [Access](/reference/dashboard/workflow-runs#access). |
108
+ | **Delete lead** | `ORGANIZATION_LEADS_DELETE` |
109
+
110
+ ## API and MCP
111
+
112
+ You can also do this task with the [Management API](/reference/management-api/schema), the [MCP server](/reference/tools/mcp), or code that you send to [`picked_run`](/reference/tools/mcp-run).
113
+
114
+ | Task | GraphQL | MCP tool | Run |
115
+ | --- | --- | --- | --- |
116
+ | List the leads | [`project`](/reference/management-api/schema/project#project) | None | None |
117
+ | List the saved views | [`project`](/reference/management-api/schema/project#project) | None | None |
118
+ | Save a view | [`savedViewCreate`](/reference/management-api/schema/saved-view#savedviewcreate) | None | None |
119
+ | Change a view | [`savedViewUpdate`](/reference/management-api/schema/saved-view#savedviewupdate) | None | None |
120
+ | Delete a view | [`savedViewDelete`](/reference/management-api/schema/saved-view#savedviewdelete) | None | None |
121
+ | Read a lead | [`lead`](/reference/management-api/schema/lead#lead) | None | None |
122
+ | Delete a lead | [`leadDelete`](/reference/management-api/schema/lead#leaddelete) | None | None |
123
+
124
+ The `project` query gives the leads in its `leads` field, and the saved views in its
125
+ `savedViews` field.
126
+
127
+ ## Related
128
+
129
+ - [Lead search](/reference/dashboard/lead-search) — the syntax of the search box
130
+ - [Labels](/reference/dashboard/labels) — the labels of a lead
131
+ - [Workflow runs](/reference/dashboard/workflow-runs) — the runs that create and change leads
132
+ - [Glossary](/reference/glossary) — lead, visit, and the other terms
@@ -96,7 +96,7 @@ documentation uses, and it names the others.
96
96
 
97
97
  | Term | What it is |
98
98
  | --- | --- |
99
- | **Lead** | One set of answers that a visitor gave to a flow. It belongs to the project, and it stays after you publish a new version. |
99
+ | **Lead** | One set of answers that a visitor gave to a flow. It belongs to the project, and it stays after you publish a new version. Refer to [Leads](/reference/dashboard/leads). |
100
100
  | **Response** | One answer in a lead, held under the key of the field that asked for it. |
101
101
  | **Label** | A name and a value that you or a workflow puts on a lead, a project or a workflow run. A label on a lead sits outside the answers, and it stays when you change your fields. A label can expire. Refer to [Labels](/reference/dashboard/labels). |
102
102
  | **Label owner** | The lead, the project or the workflow run that has a label. The owner sets the scopes that read and write the label. |
@@ -110,7 +110,7 @@ enum WorkflowTaskSortKeys {
110
110
  ```graphql
111
111
  """
112
112
  One execution of a workflow, started by an event. A run executes the published workflow, or the
113
- draft for a run started in a preview.
113
+ draft for a preview run.
114
114
  """
115
115
  type WorkflowRun {
116
116
  """The ID of the run."""
@@ -138,8 +138,8 @@ type WorkflowRun {
138
138
  """
139
139
  failureReason: String
140
140
  """
141
- Whether a visitor started the run in a preview. A preview run executes the draft as it stood
142
- when the run started, and its writes are real.
141
+ Whether the run executes the draft: a visitor started it in a preview, or it reruns a preview
142
+ run. A preview run executes the draft as it stood when the run started, and its writes are real.
143
143
  """
144
144
  preview: Boolean!
145
145
  """
@@ -180,7 +180,9 @@ type WorkflowRun {
180
180
  ### `WorkflowRunRerunVersion`
181
181
 
182
182
  ```graphql
183
- """The version a rerun runs on."""
183
+ """
184
+ The version a rerun runs on: `DRAFT` for a preview run, `ORIGINAL` or `LIVE` for any other run.
185
+ """
184
186
  enum WorkflowRunRerunVersion {
185
187
  """
186
188
  The version the action submission of the run was recorded on, `WorkflowRun.workspaceVersion`.
@@ -188,6 +190,10 @@ enum WorkflowRunRerunVersion {
188
190
  ORIGINAL
189
191
  """The live version of the project."""
190
192
  LIVE
193
+ """
194
+ The workflow of the run as the draft of its workspace now holds it, for a preview run.
195
+ """
196
+ DRAFT
191
197
  }
192
198
  ```
193
199
 
@@ -211,9 +217,9 @@ type WorkflowRunRerunPayload {
211
217
  """The rerun. Null when `userErrors` is not empty."""
212
218
  workflowRun: WorkflowRun
213
219
  """
214
- The reasons the run cannot be rerun, with codes `RUN_NOT_RERUNNABLE` (the run is running, is a
215
- preview run, or no action submission that still exists started it), `VERSION_UNAVAILABLE` (the
216
- chosen version cannot run it) or `RERUN_IN_PROGRESS` (a rerun of the same chain is running).
220
+ The reasons the run cannot be rerun, with codes `RUN_NOT_RERUNNABLE` (the run is running, or no
221
+ action submission that still exists started it), `VERSION_UNAVAILABLE` (the chosen version
222
+ cannot run it) or `RERUN_IN_PROGRESS` (a rerun of the same chain is running).
217
223
  """
218
224
  userErrors: [UserError!]!
219
225
  }
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "picked",
3
3
  "description": "The Picked SDK front door: the client, the picked.config helpers, and the picked CLI in one install",
4
- "version": "0.0.104-next.2",
4
+ "version": "0.0.104",
5
5
  "bin": {
6
6
  "picked": "dist/esm/bin.js"
7
7
  },
8
8
  "dependencies": {
9
- "@picked/cli": "0.0.104-next.2",
10
- "@picked/config": "0.0.104-next.2"
9
+ "@picked/cli": "0.0.104",
10
+ "@picked/config": "0.0.104"
11
11
  },
12
12
  "devDependencies": {
13
13
  "@picked/client": "workspace:*",
@@ -64,7 +64,7 @@
64
64
  "main": "./dist/cjs/index.js",
65
65
  "module": "./dist/esm/index.js",
66
66
  "peerDependencies": {
67
- "@picked/client": "0.0.104-next.2"
67
+ "@picked/client": "0.0.104"
68
68
  },
69
69
  "private": false,
70
70
  "publishConfig": {