@picked/client 0.0.1-dev.1788925875333 → 0.0.1-next.1

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 (439) hide show
  1. package/README.md +8 -0
  2. package/dist/cjs/index.js +1 -4
  3. package/dist/cjs/plugins/create-experience/index.js +1 -1
  4. package/dist/cjs/plugins/experience-browserstorage-plugin/index.js +1 -0
  5. package/dist/cjs/plugins/history-browserstorage-plugin/index.js +1 -0
  6. package/dist/cjs/plugins/responses-browserstorage-plugin/index.js +1 -0
  7. package/dist/cjs/plugins/responses-indexeddb-plugin/index.js +1 -0
  8. package/dist/cjs/plugins/shopify/index.js +1 -0
  9. package/dist/cjs/plugins/single-page-app/index.js +1 -1
  10. package/dist/cjs/plugins/window-object/index.js +1 -1
  11. package/dist/cjs/server/index.js +1 -1
  12. package/dist/esm/index.js +733 -1814
  13. package/dist/esm/plugins/create-experience/index.js +398 -490
  14. package/dist/esm/plugins/experience-browserstorage-plugin/index.js +38 -0
  15. package/dist/esm/plugins/history-browserstorage-plugin/index.js +26 -0
  16. package/dist/esm/plugins/responses-browserstorage-plugin/index.js +36 -0
  17. package/dist/esm/plugins/responses-indexeddb-plugin/index.js +101 -0
  18. package/dist/esm/plugins/shopify/index.js +59 -0
  19. package/dist/esm/plugins/single-page-app/index.js +35 -31
  20. package/dist/esm/plugins/window-object/index.js +9 -9
  21. package/dist/esm/server/index.js +89 -141
  22. package/dist/experience-instance-6ZKZS7dF.cjs +1 -0
  23. package/dist/experience-instance-BA0EXYg5.js +712 -0
  24. package/dist/id-BKIWbSTy.cjs +1 -0
  25. package/dist/id-BW-g3y32.js +6 -0
  26. package/dist/logger-BsmHUUw1.cjs +1 -0
  27. package/dist/logger-C9a75KZn.js +5 -0
  28. package/dist/object-BbFTsGh3.cjs +1 -0
  29. package/dist/object-JwZ58NOH.js +28 -0
  30. package/dist/storage-BPJwmlva.cjs +1 -0
  31. package/dist/storage-D87xFySf.js +85 -0
  32. package/dist/supports-BvrzQAVk.js +79 -0
  33. package/dist/supports-C0y3-V5V.cjs +1 -0
  34. package/dist/types/client.d.ts +23 -119
  35. package/dist/types/client.d.ts.map +1 -1
  36. package/dist/types/entities/component/component.d.ts +6 -45
  37. package/dist/types/entities/component/component.d.ts.map +1 -1
  38. package/dist/types/entities/experience/experience.d.ts +99 -152
  39. package/dist/types/entities/experience/experience.d.ts.map +1 -1
  40. package/dist/types/entities/experience-instance/experience-instance.d.ts +113 -83
  41. package/dist/types/entities/experience-instance/experience-instance.d.ts.map +1 -1
  42. package/dist/types/entities/feature/feature.d.ts +8 -118
  43. package/dist/types/entities/feature/feature.d.ts.map +1 -1
  44. package/dist/types/entities/field/field.d.ts +64 -96
  45. package/dist/types/entities/field/field.d.ts.map +1 -1
  46. package/dist/types/entities/framework/framework.d.ts +7 -32
  47. package/dist/types/entities/framework/framework.d.ts.map +1 -1
  48. package/dist/types/entities/history/history.d.ts +6 -6
  49. package/dist/types/entities/history/history.d.ts.map +1 -1
  50. package/dist/types/entities/plugin/plugin.d.ts +2 -41
  51. package/dist/types/entities/plugin/plugin.d.ts.map +1 -1
  52. package/dist/types/entities/predicate/predicate.d.ts +7 -30
  53. package/dist/types/entities/predicate/predicate.d.ts.map +1 -1
  54. package/dist/types/entities/project/project.d.ts +9 -0
  55. package/dist/types/entities/project/project.d.ts.map +1 -0
  56. package/dist/types/entities/response/response.d.ts +21 -57
  57. package/dist/types/entities/response/response.d.ts.map +1 -1
  58. package/dist/types/exports.d.ts +4 -22
  59. package/dist/types/exports.d.ts.map +1 -1
  60. package/dist/types/index.d.ts +3 -12
  61. package/dist/types/index.d.ts.map +1 -1
  62. package/dist/types/logic-engine.d.ts +11 -13
  63. package/dist/types/logic-engine.d.ts.map +1 -1
  64. package/dist/types/picked.d.ts +184 -381
  65. package/dist/types/picked.d.ts.map +1 -1
  66. package/dist/types/ping.d.ts +10 -0
  67. package/dist/types/ping.d.ts.map +1 -0
  68. package/dist/types/plugins/create-experience/create-experience.d.ts +44 -119
  69. package/dist/types/plugins/create-experience/create-experience.d.ts.map +1 -1
  70. package/dist/types/plugins/create-experience/index.d.ts +2 -2
  71. package/dist/types/plugins/create-experience/index.d.ts.map +1 -1
  72. package/dist/types/plugins/create-experience/plugin.d.ts +2 -3
  73. package/dist/types/plugins/create-experience/plugin.d.ts.map +1 -1
  74. package/dist/types/plugins/create-experience/serialization.d.ts.map +1 -1
  75. package/dist/types/plugins/experience-browserstorage-plugin/index.d.ts.map +1 -0
  76. package/dist/types/plugins/experience-browserstorage-plugin/plugin.d.ts +6 -0
  77. package/dist/types/plugins/experience-browserstorage-plugin/plugin.d.ts.map +1 -0
  78. package/dist/types/plugins/history-browserstorage-plugin/index.d.ts.map +1 -0
  79. package/dist/types/plugins/{history-browser-storage → history-browserstorage-plugin}/plugin.d.ts +1 -2
  80. package/dist/types/plugins/history-browserstorage-plugin/plugin.d.ts.map +1 -0
  81. package/dist/types/plugins/responses-browserstorage-plugin/index.d.ts.map +1 -0
  82. package/dist/types/plugins/responses-browserstorage-plugin/plugin.d.ts +6 -0
  83. package/dist/types/plugins/responses-browserstorage-plugin/plugin.d.ts.map +1 -0
  84. package/dist/types/plugins/responses-indexeddb-plugin/index.d.ts.map +1 -0
  85. package/dist/types/plugins/responses-indexeddb-plugin/plugin.d.ts +3 -0
  86. package/dist/types/plugins/responses-indexeddb-plugin/plugin.d.ts.map +1 -0
  87. package/dist/types/plugins/shopify/index.d.ts +2 -0
  88. package/dist/types/plugins/shopify/index.d.ts.map +1 -0
  89. package/dist/types/plugins/shopify/plugin.d.ts +3 -0
  90. package/dist/types/plugins/shopify/plugin.d.ts.map +1 -0
  91. package/dist/types/plugins/shopify/shopify.d.ts +28 -0
  92. package/dist/types/plugins/shopify/shopify.d.ts.map +1 -0
  93. package/dist/types/plugins/single-page-app/plugin.d.ts +2 -2
  94. package/dist/types/plugins/single-page-app/plugin.d.ts.map +1 -1
  95. package/dist/types/plugins/window-object/plugin.d.ts +2 -2
  96. package/dist/types/server/index.d.ts +3 -18
  97. package/dist/types/server/index.d.ts.map +1 -1
  98. package/dist/types/utils/dom.d.ts +6 -4
  99. package/dist/types/utils/dom.d.ts.map +1 -1
  100. package/dist/types/utils/events.d.ts +38 -83
  101. package/dist/types/utils/events.d.ts.map +1 -1
  102. package/dist/types/utils/global-obj.d.ts +2 -1
  103. package/dist/types/utils/global-obj.d.ts.map +1 -1
  104. package/dist/types/utils/id.d.ts.map +1 -1
  105. package/dist/types/utils/indexed-db.d.ts +1 -2
  106. package/dist/types/utils/indexed-db.d.ts.map +1 -1
  107. package/dist/types/utils/logger.d.ts +1 -2
  108. package/dist/types/utils/logger.d.ts.map +1 -1
  109. package/dist/types/utils/node-tree/get-next-node-from-conditional.d.ts +3 -0
  110. package/dist/types/utils/node-tree/get-next-node-from-conditional.d.ts.map +1 -0
  111. package/dist/types/utils/node-tree/get-next-node.d.ts +1 -1
  112. package/dist/types/utils/node-tree/get-next-node.d.ts.map +1 -1
  113. package/dist/types/utils/node-tree/get-origin-node.d.ts +1 -1
  114. package/dist/types/utils/node-tree/get-origin-node.d.ts.map +1 -1
  115. package/dist/types/utils/node-tree/min-max-steps-to-leaf.d.ts +1 -1
  116. package/dist/types/utils/node-tree/min-max-steps-to-leaf.d.ts.map +1 -1
  117. package/dist/types/utils/node-tree/min-max-steps-to-origin.d.ts +1 -1
  118. package/dist/types/utils/node-tree/min-max-steps-to-origin.d.ts.map +1 -1
  119. package/dist/types/utils/node-tree/next-reachable-step-nodes.d.ts +1 -1
  120. package/dist/types/utils/node-tree/next-reachable-step-nodes.d.ts.map +1 -1
  121. package/dist/types/utils/nodes.d.ts +2 -3
  122. package/dist/types/utils/nodes.d.ts.map +1 -1
  123. package/dist/types/utils/object.d.ts +8 -0
  124. package/dist/types/utils/object.d.ts.map +1 -1
  125. package/dist/types/utils/rules-logic.d.ts +3 -33
  126. package/dist/types/utils/rules-logic.d.ts.map +1 -1
  127. package/dist/types/utils/search-params.d.ts.map +1 -1
  128. package/dist/types/utils/state-snaphot.d.ts +16 -0
  129. package/dist/types/utils/state-snaphot.d.ts.map +1 -0
  130. package/dist/types/utils/storage.d.ts +11 -374
  131. package/dist/types/utils/storage.d.ts.map +1 -1
  132. package/dist/types/utils/supports.d.ts +0 -87
  133. package/dist/types/utils/supports.d.ts.map +1 -1
  134. package/package.json +49 -182
  135. package/dist/.tsbuildinfo +0 -1
  136. package/dist/api-DbMJli3H.js +0 -22
  137. package/dist/api-qiqq8lgz.cjs +0 -1
  138. package/dist/cjs/form/index.js +0 -1
  139. package/dist/cjs/plugins/dom-observer/index.js +0 -1
  140. package/dist/cjs/plugins/dynamic-experiences/index.js +0 -1
  141. package/dist/cjs/plugins/experience-browser-storage/index.js +0 -1
  142. package/dist/cjs/plugins/history-browser-storage/index.js +0 -1
  143. package/dist/cjs/plugins/responses-browser-storage/index.js +0 -1
  144. package/dist/cjs/plugins/responses-indexeddb/index.js +0 -1
  145. package/dist/cjs/plugins/telemetry/index.js +0 -1
  146. package/dist/cjs/plugins/web-components/index.js +0 -1
  147. package/dist/cjs/preview/index.js +0 -1
  148. package/dist/docs/_root.css +0 -101
  149. package/dist/docs/explanation/conditions-and-the-logic-engine.md +0 -94
  150. package/dist/docs/explanation/content-references.md +0 -99
  151. package/dist/docs/explanation/feature-flag-allocation.md +0 -218
  152. package/dist/docs/explanation/how-picked-works.md +0 -124
  153. package/dist/docs/explanation/how-pickedql-works.md +0 -76
  154. package/dist/docs/explanation/pages-and-flows.md +0 -64
  155. package/dist/docs/explanation/the-content-model.md +0 -87
  156. package/dist/docs/explanation/the-two-apis.md +0 -68
  157. package/dist/docs/explanation/why-server-side-rendering.md +0 -76
  158. package/dist/docs/explanation/workspaces-and-versions.md +0 -71
  159. package/dist/docs/how-to/add-a-step-field-or-action.md +0 -43
  160. package/dist/docs/how-to/analytics/index.md +0 -316
  161. package/dist/docs/how-to/archive-or-delete-a-workspace.md +0 -46
  162. package/dist/docs/how-to/authenticate-the-cli.md +0 -97
  163. package/dist/docs/how-to/authenticate-with-a-magic-link.md +0 -40
  164. package/dist/docs/how-to/authenticate-with-a-password.md +0 -51
  165. package/dist/docs/how-to/authenticate-with-an-api-key.md +0 -51
  166. package/dist/docs/how-to/authenticate-with-oauth.md +0 -40
  167. package/dist/docs/how-to/build-a-flow.md +0 -83
  168. package/dist/docs/how-to/connect-the-mcp-server.md +0 -38
  169. package/dist/docs/how-to/create-a-content-entry.md +0 -48
  170. package/dist/docs/how-to/create-a-project.md +0 -29
  171. package/dist/docs/how-to/create-an-experience.md +0 -42
  172. package/dist/docs/how-to/create-and-revoke-an-api-key.md +0 -42
  173. package/dist/docs/how-to/debug-with-the-chrome-extension.md +0 -57
  174. package/dist/docs/how-to/define-a-page-layout.md +0 -46
  175. package/dist/docs/how-to/fill-and-publish-a-page.md +0 -66
  176. package/dist/docs/how-to/install-the-gtm-template.md +0 -84
  177. package/dist/docs/how-to/install-the-sdk.md +0 -93
  178. package/dist/docs/how-to/install-the-vite-plugin.md +0 -69
  179. package/dist/docs/how-to/invite-and-remove-members.md +0 -34
  180. package/dist/docs/how-to/point-one-entry-at-another.md +0 -61
  181. package/dist/docs/how-to/preview-a-workspace.md +0 -28
  182. package/dist/docs/how-to/publish-a-workspace.md +0 -30
  183. package/dist/docs/how-to/read-a-feature-flag.md +0 -113
  184. package/dist/docs/how-to/read-a-referenced-entry.md +0 -109
  185. package/dist/docs/how-to/register-a-component.md +0 -55
  186. package/dist/docs/how-to/register-an-action-handler.md +0 -67
  187. package/dist/docs/how-to/render-a-step-form.md +0 -131
  188. package/dist/docs/how-to/render-an-unpublished-preview.md +0 -41
  189. package/dist/docs/how-to/reuse-a-section.md +0 -53
  190. package/dist/docs/how-to/reuse-a-step-field-or-action.md +0 -28
  191. package/dist/docs/how-to/roll-back-a-published-version.md +0 -26
  192. package/dist/docs/how-to/run-an-ab-test.md +0 -49
  193. package/dist/docs/how-to/run-code-on-a-form-submission.md +0 -125
  194. package/dist/docs/how-to/server-render-a-page.md +0 -81
  195. package/dist/docs/how-to/set-a-content-security-policy.md +0 -32
  196. package/dist/docs/how-to/set-up-mfa.md +0 -69
  197. package/dist/docs/how-to/switch-workspaces.md +0 -122
  198. package/dist/docs/how-to/upload-and-use-an-asset.mdx +0 -73
  199. package/dist/docs/how-to/validate-a-field.md +0 -52
  200. package/dist/docs/how-to/write-a-condition.md +0 -45
  201. package/dist/docs/how-to/write-a-predicate.md +0 -60
  202. package/dist/docs/index.md +0 -59
  203. package/dist/docs/reference/dashboard/actions.mdx +0 -53
  204. package/dist/docs/reference/dashboard/api-keys.mdx +0 -38
  205. package/dist/docs/reference/dashboard/conditions.mdx +0 -42
  206. package/dist/docs/reference/dashboard/content/asset-library.mdx +0 -63
  207. package/dist/docs/reference/dashboard/content/blocks.mdx +0 -57
  208. package/dist/docs/reference/dashboard/content/content-entries.mdx +0 -95
  209. package/dist/docs/reference/dashboard/content/models.mdx +0 -108
  210. package/dist/docs/reference/dashboard/content/pages.mdx +0 -61
  211. package/dist/docs/reference/dashboard/experiences.mdx +0 -51
  212. package/dist/docs/reference/dashboard/features.mdx +0 -154
  213. package/dist/docs/reference/dashboard/fields.mdx +0 -106
  214. package/dist/docs/reference/dashboard/flow-builder/canvas.mdx +0 -58
  215. package/dist/docs/reference/dashboard/flow-builder/condition-builder.md +0 -57
  216. package/dist/docs/reference/dashboard/flow-builder/keyboard-shortcuts.md +0 -72
  217. package/dist/docs/reference/dashboard/flow-builder/nodes.md +0 -63
  218. package/dist/docs/reference/dashboard/projects.mdx +0 -44
  219. package/dist/docs/reference/dashboard/reports.mdx +0 -43
  220. package/dist/docs/reference/dashboard/steps.mdx +0 -37
  221. package/dist/docs/reference/dashboard/team-management.md +0 -29
  222. package/dist/docs/reference/dashboard/workspace-versioning.mdx +0 -30
  223. package/dist/docs/reference/dashboard/workspaces.mdx +0 -76
  224. package/dist/docs/reference/delivery-api/experience-content.md +0 -152
  225. package/dist/docs/reference/delivery-api/index.md +0 -45
  226. package/dist/docs/reference/delivery-api/preview-caching-crawling.md +0 -79
  227. package/dist/docs/reference/delivery-api/project-config.md +0 -65
  228. package/dist/docs/reference/delivery-api/workspace-schema.md +0 -85
  229. package/dist/docs/reference/glossary.md +0 -181
  230. package/dist/docs/reference/management-api/authentication.md +0 -74
  231. package/dist/docs/reference/management-api/authorization-and-scopes.md +0 -285
  232. package/dist/docs/reference/management-api/error-handling.md +0 -233
  233. package/dist/docs/reference/management-api/pagination.md +0 -192
  234. package/dist/docs/reference/pickedql/data-sources.md +0 -174
  235. package/dist/docs/reference/pickedql/dimensions.md +0 -103
  236. package/dist/docs/reference/pickedql/filtering.md +0 -64
  237. package/dist/docs/reference/pickedql/index.md +0 -18
  238. package/dist/docs/reference/pickedql/schema.md +0 -172
  239. package/dist/docs/reference/pickedql/virtual-functions.md +0 -248
  240. package/dist/docs/reference/sdk/actions.md +0 -30
  241. package/dist/docs/reference/sdk/analytics-events.md +0 -445
  242. package/dist/docs/reference/sdk/conditions.md +0 -147
  243. package/dist/docs/reference/sdk/content-security-policy.md +0 -21
  244. package/dist/docs/reference/sdk/content.md +0 -213
  245. package/dist/docs/reference/sdk/experiences.md +0 -51
  246. package/dist/docs/reference/sdk/features.md +0 -256
  247. package/dist/docs/reference/sdk/fields.md +0 -255
  248. package/dist/docs/reference/sdk/index.md +0 -68
  249. package/dist/docs/reference/sdk/plugins/create-experience.md +0 -123
  250. package/dist/docs/reference/sdk/plugins/dynamic-experiences.md +0 -74
  251. package/dist/docs/reference/sdk/plugins/index.md +0 -29
  252. package/dist/docs/reference/sdk/plugins/window-object.md +0 -25
  253. package/dist/docs/reference/sdk/predicates.md +0 -43
  254. package/dist/docs/reference/sdk/ssr/index.md +0 -33
  255. package/dist/docs/reference/sdk/ssr/rendering-and-hydration.md +0 -103
  256. package/dist/docs/reference/sdk/ssr/serialize.md +0 -80
  257. package/dist/docs/reference/sdk/ssr/slots-and-placements.md +0 -59
  258. package/dist/docs/reference/sdk/steps.md +0 -86
  259. package/dist/docs/reference/sdk/type-generation.md +0 -196
  260. package/dist/docs/reference/tools/chrome-extension.md +0 -16
  261. package/dist/docs/reference/tools/cli.md +0 -146
  262. package/dist/docs/reference/tools/image-optimisation-service.md +0 -104
  263. package/dist/docs/reference/tools/mcp.md +0 -90
  264. package/dist/docs/reference/tools/vite-plugin.md +0 -163
  265. package/dist/docs/tutorials/first-api-call.md +0 -228
  266. package/dist/docs/tutorials/first-experience-in-the-dashboard.mdx +0 -143
  267. package/dist/docs/tutorials/first-experience.mdx +0 -254
  268. package/dist/docs/tutorials/first-server-rendered-page.mdx +0 -186
  269. package/dist/dom-BqcToNL0.js +0 -82
  270. package/dist/dom-DlLH3FxV.cjs +0 -1
  271. package/dist/emit-D-tLiWL1.cjs +0 -1
  272. package/dist/emit-Ds2EG7CB.js +0 -14
  273. package/dist/esm/form/index.js +0 -565
  274. package/dist/esm/plugins/dom-observer/index.js +0 -87
  275. package/dist/esm/plugins/dynamic-experiences/index.js +0 -5
  276. package/dist/esm/plugins/experience-browser-storage/index.js +0 -38
  277. package/dist/esm/plugins/history-browser-storage/index.js +0 -26
  278. package/dist/esm/plugins/responses-browser-storage/index.js +0 -71
  279. package/dist/esm/plugins/responses-indexeddb/index.js +0 -89
  280. package/dist/esm/plugins/telemetry/index.js +0 -100
  281. package/dist/esm/plugins/web-components/index.js +0 -19
  282. package/dist/esm/preview/index.js +0 -2
  283. package/dist/experience-instance-DGk11d8a.js +0 -563
  284. package/dist/experience-instance-Dej3P1sE.cjs +0 -1
  285. package/dist/id-Bo4RBeOs.js +0 -4
  286. package/dist/id-Js-62re-.cjs +0 -1
  287. package/dist/inert-script-report-B_bMPRzp.js +0 -18
  288. package/dist/inert-script-report-ijRHPtcY.cjs +0 -1
  289. package/dist/logger-CSTvAyyB.cjs +0 -1
  290. package/dist/logger-DMN6TxJJ.js +0 -4
  291. package/dist/object-BUDGxEqy.js +0 -25
  292. package/dist/object-CIkt7Fkr.cjs +0 -1
  293. package/dist/plugin-BcLaCLm1.cjs +0 -1
  294. package/dist/plugin-De_BJSwE.js +0 -194
  295. package/dist/preview-channel-CSr96XAo.js +0 -98
  296. package/dist/preview-channel-Cx0e6fye.cjs +0 -1
  297. package/dist/protocol-Bb_vpLKE.cjs +0 -1
  298. package/dist/protocol-C5KkkiZc.js +0 -84
  299. package/dist/provider-C_9u0yGJ.cjs +0 -1
  300. package/dist/provider-ovM-CBX_.js +0 -98
  301. package/dist/registry-C1t8l3t9.cjs +0 -1
  302. package/dist/registry-CXZv0uLg.js +0 -18
  303. package/dist/rules-logic-CGZIYgAI.cjs +0 -1
  304. package/dist/rules-logic-HesIUCu6.js +0 -13
  305. package/dist/storage-1MW3-_As.js +0 -103
  306. package/dist/storage-DUw9UJ2h.cjs +0 -1
  307. package/dist/supports-CO9bJGNl.js +0 -92
  308. package/dist/supports-DBzjGaWD.cjs +0 -1
  309. package/dist/types/data-source/api.d.ts +0 -60
  310. package/dist/types/data-source/api.d.ts.map +0 -1
  311. package/dist/types/data-source/provider.d.ts +0 -103
  312. package/dist/types/data-source/provider.d.ts.map +0 -1
  313. package/dist/types/data-source/registry.d.ts +0 -26
  314. package/dist/types/data-source/registry.d.ts.map +0 -1
  315. package/dist/types/data-source/request-observer.d.ts +0 -62
  316. package/dist/types/data-source/request-observer.d.ts.map +0 -1
  317. package/dist/types/data-source/virtual-data.d.ts +0 -19
  318. package/dist/types/data-source/virtual-data.d.ts.map +0 -1
  319. package/dist/types/entities/action/action.d.ts +0 -85
  320. package/dist/types/entities/action/action.d.ts.map +0 -1
  321. package/dist/types/entities/component/lazyComponent.d.ts +0 -11
  322. package/dist/types/entities/component/lazyComponent.d.ts.map +0 -1
  323. package/dist/types/entities/condition/condition.d.ts +0 -29
  324. package/dist/types/entities/condition/condition.d.ts.map +0 -1
  325. package/dist/types/entities/content/content.d.ts +0 -53
  326. package/dist/types/entities/content/content.d.ts.map +0 -1
  327. package/dist/types/entities/content/reference.d.ts +0 -101
  328. package/dist/types/entities/content/reference.d.ts.map +0 -1
  329. package/dist/types/entities/field/policies.d.ts +0 -35
  330. package/dist/types/entities/field/policies.d.ts.map +0 -1
  331. package/dist/types/entities/response/response-validation.d.ts +0 -75
  332. package/dist/types/entities/response/response-validation.d.ts.map +0 -1
  333. package/dist/types/entities/session/session.d.ts +0 -46
  334. package/dist/types/entities/session/session.d.ts.map +0 -1
  335. package/dist/types/entities/step/step.d.ts +0 -56
  336. package/dist/types/entities/step/step.d.ts.map +0 -1
  337. package/dist/types/form/build-responses.d.ts +0 -18
  338. package/dist/types/form/build-responses.d.ts.map +0 -1
  339. package/dist/types/form/create-field-evaluator.d.ts +0 -28
  340. package/dist/types/form/create-field-evaluator.d.ts.map +0 -1
  341. package/dist/types/form/create-field-validation.d.ts +0 -60
  342. package/dist/types/form/create-field-validation.d.ts.map +0 -1
  343. package/dist/types/form/create-form.d.ts +0 -153
  344. package/dist/types/form/create-form.d.ts.map +0 -1
  345. package/dist/types/form/create-submit-pipeline.d.ts +0 -116
  346. package/dist/types/form/create-submit-pipeline.d.ts.map +0 -1
  347. package/dist/types/form/get-step-fields.d.ts +0 -19
  348. package/dist/types/form/get-step-fields.d.ts.map +0 -1
  349. package/dist/types/form/index.d.ts +0 -11
  350. package/dist/types/form/index.d.ts.map +0 -1
  351. package/dist/types/lifecycle/condition-selection.d.ts +0 -146
  352. package/dist/types/lifecycle/condition-selection.d.ts.map +0 -1
  353. package/dist/types/lifecycle/lifecycle.d.ts +0 -48
  354. package/dist/types/lifecycle/lifecycle.d.ts.map +0 -1
  355. package/dist/types/lifecycle/rules-logic.d.ts +0 -25
  356. package/dist/types/lifecycle/rules-logic.d.ts.map +0 -1
  357. package/dist/types/lifecycle/state-snapshot.d.ts +0 -38
  358. package/dist/types/lifecycle/state-snapshot.d.ts.map +0 -1
  359. package/dist/types/plugins/dom-observer/index.d.ts +0 -3
  360. package/dist/types/plugins/dom-observer/index.d.ts.map +0 -1
  361. package/dist/types/plugins/dom-observer/plugin.d.ts +0 -50
  362. package/dist/types/plugins/dom-observer/plugin.d.ts.map +0 -1
  363. package/dist/types/plugins/dynamic-experiences/hash.d.ts +0 -105
  364. package/dist/types/plugins/dynamic-experiences/hash.d.ts.map +0 -1
  365. package/dist/types/plugins/dynamic-experiences/index.d.ts +0 -7
  366. package/dist/types/plugins/dynamic-experiences/index.d.ts.map +0 -1
  367. package/dist/types/plugins/dynamic-experiences/plugin.d.ts +0 -49
  368. package/dist/types/plugins/dynamic-experiences/plugin.d.ts.map +0 -1
  369. package/dist/types/plugins/dynamic-experiences/types.d.ts +0 -45
  370. package/dist/types/plugins/dynamic-experiences/types.d.ts.map +0 -1
  371. package/dist/types/plugins/experience-browser-storage/index.d.ts.map +0 -1
  372. package/dist/types/plugins/experience-browser-storage/plugin.d.ts +0 -7
  373. package/dist/types/plugins/experience-browser-storage/plugin.d.ts.map +0 -1
  374. package/dist/types/plugins/history-browser-storage/index.d.ts.map +0 -1
  375. package/dist/types/plugins/history-browser-storage/plugin.d.ts.map +0 -1
  376. package/dist/types/plugins/responses-browser-storage/index.d.ts.map +0 -1
  377. package/dist/types/plugins/responses-browser-storage/plugin.d.ts +0 -18
  378. package/dist/types/plugins/responses-browser-storage/plugin.d.ts.map +0 -1
  379. package/dist/types/plugins/responses-indexeddb/index.d.ts.map +0 -1
  380. package/dist/types/plugins/responses-indexeddb/plugin.d.ts +0 -3
  381. package/dist/types/plugins/responses-indexeddb/plugin.d.ts.map +0 -1
  382. package/dist/types/plugins/telemetry/emit.d.ts +0 -18
  383. package/dist/types/plugins/telemetry/emit.d.ts.map +0 -1
  384. package/dist/types/plugins/telemetry/index.d.ts +0 -4
  385. package/dist/types/plugins/telemetry/index.d.ts.map +0 -1
  386. package/dist/types/plugins/telemetry/plugin-summary.d.ts +0 -10
  387. package/dist/types/plugins/telemetry/plugin-summary.d.ts.map +0 -1
  388. package/dist/types/plugins/telemetry/plugin.d.ts +0 -45
  389. package/dist/types/plugins/telemetry/plugin.d.ts.map +0 -1
  390. package/dist/types/plugins/web-components/index.d.ts +0 -2
  391. package/dist/types/plugins/web-components/index.d.ts.map +0 -1
  392. package/dist/types/plugins/web-components/plugin.d.ts +0 -4
  393. package/dist/types/plugins/web-components/plugin.d.ts.map +0 -1
  394. package/dist/types/preview/index.d.ts +0 -18
  395. package/dist/types/preview/index.d.ts.map +0 -1
  396. package/dist/types/preview-bridge/index.d.ts +0 -14
  397. package/dist/types/preview-bridge/index.d.ts.map +0 -1
  398. package/dist/types/preview-channel.d.ts +0 -16
  399. package/dist/types/preview-channel.d.ts.map +0 -1
  400. package/dist/types/preview-receiver/apply-ops.d.ts +0 -32
  401. package/dist/types/preview-receiver/apply-ops.d.ts.map +0 -1
  402. package/dist/types/preview-receiver/index.d.ts +0 -32
  403. package/dist/types/preview-receiver/index.d.ts.map +0 -1
  404. package/dist/types/preview-receiver/protocol.d.ts +0 -69
  405. package/dist/types/preview-receiver/protocol.d.ts.map +0 -1
  406. package/dist/types/schema-registry.d.ts +0 -206
  407. package/dist/types/schema-registry.d.ts.map +0 -1
  408. package/dist/types/server/serialize.d.ts +0 -87
  409. package/dist/types/server/serialize.d.ts.map +0 -1
  410. package/dist/types/typed-content.d.ts +0 -17
  411. package/dist/types/typed-content.d.ts.map +0 -1
  412. package/dist/types/utils/client-telemetry.d.ts +0 -25
  413. package/dist/types/utils/client-telemetry.d.ts.map +0 -1
  414. package/dist/types/utils/content-path.d.ts +0 -37
  415. package/dist/types/utils/content-path.d.ts.map +0 -1
  416. package/dist/types/utils/html-asset-value.d.ts +0 -20
  417. package/dist/types/utils/html-asset-value.d.ts.map +0 -1
  418. package/dist/types/utils/inert-script-report.d.ts +0 -40
  419. package/dist/types/utils/inert-script-report.d.ts.map +0 -1
  420. package/dist/types/utils/node-tree/get-next-node-from-action.d.ts +0 -25
  421. package/dist/types/utils/node-tree/get-next-node-from-action.d.ts.map +0 -1
  422. package/dist/types/utils/node-tree/get-next-node-from-condition.d.ts +0 -17
  423. package/dist/types/utils/node-tree/get-next-node-from-condition.d.ts.map +0 -1
  424. package/dist/types/utils/picked-config.d.ts +0 -39
  425. package/dist/types/utils/picked-config.d.ts.map +0 -1
  426. package/dist/types/utils/preview-session.d.ts +0 -12
  427. package/dist/types/utils/preview-session.d.ts.map +0 -1
  428. package/dist/types/utils/rehydrate-scripts.d.ts +0 -50
  429. package/dist/types/utils/rehydrate-scripts.d.ts.map +0 -1
  430. package/dist/types/utils/render-string.d.ts +0 -24
  431. package/dist/types/utils/render-string.d.ts.map +0 -1
  432. package/dist/types/utils/user-timing.d.ts +0 -21
  433. package/dist/types/utils/user-timing.d.ts.map +0 -1
  434. package/dist/version-BvLZaTMC.cjs +0 -1
  435. package/dist/version-VvasRUfR.js +0 -256
  436. /package/dist/types/plugins/{experience-browser-storage → experience-browserstorage-plugin}/index.d.ts +0 -0
  437. /package/dist/types/plugins/{history-browser-storage → history-browserstorage-plugin}/index.d.ts +0 -0
  438. /package/dist/types/plugins/{responses-browser-storage → responses-browserstorage-plugin}/index.d.ts +0 -0
  439. /package/dist/types/plugins/{responses-indexeddb → responses-indexeddb-plugin}/index.d.ts +0 -0
