picked 0.0.101-next.2 → 0.0.101

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/README.md +27 -12
  2. package/docs/explanation/conditions-and-the-logic-engine.md +94 -0
  3. package/docs/explanation/content-references.md +99 -0
  4. package/docs/explanation/feature-flag-allocation.md +218 -0
  5. package/docs/explanation/how-picked-works.md +124 -0
  6. package/docs/explanation/how-pickedql-works.md +76 -0
  7. package/docs/explanation/pages-and-flows.md +64 -0
  8. package/docs/explanation/the-content-model.md +87 -0
  9. package/docs/explanation/the-two-apis.md +68 -0
  10. package/docs/explanation/why-server-side-rendering.md +76 -0
  11. package/docs/explanation/workspaces-and-versions.md +71 -0
  12. package/docs/how-to/add-a-step-field-or-action.md +56 -0
  13. package/docs/how-to/analytics/index.md +324 -0
  14. package/docs/how-to/archive-or-delete-a-workspace.md +59 -0
  15. package/docs/how-to/authenticate-the-cli.md +101 -0
  16. package/docs/how-to/authenticate-with-a-magic-link.md +56 -0
  17. package/docs/how-to/authenticate-with-a-password.md +68 -0
  18. package/docs/how-to/authenticate-with-an-api-key.md +60 -0
  19. package/docs/how-to/authenticate-with-oauth.md +49 -0
  20. package/docs/how-to/build-a-flow.md +106 -0
  21. package/docs/how-to/call-an-external-api-from-a-workflow.md +116 -0
  22. package/docs/how-to/connect-the-mcp-server.md +46 -0
  23. package/docs/how-to/create-a-content-entry.md +58 -0
  24. package/docs/how-to/create-a-project.md +40 -0
  25. package/docs/how-to/create-an-experience.md +51 -0
  26. package/docs/how-to/create-and-revoke-an-api-key.md +54 -0
  27. package/docs/how-to/debug-with-the-chrome-extension.md +57 -0
  28. package/docs/how-to/define-a-page-layout.md +54 -0
  29. package/docs/how-to/fill-and-publish-a-page.md +82 -0
  30. package/docs/how-to/install-the-gtm-template.md +84 -0
  31. package/docs/how-to/install-the-sdk.md +93 -0
  32. package/docs/how-to/install-the-vite-plugin.md +69 -0
  33. package/docs/how-to/invite-and-remove-members.md +45 -0
  34. package/docs/how-to/point-one-entry-at-another.md +75 -0
  35. package/docs/how-to/preview-a-workspace.md +39 -0
  36. package/docs/how-to/publish-a-workspace.md +42 -0
  37. package/docs/how-to/read-a-feature-flag.md +113 -0
  38. package/docs/how-to/read-a-referenced-entry.md +109 -0
  39. package/docs/how-to/register-a-component.md +55 -0
  40. package/docs/how-to/register-an-action-handler.md +85 -0
  41. package/docs/how-to/register-an-api-that-uses-oauth2.md +107 -0
  42. package/docs/how-to/render-a-step-form.md +131 -0
  43. package/docs/how-to/render-an-unpublished-preview.md +41 -0
  44. package/docs/how-to/retry-a-failed-call-with-a-loop.md +81 -0
  45. package/docs/how-to/reuse-a-section.md +64 -0
  46. package/docs/how-to/reuse-a-step-field-or-action.md +39 -0
  47. package/docs/how-to/roll-back-a-published-version.md +39 -0
  48. package/docs/how-to/run-an-ab-test.md +59 -0
  49. package/docs/how-to/run-code-on-a-form-submission.md +125 -0
  50. package/docs/how-to/server-render-a-page.md +81 -0
  51. package/docs/how-to/set-a-content-security-policy.md +32 -0
  52. package/docs/how-to/set-up-mfa.md +126 -0
  53. package/docs/how-to/switch-workspaces.md +122 -0
  54. package/docs/how-to/upload-and-use-an-asset.mdx +87 -0
  55. package/docs/how-to/validate-a-field.md +52 -0
  56. package/docs/how-to/wait-for-an-action-response.md +182 -0
  57. package/docs/how-to/write-a-condition.md +57 -0
  58. package/docs/how-to/write-a-predicate.md +60 -0
  59. package/docs/index.md +59 -0
  60. package/docs/reference/dashboard/actions.mdx +65 -0
  61. package/docs/reference/dashboard/api-keys.mdx +47 -0
  62. package/docs/reference/dashboard/conditions.mdx +51 -0
  63. package/docs/reference/dashboard/content/asset-library.mdx +74 -0
  64. package/docs/reference/dashboard/content/blocks.mdx +66 -0
  65. package/docs/reference/dashboard/content/content-entries.mdx +109 -0
  66. package/docs/reference/dashboard/content/models.mdx +119 -0
  67. package/docs/reference/dashboard/content/pages.mdx +72 -0
  68. package/docs/reference/dashboard/experiences.mdx +61 -0
  69. package/docs/reference/dashboard/external-apis.md +182 -0
  70. package/docs/reference/dashboard/features.mdx +165 -0
  71. package/docs/reference/dashboard/fields.mdx +120 -0
  72. package/docs/reference/dashboard/flow-builder/canvas.mdx +58 -0
  73. package/docs/reference/dashboard/flow-builder/condition-builder.md +69 -0
  74. package/docs/reference/dashboard/flow-builder/keyboard-shortcuts.md +72 -0
  75. package/docs/reference/dashboard/flow-builder/nodes.md +74 -0
  76. package/docs/reference/dashboard/labels.md +321 -0
  77. package/docs/reference/dashboard/lead-search.md +235 -0
  78. package/docs/reference/dashboard/projects.mdx +53 -0
  79. package/docs/reference/dashboard/reports.mdx +53 -0
  80. package/docs/reference/dashboard/steps.mdx +47 -0
  81. package/docs/reference/dashboard/team-management.md +38 -0
  82. package/docs/reference/dashboard/workflow-runs.md +157 -0
  83. package/docs/reference/dashboard/workflow-templates.md +182 -0
  84. package/docs/reference/dashboard/workflow-test-runs.md +85 -0
  85. package/docs/reference/dashboard/workspace-versioning.mdx +42 -0
  86. package/docs/reference/dashboard/workspaces.mdx +91 -0
  87. package/docs/reference/delivery-api/experience-content.md +152 -0
  88. package/docs/reference/delivery-api/index.md +45 -0
  89. package/docs/reference/delivery-api/preview-caching-crawling.md +79 -0
  90. package/docs/reference/delivery-api/project-config.md +65 -0
  91. package/docs/reference/delivery-api/workspace-schema.md +107 -0
  92. package/docs/reference/glossary.md +201 -0
  93. package/docs/reference/management-api/authentication.md +87 -0
  94. package/docs/reference/management-api/authorization-and-scopes.md +291 -0
  95. package/docs/reference/management-api/error-handling.md +232 -0
  96. package/docs/reference/management-api/pagination.md +192 -0
  97. package/docs/reference/management-api/schema/action.md +261 -0
  98. package/docs/reference/management-api/schema/analytics-session.md +363 -0
  99. package/docs/reference/management-api/schema/analytics.md +73 -0
  100. package/docs/reference/management-api/schema/api-key.md +170 -0
  101. package/docs/reference/management-api/schema/auth.md +1177 -0
  102. package/docs/reference/management-api/schema/cms-fields.md +954 -0
  103. package/docs/reference/management-api/schema/cms-models.md +1155 -0
  104. package/docs/reference/management-api/schema/common.md +362 -0
  105. package/docs/reference/management-api/schema/condition.md +254 -0
  106. package/docs/reference/management-api/schema/design-system.md +199 -0
  107. package/docs/reference/management-api/schema/experience.md +1098 -0
  108. package/docs/reference/management-api/schema/external-api.md +637 -0
  109. package/docs/reference/management-api/schema/feature.md +350 -0
  110. package/docs/reference/management-api/schema/feedback.md +103 -0
  111. package/docs/reference/management-api/schema/field.md +400 -0
  112. package/docs/reference/management-api/schema/index.md +243 -0
  113. package/docs/reference/management-api/schema/integration.md +272 -0
  114. package/docs/reference/management-api/schema/label.md +349 -0
  115. package/docs/reference/management-api/schema/lead.md +340 -0
  116. package/docs/reference/management-api/schema/mcp-server.md +299 -0
  117. package/docs/reference/management-api/schema/metric.md +223 -0
  118. package/docs/reference/management-api/schema/operation.md +96 -0
  119. package/docs/reference/management-api/schema/organization.md +749 -0
  120. package/docs/reference/management-api/schema/project.md +607 -0
  121. package/docs/reference/management-api/schema/report.md +243 -0
  122. package/docs/reference/management-api/schema/saved-view.md +288 -0
  123. package/docs/reference/management-api/schema/shopify.md +795 -0
  124. package/docs/reference/management-api/schema/step.md +273 -0
  125. package/docs/reference/management-api/schema/tenant-branding.md +185 -0
  126. package/docs/reference/management-api/schema/workbench.md +246 -0
  127. package/docs/reference/management-api/schema/workflow-run.md +263 -0
  128. package/docs/reference/management-api/schema/workflow.md +1110 -0
  129. package/docs/reference/management-api/schema/workspace-version.md +823 -0
  130. package/docs/reference/management-api/schema/workspace.md +917 -0
  131. package/docs/reference/pickedql/data-sources.md +174 -0
  132. package/docs/reference/pickedql/dimensions.md +103 -0
  133. package/docs/reference/pickedql/filtering.md +64 -0
  134. package/docs/reference/pickedql/index.md +18 -0
  135. package/docs/reference/pickedql/schema.md +172 -0
  136. package/docs/reference/pickedql/virtual-functions.md +248 -0
  137. package/docs/reference/sdk/actions.md +154 -0
  138. package/docs/reference/sdk/analytics-events.md +453 -0
  139. package/docs/reference/sdk/conditions.md +147 -0
  140. package/docs/reference/sdk/content-security-policy.md +21 -0
  141. package/docs/reference/sdk/content.md +253 -0
  142. package/docs/reference/sdk/experiences.md +51 -0
  143. package/docs/reference/sdk/features.md +256 -0
  144. package/docs/reference/sdk/fields.md +255 -0
  145. package/docs/reference/sdk/index.md +68 -0
  146. package/docs/reference/sdk/plugins/create-experience.md +123 -0
  147. package/docs/reference/sdk/plugins/dynamic-experiences.md +74 -0
  148. package/docs/reference/sdk/plugins/fingerprintjs.md +39 -0
  149. package/docs/reference/sdk/plugins/hotjar.md +60 -0
  150. package/docs/reference/sdk/plugins/index.md +33 -0
  151. package/docs/reference/sdk/plugins/sentry.md +51 -0
  152. package/docs/reference/sdk/plugins/shopify.md +109 -0
  153. package/docs/reference/sdk/plugins/window-object.md +25 -0
  154. package/docs/reference/sdk/predicates.md +43 -0
  155. package/docs/reference/sdk/react.md +61 -0
  156. package/docs/reference/sdk/ssr/index.md +33 -0
  157. package/docs/reference/sdk/ssr/rendering-and-hydration.md +103 -0
  158. package/docs/reference/sdk/ssr/serialize.md +80 -0
  159. package/docs/reference/sdk/ssr/slots-and-placements.md +113 -0
  160. package/docs/reference/sdk/steps.md +86 -0
  161. package/docs/reference/sdk/svelte.md +74 -0
  162. package/docs/reference/sdk/type-generation.md +265 -0
  163. package/docs/reference/tools/admin-api-client.md +89 -0
  164. package/docs/reference/tools/chrome-extension.md +16 -0
  165. package/docs/reference/tools/cli.md +319 -0
  166. package/docs/reference/tools/delivery-api-client.md +60 -0
  167. package/docs/reference/tools/image-optimisation-service.md +104 -0
  168. package/docs/reference/tools/mcp-run.md +121 -0
  169. package/docs/reference/tools/mcp.md +391 -0
  170. package/docs/reference/tools/vite-plugin.md +163 -0
  171. package/docs/tutorials/first-api-call.md +253 -0
  172. package/docs/tutorials/first-experience-in-the-dashboard.mdx +160 -0
  173. package/docs/tutorials/first-experience.mdx +254 -0
  174. package/docs/tutorials/first-server-rendered-page.mdx +186 -0
  175. package/package.json +8 -7
