@isi-ui7/bos7-shared 0.2.2 → 0.2.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/auth7/delegated-proxy.d.ts +8 -1
- package/dist/auth7/index.d.ts +2 -0
- package/dist/auth7/switch-branch-bff.d.ts +7 -0
- package/dist/crud-types.d.ts +2 -0
- package/dist/data-table/proxy.d.ts +25 -0
- package/dist/index.d.ts +2 -0
- package/dist/{index.es-Bylk5fh-.js → index.es-B4p6mwaz.js} +1 -1
- package/dist/index.js +3244 -3111
- package/dist/{jspdf.es.min-Dzm5j8wC.js → jspdf.es.min-CpRUhh3E.js} +2 -2
- package/dist/{jspdf.plugin.autotable-DcntYaes.js → jspdf.plugin.autotable-DFaknRns.js} +19 -22
- package/dist/purify.es-Cm3utOpm.js +560 -0
- package/package.json +8 -8
- package/src/auth7/delegated-proxy.ts +62 -5
- package/src/auth7/index.ts +2 -0
- package/src/auth7/switch-branch-bff.test.ts +121 -0
- package/src/auth7/switch-branch-bff.ts +119 -0
- package/src/crud-types.ts +2 -0
- package/src/data-table/proxy.ts +73 -0
- package/src/index.ts +2 -0
- package/src/shell/app-shell-layout.tsx +36 -5
- package/dist/purify.es-CiEWEeUM.js +0 -605
|
@@ -28,6 +28,13 @@ export interface DelegatedProxy {
|
|
|
28
28
|
/**
|
|
29
29
|
* Exchange the user's access token for a delegated service token (RFC 8693),
|
|
30
30
|
* then return a typed proxy client for backend calls.
|
|
31
|
-
*
|
|
31
|
+
*
|
|
32
|
+
* Identity headers are derived from the ORIGINAL user token (the source of
|
|
33
|
+
* truth for who initiated the request), not from the exchanged delegated
|
|
34
|
+
* token (whose `sub` may be remapped to a client_id depending on the auth7
|
|
35
|
+
* exchange policy).
|
|
36
|
+
*
|
|
37
|
+
* The exchanged token is cached per (userToken, audience) — see
|
|
38
|
+
* token-exchange.ts.
|
|
32
39
|
*/
|
|
33
40
|
export declare function createDelegatedProxy(userToken: string, audience: string, options?: DelegatedProxyOptions): Promise<DelegatedProxy>;
|
package/dist/auth7/index.d.ts
CHANGED
|
@@ -10,3 +10,5 @@ export * from './types';
|
|
|
10
10
|
export * from './client';
|
|
11
11
|
export { requireScope, scopeFromRequest } from './scope-guard';
|
|
12
12
|
export type { ScopeLevel } from './scope-guard';
|
|
13
|
+
export { handleSwitchBranchRequest } from './switch-branch-bff';
|
|
14
|
+
export type { SwitchBranchBffOptions } from './switch-branch-bff';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { NextRequest, NextResponse } from 'next/server';
|
|
2
|
+
|
|
3
|
+
export interface SwitchBranchBffOptions {
|
|
4
|
+
auth7ApiUrl: string;
|
|
5
|
+
branchCookieDomain?: (host: string) => string | undefined;
|
|
6
|
+
}
|
|
7
|
+
export declare function handleSwitchBranchRequest(request: NextRequest, options: SwitchBranchBffOptions): Promise<NextResponse>;
|
package/dist/crud-types.d.ts
CHANGED
|
@@ -63,6 +63,8 @@ export type CrudListSchema = {
|
|
|
63
63
|
showSort?: boolean;
|
|
64
64
|
/** Enable search bar. Defaults to true. */
|
|
65
65
|
showSearch?: boolean;
|
|
66
|
+
/** Endpoint for LookupInput (defaults to apiPath if omitted). In Pattern B both DataTable and LookupInput share the same /query endpoint. */
|
|
67
|
+
lookupApiPath?: string;
|
|
66
68
|
/**
|
|
67
69
|
* Level 2: schema-driven confirmation modals for custom popup actions.
|
|
68
70
|
* Keyed by popup menu item id. Actions not listed here fall through to onCustomAction (Level 1).
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { NextRequest, NextResponse } from 'next/server';
|
|
2
|
+
|
|
3
|
+
export interface ProxyBackendPostOptions {
|
|
4
|
+
backendUrl: string;
|
|
5
|
+
path: string;
|
|
6
|
+
audience: string;
|
|
7
|
+
accessTokenCookie?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function proxyBackendPost(req: NextRequest, opts: ProxyBackendPostOptions): Promise<NextResponse>;
|
|
10
|
+
export interface ProxyQueryRouteOptions extends ProxyBackendPostOptions {
|
|
11
|
+
/**
|
|
12
|
+
* Extra column type metadata to merge into the backend response's columnTypes.
|
|
13
|
+
* Useful when the BFF layer knows additional column types not present in the backend response.
|
|
14
|
+
* Optional — if omitted, backend response is forwarded as-is.
|
|
15
|
+
*/
|
|
16
|
+
extraColumnTypes?: Record<string, string>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Forwards a DataTable POST /query request to a backend Pattern B endpoint.
|
|
20
|
+
* Semantically identical to proxyBackendPost but signals "this is a query/lookup
|
|
21
|
+
* endpoint" — used by ServerDataTable and LookupInput interchangeably.
|
|
22
|
+
*
|
|
23
|
+
* If extraColumnTypes is provided, merges them into the response's columnTypes field.
|
|
24
|
+
*/
|
|
25
|
+
export declare function proxyQueryRoute(req: NextRequest, opts: ProxyQueryRouteOptions): Promise<NextResponse>;
|
package/dist/index.d.ts
CHANGED
|
@@ -16,3 +16,5 @@ export * from './crud-types';
|
|
|
16
16
|
export * from './crud-hooks';
|
|
17
17
|
export * from './form-types';
|
|
18
18
|
export * from './i18n';
|
|
19
|
+
export { proxyBackendPost, proxyQueryRoute } from './data-table/proxy';
|
|
20
|
+
export type { ProxyBackendPostOptions, ProxyQueryRouteOptions } from './data-table/proxy';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as Xa } from "./jspdf.es.min-
|
|
1
|
+
import { _ as Xa } from "./jspdf.es.min-CpRUhh3E.js";
|
|
2
2
|
var Ke = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
3
3
|
function Do(a) {
|
|
4
4
|
return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
|