@picked/client 0.0.1-dev.1788925875333 → 0.0.1-dev.1793753513002

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.
Files changed (226) hide show
  1. package/LICENSE +1 -0
  2. package/README.md +34 -158
  3. package/dist/.tsbuildinfo +1 -1
  4. package/dist/api-ZkaFvphK.cjs +1 -0
  5. package/dist/{api-DbMJli3H.js → api-nJ3O-8r5.js} +1 -1
  6. package/dist/cjs/form/index.js +1 -1
  7. package/dist/cjs/index.js +2 -2
  8. package/dist/cjs/logic-engine.js +1 -0
  9. package/dist/cjs/plugins/dom-observer/index.js +1 -1
  10. package/dist/cjs/plugins/dynamic-experiences/index.js +1 -1
  11. package/dist/cjs/plugins/experience-browser-storage/index.js +1 -1
  12. package/dist/cjs/plugins/responses-browser-storage/index.js +1 -1
  13. package/dist/cjs/plugins/telemetry/index.js +1 -1
  14. package/dist/cjs/server/index.js +1 -1
  15. package/dist/cjs/storage.js +1 -0
  16. package/dist/dom-7g2LZCIp.cjs +1 -0
  17. package/dist/{dom-BqcToNL0.js → dom-v6ulxr_z.js} +1 -5
  18. package/dist/esm/form/index.js +5 -16
  19. package/dist/esm/index.js +576 -615
  20. package/dist/esm/logic-engine.js +208 -0
  21. package/dist/esm/plugins/dom-observer/index.js +1 -1
  22. package/dist/esm/plugins/dynamic-experiences/index.js +4 -4
  23. package/dist/esm/plugins/experience-browser-storage/index.js +12 -10
  24. package/dist/esm/plugins/responses-browser-storage/index.js +2 -6
  25. package/dist/esm/plugins/telemetry/index.js +26 -15
  26. package/dist/esm/preview/index.js +1 -2
  27. package/dist/esm/server/index.js +47 -43
  28. package/dist/esm/storage.js +1 -0
  29. package/dist/experience-instance-4D6Yk-h0.js +774 -0
  30. package/dist/experience-instance-D2FAkiPx.cjs +1 -0
  31. package/dist/plugin-B1kexnbX.js +256 -0
  32. package/dist/plugin-Bnmk8pN8.cjs +1 -0
  33. package/dist/preview-channel-BMOEreho.cjs +1 -0
  34. package/dist/{preview-channel-CSr96XAo.js → preview-channel-CLXVoL_j.js} +2 -5
  35. package/dist/{version-VvasRUfR.js → preview-unavailable-BaHYVZQD.js} +100 -61
  36. package/dist/preview-unavailable-ClBw_DDY.cjs +1 -0
  37. package/dist/provider-BFdnIgeH.cjs +1 -0
  38. package/dist/provider-C98VWkEj.js +115 -0
  39. package/dist/{rules-logic-HesIUCu6.js → rules-logic-9hh8y_1b.js} +1 -1
  40. package/dist/rules-logic-VUbvWqdi.cjs +1 -0
  41. package/dist/types/data-source/preview-unavailable.d.ts +18 -0
  42. package/dist/types/data-source/preview-unavailable.d.ts.map +1 -0
  43. package/dist/types/data-source/provider.d.ts +5 -0
  44. package/dist/types/data-source/provider.d.ts.map +1 -1
  45. package/dist/types/data-source/request-observer.d.ts +21 -8
  46. package/dist/types/data-source/request-observer.d.ts.map +1 -1
  47. package/dist/types/entities/action/action.d.ts +94 -23
  48. package/dist/types/entities/action/action.d.ts.map +1 -1
  49. package/dist/types/entities/experience/experience.d.ts +8 -0
  50. package/dist/types/entities/experience/experience.d.ts.map +1 -1
  51. package/dist/types/entities/experience-instance/experience-instance.d.ts +14 -1
  52. package/dist/types/entities/experience-instance/experience-instance.d.ts.map +1 -1
  53. package/dist/types/exports.d.ts +1 -0
  54. package/dist/types/exports.d.ts.map +1 -1
  55. package/dist/types/index.d.ts +2 -2
  56. package/dist/types/index.d.ts.map +1 -1
  57. package/dist/types/lifecycle/rules-logic.d.ts.map +1 -1
  58. package/dist/types/logic-engine.d.ts +9 -0
  59. package/dist/types/logic-engine.d.ts.map +1 -1
  60. package/dist/types/picked.d.ts +38 -8
  61. package/dist/types/picked.d.ts.map +1 -1
  62. package/dist/types/plugins/dynamic-experiences/index.d.ts +1 -0
  63. package/dist/types/plugins/dynamic-experiences/index.d.ts.map +1 -1
  64. package/dist/types/plugins/dynamic-experiences/plugin.d.ts.map +1 -1
  65. package/dist/types/plugins/dynamic-experiences/types.d.ts +5 -2
  66. package/dist/types/plugins/dynamic-experiences/types.d.ts.map +1 -1
  67. package/dist/types/plugins/experience-browser-storage/plugin.d.ts.map +1 -1
  68. package/dist/types/plugins/telemetry/plugin.d.ts +2 -0
  69. package/dist/types/plugins/telemetry/plugin.d.ts.map +1 -1
  70. package/dist/types/schema-registry.d.ts +34 -0
  71. package/dist/types/schema-registry.d.ts.map +1 -1
  72. package/dist/types/server/serialize.d.ts +1 -0
  73. package/dist/types/server/serialize.d.ts.map +1 -1
  74. package/dist/types/storage.d.ts +6 -0
  75. package/dist/types/storage.d.ts.map +1 -0
  76. package/dist/types/typed-content.d.ts +14 -1
  77. package/dist/types/typed-content.d.ts.map +1 -1
  78. package/dist/types/utils/events.d.ts +4 -0
  79. package/dist/types/utils/events.d.ts.map +1 -1
  80. package/dist/types/utils/node-tree/min-max-steps-to-leaf.d.ts +16 -6
  81. package/dist/types/utils/node-tree/min-max-steps-to-leaf.d.ts.map +1 -1
  82. package/dist/types/utils/node-tree/min-max-steps-to-origin.d.ts +18 -7
  83. package/dist/types/utils/node-tree/min-max-steps-to-origin.d.ts.map +1 -1
  84. package/dist/types/utils/node-tree/next-reachable-step-nodes.d.ts +30 -6
  85. package/dist/types/utils/node-tree/next-reachable-step-nodes.d.ts.map +1 -1
  86. package/dist/types/utils/node-tree/node-adjacency.d.ts +50 -0
  87. package/dist/types/utils/node-tree/node-adjacency.d.ts.map +1 -0
  88. package/dist/types/utils/node-tree/node-tree-index.d.ts +57 -0
  89. package/dist/types/utils/node-tree/node-tree-index.d.ts.map +1 -0
  90. package/dist/types/utils/rules-logic.d.ts +3 -2
  91. package/dist/types/utils/rules-logic.d.ts.map +1 -1
  92. package/dist/types/utils/search-params.d.ts +20 -0
  93. package/dist/types/utils/search-params.d.ts.map +1 -1
  94. package/package.json +39 -13
  95. package/dist/api-qiqq8lgz.cjs +0 -1
  96. package/dist/docs/_root.css +0 -101
  97. package/dist/docs/explanation/conditions-and-the-logic-engine.md +0 -94
  98. package/dist/docs/explanation/content-references.md +0 -99
  99. package/dist/docs/explanation/feature-flag-allocation.md +0 -218
  100. package/dist/docs/explanation/how-picked-works.md +0 -124
  101. package/dist/docs/explanation/how-pickedql-works.md +0 -76
  102. package/dist/docs/explanation/pages-and-flows.md +0 -64
  103. package/dist/docs/explanation/the-content-model.md +0 -87
  104. package/dist/docs/explanation/the-two-apis.md +0 -68
  105. package/dist/docs/explanation/why-server-side-rendering.md +0 -76
  106. package/dist/docs/explanation/workspaces-and-versions.md +0 -71
  107. package/dist/docs/how-to/add-a-step-field-or-action.md +0 -43
  108. package/dist/docs/how-to/analytics/index.md +0 -316
  109. package/dist/docs/how-to/archive-or-delete-a-workspace.md +0 -46
  110. package/dist/docs/how-to/authenticate-the-cli.md +0 -97
  111. package/dist/docs/how-to/authenticate-with-a-magic-link.md +0 -40
  112. package/dist/docs/how-to/authenticate-with-a-password.md +0 -51
  113. package/dist/docs/how-to/authenticate-with-an-api-key.md +0 -51
  114. package/dist/docs/how-to/authenticate-with-oauth.md +0 -40
  115. package/dist/docs/how-to/build-a-flow.md +0 -83
  116. package/dist/docs/how-to/connect-the-mcp-server.md +0 -38
  117. package/dist/docs/how-to/create-a-content-entry.md +0 -48
  118. package/dist/docs/how-to/create-a-project.md +0 -29
  119. package/dist/docs/how-to/create-an-experience.md +0 -42
  120. package/dist/docs/how-to/create-and-revoke-an-api-key.md +0 -42
  121. package/dist/docs/how-to/debug-with-the-chrome-extension.md +0 -57
  122. package/dist/docs/how-to/define-a-page-layout.md +0 -46
  123. package/dist/docs/how-to/fill-and-publish-a-page.md +0 -66
  124. package/dist/docs/how-to/install-the-gtm-template.md +0 -84
  125. package/dist/docs/how-to/install-the-sdk.md +0 -93
  126. package/dist/docs/how-to/install-the-vite-plugin.md +0 -69
  127. package/dist/docs/how-to/invite-and-remove-members.md +0 -34
  128. package/dist/docs/how-to/point-one-entry-at-another.md +0 -61
  129. package/dist/docs/how-to/preview-a-workspace.md +0 -28
  130. package/dist/docs/how-to/publish-a-workspace.md +0 -30
  131. package/dist/docs/how-to/read-a-feature-flag.md +0 -113
  132. package/dist/docs/how-to/read-a-referenced-entry.md +0 -109
  133. package/dist/docs/how-to/register-a-component.md +0 -55
  134. package/dist/docs/how-to/register-an-action-handler.md +0 -67
  135. package/dist/docs/how-to/render-a-step-form.md +0 -131
  136. package/dist/docs/how-to/render-an-unpublished-preview.md +0 -41
  137. package/dist/docs/how-to/reuse-a-section.md +0 -53
  138. package/dist/docs/how-to/reuse-a-step-field-or-action.md +0 -28
  139. package/dist/docs/how-to/roll-back-a-published-version.md +0 -26
  140. package/dist/docs/how-to/run-an-ab-test.md +0 -49
  141. package/dist/docs/how-to/run-code-on-a-form-submission.md +0 -125
  142. package/dist/docs/how-to/server-render-a-page.md +0 -81
  143. package/dist/docs/how-to/set-a-content-security-policy.md +0 -32
  144. package/dist/docs/how-to/set-up-mfa.md +0 -69
  145. package/dist/docs/how-to/switch-workspaces.md +0 -122
  146. package/dist/docs/how-to/upload-and-use-an-asset.mdx +0 -73
  147. package/dist/docs/how-to/validate-a-field.md +0 -52
  148. package/dist/docs/how-to/write-a-condition.md +0 -45
  149. package/dist/docs/how-to/write-a-predicate.md +0 -60
  150. package/dist/docs/index.md +0 -59
  151. package/dist/docs/reference/dashboard/actions.mdx +0 -53
  152. package/dist/docs/reference/dashboard/api-keys.mdx +0 -38
  153. package/dist/docs/reference/dashboard/conditions.mdx +0 -42
  154. package/dist/docs/reference/dashboard/content/asset-library.mdx +0 -63
  155. package/dist/docs/reference/dashboard/content/blocks.mdx +0 -57
  156. package/dist/docs/reference/dashboard/content/content-entries.mdx +0 -95
  157. package/dist/docs/reference/dashboard/content/models.mdx +0 -108
  158. package/dist/docs/reference/dashboard/content/pages.mdx +0 -61
  159. package/dist/docs/reference/dashboard/experiences.mdx +0 -51
  160. package/dist/docs/reference/dashboard/features.mdx +0 -154
  161. package/dist/docs/reference/dashboard/fields.mdx +0 -106
  162. package/dist/docs/reference/dashboard/flow-builder/canvas.mdx +0 -58
  163. package/dist/docs/reference/dashboard/flow-builder/condition-builder.md +0 -57
  164. package/dist/docs/reference/dashboard/flow-builder/keyboard-shortcuts.md +0 -72
  165. package/dist/docs/reference/dashboard/flow-builder/nodes.md +0 -63
  166. package/dist/docs/reference/dashboard/projects.mdx +0 -44
  167. package/dist/docs/reference/dashboard/reports.mdx +0 -43
  168. package/dist/docs/reference/dashboard/steps.mdx +0 -37
  169. package/dist/docs/reference/dashboard/team-management.md +0 -29
  170. package/dist/docs/reference/dashboard/workspace-versioning.mdx +0 -30
  171. package/dist/docs/reference/dashboard/workspaces.mdx +0 -76
  172. package/dist/docs/reference/delivery-api/experience-content.md +0 -152
  173. package/dist/docs/reference/delivery-api/index.md +0 -45
  174. package/dist/docs/reference/delivery-api/preview-caching-crawling.md +0 -79
  175. package/dist/docs/reference/delivery-api/project-config.md +0 -65
  176. package/dist/docs/reference/delivery-api/workspace-schema.md +0 -85
  177. package/dist/docs/reference/glossary.md +0 -181
  178. package/dist/docs/reference/management-api/authentication.md +0 -74
  179. package/dist/docs/reference/management-api/authorization-and-scopes.md +0 -285
  180. package/dist/docs/reference/management-api/error-handling.md +0 -233
  181. package/dist/docs/reference/management-api/pagination.md +0 -192
  182. package/dist/docs/reference/pickedql/data-sources.md +0 -174
  183. package/dist/docs/reference/pickedql/dimensions.md +0 -103
  184. package/dist/docs/reference/pickedql/filtering.md +0 -64
  185. package/dist/docs/reference/pickedql/index.md +0 -18
  186. package/dist/docs/reference/pickedql/schema.md +0 -172
  187. package/dist/docs/reference/pickedql/virtual-functions.md +0 -248
  188. package/dist/docs/reference/sdk/actions.md +0 -30
  189. package/dist/docs/reference/sdk/analytics-events.md +0 -445
  190. package/dist/docs/reference/sdk/conditions.md +0 -147
  191. package/dist/docs/reference/sdk/content-security-policy.md +0 -21
  192. package/dist/docs/reference/sdk/content.md +0 -213
  193. package/dist/docs/reference/sdk/experiences.md +0 -51
  194. package/dist/docs/reference/sdk/features.md +0 -256
  195. package/dist/docs/reference/sdk/fields.md +0 -255
  196. package/dist/docs/reference/sdk/index.md +0 -68
  197. package/dist/docs/reference/sdk/plugins/create-experience.md +0 -123
  198. package/dist/docs/reference/sdk/plugins/dynamic-experiences.md +0 -74
  199. package/dist/docs/reference/sdk/plugins/index.md +0 -29
  200. package/dist/docs/reference/sdk/plugins/window-object.md +0 -25
  201. package/dist/docs/reference/sdk/predicates.md +0 -43
  202. package/dist/docs/reference/sdk/ssr/index.md +0 -33
  203. package/dist/docs/reference/sdk/ssr/rendering-and-hydration.md +0 -103
  204. package/dist/docs/reference/sdk/ssr/serialize.md +0 -80
  205. package/dist/docs/reference/sdk/ssr/slots-and-placements.md +0 -59
  206. package/dist/docs/reference/sdk/steps.md +0 -86
  207. package/dist/docs/reference/sdk/type-generation.md +0 -196
  208. package/dist/docs/reference/tools/chrome-extension.md +0 -16
  209. package/dist/docs/reference/tools/cli.md +0 -146
  210. package/dist/docs/reference/tools/image-optimisation-service.md +0 -104
  211. package/dist/docs/reference/tools/mcp.md +0 -90
  212. package/dist/docs/reference/tools/vite-plugin.md +0 -163
  213. package/dist/docs/tutorials/first-api-call.md +0 -228
  214. package/dist/docs/tutorials/first-experience-in-the-dashboard.mdx +0 -143
  215. package/dist/docs/tutorials/first-experience.mdx +0 -254
  216. package/dist/docs/tutorials/first-server-rendered-page.mdx +0 -186
  217. package/dist/dom-DlLH3FxV.cjs +0 -1
  218. package/dist/experience-instance-DGk11d8a.js +0 -563
  219. package/dist/experience-instance-Dej3P1sE.cjs +0 -1
  220. package/dist/plugin-BcLaCLm1.cjs +0 -1
  221. package/dist/plugin-De_BJSwE.js +0 -194
  222. package/dist/preview-channel-Cx0e6fye.cjs +0 -1
  223. package/dist/provider-C_9u0yGJ.cjs +0 -1
  224. package/dist/provider-ovM-CBX_.js +0 -98
  225. package/dist/rules-logic-CGZIYgAI.cjs +0 -1
  226. package/dist/version-BvLZaTMC.cjs +0 -1