@@ -1,445 +0,0 @@
1
- ---
2
- type: reference
3
- layout: docs
4
- ---
5
-
6
- # Analytics events
7
-
8
- The Picked SDK sends an analytics event for each action of a visitor. This page names every
9
- event type, every interaction type, and every schema that the SDK sends.
10
-
11
- Two terms carry the page:
12
-
13
- - An **event type** is the name of the event. It is the `event_type` column in PickedQL.
14
- - A **context** is a block of data that the SDK attaches to an event. Picked makes a
15
- column from each one. An example is the `product_list` context behind `dim_product`.
16
-
17
- Every table below marks a context as **always attached** or as **attached when available**.
18
- The SDK attaches a context in the second group only when it has the data at that moment.
19
- An event outside an experience has no `experience` context.
20
-
21
- :::warning
22
- A PickedQL filter on a name that does not exist gives an empty result set and not an error.
23
- Take each name from this page.
24
- :::
25
-
26
- ## Contexts on every event
27
-
28
- The tracker attaches two contexts to every event: `app`, with the project ID, and
29
- `deployment`, with the environment of the SDK. It also attaches `cvly_x`, but only for a
30
- site on Vercel.
31
-
32
- The tables below never list `deployment` or `cvly_x`. They list `app` only where the
33
- tracker of that event attaches it a second time.
34
-
35
- ## Event types
36
-
37
- ### Experience events
38
-
39
- The analytics plugin sends these events. They come from the client SDK, and they need no
40
- code of yours.
41
-
42
- | Event type | When it fires | Always attached | Attached when available |
43
- | --- | --- | --- | --- |
44
- | `app_load` | The SDK loads on the page. | `feature_list`, `session` | `experience`, `step` |
45
- | `app_initialize` | The SDK completes its start-up and is ready. | `feature_list`, `session` | `experience`, `step` |
46
- | `experience_load` | An experience starts. | `experience`, `feature_list`, `session` | `step` |
47
- | `app_open` | An experience becomes visible to the visitor. | `feature_list`, `session` | `experience`, `step` |
48
- | `app_close` | An experience stops to be visible. | `feature_list`, `session` | `experience`, `step` |
49
- | `feature_decide` | A feature flag gets its bucket for this visitor. | `feature_list`, `session` | `experience`, `step` |
50
-
51
- ### Step and form events
52
-
53
- The analytics plugin sends `step_enter`, `step_submit`, `step_submit_success`,
54
- `form_submit`, `form_submit_success`, `form_submit_error`, and `field_validation_error`. The
55
- SDK has a tracker for `step_submit_error` and `step_complete`, but it starts neither of
56
- them. Call the tracker from your own code.
57
-
58
- | Event type | When it fires | Always attached | Attached when available |
59
- | --- | --- | --- | --- |
60
- | `step_enter` | The visitor arrives at a step of a flow. | `feature_list`, `session`, `step` | `experience`, `field_list` |
61
- | `step_submit` | The visitor submits a step. | `feature_list`, `session`, `step` | `experience`, `field_list`, `response_list` |
62
- | `step_submit_success` | The step submission is accepted. | `feature_list`, `session`, `step` | `experience`, `field_list`, `response_list` |
63
- | `step_submit_error` | A step submission fails. Your code sends it. | `exception`, `feature_list`, `session`, `step` | `experience`, `field_list`, `response_list` |
64
- | `step_complete` | A step reaches its end state. Your code sends it. | `feature_list`, `session`, `step` | `experience`, `field_list`, `response_list` |
65
- | `form_submit` | The visitor submits a form. | `feature_list`, `form`, `session` | `experience`, `step` |
66
- | `form_submit_success` | The form submission is accepted. | `feature_list`, `form`, `session` | `experience`, `step` |
67
- | `form_submit_error` | The form submission fails. The reason is in `exception`. | `exception`, `feature_list`, `form`, `session` | `experience`, `step` |
68
- | `field_validation_error` | A field value fails a validation rule. | `exception`, `feature_list`, `session` | `experience`, `form`, `step` |
69
-
70
- ### Ecommerce events
71
-
72
- Three sources send these events: the template for Google Tag Manager, the Picked app for
73
- Shopify, and your own code. The template for Google Tag Manager sends every event of this
74
- group. "Shopify behaviour" below covers the Picked app for Shopify.
75
-
76
- | Event type | When it fires | Always attached | Attached when available |
77
- | --- | --- | --- | --- |
78
- | `cart_add` | A product goes into the cart. | `app`, `feature_list`, `product_list`, `session` | `experience`, `step` |
79
- | `cart_remove` | A product leaves the cart. | `app`, `feature_list`, `product_list`, `session` | `experience`, `step` |
80
- | `checkout_start` | The visitor starts a checkout. | `app`, `feature_list`, `product_list`, `session` | `experience`, `step` |
81
- | `checkout_complete` | The visitor completes a checkout. It is the default conversion of PickedQL. | `app`, `feature_list`, `order`, `product_list`, `session` | `experience`, `step` |
82
- | `order_create` | An order becomes a record in the store. | `app`, `feature_list`, `order`, `product_list`, `session` | `experience`, `step` |
83
- | `product_list_view` | The visitor sees a list of products, such as a collection. | `app`, `feature_list`, `product_list`, `session` | `experience`, `step` |
84
- | `product_select` | The visitor chooses a product from a list. | `feature_list`, `product_list`, `session` | `experience`, `step` |
85
- | `product_view_details` | The visitor opens the detail page of a product. | `app`, `feature_list`, `product_list`, `session` | `experience`, `step` |
86
- | `search_results_list_view` | The visitor sees a list of search results. | `feature_list`, `product_list`, `session` | `experience`, `step` |
87
- | `recommendation_present` | A step shows a recommendation to the visitor. | `feature_list`, `product_list`, `session` | `experience`, `step` |
88
- | `wishlist_add` | A product goes onto a wishlist. | `feature_list`, `product_list`, `session` | `experience`, `step` |
89
- | `waitlist_join` | The visitor joins a waitlist. | `app`, `feature_list`, `session` | `experience`, `product_list`, `step` |
90
-
91
- `is_purchase` is 1 for `checkout_complete` and 0 for every other event. `is_cart_add` is 1
92
- for `cart_add`. Both columns are on `events` and on `metrics`.
93
-
94
- #### Shopify behaviour
95
-
96
- The Picked app for Shopify sends a part of this group from a web pixel, and one event from
97
- the server.
98
-
99
- | Picked event | Shopify source |
100
- | --- | --- |
101
- | `cart_add` | The `product_added_to_cart` pixel event. The `product_list` context holds the one cart line, and not the whole cart. |
102
- | `cart_remove` | The `product_removed_from_cart` pixel event, with the same one cart line. |
103
- | `checkout_start` | The `checkout_started` pixel event. The `session` context also gets `shopify_checkout_token`. |
104
- | `checkout_complete` | The `checkout_completed` pixel event. The `order` context is there only when the checkout has an order. |
105
- | `order_create` | The `orders/create` webhook, from the server and not the browser. The event time is the creation time of the order. |
106
- | `product_list_view` | The `collection_viewed` pixel event. |
107
- | `product_view_details` | The `product_viewed` pixel event, for one product variant. |
108
- | `page_view` | The `page_viewed` pixel event. |
109
- | `identify` | The `picked:session` pixel event. |
110
-
111
- For a Shopify store, the `session` context also holds `shopify_client_id`,
112
- `shopify_customer_id`, and `shopify_checkout_token`. The `order` context holds the Shopify
113
- `checkout_token` and `cart_token`. The Shopify pixel sends no other event type of this page.
114
-
115
- ### Page and session events
116
-
117
- | Event type | When it fires | Always attached | Attached when available |
118
- | --- | --- | --- | --- |
119
- | `page_view` | The visitor opens a page. | `app`, `feature_list`, `session` | `experience`, `product_list`, `step` |
120
- | `identify` | The SDK connects the session to a known person or store client. | `app`, `session` | `experience`, `feature_list`, `step` |
121
- | `lead_capture` | The visitor gives contact details. | `feature_list`, `session` | `experience`, `step` |
122
- | `modal_open` | A modal opens. | `feature_list`, `modal`, `session` | `experience`, `step` |
123
- | `modal_close` | A modal closes. | `feature_list`, `modal`, `session` | `experience`, `step` |
124
-
125
- ## Custom events
126
-
127
- A custom event takes its name from you, and not from the list above. Its `event_type` is
128
- the name that you give it, so a query for it uses that name.
129
-
130
- Two routes send one:
131
-
132
- - A `data-picked-<interaction>` attribute on an element. An element with
133
- `data-picked-click="add_to_cart"` sends an `add_to_cart` event on a click.
134
- - The `custom` message of the template for Google Tag Manager, with a name of your choice.
135
-
136
- A custom event always carries `app` and `session`. It also carries `element`, `exception`,
137
- `experience`, `feature_list`, `field_list`, `form`, `modal`, `order`, `product_list`,
138
- `response_list`, and `step` when the data is available.
139
-
140
- ## Interaction types
141
-
142
- An interaction event is a DOM event of the visitor. Its name is also an `event_type` value,
143
- so a query for a click reads `WHERE event_type = 'click'`.
144
-
145
- :::warning
146
- `interaction_type` in PickedQL is a different column. It holds the label of the element
147
- behind the event, and it falls back to `event_type` when the event has no element. A filter
148
- on `interaction_type = 'click'` therefore matches only the clicks with no label.
149
- :::
150
-
151
- ### Element interactions
152
-
153
- The SDK binds these listeners to an experience when the `enableInteractionListeners` option
154
- of the analytics plugin names them. The option is off by default.
155
-
156
- | Interaction type | When it fires | Always attached | Attached when available |
157
- | --- | --- | --- | --- |
158
- | `click` | The visitor clicks an element. | `element`, `feature_list`, `session` | `experience`, `step` |
159
- | `rapid_click` | The visitor clicks the same element many times in a short period. | `element`, `feature_list`, `session` | `experience`, `step` |
160
- | `right_click` | The visitor opens the context menu on an element. | `element`, `feature_list`, `session` | `experience`, `step` |
161
- | `copy` | The visitor copies a selection. | `feature_list`, `session` | `element`, `experience`, `step` |
162
- | `paste` | The visitor copies text into a field. | `feature_list`, `session` | `element`, `experience`, `step` |
163
- | `drag` | The visitor drags an element. | `feature_list`, `session` | `element`, `experience`, `step` |
164
- | `backspace` | The visitor deletes a character in a field. | `element`, `feature_list`, `session` | `experience`, `step` |
165
- | `scroll` | The visitor scrolls. | `feature_list`, `session` | `element`, `experience`, `step` |
166
- | `rapid_scroll` | The visitor scrolls up and down fast. | `feature_list`, `session` | `element`, `experience`, `step` |
167
- | `mouse_shake` | The visitor moves the pointer fast from side to side. | `feature_list`, `session` | `experience`, `step` |
168
-
169
- ### Page and network interactions
170
-
171
- The SDK binds these listeners to the document when the `enableDocumentListeners` option of
172
- the analytics plugin is true. The option is off by default.
173
-
174
- | Interaction type | When it fires | Always attached | Attached when available |
175
- | --- | --- | --- | --- |
176
- | `page_visible` | The page becomes visible, such as a return to the tab. | `feature_list`, `session` | `experience`, `step` |
177
- | `page_hidden` | The page stops to be visible. | `feature_list`, `session` | `experience`, `step` |
178
- | `page_show` | The browser shows the page, and also on a return from the cache. | `feature_list`, `session` | `experience`, `step` |
179
- | `page_hide` | The browser hides the page before the visitor goes to a different page. | `feature_list`, `session` | `experience`, `step` |
180
- | `offline` | The browser loses the network. | `feature_list`, `session` | `experience`, `step` |
181
- | `online` | The browser gets the network back. | `feature_list`, `session` | `experience`, `step` |
182
- | `resize` | The window changes size. | `feature_list`, `session` | `experience`, `step` |
183
- | `unload` | The browser closes the document. | `feature_list`, `session` | `experience`, `step` |
184
-
185
- ### Interactions with no listener
186
-
187
- The SDK declares these four types and sends none of them, because it binds no listener for
188
- them. A query on one of them gives an empty result set.
189
-
190
- | Interaction type | When it fires | Always attached | Attached when available |
191
- | --- | --- | --- | --- |
192
- | `back` | Nothing sends it. | `feature_list`, `session` | `experience`, `step` |
193
- | `forward` | Nothing sends it. | `feature_list`, `session` | `experience`, `step` |
194
- | `video_play` | Nothing sends it. | `element`, `feature_list`, `session` | `experience`, `step` |
195
- | `video_pause` | Nothing sends it. | `element`, `feature_list`, `session` | `experience`, `step` |
196
-
197
- ## Schemas
198
-
199
- Each context has a schema. Every schema also accepts a `meta` object for data of your own,
200
- and keeps a property that the schema does not name. The field tables below do not repeat
201
- `meta`.
202
-
203
- | Schema | What it describes |
204
- | --- | --- |
205
- | `answer_list` | The responses of a visitor, under the earlier name of `response_list`. The SDK attaches `response_list`. |
206
- | `app` | The Picked project that the event belongs to. |
207
- | `cvly_funnel` | The version of a Convincely funnel. The SDK attaches it for no event. |
208
- | `cvly_x` | The Vercel deployment behind the site. |
209
- | `deployment` | The deployment and the environment of the SDK. |
210
- | `element` | The HTML element behind an interaction event. |
211
- | `event` | The event itself. It is not a context: it holds the event type and the `event_meta` column. |
212
- | `exception` | The reason for a failure or a validation error. |
213
- | `experience` | The experience that the visitor is in. |
214
- | `feature_list` | Each feature flag of the session, with the bucket of the visitor. |
215
- | `field_list` | The fields of the current step, with their options. |
216
- | `form` | The form behind a form event. |
217
- | `modal` | The modal behind a modal event. |
218
- | `order` | The order behind a purchase. |
219
- | `picked` | The SDK version. The SDK attaches it for no event. |
220
- | `product_list` | The products that the event is about. |
221
- | `question_list` | The fields of a step, under the earlier name of `field_list`. The SDK attaches `field_list`. |
222
- | `recommendation_list` | A list of recommended items. The SDK attaches it for no event. |
223
- | `response_list` | The response of the visitor to each field. |
224
- | `session` | The session, and each identifier that Picked has for it. |
225
- | `step` | The step of the flow that the visitor is on. |
226
-
227
- ### `app`
228
-
229
- | Field | Type | Required | Description |
230
- | --- | --- | --- | --- |
231
- | `project_id` | `string` | Yes | The project ID. |
232
-
233
- ### `deployment`
234
-
235
- | Field | Type | Required | Description |
236
- | --- | --- | --- | --- |
237
- | `env` | `string` | Yes | The environment of the deployment. |
238
- | `id` | `string` or `null` | No | The deployment ID. |
239
- | `sha` | `string` or `null` | No | The Git hash of the deployment. |
240
- | `host` | `string` or `null` | No | The host of the deployment. |
241
-
242
- ### `cvly_x`
243
-
244
- | Field | Type | Required | Description |
245
- | --- | --- | --- | --- |
246
- | `vercel_deployment_id` | `string` | Yes | The Vercel deployment ID. |
247
- | `vercel_env` | `string` | Yes | The Vercel environment. |
248
- | `vercel_url` | `string` | Yes | The URL of the Vercel deployment. |
249
- | `git_commit_sha` | `string` or `null` | No | The Git hash of the deployment. |
250
-
251
- ### `session`
252
-
253
- The `session` schema has no required field. A value is `null` until Picked has it.
254
-
255
- | Field | Type | Required | Description |
256
- | --- | --- | --- | --- |
257
- | `id` | `string` or `null` | No | The session ID. |
258
- | `is_user` | `boolean` or `null` | No | True when Picked attributes the session to a known user. |
259
- | `gaid` | `string` or `null` | No | The client ID from Google Analytics. |
260
- | `shopify_client_id` | `string` or `null` | No | The Shopify client ID. |
261
- | `shopify_customer_id` | `string` or `null` | No | The Shopify customer ID. |
262
- | `shopify_checkout_token` | `string` or `null` | No | The Shopify checkout token. |
263
- | `fingerprintjs_visitor_id` | `string` or `null` | No | The FingerprintJS visitor ID. |
264
-
265
- ### `experience`
266
-
267
- | Field | Type | Required | Description |
268
- | --- | --- | --- | --- |
269
- | `id` | `string` | Yes | The experience ID. |
270
- | `title` | `string` | Yes | The experience title. It is `experience_title` in PickedQL. |
271
- | `type` | `string` or `null` | No | The experience type. |
272
-
273
- ### `step`
274
-
275
- | Field | Type | Required | Description |
276
- | --- | --- | --- | --- |
277
- | `id` | `string` | Yes | The step ID. It is `step_id` in PickedQL. |
278
- | `title` | `string` | Yes | The step title. It is `step_title` in PickedQL. |
279
- | `key` | `string` or `null` | No | The stable key of the step. It does not change between versions. |
280
-
281
- ### `feature_list`
282
-
283
- `items` is a list. Each item describes one feature flag of the session.
284
-
285
- | Field | Type | Required | Description |
286
- | --- | --- | --- | --- |
287
- | `items` | `array` | Yes | One entry for each feature flag. |
288
- | `items[].ab_feature` | `string` | Yes | The feature ID. |
289
- | `items[].ab_name` | `string` | Yes | The feature name. It is `ab_feature_name` in PickedQL. |
290
- | `items[].ab_key` | `string` | Yes | The feature key. |
291
- | `items[].ab_bucket` | `boolean` or `string` | Yes | The bucket of the visitor. It is `ab_feature_value` in PickedQL. |
292
-
293
- ### `field_list`
294
-
295
- | Field | Type | Required | Description |
296
- | --- | --- | --- | --- |
297
- | `items` | `array` | Yes | One entry for each field of the step. |
298
- | `items[].id` | `string` | Yes | The field ID. |
299
- | `items[].type` | `string` | Yes | The field type. |
300
- | `items[].label` | `string` | Yes | The field label. |
301
- | `items[].options` | `array` or `null` | No | The options that the field gives. |
302
- | `items[].options[].id` | `string` | Yes | The option ID. |
303
- | `items[].options[].label` | `string` | Yes | The option label. |
304
- | `items[].options[].value` | `string`, `number`, `boolean`, `object`, `array`, or `null` | Yes | The value behind the option. |
305
-
306
- ### `response_list`
307
-
308
- | Field | Type | Required | Description |
309
- | --- | --- | --- | --- |
310
- | `items` | `array` | Yes | One entry for each field with a response. |
311
- | `items[].field_id` | `string` | Yes | The ID of the field. |
312
- | `items[].values` | `array` | Yes | The values that the visitor gave. |
313
- | `items[].values[].value` | `string`, `number`, `boolean`, `object`, `array`, or `null` | Yes | One response value. |
314
-
315
- ### `form`
316
-
317
- | Field | Type | Required | Description |
318
- | --- | --- | --- | --- |
319
- | `id` | `string` | Yes | The form ID. |
320
- | `title` | `string` or `null` | No | The form title. |
321
-
322
- ### `modal`
323
-
324
- | Field | Type | Required | Description |
325
- | --- | --- | --- | --- |
326
- | `id` | `string` | Yes | The modal ID. |
327
- | `title` | `string` | Yes | The modal title. |
328
-
329
- ### `element`
330
-
331
- | Field | Type | Required | Description |
332
- | --- | --- | --- | --- |
333
- | `node_type` | `string` | Yes | The HTML tag name in lower case. It is `unknown` when the event has no element. |
334
- | `id` | `string` or `null` | No | The `id` attribute of the element. |
335
- | `text` | `string` or `null` | No | The text content of the element, to 255 characters. |
336
- | `label` | `string` or `null` | No | The label of the element. It is the source of `interaction_type` in PickedQL. |
337
-
338
- ### `exception`
339
-
340
- | Field | Type | Required | Description |
341
- | --- | --- | --- | --- |
342
- | `reason` | `string` | Yes | The reason for the failure. |
343
-
344
- ### `product_list`
345
-
346
- `items` follows the item format of GA4 Enhanced Ecommerce, so a variable in Google Tag
347
- Manager maps onto it directly. Every item field accepts `null`.
348
-
349
- | Field | Type | Required | Description |
350
- | --- | --- | --- | --- |
351
- | `items` | `array` | Yes | One entry for each product. |
352
- | `title` | `string` or `null` | No | The title of the list. |
353
- | `items[].item_id` | `string` or `null` | No | The product ID. It is `product_name` in `dim_product` together with the name. |
354
- | `items[].item_name` | `string` or `null` | No | The product name. |
355
- | `items[].item_brand` | `string` or `null` | No | The brand. |
356
- | `items[].item_category` | `string` or `null` | No | The category. `item_category2` to `item_category5` hold the deeper levels. |
357
- | `items[].item_variant` | `string` or `null` | No | The variant. |
358
- | `items[].item_list_id` | `string` or `null` | No | The ID of the list that the product came from. |
359
- | `items[].item_list_name` | `string` or `null` | No | The name of that list. |
360
- | `items[].price` | `number` or `null` | No | The price of one item. |
361
- | `items[].quantity` | `number` or `null` | No | The quantity. |
362
- | `items[].discount` | `number` or `null` | No | The discount on the item. |
363
- | `items[].currency` | `string` or `null` | No | The currency code. |
364
- | `items[].coupon` | `string` or `null` | No | The coupon code. |
365
- | `items[].affiliation` | `string` or `null` | No | The store behind the order. |
366
- | `items[].index` | `number` or `null` | No | The position of the product in the list. |
367
- | `items[].location_id` | `string` or `null` | No | The location of the store. |
368
- | `items[].promotion_id` | `string` or `null` | No | The promotion ID. |
369
- | `items[].promotion_name` | `string` or `null` | No | The promotion name. |
370
- | `items[].creative_name` | `string` or `null` | No | The creative name. |
371
- | `items[].creative_slot` | `string` or `null` | No | The creative slot. |
372
- | `items[].in_stock` | `boolean` or `null` | No | True when the product is in stock. |
373
-
374
- ### `order`
375
-
376
- | Field | Type | Required | Description |
377
- | --- | --- | --- | --- |
378
- | `id` | `string` | Yes | The order ID. It is `order_id` in PickedQL. |
379
- | `customer_id` | `string` or `null` | No | The customer ID in the store. |
380
- | `checkout_token` | `string` or `null` | No | The checkout token in the store. |
381
- | `cart_token` | `string` or `null` | No | The cart token in the store. |
382
-
383
- ### `event`
384
-
385
- The event schema wraps every event, and it is not a context.
386
-
387
- | Field | Type | Required | Description |
388
- | --- | --- | --- | --- |
389
- | `type` | `string` | Yes | The event type. It is `event_type` in PickedQL. |
390
-
391
- The `meta` object of this schema is the `event_meta` column in PickedQL.
392
-
393
- ### `recommendation_list`
394
-
395
- | Field | Type | Required | Description |
396
- | --- | --- | --- | --- |
397
- | `title` | `string` | Yes | The title of the list. |
398
- | `items` | `array` | Yes | One entry for each recommended item. |
399
- | `items[].sku` | `string` | Yes | The SKU of the item. |
400
- | `items[].title` | `string` | Yes | The title of the item. |
401
-
402
- ### `question_list`
403
-
404
- `question_list` is the earlier name of `field_list`, and it has the same shape. On an item
405
- and on an option, `title` takes the place of `label`.
406
-
407
- | Field | Type | Required | Description |
408
- | --- | --- | --- | --- |
409
- | `items` | `array` | Yes | One entry for each question. |
410
- | `items[].id` | `string` | Yes | The question ID. |
411
- | `items[].type` | `string` | Yes | The question type. |
412
- | `items[].title` | `string` | Yes | The question title. |
413
- | `items[].options` | `array` or `null` | No | The options that the question gives. |
414
-
415
- ### `answer_list`
416
-
417
- `answer_list` is the earlier name of `response_list`, and it has the same shape.
418
-
419
- | Field | Type | Required | Description |
420
- | --- | --- | --- | --- |
421
- | `items` | `array` | Yes | One entry for each question with an answer. |
422
- | `items[].question_id` | `string` | Yes | The ID of the question. |
423
- | `items[].values` | `array` | Yes | The values that the visitor gave. |
424
- | `items[].values[].value` | `string`, `number`, `boolean`, `object`, `array`, or `null` | Yes | One answer value. |
425
-
426
- ### `cvly_funnel`
427
-
428
- | Field | Type | Required | Description |
429
- | --- | --- | --- | --- |
430
- | `version` | `string` | Yes | The version of the funnel. |
431
-
432
- ### `picked`
433
-
434
- | Field | Type | Required | Description |
435
- | --- | --- | --- | --- |
436
- | `sdk_version` | `string` | Yes | The version of the SDK. |
437
-
438
- ## Related
439
-
440
- - [Dimension columns](/reference/pickedql/dimensions) — the columns that come from these
441
- contexts.
442
- - [Schema](/reference/pickedql/schema) — the columns of `events` and of `metrics`.
443
- - [Run an analytics query](/how-to/analytics) — a query for each common question.
444
- - [Install the GTM template](/how-to/install-the-gtm-template) — how to send an ecommerce
445
- event from Google Tag Manager.
@@ -1,147 +0,0 @@
1
- ---
2
- type: reference
3
- layout: docs
4
- ---
5
-
6
- # Conditions
7
-
8
- A condition uses JSON Logic to evaluate the client state. Use a condition to control
9
- when an experience starts, to choose the next step, and to show or hide a field.
10
-
11
- ## Conditions in experiences
12
-
13
- A common pattern puts a condition between two steps. The flow then takes a branch
14
- that the form responses decide:
15
-
16
- ```ts
17
- import { createExperience } from '@picked/client/plugins/create-experience'
18
-
19
- const questionaireFunnel = createExperience({
20
- id: 'mini-funnel',
21
- // experience config
22
- })
23
-
24
- const userInformationStep = funnel.addStep({
25
- fields: ['email-address-field', 'sign-up-for-newsletter-field'],
26
- })
27
- const signUserUpToNewsletter = funnel.addStep({
28
- // step config
29
- })
30
- const userDoesNotWantNewsletter = funnel.addStep({
31
- // step config
32
- })
33
-
34
- const isSigningUpForNewsletter = funnel.addConditional({
35
- condition: {
36
- '==': [
37
- {
38
- var: 'responses.sign-up-for-newsletter-field',
39
- },
40
- true,
41
- ],
42
- },
43
- })
44
-
45
- userInformationStep.nextConditional(isSigningUpForNewsletter)
46
-
47
- isSigningUpForNewsletter.addTrue(signUserUpToNewsletter)
48
- isSigningUpForNewsletter.addFalse(userDoesNotWantNewsletter)
49
- ```
50
-
51
- ## Conditional fields
52
-
53
- A JSON Logic condition can show or hide a field. The condition can read an earlier
54
- response or a [predicate](/reference/sdk/predicates):
55
-
56
- ```ts
57
- import { createField } from '@picked/client/plugins/create-experience'
58
-
59
- // Show the email field only when the user chose "email" as a contact method.
60
- export const emailField = createField({
61
- id: 'email-input',
62
- name: 'email-input',
63
- type: 'text',
64
- label: 'Email Address',
65
- multiple: false,
66
- required: true,
67
- condition: {
68
- in: [
69
- 'email',
70
- {
71
- var: 'responses.communication-methods',
72
- },
73
- ],
74
- },
75
- })
76
-
77
- // Show the field when the predicate returns true.
78
- export const mailingAddressField = createField({
79
- id: 'mailing-address',
80
- name: 'mailing-address',
81
- type: 'text',
82
- label: 'Mailing Address',
83
- multiple: false,
84
- required: true,
85
- condition: {
86
- '==': [
87
- {
88
- invoke: {
89
- var: 'predicates.user-allows-mail',
90
- },
91
- },
92
- true,
93
- ],
94
- },
95
- })
96
- ```
97
-
98
- ## Field options with conditions
99
-
100
- Individual options within a field can also have conditional visibility:
101
-
102
- ```ts
103
- import { createField } from '@picked/client/plugins/create-experience'
104
-
105
- export const contactMethodsField = createField({
106
- id: 'contact-methods',
107
- name: 'contact-methods',
108
- type: 'text',
109
- label: 'How should we contact you?',
110
- multiple: true,
111
- required: true,
112
- options: [
113
- {
114
- id: 'email',
115
- label: 'Email',
116
- value: 'email',
117
- },
118
- {
119
- id: 'phone',
120
- label: 'Phone',
121
- value: 'phone',
122
- },
123
- {
124
- id: 'mail',
125
- label: 'Postal Mail',
126
- value: 'mail',
127
- // Only show this option if user has a verified address
128
- condition: {
129
- '==': [
130
- {
131
- invoke: {
132
- var: 'predicates.has-verified-address',
133
- },
134
- },
135
- true,
136
- ],
137
- },
138
- },
139
- ],
140
- })
141
- ```
142
-
143
- ## Related
144
-
145
- - [About conditions and the logic engine](/explanation/conditions-and-the-logic-engine)
146
- - [How to write a condition](/how-to/write-a-condition)
147
- - [Predicates](/reference/sdk/predicates)
@@ -1,21 +0,0 @@
1
- ---
2
- type: reference
3
- layout: docs
4
- ---
5
-
6
- # Content Security Policy
7
-
8
- The Picked SDK loads resources from the domains below. Add each domain to the CSP
9
- directive that the table gives.
10
-
11
- ## Required domains
12
-
13
- | Domain | Directive | Purpose |
14
- | --- | --- | --- |
15
- | `api.picked.app` | `connect-src` | API requests, project configuration, experiences, and the record of each session |
16
- | `evnts.pckd.dev` | `connect-src` | Analytics events, which Snowplow collects |
17
- | `img.picked-content.com` | `img-src` | Optimised images, which the [image optimisation service](/reference/tools/image-optimisation-service) serves |
18
-
19
- ## Related
20
-
21
- - [How to set a Content Security Policy](/how-to/set-a-content-security-policy)