@fusebase/fusebase-gate-sdk 2.11.3 → 2.11.6-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 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. 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.
|
|
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. Pass `headers` to forward extra request headers to the runtime, for operations that require one such as `Idempotency-Key`; headers Gate sets itself (auth and `X-Fusebase-*` identity headers) are reserved and rejected with 400.
|
|
15
15
|
*/
|
|
16
16
|
callAppApi(params: {
|
|
17
17
|
path: {
|
package/dist/apis/AppApisApi.js
CHANGED
|
@@ -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. 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.
|
|
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. Pass `headers` to forward extra request headers to the runtime, for operations that require one such as `Idempotency-Key`; headers Gate sets itself (auth and `X-Fusebase-*` identity headers) are reserved and rejected with 400.
|
|
17
17
|
*/
|
|
18
18
|
async callAppApi(params) {
|
|
19
19
|
return this.client.request({
|
|
@@ -76,6 +76,12 @@ export interface CallAppApiRequestContract {
|
|
|
76
76
|
path?: Record<string, string>;
|
|
77
77
|
query?: Record<string, string | number | boolean>;
|
|
78
78
|
body?: unknown;
|
|
79
|
+
/**
|
|
80
|
+
* Extra request headers forwarded verbatim to the app runtime, for operations
|
|
81
|
+
* that require one (e.g. `Idempotency-Key`). Headers Gate sets itself to prove
|
|
82
|
+
* the caller's identity to the runtime are reserved and rejected with 400.
|
|
83
|
+
*/
|
|
84
|
+
headers?: Record<string, string>;
|
|
79
85
|
/**
|
|
80
86
|
* On-behalf-of: a platform app token (`fbsfeaturetoken` / `x-app-feature-token`)
|
|
81
87
|
* identifying the end user this call runs for. Gate verifies it fail-closed and
|
package/package.json
CHANGED
package/release-notes/latest.md
CHANGED
|
@@ -1,77 +1,9 @@
|
|
|
1
|
-
# Release Notes 2.11.
|
|
1
|
+
# Release Notes 2.11.6-sdk.0
|
|
2
2
|
|
|
3
3
|
- Current ref: `HEAD`
|
|
4
|
-
- Previous tag: `v2.11.
|
|
5
|
-
- Generated at: 2026-09-
|
|
4
|
+
- Previous tag: `v2.11.6-sdk.0`
|
|
5
|
+
- Generated at: 2026-09-07T15:25:08.819Z
|
|
6
6
|
|
|
7
7
|
## Included Drafts
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
## Summary
|
|
12
|
-
|
|
13
|
-
### Portal branding: color roles and web font (NIM-42204)
|
|
14
|
-
|
|
15
|
-
`updatePortalStyle` now also takes `colors` and `font`, the two field groups the
|
|
16
|
-
first round left out. Colors are expressed the way the portal actually renders
|
|
17
|
-
them — as **Tailwind palette tokens** written into the theme's own color slots,
|
|
18
|
-
not as hex. The font is delivered through the portal's custom code, since the
|
|
19
|
-
theme model has no font field.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
## API / SDK Changes
|
|
23
|
-
|
|
24
|
-
### Portal branding: color roles and web font (NIM-42204)
|
|
25
|
-
|
|
26
|
-
- `updatePortalStyle` body gained:
|
|
27
|
-
- `colors` — five semantic roles, each one palette token (`transparent`,
|
|
28
|
-
`white`, `black` or `<hue>-<shade>`, e.g. `indigo-600`):
|
|
29
|
-
|
|
30
|
-
| Role | Theme slots written |
|
|
31
|
-
| --- | --- |
|
|
32
|
-
| `primary` | `bg_primary`, `bg_primary_hover`, `primary` |
|
|
33
|
-
| `background` | `bg_body` |
|
|
34
|
-
| `surface` | `bg_surface` |
|
|
35
|
-
| `text` | `text_surface` |
|
|
36
|
-
| `accent` | `bg_secondary`, `bg_secondary_hover` |
|
|
37
|
-
|
|
38
|
-
- `font` — `{ family, source: "google" }`. The family is spelled as Google
|
|
39
|
-
Fonts spells it; letters, digits and spaces only.
|
|
40
|
-
- `getPortal` → `style` gained `colors` (the roles the portal overrides) and
|
|
41
|
-
`fontFamily`.
|
|
42
|
-
- A body touching both the theme fields and `font` stages **two** events (one
|
|
43
|
-
`updateThemeSettings`, one `updateCustomCodeSettings`); `seq` is the first.
|
|
44
|
-
- The error for an empty body is now
|
|
45
|
-
`At least one of theme, colors, font, logo, or favicon is required`.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
## Consumer Impact
|
|
49
|
-
|
|
50
|
-
### Portal branding: color roles and web font (NIM-42204)
|
|
51
|
-
|
|
52
|
-
An agent can now recolor a portal past the 13 named themes without writing
|
|
53
|
-
custom CSS, and the recolor works on any domain.
|
|
54
|
-
|
|
55
|
-
**Hex is still rejected, on purpose.** The renderer interpolates the stored
|
|
56
|
-
token straight into a class name (`bg-neutral-900`), and
|
|
57
|
-
`apps/portals/tailwind.config.js` safelists palette names only, so `#2563eb`
|
|
58
|
-
would be stored, published, and style nothing. `stone` and `violet` are rejected
|
|
59
|
-
for the same reason: they are missing from that safelist. Convert a hex to the
|
|
60
|
-
nearest token before calling.
|
|
61
|
-
|
|
62
|
-
**Where the font lives.** The theme DTO has no font field, so `font` stages one
|
|
63
|
-
marked `<style>` block inside the portal's `customStyle`:
|
|
64
|
-
|
|
65
|
-
```html
|
|
66
|
-
<!--fusebase-font--><style>@import url("https://fonts.googleapis.com/css2?family=Fraunces&display=swap");#main-scrolling-container{font-family:'Fraunces',sans-serif}</style><!--/fusebase-font-->
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
The markers make it replaceable: a second `font` call swaps the block rather
|
|
70
|
-
than appending one, and `updatePortalCustomCode` carries it through when the
|
|
71
|
-
agent rewrites the surrounding CSS. Because it is custom code, it renders
|
|
72
|
-
wherever custom code renders — the customizer only offers the custom-code editor
|
|
73
|
-
on portals served from a custom CNAME domain.
|
|
74
|
-
|
|
75
|
-
**Hover slots take the same token as their base.** No shade is derived, so a
|
|
76
|
-
recolored hover never lands on an unrelated preset color. An agent that wants a
|
|
77
|
-
distinct hover uses `updatePortalCustomCode`.
|
|
9
|
+
- None
|
package/release-notes/2.11.3.md
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
# Release Notes 2.11.3
|
|
2
|
-
|
|
3
|
-
- Current ref: `HEAD`
|
|
4
|
-
- Previous tag: `v2.11.3`
|
|
5
|
-
- Generated at: 2026-09-03T04:13:04.983Z
|
|
6
|
-
|
|
7
|
-
## Included Drafts
|
|
8
|
-
|
|
9
|
-
- `docs/release-notes/2026-09-02-portal-style-colors-font.md` - Portal branding: color roles and web font (NIM-42204)
|
|
10
|
-
|
|
11
|
-
## Summary
|
|
12
|
-
|
|
13
|
-
### Portal branding: color roles and web font (NIM-42204)
|
|
14
|
-
|
|
15
|
-
`updatePortalStyle` now also takes `colors` and `font`, the two field groups the
|
|
16
|
-
first round left out. Colors are expressed the way the portal actually renders
|
|
17
|
-
them — as **Tailwind palette tokens** written into the theme's own color slots,
|
|
18
|
-
not as hex. The font is delivered through the portal's custom code, since the
|
|
19
|
-
theme model has no font field.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
## API / SDK Changes
|
|
23
|
-
|
|
24
|
-
### Portal branding: color roles and web font (NIM-42204)
|
|
25
|
-
|
|
26
|
-
- `updatePortalStyle` body gained:
|
|
27
|
-
- `colors` — five semantic roles, each one palette token (`transparent`,
|
|
28
|
-
`white`, `black` or `<hue>-<shade>`, e.g. `indigo-600`):
|
|
29
|
-
|
|
30
|
-
| Role | Theme slots written |
|
|
31
|
-
| --- | --- |
|
|
32
|
-
| `primary` | `bg_primary`, `bg_primary_hover`, `primary` |
|
|
33
|
-
| `background` | `bg_body` |
|
|
34
|
-
| `surface` | `bg_surface` |
|
|
35
|
-
| `text` | `text_surface` |
|
|
36
|
-
| `accent` | `bg_secondary`, `bg_secondary_hover` |
|
|
37
|
-
|
|
38
|
-
- `font` — `{ family, source: "google" }`. The family is spelled as Google
|
|
39
|
-
Fonts spells it; letters, digits and spaces only.
|
|
40
|
-
- `getPortal` → `style` gained `colors` (the roles the portal overrides) and
|
|
41
|
-
`fontFamily`.
|
|
42
|
-
- A body touching both the theme fields and `font` stages **two** events (one
|
|
43
|
-
`updateThemeSettings`, one `updateCustomCodeSettings`); `seq` is the first.
|
|
44
|
-
- The error for an empty body is now
|
|
45
|
-
`At least one of theme, colors, font, logo, or favicon is required`.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
## Consumer Impact
|
|
49
|
-
|
|
50
|
-
### Portal branding: color roles and web font (NIM-42204)
|
|
51
|
-
|
|
52
|
-
An agent can now recolor a portal past the 13 named themes without writing
|
|
53
|
-
custom CSS, and the recolor works on any domain.
|
|
54
|
-
|
|
55
|
-
**Hex is still rejected, on purpose.** The renderer interpolates the stored
|
|
56
|
-
token straight into a class name (`bg-neutral-900`), and
|
|
57
|
-
`apps/portals/tailwind.config.js` safelists palette names only, so `#2563eb`
|
|
58
|
-
would be stored, published, and style nothing. `stone` and `violet` are rejected
|
|
59
|
-
for the same reason: they are missing from that safelist. Convert a hex to the
|
|
60
|
-
nearest token before calling.
|
|
61
|
-
|
|
62
|
-
**Where the font lives.** The theme DTO has no font field, so `font` stages one
|
|
63
|
-
marked `<style>` block inside the portal's `customStyle`:
|
|
64
|
-
|
|
65
|
-
```html
|
|
66
|
-
<!--fusebase-font--><style>@import url("https://fonts.googleapis.com/css2?family=Fraunces&display=swap");#main-scrolling-container{font-family:'Fraunces',sans-serif}</style><!--/fusebase-font-->
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
The markers make it replaceable: a second `font` call swaps the block rather
|
|
70
|
-
than appending one, and `updatePortalCustomCode` carries it through when the
|
|
71
|
-
agent rewrites the surrounding CSS. Because it is custom code, it renders
|
|
72
|
-
wherever custom code renders — the customizer only offers the custom-code editor
|
|
73
|
-
on portals served from a custom CNAME domain.
|
|
74
|
-
|
|
75
|
-
**Hover slots take the same token as their base.** No shade is derived, so a
|
|
76
|
-
recolored hover never lands on an unrelated preset color. An agent that wants a
|
|
77
|
-
distinct hover uses `updatePortalCustomCode`.
|