@faable/auth-sdk 1.3.11 → 1.3.13

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.
@@ -60,7 +60,11 @@ export interface paths {
60
60
  */
61
61
  get: operations["account/get"];
62
62
  put?: never;
63
- post?: never;
63
+ /**
64
+ * Update an Account
65
+ * @description Update the Account configuration such as branding (logo and icon URLs).
66
+ */
67
+ post: operations["account/update"];
64
68
  /**
65
69
  * Delete an Account
66
70
  * @description Permanently removes an Account and its associated data. This action cannot be undone.
@@ -239,6 +243,46 @@ export interface paths {
239
243
  patch?: never;
240
244
  trace?: never;
241
245
  };
246
+ "/user/{user_id}/change-email": {
247
+ parameters: {
248
+ query?: never;
249
+ header?: never;
250
+ path?: never;
251
+ cookie?: never;
252
+ };
253
+ get?: never;
254
+ put?: never;
255
+ /**
256
+ * Start the user's email change flow
257
+ * @description Initiates the email-change flow for the given user. Validates the new email, ensures it is not already in use in the tenant, revokes any pending change for the same user, creates a Ticket (`type='change_email'`), and sends a verification email to the new address. Re-authentication is not required — an active session/Bearer is enough. The change does NOT take effect until the user clicks the link in the email and confirms via `/change-email-confirm`.
258
+ */
259
+ post: operations["user/changeEmail"];
260
+ delete?: never;
261
+ options?: never;
262
+ head?: never;
263
+ patch?: never;
264
+ trace?: never;
265
+ };
266
+ "/change-email-verify": {
267
+ parameters: {
268
+ query?: never;
269
+ header?: never;
270
+ path?: never;
271
+ cookie?: never;
272
+ };
273
+ /**
274
+ * Verify a change-email ticket and apply the change
275
+ * @description Entry point for the link sent to the new email. Consumes the ticket, applies the email swap (in `new_only` mode) or issues a secondary verification ticket to the old email (in `old_and_new` mode, first step). Redirects to the `redirect_uri` supplied at flow start with `?status=applied|pending_old` appended; falls back to `/flow/email-change-done` on the auth host when no `redirect_uri` was given.
276
+ */
277
+ get: operations["user_change_email_verify"];
278
+ put?: never;
279
+ post?: never;
280
+ delete?: never;
281
+ options?: never;
282
+ head?: never;
283
+ patch?: never;
284
+ trace?: never;
285
+ };
242
286
  "/identity": {
243
287
  parameters: {
244
288
  query?: never;
@@ -324,7 +368,11 @@ export interface paths {
324
368
  */
325
369
  get: operations["role/get"];
326
370
  put?: never;
327
- post?: never;
371
+ /**
372
+ * Update Roles in Account
373
+ * @description Update Roles in Account
374
+ */
375
+ post: operations["role/update"];
328
376
  /**
329
377
  * Delete Role in Account
330
378
  * @description Delete Role in Account
@@ -444,7 +492,11 @@ export interface paths {
444
492
  */
445
493
  get: operations["team/get"];
446
494
  put?: never;
447
- post?: never;
495
+ /**
496
+ * Update Teams in Account
497
+ * @description Update Teams in Account
498
+ */
499
+ post: operations["team/update"];
448
500
  /**
449
501
  * Delete Team in Account
450
502
  * @description Delete Team in Account
@@ -547,6 +599,70 @@ export interface paths {
547
599
  patch?: never;
548
600
  trace?: never;
549
601
  };
602
+ "/team/{team_id}/invite": {
603
+ parameters: {
604
+ query?: never;
605
+ header?: never;
606
+ path?: never;
607
+ cookie?: never;
608
+ };
609
+ /**
610
+ * List pending invites for a Team
611
+ * @description Returns all pending (not consumed, not expired) team invites for the given team. Accepts a FaableQL `query` parameter on the `email` field.
612
+ */
613
+ get: operations["team/listInvites"];
614
+ put?: never;
615
+ /**
616
+ * Invite a user to a Team by email
617
+ * @description Invites a user by email. `mode='auto'` (default) adds the user directly when the email already corresponds to a user in this tenant and falls back to a ticketed invite + email otherwise. `mode='invite'` always issues a ticket + email even when the user exists. Re-inviting the same email to the same team invalidates the previous pending invite.
618
+ */
619
+ post: operations["team/invite"];
620
+ delete?: never;
621
+ options?: never;
622
+ head?: never;
623
+ patch?: never;
624
+ trace?: never;
625
+ };
626
+ "/team/{team_id}/invite/{ticket_id}": {
627
+ parameters: {
628
+ query?: never;
629
+ header?: never;
630
+ path?: never;
631
+ cookie?: never;
632
+ };
633
+ get?: never;
634
+ put?: never;
635
+ post?: never;
636
+ /**
637
+ * Revoke a pending team invite
638
+ * @description Marks a pending team invite as consumed so it can no longer be accepted. Returns 400 if the invite is already consumed and 404 if it does not exist or belongs to a different team.
639
+ */
640
+ delete: operations["team/revokeInvite"];
641
+ options?: never;
642
+ head?: never;
643
+ patch?: never;
644
+ trace?: never;
645
+ };
646
+ "/invite-verify": {
647
+ parameters: {
648
+ query?: never;
649
+ header?: never;
650
+ path?: never;
651
+ cookie?: never;
652
+ };
653
+ /**
654
+ * Verify a team-invite ticket and add the user to the team
655
+ * @description Entry point for the link sent to the invitee. Consumes the ticket, creates the user if needed (with `email_verified=true` — the click proves ownership), and adds them to the team with the invited roles. Then redirects to the `redirect_uri` supplied at invite time with `?status=accepted` appended; falls back to `/flow/team-invite-done` on the auth host when no `redirect_uri` was given. Idempotent if the user is already a member.
656
+ */
657
+ get: operations["team_invite_verify"];
658
+ put?: never;
659
+ post?: never;
660
+ delete?: never;
661
+ options?: never;
662
+ head?: never;
663
+ patch?: never;
664
+ trace?: never;
665
+ };
550
666
  "/api": {
551
667
  parameters: {
552
668
  query?: never;
@@ -584,7 +700,11 @@ export interface paths {
584
700
  */
585
701
  get: operations["api/get"];
586
702
  put?: never;
587
- post?: never;
703
+ /**
704
+ * Update Apis in Account
705
+ * @description Update Apis in Account
706
+ */
707
+ post: operations["api/update"];
588
708
  /**
589
709
  * Delete Api in Account
590
710
  * @description Delete Api in Account
@@ -595,6 +715,26 @@ export interface paths {
595
715
  patch?: never;
596
716
  trace?: never;
597
717
  };
718
+ "/account/keys": {
719
+ parameters: {
720
+ query?: never;
721
+ header?: never;
722
+ path?: never;
723
+ cookie?: never;
724
+ };
725
+ /**
726
+ * Get Account signing keys info
727
+ * @description Returns metadata for the Account signing keys: the current production kid, the kid queued for next rotation, and all kids currently published in the JWK Set. Does not expose private key material.
728
+ */
729
+ get: operations["account/getKeys"];
730
+ put?: never;
731
+ post?: never;
732
+ delete?: never;
733
+ options?: never;
734
+ head?: never;
735
+ patch?: never;
736
+ trace?: never;
737
+ };
598
738
  "/account/keys/rotate": {
599
739
  parameters: {
600
740
  query?: never;
@@ -1285,7 +1425,10 @@ export interface components {
1285
1425
  logo_src?: string | null;
1286
1426
  icon_src?: string | null;
1287
1427
  callback_hostnames: string[];
1428
+ /** @description Shared HMAC secret. Used when token_signing_alg is an HS* algorithm; ignored for RS*\/ES*\/PS*. */
1288
1429
  token_signature: string;
1430
+ /** @description JWA algorithm used to sign tokens issued by this Account. Today only RS256 is implemented. */
1431
+ token_signing_alg: "RS256";
1289
1432
  default_connection?: components["schemas"]["Connection"] | string | unknown;
1290
1433
  enabled_locales: string[];
1291
1434
  team?: string | null;
@@ -1296,11 +1439,22 @@ export interface components {
1296
1439
  */
1297
1440
  welcome_email_enabled: boolean;
1298
1441
  };
1442
+ /** @description Policy for the user email-change flow. `new_only` (default) sends a single confirmation link to the new email. `old_and_new` requires the user to also click a link sent to the previous email before the swap takes effect — stricter, useful for tenants with higher-risk users. */
1443
+ email_change_verification_mode?: "new_only" | "old_and_new";
1444
+ /**
1445
+ * @description Controls what happens to `user.email` on subsequent OAuth/federated logins when the user previously changed their email manually through this auth server (i.e. `user.email_change_locked_at` is set).
1446
+ *
1447
+ * - `preserve_manual` (default): the manually-set email wins. The federated provider's email is ignored on re-sync; `email` and `email_verified` are not touched. The identity link stays valid via `provider_user_id`, so the user can still log in with Google/etc.
1448
+ * - `always_sync`: the federated provider's email is always written back, overwriting any manual change. Useful for tenants whose source of truth for identity is the IdP (corporate SSO, etc.).
1449
+ */
1450
+ email_oauth_sync_policy?: "preserve_manual" | "always_sync";
1299
1451
  /** @description AuthAccount creation date */
1300
1452
  createdAt: string;
1301
1453
  /** @description AuthAccount updated date */
1302
1454
  updatedAt?: string;
1303
1455
  };
1456
+ /** @description JWA algorithm used to sign tokens issued by this Account. Today only RS256 is implemented. */
1457
+ TokenSigningAlg: "RS256";
1304
1458
  AccountNotificationSettings: {
1305
1459
  /**
1306
1460
  * @description Send the built-in welcome email on user.created
@@ -1308,13 +1462,22 @@ export interface components {
1308
1462
  */
1309
1463
  welcome_email_enabled: boolean;
1310
1464
  };
1465
+ /** @description Policy for the user email-change flow. `new_only` (default) sends a single confirmation link to the new email. `old_and_new` requires the user to also click a link sent to the previous email before the swap takes effect — stricter, useful for tenants with higher-risk users. */
1466
+ EmailChangeVerificationMode: "new_only" | "old_and_new";
1467
+ /**
1468
+ * @description Controls what happens to `user.email` on subsequent OAuth/federated logins when the user previously changed their email manually through this auth server (i.e. `user.email_change_locked_at` is set).
1469
+ *
1470
+ * - `preserve_manual` (default): the manually-set email wins. The federated provider's email is ignored on re-sync; `email` and `email_verified` are not touched. The identity link stays valid via `provider_user_id`, so the user can still log in with Google/etc.
1471
+ * - `always_sync`: the federated provider's email is always written back, overwriting any manual change. Useful for tenants whose source of truth for identity is the IdP (corporate SSO, etc.).
1472
+ */
1473
+ EmailOAuthSyncPolicy: "preserve_manual" | "always_sync";
1311
1474
  /** @description Connection */
1312
1475
  Connection: {
1313
1476
  /** @description Connection ID */
1314
1477
  id: string;
1315
1478
  connection_name: string;
1316
1479
  /** @enum {unknown} */
1317
- connection_type: "database" | "custom" | "github" | "figma" | "google_oauth2" | "oidc";
1480
+ connection_type: "database" | "custom" | "github" | "figma" | "google_oauth2" | "oidc" | "passwordless_email";
1318
1481
  /** @default null */
1319
1482
  authorize_url: string;
1320
1483
  /** @default null */
@@ -1368,7 +1531,7 @@ export interface components {
1368
1531
  ConnectionCreate: {
1369
1532
  connection_name: string;
1370
1533
  /** @enum {unknown} */
1371
- connection_type: "database" | "custom" | "github" | "figma" | "google_oauth2" | "oidc";
1534
+ connection_type: "database" | "custom" | "github" | "figma" | "google_oauth2" | "oidc" | "passwordless_email";
1372
1535
  authorize_url?: string;
1373
1536
  client_id?: string;
1374
1537
  client_secret?: string;
@@ -1483,6 +1646,8 @@ export interface components {
1483
1646
  * @default false
1484
1647
  */
1485
1648
  email_verified: boolean;
1649
+ /** @description ISO 8601 timestamp of the user's last verified email change. When set, OAuth callbacks will not overwrite `email`/`email_verified` from the federated provider — the manually-chosen email wins. */
1650
+ email_change_locked_at?: string | null;
1486
1651
  /** @description contact phone number */
1487
1652
  phone?: string | null;
1488
1653
  /** @description phone is verified */
@@ -1600,7 +1765,7 @@ export interface components {
1600
1765
  locale?: string;
1601
1766
  /** @description A URI pointing to the user's picture. */
1602
1767
  picture?: string;
1603
- /** @description Initial password for this user (mandatory only for auth0 connection strategy) */
1768
+ /** @description Initial password for this user. Only used (and required) when the user is being provisioned against a `database` connection; ignored for federated/social connections. */
1604
1769
  password?: string;
1605
1770
  /** @description User Metadata */
1606
1771
  user_metadata?: {
@@ -1704,9 +1869,12 @@ export interface components {
1704
1869
  Role: {
1705
1870
  /** @description Role ID */
1706
1871
  id: string;
1707
- /** @description Name for this role */
1872
+ /**
1873
+ * @description Short, human-readable identifier for the role (e.g. `admin`, `editor`, `billing-manager`). Surfaced in the dashboard role pickers.
1874
+ * @example admin
1875
+ */
1708
1876
  name: string;
1709
- /** @description Description of this role */
1877
+ /** @description Free-form explanation of what users in this role are expected to do or have access to. Shown alongside the role in the dashboard. */
1710
1878
  description: string;
1711
1879
  /** @description Object is related with this account */
1712
1880
  account: string;
@@ -1731,7 +1899,12 @@ export interface components {
1731
1899
  };
1732
1900
  /** @description RoleCreate */
1733
1901
  RoleCreate: {
1902
+ /**
1903
+ * @description Short, human-readable identifier for the role (e.g. `admin`, `editor`).
1904
+ * @example admin
1905
+ */
1734
1906
  name: string;
1907
+ /** @description Free-form explanation of what users in this role are expected to do or have access to. */
1735
1908
  description?: string;
1736
1909
  /** @description Add Metadata */
1737
1910
  metadata?: {
@@ -1742,11 +1915,20 @@ export interface components {
1742
1915
  RoleMetadataCreate: {
1743
1916
  [key: string]: unknown;
1744
1917
  };
1918
+ /** @description Partial update for a Role. Only the supplied fields are modified. */
1919
+ RoleUpdate: {
1920
+ /** @description New human-readable identifier for the role. */
1921
+ name?: string;
1922
+ /** @description New free-form description of what users in this role do. */
1923
+ description?: string;
1924
+ };
1745
1925
  /** @description RoleMember */
1746
1926
  RoleMember: {
1747
1927
  /** @description RoleMember ID */
1748
1928
  id: string;
1929
+ /** @description Role granted to the user. Returned as an id by default; pass `?expand=role` to inline the full Role object. */
1749
1930
  role: components["schemas"]["Role"] | string | unknown;
1931
+ /** @description User the role is granted to. Returned as an id by default; pass `?expand=user` to inline the full User object. */
1750
1932
  user: components["schemas"]["User"] | string | unknown;
1751
1933
  /** @description Object is related with this account */
1752
1934
  account: string;
@@ -1769,16 +1951,33 @@ export interface components {
1769
1951
  RoleMemberMetadata: {
1770
1952
  [key: string]: unknown;
1771
1953
  };
1954
+ /** @description Payload for granting a role to one or more users in a single call. Posted to `POST /role/:role_id/users`. */
1772
1955
  RoleMemberCreate: {
1956
+ /**
1957
+ * @description List of User ids to grant the role to. Existing role memberships are preserved; passing a user that already holds the role is a no-op.
1958
+ * @example [
1959
+ * "user_6555fd293acc2f0fac0e3452"
1960
+ * ]
1961
+ */
1773
1962
  users: string[];
1774
1963
  };
1775
1964
  /** @description Team */
1776
1965
  Team: {
1777
1966
  /** @description Team ID */
1778
1967
  id: string;
1968
+ /**
1969
+ * @description Human-readable name of the team. Shown in the dashboard and in team-picker UI.
1970
+ * @example Acme Engineering
1971
+ */
1779
1972
  name: string;
1973
+ /**
1974
+ * @description URL-safe identifier auto-derived from `name`. Unique within the tenant; used in routes that address a team by slug.
1975
+ * @example acme-engineering
1976
+ */
1780
1977
  slug: string;
1978
+ /** @description Optional free-form description of the team. */
1781
1979
  description: string | null;
1980
+ /** @description Optional URL of an image used as the team avatar/logo. */
1782
1981
  logo_url: string | null;
1783
1982
  /** @description Object is related with this account */
1784
1983
  account: string;
@@ -1803,7 +2002,12 @@ export interface components {
1803
2002
  };
1804
2003
  /** @description TeamCreate */
1805
2004
  TeamCreate: {
2005
+ /**
2006
+ * @description Human-readable name of the team.
2007
+ * @example Acme Engineering
2008
+ */
1806
2009
  name: string;
2010
+ /** @description Optional free-form description of the team. */
1807
2011
  description?: string;
1808
2012
  /** @description Add Metadata */
1809
2013
  metadata?: {
@@ -1814,12 +2018,30 @@ export interface components {
1814
2018
  TeamMetadataCreate: {
1815
2019
  [key: string]: unknown;
1816
2020
  };
2021
+ /** @description Partial update for a Team. Only the supplied fields are modified. `slug` is auto-derived from `name` and is not user-editable. */
2022
+ TeamUpdate: {
2023
+ /** @description New human-readable name for the team. */
2024
+ name?: string;
2025
+ /** @description New free-form description for the team. */
2026
+ description?: string;
2027
+ /** @description Arbitrary key/value pairs attached to the team. Replaces the previous metadata entirely. */
2028
+ metadata?: {
2029
+ [key: string]: unknown;
2030
+ };
2031
+ };
2032
+ /** @description Arbitrary key/value pairs attached to the team. Replaces the previous metadata entirely. */
2033
+ TeamUpdateMetadata: {
2034
+ [key: string]: unknown;
2035
+ };
1817
2036
  /** @description TeamMember */
1818
2037
  TeamMember: {
1819
2038
  /** @description TeamMember ID */
1820
2039
  id: string;
2040
+ /** @description User that belongs to the team. Returned as an id by default; pass `?expand=user` to inline the full User object. */
1821
2041
  user: components["schemas"]["User"] | string | unknown;
2042
+ /** @description Team the user belongs to. Returned as an id by default; pass `?expand=team` to inline the full Team object. */
1822
2043
  team: components["schemas"]["Team"] | string | unknown;
2044
+ /** @description Roles granted to the user *within this team*. Distinct from account-wide RoleMember grants — these only apply in the scope of the team. Each entry is an id by default; pass `?expand=roles` to inline. */
1823
2045
  roles: (components["schemas"]["Role"] | string | unknown)[];
1824
2046
  /** @description Object is related with this account */
1825
2047
  account: string;
@@ -1842,24 +2064,80 @@ export interface components {
1842
2064
  TeamMemberMetadata: {
1843
2065
  [key: string]: unknown;
1844
2066
  };
2067
+ /** @description Payload for adding one or more users to a team in a single call. Posted to `POST /team/:team_id/member`. */
1845
2068
  TeamMemberCreate: {
2069
+ /**
2070
+ * @description List of User ids to add as members of the team. Users already in the team are skipped.
2071
+ * @example [
2072
+ * "user_6555fd293acc2f0fac0e3452"
2073
+ * ]
2074
+ */
1846
2075
  users: string[];
2076
+ /**
2077
+ * @description Role ids to grant to the added members within the scope of this team.
2078
+ * @default []
2079
+ * @example [
2080
+ * "role_6555fd293acc2f0fac0e3452"
2081
+ * ]
2082
+ */
2083
+ roles: string[];
1847
2084
  };
2085
+ /** @description A permission exposed by an API: a single value that may end up in the `permissions` claim of an access_token, plus a human-readable description shown in the consent prompt. */
1848
2086
  Permission: {
2087
+ /**
2088
+ * @description Permission identifier as it appears in the `permissions` claim of an access_token (e.g. `read:users`). Use `<verb>:<resource>` by convention.
2089
+ * @example read:users
2090
+ */
1849
2091
  value: string;
2092
+ /** @description Human-readable explanation shown in the consent prompt. */
1850
2093
  description?: string;
1851
2094
  };
2095
+ /** @description Payload for declaring a single permission inside an Api. */
1852
2096
  PermissionCreate: {
2097
+ /**
2098
+ * @description Permission identifier as it will appear in the `permissions` claim (e.g. `read:users`). Convention: `<verb>:<resource>`.
2099
+ * @example read:users
2100
+ */
1853
2101
  value: string;
2102
+ /** @description Human-readable explanation shown in the consent prompt. */
1854
2103
  description?: string;
1855
2104
  };
2105
+ /** @description JWA algorithm used to sign access_tokens issued for this API. Currently only RS256 (the account keystore default) is implemented. */
2106
+ ApiSigningAlg: "RS256";
2107
+ /** @description Shape of access_tokens issued for this API. `access_token` emits the standard OAuth2 token. `access_token_authz` additionally embeds a `permissions` claim listing the permissions granted to the subject for this API. */
2108
+ ApiTokenDialect: "access_token" | "access_token_authz";
1856
2109
  /** @description Api */
1857
2110
  Api: {
1858
2111
  /** @description Api ID */
1859
2112
  id: string;
2113
+ /**
2114
+ * @description Human-readable name for the API. Shown in the dashboard and consent prompts.
2115
+ * @example My Backend API
2116
+ */
1860
2117
  name: string;
2118
+ /** @description URL-safe identifier auto-derived from `name`. Unique within the tenant. */
2119
+ slug: string;
2120
+ /**
2121
+ * @description Audience URL that clients pass as `audience=` when requesting a token for this API. Becomes the `aud` claim in the issued access_token. Immutable after creation and unique within the tenant.
2122
+ * @example https://api.faable.com
2123
+ */
2124
+ identifier: string;
2125
+ /** @description Optional human-readable description of the API. */
1861
2126
  description?: string;
2127
+ /** @description Set of permissions (scopes) this API exposes. When a token is issued with `audience=identifier`, the requested `scope` is intersected with this list to populate the `permissions` claim. */
1862
2128
  permissions: components["schemas"]["Permission"][];
2129
+ /** @description JWA algorithm used to sign access_tokens issued for this API. Currently only RS256 (the account keystore default) is implemented. */
2130
+ signing_alg: "RS256";
2131
+ /** @description Shape of access_tokens issued for this API. `access_token` emits the standard OAuth2 token. `access_token_authz` additionally embeds a `permissions` claim listing the permissions granted to the subject for this API. */
2132
+ token_dialect: "access_token" | "access_token_authz";
2133
+ /** @description Access_token lifetime in seconds. Default 86400 (24h). Applied at token issuance time (overrides the generic default). */
2134
+ token_lifetime: number;
2135
+ /** @description When true, only scopes that match a permission in `permissions` are forwarded into the access_token. When false, requested scopes are echoed back verbatim with no filtering. */
2136
+ enforce_policies: boolean;
2137
+ /** @description When true, the API is eligible to be the target of a `refresh_token` (i.e. clients can request `offline_access` against it). */
2138
+ allow_offline_access: boolean;
2139
+ /** @description When true, the consent prompt is skipped for first-party clients (clients owned by the same tenant as the API). */
2140
+ skip_consent: boolean;
1863
2141
  /** @description Object is related with this account */
1864
2142
  account: string;
1865
2143
  /**
@@ -1881,10 +2159,58 @@ export interface components {
1881
2159
  ApiMetadata: {
1882
2160
  [key: string]: unknown;
1883
2161
  };
2162
+ /** @description Payload for creating an Api (a.k.a. Resource Server / Audience). The `identifier` becomes the `aud` claim in tokens issued for this API and cannot be changed after creation. */
1884
2163
  ApiCreate: {
2164
+ /**
2165
+ * @description Human-readable name for the API.
2166
+ * @example My Backend API
2167
+ */
1885
2168
  name: string;
2169
+ /**
2170
+ * @description Audience URL clients pass as `audience=` when requesting a token for this API. Must be unique within the tenant and is immutable after creation.
2171
+ * @example https://api.faable.com
2172
+ */
2173
+ identifier: string;
2174
+ /** @description Optional human-readable description of the API. */
1886
2175
  description?: string;
2176
+ /**
2177
+ * @description Set of permissions (scopes) this API exposes. Tokens issued with `audience=identifier` will only carry these in their `permissions` claim.
2178
+ * @default []
2179
+ */
1887
2180
  permissions: components["schemas"]["PermissionCreate"][];
2181
+ /** @description JWA algorithm used to sign access_tokens issued for this API. Currently only RS256 (the account keystore default) is implemented. */
2182
+ signing_alg?: "RS256";
2183
+ /** @description Shape of access_tokens issued for this API. `access_token` emits the standard OAuth2 token. `access_token_authz` additionally embeds a `permissions` claim listing the permissions granted to the subject for this API. */
2184
+ token_dialect?: "access_token" | "access_token_authz";
2185
+ /** @description Access_token lifetime in seconds. Defaults to 86400 (24h) if omitted. */
2186
+ token_lifetime?: number;
2187
+ /** @description When true, requested scopes are filtered against `permissions` at token issuance. */
2188
+ enforce_policies?: boolean;
2189
+ /** @description When true, clients can request `offline_access` and receive a refresh_token for this API. */
2190
+ allow_offline_access?: boolean;
2191
+ /** @description When true, skip the consent prompt for first-party clients. */
2192
+ skip_consent?: boolean;
2193
+ };
2194
+ /** @description Partial update for an Api. `identifier` is immutable and not present here; recreate the API if you need to change it. */
2195
+ ApiUpdate: {
2196
+ /** @description Human-readable name for the API. */
2197
+ name?: string;
2198
+ /** @description Optional human-readable description of the API. */
2199
+ description?: string;
2200
+ /** @description Replaces the full permissions list. Tokens issued AFTER the update will use the new list; tokens already in circulation are unchanged. */
2201
+ permissions?: components["schemas"]["PermissionCreate"][];
2202
+ /** @description JWA algorithm used to sign access_tokens issued for this API. Currently only RS256 (the account keystore default) is implemented. */
2203
+ signing_alg?: "RS256";
2204
+ /** @description Shape of access_tokens issued for this API. `access_token` emits the standard OAuth2 token. `access_token_authz` additionally embeds a `permissions` claim listing the permissions granted to the subject for this API. */
2205
+ token_dialect?: "access_token" | "access_token_authz";
2206
+ /** @description Access_token lifetime in seconds. */
2207
+ token_lifetime?: number;
2208
+ /** @description When true, requested scopes are filtered against `permissions` at token issuance. */
2209
+ enforce_policies?: boolean;
2210
+ /** @description When true, clients can request `offline_access` and receive a refresh_token for this API. */
2211
+ allow_offline_access?: boolean;
2212
+ /** @description When true, skip the consent prompt for first-party clients. */
2213
+ skip_consent?: boolean;
1888
2214
  };
1889
2215
  /** @description Action */
1890
2216
  Action: {
@@ -2381,6 +2707,14 @@ export interface components {
2381
2707
  AuthAccountMetadataCreate: {
2382
2708
  [key: string]: unknown;
2383
2709
  };
2710
+ /** @description AuthAccountUpdate */
2711
+ AuthAccountUpdate: {
2712
+ logo_src?: string | null;
2713
+ icon_src?: string | null;
2714
+ callback_hostnames?: string[];
2715
+ default_connection?: string | null;
2716
+ enabled_locales?: string[];
2717
+ };
2384
2718
  OAuthTokenParams: {
2385
2719
  /** @description Grant Type. https://oauth.net/2/grant-types/ */
2386
2720
  grant_type?: "authorization_code" | "client_credentials" | "refresh_token" | "password" | "http://auth0.com/oauth/grant-type/passwordless/otp" | "urn:ietf:params:oauth:grant-type:token-exchange" | "urn:ietf:params:oauth:grant-type:device_code";
@@ -2396,6 +2730,8 @@ export interface components {
2396
2730
  subject_token_type?: string;
2397
2731
  /** @description The device code returned by the authorization server. */
2398
2732
  device_code?: string;
2733
+ /** @description Identifier of the API the client wants to access. Matched against `Api.identifier` in the tenant. */
2734
+ audience?: string;
2399
2735
  } & {
2400
2736
  [key: string]: unknown;
2401
2737
  };
@@ -2421,6 +2757,8 @@ export interface components {
2421
2757
  /** @description OIDC §3.1.2.1 — maximum allowable elapsed time in seconds since the last End-User authentication. If exceeded, the OP re-authenticates and `auth_time` is REQUIRED in the resulting id_token. */
2422
2758
  max_age?: number;
2423
2759
  prompt?: string;
2760
+ /** @description Resource Indicator (RFC 8707). Identifier of the Api the client wants to access. Persisted in the auth state so the token issued at /oauth/token targets the matching Api resource and its `aud` claim is set to this value. */
2761
+ audience?: string;
2424
2762
  };
2425
2763
  LoginCallbackBody: {
2426
2764
  /** @description is always wsignin1.0 */
@@ -2466,7 +2804,10 @@ export interface operations {
2466
2804
  logo_src?: string | null;
2467
2805
  icon_src?: string | null;
2468
2806
  callback_hostnames: string[];
2807
+ /** @description Shared HMAC secret. Used when token_signing_alg is an HS* algorithm; ignored for RS*\/ES*\/PS*. */
2469
2808
  token_signature: string;
2809
+ /** @description JWA algorithm used to sign tokens issued by this Account. Today only RS256 is implemented. */
2810
+ token_signing_alg: "RS256";
2470
2811
  default_connection?: components["schemas"]["Connection"] | string | unknown;
2471
2812
  enabled_locales: string[];
2472
2813
  team?: string | null;
@@ -2477,6 +2818,15 @@ export interface operations {
2477
2818
  */
2478
2819
  welcome_email_enabled: boolean;
2479
2820
  };
2821
+ /** @description Policy for the user email-change flow. `new_only` (default) sends a single confirmation link to the new email. `old_and_new` requires the user to also click a link sent to the previous email before the swap takes effect — stricter, useful for tenants with higher-risk users. */
2822
+ email_change_verification_mode?: "new_only" | "old_and_new";
2823
+ /**
2824
+ * @description Controls what happens to `user.email` on subsequent OAuth/federated logins when the user previously changed their email manually through this auth server (i.e. `user.email_change_locked_at` is set).
2825
+ *
2826
+ * - `preserve_manual` (default): the manually-set email wins. The federated provider's email is ignored on re-sync; `email` and `email_verified` are not touched. The identity link stays valid via `provider_user_id`, so the user can still log in with Google/etc.
2827
+ * - `always_sync`: the federated provider's email is always written back, overwriting any manual change. Useful for tenants whose source of truth for identity is the IdP (corporate SSO, etc.).
2828
+ */
2829
+ email_oauth_sync_policy?: "preserve_manual" | "always_sync";
2480
2830
  /** @description AuthAccount creation date */
2481
2831
  createdAt: string;
2482
2832
  /** @description AuthAccount updated date */
@@ -2560,7 +2910,10 @@ export interface operations {
2560
2910
  logo_src?: string | null;
2561
2911
  icon_src?: string | null;
2562
2912
  callback_hostnames: string[];
2913
+ /** @description Shared HMAC secret. Used when token_signing_alg is an HS* algorithm; ignored for RS*\/ES*\/PS*. */
2563
2914
  token_signature: string;
2915
+ /** @description JWA algorithm used to sign tokens issued by this Account. Today only RS256 is implemented. */
2916
+ token_signing_alg: "RS256";
2564
2917
  default_connection?: components["schemas"]["Connection"] | string | unknown;
2565
2918
  enabled_locales: string[];
2566
2919
  team?: string | null;
@@ -2571,6 +2924,15 @@ export interface operations {
2571
2924
  */
2572
2925
  welcome_email_enabled: boolean;
2573
2926
  };
2927
+ /** @description Policy for the user email-change flow. `new_only` (default) sends a single confirmation link to the new email. `old_and_new` requires the user to also click a link sent to the previous email before the swap takes effect — stricter, useful for tenants with higher-risk users. */
2928
+ email_change_verification_mode?: "new_only" | "old_and_new";
2929
+ /**
2930
+ * @description Controls what happens to `user.email` on subsequent OAuth/federated logins when the user previously changed their email manually through this auth server (i.e. `user.email_change_locked_at` is set).
2931
+ *
2932
+ * - `preserve_manual` (default): the manually-set email wins. The federated provider's email is ignored on re-sync; `email` and `email_verified` are not touched. The identity link stays valid via `provider_user_id`, so the user can still log in with Google/etc.
2933
+ * - `always_sync`: the federated provider's email is always written back, overwriting any manual change. Useful for tenants whose source of truth for identity is the IdP (corporate SSO, etc.).
2934
+ */
2935
+ email_oauth_sync_policy?: "preserve_manual" | "always_sync";
2574
2936
  /** @description AuthAccount creation date */
2575
2937
  createdAt: string;
2576
2938
  /** @description AuthAccount updated date */
@@ -2609,7 +2971,79 @@ export interface operations {
2609
2971
  logo_src?: string | null;
2610
2972
  icon_src?: string | null;
2611
2973
  callback_hostnames: string[];
2974
+ /** @description Shared HMAC secret. Used when token_signing_alg is an HS* algorithm; ignored for RS*\/ES*\/PS*. */
2975
+ token_signature: string;
2976
+ /** @description JWA algorithm used to sign tokens issued by this Account. Today only RS256 is implemented. */
2977
+ token_signing_alg: "RS256";
2978
+ default_connection?: components["schemas"]["Connection"] | string | unknown;
2979
+ enabled_locales: string[];
2980
+ team?: string | null;
2981
+ notification_settings: {
2982
+ /**
2983
+ * @description Send the built-in welcome email on user.created
2984
+ * @default false
2985
+ */
2986
+ welcome_email_enabled: boolean;
2987
+ };
2988
+ /** @description Policy for the user email-change flow. `new_only` (default) sends a single confirmation link to the new email. `old_and_new` requires the user to also click a link sent to the previous email before the swap takes effect — stricter, useful for tenants with higher-risk users. */
2989
+ email_change_verification_mode?: "new_only" | "old_and_new";
2990
+ /**
2991
+ * @description Controls what happens to `user.email` on subsequent OAuth/federated logins when the user previously changed their email manually through this auth server (i.e. `user.email_change_locked_at` is set).
2992
+ *
2993
+ * - `preserve_manual` (default): the manually-set email wins. The federated provider's email is ignored on re-sync; `email` and `email_verified` are not touched. The identity link stays valid via `provider_user_id`, so the user can still log in with Google/etc.
2994
+ * - `always_sync`: the federated provider's email is always written back, overwriting any manual change. Useful for tenants whose source of truth for identity is the IdP (corporate SSO, etc.).
2995
+ */
2996
+ email_oauth_sync_policy?: "preserve_manual" | "always_sync";
2997
+ /** @description AuthAccount creation date */
2998
+ createdAt: string;
2999
+ /** @description AuthAccount updated date */
3000
+ updatedAt?: string;
3001
+ };
3002
+ };
3003
+ };
3004
+ };
3005
+ };
3006
+ "account/update": {
3007
+ parameters: {
3008
+ query?: never;
3009
+ header?: never;
3010
+ path: {
3011
+ account_id: string;
3012
+ };
3013
+ cookie?: never;
3014
+ };
3015
+ /** @description AuthAccountUpdate */
3016
+ requestBody: {
3017
+ content: {
3018
+ "application/json": {
3019
+ logo_src?: string | null;
3020
+ icon_src?: string | null;
3021
+ callback_hostnames?: string[];
3022
+ default_connection?: string | null;
3023
+ enabled_locales?: string[];
3024
+ };
3025
+ };
3026
+ };
3027
+ responses: {
3028
+ /** @description AuthAccount */
3029
+ 200: {
3030
+ headers: {
3031
+ [name: string]: unknown;
3032
+ };
3033
+ content: {
3034
+ "application/json": {
3035
+ /** @description AuthAccount ID */
3036
+ id: string;
3037
+ name: string;
3038
+ domain: string;
3039
+ slug: string;
3040
+ logo_src?: string | null;
3041
+ icon_src?: string | null;
3042
+ callback_hostnames: string[];
3043
+ /** @description Shared HMAC secret. Used when token_signing_alg is an HS* algorithm; ignored for RS*\/ES*\/PS*. */
2612
3044
  token_signature: string;
3045
+ /** @description JWA algorithm used to sign tokens issued by this Account. Today only RS256 is implemented. */
3046
+ token_signing_alg: "RS256";
2613
3047
  default_connection?: components["schemas"]["Connection"] | string | unknown;
2614
3048
  enabled_locales: string[];
2615
3049
  team?: string | null;
@@ -2620,6 +3054,15 @@ export interface operations {
2620
3054
  */
2621
3055
  welcome_email_enabled: boolean;
2622
3056
  };
3057
+ /** @description Policy for the user email-change flow. `new_only` (default) sends a single confirmation link to the new email. `old_and_new` requires the user to also click a link sent to the previous email before the swap takes effect — stricter, useful for tenants with higher-risk users. */
3058
+ email_change_verification_mode?: "new_only" | "old_and_new";
3059
+ /**
3060
+ * @description Controls what happens to `user.email` on subsequent OAuth/federated logins when the user previously changed their email manually through this auth server (i.e. `user.email_change_locked_at` is set).
3061
+ *
3062
+ * - `preserve_manual` (default): the manually-set email wins. The federated provider's email is ignored on re-sync; `email` and `email_verified` are not touched. The identity link stays valid via `provider_user_id`, so the user can still log in with Google/etc.
3063
+ * - `always_sync`: the federated provider's email is always written back, overwriting any manual change. Useful for tenants whose source of truth for identity is the IdP (corporate SSO, etc.).
3064
+ */
3065
+ email_oauth_sync_policy?: "preserve_manual" | "always_sync";
2623
3066
  /** @description AuthAccount creation date */
2624
3067
  createdAt: string;
2625
3068
  /** @description AuthAccount updated date */
@@ -2667,7 +3110,10 @@ export interface operations {
2667
3110
  logo_src?: string | null;
2668
3111
  icon_src?: string | null;
2669
3112
  callback_hostnames: string[];
3113
+ /** @description Shared HMAC secret. Used when token_signing_alg is an HS* algorithm; ignored for RS*\/ES*\/PS*. */
2670
3114
  token_signature: string;
3115
+ /** @description JWA algorithm used to sign tokens issued by this Account. Today only RS256 is implemented. */
3116
+ token_signing_alg: "RS256";
2671
3117
  default_connection?: components["schemas"]["Connection"] | string | unknown;
2672
3118
  enabled_locales: string[];
2673
3119
  team?: string | null;
@@ -2678,6 +3124,15 @@ export interface operations {
2678
3124
  */
2679
3125
  welcome_email_enabled: boolean;
2680
3126
  };
3127
+ /** @description Policy for the user email-change flow. `new_only` (default) sends a single confirmation link to the new email. `old_and_new` requires the user to also click a link sent to the previous email before the swap takes effect — stricter, useful for tenants with higher-risk users. */
3128
+ email_change_verification_mode?: "new_only" | "old_and_new";
3129
+ /**
3130
+ * @description Controls what happens to `user.email` on subsequent OAuth/federated logins when the user previously changed their email manually through this auth server (i.e. `user.email_change_locked_at` is set).
3131
+ *
3132
+ * - `preserve_manual` (default): the manually-set email wins. The federated provider's email is ignored on re-sync; `email` and `email_verified` are not touched. The identity link stays valid via `provider_user_id`, so the user can still log in with Google/etc.
3133
+ * - `always_sync`: the federated provider's email is always written back, overwriting any manual change. Useful for tenants whose source of truth for identity is the IdP (corporate SSO, etc.).
3134
+ */
3135
+ email_oauth_sync_policy?: "preserve_manual" | "always_sync";
2681
3136
  /** @description AuthAccount creation date */
2682
3137
  createdAt: string;
2683
3138
  /** @description AuthAccount updated date */
@@ -2698,8 +3153,6 @@ export interface operations {
2698
3153
  pageSize?: number;
2699
3154
  /** @description Filter using a FaableQL query */
2700
3155
  query?: string;
2701
- /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `expand=user&expand=team`). */
2702
- expand?: string[];
2703
3156
  };
2704
3157
  header?: never;
2705
3158
  path?: never;
@@ -2736,7 +3189,7 @@ export interface operations {
2736
3189
  "application/json": {
2737
3190
  connection_name: string;
2738
3191
  /** @enum {unknown} */
2739
- connection_type: "database" | "custom" | "github" | "figma" | "google_oauth2" | "oidc";
3192
+ connection_type: "database" | "custom" | "github" | "figma" | "google_oauth2" | "oidc" | "passwordless_email";
2740
3193
  authorize_url?: string;
2741
3194
  client_id?: string;
2742
3195
  client_secret?: string;
@@ -2773,7 +3226,7 @@ export interface operations {
2773
3226
  id: string;
2774
3227
  connection_name: string;
2775
3228
  /** @enum {unknown} */
2776
- connection_type: "database" | "custom" | "github" | "figma" | "google_oauth2" | "oidc";
3229
+ connection_type: "database" | "custom" | "github" | "figma" | "google_oauth2" | "oidc" | "passwordless_email";
2777
3230
  /** @default null */
2778
3231
  authorize_url: string;
2779
3232
  /** @default null */
@@ -2822,10 +3275,7 @@ export interface operations {
2822
3275
  };
2823
3276
  "connection/get": {
2824
3277
  parameters: {
2825
- query?: {
2826
- /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `expand=user&expand=team`). */
2827
- expand?: string[];
2828
- };
3278
+ query?: never;
2829
3279
  header?: never;
2830
3280
  path: {
2831
3281
  connection_id: string;
@@ -2845,7 +3295,7 @@ export interface operations {
2845
3295
  id: string;
2846
3296
  connection_name: string;
2847
3297
  /** @enum {unknown} */
2848
- connection_type: "database" | "custom" | "github" | "figma" | "google_oauth2" | "oidc";
3298
+ connection_type: "database" | "custom" | "github" | "figma" | "google_oauth2" | "oidc" | "passwordless_email";
2849
3299
  /** @default null */
2850
3300
  authorize_url: string;
2851
3301
  /** @default null */
@@ -2923,8 +3373,6 @@ export interface operations {
2923
3373
  pageSize?: number;
2924
3374
  /** @description Filter using a FaableQL query */
2925
3375
  query?: string;
2926
- /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `expand=user&expand=team`). */
2927
- expand?: string[];
2928
3376
  };
2929
3377
  header?: never;
2930
3378
  path?: never;
@@ -3025,10 +3473,7 @@ export interface operations {
3025
3473
  };
3026
3474
  "client/get": {
3027
3475
  parameters: {
3028
- query?: {
3029
- /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `expand=user&expand=team`). */
3030
- expand?: string[];
3031
- };
3476
+ query?: never;
3032
3477
  header?: never;
3033
3478
  path: {
3034
3479
  client_id: string;
@@ -3120,8 +3565,6 @@ export interface operations {
3120
3565
  pageSize?: number;
3121
3566
  /** @description Filter using a FaableQL query */
3122
3567
  query?: string;
3123
- /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `expand=user&expand=team`). */
3124
- expand?: string[];
3125
3568
  };
3126
3569
  header?: never;
3127
3570
  path?: never;
@@ -3172,7 +3615,7 @@ export interface operations {
3172
3615
  locale?: string;
3173
3616
  /** @description A URI pointing to the user's picture. */
3174
3617
  picture?: string;
3175
- /** @description Initial password for this user (mandatory only for auth0 connection strategy) */
3618
+ /** @description Initial password for this user. Only used (and required) when the user is being provisioned against a `database` connection; ignored for federated/social connections. */
3176
3619
  password?: string;
3177
3620
  /** @description User Metadata */
3178
3621
  user_metadata?: {
@@ -3214,6 +3657,8 @@ export interface operations {
3214
3657
  * @default false
3215
3658
  */
3216
3659
  email_verified: boolean;
3660
+ /** @description ISO 8601 timestamp of the user's last verified email change. When set, OAuth callbacks will not overwrite `email`/`email_verified` from the federated provider — the manually-chosen email wins. */
3661
+ email_change_locked_at?: string | null;
3217
3662
  /** @description contact phone number */
3218
3663
  phone?: string | null;
3219
3664
  /** @description phone is verified */
@@ -3286,10 +3731,7 @@ export interface operations {
3286
3731
  };
3287
3732
  "user/get": {
3288
3733
  parameters: {
3289
- query?: {
3290
- /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `expand=user&expand=team`). */
3291
- expand?: string[];
3292
- };
3734
+ query?: never;
3293
3735
  header?: never;
3294
3736
  path: {
3295
3737
  user_id: string;
@@ -3326,6 +3768,8 @@ export interface operations {
3326
3768
  * @default false
3327
3769
  */
3328
3770
  email_verified: boolean;
3771
+ /** @description ISO 8601 timestamp of the user's last verified email change. When set, OAuth callbacks will not overwrite `email`/`email_verified` from the federated provider — the manually-chosen email wins. */
3772
+ email_change_locked_at?: string | null;
3329
3773
  /** @description contact phone number */
3330
3774
  phone?: string | null;
3331
3775
  /** @description phone is verified */
@@ -3469,6 +3913,8 @@ export interface operations {
3469
3913
  * @default false
3470
3914
  */
3471
3915
  email_verified: boolean;
3916
+ /** @description ISO 8601 timestamp of the user's last verified email change. When set, OAuth callbacks will not overwrite `email`/`email_verified` from the federated provider — the manually-chosen email wins. */
3917
+ email_change_locked_at?: string | null;
3472
3918
  /** @description contact phone number */
3473
3919
  phone?: string | null;
3474
3920
  /** @description phone is verified */
@@ -3559,20 +4005,79 @@ export interface operations {
3559
4005
  };
3560
4006
  };
3561
4007
  };
3562
- "identity/list": {
4008
+ "user/changeEmail": {
3563
4009
  parameters: {
3564
- query?: {
3565
- /** @description Start from this cursor */
3566
- cursor?: string;
3567
- /** @description Start from this cursor */
3568
- next?: string;
3569
- /** @description Size of the results array */
3570
- pageSize?: number;
3571
- /** @description Filter using a FaableQL query */
3572
- query?: string;
3573
- /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `expand=user&expand=team`). */
3574
- expand?: string[];
3575
- };
4010
+ query?: never;
4011
+ header?: never;
4012
+ path: {
4013
+ user_id: string;
4014
+ };
4015
+ cookie?: never;
4016
+ };
4017
+ /** @description Payload for `POST /user/:user_id/change-email`. Triggers the verification flow: a Ticket is created and an email is sent to the new address with a confirmation link. */
4018
+ requestBody: {
4019
+ content: {
4020
+ "application/json": {
4021
+ /** @description The email address the user wants to switch to. */
4022
+ new_email: string;
4023
+ /** @description Override the account-wide policy. Can only raise the bar: passing `old_and_new` forces double verification; `new_only` is ignored if the account requires `old_and_new`. */
4024
+ verification_mode?: "new_only" | "old_and_new";
4025
+ /** @description Where to send the user after they click the link in the verification email. The status of the operation is appended as a `?status=applied|pending_old` query param so the calling app can render the right screen. When omitted, the user lands on the auth host's `/flow/email-change-done` fallback. */
4026
+ redirect_uri?: string;
4027
+ };
4028
+ };
4029
+ };
4030
+ responses: {
4031
+ /** @description Default Response */
4032
+ 200: {
4033
+ headers: {
4034
+ [name: string]: unknown;
4035
+ };
4036
+ content: {
4037
+ "application/json": {
4038
+ /** @enum {string} */
4039
+ status: "verification_sent";
4040
+ ticket_id: string;
4041
+ verification_mode: "new_only" | "old_and_new";
4042
+ };
4043
+ };
4044
+ };
4045
+ };
4046
+ };
4047
+ user_change_email_verify: {
4048
+ parameters: {
4049
+ query: {
4050
+ ticket: string;
4051
+ };
4052
+ header?: never;
4053
+ path?: never;
4054
+ cookie?: never;
4055
+ };
4056
+ requestBody?: never;
4057
+ responses: {
4058
+ /** @description Default Response */
4059
+ 200: {
4060
+ headers: {
4061
+ [name: string]: unknown;
4062
+ };
4063
+ content?: never;
4064
+ };
4065
+ };
4066
+ };
4067
+ "identity/list": {
4068
+ parameters: {
4069
+ query?: {
4070
+ /** @description Start from this cursor */
4071
+ cursor?: string;
4072
+ /** @description Start from this cursor */
4073
+ next?: string;
4074
+ /** @description Size of the results array */
4075
+ pageSize?: number;
4076
+ /** @description Filter using a FaableQL query */
4077
+ query?: string;
4078
+ /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `?expand=user`). */
4079
+ expand?: ("user" | "connection")[];
4080
+ };
3576
4081
  header?: never;
3577
4082
  path?: never;
3578
4083
  cookie?: never;
@@ -3654,8 +4159,8 @@ export interface operations {
3654
4159
  "identity/get": {
3655
4160
  parameters: {
3656
4161
  query?: {
3657
- /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `expand=user&expand=team`). */
3658
- expand?: string[];
4162
+ /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `?expand=user`). */
4163
+ expand?: ("user" | "connection")[];
3659
4164
  };
3660
4165
  header?: never;
3661
4166
  path: {
@@ -3730,8 +4235,6 @@ export interface operations {
3730
4235
  pageSize?: number;
3731
4236
  /** @description Filter using a FaableQL query */
3732
4237
  query?: string;
3733
- /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `expand=user&expand=team`). */
3734
- expand?: string[];
3735
4238
  };
3736
4239
  header?: never;
3737
4240
  path?: never;
@@ -3766,7 +4269,12 @@ export interface operations {
3766
4269
  requestBody: {
3767
4270
  content: {
3768
4271
  "application/json": {
4272
+ /**
4273
+ * @description Short, human-readable identifier for the role (e.g. `admin`, `editor`).
4274
+ * @example admin
4275
+ */
3769
4276
  name: string;
4277
+ /** @description Free-form explanation of what users in this role are expected to do or have access to. */
3770
4278
  description?: string;
3771
4279
  /** @description Add Metadata */
3772
4280
  metadata?: {
@@ -3785,9 +4293,12 @@ export interface operations {
3785
4293
  "application/json": {
3786
4294
  /** @description Role ID */
3787
4295
  id: string;
3788
- /** @description Name for this role */
4296
+ /**
4297
+ * @description Short, human-readable identifier for the role (e.g. `admin`, `editor`, `billing-manager`). Surfaced in the dashboard role pickers.
4298
+ * @example admin
4299
+ */
3789
4300
  name: string;
3790
- /** @description Description of this role */
4301
+ /** @description Free-form explanation of what users in this role are expected to do or have access to. Shown alongside the role in the dashboard. */
3791
4302
  description: string;
3792
4303
  /** @description Object is related with this account */
3793
4304
  account: string;
@@ -3809,10 +4320,7 @@ export interface operations {
3809
4320
  };
3810
4321
  "role/get": {
3811
4322
  parameters: {
3812
- query?: {
3813
- /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `expand=user&expand=team`). */
3814
- expand?: string[];
3815
- };
4323
+ query?: never;
3816
4324
  header?: never;
3817
4325
  path: {
3818
4326
  role_id: string;
@@ -3830,9 +4338,67 @@ export interface operations {
3830
4338
  "application/json": {
3831
4339
  /** @description Role ID */
3832
4340
  id: string;
3833
- /** @description Name for this role */
4341
+ /**
4342
+ * @description Short, human-readable identifier for the role (e.g. `admin`, `editor`, `billing-manager`). Surfaced in the dashboard role pickers.
4343
+ * @example admin
4344
+ */
4345
+ name: string;
4346
+ /** @description Free-form explanation of what users in this role are expected to do or have access to. Shown alongside the role in the dashboard. */
4347
+ description: string;
4348
+ /** @description Object is related with this account */
4349
+ account: string;
4350
+ /**
4351
+ * @description RoleMetadata
4352
+ * @default {}
4353
+ */
4354
+ metadata: {
4355
+ [key: string]: unknown;
4356
+ };
4357
+ /** @description Role creation date */
4358
+ createdAt: string;
4359
+ /** @description Role updated date */
4360
+ updatedAt?: string;
4361
+ };
4362
+ };
4363
+ };
4364
+ };
4365
+ };
4366
+ "role/update": {
4367
+ parameters: {
4368
+ query?: never;
4369
+ header?: never;
4370
+ path: {
4371
+ role_id: string;
4372
+ };
4373
+ cookie?: never;
4374
+ };
4375
+ /** @description Partial update for a Role. Only the supplied fields are modified. */
4376
+ requestBody: {
4377
+ content: {
4378
+ "application/json": {
4379
+ /** @description New human-readable identifier for the role. */
4380
+ name?: string;
4381
+ /** @description New free-form description of what users in this role do. */
4382
+ description?: string;
4383
+ };
4384
+ };
4385
+ };
4386
+ responses: {
4387
+ /** @description Role */
4388
+ 200: {
4389
+ headers: {
4390
+ [name: string]: unknown;
4391
+ };
4392
+ content: {
4393
+ "application/json": {
4394
+ /** @description Role ID */
4395
+ id: string;
4396
+ /**
4397
+ * @description Short, human-readable identifier for the role (e.g. `admin`, `editor`, `billing-manager`). Surfaced in the dashboard role pickers.
4398
+ * @example admin
4399
+ */
3834
4400
  name: string;
3835
- /** @description Description of this role */
4401
+ /** @description Free-form explanation of what users in this role are expected to do or have access to. Shown alongside the role in the dashboard. */
3836
4402
  description: string;
3837
4403
  /** @description Object is related with this account */
3838
4404
  account: string;
@@ -3915,9 +4481,16 @@ export interface operations {
3915
4481
  };
3916
4482
  cookie?: never;
3917
4483
  };
4484
+ /** @description Payload for granting a role to one or more users in a single call. Posted to `POST /role/:role_id/users`. */
3918
4485
  requestBody: {
3919
4486
  content: {
3920
4487
  "application/json": {
4488
+ /**
4489
+ * @description List of User ids to grant the role to. Existing role memberships are preserved; passing a user that already holds the role is a no-op.
4490
+ * @example [
4491
+ * "user_6555fd293acc2f0fac0e3452"
4492
+ * ]
4493
+ */
3921
4494
  users: string[];
3922
4495
  };
3923
4496
  };
@@ -3943,8 +4516,8 @@ export interface operations {
3943
4516
  pageSize?: number;
3944
4517
  /** @description Filter using a FaableQL query */
3945
4518
  query?: string;
3946
- /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `expand=user&expand=team`). */
3947
- expand?: string[];
4519
+ /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `?expand=user`). */
4520
+ expand?: ("user" | "role")[];
3948
4521
  };
3949
4522
  header?: never;
3950
4523
  path?: never;
@@ -3975,9 +4548,16 @@ export interface operations {
3975
4548
  path?: never;
3976
4549
  cookie?: never;
3977
4550
  };
4551
+ /** @description Payload for granting a role to one or more users in a single call. Posted to `POST /role/:role_id/users`. */
3978
4552
  requestBody: {
3979
4553
  content: {
3980
4554
  "application/json": {
4555
+ /**
4556
+ * @description List of User ids to grant the role to. Existing role memberships are preserved; passing a user that already holds the role is a no-op.
4557
+ * @example [
4558
+ * "user_6555fd293acc2f0fac0e3452"
4559
+ * ]
4560
+ */
3981
4561
  users: string[];
3982
4562
  };
3983
4563
  };
@@ -3992,7 +4572,9 @@ export interface operations {
3992
4572
  "application/json": {
3993
4573
  /** @description RoleMember ID */
3994
4574
  id: string;
4575
+ /** @description Role granted to the user. Returned as an id by default; pass `?expand=role` to inline the full Role object. */
3995
4576
  role: components["schemas"]["Role"] | string | unknown;
4577
+ /** @description User the role is granted to. Returned as an id by default; pass `?expand=user` to inline the full User object. */
3996
4578
  user: components["schemas"]["User"] | string | unknown;
3997
4579
  /** @description Object is related with this account */
3998
4580
  account: string;
@@ -4015,8 +4597,8 @@ export interface operations {
4015
4597
  "rolemember/get": {
4016
4598
  parameters: {
4017
4599
  query?: {
4018
- /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `expand=user&expand=team`). */
4019
- expand?: string[];
4600
+ /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `?expand=user`). */
4601
+ expand?: ("user" | "role")[];
4020
4602
  };
4021
4603
  header?: never;
4022
4604
  path: {
@@ -4035,7 +4617,9 @@ export interface operations {
4035
4617
  "application/json": {
4036
4618
  /** @description RoleMember ID */
4037
4619
  id: string;
4620
+ /** @description Role granted to the user. Returned as an id by default; pass `?expand=role` to inline the full Role object. */
4038
4621
  role: components["schemas"]["Role"] | string | unknown;
4622
+ /** @description User the role is granted to. Returned as an id by default; pass `?expand=user` to inline the full User object. */
4039
4623
  user: components["schemas"]["User"] | string | unknown;
4040
4624
  /** @description Object is related with this account */
4041
4625
  account: string;
@@ -4086,8 +4670,6 @@ export interface operations {
4086
4670
  pageSize?: number;
4087
4671
  /** @description Filter using a FaableQL query */
4088
4672
  query?: string;
4089
- /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `expand=user&expand=team`). */
4090
- expand?: string[];
4091
4673
  };
4092
4674
  header?: never;
4093
4675
  path?: never;
@@ -4122,7 +4704,12 @@ export interface operations {
4122
4704
  requestBody: {
4123
4705
  content: {
4124
4706
  "application/json": {
4707
+ /**
4708
+ * @description Human-readable name of the team.
4709
+ * @example Acme Engineering
4710
+ */
4125
4711
  name: string;
4712
+ /** @description Optional free-form description of the team. */
4126
4713
  description?: string;
4127
4714
  /** @description Add Metadata */
4128
4715
  metadata?: {
@@ -4141,9 +4728,19 @@ export interface operations {
4141
4728
  "application/json": {
4142
4729
  /** @description Team ID */
4143
4730
  id: string;
4731
+ /**
4732
+ * @description Human-readable name of the team. Shown in the dashboard and in team-picker UI.
4733
+ * @example Acme Engineering
4734
+ */
4144
4735
  name: string;
4736
+ /**
4737
+ * @description URL-safe identifier auto-derived from `name`. Unique within the tenant; used in routes that address a team by slug.
4738
+ * @example acme-engineering
4739
+ */
4145
4740
  slug: string;
4741
+ /** @description Optional free-form description of the team. */
4146
4742
  description: string | null;
4743
+ /** @description Optional URL of an image used as the team avatar/logo. */
4147
4744
  logo_url: string | null;
4148
4745
  /** @description Object is related with this account */
4149
4746
  account: string;
@@ -4165,10 +4762,7 @@ export interface operations {
4165
4762
  };
4166
4763
  "team/get": {
4167
4764
  parameters: {
4168
- query?: {
4169
- /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `expand=user&expand=team`). */
4170
- expand?: string[];
4171
- };
4765
+ query?: never;
4172
4766
  header?: never;
4173
4767
  path: {
4174
4768
  team_id: string;
@@ -4186,9 +4780,85 @@ export interface operations {
4186
4780
  "application/json": {
4187
4781
  /** @description Team ID */
4188
4782
  id: string;
4783
+ /**
4784
+ * @description Human-readable name of the team. Shown in the dashboard and in team-picker UI.
4785
+ * @example Acme Engineering
4786
+ */
4787
+ name: string;
4788
+ /**
4789
+ * @description URL-safe identifier auto-derived from `name`. Unique within the tenant; used in routes that address a team by slug.
4790
+ * @example acme-engineering
4791
+ */
4792
+ slug: string;
4793
+ /** @description Optional free-form description of the team. */
4794
+ description: string | null;
4795
+ /** @description Optional URL of an image used as the team avatar/logo. */
4796
+ logo_url: string | null;
4797
+ /** @description Object is related with this account */
4798
+ account: string;
4799
+ /**
4800
+ * @description TeamMetadata
4801
+ * @default {}
4802
+ */
4803
+ metadata: {
4804
+ [key: string]: unknown;
4805
+ };
4806
+ /** @description Team creation date */
4807
+ createdAt: string;
4808
+ /** @description Team updated date */
4809
+ updatedAt?: string;
4810
+ };
4811
+ };
4812
+ };
4813
+ };
4814
+ };
4815
+ "team/update": {
4816
+ parameters: {
4817
+ query?: never;
4818
+ header?: never;
4819
+ path: {
4820
+ team_id: string;
4821
+ };
4822
+ cookie?: never;
4823
+ };
4824
+ /** @description Partial update for a Team. Only the supplied fields are modified. `slug` is auto-derived from `name` and is not user-editable. */
4825
+ requestBody: {
4826
+ content: {
4827
+ "application/json": {
4828
+ /** @description New human-readable name for the team. */
4829
+ name?: string;
4830
+ /** @description New free-form description for the team. */
4831
+ description?: string;
4832
+ /** @description Arbitrary key/value pairs attached to the team. Replaces the previous metadata entirely. */
4833
+ metadata?: {
4834
+ [key: string]: unknown;
4835
+ };
4836
+ };
4837
+ };
4838
+ };
4839
+ responses: {
4840
+ /** @description Team */
4841
+ 200: {
4842
+ headers: {
4843
+ [name: string]: unknown;
4844
+ };
4845
+ content: {
4846
+ "application/json": {
4847
+ /** @description Team ID */
4848
+ id: string;
4849
+ /**
4850
+ * @description Human-readable name of the team. Shown in the dashboard and in team-picker UI.
4851
+ * @example Acme Engineering
4852
+ */
4189
4853
  name: string;
4854
+ /**
4855
+ * @description URL-safe identifier auto-derived from `name`. Unique within the tenant; used in routes that address a team by slug.
4856
+ * @example acme-engineering
4857
+ */
4190
4858
  slug: string;
4859
+ /** @description Optional free-form description of the team. */
4191
4860
  description: string | null;
4861
+ /** @description Optional URL of an image used as the team avatar/logo. */
4192
4862
  logo_url: string | null;
4193
4863
  /** @description Object is related with this account */
4194
4864
  account: string;
@@ -4239,8 +4909,8 @@ export interface operations {
4239
4909
  pageSize?: number;
4240
4910
  /** @description Filter using a FaableQL query */
4241
4911
  query?: string;
4242
- /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `expand=user&expand=team`). */
4243
- expand?: string[];
4912
+ /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `?expand=user`). */
4913
+ expand?: ("user" | "team" | "roles")[];
4244
4914
  };
4245
4915
  header?: never;
4246
4916
  path?: never;
@@ -4271,10 +4941,25 @@ export interface operations {
4271
4941
  path?: never;
4272
4942
  cookie?: never;
4273
4943
  };
4944
+ /** @description Payload for adding one or more users to a team in a single call. Posted to `POST /team/:team_id/member`. */
4274
4945
  requestBody: {
4275
4946
  content: {
4276
4947
  "application/json": {
4948
+ /**
4949
+ * @description List of User ids to add as members of the team. Users already in the team are skipped.
4950
+ * @example [
4951
+ * "user_6555fd293acc2f0fac0e3452"
4952
+ * ]
4953
+ */
4277
4954
  users: string[];
4955
+ /**
4956
+ * @description Role ids to grant to the added members within the scope of this team.
4957
+ * @default []
4958
+ * @example [
4959
+ * "role_6555fd293acc2f0fac0e3452"
4960
+ * ]
4961
+ */
4962
+ roles?: string[];
4278
4963
  };
4279
4964
  };
4280
4965
  };
@@ -4288,8 +4973,11 @@ export interface operations {
4288
4973
  "application/json": {
4289
4974
  /** @description TeamMember ID */
4290
4975
  id: string;
4976
+ /** @description User that belongs to the team. Returned as an id by default; pass `?expand=user` to inline the full User object. */
4291
4977
  user: components["schemas"]["User"] | string | unknown;
4978
+ /** @description Team the user belongs to. Returned as an id by default; pass `?expand=team` to inline the full Team object. */
4292
4979
  team: components["schemas"]["Team"] | string | unknown;
4980
+ /** @description Roles granted to the user *within this team*. Distinct from account-wide RoleMember grants — these only apply in the scope of the team. Each entry is an id by default; pass `?expand=roles` to inline. */
4293
4981
  roles: (components["schemas"]["Role"] | string | unknown)[];
4294
4982
  /** @description Object is related with this account */
4295
4983
  account: string;
@@ -4312,8 +5000,8 @@ export interface operations {
4312
5000
  "teammember/get": {
4313
5001
  parameters: {
4314
5002
  query?: {
4315
- /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `expand=user&expand=team`). */
4316
- expand?: string[];
5003
+ /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `?expand=user`). */
5004
+ expand?: ("user" | "team" | "roles")[];
4317
5005
  };
4318
5006
  header?: never;
4319
5007
  path: {
@@ -4332,8 +5020,11 @@ export interface operations {
4332
5020
  "application/json": {
4333
5021
  /** @description TeamMember ID */
4334
5022
  id: string;
5023
+ /** @description User that belongs to the team. Returned as an id by default; pass `?expand=user` to inline the full User object. */
4335
5024
  user: components["schemas"]["User"] | string | unknown;
5025
+ /** @description Team the user belongs to. Returned as an id by default; pass `?expand=team` to inline the full Team object. */
4336
5026
  team: components["schemas"]["Team"] | string | unknown;
5027
+ /** @description Roles granted to the user *within this team*. Distinct from account-wide RoleMember grants — these only apply in the scope of the team. Each entry is an id by default; pass `?expand=roles` to inline. */
4337
5028
  roles: (components["schemas"]["Role"] | string | unknown)[];
4338
5029
  /** @description Object is related with this account */
4339
5030
  account: string;
@@ -4416,10 +5107,25 @@ export interface operations {
4416
5107
  };
4417
5108
  cookie?: never;
4418
5109
  };
5110
+ /** @description Payload for adding one or more users to a team in a single call. Posted to `POST /team/:team_id/member`. */
4419
5111
  requestBody: {
4420
5112
  content: {
4421
5113
  "application/json": {
5114
+ /**
5115
+ * @description List of User ids to add as members of the team. Users already in the team are skipped.
5116
+ * @example [
5117
+ * "user_6555fd293acc2f0fac0e3452"
5118
+ * ]
5119
+ */
4422
5120
  users: string[];
5121
+ /**
5122
+ * @description Role ids to grant to the added members within the scope of this team.
5123
+ * @default []
5124
+ * @example [
5125
+ * "role_6555fd293acc2f0fac0e3452"
5126
+ * ]
5127
+ */
5128
+ roles?: string[];
4423
5129
  };
4424
5130
  };
4425
5131
  };
@@ -4433,8 +5139,11 @@ export interface operations {
4433
5139
  "application/json": {
4434
5140
  /** @description TeamMember ID */
4435
5141
  id: string;
5142
+ /** @description User that belongs to the team. Returned as an id by default; pass `?expand=user` to inline the full User object. */
4436
5143
  user: components["schemas"]["User"] | string | unknown;
5144
+ /** @description Team the user belongs to. Returned as an id by default; pass `?expand=team` to inline the full Team object. */
4437
5145
  team: components["schemas"]["Team"] | string | unknown;
5146
+ /** @description Roles granted to the user *within this team*. Distinct from account-wide RoleMember grants — these only apply in the scope of the team. Each entry is an id by default; pass `?expand=roles` to inline. */
4438
5147
  roles: (components["schemas"]["Role"] | string | unknown)[];
4439
5148
  /** @description Object is related with this account */
4440
5149
  account: string;
@@ -4482,8 +5191,11 @@ export interface operations {
4482
5191
  "application/json": {
4483
5192
  /** @description TeamMember ID */
4484
5193
  id: string;
5194
+ /** @description User that belongs to the team. Returned as an id by default; pass `?expand=user` to inline the full User object. */
4485
5195
  user: components["schemas"]["User"] | string | unknown;
5196
+ /** @description Team the user belongs to. Returned as an id by default; pass `?expand=team` to inline the full Team object. */
4486
5197
  team: components["schemas"]["Team"] | string | unknown;
5198
+ /** @description Roles granted to the user *within this team*. Distinct from account-wide RoleMember grants — these only apply in the scope of the team. Each entry is an id by default; pass `?expand=roles` to inline. */
4487
5199
  roles: (components["schemas"]["Role"] | string | unknown)[];
4488
5200
  /** @description Object is related with this account */
4489
5201
  account: string;
@@ -4503,6 +5215,182 @@ export interface operations {
4503
5215
  };
4504
5216
  };
4505
5217
  };
5218
+ "team/listInvites": {
5219
+ parameters: {
5220
+ query?: {
5221
+ /** @description FaableQL filter. Supported fields: `email`. Example: `?query=email:foo@bar.com` */
5222
+ query?: string;
5223
+ };
5224
+ header?: never;
5225
+ path: {
5226
+ team_id: string;
5227
+ };
5228
+ cookie?: never;
5229
+ };
5230
+ requestBody?: never;
5231
+ responses: {
5232
+ /** @description Default Response */
5233
+ 200: {
5234
+ headers: {
5235
+ [name: string]: unknown;
5236
+ };
5237
+ content: {
5238
+ "application/json": {
5239
+ data: {
5240
+ /** @description TeamInvite ID */
5241
+ id: string;
5242
+ /** @description Email address that was invited */
5243
+ email: string;
5244
+ /** @description Team the invitee will be added to upon acceptance. */
5245
+ team: components["schemas"]["Team"] | string | unknown;
5246
+ /** @description User that created the invitation, if known. */
5247
+ inviter?: components["schemas"]["User"] | string | unknown;
5248
+ /** @description Role ids that will be applied to the new TeamMember on acceptance. */
5249
+ roles: string[];
5250
+ /** @description `auto` adds the user directly if they already exist in the tenant and only falls back to a ticketed invite when the email is unknown. `invite` always issues a ticket + email regardless of whether the user exists. */
5251
+ mode: "auto" | "invite";
5252
+ /** @description URI to redirect the invitee to after a successful accept. */
5253
+ redirect_uri?: string;
5254
+ /** @description ISO 8601 timestamp at which the invite stops being valid. */
5255
+ expires_at: string;
5256
+ /** @description ISO 8601 timestamp at which the invite was accepted. Absent for pending invites. */
5257
+ consume_date?: string;
5258
+ /** @description Object is related with this account */
5259
+ account: string;
5260
+ /**
5261
+ * @description TeamInviteMetadata
5262
+ * @default {}
5263
+ */
5264
+ metadata: {
5265
+ [key: string]: unknown;
5266
+ };
5267
+ /** @description TeamInvite creation date */
5268
+ createdAt: string;
5269
+ /** @description TeamInvite updated date */
5270
+ updatedAt?: string;
5271
+ }[];
5272
+ };
5273
+ };
5274
+ };
5275
+ };
5276
+ };
5277
+ "team/invite": {
5278
+ parameters: {
5279
+ query?: never;
5280
+ header?: never;
5281
+ path: {
5282
+ team_id: string;
5283
+ };
5284
+ cookie?: never;
5285
+ };
5286
+ /** @description Payload for inviting a user to a team by email. `mode='auto'` (default) adds the user immediately if they already exist in the tenant and falls back to a ticketed invite otherwise. `mode='invite'` always issues a ticket + email. */
5287
+ requestBody: {
5288
+ content: {
5289
+ "application/json": {
5290
+ /**
5291
+ * @description Email of the user to invite to the team.
5292
+ * @example someone@example.com
5293
+ */
5294
+ email: string;
5295
+ /**
5296
+ * @description Role ids granted to the resulting TeamMember within the scope of this team.
5297
+ * @default []
5298
+ */
5299
+ roles?: string[];
5300
+ /** @description `auto` adds the user directly if they already exist in the tenant and only falls back to a ticketed invite when the email is unknown. `invite` always issues a ticket + email regardless of whether the user exists. */
5301
+ mode?: "auto" | "invite";
5302
+ /** @description Where to redirect the invitee after a successful accept. Defaults to `/`. */
5303
+ redirect_uri?: string;
5304
+ };
5305
+ };
5306
+ };
5307
+ responses: {
5308
+ /** @description Default Response */
5309
+ 200: {
5310
+ headers: {
5311
+ [name: string]: unknown;
5312
+ };
5313
+ content: {
5314
+ "application/json": {
5315
+ /** @description `invited` when a ticket + email was issued, `added` when the user was added directly (auto mode + existing user). */
5316
+ status: "invited" | "added";
5317
+ /** @description ID of the issued invite ticket (when status=invited). */
5318
+ ticket_id?: string;
5319
+ /** @description TeamMember */
5320
+ member?: {
5321
+ /** @description TeamMember ID */
5322
+ id: string;
5323
+ /** @description User that belongs to the team. Returned as an id by default; pass `?expand=user` to inline the full User object. */
5324
+ user: components["schemas"]["User"] | string | unknown;
5325
+ /** @description Team the user belongs to. Returned as an id by default; pass `?expand=team` to inline the full Team object. */
5326
+ team: components["schemas"]["Team"] | string | unknown;
5327
+ /** @description Roles granted to the user *within this team*. Distinct from account-wide RoleMember grants — these only apply in the scope of the team. Each entry is an id by default; pass `?expand=roles` to inline. */
5328
+ roles: (components["schemas"]["Role"] | string | unknown)[];
5329
+ /** @description Object is related with this account */
5330
+ account: string;
5331
+ /**
5332
+ * @description TeamMemberMetadata
5333
+ * @default {}
5334
+ */
5335
+ metadata: {
5336
+ [key: string]: unknown;
5337
+ };
5338
+ /** @description TeamMember creation date */
5339
+ createdAt: string;
5340
+ /** @description TeamMember updated date */
5341
+ updatedAt?: string;
5342
+ };
5343
+ };
5344
+ };
5345
+ };
5346
+ };
5347
+ };
5348
+ "team/revokeInvite": {
5349
+ parameters: {
5350
+ query?: never;
5351
+ header?: never;
5352
+ path: {
5353
+ team_id: string;
5354
+ ticket_id: string;
5355
+ };
5356
+ cookie?: never;
5357
+ };
5358
+ requestBody?: never;
5359
+ responses: {
5360
+ /** @description Default Response */
5361
+ 200: {
5362
+ headers: {
5363
+ [name: string]: unknown;
5364
+ };
5365
+ content: {
5366
+ "application/json": {
5367
+ /** @enum {string} */
5368
+ status: "revoked";
5369
+ };
5370
+ };
5371
+ };
5372
+ };
5373
+ };
5374
+ team_invite_verify: {
5375
+ parameters: {
5376
+ query: {
5377
+ ticket: string;
5378
+ };
5379
+ header?: never;
5380
+ path?: never;
5381
+ cookie?: never;
5382
+ };
5383
+ requestBody?: never;
5384
+ responses: {
5385
+ /** @description Default Response */
5386
+ 200: {
5387
+ headers: {
5388
+ [name: string]: unknown;
5389
+ };
5390
+ content?: never;
5391
+ };
5392
+ };
5393
+ };
4506
5394
  "api/list": {
4507
5395
  parameters: {
4508
5396
  query?: {
@@ -4514,8 +5402,6 @@ export interface operations {
4514
5402
  pageSize?: number;
4515
5403
  /** @description Filter using a FaableQL query */
4516
5404
  query?: string;
4517
- /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `expand=user&expand=team`). */
4518
- expand?: string[];
4519
5405
  };
4520
5406
  header?: never;
4521
5407
  path?: never;
@@ -4546,12 +5432,39 @@ export interface operations {
4546
5432
  path?: never;
4547
5433
  cookie?: never;
4548
5434
  };
5435
+ /** @description Payload for creating an Api (a.k.a. Resource Server / Audience). The `identifier` becomes the `aud` claim in tokens issued for this API and cannot be changed after creation. */
4549
5436
  requestBody: {
4550
5437
  content: {
4551
5438
  "application/json": {
5439
+ /**
5440
+ * @description Human-readable name for the API.
5441
+ * @example My Backend API
5442
+ */
4552
5443
  name: string;
5444
+ /**
5445
+ * @description Audience URL clients pass as `audience=` when requesting a token for this API. Must be unique within the tenant and is immutable after creation.
5446
+ * @example https://api.faable.com
5447
+ */
5448
+ identifier: string;
5449
+ /** @description Optional human-readable description of the API. */
4553
5450
  description?: string;
4554
- permissions: components["schemas"]["PermissionCreate"][];
5451
+ /**
5452
+ * @description Set of permissions (scopes) this API exposes. Tokens issued with `audience=identifier` will only carry these in their `permissions` claim.
5453
+ * @default []
5454
+ */
5455
+ permissions?: components["schemas"]["PermissionCreate"][];
5456
+ /** @description JWA algorithm used to sign access_tokens issued for this API. Currently only RS256 (the account keystore default) is implemented. */
5457
+ signing_alg?: "RS256";
5458
+ /** @description Shape of access_tokens issued for this API. `access_token` emits the standard OAuth2 token. `access_token_authz` additionally embeds a `permissions` claim listing the permissions granted to the subject for this API. */
5459
+ token_dialect?: "access_token" | "access_token_authz";
5460
+ /** @description Access_token lifetime in seconds. Defaults to 86400 (24h) if omitted. */
5461
+ token_lifetime?: number;
5462
+ /** @description When true, requested scopes are filtered against `permissions` at token issuance. */
5463
+ enforce_policies?: boolean;
5464
+ /** @description When true, clients can request `offline_access` and receive a refresh_token for this API. */
5465
+ allow_offline_access?: boolean;
5466
+ /** @description When true, skip the consent prompt for first-party clients. */
5467
+ skip_consent?: boolean;
4555
5468
  };
4556
5469
  };
4557
5470
  };
@@ -4565,9 +5478,34 @@ export interface operations {
4565
5478
  "application/json": {
4566
5479
  /** @description Api ID */
4567
5480
  id: string;
5481
+ /**
5482
+ * @description Human-readable name for the API. Shown in the dashboard and consent prompts.
5483
+ * @example My Backend API
5484
+ */
4568
5485
  name: string;
5486
+ /** @description URL-safe identifier auto-derived from `name`. Unique within the tenant. */
5487
+ slug: string;
5488
+ /**
5489
+ * @description Audience URL that clients pass as `audience=` when requesting a token for this API. Becomes the `aud` claim in the issued access_token. Immutable after creation and unique within the tenant.
5490
+ * @example https://api.faable.com
5491
+ */
5492
+ identifier: string;
5493
+ /** @description Optional human-readable description of the API. */
4569
5494
  description?: string;
5495
+ /** @description Set of permissions (scopes) this API exposes. When a token is issued with `audience=identifier`, the requested `scope` is intersected with this list to populate the `permissions` claim. */
4570
5496
  permissions: components["schemas"]["Permission"][];
5497
+ /** @description JWA algorithm used to sign access_tokens issued for this API. Currently only RS256 (the account keystore default) is implemented. */
5498
+ signing_alg: "RS256";
5499
+ /** @description Shape of access_tokens issued for this API. `access_token` emits the standard OAuth2 token. `access_token_authz` additionally embeds a `permissions` claim listing the permissions granted to the subject for this API. */
5500
+ token_dialect: "access_token" | "access_token_authz";
5501
+ /** @description Access_token lifetime in seconds. Default 86400 (24h). Applied at token issuance time (overrides the generic default). */
5502
+ token_lifetime: number;
5503
+ /** @description When true, only scopes that match a permission in `permissions` are forwarded into the access_token. When false, requested scopes are echoed back verbatim with no filtering. */
5504
+ enforce_policies: boolean;
5505
+ /** @description When true, the API is eligible to be the target of a `refresh_token` (i.e. clients can request `offline_access` against it). */
5506
+ allow_offline_access: boolean;
5507
+ /** @description When true, the consent prompt is skipped for first-party clients (clients owned by the same tenant as the API). */
5508
+ skip_consent: boolean;
4571
5509
  /** @description Object is related with this account */
4572
5510
  account: string;
4573
5511
  /**
@@ -4588,10 +5526,7 @@ export interface operations {
4588
5526
  };
4589
5527
  "api/get": {
4590
5528
  parameters: {
4591
- query?: {
4592
- /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `expand=user&expand=team`). */
4593
- expand?: string[];
4594
- };
5529
+ query?: never;
4595
5530
  header?: never;
4596
5531
  path: {
4597
5532
  api_id: string;
@@ -4609,9 +5544,124 @@ export interface operations {
4609
5544
  "application/json": {
4610
5545
  /** @description Api ID */
4611
5546
  id: string;
5547
+ /**
5548
+ * @description Human-readable name for the API. Shown in the dashboard and consent prompts.
5549
+ * @example My Backend API
5550
+ */
4612
5551
  name: string;
5552
+ /** @description URL-safe identifier auto-derived from `name`. Unique within the tenant. */
5553
+ slug: string;
5554
+ /**
5555
+ * @description Audience URL that clients pass as `audience=` when requesting a token for this API. Becomes the `aud` claim in the issued access_token. Immutable after creation and unique within the tenant.
5556
+ * @example https://api.faable.com
5557
+ */
5558
+ identifier: string;
5559
+ /** @description Optional human-readable description of the API. */
4613
5560
  description?: string;
5561
+ /** @description Set of permissions (scopes) this API exposes. When a token is issued with `audience=identifier`, the requested `scope` is intersected with this list to populate the `permissions` claim. */
4614
5562
  permissions: components["schemas"]["Permission"][];
5563
+ /** @description JWA algorithm used to sign access_tokens issued for this API. Currently only RS256 (the account keystore default) is implemented. */
5564
+ signing_alg: "RS256";
5565
+ /** @description Shape of access_tokens issued for this API. `access_token` emits the standard OAuth2 token. `access_token_authz` additionally embeds a `permissions` claim listing the permissions granted to the subject for this API. */
5566
+ token_dialect: "access_token" | "access_token_authz";
5567
+ /** @description Access_token lifetime in seconds. Default 86400 (24h). Applied at token issuance time (overrides the generic default). */
5568
+ token_lifetime: number;
5569
+ /** @description When true, only scopes that match a permission in `permissions` are forwarded into the access_token. When false, requested scopes are echoed back verbatim with no filtering. */
5570
+ enforce_policies: boolean;
5571
+ /** @description When true, the API is eligible to be the target of a `refresh_token` (i.e. clients can request `offline_access` against it). */
5572
+ allow_offline_access: boolean;
5573
+ /** @description When true, the consent prompt is skipped for first-party clients (clients owned by the same tenant as the API). */
5574
+ skip_consent: boolean;
5575
+ /** @description Object is related with this account */
5576
+ account: string;
5577
+ /**
5578
+ * @description ApiMetadata
5579
+ * @default {}
5580
+ */
5581
+ metadata: {
5582
+ [key: string]: unknown;
5583
+ };
5584
+ /** @description Api creation date */
5585
+ createdAt: string;
5586
+ /** @description Api updated date */
5587
+ updatedAt?: string;
5588
+ };
5589
+ };
5590
+ };
5591
+ };
5592
+ };
5593
+ "api/update": {
5594
+ parameters: {
5595
+ query?: never;
5596
+ header?: never;
5597
+ path: {
5598
+ api_id: string;
5599
+ };
5600
+ cookie?: never;
5601
+ };
5602
+ /** @description Partial update for an Api. `identifier` is immutable and not present here; recreate the API if you need to change it. */
5603
+ requestBody: {
5604
+ content: {
5605
+ "application/json": {
5606
+ /** @description Human-readable name for the API. */
5607
+ name?: string;
5608
+ /** @description Optional human-readable description of the API. */
5609
+ description?: string;
5610
+ /** @description Replaces the full permissions list. Tokens issued AFTER the update will use the new list; tokens already in circulation are unchanged. */
5611
+ permissions?: components["schemas"]["PermissionCreate"][];
5612
+ /** @description JWA algorithm used to sign access_tokens issued for this API. Currently only RS256 (the account keystore default) is implemented. */
5613
+ signing_alg?: "RS256";
5614
+ /** @description Shape of access_tokens issued for this API. `access_token` emits the standard OAuth2 token. `access_token_authz` additionally embeds a `permissions` claim listing the permissions granted to the subject for this API. */
5615
+ token_dialect?: "access_token" | "access_token_authz";
5616
+ /** @description Access_token lifetime in seconds. */
5617
+ token_lifetime?: number;
5618
+ /** @description When true, requested scopes are filtered against `permissions` at token issuance. */
5619
+ enforce_policies?: boolean;
5620
+ /** @description When true, clients can request `offline_access` and receive a refresh_token for this API. */
5621
+ allow_offline_access?: boolean;
5622
+ /** @description When true, skip the consent prompt for first-party clients. */
5623
+ skip_consent?: boolean;
5624
+ };
5625
+ };
5626
+ };
5627
+ responses: {
5628
+ /** @description Api */
5629
+ 200: {
5630
+ headers: {
5631
+ [name: string]: unknown;
5632
+ };
5633
+ content: {
5634
+ "application/json": {
5635
+ /** @description Api ID */
5636
+ id: string;
5637
+ /**
5638
+ * @description Human-readable name for the API. Shown in the dashboard and consent prompts.
5639
+ * @example My Backend API
5640
+ */
5641
+ name: string;
5642
+ /** @description URL-safe identifier auto-derived from `name`. Unique within the tenant. */
5643
+ slug: string;
5644
+ /**
5645
+ * @description Audience URL that clients pass as `audience=` when requesting a token for this API. Becomes the `aud` claim in the issued access_token. Immutable after creation and unique within the tenant.
5646
+ * @example https://api.faable.com
5647
+ */
5648
+ identifier: string;
5649
+ /** @description Optional human-readable description of the API. */
5650
+ description?: string;
5651
+ /** @description Set of permissions (scopes) this API exposes. When a token is issued with `audience=identifier`, the requested `scope` is intersected with this list to populate the `permissions` claim. */
5652
+ permissions: components["schemas"]["Permission"][];
5653
+ /** @description JWA algorithm used to sign access_tokens issued for this API. Currently only RS256 (the account keystore default) is implemented. */
5654
+ signing_alg: "RS256";
5655
+ /** @description Shape of access_tokens issued for this API. `access_token` emits the standard OAuth2 token. `access_token_authz` additionally embeds a `permissions` claim listing the permissions granted to the subject for this API. */
5656
+ token_dialect: "access_token" | "access_token_authz";
5657
+ /** @description Access_token lifetime in seconds. Default 86400 (24h). Applied at token issuance time (overrides the generic default). */
5658
+ token_lifetime: number;
5659
+ /** @description When true, only scopes that match a permission in `permissions` are forwarded into the access_token. When false, requested scopes are echoed back verbatim with no filtering. */
5660
+ enforce_policies: boolean;
5661
+ /** @description When true, the API is eligible to be the target of a `refresh_token` (i.e. clients can request `offline_access` against it). */
5662
+ allow_offline_access: boolean;
5663
+ /** @description When true, the consent prompt is skipped for first-party clients (clients owned by the same tenant as the API). */
5664
+ skip_consent: boolean;
4615
5665
  /** @description Object is related with this account */
4616
5666
  account: string;
4617
5667
  /**
@@ -4650,6 +5700,33 @@ export interface operations {
4650
5700
  };
4651
5701
  };
4652
5702
  };
5703
+ "account/getKeys": {
5704
+ parameters: {
5705
+ query?: never;
5706
+ header?: never;
5707
+ path?: never;
5708
+ cookie?: never;
5709
+ };
5710
+ requestBody?: never;
5711
+ responses: {
5712
+ /** @description Default Response */
5713
+ 200: {
5714
+ headers: {
5715
+ [name: string]: unknown;
5716
+ };
5717
+ content: {
5718
+ "application/json": {
5719
+ /** @description kid currently used to sign new tokens */
5720
+ production_kid: string;
5721
+ /** @description kid that will be promoted on the next rotation */
5722
+ next_in_queue_kid: string;
5723
+ /** @description All kids currently published in the JWK Set */
5724
+ kids_active: string[];
5725
+ };
5726
+ };
5727
+ };
5728
+ };
5729
+ };
4653
5730
  "account/rotateKeys": {
4654
5731
  parameters: {
4655
5732
  query?: never;
@@ -4696,8 +5773,6 @@ export interface operations {
4696
5773
  pageSize?: number;
4697
5774
  /** @description Filter using a FaableQL query */
4698
5775
  query?: string;
4699
- /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `expand=user&expand=team`). */
4700
- expand?: string[];
4701
5776
  };
4702
5777
  header?: never;
4703
5778
  path?: never;
@@ -4800,10 +5875,7 @@ export interface operations {
4800
5875
  };
4801
5876
  "action/get": {
4802
5877
  parameters: {
4803
- query?: {
4804
- /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `expand=user&expand=team`). */
4805
- expand?: string[];
4806
- };
5878
+ query?: never;
4807
5879
  header?: never;
4808
5880
  path: {
4809
5881
  action_id: string;
@@ -4890,8 +5962,6 @@ export interface operations {
4890
5962
  pageSize?: number;
4891
5963
  /** @description Filter using a FaableQL query */
4892
5964
  query?: string;
4893
- /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `expand=user&expand=team`). */
4894
- expand?: string[];
4895
5965
  };
4896
5966
  header?: never;
4897
5967
  path?: never;
@@ -5028,10 +6098,7 @@ export interface operations {
5028
6098
  };
5029
6099
  "notificationsubscription/get": {
5030
6100
  parameters: {
5031
- query?: {
5032
- /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `expand=user&expand=team`). */
5033
- expand?: string[];
5034
- };
6101
+ query?: never;
5035
6102
  header?: never;
5036
6103
  path: {
5037
6104
  notificationsubscription_id: string;
@@ -5249,8 +6316,6 @@ export interface operations {
5249
6316
  pageSize?: number;
5250
6317
  /** @description Filter using a FaableQL query */
5251
6318
  query?: string;
5252
- /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `expand=user&expand=team`). */
5253
- expand?: string[];
5254
6319
  };
5255
6320
  header?: never;
5256
6321
  path?: never;
@@ -5276,10 +6341,7 @@ export interface operations {
5276
6341
  };
5277
6342
  "log/get": {
5278
6343
  parameters: {
5279
- query?: {
5280
- /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `expand=user&expand=team`). */
5281
- expand?: string[];
5282
- };
6344
+ query?: never;
5283
6345
  header?: never;
5284
6346
  path: {
5285
6347
  log_id: string;
@@ -5354,8 +6416,6 @@ export interface operations {
5354
6416
  pageSize?: number;
5355
6417
  /** @description Filter using a FaableQL query */
5356
6418
  query?: string;
5357
- /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `expand=user&expand=team`). */
5358
- expand?: string[];
5359
6419
  };
5360
6420
  header?: never;
5361
6421
  path?: never;
@@ -5441,10 +6501,7 @@ export interface operations {
5441
6501
  };
5442
6502
  "customdomain/get": {
5443
6503
  parameters: {
5444
- query?: {
5445
- /** @description Expand id-only fields in the response. Pass one path per entry (e.g. `expand=user&expand=team`). */
5446
- expand?: string[];
5447
- };
6504
+ query?: never;
5448
6505
  header?: never;
5449
6506
  path: {
5450
6507
  customdomain_id: string;
@@ -5547,6 +6604,7 @@ export interface operations {
5547
6604
  email: string;
5548
6605
  /** @default link */
5549
6606
  send: string;
6607
+ connection_id?: string;
5550
6608
  auth_params?: {
5551
6609
  [key: string]: string;
5552
6610
  };
@@ -5600,6 +6658,8 @@ export interface operations {
5600
6658
  * @default false
5601
6659
  */
5602
6660
  email_verified: boolean;
6661
+ /** @description ISO 8601 timestamp of the user's last verified email change. When set, OAuth callbacks will not overwrite `email`/`email_verified` from the federated provider — the manually-chosen email wins. */
6662
+ email_change_locked_at?: string | null;
5603
6663
  /** @description contact phone number */
5604
6664
  phone?: string | null;
5605
6665
  /** @description phone is verified */
@@ -5726,6 +6786,8 @@ export interface operations {
5726
6786
  /** @description OIDC §3.1.2.1 — maximum allowable elapsed time in seconds since the last End-User authentication. If exceeded, the OP re-authenticates and `auth_time` is REQUIRED in the resulting id_token. */
5727
6787
  max_age?: number;
5728
6788
  prompt?: string;
6789
+ /** @description Resource Indicator (RFC 8707). Identifier of the Api the client wants to access. Persisted in the auth state so the token issued at /oauth/token targets the matching Api resource and its `aud` claim is set to this value. */
6790
+ audience?: string;
5729
6791
  };
5730
6792
  header?: never;
5731
6793
  path?: never;
@@ -5759,6 +6821,8 @@ export interface operations {
5759
6821
  subject_token_type?: string;
5760
6822
  /** @description The device code returned by the authorization server. */
5761
6823
  device_code?: string;
6824
+ /** @description Identifier of the API the client wants to access. Matched against `Api.identifier` in the tenant. */
6825
+ audience?: string;
5762
6826
  };
5763
6827
  header?: never;
5764
6828
  path?: never;
@@ -5801,6 +6865,8 @@ export interface operations {
5801
6865
  subject_token_type?: string;
5802
6866
  /** @description The device code returned by the authorization server. */
5803
6867
  device_code?: string;
6868
+ /** @description Identifier of the API the client wants to access. Matched against `Api.identifier` in the tenant. */
6869
+ audience?: string;
5804
6870
  };
5805
6871
  header?: never;
5806
6872
  path?: never;
@@ -5823,6 +6889,8 @@ export interface operations {
5823
6889
  subject_token_type?: string;
5824
6890
  /** @description The device code returned by the authorization server. */
5825
6891
  device_code?: string;
6892
+ /** @description Identifier of the API the client wants to access. Matched against `Api.identifier` in the tenant. */
6893
+ audience?: string;
5826
6894
  } & {
5827
6895
  [key: string]: unknown;
5828
6896
  };
@@ -5861,6 +6929,8 @@ export interface operations {
5861
6929
  client_id: string;
5862
6930
  /** @description The scope of the access request. */
5863
6931
  scope?: string;
6932
+ /** @description Identifier of the API the device wants to access. Resolved against the tenant Api resources (`Api.identifier`) at token issuance. */
6933
+ audience?: string;
5864
6934
  };
5865
6935
  };
5866
6936
  };
@@ -6250,6 +7320,8 @@ export interface operations {
6250
7320
  /** @description OIDC §3.1.2.1 — maximum allowable elapsed time in seconds since the last End-User authentication. If exceeded, the OP re-authenticates and `auth_time` is REQUIRED in the resulting id_token. */
6251
7321
  max_age?: number;
6252
7322
  prompt?: string;
7323
+ /** @description Resource Indicator (RFC 8707). Identifier of the Api the client wants to access. Persisted in the auth state so the token issued at /oauth/token targets the matching Api resource and its `aud` claim is set to this value. */
7324
+ audience?: string;
6253
7325
  };
6254
7326
  };
6255
7327
  };