picked 0.0.117 → 0.0.118
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.
- package/docs/reference/dashboard/labels.md +90 -51
- package/docs/reference/dashboard/workflow-tools.md +20 -17
- package/docs/reference/management-api/schema/index.md +2 -2
- package/docs/reference/management-api/schema/label.md +23 -14
- package/docs/reference/management-api/schema/organization.md +7 -0
- package/docs/reference/tools/mcp.md +5 -0
- package/package.json +4 -4
|
@@ -5,8 +5,8 @@ layout: docs
|
|
|
5
5
|
|
|
6
6
|
# Labels
|
|
7
7
|
|
|
8
|
-
A label is a name and a value on a lead, a project, a workflow run
|
|
9
|
-
workflow sets and removes labels with tool nodes. A label can expire, a write can be conditional, and a node
|
|
8
|
+
A label is a name and a value on a lead, a project, a workflow run, an app installation or an
|
|
9
|
+
organization. A workflow sets and removes labels with tool nodes. A label can expire, a write can be conditional, and a node
|
|
10
10
|
can increment a `number` label.
|
|
11
11
|
|
|
12
12
|
## Name, type and value
|
|
@@ -18,22 +18,54 @@ can increment a `number` label.
|
|
|
18
18
|
| Type | `text`, `number`, `boolean` or `json`. It tells how to read the value. |
|
|
19
19
|
| Value | Text. A `number` label holds a number, a `boolean` label holds `true` or `false`, and a `json` label holds a JSON document. |
|
|
20
20
|
|
|
21
|
-
The lead, the project or the
|
|
21
|
+
The lead, the project, the run, the installation or the organization that has a label is the
|
|
22
|
+
owner of the label. An owner has
|
|
22
23
|
one label for each namespace and key.
|
|
23
24
|
|
|
24
25
|
## Owners
|
|
25
26
|
|
|
26
|
-
| Owner | Where the labels stay
|
|
27
|
-
| ---------------- |
|
|
28
|
-
| Lead | Until you delete the lead. Picked deletes the labels of a lead with the lead.
|
|
29
|
-
| Project | Picked keeps the labels when you delete the project. These labels hold data for all the runs of the project.
|
|
30
|
-
| Workflow run | With the run. Picked does not delete a run.
|
|
31
|
-
| App installation | Until you uninstall the app. Picked deletes the labels of an installation with the installation.
|
|
27
|
+
| Owner | Where the labels stay | Scope to read the labels | Scope to set and remove the labels |
|
|
28
|
+
| ---------------- | ------------------------------------------------------------------------------------------------------------------ | ----------------------------- | ---------------------------------- |
|
|
29
|
+
| Lead | Until you delete the lead. Picked deletes the labels of a lead with the lead. | `ORGANIZATION_LEADS_READ` | `ORGANIZATION_LEADS_UPDATE` |
|
|
30
|
+
| Project | Picked keeps the labels when you delete the project. These labels hold data for all the runs of the project. | `ORGANIZATION_PROJECTS_READ` | `ORGANIZATION_PROJECTS_UPDATE` |
|
|
31
|
+
| Workflow run | With the run. Picked does not delete a run. | `ORGANIZATION_WORKSPACE_READ` | `ORGANIZATION_PROJECTS_UPDATE` |
|
|
32
|
+
| App installation | Until you uninstall the app. Picked deletes the labels of an installation with the installation. | `ORGANIZATION_APPS_READ` | `ORGANIZATION_APPS_UPDATE` |
|
|
33
|
+
| Organization | Picked keeps the labels when you delete the organization. All the projects of the organization share these labels. | `ORGANIZATION_READ` | `ORGANIZATION_UPDATE` |
|
|
32
34
|
|
|
33
35
|
A run reads, sets and removes its own labels without a scope. An app installation reads, sets
|
|
34
36
|
and removes its own labels with its own token, without a scope. The owner type of an app
|
|
35
37
|
installation in the API is `APP_INSTALLATION`.
|
|
36
38
|
|
|
39
|
+
## Organization labels
|
|
40
|
+
|
|
41
|
+
The labels of an organization are not in a project. All the projects of the organization read
|
|
42
|
+
and write the same labels. Use them for data that more than one project must share, for
|
|
43
|
+
example:
|
|
44
|
+
|
|
45
|
+
- A counter of the calls that one call center takes in a day, for all the brands of the
|
|
46
|
+
organization.
|
|
47
|
+
- A label that only one run at a time can hold for one visitor, across all the brands of the
|
|
48
|
+
organization.
|
|
49
|
+
|
|
50
|
+
The owner type of an organization in the API is `ORGANIZATION`, and the owner ID is the ID of
|
|
51
|
+
the organization.
|
|
52
|
+
|
|
53
|
+
All the members of an organization have `ORGANIZATION_READ` for it, and can read its labels.
|
|
54
|
+
To change the labels, you must have `ORGANIZATION_UPDATE` for all the organization. The scope
|
|
55
|
+
for one project is not enough. Do not keep data in an organization label that some members
|
|
56
|
+
must not see.
|
|
57
|
+
|
|
58
|
+
A workflow run can read and write only the labels of its own organization. To save a workflow
|
|
59
|
+
that uses **Set organization labels** or **Remove organization labels**, you must have
|
|
60
|
+
`ORGANIZATION_UPDATE` for all the organization. An API key for one project cannot read or
|
|
61
|
+
write organization labels.
|
|
62
|
+
|
|
63
|
+
All the projects of the organization use the same namespaces and keys. Two projects that set
|
|
64
|
+
the same namespace and key change the same label.
|
|
65
|
+
|
|
66
|
+
When a run changes an organization label, its task records the operation. When you change an
|
|
67
|
+
organization label in the dashboard or with the API, Picked does not record an operation.
|
|
68
|
+
|
|
37
69
|
## Secret labels
|
|
38
70
|
|
|
39
71
|
Only the labels of an app installation can be secret. A secret label has `secret: true`.
|
|
@@ -50,14 +82,16 @@ to [How to store data for an installation](/how-to/apps/store-data-for-an-instal
|
|
|
50
82
|
|
|
51
83
|
The **Labels** card shows the labels of one owner, in one section for each namespace.
|
|
52
84
|
|
|
53
|
-
| Page
|
|
54
|
-
|
|
|
55
|
-
| Lead
|
|
56
|
-
| Project labels
|
|
57
|
-
|
|
|
85
|
+
| Page | Where the card shows | Scope to change the labels |
|
|
86
|
+
| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------ |
|
|
87
|
+
| Lead | Next to the responses, or below them on a medium screen. On a narrow screen, it is on the **Labels** tab. | `ORGANIZATION_LEADS_UPDATE` |
|
|
88
|
+
| Project labels | At `…/<project>/settings/labels`. The page opens for `ORGANIZATION_PROJECTS_READ`. | `ORGANIZATION_PROJECTS_UPDATE` |
|
|
89
|
+
| Organization labels | At `/<organization>/settings/labels`. The page opens for `ORGANIZATION_READ`. | `ORGANIZATION_UPDATE` |
|
|
90
|
+
| Run | Below the details of the run. On a narrow screen, the card is on the **Labels** tab. | `ORGANIZATION_PROJECTS_UPDATE` |
|
|
58
91
|
|
|
59
92
|
The project settings have a **Labels** link to the Project labels page. To open the project
|
|
60
|
-
settings, you must have `ORGANIZATION_PROJECTS_UPDATE`.
|
|
93
|
+
settings, you must have `ORGANIZATION_PROJECTS_UPDATE`. The organization settings have a
|
|
94
|
+
**Labels** link to the Organization labels page.
|
|
61
95
|
|
|
62
96
|
Without the scope, the card shows the labels, and you cannot change them.
|
|
63
97
|
|
|
@@ -74,41 +108,46 @@ With the scope, the card has these controls:
|
|
|
74
108
|
A label with an expiry shows the time until it expires. You can remove it, but you cannot
|
|
75
109
|
change its value.
|
|
76
110
|
|
|
77
|
-
## Visitor data in project and
|
|
111
|
+
## Visitor data in project, run and organization labels
|
|
78
112
|
|
|
79
|
-
The labels of a project
|
|
80
|
-
|
|
113
|
+
The labels of a project, of a run and of an organization stay after Picked deletes a lead.
|
|
114
|
+
Picked does not delete visitor data in these labels with the lead. Visitor data is, for example, an
|
|
81
115
|
email address, a phone number or a Picked ID.
|
|
82
116
|
|
|
83
|
-
A project label
|
|
84
|
-
With a hash, a workflow can hold a label for one visitor across runs.
|
|
117
|
+
A project label, a run label or an organization label can have the `sha256` hash of a visitor
|
|
118
|
+
identifier as its key. With a hash, a workflow can hold a label for one visitor across runs. An
|
|
119
|
+
organization label with a hash connects one visitor across all the projects of the
|
|
120
|
+
organization. Use `expiresIn` to set
|
|
85
121
|
how long the label stays. Refer to [Example: one run at a time for each visitor](#example-one-run-at-a-time-for-each-visitor).
|
|
86
122
|
|
|
87
123
|
## Tools
|
|
88
124
|
|
|
89
|
-
| Tool
|
|
90
|
-
|
|
|
91
|
-
| `set_lead_labels`
|
|
92
|
-
| `remove_lead_labels`
|
|
93
|
-
| `create_lead`
|
|
94
|
-
| `set_project_labels`
|
|
95
|
-
| `remove_project_labels`
|
|
96
|
-
| `get_project`
|
|
97
|
-
| `
|
|
98
|
-
| `
|
|
99
|
-
| `
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
The
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
|
110
|
-
|
|
|
111
|
-
| `
|
|
125
|
+
| Tool | Name in the editor | Owner | Output | Scopes |
|
|
126
|
+
| ---------------------------- | ------------------------------ | ------------------------------- | ---------------------------------- | -------------------------------------------------------------------------------------- |
|
|
127
|
+
| `set_lead_labels` | **Set lead labels** | The lead in its `lead` argument | `lead` and `count` | `ORGANIZATION_LEADS_UPDATE` and `ORGANIZATION_LEADS_READ` |
|
|
128
|
+
| `remove_lead_labels` | **Remove lead labels** | The lead in its `lead` argument | `lead` and `removed` | `ORGANIZATION_LEADS_UPDATE` and `ORGANIZATION_LEADS_READ` |
|
|
129
|
+
| `create_lead` | **Create lead** | The lead that it makes | `lead`, `created` and `labelCount` | `ORGANIZATION_LEADS_CREATE`, `ORGANIZATION_LEADS_READ` and `ORGANIZATION_LEADS_UPDATE` |
|
|
130
|
+
| `set_project_labels` | **Set project labels** | The project of the run | `project` and `count` | `ORGANIZATION_PROJECTS_UPDATE` and `ORGANIZATION_PROJECTS_READ` |
|
|
131
|
+
| `remove_project_labels` | **Remove project labels** | The project of the run | `project` and `removed` | `ORGANIZATION_PROJECTS_UPDATE` and `ORGANIZATION_PROJECTS_READ` |
|
|
132
|
+
| `get_project` | **Get project** | The project of the run | `project` | `ORGANIZATION_PROJECTS_READ` |
|
|
133
|
+
| `set_organization_labels` | **Set organization labels** | The organization of the run | `organization` and `count` | `ORGANIZATION_UPDATE` and `ORGANIZATION_READ` |
|
|
134
|
+
| `remove_organization_labels` | **Remove organization labels** | The organization of the run | `organization` and `removed` | `ORGANIZATION_UPDATE` and `ORGANIZATION_READ` |
|
|
135
|
+
| `get_organization` | **Get organization** | The organization of the run | `organization` | `ORGANIZATION_READ` |
|
|
136
|
+
| `set_run_labels` | **Set run labels** | The run | `run` and `count` | None |
|
|
137
|
+
| `remove_run_labels` | **Remove run labels** | The run | `run` and `removed` | None |
|
|
138
|
+
| `get_run` | **Get run** | The run | `run` | None |
|
|
139
|
+
|
|
140
|
+
The project, organization and run tools have no argument for the owner.
|
|
141
|
+
|
|
142
|
+
The `lead`, `project`, `organization` and `run` outputs hold the labels of the owner. They show
|
|
143
|
+
the labels when a later node reads them, as `labels.<namespace>.<key>`:
|
|
144
|
+
|
|
145
|
+
| Output | Fields |
|
|
146
|
+
| -------------- | ------------------------- |
|
|
147
|
+
| `lead` | The lead, and `labels` |
|
|
148
|
+
| `project` | `id`, `name` and `labels` |
|
|
149
|
+
| `organization` | `id`, `name` and `labels` |
|
|
150
|
+
| `run` | `id` and `labels` |
|
|
112
151
|
|
|
113
152
|
For example, `{{ nodes.project.project.labels.cms.sent_today }}` reads the label
|
|
114
153
|
`cms.sent_today` of the project.
|
|
@@ -125,8 +164,8 @@ For the run tools in a test run, refer to
|
|
|
125
164
|
|
|
126
165
|
## A row that sets a label
|
|
127
166
|
|
|
128
|
-
The `labels` argument of **Set lead labels**, **Set project labels**, **Set
|
|
129
|
-
**Create lead** is a list of rows. Each row sets one label.
|
|
167
|
+
The `labels` argument of **Set lead labels**, **Set project labels**, **Set organization
|
|
168
|
+
labels**, **Set run labels** and **Create lead** is a list of rows. Each row sets one label.
|
|
130
169
|
|
|
131
170
|
| Field | Type | Default | Description |
|
|
132
171
|
| -------------- | ----------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -177,7 +216,7 @@ it shows no rows. **Replace with rows** removes the template after you confirm i
|
|
|
177
216
|
A label with `expiresIn` expires that number of seconds after the node sets it. Picked does
|
|
178
217
|
not show an expired label:
|
|
179
218
|
|
|
180
|
-
- The `lead`, `project` or `run` output of a tool does not have it.
|
|
219
|
+
- The `lead`, `project`, `organization` or `run` output of a tool does not have it.
|
|
181
220
|
- A lead search clause does not match it. A negative clause, such as `-cms.status:*`, matches
|
|
182
221
|
the lead.
|
|
183
222
|
- A lead sorts as if it does not have the label.
|
|
@@ -210,8 +249,8 @@ A row with `increment` cannot have `onlyIfAbsent`.
|
|
|
210
249
|
|
|
211
250
|
## Atomic writes
|
|
212
251
|
|
|
213
|
-
**Set lead labels**, **Set project labels** and **Set run labels**
|
|
214
|
-
argument. In the workflow editor, it is the **Atomic** checkbox. When it is `true`, the node
|
|
252
|
+
**Set lead labels**, **Set project labels**, **Set organization labels** and **Set run labels**
|
|
253
|
+
have an `atomic` argument. In the workflow editor, it is the **Atomic** checkbox. When it is `true`, the node
|
|
215
254
|
takes all of its labels or none of them. If one conditional row does not take its label, the
|
|
216
255
|
node sets no label, records no operation, and gives a `count` of 0.
|
|
217
256
|
|
|
@@ -235,8 +274,8 @@ When Picked starts a node again after it added its amount, the node adds the amo
|
|
|
235
274
|
|
|
236
275
|
## A row that removes a label
|
|
237
276
|
|
|
238
|
-
The `labels` argument of **Remove lead labels**, **Remove project labels
|
|
239
|
-
labels** is a list of rows. Each row removes one label.
|
|
277
|
+
The `labels` argument of **Remove lead labels**, **Remove project labels**, **Remove
|
|
278
|
+
organization labels** and **Remove run labels** is a list of rows. Each row removes one label.
|
|
240
279
|
|
|
241
280
|
| Field | Type | Default | Description |
|
|
242
281
|
| ----------- | ---- | --------- | ------------------------------------------------------------------------------------------------- |
|
|
@@ -295,7 +334,7 @@ only while the run holds it:
|
|
|
295
334
|
|
|
296
335
|
This **Set project labels** node holds a label for the visitor of the run for one hour,
|
|
297
336
|
unless a different run holds it. The key is the `sha256` hash of the Picked ID, and the label
|
|
298
|
-
expires. Refer to [the rule for visitor data](#visitor-data-in-project-and-
|
|
337
|
+
expires. Refer to [the rule for visitor data](#visitor-data-in-project-run-and-organization-labels).
|
|
299
338
|
|
|
300
339
|
```json
|
|
301
340
|
{
|
|
@@ -15,23 +15,26 @@ in short form.
|
|
|
15
15
|
|
|
16
16
|
## Tools
|
|
17
17
|
|
|
18
|
-
| Tool
|
|
19
|
-
|
|
|
20
|
-
| `workflow_noop`
|
|
21
|
-
| `search_leads`
|
|
22
|
-
| `get_lead`
|
|
23
|
-
| `create_lead`
|
|
24
|
-
| `upsert_lead`
|
|
25
|
-
| `set_lead_labels`
|
|
26
|
-
| `remove_lead_labels`
|
|
27
|
-
| `set_project_labels`
|
|
28
|
-
| `remove_project_labels`
|
|
29
|
-
| `get_project`
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
18
|
+
| Tool | Name in the editor | What it does | Output |
|
|
19
|
+
| ---------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
|
|
20
|
+
| `workflow_noop` | **Log a message** | Records the text in its `message` argument on the node. | `message` |
|
|
21
|
+
| `search_leads` | **Search leads** | Finds the leads that match a query in the leads query language, the newest lead first. It finds 20 or fewer. | `leads` |
|
|
22
|
+
| `get_lead` | **Get lead** | Reads the lead of the visitor whose action started the run. `exists` is `false` when the visitor has no lead. | `lead` and `exists` |
|
|
23
|
+
| `create_lead` | **Create lead** | Creates a lead for the visitor, and sets the labels in its `labels` argument on it. | `lead`, `created` and `labelCount` |
|
|
24
|
+
| `upsert_lead` | **Create or update lead** | Updates the lead of the visitor with the responses of the action. If the lead is too old, it creates a lead. | `lead`, `created`, `updated`, `changedKeys` and `labelCount` |
|
|
25
|
+
| `set_lead_labels` | **Set lead labels** | Adds labels to the lead in its `lead` argument, or changes them. | `lead` and `count` |
|
|
26
|
+
| `remove_lead_labels` | **Remove lead labels** | Removes labels from the lead in its `lead` argument. | `lead` and `removed` |
|
|
27
|
+
| `set_project_labels` | **Set project labels** | Adds labels to the project of the run, or changes them. | `project` and `count` |
|
|
28
|
+
| `remove_project_labels` | **Remove project labels** | Removes labels from the project of the run. | `project` and `removed` |
|
|
29
|
+
| `get_project` | **Get project** | Reads the project of the run and its labels. | `project` |
|
|
30
|
+
| `set_organization_labels` | **Set organization labels** | Adds labels to the organization of the run, or changes them. All the projects of the organization share them. | `organization` and `count` |
|
|
31
|
+
| `remove_organization_labels` | **Remove organization labels** | Removes labels from the organization of the run. | `organization` and `removed` |
|
|
32
|
+
| `get_organization` | **Get organization** | Reads the organization of the run and its labels. | `organization` |
|
|
33
|
+
| `set_run_labels` | **Set run labels** | Adds labels to the run, or changes them. | `run` and `count` |
|
|
34
|
+
| `remove_run_labels` | **Remove run labels** | Removes labels from the run. | `run` and `removed` |
|
|
35
|
+
| `get_run` | **Get run** | Reads the run and its labels. | `run` |
|
|
36
|
+
| `http` | **External API** | Sends a request to an external API that the project registered. The registration holds the credential. | `status`, `ok`, `body`, `bodyTruncated` and `durationMs` |
|
|
37
|
+
| `action_response` | **Action response** | Sends the payload in its `payload` argument to the visitor who started the action in its `actionId` argument. | `actionId` and `recorded` |
|
|
35
38
|
|
|
36
39
|
## Create or update lead
|
|
37
40
|
|
|
@@ -115,8 +115,8 @@ An operation with `@auth` needs a caller that has authenticated. `@auth(only: US
|
|
|
115
115
|
| [`integrationInstall`](/reference/management-api/schema/integration#integrationinstall) | Mutation | Installs an integration for a project. A project that already has an integration of that type gets a `CONFLICT` error. Scope: `ORGANIZATION_INTEGRATIONS_CREATE` and `ORGANIZATION_PROJECTS_READ`. |
|
|
116
116
|
| [`integrationUninstall`](/reference/management-api/schema/integration#integrationuninstall) | Mutation | Uninstalls an integration and deletes its configuration. Scope: `ORGANIZATION_INTEGRATIONS_DELETE`. |
|
|
117
117
|
| [`labeledAppInstallations`](/reference/management-api/schema/app#labeledappinstallations) | Query | Lists the installations of an app that hold a label with the value, oldest first, up to 200 of them. Covers only projects where the user holds the scope; a secret label never matches. Scope: `ORGANIZATION_APPS_READ`. |
|
|
118
|
-
| [`labelsDelete`](/reference/management-api/schema/label#labelsdelete) | Mutation | Deletes labels from
|
|
119
|
-
| [`labelsSet`](/reference/management-api/schema/label#labelsset) | Mutation | Creates or replaces labels on
|
|
118
|
+
| [`labelsDelete`](/reference/management-api/schema/label#labelsdelete) | Mutation | Deletes labels from an owner. Deleting a label that is not set succeeds. Each owner type needs the write scope `LabelOwnerType` lists for it. Scope: `ORGANIZATION_LEADS_UPDATE`, `ORGANIZATION_PROJECTS_UPDATE`, `ORGANIZATION_APPS_UPDATE` or `ORGANIZATION_UPDATE`. |
|
|
119
|
+
| [`labelsSet`](/reference/management-api/schema/label#labelsset) | Mutation | Creates or replaces labels on an owner. Labels the call does not name are unchanged. Each owner type needs the write scope `LabelOwnerType` lists for it. Scope: `ORGANIZATION_LEADS_UPDATE`, `ORGANIZATION_PROJECTS_UPDATE`, `ORGANIZATION_APPS_UPDATE` or `ORGANIZATION_UPDATE`. |
|
|
120
120
|
| [`lead`](/reference/management-api/schema/lead#lead) | Query | Reads a lead. Scope: `ORGANIZATION_LEADS_READ`. |
|
|
121
121
|
| [`leadCreate`](/reference/management-api/schema/lead#leadcreate) | Mutation | Creates a lead and sets its labels, then starts the workflows triggered by `lead.created`. Answers that do not match their fields return `userErrors` and nothing is written. `ORGANIZATION_LEADS_UPDATE` is required only with `labels`. Scope: `ORGANIZATION_LEADS_CREATE`, `ORGANIZATION_LEADS_READ` and `ORGANIZATION_LEADS_UPDATE`. |
|
|
122
122
|
| [`leadDelete`](/reference/management-api/schema/lead#leaddelete) | Mutation | Deletes a lead and its labels. This cannot be undone. Scope: `ORGANIZATION_LEADS_DELETE`. |
|
|
@@ -12,10 +12,9 @@ See [Management API schema](/reference/management-api/schema) for every domain,
|
|
|
12
12
|
|
|
13
13
|
### `labelsSet`
|
|
14
14
|
|
|
15
|
-
Creates or replaces labels on
|
|
16
|
-
|
|
17
|
-
`ORGANIZATION_PROJECTS_UPDATE`.
|
|
18
|
-
Scope: `ORGANIZATION_LEADS_UPDATE` or `ORGANIZATION_PROJECTS_UPDATE`.
|
|
15
|
+
Creates or replaces labels on an owner. Labels the call does not name are unchanged. Each owner
|
|
16
|
+
type needs the write scope `LabelOwnerType` lists for it.
|
|
17
|
+
Scope: `ORGANIZATION_LEADS_UPDATE`, `ORGANIZATION_PROJECTS_UPDATE`, `ORGANIZATION_APPS_UPDATE` or `ORGANIZATION_UPDATE`.
|
|
19
18
|
|
|
20
19
|
```graphql
|
|
21
20
|
labelsSet(input: LabelsSetInput!): LabelsSetPayload! @auth
|
|
@@ -23,10 +22,9 @@ labelsSet(input: LabelsSetInput!): LabelsSetPayload! @auth
|
|
|
23
22
|
|
|
24
23
|
### `labelsDelete`
|
|
25
24
|
|
|
26
|
-
Deletes labels from
|
|
27
|
-
|
|
28
|
-
`ORGANIZATION_PROJECTS_UPDATE`.
|
|
29
|
-
Scope: `ORGANIZATION_LEADS_UPDATE` or `ORGANIZATION_PROJECTS_UPDATE`.
|
|
25
|
+
Deletes labels from an owner. Deleting a label that is not set succeeds. Each owner type needs
|
|
26
|
+
the write scope `LabelOwnerType` lists for it.
|
|
27
|
+
Scope: `ORGANIZATION_LEADS_UPDATE`, `ORGANIZATION_PROJECTS_UPDATE`, `ORGANIZATION_APPS_UPDATE` or `ORGANIZATION_UPDATE`.
|
|
30
28
|
|
|
31
29
|
```graphql
|
|
32
30
|
labelsDelete(input: LabelsDeleteInput!): LabelsDeletePayload! @auth
|
|
@@ -62,9 +60,12 @@ The kind of entity a label is on. Each kind is read and written under its own sc
|
|
|
62
60
|
| `PROJECT` | `ORGANIZATION_PROJECTS_READ` | `ORGANIZATION_PROJECTS_UPDATE` |
|
|
63
61
|
| `WORKFLOW_RUN` | `ORGANIZATION_WORKSPACE_READ` | `ORGANIZATION_PROJECTS_UPDATE` |
|
|
64
62
|
| `APP_INSTALLATION` | `ORGANIZATION_APPS_READ` | `ORGANIZATION_APPS_UPDATE` |
|
|
63
|
+
| `ORGANIZATION` | `ORGANIZATION_READ` | `ORGANIZATION_UPDATE` |
|
|
65
64
|
|
|
66
65
|
A workflow run reads and writes its own labels without a scope, and so does an app installation
|
|
67
|
-
calling with its own token.
|
|
66
|
+
calling with its own token. Every member of an organisation holds `ORGANIZATION_READ` on it and
|
|
67
|
+
reads its labels; writing them takes `ORGANIZATION_UPDATE` granted across the organisation. An
|
|
68
|
+
API key limited to one project reaches neither.
|
|
68
69
|
"""
|
|
69
70
|
enum LabelOwnerType {
|
|
70
71
|
"""A lead. Its labels are deleted with it."""
|
|
@@ -77,6 +78,11 @@ enum LabelOwnerType {
|
|
|
77
78
|
An app installation. Its labels are deleted when the app is uninstalled.
|
|
78
79
|
"""
|
|
79
80
|
APP_INSTALLATION
|
|
81
|
+
"""
|
|
82
|
+
An organisation. The owner ID is the organization ID, and every project in the organization
|
|
83
|
+
shares its labels.
|
|
84
|
+
"""
|
|
85
|
+
ORGANIZATION
|
|
80
86
|
}
|
|
81
87
|
```
|
|
82
88
|
|
|
@@ -84,8 +90,8 @@ enum LabelOwnerType {
|
|
|
84
90
|
|
|
85
91
|
```graphql
|
|
86
92
|
"""
|
|
87
|
-
A name and a value on a lead, a project, a workflow run
|
|
88
|
-
label per namespace and key, and an expired label reads as absent everywhere.
|
|
93
|
+
A name and a value on a lead, a project, a workflow run, an app installation or an organization.
|
|
94
|
+
An owner holds one label per namespace and key, and an expired label reads as absent everywhere.
|
|
89
95
|
"""
|
|
90
96
|
type Label {
|
|
91
97
|
"""The ID of the label."""
|
|
@@ -111,7 +117,9 @@ type Label {
|
|
|
111
117
|
updatedAt: DateTime!
|
|
112
118
|
"""When the label expires. Null when it does not expire."""
|
|
113
119
|
expiresAt: DateTime
|
|
114
|
-
"""
|
|
120
|
+
"""
|
|
121
|
+
The lead, project, workflow run, app installation or organization the label is on.
|
|
122
|
+
"""
|
|
115
123
|
owner: LabelOwner!
|
|
116
124
|
}
|
|
117
125
|
```
|
|
@@ -120,9 +128,10 @@ type Label {
|
|
|
120
128
|
|
|
121
129
|
```graphql
|
|
122
130
|
"""
|
|
123
|
-
The entity a label is on: a lead, a project, a workflow run
|
|
131
|
+
The entity a label is on: a lead, a project, a workflow run, an app installation or an
|
|
132
|
+
organization.
|
|
124
133
|
"""
|
|
125
|
-
union LabelOwner = Lead | Project | WorkflowRun | AppInstallation
|
|
134
|
+
union LabelOwner = Lead | Project | WorkflowRun | AppInstallation | Organization
|
|
126
135
|
```
|
|
127
136
|
|
|
128
137
|
### `LabelOperation`
|
|
@@ -201,6 +201,13 @@ type Organization {
|
|
|
201
201
|
Scope: `ORGANIZATION_API_KEYS_READ`.
|
|
202
202
|
"""
|
|
203
203
|
apiKeys(first: Int, after: String): ApiKeyConnection!
|
|
204
|
+
"""
|
|
205
|
+
The organization's own labels, such as a counter or a lock that every project in it shares,
|
|
206
|
+
ordered by namespace then key. Expired labels are left out. Write them with `labelsSet` and
|
|
207
|
+
`ownerType: ORGANIZATION`.
|
|
208
|
+
Scope: `ORGANIZATION_READ`.
|
|
209
|
+
"""
|
|
210
|
+
labels: [Label!]! @auth
|
|
204
211
|
"""The scopes the viewer holds in the organization."""
|
|
205
212
|
viewerScopes: [Scope!]!
|
|
206
213
|
"""
|
|
@@ -72,6 +72,11 @@ Gives the link to create an organization in the dashboard. The MCP server cannot
|
|
|
72
72
|
|
|
73
73
|
Gives the link to create a project in the dashboard. The MCP server cannot create a project.
|
|
74
74
|
|
|
75
|
+
#### `open_dashboard`
|
|
76
|
+
|
|
77
|
+
Opens the dashboard on a project, an organization, or your landing page. Claude shows this
|
|
78
|
+
tool as a start point for Picked, so you can open the dashboard in Claude without a prompt.
|
|
79
|
+
|
|
75
80
|
### Workspaces
|
|
76
81
|
|
|
77
82
|
#### `create_workspace`
|
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.
|
|
4
|
+
"version": "0.0.118",
|
|
5
5
|
"bin": {
|
|
6
6
|
"picked": "dist/esm/bin.js"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@picked/cli": "0.0.
|
|
10
|
-
"@picked/config": "0.0.
|
|
9
|
+
"@picked/cli": "0.0.118",
|
|
10
|
+
"@picked/config": "0.0.118"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@picked/client": "workspace:*",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"main": "./dist/cjs/index.js",
|
|
75
75
|
"module": "./dist/esm/index.js",
|
|
76
76
|
"peerDependencies": {
|
|
77
|
-
"@picked/client": "0.0.
|
|
77
|
+
"@picked/client": "0.0.118"
|
|
78
78
|
},
|
|
79
79
|
"private": false,
|
|
80
80
|
"publishConfig": {
|