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,13 +6,14 @@ generated: true
6
6
 
7
7
  # External api schema
8
8
 
9
- The operations and types that `external-api.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
  ### `externalApi`
14
14
 
15
- Fetch a single external API by ID, or null if it does not exist. Requires authentication and `ORGANIZATION_INTEGRATIONS_READ` on its project.
15
+ Reads an external API. Null when it does not exist.
16
+ Scope: `ORGANIZATION_INTEGRATIONS_READ`.
16
17
 
17
18
  ```graphql
18
19
  externalApi(input: ExternalApiInput!): ExternalApi @auth
@@ -22,7 +23,8 @@ externalApi(input: ExternalApiInput!): ExternalApi @auth
22
23
 
23
24
  ### `externalApiCreate`
24
25
 
25
- Register an external API to a project. Requires a user context and `ORGANIZATION_INTEGRATIONS_CREATE`; API keys are rejected.
26
+ Creates an external API in a project, with an optional credential.
27
+ Scope: `ORGANIZATION_INTEGRATIONS_CREATE`.
26
28
 
27
29
  ```graphql
28
30
  externalApiCreate(input: ExternalApiCreateInput!): ExternalApiCreatePayload! @auth(only: USER)
@@ -30,7 +32,8 @@ externalApiCreate(input: ExternalApiCreateInput!): ExternalApiCreatePayload! @au
30
32
 
31
33
  ### `externalApiUpdate`
32
34
 
33
- Rename an external API. Requires a user context and `ORGANIZATION_INTEGRATIONS_UPDATE`; API keys are rejected.
35
+ Updates the name of an external API. To change the origin, delete it and create another.
36
+ Scope: `ORGANIZATION_INTEGRATIONS_UPDATE`.
34
37
 
35
38
  ```graphql
36
39
  externalApiUpdate(input: ExternalApiUpdateInput!): ExternalApiUpdatePayload! @auth(only: USER)
@@ -38,7 +41,8 @@ externalApiUpdate(input: ExternalApiUpdateInput!): ExternalApiUpdatePayload! @au
38
41
 
39
42
  ### `externalApiAuthHeaderSet`
40
43
 
41
- Set or replace the single static auth header on an external API, removing an OAuth2 credential it holds. Requires a user context and `ORGANIZATION_INTEGRATIONS_UPDATE`; API keys are rejected.
44
+ Sets the static auth header of an external API, and removes any OAuth2 credential.
45
+ Scope: `ORGANIZATION_INTEGRATIONS_UPDATE`.
42
46
 
43
47
  ```graphql
44
48
  externalApiAuthHeaderSet(input: ExternalApiAuthHeaderSetInput!): ExternalApiAuthHeaderSetPayload! @auth(only: USER)
@@ -46,7 +50,9 @@ externalApiAuthHeaderSet(input: ExternalApiAuthHeaderSetInput!): ExternalApiAuth
46
50
 
47
51
  ### `externalApiAuthHeaderClear`
48
52
 
49
- Remove the static auth header from an external API. Idempotent. Requires a user context and `ORGANIZATION_INTEGRATIONS_UPDATE`; API keys are rejected.
53
+ Removes the static auth header of an external API. An external API with no static header is
54
+ unchanged.
55
+ Scope: `ORGANIZATION_INTEGRATIONS_UPDATE`.
50
56
 
51
57
  ```graphql
52
58
  externalApiAuthHeaderClear(input: ExternalApiAuthHeaderClearInput!): ExternalApiAuthHeaderClearPayload! @auth(only: USER)
@@ -54,7 +60,9 @@ externalApiAuthHeaderClear(input: ExternalApiAuthHeaderClearInput!): ExternalApi
54
60
 
55
61
  ### `externalApiOAuth2Set`
56
62
 
57
- Set or replace the OAuth2 credential on an external API, removing a static auth header it holds. Requires a user context and `ORGANIZATION_INTEGRATIONS_UPDATE`; API keys are rejected.
63
+ Sets the OAuth2 credential of an external API, and removes any static auth header. The next call
64
+ fetches a new access token.
65
+ Scope: `ORGANIZATION_INTEGRATIONS_UPDATE`.
58
66
 
59
67
  ```graphql
60
68
  externalApiOAuth2Set(input: ExternalApiOAuth2SetInput!): ExternalApiOAuth2SetPayload! @auth(only: USER)
@@ -62,7 +70,9 @@ externalApiOAuth2Set(input: ExternalApiOAuth2SetInput!): ExternalApiOAuth2SetPay
62
70
 
63
71
  ### `externalApiOAuth2Clear`
64
72
 
65
- Remove the OAuth2 credential, its secrets and its cached access token from an external API. Idempotent. Requires a user context and `ORGANIZATION_INTEGRATIONS_UPDATE`; API keys are rejected.
73
+ Removes the OAuth2 credential of an external API, with its secrets and cached access token. An
74
+ external API with no OAuth2 credential is unchanged.
75
+ Scope: `ORGANIZATION_INTEGRATIONS_UPDATE`.
66
76
 
67
77
  ```graphql
