@fusebase/fusebase-gate-sdk 2.3.34-sdk.3 → 2.3.34-sdk.4
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 +25 -1
- package/dist/apis/AppMagicLinksApi.js +30 -0
- package/dist/apis/FusebaseAuthApi.d.ts +13 -2
- package/dist/apis/FusebaseAuthApi.js +16 -1
- package/dist/types/app-access-principal/app-access-principal.d.ts +28 -0
- package/dist/types/app-access-principal/app-access-principal.js +2 -0
- package/dist/types/app-magic-link/app-magic-link.d.ts +41 -0
- package/dist/types/email/email.d.ts +5 -10
- package/dist/types/fusebase-auth/fusebase-auth.d.ts +31 -0
- package/dist/types/index.d.ts +2 -1
- package/package.json +1 -1
- package/release-notes/2.3.34-sdk.3.md +2 -2
- package/release-notes/2.3.34-sdk.4.md +82 -0
- package/release-notes/latest.md +77 -4
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Domain: app-magic-links
|
|
6
6
|
*/
|
|
7
7
|
import type { Client } from "../runtime/transport";
|
|
8
|
-
import type { ActivateAppMagicLinkResponseContract, BulkCreateAppMagicLinksRequestContract, BulkCreateAppMagicLinksResponseContract, CreateAppMagicLinkRequestContract, CreateAppMagicLinkResponseContract, ListAppMagicLinksResponseContract, orgIdInPathRequired, RequestAppMagicLinkRequestContract, RequestAppMagicLinkResponseContract, RevokeAppMagicLinkResponseContract } from "../types";
|
|
8
|
+
import type { ActivateAppMagicLinkResponseContract, BulkCreateAppMagicLinksRequestContract, BulkCreateAppMagicLinksResponseContract, CreateAppMagicLinkRequestContract, CreateAppMagicLinkResponseContract, ListAppMagicLinksResponseContract, orgIdInPathRequired, RemoveAppAccessPrincipalRequestContract, RemoveAppAccessPrincipalResponseContract, RequestAppMagicLinkRequestContract, RequestAppMagicLinkResponseContract, RevokeAppMagicLinkResponseContract } from "../types";
|
|
9
9
|
export declare class AppMagicLinksApi {
|
|
10
10
|
private client;
|
|
11
11
|
constructor(client: Client);
|
|
@@ -57,6 +57,18 @@ export declare class AppMagicLinksApi {
|
|
|
57
57
|
};
|
|
58
58
|
headers?: Record<string, string>;
|
|
59
59
|
}): Promise<ListAppMagicLinksResponseContract>;
|
|
60
|
+
/**
|
|
61
|
+
* Remove an app access principal
|
|
62
|
+
* Owner/admin flow. Removes an access principal from every feature (App) of the product — the symmetric inverse of the invite grant that appends a principal to every feature. appId is the Product id. Idempotent: removing a principal that is not present returns removed=false. Returns 404 when the product has no apps. Requires app_magic_link.write and org access.
|
|
63
|
+
*/
|
|
64
|
+
removeAppAccessPrincipal(params: {
|
|
65
|
+
path: {
|
|
66
|
+
orgId: orgIdInPathRequired;
|
|
67
|
+
appId: string;
|
|
68
|
+
};
|
|
69
|
+
headers?: Record<string, string>;
|
|
70
|
+
body: RemoveAppAccessPrincipalRequestContract;
|
|
71
|
+
}): Promise<RemoveAppAccessPrincipalResponseContract>;
|
|
60
72
|
/**
|
|
61
73
|
* Request an app magic link (visitor self-service flow)
|
|
62
74
|
* Unauthenticated visitor flow. The link is dispatched only when the email already has access to the app under its current accessPrincipals; otherwise the call is a no-op. Always returns 200 with `{ ok: true }` so the response cannot be used to enumerate emails or access. Apply per-IP rate limiting upstream of this call.
|
|
@@ -68,6 +80,18 @@ export declare class AppMagicLinksApi {
|
|
|
68
80
|
headers?: Record<string, string>;
|
|
69
81
|
body: RequestAppMagicLinkRequestContract;
|
|
70
82
|
}): Promise<RequestAppMagicLinkResponseContract>;
|
|
83
|
+
/**
|
|
84
|
+
* Create an app magic link without sending the platform email
|
|
85
|
+
* No-email sibling of createAppMagicLink. Same input/output and side effects (user provisioning, principal + org-member grants), but the platform does NOT send the magic_link_app email — the response carries magicLinkUrl so a white-label app can deliver its own branded email. Requires app_magic_link.write and org access. appId is the Product id.
|
|
86
|
+
*/
|
|
87
|
+
requestAppMagicLinkURL(params: {
|
|
88
|
+
path: {
|
|
89
|
+
orgId: orgIdInPathRequired;
|
|
90
|
+
appId: string;
|
|
91
|
+
};
|
|
92
|
+
headers?: Record<string, string>;
|
|
93
|
+
body: CreateAppMagicLinkRequestContract;
|
|
94
|
+
}): Promise<CreateAppMagicLinkResponseContract>;
|
|
71
95
|
/**
|
|
72
96
|
* Revoke an app magic link
|
|
73
97
|
* Owner/admin revoke flow. Soft-deletes the magic link identified by globalId so it can no longer be activated (activation then returns 404) and the recipient email can be invited again — the fix for orphaned invites that block re-invites for 24h. Returns 404 when the link does not exist under the org/app on the path or is already revoked. Requires app_magic_link.write and org access. appId is the Product id.
|
|
@@ -70,6 +70,21 @@ class AppMagicLinksApi {
|
|
|
70
70
|
expectedContentType: "application/json",
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Remove an app access principal
|
|
75
|
+
* Owner/admin flow. Removes an access principal from every feature (App) of the product — the symmetric inverse of the invite grant that appends a principal to every feature. appId is the Product id. Idempotent: removing a principal that is not present returns removed=false. Returns 404 when the product has no apps. Requires app_magic_link.write and org access.
|
|
76
|
+
*/
|
|
77
|
+
async removeAppAccessPrincipal(params) {
|
|
78
|
+
return this.client.request({
|
|
79
|
+
method: "POST",
|
|
80
|
+
path: "/:orgId/apps/:appId/access-principals/remove",
|
|
81
|
+
pathParams: params.path,
|
|
82
|
+
headers: params.headers,
|
|
83
|
+
body: params.body,
|
|
84
|
+
opId: "removeAppAccessPrincipal",
|
|
85
|
+
expectedContentType: "application/json",
|
|
86
|
+
});
|
|
87
|
+
}
|
|
73
88
|
/**
|
|
74
89
|
* Request an app magic link (visitor self-service flow)
|
|
75
90
|
* Unauthenticated visitor flow. The link is dispatched only when the email already has access to the app under its current accessPrincipals; otherwise the call is a no-op. Always returns 200 with `{ ok: true }` so the response cannot be used to enumerate emails or access. Apply per-IP rate limiting upstream of this call.
|
|
@@ -85,6 +100,21 @@ class AppMagicLinksApi {
|
|
|
85
100
|
expectedContentType: "application/json",
|
|
86
101
|
});
|
|
87
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* Create an app magic link without sending the platform email
|
|
105
|
+
* No-email sibling of createAppMagicLink. Same input/output and side effects (user provisioning, principal + org-member grants), but the platform does NOT send the magic_link_app email — the response carries magicLinkUrl so a white-label app can deliver its own branded email. Requires app_magic_link.write and org access. appId is the Product id.
|
|
106
|
+
*/
|
|
107
|
+
async requestAppMagicLinkURL(params) {
|
|
108
|
+
return this.client.request({
|
|
109
|
+
method: "POST",
|
|
110
|
+
path: "/:orgId/apps/:appId/magic-link-url",
|
|
111
|
+
pathParams: params.path,
|
|
112
|
+
headers: params.headers,
|
|
113
|
+
body: params.body,
|
|
114
|
+
opId: "requestAppMagicLinkURL",
|
|
115
|
+
expectedContentType: "application/json",
|
|
116
|
+
});
|
|
117
|
+
}
|
|
88
118
|
/**
|
|
89
119
|
* Revoke an app magic link
|
|
90
120
|
* Owner/admin revoke flow. Soft-deletes the magic link identified by globalId so it can no longer be activated (activation then returns 404) and the recipient email can be invited again — the fix for orphaned invites that block re-invites for 24h. Returns 404 when the link does not exist under the org/app on the path or is already revoked. Requires app_magic_link.write and org access. appId is the Product id.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Domain: fusebase-auth
|
|
6
6
|
*/
|
|
7
7
|
import type { Client } from "../runtime/transport";
|
|
8
|
-
import type { FusebaseAuthChallengeRequestContract, FusebaseAuthChallengeResponseContract, FusebaseAuthLoginRequestContract, FusebaseAuthLoginResponseContract, FusebaseAuthLogoutResponseContract, FusebaseAuthPasswordResetRequestContract, FusebaseAuthPasswordResetResponseContract, FusebaseAuthPasswordRestoreKeyResponseContract, FusebaseAuthPasswordRestoreRequestContract, FusebaseAuthPasswordRestoreResponseContract, FusebaseAuthRegisterMemberRequestContract, FusebaseAuthRegisterMemberResponseContract, FusebaseAuthRegisterRequestContract, FusebaseAuthRegisterResponseContract, orgIdInPathRequired } from "../types";
|
|
8
|
+
import type { FusebaseAuthChallengeRequestContract, FusebaseAuthChallengeResponseContract, FusebaseAuthLoginRequestContract, FusebaseAuthLoginResponseContract, FusebaseAuthLogoutResponseContract, FusebaseAuthPasswordResetRequestContract, FusebaseAuthPasswordResetResponseContract, FusebaseAuthPasswordRestoreKeyResponseContract, FusebaseAuthPasswordRestoreRequestContract, FusebaseAuthPasswordRestoreResponseContract, FusebaseAuthRegisterMemberRequestContract, FusebaseAuthRegisterMemberResponseContract, FusebaseAuthRegisterRequestContract, FusebaseAuthRegisterResponseContract, FusebaseAuthRestoreKeyRequestContract, FusebaseAuthRestoreKeyResponseContract, orgIdInPathRequired } from "../types";
|
|
9
9
|
export declare class FusebaseAuthApi {
|
|
10
10
|
private client;
|
|
11
11
|
constructor(client: Client);
|
|
@@ -63,12 +63,23 @@ export declare class FusebaseAuthApi {
|
|
|
63
63
|
}): Promise<FusebaseAuthRegisterResponseContract>;
|
|
64
64
|
/**
|
|
65
65
|
* Request Fusebase password restore
|
|
66
|
-
* Visitor-safe password restore request. Forwards to auth-form `/auth/api/remind` and always returns a generic success shape so the route does not enumerate accounts.
|
|
66
|
+
* Visitor-safe password restore request. Forwards to auth-form `/auth/api/remind` and always returns a generic success shape so the route does not enumerate accounts. The email link is `${customAuthUrl}/resetpass?key=<key>` (platform appends `/resetpass` and puts the key in query param `key`). When both `portalId` and `workspaceId` are set, user-service applies portal white-label branding (overrides `customAuthUrl` to the portal domain and uses the `restore_portal_password` template).
|
|
67
67
|
*/
|
|
68
68
|
requestFusebasePasswordRestore(params: {
|
|
69
69
|
headers?: Record<string, string>;
|
|
70
70
|
body: FusebaseAuthPasswordRestoreRequestContract;
|
|
71
71
|
}): Promise<FusebaseAuthPasswordRestoreResponseContract>;
|
|
72
|
+
/**
|
|
73
|
+
* Mint a Fusebase password-restore key (no email)
|
|
74
|
+
* Protected white-label flow. Creates a password-restore session for the email through user-service WITHOUT sending the platform email, and returns the raw key so a trusted AI App backend can send its own branded reset mail. The key passes `checkFusebasePasswordRestoreKey` / `resetFusebasePassword` with the same TTL and one-time-use as the email flow. `resetUrl` is `${customAuthUrl}/resetpass?key=<key>` when `customAuthUrl` is provided. Requires `auth.restore_key.write` and org access (same trust level as `registerFusebaseOrgMember`/`addOrgUser`); visitor/anonymous callers get 403. A key resets the target's GLOBAL FuseBase password, so it is only minted when the path `orgId` is the user's ONLY organization — a user with any footprint elsewhere (another org, or a private org from self-registration) is an independent account the app must not hijack, even if it was just added to this org. Otherwise 404 (also for unknown emails, so it does not leak global account existence). Unlike `requestFusebasePasswordRestore` this is NOT visitor-safe — it exposes the key.
|
|
75
|
+
*/
|
|
76
|
+
requestFusebaseRestoreKey(params: {
|
|
77
|
+
path: {
|
|
78
|
+
orgId: orgIdInPathRequired;
|
|
79
|
+
};
|
|
80
|
+
headers?: Record<string, string>;
|
|
81
|
+
body: FusebaseAuthRestoreKeyRequestContract;
|
|
82
|
+
}): Promise<FusebaseAuthRestoreKeyResponseContract>;
|
|
72
83
|
/**
|
|
73
84
|
* Reset Fusebase password
|
|
74
85
|
* Completes a password restore session by setting a new password through user-service.
|
|
@@ -97,7 +97,7 @@ class FusebaseAuthApi {
|
|
|
97
97
|
}
|
|
98
98
|
/**
|
|
99
99
|
* Request Fusebase password restore
|
|
100
|
-
* Visitor-safe password restore request. Forwards to auth-form `/auth/api/remind` and always returns a generic success shape so the route does not enumerate accounts.
|
|
100
|
+
* Visitor-safe password restore request. Forwards to auth-form `/auth/api/remind` and always returns a generic success shape so the route does not enumerate accounts. The email link is `${customAuthUrl}/resetpass?key=<key>` (platform appends `/resetpass` and puts the key in query param `key`). When both `portalId` and `workspaceId` are set, user-service applies portal white-label branding (overrides `customAuthUrl` to the portal domain and uses the `restore_portal_password` template).
|
|
101
101
|
*/
|
|
102
102
|
async requestFusebasePasswordRestore(params) {
|
|
103
103
|
return this.client.request({
|
|
@@ -109,6 +109,21 @@ class FusebaseAuthApi {
|
|
|
109
109
|
expectedContentType: "application/json",
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
+
/**
|
|
113
|
+
* Mint a Fusebase password-restore key (no email)
|
|
114
|
+
* Protected white-label flow. Creates a password-restore session for the email through user-service WITHOUT sending the platform email, and returns the raw key so a trusted AI App backend can send its own branded reset mail. The key passes `checkFusebasePasswordRestoreKey` / `resetFusebasePassword` with the same TTL and one-time-use as the email flow. `resetUrl` is `${customAuthUrl}/resetpass?key=<key>` when `customAuthUrl` is provided. Requires `auth.restore_key.write` and org access (same trust level as `registerFusebaseOrgMember`/`addOrgUser`); visitor/anonymous callers get 403. A key resets the target's GLOBAL FuseBase password, so it is only minted when the path `orgId` is the user's ONLY organization — a user with any footprint elsewhere (another org, or a private org from self-registration) is an independent account the app must not hijack, even if it was just added to this org. Otherwise 404 (also for unknown emails, so it does not leak global account existence). Unlike `requestFusebasePasswordRestore` this is NOT visitor-safe — it exposes the key.
|
|
115
|
+
*/
|
|
116
|
+
async requestFusebaseRestoreKey(params) {
|
|
117
|
+
return this.client.request({
|
|
118
|
+
method: "POST",
|
|
119
|
+
path: "/:orgId/auth/fusebase/restore-key",
|
|
120
|
+
pathParams: params.path,
|
|
121
|
+
headers: params.headers,
|
|
122
|
+
body: params.body,
|
|
123
|
+
opId: "requestFusebaseRestoreKey",
|
|
124
|
+
expectedContentType: "application/json",
|
|
125
|
+
});
|
|
126
|
+
}
|
|
112
127
|
/**
|
|
113
128
|
* Reset Fusebase password
|
|
114
129
|
* Completes a password restore session by setting a new password through user-service.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An access principal on an AI App's features. Mirrors nimbus-ai's
|
|
3
|
+
* `AppAccessPrincipal` (`type` + `id`). `id` is required for
|
|
4
|
+
* user/orgRole/orgGroup and optional (ignored) for visitor.
|
|
5
|
+
*/
|
|
6
|
+
export interface AppAccessPrincipalContract {
|
|
7
|
+
type: "user" | "orgRole" | "orgGroup" | "visitor";
|
|
8
|
+
/**
|
|
9
|
+
* Principal id: the user id, org role name, or org group id. Optional for
|
|
10
|
+
* visitor.
|
|
11
|
+
* @nullable true
|
|
12
|
+
*/
|
|
13
|
+
id?: string | null;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Request body for removeAppAccessPrincipal. The principal to strip from every
|
|
17
|
+
* feature (App) of the product.
|
|
18
|
+
*/
|
|
19
|
+
export type RemoveAppAccessPrincipalRequestContract = AppAccessPrincipalContract;
|
|
20
|
+
/**
|
|
21
|
+
* Response body for removeAppAccessPrincipal.
|
|
22
|
+
*/
|
|
23
|
+
export interface RemoveAppAccessPrincipalResponseContract {
|
|
24
|
+
/** True when the principal was present on at least one App and removed. */
|
|
25
|
+
removed: boolean;
|
|
26
|
+
/** Number of Apps (features) the principal was removed from. */
|
|
27
|
+
appsAffected: number;
|
|
28
|
+
}
|
|
@@ -19,6 +19,22 @@ export interface CreateAppMagicLinkRequestContract {
|
|
|
19
19
|
* When false, the user must already exist or the call rejects with NotFound.
|
|
20
20
|
*/
|
|
21
21
|
addToAccessPrincipals?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Opaque app payload (not interpreted by the platform) stored on the link and
|
|
24
|
+
* echoed back byte-for-byte at activation. Use it to bind the link to an
|
|
25
|
+
* app-side entity (e.g. an invitation id) instead of overloading redirectPath.
|
|
26
|
+
* @maxLength 4096
|
|
27
|
+
* @nullable true
|
|
28
|
+
*/
|
|
29
|
+
meta?: string | null;
|
|
30
|
+
/**
|
|
31
|
+
* Optional child App (feature) globalId the link should target, so a
|
|
32
|
+
* multi-app product can route sign-in per app. The email URL and activation
|
|
33
|
+
* tokens are scoped to this App's host. Omit to fall back to the product's
|
|
34
|
+
* first App (no behavior change).
|
|
35
|
+
* @nullable true
|
|
36
|
+
*/
|
|
37
|
+
appFeatureId?: string | null;
|
|
22
38
|
}
|
|
23
39
|
/**
|
|
24
40
|
* Response body for createAppMagicLink.
|
|
@@ -121,6 +137,12 @@ export interface ActivateAppMagicLinkResponseContract {
|
|
|
121
137
|
* globalId of the resolved app feature whose access the tokens are scoped to.
|
|
122
138
|
*/
|
|
123
139
|
appFeatureId: string;
|
|
140
|
+
/**
|
|
141
|
+
* Opaque app payload supplied when the link was created, echoed back
|
|
142
|
+
* byte-for-byte. Null for links created without `meta` (backward compatible).
|
|
143
|
+
* @nullable true
|
|
144
|
+
*/
|
|
145
|
+
meta?: string | null;
|
|
124
146
|
}
|
|
125
147
|
/**
|
|
126
148
|
* Response body for revokeAppMagicLink.
|
|
@@ -174,6 +196,11 @@ export interface AppMagicLinkSummaryContract {
|
|
|
174
196
|
usedAt?: number | null;
|
|
175
197
|
/** Unix timestamp (seconds) when the link was created. */
|
|
176
198
|
createdAt: number;
|
|
199
|
+
/**
|
|
200
|
+
* Opaque app payload stored on the link, or null when none was supplied.
|
|
201
|
+
* @nullable true
|
|
202
|
+
*/
|
|
203
|
+
meta?: string | null;
|
|
177
204
|
}
|
|
178
205
|
/**
|
|
179
206
|
* Response body for listAppMagicLinks (support/debug).
|
|
@@ -201,6 +228,20 @@ export interface BulkAppMagicLinkInvitationContract {
|
|
|
201
228
|
* When false, the user must already exist or the invite fails with NotFound.
|
|
202
229
|
*/
|
|
203
230
|
addToAccessPrincipals?: boolean;
|
|
231
|
+
/**
|
|
232
|
+
* Opaque app payload (not interpreted by the platform) stored on the link and
|
|
233
|
+
* echoed back byte-for-byte at activation.
|
|
234
|
+
* @maxLength 4096
|
|
235
|
+
* @nullable true
|
|
236
|
+
*/
|
|
237
|
+
meta?: string | null;
|
|
238
|
+
/**
|
|
239
|
+
* Optional child App (feature) globalId the link should target, so a
|
|
240
|
+
* multi-app product can route sign-in per app. Omit to fall back to the
|
|
241
|
+
* product's first App (no behavior change).
|
|
242
|
+
* @nullable true
|
|
243
|
+
*/
|
|
244
|
+
appFeatureId?: string | null;
|
|
204
245
|
}
|
|
205
246
|
export interface BulkCreateAppMagicLinksRequestContract {
|
|
206
247
|
/** Users to invite to the app in a single call. */
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
export interface OrgEmailSendRequestContract {
|
|
2
2
|
subject: string;
|
|
3
|
+
/**
|
|
4
|
+
* Email body as HTML or plain text. Bare URLs are auto-linked and the
|
|
5
|
+
* content is sanitized before delivery. Sent through the unbranded app
|
|
6
|
+
* layout with a noreply sender — no FuseBase logo, footer, or branding.
|
|
7
|
+
*/
|
|
3
8
|
body: string;
|
|
4
9
|
/**
|
|
5
10
|
* Recipient user id or email.
|
|
@@ -8,16 +13,6 @@ export interface OrgEmailSendRequestContract {
|
|
|
8
13
|
* The resolved user must already belong to the organization.
|
|
9
14
|
*/
|
|
10
15
|
recipient: string;
|
|
11
|
-
/**
|
|
12
|
-
* Optional variables that the mail rendering layer may use.
|
|
13
|
-
* Currently accepted for forward compatibility and not yet applied during sending.
|
|
14
|
-
*/
|
|
15
|
-
variables?: Record<string, string>;
|
|
16
|
-
/**
|
|
17
|
-
* Optional link variables that the mail rendering layer may use.
|
|
18
|
-
* Currently accepted for forward compatibility and not yet applied during sending.
|
|
19
|
-
*/
|
|
20
|
-
links?: Record<string, string>;
|
|
21
16
|
}
|
|
22
17
|
export interface OrgEmailSendResponseContract {
|
|
23
18
|
requestId: string;
|
|
@@ -101,13 +101,44 @@ export interface FusebaseAuthPasswordRestoreRequestContract {
|
|
|
101
101
|
* @format email
|
|
102
102
|
*/
|
|
103
103
|
email: string;
|
|
104
|
+
/**
|
|
105
|
+
* Base URL of the app's own reset page. The platform appends `/resetpass` and
|
|
106
|
+
* puts the restore key in query param `key`, so the email link is
|
|
107
|
+
* `${customAuthUrl}/resetpass?key=<key>`. Omit to use the default Fusebase host.
|
|
108
|
+
*/
|
|
104
109
|
customAuthUrl?: string;
|
|
110
|
+
/**
|
|
111
|
+
* Portal white-label branding. When BOTH `portalId` and `workspaceId` are set,
|
|
112
|
+
* user-service switches to portal branding: it overrides `customAuthUrl` with
|
|
113
|
+
* the portal domain, uses the portal name, and sends the `restore_portal_password`
|
|
114
|
+
* template instead of the default one.
|
|
115
|
+
*/
|
|
105
116
|
portalId?: string;
|
|
106
117
|
workspaceId?: string;
|
|
107
118
|
}
|
|
108
119
|
export interface FusebaseAuthPasswordRestoreResponseContract {
|
|
109
120
|
ok: true;
|
|
110
121
|
}
|
|
122
|
+
export interface FusebaseAuthRestoreKeyRequestContract {
|
|
123
|
+
/**
|
|
124
|
+
* User email whose password-restore key to mint.
|
|
125
|
+
* @format email
|
|
126
|
+
*/
|
|
127
|
+
email: string;
|
|
128
|
+
/**
|
|
129
|
+
* Base URL of the app's own reset page. When present the response `resetUrl` is
|
|
130
|
+
* `${customAuthUrl}/resetpass?key=<key>` (same format as the platform email link).
|
|
131
|
+
*/
|
|
132
|
+
customAuthUrl?: string;
|
|
133
|
+
}
|
|
134
|
+
export interface FusebaseAuthRestoreKeyResponseContract {
|
|
135
|
+
/** Raw restore key. Passes `checkFusebasePasswordRestoreKey` / `resetFusebasePassword`. */
|
|
136
|
+
key: string;
|
|
137
|
+
/** Ready-to-use reset link, present only when `customAuthUrl` was provided. */
|
|
138
|
+
resetUrl?: string;
|
|
139
|
+
/** Session expiry as a Unix epoch in milliseconds. */
|
|
140
|
+
expiresAt: number;
|
|
141
|
+
}
|
|
111
142
|
export interface FusebaseAuthPasswordRestoreKeyResponseContract {
|
|
112
143
|
valid: boolean;
|
|
113
144
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
* Generated by SDK codegen
|
|
6
6
|
*/
|
|
7
7
|
export type { AuthenticatedUserSummaryContract, MyOrgAccessResponseContract } from "./access/access";
|
|
8
|
+
export type { AppAccessPrincipalContract, RemoveAppAccessPrincipalRequestContract, RemoveAppAccessPrincipalResponseContract } from "./app-access-principal/app-access-principal";
|
|
8
9
|
export type { AppApiOperationContract, AppApiOperationListResponseContract, CallAppApiRequestContract, CallAppApiResponseContract, PublishedAppContract, PublishedAppListResponseContract, VerifyAppApiContractsRequestContract, VerifyAppApiContractsResponseContract, VerifyCaseResultContract } from "./app-api/app-api";
|
|
9
10
|
export type { AppPortalEmbedContract, ListAppPortalEmbedsResponseContract } from "./app-embed-targets/app-embed-targets";
|
|
10
11
|
export type { ActivateAppMagicLinkResponseContract, AppMagicLinkSummaryContract, BulkAppMagicLinkInvitationContract, BulkAppMagicLinkResultItemContract, BulkCreateAppMagicLinksRequestContract, BulkCreateAppMagicLinksResponseContract, CreateAppClientInviteRequestContract, CreateAppMagicLinkRequestContract, CreateAppMagicLinkResponseContract, ListAppMagicLinksResponseContract, RequestAppMagicLinkRequestContract, RequestAppMagicLinkResponseContract, RevokeAppMagicLinkResponseContract } from "./app-magic-link/app-magic-link";
|
|
11
12
|
export * from "./billing/billing";
|
|
12
13
|
export type { OrgEmailSendRequestContract, OrgEmailSendResponseContract } from "./email/email";
|
|
13
14
|
export * from "./file/file";
|
|
14
|
-
export type { FusebaseAuthChallengeContract, FusebaseAuthChallengeRequestContract, FusebaseAuthChallengeResponseContract, FusebaseAuthConflictErrorBodyContract, FusebaseAuthLoginRequestContract, FusebaseAuthLoginResponseContract, FusebaseAuthLogoutResponseContract, FusebaseAuthPasswordResetRequestContract, FusebaseAuthPasswordResetResponseContract, FusebaseAuthPasswordRestoreKeyResponseContract, FusebaseAuthPasswordRestoreRequestContract, FusebaseAuthPasswordRestoreResponseContract, FusebaseAuthRegisterMemberRequestContract, FusebaseAuthRegisterMemberResponseContract, FusebaseAuthRegisterRequestContract, FusebaseAuthRegisterResponseContract, FusebaseAuthSessionContract } 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 } from "./fusebase-auth/fusebase-auth";
|
|
15
16
|
export * from "./isolated-store/isolated-store";
|
|
16
17
|
export * from "./mcp-manager/mcp-manager";
|
|
17
18
|
export type { MeAuthContract, MeOrgGroupContract, MePreferencesContract, MeResponseContract, MeScopeContract, MeUserContract } from "./me/me";
|
package/package.json
CHANGED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Release Notes 2.3.34-sdk.4
|
|
2
|
+
|
|
3
|
+
- Current ref: `HEAD`
|
|
4
|
+
- Previous tag: `v2.3.28-sdk.3`
|
|
5
|
+
- Generated at: 2026-07-23T05:48:58.238Z
|
|
6
|
+
|
|
7
|
+
## Included Drafts
|
|
8
|
+
|
|
9
|
+
- `docs/release-notes/2026-07-02-markdown-notes-crud.md` - Markdown (v3) notes CRUD
|
|
10
|
+
- `docs/release-notes/2026-07-13-getme-no-health-read.md` - getMe no longer requires health.read
|
|
11
|
+
|
|
12
|
+
## Summary
|
|
13
|
+
|
|
14
|
+
### Markdown (v3) notes CRUD
|
|
15
|
+
|
|
16
|
+
Add Gate contracts, controllers, and MCP-visible operations for v3 markdown notes: create, read, replace, and append markdown stored as the source of truth in note-service (no editor-service involved). Part of Notes v3 Iteration 1 (NIM-42034, NIM-42042).
|
|
17
|
+
|
|
18
|
+
### getMe no longer requires health.read
|
|
19
|
+
|
|
20
|
+
`GET /me` (`getMe`) no longer declares a required Gate permission. Any authenticated **user** or **token** subject may call it with a valid session, without `health.read` in the grant.
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## API / SDK Changes
|
|
24
|
+
|
|
25
|
+
### Markdown (v3) notes CRUD
|
|
26
|
+
|
|
27
|
+
- Added `createWorkspaceMarkdownNote` (`POST /:orgId/workspaces/:workspaceId/markdown-notes`).
|
|
28
|
+
- Added `getWorkspaceMarkdownNote` (`GET .../markdown-notes/:noteId`) returning the markdown source of truth plus `revision`.
|
|
29
|
+
- Added `updateWorkspaceMarkdownNoteContent` (`PUT .../markdown-notes/:noteId/content`) replacing the full markdown document with a required optimistic `revision` lock.
|
|
30
|
+
- Added `appendWorkspaceMarkdownNoteContent` (`POST .../markdown-notes/:noteId/content/append`) with an optional `revision` lock.
|
|
31
|
+
- Stale-revision writes return HTTP 409 with `data.errorCode = markdown_note_revision_conflict` and `data.currentRevision`.
|
|
32
|
+
- Regenerated SDK/OpenAPI artifacts include the new Notes API methods and contracts.
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
## Consumer Impact
|
|
36
|
+
|
|
37
|
+
### Markdown (v3) notes CRUD
|
|
38
|
+
|
|
39
|
+
AI/MCP callers can manage markdown-native (v3) notes end-to-end without HTML conversion. Classic (v2) notes are untouched and keep using the existing notes operations. The operations depend on the note-service markdown API (NIM-42040/NIM-42041); until note-service ships it, calls fail upstream.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## Verification
|
|
43
|
+
|
|
44
|
+
### Markdown (v3) notes CRUD
|
|
45
|
+
|
|
46
|
+
- `npm run build`
|
|
47
|
+
- `npm run build:sdk`
|
|
48
|
+
- `npm run mcp:skills:generate`
|
|
49
|
+
- `npm run mcp:skills:validate`
|
|
50
|
+
- `npm test` (unit suites for the new controller, client, and contracts)
|
|
51
|
+
|
|
52
|
+
### getMe no longer requires health.read
|
|
53
|
+
|
|
54
|
+
- `npm run test:unit -- tests/unit/authz-op-registry-bridge.test.ts`
|
|
55
|
+
- `npm run build`
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
## Follow-ups
|
|
59
|
+
|
|
60
|
+
### Markdown (v3) notes CRUD
|
|
61
|
+
|
|
62
|
+
- Switch the plain-HTTP note-service markdown client to the generated `@internal/note-service` SDK once note-service publishes the markdown endpoints.
|
|
63
|
+
- Add e2e-sdk/mcp-e2e coverage once the note-service contract is live (fake-note-service markdown routes should mirror the real service).
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
## Consumer impact
|
|
67
|
+
|
|
68
|
+
### getMe no longer requires health.read
|
|
69
|
+
|
|
70
|
+
- **Apps without `health.read` in the published grant** can call `getMe` again (service tokens, visitor browser tokens).
|
|
71
|
+
- **Apps that already include `health.read`** are unchanged.
|
|
72
|
+
- Do **not** remove `health.read` from grants solely because of this change — other ops may still require it.
|
|
73
|
+
- Continue using `FBS_ORG_ID` / `getMyOrgAccess` for org resolution; do not rely on `getMe().auth.scopes` for visitor sessions.
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
## Why
|
|
77
|
+
|
|
78
|
+
### getMe no longer requires health.read
|
|
79
|
+
|
|
80
|
+
- `getMe` is the primary identity introspection op for Fusebase Apps.
|
|
81
|
+
- Requiring `health.read` caused production lockouts when app grants omitted it after `fusebase analyze gate` / `--sync-gate-permissions` (see issue `041-benchmarking-app`, escalation `2026-07-13-platform-gate-2.3.29-auth-breaking-changes.md`).
|
|
82
|
+
- `resolveOperationPermissions` now reports `required_permission: null` for `getMe`, aligned with `getHealth`.
|
package/release-notes/latest.md
CHANGED
|
@@ -1,9 +1,82 @@
|
|
|
1
|
-
# Release Notes 2.3.34-sdk.
|
|
1
|
+
# Release Notes 2.3.34-sdk.4
|
|
2
2
|
|
|
3
3
|
- Current ref: `HEAD`
|
|
4
|
-
- Previous tag: `v2.3.
|
|
5
|
-
- Generated at: 2026-07-
|
|
4
|
+
- Previous tag: `v2.3.28-sdk.3`
|
|
5
|
+
- Generated at: 2026-07-23T05:48:58.238Z
|
|
6
6
|
|
|
7
7
|
## Included Drafts
|
|
8
8
|
|
|
9
|
-
-
|
|
9
|
+
- `docs/release-notes/2026-07-02-markdown-notes-crud.md` - Markdown (v3) notes CRUD
|
|
10
|
+
- `docs/release-notes/2026-07-13-getme-no-health-read.md` - getMe no longer requires health.read
|
|
11
|
+
|
|
12
|
+
## Summary
|
|
13
|
+
|
|
14
|
+
### Markdown (v3) notes CRUD
|
|
15
|
+
|
|
16
|
+
Add Gate contracts, controllers, and MCP-visible operations for v3 markdown notes: create, read, replace, and append markdown stored as the source of truth in note-service (no editor-service involved). Part of Notes v3 Iteration 1 (NIM-42034, NIM-42042).
|
|
17
|
+
|
|
18
|
+
### getMe no longer requires health.read
|
|
19
|
+
|
|
20
|
+
`GET /me` (`getMe`) no longer declares a required Gate permission. Any authenticated **user** or **token** subject may call it with a valid session, without `health.read` in the grant.
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## API / SDK Changes
|
|
24
|
+
|
|
25
|
+
### Markdown (v3) notes CRUD
|
|
26
|
+
|
|
27
|
+
- Added `createWorkspaceMarkdownNote` (`POST /:orgId/workspaces/:workspaceId/markdown-notes`).
|
|
28
|
+
- Added `getWorkspaceMarkdownNote` (`GET .../markdown-notes/:noteId`) returning the markdown source of truth plus `revision`.
|
|
29
|
+
- Added `updateWorkspaceMarkdownNoteContent` (`PUT .../markdown-notes/:noteId/content`) replacing the full markdown document with a required optimistic `revision` lock.
|
|
30
|
+
- Added `appendWorkspaceMarkdownNoteContent` (`POST .../markdown-notes/:noteId/content/append`) with an optional `revision` lock.
|
|
31
|
+
- Stale-revision writes return HTTP 409 with `data.errorCode = markdown_note_revision_conflict` and `data.currentRevision`.
|
|
32
|
+
- Regenerated SDK/OpenAPI artifacts include the new Notes API methods and contracts.
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
## Consumer Impact
|
|
36
|
+
|
|
37
|
+
### Markdown (v3) notes CRUD
|
|
38
|
+
|
|
39
|
+
AI/MCP callers can manage markdown-native (v3) notes end-to-end without HTML conversion. Classic (v2) notes are untouched and keep using the existing notes operations. The operations depend on the note-service markdown API (NIM-42040/NIM-42041); until note-service ships it, calls fail upstream.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## Verification
|
|
43
|
+
|
|
44
|
+
### Markdown (v3) notes CRUD
|
|
45
|
+
|
|
46
|
+
- `npm run build`
|
|
47
|
+
- `npm run build:sdk`
|
|
48
|
+
- `npm run mcp:skills:generate`
|
|
49
|
+
- `npm run mcp:skills:validate`
|
|
50
|
+
- `npm test` (unit suites for the new controller, client, and contracts)
|
|
51
|
+
|
|
52
|
+
### getMe no longer requires health.read
|
|
53
|
+
|
|
54
|
+
- `npm run test:unit -- tests/unit/authz-op-registry-bridge.test.ts`
|
|
55
|
+
- `npm run build`
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
## Follow-ups
|
|
59
|
+
|
|
60
|
+
### Markdown (v3) notes CRUD
|
|
61
|
+
|
|
62
|
+
- Switch the plain-HTTP note-service markdown client to the generated `@internal/note-service` SDK once note-service publishes the markdown endpoints.
|
|
63
|
+
- Add e2e-sdk/mcp-e2e coverage once the note-service contract is live (fake-note-service markdown routes should mirror the real service).
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
## Consumer impact
|
|
67
|
+
|
|
68
|
+
### getMe no longer requires health.read
|
|
69
|
+
|
|
70
|
+
- **Apps without `health.read` in the published grant** can call `getMe` again (service tokens, visitor browser tokens).
|
|
71
|
+
- **Apps that already include `health.read`** are unchanged.
|
|
72
|
+
- Do **not** remove `health.read` from grants solely because of this change — other ops may still require it.
|
|
73
|
+
- Continue using `FBS_ORG_ID` / `getMyOrgAccess` for org resolution; do not rely on `getMe().auth.scopes` for visitor sessions.
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
## Why
|
|
77
|
+
|
|
78
|
+
### getMe no longer requires health.read
|
|
79
|
+
|
|
80
|
+
- `getMe` is the primary identity introspection op for Fusebase Apps.
|
|
81
|
+
- Requiring `health.read` caused production lockouts when app grants omitted it after `fusebase analyze gate` / `--sync-gate-permissions` (see issue `041-benchmarking-app`, escalation `2026-07-13-platform-gate-2.3.29-auth-breaking-changes.md`).
|
|
82
|
+
- `resolveOperationPermissions` now reports `required_permission: null` for `getMe`, aligned with `getHealth`.
|