@n8n/stores 2.32.2 → 2.34.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/cloudPlan.store.cjs +7 -0
- package/dist/cloudPlan.store.d.cts +534 -0
- package/dist/cloudPlan.store.d.mts +534 -0
- package/dist/cloudPlan.store.mjs +7 -0
- package/dist/cloudPlan2.store.cjs +247 -0
- package/dist/cloudPlan2.store.cjs.map +1 -0
- package/dist/cloudPlan2.store.mjs +242 -0
- package/dist/cloudPlan2.store.mjs.map +1 -0
- package/dist/composables/useBasePageRedirectionHelper.cjs +87 -0
- package/dist/composables/useBasePageRedirectionHelper.cjs.map +1 -0
- package/dist/composables/useBasePageRedirectionHelper.d.cts +16 -0
- package/dist/composables/useBasePageRedirectionHelper.d.mts +16 -0
- package/dist/composables/useBasePageRedirectionHelper.mjs +87 -0
- package/dist/composables/useBasePageRedirectionHelper.mjs.map +1 -0
- package/dist/constants2.cjs +2 -0
- package/dist/constants2.cjs.map +1 -1
- package/dist/constants2.d.cts +2 -0
- package/dist/constants2.d.mts +2 -0
- package/dist/constants2.mjs +2 -0
- package/dist/constants2.mjs.map +1 -1
- package/dist/invitation.api.cjs +4 -0
- package/dist/invitation.api.d.cts +2 -0
- package/dist/invitation.api.d.mts +2 -0
- package/dist/invitation.api.mjs +3 -0
- package/dist/invitation2.api.cjs +26 -0
- package/dist/invitation2.api.cjs.map +1 -0
- package/dist/invitation2.api.d.cts +30 -0
- package/dist/invitation2.api.d.mts +30 -0
- package/dist/invitation2.api.mjs +14 -0
- package/dist/invitation2.api.mjs.map +1 -0
- package/dist/modalOpeners.cjs +0 -0
- package/dist/modalOpeners.d.cts +2 -0
- package/dist/modalOpeners.d.mts +2 -0
- package/dist/modalOpeners.mjs +1 -0
- package/dist/modalOpeners2.d.cts +11 -0
- package/dist/modalOpeners2.d.mts +11 -0
- package/dist/notifications.store.cjs +27 -0
- package/dist/notifications.store.cjs.map +1 -0
- package/dist/notifications.store.d.cts +15 -0
- package/dist/notifications.store.d.mts +15 -0
- package/dist/notifications.store.mjs +26 -0
- package/dist/notifications.store.mjs.map +1 -0
- package/dist/onboarding.api.cjs +3 -0
- package/dist/onboarding.api.d.cts +7 -0
- package/dist/onboarding.api.d.mts +7 -0
- package/dist/onboarding.api.mjs +3 -0
- package/dist/onboarding2.api.cjs +24 -0
- package/dist/onboarding2.api.cjs.map +1 -0
- package/dist/onboarding2.api.mjs +18 -0
- package/dist/onboarding2.api.mjs.map +1 -0
- package/dist/pageRedirection.d.cts +6 -0
- package/dist/pageRedirection.d.mts +6 -0
- package/dist/rbac.store.cjs +2 -1
- package/dist/rbac.store.cjs.map +1 -1
- package/dist/rbac.store.d.cts +123 -123
- package/dist/rbac.store.d.mts +124 -124
- package/dist/rbac.store.mjs +1 -1
- package/dist/roles.store.cjs +88 -0
- package/dist/roles.store.cjs.map +1 -0
- package/dist/roles.store.d.cts +637 -0
- package/dist/roles.store.d.mts +637 -0
- package/dist/roles.store.mjs +87 -0
- package/dist/roles.store.mjs.map +1 -0
- package/dist/settings.store.cjs +6 -0
- package/dist/settings.store.d.cts +3801 -0
- package/dist/settings.store.d.mts +3801 -0
- package/dist/settings.store.mjs +6 -0
- package/dist/settings2.store.cjs +387 -0
- package/dist/settings2.store.cjs.map +1 -0
- package/dist/settings2.store.mjs +348 -0
- package/dist/settings2.store.mjs.map +1 -0
- package/dist/types/pageRedirection.cjs +0 -0
- package/dist/types/pageRedirection.d.cts +2 -0
- package/dist/types/pageRedirection.d.mts +2 -0
- package/dist/types/pageRedirection.mjs +1 -0
- package/dist/useAgentRequestStore.cjs +1 -0
- package/dist/useAgentRequestStore.cjs.map +1 -1
- package/dist/useAgentRequestStore.d.cts +1 -1
- package/dist/useAgentRequestStore.d.mts +6 -6
- package/dist/useRootStore.cjs +4 -182
- package/dist/useRootStore.d.cts +73 -73
- package/dist/useRootStore.d.mts +73 -73
- package/dist/useRootStore.mjs +4 -182
- package/dist/useRootStore2.cjs +189 -0
- package/dist/useRootStore2.cjs.map +1 -0
- package/dist/useRootStore2.mjs +183 -0
- package/dist/useRootStore2.mjs.map +1 -0
- package/dist/users.store.cjs +9 -0
- package/dist/users.store.d.cts +552 -0
- package/dist/users.store.d.mts +552 -0
- package/dist/users.store.mjs +9 -0
- package/dist/users2.store.cjs +362 -0
- package/dist/users2.store.cjs.map +1 -0
- package/dist/users2.store.mjs +353 -0
- package/dist/users2.store.mjs.map +1 -0
- package/dist/versions.store.cjs +11 -0
- package/dist/versions.store.d.cts +384 -0
- package/dist/versions.store.d.mts +384 -0
- package/dist/versions.store.mjs +10 -0
- package/dist/versions2.store.cjs +230 -0
- package/dist/versions2.store.cjs.map +1 -0
- package/dist/versions2.store.mjs +218 -0
- package/dist/versions2.store.mjs.map +1 -0
- package/package.json +13 -6
- package/dist/useRootStore.cjs.map +0 -1
- package/dist/useRootStore.mjs.map +0 -1
package/dist/rbac.store.d.mts
CHANGED
|
@@ -1,52 +1,53 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as
|
|
3
|
-
import * as vue0 from "vue";
|
|
1
|
+
import * as pinia2 from "pinia";
|
|
2
|
+
import * as vue80 from "vue";
|
|
4
3
|
import { Role } from "@n8n/api-types";
|
|
4
|
+
import { Resource, Scope, ScopeOptions } from "@n8n/permissions";
|
|
5
5
|
|
|
6
6
|
//#region src/rbac.store.d.ts
|
|
7
|
-
declare const useRBACStore:
|
|
8
|
-
globalRoles:
|
|
9
|
-
rolesByProjectId:
|
|
10
|
-
globalScopes:
|
|
11
|
-
scopesByProjectId:
|
|
12
|
-
scopesByResourceId:
|
|
7
|
+
declare const useRBACStore: pinia2.StoreDefinition<"rbac", Pick<{
|
|
8
|
+
globalRoles: vue80.Ref<Role[], Role[]>;
|
|
9
|
+
rolesByProjectId: vue80.Ref<Record<string, string[]>, Record<string, string[]>>;
|
|
10
|
+
globalScopes: vue80.Ref<Scope[], Scope[]>;
|
|
11
|
+
scopesByProjectId: vue80.Ref<Record<string, Scope[]>, Record<string, Scope[]>>;
|
|
12
|
+
scopesByResourceId: vue80.Ref<{
|
|
13
13
|
chatHub: Record<string, Scope[]>;
|
|
14
|
-
|
|
14
|
+
logStreaming: Record<string, Scope[]>;
|
|
15
15
|
aiAssistant: Record<string, Scope[]>;
|
|
16
|
-
|
|
16
|
+
license: Record<string, Scope[]>;
|
|
17
|
+
ldap: Record<string, Scope[]>;
|
|
18
|
+
saml: Record<string, Scope[]>;
|
|
19
|
+
oidc: Record<string, Scope[]>;
|
|
20
|
+
sourceControl: Record<string, Scope[]>;
|
|
17
21
|
auditLogs: Record<string, Scope[]>;
|
|
18
|
-
|
|
22
|
+
provisioning: Record<string, Scope[]>;
|
|
19
23
|
community: Record<string, Scope[]>;
|
|
20
|
-
|
|
24
|
+
insights: Record<string, Scope[]>;
|
|
25
|
+
mcp: Record<string, Scope[]>;
|
|
26
|
+
otel: Record<string, Scope[]>;
|
|
27
|
+
role: Record<string, Scope[]>;
|
|
28
|
+
project: Record<string, Scope[]>;
|
|
21
29
|
credential: Record<string, Scope[]>;
|
|
30
|
+
workflow: Record<string, Scope[]>;
|
|
31
|
+
agent: Record<string, Scope[]>;
|
|
32
|
+
annotationTag: Record<string, Scope[]>;
|
|
33
|
+
banner: Record<string, Scope[]>;
|
|
34
|
+
communityPackage: Record<string, Scope[]>;
|
|
22
35
|
externalSecretsProvider: Record<string, Scope[]>;
|
|
23
36
|
externalSecret: Record<string, Scope[]>;
|
|
24
37
|
eventBusDestination: Record<string, Scope[]>;
|
|
25
|
-
ldap: Record<string, Scope[]>;
|
|
26
|
-
license: Record<string, Scope[]>;
|
|
27
|
-
logStreaming: Record<string, Scope[]>;
|
|
28
38
|
orchestration: Record<string, Scope[]>;
|
|
29
|
-
project: Record<string, Scope[]>;
|
|
30
|
-
saml: Record<string, Scope[]>;
|
|
31
39
|
securityAudit: Record<string, Scope[]>;
|
|
32
40
|
securitySettings: Record<string, Scope[]>;
|
|
33
|
-
sourceControl: Record<string, Scope[]>;
|
|
34
41
|
tag: Record<string, Scope[]>;
|
|
35
42
|
user: Record<string, Scope[]>;
|
|
36
43
|
variable: Record<string, Scope[]>;
|
|
37
44
|
projectVariable: Record<string, Scope[]>;
|
|
38
45
|
workersView: Record<string, Scope[]>;
|
|
39
|
-
workflow: Record<string, Scope[]>;
|
|
40
46
|
folder: Record<string, Scope[]>;
|
|
41
|
-
insights: Record<string, Scope[]>;
|
|
42
|
-
oidc: Record<string, Scope[]>;
|
|
43
|
-
provisioning: Record<string, Scope[]>;
|
|
44
47
|
dataTable: Record<string, Scope[]>;
|
|
45
48
|
execution: Record<string, Scope[]>;
|
|
46
49
|
testRun: Record<string, Scope[]>;
|
|
47
50
|
workflowTags: Record<string, Scope[]>;
|
|
48
|
-
role: Record<string, Scope[]>;
|
|
49
|
-
mcp: Record<string, Scope[]>;
|
|
50
51
|
mcpApiKey: Record<string, Scope[]>;
|
|
51
52
|
chatHubAgent: Record<string, Scope[]>;
|
|
52
53
|
breakingChanges: Record<string, Scope[]>;
|
|
@@ -55,45 +56,45 @@ declare const useRBACStore: pinia0.StoreDefinition<"rbac", Pick<{
|
|
|
55
56
|
credentialResolver: Record<string, Scope[]>;
|
|
56
57
|
instanceAi: Record<string, Scope[]>;
|
|
57
58
|
roleMappingRule: Record<string, Scope[]>;
|
|
58
|
-
|
|
59
|
-
}, Record<"chatHub" | "agent" | "aiAssistant" | "annotationTag" | "auditLogs" | "banner" | "community" | "communityPackage" | "credential" | "externalSecretsProvider" | "externalSecret" | "eventBusDestination" | "ldap" | "license" | "logStreaming" | "orchestration" | "project" | "saml" | "securityAudit" | "securitySettings" | "sourceControl" | "tag" | "user" | "variable" | "projectVariable" | "workersView" | "workflow" | "folder" | "insights" | "oidc" | "provisioning" | "dataTable" | "execution" | "testRun" | "workflowTags" | "role" | "mcp" | "mcpApiKey" | "chatHubAgent" | "breakingChanges" | "apiKey" | "encryptionKey" | "credentialResolver" | "instanceAi" | "roleMappingRule" | "otel", Record<string, Scope[]>> | {
|
|
59
|
+
}, Record<"chatHub" | "logStreaming" | "aiAssistant" | "license" | "ldap" | "saml" | "oidc" | "sourceControl" | "auditLogs" | "provisioning" | "community" | "insights" | "mcp" | "otel" | "role" | "project" | "credential" | "workflow" | "agent" | "annotationTag" | "banner" | "communityPackage" | "externalSecretsProvider" | "externalSecret" | "eventBusDestination" | "orchestration" | "securityAudit" | "securitySettings" | "tag" | "user" | "variable" | "projectVariable" | "workersView" | "folder" | "dataTable" | "execution" | "testRun" | "workflowTags" | "mcpApiKey" | "chatHubAgent" | "breakingChanges" | "apiKey" | "encryptionKey" | "credentialResolver" | "instanceAi" | "roleMappingRule", Record<string, Scope[]>> | {
|
|
60
60
|
chatHub: Record<string, Scope[]>;
|
|
61
|
-
|
|
61
|
+
logStreaming: Record<string, Scope[]>;
|
|
62
62
|
aiAssistant: Record<string, Scope[]>;
|
|
63
|
-
|
|
63
|
+
license: Record<string, Scope[]>;
|
|
64
|
+
ldap: Record<string, Scope[]>;
|
|
65
|
+
saml: Record<string, Scope[]>;
|
|
66
|
+
oidc: Record<string, Scope[]>;
|
|
67
|
+
sourceControl: Record<string, Scope[]>;
|
|
64
68
|
auditLogs: Record<string, Scope[]>;
|
|
65
|
-
|
|
69
|
+
provisioning: Record<string, Scope[]>;
|
|
66
70
|
community: Record<string, Scope[]>;
|
|
67
|
-
|
|
71
|
+
insights: Record<string, Scope[]>;
|
|
72
|
+
mcp: Record<string, Scope[]>;
|
|
73
|
+
otel: Record<string, Scope[]>;
|
|
74
|
+
role: Record<string, Scope[]>;
|
|
75
|
+
project: Record<string, Scope[]>;
|
|
68
76
|
credential: Record<string, Scope[]>;
|
|
77
|
+
workflow: Record<string, Scope[]>;
|
|
78
|
+
agent: Record<string, Scope[]>;
|
|
79
|
+
annotationTag: Record<string, Scope[]>;
|
|
80
|
+
banner: Record<string, Scope[]>;
|
|
81
|
+
communityPackage: Record<string, Scope[]>;
|
|
69
82
|
externalSecretsProvider: Record<string, Scope[]>;
|
|
70
83
|
externalSecret: Record<string, Scope[]>;
|
|
71
84
|
eventBusDestination: Record<string, Scope[]>;
|
|
72
|
-
ldap: Record<string, Scope[]>;
|
|
73
|
-
license: Record<string, Scope[]>;
|
|
74
|
-
logStreaming: Record<string, Scope[]>;
|
|
75
85
|
orchestration: Record<string, Scope[]>;
|
|
76
|
-
project: Record<string, Scope[]>;
|
|
77
|
-
saml: Record<string, Scope[]>;
|
|
78
86
|
securityAudit: Record<string, Scope[]>;
|
|
79
87
|
securitySettings: Record<string, Scope[]>;
|
|
80
|
-
sourceControl: Record<string, Scope[]>;
|
|
81
88
|
tag: Record<string, Scope[]>;
|
|
82
89
|
user: Record<string, Scope[]>;
|
|
83
90
|
variable: Record<string, Scope[]>;
|
|
84
91
|
projectVariable: Record<string, Scope[]>;
|
|
85
92
|
workersView: Record<string, Scope[]>;
|
|
86
|
-
workflow: Record<string, Scope[]>;
|
|
87
93
|
folder: Record<string, Scope[]>;
|
|
88
|
-
insights: Record<string, Scope[]>;
|
|
89
|
-
oidc: Record<string, Scope[]>;
|
|
90
|
-
provisioning: Record<string, Scope[]>;
|
|
91
94
|
dataTable: Record<string, Scope[]>;
|
|
92
95
|
execution: Record<string, Scope[]>;
|
|
93
96
|
testRun: Record<string, Scope[]>;
|
|
94
97
|
workflowTags: Record<string, Scope[]>;
|
|
95
|
-
role: Record<string, Scope[]>;
|
|
96
|
-
mcp: Record<string, Scope[]>;
|
|
97
98
|
mcpApiKey: Record<string, Scope[]>;
|
|
98
99
|
chatHubAgent: Record<string, Scope[]>;
|
|
99
100
|
breakingChanges: Record<string, Scope[]>;
|
|
@@ -102,7 +103,6 @@ declare const useRBACStore: pinia0.StoreDefinition<"rbac", Pick<{
|
|
|
102
103
|
credentialResolver: Record<string, Scope[]>;
|
|
103
104
|
instanceAi: Record<string, Scope[]>;
|
|
104
105
|
roleMappingRule: Record<string, Scope[]>;
|
|
105
|
-
otel: Record<string, Scope[]>;
|
|
106
106
|
}>;
|
|
107
107
|
addGlobalRole: (role: Role) => void;
|
|
108
108
|
hasRole: (role: Role) => boolean;
|
|
@@ -121,48 +121,49 @@ declare const useRBACStore: pinia0.StoreDefinition<"rbac", Pick<{
|
|
|
121
121
|
projectId?: string;
|
|
122
122
|
}, options?: ScopeOptions) => boolean;
|
|
123
123
|
}, "globalRoles" | "rolesByProjectId" | "globalScopes" | "scopesByProjectId" | "scopesByResourceId">, Pick<{
|
|
124
|
-
globalRoles:
|
|
125
|
-
rolesByProjectId:
|
|
126
|
-
globalScopes:
|
|
127
|
-
scopesByProjectId:
|
|
128
|
-
scopesByResourceId:
|
|
124
|
+
globalRoles: vue80.Ref<Role[], Role[]>;
|
|
125
|
+
rolesByProjectId: vue80.Ref<Record<string, string[]>, Record<string, string[]>>;
|
|
126
|
+
globalScopes: vue80.Ref<Scope[], Scope[]>;
|
|
127
|
+
scopesByProjectId: vue80.Ref<Record<string, Scope[]>, Record<string, Scope[]>>;
|
|
128
|
+
scopesByResourceId: vue80.Ref<{
|
|
129
129
|
chatHub: Record<string, Scope[]>;
|
|
130
|
-
|
|
130
|
+
logStreaming: Record<string, Scope[]>;
|
|
131
131
|
aiAssistant: Record<string, Scope[]>;
|
|
132
|
-
|
|
132
|
+
license: Record<string, Scope[]>;
|
|
133
|
+
ldap: Record<string, Scope[]>;
|
|
134
|
+
saml: Record<string, Scope[]>;
|
|
135
|
+
oidc: Record<string, Scope[]>;
|
|
136
|
+
sourceControl: Record<string, Scope[]>;
|
|
133
137
|
auditLogs: Record<string, Scope[]>;
|
|
134
|
-
|
|
138
|
+
provisioning: Record<string, Scope[]>;
|
|
135
139
|
community: Record<string, Scope[]>;
|
|
136
|
-
|
|
140
|
+
insights: Record<string, Scope[]>;
|
|
141
|
+
mcp: Record<string, Scope[]>;
|
|
142
|
+
otel: Record<string, Scope[]>;
|
|
143
|
+
role: Record<string, Scope[]>;
|
|
144
|
+
project: Record<string, Scope[]>;
|
|
137
145
|
credential: Record<string, Scope[]>;
|
|
146
|
+
workflow: Record<string, Scope[]>;
|
|
147
|
+
agent: Record<string, Scope[]>;
|
|
148
|
+
annotationTag: Record<string, Scope[]>;
|
|
149
|
+
banner: Record<string, Scope[]>;
|
|
150
|
+
communityPackage: Record<string, Scope[]>;
|
|
138
151
|
externalSecretsProvider: Record<string, Scope[]>;
|
|
139
152
|
externalSecret: Record<string, Scope[]>;
|
|
140
153
|
eventBusDestination: Record<string, Scope[]>;
|
|
141
|
-
ldap: Record<string, Scope[]>;
|
|
142
|
-
license: Record<string, Scope[]>;
|
|
143
|
-
logStreaming: Record<string, Scope[]>;
|
|
144
154
|
orchestration: Record<string, Scope[]>;
|
|
145
|
-
project: Record<string, Scope[]>;
|
|
146
|
-
saml: Record<string, Scope[]>;
|
|
147
155
|
securityAudit: Record<string, Scope[]>;
|
|
148
156
|
securitySettings: Record<string, Scope[]>;
|
|
149
|
-
sourceControl: Record<string, Scope[]>;
|
|
150
157
|
tag: Record<string, Scope[]>;
|
|
151
158
|
user: Record<string, Scope[]>;
|
|
152
159
|
variable: Record<string, Scope[]>;
|
|
153
160
|
projectVariable: Record<string, Scope[]>;
|
|
154
161
|
workersView: Record<string, Scope[]>;
|
|
155
|
-
workflow: Record<string, Scope[]>;
|
|
156
162
|
folder: Record<string, Scope[]>;
|
|
157
|
-
insights: Record<string, Scope[]>;
|
|
158
|
-
oidc: Record<string, Scope[]>;
|
|
159
|
-
provisioning: Record<string, Scope[]>;
|
|
160
163
|
dataTable: Record<string, Scope[]>;
|
|
161
164
|
execution: Record<string, Scope[]>;
|
|
162
165
|
testRun: Record<string, Scope[]>;
|
|
163
166
|
workflowTags: Record<string, Scope[]>;
|
|
164
|
-
role: Record<string, Scope[]>;
|
|
165
|
-
mcp: Record<string, Scope[]>;
|
|
166
167
|
mcpApiKey: Record<string, Scope[]>;
|
|
167
168
|
chatHubAgent: Record<string, Scope[]>;
|
|
168
169
|
breakingChanges: Record<string, Scope[]>;
|
|
@@ -171,45 +172,45 @@ declare const useRBACStore: pinia0.StoreDefinition<"rbac", Pick<{
|
|
|
171
172
|
credentialResolver: Record<string, Scope[]>;
|
|
172
173
|
instanceAi: Record<string, Scope[]>;
|
|
173
174
|
roleMappingRule: Record<string, Scope[]>;
|
|
174
|
-
|
|
175
|
-
}, Record<"chatHub" | "agent" | "aiAssistant" | "annotationTag" | "auditLogs" | "banner" | "community" | "communityPackage" | "credential" | "externalSecretsProvider" | "externalSecret" | "eventBusDestination" | "ldap" | "license" | "logStreaming" | "orchestration" | "project" | "saml" | "securityAudit" | "securitySettings" | "sourceControl" | "tag" | "user" | "variable" | "projectVariable" | "workersView" | "workflow" | "folder" | "insights" | "oidc" | "provisioning" | "dataTable" | "execution" | "testRun" | "workflowTags" | "role" | "mcp" | "mcpApiKey" | "chatHubAgent" | "breakingChanges" | "apiKey" | "encryptionKey" | "credentialResolver" | "instanceAi" | "roleMappingRule" | "otel", Record<string, Scope[]>> | {
|
|
175
|
+
}, Record<"chatHub" | "logStreaming" | "aiAssistant" | "license" | "ldap" | "saml" | "oidc" | "sourceControl" | "auditLogs" | "provisioning" | "community" | "insights" | "mcp" | "otel" | "role" | "project" | "credential" | "workflow" | "agent" | "annotationTag" | "banner" | "communityPackage" | "externalSecretsProvider" | "externalSecret" | "eventBusDestination" | "orchestration" | "securityAudit" | "securitySettings" | "tag" | "user" | "variable" | "projectVariable" | "workersView" | "folder" | "dataTable" | "execution" | "testRun" | "workflowTags" | "mcpApiKey" | "chatHubAgent" | "breakingChanges" | "apiKey" | "encryptionKey" | "credentialResolver" | "instanceAi" | "roleMappingRule", Record<string, Scope[]>> | {
|
|
176
176
|
chatHub: Record<string, Scope[]>;
|
|
177
|
-
|
|
177
|
+
logStreaming: Record<string, Scope[]>;
|
|
178
178
|
aiAssistant: Record<string, Scope[]>;
|
|
179
|
-
|
|
179
|
+
license: Record<string, Scope[]>;
|
|
180
|
+
ldap: Record<string, Scope[]>;
|
|
181
|
+
saml: Record<string, Scope[]>;
|
|
182
|
+
oidc: Record<string, Scope[]>;
|
|
183
|
+
sourceControl: Record<string, Scope[]>;
|
|
180
184
|
auditLogs: Record<string, Scope[]>;
|
|
181
|
-
|
|
185
|
+
provisioning: Record<string, Scope[]>;
|
|
182
186
|
community: Record<string, Scope[]>;
|
|
183
|
-
|
|
187
|
+
insights: Record<string, Scope[]>;
|
|
188
|
+
mcp: Record<string, Scope[]>;
|
|
189
|
+
otel: Record<string, Scope[]>;
|
|
190
|
+
role: Record<string, Scope[]>;
|
|
191
|
+
project: Record<string, Scope[]>;
|
|
184
192
|
credential: Record<string, Scope[]>;
|
|
193
|
+
workflow: Record<string, Scope[]>;
|
|
194
|
+
agent: Record<string, Scope[]>;
|
|
195
|
+
annotationTag: Record<string, Scope[]>;
|
|
196
|
+
banner: Record<string, Scope[]>;
|
|
197
|
+
communityPackage: Record<string, Scope[]>;
|
|
185
198
|
externalSecretsProvider: Record<string, Scope[]>;
|
|
186
199
|
externalSecret: Record<string, Scope[]>;
|
|
187
200
|
eventBusDestination: Record<string, Scope[]>;
|
|
188
|
-
ldap: Record<string, Scope[]>;
|
|
189
|
-
license: Record<string, Scope[]>;
|
|
190
|
-
logStreaming: Record<string, Scope[]>;
|
|
191
201
|
orchestration: Record<string, Scope[]>;
|
|
192
|
-
project: Record<string, Scope[]>;
|
|
193
|
-
saml: Record<string, Scope[]>;
|
|
194
202
|
securityAudit: Record<string, Scope[]>;
|
|
195
203
|
securitySettings: Record<string, Scope[]>;
|
|
196
|
-
sourceControl: Record<string, Scope[]>;
|
|
197
204
|
tag: Record<string, Scope[]>;
|
|
198
205
|
user: Record<string, Scope[]>;
|
|
199
206
|
variable: Record<string, Scope[]>;
|
|
200
207
|
projectVariable: Record<string, Scope[]>;
|
|
201
208
|
workersView: Record<string, Scope[]>;
|
|
202
|
-
workflow: Record<string, Scope[]>;
|
|
203
209
|
folder: Record<string, Scope[]>;
|
|
204
|
-
insights: Record<string, Scope[]>;
|
|
205
|
-
oidc: Record<string, Scope[]>;
|
|
206
|
-
provisioning: Record<string, Scope[]>;
|
|
207
210
|
dataTable: Record<string, Scope[]>;
|
|
208
211
|
execution: Record<string, Scope[]>;
|
|
209
212
|
testRun: Record<string, Scope[]>;
|
|
210
213
|
workflowTags: Record<string, Scope[]>;
|
|
211
|
-
role: Record<string, Scope[]>;
|
|
212
|
-
mcp: Record<string, Scope[]>;
|
|
213
214
|
mcpApiKey: Record<string, Scope[]>;
|
|
214
215
|
chatHubAgent: Record<string, Scope[]>;
|
|
215
216
|
breakingChanges: Record<string, Scope[]>;
|
|
@@ -218,7 +219,6 @@ declare const useRBACStore: pinia0.StoreDefinition<"rbac", Pick<{
|
|
|
218
219
|
credentialResolver: Record<string, Scope[]>;
|
|
219
220
|
instanceAi: Record<string, Scope[]>;
|
|
220
221
|
roleMappingRule: Record<string, Scope[]>;
|
|
221
|
-
otel: Record<string, Scope[]>;
|
|
222
222
|
}>;
|
|
223
223
|
addGlobalRole: (role: Role) => void;
|
|
224
224
|
hasRole: (role: Role) => boolean;
|
|
@@ -237,48 +237,49 @@ declare const useRBACStore: pinia0.StoreDefinition<"rbac", Pick<{
|
|
|
237
237
|
projectId?: string;
|
|
238
238
|
}, options?: ScopeOptions) => boolean;
|
|
239
239
|
}, never>, Pick<{
|
|
240
|
-
globalRoles:
|
|
241
|
-
rolesByProjectId:
|
|
242
|
-
globalScopes:
|
|
243
|
-
scopesByProjectId:
|
|
244
|
-
scopesByResourceId:
|
|
240
|
+
globalRoles: vue80.Ref<Role[], Role[]>;
|
|
241
|
+
rolesByProjectId: vue80.Ref<Record<string, string[]>, Record<string, string[]>>;
|
|
242
|
+
globalScopes: vue80.Ref<Scope[], Scope[]>;
|
|
243
|
+
scopesByProjectId: vue80.Ref<Record<string, Scope[]>, Record<string, Scope[]>>;
|
|
244
|
+
scopesByResourceId: vue80.Ref<{
|
|
245
245
|
chatHub: Record<string, Scope[]>;
|
|
246
|
-
|
|
246
|
+
logStreaming: Record<string, Scope[]>;
|
|
247
247
|
aiAssistant: Record<string, Scope[]>;
|
|
248
|
-
|
|
248
|
+
license: Record<string, Scope[]>;
|
|
249
|
+
ldap: Record<string, Scope[]>;
|
|
250
|
+
saml: Record<string, Scope[]>;
|
|
251
|
+
oidc: Record<string, Scope[]>;
|
|
252
|
+
sourceControl: Record<string, Scope[]>;
|
|
249
253
|
auditLogs: Record<string, Scope[]>;
|
|
250
|
-
|
|
254
|
+
provisioning: Record<string, Scope[]>;
|
|
251
255
|
community: Record<string, Scope[]>;
|
|
252
|
-
|
|
256
|
+
insights: Record<string, Scope[]>;
|
|
257
|
+
mcp: Record<string, Scope[]>;
|
|
258
|
+
otel: Record<string, Scope[]>;
|
|
259
|
+
role: Record<string, Scope[]>;
|
|
260
|
+
project: Record<string, Scope[]>;
|
|
253
261
|
credential: Record<string, Scope[]>;
|
|
262
|
+
workflow: Record<string, Scope[]>;
|
|
263
|
+
agent: Record<string, Scope[]>;
|
|
264
|
+
annotationTag: Record<string, Scope[]>;
|
|
265
|
+
banner: Record<string, Scope[]>;
|
|
266
|
+
communityPackage: Record<string, Scope[]>;
|
|
254
267
|
externalSecretsProvider: Record<string, Scope[]>;
|
|
255
268
|
externalSecret: Record<string, Scope[]>;
|
|
256
269
|
eventBusDestination: Record<string, Scope[]>;
|
|
257
|
-
ldap: Record<string, Scope[]>;
|
|
258
|
-
license: Record<string, Scope[]>;
|
|
259
|
-
logStreaming: Record<string, Scope[]>;
|
|
260
270
|
orchestration: Record<string, Scope[]>;
|
|
261
|
-
project: Record<string, Scope[]>;
|
|
262
|
-
saml: Record<string, Scope[]>;
|
|
263
271
|
securityAudit: Record<string, Scope[]>;
|
|
264
272
|
securitySettings: Record<string, Scope[]>;
|
|
265
|
-
sourceControl: Record<string, Scope[]>;
|
|
266
273
|
tag: Record<string, Scope[]>;
|
|
267
274
|
user: Record<string, Scope[]>;
|
|
268
275
|
variable: Record<string, Scope[]>;
|
|
269
276
|
projectVariable: Record<string, Scope[]>;
|
|
270
277
|
workersView: Record<string, Scope[]>;
|
|
271
|
-
workflow: Record<string, Scope[]>;
|
|
272
278
|
folder: Record<string, Scope[]>;
|
|
273
|
-
insights: Record<string, Scope[]>;
|
|
274
|
-
oidc: Record<string, Scope[]>;
|
|
275
|
-
provisioning: Record<string, Scope[]>;
|
|
276
279
|
dataTable: Record<string, Scope[]>;
|
|
277
280
|
execution: Record<string, Scope[]>;
|
|
278
281
|
testRun: Record<string, Scope[]>;
|
|
279
282
|
workflowTags: Record<string, Scope[]>;
|
|
280
|
-
role: Record<string, Scope[]>;
|
|
281
|
-
mcp: Record<string, Scope[]>;
|
|
282
283
|
mcpApiKey: Record<string, Scope[]>;
|
|
283
284
|
chatHubAgent: Record<string, Scope[]>;
|
|
284
285
|
breakingChanges: Record<string, Scope[]>;
|
|
@@ -287,45 +288,45 @@ declare const useRBACStore: pinia0.StoreDefinition<"rbac", Pick<{
|
|
|
287
288
|
credentialResolver: Record<string, Scope[]>;
|
|
288
289
|
instanceAi: Record<string, Scope[]>;
|
|
289
290
|
roleMappingRule: Record<string, Scope[]>;
|
|
290
|
-
|
|
291
|
-
}, Record<"chatHub" | "agent" | "aiAssistant" | "annotationTag" | "auditLogs" | "banner" | "community" | "communityPackage" | "credential" | "externalSecretsProvider" | "externalSecret" | "eventBusDestination" | "ldap" | "license" | "logStreaming" | "orchestration" | "project" | "saml" | "securityAudit" | "securitySettings" | "sourceControl" | "tag" | "user" | "variable" | "projectVariable" | "workersView" | "workflow" | "folder" | "insights" | "oidc" | "provisioning" | "dataTable" | "execution" | "testRun" | "workflowTags" | "role" | "mcp" | "mcpApiKey" | "chatHubAgent" | "breakingChanges" | "apiKey" | "encryptionKey" | "credentialResolver" | "instanceAi" | "roleMappingRule" | "otel", Record<string, Scope[]>> | {
|
|
291
|
+
}, Record<"chatHub" | "logStreaming" | "aiAssistant" | "license" | "ldap" | "saml" | "oidc" | "sourceControl" | "auditLogs" | "provisioning" | "community" | "insights" | "mcp" | "otel" | "role" | "project" | "credential" | "workflow" | "agent" | "annotationTag" | "banner" | "communityPackage" | "externalSecretsProvider" | "externalSecret" | "eventBusDestination" | "orchestration" | "securityAudit" | "securitySettings" | "tag" | "user" | "variable" | "projectVariable" | "workersView" | "folder" | "dataTable" | "execution" | "testRun" | "workflowTags" | "mcpApiKey" | "chatHubAgent" | "breakingChanges" | "apiKey" | "encryptionKey" | "credentialResolver" | "instanceAi" | "roleMappingRule", Record<string, Scope[]>> | {
|
|
292
292
|
chatHub: Record<string, Scope[]>;
|
|
293
|
-
|
|
293
|
+
logStreaming: Record<string, Scope[]>;
|
|
294
294
|
aiAssistant: Record<string, Scope[]>;
|
|
295
|
-
|
|
295
|
+
license: Record<string, Scope[]>;
|
|
296
|
+
ldap: Record<string, Scope[]>;
|
|
297
|
+
saml: Record<string, Scope[]>;
|
|
298
|
+
oidc: Record<string, Scope[]>;
|
|
299
|
+
sourceControl: Record<string, Scope[]>;
|
|
296
300
|
auditLogs: Record<string, Scope[]>;
|
|
297
|
-
|
|
301
|
+
provisioning: Record<string, Scope[]>;
|
|
298
302
|
community: Record<string, Scope[]>;
|
|
299
|
-
|
|
303
|
+
insights: Record<string, Scope[]>;
|
|
304
|
+
mcp: Record<string, Scope[]>;
|
|
305
|
+
otel: Record<string, Scope[]>;
|
|
306
|
+
role: Record<string, Scope[]>;
|
|
307
|
+
project: Record<string, Scope[]>;
|
|
300
308
|
credential: Record<string, Scope[]>;
|
|
309
|
+
workflow: Record<string, Scope[]>;
|
|
310
|
+
agent: Record<string, Scope[]>;
|
|
311
|
+
annotationTag: Record<string, Scope[]>;
|
|
312
|
+
banner: Record<string, Scope[]>;
|
|
313
|
+
communityPackage: Record<string, Scope[]>;
|
|
301
314
|
externalSecretsProvider: Record<string, Scope[]>;
|
|
302
315
|
externalSecret: Record<string, Scope[]>;
|
|
303
316
|
eventBusDestination: Record<string, Scope[]>;
|
|
304
|
-
ldap: Record<string, Scope[]>;
|
|
305
|
-
license: Record<string, Scope[]>;
|
|
306
|
-
logStreaming: Record<string, Scope[]>;
|
|
307
317
|
orchestration: Record<string, Scope[]>;
|
|
308
|
-
project: Record<string, Scope[]>;
|
|
309
|
-
saml: Record<string, Scope[]>;
|
|
310
318
|
securityAudit: Record<string, Scope[]>;
|
|
311
319
|
securitySettings: Record<string, Scope[]>;
|
|
312
|
-
sourceControl: Record<string, Scope[]>;
|
|
313
320
|
tag: Record<string, Scope[]>;
|
|
314
321
|
user: Record<string, Scope[]>;
|
|
315
322
|
variable: Record<string, Scope[]>;
|
|
316
323
|
projectVariable: Record<string, Scope[]>;
|
|
317
324
|
workersView: Record<string, Scope[]>;
|
|
318
|
-
workflow: Record<string, Scope[]>;
|
|
319
325
|
folder: Record<string, Scope[]>;
|
|
320
|
-
insights: Record<string, Scope[]>;
|
|
321
|
-
oidc: Record<string, Scope[]>;
|
|
322
|
-
provisioning: Record<string, Scope[]>;
|
|
323
326
|
dataTable: Record<string, Scope[]>;
|
|
324
327
|
execution: Record<string, Scope[]>;
|
|
325
328
|
testRun: Record<string, Scope[]>;
|
|
326
329
|
workflowTags: Record<string, Scope[]>;
|
|
327
|
-
role: Record<string, Scope[]>;
|
|
328
|
-
mcp: Record<string, Scope[]>;
|
|
329
330
|
mcpApiKey: Record<string, Scope[]>;
|
|
330
331
|
chatHubAgent: Record<string, Scope[]>;
|
|
331
332
|
breakingChanges: Record<string, Scope[]>;
|
|
@@ -334,7 +335,6 @@ declare const useRBACStore: pinia0.StoreDefinition<"rbac", Pick<{
|
|
|
334
335
|
credentialResolver: Record<string, Scope[]>;
|
|
335
336
|
instanceAi: Record<string, Scope[]>;
|
|
336
337
|
roleMappingRule: Record<string, Scope[]>;
|
|
337
|
-
otel: Record<string, Scope[]>;
|
|
338
338
|
}>;
|
|
339
339
|
addGlobalRole: (role: Role) => void;
|
|
340
340
|
hasRole: (role: Role) => boolean;
|
package/dist/rbac.store.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as STORES } from "./constants2.mjs";
|
|
2
|
-
import { hasScope } from "@n8n/permissions";
|
|
3
2
|
import { defineStore } from "pinia";
|
|
4
3
|
import { ref } from "vue";
|
|
4
|
+
import { hasScope } from "@n8n/permissions";
|
|
5
5
|
|
|
6
6
|
//#region src/rbac.store.ts
|
|
7
7
|
const useRBACStore = defineStore(STORES.RBAC, () => {
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
const require_settings_store = require('./settings2.store.cjs');
|
|
2
|
+
require('./constants2.cjs');
|
|
3
|
+
require('./metaTagConfig2.cjs');
|
|
4
|
+
const require_useRootStore = require('./useRootStore2.cjs');
|
|
5
|
+
let pinia = require("pinia");
|
|
6
|
+
let vue = require("vue");
|
|
7
|
+
let __n8n_permissions = require("@n8n/permissions");
|
|
8
|
+
let __n8n_rest_api_client_api_roles = require("@n8n/rest-api-client/api/roles");
|
|
9
|
+
__n8n_rest_api_client_api_roles = require_settings_store.__toESM(__n8n_rest_api_client_api_roles);
|
|
10
|
+
|
|
11
|
+
//#region src/roles.store.ts
|
|
12
|
+
function sortByOrderThenName(orderMap) {
|
|
13
|
+
return (a, b) => {
|
|
14
|
+
const orderA = orderMap.get(a.slug);
|
|
15
|
+
const orderB = orderMap.get(b.slug);
|
|
16
|
+
if (orderA !== void 0 || orderB !== void 0) return (orderA ?? Number.MAX_SAFE_INTEGER) - (orderB ?? Number.MAX_SAFE_INTEGER);
|
|
17
|
+
return a.displayName.localeCompare(b.displayName);
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
const useRolesStore = (0, pinia.defineStore)("roles", () => {
|
|
21
|
+
const rootStore = require_useRootStore.useRootStore();
|
|
22
|
+
const settingsStore = require_settings_store.useSettingsStore();
|
|
23
|
+
const roles = (0, vue.ref)({
|
|
24
|
+
global: [],
|
|
25
|
+
project: [],
|
|
26
|
+
credential: [],
|
|
27
|
+
workflow: [],
|
|
28
|
+
secretsProviderConnection: []
|
|
29
|
+
});
|
|
30
|
+
const projectRoleOrder = (0, vue.ref)([
|
|
31
|
+
"project:viewer",
|
|
32
|
+
"project:chatUser",
|
|
33
|
+
"project:editor",
|
|
34
|
+
"project:admin"
|
|
35
|
+
]);
|
|
36
|
+
const projectRoleOrderMap = (0, vue.computed)(() => new Map(projectRoleOrder.value.map((role, idx) => [role, idx])));
|
|
37
|
+
const globalRoleOrder = (0, vue.ref)(["global:admin", "global:member"]);
|
|
38
|
+
const globalRoleOrderMap = (0, vue.computed)(() => new Map(globalRoleOrder.value.map((role, idx) => [role, idx])));
|
|
39
|
+
const processedInstanceRoles = (0, vue.computed)(() => roles.value.global.filter((role) => role.slug !== __n8n_permissions.GLOBAL_OWNER_ROLE_SLUG && (settingsStore.isChatFeatureEnabled || role.slug !== __n8n_permissions.GLOBAL_CHAT_USER_ROLE_SLUG)).sort(sortByOrderThenName(globalRoleOrderMap.value)));
|
|
40
|
+
const customInstanceRoles = (0, vue.computed)(() => processedInstanceRoles.value.filter((role) => !role.systemRole));
|
|
41
|
+
const processedProjectRoles = (0, vue.computed)(() => roles.value.project.filter((role) => role.slug !== __n8n_permissions.PROJECT_OWNER_ROLE_SLUG && (settingsStore.isChatFeatureEnabled || role.slug !== __n8n_permissions.PROJECT_CHAT_USER_ROLE_SLUG)).sort(sortByOrderThenName(projectRoleOrderMap.value)));
|
|
42
|
+
const processedCredentialRoles = (0, vue.computed)(() => roles.value.credential.filter((role) => role.slug !== "credential:owner"));
|
|
43
|
+
const processedWorkflowRoles = (0, vue.computed)(() => roles.value.workflow.filter((role) => role.slug !== "workflow:owner"));
|
|
44
|
+
const fetchRoles = async () => {
|
|
45
|
+
roles.value = await __n8n_rest_api_client_api_roles.getRoles(rootStore.restApiContext);
|
|
46
|
+
};
|
|
47
|
+
const createRole = async (body) => {
|
|
48
|
+
return await __n8n_rest_api_client_api_roles.createRole(rootStore.restApiContext, body);
|
|
49
|
+
};
|
|
50
|
+
const fetchRoleBySlug = async (payload) => {
|
|
51
|
+
return await __n8n_rest_api_client_api_roles.getRoleBySlug(rootStore.restApiContext, payload);
|
|
52
|
+
};
|
|
53
|
+
const deleteRole = async (slug, reassignRoleSlug) => {
|
|
54
|
+
return await __n8n_rest_api_client_api_roles.deleteRole(rootStore.restApiContext, slug, reassignRoleSlug);
|
|
55
|
+
};
|
|
56
|
+
const updateRole = async (slug, body) => {
|
|
57
|
+
return await __n8n_rest_api_client_api_roles.updateRole(rootStore.restApiContext, slug, body);
|
|
58
|
+
};
|
|
59
|
+
const fetchRoleAssignments = async (slug) => {
|
|
60
|
+
return await __n8n_rest_api_client_api_roles.getRoleAssignments(rootStore.restApiContext, slug);
|
|
61
|
+
};
|
|
62
|
+
const fetchRoleProjectMembers = async (slug, projectId) => {
|
|
63
|
+
return await __n8n_rest_api_client_api_roles.getRoleProjectMembers(rootStore.restApiContext, slug, projectId);
|
|
64
|
+
};
|
|
65
|
+
const fetchRoleMembers = async (slug) => {
|
|
66
|
+
return await __n8n_rest_api_client_api_roles.getRoleMembers(rootStore.restApiContext, slug);
|
|
67
|
+
};
|
|
68
|
+
return {
|
|
69
|
+
roles,
|
|
70
|
+
processedProjectRoles,
|
|
71
|
+
processedInstanceRoles,
|
|
72
|
+
customInstanceRoles,
|
|
73
|
+
processedCredentialRoles,
|
|
74
|
+
processedWorkflowRoles,
|
|
75
|
+
fetchRoles,
|
|
76
|
+
createRole,
|
|
77
|
+
fetchRoleBySlug,
|
|
78
|
+
updateRole,
|
|
79
|
+
deleteRole,
|
|
80
|
+
fetchRoleAssignments,
|
|
81
|
+
fetchRoleProjectMembers,
|
|
82
|
+
fetchRoleMembers
|
|
83
|
+
};
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
//#endregion
|
|
87
|
+
exports.useRolesStore = useRolesStore;
|
|
88
|
+
//# sourceMappingURL=roles.store.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roles.store.cjs","names":["useRootStore","useSettingsStore","GLOBAL_OWNER_ROLE_SLUG","GLOBAL_CHAT_USER_ROLE_SLUG","PROJECT_OWNER_ROLE_SLUG","PROJECT_CHAT_USER_ROLE_SLUG","rolesApi"],"sources":["../src/roles.store.ts"],"sourcesContent":["import type {\n\tCreateRoleDto,\n\tRoleAssignmentsResponse,\n\tRoleMembersResponse,\n\tRoleProjectMembersResponse,\n\tUpdateRoleDto,\n} from '@n8n/api-types';\nimport {\n\ttype AllRolesMap,\n\ttype Role,\n\tGLOBAL_OWNER_ROLE_SLUG,\n\tGLOBAL_CHAT_USER_ROLE_SLUG,\n\tPROJECT_OWNER_ROLE_SLUG,\n\tPROJECT_CHAT_USER_ROLE_SLUG,\n} from '@n8n/permissions';\nimport * as rolesApi from '@n8n/rest-api-client/api/roles';\nimport { defineStore } from 'pinia';\nimport { ref, computed } from 'vue';\n\nimport { useSettingsStore } from './settings.store';\nimport { useRootStore } from './useRootStore';\n\nfunction sortByOrderThenName(orderMap: Map<string, number>) {\n\treturn (a: { slug: string; displayName: string }, b: { slug: string; displayName: string }) => {\n\t\tconst orderA = orderMap.get(a.slug);\n\t\tconst orderB = orderMap.get(b.slug);\n\t\t// Roles with an explicit order come first; the rest sort alphabetically by name.\n\t\tif (orderA !== undefined || orderB !== undefined) {\n\t\t\treturn (orderA ?? Number.MAX_SAFE_INTEGER) - (orderB ?? Number.MAX_SAFE_INTEGER);\n\t\t}\n\t\treturn a.displayName.localeCompare(b.displayName);\n\t};\n}\n\nexport const useRolesStore = defineStore('roles', () => {\n\tconst rootStore = useRootStore();\n\tconst settingsStore = useSettingsStore();\n\tconst roles = ref<AllRolesMap>({\n\t\tglobal: [],\n\t\tproject: [],\n\t\tcredential: [],\n\t\tworkflow: [],\n\t\tsecretsProviderConnection: [],\n\t});\n\tconst projectRoleOrder = ref<string[]>([\n\t\t'project:viewer',\n\t\t'project:chatUser',\n\t\t'project:editor',\n\t\t'project:admin',\n\t]);\n\tconst projectRoleOrderMap = computed<Map<string, number>>(\n\t\t() => new Map(projectRoleOrder.value.map((role, idx) => [role, idx])),\n\t);\n\n\tconst globalRoleOrder = ref<string[]>(['global:admin', 'global:member']);\n\tconst globalRoleOrderMap = computed<Map<string, number>>(\n\t\t() => new Map(globalRoleOrder.value.map((role, idx) => [role, idx])),\n\t);\n\n\tconst processedInstanceRoles = computed<AllRolesMap['global']>(() =>\n\t\troles.value.global\n\t\t\t.filter(\n\t\t\t\t(role) =>\n\t\t\t\t\trole.slug !== GLOBAL_OWNER_ROLE_SLUG &&\n\t\t\t\t\t(settingsStore.isChatFeatureEnabled || role.slug !== GLOBAL_CHAT_USER_ROLE_SLUG),\n\t\t\t)\n\t\t\t.sort(sortByOrderThenName(globalRoleOrderMap.value)),\n\t);\n\n\tconst customInstanceRoles = computed<AllRolesMap['global']>(() =>\n\t\tprocessedInstanceRoles.value.filter((role) => !role.systemRole),\n\t);\n\n\tconst processedProjectRoles = computed<AllRolesMap['project']>(() =>\n\t\troles.value.project\n\t\t\t.filter(\n\t\t\t\t(role) =>\n\t\t\t\t\trole.slug !== PROJECT_OWNER_ROLE_SLUG &&\n\t\t\t\t\t(settingsStore.isChatFeatureEnabled || role.slug !== PROJECT_CHAT_USER_ROLE_SLUG),\n\t\t\t)\n\t\t\t.sort(sortByOrderThenName(projectRoleOrderMap.value)),\n\t);\n\n\tconst processedCredentialRoles = computed<AllRolesMap['credential']>(() =>\n\t\troles.value.credential.filter((role) => role.slug !== 'credential:owner'),\n\t);\n\n\tconst processedWorkflowRoles = computed<AllRolesMap['workflow']>(() =>\n\t\troles.value.workflow.filter((role) => role.slug !== 'workflow:owner'),\n\t);\n\n\tconst fetchRoles = async () => {\n\t\troles.value = await rolesApi.getRoles(rootStore.restApiContext);\n\t};\n\n\tconst createRole = async (body: CreateRoleDto): Promise<Role> => {\n\t\treturn await rolesApi.createRole(rootStore.restApiContext, body);\n\t};\n\n\tconst fetchRoleBySlug = async (payload: { slug: string }): Promise<Role> => {\n\t\treturn await rolesApi.getRoleBySlug(rootStore.restApiContext, payload);\n\t};\n\n\tconst deleteRole = async (slug: string, reassignRoleSlug?: string): Promise<Role> => {\n\t\treturn await rolesApi.deleteRole(rootStore.restApiContext, slug, reassignRoleSlug);\n\t};\n\n\tconst updateRole = async (slug: string, body: UpdateRoleDto): Promise<Role> => {\n\t\treturn await rolesApi.updateRole(rootStore.restApiContext, slug, body);\n\t};\n\n\tconst fetchRoleAssignments = async (slug: string): Promise<RoleAssignmentsResponse> => {\n\t\treturn await rolesApi.getRoleAssignments(rootStore.restApiContext, slug);\n\t};\n\n\tconst fetchRoleProjectMembers = async (\n\t\tslug: string,\n\t\tprojectId: string,\n\t): Promise<RoleProjectMembersResponse> => {\n\t\treturn await rolesApi.getRoleProjectMembers(rootStore.restApiContext, slug, projectId);\n\t};\n\n\tconst fetchRoleMembers = async (slug: string): Promise<RoleMembersResponse> => {\n\t\treturn await rolesApi.getRoleMembers(rootStore.restApiContext, slug);\n\t};\n\n\treturn {\n\t\troles,\n\t\tprocessedProjectRoles,\n\t\tprocessedInstanceRoles,\n\t\tcustomInstanceRoles,\n\t\tprocessedCredentialRoles,\n\t\tprocessedWorkflowRoles,\n\t\tfetchRoles,\n\t\tcreateRole,\n\t\tfetchRoleBySlug,\n\t\tupdateRole,\n\t\tdeleteRole,\n\t\tfetchRoleAssignments,\n\t\tfetchRoleProjectMembers,\n\t\tfetchRoleMembers,\n\t};\n});\n"],"mappings":";;;;;;;;;;;AAsBA,SAAS,oBAAoB,UAA+B;AAC3D,SAAQ,GAA0C,MAA6C;EAC9F,MAAM,SAAS,SAAS,IAAI,EAAE,KAAK;EACnC,MAAM,SAAS,SAAS,IAAI,EAAE,KAAK;AAEnC,MAAI,WAAW,UAAa,WAAW,OACtC,SAAQ,UAAU,OAAO,qBAAqB,UAAU,OAAO;AAEhE,SAAO,EAAE,YAAY,cAAc,EAAE,YAAY;;;AAInD,MAAa,uCAA4B,eAAe;CACvD,MAAM,YAAYA,mCAAc;CAChC,MAAM,gBAAgBC,yCAAkB;CACxC,MAAM,qBAAyB;EAC9B,QAAQ,EAAE;EACV,SAAS,EAAE;EACX,YAAY,EAAE;EACd,UAAU,EAAE;EACZ,2BAA2B,EAAE;EAC7B,CAAC;CACF,MAAM,gCAAiC;EACtC;EACA;EACA;EACA;EACA,CAAC;CACF,MAAM,8CACC,IAAI,IAAI,iBAAiB,MAAM,KAAK,MAAM,QAAQ,CAAC,MAAM,IAAI,CAAC,CAAC,CACrE;CAED,MAAM,+BAAgC,CAAC,gBAAgB,gBAAgB,CAAC;CACxE,MAAM,6CACC,IAAI,IAAI,gBAAgB,MAAM,KAAK,MAAM,QAAQ,CAAC,MAAM,IAAI,CAAC,CAAC,CACpE;CAED,MAAM,iDACL,MAAM,MAAM,OACV,QACC,SACA,KAAK,SAASC,6CACb,cAAc,wBAAwB,KAAK,SAASC,8CACtD,CACA,KAAK,oBAAoB,mBAAmB,MAAM,CAAC,CACrD;CAED,MAAM,8CACL,uBAAuB,MAAM,QAAQ,SAAS,CAAC,KAAK,WAAW,CAC/D;CAED,MAAM,gDACL,MAAM,MAAM,QACV,QACC,SACA,KAAK,SAASC,8CACb,cAAc,wBAAwB,KAAK,SAASC,+CACtD,CACA,KAAK,oBAAoB,oBAAoB,MAAM,CAAC,CACtD;CAED,MAAM,mDACL,MAAM,MAAM,WAAW,QAAQ,SAAS,KAAK,SAAS,mBAAmB,CACzE;CAED,MAAM,iDACL,MAAM,MAAM,SAAS,QAAQ,SAAS,KAAK,SAAS,iBAAiB,CACrE;CAED,MAAM,aAAa,YAAY;AAC9B,QAAM,QAAQ,MAAMC,gCAAS,SAAS,UAAU,eAAe;;CAGhE,MAAM,aAAa,OAAO,SAAuC;AAChE,SAAO,MAAMA,gCAAS,WAAW,UAAU,gBAAgB,KAAK;;CAGjE,MAAM,kBAAkB,OAAO,YAA6C;AAC3E,SAAO,MAAMA,gCAAS,cAAc,UAAU,gBAAgB,QAAQ;;CAGvE,MAAM,aAAa,OAAO,MAAc,qBAA6C;AACpF,SAAO,MAAMA,gCAAS,WAAW,UAAU,gBAAgB,MAAM,iBAAiB;;CAGnF,MAAM,aAAa,OAAO,MAAc,SAAuC;AAC9E,SAAO,MAAMA,gCAAS,WAAW,UAAU,gBAAgB,MAAM,KAAK;;CAGvE,MAAM,uBAAuB,OAAO,SAAmD;AACtF,SAAO,MAAMA,gCAAS,mBAAmB,UAAU,gBAAgB,KAAK;;CAGzE,MAAM,0BAA0B,OAC/B,MACA,cACyC;AACzC,SAAO,MAAMA,gCAAS,sBAAsB,UAAU,gBAAgB,MAAM,UAAU;;CAGvF,MAAM,mBAAmB,OAAO,SAA+C;AAC9E,SAAO,MAAMA,gCAAS,eAAe,UAAU,gBAAgB,KAAK;;AAGrE,QAAO;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA"}
|