@fusebase/fusebase-gate-sdk 2.3.28-sdk.1 → 2.3.28-sdk.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apis/AppMagicLinksApi.d.ts +13 -1
- package/dist/apis/AppMagicLinksApi.js +15 -0
- package/dist/apis/PortalsApi.d.ts +12 -1
- package/dist/apis/PortalsApi.js +14 -0
- package/dist/types/app-magic-link/app-magic-link.d.ts +65 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/portals/portals.d.ts +16 -2
- package/package.json +1 -1
- package/release-notes/2.3.28-sdk.2.md +9 -0
- package/release-notes/latest.md +3 -3
- package/release-notes/2.3.28-sdk.1.md +0 -9
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Domain: app-magic-links
|
|
6
6
|
*/
|
|
7
7
|
import type { Client } from "../runtime/transport";
|
|
8
|
-
import type { ActivateAppMagicLinkResponseContract, CreateAppMagicLinkRequestContract, CreateAppMagicLinkResponseContract, orgIdInPathRequired, RequestAppMagicLinkRequestContract, RequestAppMagicLinkResponseContract } from "../types";
|
|
8
|
+
import type { ActivateAppMagicLinkResponseContract, BulkCreateAppMagicLinksRequestContract, BulkCreateAppMagicLinksResponseContract, CreateAppMagicLinkRequestContract, CreateAppMagicLinkResponseContract, orgIdInPathRequired, RequestAppMagicLinkRequestContract, RequestAppMagicLinkResponseContract } from "../types";
|
|
9
9
|
export declare class AppMagicLinksApi {
|
|
10
10
|
private client;
|
|
11
11
|
constructor(client: Client);
|
|
@@ -19,6 +19,18 @@ export declare class AppMagicLinksApi {
|
|
|
19
19
|
};
|
|
20
20
|
headers?: Record<string, string>;
|
|
21
21
|
}): Promise<ActivateAppMagicLinkResponseContract>;
|
|
22
|
+
/**
|
|
23
|
+
* Create app magic links for multiple users in one call
|
|
24
|
+
* Invites a batch of users to a single app in one request, replacing N sequential createAppMagicLink calls. Invites are processed with bounded concurrency (default 5, max 5); the rest are queued. With background=false (default) the response waits for all invites and returns aggregated per-invitation results (status='completed'). With background=true the response returns immediately (status='processing') and invites run in the background without blocking the caller. Per-invitation redirectPath/addToAccessPrincipals semantics match createAppMagicLink; a single failed invitee never aborts the batch. Requires app_magic_link.write and org access.
|
|
25
|
+
*/
|
|
26
|
+
bulkCreateAppMagicLinks(params: {
|
|
27
|
+
path: {
|
|
28
|
+
orgId: orgIdInPathRequired;
|
|
29
|
+
appId: string;
|
|
30
|
+
};
|
|
31
|
+
headers?: Record<string, string>;
|
|
32
|
+
body: BulkCreateAppMagicLinksRequestContract;
|
|
33
|
+
}): Promise<BulkCreateAppMagicLinksResponseContract>;
|
|
22
34
|
/**
|
|
23
35
|
* Create an app magic link (invite flow)
|
|
24
36
|
* Owner/admin invite flow. Issues a 24h magic link for the recipient email and dispatches it via the magic_link_app email template. When addToAccessPrincipals is true (default), provisions a brand-new user record if needed and appends a user principal to every feature of the app. Requires app_magic_link.write and org access.
|
|
@@ -25,6 +25,21 @@ class AppMagicLinksApi {
|
|
|
25
25
|
expectedContentType: "application/json",
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Create app magic links for multiple users in one call
|
|
30
|
+
* Invites a batch of users to a single app in one request, replacing N sequential createAppMagicLink calls. Invites are processed with bounded concurrency (default 5, max 5); the rest are queued. With background=false (default) the response waits for all invites and returns aggregated per-invitation results (status='completed'). With background=true the response returns immediately (status='processing') and invites run in the background without blocking the caller. Per-invitation redirectPath/addToAccessPrincipals semantics match createAppMagicLink; a single failed invitee never aborts the batch. Requires app_magic_link.write and org access.
|
|
31
|
+
*/
|
|
32
|
+
async bulkCreateAppMagicLinks(params) {
|
|
33
|
+
return this.client.request({
|
|
34
|
+
method: "POST",
|
|
35
|
+
path: "/:orgId/apps/:appId/magic-links/bulk",
|
|
36
|
+
pathParams: params.path,
|
|
37
|
+
headers: params.headers,
|
|
38
|
+
body: params.body,
|
|
39
|
+
opId: "bulkCreateAppMagicLinks",
|
|
40
|
+
expectedContentType: "application/json",
|
|
41
|
+
});
|
|
42
|
+
}
|
|
28
43
|
/**
|
|
29
44
|
* Create an app magic link (invite flow)
|
|
30
45
|
* Owner/admin invite flow. Issues a 24h magic link for the recipient email and dispatches it via the magic_link_app email template. When addToAccessPrincipals is true (default), provisions a brand-new user record if needed and appends a user principal to every feature of the app. Requires app_magic_link.write and org access.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Domain: portals
|
|
6
6
|
*/
|
|
7
7
|
import type { Client } from "../runtime/transport";
|
|
8
|
-
import type { AddPortalAppPageRequestContract, AddPortalAppPageResponseContract, AddPortalBlockRequestContract, AddPortalBlockResponseContract, AddPortalNoteBlockRequestContract, AddPortalNoteBlockResponseContract, BulkInviteToPortalRequestContract, BulkInviteToPortalResponseContract, CreatePortalFolderRequestContract, CreatePortalFolderResponseContract, CreatePortalPageWithNoteRequestContract, CreatePortalPageWithNoteResponseContract, CreatePortalRequestContract, CreatePortalResponseContract, DuplicatePortalItemRequestContract, DuplicatePortalItemResponseContract, DuplicatePortalRequestContract, globalIdInPathRequired, InvitePortalManagerRequestContract, InvitePortalManagerResponseContract, InviteToPortalRequestContract, InviteToPortalResponseContract, ListPortalContentResponseContract, orgIdInPathRequired, OrgPortalListResponseContract, PortalDetailContract, UpdatePortalAccessRequestContract, UpdatePortalAccessResponseContract, UpdatePortalCustomCodeRequestContract, UpdatePortalCustomCodeResponseContract } from "../types";
|
|
8
|
+
import type { AddPortalAppPageRequestContract, AddPortalAppPageResponseContract, AddPortalBlockRequestContract, AddPortalBlockResponseContract, AddPortalNoteBlockRequestContract, AddPortalNoteBlockResponseContract, BulkInviteToPortalRequestContract, BulkInviteToPortalResponseContract, CreatePortalFolderRequestContract, CreatePortalFolderResponseContract, CreatePortalPageWithNoteRequestContract, CreatePortalPageWithNoteResponseContract, CreatePortalRequestContract, CreatePortalResponseContract, DuplicatePortalItemRequestContract, DuplicatePortalItemResponseContract, DuplicatePortalRequestContract, globalIdInPathRequired, InvitePortalManagerRequestContract, InvitePortalManagerResponseContract, InviteToPortalRequestContract, InviteToPortalResponseContract, ListPortalContentResponseContract, orgIdInPathRequired, OrgPortalListResponseContract, PortalDetailContract, PublishPortalDraftResponseContract, UpdatePortalAccessRequestContract, UpdatePortalAccessResponseContract, UpdatePortalCustomCodeRequestContract, UpdatePortalCustomCodeResponseContract } from "../types";
|
|
9
9
|
export declare class PortalsApi {
|
|
10
10
|
private client;
|
|
11
11
|
constructor(client: Client);
|
|
@@ -173,6 +173,17 @@ export declare class PortalsApi {
|
|
|
173
173
|
};
|
|
174
174
|
headers?: Record<string, string>;
|
|
175
175
|
}): Promise<OrgPortalListResponseContract>;
|
|
176
|
+
/**
|
|
177
|
+
* Publish a portal's staged draft
|
|
178
|
+
* Publishes all staged changes in the portal's customizer draft to the live portal, applying them through the same content pipeline the customizer's Publish button uses. Use this to make an agent's previously staged content/settings ops (folders, pages, blocks, access mode, custom code) visible to clients without opening the customizer. Returns 400 if the draft is empty and 409 if the portal was published elsewhere since the draft was based (refresh the draft first). Requires portals.write access.
|
|
179
|
+
*/
|
|
180
|
+
publishPortalDraft(params: {
|
|
181
|
+
path: {
|
|
182
|
+
orgId: orgIdInPathRequired;
|
|
183
|
+
portalId: globalIdInPathRequired;
|
|
184
|
+
};
|
|
185
|
+
headers?: Record<string, string>;
|
|
186
|
+
}): Promise<PublishPortalDraftResponseContract>;
|
|
176
187
|
/**
|
|
177
188
|
* Update portal access mode
|
|
178
189
|
* Sets the portal access mode: 'open' (anyone), 'invite-only' (invited users only), 'email' (visitor enters an email, no verification), or 'email-verified' (email with confirmation). The change is staged in the portal's customizer draft (not published immediately): the portal owner opens the customizer, reviews the pending change, and publishes it. Returns the staged access mode and the draft branch/seq. Requires portals.write access.
|
package/dist/apis/PortalsApi.js
CHANGED
|
@@ -218,6 +218,20 @@ class PortalsApi {
|
|
|
218
218
|
expectedContentType: "application/json",
|
|
219
219
|
});
|
|
220
220
|
}
|
|
221
|
+
/**
|
|
222
|
+
* Publish a portal's staged draft
|
|
223
|
+
* Publishes all staged changes in the portal's customizer draft to the live portal, applying them through the same content pipeline the customizer's Publish button uses. Use this to make an agent's previously staged content/settings ops (folders, pages, blocks, access mode, custom code) visible to clients without opening the customizer. Returns 400 if the draft is empty and 409 if the portal was published elsewhere since the draft was based (refresh the draft first). Requires portals.write access.
|
|
224
|
+
*/
|
|
225
|
+
async publishPortalDraft(params) {
|
|
226
|
+
return this.client.request({
|
|
227
|
+
method: "POST",
|
|
228
|
+
path: "/:orgId/portals/:portalId/publish",
|
|
229
|
+
pathParams: params.path,
|
|
230
|
+
headers: params.headers,
|
|
231
|
+
opId: "publishPortalDraft",
|
|
232
|
+
expectedContentType: "application/json",
|
|
233
|
+
});
|
|
234
|
+
}
|
|
221
235
|
/**
|
|
222
236
|
* Update portal access mode
|
|
223
237
|
* Sets the portal access mode: 'open' (anyone), 'invite-only' (invited users only), 'email' (visitor enters an email, no verification), or 'email-verified' (email with confirmation). The change is staged in the portal's customizer draft (not published immediately): the portal owner opens the customizer, reviews the pending change, and publishes it. Returns the staged access mode and the draft branch/seq. Requires portals.write access.
|
|
@@ -104,3 +104,68 @@ export interface ActivateAppMagicLinkResponseContract {
|
|
|
104
104
|
*/
|
|
105
105
|
appFeatureId: string;
|
|
106
106
|
}
|
|
107
|
+
/** A single invitee in a bulk app magic-link request. */
|
|
108
|
+
export interface BulkAppMagicLinkInvitationContract {
|
|
109
|
+
/**
|
|
110
|
+
* Recipient email address. The link is dispatched to this address.
|
|
111
|
+
* @format email
|
|
112
|
+
*/
|
|
113
|
+
email: string;
|
|
114
|
+
/**
|
|
115
|
+
* Relative app path to land on after activation (e.g. /proposals/abc).
|
|
116
|
+
* Omit for root.
|
|
117
|
+
* @nullable true
|
|
118
|
+
*/
|
|
119
|
+
redirectPath?: string | null;
|
|
120
|
+
/**
|
|
121
|
+
* When true (default), append a user principal to every feature of the app
|
|
122
|
+
* and provision a new user record if the email is not yet known.
|
|
123
|
+
* When false, the user must already exist or the invite fails with NotFound.
|
|
124
|
+
*/
|
|
125
|
+
addToAccessPrincipals?: boolean;
|
|
126
|
+
}
|
|
127
|
+
export interface BulkCreateAppMagicLinksRequestContract {
|
|
128
|
+
/** Users to invite to the app in a single call. */
|
|
129
|
+
invitations: BulkAppMagicLinkInvitationContract[];
|
|
130
|
+
/**
|
|
131
|
+
* Max number of invites processed in parallel.
|
|
132
|
+
* Default 5, clamped to the 1..5 range; the rest are queued.
|
|
133
|
+
*/
|
|
134
|
+
concurrency?: number;
|
|
135
|
+
/**
|
|
136
|
+
* When true, respond immediately ("processing") and run the invites in the
|
|
137
|
+
* background without blocking the caller. Default false: wait for all
|
|
138
|
+
* invites and return aggregated per-invitation results ("completed").
|
|
139
|
+
*/
|
|
140
|
+
background?: boolean;
|
|
141
|
+
}
|
|
142
|
+
/** Per-invitation outcome in a completed bulk app magic-link request. */
|
|
143
|
+
export interface BulkAppMagicLinkResultItemContract {
|
|
144
|
+
email: string;
|
|
145
|
+
status: "success" | "error";
|
|
146
|
+
/** Present on success. globalId of the magic link row. */
|
|
147
|
+
id?: string;
|
|
148
|
+
/** Present on success. Fully qualified magic link URL. */
|
|
149
|
+
magicLinkUrl?: string;
|
|
150
|
+
/** Present on success. Unix timestamp (seconds) when the link expires. */
|
|
151
|
+
expiresAt?: number;
|
|
152
|
+
/** Present on error. Failure reason. */
|
|
153
|
+
error?: string;
|
|
154
|
+
}
|
|
155
|
+
export interface BulkCreateAppMagicLinksResponseContract {
|
|
156
|
+
/** Total number of invitations received. */
|
|
157
|
+
total: number;
|
|
158
|
+
/**
|
|
159
|
+
* "completed" — invites finished synchronously, `results` is populated.
|
|
160
|
+
* "processing" — invites accepted and running in the background.
|
|
161
|
+
*/
|
|
162
|
+
status: "completed" | "processing";
|
|
163
|
+
/** Background mode only: number of invitations accepted for processing. */
|
|
164
|
+
accepted?: number;
|
|
165
|
+
/** Completed mode only: count of successful invites. */
|
|
166
|
+
succeeded?: number;
|
|
167
|
+
/** Completed mode only: count of failed invites. */
|
|
168
|
+
failed?: number;
|
|
169
|
+
/** Completed mode only: per-invitation results, in request order. */
|
|
170
|
+
results?: BulkAppMagicLinkResultItemContract[];
|
|
171
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
export type { AuthenticatedUserSummaryContract, MyOrgAccessResponseContract } from "./access/access";
|
|
8
8
|
export type { AppApiOperationContract, AppApiOperationListResponseContract, CallAppApiRequestContract, CallAppApiResponseContract, PublishedAppContract, PublishedAppListResponseContract, VerifyAppApiContractsRequestContract, VerifyAppApiContractsResponseContract, VerifyCaseResultContract } from "./app-api/app-api";
|
|
9
9
|
export type { AppPortalEmbedContract, ListAppPortalEmbedsResponseContract } from "./app-embed-targets/app-embed-targets";
|
|
10
|
-
export type { ActivateAppMagicLinkResponseContract, CreateAppMagicLinkRequestContract, CreateAppMagicLinkResponseContract, RequestAppMagicLinkRequestContract, RequestAppMagicLinkResponseContract } from "./app-magic-link/app-magic-link";
|
|
10
|
+
export type { ActivateAppMagicLinkResponseContract, BulkAppMagicLinkInvitationContract, BulkAppMagicLinkResultItemContract, BulkCreateAppMagicLinksRequestContract, BulkCreateAppMagicLinksResponseContract, CreateAppMagicLinkRequestContract, CreateAppMagicLinkResponseContract, RequestAppMagicLinkRequestContract, RequestAppMagicLinkResponseContract } from "./app-magic-link/app-magic-link";
|
|
11
11
|
export * from "./billing/billing";
|
|
12
12
|
export type { OrgEmailSendRequestContract, OrgEmailSendResponseContract } from "./email/email";
|
|
13
13
|
export * from "./file/file";
|
|
@@ -20,7 +20,7 @@ export * from "./org-group/org-group";
|
|
|
20
20
|
export type { ClientAccountScheduledDeletionRequestContract, ClientAccountScheduledDeletionResponseContract, CreateWorkspaceRequestContract, OrgInviteContract, OrgMagicLinkContract, OrgMemberRemoveResponseContract, OrgPortalContract, OrgPortalListResponseContract, OrgUserAddRequestContract, OrgUserAddResponseContract, OrgUserContract, OrgUserIdInPathRequired, OrgUserListResponseContract, OrgUserWorkspaceIdInPathRequired, OrgWorkspaceContract, OrgWorkspaceInviteContract, OrgWorkspaceListResponseContract, OrgWorkspaceMemberContract, WorkspaceMemberRemoveResponseContract } from "./org-user/org-user";
|
|
21
21
|
export * from "./orgs/orgs";
|
|
22
22
|
export type { VerifyPortalFeatureContextTokenRequestContract, VerifyPortalFeatureContextTokenResponseContract } from "./portal-feature-context/portal-feature-context";
|
|
23
|
-
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, UpdatePortalAccessRequestContract, UpdatePortalAccessResponseContract, UpdatePortalCustomCodeRequestContract, UpdatePortalCustomCodeResponseContract, globalIdInPathRequired } from "./portals/portals";
|
|
23
|
+
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";
|
|
24
24
|
export * from "./shared/common";
|
|
25
25
|
export * from "./shared/enums";
|
|
26
26
|
export type { GetHealth200ResponseContract } from "./shared/health";
|
|
@@ -72,6 +72,18 @@ export interface CreatePortalFolderResponseContract {
|
|
|
72
72
|
*/
|
|
73
73
|
staged: boolean;
|
|
74
74
|
}
|
|
75
|
+
export interface PublishPortalDraftResponseContract {
|
|
76
|
+
/** Id of the draft branch that was published (now archived). */
|
|
77
|
+
branchId: string;
|
|
78
|
+
/** Id of the fresh empty draft branch that replaced it. */
|
|
79
|
+
newBranchId: string;
|
|
80
|
+
/** Number of change events applied to the published portal. */
|
|
81
|
+
appliedEventCount: number;
|
|
82
|
+
/** Unix timestamp of the publish. */
|
|
83
|
+
lastPublishedAt: number;
|
|
84
|
+
/** Always true: the staged draft is now live on the portal. */
|
|
85
|
+
published: boolean;
|
|
86
|
+
}
|
|
75
87
|
export interface CreatePortalPageWithNoteRequestContract {
|
|
76
88
|
/** Title for the new page (also used as the backing Fusebase note title). */
|
|
77
89
|
title: string;
|
|
@@ -152,11 +164,13 @@ export interface AddPortalBlockRequestContract {
|
|
|
152
164
|
/** Optional bricks for `flexible` blocks. */
|
|
153
165
|
bricks?: unknown[];
|
|
154
166
|
/**
|
|
155
|
-
* Optional type-specific fields
|
|
167
|
+
* Optional type-specific fields for the staged block, e.g. flat strings
|
|
156
168
|
* `embedType`/`content`/`contentUrl` for embed, `image`/`link` for info,
|
|
157
169
|
* `sourcePortalId`/`sourcePageId`/`sourceBlockId` for projection,
|
|
158
170
|
* `taskListIds` for task-list. Also overrides scaffold defaults (colspan,
|
|
159
|
-
* rowspan, …) when provided.
|
|
171
|
+
* rowspan, …) when provided. Every field is validated against the block's
|
|
172
|
+
* real customizer shape — an unknown field or a wrong-typed value (e.g. an
|
|
173
|
+
* object where a flat string is expected) is rejected with 400.
|
|
160
174
|
*/
|
|
161
175
|
properties?: Record<string, unknown>;
|
|
162
176
|
}
|
package/package.json
CHANGED
package/release-notes/latest.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Release Notes 2.3.28-sdk.
|
|
1
|
+
# Release Notes 2.3.28-sdk.2
|
|
2
2
|
|
|
3
3
|
- Current ref: `HEAD`
|
|
4
|
-
- Previous tag: `v2.3.28-sdk.
|
|
5
|
-
- Generated at: 2026-07-
|
|
4
|
+
- Previous tag: `v2.3.28-sdk.2`
|
|
5
|
+
- Generated at: 2026-07-08T14:24:51.573Z
|
|
6
6
|
|
|
7
7
|
## Included Drafts
|
|
8
8
|
|