68
78
  externalApiOAuth2Clear(input: ExternalApiOAuth2ClearInput!): ExternalApiOAuth2ClearPayload! @auth(only: USER)
@@ -70,7 +80,8 @@ externalApiOAuth2Clear(input: ExternalApiOAuth2ClearInput!): ExternalApiOAuth2Cl
70
80
 
71
81
  ### `externalApiDelete`
72
82
 
73
- Delete an external API registration and its encrypted credentials. Idempotent. Requires a user context and `ORGANIZATION_INTEGRATIONS_DELETE`; API keys are rejected.
83
+ Deletes an external API and its credential. Workflows then cannot call its origin.
84
+ Scope: `ORGANIZATION_INTEGRATIONS_DELETE`.
74
85
 
75
86
  ```graphql
76
87
  externalApiDelete(input: ExternalApiDeleteInput!): ExternalApiDeletePayload! @auth(only: USER)
@@ -83,12 +94,12 @@ externalApiDelete(input: ExternalApiDeleteInput!): ExternalApiDeletePayload! @au
83
94
  ```graphql
84
95
  """How an external API authenticates the requests a workflow sends it."""
85
96
  enum ExternalApiAuthKind {
86
- """No credential: requests carry no auth header from the registry."""
97
+ """No credential."""
87
98
  NONE
88
99
  """A static auth header, set with `externalApiAuthHeaderSet`."""
89
100
  HEADER
90
101
  """
91
- An OAuth2 credential, set with `externalApiOAuth2Set`. The registry fetches an access token, caches it and refreshes it.
102
+ An OAuth2 credential, set with `externalApiOAuth2Set`. Picked fetches, caches and refreshes the access token.
92
103
  """
93
104
  OAUTH2
94
105
  }
