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
  # Auth schema
8
8
 
9
- The operations and types that `auth.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
  ### `user`
14
14
 
15
- Fetch the currently authenticated user. Returns null if the request is unauthenticated. Exempt from the MFA policy, so a gated user can read `mfa` and `mfaFactors`.
15
+ Reads the signed-in user. Null when the caller is an API key or the auth service rejects the token.
16
+ Exempt from the MFA policy, so a user the policy gates can read `mfa` and `mfaFactors`.
16
17
 
17
18
  ```graphql
18
19
  user: User @auth(mfa: EXEMPT)
@@ -20,7 +21,8 @@ user: User @auth(mfa: EXEMPT)
20
21
 
21
22
  ### `viewerScopes`
22
23
 
23
- Root-level scopes for the authenticated user (e.g. `ORGANIZATION_CREATE`, `STAFF_READ`). Use `Organization.viewerScopes` for org-scoped scopes.
24
+ Lists the scopes the caller holds outside any organisation, such as `ORGANIZATION_CREATE`. Empty
25
+ for an API key. `Organization.viewerScopes` lists the scopes held in one organisation.
24
26
 
25
27
  ```graphql
26
28
  viewerScopes: [Scope!]! @auth
@@ -28,7 +30,8 @@ viewerScopes: [Scope!]! @auth
28
30
 
29
31
  ### `oauthConsentDetails`
30
32
 
31
- Get OAuth consent authorisation details. Requires authentication (USER token only).
33
+ Reads an OAuth authorisation request waiting for the signed-in user's consent. Reading a request
34
+ the user already consented to approves it.
32
35
 
33
36
  ```graphql
34
37
  oauthConsentDetails(input: OAuthConsentDetailsInput!): OAuthConsentDetailsPayload! @auth(only: USER)
@@ -38,10 +41,9 @@ oauthConsentDetails(input: OAuthConsentDetailsInput!): OAuthConsentDetailsPayloa
38
41
 
39
42
  ### `sessionStart`
40
43
 
41
- Begin signing in with an email address alone. Answers `PASSWORD` when the
42
- account has set a password, and otherwise emails a sign-in code and link and
43
- answers `EMAIL_CODE`. Never creates an account. Returns `RATE_LIMITED` when
44
- the caller makes too many requests, or when the project's email quota is spent.
44
+ Begins a sign-in from an email address alone: answers `PASSWORD`, or emails a sign-in code and
45
+ answers `EMAIL_CODE`. Never creates an account. Returns `RATE_LIMITED` past 10 requests a minute
46
+ from one IP address, or when the project's email quota is spent.
45
47
 
46
48
  ```graphql
47
49
  sessionStart(input: SessionStartInput!): SessionStartPayload!
@@ -49,7 +51,7 @@ sessionStart(input: SessionStartInput!): SessionStartPayload!
49
51
 
50
52
  ### `sessionCreate`
51
53
 
52
- Create a new session by signing in with email and password.
54
+ Signs in with an email address and password and returns an `AAL1` session.
53
55
 
54
56
  ```graphql
55
57
  sessionCreate(input: SessionCreateInput!): SessionCreatePayload!
@@ -57,7 +59,7 @@ sessionCreate(input: SessionCreateInput!): SessionCreatePayload!
57
59
 
58
60
  ### `sessionRefresh`
59
61
 
60
- Refresh an existing session using a refresh token.
62
+ Exchanges a refresh token for a new session.
61
63
 
62
64
  ```graphql
63
65
  sessionRefresh(input: SessionRefreshInput!): SessionRefreshPayload!
@@ -65,7 +67,9 @@ sessionRefresh(input: SessionRefreshInput!): SessionRefreshPayload!
65
67
 
66
68
  ### `accountCreate`
67
69
 
68
- Register an email address and send it a confirmation email.
70
+ Registers an email address and emails it a confirmation code and link. The response does not
71
+ reveal whether the address has an account. Returns `RATE_LIMITED` when the project's email quota
72
+ is spent.
69
73
 
70
74
  ```graphql
71
75
  accountCreate(input: AccountCreateInput!): AccountCreatePayload!
@@ -73,7 +77,7 @@ accountCreate(input: AccountCreateInput!): AccountCreatePayload!
73
77
 
74
78
  ### `accountVerifyEmail`
75
79
 
76
- Verify a user's email address with a confirmation token.
80
+ Verifies the six-digit code from a confirmation or sign-in email and creates a session.
77
81
 
78
82
  ```graphql
79
83
  accountVerifyEmail(input: AccountVerifyEmailInput!): AccountVerifyEmailPayload!
@@ -81,7 +85,9 @@ accountVerifyEmail(input: AccountVerifyEmailInput!): AccountVerifyEmailPayload!
81
85
 
82
86
  ### `accountResendVerification`
83
87
 
84
- Resend the email verification link.
88
+ Emails an existing account a new code and link: a confirmation, or a sign-in for a confirmed
89
+ account. An address with no account returns an error, so the response reveals whether an account
90
+ exists. An address emailed within the minimum send interval returns `RATE_LIMITED`.
85
91
 
86
92
  ```graphql
87
93
  accountResendVerification(input: AccountResendVerificationInput!): AccountResendVerificationPayload!
@@ -89,7 +95,7 @@ accountResendVerification(input: AccountResendVerificationInput!): AccountResend
89
95
 
90
96
  ### `oauthAuthorize`
91
97
 
92
- Initiate an OAuth authorisation flow.
98
+ Creates the provider URL that starts a sign-in with an OAuth provider.
93
99
 
94
100
  ```graphql
95
101
  oauthAuthorize(input: OAuthAuthorizeInput!): OAuthAuthorizePayload!
@@ -97,7 +103,7 @@ oauthAuthorize(input: OAuthAuthorizeInput!): OAuthAuthorizePayload!
97
103
 
98
104
  ### `oauthCallback`
99
105
 
100
- Handle the OAuth callback and create a session.
106
+ Exchanges the authorisation code from an OAuth provider's redirect for a session.
101
107
 
102
108
  ```graphql
103
109
  oauthCallback(input: OAuthCallbackInput!): OAuthCallbackPayload!
@@ -105,7 +111,7 @@ oauthCallback(input: OAuthCallbackInput!): OAuthCallbackPayload!
105
111
 
106
112
  ### `oauthConsentApprove`
107
113
 
108
- Approve an OAuth consent request. Requires authentication.
114
+ Approves an OAuth authorisation request for the signed-in user.
109
115
 
110
116
  ```graphql
111
117
  oauthConsentApprove(input: OAuthConsentApproveInput!): OAuthConsentActionPayload! @auth(only: USER)
@@ -113,7 +119,7 @@ oauthConsentApprove(input: OAuthConsentApproveInput!): OAuthConsentActionPayload
113
119
 
114
120
  ### `oauthConsentDeny`
115
121
 
116
- Deny an OAuth consent request. Requires authentication.
122
+ Denies an OAuth authorisation request for the signed-in user.
117
123
 
118
124
  ```graphql
119
125
  oauthConsentDeny(input: OAuthConsentDenyInput!): OAuthConsentActionPayload! @auth(only: USER)
@@ -121,8 +127,8 @@ oauthConsentDeny(input: OAuthConsentDenyInput!): OAuthConsentActionPayload! @aut
121
127
 
122
128
  ### `magicLinkSend`
123
129
 
124
- Email an existing account a sign-in code and link. Never creates an account,
125
- and answers `success: true` for an address with no account.
130
+ Emails an existing account a sign-in code and link. Never creates an account, and answers
131
+ `success: true` for an address with no account.
126
132
 
127
133
  ```graphql
128
134
  magicLinkSend(input: MagicLinkSendInput!): MagicLinkSendPayload!
@@ -130,7 +136,7 @@ magicLinkSend(input: MagicLinkSendInput!): MagicLinkSendPayload!
130
136
 
131
137
  ### `magicLinkVerify`
132
138
 
133
- Verify the code from a sign-in or confirmation email and create a session.
139
+ Verifies the six-digit code from a sign-in or confirmation email and creates a session.
134
140
 
135
141
  ```graphql
