picked 0.0.101-next.2 → 0.0.101

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/README.md +27 -12
  2. package/docs/explanation/conditions-and-the-logic-engine.md +94 -0
  3. package/docs/explanation/content-references.md +99 -0
  4. package/docs/explanation/feature-flag-allocation.md +218 -0
  5. package/docs/explanation/how-picked-works.md +124 -0
  6. package/docs/explanation/how-pickedql-works.md +76 -0
  7. package/docs/explanation/pages-and-flows.md +64 -0
  8. package/docs/explanation/the-content-model.md +87 -0
  9. package/docs/explanation/the-two-apis.md +68 -0
  10. package/docs/explanation/why-server-side-rendering.md +76 -0
  11. package/docs/explanation/workspaces-and-versions.md +71 -0
  12. package/docs/how-to/add-a-step-field-or-action.md +56 -0
  13. package/docs/how-to/analytics/index.md +324 -0
  14. package/docs/how-to/archive-or-delete-a-workspace.md +59 -0
  15. package/docs/how-to/authenticate-the-cli.md +101 -0
  16. package/docs/how-to/authenticate-with-a-magic-link.md +56 -0
  17. package/docs/how-to/authenticate-with-a-password.md +68 -0
  18. package/docs/how-to/authenticate-with-an-api-key.md +60 -0
  19. package/docs/how-to/authenticate-with-oauth.md +49 -0
  20. package/docs/how-to/build-a-flow.md +106 -0
  21. package/docs/how-to/call-an-external-api-from-a-workflow.md +116 -0
  22. package/docs/how-to/connect-the-mcp-server.md +46 -0
  23. package/docs/how-to/create-a-content-entry.md +58 -0
  24. package/docs/how-to/create-a-project.md +40 -0
  25. package/docs/how-to/create-an-experience.md +51 -0
  26. package/docs/how-to/create-and-revoke-an-api-key.md +54 -0
  27. package/docs/how-to/debug-with-the-chrome-extension.md +57 -0
  28. package/docs/how-to/define-a-page-layout.md +54 -0
  29. package/docs/how-to/fill-and-publish-a-page.md +82 -0
  30. package/docs/how-to/install-the-gtm-template.md +84 -0
  31. package/docs/how-to/install-the-sdk.md +93 -0
  32. package/docs/how-to/install-the-vite-plugin.md +69 -0
  33. package/docs/how-to/invite-and-remove-members.md +45 -0
  34. package/docs/how-to/point-one-entry-at-another.md +75 -0
  35. package/docs/how-to/preview-a-workspace.md +39 -0
  36. package/docs/how-to/publish-a-workspace.md +42 -0
  37. package/docs/how-to/read-a-feature-flag.md +113 -0
  38. package/docs/how-to/read-a-referenced-entry.md +109 -0
  39. package/docs/how-to/register-a-component.md +55 -0
  40. package/docs/how-to/register-an-action-handler.md +85 -0
  41. package/docs/how-to/register-an-api-that-uses-oauth2.md +107 -0
  42. package/docs/how-to/render-a-step-form.md +131 -0
  43. package/docs/how-to/render-an-unpublished-preview.md +41 -0
  44. package/docs/how-to/retry-a-failed-call-with-a-loop.md +81 -0
  45. package/docs/how-to/reuse-a-section.md +64 -0
  46. package/docs/how-to/reuse-a-step-field-or-action.md +39 -0
  47. package/docs/how-to/roll-back-a-published-version.md +39 -0
  48. package/docs/how-to/run-an-ab-test.md +59 -0
  49. package/docs/how-to/run-code-on-a-form-submission.md +125 -0
  50. package/docs/how-to/server-render-a-page.md +81 -0
  51. package/docs/how-to/set-a-content-security-policy.md +32 -0
  52. package/docs/how-to/set-up-mfa.md +126 -0
  53. package/docs/how-to/switch-workspaces.md +122 -0
  54. package/docs/how-to/upload-and-use-an-asset.mdx +87 -0
  55. package/docs/how-to/validate-a-field.md +52 -0
  56. package/docs/how-to/wait-for-an-action-response.md +182 -0
  57. package/docs/how-to/write-a-condition.md +57 -0
  58. package/docs/how-to/write-a-predicate.md +60 -0
  59. package/docs/index.md +59 -0
  60. package/docs/reference/dashboard/actions.mdx +65 -0
  61. package/docs/reference/dashboard/api-keys.mdx +47 -0
  62. package/docs/reference/dashboard/conditions.mdx +51 -0
  63. package/docs/reference/dashboard/content/asset-library.mdx +74 -0
  64. package/docs/reference/dashboard/content/blocks.mdx +66 -0
  65. package/docs/reference/dashboard/content/content-entries.mdx +109 -0
  66. package/docs/reference/dashboard/content/models.mdx +119 -0
  67. package/docs/reference/dashboard/content/pages.mdx +72 -0
  68. package/docs/reference/dashboard/experiences.mdx +61 -0
  69. package/docs/reference/dashboard/external-apis.md +182 -0
  70. package/docs/reference/dashboard/features.mdx +165 -0
  71. package/docs/reference/dashboard/fields.mdx +120 -0
  72. package/docs/reference/dashboard/flow-builder/canvas.mdx +58 -0
  73. package/docs/reference/dashboard/flow-builder/condition-builder.md +69 -0
  74. package/docs/reference/dashboard/flow-builder/keyboard-shortcuts.md +72 -0
  75. package/docs/reference/dashboard/flow-builder/nodes.md +74 -0
  76. package/docs/reference/dashboard/labels.md +321 -0
  77. package/docs/reference/dashboard/lead-search.md +235 -0
  78. package/docs/reference/dashboard/projects.mdx +53 -0
  79. package/docs/reference/dashboard/reports.mdx +53 -0
  80. package/docs/reference/dashboard/steps.mdx +47 -0
  81. package/docs/reference/dashboard/team-management.md +38 -0
  82. package/docs/reference/dashboard/workflow-runs.md +157 -0
  83. package/docs/reference/dashboard/workflow-templates.md +182 -0
  84. package/docs/reference/dashboard/workflow-test-runs.md +85 -0
  85. package/docs/reference/dashboard/workspace-versioning.mdx +42 -0
  86. package/docs/reference/dashboard/workspaces.mdx +91 -0
  87. package/docs/reference/delivery-api/experience-content.md +152 -0
  88. package/docs/reference/delivery-api/index.md +45 -0
  89. package/docs/reference/delivery-api/preview-caching-crawling.md +79 -0
  90. package/docs/reference/delivery-api/project-config.md +65 -0
  91. package/docs/reference/delivery-api/workspace-schema.md +107 -0
  92. package/docs/reference/glossary.md +201 -0
  93. package/docs/reference/management-api/authentication.md +87 -0
  94. package/docs/reference/management-api/authorization-and-scopes.md +291 -0
  95. package/docs/reference/management-api/error-handling.md +232 -0
  96. package/docs/reference/management-api/pagination.md +192 -0
  97. package/docs/reference/management-api/schema/action.md +261 -0
  98. package/docs/reference/management-api/schema/analytics-session.md +363 -0
  99. package/docs/reference/management-api/schema/analytics.md +73 -0
  100. package/docs/reference/management-api/schema/api-key.md +170 -0
  101. package/docs/reference/management-api/schema/auth.md +1177 -0
  102. package/docs/reference/management-api/schema/cms-fields.md +954 -0
  103. package/docs/reference/management-api/schema/cms-models.md +1155 -0
  104. package/docs/reference/management-api/schema/common.md +362 -0
  105. package/docs/reference/management-api/schema/condition.md +254 -0
  106. package/docs/reference/management-api/schema/design-system.md +199 -0
  107. package/docs/reference/management-api/schema/experience.md +1098 -0
  108. package/docs/reference/management-api/schema/external-api.md +637 -0
  109. package/docs/reference/management-api/schema/feature.md +350 -0
  110. package/docs/reference/management-api/schema/feedback.md +103 -0
  111. package/docs/reference/management-api/schema/field.md +400 -0
  112. package/docs/reference/management-api/schema/index.md +243 -0
  113. package/docs/reference/management-api/schema/integration.md +272 -0
  114. package/docs/reference/management-api/schema/label.md +349 -0
  115. package/docs/reference/management-api/schema/lead.md +340 -0
  116. package/docs/reference/management-api/schema/mcp-server.md +299 -0
  117. package/docs/reference/management-api/schema/metric.md +223 -0
  118. package/docs/reference/management-api/schema/operation.md +96 -0
  119. package/docs/reference/management-api/schema/organization.md +749 -0
  120. package/docs/reference/management-api/schema/project.md +607 -0
  121. package/docs/reference/management-api/schema/report.md +243 -0
  122. package/docs/reference/management-api/schema/saved-view.md +288 -0
  123. package/docs/reference/management-api/schema/shopify.md +795 -0
  124. package/docs/reference/management-api/schema/step.md +273 -0
  125. package/docs/reference/management-api/schema/tenant-branding.md +185 -0
  126. package/docs/reference/management-api/schema/workbench.md +246 -0
  127. package/docs/reference/management-api/schema/workflow-run.md +263 -0
  128. package/docs/reference/management-api/schema/workflow.md +1110 -0
  129. package/docs/reference/management-api/schema/workspace-version.md +823 -0
  130. package/docs/reference/management-api/schema/workspace.md +917 -0
  131. package/docs/reference/pickedql/data-sources.md +174 -0
  132. package/docs/reference/pickedql/dimensions.md +103 -0
  133. package/docs/reference/pickedql/filtering.md +64 -0
  134. package/docs/reference/pickedql/index.md +18 -0
  135. package/docs/reference/pickedql/schema.md +172 -0
  136. package/docs/reference/pickedql/virtual-functions.md +248 -0
  137. package/docs/reference/sdk/actions.md +154 -0
  138. package/docs/reference/sdk/analytics-events.md +453 -0
  139. package/docs/reference/sdk/conditions.md +147 -0
  140. package/docs/reference/sdk/content-security-policy.md +21 -0
  141. package/docs/reference/sdk/content.md +253 -0
  142. package/docs/reference/sdk/experiences.md +51 -0
  143. package/docs/reference/sdk/features.md +256 -0
  144. package/docs/reference/sdk/fields.md +255 -0
  145. package/docs/reference/sdk/index.md +68 -0
  146. package/docs/reference/sdk/plugins/create-experience.md +123 -0
  147. package/docs/reference/sdk/plugins/dynamic-experiences.md +74 -0
  148. package/docs/reference/sdk/plugins/fingerprintjs.md +39 -0
  149. package/docs/reference/sdk/plugins/hotjar.md +60 -0
  150. package/docs/reference/sdk/plugins/index.md +33 -0
  151. package/docs/reference/sdk/plugins/sentry.md +51 -0
  152. package/docs/reference/sdk/plugins/shopify.md +109 -0
  153. package/docs/reference/sdk/plugins/window-object.md +25 -0
  154. package/docs/reference/sdk/predicates.md +43 -0
  155. package/docs/reference/sdk/react.md +61 -0
  156. package/docs/reference/sdk/ssr/index.md +33 -0
  157. package/docs/reference/sdk/ssr/rendering-and-hydration.md +103 -0
  158. package/docs/reference/sdk/ssr/serialize.md +80 -0
  159. package/docs/reference/sdk/ssr/slots-and-placements.md +113 -0
  160. package/docs/reference/sdk/steps.md +86 -0
  161. package/docs/reference/sdk/svelte.md +74 -0
  162. package/docs/reference/sdk/type-generation.md +265 -0
  163. package/docs/reference/tools/admin-api-client.md +89 -0
  164. package/docs/reference/tools/chrome-extension.md +16 -0
  165. package/docs/reference/tools/cli.md +319 -0
  166. package/docs/reference/tools/delivery-api-client.md +60 -0
  167. package/docs/reference/tools/image-optimisation-service.md +104 -0
  168. package/docs/reference/tools/mcp-run.md +121 -0
  169. package/docs/reference/tools/mcp.md +391 -0
  170. package/docs/reference/tools/vite-plugin.md +163 -0
  171. package/docs/tutorials/first-api-call.md +253 -0
  172. package/docs/tutorials/first-experience-in-the-dashboard.mdx +160 -0
  173. package/docs/tutorials/first-experience.mdx +254 -0
  174. package/docs/tutorials/first-server-rendered-page.mdx +186 -0
  175. package/package.json +8 -7