@@ -97,16 +108,14 @@ enum ExternalApiAuthKind {
97
108
  ### `ExternalApiOAuth2Grant`
98
109
 
99
110
  ```graphql
100
- """
101
- The OAuth2 grant an external API's credential fetches its access token with.
102
- """
111
+ """The OAuth2 grant that fetches the access token of an external API."""
103
112
  enum ExternalApiOAuth2Grant {
104
113
  """
105
- The refresh-token grant (RFC 6749 section 6): the token request carries a stored refresh token.
114
+ The refresh-token grant (RFC 6749 section 6), which sends a stored refresh token.
106
115
  """
107
116
  REFRESH_TOKEN
108
117
  """
109
- The client-credentials grant (RFC 6749 section 4.4): the token request carries the client alone.
118
+ The client-credentials grant (RFC 6749 section 4.4), which sends the client alone.
110
119
  """
111
120
  CLIENT_CREDENTIALS
112
121
  }
@@ -115,7 +124,7 @@ enum ExternalApiOAuth2Grant {
115
124
  ### `ExternalApiOAuth2ClientAuth`
116
125
 
117
126
  ```graphql
118
- """Where the token request carries the client id and the client secret."""
127
+ """Where the token request carries the client ID and the client secret."""
119
128
  enum ExternalApiOAuth2ClientAuth {
120
129
  """As `client_id` and `client_secret` parameters in the form body."""
121
130
  BODY
@@ -128,20 +137,20 @@ enum ExternalApiOAuth2ClientAuth {
128
137
 
129
138
  ```graphql
130
139
  """
131
- Why the registry could not supply an access token. A failed `http` node
132
- records the same reason, in lower case, as `error.reason`.
140
+ Why Picked could not get an access token. A failed `http` node records the same reason, in lower
141
+ case, as `error.reason`.
133
142
  """
134
143
  enum ExternalApiCredentialFailureReason {
135
144
  """
136
- The token endpoint refused the credential (`invalid_client`, `invalid_grant`, `invalid_code`, `invalid_client_secret` or `unauthorized_client`). Not retryable: the credential needs fixing.
145
+ The token endpoint refused the credential, such as with `invalid_client` or `invalid_grant`. Not retryable: the credential needs fixing.
137
146
  """
138
147
  CREDENTIAL_REJECTED
139
148
  """
140
- The token endpoint timed out, could not be reached, answered 429 or 5xx, or answered without a token for another reason; or the node's timeout ran out first. Retryable. Callers fail at once for 60 seconds after one.
149
+ The token endpoint timed out, could not be reached, answered 429 or 5xx, or sent no token, or the node timed out first. Retryable; calls fail at once for 60 seconds after.
141
150
  """
142
151
  CREDENTIAL_REFRESH_FAILED
143
152
  """
144
- The vault no longer holds a secret the credential names. Not retryable: set the credential again.
153
+ A secret of the credential is missing. Not retryable: set the credential again.
145
154
  """
146
155
  CREDENTIAL_UNAVAILABLE
147
156
  }
@@ -150,11 +159,11 @@ enum ExternalApiCredentialFailureReason {
150
159
  ### `ExternalApiOAuth2TokenParam`
151
160
 
152
161
  ```graphql
153
- """One extra parameter of the token request, such as `scope`."""
162
+ """An extra parameter of the token request, such as `scope`."""
154
163
  type ExternalApiOAuth2TokenParam {
155
- """Parameter name."""
164
+ """The name of the parameter."""
156
165
  name: String!
157
- """Parameter value."""
166
+ """The value of the parameter."""
158
167
  value: String!
159
168
  }
160
169
  ```
@@ -163,8 +172,8 @@ type ExternalApiOAuth2TokenParam {
163
172
 
164
173
  ```graphql
165
174
  """
166
- Which 401 answers mark the access token as expired. A 401 refreshes the token
167
- only when the JSON body's value at `path` is one of `values`.
175
+ The 401 responses that mark the access token as expired: those whose JSON body holds one of
176
+ `values` at `path`.
168
177
  """
169
178
  type ExternalApiOAuth2RefreshOn401 {
170
179
  """
@@ -181,11 +190,11 @@ type ExternalApiOAuth2RefreshOn401 {
181
190
  ### `ExternalApiOAuth2RefreshFailure`
182
191
 
183
192
  ```graphql
184
- """The last token refresh that failed."""
193
+ """The last failed refresh of an access token."""
185
194
  type ExternalApiOAuth2RefreshFailure {
186
- """Why it failed."""
195
+ """Why the refresh failed."""
187
196
  reason: ExternalApiCredentialFailureReason!
188
- """When it failed."""
197
+ """When the refresh failed."""
189
198
  failedAt: DateTime!
190
199
  }
191
200
  ```
@@ -194,54 +203,43 @@ type ExternalApiOAuth2RefreshFailure {
194
203
 
195
204
  ```graphql
196
205
  """
197
- An external API's OAuth2 credential: the settings the registry fetches an
198
- access token with, and how its last refreshes went.
199
-
200
- The registry sends `<headerScheme> <access token>` in `headerName`. It uses a
201
- cached token until 60 seconds before it expires, and otherwise posts a
202
- form-encoded token request to `tokenUrl`, one refresh at a time per
203
- credential. A 401 to a token minted over a minute earlier, when
204
- `refreshOn401` is null or matches the body, discards the token and sends the
205
- request once more with a new one.
206
-
207
- The client secret and the refresh token are write-only: `clientSecretSet` and
208
- `refreshTokenSet` say whether each is held. No field returns an access token.
206
+ The OAuth2 credential of an external API. Picked sends `<headerScheme> <access token>` in
207
+ `headerName`, refreshes the token from `tokenUrl` 60 seconds before it expires, and retries once
208
+ with a new token after a 401 that `refreshOn401` matches.
209
209
  """
210
210
  type ExternalApiOAuth2 {
211
211
  """The grant the token request uses."""
212
212
  grant: ExternalApiOAuth2Grant!
213
213
  """The token endpoint, an `https` URL."""
214
214
  tokenUrl: String!
215
- """The OAuth2 client id."""
215
+ """The OAuth2 client ID."""
216
216
  clientId: String!
217
- """
218
- True when a client secret is held. The secret itself is never returned.
219
- """
217
+ """Whether a client secret is set. The secret is never returned."""
220
218
  clientSecretSet: Boolean!
221
219
  """
222
- True when a refresh token is held. Always false for `CLIENT_CREDENTIALS`. The token itself is never returned.
220
+ Whether a refresh token is set. Always false for `CLIENT_CREDENTIALS`. The token is never returned.
223
221
  """
224
222
  refreshTokenSet: Boolean!
225
223
  """Where the token request carries the client."""
226
224
  clientAuth: ExternalApiOAuth2ClientAuth!
227
- """Extra token-request parameters, such as `scope`."""
225
+ """The extra parameters of the token request, such as `scope`."""
228
226
  tokenParams: [ExternalApiOAuth2TokenParam!]!
229
- """The header the access token goes in, such as `Authorization`."""
227
+ """The header that carries the access token, such as `Authorization`."""
230
228
  headerName: String!
231
229
  """
232
- The scheme before the access token in that header, such as `Bearer` or `Zoho-oauthtoken`.
230
+ The scheme before the access token in the header, such as `Bearer` or `Zoho-oauthtoken`.
233
231
  """
234
232
  headerScheme: String!
235
233
  """
236
- Which 401 answers mark the token as expired, or null when every 401 does.
234
+ The 401 responses that mark the token as expired. Null when every 401 does.
237
235
  """
238
236
  refreshOn401: ExternalApiOAuth2RefreshOn401
239
237
  """
240
- When the registry last stored a new access token, or null before the first refresh.
238
+ When Picked last stored a new access token. Null before the first refresh.
241
239
  """
242
240
  lastRefreshedAt: DateTime
243
241
  """
244
- The last refresh that failed, or null when the last refresh succeeded or none has run.
242
+ The last failed refresh. Null when the last refresh succeeded or none has run.
245
243
  """
246
244
  lastRefreshFailure: ExternalApiOAuth2RefreshFailure
247
245
  }
@@ -251,44 +249,36 @@ type ExternalApiOAuth2 {
251
249
 
252
250
  ```graphql
253
251
  """
254
- An external API a project's workflows may call. A registration is one
255
- origin — scheme, host and optional port, no path — so `https://api.vendor.test`
256
- admits every path on that host. The `http` workflow tool sends a request only
257
- when the URL it resolves has a registered origin in the run's project, and
258
- attaches this API's credential when one is set.
259
-
260
- `authKind` says which credential the API holds: none, a static auth header,
261
- or an OAuth2 credential. Every secret is write-only: it is encrypted at rest
262
- and no field of this API returns it. `authHeaderSet` says whether a static
263
- header exists and `authHeaderName` which header it goes in; `oauth2` describes
264
- an OAuth2 credential.
252
+ An origin that the workflows of a project can call with the `http` tool, and the credential that
253
+ Picked attaches to those calls. Secrets are encrypted at rest and never returned.
265
254
  """
266
255
  type ExternalApi {
267
- """Unique external API identifier (`xapi_…`)."""
256
+ """The ID of the external API."""
268
257
  id: ID!
269
- """ID of the project this external API belongs to."""
258
+ """The ID of the project the external API belongs to."""
270
259
  projectId: ID!
271
- """Display name."""
260
+ """The name of the external API."""
272
261
  name: String!
273
262
  """
274
- The origin — scheme, host and optional port, with no path (e.g. `https://api.vendor.test`). Normalised: lower-case host, default port dropped.
263
+ The origin: scheme, host and optional port, with no path, such as `https://api.vendor.test`. The
264
+ host is lower case and a default port is dropped. Every path on the origin is allowed.
275
265
  """
276
266
  origin: String!
277
- """How this external API authenticates."""
267
+ """The kind of credential."""
278
268
  authKind: ExternalApiAuthKind!
279
269
  """
280
- The static auth header's name, or null when the external API holds no static header.
270
+ The name of the static auth header. Null when there is no static header.
281
271
  """
282
272
  authHeaderName: String
283
273
  """
284
- True when a static auth header value is held (`authKind: HEADER`). The value itself is never returned.
274
+ Whether a static auth header value is set. The value is never returned.
285
275
  """
286
276
  authHeaderSet: Boolean!
287
- """The OAuth2 credential, or null unless `authKind` is `OAUTH2`."""
277
+ """The OAuth2 credential. Null unless `authKind` is `OAUTH2`."""
288
278
  oauth2: ExternalApiOAuth2
289
- """When this external API was registered."""
279
+ """When the external API was created."""
290
280
  createdAt: DateTime!
291
- """When this external API was last updated."""
281
+ """When the external API last changed."""
292
282
  updatedAt: DateTime!
293
283
  }
294
284
  ```
@@ -296,9 +286,9 @@ type ExternalApi {
296
286
  ### `ExternalApiEdge`
297
287
 
298
288
  ```graphql
299
- """Edge type for the external API connection."""
289
+ """An external API in a page of results."""
300
290
  type ExternalApiEdge {
301
- """Pagination cursor for this edge."""
291
+ """The cursor of this edge."""
302
292
  cursor: String!
303
293
  """The external API."""
304
294
  node: ExternalApi!
@@ -308,15 +298,13 @@ type ExternalApiEdge {
308
298
  ### `ExternalApiConnection`
309
299
 
310
300
  ```graphql
311
- """
312
- Connection type for external APIs (Relay-style pagination), newest first.
313
- """
301
+ """A page of external APIs, newest first."""
314
302
  type ExternalApiConnection {
315
- """List of external API edges."""
303
+ """The edges in this page."""
316
304
  edges: [ExternalApiEdge!]!
317
- """Pagination information."""
305
+ """Where this page sits in the list."""
318
306
  pageInfo: PageInfo!
319
- """Total number of live external APIs registered to the project."""
307
+ """The total number of external APIs in the project."""
320
308
  totalCount: Int!
321
309
  }
322
310
  ```
@@ -324,13 +312,11 @@ type ExternalApiConnection {
324
312
  ### `ExternalApiAuthHeaderInput`
325
313
 
326
314
  ```graphql
327
- """
328
- A single auth header to send when calling a registered external API. The value is encrypted at rest and only ever decrypted server-side, inside the workflow step that sends the request.
329
- """
315
+ """A static auth header for the calls to an external API."""
330
316
  input ExternalApiAuthHeaderInput {
331
- """Header name; defaults server-side to `authorization` when omitted."""
317
+ """The name of the header. Defaults to `authorization`."""
332
318
  name: String
333
- """Header value to encrypt and persist."""
319
+ """The value of the header. Encrypted at rest and never returned."""
334
320
  value: String!
335
321
  }
336
322
  ```
@@ -338,11 +324,11 @@ input ExternalApiAuthHeaderInput {
338
324
  ### `ExternalApiOAuth2TokenParamInput`
339
325
 
340
326
  ```graphql
341
- """One extra parameter of the token request."""
327
+ """An extra parameter of the token request."""
342
328
  input ExternalApiOAuth2TokenParamInput {
343
- """Parameter name."""
329
+ """The name of the parameter."""
344
330
  name: String!
345
- """Parameter value."""
331
+ """The value of the parameter."""
346
332
  value: String!
347
333
  }
348
334
  ```
@@ -350,7 +336,7 @@ input ExternalApiOAuth2TokenParamInput {
350
336
  ### `ExternalApiOAuth2RefreshOn401Input`
351
337
 
352
338
  ```graphql
353
- """Which 401 answers mark the access token as expired."""
339
+ """The 401 responses that mark the access token as expired."""
354
340
  input ExternalApiOAuth2RefreshOn401Input {
355
341
  """
356
342
  A dot-separated path into the response body, such as `code`. A segment of digits indexes an array.
@@ -367,38 +353,42 @@ input ExternalApiOAuth2RefreshOn401Input {
367
353
 
368
354
  ```graphql
369
355
  """
370
- An OAuth2 credential to set when registering an external API. The client
371
- secret and the refresh token are encrypted at rest and only ever decrypted
372
- server-side, to request an access token.
356
+ An OAuth2 credential to set when creating an external API. Secrets are encrypted at rest and
357
+ never returned.
373
358
  """
374
359
  input ExternalApiOAuth2Input {
375
360
  """The grant the token request uses."""
376
361
  grant: ExternalApiOAuth2Grant!
377
362
  """
378
- The token endpoint: an `https` URL that passes the same outbound checks as a node's request (public address, port 443 or 80), with no fragment and no `grant_type`, `client_id`, `client_secret`, `refresh_token` or `code` in its query. Setting it does not register its origin.
363
+ The token endpoint: a public `https` URL on port 443 or 80, with no fragment and no `grant_type`,
364
+ `client_id`, `client_secret`, `refresh_token` or `code` in its query. Its origin is not
365
+ registered.
379
366
  """
380
367
  tokenUrl: String!
381
- """The OAuth2 client id."""
368
+ """The OAuth2 client ID."""
382
369
  clientId: String!
383
- """The client secret, encrypted at rest and never returned. Required."""
370
+ """The client secret. Required."""
384
371
  clientSecret: String
385
372
  """
386
- The refresh token, encrypted at rest and never returned. `REFRESH_TOKEN` requires one; `CLIENT_CREDENTIALS` refuses one.
373
+ The refresh token. Required for `REFRESH_TOKEN`; refused for `CLIENT_CREDENTIALS`.
387
374
  """
388
375
  refreshToken: String
389
376
  """Where the token request carries the client. Defaults to `BODY`."""
390
377
  clientAuth: ExternalApiOAuth2ClientAuth
391
378
  """
392
- Extra token-request parameters, such as `scope`. `grant_type`, `client_id`, `client_secret`, `refresh_token` and `code` are refused: the credential sets those itself.
379
+ The extra parameters of the token request, such as `scope`. `grant_type`, `client_id`,
380
+ `client_secret`, `refresh_token` and `code` are refused.
393
381
  """
394
382
  tokenParams: [ExternalApiOAuth2TokenParamInput!]
395
- """The header the access token goes in. Defaults to `Authorization`."""
383
+ """The header that carries the access token. Defaults to `Authorization`."""
396
384
  headerName: String
397
385
  """
398
386
  The scheme before the access token, an HTTP token with no spaces. Defaults to `Bearer`.
399
387
  """
400
388
  headerScheme: String
401
- """Which 401 answers mark the token as expired. Omit it for every 401."""
389
+ """
390
+ The 401 responses that mark the token as expired. Omit to match every 401.
391
+ """
402
392
  refreshOn401: ExternalApiOAuth2RefreshOn401Input
403
393
  }
404
394
  ```
@@ -406,9 +396,9 @@ input ExternalApiOAuth2Input {
406
396
  ### `ExternalApiInput`
407
397
 
408
398
  ```graphql
409
- """Input for the top-level `externalApi` query."""
399
+ """The input of `externalApi`."""
410
400
  input ExternalApiInput {
411
- """ID of the external API to fetch."""
401
+ """The ID of the external API."""
412
402
  id: ID!
413
403
  }
414
404
  ```
@@ -416,23 +406,21 @@ input ExternalApiInput {
416
406
  ### `ExternalApiCreateInput`
417
407
 
418
408
  ```graphql
419
- """Input for `externalApiCreate`."""
409
+ """The input of `externalApiCreate`."""
420
410
  input ExternalApiCreateInput {
421
- """
422
- Project the external API is registered to. The organisation is derived server-side from the project.
423
- """
411
+ """The ID of the project."""
424
412
  projectId: ID!
425
- """Display name."""
413
+ """The name of the external API."""
426
414
  name: String!
427
415
  """
428
- The origin to allow: scheme, host and optional port, with no path, query, fragment or credentials. Validated server-side: must be http or https on port 80 or 443, and must not resolve to a private, loopback, link-local or reserved address.
416
+ The origin to allow: `http` or `https`, a host and an optional port 80 or 443, with no path,
417
+ query, fragment or credentials. The host must not resolve to a private, loopback, link-local or
418
+ reserved address.
429
419
  """
430
420
  origin: String!
431
- """Optional auth header to set on registration. Refused beside `oauth2`."""
421
+ """A static auth header. Not allowed with `oauth2`."""
432
422
  authHeader: ExternalApiAuthHeaderInput
433
- """
434
- Optional OAuth2 credential to set on registration. Refused beside `authHeader`. A client secret is required, and a refresh token for `REFRESH_TOKEN`.
435
- """
423
+ """An OAuth2 credential. Not allowed with `authHeader`."""
436
424
  oauth2: ExternalApiOAuth2Input
437
425
  }
438
426
  ```
@@ -440,13 +428,11 @@ input ExternalApiCreateInput {
440
428
  ### `ExternalApiUpdateInput`
441
429
 
442
430
  ```graphql
443
- """
444
- Input for `externalApiUpdate`. Name-only: the origin is the registration's identity — to change it, delete and register again. The credential is managed by `externalApiAuthHeaderSet` / `externalApiAuthHeaderClear` and `externalApiOAuth2Set` / `externalApiOAuth2Clear`.
445
- """
431
+ """The input of `externalApiUpdate`. Every field is required."""
446
432
  input ExternalApiUpdateInput {
447
- """ID of the external API to update."""
433
+ """The ID of the external API."""
448
434
  id: ID!
449
- """New display name."""
435
+ """The name of the external API."""
450
436
  name: String!
451
437
  }
452
438
  ```
@@ -454,15 +440,13 @@ input ExternalApiUpdateInput {
454
440
  ### `ExternalApiAuthHeaderSetInput`
455
441
 
456
442
  ```graphql
457
- """
458
- Input for `externalApiAuthHeaderSet`. Creates or replaces the static auth header value, and removes an OAuth2 credential the external API holds.
459
- """
443
+ """The input of `externalApiAuthHeaderSet`."""
460
444
  input ExternalApiAuthHeaderSetInput {
461
- """ID of the external API."""
445
+ """The ID of the external API."""
462
446
  id: ID!
463
- """Header name; defaults server-side to `authorization` when omitted."""
447
+ """The name of the header. Defaults to `authorization`."""
464
448
  name: String
465
- """Header value to encrypt and persist."""
449
+ """The value of the header. Encrypted at rest and never returned."""
466
450
  value: String!
467
451
  }
468
452
  ```
@@ -470,11 +454,9 @@ input ExternalApiAuthHeaderSetInput {
470
454
  ### `ExternalApiAuthHeaderClearInput`
471
455
 
472
456
  ```graphql
473
- """
474
- Input for `externalApiAuthHeaderClear`. Idempotent: clearing an external API that has no static header, an OAuth2 one included, is a no-op success.
475
- """
457
+ """The input of `externalApiAuthHeaderClear`."""
476
458
  input ExternalApiAuthHeaderClearInput {
477
- """ID of the external API."""
459
+ """The ID of the external API."""
478
460
  id: ID!
479
461
  }
480
462
  ```
@@ -483,45 +465,48 @@ input ExternalApiAuthHeaderClearInput {
483
465
 
484
466
  ```graphql
485
467
  """
486
- Input for `externalApiOAuth2Set`. Creates or replaces the external API's OAuth2
487
- credential, and removes a static auth header it holds. Replacing a credential
488
- discards its cached access token, so the next request refreshes. A secret
489
- omitted here keeps the one held while `tokenUrl`, `clientId` and `clientAuth`
490
- stay as they are; a change to any of them needs the client secret, and for
491
- `REFRESH_TOKEN` the refresh token, again.
468
+ The input of `externalApiOAuth2Set`. An omitted secret keeps the one set, unless `tokenUrl`,
469
+ `clientId` or `clientAuth` changes.
492
470
  """
493
471
  input ExternalApiOAuth2SetInput {
494
- """ID of the external API."""
472
+ """The ID of the external API."""
495
473
  id: ID!
496
474
  """The grant the token request uses."""
497
475
  grant: ExternalApiOAuth2Grant!
498
476
  """
499
- The token endpoint: an `https` URL that passes the same outbound checks as a node's request (public address, port 443 or 80), with no fragment and no `grant_type`, `client_id`, `client_secret`, `refresh_token` or `code` in its query. Setting it does not register its origin.
477
+ The token endpoint: a public `https` URL on port 443 or 80, with no fragment and no `grant_type`,
478
+ `client_id`, `client_secret`, `refresh_token` or `code` in its query. Its origin is not
479
+ registered.
500
480
  """
501
481
  tokenUrl: String!
502
- """The OAuth2 client id."""
482
+ """The OAuth2 client ID."""
503
483
  clientId: String!
504
484
  """
505
- The client secret, encrypted at rest and never returned. Required when no client secret is held, or when `tokenUrl`, `clientId` or `clientAuth` changes; omit it otherwise to keep the one held.
485
+ The client secret. Required when none is set, or when `tokenUrl`, `clientId` or `clientAuth`
486
+ changes.
506
487
  """
507
488
  clientSecret: String
508
489
  """
509
- The refresh token, encrypted at rest and never returned. `REFRESH_TOKEN` requires one when none is held, or when `tokenUrl`, `clientId` or `clientAuth` changes, and omitting it otherwise keeps the one held; `CLIENT_CREDENTIALS` refuses one.
490
+ The refresh token. For `REFRESH_TOKEN`, required when none is set, or when `tokenUrl`, `clientId`
491
+ or `clientAuth` changes. Refused for `CLIENT_CREDENTIALS`.
510
492
  """
511
493
  refreshToken: String
512
494
  """Where the token request carries the client. Defaults to `BODY`."""
513
495
  clientAuth: ExternalApiOAuth2ClientAuth
514
496
  """
515
- Extra token-request parameters, such as `scope`. `grant_type`, `client_id`, `client_secret`, `refresh_token` and `code` are refused: the credential sets those itself.
497
+ The extra parameters of the token request, such as `scope`. `grant_type`, `client_id`,
498
+ `client_secret`, `refresh_token` and `code` are refused.
516
499
  """
517
500
  tokenParams: [ExternalApiOAuth2TokenParamInput!]
518
- """The header the access token goes in. Defaults to `Authorization`."""
501
+ """The header that carries the access token. Defaults to `Authorization`."""
519
502
  headerName: String
520
503
  """
521
504
  The scheme before the access token, an HTTP token with no spaces. Defaults to `Bearer`.
522
505
  """
523
506
  headerScheme: String
524
- """Which 401 answers mark the token as expired. Omit it for every 401."""
507
+ """
508
+ The 401 responses that mark the token as expired. Omit to match every 401.
509
+ """
525
510
  refreshOn401: ExternalApiOAuth2RefreshOn401Input
526
511
  }
527
512
  ```
@@ -529,11 +514,9 @@ input ExternalApiOAuth2SetInput {
529
514
  ### `ExternalApiOAuth2ClearInput`
530
515
 
531
516
  ```graphql
532
- """
533
- Input for `externalApiOAuth2Clear`. Idempotent: clearing an external API that holds no OAuth2 credential is a no-op success.
534
- """
517
+ """The input of `externalApiOAuth2Clear`."""
535
518
  input ExternalApiOAuth2ClearInput {
536
- """ID of the external API."""
519
+ """The ID of the external API."""
537
520
  id: ID!
538
521
  }
539
522
  ```
@@ -541,9 +524,9 @@ input ExternalApiOAuth2ClearInput {
541
524
  ### `ExternalApiDeleteInput`
542
525
 
543
526
  ```graphql
544
- """Input for `externalApiDelete`."""
527
+ """The input of `externalApiDelete`."""
545
528
  input ExternalApiDeleteInput {
546
- """ID of the external API to delete."""
529
+ """The ID of the external API."""
547
530
  id: ID!
548
531
  }
549
532
  ```
@@ -551,12 +534,13 @@ input ExternalApiDeleteInput {
551
534
  ### `ExternalApiCreatePayload`
552
535
 
553
536
  ```graphql
554
- """Payload for `externalApiCreate`."""
537
+ """The result of `externalApiCreate`."""
555
538
  type ExternalApiCreatePayload {
556
- """The registered external API, or null when `errors` is non-empty."""
539
+ """The external API. Null when `errors` is not empty."""
557
540
  externalApi: ExternalApi
558
541
  """
559
- Validation errors. `ORIGIN_ALREADY_REGISTERED` on `origin` when a live registration for that origin exists in the project. An empty array indicates success.
542
+ The errors: `ORIGIN_ALREADY_REGISTERED` on `origin` when the project already has the origin. Empty
543
+ on success.
560
544
  """
561
545
  errors: [UserError!]!
562
546
  }
@@ -565,11 +549,11 @@ type ExternalApiCreatePayload {
565
549
  ### `ExternalApiUpdatePayload`
566
550
 
567
551
  ```graphql
568
- """Payload for `externalApiUpdate`."""
552
+ """The result of `externalApiUpdate`."""
569
553
  type ExternalApiUpdatePayload {
570
- """The updated external API, or null when `errors` is non-empty."""
554
+ """The external API."""
571
555
  externalApi: ExternalApi
572
- """Validation errors. An empty array indicates success."""
556
+ """The errors. Always empty."""
573
557
  errors: [UserError!]!
574
558
  }
575
559
  ```
@@ -577,11 +561,11 @@ type ExternalApiUpdatePayload {
577
561
  ### `ExternalApiAuthHeaderSetPayload`
578
562
 
579
563
  ```graphql
580
- """Payload for `externalApiAuthHeaderSet`."""
564
+ """The result of `externalApiAuthHeaderSet`."""
581
565
  type ExternalApiAuthHeaderSetPayload {
582
- """The updated external API, or null when `errors` is non-empty."""
566
+ """The external API."""
583
567
  externalApi: ExternalApi
584
- """Validation errors. An empty array indicates success."""
568
+ """The errors. Always empty."""
585
569
  errors: [UserError!]!
586
570
  }
587
571
  ```
@@ -589,11 +573,11 @@ type ExternalApiAuthHeaderSetPayload {
589
573
  ### `ExternalApiAuthHeaderClearPayload`
590
574
 
591
575
  ```graphql
592
- """Payload for `externalApiAuthHeaderClear`."""
576
+ """The result of `externalApiAuthHeaderClear`."""
593
577
  type ExternalApiAuthHeaderClearPayload {
594
- """The updated external API, or null when `errors` is non-empty."""
578
+ """The external API."""
595
579
  externalApi: ExternalApi
596
- """Validation errors. An empty array indicates success."""
580
+ """The errors. Always empty."""
597
581
  errors: [UserError!]!
598
582
  }
599
583
  ```
@@ -601,11 +585,11 @@ type ExternalApiAuthHeaderClearPayload {
601
585
  ### `ExternalApiOAuth2SetPayload`
602
586
 
603
587
  ```graphql
604
- """Payload for `externalApiOAuth2Set`."""
588
+ """The result of `externalApiOAuth2Set`."""
605
589
  type ExternalApiOAuth2SetPayload {
606
- """The updated external API, or null when `errors` is non-empty."""
590
+ """The external API."""
607
591
  externalApi: ExternalApi
608
- """Validation errors. An empty array indicates success."""
592
+ """The errors. Always empty."""
609
593
  errors: [UserError!]!
610
594
  }
611
595
  ```
@@ -613,11 +597,11 @@ type ExternalApiOAuth2SetPayload {
613
597
  ### `ExternalApiOAuth2ClearPayload`
614
598
 
615
599
  ```graphql
616
- """Payload for `externalApiOAuth2Clear`."""
600
+ """The result of `externalApiOAuth2Clear`."""
617
601
  type ExternalApiOAuth2ClearPayload {
618
- """The updated external API, or null when `errors` is non-empty."""
602
+ """The external API."""
619
603
  externalApi: ExternalApi
620
- """Validation errors. An empty array indicates success."""
604
+ """The errors. Always empty."""
621
605
  errors: [UserError!]!
622
606
  }
623
607
  ```
@@ -625,13 +609,11 @@ type ExternalApiOAuth2ClearPayload {
625
609
  ### `ExternalApiDeletePayload`
626
610
 
627
611
  ```graphql
628
- """Payload for `externalApiDelete`."""
612
+ """The result of `externalApiDelete`."""
629
613
  type ExternalApiDeletePayload {
630
- """
631
- True when the external API was deleted. Deleting one that is already gone is a no-op success.
632
- """
614
+ """Whether the external API was deleted."""
633
615
  success: Boolean!
634
- """Validation errors. An empty array indicates success."""
616
+ """The errors. Always empty."""
635
617
  errors: [UserError!]!
636
618
  }
637
619
  ```