@fusebase/fusebase-gate-sdk 2.3.34-sdk.8 → 2.3.34-sdk.9

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 AppApisApi {
11
11
  constructor(client: Client);
12
12
  /**
13
13
  * Call app API operation
14
- * Invokes a published app API operation through the owner app runtime using a runtime app token minted for the current authenticated caller context.
14
+ * Invokes a published app API operation through the owner app runtime using a runtime app token minted for the current authenticated caller context. Pass `onBehalfOfUserToken` (a platform app token, i.e. the user's `fbsfeaturetoken`) to run the call on behalf of an end user: Gate verifies it fail-closed and forwards the resolved user to the runtime as `X-Fusebase-Verified-User-Id` / `X-Fusebase-Verified-User-Source: obo`, so apps no longer need to hand-roll dual-token forwarding. The operation's `allowedCallers` / `requiredPermissions` are still evaluated against the calling identity, not the on-behalf-of user.
15
15
  */
16
16
  callAppApi(params: {
17
17
  path: {
@@ -13,7 +13,7 @@ class AppApisApi {
13
13
  }
14
14
  /**
15
15
  * Call app API operation
16
- * Invokes a published app API operation through the owner app runtime using a runtime app token minted for the current authenticated caller context.
16
+ * Invokes a published app API operation through the owner app runtime using a runtime app token minted for the current authenticated caller context. Pass `onBehalfOfUserToken` (a platform app token, i.e. the user's `fbsfeaturetoken`) to run the call on behalf of an end user: Gate verifies it fail-closed and forwards the resolved user to the runtime as `X-Fusebase-Verified-User-Id` / `X-Fusebase-Verified-User-Source: obo`, so apps no longer need to hand-roll dual-token forwarding. The operation's `allowedCallers` / `requiredPermissions` are still evaluated against the calling identity, not the on-behalf-of user.
17
17
  */
18
18
  async callAppApi(params) {
19
19
  return this.client.request({
@@ -5,7 +5,7 @@
5
5
  * Domain: org-users
6
6
  */
7
7
  import type { Client } from "../runtime/transport";
8
- import type { ClientAccountScheduledDeletionRequestContract, ClientAccountScheduledDeletionResponseContract, orgIdInPathRequired, OrgMemberRemoveResponseContract, OrgUserAddRequestContract, OrgUserAddResponseContract, OrgUserIdInPathRequired, OrgUserListResponseContract, OrgUserWorkspaceIdInPathRequired, OrgWorkspaceMemberListResponseContract, WorkspaceMemberRemoveResponseContract } from "../types";
8
+ import type { ClientAccountScheduledDeletionRequestContract, ClientAccountScheduledDeletionResponseContract, orgIdInPathRequired, OrgMemberExpectedJoinedAfterInQueryOptional, OrgMemberExpectedRoleInQueryOptional, OrgMemberRemoveResponseContract, OrgUserAddRequestContract, OrgUserAddResponseContract, OrgUserIdInPathRequired, OrgUserListResponseContract, OrgUserWorkspaceIdInPathRequired, OrgWorkspaceMemberListResponseContract, WorkspaceMemberRemoveResponseContract } from "../types";
9
9
  export declare class OrgUsersApi {
10
10
  private client;
11
11
  constructor(client: Client);
@@ -54,13 +54,17 @@ export declare class OrgUsersApi {
54
54
  }): Promise<OrgWorkspaceMemberListResponseContract>;
55
55
  /**
56
56
  * Remove organization member
57
- * Removes an organization member by numeric userId. Gate resolves the internal orgMember.globalId before calling org-service, and org-service cleans up workspace/group memberships for that org. Requires org.members.write and org access.
57
+ * Removes an organization member by numeric userId. Gate resolves the internal orgMember.globalId before calling org-service, and org-service cleans up workspace/group memberships for that org. Optional query preconditions make the removal conditional instead of unconditional: `expectedRole` requires the member to still hold that org role, and `expectedJoinedAfter` (unix seconds) requires the membership to have been created at or after that moment — use it when cancelling an invite so a pre-existing member is never dropped. Either mismatch fails with 409 and removes nothing; a precondition sent with an empty or unparsable value fails with 400 rather than degrading into an unconditional removal. Requires org.members.write and org access.
58
58
  */
59
59
  removeOrgMember(params: {
60
60
  path: {
61
61
  orgId: orgIdInPathRequired;
62
62
  userId: OrgUserIdInPathRequired;
63
63
  };
64
+ query?: {
65
+ expectedRole?: OrgMemberExpectedRoleInQueryOptional;
66
+ expectedJoinedAfter?: OrgMemberExpectedJoinedAfterInQueryOptional;
67
+ };
64
68
  headers?: Record<string, string>;
65
69
  }): Promise<OrgMemberRemoveResponseContract>;
66
70
  /**
@@ -70,13 +70,14 @@ class OrgUsersApi {
70
70
  }
71
71
  /**
72
72
  * Remove organization member
73
- * Removes an organization member by numeric userId. Gate resolves the internal orgMember.globalId before calling org-service, and org-service cleans up workspace/group memberships for that org. Requires org.members.write and org access.
73
+ * Removes an organization member by numeric userId. Gate resolves the internal orgMember.globalId before calling org-service, and org-service cleans up workspace/group memberships for that org. Optional query preconditions make the removal conditional instead of unconditional: `expectedRole` requires the member to still hold that org role, and `expectedJoinedAfter` (unix seconds) requires the membership to have been created at or after that moment — use it when cancelling an invite so a pre-existing member is never dropped. Either mismatch fails with 409 and removes nothing; a precondition sent with an empty or unparsable value fails with 400 rather than degrading into an unconditional removal. Requires org.members.write and org access.
74
74
  */
75
75
  async removeOrgMember(params) {
76
76
  return this.client.request({
77
77
  method: "DELETE",
78
78
  path: "/:orgId/users/:userId",
79
79
  pathParams: params.path,
80
+ query: params.query,
80
81
  headers: params.headers,
81
82
  opId: "removeOrgMember",
82
83
  expectedContentType: "application/json",
@@ -37,6 +37,13 @@ export interface CallAppApiRequestContract {
37
37
  path?: Record<string, string>;
38
38
  query?: Record<string, string | number | boolean>;
39
39
  body?: unknown;
40
+ /**
41
+ * On-behalf-of: a platform app token (`fbsfeaturetoken` / `x-app-feature-token`)
42
+ * identifying the end user this call runs for. Gate verifies it fail-closed and
43
+ * forwards the resolved user to the runtime as `X-Fusebase-Verified-User-*`
44
+ * headers; the calling identity still governs the operation's access policy.
45
+ */
46
+ onBehalfOfUserToken?: string;
40
47
  }
41
48
  export interface CallAppApiResponseContract {
42
49
  ok: boolean;
@@ -18,7 +18,7 @@ export * from "./mcp-manager/mcp-manager";
18
18
  export type { MeAuthContract, MeOrgGroupContract, MePreferencesContract, MeResponseContract, MeScopeContract, MeUserContract } from "./me/me";
19
19
  export * from "./note/note";
20
20
  export * from "./org-group/org-group";
21
- export type { ClientAccountScheduledDeletionRequestContract, ClientAccountScheduledDeletionResponseContract, CreateWorkspaceRequestContract, OrgInviteContract, OrgMagicLinkContract, OrgMemberRemoveResponseContract, OrgPortalContract, OrgPortalListResponseContract, OrgUserAddRequestContract, OrgUserAddResponseContract, OrgUserContract, OrgUserIdInPathRequired, OrgUserListResponseContract, OrgUserWorkspaceIdInPathRequired, OrgWorkspaceContract, OrgWorkspaceInviteContract, OrgWorkspaceListResponseContract, OrgWorkspaceMemberContract, OrgWorkspaceMemberListResponseContract, WorkspaceMemberRemoveResponseContract } from "./org-user/org-user";
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
24
  export type { AddPortalAppPageRequestContract, AddPortalAppPageResponseContract, AddPortalBlockRequestContract, AddPortalBlockResponseContract, AddPortalNoteBlockRequestContract, AddPortalNoteBlockResponseContract, BulkInviteResultItemContract, BulkInviteToPortalRequestContract, BulkInviteToPortalResponseContract, BulkPortalInvitationContract, CreatePortalFolderRequestContract, CreatePortalFolderResponseContract, CreatePortalPageWithNoteRequestContract, CreatePortalPageWithNoteResponseContract, CreatePortalRequestContract, CreatePortalResponseContract, DuplicatePortalItemRequestContract, DuplicatePortalItemResponseContract, DuplicatePortalRequestContract, InvitePortalManagerRequestContract, InvitePortalManagerResponseContract, InviteToPortalRequestContract, InviteToPortalResponseContract, ListPortalContentResponseContract, PortalContentItemContract, PortalDetailContract, PublishPortalDraftResponseContract, UpdatePortalAccessRequestContract, UpdatePortalAccessResponseContract, UpdatePortalCustomCodeRequestContract, UpdatePortalCustomCodeResponseContract, globalIdInPathRequired } from "./portals/portals";
@@ -146,6 +146,17 @@ export interface OrgUserAddResponseContract {
146
146
  workspaceMember?: OrgWorkspaceMemberContract;
147
147
  magicLink?: OrgMagicLinkContract;
148
148
  }
149
+ /**
150
+ * Optional CAS guard for removeOrgMember: the membership is only removed when
151
+ * its current org role still equals this value.
152
+ */
153
+ export type OrgMemberExpectedRoleInQueryOptional = string;
154
+ /**
155
+ * Optional provenance guard for removeOrgMember (unix timestamp in seconds):
156
+ * the membership is only removed when it was created at or after this moment,
157
+ * so cancelling an invite can never drop a pre-existing member.
158
+ */
159
+ export type OrgMemberExpectedJoinedAfterInQueryOptional = number;
149
160
  export interface OrgMemberRemoveResponseContract {
150
161
  ok: true;
151
162
  userId: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusebase/fusebase-gate-sdk",
3
- "version": "2.3.34-sdk.8",
3
+ "version": "2.3.34-sdk.9",
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.3.34-sdk.9
2
+
3
+ - Current ref: `HEAD`
4
+ - Previous tag: `v2.3.34-sdk.9`
5
+ - Generated at: 2026-07-23T15:54:33.520Z
6
+
7
+ ## Included Drafts
8
+
9
+ - None
@@ -1,8 +1,8 @@
1
- # Release Notes 2.3.34-sdk.8
1
+ # Release Notes 2.3.34-sdk.9
2
2
 
3
3
  - Current ref: `HEAD`
4
- - Previous tag: `v2.3.34-sdk.8`
5
- - Generated at: 2026-07-23T10:56:17.288Z
4
+ - Previous tag: `v2.3.34-sdk.9`
5
+ - Generated at: 2026-07-23T15:54:33.520Z
6
6
 
7
7
  ## Included Drafts
8
8
 
@@ -1,9 +0,0 @@
1
- # Release Notes 2.3.34-sdk.8
2
-
3
- - Current ref: `HEAD`
4
- - Previous tag: `v2.3.34-sdk.8`
5
- - Generated at: 2026-07-23T10:56:17.288Z
6
-
7
- ## Included Drafts
8
-
9
- - None