@ydtb/tk-scope-app 0.14.26 → 0.15.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.
- package/dist/src/components/ErrorBoundary.d.ts +1 -1
- package/dist/src/components/scope/ScopeSwitcher.d.ts.map +1 -1
- package/dist/src/components/scope/ScopeSwitcher.js +13 -4
- package/dist/src/components/scope/ScopeSwitcher.js.map +1 -1
- package/dist/src/dashboard/headers/MainHeaderDesktop.d.ts.map +1 -1
- package/dist/src/dashboard/headers/MainHeaderDesktop.js +12 -4
- package/dist/src/dashboard/headers/MainHeaderDesktop.js.map +1 -1
- package/dist/src/hooks/useCreateScope.d.ts +4 -4
- package/dist/src/hooks/useInvitations.d.ts +2 -2
- package/dist/src/lib/platform-api.d.ts +50 -50
- package/package.json +11 -11
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -11,7 +11,7 @@ export declare class ErrorBoundary extends Component<Props, State> {
|
|
|
11
11
|
constructor(props: Props);
|
|
12
12
|
static getDerivedStateFromError(error: Error): State;
|
|
13
13
|
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
14
|
-
render(): string | number | bigint | boolean |
|
|
14
|
+
render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
15
15
|
}
|
|
16
16
|
export {};
|
|
17
17
|
//# sourceMappingURL=ErrorBoundary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScopeSwitcher.d.ts","sourceRoot":"","sources":["../../../../src/components/scope/ScopeSwitcher.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"ScopeSwitcher.d.ts","sourceRoot":"","sources":["../../../../src/components/scope/ScopeSwitcher.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AA8D1D,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,aAAa,CAAA;IAC1B,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;CACtC;AAED,wBAAgB,mBAAmB,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,wBAAwB,2CAsGhG;AAED,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,aAAa,CAAA;IAC1B,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;CACxB;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,2CA2IhE"}
|
|
@@ -5,7 +5,16 @@ import { useScopeList } from "../../hooks/useScopeList.js";
|
|
|
5
5
|
import { Loader2, Check, Plus } from "lucide-react";
|
|
6
6
|
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, } from "@ydtb/tk-scope-ui/components/dialog";
|
|
7
7
|
import { useScopeContext } from "../../contexts/scope/ScopeContext.js";
|
|
8
|
-
import { scopeLink, useScopeLink } from "@ydtb/tk-scope/client";
|
|
8
|
+
import { scopeLink, useScopeLink, queryScopeType } from "@ydtb/tk-scope/client";
|
|
9
|
+
// Each scope type may have its own `defaultRoute` (e.g. system →
|
|
10
|
+
// `/dashboard`, location → `/store-viewer`). The switcher used to hard-
|
|
11
|
+
// code `/dashboard` for every navigation target, which broke any time
|
|
12
|
+
// the destination scope didn't include the dashboard tool — the URL
|
|
13
|
+
// resolved to a 404 route, the access guard saw no entity, and the
|
|
14
|
+
// user got redirected back to the previous scope.
|
|
15
|
+
function defaultRouteForScopeType(type) {
|
|
16
|
+
return queryScopeType(type)?.defaultRoute ?? "/dashboard";
|
|
17
|
+
}
|
|
9
18
|
import { ScopeActionsPanel, ScopeAvatar } from "@ydtb/tk-scope-shell";
|
|
10
19
|
import { useChildScopePermissions } from "./useChildScopePermissions.js";
|
|
11
20
|
import { useScopeMenuPolicy } from "../../hooks/useScopeMenuPolicy.js";
|
|
@@ -96,7 +105,7 @@ export function ScopeSwitcherPanel(props) {
|
|
|
96
105
|
return (_jsx(ScopeActionsPanel, { onClose: onClose, currentScope: { name: currentScopeName, logo: currentScope?.logo }, currentScopeLabel: `Current ${scopeLabel.singular}`, showCurrentScopeCard: true, showSearch: showSearch, searchValue: search, onSearchChange: setSearch, searchPlaceholder: `Find ${navLabel.singular.toLowerCase()}...`, parentAction: parentScope
|
|
97
106
|
? {
|
|
98
107
|
label: parentScope.name,
|
|
99
|
-
onClick: () => closeAndNavigate(scopeLink(
|
|
108
|
+
onClick: () => closeAndNavigate(scopeLink(defaultRouteForScopeType(parentScope.type), {
|
|
100
109
|
scope: parentScope.type,
|
|
101
110
|
scopeId: parentScope.id,
|
|
102
111
|
})),
|
|
@@ -109,7 +118,7 @@ export function ScopeSwitcherPanel(props) {
|
|
|
109
118
|
? {
|
|
110
119
|
title: `Managed ${navLabel.plural}`,
|
|
111
120
|
items: filteredChildren,
|
|
112
|
-
onSelect: (scope) => closeAndNavigate(scopeLink(
|
|
121
|
+
onSelect: (scope) => closeAndNavigate(scopeLink(defaultRouteForScopeType(scope.type), {
|
|
113
122
|
scope: scope.type,
|
|
114
123
|
scopeId: scope.id,
|
|
115
124
|
})),
|
|
@@ -120,7 +129,7 @@ export function ScopeSwitcherPanel(props) {
|
|
|
120
129
|
? {
|
|
121
130
|
title: `Switch ${scopeLabel.singular}`,
|
|
122
131
|
items: filteredSiblings,
|
|
123
|
-
onSelect: (scope) => closeAndNavigate(scopeLink(
|
|
132
|
+
onSelect: (scope) => closeAndNavigate(scopeLink(defaultRouteForScopeType(scope.type), {
|
|
124
133
|
scope: scope.type,
|
|
125
134
|
scopeId: scope.id,
|
|
126
135
|
})),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScopeSwitcher.js","sourceRoot":"","sources":["../../../../src/components/scope/ScopeSwitcher.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC1D,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EACL,MAAM,EACN,aAAa,EACb,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAuC,CAAA;AACvE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"ScopeSwitcher.js","sourceRoot":"","sources":["../../../../src/components/scope/ScopeSwitcher.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC1D,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EACL,MAAM,EACN,aAAa,EACb,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAuC,CAAA;AACvE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAG/E,iEAAiE;AACjE,wEAAwE;AACxE,sEAAsE;AACtE,oEAAoE;AACpE,mEAAmE;AACnE,kDAAkD;AAClD,SAAS,wBAAwB,CAAC,IAAY;IAC5C,O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|
|
1
|
+
{"version":3,"file":"MainHeaderDesktop.d.ts","sourceRoot":"","sources":["../../../../src/dashboard/headers/MainHeaderDesktop.tsx"],"names":[],"mappings":"AA6BA,wBAAgB,iBAAiB,CAAC,EAAE,iBAAiB,EAAE,EAAE;IAAE,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAAE,kDA8MvF"}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo, useState } from "react";
|
|
3
3
|
import { useNavigate } from "@tanstack/react-router";
|
|
4
|
-
import { useScopeLink, scopeLink } from "@ydtb/tk-scope/client";
|
|
4
|
+
import { useScopeLink, scopeLink, queryScopeType } from "@ydtb/tk-scope/client";
|
|
5
|
+
// Each scope type has its own `defaultRoute` (system → `/dashboard`,
|
|
6
|
+
// location → `/store-viewer`). Hardcoding `/dashboard` for every
|
|
7
|
+
// switch target builds URLs that don't exist in the destination
|
|
8
|
+
// scope's tool set, so the access guard sees no entity and bounces
|
|
9
|
+
// the user back to the previous scope.
|
|
10
|
+
function defaultRouteForScopeType(type) {
|
|
11
|
+
return queryScopeType(type)?.defaultRoute ?? "/dashboard";
|
|
12
|
+
}
|
|
5
13
|
import { MessageSquare } from "lucide-react";
|
|
6
14
|
import { Popover, PopoverContent, PopoverTrigger } from "@ydtb/tk-scope-ui/components/popover";
|
|
7
15
|
import { MainHeaderDesktopFrame, ScopeActionsPopoverContent, ScopeIdentityBadge, SearchTrigger, } from "@ydtb/tk-scope-shell";
|
|
@@ -63,7 +71,7 @@ export function MainHeaderDesktop({ hideNotifications }) {
|
|
|
63
71
|
setOpen(false);
|
|
64
72
|
setSearch("");
|
|
65
73
|
navigate({
|
|
66
|
-
to: scopeLink(
|
|
74
|
+
to: scopeLink(defaultRouteForScopeType(parentScope.type), {
|
|
67
75
|
scope: parentScope.type,
|
|
68
76
|
scopeId: parentScope.id,
|
|
69
77
|
}),
|
|
@@ -86,7 +94,7 @@ export function MainHeaderDesktop({ hideNotifications }) {
|
|
|
86
94
|
setOpen(false);
|
|
87
95
|
setSearch("");
|
|
88
96
|
navigate({
|
|
89
|
-
to: scopeLink(
|
|
97
|
+
to: scopeLink(defaultRouteForScopeType(scope.type), {
|
|
90
98
|
scope: scope.type,
|
|
91
99
|
scopeId: scope.id,
|
|
92
100
|
}),
|
|
@@ -103,7 +111,7 @@ export function MainHeaderDesktop({ hideNotifications }) {
|
|
|
103
111
|
setOpen(false);
|
|
104
112
|
setSearch("");
|
|
105
113
|
navigate({
|
|
106
|
-
to: scopeLink(
|
|
114
|
+
to: scopeLink(defaultRouteForScopeType(scope.type), {
|
|
107
115
|
scope: scope.type,
|
|
108
116
|
scopeId: scope.id,
|
|
109
117
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MainHeaderDesktop.js","sourceRoot":"","sources":["../../../../src/dashboard/headers/MainHeaderDesktop.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"MainHeaderDesktop.js","sourceRoot":"","sources":["../../../../src/dashboard/headers/MainHeaderDesktop.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAE/E,qEAAqE;AACrE,iEAAiE;AACjE,gEAAgE;AAChE,mEAAmE;AACnE,uCAAuC;AACvC,SAAS,wBAAwB,CAAC,IAAY;IAC5C,OAAO,cAAc,CAAC,IAAI,CAAC,EAAE,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AG,CAAW,EAAE,CAAC,CAAA;gCACvD,CAAC,GACD,GACE,CACP,CAAC,CAAC,CAAC,SAAS,GAEf,GACa,IACT,CACX,CAAC,CAAC,CAAC,CACF,KAAC,kBAAkB,IAAC,IAAI,EAAE,gBAAgB,GAAI,CAC/C,EAEH,MAAM,EAAE,KAAC,aAAa,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAI,EAC7D,KAAK,EACH,8BACG,CAAC,iBAAiB,IAAI,KAAC,oBAAoB,KAAG,EAC/C,iBACE,SAAS,EAAC,kIAAkI,EAC5I,OAAO,EAAE,UAAU,EACnB,IAAI,EAAC,QAAQ,YAEb,KAAC,aAAa,IAAC,SAAS,EAAC,mBAAmB,GAAG,GACxC,EACT,KAAC,cAAc,KAAG,IACjB,GAEL,CACH,CAAA;AACH,CAAC"}
|
|
@@ -22,21 +22,21 @@ export declare function createScope(params: {
|
|
|
22
22
|
scope: {
|
|
23
23
|
id: string;
|
|
24
24
|
name: string;
|
|
25
|
-
slug: string;
|
|
26
|
-
createdAt: Date;
|
|
27
|
-
updatedAt: Date;
|
|
28
25
|
scope: string;
|
|
29
26
|
parentScope: string | null;
|
|
30
27
|
parentScopeId: string | null;
|
|
28
|
+
slug: string;
|
|
31
29
|
logo: string | null;
|
|
32
30
|
metadata: unknown;
|
|
31
|
+
createdAt: Date;
|
|
32
|
+
updatedAt: Date;
|
|
33
33
|
};
|
|
34
34
|
member: {
|
|
35
|
-
role: string;
|
|
36
35
|
id: string;
|
|
37
36
|
createdAt: Date;
|
|
38
37
|
scopeId: string;
|
|
39
38
|
userId: string;
|
|
39
|
+
role: string;
|
|
40
40
|
};
|
|
41
41
|
}>;
|
|
42
42
|
//# sourceMappingURL=useCreateScope.d.ts.map
|
|
@@ -57,11 +57,11 @@ export declare function acceptInvitation(invitationId: string): Promise<{
|
|
|
57
57
|
updatedAt: Date;
|
|
58
58
|
} | undefined;
|
|
59
59
|
member: {
|
|
60
|
-
scopeId: string;
|
|
61
60
|
id: string;
|
|
62
61
|
createdAt: Date;
|
|
63
|
-
|
|
62
|
+
scopeId: string;
|
|
64
63
|
userId: string;
|
|
64
|
+
role: string;
|
|
65
65
|
};
|
|
66
66
|
alreadyMember: boolean;
|
|
67
67
|
}>;
|
|
@@ -41,41 +41,41 @@ export declare const scopeApi: import("@ydtb/tk-scope-api-client").ToolClient<{
|
|
|
41
41
|
scope: {
|
|
42
42
|
id: string;
|
|
43
43
|
name: string;
|
|
44
|
-
slug: string;
|
|
45
|
-
createdAt: Date;
|
|
46
|
-
updatedAt: Date;
|
|
47
44
|
scope: string;
|
|
48
45
|
parentScope: string | null;
|
|
49
46
|
parentScopeId: string | null;
|
|
47
|
+
slug: string;
|
|
50
48
|
logo: string | null;
|
|
51
49
|
metadata: unknown;
|
|
50
|
+
createdAt: Date;
|
|
51
|
+
updatedAt: Date;
|
|
52
52
|
};
|
|
53
53
|
member: {
|
|
54
|
-
role: string;
|
|
55
54
|
id: string;
|
|
56
55
|
createdAt: Date;
|
|
57
56
|
scopeId: string;
|
|
58
57
|
userId: string;
|
|
58
|
+
role: string;
|
|
59
59
|
};
|
|
60
60
|
}, {
|
|
61
61
|
scope: {
|
|
62
62
|
id: string;
|
|
63
63
|
name: string;
|
|
64
|
-
slug: string;
|
|
65
|
-
createdAt: Date;
|
|
66
|
-
updatedAt: Date;
|
|
67
64
|
scope: string;
|
|
68
65
|
parentScope: string | null;
|
|
69
66
|
parentScopeId: string | null;
|
|
67
|
+
slug: string;
|
|
70
68
|
logo: string | null;
|
|
71
69
|
metadata: unknown;
|
|
70
|
+
createdAt: Date;
|
|
71
|
+
updatedAt: Date;
|
|
72
72
|
};
|
|
73
73
|
member: {
|
|
74
|
-
role: string;
|
|
75
74
|
id: string;
|
|
76
75
|
createdAt: Date;
|
|
77
76
|
scopeId: string;
|
|
78
77
|
userId: string;
|
|
78
|
+
role: string;
|
|
79
79
|
};
|
|
80
80
|
}>, Record<never, never>, Record<never, never>>;
|
|
81
81
|
list: import("@orpc/server").DecoratedProcedure<import("@orpc/server").MergedInitialContext<{
|
|
@@ -1520,45 +1520,45 @@ export declare const rolesApi: import("@ydtb/tk-scope-api-client").ToolClient<{
|
|
|
1520
1520
|
displayOrder: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1521
1521
|
}, import("zod/v4/core").$strip>, import("@orpc/contract").Schema<{
|
|
1522
1522
|
role: {
|
|
1523
|
-
scopeId: string;
|
|
1524
1523
|
id: string;
|
|
1525
1524
|
name: string;
|
|
1526
1525
|
scope: string;
|
|
1527
1526
|
slug: string;
|
|
1528
1527
|
createdAt: Date;
|
|
1529
1528
|
updatedAt: Date;
|
|
1529
|
+
scopeId: string;
|
|
1530
|
+
createdById: string | null;
|
|
1530
1531
|
description: string | null;
|
|
1531
|
-
color: string | null;
|
|
1532
1532
|
permissions: import("@ydtb/tk-scope-extension/db").RolePermissionEntry[];
|
|
1533
1533
|
isSystem: boolean;
|
|
1534
1534
|
isDefault: boolean;
|
|
1535
1535
|
isGuest: boolean;
|
|
1536
1536
|
editable: boolean;
|
|
1537
1537
|
allChildScopes: boolean;
|
|
1538
|
+
color: string | null;
|
|
1538
1539
|
displayOrder: number;
|
|
1539
1540
|
deletedAt: Date | null;
|
|
1540
|
-
createdById: string | null;
|
|
1541
1541
|
};
|
|
1542
1542
|
}, {
|
|
1543
1543
|
role: {
|
|
1544
|
-
scopeId: string;
|
|
1545
1544
|
id: string;
|
|
1546
1545
|
name: string;
|
|
1547
1546
|
scope: string;
|
|
1548
1547
|
slug: string;
|
|
1549
1548
|
createdAt: Date;
|
|
1550
1549
|
updatedAt: Date;
|
|
1550
|
+
scopeId: string;
|
|
1551
|
+
createdById: string | null;
|
|
1551
1552
|
description: string | null;
|
|
1552
|
-
color: string | null;
|
|
1553
1553
|
permissions: import("@ydtb/tk-scope-extension/db").RolePermissionEntry[];
|
|
1554
1554
|
isSystem: boolean;
|
|
1555
1555
|
isDefault: boolean;
|
|
1556
1556
|
isGuest: boolean;
|
|
1557
1557
|
editable: boolean;
|
|
1558
1558
|
allChildScopes: boolean;
|
|
1559
|
+
color: string | null;
|
|
1559
1560
|
displayOrder: number;
|
|
1560
1561
|
deletedAt: Date | null;
|
|
1561
|
-
createdById: string | null;
|
|
1562
1562
|
};
|
|
1563
1563
|
}>, Record<never, never>, Record<never, never>>;
|
|
1564
1564
|
update: import("@orpc/server").DecoratedProcedure<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<{
|
|
@@ -1785,45 +1785,45 @@ export declare const rolesApi: import("@ydtb/tk-scope-api-client").ToolClient<{
|
|
|
1785
1785
|
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1786
1786
|
}, import("zod/v4/core").$strip>, import("@orpc/contract").Schema<{
|
|
1787
1787
|
role: {
|
|
1788
|
-
scopeId: string;
|
|
1789
1788
|
id: string;
|
|
1790
1789
|
name: string;
|
|
1791
1790
|
scope: string;
|
|
1792
1791
|
slug: string;
|
|
1793
1792
|
createdAt: Date;
|
|
1794
1793
|
updatedAt: Date;
|
|
1794
|
+
scopeId: string;
|
|
1795
|
+
createdById: string | null;
|
|
1795
1796
|
description: string | null;
|
|
1796
|
-
color: string | null;
|
|
1797
1797
|
permissions: import("@ydtb/tk-scope-extension/db").RolePermissionEntry[];
|
|
1798
1798
|
isSystem: boolean;
|
|
1799
1799
|
isDefault: boolean;
|
|
1800
1800
|
isGuest: boolean;
|
|
1801
1801
|
editable: boolean;
|
|
1802
1802
|
allChildScopes: boolean;
|
|
1803
|
+
color: string | null;
|
|
1803
1804
|
displayOrder: number;
|
|
1804
1805
|
deletedAt: Date | null;
|
|
1805
|
-
createdById: string | null;
|
|
1806
1806
|
};
|
|
1807
1807
|
}, {
|
|
1808
1808
|
role: {
|
|
1809
|
-
scopeId: string;
|
|
1810
1809
|
id: string;
|
|
1811
1810
|
name: string;
|
|
1812
1811
|
scope: string;
|
|
1813
1812
|
slug: string;
|
|
1814
1813
|
createdAt: Date;
|
|
1815
1814
|
updatedAt: Date;
|
|
1815
|
+
scopeId: string;
|
|
1816
|
+
createdById: string | null;
|
|
1816
1817
|
description: string | null;
|
|
1817
|
-
color: string | null;
|
|
1818
1818
|
permissions: import("@ydtb/tk-scope-extension/db").RolePermissionEntry[];
|
|
1819
1819
|
isSystem: boolean;
|
|
1820
1820
|
isDefault: boolean;
|
|
1821
1821
|
isGuest: boolean;
|
|
1822
1822
|
editable: boolean;
|
|
1823
1823
|
allChildScopes: boolean;
|
|
1824
|
+
color: string | null;
|
|
1824
1825
|
displayOrder: number;
|
|
1825
1826
|
deletedAt: Date | null;
|
|
1826
|
-
createdById: string | null;
|
|
1827
1827
|
};
|
|
1828
1828
|
}>, Record<never, never>, Record<never, never>>;
|
|
1829
1829
|
addMember: import("@orpc/server").DecoratedProcedure<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<{
|
|
@@ -2006,24 +2006,24 @@ export declare const invitationsApi: import("@ydtb/tk-scope-api-client").ToolCli
|
|
|
2006
2006
|
roleId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2007
2007
|
}, import("zod/v4/core").$strip>, import("@orpc/contract").Schema<{
|
|
2008
2008
|
invitation: {
|
|
2009
|
-
|
|
2009
|
+
status: string;
|
|
2010
2010
|
id: string;
|
|
2011
2011
|
createdAt: Date;
|
|
2012
|
+
scopeId: string;
|
|
2012
2013
|
email: string;
|
|
2013
2014
|
role: string;
|
|
2014
|
-
status: string;
|
|
2015
2015
|
inviterId: string | null;
|
|
2016
2016
|
roleId: string | null;
|
|
2017
2017
|
expiresAt: Date | null;
|
|
2018
2018
|
};
|
|
2019
2019
|
}, {
|
|
2020
2020
|
invitation: {
|
|
2021
|
-
|
|
2021
|
+
status: string;
|
|
2022
2022
|
id: string;
|
|
2023
2023
|
createdAt: Date;
|
|
2024
|
+
scopeId: string;
|
|
2024
2025
|
email: string;
|
|
2025
2026
|
role: string;
|
|
2026
|
-
status: string;
|
|
2027
2027
|
inviterId: string | null;
|
|
2028
2028
|
roleId: string | null;
|
|
2029
2029
|
expiresAt: Date | null;
|
|
@@ -2225,11 +2225,11 @@ export declare const invitationsApi: import("@ydtb/tk-scope-api-client").ToolCli
|
|
|
2225
2225
|
updatedAt: Date;
|
|
2226
2226
|
} | undefined;
|
|
2227
2227
|
member: {
|
|
2228
|
-
scopeId: string;
|
|
2229
2228
|
id: string;
|
|
2230
2229
|
createdAt: Date;
|
|
2231
|
-
|
|
2230
|
+
scopeId: string;
|
|
2232
2231
|
userId: string;
|
|
2232
|
+
role: string;
|
|
2233
2233
|
};
|
|
2234
2234
|
alreadyMember: boolean;
|
|
2235
2235
|
}, {
|
|
@@ -2252,11 +2252,11 @@ export declare const invitationsApi: import("@ydtb/tk-scope-api-client").ToolCli
|
|
|
2252
2252
|
updatedAt: Date;
|
|
2253
2253
|
} | undefined;
|
|
2254
2254
|
member: {
|
|
2255
|
-
scopeId: string;
|
|
2256
2255
|
id: string;
|
|
2257
2256
|
createdAt: Date;
|
|
2258
|
-
|
|
2257
|
+
scopeId: string;
|
|
2259
2258
|
userId: string;
|
|
2259
|
+
role: string;
|
|
2260
2260
|
};
|
|
2261
2261
|
alreadyMember: boolean;
|
|
2262
2262
|
}>, Record<never, never>, Record<never, never>>;
|
|
@@ -2457,27 +2457,27 @@ export declare const joinCodesApi: import("@ydtb/tk-scope-api-client").ToolClien
|
|
|
2457
2457
|
expiresAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2458
2458
|
}, import("zod/v4/core").$strip>, import("@orpc/contract").Schema<{
|
|
2459
2459
|
joinCode: {
|
|
2460
|
-
|
|
2460
|
+
status: string;
|
|
2461
2461
|
id: string;
|
|
2462
2462
|
createdAt: Date;
|
|
2463
|
-
|
|
2463
|
+
scopeId: string;
|
|
2464
2464
|
expiresAt: Date | null;
|
|
2465
|
-
createdById: string | null;
|
|
2466
|
-
label: string | null;
|
|
2467
2465
|
code: string;
|
|
2466
|
+
label: string | null;
|
|
2467
|
+
createdById: string | null;
|
|
2468
2468
|
usedBy: string | null;
|
|
2469
2469
|
usedAt: Date | null;
|
|
2470
2470
|
} | undefined;
|
|
2471
2471
|
}, {
|
|
2472
2472
|
joinCode: {
|
|
2473
|
-
|
|
2473
|
+
status: string;
|
|
2474
2474
|
id: string;
|
|
2475
2475
|
createdAt: Date;
|
|
2476
|
-
|
|
2476
|
+
scopeId: string;
|
|
2477
2477
|
expiresAt: Date | null;
|
|
2478
|
-
createdById: string | null;
|
|
2479
|
-
label: string | null;
|
|
2480
2478
|
code: string;
|
|
2479
|
+
label: string | null;
|
|
2480
|
+
createdById: string | null;
|
|
2481
2481
|
usedBy: string | null;
|
|
2482
2482
|
usedAt: Date | null;
|
|
2483
2483
|
} | undefined;
|
|
@@ -2696,9 +2696,9 @@ export declare const userApi: import("@ydtb/tk-scope-api-client").ToolClient<{
|
|
|
2696
2696
|
type: string;
|
|
2697
2697
|
id: string;
|
|
2698
2698
|
name: string;
|
|
2699
|
-
slug: string;
|
|
2699
|
+
slug: string | null;
|
|
2700
2700
|
logo: string | null;
|
|
2701
|
-
role: string;
|
|
2701
|
+
role: string | null;
|
|
2702
2702
|
parentScopeId: string | null;
|
|
2703
2703
|
}[];
|
|
2704
2704
|
lastActiveContext: {
|
|
@@ -2710,9 +2710,9 @@ export declare const userApi: import("@ydtb/tk-scope-api-client").ToolClient<{
|
|
|
2710
2710
|
type: string;
|
|
2711
2711
|
id: string;
|
|
2712
2712
|
name: string;
|
|
2713
|
-
slug: string;
|
|
2713
|
+
slug: string | null;
|
|
2714
2714
|
logo: string | null;
|
|
2715
|
-
role: string;
|
|
2715
|
+
role: string | null;
|
|
2716
2716
|
parentScopeId: string | null;
|
|
2717
2717
|
}[];
|
|
2718
2718
|
lastActiveContext: {
|
|
@@ -3121,25 +3121,25 @@ export declare const scopeChildrenApi: import("@ydtb/tk-scope-api-client").ToolC
|
|
|
3121
3121
|
slug: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3122
3122
|
}, import("zod/v4/core").$strip>, import("@orpc/contract").Schema<{
|
|
3123
3123
|
id: string;
|
|
3124
|
-
createdAt: Date;
|
|
3125
|
-
name: string;
|
|
3126
3124
|
scope: string;
|
|
3127
3125
|
parentScope: string | null;
|
|
3128
3126
|
parentScopeId: string | null;
|
|
3127
|
+
name: string;
|
|
3129
3128
|
slug: string;
|
|
3130
3129
|
logo: string | null;
|
|
3131
3130
|
metadata: unknown;
|
|
3131
|
+
createdAt: Date;
|
|
3132
3132
|
updatedAt: Date;
|
|
3133
3133
|
}, {
|
|
3134
3134
|
id: string;
|
|
3135
|
-
createdAt: Date;
|
|
3136
|
-
name: string;
|
|
3137
3135
|
scope: string;
|
|
3138
3136
|
parentScope: string | null;
|
|
3139
3137
|
parentScopeId: string | null;
|
|
3138
|
+
name: string;
|
|
3140
3139
|
slug: string;
|
|
3141
3140
|
logo: string | null;
|
|
3142
3141
|
metadata: unknown;
|
|
3142
|
+
createdAt: Date;
|
|
3143
3143
|
updatedAt: Date;
|
|
3144
3144
|
}>, Record<never, never>, Record<never, never>>;
|
|
3145
3145
|
getById: import("@orpc/server").DecoratedProcedure<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<{
|
|
@@ -3426,22 +3426,22 @@ export declare const preferencesApi: import("@ydtb/tk-scope-api-client").ToolCli
|
|
|
3426
3426
|
value: import("zod").ZodString;
|
|
3427
3427
|
}, import("zod/v4/core").$strip>, import("@orpc/contract").Schema<{
|
|
3428
3428
|
id: string;
|
|
3429
|
-
scopeId: string;
|
|
3430
|
-
createdAt: Date;
|
|
3431
3429
|
scope: string;
|
|
3430
|
+
createdAt: Date;
|
|
3432
3431
|
updatedAt: Date;
|
|
3432
|
+
scopeId: string;
|
|
3433
3433
|
userId: string;
|
|
3434
|
-
value: string;
|
|
3435
3434
|
key: string;
|
|
3435
|
+
value: string;
|
|
3436
3436
|
} | undefined, {
|
|
3437
3437
|
id: string;
|
|
3438
|
-
scopeId: string;
|
|
3439
|
-
createdAt: Date;
|
|
3440
3438
|
scope: string;
|
|
3439
|
+
createdAt: Date;
|
|
3441
3440
|
updatedAt: Date;
|
|
3441
|
+
scopeId: string;
|
|
3442
3442
|
userId: string;
|
|
3443
|
-
value: string;
|
|
3444
3443
|
key: string;
|
|
3444
|
+
value: string;
|
|
3445
3445
|
} | undefined>, Record<never, never>, Record<never, never>>;
|
|
3446
3446
|
list: import("@orpc/server").DecoratedProcedure<import("@orpc/server").MergedInitialContext<{
|
|
3447
3447
|
headers: Headers;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ydtb/tk-scope-app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Platform client shell for tk-scope — pages, layouts, dashboard chrome, onboarding, auth strategies",
|
|
6
6
|
"type": "module",
|
|
@@ -79,19 +79,19 @@
|
|
|
79
79
|
"@orpc/tanstack-query": "^1.13.14",
|
|
80
80
|
"@ydtb/core-client": "^0.13.2",
|
|
81
81
|
"@ydtb/tk-scope": "0.13.3",
|
|
82
|
-
"@ydtb/tk-scope-dashboard": "0.
|
|
82
|
+
"@ydtb/tk-scope-dashboard": "0.15.0",
|
|
83
83
|
"@ydtb/tk-scope-api-client": "0.13.0",
|
|
84
|
+
"@ydtb/tk-scope-events": "0.14.27",
|
|
84
85
|
"@ydtb/tk-scope-lib": "0.13.0",
|
|
85
|
-
"@ydtb/tk-scope-extension": "0.14.
|
|
86
|
-
"@ydtb/tk-scope-
|
|
87
|
-
"@ydtb/tk-scope-platform": "0.14.
|
|
88
|
-
"@ydtb/tk-scope-
|
|
89
|
-
"@ydtb/tk-scope-
|
|
90
|
-
"@ydtb/tk-scope-
|
|
86
|
+
"@ydtb/tk-scope-extension": "0.14.27",
|
|
87
|
+
"@ydtb/tk-scope-notifications": "0.14.27",
|
|
88
|
+
"@ydtb/tk-scope-platform": "0.14.27",
|
|
89
|
+
"@ydtb/tk-scope-onboarding": "0.14.27",
|
|
90
|
+
"@ydtb/tk-scope-auth": "0.14.27",
|
|
91
|
+
"@ydtb/tk-scope-shell": "0.14.14",
|
|
91
92
|
"@ydtb/tk-scope-ui": "0.14.14",
|
|
92
|
-
"@ydtb/tk-scope-
|
|
93
|
-
"@ydtb/tk-scope-
|
|
94
|
-
"@ydtb/tk-scope-shell": "0.14.14"
|
|
93
|
+
"@ydtb/tk-scope-search": "0.14.27",
|
|
94
|
+
"@ydtb/tk-scope-query-client": "0.14.0"
|
|
95
95
|
},
|
|
96
96
|
"peerDependencies": {
|
|
97
97
|
"@tanstack/react-query": ">=5.99.0 <6.0.0",
|