@fusebase/fusebase-gate-sdk 2.11.6-sdk.0 → 2.11.7-sdk.0

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.
@@ -11,7 +11,7 @@ export declare class AppMagicLinksApi {
11
11
  constructor(client: Client);
12
12
  /**
13
13
  * Activate an app magic link
14
- * Unauthenticated activation: exchange a magic-link globalId for a session token (used to set the eversessionid cookie on the app subdomain), a Gate feature token, and a Dashboard feature token, all scoped to the magic link's app and target user. Re-evaluates accessPrincipals at activation time so a link issued before access was revoked can no longer be redeemed. Within the 24h TTL the link can be activated more than once.
14
+ * Unauthenticated activation: exchange a magic-link globalId for a session token (a raw FuseBase session id: forward it to Gate as `EverHelper-Session-ID` when a legacy call needs it, never set it as a cookie on the app host), a Gate feature token, and a Dashboard feature token, all scoped to the magic link's app and target user. Re-evaluates accessPrincipals at activation time so a link issued before access was revoked can no longer be redeemed. Within the 24h TTL the link can be activated more than once.
15
15
  */
16
16
  activateAppMagicLink(params: {
17
17
  path: {
@@ -13,7 +13,7 @@ class AppMagicLinksApi {
13
13
  }
14
14
  /**
15
15
  * Activate an app magic link
16
- * Unauthenticated activation: exchange a magic-link globalId for a session token (used to set the eversessionid cookie on the app subdomain), a Gate feature token, and a Dashboard feature token, all scoped to the magic link's app and target user. Re-evaluates accessPrincipals at activation time so a link issued before access was revoked can no longer be redeemed. Within the 24h TTL the link can be activated more than once.
16
+ * Unauthenticated activation: exchange a magic-link globalId for a session token (a raw FuseBase session id: forward it to Gate as `EverHelper-Session-ID` when a legacy call needs it, never set it as a cookie on the app host), a Gate feature token, and a Dashboard feature token, all scoped to the magic link's app and target user. Re-evaluates accessPrincipals at activation time so a link issued before access was revoked can no longer be redeemed. Within the 24h TTL the link can be activated more than once.
17
17
  */
18
18
  async activateAppMagicLink(params) {
19
19
  return this.client.request({
@@ -21,7 +21,7 @@ export declare class FusebaseAuthApi {
21
21
  }): Promise<FusebaseAuthPasswordRestoreKeyResponseContract>;
22
22
  /**
23
23
  * Complete Fusebase auth challenge
24
- * Visitor-safe challenge completion endpoint for CAPTCHA, OTP, mail OTP, and MFA flows returned by register/login.
24
+ * Visitor-safe challenge completion endpoint for CAPTCHA, OTP, mail OTP, and MFA flows returned by register/login. An authenticated result carries `appAuth`: spend `appAuth.authPath` on the app's own origin, with a same-origin `fetch` sending `Accept: application/json` or a plain navigation, and the platform mints the app runtime token from it.
25
25
  */
26
26
  completeFusebaseAuthChallenge(params: {
27
27
  headers?: Record<string, string>;
@@ -29,7 +29,7 @@ export declare class FusebaseAuthApi {
29
29
  }): Promise<FusebaseAuthChallengeResponseContract>;
30
30
  /**
31
31
  * Login a Fusebase user
32
- * Visitor-safe email/password login proxy for AI App auth. Forwards to auth-form `/auth/api/auth` server-side and returns sessionId for the app backend to set as its own cookie. Never provisions org membership.
32
+ * Visitor-safe email/password login proxy for AI App auth. Forwards to auth-form `/auth/api/auth` server-side. An authenticated result carries `appAuth`: spend `appAuth.authPath` on the app's own origin, with a same-origin `fetch` sending `Accept: application/json` or a plain navigation, and the platform mints the app runtime token from it. Never provisions org membership.
33
33
  */
34
34
  loginFusebaseUser(params: {
35
35
  headers?: Record<string, string>;
@@ -44,7 +44,7 @@ export declare class FusebaseAuthApi {
44
44
  }): Promise<FusebaseAuthLogoutResponseContract>;
45
45
  /**
46
46
  * Register a Fusebase user and add org membership
47
- * Protected AI App onboarding flow. Creates a Fusebase account through auth-form, then adds the newly created user to the path org with the requested role. Requires org.members.write and org access. This endpoint is for registration only; do not call it on login because that can overwrite or duplicate existing membership intent. For trusted AI App signup flows, send `autoConfirmEmail=true` to create the account with the email already confirmed and skip the auth-form confirmation message.
47
+ * Protected AI App onboarding flow. Creates a Fusebase account through auth-form, then adds the newly created user to the path org with the requested role. An authenticated result carries `appAuth`: spend `appAuth.authPath` on the app's own origin, with a same-origin `fetch` sending `Accept: application/json` or a plain navigation, and the platform mints the app runtime token from it. Requires org.members.write and org access. This endpoint is for registration only; do not call it on login because that can overwrite or duplicate existing membership intent. For trusted AI App signup flows, send `autoConfirmEmail=true` to create the account with the email already confirmed and skip the auth-form confirmation message.
48
48
  */
49
49
  registerFusebaseOrgMember(params: {
50
50
  path: {
@@ -55,7 +55,7 @@ export declare class FusebaseAuthApi {
55
55
  }): Promise<FusebaseAuthRegisterMemberResponseContract>;
56
56
  /**
57
57
  * Register a Fusebase user
58
- * Visitor-safe email/password Fusebase registration proxy for AI App auth. Forwards to auth-form `/auth/api/register` server-side and returns the Fusebase sessionId for the app backend to set as its own cookie. Does not add org membership. For trusted AI App signup flows, send `autoConfirmEmail=true` to create the account with the email already confirmed and skip the auth-form confirmation message.
58
+ * Visitor-safe email/password Fusebase registration proxy for AI App auth. Forwards to auth-form `/auth/api/register` server-side. An authenticated result carries `appAuth`: spend `appAuth.authPath` on the app's own origin, with a same-origin `fetch` sending `Accept: application/json` or a plain navigation, and the platform mints the app runtime token from it. Does not add org membership. For trusted AI App signup flows, send `autoConfirmEmail=true` to create the account with the email already confirmed and skip the auth-form confirmation message.
59
59
  */
60
60
  registerFusebaseUser(params: {
61
61
  headers?: Record<string, string>;
@@ -27,7 +27,7 @@ class FusebaseAuthApi {
27
27
  }
28
28
  /**
29
29
  * Complete Fusebase auth challenge
30
- * Visitor-safe challenge completion endpoint for CAPTCHA, OTP, mail OTP, and MFA flows returned by register/login.
30
+ * Visitor-safe challenge completion endpoint for CAPTCHA, OTP, mail OTP, and MFA flows returned by register/login. An authenticated result carries `appAuth`: spend `appAuth.authPath` on the app's own origin, with a same-origin `fetch` sending `Accept: application/json` or a plain navigation, and the platform mints the app runtime token from it.
31
31
  */
32
32
  async completeFusebaseAuthChallenge(params) {
33
33
  return this.client.request({
@@ -41,7 +41,7 @@ class FusebaseAuthApi {
41
41
  }
42
42
  /**
43
43
  * Login a Fusebase user
44
- * Visitor-safe email/password login proxy for AI App auth. Forwards to auth-form `/auth/api/auth` server-side and returns sessionId for the app backend to set as its own cookie. Never provisions org membership.
44
+ * Visitor-safe email/password login proxy for AI App auth. Forwards to auth-form `/auth/api/auth` server-side. An authenticated result carries `appAuth`: spend `appAuth.authPath` on the app's own origin, with a same-origin `fetch` sending `Accept: application/json` or a plain navigation, and the platform mints the app runtime token from it. Never provisions org membership.
45
45
  */
46
46
  async loginFusebaseUser(params) {
47
47
  return this.client.request({
@@ -68,7 +68,7 @@ class FusebaseAuthApi {
68
68
  }
69
69
  /**
70
70
  * Register a Fusebase user and add org membership
71
- * Protected AI App onboarding flow. Creates a Fusebase account through auth-form, then adds the newly created user to the path org with the requested role. Requires org.members.write and org access. This endpoint is for registration only; do not call it on login because that can overwrite or duplicate existing membership intent. For trusted AI App signup flows, send `autoConfirmEmail=true` to create the account with the email already confirmed and skip the auth-form confirmation message.
71
+ * Protected AI App onboarding flow. Creates a Fusebase account through auth-form, then adds the newly created user to the path org with the requested role. An authenticated result carries `appAuth`: spend `appAuth.authPath` on the app's own origin, with a same-origin `fetch` sending `Accept: application/json` or a plain navigation, and the platform mints the app runtime token from it. Requires org.members.write and org access. This endpoint is for registration only; do not call it on login because that can overwrite or duplicate existing membership intent. For trusted AI App signup flows, send `autoConfirmEmail=true` to create the account with the email already confirmed and skip the auth-form confirmation message.
72
72
  */
73
73
  async registerFusebaseOrgMember(params) {
74
74
  return this.client.request({
@@ -83,7 +83,7 @@ class FusebaseAuthApi {
83
83
  }
84
84
  /**
85
85
  * Register a Fusebase user
86
- * Visitor-safe email/password Fusebase registration proxy for AI App auth. Forwards to auth-form `/auth/api/register` server-side and returns the Fusebase sessionId for the app backend to set as its own cookie. Does not add org membership. For trusted AI App signup flows, send `autoConfirmEmail=true` to create the account with the email already confirmed and skip the auth-form confirmation message.
86
+ * Visitor-safe email/password Fusebase registration proxy for AI App auth. Forwards to auth-form `/auth/api/register` server-side. An authenticated result carries `appAuth`: spend `appAuth.authPath` on the app's own origin, with a same-origin `fetch` sending `Accept: application/json` or a plain navigation, and the platform mints the app runtime token from it. Does not add org membership. For trusted AI App signup flows, send `autoConfirmEmail=true` to create the account with the email already confirmed and skip the auth-form confirmation message.
87
87
  */
88
88
  async registerFusebaseUser(params) {
89
89
  return this.client.request({
@@ -137,7 +137,10 @@ export interface ActivateAppMagicLinkResponseContract {
137
137
  */
138
138
  id: string;
139
139
  /**
140
- * Session id usable as the `eversessionid` cookie value.
140
+ * Raw FuseBase session id. Do not set it as a cookie on the app host: the
141
+ * app runtime token (`fbsfeaturetoken`) is the only credential an app host
142
+ * carries. Forward it to Gate as `EverHelper-Session-ID` when a legacy call
143
+ * needs it.
141
144
  */
142
145
  sessionToken: string;
143
146
  /**
@@ -1,7 +1,40 @@
1
+ /**
2
+ * Deprecated. A raw FuseBase session id, which an app has no business holding:
3
+ * it is the FuseBase login itself, not an app-scoped credential. Gate omits it
4
+ * when it runs with the `app_login_no_session_id` feature flag (NIM-43689).
5
+ * Use `appAuth` instead.
6
+ *
7
+ * @deprecated Use `appAuth`.
8
+ */
1
9
  export interface FusebaseAuthSessionContract {
2
10
  sessionId: string;
3
11
  userId: number;
4
12
  }
13
+ /**
14
+ * Login handoff for an authenticated result (NIM-43689). Spend `authPath` on
15
+ * the app's own origin — a same-origin `fetch` with `Accept: application/json`
16
+ * from the running page, or a plain navigation — and the platform resolves
17
+ * `exchangeToken` there into the app runtime token (`fbsfeaturetoken`).
18
+ *
19
+ * The token is not bound to the app it was minted for: the platform takes the
20
+ * app identity from the request host, so whoever holds it can mint a runtime
21
+ * token for that user on any app host that user can open.
22
+ */
23
+ export interface FusebaseAuthAppAuthContract {
24
+ /**
25
+ * Session-exchange token. Spend it on `authPath`. It stays valid for the
26
+ * whole `expiresInSeconds` window and is not invalidated by being spent, so
27
+ * treat it as a credential: keep it out of logs and out of shared links.
28
+ */
29
+ exchangeToken: string;
30
+ /** Lifetime of `exchangeToken` in seconds, counted from this response. */
31
+ expiresInSeconds: number;
32
+ /**
33
+ * Relative URL on the app's own host, built from the `redirectPath` the app
34
+ * sent. Pass it through; do not assemble it yourself.
35
+ */
36
+ authPath: string;
37
+ }
5
38
  export interface FusebaseAuthChallengeContract {
6
39
  type: string;
7
40
  state: string;
@@ -31,7 +64,17 @@ export interface FusebaseAuthRegisterRequestContract {
31
64
  }
32
65
  export interface FusebaseAuthRegisterResponseContract {
33
66
  status: "authenticated" | "challenge_required";
67
+ /**
68
+ * Deprecated. A raw FuseBase session id, which an app has no business
69
+ * holding: it is the FuseBase login itself, not an app-scoped credential.
70
+ * Gate stops returning it when it runs with the `app_login_no_session_id`
71
+ * feature flag (NIM-43689). Use `appAuth` instead.
72
+ *
73
+ * @deprecated Use `appAuth`.
74
+ */
34
75
  session?: FusebaseAuthSessionContract;
76
+ /** Present on an authenticated result, unless the mint failed. */
77
+ appAuth?: FusebaseAuthAppAuthContract;
35
78
  challenge?: FusebaseAuthChallengeContract;
36
79
  redirectPath: string;
37
80
  }
@@ -83,6 +126,28 @@ export interface FusebaseAuthUnauthorizedErrorBodyContract {
83
126
  errorCode: string;
84
127
  };
85
128
  }
129
+ /**
130
+ * Body returned with HTTP 422 when gate runs with the `app_login_no_session_id`
131
+ * feature flag and the `appAuth` mint failed. `data.errorCode` is
132
+ * `app_auth_exchange_unavailable`.
133
+ *
134
+ * The credentials were accepted — only the handoff could not be issued. The
135
+ * status is 4xx and not 5xx on purpose: the generated SDK retries every 5xx
136
+ * three times with no method exclusion, and the register ops are not
137
+ * idempotent, so a retried mint failure would surface as 409
138
+ * `fusebase_account_already_exists` and this error would never reach the app.
139
+ * Start a fresh sign-in instead of replaying the call. Never returned without
140
+ * the flag: there `session` is still a working fallback and the response stays
141
+ * a 200.
142
+ */
143
+ export interface FusebaseAuthAppAuthUnavailableErrorBodyContract {
144
+ success: false;
145
+ message: string;
146
+ data: {
147
+ code: string;
148
+ errorCode: string;
149
+ };
150
+ }
86
151
  export interface FusebaseAuthLoginRequestContract {
87
152
  /**
88
153
  * User email. Forwarded to auth-form as `login`.
@@ -95,7 +160,17 @@ export interface FusebaseAuthLoginRequestContract {
95
160
  }
96
161
  export interface FusebaseAuthLoginResponseContract {
97
162
  status: "authenticated" | "challenge_required";
163
+ /**
164
+ * Deprecated. A raw FuseBase session id, which an app has no business
165
+ * holding: it is the FuseBase login itself, not an app-scoped credential.
166
+ * Gate stops returning it when it runs with the `app_login_no_session_id`
167
+ * feature flag (NIM-43689). Use `appAuth` instead.
168
+ *
169
+ * @deprecated Use `appAuth`.
170
+ */
98
171
  session?: FusebaseAuthSessionContract;
172
+ /** Present on an authenticated result, unless the mint failed. */
173
+ appAuth?: FusebaseAuthAppAuthContract;
99
174
  challenge?: FusebaseAuthChallengeContract;
100
175
  redirectPath: string;
101
176
  }
@@ -106,7 +181,17 @@ export interface FusebaseAuthChallengeRequestContract {
106
181
  }
107
182
  export interface FusebaseAuthChallengeResponseContract {
108
183
  status: "authenticated" | "challenge_required";
184
+ /**
185
+ * Deprecated. A raw FuseBase session id, which an app has no business
186
+ * holding: it is the FuseBase login itself, not an app-scoped credential.
187
+ * Gate stops returning it when it runs with the `app_login_no_session_id`
188
+ * feature flag (NIM-43689). Use `appAuth` instead.
189
+ *
190
+ * @deprecated Use `appAuth`.
191
+ */
109
192
  session?: FusebaseAuthSessionContract;
193
+ /** Present on an authenticated result, unless the mint failed. */
194
+ appAuth?: FusebaseAuthAppAuthContract;
110
195
  challenge?: FusebaseAuthChallengeContract;
111
196
  redirectPath: string;
112
197
  }
@@ -12,7 +12,7 @@ export type { ActivateAppMagicLinkResponseContract, AppMagicLinkSummaryContract,
12
12
  export * from "./billing/billing";
13
13
  export type { OrgEmailSendRequestContract, OrgEmailSendResponseContract } from "./email/email";
14
14
  export * from "./file/file";
15
- export type { FusebaseAuthChallengeContract, FusebaseAuthChallengeRequestContract, FusebaseAuthChallengeResponseContract, FusebaseAuthConflictErrorBodyContract, FusebaseAuthLoginRequestContract, FusebaseAuthLoginResponseContract, FusebaseAuthLogoutResponseContract, FusebaseAuthPasswordResetRequestContract, FusebaseAuthPasswordResetResponseContract, FusebaseAuthPasswordRestoreKeyResponseContract, FusebaseAuthPasswordRestoreRequestContract, FusebaseAuthPasswordRestoreResponseContract, FusebaseAuthRegisterMemberRequestContract, FusebaseAuthRegisterMemberResponseContract, FusebaseAuthRegisterRequestContract, FusebaseAuthRegisterResponseContract, FusebaseAuthRestoreKeyRequestContract, FusebaseAuthRestoreKeyResponseContract, FusebaseAuthSessionContract, FusebaseAuthSetInitialPasswordRequestContract, FusebaseAuthSetInitialPasswordResponseContract, FusebaseAuthUnauthorizedErrorBodyContract } from "./fusebase-auth/fusebase-auth";
15
+ export type { FusebaseAuthAppAuthContract, FusebaseAuthAppAuthUnavailableErrorBodyContract, FusebaseAuthChallengeContract, FusebaseAuthChallengeRequestContract, FusebaseAuthChallengeResponseContract, FusebaseAuthConflictErrorBodyContract, FusebaseAuthLoginRequestContract, FusebaseAuthLoginResponseContract, FusebaseAuthLogoutResponseContract, FusebaseAuthPasswordResetRequestContract, FusebaseAuthPasswordResetResponseContract, FusebaseAuthPasswordRestoreKeyResponseContract, FusebaseAuthPasswordRestoreRequestContract, FusebaseAuthPasswordRestoreResponseContract, FusebaseAuthRegisterMemberRequestContract, FusebaseAuthRegisterMemberResponseContract, FusebaseAuthRegisterRequestContract, FusebaseAuthRegisterResponseContract, FusebaseAuthRestoreKeyRequestContract, FusebaseAuthRestoreKeyResponseContract, FusebaseAuthSessionContract, FusebaseAuthSetInitialPasswordRequestContract, FusebaseAuthSetInitialPasswordResponseContract, FusebaseAuthUnauthorizedErrorBodyContract } from "./fusebase-auth/fusebase-auth";
16
16
  export * from "./isolated-store/isolated-store";
17
17
  export * from "./mcp-manager/mcp-manager";
18
18
  export type { MeAuthContract, MeOrgGroupContract, MePreferencesContract, MeResponseContract, MeScopeContract, MeUserContract } from "./me/me";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusebase/fusebase-gate-sdk",
3
- "version": "2.11.6-sdk.0",
3
+ "version": "2.11.7-sdk.0",
4
4
  "description": "TypeScript SDK for Fusebase Gate APIs - Generated from contract introspection",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -0,0 +1,9 @@
1
+ # Release Notes 2.11.7-sdk.0
2
+
3
+ - Current ref: `HEAD`
4
+ - Previous tag: `v2.11.7-sdk.0`
5
+ - Generated at: 2026-09-09T10:38:00.927Z
6
+
7
+ ## Included Drafts
8
+
9
+ - None
@@ -1,8 +1,8 @@
1
- # Release Notes 2.11.6-sdk.0
1
+ # Release Notes 2.11.7-sdk.0
2
2
 
3
3
  - Current ref: `HEAD`
4
- - Previous tag: `v2.11.6-sdk.0`
5
- - Generated at: 2026-09-07T15:25:08.819Z
4
+ - Previous tag: `v2.11.7-sdk.0`
5
+ - Generated at: 2026-09-09T10:38:00.927Z
6
6
 
7
7
  ## Included Drafts
8
8
 
@@ -1,9 +0,0 @@
1
- # Release Notes 2.11.6-sdk.0
2
-
3
- - Current ref: `HEAD`
4
- - Previous tag: `v2.11.6-sdk.0`
5
- - Generated at: 2026-09-07T15:25:08.819Z
6
-
7
- ## Included Drafts
8
-
9
- - None