@@ -0,0 +1,607 @@
1
+ ---
2
+ type: reference
3
+ layout: docs
4
+ generated: true
5
+ ---
6
+
7
+ # Project schema
8
+
9
+ The operations and types that `project.graphql` adds to the Management API. See [Management API schema](/reference/management-api/schema) for every domain, the endpoint and authentication.
10
+
11
+ ## Queries
12
+
13
+ ### `project`
14
+
15
+ Fetch a single project by ID. Requires authentication.
16
+
17
+ ```graphql
18
+ project(input: ProjectInput!): Project @auth
19
+ ```
20
+
21
+ ### `projects`
22
+
23
+ List projects the authenticated user can reach, across every organisation they
24
+ belong to. Pass `organizationId` to narrow the list to one organisation, and
25
+ `search` to match project names case-insensitively. Requires authentication.
26
+
27
+ ```graphql
28
+ projects(organizationId: ID, first: Int, after: String, search: String, sortKey: ProjectSortKeys = NAME, reverse: Boolean = false): ProjectConnection! @auth
29
+ ```
30
+
31
+ ## Mutations
32
+
33
+ ### `projectCreate`
34
+
35
+ Create a new project. Requires scope: `ORGANIZATION_PROJECTS_CREATE`.
36
+
37
+ ```graphql
38
+ projectCreate(input: ProjectCreateInput!): ProjectCreatePayload! @auth
39
+ ```
40
+
41
+ ### `projectUpdate`
42
+
43
+ Update a project. Requires scope: `ORGANIZATION_PROJECTS_UPDATE`.
44
+
45
+ ```graphql
46
+ projectUpdate(input: ProjectUpdateInput!): ProjectUpdatePayload! @auth
47
+ ```
48
+
49
+ ### `projectDelete`
50
+
51
+ Delete a project. Requires scope: `ORGANIZATION_PROJECTS_DELETE`.
52
+
53
+ ```graphql
54
+ projectDelete(input: ProjectDeleteInput!): ProjectDeletePayload! @auth
55
+ ```
56
+
57
+ ### `projectPreviewEnvironmentCreate`
58
+
59
+ Create a project preview environment. Requires scope: `ORGANIZATION_PROJECTS_UPDATE`.
60
+
61
+ ```graphql
62
+ projectPreviewEnvironmentCreate(input: ProjectPreviewEnvironmentCreateInput!): ProjectPreviewEnvironmentCreatePayload! @auth
63
+ ```
64
+
65
+ ### `projectPreviewEnvironmentUpdate`
66
+
67
+ Update a project preview environment. Requires scope: `ORGANIZATION_PROJECTS_UPDATE`.
68
+
69
+ ```graphql
70
+ projectPreviewEnvironmentUpdate(input: ProjectPreviewEnvironmentUpdateInput!): ProjectPreviewEnvironmentUpdatePayload! @auth
71
+ ```
72
+
73
+ ### `projectPreviewEnvironmentDelete`
74
+
75
+ Delete a project preview environment. Requires scope: `ORGANIZATION_PROJECTS_UPDATE`.
76
+
77
+ ```graphql
78
+ projectPreviewEnvironmentDelete(input: ProjectPreviewEnvironmentDeleteInput!): ProjectPreviewEnvironmentDeletePayload! @auth
79
+ ```
80
+
81
+ ## Types
82
+
83
+ ### `ProjectSortKeys`
84
+
85
+ ```graphql
86
+ """
87
+ Sort keys accepted by `Organization.projects(...)`. Pair with `reverse: true`
88
+ to flip the order.
89
+ """
90
+ enum ProjectSortKeys {
91
+ """Sort by project `name` (alphabetical)."""
92
+ NAME
93
+ """Sort by `createdAt`."""
94
+ CREATED_AT
95
+ """
96
+ Sort by `updatedAt`. Pair with `reverse: true` for most-recently-changed first.
97
+ """
98
+ UPDATED_AT
99
+ }
100
+ ```
101
+
102
+ ### `WorkspaceSortKeys`
103
+
104
+ ```graphql
105
+ """
106
+ Sort keys accepted by `Project.workspaces(...)`. Pair with `reverse: true`
107
+ to flip the order.
108
+
109
+ `DRAFT_CHANGED_AT` orders by the last draft content change, which is what
110
+ "most recently worked on" means for a workspace; `Workspace` carries no
111
+ `updatedAt`.
112
+ """
113
+ enum WorkspaceSortKeys {
114
+ """Sort by workspace `name` (alphabetical)."""
115
+ NAME
116
+ """Sort by `createdAt`."""
117
+ CREATED_AT
118
+ """Sort by `draftChangedAt`."""
119
+ DRAFT_CHANGED_AT
120
+ }
121
+ ```
122
+
123
+ ### `Project`
124
+
125
+ ```graphql
126
+ """
127
+ A project — an isolated A/B testing surface under an organisation.
128
+
129
+ Projects own workspaces (DRAFT / LIVE / ARCHIVED), CMS content, reports,
130
+ and integrations. `LIVE` is derived, not stored. At most one workspace is
131
+ live at a time (the one owning the project's served version), and
132
+ `liveWorkspaceVersion` exposes that currently-published immutable snapshot
133
+ (null until the first publish).
134
+
135
+ The `timezone` field anchors analytics aggregations (e.g. "yesterday")
136
+ and is immutable after creation.
137
+ """
138
+ type Project {
139
+ """Unique project identifier."""
140
+ id: ID!
141
+ """Display name of the project."""
142
+ name: String!
143
+ """ID of the organisation this project belongs to."""
144
+ organizationId: ID!
145
+ """When this project was created."""
146
+ createdAt: DateTime!
147
+ """When this project was last updated."""
148
+ updatedAt: DateTime!
149
+ """
150
+ IANA timezone identifier used for analytics aggregations (e.g. `America/New_York`). Immutable after creation.
151
+ """
152
+ timezone: String
153
+ """
154
+ Author-provided markdown brief (audience, tone, goals, value props, entry points). Read by the Picked AI agents. Null until set.
155
+ """
156
+ context: String
157
+ """The organisation this project belongs to."""
158
+ organization: Organization!
159
+ """Configuration settings for this project (key/value pairs)."""
160
+ settings: [ProjectSetting!]!
161
+ """
162
+ SDK presence recorded against this project, or null when none was ever recorded.
163
+ """
164
+ sdkPresence: SdkPresence @deprecated(reason: "No SDK version records presence. Reads frozen rows; will be removed.")
165
+ """
166
+ The workspace that owns the project's currently-served version, or null if
167
+ the project has never been published. Requires authentication.
168
+ """
169
+ liveWorkspace: Workspace @auth
170
+ """
171
+ The version this project currently serves (resolved through
172
+ `projects.live_workspace_version_id`), or null if no workspace has been
173
+ published yet. After a rollback this may be an earlier version, not the
174
+ most recently published one. The snapshot's `config_json` blob is
175
+ intentionally not exposed. Use `workspaceDiff` to read its contents.
176
+ Requires authentication.
177
+ """
178
+ liveWorkspaceVersion: WorkspaceVersion @auth
179
+ """
180
+ Every published version across all of the project's workspaces, ordered
181
+ newest-first by `publishedAt`. This is the project-wide rollback history:
182
+ each version carries the `workspace` it was published from, and the one
183
+ matching `liveWorkspaceVersion` is the currently-served version. Versions
184
+ owned by a soft-deleted workspace are excluded. Supports forward
185
+ (`first`/`after`) and backward (`last`/`before`) pagination with stable
186
+ cursors over `(publishedAt, id)`. Requires authentication.
187
+ """
188
+ workspaceVersions(first: Int, after: String, last: Int, before: String): WorkspaceVersionConnection! @auth
189
+ """
190
+ Workspaces belonging to this project. Filter by name with `search`
191
+ (case-insensitive substring) and by status with `status`, which keeps
192
+ workspaces holding any of the listed statuses and applies to `totalCount`
193
+ too. `HIDDEN` matches nothing, since snapshots never appear here. Requires
194
+ authentication.
195
+ """
196
+ workspaces(first: Int, after: String, last: Int, before: String, search: String, status: [WorkspaceStatus!], sortKey: WorkspaceSortKeys = CREATED_AT, reverse: Boolean = false): WorkspaceConnection! @auth
197
+ """Reports associated with this project. Requires authentication."""
198
+ reports(first: Int, after: String, sortKey: ReportSortKeys = NAME, reverse: Boolean = false): ProjectReportConnection! @auth
199
+ """All integrations installed for this project. Requires authentication."""
200
+ integrations: [Integration!]! @auth
201
+ """
202
+ A specific integration by type, or null if not installed. Requires authentication.
203
+ """
204
+ integration(type: IntegrationType!): Integration @auth
205
+ """
206
+ Third-party MCP servers registered to this project. Requires authentication.
207
+ """
208
+ mcpServers(first: Int, after: String): McpServerConnection! @auth
209
+ """
210
+ External APIs registered to this project — the origins its workflows may call. Requires authentication.
211
+ """
212
+ externalApis(first: Int, after: String): ExternalApiConnection! @auth
213
+ """
214
+ The project's own labels, ordered by namespace then key: state a workflow or a
215
+ person keeps for the whole project, such as a counter or a lock. An expired
216
+ label is not listed. Project labels outlive every lead. Write them with `labelsSet`, `ownerType: PROJECT` and the
217
+ project's id. Requires scope: `ORGANIZATION_PROJECTS_READ`.
218
+ """
219
+ labels: [Label!]! @auth
220
+ """
221
+ Leads captured by this project, newest first by default. Requires scope: `ORGANIZATION_LEADS_READ`.
222
+ """
223
+ leads(
224
+ first: Int
225
+ after: String
226
+ last: Int
227
+ before: String
228
+ """
229
+ A leads search query: a bare word matches the captured responses, and
230
+ `<namespace>.<key>`, a field key, `createdAt`, `userId`, or `session.<field>`
231
+ addresses a label, a response, the capture time, the visitor, or the session
232
+ the lead was captured in. See
233
+ https://docs.picked.app/reference/dashboard/lead-search.
234
+ """
235
+ query: String
236
+ """
237
+ The path to order by, in the same grammar `query` uses:
238
+ `labels.<namespace>.<key>`, `responses.<key>`, or `id`, `userId`,
239
+ `createdAt`. A path naming nothing sortable orders by capture time, so a
240
+ hand-edited URL degrades rather than fails. Leads carrying no value at the
241
+ path sort last in either direction. A query with a `session.` clause lists
242
+ its leads by their capture events, newest first unless `reverse` is false,
243
+ and takes either no sort or `createdAt`; any other sort is a validation error.
244
+ """
245
+ sort: String
246
+ reverse: Boolean = true
247
+ """
248
+ Narrows the leads to those captured inside this window, in the project's
249
+ time zone. `totalCount` and `metrics` count under the same window, and a
250
+ metric measures over it unless given its own.
251
+ """
252
+ window: MetricWindowInput
253
+ """
254
+ How the leads captured under one SDK session id read. `SESSION` lists each
255
+ session's newest matching lead alone, and `matchCount` and `metrics` count
256
+ sessions. A query with a `session.` clause takes `NONE` alone.
257
+ """
258
+ collapse: LeadCollapse = NONE
259
+ ): LeadConnection! @auth
260
+ """
261
+ The Leads reports on this project, in order: how leads are
262
+ acquired, the journeys behind them, and how visits convert to leads. Each is
263
+ a signed guest embed URL with the project locked and the date range left
264
+ editable, read from the project's analytics warehouse. Requires scope:
265
+ `ORGANIZATION_LEADS_READ` or `ORGANIZATION_REPORTS_READ`.
266
+ """
267
+ leadReports: [LeadReport!]! @auth
268
+ """
269
+ The Sessions reports on this project, in order: how its sessions arrive, the
270
+ journeys they take, and which of them convert. Each is a signed guest embed URL
271
+ with the project locked and the date range left editable, read from the
272
+ project's analytics warehouse. Requires scope: `ORGANIZATION_LEADS_READ`.
273
+ """
274
+ analyticsSessionsReports: [AnalyticsSessionsReport!]! @auth
275
+ """
276
+ One visitor session on this project's sites, read from the project's analytics
277
+ warehouse across all of its events, anchored on its latest lead capture, else on
278
+ its latest timeline event. Null when the warehouse holds no event of it. Requires
279
+ scope: `ORGANIZATION_LEADS_READ`.
280
+ """
281
+ analyticsSession(
282
+ """The identity resolver's session identifier."""
283
+ id: ID!
284
+ ): AnalyticsSession @auth
285
+ """
286
+ Visitor sessions on this project's sites, newest first by when they started, read
287
+ from the project's analytics warehouse. A session is its events inside `window`,
288
+ so one that began before the window starts at its first event inside it, and its
289
+ `summary` adds up those events alone. Pages by keyset: `first` and `after` read
290
+ older sessions, `last` and `before` newer ones; a page holds at most 100. The
291
+ newest events can take a few minutes to arrive. Requires scope:
292
+ `ORGANIZATION_LEADS_READ`.
293
+ """
294
+ analyticsSessions(
295
+ first: Int
296
+ after: String
297
+ last: Int
298
+ before: String
299
+ """
300
+ The window the sessions' events fall inside, in the project's time zone.
301
+ Defaults to today and the six days before it.
302
+ """
303
+ window: MetricWindowInput
304
+ """
305
+ The sessions to keep, in the session search query language: the leads
306
+ search grammar over a session. A bare word is a case-insensitive substring
307
+ of a URL the session visited or landed on; `<field>:value`, `<field>~value`
308
+ and `<field>:*` ask that some event of the session holds the value, a value
309
+ containing it, or any value, for `gaid`, `utm_source`, `utm_medium`,
310
+ `utm_campaign`, `utm_term`, `utm_content`, `page_url`, `page_origin`,
311
+ `page_pathname`, `page_query`, `landing_page_url`, `landing_page_origin`,
312
+ `landing_page_pathname` or `landing_page_query`, each also written under
313
+ `session.`; `lead:*` asks that the session captured a lead. A leading `-`
314
+ negates a clause; clauses combine with AND, or with OR when the query says
315
+ so, never both; at most ten.
316
+ """
317
+ query: String
318
+ """
319
+ Whether to keep the sessions of bots. A session is a bot's when one of its events
320
+ inside the window ran on a device the user agent names as a crawler, scanner or
321
+ scripted browser: a robot, hacker or spy device class, or a headless Chrome or
322
+ Lighthouse agent. Left out by default, from the page and from `metrics` alike.
323
+ """
324
+ includeBots: Boolean = false
325
+ ): AnalyticsSessionConnection! @auth
326
+ """
327
+ Saved views of one of this project's lists, oldest first. Requires scope:
328
+ `ORGANIZATION_PROJECTS_READ`.
329
+ """
330
+ savedViews(
331
+ """Which list to read the views of."""
332
+ resource: SavedViewResource!
333
+ first: Int
334
+ after: String
335
+ last: Int
336
+ before: String
337
+ ): SavedViewConnection! @auth
338
+ """
339
+ Customer-site URLs registered for embedding CMS page previews, ordered by `createdAt` ascending.
340
+ """
341
+ previewEnvironments: [ProjectPreviewEnvironment!]!
342
+ }
343
+ ```
344
+
345
+ ### `ProjectPreviewEnvironment`
346
+
347
+ ```graphql
348
+ """
349
+ A customer-installed SDK URL (Production, Staging, etc.) used by the page-preview iframe.
350
+ """
351
+ type ProjectPreviewEnvironment {
352
+ id: ID!
353
+ """Human-readable label (e.g. 'Production', 'Staging'). 1-40 characters."""
354
+ label: String!
355
+ """
356
+ Origin or URL where the SDK is installed; the dashboard appends `?picked-preview-token=<token>`.
357
+ """
358
+ url: String!
359
+ }
360
+ ```
361
+
362
+ ### `ProjectPreviewEnvironmentErrorCode`
363
+
364
+ ```graphql
365
+ """
366
+ Validation error code returned by the projectPreviewEnvironment* mutations.
367
+ """
368
+ enum ProjectPreviewEnvironmentErrorCode {
369
+ PROJECT_NOT_FOUND
370
+ ENVIRONMENT_NOT_FOUND
371
+ LABEL_REQUIRED
372
+ LABEL_TOO_LONG
373
+ URL_REQUIRED
374
+ URL_INVALID
375
+ }
376
+ ```
377
+
378
+ ### `ProjectPreviewEnvironmentUserError`
379
+
380
+ ```graphql
381
+ """
382
+ User-facing validation error returned by the projectPreviewEnvironment* mutations.
383
+ """
384
+ type ProjectPreviewEnvironmentUserError {
385
+ """Path to the offending input field, e.g. ['label']."""
386
+ field: [String!]
387
+ """Human-readable message suitable for display."""
388
+ message: String!
389
+ """Machine-readable error code."""
390
+ code: ProjectPreviewEnvironmentErrorCode!
391
+ }
392
+ ```
393
+
394
+ ### `ProjectPreviewEnvironmentCreateInput`
395
+
396
+ ```graphql
397
+ """Input for creating a project preview environment."""
398
+ input ProjectPreviewEnvironmentCreateInput {
399
+ projectId: ID!
400
+ label: String!
401
+ url: String!
402
+ }
403
+ ```
404
+
405
+ ### `ProjectPreviewEnvironmentCreatePayload`
406
+
407
+ ```graphql
408
+ """Payload returned by `projectPreviewEnvironmentCreate`."""
409
+ type ProjectPreviewEnvironmentCreatePayload {
410
+ """The created environment, or null when input failed validation."""
411
+ environment: ProjectPreviewEnvironment
412
+ """Per-field validation errors; empty on success."""
413
+ userErrors: [ProjectPreviewEnvironmentUserError!]!
414
+ }
415
+ ```
416
+
417
+ ### `ProjectPreviewEnvironmentUpdateInput`
418
+
419
+ ```graphql
420
+ """Input for updating a project preview environment."""
421
+ input ProjectPreviewEnvironmentUpdateInput {
422
+ id: ID!
423
+ label: String!
424
+ url: String!
425
+ }
426
+ ```
427
+
428
+ ### `ProjectPreviewEnvironmentUpdatePayload`
429
+
430
+ ```graphql
431
+ """Payload returned by `projectPreviewEnvironmentUpdate`."""
432
+ type ProjectPreviewEnvironmentUpdatePayload {
433
+ """The updated environment, or null when input failed validation."""
434
+ environment: ProjectPreviewEnvironment
435
+ """Per-field validation errors; empty on success."""
436
+ userErrors: [ProjectPreviewEnvironmentUserError!]!
437
+ }
438
+ ```
439
+
440
+ ### `ProjectPreviewEnvironmentDeleteInput`
441
+
442
+ ```graphql
443
+ """Input for deleting a project preview environment."""
444
+ input ProjectPreviewEnvironmentDeleteInput {
445
+ id: ID!
446
+ }
447
+ ```
448
+
449
+ ### `ProjectPreviewEnvironmentDeletePayload`
450
+
451
+ ```graphql
452
+ """Payload returned by `projectPreviewEnvironmentDelete`."""
453
+ type ProjectPreviewEnvironmentDeletePayload {
454
+ """
455
+ ID of the deleted environment, or null when the input failed validation.
456
+ """
457
+ deletedEnvironmentId: ID
458
+ """Per-field validation errors; empty on success."""
459
+ userErrors: [ProjectPreviewEnvironmentUserError!]!
460
+ }
461
+ ```
462
+
463
+ ### `ProjectSetting`
464
+
465
+ ```graphql
466
+ """
467
+ A single key/value setting on a project. The shape of `value` depends on
468
+ `key`; well-known keys are documented in the dashboard. Free-form keys
469
+ are allowed for use by integrations and the SDK plugin system.
470
+ """
471
+ type ProjectSetting {
472
+ """Setting key. Stable across SDK versions."""
473
+ key: String!
474
+ """Setting value as a JSON value. Shape depends on the key."""
475
+ value: JSON!
476
+ }
477
+ ```
478
+
479
+ ### `SdkPresence`
480
+
481
+ ```graphql
482
+ """
483
+ SDK presence recorded against a project. The rows are frozen: `lastSeenAt`
484
+ reports the last boot recorded while presence tracking was live, so it answers
485
+ "when did this project last report in", not "is the SDK reaching us now".
486
+ """
487
+ type SdkPresence {
488
+ """ID of the project this presence belongs to."""
489
+ projectId: ID!
490
+ """When the SDK was last seen booting."""
491
+ lastSeenAt: DateTime
492
+ """Always null."""
493
+ sdkVersion: String
494
+ """Always null."""
495
+ environment: String
496
+ }
497
+ ```
498
+
499
+ ### `ProjectEdge`
500
+
501
+ ```graphql
502
+ """Edge type for `ProjectConnection`."""
503
+ type ProjectEdge {
504
+ """Pagination cursor for this edge."""
505
+ cursor: String!
506
+ """The project."""
507
+ node: Project!
508
+ }
509
+ ```
510
+
511
+ ### `ProjectConnection`
512
+
513
+ ```graphql
514
+ """Relay-style connection of projects."""
515
+ type ProjectConnection {
516
+ """List of project edges."""
517
+ edges: [ProjectEdge!]!
518
+ """Pagination metadata."""
519
+ pageInfo: PageInfo!
520
+ """Total number of projects."""
521
+ totalCount: Int!
522
+ }
523
+ ```
524
+
525
+ ### `ProjectInput`
526
+
527
+ ```graphql
528
+ """Input for looking up a single project."""
529
+ input ProjectInput {
530
+ """Project ID to look up."""
531
+ id: ID!
532
+ }
533
+ ```
534
+
535
+ ### `ProjectCreateInput`
536
+
537
+ ```graphql
538
+ """Input for `projectCreate`."""
539
+ input ProjectCreateInput {
540
+ """Name of the project."""
541
+ name: String!
542
+ """ID of the organisation to create the project in."""
543
+ organizationId: ID!
544
+ """
545
+ IANA timezone identifier for analytics and reporting (e.g. `America/New_York`). Cannot be changed after creation.
546
+ """
547
+ timezone: String!
548
+ }
549
+ ```
550
+
551
+ ### `ProjectCreatePayload`
552
+
553
+ ```graphql
554
+ """Payload returned by `projectCreate`."""
555
+ type ProjectCreatePayload {
556
+ """The newly created project."""
557
+ project: Project
558
+ }
559
+ ```
560
+
561
+ ### `ProjectUpdateInput`
562
+
563
+ ```graphql
564
+ """
565
+ Input for `projectUpdate`. Only mutable fields are accepted — `timezone` is immutable.
566
+ """
567
+ input ProjectUpdateInput {
568
+ """ID of the project to update."""
569
+ id: ID!
570
+ """New name for the project. Omit to leave unchanged."""
571
+ name: String
572
+ """
573
+ New markdown context brief. Omit to leave unchanged; pass an empty string to clear.
574
+ """
575
+ context: String
576
+ }
577
+ ```
578
+
579
+ ### `ProjectUpdatePayload`
580
+
581
+ ```graphql
582
+ """Payload returned by `projectUpdate`."""
583
+ type ProjectUpdatePayload {
584
+ """The updated project."""
585
+ project: Project
586
+ }
587
+ ```
588
+
589
+ ### `ProjectDeleteInput`
590
+
591
+ ```graphql
592
+ """Input for `projectDelete`."""
593
+ input ProjectDeleteInput {
594
+ """ID of the project to delete."""
595
+ id: ID!
596
+ }
597
+ ```
598
+
599
+ ### `ProjectDeletePayload`
600
+
601
+ ```graphql
602
+ """Payload returned by `projectDelete`."""
603
+ type ProjectDeletePayload {
604
+ """ID of the deleted project."""
605
+ deletedProjectId: ID
606
+ }
607
+ ```