@@ -1,83 +0,0 @@
1
- ---
2
- type: how-to
3
- layout: docs
4
- ---
5
-
6
- # How to build a flow
7
-
8
- This guide shows you how to put a flow together on the canvas. You need an experience
9
- first. See [How to create an experience](/how-to/create-an-experience).
10
-
11
- ## Add nodes
12
-
13
- Drag a step, an action, or a condition from the library onto the canvas. A new
14
- node appears where you drop it.
15
-
16
- You can also drop a block directly onto an arrow that is there already. The flow
17
- builder puts the node into the line. The first arrow splits into two arrows, with the
18
- new node between them. A **+** indicator appears when you hold the pointer over a
19
- valid arrow.
20
-
21
- ## Connect nodes
22
-
23
- Click the output handle of a node, on the right side. Drag to the input handle of
24
- another node, on the left side. An arrow then joins the two nodes.
25
-
26
- The flow follows the arrows from left to right, and it starts at the origin. Every
27
- node after the origin is part of the experience flow.
28
-
29
- ## Branch with conditions
30
-
31
- Connect the origin, or any other node, to a condition node. The condition evaluates
32
- its rule and sends the flow down one of two paths.
33
-
34
- Connect the green handle, for a true result, to the nodes that must run when the
35
- condition holds. Connect the red handle, for a false result, to the other path. Each
36
- path can lead to more steps, more actions, and more conditions.
37
-
38
- ## Assign fields to steps
39
-
40
- Drag a field from the library onto a step node and drop it. That step then
41
- holds the field.
42
-
43
- You can assign more than one field to one step. The step node gives the number of
44
- assigned fields. To see which fields it holds, choose the step. Then read the **Fields**
45
- section in the inspector.
46
-
47
- ## Choose nodes
48
-
49
- Click a node to choose it. Its inspector opens in the right panel.
50
-
51
- Drag on empty canvas to choose every node inside a rectangle. Press `Cmd/Ctrl+A` to
52
- choose every node.
53
-
54
- When you choose more than one node, the inspector gives a count and a list in groups.
55
- Click an item in that list to open its inspector.
56
-
57
- ## Move nodes
58
-
59
- Drag a node to move it. Each node snaps to the grid.
60
-
61
- Use the arrow keys to move a node a small distance. Hold `Shift` to move it further.
62
-
63
- ## Delete nodes
64
-
65
- Choose one or more nodes. Press `Delete` or `Backspace`. The flow builder removes
66
- those nodes and every arrow that joins them.
67
-
68
- ## Duplicate nodes
69
-
70
- Choose one or more nodes. Press `Cmd/Ctrl+D`. A copy of each node appears next to the
71
- first one.
72
-
73
- ## Undo and redo
74
-
75
- Press `Cmd/Ctrl+Z` to undo. Press `Cmd/Ctrl+Shift+Z` to redo. The undo stack records
76
- each node that you add, each node that you delete, each connection, and each move.
77
-
78
- ## Related
79
-
80
- - [Canvas](/reference/dashboard/flow-builder/canvas) — the panels and the view controls.
81
- - [Nodes](/reference/dashboard/flow-builder/nodes) — every node type.
82
- - [Keyboard shortcuts](/reference/dashboard/flow-builder/keyboard-shortcuts)
83
- - [About how Picked works](/explanation/how-picked-works) — why a flow is a graph.
@@ -1,38 +0,0 @@
1
- ---
2
- type: how-to
3
- layout: docs
4
- ---
5
-
6
- # How to connect the MCP server
7
-
8
- This guide shows you how to control your Picked workspace from an AI tool that writes
9
- code. The server URL is `https://api.picked.app/mcp`.
10
-
11
- ## Claude Desktop
12
-
13
- 1. Open **Settings > Connectors > Add custom connector**.
14
- 2. Set **Name** to `Picked`.
15
- 3. Set **URL** to `https://api.picked.app/mcp`.
16
- 4. Click **Connect**.
17
- 5. Answer the authorization prompt.
18
-
19
- ## Claude Code, Cursor, Windsurf, and others
20
-
21
- Add `.mcp.json` to the root of your repository:
22
-
23
- ```json
24
- {
25
- "mcpServers": {
26
- "picked": {
27
- "type": "http",
28
- "url": "https://api.picked.app/mcp"
29
- }
30
- }
31
- }
32
- ```
33
-
34
- Cursor reads the same content from `.cursor/mcp.json`.
35
-
36
- ## Related
37
-
38
- - [MCP server](/reference/tools/mcp) — every tool that the server gives you.
@@ -1,48 +0,0 @@
1
- ---
2
- type: how-to
3
- layout: docs
4
- ---
5
-
6
- # How to create a content entry
7
-
8
- This guide shows you how to make one instance of a Model and fill it with data. You need
9
- a Model first. See [How to define a page layout](/how-to/define-a-page-layout).
10
-
11
- A Page makes its own entry when you create the page. Use this guide for the content that
12
- no Page and no Step owns, such as an author or a product.
13
-
14
- ## 1. Open the entries list
15
-
16
- 1. Open your workspace.
17
- 2. Click **CMS** in the sidebar.
18
- 3. Click **Content entries**.
19
-
20
- ## 2. Create the entry
21
-
22
- 1. Click **New content**.
23
- 2. Choose the **Model** for the entry.
24
- 3. Fill in each field. The form comes from the schema of the Model.
25
- 4. Click **Create entry**.
26
-
27
- The Model is fixed when you create the entry. To move content to another Model, make a
28
- new entry and copy the values across.
29
-
30
- ## 3. Correct every error
31
-
32
- An invalid field shows an error next to it while you edit. The error carries the path to
33
- the exact field. Correct each one before you publish, because Picked serves valid content
34
- only.
35
-
36
- ## Find an entry again
37
-
38
- The entries list shows a title for each entry. The title is the first single-line text
39
- field of the entry. It shows the entry id when no such field holds a value.
40
-
41
- Use the **Model** filter to narrow the list to one Model.
42
-
43
- ## Related
44
-
45
- - [Content entries](/reference/dashboard/content/content-entries) — the editor reference.
46
- - [Models](/reference/dashboard/content/models) — every field type.
47
- - [How to point one entry at another](/how-to/point-one-entry-at-another)
48
- - [How to publish a workspace](/how-to/publish-a-workspace)
@@ -1,29 +0,0 @@
1
- ---
2
- type: how-to
3
- layout: docs
4
- ---
5
-
6
- # How to create a project
7
-
8
- This guide shows you how to add a project. A project is one site or one application, and
9
- it holds its own experiences, content, and options.
10
-
11
- ## Steps
12
-
13
- 1. Open your organization.
14
- 2. Click **New project**.
15
- 3. Enter a name.
16
- 4. Click **Create project**.
17
-
18
- The project home page opens. It shows your SDK snippet and the setup tasks that are still
19
- open.
20
-
21
- ## Next
22
-
23
- Copy the snippet and add it to your site. See
24
- [How to install the SDK](/how-to/install-the-sdk).
25
-
26
- ## Related
27
-
28
- - [Projects](/reference/dashboard/projects) — the project surface.
29
- - [Add Picked to your application](/tutorials/first-experience) — the whole path.
@@ -1,42 +0,0 @@
1
- ---
2
- type: how-to
3
- layout: docs
4
- ---
5
-
6
- # How to create an experience
7
-
8
- An experience is a Flow or a Page. This guide adds a **Flow**: the interactive kind, of
9
- more than one step, which the browser renders. A **Page** is the standalone kind that your
10
- server renders for a search engine, and
11
- [How to fill and publish a page](/how-to/fill-and-publish-a-page) covers it.
12
-
13
- [About pages and flows](/explanation/pages-and-flows) sets out the difference, and which
14
- kind a piece of work needs.
15
-
16
- ## Steps
17
-
18
- 1. Open your project.
19
- 2. Click **Flows** in the sidebar. The experiences list opens.
20
- 3. Click **New experience**.
21
- 4. Enter a name.
22
- 5. Leave **Type** on the **Flow** option.
23
- 6. Open **Advanced**.
24
- 7. Enter a component name. It must match a component that you register in your
25
- application.
26
- 8. Click **Create flow**.
27
-
28
- The flow editor opens with an empty canvas.
29
-
30
- ## Set the options
31
-
32
- Click the canvas background to open the experience inspector.
33
-
34
- - **Condition** — the experience starts only for a visitor who matches it. Keep it blank
35
- to start for every visitor.
36
- - **Initialize Open** — the experience opens by itself when the page loads.
37
-
38
- ## Related
39
-
40
- - [How to build a flow](/how-to/build-a-flow) — add your first node.
41
- - [About pages and flows](/explanation/pages-and-flows) — Page or Flow.
42
- - [Experiences](/reference/dashboard/experiences) — every option.
@@ -1,42 +0,0 @@
1
- ---
2
- type: how-to
3
- layout: docs
4
- ---
5
-
6
- # How to create and revoke an API key
7
-
8
- This guide shows you how to give your code access to the Picked API. Use a key where your
9
- own code calls the API, such as a server-side integration.
10
-
11
- An API key does not sign the [CLI](/reference/tools/cli) in. The CLI reads a session, which
12
- `picked login` writes. See
13
- [How to authenticate the CLI](/how-to/authenticate-the-cli) for the commands that CI can
14
- run without one.
15
-
16
- ## Create a key
17
-
18
- 1. Open your organization.
19
- 2. Click **API Keys**.
20
- 3. Click **Create API Key**.
21
- 4. Enter a **Name**, such as `Production key`.
22
- 5. Set **Project** to one project. The default, **All projects**, gives the key every
23
- project.
24
- 6. Choose the **Permissions** that your integration needs.
25
- 7. Click **Create API Key**.
26
-
27
- :::warning
28
- Copy the key immediately. The dashboard does not show it again.
29
- :::
30
-
31
- ## Revoke a key
32
-
33
- 1. Open the API keys list.
34
- 2. Click **Revoke** next to the key.
35
- 3. Click **Revoke Key** to confirm.
36
-
37
- Picked invalidates the key immediately. No later request can use it.
38
-
39
- ## Related
40
-
41
- - [API keys](/reference/dashboard/api-keys) — the scopes.
42
- - [Authentication](/reference/management-api/authentication) — how to send the key.
@@ -1,57 +0,0 @@
1
- ---
2
- type: how-to
3
- layout: docs
4
- ---
5
-
6
- # How to debug with the Chrome extension
7
-
8
- This guide shows you how to add a Picked panel to Chrome DevTools and check your
9
- integration on any page that runs the SDK.
10
-
11
- ## 1. Install the extension
12
-
13
- Install it from the
14
- [Chrome Web Store](https://chromewebstore.google.com/detail/picked-developer-tools/nimmdamgnhlhdpngnalkpmnleebngidh).
15
-
16
- ## 2. Add the devtools plugin
17
-
18
- ```typescript
19
- import { createClient } from 'picked'
20
- import { svelteDevtoolsPlugin } from '@picked/svelte/plugins/devtools'
21
-
22
- const picked = createClient({
23
- projectId: 'your-project-id',
24
- plugins: [svelteDevtoolsPlugin()],
25
- })
26
- ```
27
-
28
- The extension then connects to the SDK.
29
-
30
- ## 3. Add a tool of your own
31
-
32
- A custom tool is a framework-adapted component, and it receives the live Picked client
33
- exactly as an experience component does.
34
-
35
- ```typescript
36
- import { adaptReactComponent } from '@picked/react'
37
- import { svelteDevtoolsPlugin } from '@picked/svelte/plugins/devtools'
38
- import MyTool from './MyTool'
39
-
40
- const picked = createClient({
41
- projectId: 'your-project-id',
42
- plugins: [
43
- svelteDevtoolsPlugin({
44
- customTools: [
45
- { id: 'my-tool', label: 'My Tool', component: adaptReactComponent(MyTool) },
46
- ],
47
- }),
48
- ],
49
- })
50
- ```
51
-
52
- Your tools appear under a **Custom Tools** tab. In React use `usePicked()`, and in Svelte
53
- use `getPicked()`.
54
-
55
- ## Related
56
-
57
- - [Chrome extension](/reference/tools/chrome-extension) — the panel reference.
@@ -1,46 +0,0 @@
1
- ---
2
- type: how-to
3
- layout: docs
4
- ---
5
-
6
- # How to define a page layout
7
-
8
- This guide shows you how to define the shape of a page. A page layout sets which fields a
9
- page can hold, and it holds no data itself.
10
-
11
- ## Steps
12
-
13
- 1. Open your workspace.
14
- 2. Click **Pages** in the sidebar, then **Page Layouts**.
15
- 3. Click **New model**.
16
- 4. Set **Category** to **Page layout**.
17
- 5. Enter a **Name** and a **Key**. The key is stable, and your SDK code and your API
18
- calls both use it.
19
- 6. Add your fields. Choose a type for each one.
20
- 7. Click **Create model**.
21
-
22
- The category is fixed when you create the Model. You cannot change it later.
23
-
24
- ## Make a field repeatable
25
-
26
- Turn on **repeatable** on any field. It then renders as a sortable list of values. Use it
27
- for a gallery, or for a list of features.
28
-
29
- ## Group related fields
30
-
31
- Add a **Group** field to hold a set of fields under one key. Make the group repeatable to
32
- describe a list of objects, such as a list of feature cards.
33
-
34
- ## Define content with no layout role
35
-
36
- A Model needs no category. Leave **Category** as **None (general content)** for content
37
- that no Page and no Step renders, such as an author or a product. Reach such a Model
38
- under **CMS** in the sidebar, and point at its entries with a **Reference** field.
39
-
40
- ## Related
41
-
42
- - [About the content model](/explanation/the-content-model) — why the schema and the data
43
- are separate.
44
- - [Models](/reference/dashboard/content/models) — every field type.
45
- - [How to reuse a section](/how-to/reuse-a-section)
46
- - [How to point one entry at another](/how-to/point-one-entry-at-another)
@@ -1,66 +0,0 @@
1
- ---
2
- type: how-to
3
- layout: docs
4
- ---
5
-
6
- # How to fill and publish a page
7
-
8
- This guide shows you how to make a server-rendered Page and put content in it. You need a
9
- page layout first. See [How to define a page layout](/how-to/define-a-page-layout).
10
-
11
- ## 1. Create the page
12
-
13
- 1. Open your project.
14
- 2. Choose a workspace.
15
- 3. Click **Pages** in the sidebar.
16
- 4. Click **New experience**.
17
- 5. Choose the **Page** type.
18
- 6. Choose a page layout.
19
- 7. Click **Create page**.
20
-
21
- Picked makes a content entry and links it to the page on the first save.
22
-
23
- ## 2. Fill in the content
24
-
25
- 1. Open the **Properties** tab.
26
- 2. Fill in each field. The inspector on the right edits the field that you choose.
27
- 3. Watch the preview panel as the page fills in.
28
-
29
- ## 3. Correct every error
30
-
31
- An invalid field shows an error next to it while you edit. Correct each one before you
32
- publish. Picked serves valid content only.
33
-
34
- ## 4. Choose the status
35
-
36
- Open the **Settings** tab and set the status.
37
-
38
- - Set **Active** to serve the page to everyone.
39
- - Set **Draft** to keep the page out of the published site. Picked serves a
40
- draft page through a preview link, and to nobody else.
41
-
42
- Use **Draft** for a page that is ready to review but not ready to be public.
43
- When you publish the workspace, Picked releases your other changes and leaves
44
- that page staged.
45
-
46
- ## 5. Publish
47
-
48
- Publish the workspace to apply your changes to the live site. See
49
- [How to publish a workspace](/how-to/publish-a-workspace).
50
-
51
- When you publish the workspace, Picked does not make a draft page public. To
52
- make that page public, set the status to **Active** and publish the workspace
53
- again.
54
-
55
- ## Change the layout later
56
-
57
- Use the change-layout control on the **Settings** tab. When you unlink a layout, Picked
58
- separates the content entry from the page. It deletes no entry, but the page then has no
59
- content to render.
60
-
61
- ## Related
62
-
63
- - [About pages and flows](/explanation/pages-and-flows) — when to choose a Page.
64
- - [Your first server-rendered page](/tutorials/first-server-rendered-page) — the whole
65
- path, with the SDK.
66
- - [Pages](/reference/dashboard/content/pages) — the editor reference.
@@ -1,84 +0,0 @@
1
- ---
2
- type: how-to
3
- layout: docs
4
- ---
5
-
6
- # How to install the GTM template
7
-
8
- This guide shows you how to track an ecommerce event in Google Tag Manager and send it to
9
- Picked. You need a GTM container and your Picked Tag ID.
10
-
11
- ## Automatic installation
12
-
13
- Install the template from the GTM Community Gallery:
14
-
15
- 1. In Tag Manager, click **Templates**.
16
- 2. In the **Tag Templates** section, click **Search Gallery**.
17
- 3. Search for `Picked Ecommerce`.
18
- 4. Click the Picked Ecommerce template to read its detail.
19
- 5. Click the **Add to workspace** button.
20
- 6. Read the permissions that it needs.
21
- 7. Click **Add**.
22
-
23
- ![The Picked Ecommerce template in the GTM Community Gallery](/gtm/picked-ecommerce-gtm.png)
24
-
25
- ## Manual installation
26
-
27
- To import the template file yourself:
28
-
29
- 1. Download the
30
- [template file](https://github.com/picked-app/gtm-template/blob/main/template.tpl)
31
- from GitHub with the download icon.
32
- 2. In Google Tag Manager, go to **Templates**.
33
- 3. Click **New**.
34
- 4. Open the three-dot menu.
35
- 5. Click **Import**.
36
- 6. Choose the file that you downloaded.
37
- 7. Click **Save**.
38
-
39
- ## Setup
40
-
41
- ### 1. Create a Tag ID variable
42
-
43
- Sign in to the [Picked Dashboard](https://dashboard.picked.app) and copy the Tag ID of
44
- your project. Save it as a constant variable in GTM, for example `Picked Tag ID`.
45
-
46
- ![How to create a variable in GTM for the Picked Tag ID](/gtm/gtm-variable.png)
47
-
48
- ### 2. Create an ecommerce data variable
49
-
50
- Create a **Data Layer Variable** with the variable name `ecommerce`. It captures what
51
- GA4 Enhanced Ecommerce writes to the data layer.
52
-
53
- ![The variable for the data layer of GA4 Enhanced Ecommerce](/gtm/gtm-ecommerce-variable.png)
54
-
55
- ### 3. Create event triggers
56
-
57
- Add a trigger for each ecommerce event that you want to track, for example
58
- `add_to_cart`, `purchase`, or `view_item`.
59
-
60
- ![The event triggers that record an ecommerce event](/gtm/gtm-triggers.png)
61
-
62
- ### 4. Create tags
63
-
64
- Create a new tag for each event. Choose the tag template called **Picked Ecommerce**. Assign
65
- the trigger that matches. Then set the options below.
66
-
67
- ![The tags that use the Picked Ecommerce template](/gtm/gtm-tags.png)
68
-
69
- ## Options
70
-
71
- | Option | Description |
72
- | --- | --- |
73
- | **Tag ID** | The Tag ID of your Picked project. Find it in the [Picked Dashboard](https://dashboard.picked.app). |
74
- | **Event** | The ecommerce event to track, for example `add_to_cart` or `purchase`. |
75
- | **Send ecommerce data** | Turn this on to send the data from GA4 Enhanced Ecommerce to Picked. Turn it on for every ecommerce event. |
76
- | **GA4 Enhanced Ecommerce Data** | The GTM variable that holds the data from GA4 Enhanced Ecommerce. Use the data layer variable from step 2. |
77
- | **Additional data** | An optional GTM variable, for more metadata with the event. |
78
-
79
- ![The options on a Picked Ecommerce tag](/gtm/gtm-tag.png)
80
-
81
- ## Related
82
-
83
- - [About how Picked works](/explanation/how-picked-works) — what Picked does with the
84
- event.
@@ -1,93 +0,0 @@
1
- ---
2
- type: how-to
3
- layout: docs
4
- ---
5
-
6
- # How to install the SDK
7
-
8
- This guide shows you how to add the Picked client to a web application. You need a project
9
- ID from the dashboard.
10
-
11
- ## 1. Install the packages
12
-
13
- :::code-group
14
-
15
- ```bash [React]
16
- npm install picked @picked/react
17
- ```
18
-
19
- ```bash [Svelte]
20
- npm install picked @picked/svelte
21
- ```
22
-
23
- :::
24
-
25
- `picked` gives you the client, the `picked.config` helpers, and the `picked` command. Your
26
- package manager adds `@picked/client` with it, which carries the runtime and holds the
27
- generated types.
28
-
29
- ## 2. Add `picked.config.ts`
30
-
31
- Create this file in the root of your project. The `picked` command and the
32
- [Vite plugin](/reference/tools/vite-plugin) read your project identity from it:
33
-
34
- ```typescript
35
- import { defineConfig } from 'picked/config'
36
-
37
- export default defineConfig({
38
- projectId: 'your-project-id',
39
- })
40
- ```
41
-
42
- [Type generation](/reference/sdk/type-generation) reads this file, and gives your fields,
43
- features and steps the types the workspace declares.
44
-
45
- ## 3. Create and start the client
46
-
47
- :::code-group
48
-
49
- ```tsx [React]
50
- import { createClient } from 'picked'
51
- import { dynamicExperiencesPlugin } from '@picked/client/plugins/dynamic-experiences'
52
- import { reactFrameworkPlugin } from '@picked/react/plugins/framework'
53
-
54
- export const picked = createClient({
55
- projectId: 'your-project-id',
56
- plugins: [reactFrameworkPlugin({ components: {} }), dynamicExperiencesPlugin()],
57
- })
58
-
59
- picked.start()
60
- ```
61
-
62
- ```ts [Svelte]
63
- import { createClient } from 'picked'
64
- import { dynamicExperiencesPlugin } from '@picked/client/plugins/dynamic-experiences'
65
- import { svelteFrameworkPlugin } from '@picked/svelte/plugins/framework'
66
-
67
- export const picked = createClient({
68
- projectId: 'your-project-id',
69
- plugins: [svelteFrameworkPlugin({ components: {} }), dynamicExperiencesPlugin()],
70
- })
71
-
72
- picked.start()
73
- ```
74
-
75
- :::
76
-
77
- `picked` carries the client's root entry. Each deeper import path, such as
78
- `@picked/client/plugins/dynamic-experiences` and `@picked/client/server`, keeps its own
79
- name.
80
-
81
- `start()` is idempotent. A second call changes nothing on a client that started already.
82
-
83
- ## 4. Add the optional plugins
84
-
85
- - `windowObjectPlugin()` puts the client on `window.Picked`, which helps when you debug.
86
- - `singlePageAppPlugin()` starts the client again on a history event.
87
-
88
- ## Related
89
-
90
- - [Add Picked to your application](/tutorials/first-experience) — the whole path.
91
- - [SDK installation](/reference/sdk) — every client option.
92
- - [Type generation](/reference/sdk/type-generation) — types from your workspace.
93
- - [How to register a component](/how-to/register-a-component).