136
142
  magicLinkVerify(input: MagicLinkVerifyInput!): MagicLinkVerifyPayload!
@@ -138,10 +144,9 @@ magicLinkVerify(input: MagicLinkVerifyInput!): MagicLinkVerifyPayload!
138
144
 
139
145
  ### `emailLinkVerify`
140
146
 
141
- Verify the link from a password-reset, invitation, sign-in or confirmation
142
- email and create a session. The link is single-use, so call this when the
143
- recipient confirms, never on opening the link: an email security scanner that
144
- opens links before delivery would otherwise use it up.
147
+ Verifies the link from a password-reset, invitation, sign-in or confirmation email and creates a
148
+ session. The link works once: call this when the recipient confirms, never on opening the link,
149
+ which an email security scanner may do before delivery.
145
150
 
146
151
  ```graphql
147
152
  emailLinkVerify(input: EmailLinkVerifyInput!): EmailLinkVerifyPayload!
@@ -149,7 +154,8 @@ emailLinkVerify(input: EmailLinkVerifyInput!): EmailLinkVerifyPayload!
149
154
 
150
155
  ### `passwordResetSend`
151
156
 
152
- Send a password reset email.
157
+ Sends a password-reset email. Returns `RATE_LIMITED` when the address was emailed within the
158
+ minimum send interval or the project's email quota is spent.
153
159
 
154
160
  ```graphql
155
161
  passwordResetSend(input: PasswordResetSendInput!): PasswordResetSendPayload!
@@ -157,9 +163,9 @@ passwordResetSend(input: PasswordResetSendInput!): PasswordResetSendPayload!
157
163
 
158
164
  ### `passwordUpdate`
159
165
 
160
- Update the current user's password. Requires authentication. An `AAL1` session
161
- may set a password only while the user holds no verified factor, and is
162
- otherwise refused with `MFA_REQUIRED`.
166
+ Sets the signed-in user's password without asking for the current one. Ends the user's other
167
+ sessions and keeps the caller's. An `AAL1` session may set a password only while the user holds
168
+ no verified factor, and otherwise gets `MFA_REQUIRED`.
163
169
 
164
170
  ```graphql
165
171
  passwordUpdate(input: PasswordUpdateInput!): PasswordUpdatePayload! @auth(mfa: EXEMPT)
@@ -167,7 +173,9 @@ passwordUpdate(input: PasswordUpdateInput!): PasswordUpdatePayload! @auth(mfa: E
167
173
 
168
174
  ### `mfaFactorEnroll`
169
175
 
170
- Enrol an authenticator app for the caller. Requires a user session; exempt from the MFA policy.
176
+ Enrols an authenticator app for the caller and returns its secret, once. First deletes the
177
+ caller's unverified factors, except the two newest enrolled in the last minute; one holding the
178
+ given `friendlyName` is deleted however new.
171
179
 
172
180
  ```graphql
173
181
  mfaFactorEnroll(input: MfaFactorEnrollInput!): MfaFactorEnrollPayload! @auth(only: USER, mfa: EXEMPT)
