@invect/rbac 0.0.1 → 0.0.3
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/README.md +39 -77
- package/dist/backend/index.cjs +72 -40
- package/dist/backend/index.cjs.map +1 -1
- package/dist/backend/index.d.cts +49 -0
- package/dist/backend/index.d.cts.map +1 -0
- package/dist/backend/index.d.mts +49 -0
- package/dist/backend/index.d.mts.map +1 -0
- package/dist/backend/index.d.ts +1 -1
- package/dist/backend/index.d.ts.map +1 -1
- package/dist/backend/index.mjs +72 -40
- package/dist/backend/index.mjs.map +1 -1
- package/dist/backend/plugin.d.ts +12 -14
- package/dist/backend/plugin.d.ts.map +1 -1
- package/dist/frontend/components/TeamsPage.d.ts.map +1 -1
- package/dist/frontend/components/access-control/ScopeDetailPanel.d.ts.map +1 -1
- package/dist/frontend/components/access-control/index.d.ts +0 -1
- package/dist/frontend/components/access-control/index.d.ts.map +1 -1
- package/dist/frontend/index.cjs +61 -61
- package/dist/frontend/index.cjs.map +1 -1
- package/dist/frontend/index.d.cts +227 -0
- package/dist/frontend/index.d.cts.map +1 -0
- package/dist/frontend/index.d.mts +227 -0
- package/dist/frontend/index.d.mts.map +1 -0
- package/dist/frontend/index.d.ts +2 -2
- package/dist/frontend/index.d.ts.map +1 -1
- package/dist/frontend/index.mjs +7 -7
- package/dist/frontend/index.mjs.map +1 -1
- package/dist/frontend/types.d.ts +1 -1
- package/dist/shared/types.d.cts +2 -0
- package/dist/shared/types.d.mts +2 -0
- package/dist/types-D4DI2gyU.d.cts +175 -0
- package/dist/types-D4DI2gyU.d.cts.map +1 -0
- package/dist/types-DxJoguYy.d.mts +175 -0
- package/dist/types-DxJoguYy.d.mts.map +1 -0
- package/package.json +44 -46
package/dist/frontend/types.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @invect/rbac/ui — Frontend Plugin Types
|
|
3
3
|
*
|
|
4
4
|
* Types for the frontend plugin system. These are consumed by
|
|
5
|
-
* @invect/
|
|
5
|
+
* @invect/ui to render plugin-contributed UI.
|
|
6
6
|
*/
|
|
7
7
|
import type { ComponentType, ReactNode } from 'react';
|
|
8
8
|
/**
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { C as ScopeTreeResponse, D as UpdateTeamRequest, E as TeamWithMembers, S as ScopeTreeNode, T as TeamMember, _ as PluginUIPage, a as EffectiveAccessRecord, b as RolePermissionEntry, c as FlowAccessRecord, d as GrantScopeAccessRequest, f as MovePreviewAccessChange, g as PluginUIManifest, h as PluginUIHeaderAction, i as CreateTeamRequest, l as FlowSummary, m as MovePreviewResponse, n as AddTeamMemberRequest, o as EffectiveFlowAccessResponse, p as MovePreviewRequest, r as AuthMeResponse, s as FlowAccessPermission, t as AccessibleFlowsResponse, u as GrantFlowAccessRequest, v as PluginUIPanelTab, w as Team, x as ScopeAccessRecord, y as PluginUISidebarItem } from "../types-D4DI2gyU.cjs";
|
|
2
|
+
export { AccessibleFlowsResponse, AddTeamMemberRequest, AuthMeResponse, CreateTeamRequest, EffectiveAccessRecord, EffectiveFlowAccessResponse, FlowAccessPermission, FlowAccessRecord, FlowSummary, GrantFlowAccessRequest, GrantScopeAccessRequest, MovePreviewAccessChange, MovePreviewRequest, MovePreviewResponse, PluginUIHeaderAction, PluginUIManifest, PluginUIPage, PluginUIPanelTab, PluginUISidebarItem, RolePermissionEntry, ScopeAccessRecord, ScopeTreeNode, ScopeTreeResponse, Team, TeamMember, TeamWithMembers, UpdateTeamRequest };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { C as ScopeTreeResponse, D as UpdateTeamRequest, E as TeamWithMembers, S as ScopeTreeNode, T as TeamMember, _ as PluginUIPage, a as EffectiveAccessRecord, b as RolePermissionEntry, c as FlowAccessRecord, d as GrantScopeAccessRequest, f as MovePreviewAccessChange, g as PluginUIManifest, h as PluginUIHeaderAction, i as CreateTeamRequest, l as FlowSummary, m as MovePreviewResponse, n as AddTeamMemberRequest, o as EffectiveFlowAccessResponse, p as MovePreviewRequest, r as AuthMeResponse, s as FlowAccessPermission, t as AccessibleFlowsResponse, u as GrantFlowAccessRequest, v as PluginUIPanelTab, w as Team, x as ScopeAccessRecord, y as PluginUISidebarItem } from "../types-DxJoguYy.mjs";
|
|
2
|
+
export { AccessibleFlowsResponse, AddTeamMemberRequest, AuthMeResponse, CreateTeamRequest, EffectiveAccessRecord, EffectiveFlowAccessResponse, FlowAccessPermission, FlowAccessRecord, FlowSummary, GrantFlowAccessRequest, GrantScopeAccessRequest, MovePreviewAccessChange, MovePreviewRequest, MovePreviewResponse, PluginUIHeaderAction, PluginUIManifest, PluginUIPage, PluginUIPanelTab, PluginUISidebarItem, RolePermissionEntry, ScopeAccessRecord, ScopeTreeNode, ScopeTreeResponse, Team, TeamMember, TeamWithMembers, UpdateTeamRequest };
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
//#region src/shared/types.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* @invect/rbac — Shared Types
|
|
4
|
+
*
|
|
5
|
+
* Serializable types shared between backend and frontend.
|
|
6
|
+
* No runtime code, no React, no Node.js dependencies.
|
|
7
|
+
*/
|
|
8
|
+
interface Team {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
description?: string | null;
|
|
12
|
+
parentId?: string | null;
|
|
13
|
+
createdBy?: string | null;
|
|
14
|
+
createdAt: string;
|
|
15
|
+
updatedAt?: string | null;
|
|
16
|
+
}
|
|
17
|
+
interface TeamMember {
|
|
18
|
+
id: string;
|
|
19
|
+
teamId: string;
|
|
20
|
+
userId: string;
|
|
21
|
+
createdAt: string;
|
|
22
|
+
}
|
|
23
|
+
interface CreateTeamRequest {
|
|
24
|
+
name: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
parentId?: string | null;
|
|
27
|
+
}
|
|
28
|
+
interface UpdateTeamRequest {
|
|
29
|
+
name?: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
parentId?: string | null;
|
|
32
|
+
}
|
|
33
|
+
interface AddTeamMemberRequest {
|
|
34
|
+
userId: string;
|
|
35
|
+
}
|
|
36
|
+
interface TeamWithMembers extends Team {
|
|
37
|
+
members: TeamMember[];
|
|
38
|
+
}
|
|
39
|
+
interface FlowSummary {
|
|
40
|
+
id: string;
|
|
41
|
+
name: string;
|
|
42
|
+
scopeId?: string | null;
|
|
43
|
+
}
|
|
44
|
+
interface ScopeTreeNode extends Team {
|
|
45
|
+
children: ScopeTreeNode[];
|
|
46
|
+
flows: FlowSummary[];
|
|
47
|
+
directAccessCount: number;
|
|
48
|
+
memberCount: number;
|
|
49
|
+
teamPermission?: FlowAccessPermission | null;
|
|
50
|
+
}
|
|
51
|
+
interface ScopeTreeResponse {
|
|
52
|
+
scopes: ScopeTreeNode[];
|
|
53
|
+
unscopedFlows: FlowSummary[];
|
|
54
|
+
}
|
|
55
|
+
type FlowAccessPermission = 'owner' | 'editor' | 'operator' | 'viewer';
|
|
56
|
+
interface FlowAccessRecord {
|
|
57
|
+
id: string;
|
|
58
|
+
flowId: string;
|
|
59
|
+
userId?: string | null;
|
|
60
|
+
teamId?: string | null;
|
|
61
|
+
permission: FlowAccessPermission;
|
|
62
|
+
grantedBy?: string | null;
|
|
63
|
+
grantedAt: string;
|
|
64
|
+
expiresAt?: string | null;
|
|
65
|
+
}
|
|
66
|
+
interface ScopeAccessRecord {
|
|
67
|
+
id: string;
|
|
68
|
+
scopeId: string;
|
|
69
|
+
userId?: string | null;
|
|
70
|
+
teamId?: string | null;
|
|
71
|
+
permission: FlowAccessPermission;
|
|
72
|
+
grantedBy?: string | null;
|
|
73
|
+
grantedAt: string;
|
|
74
|
+
}
|
|
75
|
+
interface EffectiveAccessRecord extends FlowAccessRecord {
|
|
76
|
+
source: 'direct' | 'inherited';
|
|
77
|
+
scopeId?: string | null;
|
|
78
|
+
scopeName?: string | null;
|
|
79
|
+
}
|
|
80
|
+
interface GrantFlowAccessRequest {
|
|
81
|
+
userId?: string;
|
|
82
|
+
teamId?: string;
|
|
83
|
+
permission: FlowAccessPermission;
|
|
84
|
+
expiresAt?: string;
|
|
85
|
+
}
|
|
86
|
+
interface GrantScopeAccessRequest {
|
|
87
|
+
userId?: string;
|
|
88
|
+
teamId?: string;
|
|
89
|
+
permission: FlowAccessPermission;
|
|
90
|
+
}
|
|
91
|
+
interface AccessibleFlowsResponse {
|
|
92
|
+
flowIds: string[];
|
|
93
|
+
permissions: Record<string, FlowAccessPermission | null>;
|
|
94
|
+
isAdmin?: boolean;
|
|
95
|
+
}
|
|
96
|
+
interface EffectiveFlowAccessResponse {
|
|
97
|
+
flowId: string;
|
|
98
|
+
scopeId?: string | null;
|
|
99
|
+
records: EffectiveAccessRecord[];
|
|
100
|
+
}
|
|
101
|
+
interface MovePreviewRequest {
|
|
102
|
+
type: 'flow' | 'scope';
|
|
103
|
+
id: string;
|
|
104
|
+
targetScopeId: string | null;
|
|
105
|
+
}
|
|
106
|
+
interface MovePreviewAccessChange {
|
|
107
|
+
userId?: string;
|
|
108
|
+
teamId?: string;
|
|
109
|
+
name: string;
|
|
110
|
+
permission: FlowAccessPermission;
|
|
111
|
+
source: string;
|
|
112
|
+
}
|
|
113
|
+
interface MovePreviewResponse {
|
|
114
|
+
item: {
|
|
115
|
+
id: string;
|
|
116
|
+
name: string;
|
|
117
|
+
type: 'flow' | 'scope';
|
|
118
|
+
};
|
|
119
|
+
target: {
|
|
120
|
+
id: string | null;
|
|
121
|
+
name: string;
|
|
122
|
+
path: string[];
|
|
123
|
+
};
|
|
124
|
+
affectedFlows: number;
|
|
125
|
+
accessChanges: {
|
|
126
|
+
gained: MovePreviewAccessChange[];
|
|
127
|
+
unchanged: number;
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
type RolePermissionEntry = {
|
|
131
|
+
role: string;
|
|
132
|
+
permissions: string[];
|
|
133
|
+
};
|
|
134
|
+
interface AuthMeResponse {
|
|
135
|
+
identity: {
|
|
136
|
+
id: string;
|
|
137
|
+
name?: string;
|
|
138
|
+
role?: string;
|
|
139
|
+
resolvedRole: string | null;
|
|
140
|
+
} | null;
|
|
141
|
+
permissions: string[];
|
|
142
|
+
isAuthenticated: boolean;
|
|
143
|
+
}
|
|
144
|
+
interface PluginUIManifest {
|
|
145
|
+
sidebar?: PluginUISidebarItem[];
|
|
146
|
+
pages?: PluginUIPage[];
|
|
147
|
+
panelTabs?: PluginUIPanelTab[];
|
|
148
|
+
headerActions?: PluginUIHeaderAction[];
|
|
149
|
+
}
|
|
150
|
+
interface PluginUISidebarItem {
|
|
151
|
+
label: string;
|
|
152
|
+
/** Lucide icon name as string (e.g. 'Shield', 'Users') */
|
|
153
|
+
icon: string;
|
|
154
|
+
path: string;
|
|
155
|
+
permission?: string;
|
|
156
|
+
}
|
|
157
|
+
interface PluginUIPage {
|
|
158
|
+
path: string;
|
|
159
|
+
componentId: string;
|
|
160
|
+
title?: string;
|
|
161
|
+
}
|
|
162
|
+
interface PluginUIPanelTab {
|
|
163
|
+
context: string;
|
|
164
|
+
label: string;
|
|
165
|
+
componentId: string;
|
|
166
|
+
permission?: string;
|
|
167
|
+
}
|
|
168
|
+
interface PluginUIHeaderAction {
|
|
169
|
+
context: string;
|
|
170
|
+
componentId: string;
|
|
171
|
+
permission?: string;
|
|
172
|
+
}
|
|
173
|
+
//#endregion
|
|
174
|
+
export { ScopeTreeResponse as C, UpdateTeamRequest as D, TeamWithMembers as E, ScopeTreeNode as S, TeamMember as T, PluginUIPage as _, EffectiveAccessRecord as a, RolePermissionEntry as b, FlowAccessRecord as c, GrantScopeAccessRequest as d, MovePreviewAccessChange as f, PluginUIManifest as g, PluginUIHeaderAction as h, CreateTeamRequest as i, FlowSummary as l, MovePreviewResponse as m, AddTeamMemberRequest as n, EffectiveFlowAccessResponse as o, MovePreviewRequest as p, AuthMeResponse as r, FlowAccessPermission as s, AccessibleFlowsResponse as t, GrantFlowAccessRequest as u, PluginUIPanelTab as v, Team as w, ScopeAccessRecord as x, PluginUISidebarItem as y };
|
|
175
|
+
//# sourceMappingURL=types-D4DI2gyU.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-D4DI2gyU.d.cts","names":[],"sources":["../src/shared/types.ts"],"mappings":";;AAWA;;;;;UAAiB,IAAA;EACf,EAAA;EACA,IAAA;EACA,WAAA;EACA,QAAA;EACA,SAAA;EACA,SAAA;EACA,SAAA;AAAA;AAAA,UAGe,UAAA;EACf,EAAA;EACA,MAAA;EACA,MAAA;EACA,SAAA;AAAA;AAAA,UAGe,iBAAA;EACf,IAAA;EACA,WAAA;EACA,QAAA;AAAA;AAAA,UAGe,iBAAA;EACf,IAAA;EACA,WAAA;EACA,QAAA;AAAA;AAAA,UAGe,oBAAA;EACf,MAAA;AAAA;AAAA,UAGe,eAAA,SAAwB,IAAA;EACvC,OAAA,EAAS,UAAA;AAAA;AAAA,UAGM,WAAA;EACf,EAAA;EACA,IAAA;EACA,OAAA;AAAA;AAAA,UAGe,aAAA,SAAsB,IAAA;EACrC,QAAA,EAAU,aAAA;EACV,KAAA,EAAO,WAAA;EACP,iBAAA;EACA,WAAA;EACA,cAAA,GAAiB,oBAAA;AAAA;AAAA,UAGF,iBAAA;EACf,MAAA,EAAQ,aAAA;EACR,aAAA,EAAe,WAAA;AAAA;AAAA,KAOL,oBAAA;AAAA,UAEK,gBAAA;EACf,EAAA;EACA,MAAA;EACA,MAAA;EACA,MAAA;EACA,UAAA,EAAY,oBAAA;EACZ,SAAA;EACA,SAAA;EACA,SAAA;AAAA;AAAA,UAGe,iBAAA;EACf,EAAA;EACA,OAAA;EACA,MAAA;EACA,MAAA;EACA,UAAA,EAAY,oBAAA;EACZ,SAAA;EACA,SAAA;AAAA;AAAA,UAGe,qBAAA,SAA8B,gBAAA;EAC7C,MAAA;EACA,OAAA;EACA,SAAA;AAAA;AAAA,UAGe,sBAAA;EACf,MAAA;EACA,MAAA;EACA,UAAA,EAAY,oBAAA;EACZ,SAAA;AAAA;AAAA,UAGe,uBAAA;EACf,MAAA;EACA,MAAA;EACA,UAAA,EAAY,oBAAA;AAAA;AAAA,UAGG,uBAAA;EACf,OAAA;EACA,WAAA,EAAa,MAAA,SAAe,oBAAA;EAC5B,OAAA;AAAA;AAAA,UAGe,2BAAA;EACf,MAAA;EACA,OAAA;EACA,OAAA,EAAS,qBAAA;AAAA;AAAA,UAGM,kBAAA;EACf,IAAA;EACA,EAAA;EACA,aAAA;AAAA;AAAA,UAGe,uBAAA;EACf,MAAA;EACA,MAAA;EACA,IAAA;EACA,UAAA,EAAY,oBAAA;EACZ,MAAA;AAAA;AAAA,UAGe,mBAAA;EACf,IAAA;IACE,EAAA;IACA,IAAA;IACA,IAAA;EAAA;EAEF,MAAA;IACE,EAAA;IACA,IAAA;IACA,IAAA;EAAA;EAEF,aAAA;EACA,aAAA;IACE,MAAA,EAAQ,uBAAA;IACR,SAAA;EAAA;AAAA;AAAA,KAQQ,mBAAA;EACV,IAAA;EACA,WAAA;AAAA;AAAA,UAOe,cAAA;EACf,QAAA;IACE,EAAA;IACA,IAAA;IACA,IAAA;IACA,YAAA;EAAA;EAEF,WAAA;EACA,eAAA;AAAA;AAAA,UAOe,gBAAA;EACf,OAAA,GAAU,mBAAA;EACV,KAAA,GAAQ,YAAA;EACR,SAAA,GAAY,gBAAA;EACZ,aAAA,GAAgB,oBAAA;AAAA;AAAA,UAGD,mBAAA;EACf,KAAA;EAtFe;EAwFf,IAAA;EACA,IAAA;EACA,UAAA;AAAA;AAAA,UAGe,YAAA;EACf,IAAA;EACA,WAAA;EACA,KAAA;AAAA;AAAA,UAGe,gBAAA;EACf,OAAA;EACA,KAAA;EACA,WAAA;EACA,UAAA;AAAA;AAAA,UAGe,oBAAA;EACf,OAAA;EACA,WAAA;EACA,UAAA;AAAA"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
//#region src/shared/types.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* @invect/rbac — Shared Types
|
|
4
|
+
*
|
|
5
|
+
* Serializable types shared between backend and frontend.
|
|
6
|
+
* No runtime code, no React, no Node.js dependencies.
|
|
7
|
+
*/
|
|
8
|
+
interface Team {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
description?: string | null;
|
|
12
|
+
parentId?: string | null;
|
|
13
|
+
createdBy?: string | null;
|
|
14
|
+
createdAt: string;
|
|
15
|
+
updatedAt?: string | null;
|
|
16
|
+
}
|
|
17
|
+
interface TeamMember {
|
|
18
|
+
id: string;
|
|
19
|
+
teamId: string;
|
|
20
|
+
userId: string;
|
|
21
|
+
createdAt: string;
|
|
22
|
+
}
|
|
23
|
+
interface CreateTeamRequest {
|
|
24
|
+
name: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
parentId?: string | null;
|
|
27
|
+
}
|
|
28
|
+
interface UpdateTeamRequest {
|
|
29
|
+
name?: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
parentId?: string | null;
|
|
32
|
+
}
|
|
33
|
+
interface AddTeamMemberRequest {
|
|
34
|
+
userId: string;
|
|
35
|
+
}
|
|
36
|
+
interface TeamWithMembers extends Team {
|
|
37
|
+
members: TeamMember[];
|
|
38
|
+
}
|
|
39
|
+
interface FlowSummary {
|
|
40
|
+
id: string;
|
|
41
|
+
name: string;
|
|
42
|
+
scopeId?: string | null;
|
|
43
|
+
}
|
|
44
|
+
interface ScopeTreeNode extends Team {
|
|
45
|
+
children: ScopeTreeNode[];
|
|
46
|
+
flows: FlowSummary[];
|
|
47
|
+
directAccessCount: number;
|
|
48
|
+
memberCount: number;
|
|
49
|
+
teamPermission?: FlowAccessPermission | null;
|
|
50
|
+
}
|
|
51
|
+
interface ScopeTreeResponse {
|
|
52
|
+
scopes: ScopeTreeNode[];
|
|
53
|
+
unscopedFlows: FlowSummary[];
|
|
54
|
+
}
|
|
55
|
+
type FlowAccessPermission = 'owner' | 'editor' | 'operator' | 'viewer';
|
|
56
|
+
interface FlowAccessRecord {
|
|
57
|
+
id: string;
|
|
58
|
+
flowId: string;
|
|
59
|
+
userId?: string | null;
|
|
60
|
+
teamId?: string | null;
|
|
61
|
+
permission: FlowAccessPermission;
|
|
62
|
+
grantedBy?: string | null;
|
|
63
|
+
grantedAt: string;
|
|
64
|
+
expiresAt?: string | null;
|
|
65
|
+
}
|
|
66
|
+
interface ScopeAccessRecord {
|
|
67
|
+
id: string;
|
|
68
|
+
scopeId: string;
|
|
69
|
+
userId?: string | null;
|
|
70
|
+
teamId?: string | null;
|
|
71
|
+
permission: FlowAccessPermission;
|
|
72
|
+
grantedBy?: string | null;
|
|
73
|
+
grantedAt: string;
|
|
74
|
+
}
|
|
75
|
+
interface EffectiveAccessRecord extends FlowAccessRecord {
|
|
76
|
+
source: 'direct' | 'inherited';
|
|
77
|
+
scopeId?: string | null;
|
|
78
|
+
scopeName?: string | null;
|
|
79
|
+
}
|
|
80
|
+
interface GrantFlowAccessRequest {
|
|
81
|
+
userId?: string;
|
|
82
|
+
teamId?: string;
|
|
83
|
+
permission: FlowAccessPermission;
|
|
84
|
+
expiresAt?: string;
|
|
85
|
+
}
|
|
86
|
+
interface GrantScopeAccessRequest {
|
|
87
|
+
userId?: string;
|
|
88
|
+
teamId?: string;
|
|
89
|
+
permission: FlowAccessPermission;
|
|
90
|
+
}
|
|
91
|
+
interface AccessibleFlowsResponse {
|
|
92
|
+
flowIds: string[];
|
|
93
|
+
permissions: Record<string, FlowAccessPermission | null>;
|
|
94
|
+
isAdmin?: boolean;
|
|
95
|
+
}
|
|
96
|
+
interface EffectiveFlowAccessResponse {
|
|
97
|
+
flowId: string;
|
|
98
|
+
scopeId?: string | null;
|
|
99
|
+
records: EffectiveAccessRecord[];
|
|
100
|
+
}
|
|
101
|
+
interface MovePreviewRequest {
|
|
102
|
+
type: 'flow' | 'scope';
|
|
103
|
+
id: string;
|
|
104
|
+
targetScopeId: string | null;
|
|
105
|
+
}
|
|
106
|
+
interface MovePreviewAccessChange {
|
|
107
|
+
userId?: string;
|
|
108
|
+
teamId?: string;
|
|
109
|
+
name: string;
|
|
110
|
+
permission: FlowAccessPermission;
|
|
111
|
+
source: string;
|
|
112
|
+
}
|
|
113
|
+
interface MovePreviewResponse {
|
|
114
|
+
item: {
|
|
115
|
+
id: string;
|
|
116
|
+
name: string;
|
|
117
|
+
type: 'flow' | 'scope';
|
|
118
|
+
};
|
|
119
|
+
target: {
|
|
120
|
+
id: string | null;
|
|
121
|
+
name: string;
|
|
122
|
+
path: string[];
|
|
123
|
+
};
|
|
124
|
+
affectedFlows: number;
|
|
125
|
+
accessChanges: {
|
|
126
|
+
gained: MovePreviewAccessChange[];
|
|
127
|
+
unchanged: number;
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
type RolePermissionEntry = {
|
|
131
|
+
role: string;
|
|
132
|
+
permissions: string[];
|
|
133
|
+
};
|
|
134
|
+
interface AuthMeResponse {
|
|
135
|
+
identity: {
|
|
136
|
+
id: string;
|
|
137
|
+
name?: string;
|
|
138
|
+
role?: string;
|
|
139
|
+
resolvedRole: string | null;
|
|
140
|
+
} | null;
|
|
141
|
+
permissions: string[];
|
|
142
|
+
isAuthenticated: boolean;
|
|
143
|
+
}
|
|
144
|
+
interface PluginUIManifest {
|
|
145
|
+
sidebar?: PluginUISidebarItem[];
|
|
146
|
+
pages?: PluginUIPage[];
|
|
147
|
+
panelTabs?: PluginUIPanelTab[];
|
|
148
|
+
headerActions?: PluginUIHeaderAction[];
|
|
149
|
+
}
|
|
150
|
+
interface PluginUISidebarItem {
|
|
151
|
+
label: string;
|
|
152
|
+
/** Lucide icon name as string (e.g. 'Shield', 'Users') */
|
|
153
|
+
icon: string;
|
|
154
|
+
path: string;
|
|
155
|
+
permission?: string;
|
|
156
|
+
}
|
|
157
|
+
interface PluginUIPage {
|
|
158
|
+
path: string;
|
|
159
|
+
componentId: string;
|
|
160
|
+
title?: string;
|
|
161
|
+
}
|
|
162
|
+
interface PluginUIPanelTab {
|
|
163
|
+
context: string;
|
|
164
|
+
label: string;
|
|
165
|
+
componentId: string;
|
|
166
|
+
permission?: string;
|
|
167
|
+
}
|
|
168
|
+
interface PluginUIHeaderAction {
|
|
169
|
+
context: string;
|
|
170
|
+
componentId: string;
|
|
171
|
+
permission?: string;
|
|
172
|
+
}
|
|
173
|
+
//#endregion
|
|
174
|
+
export { ScopeTreeResponse as C, UpdateTeamRequest as D, TeamWithMembers as E, ScopeTreeNode as S, TeamMember as T, PluginUIPage as _, EffectiveAccessRecord as a, RolePermissionEntry as b, FlowAccessRecord as c, GrantScopeAccessRequest as d, MovePreviewAccessChange as f, PluginUIManifest as g, PluginUIHeaderAction as h, CreateTeamRequest as i, FlowSummary as l, MovePreviewResponse as m, AddTeamMemberRequest as n, EffectiveFlowAccessResponse as o, MovePreviewRequest as p, AuthMeResponse as r, FlowAccessPermission as s, AccessibleFlowsResponse as t, GrantFlowAccessRequest as u, PluginUIPanelTab as v, Team as w, ScopeAccessRecord as x, PluginUISidebarItem as y };
|
|
175
|
+
//# sourceMappingURL=types-DxJoguYy.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-DxJoguYy.d.mts","names":[],"sources":["../src/shared/types.ts"],"mappings":";;AAWA;;;;;UAAiB,IAAA;EACf,EAAA;EACA,IAAA;EACA,WAAA;EACA,QAAA;EACA,SAAA;EACA,SAAA;EACA,SAAA;AAAA;AAAA,UAGe,UAAA;EACf,EAAA;EACA,MAAA;EACA,MAAA;EACA,SAAA;AAAA;AAAA,UAGe,iBAAA;EACf,IAAA;EACA,WAAA;EACA,QAAA;AAAA;AAAA,UAGe,iBAAA;EACf,IAAA;EACA,WAAA;EACA,QAAA;AAAA;AAAA,UAGe,oBAAA;EACf,MAAA;AAAA;AAAA,UAGe,eAAA,SAAwB,IAAA;EACvC,OAAA,EAAS,UAAA;AAAA;AAAA,UAGM,WAAA;EACf,EAAA;EACA,IAAA;EACA,OAAA;AAAA;AAAA,UAGe,aAAA,SAAsB,IAAA;EACrC,QAAA,EAAU,aAAA;EACV,KAAA,EAAO,WAAA;EACP,iBAAA;EACA,WAAA;EACA,cAAA,GAAiB,oBAAA;AAAA;AAAA,UAGF,iBAAA;EACf,MAAA,EAAQ,aAAA;EACR,aAAA,EAAe,WAAA;AAAA;AAAA,KAOL,oBAAA;AAAA,UAEK,gBAAA;EACf,EAAA;EACA,MAAA;EACA,MAAA;EACA,MAAA;EACA,UAAA,EAAY,oBAAA;EACZ,SAAA;EACA,SAAA;EACA,SAAA;AAAA;AAAA,UAGe,iBAAA;EACf,EAAA;EACA,OAAA;EACA,MAAA;EACA,MAAA;EACA,UAAA,EAAY,oBAAA;EACZ,SAAA;EACA,SAAA;AAAA;AAAA,UAGe,qBAAA,SAA8B,gBAAA;EAC7C,MAAA;EACA,OAAA;EACA,SAAA;AAAA;AAAA,UAGe,sBAAA;EACf,MAAA;EACA,MAAA;EACA,UAAA,EAAY,oBAAA;EACZ,SAAA;AAAA;AAAA,UAGe,uBAAA;EACf,MAAA;EACA,MAAA;EACA,UAAA,EAAY,oBAAA;AAAA;AAAA,UAGG,uBAAA;EACf,OAAA;EACA,WAAA,EAAa,MAAA,SAAe,oBAAA;EAC5B,OAAA;AAAA;AAAA,UAGe,2BAAA;EACf,MAAA;EACA,OAAA;EACA,OAAA,EAAS,qBAAA;AAAA;AAAA,UAGM,kBAAA;EACf,IAAA;EACA,EAAA;EACA,aAAA;AAAA;AAAA,UAGe,uBAAA;EACf,MAAA;EACA,MAAA;EACA,IAAA;EACA,UAAA,EAAY,oBAAA;EACZ,MAAA;AAAA;AAAA,UAGe,mBAAA;EACf,IAAA;IACE,EAAA;IACA,IAAA;IACA,IAAA;EAAA;EAEF,MAAA;IACE,EAAA;IACA,IAAA;IACA,IAAA;EAAA;EAEF,aAAA;EACA,aAAA;IACE,MAAA,EAAQ,uBAAA;IACR,SAAA;EAAA;AAAA;AAAA,KAQQ,mBAAA;EACV,IAAA;EACA,WAAA;AAAA;AAAA,UAOe,cAAA;EACf,QAAA;IACE,EAAA;IACA,IAAA;IACA,IAAA;IACA,YAAA;EAAA;EAEF,WAAA;EACA,eAAA;AAAA;AAAA,UAOe,gBAAA;EACf,OAAA,GAAU,mBAAA;EACV,KAAA,GAAQ,YAAA;EACR,SAAA,GAAY,gBAAA;EACZ,aAAA,GAAgB,oBAAA;AAAA;AAAA,UAGD,mBAAA;EACf,KAAA;EAtFe;EAwFf,IAAA;EACA,IAAA;EACA,UAAA;AAAA;AAAA,UAGe,YAAA;EACf,IAAA;EACA,WAAA;EACA,KAAA;AAAA;AAAA,UAGe,gBAAA;EACf,OAAA;EACA,KAAA;EACA,WAAA;EACA,UAAA;AAAA;AAAA,UAGe,oBAAA;EACf,OAAA;EACA,WAAA;EACA,UAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,48 +1,75 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@invect/rbac",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "RBAC plugin for Invect — adds role-based access control UI, flow sharing, and permission management. Requires @invect/user-auth.",
|
|
5
|
-
"
|
|
5
|
+
"homepage": "https://invect.dev",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/robase/invect/issues"
|
|
8
|
+
},
|
|
6
9
|
"license": "MIT",
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
"author": "robase <team@invect.dev>",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/robase/invect.git",
|
|
14
|
+
"directory": "pkg/plugins/rbac"
|
|
15
|
+
},
|
|
11
16
|
"files": [
|
|
12
17
|
"dist/**/*"
|
|
13
18
|
],
|
|
19
|
+
"type": "module",
|
|
20
|
+
"main": "dist/backend/index.cjs",
|
|
21
|
+
"module": "dist/backend/index.mjs",
|
|
22
|
+
"types": "dist/backend/index.d.mts",
|
|
14
23
|
"exports": {
|
|
15
24
|
".": {
|
|
16
|
-
"types": "./dist/backend/index.d.
|
|
25
|
+
"types": "./dist/backend/index.d.mts",
|
|
17
26
|
"import": "./dist/backend/index.mjs",
|
|
18
27
|
"require": "./dist/backend/index.cjs"
|
|
19
28
|
},
|
|
20
29
|
"./ui": {
|
|
21
|
-
"types": "./dist/frontend/index.d.
|
|
30
|
+
"types": "./dist/frontend/index.d.mts",
|
|
22
31
|
"import": "./dist/frontend/index.mjs",
|
|
23
32
|
"require": "./dist/frontend/index.cjs"
|
|
24
33
|
},
|
|
25
34
|
"./types": {
|
|
26
|
-
"types": "./dist/shared/types.d.
|
|
35
|
+
"types": "./dist/shared/types.d.mts",
|
|
27
36
|
"import": "./dist/shared/types.mjs",
|
|
28
37
|
"require": "./dist/shared/types.cjs"
|
|
29
38
|
}
|
|
30
39
|
},
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public"
|
|
42
|
+
},
|
|
31
43
|
"dependencies": {
|
|
32
|
-
"@invect/core": "0.0.
|
|
44
|
+
"@invect/core": "0.0.3"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@tanstack/react-query": "^5.0.0",
|
|
48
|
+
"@types/node": "^20.11.20",
|
|
49
|
+
"@types/react": "18.3.7",
|
|
50
|
+
"@types/react-dom": "18.3.7",
|
|
51
|
+
"lucide-react": "^0.475.0",
|
|
52
|
+
"react": "^18.3.1",
|
|
53
|
+
"react-dom": "^18.3.1",
|
|
54
|
+
"tsdown": "^0.21.1",
|
|
55
|
+
"typescript": "^5.3.3",
|
|
56
|
+
"vitest": "^3.2.4",
|
|
57
|
+
"zustand": "^4.5.7",
|
|
58
|
+
"@invect/user-auth": "0.0.3",
|
|
59
|
+
"@invect/ui": "0.0.3"
|
|
33
60
|
},
|
|
34
61
|
"peerDependencies": {
|
|
35
|
-
"@invect/
|
|
36
|
-
"@invect/
|
|
37
|
-
"react": ">=18.0.0",
|
|
38
|
-
"react-dom": ">=18.0.0",
|
|
62
|
+
"@invect/ui": ">=0.0.3",
|
|
63
|
+
"@invect/user-auth": ">=0.0.3",
|
|
39
64
|
"@tanstack/react-query": ">=5.0.0",
|
|
40
65
|
"clsx": ">=2.0.0",
|
|
66
|
+
"react": ">=18.0.0",
|
|
67
|
+
"react-dom": ">=18.0.0",
|
|
41
68
|
"tailwind-merge": ">=2.0.0",
|
|
42
69
|
"zustand": ">=4.0.0"
|
|
43
70
|
},
|
|
44
71
|
"peerDependenciesMeta": {
|
|
45
|
-
"@invect/
|
|
72
|
+
"@invect/ui": {
|
|
46
73
|
"optional": true
|
|
47
74
|
},
|
|
48
75
|
"clsx": {
|
|
@@ -64,43 +91,14 @@
|
|
|
64
91
|
"optional": true
|
|
65
92
|
}
|
|
66
93
|
},
|
|
67
|
-
"devDependencies": {
|
|
68
|
-
"@tanstack/react-query": "^5.0.0",
|
|
69
|
-
"@types/node": "^20.11.20",
|
|
70
|
-
"@types/react": "18.3.7",
|
|
71
|
-
"@types/react-dom": "18.3.7",
|
|
72
|
-
"lucide-react": "^0.475.0",
|
|
73
|
-
"prettier": "^3.6.2",
|
|
74
|
-
"react": "^18.3.1",
|
|
75
|
-
"react-dom": "^18.3.1",
|
|
76
|
-
"tsdown": "^0.21.1",
|
|
77
|
-
"typescript": "^5.3.3",
|
|
78
|
-
"vitest": "^1.2.2",
|
|
79
|
-
"zustand": "^4.5.7",
|
|
80
|
-
"@invect/user-auth": "0.0.1",
|
|
81
|
-
"@invect/frontend": "0.0.1"
|
|
82
|
-
},
|
|
83
|
-
"repository": {
|
|
84
|
-
"type": "git",
|
|
85
|
-
"url": "https://github.com/robase/invect.git",
|
|
86
|
-
"directory": "pkg/plugins/rbac"
|
|
87
|
-
},
|
|
88
|
-
"bugs": {
|
|
89
|
-
"url": "https://github.com/robase/invect/issues"
|
|
90
|
-
},
|
|
91
|
-
"homepage": "https://invect.dev",
|
|
92
|
-
"publishConfig": {
|
|
93
|
-
"access": "public"
|
|
94
|
-
},
|
|
95
94
|
"scripts": {
|
|
96
95
|
"build": "tsdown && tsc --emitDeclarationOnly --outDir dist",
|
|
97
96
|
"build:w": "tsdown --watch",
|
|
98
97
|
"dev": "tsdown --watch",
|
|
99
98
|
"clean": "rm -rf dist",
|
|
100
|
-
"format": "
|
|
99
|
+
"format": "oxfmt",
|
|
101
100
|
"typecheck": "tsc --noEmit",
|
|
102
|
-
"lint": "
|
|
103
|
-
"lint:fix": "eslint src --fix",
|
|
101
|
+
"lint": "oxlint --fix",
|
|
104
102
|
"test": "echo \"No tests configured\"",
|
|
105
103
|
"test:watch": "vitest --watch"
|
|
106
104
|
}
|