picked 0.0.101 → 0.0.102-next.2

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 (36) hide show
  1. package/docs/reference/dashboard/workflow-test-runs.md +40 -17
  2. package/docs/reference/management-api/schema/action.md +67 -79
  3. package/docs/reference/management-api/schema/analytics-session.md +77 -94
  4. package/docs/reference/management-api/schema/analytics.md +16 -14
  5. package/docs/reference/management-api/schema/api-key.md +43 -51
  6. package/docs/reference/management-api/schema/auth.md +271 -404
  7. package/docs/reference/management-api/schema/cms-fields.md +348 -245
  8. package/docs/reference/management-api/schema/cms-models.md +369 -378
  9. package/docs/reference/management-api/schema/common.md +69 -130
  10. package/docs/reference/management-api/schema/condition.md +63 -74
  11. package/docs/reference/management-api/schema/design-system.md +59 -51
  12. package/docs/reference/management-api/schema/experience.md +388 -364
  13. package/docs/reference/management-api/schema/external-api.md +153 -171
  14. package/docs/reference/management-api/schema/feature.md +85 -103
  15. package/docs/reference/management-api/schema/feedback.md +27 -31
  16. package/docs/reference/management-api/schema/field.md +117 -135
  17. package/docs/reference/management-api/schema/index.md +184 -184
  18. package/docs/reference/management-api/schema/integration.md +72 -78
  19. package/docs/reference/management-api/schema/label.md +81 -137
  20. package/docs/reference/management-api/schema/lead.md +80 -119
  21. package/docs/reference/management-api/schema/mcp-server.md +73 -71
  22. package/docs/reference/management-api/schema/metric.md +6 -9
  23. package/docs/reference/management-api/schema/operation.md +17 -26
  24. package/docs/reference/management-api/schema/organization.md +198 -220
  25. package/docs/reference/management-api/schema/project.md +177 -186
  26. package/docs/reference/management-api/schema/report.md +69 -65
  27. package/docs/reference/management-api/schema/saved-view.md +71 -71
  28. package/docs/reference/management-api/schema/shopify.md +331 -204
  29. package/docs/reference/management-api/schema/step.md +72 -80
  30. package/docs/reference/management-api/schema/tenant-branding.md +48 -70
  31. package/docs/reference/management-api/schema/workbench.md +54 -66
  32. package/docs/reference/management-api/schema/workflow-run.md +66 -79
  33. package/docs/reference/management-api/schema/workflow.md +310 -353
  34. package/docs/reference/management-api/schema/workspace-version.md +212 -261
  35. package/docs/reference/management-api/schema/workspace.md +275 -328
  36. package/package.json +4 -4
@@ -6,7 +6,7 @@ generated: true
6
6
 
7
7
  # Analytics session schema
8
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.
9
+ See [Management API schema](/reference/management-api/schema) for every domain, the endpoint and authentication.
10
10
 
11
11
  ## Types
12
12
 
@@ -14,40 +14,35 @@ The operations and types that `analytics-session.graphql` adds to the Management
14
14
 
15
15
  ```graphql
16
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.
17
+ A visit: the analytics events one visitor produced on a site, from their first event until 30
18
+ minutes passed without another.
20
19
  """
21
20
  type AnalyticsSession {
22
- """The identity resolver's session identifier."""
21
+ """The ID of the session."""
23
22
  id: ID!
24
23
  """
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`.
24
+ What the visit adds up to: when it started and ended, how the visitor arrived, and their device
25
+ and location.
26
+ Scope: `ORGANIZATION_LEADS_READ`.
28
27
  """
29
28
  summary: AnalyticsSessionSummary! @auth
30
29
  """
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`.
30
+ The visit's timeline, oldest first. Without a cursor, the page is anchored on the visit's capture
31
+ event, or on its latest event when it captured no lead: `last` ends the page there, `first`
32
+ starts it there, and with neither the page is the 20 events ending there. A page holds at most
33
+ 100 events. The newest events can take a few minutes to arrive.
34
+ Scope: `ORGANIZATION_LEADS_READ`.
36
35
  """
37
36
  events(first: Int, after: String, last: Int, before: String): AnalyticsEventConnection! @auth
38
37
  """
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`.
38
+ The lead captured during the visit. Null when the visit captured none. Reached through
39
+ `Lead.session`, it is that lead; otherwise it is the latest lead the visit captured.
40
+ Scope: `ORGANIZATION_LEADS_READ`.
43
41
  """
44
42
  lead: Lead @auth
45
43
  """
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`.
44
+ The Session reports on the visit: the overview, the journey and the event log, in that order.
45
+ Scope: `ORGANIZATION_LEADS_READ`.
51
46
  """
52
47
  reports: [AnalyticsSessionReport!]! @auth
53
48
  }
@@ -57,15 +52,13 @@ type AnalyticsSession {
57
52
 
58
53
  ```graphql