@@ -175,7 +183,7 @@ mfaFactorEnroll(input: MfaFactorEnrollInput!): MfaFactorEnrollPayload! @auth(onl
175
183
 
176
184
  ### `mfaChallengeCreate`
177
185
 
178
- Open a challenge against one of the caller's factors. Requires a user session; exempt from the MFA policy.
186
+ Opens a challenge against one of the caller's factors.
179
187
 
180
188
  ```graphql
181
189
  mfaChallengeCreate(input: MfaChallengeCreateInput!): MfaChallengeCreatePayload! @auth(only: USER, mfa: EXEMPT)
@@ -183,7 +191,9 @@ mfaChallengeCreate(input: MfaChallengeCreateInput!): MfaChallengeCreatePayload!
183
191
 
184
192
  ### `mfaChallengeVerify`
185
193
 
186
- Verify a code against a challenge and lift the caller's session to `AAL2`. Requires a user session; exempt from the MFA policy.
194
+ Verifies an authenticator code against a challenge and returns the caller's session at `AAL2`.
195
+ The user's other sessions keep their level. A wrong code returns `MFA_CHALLENGE_FAILED`, and an
196
+ expired challenge `TOKEN_EXPIRED`.
187
197
 
188
198
  ```graphql
189
199
  mfaChallengeVerify(input: MfaChallengeVerifyInput!): MfaChallengeVerifyPayload! @auth(only: USER, mfa: EXEMPT)
@@ -191,7 +201,9 @@ mfaChallengeVerify(input: MfaChallengeVerifyInput!): MfaChallengeVerifyPayload!
191
201
 
192
202
  ### `mfaFactorUnenroll`
193
203
 
194
- Remove one of the caller's factors. Requires a user session; exempt from the MFA policy, though removing a verified factor needs `AAL2`.
204
+ Removes one of the caller's factors. Removing a verified factor needs an `AAL2` session, and
205
+ otherwise returns `MFA_REQUIRED`. A user the MFA policy requires cannot remove their last verified
206
+ factor (`VALIDATION_ERROR`).
195
207
 
196
208
  ```graphql
197
209
  mfaFactorUnenroll(input: MfaFactorUnenrollInput!): MfaFactorUnenrollPayload! @auth(only: USER, mfa: EXEMPT)
@@ -203,54 +215,37 @@ mfaFactorUnenroll(input: MfaFactorUnenrollInput!): MfaFactorUnenrollPayload! @au
203
215
 
204
216
  ```graphql
205
217
  """
206
- Programmatic error codes returned by auth use cases. Surfaced via the
207
- standard GraphQL `errors` array's `extensions.code` when an `AuthError` is
208
- thrown. Use these to drive client-side UX (e.g. show "invalid password"
209
- vs "email not confirmed" messages) — do not parse the `message` string.
218
+ The code in `extensions.code` of an error an auth operation returns. Branch on the code, not on
219
+ the message.
210
220
  """
211
221
  enum AuthErrorCode {
212
- """The provided credentials are invalid (wrong password, unknown email)."""
222
+ """The email address or password is wrong."""
213
223
  INVALID_CREDENTIALS
214
- """
215
- The user's email address has not yet been confirmed via the verification link.
216
- """
224
+ """The email address is not confirmed."""
217
225
  EMAIL_NOT_CONFIRMED
218
- """No user was found matching the provided criteria."""
226
+ """No user matches."""
219
227
  USER_NOT_FOUND
220
- """A user with the provided email already exists."""
228
+ """A user with the email address already exists."""
221
229
  USER_ALREADY_EXISTS
222
- """
223
- The provided password does not meet the strength requirements enforced by Supabase Auth.
224
- """
230
+ """The password does not meet the strength rules."""
225
231
  WEAK_PASSWORD
226
- """
227
- The provided token is invalid (malformed, signature mismatch, or not issued by this server).
228
- """
232
+ """The token or code is invalid."""
229
233
  INVALID_TOKEN
230
- """The provided token has expired."""
234
+ """The token, code or MFA challenge has expired."""
231
235
  TOKEN_EXPIRED
232
- """
233
- The MFA challenge verification failed (wrong code or rejected challenge).
234
- """
236
+ """The authenticator code is wrong, or the challenge was rejected."""
235
237
  MFA_CHALLENGE_FAILED
236
- """
237
- The specified MFA factor was not found, or does not belong to the caller.
238
- """
238
+ """No factor with the ID belongs to the caller."""
239
239
  MFA_FACTOR_NOT_FOUND
240
240
  """
241
- The caller must hold an `AAL2` session: they are staff, or a member of an
242
- organisation that requires two-factor authentication, or the operation itself
243
- needs a verified second factor (removing a verified factor). Verify a factor
244
- with `mfaChallengeVerify` and retry with the returned session.
241
+ The operation needs an `AAL2` session: the caller is staff, belongs to an organisation that
242
+ requires two-factor authentication, or is removing a verified factor or setting a password while
243
+ holding one. Verify a factor with `mfaChallengeVerify` and retry with the returned session.
245
244
  """
246
245
  MFA_REQUIRED
247
- """
248
- An error occurred while exchanging credentials with the upstream OAuth provider.
249
- """
246
+ """The OAuth provider returned an error."""
250
247
  OAUTH_PROVIDER_ERROR
251
- """
252
- Too many requests; the operation has been rate-limited by Supabase Auth.
253
- """
248
+ """Too many requests, or too many emails sent."""
254
249
  RATE_LIMITED
255
250
  }
256
251
  ```
@@ -259,20 +254,13 @@ enum AuthErrorCode {
259
254
 
260
255
  ```graphql
261
256
  """
262
- Authenticator Assurance Level — how many factors the active session has
263
- satisfied. Conforms to the NIST 800-63 AAL definitions.
264
-
265
- `AAL1` means the session is authenticated with a single factor (password
266
- or OAuth). `AAL2` means the session has additionally verified a TOTP
267
- factor. The level is decoded from the session's access token; a call that
268
- lifts a session from `AAL1` to `AAL2` goes through `mfaChallengeVerify`.
257
+ How many authentication factors a session has passed, as NIST 800-63 defines the levels. Read from
258
+ the session's access token.
269
259
  """
270
260
  enum AuthenticatorAssuranceLevel {
271
- """Single-factor authentication (password or OAuth only)."""
261
+ """One factor: a password, an emailed code or an OAuth provider."""
272
262
  AAL1
273
- """
274
- Multi-factor authentication (a verified TOTP code on top of the first factor).
275
- """
263
+ """Two factors: the first factor and a verified authenticator code."""
276
264
  AAL2
277
265
  }
278
266
  ```
@@ -280,15 +268,11 @@ enum AuthenticatorAssuranceLevel {
280
268
  ### `IdentityProvider`
281
269
 
282
270
  ```graphql
283
- """
284
- Identity provider types — which upstream issued the credential the user
285
- authenticated with. A `User` may have multiple `Identity` records (e.g.
286
- linked Google + password).
287
- """
271
+ """The provider that issued one of a user's identities."""
288
272
  enum IdentityProvider {
289
- """Email + password authentication."""
273
+ """Email address."""
290
274
  EMAIL
291
- """Google OAuth authentication."""
275
+ """Google."""
292
276
  GOOGLE
293
277
  }
294
278
  ```
@@ -296,12 +280,9 @@ enum IdentityProvider {
296
280
  ### `OAuthProvider`
297
281
 
298
282
  ```graphql
299
- """
300
- OAuth providers supported for end-user authentication. Used by
301
- `oauthAuthorize` to select the provider URL to redirect the user to.
302
- """
283
+ """An OAuth provider a user can sign in with."""
303
284
  enum OAuthProvider {
304
- """Google OAuth provider."""
285
+ """Google."""
305
286
  GOOGLE
306
287
  }
307
288
  ```
@@ -309,12 +290,10 @@ enum OAuthProvider {
309
290
  ### `MfaFactorType`
310
291
 
311
292
  ```graphql
312
- """
313
- MFA factor types. Time-based one-time passwords from an authenticator app are the only kind.
314
- """
293
+ """The kind of an MFA factor."""
315
294
  enum MfaFactorType {
316
295
  """
317
- An authenticator app generating time-based one-time passwords (RFC 6238).
296
+ An authenticator app that generates time-based one-time codes (RFC 6238).
318
297
  """
319
298
  TOTP
320
299
  }
@@ -324,16 +303,13 @@ enum MfaFactorType {
324
303
 
325
304
  ```graphql
326
305
  """
327
- MFA factor verification status. A factor created by `mfaFactorEnroll`
328
- starts as `UNVERIFIED`; once the user verifies a code from their
329
- authenticator via `mfaChallengeVerify`, it transitions to `VERIFIED`.
306
+ Whether an MFA factor has been verified. A factor starts `UNVERIFIED` and becomes `VERIFIED` when
307
+ `mfaChallengeVerify` accepts a code from it.
330
308
  """
331
309
  enum MfaFactorStatus {
332
- """
333
- Factor has been enrolled but the user has not yet verified a delivered code.
334
- """
310
+ """Enrolled, with no code verified yet."""
335
311
  UNVERIFIED
336
- """Factor has been verified and is active."""
312
+ """Verified and active."""
337
313
  VERIFIED
338
314
  }
339
315
  ```
@@ -341,15 +317,11 @@ enum MfaFactorStatus {
341
317
  ### `MfaState`
342
318
 
343
319
  ```graphql
344
- """
345
- Whether a user has completed multi-factor authentication enrolment. `ENROLLED`
346
- means at least one verified MFA factor exists for the user; `NOT_ENROLLED` means
347
- none does. Shown beside a user in every dashboard list of users.
348
- """
320
+ """Whether a user holds a verified MFA factor."""
349
321
  enum MfaState {
350
- """The user holds at least one verified MFA factor."""
322
+ """The user holds at least one verified factor."""
351
323
  ENROLLED
352
- """The user holds no verified MFA factor."""
324
+ """The user holds no verified factor."""
353
325
  NOT_ENROLLED
354
326
  }
355
327
  ```
@@ -358,26 +330,24 @@ enum MfaState {
358
330
 
359
331
  ```graphql
360
332
  """
361
- A linked identity for an authenticated user — one record per
362
- identity-provider account. The same `User` may have several `Identity`
363
- rows (e.g. a Google sign-in and a separately-enrolled email/password).
333
+ An account at an identity provider that a user signs in with. A user can have several.
364
334
  """
365
335
  type Identity {
366
- """Unique identifier for this identity record."""
336
+ """The ID of the identity."""
367
337
  id: ID!
368
- """The identity provider that issued this identity."""
338
+ """The provider that issued the identity."""
369
339
  provider: IdentityProvider!
370
- """
371
- Email address associated with this identity, as reported by the provider.
372
- """
340
+ """The email address the provider reports. Null when it reports none."""
373
341
  email: String
374
342
  """
375
- Provider-specific metadata blob (claims, profile fields). Shape varies by provider.
343
+ The claims and profile fields the provider reports. The shape depends on the provider.
376
344
  """
377
345
  identityData: JSON
378
- """When this identity was created."""
346
+ """When the identity was created."""
379
347
  createdAt: DateTime!
380
- """When the user last signed in with this identity."""
348
+ """
349
+ When the user last signed in with this identity. Null when they never have.
350
+ """
381
351
  lastSignInAt: DateTime
382
352
  }
383
353
  ```
@@ -386,26 +356,21 @@ type Identity {
386
356
 
387
357
  ```graphql
388
358
  """
389
- An MFA factor enrolled by a user: an authenticator app holding a TOTP
390
- secret.
391
-
392
- A user may have multiple enrolled factors; `mfaChallengeCreate` selects
393
- which factor to challenge against. Unenrolment is via `mfaFactorUnenroll`;
394
- removing a `VERIFIED` factor needs an `AAL2` session, and removing the last
395
- one leaves an MFA-required user gated to setup on their next request.
359
+ An authenticator app a user has enrolled as a second factor. Removing a `VERIFIED` factor needs an
360
+ `AAL2` session, and a user the MFA policy requires cannot remove their last `VERIFIED` factor.
396
361
  """
397
362
  type MfaFactor {
398
- """Unique identifier for this MFA factor."""
363
+ """The ID of the factor."""
399
364
  id: ID!
400
- """The type of MFA factor."""
365
+ """The kind of factor."""
401
366
  factorType: MfaFactorType!
367
+ """Whether the factor has been verified."""
368
+ status: MfaFactorStatus!
402
369
  """
403
- Whether the user has completed the initial verification flow for this factor.
370
+ The name of the factor, shown on the account page. Null when none is set.
404
371
  """
405
- status: MfaFactorStatus!
406
- """User-assigned name for this factor (e.g. "Work phone")."""
407
372
  friendlyName: String
408
- """When this factor was enrolled."""
373
+ """When the factor was enrolled."""
409
374
  createdAt: DateTime!
410
375
  }
411
376
  ```
@@ -414,15 +379,13 @@ type MfaFactor {
414
379
 
415
380
  ```graphql
416
381
  """
417
- What an authenticator app needs to add a newly enrolled TOTP factor. Shown
418
- once, by `mfaFactorEnroll`; the secret is never returned again.
382
+ What an authenticator app needs to add a new TOTP factor. Returned once, by `mfaFactorEnroll`; the
383
+ secret is never returned again.
419
384
  """
420
385
  type MfaTotpEnrollment {
421
- """
422
- SVG markup of the QR code that encodes `uri`, for scanning with an authenticator app.
423
- """
386
+ """SVG markup of a QR code that encodes `uri`."""
424
387
  qrCode: String!
425
- """The base32 secret, for typing into an authenticator that cannot scan."""
388
+ """The base32 secret, for an authenticator that cannot scan."""
426
389
  secret: String!
427
390
  """The `otpauth://` URI the QR code encodes."""
428
391
  uri: String!
@@ -436,7 +399,7 @@ type MfaTotpEnrollment {
436
399
  enum MfaRequirementReason {
437
400
  """The user is a super admin or a client manager."""
438
401
  STAFF
439
- """The user belongs to an organisation whose `requireMfa` setting is on."""
402
+ """The user belongs to an organisation with `requireMfa` on."""
440
403
  ORGANIZATION
441
404
  }
442
405
  ```
@@ -444,22 +407,19 @@ enum MfaRequirementReason {
444
407
  ### `UserMfaStatus`
445
408
 
446
409
  ```graphql
447
- """
448
- Where a user stands against the multi-factor authentication policy.
449
- `required` and `reason` come from the policy (staff status and organisation
450
- membership); `enrolled` is whether a `VERIFIED` TOTP factor exists;
451
- `satisfied` is whether the requirement is met by the token this status was
452
- read with: not required, or a session at `AAL2`.
453
- """
410
+ """Where a user stands against the multi-factor authentication policy."""
454
411
  type UserMfaStatus {
455
- """Whether the user must hold an `AAL2` session to use guarded fields."""
412
+ """
413
+ Whether the user must hold an `AAL2` session to use the fields the policy guards.
414
+ """
456
415
  required: Boolean!
457
- """Why the user is required; null when `required` is false."""
416
+ """Why the user is required. Null when `required` is false."""
458
417
  reason: MfaRequirementReason
459
- """Whether the user holds at least one `VERIFIED` TOTP factor."""
418
+ """Whether the user holds at least one `VERIFIED` factor."""
460
419
  enrolled: Boolean!
461
420
  """
462
- Whether the requirement is met by the session this status was read with.
421
+ Whether the session this status was read with meets the requirement: the user is not required,
422
+ or the session is at `AAL2`.
463
423
  """
464
424
  satisfied: Boolean!
465
425
  }
@@ -469,62 +429,48 @@ type UserMfaStatus {
469
429
 
470
430
  ```graphql
471
431
  """
472
- The authenticated end-user. Returned by the `user` query when a valid
473
- `Authorization: Bearer <jwt>` header is present; otherwise the field
474
- resolves to null.
475
-
476
- Carries the user's identifiers, all linked identity providers, all
477
- enrolled MFA factors, where the user stands against the MFA policy, and
478
- convenience navigation into the user's pending invitations and joined
479
- organisations. The `appMetadata` blob is server-managed and read-only;
480
- `userMetadata` is user-editable.
481
-
482
- The `user` query is exempt from the MFA policy so a gated user can read
483
- their status; `invitations` and `organizations` are enforced fields, so
484
- they error with `MFA_REQUIRED` for a user the policy gates.
432
+ A signed-in user. `invitations` and `organizations` return `MFA_REQUIRED` for a user the MFA
433
+ policy gates; the other fields stay readable.
485
434
  """
486
435
  type User {
487
- """Unique user identifier (Supabase Auth `auth.users.id`)."""
436
+ """The ID of the user."""
488
437
  id: ID!
489
- """
490
- User's primary email address. Null only for users created via certain admin paths without a confirmed email.
491
- """
438
+ """The user's primary email address. Null when the account has none."""
492
439
  email: String
493
- """When the user's email was confirmed (null if still pending)."""
440
+ """When the user confirmed their email address. Null until confirmed."""
494
441
  emailConfirmedAt: DateTime
495
- """User's phone number (E.164 format), if added via MFA or admin path."""
442
+ """The user's phone number, in E.164 format. Null when none is set."""
496
443
  phone: String
497
- """When the user's phone was confirmed (null if unverified)."""
444
+ """When the user confirmed their phone number. Null until confirmed."""
498
445
  phoneConfirmedAt: DateTime
499
- """All identities linked to this user (one per `IdentityProvider`)."""
446
+ """The identities the user signs in with."""
500
447
  identities: [Identity!]!
501
- """All TOTP factors enrolled by this user, verified or not."""
448
+ """The user's MFA factors, verified or not."""
502
449
  mfaFactors: [MfaFactor!]!
503
- """Where this user stands against the multi-factor authentication policy."""
450
+ """Where the user stands against the multi-factor authentication policy."""
504
451
  mfa: UserMfaStatus!
505
452
  """
506
- Whether this user has chosen a password. False for an account created by a
507
- one-time code, an invitation or Google until `passwordUpdate` sets one.
453
+ Whether the user has chosen a password. False for an account created by an emailed code, an
454
+ invitation or Google until `passwordUpdate` sets one.
508
455
  """
509
456
  passwordSet: Boolean!
510
457
  """
511
- Server-managed metadata (provider claims, role flags). Read-only from the user's perspective.
458
+ Metadata the server manages, such as provider claims and role flags. The user cannot change it.
512
459
  """
513
460
  appMetadata: JSON
514
- """User-editable metadata (display name, preferences). Free-form JSON."""
461
+ """Metadata the user can change, such as a display name and preferences."""
515
462
  userMetadata: JSON
516
- """When this user account was created."""
463
+ """When the user was created."""
517
464
  createdAt: DateTime!
518
- """When this user account was last updated."""
465
+ """When the user last changed."""
519
466
  updatedAt: DateTime!
520
467
  """
521
- Pending organisation invitations addressed to this user's email. Held to the MFA policy.
468
+ The pending organisation invitations addressed to the user's email address.
522
469
  """
523
470
  invitations(first: Int, after: String): ViewerInvitationConnection! @auth
524
471
  """
525
- Organisations this user is a member of. Filter by name with `search`
526
- (case-insensitive substring) and order with `sortKey` (default `NAME`) plus
527
- `reverse`. Held to the MFA policy.
472
+ The organisations the user belongs to; for a staff caller, every organisation. `search` filters
473
+ by name (case-insensitive substring); `sortKey` and `reverse` set the order.
528
474
  """
529
475
  organizations(first: Int, after: String, search: String, sortKey: OrganizationSortKeys = NAME, reverse: Boolean = false): OrganizationConnection! @auth
530
476
  }
@@ -534,32 +480,20 @@ type User {
534
480
 
535
481
  ```graphql
536
482
  """
537
- A successfully-authenticated session. Returned by every auth flow that
538
- produces a usable JWT (`sessionCreate`, `accountVerifyEmail`,
539
- `magicLinkVerify`, `mfaChallengeVerify`, etc.).
540
-
541
- Pass `accessToken` in the `Authorization: Bearer <token>` header on
542
- subsequent requests. When `accessToken` is near expiry, exchange
543
- `refreshToken` for a fresh session via `sessionRefresh`. Sessions also
544
- carry the current authenticator assurance level, decoded from
545
- `accessToken`, and `user.mfa` says whether that level is enough.
483
+ The result of a sign-in: an access token, a refresh token, and when the access token expires.
484
+ Send `accessToken` as `Authorization: Bearer <token>`; exchange `refreshToken` through
485
+ `sessionRefresh` for a new session before the access token expires.
546
486
  """
547
487
  type Session {
548
- """JWT access token for authenticating API requests."""
488
+ """The access token (a JWT) that authenticates API requests."""
549
489
  accessToken: String!
550
- """
551
- Refresh token used to obtain a new access token. Single-use; rotates on every refresh.
552
- """
490
+ """The refresh token. Single-use: `sessionRefresh` returns a new one."""
553
491
  refreshToken: String!
554
- """
555
- When the access token expires (Supabase Auth issues 1-hour tokens by default).
556
- """
492
+ """When the access token expires."""
557
493
  expiresAt: DateTime!
558
- """The authenticated user."""
494
+ """The signed-in user."""
559
495
  user: User!
560
- """
561
- Current authenticator assurance level of this session, decoded from `accessToken`.
562
- """
496
+ """The session's assurance level, read from `accessToken`."""
563
497
  aal: AuthenticatorAssuranceLevel!
564
498
  }
565
499
  ```
@@ -567,18 +501,16 @@ type Session {
567
501
  ### `SessionStartMethod`
568
502
 
569
503
  ```graphql
570
- """
571
- How the user finishes an email-first sign-in started by `sessionStart`.
572
- """
504
+ """How a user finishes a sign-in that `sessionStart` began."""
573
505
  enum SessionStartMethod {
574
506
  """
575
- The account has set a password: call `sessionCreate` with it. No email was sent.
507
+ The account has a password: call `sessionCreate` with it. No email is sent.
576
508
  """
577
509
  PASSWORD
578
510
  """
579
- A sign-in email carrying a six-digit code and a link was sent to the address,
580
- if it has an account. Finish with `magicLinkVerify`, or by following the link.
581
- An address with no account also answers `EMAIL_CODE`, and is sent nothing.
511
+ A six-digit code and a link were emailed to the address, if it has an account. Finish with
512
+ `magicLinkVerify` or the link. An address with no account also answers `EMAIL_CODE` and is sent
513
+ nothing.
582
514
  """
583
515
  EMAIL_CODE
584
516
  }
@@ -587,14 +519,12 @@ enum SessionStartMethod {
587
519
  ### `SessionStartInput`
588
520
 
589
521
  ```graphql
590
- """
591
- Input for `sessionStart` — begin signing in with an email address alone.
592
- """
522
+ """The input of `sessionStart`."""
593
523
  input SessionStartInput {
594
- """Email address of the user."""
524
+ """The email address to sign in with."""
595
525
  email: String!
596
526
  """
597
- URL the emailed sign-in link returns to (must match a registered redirect URL).
527
+ The URL the emailed link returns to. Must match a registered redirect URL.
598
528
  """
599
529
  redirectUrl: String
600
530
  }
@@ -604,12 +534,9 @@ input SessionStartInput {
604
534
 
605
535
  ```graphql
606
536
  """
607
- Payload returned by `sessionStart`.
608
-
609
- `method` says which step completes the sign-in, and reveals whether a registered
610
- address has set a password. An address without a password and an unknown address
611
- both answer `EMAIL_CODE`, though the response time can differ because only a
612
- registered address is sent an email.
537
+ The result of `sessionStart`. `method` reveals whether a registered address has a password. An
538
+ address without one and an unknown address both answer `EMAIL_CODE`, though the response time can
539
+ differ because only a registered address is emailed.
613
540
  """
614
541
  type SessionStartPayload {
615
542
  """How the user finishes signing in."""
@@ -620,11 +547,11 @@ type SessionStartPayload {
620
547
  ### `SessionCreateInput`
621
548
 
622
549
  ```graphql
623
- """Input for `sessionCreate` — sign in with email and password."""
550
+ """The input of `sessionCreate`."""
624
551
  input SessionCreateInput {
625
- """Email address of the user."""
552
+ """The user's email address."""
626
553
  email: String!
627
- """Password for the user account."""
554
+ """The user's password."""
628
555
  password: String!
629
556
  }
630
557
  ```
@@ -633,15 +560,12 @@ input SessionCreateInput {
633
560
 
634
561
  ```graphql
635
562
  """
636
- Payload returned by `sessionCreate`.
637
-
638
- The session is always at `AAL1`. Read `session.user.mfa`: when `required`
639
- or `enrolled` is true, complete sign-in with `mfaChallengeCreate` and
640
- `mfaChallengeVerify` (or `mfaFactorEnroll` first when nothing is enrolled)
641
- before calling guarded fields.
563
+ The result of `sessionCreate`. The session is at `AAL1`: when `session.user.mfa.required` or
564
+ `enrolled` is true, finish with `mfaChallengeCreate` and `mfaChallengeVerify` (or `mfaFactorEnroll`
565
+ first when nothing is enrolled) before calling guarded fields.
642
566
  """
643
567
  type SessionCreatePayload {
644
- """The created session."""
568
+ """The new session."""
645
569
  session: Session
646
570
  }
647
571
  ```
@@ -649,11 +573,9 @@ type SessionCreatePayload {
649
573
  ### `SessionRefreshInput`
650
574
 
651
575
  ```graphql
652
- """
653
- Input for `sessionRefresh` — exchange a refresh token for a fresh session.
654
- """
576
+ """The input of `sessionRefresh`."""
655
577
  input SessionRefreshInput {
656
- """Refresh token from the current session."""
578
+ """The refresh token of the current session."""
657
579
  refreshToken: String!
658
580
  }
659
581
  ```
@@ -661,11 +583,9 @@ input SessionRefreshInput {
661
583
  ### `SessionRefreshPayload`
662
584
 
663
585
  ```graphql
664
- """Payload returned by `sessionRefresh`."""
586
+ """The result of `sessionRefresh`."""
665
587
  type SessionRefreshPayload {
666
- """
667
- The refreshed session, with a new `accessToken` and rotated `refreshToken`.
668
- """
588
+ """The new session, with a new `accessToken` and `refreshToken`."""
669
589
  session: Session
670
590
  }
671
591
  ```
@@ -674,21 +594,18 @@ type SessionRefreshPayload {
674
594
 
675
595
  ```graphql
676
596
  """
677
- Input for `accountCreate` — register with an email address.
678
-
679
- Registration collects no password. The API creates the account with a
680
- password it generates and never returns, and the user chooses their own
681
- password after confirming the address.
597
+ The input of `accountCreate`. Registration takes no password: the user sets one with
598
+ `passwordUpdate` after confirming the address.
682
599
  """
683
600
  input AccountCreateInput {
684
- """Email address for the new account."""
601
+ """The email address to register."""
685
602
  email: String!
686
603
  """
687
- URL the confirmation link returns to. Must match a registered redirect URL;
688
- Supabase falls back to the site URL when it does not.
604
+ The URL the confirmation link returns to. Must match a registered redirect URL; otherwise the
605
+ link returns to the site URL.
689
606
  """
690
607
  redirectUrl: String
691
- """Optional metadata to attach to the user's `userMetadata` blob."""
608
+ """Metadata to store in the user's `userMetadata`."""
692
609
  metadata: JSON
693
610
  }
694
611
  ```
@@ -697,20 +614,15 @@ input AccountCreateInput {
697
614
 
698
615
  ```graphql
699
616
  """
700
- Payload returned by `accountCreate`.
701
-
702
- `success` is true for every address that was emailed, so the payload reveals
703
- nothing about whether the address already has an account. A new or unconfirmed
704
- address is emailed a confirmation code and link; an address that already
705
- belongs to a confirmed account is emailed a magic-link sign-in instead. An
706
- address emailed inside Supabase Auth's minimum send interval also returns
707
- true — the previous email's code and link are still valid.
708
-
709
- Registration completes when the user confirms the address and sets a password
710
- through `passwordUpdate`.
617
+ The result of `accountCreate`. The payload is the same whether or not the address has an account:
618
+ a new or unconfirmed address is emailed a confirmation code and link, and a confirmed account a
619
+ sign-in code and link.
711
620
  """
712
621
  type AccountCreatePayload {
713
- """Whether an email was sent to the address."""
622
+ """
623
+ Whether the request succeeded. Also true when the address was emailed within the minimum send
624
+ interval; the earlier email's code and link stay valid.
625
+ """
714
626
  success: Boolean!
715
627
  }
716
628
  ```
@@ -718,13 +630,11 @@ type AccountCreatePayload {
718
630
  ### `AccountVerifyEmailInput`
719
631
 
720
632
  ```graphql
721
- """
722
- Input for `accountVerifyEmail` — exchange a verification token for a session.
723
- """
633
+ """The input of `accountVerifyEmail`."""
724
634
  input AccountVerifyEmailInput {
725
- """Email address being verified."""
635
+ """The email address the code was sent to."""
726
636
  email: String!
727
- """Verification token from the confirmation email link."""
637
+ """The six-digit code from the email."""
728
638
  token: String!
729
639
  }
730
640
  ```
@@ -732,9 +642,9 @@ input AccountVerifyEmailInput {
732
642
  ### `AccountVerifyEmailPayload`
733
643
 
734
644
  ```graphql
735
- """Payload returned by `accountVerifyEmail`."""
645
+ """The result of `accountVerifyEmail`."""
736
646
  type AccountVerifyEmailPayload {
737
- """Session for the verified user."""
647
+ """The session for the confirmed user."""
738
648
  session: Session
739
649
  }
740
650
  ```
@@ -742,11 +652,9 @@ type AccountVerifyEmailPayload {
742
652
  ### `AccountResendVerificationInput`
743
653
 
744
654
  ```graphql
745
- """
746
- Input for `accountResendVerification` — resend the verification email to the same address.
747
- """
655
+ """The input of `accountResendVerification`."""
748
656
  input AccountResendVerificationInput {
749
- """Email address to resend verification to."""
657
+ """The email address to send the code to."""
750
658
  email: String!
751
659
  }
752
660
  ```
@@ -754,9 +662,9 @@ input AccountResendVerificationInput {
754
662
  ### `AccountResendVerificationPayload`
755
663
 
756
664
  ```graphql
757
- """Payload returned by `accountResendVerification`."""
665
+ """The result of `accountResendVerification`."""
758
666
  type AccountResendVerificationPayload {
759
- """Whether the verification email was sent successfully."""
667
+ """Whether the email was sent."""
760
668
  success: Boolean!
761
669
  }
762
670
  ```
@@ -764,21 +672,17 @@ type AccountResendVerificationPayload {
764
672
  ### `OAuthAuthorizeInput`
765
673
 
766
674
  ```graphql
767
- """
768
- Input for `oauthAuthorize` — request the upstream provider's authorisation URL.
769
- """
675
+ """The input of `oauthAuthorize`."""
770
676
  input OAuthAuthorizeInput {
771
- """OAuth provider to authorise with."""
677
+ """The provider to sign in with."""
772
678
  provider: OAuthProvider!
773
679
  """
774
- URL the OAuth provider should redirect the user to after authentication.
775
- The server resolves the tenant from this URL's hostname; unknown
776
- hostnames fall back to the default tenant.
680
+ The URL the provider returns the user to. Its host selects the tenant, and an unknown host
681
+ selects the default one. Outside `picked.app`, the user returns to the same path on the
682
+ dashboard's own origin.
777
683
  """
778
684
  redirectUrl: String!
779
- """
780
- Optional scopes to request from the provider, in addition to the defaults.
781
- """
685
+ """Provider scopes to request in addition to the defaults."""
782
686
  scopes: [String!]
783
687
  }
784
688
  ```
@@ -786,9 +690,9 @@ input OAuthAuthorizeInput {
786
690
  ### `OAuthAuthorizePayload`
787
691
 
788
692
  ```graphql
789
- """Payload returned by `oauthAuthorize`."""
693
+ """The result of `oauthAuthorize`."""
790
694
  type OAuthAuthorizePayload {
791
- """URL to redirect the user to for authorisation."""
695
+ """The provider URL to send the user to."""
792
696
  url: String
793
697
  }
794
698
  ```
@@ -796,13 +700,11 @@ type OAuthAuthorizePayload {
796
700
  ### `OAuthCallbackInput`
797
701
 
798
702
  ```graphql
799
- """
800
- Input for `oauthCallback` — exchange the provider's authorisation code for a session.
801
- """
703
+ """The input of `oauthCallback`."""
802
704
  input OAuthCallbackInput {
803
- """OAuth provider that initiated the callback."""
705
+ """The provider that issued the code."""
804
706
  provider: OAuthProvider!
805
- """Authorisation code from the provider's redirect."""
707
+ """The authorisation code from the provider's redirect."""
806
708
  code: String!
807
709
  }
808
710
  ```
@@ -810,9 +712,9 @@ input OAuthCallbackInput {
810
712
  ### `OAuthCallbackPayload`
811
713
 
812
714
  ```graphql
813
- """Payload returned by `oauthCallback`."""
715
+ """The result of `oauthCallback`."""
814
716
  type OAuthCallbackPayload {
815
- """Session for the authenticated user."""
717
+ """The session for the signed-in user."""
816
718
  session: Session
817
719
  }
818
720
  ```
@@ -820,17 +722,15 @@ type OAuthCallbackPayload {
820
722
  ### `OAuthConsentClient`
821
723
 
822
724
  ```graphql
823
- """
824
- OAuth client info returned with an in-flight consent authorisation request.
825
- """
725
+ """The OAuth client that asks for a user's consent."""
826
726
  type OAuthConsentClient {
827
- """Client ID assigned to the OAuth client."""
727
+ """The client ID."""
828
728
  id: String!
829
- """Display name of the OAuth client."""
729
+ """The client's display name."""
830
730
  name: String!
831
- """Client URI (the application's homepage)."""
731
+ """The client's homepage. Null when not set."""
832
732
  uri: String
833
- """Logo image URL — shown on the consent prompt."""
733
+ """The URL of the client's logo. Null when not set."""
834
734
  logoUri: String
835
735
  }
836
736
  ```
@@ -838,23 +738,19 @@ type OAuthConsentClient {
838
738
  ### `OAuthConsentDetails`
839
739
 
840
740
  ```graphql
841
- """
842
- Details of an in-flight OAuth consent authorisation request. Returned by
843
- `oauthConsentDetails` when the dashboard renders the consent prompt; the
844
- client uses `oauthConsentApprove` or `oauthConsentDeny` to resolve it.
845
- """
741
+ """An OAuth authorisation request waiting for the user's consent."""
846
742
  type OAuthConsentDetails {
847
743
  """
848
- Authorisation ID — supply this to `oauthConsentApprove` / `oauthConsentDeny`.
744
+ The ID of the request, for `oauthConsentApprove` or `oauthConsentDeny`.
849
745
  """
850
746
  authorizationId: String!
851
- """The requesting client (the OAuth app the user is granting access to)."""
747
+ """The client that asks for access."""
852
748
  client: OAuthConsentClient!
853
- """Signed-in user's email — shown for confirmation on the consent prompt."""
749
+ """The signed-in user's email address."""
854
750
  userEmail: String!
855
- """Space-separated scopes the client is requesting."""
751
+ """The scopes the client asks for, separated by spaces."""
856
752
  scope: String!
857
- """Always `null`. Read `OAuthConsentDetailsPayload.redirectUrl` instead"""
753
+ """Always null."""
858
754
  redirectUrl: String @deprecated(reason: "Use OAuthConsentDetailsPayload.redirectUrl.")
859
755
  }
860
756
  ```
@@ -862,9 +758,9 @@ type OAuthConsentDetails {
862
758
  ### `OAuthConsentDetailsInput`
863
759
 
864
760
  ```graphql
865
- """Input for `oauthConsentDetails`."""
761
+ """The input of `oauthConsentDetails`."""
866
762
  input OAuthConsentDetailsInput {
867
- """The `authorization_id` query parameter from the consent URL."""
763
+ """The `authorization_id` query parameter of the consent URL."""
868
764
  authorizationId: String!
869
765
  }
870
766
  ```
@@ -873,22 +769,17 @@ input OAuthConsentDetailsInput {
873
769
 
874
770
  ```graphql
875
771
  """
876
- Payload returned by `oauthConsentDetails`. Exactly one of the two fields is set.
877
-
878
- `details` is set when the user has not yet consented to this client: render the
879
- consent prompt, then call `oauthConsentApprove` or `oauthConsentDeny`.
880
-
881
- `redirectUrl` is set when the user has already consented to this client for
882
- these scopes. Reading the authorisation approves it — the authorisation code is
883
- already minted and the prompt must be skipped. Send the user to this URL.
772
+ The result of `oauthConsentDetails`. Exactly one field is set: `details` when the user has not
773
+ yet consented to the client for these scopes, and `redirectUrl` when they have. In that case the
774
+ read itself approves the request: skip the prompt and send the user to `redirectUrl`.
884
775
  """
885
776
  type OAuthConsentDetailsPayload {
886
777
  """
887
- Authorisation details — the requesting client and requested scopes. Null when `redirectUrl` is set.
778
+ The request to show on the consent prompt. Null when `redirectUrl` is set.
888
779
  """
889
780
  details: OAuthConsentDetails
890
781
  """
891
- Where to send the user when consent was already granted. Null when `details` is set.
782
+ Where to send the user when consent was already given. Null when `details` is set.
892
783
  """
893
784
  redirectUrl: String
894
785
  }
@@ -897,9 +788,9 @@ type OAuthConsentDetailsPayload {
897
788
  ### `OAuthConsentApproveInput`
898
789
 
899
790
  ```graphql
900
- """Input for `oauthConsentApprove`."""
791
+ """The input of `oauthConsentApprove`."""
901
792
  input OAuthConsentApproveInput {
902
- """The `authorization_id` to approve."""
793
+ """The ID of the request to approve."""
903
794
  authorizationId: String!
904
795
  }
905
796
  ```
@@ -907,9 +798,9 @@ input OAuthConsentApproveInput {
907
798
  ### `OAuthConsentDenyInput`
908
799
 
909
800
  ```graphql
910
- """Input for `oauthConsentDeny`."""
801
+ """The input of `oauthConsentDeny`."""
911
802
  input OAuthConsentDenyInput {
912
- """The `authorization_id` to deny."""
803
+ """The ID of the request to deny."""
913
804
  authorizationId: String!
914
805
  }
915
806
  ```
@@ -917,9 +808,9 @@ input OAuthConsentDenyInput {
917
808
  ### `OAuthConsentActionPayload`
918
809
 
919
810
  ```graphql
920
- """Payload returned by `oauthConsentApprove` and `oauthConsentDeny`."""
811
+ """The result of `oauthConsentApprove` and `oauthConsentDeny`."""
921
812
  type OAuthConsentActionPayload {
922
- """URL to redirect the user to after the consent decision."""
813
+ """Where to send the user after the decision."""
923
814
  redirectUrl: String!
924
815
  }
925
816
  ```
@@ -927,14 +818,12 @@ type OAuthConsentActionPayload {
927
818
  ### `MagicLinkSendInput`
928
819
 
929
820
  ```graphql
930
- """
931
- Input for `magicLinkSend` — send a one-time sign-in link to the given email.
932
- """
821
+ """The input of `magicLinkSend`."""
933
822
  input MagicLinkSendInput {
934
- """Email address to send the magic link to."""
823
+ """The email address to send the code to."""
935
824
  email: String!
936
825
  """
937
- URL to redirect to after verification (must match a registered redirect URL).
826
+ The URL the emailed link returns to. Must match a registered redirect URL.
938
827
  """
939
828
  redirectUrl: String
940
829
  }
@@ -943,9 +832,12 @@ input MagicLinkSendInput {
943
832
  ### `MagicLinkSendPayload`
944
833
 
945
834
  ```graphql
946
- """Payload returned by `magicLinkSend`."""
835
+ """The result of `magicLinkSend`."""
947
836
  type MagicLinkSendPayload {
948
- """Whether the magic link was sent successfully."""
837
+ """
838
+ Always true: an address with no account, or one emailed within the minimum send interval, also
839
+ answers true.
840
+ """
949
841
  success: Boolean!
950
842
  }
951
843
  ```
@@ -953,13 +845,11 @@ type MagicLinkSendPayload {
953
845
  ### `MagicLinkVerifyInput`
954
846
 
955
847
  ```graphql
956
- """
957
- Input for `magicLinkVerify` — exchange the magic-link token for a session.
958
- """
848
+ """The input of `magicLinkVerify`."""
959
849
  input MagicLinkVerifyInput {
960
- """Email address the magic link was sent to."""
850
+ """The email address the code was sent to."""
961
851
  email: String!
962
- """Six-digit code from the email."""
852
+ """The six-digit code from the email."""
963
853
  token: String!
964
854
  }
965
855
  ```
@@ -967,9 +857,9 @@ input MagicLinkVerifyInput {
967
857
  ### `MagicLinkVerifyPayload`
968
858
 
969
859
  ```graphql
970
- """Payload returned by `magicLinkVerify`."""
860
+ """The result of `magicLinkVerify`."""
971
861
  type MagicLinkVerifyPayload {
972
- """Session for the authenticated user."""
862
+ """The session for the signed-in user."""
973
863
  session: Session
974
864
  }
975
865
  ```
@@ -977,9 +867,7 @@ type MagicLinkVerifyPayload {
977
867
  ### `EmailLinkType`
978
868
 
979
869
  ```graphql
980
- """
981
- The emails whose link signs the recipient in through `emailLinkVerify`.
982
- """
870
+ """The kind of email a link passed to `emailLinkVerify` came from."""
983
871
  enum EmailLinkType {
984
872
  """A password-reset email."""
985
873
  RECOVERY
@@ -995,13 +883,11 @@ enum EmailLinkType {
995
883
  ### `EmailLinkVerifyInput`
996
884
 
997
885
  ```graphql
998
- """
999
- Input for `emailLinkVerify` — exchange the token hash from an emailed link for a session.
1000
- """
886
+ """The input of `emailLinkVerify`."""
1001
887
  input EmailLinkVerifyInput {
1002
- """The `token_hash` carried by the emailed link."""
888
+ """The `token_hash` parameter of the emailed link."""
1003
889
  tokenHash: String!
1004
- """Which email the link came from."""
890
+ """The kind of email the link came from."""
1005
891
  type: EmailLinkType!
1006
892
  }
1007
893
  ```
@@ -1009,9 +895,9 @@ input EmailLinkVerifyInput {
1009
895
  ### `EmailLinkVerifyPayload`
1010
896
 
1011
897
  ```graphql
1012
- """Payload returned by `emailLinkVerify`."""
898
+ """The result of `emailLinkVerify`."""
1013
899
  type EmailLinkVerifyPayload {
1014
- """Session for the authenticated user."""
900
+ """The session for the signed-in user."""
1015
901
  session: Session
1016
902
  }
1017
903
  ```
@@ -1019,13 +905,11 @@ type EmailLinkVerifyPayload {
1019
905
  ### `PasswordResetSendInput`
1020
906
 
1021
907
  ```graphql
1022
- """
1023
- Input for `passwordResetSend` — send a password-reset email to the given address.
1024
- """
908
+ """The input of `passwordResetSend`."""
1025
909
  input PasswordResetSendInput {
1026
- """Email address to send the password-reset email to."""
910
+ """The email address to send the reset email to."""
1027
911
  email: String!
1028
- """URL to redirect the user to for the password-reset form."""
912
+ """The URL the reset link returns to, where the user sets a new password."""
1029
913
  redirectUrl: String
1030
914
  }
1031
915
  ```
@@ -1033,9 +917,9 @@ input PasswordResetSendInput {
1033
917
  ### `PasswordResetSendPayload`
1034
918
 
1035
919
  ```graphql
1036
- """Payload returned by `passwordResetSend`."""
920
+ """The result of `passwordResetSend`."""
1037
921
  type PasswordResetSendPayload {
1038
- """Whether the password-reset email was sent successfully."""
922
+ """Whether the request succeeded."""
1039
923
  success: Boolean!
1040
924
  }
1041
925
  ```
@@ -1043,16 +927,9 @@ type PasswordResetSendPayload {
1043
927
  ### `PasswordUpdateInput`
1044
928
 
1045
929
  ```graphql
1046
- """
1047
- Input for `passwordUpdate` — change the authenticated user's password.
1048
- The current password is not required; the operation is gated by an
1049
- authenticated session instead.
1050
-
1051
- Updating the password ends every other active session for this user. The
1052
- caller's own session stays valid at the assurance level it holds.
1053
- """
930
+ """The input of `passwordUpdate`. Every field is required."""
1054
931
  input PasswordUpdateInput {
1055
- """New password to set. Must meet Supabase Auth strength requirements."""
932
+ """The new password. Must meet the password strength rules."""
1056
933
  newPassword: String!
1057
934
  }
1058
935
  ```
@@ -1060,11 +937,11 @@ input PasswordUpdateInput {
1060
937
  ### `PasswordUpdatePayload`
1061
938
 
1062
939
  ```graphql
1063
- """Payload returned by `passwordUpdate`."""
940
+ """The result of `passwordUpdate`."""
1064
941
  type PasswordUpdatePayload {
1065
- """Whether the password was updated successfully."""
942
+ """Whether the password changed."""
1066
943
  success: Boolean!
1067
- """Null: the caller's own session stays valid through the change."""
944
+ """Always null; the caller's session stays valid."""
1068
945
  session: Session
1069
946
  }
1070
947
  ```
@@ -1072,16 +949,11 @@ type PasswordUpdatePayload {
1072
949
  ### `MfaFactorEnrollInput`
1073
950
 
1074
951
  ```graphql
1075
- """
1076
- Input for `mfaFactorEnroll` — enrol an authenticator app. The caller's
1077
- unverified TOTP factors are deleted first, except the two newest enrolled in the
1078
- last minute, which setups open elsewhere may still be showing. An unverified
1079
- factor that holds the `friendlyName` given is deleted however new it is.
1080
- """
952
+ """The input of `mfaFactorEnroll`."""
1081
953
  input MfaFactorEnrollInput {
1082
954
  """
1083
- Name for the factor, shown on the account page. Defaults to "Authenticator app",
1084
- numbered ("Authenticator app 2", …) past the names the caller's factors hold.
955
+ The name of the factor, shown on the account page. Defaults to "Authenticator app", numbered
956
+ ("Authenticator app 2", …) past the names the caller's factors hold.
1085
957
  """
1086
958
  friendlyName: String
1087
959
  }
@@ -1090,11 +962,15 @@ input MfaFactorEnrollInput {
1090
962
  ### `MfaFactorEnrollPayload`
1091
963
 
1092
964
  ```graphql
1093
- """Payload returned by `mfaFactorEnroll`."""
965
+ """
966
+ The result of `mfaFactorEnroll`. `totp` carries the factor's secret, which is returned only here.
967
+ """
1094
968
  type MfaFactorEnrollPayload {
1095
- """The newly enrolled MFA factor (status starts as `UNVERIFIED`)."""
969
+ """
970
+ The new factor, `UNVERIFIED` until `mfaChallengeVerify` accepts a code from it.
971
+ """
1096
972
  factor: MfaFactor!
1097
- """What the authenticator app needs to add the factor. Shown once."""
973
+ """What an authenticator app needs to add the factor."""
1098
974
  totp: MfaTotpEnrollment!
1099
975
  }
1100
976
  ```
@@ -1102,11 +978,9 @@ type MfaFactorEnrollPayload {
1102
978
  ### `MfaChallengeCreateInput`
1103
979
 
1104
980
  ```graphql
1105
- """
1106
- Input for `mfaChallengeCreate` — open a challenge against an enrolled factor.
1107
- """
981
+ """The input of `mfaChallengeCreate`."""
1108
982
  input MfaChallengeCreateInput {
1109
- """ID of the MFA factor to challenge."""
983
+ """The ID of the factor to challenge."""
1110
984
  factorId: ID!
1111
985
  }
1112
986
  ```
@@ -1114,9 +988,9 @@ input MfaChallengeCreateInput {
1114
988
  ### `MfaChallengeCreatePayload`
1115
989
 
1116
990
  ```graphql
1117
- """Payload returned by `mfaChallengeCreate`."""
991
+ """The result of `mfaChallengeCreate`."""
1118
992
  type MfaChallengeCreatePayload {
1119
- """ID of the created challenge — supply to `mfaChallengeVerify`."""
993
+ """The ID of the challenge, for `mfaChallengeVerify`."""
1120
994
  challengeId: ID!
1121
995
  """When the challenge stops accepting codes."""
1122
996
  expiresAt: DateTime!
@@ -1126,15 +1000,13 @@ type MfaChallengeCreatePayload {
1126
1000
  ### `MfaChallengeVerifyInput`
1127
1001
 
1128
1002
  ```graphql
1129
- """
1130
- Input for `mfaChallengeVerify` — submit the current code from the authenticator app.
1131
- """
1003
+ """The input of `mfaChallengeVerify`."""
1132
1004
  input MfaChallengeVerifyInput {
1133
- """ID of the MFA factor."""
1005
+ """The ID of the factor."""
1134
1006
  factorId: ID!
1135
- """ID of the challenge to verify."""
1007
+ """The ID of the challenge."""
1136
1008
  challengeId: ID!
1137
- """Six-digit code from the authenticator app."""
1009
+ """The six-digit code from the authenticator app."""
1138
1010
  code: String!
1139
1011
  }
1140
1012
  ```
@@ -1142,12 +1014,11 @@ input MfaChallengeVerifyInput {
1142
1014
  ### `MfaChallengeVerifyPayload`
1143
1015
 
1144
1016
  ```graphql
1145
- """
1146
- Payload returned by `mfaChallengeVerify`. The returned session carries rotated
1147
- tokens at `AAL2`; the user's other sessions are left alone.
1148
- """
1017
+ """The result of `mfaChallengeVerify`."""
1149
1018
  type MfaChallengeVerifyPayload {
1150
- """Session upgraded to AAL2, with new `accessToken` and `refreshToken`."""
1019
+ """
1020
+ The caller's session at `AAL2`, with a new `accessToken` and `refreshToken`.
1021
+ """
1151
1022
  session: Session
1152
1023
  }
1153
1024
  ```
@@ -1155,13 +1026,9 @@ type MfaChallengeVerifyPayload {
1155
1026
  ### `MfaFactorUnenrollInput`
1156
1027
 
1157
1028
  ```graphql
1158
- """
1159
- Input for `mfaFactorUnenroll` — remove an enrolled MFA factor. Removing a
1160
- `VERIFIED` factor needs an `AAL2` session; an `AAL1` session is refused with
1161
- `MFA_REQUIRED`.
1162
- """
1029
+ """The input of `mfaFactorUnenroll`."""
1163
1030
  input MfaFactorUnenrollInput {
1164
- """ID of the MFA factor to unenrol."""
1031
+ """The ID of the factor to remove."""
1165
1032
  factorId: ID!
1166
1033
  }
1167
1034
  ```
@@ -1169,9 +1036,9 @@ input MfaFactorUnenrollInput {
1169
1036
  ### `MfaFactorUnenrollPayload`
1170
1037
 
1171
1038
  ```graphql
1172
- """Payload returned by `mfaFactorUnenroll`."""
1039
+ """The result of `mfaFactorUnenroll`."""
1173
1040
  type MfaFactorUnenrollPayload {
1174
- """Whether the factor was unenrolled successfully."""
1041
+ """Whether the factor was removed."""
1175
1042
  success: Boolean!
1176
1043
  }
1177
1044
  ```