@@ -0,0 +1,637 @@
1
+ ---
2
+ type: reference
3
+ layout: docs
4
+ generated: true
5
+ ---
6
+
7
+ # External api schema
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.
10
+
11
+ ## Queries
12
+
13
+ ### `externalApi`
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.
16
+
17
+ ```graphql
18
+ externalApi(input: ExternalApiInput!): ExternalApi @auth
19
+ ```
20
+
21
+ ## Mutations
22
+
23
+ ### `externalApiCreate`
24
+
25
+ Register an external API to a project. Requires a user context and `ORGANIZATION_INTEGRATIONS_CREATE`; API keys are rejected.
26
+
27
+ ```graphql
28
+ externalApiCreate(input: ExternalApiCreateInput!): ExternalApiCreatePayload! @auth(only: USER)
29
+ ```
30
+
31
+ ### `externalApiUpdate`
32
+
33
+ Rename an external API. Requires a user context and `ORGANIZATION_INTEGRATIONS_UPDATE`; API keys are rejected.
34
+
35
+ ```graphql
36
+ externalApiUpdate(input: ExternalApiUpdateInput!): ExternalApiUpdatePayload! @auth(only: USER)
37
+ ```
38
+
39
+ ### `externalApiAuthHeaderSet`
40
+
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.
42
+
43
+ ```graphql
44
+ externalApiAuthHeaderSet(input: ExternalApiAuthHeaderSetInput!): ExternalApiAuthHeaderSetPayload! @auth(only: USER)
45
+ ```
46
+
47
+ ### `externalApiAuthHeaderClear`
48
+
49
+ Remove the static auth header from an external API. Idempotent. Requires a user context and `ORGANIZATION_INTEGRATIONS_UPDATE`; API keys are rejected.
50
+
51
+ ```graphql
52
+ externalApiAuthHeaderClear(input: ExternalApiAuthHeaderClearInput!): ExternalApiAuthHeaderClearPayload! @auth(only: USER)
53
+ ```
54
+
55
+ ### `externalApiOAuth2Set`
56
+
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.
58
+
59
+ ```graphql
60
+ externalApiOAuth2Set(input: ExternalApiOAuth2SetInput!): ExternalApiOAuth2SetPayload! @auth(only: USER)
61
+ ```
62
+
63
+ ### `externalApiOAuth2Clear`
64
+
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.
66
+
67
+ ```graphql
68
+ externalApiOAuth2Clear(input: ExternalApiOAuth2ClearInput!): ExternalApiOAuth2ClearPayload! @auth(only: USER)
69
+ ```
70
+
71
+ ### `externalApiDelete`
72
+
73
+ Delete an external API registration and its encrypted credentials. Idempotent. Requires a user context and `ORGANIZATION_INTEGRATIONS_DELETE`; API keys are rejected.
74
+
75
+ ```graphql
76
+ externalApiDelete(input: ExternalApiDeleteInput!): ExternalApiDeletePayload! @auth(only: USER)
77
+ ```
78
+
79
+ ## Types
80
+
81
+ ### `ExternalApiAuthKind`
82
+
83
+ ```graphql
84
+ """How an external API authenticates the requests a workflow sends it."""
85
+ enum ExternalApiAuthKind {
86
+ """No credential: requests carry no auth header from the registry."""
87
+ NONE
88
+ """A static auth header, set with `externalApiAuthHeaderSet`."""
89
+ HEADER
90
+ """
91
+ An OAuth2 credential, set with `externalApiOAuth2Set`. The registry fetches an access token, caches it and refreshes it.
92
+ """
93
+ OAUTH2
94
+ }
95
+ ```
96
+
97
+ ### `ExternalApiOAuth2Grant`
98
+
99
+ ```graphql
100
+ """
101
+ The OAuth2 grant an external API's credential fetches its access token with.
102
+ """
103
+ enum ExternalApiOAuth2Grant {
104
+ """
105
+ The refresh-token grant (RFC 6749 section 6): the token request carries a stored refresh token.
106
+ """
107
+ REFRESH_TOKEN
108
+ """
109
+ The client-credentials grant (RFC 6749 section 4.4): the token request carries the client alone.
110
+ """
111
+ CLIENT_CREDENTIALS
112
+ }
113
+ ```
114
+
115
+ ### `ExternalApiOAuth2ClientAuth`
116
+
117
+ ```graphql
118
+ """Where the token request carries the client id and the client secret."""
119
+ enum ExternalApiOAuth2ClientAuth {
120
+ """As `client_id` and `client_secret` parameters in the form body."""
121
+ BODY
122
+ """In an `Authorization: Basic` header."""
123
+ BASIC
124
+ }
125
+ ```
126
+
127
+ ### `ExternalApiCredentialFailureReason`
128
+
129
+ ```graphql
130
+ """
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`.
133
+ """
134
+ enum ExternalApiCredentialFailureReason {
135
+ """
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.
137
+ """
138
+ CREDENTIAL_REJECTED
139
+ """
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.
141
+ """
142
+ CREDENTIAL_REFRESH_FAILED
143
+ """
144
+ The vault no longer holds a secret the credential names. Not retryable: set the credential again.
145
+ """
146
+ CREDENTIAL_UNAVAILABLE
147
+ }
148
+ ```
149
+
150
+ ### `ExternalApiOAuth2TokenParam`
151
+
152
+ ```graphql
153
+ """One extra parameter of the token request, such as `scope`."""
154
+ type ExternalApiOAuth2TokenParam {
155
+ """Parameter name."""
156
+ name: String!
157
+ """Parameter value."""
158
+ value: String!
159
+ }
160
+ ```
161
+
162
+ ### `ExternalApiOAuth2RefreshOn401`
163
+
164
+ ```graphql
165
+ """
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`.
168
+ """
169
+ type ExternalApiOAuth2RefreshOn401 {
170
+ """
171
+ A dot-separated path into the response body, such as `code`. A segment of digits indexes an array.
172
+ """
173
+ path: String!
174
+ """
175
+ The values at `path` that mark the token as expired, such as `INVALID_TOKEN`.
176
+ """
177
+ values: [String!]!
178
+ }
179
+ ```
180
+
181
+ ### `ExternalApiOAuth2RefreshFailure`
182
+
183
+ ```graphql
184
+ """The last token refresh that failed."""
185
+ type ExternalApiOAuth2RefreshFailure {
186
+ """Why it failed."""
187
+ reason: ExternalApiCredentialFailureReason!
188
+ """When it failed."""
189
+ failedAt: DateTime!
190
+ }
191
+ ```
192
+
193
+ ### `ExternalApiOAuth2`
194
+
195
+ ```graphql
196
+ """
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.
209
+ """
210
+ type ExternalApiOAuth2 {
211
+ """The grant the token request uses."""
212
+ grant: ExternalApiOAuth2Grant!
213
+ """The token endpoint, an `https` URL."""
214
+ tokenUrl: String!
215
+ """The OAuth2 client id."""
216
+ clientId: String!
217
+ """
218
+ True when a client secret is held. The secret itself is never returned.
219
+ """
220
+ clientSecretSet: Boolean!
221
+ """
222
+ True when a refresh token is held. Always false for `CLIENT_CREDENTIALS`. The token itself is never returned.
223
+ """
224
+ refreshTokenSet: Boolean!
225
+ """Where the token request carries the client."""
226
+ clientAuth: ExternalApiOAuth2ClientAuth!
227
+ """Extra token-request parameters, such as `scope`."""
228
+ tokenParams: [ExternalApiOAuth2TokenParam!]!
229
+ """The header the access token goes in, such as `Authorization`."""
230
+ headerName: String!
231
+ """
232
+ The scheme before the access token in that header, such as `Bearer` or `Zoho-oauthtoken`.
233
+ """
234
+ headerScheme: String!
235
+ """
236
+ Which 401 answers mark the token as expired, or null when every 401 does.
237
+ """
238
+ refreshOn401: ExternalApiOAuth2RefreshOn401
239
+ """
240
+ When the registry last stored a new access token, or null before the first refresh.
241
+ """
242
+ lastRefreshedAt: DateTime
243
+ """
244
+ The last refresh that failed, or null when the last refresh succeeded or none has run.
245
+ """
246
+ lastRefreshFailure: ExternalApiOAuth2RefreshFailure
247
+ }
248
+ ```
249
+
250
+ ### `ExternalApi`
251
+
252
+ ```graphql
253
+ """
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.
265
+ """
266
+ type ExternalApi {
267
+ """Unique external API identifier (`xapi_…`)."""
268
+ id: ID!
269
+ """ID of the project this external API belongs to."""
270
+ projectId: ID!
271
+ """Display name."""
272
+ name: String!
273
+ """
274
+ The origin — scheme, host and optional port, with no path (e.g. `https://api.vendor.test`). Normalised: lower-case host, default port dropped.
275
+ """
276
+ origin: String!
277
+ """How this external API authenticates."""
278
+ authKind: ExternalApiAuthKind!
279
+ """
280
+ The static auth header's name, or null when the external API holds no static header.
281
+ """
282
+ authHeaderName: String
283
+ """
284
+ True when a static auth header value is held (`authKind: HEADER`). The value itself is never returned.
285
+ """
286
+ authHeaderSet: Boolean!
287
+ """The OAuth2 credential, or null unless `authKind` is `OAUTH2`."""
288
+ oauth2: ExternalApiOAuth2
289
+ """When this external API was registered."""
290
+ createdAt: DateTime!
291
+ """When this external API was last updated."""
292
+ updatedAt: DateTime!
293
+ }
294
+ ```
295
+
296
+ ### `ExternalApiEdge`
297
+
298
+ ```graphql
299
+ """Edge type for the external API connection."""
300
+ type ExternalApiEdge {
301
+ """Pagination cursor for this edge."""
302
+ cursor: String!
303
+ """The external API."""
304
+ node: ExternalApi!
305
+ }
306
+ ```
307
+
308
+ ### `ExternalApiConnection`
309
+
310
+ ```graphql
311
+ """
312
+ Connection type for external APIs (Relay-style pagination), newest first.
313
+ """
314
+ type ExternalApiConnection {
315
+ """List of external API edges."""
316
+ edges: [ExternalApiEdge!]!
317
+ """Pagination information."""
318
+ pageInfo: PageInfo!
319
+ """Total number of live external APIs registered to the project."""
320
+ totalCount: Int!
321
+ }
322
+ ```
323
+
324
+ ### `ExternalApiAuthHeaderInput`
325
+
326
+ ```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
+ """
330
+ input ExternalApiAuthHeaderInput {
331
+ """Header name; defaults server-side to `authorization` when omitted."""
332
+ name: String
333
+ """Header value to encrypt and persist."""
334
+ value: String!
335
+ }
336
+ ```
337
+
338
+ ### `ExternalApiOAuth2TokenParamInput`
339
+
340
+ ```graphql
341
+ """One extra parameter of the token request."""
342
+ input ExternalApiOAuth2TokenParamInput {
343
+ """Parameter name."""
344
+ name: String!
345
+ """Parameter value."""
346
+ value: String!
347
+ }
348
+ ```
349
+
350
+ ### `ExternalApiOAuth2RefreshOn401Input`
351
+
352
+ ```graphql
353
+ """Which 401 answers mark the access token as expired."""
354
+ input ExternalApiOAuth2RefreshOn401Input {
355
+ """
356
+ A dot-separated path into the response body, such as `code`. A segment of digits indexes an array.
357
+ """
358
+ path: String!
359
+ """
360
+ The values at `path` that mark the token as expired, such as `INVALID_TOKEN`. At least one.
361
+ """
362
+ values: [String!]!
363
+ }
364
+ ```
365
+
366
+ ### `ExternalApiOAuth2Input`
367
+
368
+ ```graphql
369
+ """
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.
373
+ """
374
+ input ExternalApiOAuth2Input {
375
+ """The grant the token request uses."""
376
+ grant: ExternalApiOAuth2Grant!
377
+ """
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.
379
+ """
380
+ tokenUrl: String!
381
+ """The OAuth2 client id."""
382
+ clientId: String!
383
+ """The client secret, encrypted at rest and never returned. Required."""
384
+ clientSecret: String
385
+ """
386
+ The refresh token, encrypted at rest and never returned. `REFRESH_TOKEN` requires one; `CLIENT_CREDENTIALS` refuses one.
387
+ """
388
+ refreshToken: String
389
+ """Where the token request carries the client. Defaults to `BODY`."""
390
+ clientAuth: ExternalApiOAuth2ClientAuth
391
+ """
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.
393
+ """
394
+ tokenParams: [ExternalApiOAuth2TokenParamInput!]
395
+ """The header the access token goes in. Defaults to `Authorization`."""
396
+ headerName: String
397
+ """
398
+ The scheme before the access token, an HTTP token with no spaces. Defaults to `Bearer`.
399
+ """
400
+ headerScheme: String
401
+ """Which 401 answers mark the token as expired. Omit it for every 401."""
402
+ refreshOn401: ExternalApiOAuth2RefreshOn401Input
403
+ }
404
+ ```
405
+
406
+ ### `ExternalApiInput`
407
+
408
+ ```graphql
409
+ """Input for the top-level `externalApi` query."""
410
+ input ExternalApiInput {
411
+ """ID of the external API to fetch."""
412
+ id: ID!
413
+ }
414
+ ```
415
+
416
+ ### `ExternalApiCreateInput`
417
+
418
+ ```graphql
419
+ """Input for `externalApiCreate`."""
420
+ input ExternalApiCreateInput {
421
+ """
422
+ Project the external API is registered to. The organisation is derived server-side from the project.
423
+ """
424
+ projectId: ID!
425
+ """Display name."""
426
+ name: String!
427
+ """
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.
429
+ """
430
+ origin: String!
431
+ """Optional auth header to set on registration. Refused beside `oauth2`."""
432
+ 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
+ """
436
+ oauth2: ExternalApiOAuth2Input
437
+ }
438
+ ```
439
+
440
+ ### `ExternalApiUpdateInput`
441
+
442
+ ```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
+ """
446
+ input ExternalApiUpdateInput {
447
+ """ID of the external API to update."""
448
+ id: ID!
449
+ """New display name."""
450
+ name: String!
451
+ }
452
+ ```
453
+
454
+ ### `ExternalApiAuthHeaderSetInput`
455
+
456
+ ```graphql
457
+ """
458
+ Input for `externalApiAuthHeaderSet`. Creates or replaces the static auth header value, and removes an OAuth2 credential the external API holds.
459
+ """
460
+ input ExternalApiAuthHeaderSetInput {
461
+ """ID of the external API."""
462
+ id: ID!
463
+ """Header name; defaults server-side to `authorization` when omitted."""
464
+ name: String
465
+ """Header value to encrypt and persist."""
466
+ value: String!
467
+ }
468
+ ```
469
+
470
+ ### `ExternalApiAuthHeaderClearInput`
471
+
472
+ ```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
+ """
476
+ input ExternalApiAuthHeaderClearInput {
477
+ """ID of the external API."""
478
+ id: ID!
479
+ }
480
+ ```
481
+
482
+ ### `ExternalApiOAuth2SetInput`
483
+
484
+ ```graphql
485
+ """
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.
492
+ """
493
+ input ExternalApiOAuth2SetInput {
494
+ """ID of the external API."""
495
+ id: ID!
496
+ """The grant the token request uses."""
497
+ grant: ExternalApiOAuth2Grant!
498
+ """
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.
500
+ """
501
+ tokenUrl: String!
502
+ """The OAuth2 client id."""
503
+ clientId: String!
504
+ """
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.
506
+ """
507
+ clientSecret: String
508
+ """
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.
510
+ """
511
+ refreshToken: String
512
+ """Where the token request carries the client. Defaults to `BODY`."""
513
+ clientAuth: ExternalApiOAuth2ClientAuth
514
+ """
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.
516
+ """
517
+ tokenParams: [ExternalApiOAuth2TokenParamInput!]
518
+ """The header the access token goes in. Defaults to `Authorization`."""
519
+ headerName: String
520
+ """
521
+ The scheme before the access token, an HTTP token with no spaces. Defaults to `Bearer`.
522
+ """
523
+ headerScheme: String
524
+ """Which 401 answers mark the token as expired. Omit it for every 401."""
525
+ refreshOn401: ExternalApiOAuth2RefreshOn401Input
526
+ }
527
+ ```
528
+
529
+ ### `ExternalApiOAuth2ClearInput`
530
+
531
+ ```graphql
532
+ """
533
+ Input for `externalApiOAuth2Clear`. Idempotent: clearing an external API that holds no OAuth2 credential is a no-op success.
534
+ """
535
+ input ExternalApiOAuth2ClearInput {
536
+ """ID of the external API."""
537
+ id: ID!
538
+ }
539
+ ```
540
+
541
+ ### `ExternalApiDeleteInput`
542
+
543
+ ```graphql
544
+ """Input for `externalApiDelete`."""
545
+ input ExternalApiDeleteInput {
546
+ """ID of the external API to delete."""
547
+ id: ID!
548
+ }
549
+ ```
550
+
551
+ ### `ExternalApiCreatePayload`
552
+
553
+ ```graphql
554
+ """Payload for `externalApiCreate`."""
555
+ type ExternalApiCreatePayload {
556
+ """The registered external API, or null when `errors` is non-empty."""
557
+ externalApi: ExternalApi
558
+ """
559
+ Validation errors. `ORIGIN_ALREADY_REGISTERED` on `origin` when a live registration for that origin exists in the project. An empty array indicates success.
560
+ """
561
+ errors: [UserError!]!
562
+ }
563
+ ```
564
+
565
+ ### `ExternalApiUpdatePayload`
566
+
567
+ ```graphql
568
+ """Payload for `externalApiUpdate`."""
569
+ type ExternalApiUpdatePayload {
570
+ """The updated external API, or null when `errors` is non-empty."""
571
+ externalApi: ExternalApi
572
+ """Validation errors. An empty array indicates success."""
573
+ errors: [UserError!]!
574
+ }
575
+ ```
576
+
577
+ ### `ExternalApiAuthHeaderSetPayload`
578
+
579
+ ```graphql
580
+ """Payload for `externalApiAuthHeaderSet`."""
581
+ type ExternalApiAuthHeaderSetPayload {
582
+ """The updated external API, or null when `errors` is non-empty."""
583
+ externalApi: ExternalApi
584
+ """Validation errors. An empty array indicates success."""
585
+ errors: [UserError!]!
586
+ }
587
+ ```
588
+
589
+ ### `ExternalApiAuthHeaderClearPayload`
590
+
591
+ ```graphql
592
+ """Payload for `externalApiAuthHeaderClear`."""
593
+ type ExternalApiAuthHeaderClearPayload {
594
+ """The updated external API, or null when `errors` is non-empty."""
595
+ externalApi: ExternalApi
596
+ """Validation errors. An empty array indicates success."""
597
+ errors: [UserError!]!
598
+ }
599
+ ```
600
+
601
+ ### `ExternalApiOAuth2SetPayload`
602
+
603
+ ```graphql
604
+ """Payload for `externalApiOAuth2Set`."""
605
+ type ExternalApiOAuth2SetPayload {
606
+ """The updated external API, or null when `errors` is non-empty."""
607
+ externalApi: ExternalApi
608
+ """Validation errors. An empty array indicates success."""
609
+ errors: [UserError!]!
610
+ }
611
+ ```
612
+
613
+ ### `ExternalApiOAuth2ClearPayload`
614
+
615
+ ```graphql
616
+ """Payload for `externalApiOAuth2Clear`."""
617
+ type ExternalApiOAuth2ClearPayload {
618
+ """The updated external API, or null when `errors` is non-empty."""
619
+ externalApi: ExternalApi
620
+ """Validation errors. An empty array indicates success."""
621
+ errors: [UserError!]!
622
+ }
623
+ ```
624
+
625
+ ### `ExternalApiDeletePayload`
626
+
627
+ ```graphql
628
+ """Payload for `externalApiDelete`."""
629
+ type ExternalApiDeletePayload {
630
+ """
631
+ True when the external API was deleted. Deleting one that is already gone is a no-op success.
632
+ """
633
+ success: Boolean!
634
+ """Validation errors. An empty array indicates success."""
635
+ errors: [UserError!]!
636
+ }
637
+ ```