59
54
  """
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.
55
+ A report on one analytics session, embedded so that it shows that visit and no other.
62
56
  """
63
57
  type AnalyticsSessionReport {
64
58
  """Which of the Session reports this is."""
65
59
  kind: AnalyticsSessionReportKind!
66
60
  """
67
- URL of a signed embed of the report, for an iframe. The
68
- signature expires 3 hours after the field is read.
61
+ The URL of a signed embed of the report, for an iframe. It expires 3 hours after it is read.
69
62
  """
70
63
  embedUrl: String!
71
64
  }
@@ -74,7 +67,7 @@ type AnalyticsSessionReport {
74
67
  ### `AnalyticsSessionReportKind`
75
68
 
76
69
  ```graphql
77
- """The Session reports."""
70
+ """The reports on one analytics session."""
78
71
  enum AnalyticsSessionReportKind {
79
72
  """
80
73
  How the visit ended, who the visitor was, when they were active and their other visits.
@@ -84,7 +77,7 @@ enum AnalyticsSessionReportKind {
84
77
  Every step entry in order, with time on step, submit outcomes, errors and clicks.
85
78
  """
86
79
  JOURNEY
87
- """Every event the visit recorded, in order, in the visitor's clock."""
80
+ """Every event the visit recorded, in order, by the visitor's clock."""
88
81
  EVENT_LOG
89
82
  }
90
83
  ```
@@ -93,17 +86,14 @@ enum AnalyticsSessionReportKind {
93
86
 
94
87
  ```graphql
95
88
  """
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.
89
+ A report on all of a project's analytics sessions, embedded so that it shows that project's
90
+ sessions and no other. Its date range is a filter inside the embed.
100
91
  """
101
92
  type AnalyticsSessionsReport {
102
93
  """Which of the Sessions reports this is."""
103
94
  kind: AnalyticsSessionsReportKind!
104
95
  """
105
- URL of a signed embed of the report, for an iframe. The
106
- signature expires 3 hours after the field is read.
96
+ The URL of a signed embed of the report, for an iframe. It expires 3 hours after it is read.
107
97
  """
108
98
  embedUrl: String!
109
99
  }
@@ -112,7 +102,7 @@ type AnalyticsSessionsReport {
112
102
  ### `AnalyticsSessionsReportKind`
113
103
 
114
104
  ```graphql
115
- """The Sessions reports."""
105
+ """The reports on all of a project's analytics sessions."""
116
106
  enum AnalyticsSessionsReportKind {
117
107
  """
118
108
  How sessions arrive: volume, channel, referrer, campaign, landing page, device, place and time of arrival.
@@ -123,7 +113,7 @@ enum AnalyticsSessionsReportKind {
123
113
  """
124
114
  JOURNEYS
125
115
  """
126
- Which sessions convert: the funnel, the conversion rate by week and by segment.
116
+ Which sessions convert: the funnel, and the conversion rate by week and by segment.
127
117
  """
128
118
  CONVERSION
129
119
  }
@@ -132,21 +122,17 @@ enum AnalyticsSessionsReportKind {
132
122
  ### `AnalyticsSessionConnection`
133
123
 
134
124
  ```graphql
135
- """
136
- Relay-style connection of analytics sessions, with both an `edges` list and a flat `nodes` accessor.
137
- """
125
+ """A page of analytics sessions."""
138
126
  type AnalyticsSessionConnection {
139
- """List of analytics-session edges."""
127
+ """The edges in this page."""
140
128
  edges: [AnalyticsSessionEdge!]!
141
- """
142
- Flat list of analytics sessions, equivalent to `edges[].node`. Convenience accessor.
143
- """
129
+ """The items in this page."""
144
130
  nodes: [AnalyticsSession!]!
145
- """Pagination metadata."""
131
+ """Where this page sits in the list."""
146
132
  pageInfo: PageInfo!
147
133
  """
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.
134
+ Metrics over every session in the connection's `window`, across all pages. Pass `first: 0` on
135
+ `Project.analyticsSessions` to read the metrics without a page.
150
136
  """
151
137
  metrics: AnalyticsSessionMetrics!
152
138
  }
@@ -156,15 +142,13 @@ type AnalyticsSessionConnection {
156
142
 
157
143
  ```graphql
158
144
  """
159
- Metrics over the sessions an `AnalyticsSessionConnection` holds. Every metric
160
- ignores the connection's page.
145
+ Metrics over the sessions an `AnalyticsSessionConnection` holds, across all pages.
161
146
  """
162
147
  type AnalyticsSessionMetrics {
163
148
  """
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`.
149
+ The number of sessions, by when each started. A session counts from its first event inside the
150
+ window, so a visit that began before the window counts. `groupBy: CONVERTED` splits the count
151
+ into `converted` and `not_converted`.
168
152
  """
169
153
  count(groupBy: AnalyticsSessionCountGroupBy): CountMetric!
170
154
  }
@@ -175,10 +159,7 @@ type AnalyticsSessionMetrics {
175
159
  ```graphql
176
160
  """What a session count can be split by."""
177
161
  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
- """
162
+ """Whether one of the session's events inside the window captured a lead."""
182
163
  CONVERTED
183
164
  }
184
165
  ```
@@ -186,11 +167,11 @@ enum AnalyticsSessionCountGroupBy {
186
167
  ### `AnalyticsSessionEdge`
187
168
 
188
169
  ```graphql
189
- """Edge type for `AnalyticsSessionConnection`."""
170
+ """An analytics session in a page of results."""
190
171
  type AnalyticsSessionEdge {
191
- """Pagination cursor for this edge."""
172
+ """The cursor of this edge."""
192
173
  cursor: String!
193
- """The analytics session."""
174
+ """The item."""
194
175
  node: AnalyticsSession!
195
176
  }
196
177
  ```
@@ -206,29 +187,30 @@ type AnalyticsSessionSummary {
206
187
  startedAt: DateTime!
207
188
  """When the session's last event happened, by the visitor's device clock."""
208
189
  endedAt: DateTime!
209
- """How many events the session's `events` timeline lists."""
190
+ """The number of events the session's `events` timeline lists."""
210
191
  eventCount: Int!
211
- """How many pages the visitor viewed."""
192
+ """The number of pages the visitor viewed."""
212
193
  pageViewCount: Int!
213
- """Full URL of the first page the session's events happened on."""
194
+ """
195
+ The full URL of the session's first page. Null when no event recorded one.
196
+ """
214
197
  landingPageUrl: String
215
198
  """
216
- Where the visitor came from, as the tracker classified the landing page's referrer.
199
+ Where the visitor came from. Null when the landing page had no referrer.
217
200
  """
218
201
  referrer: AnalyticsReferrer
219
- """The UTM campaign the landing page's URL carried."""
202
+ """The UTM campaign of the landing page's URL. Null when it carried none."""
220
203
  campaign: AnalyticsCampaign
221
- """The visitor's device, as parsed from their user agent."""
204
+ """The visitor's device. Null when it is unknown."""
222
205
  device: AnalyticsDevice
223
- """Where the visitor was, as looked up from their IP address."""
206
+ """Where the visitor was. Null when it is unknown."""
224
207
  location: AnalyticsLocation
225
208
  """
226
- The visitor's Google Analytics client ID, from the session's first event to carry one.
209
+ The visitor's Google Analytics client ID, from the first event to carry one. Null when none did.
227
210
  """
228
211
  gaid: String
229
212
  """
230
- The visitor's Picked ID: the canonical id identity resolution gave them, from the session's
231
- first event to carry one.
213
+ The visitor's Picked ID, from the first event to carry one. Null when none did.
232
214
  """
233
215
  visitorId: String
234
216
  }
@@ -237,7 +219,7 @@ type AnalyticsSessionSummary {
237
219
  ### `AnalyticsReferrer`
238
220
 
239
221
  ```graphql
240
- """The site that referred a visitor, as the tracker classified its URL."""
222
+ """The site that referred a visitor. A field is null when it is unknown."""
241
223
  type AnalyticsReferrer {
242
224
  """The referrer's name, in lowercase, such as `google` or `facebook`."""
243
225
  source: String
@@ -251,7 +233,9 @@ type AnalyticsReferrer {
251
233
  ### `AnalyticsCampaign`
252
234
 
253
235
  ```graphql
254
- """A visit's UTM campaign parameters."""
236
+ """
237
+ A visit's UTM campaign parameters. A field is null when the URL did not carry it.
238
+ """
255
239
  type AnalyticsCampaign {
256
240
  """`utm_source`."""
257
241
  source: String
@@ -265,7 +249,9 @@ type AnalyticsCampaign {
265
249
  ### `AnalyticsDevice`
266
250
 
267
251
  ```graphql
268
- """A visitor's device, as parsed from their user agent."""
252
+ """
253
+ A visitor's device, as read from their user agent. A field is null when it is unknown.
254
+ """
269
255
  type AnalyticsDevice {
270
256
  """The class of device, such as `Desktop`, `Phone` or `Tablet`."""
271
257
  category: String
@@ -283,7 +269,9 @@ type AnalyticsDevice {
283
269
  ### `AnalyticsLocation`
284
270
 
285
271
  ```graphql
286
- """Where a visitor was, as looked up from their IP address."""
272
+ """
273
+ Where a visitor was, as looked up from their IP address. A field is null when it is unknown.
274
+ """
287
275
  type AnalyticsLocation {
288
276
  """The city's English name."""
289
277
  city: String
@@ -300,12 +288,11 @@ type AnalyticsLocation {
300
288
 
301
289
  ```graphql
302
290
  """
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.
291
+ One analytics event in a visit: a page viewed, a step entered or submitted, a product added to the
292
+ cart, a lead captured. A text field is null when the event did not record it.
306
293
  """
307
294
  type AnalyticsEvent {
308
- """Unique event identifier."""
295
+ """The ID of the event."""
309
296
  id: ID!
310
297
  """
311
298
  The event type, such as `page_view`, `step_enter`, `cart_add` or `lead_created`.
@@ -313,17 +300,17 @@ type AnalyticsEvent {
313
300
  type: String!
314
301
  """When the event happened, by the visitor's device clock."""
315
302
  occurredAt: DateTime!
316
- """Full URL of the page the event happened on."""
303
+ """The full URL of the page the event happened on."""
317
304
  pageUrl: String
318
- """Path of the page the event happened on."""
305
+ """The path of the page the event happened on."""
319
306
  pagePath: String
320
- """Title of the experience the event happened in."""
307
+ """The title of the experience the event happened in."""
321
308
  experienceTitle: String
322
- """Title of the step the event concerns."""
309
+ """The title of the step the event concerns."""
323
310
  stepTitle: String
324
- """Title of the form the event concerns."""
311
+ """The title of the form the event concerns."""
325
312
  formTitle: String
326
- """Title of the modal the event concerns."""
313
+ """The title of the modal the event concerns."""
327
314
  modalTitle: String
328
315
  """
329
316
  The name of a product the event concerns: one of them, when it concerns several.
@@ -335,17 +322,13 @@ type AnalyticsEvent {
335
322
  ### `AnalyticsEventConnection`
336
323
 
337
324
  ```graphql
338
- """
339
- Relay-style connection of analytics events, with both an `edges` list and a flat `nodes` accessor.
340
- """
325
+ """A page of analytics events."""
341
326
  type AnalyticsEventConnection {
342
- """List of analytics-event edges."""
327
+ """The edges in this page."""
343
328
  edges: [AnalyticsEventEdge!]!
344
- """
345
- Flat list of analytics events, equivalent to `edges[].node`. Convenience accessor.
346
- """
329
+ """The items in this page."""
347
330
  nodes: [AnalyticsEvent!]!
348
- """Pagination metadata."""
331
+ """Where this page sits in the list."""
349
332
  pageInfo: PageInfo!
350
333
  }
351
334
  ```
@@ -353,11 +336,11 @@ type AnalyticsEventConnection {
353
336
  ### `AnalyticsEventEdge`
354
337
 
355
338
  ```graphql
356
- """Edge type for `AnalyticsEventConnection`."""
339
+ """An analytics event in a page of results."""
357
340
  type AnalyticsEventEdge {
358
- """Pagination cursor for this edge."""
341
+ """The cursor of this edge."""
359
342
  cursor: String!
360
- """The analytics event."""
343
+ """The item."""
361
344
  node: AnalyticsEvent!
362
345
  }
363
346
  ```
@@ -6,13 +6,15 @@ generated: true
6
6
 
7
7
  # Analytics schema
8
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.
9
+ See [Management API schema](/reference/management-api/schema) for every domain, the endpoint and authentication.
10
10
 
11
11
  ## Queries
12
12
 
13
13
  ### `pickedqlQuery`
14
14
 
15
- Execute a PickedQL query scoped to the caller's authorised projects.
15
+ Runs a PickedQL query against one project's analytics data. A statement that does not parse, or
16
+ queries a project's data without a `project_id` filter, fails with `VALIDATION_ERROR`.
17
+ Scope: `ORGANIZATION_REPORTS_READ`.
16
18
 
17
19
  ```graphql
18
20
  pickedqlQuery(input: PickedqlQueryInput!): PickedqlQueryResult! @auth
@@ -23,10 +25,10 @@ pickedqlQuery(input: PickedqlQueryInput!): PickedqlQueryResult! @auth
23
25
  ### `PickedqlQueryInput`
24
26
 
25
27
  ```graphql
26
- """Input for `pickedqlQuery` — execute a PickedQL statement."""
28
+ """The input of `pickedqlQuery`."""
27
29
  input PickedqlQueryInput {
28
30
  """
29
- The SQL query to execute. Must include a tenant filter (e.g. `WHERE project_id = '…'`).
31
+ The PickedQL statement. A query of a project's data must filter on `project_id`.
30
32
  """
31
33
  sql: String!
32
34
  }
@@ -35,13 +37,13 @@ input PickedqlQueryInput {
35
37
  ### `PickedqlTableDataColumn`
36
38
 
37
39
  ```graphql
38
- """Column metadata for a PickedQL query result."""
40
+ """A column of a PickedQL result."""
39
41
  type PickedqlTableDataColumn {
40
- """The column identifier."""
42
+ """The column's name."""
41
43
  name: String!
42
- """The data type (e.g. `String`, `UInt64`, `DateTime`)."""
44
+ """The column's data type, such as `String`, `UInt64` or `DateTime`."""
43
45
  dataType: String!
44
- """Human-readable column label."""
46
+ """The column's label."""
45
47
  displayName: String!
46
48
  }
47
49
  ```
@@ -49,12 +51,12 @@ type PickedqlTableDataColumn {
49
51
  ### `PickedqlTableData`
50
52
 
51
53
  ```graphql
52
- """Structured table data from a PickedQL query."""
54
+ """The rows and columns a PickedQL query returned."""
53
55
  type PickedqlTableData {
54
- """Column definitions with name, type, and display name."""
56
+ """The columns, in order."""
55
57
  columns: [PickedqlTableDataColumn!]!
56
58
  """
57
- Rows of cell values. Each row is a list of stringified cell values aligned with the `columns` array.
59
+ The rows. Each row holds one cell per column, as a string; null for a null cell.
58
60
  """
59
61
  rowData: [[String]!]!
60
62
  }
@@ -63,11 +65,11 @@ type PickedqlTableData {
63
65
  ### `PickedqlQueryResult`
64
66
 
65
67
  ```graphql
66
- """Result of a PickedQL query (ShopifyQL-style structured shape)."""
68
+ """The result of a PickedQL query."""
67
69
  type PickedqlQueryResult {
68
- """Structured table data, null if the query failed to parse or validate."""
70
+ """The rows and columns. Null when the query failed to run."""
69
71
  tableData: PickedqlTableData
70
- """Parse or validation errors, empty if the query succeeded."""
72
+ """The errors that stopped the query from running. Empty when it ran."""
71
73
  parseErrors: [String!]!
72
74
  }
73
75
  ```
@@ -6,13 +6,14 @@ generated: true
6
6
 
7
7
  # Api key schema
8
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.
9
+ See [Management API schema](/reference/management-api/schema) for every domain, the endpoint and authentication.
10
10
 
11
11
  ## Queries
12
12
 
13
13
  ### `apiKeys`
14
14
 
15
- List API keys for an organisation. Requires authentication.
15
+ Lists an organisation's API keys, newest first. Revoked keys are left out.
16
+ Scope: `ORGANIZATION_API_KEYS_READ`.
16
17
 
17
18
  ```graphql
18
19
  apiKeys(input: ApiKeysInput!): [ApiKey!]! @auth
@@ -22,7 +23,9 @@ apiKeys(input: ApiKeysInput!): [ApiKey!]! @auth
22
23
 
23
24
  ### `apiKeyCreate`
24
25
 
25
- Create a new API key. Requires scope: `ORGANIZATION_API_KEYS_CREATE`. User authentication only (not API key).
26
+ Creates an API key and returns the full key, once. A blank name, no scopes, or a scope the caller
27
+ does not hold or the key cannot carry returns `VALIDATION_ERROR`.
28
+ Scope: `ORGANIZATION_API_KEYS_CREATE`.
26
29
 
27
30
  ```graphql
28
31
  apiKeyCreate(input: ApiKeyCreateInput!): ApiKeyCreatePayload! @auth(only: USER)
@@ -30,7 +33,9 @@ apiKeyCreate(input: ApiKeyCreateInput!): ApiKeyCreatePayload! @auth(only: USER)
30
33
 
31
34
  ### `apiKeyRevoke`
32
35
 
33
- Revoke an API key. Requires scope: `ORGANIZATION_API_KEYS_DELETE`.
36
+ Revokes an API key, which then stops authenticating at once. Cannot be undone; an unknown or
37
+ revoked key returns `NOT_FOUND`.
38
+ Scope: `ORGANIZATION_API_KEYS_DELETE`.
34
39
 
35
40
  ```graphql
36
41
  apiKeyRevoke(input: ApiKeyRevokeInput!): Boolean! @auth
@@ -42,38 +47,33 @@ apiKeyRevoke(input: ApiKeyRevokeInput!): Boolean! @auth
42
47
 
43
48
  ```graphql
44
49
  """
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`).
50
+ A credential for a server-to-server integration. It belongs to an organisation, can belong to one
51
+ project, and carries scopes. The full key is returned only once, by `apiKeyCreate`.
52
52
  """
53
53
  type ApiKey {
54
- """Unique identifier for the API key."""
54
+ """The ID of the API key."""
55
55
  id: ID!
56
- """Display name of the API key."""
56
+ """The name of the API key."""
57
57
  name: String!
58
58
  """
59
- Prefix of the key for identification (e.g. `pk_abc12…`). Safe to log and display.
59
+ The first 8 and last 3 characters of the key, to tell keys apart. Safe to display.
60
60
  """
61
61
  keyPrefix: String!
62
62
  """
63
- ID of the project this key is scoped to, or null when the key is org-wide.
63
+ The ID of the project the key belongs to. Null when the key covers the whole organisation.
64
64
  """
65
65
  projectId: String
66
- """Name of the project this key is scoped to (denormalised for display)."""
66
+ """
67
+ The name of the project the key belongs to. Null when the key covers the whole organisation.
68
+ """
67
69
  projectName: String
68
- """ID of the user who created this key."""
70
+ """The ID of the user who created the key."""
69
71
  createdBy: ID!
70
- """Email of the user who created this key (denormalised for display)."""
72
+ """The email address of the user who created the key."""
71
73
  createdByEmail: String!
72
- """When this key was created."""
74
+ """When the key was created."""
73
75
  createdAt: String!
74
- """
75
- Scopes this API key has access to. Must be a subset of the creator's scopes at creation time.
76
- """
76
+ """The scopes the key holds."""
77
77
  scopes: [Scope!]!
78
78
  }
79
79
  ```
@@ -81,9 +81,9 @@ type ApiKey {
81
81
  ### `ApiKeyEdge`
82
82
 
83
83
  ```graphql
84
- """Edge type for `ApiKeyConnection`."""
84
+ """An API key in a page of results."""
85
85
  type ApiKeyEdge {
86
- """Pagination cursor for this edge."""
86
+ """The cursor of this edge."""
87
87
  cursor: String!
88
88
  """The API key."""
89
89
  node: ApiKey!
@@ -93,13 +93,13 @@ type ApiKeyEdge {
93
93
  ### `ApiKeyConnection`
94
94
 
95
95
  ```graphql
96
- """Relay-style connection of API keys."""
96
+ """A page of API keys."""
97
97
  type ApiKeyConnection {
98
- """List of API key edges."""
98
+ """The edges in this page."""
99
99
  edges: [ApiKeyEdge!]!
100
- """Pagination metadata."""
100
+ """Where this page sits in the list."""
101
101
  pageInfo: PageInfo!
102
- """Total number of API keys."""
102
+ """The total number of API keys."""
103
103
  totalCount: Int!
104
104
  }
105
105
  ```
@@ -108,14 +108,11 @@ type ApiKeyConnection {
108
108
 
109
109
  ```graphql
110
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.
111
+ The result of `apiKeyCreate`. `apiKey` is the only place the full key appears; later reads return
112
+ `keyPrefix` only.
114
113
  """
115
114
  type ApiKeyCreatePayload {
116
- """
117
- The full API key — shown only once at creation time. Treat as sensitive.
118
- """
115
+ """The full API key. Returned only here."""
119
116
  apiKey: String!
120
117
  }
121
118
  ```
@@ -123,9 +120,9 @@ type ApiKeyCreatePayload {
123
120
  ### `ApiKeysInput`
124
121
 
125
122
  ```graphql
126
- """Input for listing API keys."""
123
+ """The input of `apiKeys`."""
127
124
  input ApiKeysInput {
128
- """ID of the organisation to list keys for."""
125
+ """The ID of the organisation whose keys to list."""
129
126
  organizationId: ID!
130
127
  }
131
128
  ```
@@ -133,25 +130,20 @@ input ApiKeysInput {
133
130
  ### `ApiKeyCreateInput`
134
131
 
135
132
  ```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
- """
133
+ """The input of `apiKeyCreate`."""
141
134
  input ApiKeyCreateInput {
142
- """ID of the organisation to create the key in."""
135
+ """The ID of the organisation the key belongs to."""
143
136
  organizationId: ID!
144
- """Display name for the API key."""
137
+ """The name of the key. Must not be blank."""
145
138
  name: String!
146
139
  """
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.
140
+ The ID of the project to restrict the key to. Null for a key that covers the whole organisation.
141
+ A project key is refused on any operation outside that project, organisation-level ones included.
150
142
  """
151
143
  projectId: ID
152
144
  """
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.
145
+ The scopes the key holds. At least one, each held by the caller and assignable to an organisation
146
+ key, or to a project key when `projectId` is set.
155
147
  """
156
148
  scopes: [Scope!]!
157
149
  }
@@ -160,11 +152,11 @@ input ApiKeyCreateInput {
160
152
  ### `ApiKeyRevokeInput`
161
153
 
162
154
  ```graphql
163
- """Input for `apiKeyRevoke` — invalidates the key immediately."""
155
+ """The input of `apiKeyRevoke`."""
164
156
  input ApiKeyRevokeInput {
165
- """ID of the API key to revoke."""
157
+ """The ID of the API key to revoke."""
166
158
  keyId: ID!
167
- """ID of the organisation the key belongs to."""
159
+ """Not read: the key's own organisation applies."""
168
160
  organizationId: ID!
169
161
  }
170
162
  ```