@fusebase/fusebase-gate-sdk 2.4.0 → 2.5.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.
- package/dist/apis/FusebaseAuthApi.d.ts +9 -1
- package/dist/apis/FusebaseAuthApi.js +14 -0
- package/dist/apis/PortalFeatureContextApi.d.ts +1 -1
- package/dist/apis/PortalFeatureContextApi.js +1 -1
- package/dist/apis/PortalsApi.d.ts +167 -2
- package/dist/apis/PortalsApi.js +181 -1
- package/dist/types/fusebase-auth/fusebase-auth.d.ts +7 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.js +1 -0
- package/dist/types/portal-feature-context/portal-feature-context.d.ts +23 -7
- package/dist/types/portals/portals.d.ts +608 -0
- package/dist/types/portals/portals.js +42 -0
- package/package.json +1 -1
- package/release-notes/2.5.0.md +9 -0
- package/release-notes/latest.md +3 -3
- package/release-notes/2.4.0.md +0 -9
package/dist/types/index.d.ts
CHANGED
|
@@ -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, FusebaseAuthUnauthorizedErrorBodyContract } from "./fusebase-auth/fusebase-auth";
|
|
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";
|
|
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";
|
|
@@ -21,7 +21,7 @@ export * from "./org-group/org-group";
|
|
|
21
21
|
export type { ClientAccountScheduledDeletionRequestContract, ClientAccountScheduledDeletionResponseContract, CreateWorkspaceRequestContract, OrgInviteContract, OrgMagicLinkContract, OrgMemberExpectedJoinedAfterInQueryOptional, OrgMemberExpectedRoleInQueryOptional, OrgMemberRemoveResponseContract, OrgPortalContract, OrgPortalListResponseContract, OrgUserAddRequestContract, OrgUserAddResponseContract, OrgUserContract, OrgUserIdInPathRequired, OrgUserListResponseContract, OrgUserWorkspaceIdInPathRequired, OrgWorkspaceContract, OrgWorkspaceInviteContract, OrgWorkspaceListResponseContract, OrgWorkspaceMemberContract, OrgWorkspaceMemberListResponseContract, WorkspaceMemberRemoveResponseContract } from "./org-user/org-user";
|
|
22
22
|
export * from "./orgs/orgs";
|
|
23
23
|
export type { VerifyPortalFeatureContextTokenRequestContract, VerifyPortalFeatureContextTokenResponseContract } from "./portal-feature-context/portal-feature-context";
|
|
24
|
-
export
|
|
24
|
+
export * from "./portals/portals";
|
|
25
25
|
export * from "./shared/common";
|
|
26
26
|
export * from "./shared/enums";
|
|
27
27
|
export type { GetHealth200ResponseContract } from "./shared/health";
|
package/dist/types/index.js
CHANGED
|
@@ -27,6 +27,7 @@ __exportStar(require("./mcp-manager/mcp-manager"), exports);
|
|
|
27
27
|
__exportStar(require("./note/note"), exports);
|
|
28
28
|
__exportStar(require("./org-group/org-group"), exports);
|
|
29
29
|
__exportStar(require("./orgs/orgs"), exports);
|
|
30
|
+
__exportStar(require("./portals/portals"), exports);
|
|
30
31
|
__exportStar(require("./shared/common"), exports);
|
|
31
32
|
__exportStar(require("./shared/enums"), exports);
|
|
32
33
|
__exportStar(require("./system/system"), exports);
|
|
@@ -8,11 +8,24 @@ export interface VerifyPortalFeatureContextTokenRequestContract {
|
|
|
8
8
|
/**
|
|
9
9
|
* Trusted portal/workspace context extracted from a verified embed token.
|
|
10
10
|
*
|
|
11
|
-
* `userId`/`orgRole` describe WHO is calling
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
11
|
+
* `userId`/`orgRole` describe WHO is calling. They are NOT claims of the
|
|
12
|
+
* `portalFeatureContextToken` — that token is static (minted once when the
|
|
13
|
+
* brick is saved, shared by every viewer, no `exp`) and carries no user.
|
|
14
|
+
* Identity comes from the live, user-bound app session (`fbsfeaturetoken`)
|
|
15
|
+
* that authenticated this request, and is returned **if and only if**:
|
|
16
|
+
*
|
|
17
|
+
* session.portalId === verified token portalId && session user is real
|
|
18
|
+
*
|
|
19
|
+
* i.e. the caller reached this app through THIS portal's embed under their own
|
|
20
|
+
* identity. Anonymous visitors (reserved visitor id), sessions with no portal
|
|
21
|
+
* binding, and sessions bound to a different portal all get the fields omitted.
|
|
22
|
+
*
|
|
23
|
+
* What presence proves: a genuine "user × portal × app" triple in one call —
|
|
24
|
+
* the platform, not the app, binds WHO to WHERE.
|
|
25
|
+
* What it does NOT prove: portal membership. Enforce that through the app's
|
|
26
|
+
* `--access` principals (`portalMember`/`portalClient`/`portalManager`).
|
|
27
|
+
* Comparing `userId` to the userId your own session lookup returns is a
|
|
28
|
+
* tautology (same source), not a check that the token belongs to the caller.
|
|
16
29
|
*/
|
|
17
30
|
export interface VerifyPortalFeatureContextTokenResponseContract {
|
|
18
31
|
portalId: string;
|
|
@@ -21,8 +34,11 @@ export interface VerifyPortalFeatureContextTokenResponseContract {
|
|
|
21
34
|
productId: string;
|
|
22
35
|
/** App (feature) id (legacy payload field `featureId`). */
|
|
23
36
|
appId: string;
|
|
24
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Native id of the caller, from the portal-bound session (never from the
|
|
39
|
+
* token). Absent for visitors and for sessions not bound to this portal.
|
|
40
|
+
*/
|
|
25
41
|
userId?: number;
|
|
26
|
-
/** Org role of the
|
|
42
|
+
/** Org role of the caller at verify time. Present only alongside `userId`. */
|
|
27
43
|
orgRole?: string;
|
|
28
44
|
}
|