@picked/client 0.0.101-next.2 → 0.0.101
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/README.md +34 -158
- package/dist/{api-BlRFU0Fi.js → api-BOKA2i46.js} +1 -1
- package/dist/{api-AaQeg3Ij.cjs → api-C5jUHF3A.cjs} +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/plugins/dynamic-experiences/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/plugins/dynamic-experiences/index.js +2 -2
- package/dist/esm/server/index.js +2 -2
- package/dist/{plugin-CVD2TnRC.cjs → plugin-BcB9ah7q.cjs} +1 -1
- package/dist/{plugin-DhznDG-h.js → plugin-COWxZiTa.js} +2 -2
- package/dist/{preview-unavailable-mW4Pj3Ph.js → preview-unavailable-BJjc3UNr.js} +1 -1
- package/dist/{preview-unavailable-xWLCr93y.cjs → preview-unavailable-CV1BonKA.cjs} +1 -1
- package/dist/{provider-COb_V-yq.js → provider-CszmtTg3.js} +1 -1
- package/dist/{provider-zag5m5GH.cjs → provider-daBChM0G.cjs} +1 -1
- package/package.json +5 -5
- package/dist/docs/_root.css +0 -101
- package/dist/docs/explanation/conditions-and-the-logic-engine.md +0 -94
- package/dist/docs/explanation/content-references.md +0 -99
- package/dist/docs/explanation/feature-flag-allocation.md +0 -218
- package/dist/docs/explanation/how-picked-works.md +0 -124
- package/dist/docs/explanation/how-pickedql-works.md +0 -76
- package/dist/docs/explanation/pages-and-flows.md +0 -64
- package/dist/docs/explanation/the-content-model.md +0 -87
- package/dist/docs/explanation/the-two-apis.md +0 -68
- package/dist/docs/explanation/why-server-side-rendering.md +0 -76
- package/dist/docs/explanation/workspaces-and-versions.md +0 -71
- package/dist/docs/how-to/add-a-step-field-or-action.md +0 -43
- package/dist/docs/how-to/analytics/index.md +0 -316
- package/dist/docs/how-to/archive-or-delete-a-workspace.md +0 -46
- package/dist/docs/how-to/authenticate-the-cli.md +0 -101
- package/dist/docs/how-to/authenticate-with-a-magic-link.md +0 -47
- package/dist/docs/how-to/authenticate-with-a-password.md +0 -59
- package/dist/docs/how-to/authenticate-with-an-api-key.md +0 -51
- package/dist/docs/how-to/authenticate-with-oauth.md +0 -40
- package/dist/docs/how-to/build-a-flow.md +0 -93
- package/dist/docs/how-to/call-an-external-api-from-a-workflow.md +0 -102
- package/dist/docs/how-to/connect-the-mcp-server.md +0 -46
- package/dist/docs/how-to/create-a-content-entry.md +0 -48
- package/dist/docs/how-to/create-a-project.md +0 -29
- package/dist/docs/how-to/create-an-experience.md +0 -42
- package/dist/docs/how-to/create-and-revoke-an-api-key.md +0 -42
- package/dist/docs/how-to/debug-with-the-chrome-extension.md +0 -57
- package/dist/docs/how-to/define-a-page-layout.md +0 -46
- package/dist/docs/how-to/fill-and-publish-a-page.md +0 -66
- package/dist/docs/how-to/install-the-gtm-template.md +0 -84
- package/dist/docs/how-to/install-the-sdk.md +0 -93
- package/dist/docs/how-to/install-the-vite-plugin.md +0 -69
- package/dist/docs/how-to/invite-and-remove-members.md +0 -35
- package/dist/docs/how-to/point-one-entry-at-another.md +0 -61
- package/dist/docs/how-to/preview-a-workspace.md +0 -28
- package/dist/docs/how-to/publish-a-workspace.md +0 -30
- package/dist/docs/how-to/read-a-feature-flag.md +0 -113
- package/dist/docs/how-to/read-a-referenced-entry.md +0 -109
- package/dist/docs/how-to/register-a-component.md +0 -55
- package/dist/docs/how-to/register-an-action-handler.md +0 -85
- package/dist/docs/how-to/register-an-api-that-uses-oauth2.md +0 -107
- package/dist/docs/how-to/render-a-step-form.md +0 -131
- package/dist/docs/how-to/render-an-unpublished-preview.md +0 -41
- package/dist/docs/how-to/retry-a-failed-call-with-a-loop.md +0 -81
- package/dist/docs/how-to/reuse-a-section.md +0 -53
- package/dist/docs/how-to/reuse-a-step-field-or-action.md +0 -28
- package/dist/docs/how-to/roll-back-a-published-version.md +0 -26
- package/dist/docs/how-to/run-an-ab-test.md +0 -49
- package/dist/docs/how-to/run-code-on-a-form-submission.md +0 -125
- package/dist/docs/how-to/server-render-a-page.md +0 -81
- package/dist/docs/how-to/set-a-content-security-policy.md +0 -32
- package/dist/docs/how-to/set-up-mfa.md +0 -113
- package/dist/docs/how-to/switch-workspaces.md +0 -122
- package/dist/docs/how-to/upload-and-use-an-asset.mdx +0 -73
- package/dist/docs/how-to/validate-a-field.md +0 -52
- package/dist/docs/how-to/wait-for-an-action-response.md +0 -182
- package/dist/docs/how-to/write-a-condition.md +0 -45
- package/dist/docs/how-to/write-a-predicate.md +0 -60
- package/dist/docs/index.md +0 -59
- package/dist/docs/reference/dashboard/actions.mdx +0 -56
- package/dist/docs/reference/dashboard/api-keys.mdx +0 -38
- package/dist/docs/reference/dashboard/conditions.mdx +0 -42
- package/dist/docs/reference/dashboard/content/asset-library.mdx +0 -63
- package/dist/docs/reference/dashboard/content/blocks.mdx +0 -57
- package/dist/docs/reference/dashboard/content/content-entries.mdx +0 -95
- package/dist/docs/reference/dashboard/content/models.mdx +0 -108
- package/dist/docs/reference/dashboard/content/pages.mdx +0 -61
- package/dist/docs/reference/dashboard/experiences.mdx +0 -51
- package/dist/docs/reference/dashboard/external-apis.md +0 -169
- package/dist/docs/reference/dashboard/features.mdx +0 -154
- package/dist/docs/reference/dashboard/fields.mdx +0 -106
- package/dist/docs/reference/dashboard/flow-builder/canvas.mdx +0 -58
- package/dist/docs/reference/dashboard/flow-builder/condition-builder.md +0 -57
- package/dist/docs/reference/dashboard/flow-builder/keyboard-shortcuts.md +0 -72
- package/dist/docs/reference/dashboard/flow-builder/nodes.md +0 -63
- package/dist/docs/reference/dashboard/labels.md +0 -321
- package/dist/docs/reference/dashboard/lead-search.md +0 -224
- package/dist/docs/reference/dashboard/projects.mdx +0 -44
- package/dist/docs/reference/dashboard/reports.mdx +0 -43
- package/dist/docs/reference/dashboard/steps.mdx +0 -37
- package/dist/docs/reference/dashboard/team-management.md +0 -29
- package/dist/docs/reference/dashboard/workflow-runs.md +0 -142
- package/dist/docs/reference/dashboard/workflow-templates.md +0 -182
- package/dist/docs/reference/dashboard/workflow-test-runs.md +0 -77
- package/dist/docs/reference/dashboard/workspace-versioning.mdx +0 -30
- package/dist/docs/reference/dashboard/workspaces.mdx +0 -76
- package/dist/docs/reference/delivery-api/experience-content.md +0 -152
- package/dist/docs/reference/delivery-api/index.md +0 -45
- package/dist/docs/reference/delivery-api/preview-caching-crawling.md +0 -79
- package/dist/docs/reference/delivery-api/project-config.md +0 -65
- package/dist/docs/reference/delivery-api/workspace-schema.md +0 -107
- package/dist/docs/reference/glossary.md +0 -201
- package/dist/docs/reference/management-api/authentication.md +0 -87
- package/dist/docs/reference/management-api/authorization-and-scopes.md +0 -291
- package/dist/docs/reference/management-api/error-handling.md +0 -232
- package/dist/docs/reference/management-api/pagination.md +0 -192
- package/dist/docs/reference/pickedql/data-sources.md +0 -174
- package/dist/docs/reference/pickedql/dimensions.md +0 -103
- package/dist/docs/reference/pickedql/filtering.md +0 -64
- package/dist/docs/reference/pickedql/index.md +0 -18
- package/dist/docs/reference/pickedql/schema.md +0 -172
- package/dist/docs/reference/pickedql/virtual-functions.md +0 -248
- package/dist/docs/reference/sdk/actions.md +0 -154
- package/dist/docs/reference/sdk/analytics-events.md +0 -453
- package/dist/docs/reference/sdk/conditions.md +0 -147
- package/dist/docs/reference/sdk/content-security-policy.md +0 -21
- package/dist/docs/reference/sdk/content.md +0 -253
- package/dist/docs/reference/sdk/experiences.md +0 -51
- package/dist/docs/reference/sdk/features.md +0 -256
- package/dist/docs/reference/sdk/fields.md +0 -255
- package/dist/docs/reference/sdk/index.md +0 -68
- package/dist/docs/reference/sdk/plugins/create-experience.md +0 -123
- package/dist/docs/reference/sdk/plugins/dynamic-experiences.md +0 -74
- package/dist/docs/reference/sdk/plugins/index.md +0 -29
- package/dist/docs/reference/sdk/plugins/window-object.md +0 -25
- package/dist/docs/reference/sdk/predicates.md +0 -43
- package/dist/docs/reference/sdk/ssr/index.md +0 -33
- package/dist/docs/reference/sdk/ssr/rendering-and-hydration.md +0 -103
- package/dist/docs/reference/sdk/ssr/serialize.md +0 -80
- package/dist/docs/reference/sdk/ssr/slots-and-placements.md +0 -113
- package/dist/docs/reference/sdk/steps.md +0 -86
- package/dist/docs/reference/sdk/type-generation.md +0 -265
- package/dist/docs/reference/tools/chrome-extension.md +0 -16
- package/dist/docs/reference/tools/cli.md +0 -292
- package/dist/docs/reference/tools/image-optimisation-service.md +0 -104
- package/dist/docs/reference/tools/mcp.md +0 -136
- package/dist/docs/reference/tools/vite-plugin.md +0 -163
- package/dist/docs/tutorials/first-api-call.md +0 -235
- package/dist/docs/tutorials/first-experience-in-the-dashboard.mdx +0 -143
- package/dist/docs/tutorials/first-experience.mdx +0 -254
- package/dist/docs/tutorials/first-server-rendered-page.mdx +0 -186
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: reference
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Experience Content Endpoint
|
|
7
|
-
|
|
8
|
-
Fetch the content entries that back the steps of a single experience.
|
|
9
|
-
|
|
10
|
-
## Request
|
|
11
|
-
|
|
12
|
-
```
|
|
13
|
-
GET /api/v1/projects/:projectId/experiences/:id/content
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
| Parameter | In | Description |
|
|
17
|
-
| --- | --- | --- |
|
|
18
|
-
| `projectId` | path | The project the experience belongs to. |
|
|
19
|
-
| `id` | path | The experience to fetch content for. |
|
|
20
|
-
| `preview_token` | query | Optional. With it, the endpoint returns preview content, which is unpublished. |
|
|
21
|
-
|
|
22
|
-
## Response
|
|
23
|
-
|
|
24
|
-
```json
|
|
25
|
-
{
|
|
26
|
-
"experienceId": "exp_123",
|
|
27
|
-
"versionId": "ver_456",
|
|
28
|
-
"content": [
|
|
29
|
-
{
|
|
30
|
-
"id": "entry_789",
|
|
31
|
-
"contentModelKey": "page-hero",
|
|
32
|
-
"data": {
|
|
33
|
-
"title": "Spring sale",
|
|
34
|
-
"category": { "contentEntryId": "entry_42", "contentModelKey": "category" }
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
],
|
|
38
|
-
"references": [
|
|
39
|
-
{
|
|
40
|
-
"id": "entry_42",
|
|
41
|
-
"contentModelKey": "category",
|
|
42
|
-
"data": { "name": "Outerwear" }
|
|
43
|
-
}
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
| Field | Type | Description |
|
|
49
|
-
| --- | --- | --- |
|
|
50
|
-
| `experienceId` | `string` | The experience the content belongs to. |
|
|
51
|
-
| `versionId` | `string \| null` | The published version id, or `null` on preview. |
|
|
52
|
-
| `content[]` | `array` | The entries that the steps of the experience point at. |
|
|
53
|
-
| `content[].id` | `string` | The content entry id. |
|
|
54
|
-
| `content[].contentModelKey` | `string \| null` | The Key of the Model, or `null` when it cannot be resolved. |
|
|
55
|
-
| `content[].data` | `object` | The entry data. It matches the schema of the Model. |
|
|
56
|
-
| `references[]` | `array` | Every entry that a `reference` field reaches, in the same blob shape as `content[]`. |
|
|
57
|
-
|
|
58
|
-
The published response and the preview response hold the same fields, and the same
|
|
59
|
-
values, for the same content.
|
|
60
|
-
|
|
61
|
-
## A reference field points at a separate blob
|
|
62
|
-
|
|
63
|
-
A [Reference field](/reference/dashboard/content/models#reference-fields) arrives as a
|
|
64
|
-
pointer, and not as the entry:
|
|
65
|
-
|
|
66
|
-
```json
|
|
67
|
-
{ "contentEntryId": "entry_42", "contentModelKey": "category" }
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
A repeatable Reference field arrives as an array of such pointers.
|
|
71
|
-
|
|
72
|
-
The entry itself arrives in `references[]` under its own `id`. Look the pointer up
|
|
73
|
-
there. The SDK does this for you, through
|
|
74
|
-
[`useReference` and `getReference`](/reference/sdk/content).
|
|
75
|
-
|
|
76
|
-
`references[]` holds each entry one time, for any number of fields that point at it. It
|
|
77
|
-
omits the entries that are in `content[]` already.
|
|
78
|
-
|
|
79
|
-
### What `references[]` omits
|
|
80
|
-
|
|
81
|
-
Picked resolves a chain of references to a maximum depth of 5. It counts the depth from
|
|
82
|
-
the entries in `content[]`. An entry is absent from `references[]` when Picked cannot
|
|
83
|
-
resolve it:
|
|
84
|
-
|
|
85
|
-
| Cause | Result |
|
|
86
|
-
| --- | --- |
|
|
87
|
-
| The target was deleted | The pointer stays. The entry is absent. |
|
|
88
|
-
| The target is in another workspace | The pointer stays. The entry is absent. |
|
|
89
|
-
| The chain makes a cycle | The pointer stays. The entry is absent. |
|
|
90
|
-
| The chain is deeper than 5 | The pointer stays, with its `contentModelKey`. The entry is absent. |
|
|
91
|
-
|
|
92
|
-
A pointer with no entry in `references[]` means that there is no such entry. Picked sends
|
|
93
|
-
no empty blob for it.
|
|
94
|
-
|
|
95
|
-
:::warning
|
|
96
|
-
A reference pointer also carries a `data` field with the content of the target inlined.
|
|
97
|
-
This is for the SDK versions that came before `references[]`. Read `references[]`
|
|
98
|
-
instead. A later release removes the inline copy.
|
|
99
|
-
:::
|
|
100
|
-
|
|
101
|
-
## An HTML asset comes back in the response
|
|
102
|
-
|
|
103
|
-
A Model can have an [HTML asset](/reference/dashboard/content/asset-library) field. The
|
|
104
|
-
value of that field arrives inside the response. The endpoint changes the reference to
|
|
105
|
-
`{ id, content }`. There, `content` holds the HTML that you uploaded, as a string. It
|
|
106
|
-
is `null` when the endpoint cannot resolve it:
|
|
107
|
-
|
|
108
|
-
```json
|
|
109
|
-
{
|
|
110
|
-
"id": "entry_789",
|
|
111
|
-
"contentModelKey": "page-hero",
|
|
112
|
-
"data": {
|
|
113
|
-
"markup": { "id": "asset_42", "content": "<section>...</section>" }
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
The SDK renders the inlined HTML directly, with no extra storage fetch.
|
|
119
|
-
|
|
120
|
-
## Status codes
|
|
121
|
-
|
|
122
|
-
| Code | Meaning |
|
|
123
|
-
| --- | --- |
|
|
124
|
-
| `200` | Success. |
|
|
125
|
-
| `401` | Invalid `preview_token`. |
|
|
126
|
-
| `404` | The experience has no published content. |
|
|
127
|
-
|
|
128
|
-
## Example
|
|
129
|
-
|
|
130
|
-
```bash
|
|
131
|
-
curl https://api.picked.app/api/v1/projects/proj_123/experiences/exp_123/content
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
```json
|
|
135
|
-
{
|
|
136
|
-
"experienceId": "exp_123",
|
|
137
|
-
"versionId": "ver_456",
|
|
138
|
-
"content": [
|
|
139
|
-
{ "id": "entry_789", "contentModelKey": "page-hero", "data": { "title": "Spring sale" } }
|
|
140
|
-
],
|
|
141
|
-
"references": []
|
|
142
|
-
}
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
## Related
|
|
146
|
-
|
|
147
|
-
- [About the two APIs](/explanation/the-two-apis)
|
|
148
|
-
- [About content references](/explanation/content-references) — why a reference is a pointer.
|
|
149
|
-
- [Content](/reference/sdk/content) — how the SDK resolves a pointer.
|
|
150
|
-
- [Project config](/reference/delivery-api/project-config) — the endpoint that links a step to an entry.
|
|
151
|
-
- [Server Snapshot](/reference/sdk/ssr/serialize) — how the SDK reads this content.
|
|
152
|
-
- [Preview, cache, and crawlers](/reference/delivery-api/preview-caching-crawling)
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: reference
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Delivery API
|
|
7
|
-
|
|
8
|
-
The Delivery API is a public REST API. It is read-only, and it serves the published
|
|
9
|
-
configuration of your project together with your page content. It is separate from the
|
|
10
|
-
GraphQL management API.
|
|
11
|
-
|
|
12
|
-
## Base URL and versioning
|
|
13
|
-
|
|
14
|
-
All Delivery API routes are versioned under `/api/v1`:
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
https://api.picked.app/api/v1
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Published content and preview content
|
|
21
|
-
|
|
22
|
-
Each endpoint serves two surfaces:
|
|
23
|
-
|
|
24
|
-
- **Published** content is anonymous. Anybody can read your published configuration and
|
|
25
|
-
your published content.
|
|
26
|
-
- **Preview** content needs a `preview_token` query parameter. With it you can render
|
|
27
|
-
an unpublished draft before you make it live.
|
|
28
|
-
|
|
29
|
-
The management API holds the preview token of a workspace in the `previewToken`
|
|
30
|
-
field. The preview action in the dashboard also makes one for you.
|
|
31
|
-
|
|
32
|
-
## Endpoints
|
|
33
|
-
|
|
34
|
-
| Endpoint | Description |
|
|
35
|
-
| --- | --- |
|
|
36
|
-
| [Project Config](/reference/delivery-api/project-config) | `GET /api/v1/projects/:projectId` returns the published configuration of the project, with the content link of each step. |
|
|
37
|
-
| [Experience Content](/reference/delivery-api/experience-content) | `GET /api/v1/projects/:projectId/experiences/:id/content` returns the Content Entries of an experience. |
|
|
38
|
-
|
|
39
|
-
Both endpoints share some behaviour. See
|
|
40
|
-
[Preview, cache, and crawlers](/reference/delivery-api/preview-caching-crawling).
|
|
41
|
-
|
|
42
|
-
## Related
|
|
43
|
-
|
|
44
|
-
- [About the two APIs](/explanation/the-two-apis) — which one to use, and why they are
|
|
45
|
-
separate.
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: reference
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Preview, cache, and crawlers
|
|
7
|
-
|
|
8
|
-
Both Delivery API endpoints share this behaviour: the preview token, the cache, CORS,
|
|
9
|
-
and what a crawler can read.
|
|
10
|
-
|
|
11
|
-
## Preview tokens
|
|
12
|
-
|
|
13
|
-
Pass `?preview_token=<token>` to read unpublished content. Both endpoints take it,
|
|
14
|
-
and both return `versionId: null` for a preview. An invalid token returns `401`.
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
curl "https://api.picked.app/api/v1/projects/proj_123?preview_token=<token>"
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
The [management API](/tutorials/first-api-call) holds the preview token of a workspace in the
|
|
21
|
-
`previewToken` field. The preview action in the dashboard also makes one for you.
|
|
22
|
-
|
|
23
|
-
Use the same token for the project configuration request and for the experience content
|
|
24
|
-
request. Both then come from the same preview.
|
|
25
|
-
|
|
26
|
-
## Cache
|
|
27
|
-
|
|
28
|
-
The cache rules depend on the surface and on the client that makes the request. The
|
|
29
|
-
SDK sends a `Picked-Client: sdk` request header:
|
|
30
|
-
|
|
31
|
-
| Request | `Cache-Control` |
|
|
32
|
-
| --- | --- |
|
|
33
|
-
| Published, `Picked-Client: sdk` | `public, s-maxage=10` |
|
|
34
|
-
| Published, other clients | `private, no-store` |
|
|
35
|
-
| Preview | `no-store` |
|
|
36
|
-
|
|
37
|
-
A published response that a cache can hold also sends `Vary: Picked-Client`. A shared
|
|
38
|
-
cache therefore keys on the client header. It never gives a body that it cached for
|
|
39
|
-
the SDK to a request from another client.
|
|
40
|
-
|
|
41
|
-
## CORS
|
|
42
|
-
|
|
43
|
-
Both endpoints can be read from another origin. An `OPTIONS` preflight returns `204`
|
|
44
|
-
with the CORS headers:
|
|
45
|
-
|
|
46
|
-
| Header | Value |
|
|
47
|
-
| --- | --- |
|
|
48
|
-
| `Access-Control-Allow-Origin` | `*` |
|
|
49
|
-
| `Access-Control-Allow-Methods` | `GET, OPTIONS` |
|
|
50
|
-
| `Access-Control-Allow-Headers` | `Content-Type, Picked-Client, Picked-Version, traceparent, tracestate` |
|
|
51
|
-
|
|
52
|
-
## Crawlers and search rank
|
|
53
|
-
|
|
54
|
-
A crawler can read both endpoints, so a search engine can read your published
|
|
55
|
-
content. A preview URL is disallowed, so a draft never reaches the index. These are
|
|
56
|
-
the `robots.txt` rules:
|
|
57
|
-
|
|
58
|
-
```
|
|
59
|
-
User-agent: *
|
|
60
|
-
|
|
61
|
-
# Let a crawler read the public project configuration and experience content.
|
|
62
|
-
Allow: /api/v1/projects
|
|
63
|
-
Allow: /api/v1/projects/*/experiences/*/content
|
|
64
|
-
|
|
65
|
-
# Keep a preview response, which is a draft, away from a crawler.
|
|
66
|
-
Disallow: /api/v1/projects/*preview_token=
|
|
67
|
-
|
|
68
|
-
# Everything else stays disallowed: GraphQL, MCP, internal routes, and the ping.
|
|
69
|
-
Disallow: /
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
See [Project Config](/reference/delivery-api/project-config) and
|
|
73
|
-
[Experience Content](/reference/delivery-api/experience-content) for the endpoints.
|
|
74
|
-
|
|
75
|
-
## Related
|
|
76
|
-
|
|
77
|
-
- [About the two APIs](/explanation/the-two-apis) — how a preview stays out of the search
|
|
78
|
-
index.
|
|
79
|
-
- [How to render an unpublished preview](/how-to/render-an-unpublished-preview)
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: reference
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Project Config Endpoint
|
|
7
|
-
|
|
8
|
-
Fetch a project's published configuration: its experiences, steps, and the link from each step to the Content Entry that backs it.
|
|
9
|
-
|
|
10
|
-
## Request
|
|
11
|
-
|
|
12
|
-
```
|
|
13
|
-
GET /api/v1/projects/:projectId
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
| Parameter | In | Description |
|
|
17
|
-
| --- | --- | --- |
|
|
18
|
-
| `projectId` | path | The project to fetch config for. |
|
|
19
|
-
| `preview_token` | query | Optional. With it, the endpoint returns the preview configuration, which are unpublished. |
|
|
20
|
-
|
|
21
|
-
## Response
|
|
22
|
-
|
|
23
|
-
The response carries the project's experiences and steps. Each step includes `layoutContentId`, the reference to the Content Entry that backs that step's layout. Use it to know which experiences have content to fetch from the [Experience Content](/reference/delivery-api/experience-content) endpoint.
|
|
24
|
-
|
|
25
|
-
| Field | Type | Description |
|
|
26
|
-
| --- | --- | --- |
|
|
27
|
-
| `id` | `string` | The project id. |
|
|
28
|
-
| `versionId` | `string \| null` | The published version id, or `null` on preview. |
|
|
29
|
-
| `steps[].layoutContentId` | `string \| null` | The Content Entry of this step, or `null` when the step has no content. |
|
|
30
|
-
|
|
31
|
-
## Published content and preview content
|
|
32
|
-
|
|
33
|
-
For published content, `versionId` holds the ID of the published version. For preview
|
|
34
|
-
content, which you read with `?preview_token=...`, `versionId` is `null`, because
|
|
35
|
-
there is no published version. See [Preview, cache, and crawlers](/reference/delivery-api/preview-caching-crawling).
|
|
36
|
-
|
|
37
|
-
## Example
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
curl https://api.picked.app/api/v1/projects/proj_123
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
```json
|
|
44
|
-
{
|
|
45
|
-
"id": "proj_123",
|
|
46
|
-
"versionId": "ver_456",
|
|
47
|
-
"steps": [
|
|
48
|
-
{
|
|
49
|
-
"id": "step_1",
|
|
50
|
-
"key": "hero",
|
|
51
|
-
"name": "Hero",
|
|
52
|
-
"layoutName": "HeroLayout",
|
|
53
|
-
"layoutContentId": "entry_789"
|
|
54
|
-
}
|
|
55
|
-
]
|
|
56
|
-
}
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Pass the config to `serialize()` on your server to produce an SSR snapshot. See [Server Snapshot](/reference/sdk/ssr/serialize).
|
|
60
|
-
|
|
61
|
-
## Related
|
|
62
|
-
|
|
63
|
-
- [About the two APIs](/explanation/the-two-apis)
|
|
64
|
-
- [Experience content](/reference/delivery-api/experience-content)
|
|
65
|
-
- [How to server-render a page](/how-to/server-render-a-page)
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: reference
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Workspace Schema Endpoint
|
|
7
|
-
|
|
8
|
-
A JSON Schema document for the structure of your project: content models, fields, feature keys, experience keys, and step keys. Tooling reads this endpoint to generate TypeScript types for your application.
|
|
9
|
-
|
|
10
|
-
## Request
|
|
11
|
-
|
|
12
|
-
```
|
|
13
|
-
GET /api/v1/projects/:projectId/schema
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
| Parameter | In | Description |
|
|
17
|
-
| --- | --- | --- |
|
|
18
|
-
| `projectId` | path | The project whose schema to fetch. |
|
|
19
|
-
| `preview_token` | query | Optional. Returns the preview (unpublished) schema when you send it. |
|
|
20
|
-
|
|
21
|
-
## Response
|
|
22
|
-
|
|
23
|
-
The response is a [JSON Schema draft 2020-12](https://json-schema.org/draft/2020-12/schema) document with Picked-specific extension fields:
|
|
24
|
-
|
|
25
|
-
| Field | Description |
|
|
26
|
-
| --- | --- |
|
|
27
|
-
| `x-picked-schema-version` | Schema document version (currently `1`). |
|
|
28
|
-
| `x-picked-source` | `"published"` or `"preview"` — mirrors the surface you requested. |
|
|
29
|
-
| `x-picked-version-id` | Published workspace version id, or `null` on preview. |
|
|
30
|
-
| `x-picked-step-content-models` | Map of step key → content model key, which gives each layout its type. |
|
|
31
|
-
| `x-picked-step-fields` | Map of step key → the keys of the fields on that step, in order. |
|
|
32
|
-
| `x-picked-feature-values` | Map of feature key → the values that the feature can serve. Picked adds this field only when the workspace has a Text feature flag. |
|
|
33
|
-
| `x-picked-workflow-action-keys` | Keys of the actions that start a workflow, sorted. Picked adds this field only when the workspace has such an action. |
|
|
34
|
-
| `$defs.contentModels` | JSON Schema definitions for each content model. |
|
|
35
|
-
| `$defs.contentBlocks` | JSON Schema definitions for reusable content blocks. |
|
|
36
|
-
| `$defs.fields` | Object schema for project field values. |
|
|
37
|
-
| `$defs.featureKeys` | String enum of feature keys. |
|
|
38
|
-
| `$defs.experienceKeys` | String enum of experience keys. |
|
|
39
|
-
| `$defs.stepKeys` | String enum of step keys. |
|
|
40
|
-
| `$defs.actionKeys` | String enum of action keys. A schema from a version that Picked published before this field existed has none. |
|
|
41
|
-
|
|
42
|
-
## Field values
|
|
43
|
-
|
|
44
|
-
Each content model and content block definition describes a field value in the form that
|
|
45
|
-
the Delivery API serves it:
|
|
46
|
-
|
|
47
|
-
| Field type | Value |
|
|
48
|
-
| --- | --- |
|
|
49
|
-
| `asset` | One of two objects. A resolved asset has `id`, `url`, `mimeType`, `sizeBytes`, `fileName`, `width`, and `height`. `width` and `height` are `null` for a file that is not an image. An asset that does not exist, or that you deleted, has `id`, and `versionId` when the reference holds a version. |
|
|
50
|
-
| `html-asset` | `id` and `content`. `content` is the text of the file, or `null` when Picked cannot read the file. |
|
|
51
|
-
| `content-block` | One of the block definitions in `$defs.contentBlocks` that the field accepts: a `$ref`, or a `oneOf` of `$ref`s. A field with a category accepts the blocks of that category. A field with no category accepts all blocks. Each block definition has `contentBlockId`, `contentBlockKey`, and `data`. `contentBlockKey` is a `const` that holds the key of the block. |
|
|
52
|
-
| `reference` | `contentEntryId`. The value can also have `contentModelKey` and `data`. It has `data` only when the API resolves the entry. A reference that is too deep, or that makes a cycle, can have `contentModelKey` and no `data`. |
|
|
53
|
-
|
|
54
|
-
The Delivery API does not serve a block that no longer exists, for example a block that you
|
|
55
|
-
deleted. A repeatable `content-block` field does not include the block in its list. A
|
|
56
|
-
`content-block` field that is not repeatable is not in the `data` of the entry.
|
|
57
|
-
|
|
58
|
-
A published schema keeps the value shapes that it had when you published the workspace.
|
|
59
|
-
The preview schema always has the shapes in this table.
|
|
60
|
-
|
|
61
|
-
## Published and preview
|
|
62
|
-
|
|
63
|
-
On the published surface, the schema reflects your last published workspace. On the preview surface (`?preview_token=...`), the schema reflects the current draft workspace. See [Preview, cache, and crawlers](/reference/delivery-api/preview-caching-crawling).
|
|
64
|
-
|
|
65
|
-
When no published schema exists, the published endpoint returns `404` and tells you to publish the workspace.
|
|
66
|
-
|
|
67
|
-
A Boolean feature flag serves `true` or `false`, and it contributes no entry to
|
|
68
|
-
`x-picked-feature-values`. A workspace of Boolean feature flags therefore omits the field.
|
|
69
|
-
A schema that Picked published before Text feature flags existed also omits it.
|
|
70
|
-
|
|
71
|
-
Picked sorts the values of each Text feature flag by the key of the variant. The document
|
|
72
|
-
therefore does not change when you rename a variant or move a row.
|
|
73
|
-
|
|
74
|
-
## Example
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
curl https://api.picked.app/api/v1/projects/proj_123/schema
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
```json
|
|
81
|
-
{
|
|
82
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
83
|
-
"$id": "picked:project/proj_123/schema",
|
|
84
|
-
"x-picked-schema-version": 1,
|
|
85
|
-
"x-picked-source": "published",
|
|
86
|
-
"x-picked-version-id": "ver_456",
|
|
87
|
-
"x-picked-step-content-models": {
|
|
88
|
-
"intro": "welcome-page"
|
|
89
|
-
},
|
|
90
|
-
"x-picked-feature-values": {
|
|
91
|
-
"hero": [false, "hero-a", "hero-b"]
|
|
92
|
-
},
|
|
93
|
-
"$defs": {
|
|
94
|
-
"contentModels": {},
|
|
95
|
-
"contentBlocks": {},
|
|
96
|
-
"fields": { "type": "object", "additionalProperties": false, "properties": {} },
|
|
97
|
-
"featureKeys": { "type": "string", "enum": ["default", "hero"] },
|
|
98
|
-
"experienceKeys": { "type": "string", "enum": ["welcome-survey"] },
|
|
99
|
-
"stepKeys": { "type": "string", "enum": ["intro"] }
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
## Related
|
|
105
|
-
|
|
106
|
-
- [Type generation](/reference/sdk/type-generation) — Generate TypeScript types from this schema in your app.
|
|
107
|
-
- [Project Config](/reference/delivery-api/project-config) — Runtime project configuration for the SDK.
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: reference
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Glossary
|
|
7
|
-
|
|
8
|
-
Every term that Picked uses, and what each one means. The dashboard, the API, and the SDK
|
|
9
|
-
sometimes use different words for the same thing. This page gives the word that the
|
|
10
|
-
documentation uses, and it names the others.
|
|
11
|
-
|
|
12
|
-
## Accounts and access
|
|
13
|
-
|
|
14
|
-
| Term | What it is |
|
|
15
|
-
| --- | --- |
|
|
16
|
-
| **Organization** | The top level. It holds your projects, your members, and your settings. You can belong to more than one. |
|
|
17
|
-
| **Member** | A person in an organization. Each member holds one role. |
|
|
18
|
-
| **Role** | What a member can reach. It decides whether a member can create a project, edit an experience, or read a report. |
|
|
19
|
-
| **API key** | A credential for a server-to-server integration. It belongs to an organization, it can belong to one project, and it carries scopes. |
|
|
20
|
-
| **Scope** | One permission, written `resource/action`, such as `organization/read`. A scope decides which operations a caller can do. |
|
|
21
|
-
| **Session** | The result of a sign-in. It holds an access token, a refresh token, and the time at which the access token expires. |
|
|
22
|
-
| **User** | A person who signs in to the Picked dashboard. A user is not a visitor. |
|
|
23
|
-
| **Invitation** | An offer to join an organization, sent to an email address. It waits until the person accepts it. |
|
|
24
|
-
| **MFA factor** | A second credential on an account, such as a telephone number. |
|
|
25
|
-
|
|
26
|
-
## Projects and versions
|
|
27
|
-
|
|
28
|
-
| Term | What it is |
|
|
29
|
-
| --- | --- |
|
|
30
|
-
| **Project** | One site or one application. Each project has its own experiences, content, and configuration. |
|
|
31
|
-
| **Project configuration** | The published settings of a project: its experiences and steps, and the content link on each step. The Delivery API serves it, and the SDK reads it. The SDK parameter is `projectConfig`. |
|
|
32
|
-
| **Workspace** | One version of the configuration of a project. You hold a change in a workspace, see a preview of it, and publish it. |
|
|
33
|
-
| **Draft** | A workspace that no visitor sees. |
|
|
34
|
-
| **Live** | The workspace whose snapshot the SDK serves. Each project has exactly one. |
|
|
35
|
-
| **Archived** | A draft that you put to one side. It is still editable, and it is out of the default list. |
|
|
36
|
-
| **Version** | An immutable snapshot of a workspace, made when you publish. The **Publish history** page lists them. |
|
|
37
|
-
| **Preview** | A view of an unpublished workspace on your own site. It reaches your browser only. |
|
|
38
|
-
| **Preview environment** | A named target that a preview opens against. |
|
|
39
|
-
| **Project settings** | The settings of one project, which you edit in the dashboard. These are not the project configuration that the Delivery API serves. |
|
|
40
|
-
|
|
41
|
-
## Experiences
|
|
42
|
-
|
|
43
|
-
| Term | What it is |
|
|
44
|
-
| --- | --- |
|
|
45
|
-
| **Experience** | Personalized content that Picked serves to a visitor. It is a Flow or a Page. |
|
|
46
|
-
| **Flow** | An interactive experience of more than one step, which the browser renders. |
|
|
47
|
-
| **Page** | A standalone experience that your server renders from a content entry, for content that a search engine must read. |
|
|
48
|
-
| **Step** | One screen that a visitor sees. It holds fields. |
|
|
49
|
-
| **Field** | A data input inside a step. It collects a name, an email address, a preference, or a choice. |
|
|
50
|
-
| **Field option** | One choice in a field that has a fixed set of choices. Each option carries a value, and it can carry a condition. |
|
|
51
|
-
| **Action** | A side effect that starts when the flow reaches it. Your application registers a handler for it. |
|
|
52
|
-
| **Condition** | A rule that decides whether a visitor sees something, or which branch a flow takes. |
|
|
53
|
-
| **Predicate** | A function that you register on the client, so a condition can read data that only your application holds. |
|
|
54
|
-
| **Response** | A value that a visitor sends through a field. |
|
|
55
|
-
| **Origin** | The node where every flow starts. |
|
|
56
|
-
| **Node** | One part of a flow on the canvas: an origin, a step, an action, or a condition. |
|
|
57
|
-
| **Handle** | A connection point on a node. An input handle is on the left, an output handle on the right. |
|
|
58
|
-
| **Key** | The stable identifier of a step, a field, an action, or a condition. Your application and your API calls both use it. You set it one time, and you cannot change it. |
|
|
59
|
-
| **Layout name** | The name of the component that renders a step, such as `card` or `modal`. |
|
|
60
|
-
| **Target** | The element that an experience renders against, found by its target selector. |
|
|
61
|
-
|
|
62
|
-
## Feature flags
|
|
63
|
-
|
|
64
|
-
| Term | What it is |
|
|
65
|
-
| --- | --- |
|
|
66
|
-
| **Feature flag** | A control that decides which visitors see a change, so you can run an A/B test or release in stages. The API type is `Feature`. |
|
|
67
|
-
| **Weight** | The percentage of visitors that Picked allocates to a feature flag, from 0 to 100. |
|
|
68
|
-
| **Allocation** | The act that puts a visitor in a feature flag. It happens when something first reads the bucket. |
|
|
69
|
-
| **Bucket** | The value a feature flag resolves to for one visitor. |
|
|
70
|
-
| **Exposure** | The moment a visitor enters a test. It is the same moment as the allocation. |
|
|
71
|
-
| **Version** | A number on a feature flag that forms part of the cache key. It is not part of the allocation. |
|
|
72
|
-
|
|
73
|
-
## Content
|
|
74
|
-
|
|
75
|
-
| Term | What it is |
|
|
76
|
-
| --- | --- |
|
|
77
|
-
| **Model** | A reusable schema that sets which fields a piece of content can hold. The API type is `ContentModel`. The dashboard lists them under **CMS**, at **Models**. |
|
|
78
|
-
| **Block** | A reusable schema fragment that you put inside one or more Models. The API type is `ContentBlock`. The dashboard lists them under **CMS**, at **Blocks**. |
|
|
79
|
-
| **Content entry** | One instance of a Model, filled with real values. The dashboard lists them under **CMS**, at **Content entries**. |
|
|
80
|
-
| **Category** | The role of a Model or a Block. It is fixed when you create the record. |
|
|
81
|
-
| **Page layout** | A Model with the Page layout category. It sets which fields a Page can hold. |
|
|
82
|
-
| **Step layout** | A Model with the Step layout category. It sets which fields one Step inside a Flow can hold. |
|
|
83
|
-
| **Section** | A Block with the Section category. A **Page Sections** field accepts it. |
|
|
84
|
-
| **General content** | A Model or a Block with no category. It has no layout role, and nothing renders its entries directly. |
|
|
85
|
-
| **Reference** | A field that points one content entry at another. The pointer holds the id of the target, and not a copy of it. |
|
|
86
|
-
| **Target Model** | The Model whose entries a Reference field accepts. It holds a Key. **Any Model** sets no limit. |
|
|
87
|
-
| **Entry title** | The name that the entries list shows. It is the first single-line text field of the entry, and it falls back to the entry id. |
|
|
88
|
-
| **Asset** | A file that your content points at: an image, a video, a document, or HTML. |
|
|
89
|
-
| **Asset library** | The project-level store that holds your assets. |
|
|
90
|
-
| **Design system** | A set of shared design decisions for a project. |
|
|
91
|
-
| **Content schema** | The set of fields that a Model or a Block defines. |
|
|
92
|
-
| **Asset version** | One file that somebody uploaded for an asset. The library keeps the earlier versions. |
|
|
93
|
-
| **Validation error** | A report that one field in a content entry does not match its schema. It carries the path to the exact field. |
|
|
94
|
-
|
|
95
|
-
## Leads
|
|
96
|
-
|
|
97
|
-
| Term | What it is |
|
|
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. |
|
|
100
|
-
| **Response** | One answer in a lead, held under the key of the field that asked for it. |
|
|
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
|
-
| **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. |
|
|
103
|
-
| **Namespace** | The first part of the name of a label, which groups related keys, such as `details` in `details.phone`. |
|
|
104
|
-
| **Label type** | How to read the value of a label: text, number, boolean, or JSON. |
|
|
105
|
-
| **Visit** | The events one visitor made in one session. The API calls it `session`. |
|
|
106
|
-
| **Capture event** | The analytics event that recorded the capture of a lead. |
|
|
107
|
-
|
|
108
|
-
## Workflows
|
|
109
|
-
|
|
110
|
-
| Term | What it is |
|
|
111
|
-
| --- | --- |
|
|
112
|
-
| **Workflow template** | Text with `{{ … }}` in a node of a workflow. Picked fills it with data from the run. Refer to [Workflow templates](/reference/dashboard/workflow-templates). |
|
|
113
|
-
| **Run variable** | A value that each node of a run can read, such as `run.startedAt` or `current.visit`. |
|
|
114
|
-
|
|
115
|
-
## The SDK
|
|
116
|
-
|
|
117
|
-
| Term | What it is |
|
|
118
|
-
| --- | --- |
|
|
119
|
-
| **Client** | The object that `createClient()` returns. It holds your configuration and runs the experiences. |
|
|
120
|
-
| **Plugin** | A piece of behaviour that you pass to the `plugins` array of the client. |
|
|
121
|
-
| **Component name** | The identifier that points an experience at a component in your application. |
|
|
122
|
-
| **Adapter** | The function that lets the client render a framework component: `adaptReactComponent` or `adaptSvelteComponent`. |
|
|
123
|
-
| **Slot** | A named mount point, rendered by `<ExperienceSlot name="…" />`. It maps to the `.picked-slot-<name>` selector. |
|
|
124
|
-
| **Placement** | Where an experience renders against its target: `replace`, `before`, `prepend`, `append`, or `after`. |
|
|
125
|
-
| **Target selector** | The selector that an experience renders into. |
|
|
126
|
-
| **Content index** | The store of every content record that the client holds, keyed by id. `useContent(id)` and `useReference()` read it. |
|
|
127
|
-
| **Snapshot** | The plain JSON that `serialize()` returns on your server, and that seeds the client in the browser. |
|
|
128
|
-
| **Precondition** | A gate that decides whether Picked starts at all. |
|
|
129
|
-
| **Visitor** | The person on your site. Picked gives each one a stable ID. A visitor is not a user. |
|
|
130
|
-
| **Framework plugin** | The plugin that lets the client render a React or a Svelte component. |
|
|
131
|
-
|
|
132
|
-
## APIs and analytics
|
|
133
|
-
|
|
134
|
-
| Term | What it is |
|
|
135
|
-
| --- | --- |
|
|
136
|
-
| **Delivery API** | The public, anonymous, read-only REST API that serves your published configuration and content. |
|
|
137
|
-
| **Management API** | The authenticated GraphQL API that controls your projects, experiences, and content. |
|
|
138
|
-
| **Preview token** | A token that lets a Delivery API request read unpublished content. |
|
|
139
|
-
| **PickedQL** | The SQL query language for your Picked analytics data. |
|
|
140
|
-
| **Virtual table** | A table name in PickedQL, such as `metrics`, that maps to the real tables below it. |
|
|
141
|
-
| **Virtual function** | A short function in PickedQL, such as `control_users()`, that expands to a full aggregate expression. |
|
|
142
|
-
| **Dimension** | A column that PickedQL joins for you, such as `device_category`. |
|
|
143
|
-
| **Report** | An embedded analytics dashboard or question, attached to a project. |
|
|
144
|
-
|
|
145
|
-
## Tools
|
|
146
|
-
|
|
147
|
-
| Term | What it is |
|
|
148
|
-
| --- | --- |
|
|
149
|
-
| **MCP connection** | A link between a Picked project and an AI tool, over the Model Context Protocol. The dashboard calls this **MCP connections**. |
|
|
150
|
-
| **Integration** | A connection between Picked and another service. |
|
|
151
|
-
| **Tag ID** | The identifier of a project, which the template for Google Tag Manager uses. |
|
|
152
|
-
|
|
153
|
-
## Verbs
|
|
154
|
-
|
|
155
|
-
The actions that Picked names, and what each one does. Where an API mutation uses the
|
|
156
|
-
word exactly, the table says so.
|
|
157
|
-
|
|
158
|
-
### You act on the dashboard
|
|
159
|
-
|
|
160
|
-
| Verb | What it does |
|
|
161
|
-
| --- | --- |
|
|
162
|
-
| **Create** | Makes a new record. |
|
|
163
|
-
| **Update** | Changes a record that exists. |
|
|
164
|
-
| **Delete** | Removes a record permanently. You cannot reverse it. |
|
|
165
|
-
| **Publish** | Makes an immutable snapshot of a workspace and serves it to your visitors. |
|
|
166
|
-
| **Archive** | Moves a draft workspace out of the default list. It stays editable. |
|
|
167
|
-
| **Unarchive** | Returns an archived workspace to the default list. |
|
|
168
|
-
| **Duplicate** | Copies a workspace, and everything in it, into a new draft. |
|
|
169
|
-
| **Restore** | Moves the live pointer of a project to an earlier version. It changes no data. |
|
|
170
|
-
| **Preview** | Opens your site with an unpublished workspace applied, for your browser only. |
|
|
171
|
-
| **Invite** | Sends an invitation to join an organization. |
|
|
172
|
-
| **Revoke** | Invalidates an API key or an invitation immediately. |
|
|
173
|
-
| **Install** | Connects an integration to your project. |
|
|
174
|
-
|
|
175
|
-
### Picked acts on a visitor
|
|
176
|
-
|
|
177
|
-
| Verb | What it does |
|
|
178
|
-
| --- | --- |
|
|
179
|
-
| **Allocate** | Puts a visitor in a feature flag. |
|
|
180
|
-
| **Resolve** | Gives a feature flag its bucket for one visitor. The first read resolves it. |
|
|
181
|
-
| **Decide** | Runs the `decide` function of a feature flag. |
|
|
182
|
-
| **Evaluate** | Runs a condition against the current state. |
|
|
183
|
-
| **Invoke** | Calls a predicate from inside a condition. |
|
|
184
|
-
| **Serve** | Sends published content to a visitor. |
|
|
185
|
-
|
|
186
|
-
### Your code acts on the SDK
|
|
187
|
-
|
|
188
|
-
| Verb | What it does |
|
|
189
|
-
| --- | --- |
|
|
190
|
-
| **Register** | Adds a component, an action, a predicate, or a feature flag to the client. |
|
|
191
|
-
| **Start** | Runs the client. `start()` is idempotent. |
|
|
192
|
-
| **Adapt** | Wraps a framework component so the client can render it. |
|
|
193
|
-
| **Serialize** | Builds a snapshot on your server, with `serialize()`. |
|
|
194
|
-
| **Seed** | Gives the client a snapshot, so the first render matches the server. |
|
|
195
|
-
| **Hydrate** | Takes over the server markup in the browser. |
|
|
196
|
-
| **Render** | Puts a component into the page. |
|
|
197
|
-
|
|
198
|
-
## Related
|
|
199
|
-
|
|
200
|
-
- [About how Picked works](/explanation/how-picked-works) — how these parts fit together.
|
|
201
|
-
- [Projects](/reference/dashboard/projects) — the dashboard surface.
|