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.
- package/README.md +27 -12
- package/docs/explanation/conditions-and-the-logic-engine.md +94 -0
- package/docs/explanation/content-references.md +99 -0
- package/docs/explanation/feature-flag-allocation.md +218 -0
- package/docs/explanation/how-picked-works.md +124 -0
- package/docs/explanation/how-pickedql-works.md +76 -0
- package/docs/explanation/pages-and-flows.md +64 -0
- package/docs/explanation/the-content-model.md +87 -0
- package/docs/explanation/the-two-apis.md +68 -0
- package/docs/explanation/why-server-side-rendering.md +76 -0
- package/docs/explanation/workspaces-and-versions.md +71 -0
- package/docs/how-to/add-a-step-field-or-action.md +56 -0
- package/docs/how-to/analytics/index.md +324 -0
- package/docs/how-to/archive-or-delete-a-workspace.md +59 -0
- package/docs/how-to/authenticate-the-cli.md +101 -0
- package/docs/how-to/authenticate-with-a-magic-link.md +56 -0
- package/docs/how-to/authenticate-with-a-password.md +68 -0
- package/docs/how-to/authenticate-with-an-api-key.md +60 -0
- package/docs/how-to/authenticate-with-oauth.md +49 -0
- package/docs/how-to/build-a-flow.md +106 -0
- package/docs/how-to/call-an-external-api-from-a-workflow.md +116 -0
- package/docs/how-to/connect-the-mcp-server.md +46 -0
- package/docs/how-to/create-a-content-entry.md +58 -0
- package/docs/how-to/create-a-project.md +40 -0
- package/docs/how-to/create-an-experience.md +51 -0
- package/docs/how-to/create-and-revoke-an-api-key.md +54 -0
- package/docs/how-to/debug-with-the-chrome-extension.md +57 -0
- package/docs/how-to/define-a-page-layout.md +54 -0
- package/docs/how-to/fill-and-publish-a-page.md +82 -0
- package/docs/how-to/install-the-gtm-template.md +84 -0
- package/docs/how-to/install-the-sdk.md +93 -0
- package/docs/how-to/install-the-vite-plugin.md +69 -0
- package/docs/how-to/invite-and-remove-members.md +45 -0
- package/docs/how-to/point-one-entry-at-another.md +75 -0
- package/docs/how-to/preview-a-workspace.md +39 -0
- package/docs/how-to/publish-a-workspace.md +42 -0
- package/docs/how-to/read-a-feature-flag.md +113 -0
- package/docs/how-to/read-a-referenced-entry.md +109 -0
- package/docs/how-to/register-a-component.md +55 -0
- package/docs/how-to/register-an-action-handler.md +85 -0
- package/docs/how-to/register-an-api-that-uses-oauth2.md +107 -0
- package/docs/how-to/render-a-step-form.md +131 -0
- package/docs/how-to/render-an-unpublished-preview.md +41 -0
- package/docs/how-to/retry-a-failed-call-with-a-loop.md +81 -0
- package/docs/how-to/reuse-a-section.md +64 -0
- package/docs/how-to/reuse-a-step-field-or-action.md +39 -0
- package/docs/how-to/roll-back-a-published-version.md +39 -0
- package/docs/how-to/run-an-ab-test.md +59 -0
- package/docs/how-to/run-code-on-a-form-submission.md +125 -0
- package/docs/how-to/server-render-a-page.md +81 -0
- package/docs/how-to/set-a-content-security-policy.md +32 -0
- package/docs/how-to/set-up-mfa.md +126 -0
- package/docs/how-to/switch-workspaces.md +122 -0
- package/docs/how-to/upload-and-use-an-asset.mdx +87 -0
- package/docs/how-to/validate-a-field.md +52 -0
- package/docs/how-to/wait-for-an-action-response.md +182 -0
- package/docs/how-to/write-a-condition.md +57 -0
- package/docs/how-to/write-a-predicate.md +60 -0
- package/docs/index.md +59 -0
- package/docs/reference/dashboard/actions.mdx +65 -0
- package/docs/reference/dashboard/api-keys.mdx +47 -0
- package/docs/reference/dashboard/conditions.mdx +51 -0
- package/docs/reference/dashboard/content/asset-library.mdx +74 -0
- package/docs/reference/dashboard/content/blocks.mdx +66 -0
- package/docs/reference/dashboard/content/content-entries.mdx +109 -0
- package/docs/reference/dashboard/content/models.mdx +119 -0
- package/docs/reference/dashboard/content/pages.mdx +72 -0
- package/docs/reference/dashboard/experiences.mdx +61 -0
- package/docs/reference/dashboard/external-apis.md +182 -0
- package/docs/reference/dashboard/features.mdx +165 -0
- package/docs/reference/dashboard/fields.mdx +120 -0
- package/docs/reference/dashboard/flow-builder/canvas.mdx +58 -0
- package/docs/reference/dashboard/flow-builder/condition-builder.md +69 -0
- package/docs/reference/dashboard/flow-builder/keyboard-shortcuts.md +72 -0
- package/docs/reference/dashboard/flow-builder/nodes.md +74 -0
- package/docs/reference/dashboard/labels.md +321 -0
- package/docs/reference/dashboard/lead-search.md +235 -0
- package/docs/reference/dashboard/projects.mdx +53 -0
- package/docs/reference/dashboard/reports.mdx +53 -0
- package/docs/reference/dashboard/steps.mdx +47 -0
- package/docs/reference/dashboard/team-management.md +38 -0
- package/docs/reference/dashboard/workflow-runs.md +157 -0
- package/docs/reference/dashboard/workflow-templates.md +182 -0
- package/docs/reference/dashboard/workflow-test-runs.md +85 -0
- package/docs/reference/dashboard/workspace-versioning.mdx +42 -0
- package/docs/reference/dashboard/workspaces.mdx +91 -0
- package/docs/reference/delivery-api/experience-content.md +152 -0
- package/docs/reference/delivery-api/index.md +45 -0
- package/docs/reference/delivery-api/preview-caching-crawling.md +79 -0
- package/docs/reference/delivery-api/project-config.md +65 -0
- package/docs/reference/delivery-api/workspace-schema.md +107 -0
- package/docs/reference/glossary.md +201 -0
- package/docs/reference/management-api/authentication.md +87 -0
- package/docs/reference/management-api/authorization-and-scopes.md +291 -0
- package/docs/reference/management-api/error-handling.md +232 -0
- package/docs/reference/management-api/pagination.md +192 -0
- package/docs/reference/management-api/schema/action.md +261 -0
- package/docs/reference/management-api/schema/analytics-session.md +363 -0
- package/docs/reference/management-api/schema/analytics.md +73 -0
- package/docs/reference/management-api/schema/api-key.md +170 -0
- package/docs/reference/management-api/schema/auth.md +1177 -0
- package/docs/reference/management-api/schema/cms-fields.md +954 -0
- package/docs/reference/management-api/schema/cms-models.md +1155 -0
- package/docs/reference/management-api/schema/common.md +362 -0
- package/docs/reference/management-api/schema/condition.md +254 -0
- package/docs/reference/management-api/schema/design-system.md +199 -0
- package/docs/reference/management-api/schema/experience.md +1098 -0
- package/docs/reference/management-api/schema/external-api.md +637 -0
- package/docs/reference/management-api/schema/feature.md +350 -0
- package/docs/reference/management-api/schema/feedback.md +103 -0
- package/docs/reference/management-api/schema/field.md +400 -0
- package/docs/reference/management-api/schema/index.md +243 -0
- package/docs/reference/management-api/schema/integration.md +272 -0
- package/docs/reference/management-api/schema/label.md +349 -0
- package/docs/reference/management-api/schema/lead.md +340 -0
- package/docs/reference/management-api/schema/mcp-server.md +299 -0
- package/docs/reference/management-api/schema/metric.md +223 -0
- package/docs/reference/management-api/schema/operation.md +96 -0
- package/docs/reference/management-api/schema/organization.md +749 -0
- package/docs/reference/management-api/schema/project.md +607 -0
- package/docs/reference/management-api/schema/report.md +243 -0
- package/docs/reference/management-api/schema/saved-view.md +288 -0
- package/docs/reference/management-api/schema/shopify.md +795 -0
- package/docs/reference/management-api/schema/step.md +273 -0
- package/docs/reference/management-api/schema/tenant-branding.md +185 -0
- package/docs/reference/management-api/schema/workbench.md +246 -0
- package/docs/reference/management-api/schema/workflow-run.md +263 -0
- package/docs/reference/management-api/schema/workflow.md +1110 -0
- package/docs/reference/management-api/schema/workspace-version.md +823 -0
- package/docs/reference/management-api/schema/workspace.md +917 -0
- package/docs/reference/pickedql/data-sources.md +174 -0
- package/docs/reference/pickedql/dimensions.md +103 -0
- package/docs/reference/pickedql/filtering.md +64 -0
- package/docs/reference/pickedql/index.md +18 -0
- package/docs/reference/pickedql/schema.md +172 -0
- package/docs/reference/pickedql/virtual-functions.md +248 -0
- package/docs/reference/sdk/actions.md +154 -0
- package/docs/reference/sdk/analytics-events.md +453 -0
- package/docs/reference/sdk/conditions.md +147 -0
- package/docs/reference/sdk/content-security-policy.md +21 -0
- package/docs/reference/sdk/content.md +253 -0
- package/docs/reference/sdk/experiences.md +51 -0
- package/docs/reference/sdk/features.md +256 -0
- package/docs/reference/sdk/fields.md +255 -0
- package/docs/reference/sdk/index.md +68 -0
- package/docs/reference/sdk/plugins/create-experience.md +123 -0
- package/docs/reference/sdk/plugins/dynamic-experiences.md +74 -0
- package/docs/reference/sdk/plugins/fingerprintjs.md +39 -0
- package/docs/reference/sdk/plugins/hotjar.md +60 -0
- package/docs/reference/sdk/plugins/index.md +33 -0
- package/docs/reference/sdk/plugins/sentry.md +51 -0
- package/docs/reference/sdk/plugins/shopify.md +109 -0
- package/docs/reference/sdk/plugins/window-object.md +25 -0
- package/docs/reference/sdk/predicates.md +43 -0
- package/docs/reference/sdk/react.md +61 -0
- package/docs/reference/sdk/ssr/index.md +33 -0
- package/docs/reference/sdk/ssr/rendering-and-hydration.md +103 -0
- package/docs/reference/sdk/ssr/serialize.md +80 -0
- package/docs/reference/sdk/ssr/slots-and-placements.md +113 -0
- package/docs/reference/sdk/steps.md +86 -0
- package/docs/reference/sdk/svelte.md +74 -0
- package/docs/reference/sdk/type-generation.md +265 -0
- package/docs/reference/tools/admin-api-client.md +89 -0
- package/docs/reference/tools/chrome-extension.md +16 -0
- package/docs/reference/tools/cli.md +319 -0
- package/docs/reference/tools/delivery-api-client.md +60 -0
- package/docs/reference/tools/image-optimisation-service.md +104 -0
- package/docs/reference/tools/mcp-run.md +121 -0
- package/docs/reference/tools/mcp.md +391 -0
- package/docs/reference/tools/vite-plugin.md +163 -0
- package/docs/tutorials/first-api-call.md +253 -0
- package/docs/tutorials/first-experience-in-the-dashboard.mdx +160 -0
- package/docs/tutorials/first-experience.mdx +254 -0
- package/docs/tutorials/first-server-rendered-page.mdx +186 -0
- package/package.json +8 -7
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: reference
|
|
3
|
+
layout: docs
|
|
4
|
+
generated: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Analytics session schema
|
|
8
|
+
|
|
9
|
+
The operations and types that `analytics-session.graphql` adds to the Management API. See [Management API schema](/reference/management-api/schema) for every domain, the endpoint and authentication.
|
|
10
|
+
|
|
11
|
+
## Types
|
|
12
|
+
|
|
13
|
+
### `AnalyticsSession`
|
|
14
|
+
|
|
15
|
+
```graphql
|
|
16
|
+
"""
|
|
17
|
+
One visit by a visitor: the analytics events one person produced on a site, from
|
|
18
|
+
their first event until 30 minutes passed without another. A lead's `session` is
|
|
19
|
+
the visit during which the lead was captured.
|
|
20
|
+
"""
|
|
21
|
+
type AnalyticsSession {
|
|
22
|
+
"""The identity resolver's session identifier."""
|
|
23
|
+
id: ID!
|
|
24
|
+
"""
|
|
25
|
+
What the visit adds up to, each event counted once: when it started and ended,
|
|
26
|
+
how the visitor arrived, and on what device from where. Requires scope:
|
|
27
|
+
`ORGANIZATION_LEADS_READ`.
|
|
28
|
+
"""
|
|
29
|
+
summary: AnalyticsSessionSummary! @auth
|
|
30
|
+
"""
|
|
31
|
+
The visit's timeline: the events that read as the visitor's path, each once,
|
|
32
|
+
oldest first. Without a cursor, `last` ends the page with the capture event and
|
|
33
|
+
`first` starts it there; with neither, the page is the 20 events ending with the
|
|
34
|
+
capture. A page holds at most 100 events. The newest events can take a few
|
|
35
|
+
minutes to arrive. Requires scope: `ORGANIZATION_LEADS_READ`.
|
|
36
|
+
"""
|
|
37
|
+
events(first: Int, after: String, last: Int, before: String): AnalyticsEventConnection! @auth
|
|
38
|
+
"""
|
|
39
|
+
The lead captured during the visit, or null when it captured none. A session
|
|
40
|
+
listed by `Project.analyticsSessions` that captured several gives the latest; one
|
|
41
|
+
reached through `Lead.session` gives that lead. Requires scope:
|
|
42
|
+
`ORGANIZATION_LEADS_READ`.
|
|
43
|
+
"""
|
|
44
|
+
lead: Lead @auth
|
|
45
|
+
"""
|
|
46
|
+
The Session reports on the visit, in order: the overview, the
|
|
47
|
+
journey through the experience's steps, and the full event log. Each is a
|
|
48
|
+
signed guest embed URL with the session's project and the session locked,
|
|
49
|
+
read from the project's analytics warehouse. Requires scope:
|
|
50
|
+
`ORGANIZATION_LEADS_READ`.
|
|
51
|
+
"""
|
|
52
|
+
reports: [AnalyticsSessionReport!]! @auth
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### `AnalyticsSessionReport`
|
|
57
|
+
|
|
58
|
+
```graphql
|
|
59
|
+
"""
|
|
60
|
+
A report on one analytics session, embedded with the session's
|
|
61
|
+
project and the session locked, so the embed shows that visit and no other.
|
|
62
|
+
"""
|
|
63
|
+
type AnalyticsSessionReport {
|
|
64
|
+
"""Which of the Session reports this is."""
|
|
65
|
+
kind: AnalyticsSessionReportKind!
|
|
66
|
+
"""
|
|
67
|
+
URL of a signed embed of the report, for an iframe. The
|
|
68
|
+
signature expires 3 hours after the field is read.
|
|
69
|
+
"""
|
|
70
|
+
embedUrl: String!
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### `AnalyticsSessionReportKind`
|
|
75
|
+
|
|
76
|
+
```graphql
|
|
77
|
+
"""The Session reports."""
|
|
78
|
+
enum AnalyticsSessionReportKind {
|
|
79
|
+
"""
|
|
80
|
+
How the visit ended, who the visitor was, when they were active and their other visits.
|
|
81
|
+
"""
|
|
82
|
+
OVERVIEW
|
|
83
|
+
"""
|
|
84
|
+
Every step entry in order, with time on step, submit outcomes, errors and clicks.
|
|
85
|
+
"""
|
|
86
|
+
JOURNEY
|
|
87
|
+
"""Every event the visit recorded, in order, in the visitor's clock."""
|
|
88
|
+
EVENT_LOG
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### `AnalyticsSessionsReport`
|
|
93
|
+
|
|
94
|
+
```graphql
|
|
95
|
+
"""
|
|
96
|
+
One of the project's Sessions reports: a Metabase dashboard over all of its
|
|
97
|
+
sessions, signed for embedding with the project locked, so the embed shows that
|
|
98
|
+
project's sessions and no other. Its date range is an editable filter inside the
|
|
99
|
+
embed.
|
|
100
|
+
"""
|
|
101
|
+
type AnalyticsSessionsReport {
|
|
102
|
+
"""Which of the Sessions reports this is."""
|
|
103
|
+
kind: AnalyticsSessionsReportKind!
|
|
104
|
+
"""
|
|
105
|
+
URL of a signed embed of the report, for an iframe. The
|
|
106
|
+
signature expires 3 hours after the field is read.
|
|
107
|
+
"""
|
|
108
|
+
embedUrl: String!
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### `AnalyticsSessionsReportKind`
|
|
113
|
+
|
|
114
|
+
```graphql
|
|
115
|
+
"""The Sessions reports."""
|
|
116
|
+
enum AnalyticsSessionsReportKind {
|
|
117
|
+
"""
|
|
118
|
+
How sessions arrive: volume, channel, referrer, campaign, landing page, device, place and time of arrival.
|
|
119
|
+
"""
|
|
120
|
+
ACQUISITION
|
|
121
|
+
"""
|
|
122
|
+
The journeys sessions take: length, pages, returning visits, experiences, step paths and where they leave.
|
|
123
|
+
"""
|
|
124
|
+
JOURNEYS
|
|
125
|
+
"""
|
|
126
|
+
Which sessions convert: the funnel, the conversion rate by week and by segment.
|
|
127
|
+
"""
|
|
128
|
+
CONVERSION
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### `AnalyticsSessionConnection`
|
|
133
|
+
|
|
134
|
+
```graphql
|
|
135
|
+
"""
|
|
136
|
+
Relay-style connection of analytics sessions, with both an `edges` list and a flat `nodes` accessor.
|
|
137
|
+
"""
|
|
138
|
+
type AnalyticsSessionConnection {
|
|
139
|
+
"""List of analytics-session edges."""
|
|
140
|
+
edges: [AnalyticsSessionEdge!]!
|
|
141
|
+
"""
|
|
142
|
+
Flat list of analytics sessions, equivalent to `edges[].node`. Convenience accessor.
|
|
143
|
+
"""
|
|
144
|
+
nodes: [AnalyticsSession!]!
|
|
145
|
+
"""Pagination metadata."""
|
|
146
|
+
pageInfo: PageInfo!
|
|
147
|
+
"""
|
|
148
|
+
Metrics over every session the connection's `window` holds, across all pages.
|
|
149
|
+
Pass `first: 0` on `Project.analyticsSessions` to read metrics without fetching a page.
|
|
150
|
+
"""
|
|
151
|
+
metrics: AnalyticsSessionMetrics!
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### `AnalyticsSessionMetrics`
|
|
156
|
+
|
|
157
|
+
```graphql
|
|
158
|
+
"""
|
|
159
|
+
Metrics over the sessions an `AnalyticsSessionConnection` holds. Every metric
|
|
160
|
+
ignores the connection's page.
|
|
161
|
+
"""
|
|
162
|
+
type AnalyticsSessionMetrics {
|
|
163
|
+
"""
|
|
164
|
+
Sessions by when each started. A session is its events inside the window, so
|
|
165
|
+
a visit that began before the window counts from its first event inside it.
|
|
166
|
+
|
|
167
|
+
`groupBy` splits the count; `CONVERTED` into `converted` and `not_converted`.
|
|
168
|
+
"""
|
|
169
|
+
count(groupBy: AnalyticsSessionCountGroupBy): CountMetric!
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### `AnalyticsSessionCountGroupBy`
|
|
174
|
+
|
|
175
|
+
```graphql
|
|
176
|
+
"""What a session count can be split by."""
|
|
177
|
+
enum AnalyticsSessionCountGroupBy {
|
|
178
|
+
"""
|
|
179
|
+
Whether the session converted: one of its events inside the window captured a
|
|
180
|
+
lead, a `lead_created` or `lead_capture`.
|
|
181
|
+
"""
|
|
182
|
+
CONVERTED
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### `AnalyticsSessionEdge`
|
|
187
|
+
|
|
188
|
+
```graphql
|
|
189
|
+
"""Edge type for `AnalyticsSessionConnection`."""
|
|
190
|
+
type AnalyticsSessionEdge {
|
|
191
|
+
"""Pagination cursor for this edge."""
|
|
192
|
+
cursor: String!
|
|
193
|
+
"""The analytics session."""
|
|
194
|
+
node: AnalyticsSession!
|
|
195
|
+
}
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### `AnalyticsSessionSummary`
|
|
199
|
+
|
|
200
|
+
```graphql
|
|
201
|
+
"""What an analytics session adds up to."""
|
|
202
|
+
type AnalyticsSessionSummary {
|
|
203
|
+
"""
|
|
204
|
+
When the session's first event happened, by the visitor's device clock.
|
|
205
|
+
"""
|
|
206
|
+
startedAt: DateTime!
|
|
207
|
+
"""When the session's last event happened, by the visitor's device clock."""
|
|
208
|
+
endedAt: DateTime!
|
|
209
|
+
"""How many events the session's `events` timeline lists."""
|
|
210
|
+
eventCount: Int!
|
|
211
|
+
"""How many pages the visitor viewed."""
|
|
212
|
+
pageViewCount: Int!
|
|
213
|
+
"""Full URL of the first page the session's events happened on."""
|
|
214
|
+
landingPageUrl: String
|
|
215
|
+
"""
|
|
216
|
+
Where the visitor came from, as the tracker classified the landing page's referrer.
|
|
217
|
+
"""
|
|
218
|
+
referrer: AnalyticsReferrer
|
|
219
|
+
"""The UTM campaign the landing page's URL carried."""
|
|
220
|
+
campaign: AnalyticsCampaign
|
|
221
|
+
"""The visitor's device, as parsed from their user agent."""
|
|
222
|
+
device: AnalyticsDevice
|
|
223
|
+
"""Where the visitor was, as looked up from their IP address."""
|
|
224
|
+
location: AnalyticsLocation
|
|
225
|
+
"""
|
|
226
|
+
The visitor's Google Analytics client ID, from the session's first event to carry one.
|
|
227
|
+
"""
|
|
228
|
+
gaid: String
|
|
229
|
+
"""
|
|
230
|
+
The visitor's Picked ID: the canonical id identity resolution gave them, from the session's
|
|
231
|
+
first event to carry one.
|
|
232
|
+
"""
|
|
233
|
+
visitorId: String
|
|
234
|
+
}
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### `AnalyticsReferrer`
|
|
238
|
+
|
|
239
|
+
```graphql
|
|
240
|
+
"""The site that referred a visitor, as the tracker classified its URL."""
|
|
241
|
+
type AnalyticsReferrer {
|
|
242
|
+
"""The referrer's name, in lowercase, such as `google` or `facebook`."""
|
|
243
|
+
source: String
|
|
244
|
+
"""
|
|
245
|
+
The kind of referrer, such as `search`, `social`, `email` or `internal`.
|
|
246
|
+
"""
|
|
247
|
+
medium: String
|
|
248
|
+
}
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### `AnalyticsCampaign`
|
|
252
|
+
|
|
253
|
+
```graphql
|
|
254
|
+
"""A visit's UTM campaign parameters."""
|
|
255
|
+
type AnalyticsCampaign {
|
|
256
|
+
"""`utm_source`."""
|
|
257
|
+
source: String
|
|
258
|
+
"""`utm_medium`."""
|
|
259
|
+
medium: String
|
|
260
|
+
"""`utm_campaign`."""
|
|
261
|
+
name: String
|
|
262
|
+
}
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
### `AnalyticsDevice`
|
|
266
|
+
|
|
267
|
+
```graphql
|
|
268
|
+
"""A visitor's device, as parsed from their user agent."""
|
|
269
|
+
type AnalyticsDevice {
|
|
270
|
+
"""The class of device, such as `Desktop`, `Phone` or `Tablet`."""
|
|
271
|
+
category: String
|
|
272
|
+
"""The browser's name, such as `Chrome`."""
|
|
273
|
+
browser: String
|
|
274
|
+
"""The browser's major version."""
|
|
275
|
+
browserVersion: String
|
|
276
|
+
"""The operating system's name, such as `Mac OS` or `Android`."""
|
|
277
|
+
operatingSystem: String
|
|
278
|
+
"""The operating system's version."""
|
|
279
|
+
operatingSystemVersion: String
|
|
280
|
+
}
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### `AnalyticsLocation`
|
|
284
|
+
|
|
285
|
+
```graphql
|
|
286
|
+
"""Where a visitor was, as looked up from their IP address."""
|
|
287
|
+
type AnalyticsLocation {
|
|
288
|
+
"""The city's English name."""
|
|
289
|
+
city: String
|
|
290
|
+
"""The ISO 3166-2 code of the region within the country, such as `NSW`."""
|
|
291
|
+
region: String
|
|
292
|
+
"""The country's English name."""
|
|
293
|
+
country: String
|
|
294
|
+
"""The country's ISO 3166-1 alpha-2 code."""
|
|
295
|
+
countryCode: String
|
|
296
|
+
}
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
### `AnalyticsEvent`
|
|
300
|
+
|
|
301
|
+
```graphql
|
|
302
|
+
"""
|
|
303
|
+
One analytics event in a visitor's session: a page viewed, a step entered or
|
|
304
|
+
submitted, a product added to the cart, a lead captured. Together, a session's
|
|
305
|
+
events read as the visitor's path through the site.
|
|
306
|
+
"""
|
|
307
|
+
type AnalyticsEvent {
|
|
308
|
+
"""Unique event identifier."""
|
|
309
|
+
id: ID!
|
|
310
|
+
"""
|
|
311
|
+
The event type, such as `page_view`, `step_enter`, `cart_add` or `lead_created`.
|
|
312
|
+
"""
|
|
313
|
+
type: String!
|
|
314
|
+
"""When the event happened, by the visitor's device clock."""
|
|
315
|
+
occurredAt: DateTime!
|
|
316
|
+
"""Full URL of the page the event happened on."""
|
|
317
|
+
pageUrl: String
|
|
318
|
+
"""Path of the page the event happened on."""
|
|
319
|
+
pagePath: String
|
|
320
|
+
"""Title of the experience the event happened in."""
|
|
321
|
+
experienceTitle: String
|
|
322
|
+
"""Title of the step the event concerns."""
|
|
323
|
+
stepTitle: String
|
|
324
|
+
"""Title of the form the event concerns."""
|
|
325
|
+
formTitle: String
|
|
326
|
+
"""Title of the modal the event concerns."""
|
|
327
|
+
modalTitle: String
|
|
328
|
+
"""
|
|
329
|
+
The name of a product the event concerns: one of them, when it concerns several.
|
|
330
|
+
"""
|
|
331
|
+
productTitle: String
|
|
332
|
+
}
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
### `AnalyticsEventConnection`
|
|
336
|
+
|
|
337
|
+
```graphql
|
|
338
|
+
"""
|
|
339
|
+
Relay-style connection of analytics events, with both an `edges` list and a flat `nodes` accessor.
|
|
340
|
+
"""
|
|
341
|
+
type AnalyticsEventConnection {
|
|
342
|
+
"""List of analytics-event edges."""
|
|
343
|
+
edges: [AnalyticsEventEdge!]!
|
|
344
|
+
"""
|
|
345
|
+
Flat list of analytics events, equivalent to `edges[].node`. Convenience accessor.
|
|
346
|
+
"""
|
|
347
|
+
nodes: [AnalyticsEvent!]!
|
|
348
|
+
"""Pagination metadata."""
|
|
349
|
+
pageInfo: PageInfo!
|
|
350
|
+
}
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
### `AnalyticsEventEdge`
|
|
354
|
+
|
|
355
|
+
```graphql
|
|
356
|
+
"""Edge type for `AnalyticsEventConnection`."""
|
|
357
|
+
type AnalyticsEventEdge {
|
|
358
|
+
"""Pagination cursor for this edge."""
|
|
359
|
+
cursor: String!
|
|
360
|
+
"""The analytics event."""
|
|
361
|
+
node: AnalyticsEvent!
|
|
362
|
+
}
|
|
363
|
+
```
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: reference
|
|
3
|
+
layout: docs
|
|
4
|
+
generated: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Analytics schema
|
|
8
|
+
|
|
9
|
+
The operations and types that `analytics.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
|
+
### `pickedqlQuery`
|
|
14
|
+
|
|
15
|
+
Execute a PickedQL query scoped to the caller's authorised projects.
|
|
16
|
+
|
|
17
|
+
```graphql
|
|
18
|
+
pickedqlQuery(input: PickedqlQueryInput!): PickedqlQueryResult! @auth
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Types
|
|
22
|
+
|
|
23
|
+
### `PickedqlQueryInput`
|
|
24
|
+
|
|
25
|
+
```graphql
|
|
26
|
+
"""Input for `pickedqlQuery` — execute a PickedQL statement."""
|
|
27
|
+
input PickedqlQueryInput {
|
|
28
|
+
"""
|
|
29
|
+
The SQL query to execute. Must include a tenant filter (e.g. `WHERE project_id = '…'`).
|
|
30
|
+
"""
|
|
31
|
+
sql: String!
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### `PickedqlTableDataColumn`
|
|
36
|
+
|
|
37
|
+
```graphql
|
|
38
|
+
"""Column metadata for a PickedQL query result."""
|
|
39
|
+
type PickedqlTableDataColumn {
|
|
40
|
+
"""The column identifier."""
|
|
41
|
+
name: String!
|
|
42
|
+
"""The data type (e.g. `String`, `UInt64`, `DateTime`)."""
|
|
43
|
+
dataType: String!
|
|
44
|
+
"""Human-readable column label."""
|
|
45
|
+
displayName: String!
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### `PickedqlTableData`
|
|
50
|
+
|
|
51
|
+
```graphql
|
|
52
|
+
"""Structured table data from a PickedQL query."""
|
|
53
|
+
type PickedqlTableData {
|
|
54
|
+
"""Column definitions with name, type, and display name."""
|
|
55
|
+
columns: [PickedqlTableDataColumn!]!
|
|
56
|
+
"""
|
|
57
|
+
Rows of cell values. Each row is a list of stringified cell values aligned with the `columns` array.
|
|
58
|
+
"""
|
|
59
|
+
rowData: [[String]!]!
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### `PickedqlQueryResult`
|
|
64
|
+
|
|
65
|
+
```graphql
|
|
66
|
+
"""Result of a PickedQL query (ShopifyQL-style structured shape)."""
|
|
67
|
+
type PickedqlQueryResult {
|
|
68
|
+
"""Structured table data, null if the query failed to parse or validate."""
|
|
69
|
+
tableData: PickedqlTableData
|
|
70
|
+
"""Parse or validation errors, empty if the query succeeded."""
|
|
71
|
+
parseErrors: [String!]!
|
|
72
|
+
}
|
|
73
|
+
```
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: reference
|
|
3
|
+
layout: docs
|
|
4
|
+
generated: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Api key schema
|
|
8
|
+
|
|
9
|
+
The operations and types that `api-key.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
|
+
### `apiKeys`
|
|
14
|
+
|
|
15
|
+
List API keys for an organisation. Requires authentication.
|
|
16
|
+
|
|
17
|
+
```graphql
|
|
18
|
+
apiKeys(input: ApiKeysInput!): [ApiKey!]! @auth
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Mutations
|
|
22
|
+
|
|
23
|
+
### `apiKeyCreate`
|
|
24
|
+
|
|
25
|
+
Create a new API key. Requires scope: `ORGANIZATION_API_KEYS_CREATE`. User authentication only (not API key).
|
|
26
|
+
|
|
27
|
+
```graphql
|
|
28
|
+
apiKeyCreate(input: ApiKeyCreateInput!): ApiKeyCreatePayload! @auth(only: USER)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### `apiKeyRevoke`
|
|
32
|
+
|
|
33
|
+
Revoke an API key. Requires scope: `ORGANIZATION_API_KEYS_DELETE`.
|
|
34
|
+
|
|
35
|
+
```graphql
|
|
36
|
+
apiKeyRevoke(input: ApiKeyRevokeInput!): Boolean! @auth
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Types
|
|
40
|
+
|
|
41
|
+
### `ApiKey`
|
|
42
|
+
|
|
43
|
+
```graphql
|
|
44
|
+
"""
|
|
45
|
+
An API key for programmatic access. Scoped to one organisation; may
|
|
46
|
+
additionally be scoped to a single project. Carries a static list of
|
|
47
|
+
authorisation scopes that gate every API operation the key performs.
|
|
48
|
+
|
|
49
|
+
`keyPrefix` is the first few characters of the secret — used as a
|
|
50
|
+
human-readable identifier in the dashboard and audit logs. The full
|
|
51
|
+
secret is only returned once at creation time (see `ApiKeyCreatePayload`).
|
|
52
|
+
"""
|
|
53
|
+
type ApiKey {
|
|
54
|
+
"""Unique identifier for the API key."""
|
|
55
|
+
id: ID!
|
|
56
|
+
"""Display name of the API key."""
|
|
57
|
+
name: String!
|
|
58
|
+
"""
|
|
59
|
+
Prefix of the key for identification (e.g. `pk_abc12…`). Safe to log and display.
|
|
60
|
+
"""
|
|
61
|
+
keyPrefix: String!
|
|
62
|
+
"""
|
|
63
|
+
ID of the project this key is scoped to, or null when the key is org-wide.
|
|
64
|
+
"""
|
|
65
|
+
projectId: String
|
|
66
|
+
"""Name of the project this key is scoped to (denormalised for display)."""
|
|
67
|
+
projectName: String
|
|
68
|
+
"""ID of the user who created this key."""
|
|
69
|
+
createdBy: ID!
|
|
70
|
+
"""Email of the user who created this key (denormalised for display)."""
|
|
71
|
+
createdByEmail: String!
|
|
72
|
+
"""When this key was created."""
|
|
73
|
+
createdAt: String!
|
|
74
|
+
"""
|
|
75
|
+
Scopes this API key has access to. Must be a subset of the creator's scopes at creation time.
|
|
76
|
+
"""
|
|
77
|
+
scopes: [Scope!]!
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### `ApiKeyEdge`
|
|
82
|
+
|
|
83
|
+
```graphql
|
|
84
|
+
"""Edge type for `ApiKeyConnection`."""
|
|
85
|
+
type ApiKeyEdge {
|
|
86
|
+
"""Pagination cursor for this edge."""
|
|
87
|
+
cursor: String!
|
|
88
|
+
"""The API key."""
|
|
89
|
+
node: ApiKey!
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### `ApiKeyConnection`
|
|
94
|
+
|
|
95
|
+
```graphql
|
|
96
|
+
"""Relay-style connection of API keys."""
|
|
97
|
+
type ApiKeyConnection {
|
|
98
|
+
"""List of API key edges."""
|
|
99
|
+
edges: [ApiKeyEdge!]!
|
|
100
|
+
"""Pagination metadata."""
|
|
101
|
+
pageInfo: PageInfo!
|
|
102
|
+
"""Total number of API keys."""
|
|
103
|
+
totalCount: Int!
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### `ApiKeyCreatePayload`
|
|
108
|
+
|
|
109
|
+
```graphql
|
|
110
|
+
"""
|
|
111
|
+
Payload returned by `apiKeyCreate`. WARNING: `apiKey` is the only place
|
|
112
|
+
the full secret is exposed; subsequent reads return only the prefix.
|
|
113
|
+
Show it to the user once and discard.
|
|
114
|
+
"""
|
|
115
|
+
type ApiKeyCreatePayload {
|
|
116
|
+
"""
|
|
117
|
+
The full API key — shown only once at creation time. Treat as sensitive.
|
|
118
|
+
"""
|
|
119
|
+
apiKey: String!
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### `ApiKeysInput`
|
|
124
|
+
|
|
125
|
+
```graphql
|
|
126
|
+
"""Input for listing API keys."""
|
|
127
|
+
input ApiKeysInput {
|
|
128
|
+
"""ID of the organisation to list keys for."""
|
|
129
|
+
organizationId: ID!
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### `ApiKeyCreateInput`
|
|
134
|
+
|
|
135
|
+
```graphql
|
|
136
|
+
"""
|
|
137
|
+
Input for `apiKeyCreate`. Scopes must be a subset of the creator's
|
|
138
|
+
scopes — granting a scope the caller does not hold is rejected with
|
|
139
|
+
`FORBIDDEN`.
|
|
140
|
+
"""
|
|
141
|
+
input ApiKeyCreateInput {
|
|
142
|
+
"""ID of the organisation to create the key in."""
|
|
143
|
+
organizationId: ID!
|
|
144
|
+
"""Display name for the API key."""
|
|
145
|
+
name: String!
|
|
146
|
+
"""
|
|
147
|
+
Optional project ID to scope the key to. When null, the key is org-wide. A
|
|
148
|
+
project-scoped key is refused on any operation outside that project, including
|
|
149
|
+
organization-level ones.
|
|
150
|
+
"""
|
|
151
|
+
projectId: ID
|
|
152
|
+
"""
|
|
153
|
+
Required scopes for this API key. Must be a subset of the creator's scopes, and
|
|
154
|
+
of the project-level scopes when `projectId` is set.
|
|
155
|
+
"""
|
|
156
|
+
scopes: [Scope!]!
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### `ApiKeyRevokeInput`
|
|
161
|
+
|
|
162
|
+
```graphql
|
|
163
|
+
"""Input for `apiKeyRevoke` — invalidates the key immediately."""
|
|
164
|
+
input ApiKeyRevokeInput {
|
|
165
|
+
"""ID of the API key to revoke."""
|
|
166
|
+
keyId: ID!
|
|
167
|
+
"""ID of the organisation the key belongs to."""
|
|
168
|
+
organizationId: ID!
|
|
169
|
+
}
|
|
170
|
+
```
|