@kuadrant/kuadrant-backstage-plugin-frontend 0.0.1-test.1-48246e3 → 0.0.2-dev-30af554
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/components/ApiKeyManagementTab/ApiKeyManagementTab.esm.js +153 -39
- package/dist/components/ApiKeyManagementTab/ApiKeyManagementTab.esm.js.map +1 -1
- package/dist/components/ApiProductInfoCard/ApiProductInfoCard.esm.js +35 -4
- package/dist/components/ApiProductInfoCard/ApiProductInfoCard.esm.js.map +1 -1
- package/dist/components/ApprovalQueueCard/ApprovalQueueCard.esm.js +114 -32
- package/dist/components/ApprovalQueueCard/ApprovalQueueCard.esm.js.map +1 -1
- package/dist/components/EditAPIKeyRequestDialog/EditAPIKeyRequestDialog.esm.js +106 -0
- package/dist/components/EditAPIKeyRequestDialog/EditAPIKeyRequestDialog.esm.js.map +1 -0
- package/dist/components/EditAPIProductDialog/EditAPIProductDialog.esm.js +8 -2
- package/dist/components/EditAPIProductDialog/EditAPIProductDialog.esm.js.map +1 -1
- package/dist/components/KuadrantPage/KuadrantPage.esm.js +40 -9
- package/dist/components/KuadrantPage/KuadrantPage.esm.js.map +1 -1
- package/dist/components/MyApiKeysCard/MyApiKeysCard.esm.js +169 -11
- package/dist/components/MyApiKeysCard/MyApiKeysCard.esm.js.map +1 -1
- package/dist/index.d.ts +57 -7
- package/dist/index.esm.js +1 -1
- package/dist/permissions.esm.js +43 -13
- package/dist/permissions.esm.js.map +1 -1
- package/dist-scalprum/{internal.plugin-kuadrant.908832be3d1bbb2c9c5b.js → internal.plugin-kuadrant.86c50e4da6b961c623e9.js} +2 -2
- package/dist-scalprum/internal.plugin-kuadrant.86c50e4da6b961c623e9.js.map +1 -0
- package/dist-scalprum/plugin-manifest.json +3 -3
- package/dist-scalprum/static/2120.44884438.chunk.js +3 -0
- package/dist-scalprum/static/2120.44884438.chunk.js.LICENSE.txt +9 -0
- package/dist-scalprum/static/2120.44884438.chunk.js.map +1 -0
- package/dist-scalprum/static/4306.04dfa125.chunk.js +2 -0
- package/dist-scalprum/static/4306.04dfa125.chunk.js.map +1 -0
- package/dist-scalprum/static/4556.c6bedfc4.chunk.js +3 -0
- package/dist-scalprum/static/{4161.aa5fd28d.chunk.js.LICENSE.txt → 4556.c6bedfc4.chunk.js.LICENSE.txt} +0 -10
- package/dist-scalprum/static/4556.c6bedfc4.chunk.js.map +1 -0
- package/dist-scalprum/static/5453.ee6fb9af.chunk.js +2 -0
- package/dist-scalprum/static/5453.ee6fb9af.chunk.js.map +1 -0
- package/dist-scalprum/static/6281.14f57b13.chunk.js +2 -0
- package/dist-scalprum/static/6281.14f57b13.chunk.js.map +1 -0
- package/dist-scalprum/static/7632.646001ce.chunk.js +2 -0
- package/dist-scalprum/static/7632.646001ce.chunk.js.map +1 -0
- package/dist-scalprum/static/9555.59e77806.chunk.js +2 -0
- package/dist-scalprum/static/9555.59e77806.chunk.js.map +1 -0
- package/dist-scalprum/static/exposed-PluginRoot.9522bcfa.chunk.js +2 -0
- package/dist-scalprum/static/{exposed-PluginRoot.50e173c2.chunk.js.map → exposed-PluginRoot.9522bcfa.chunk.js.map} +1 -1
- package/package.json +1 -1
- package/dist-scalprum/internal.plugin-kuadrant.908832be3d1bbb2c9c5b.js.map +0 -1
- package/dist-scalprum/static/4161.aa5fd28d.chunk.js +0 -3
- package/dist-scalprum/static/4161.aa5fd28d.chunk.js.map +0 -1
- package/dist-scalprum/static/4306.133aa342.chunk.js +0 -2
- package/dist-scalprum/static/4306.133aa342.chunk.js.map +0 -1
- package/dist-scalprum/static/5453.d8d305e9.chunk.js +0 -2
- package/dist-scalprum/static/5453.d8d305e9.chunk.js.map +0 -1
- package/dist-scalprum/static/6281.29f4549b.chunk.js +0 -2
- package/dist-scalprum/static/6281.29f4549b.chunk.js.map +0 -1
- package/dist-scalprum/static/7632.26afde62.chunk.js +0 -2
- package/dist-scalprum/static/7632.26afde62.chunk.js.map +0 -1
- package/dist-scalprum/static/8617.d1dc70a8.chunk.js +0 -2
- package/dist-scalprum/static/8617.d1dc70a8.chunk.js.map +0 -1
- package/dist-scalprum/static/exposed-PluginRoot.50e173c2.chunk.js +0 -2
|
@@ -2,9 +2,11 @@ import React, { useState } from 'react';
|
|
|
2
2
|
import { InfoCard, Table, Link } from '@backstage/core-components';
|
|
3
3
|
import { useApi, configApiRef, fetchApiRef, identityApiRef } from '@backstage/core-plugin-api';
|
|
4
4
|
import useAsync from 'react-use/lib/useAsync';
|
|
5
|
-
import { Typography, Box, Tabs, Tab, Chip, Tooltip, IconButton } from '@material-ui/core';
|
|
5
|
+
import { Typography, Box, Tabs, Tab, Menu, MenuItem, Chip, Tooltip, IconButton } from '@material-ui/core';
|
|
6
6
|
import VisibilityIcon from '@material-ui/icons/Visibility';
|
|
7
7
|
import VisibilityOffIcon from '@material-ui/icons/VisibilityOff';
|
|
8
|
+
import MoreVertIcon from '@material-ui/icons/MoreVert';
|
|
9
|
+
import { EditAPIKeyRequestDialog } from '../EditAPIKeyRequestDialog/EditAPIKeyRequestDialog.esm.js';
|
|
8
10
|
|
|
9
11
|
const MyApiKeysCard = () => {
|
|
10
12
|
const config = useApi(configApiRef);
|
|
@@ -14,9 +16,19 @@ const MyApiKeysCard = () => {
|
|
|
14
16
|
const [selectedTab, setSelectedTab] = useState(0);
|
|
15
17
|
const [, setUserId] = useState("");
|
|
16
18
|
const [visibleKeys, setVisibleKeys] = useState(/* @__PURE__ */ new Set());
|
|
19
|
+
const [menuAnchor, setMenuAnchor] = useState(null);
|
|
20
|
+
const [menuRequest, setMenuRequest] = useState(null);
|
|
21
|
+
const [editDialogState, setEditDialogState] = useState({
|
|
22
|
+
open: false,
|
|
23
|
+
request: null,
|
|
24
|
+
plans: []
|
|
25
|
+
});
|
|
26
|
+
const [refresh, setRefresh] = useState(0);
|
|
17
27
|
useAsync(async () => {
|
|
18
28
|
const identity = await identityApi.getBackstageIdentity();
|
|
19
|
-
|
|
29
|
+
const extractedUserId = identity.userEntityRef.split("/")[1] || "guest";
|
|
30
|
+
console.log(`MyApiKeysCard: setting userId from userEntityRef: ${identity.userEntityRef} -> "${extractedUserId}"`);
|
|
31
|
+
setUserId(extractedUserId);
|
|
20
32
|
}, [identityApi]);
|
|
21
33
|
const { value: requests, loading, error } = useAsync(async () => {
|
|
22
34
|
const response = await fetchApi.fetch(
|
|
@@ -27,7 +39,7 @@ const MyApiKeysCard = () => {
|
|
|
27
39
|
}
|
|
28
40
|
const data = await response.json();
|
|
29
41
|
return data.items || [];
|
|
30
|
-
}, [backendUrl, fetchApi]);
|
|
42
|
+
}, [backendUrl, fetchApi, refresh]);
|
|
31
43
|
if (loading) {
|
|
32
44
|
return /* @__PURE__ */ React.createElement(InfoCard, { title: "My API Keys" }, /* @__PURE__ */ React.createElement(Typography, null, "Loading..."));
|
|
33
45
|
}
|
|
@@ -49,6 +61,52 @@ const MyApiKeysCard = () => {
|
|
|
49
61
|
return newSet;
|
|
50
62
|
});
|
|
51
63
|
};
|
|
64
|
+
const handleMenuClose = () => {
|
|
65
|
+
setMenuAnchor(null);
|
|
66
|
+
setMenuRequest(null);
|
|
67
|
+
};
|
|
68
|
+
const handleEdit = async () => {
|
|
69
|
+
if (!menuRequest) return;
|
|
70
|
+
const request = menuRequest;
|
|
71
|
+
handleMenuClose();
|
|
72
|
+
try {
|
|
73
|
+
const apiProductResponse = await fetchApi.fetch(
|
|
74
|
+
`${backendUrl}/api/kuadrant/apiproducts/${request.spec.apiNamespace}/${request.spec.apiName}`
|
|
75
|
+
);
|
|
76
|
+
if (apiProductResponse.ok) {
|
|
77
|
+
const apiProduct = await apiProductResponse.json();
|
|
78
|
+
const plans = apiProduct.spec?.plans || [];
|
|
79
|
+
setEditDialogState({ open: true, request, plans });
|
|
80
|
+
} else {
|
|
81
|
+
console.error("Failed to fetch API product");
|
|
82
|
+
setEditDialogState({ open: true, request, plans: [] });
|
|
83
|
+
}
|
|
84
|
+
} catch (err) {
|
|
85
|
+
console.error("Error fetching plans:", err);
|
|
86
|
+
setEditDialogState({ open: true, request, plans: [] });
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
const handleDelete = async () => {
|
|
90
|
+
if (!menuRequest) return;
|
|
91
|
+
const request = menuRequest;
|
|
92
|
+
handleMenuClose();
|
|
93
|
+
if (!window.confirm("Are you sure you want to delete this request?")) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
try {
|
|
97
|
+
const response = await fetchApi.fetch(
|
|
98
|
+
`${backendUrl}/api/kuadrant/requests/${request.metadata.namespace}/${request.metadata.name}`,
|
|
99
|
+
{ method: "DELETE" }
|
|
100
|
+
);
|
|
101
|
+
if (!response.ok) {
|
|
102
|
+
throw new Error("Failed to delete request");
|
|
103
|
+
}
|
|
104
|
+
setRefresh((r) => r + 1);
|
|
105
|
+
} catch (err) {
|
|
106
|
+
console.error("Error deleting request:", err);
|
|
107
|
+
alert("Failed to delete request");
|
|
108
|
+
}
|
|
109
|
+
};
|
|
52
110
|
const columns = [
|
|
53
111
|
{
|
|
54
112
|
title: "API Product",
|
|
@@ -67,7 +125,22 @@ const MyApiKeysCard = () => {
|
|
|
67
125
|
title: "Use Case",
|
|
68
126
|
field: "spec.useCase",
|
|
69
127
|
render: (row) => {
|
|
70
|
-
|
|
128
|
+
if (!row.spec.useCase) {
|
|
129
|
+
return /* @__PURE__ */ React.createElement(Typography, { variant: "body2" }, "-");
|
|
130
|
+
}
|
|
131
|
+
return /* @__PURE__ */ React.createElement(Tooltip, { title: row.spec.useCase, placement: "top" }, /* @__PURE__ */ React.createElement(
|
|
132
|
+
Typography,
|
|
133
|
+
{
|
|
134
|
+
variant: "body2",
|
|
135
|
+
style: {
|
|
136
|
+
maxWidth: "200px",
|
|
137
|
+
overflow: "hidden",
|
|
138
|
+
textOverflow: "ellipsis",
|
|
139
|
+
whiteSpace: "nowrap"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
row.spec.useCase
|
|
143
|
+
));
|
|
71
144
|
}
|
|
72
145
|
},
|
|
73
146
|
{
|
|
@@ -82,8 +155,22 @@ const MyApiKeysCard = () => {
|
|
|
82
155
|
{
|
|
83
156
|
title: "Reason",
|
|
84
157
|
render: (row) => {
|
|
85
|
-
if (row.status?.
|
|
86
|
-
|
|
158
|
+
if (row.status?.reason) {
|
|
159
|
+
const color = row.status.phase === "Rejected" ? "error" : "textPrimary";
|
|
160
|
+
return /* @__PURE__ */ React.createElement(Tooltip, { title: row.status.reason, placement: "top" }, /* @__PURE__ */ React.createElement(
|
|
161
|
+
Typography,
|
|
162
|
+
{
|
|
163
|
+
variant: "body2",
|
|
164
|
+
color,
|
|
165
|
+
style: {
|
|
166
|
+
maxWidth: "200px",
|
|
167
|
+
overflow: "hidden",
|
|
168
|
+
textOverflow: "ellipsis",
|
|
169
|
+
whiteSpace: "nowrap"
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
row.status.reason
|
|
173
|
+
));
|
|
87
174
|
}
|
|
88
175
|
return /* @__PURE__ */ React.createElement(Typography, { variant: "body2", color: "textSecondary" }, "-");
|
|
89
176
|
}
|
|
@@ -119,8 +206,31 @@ const MyApiKeysCard = () => {
|
|
|
119
206
|
title: "Requested",
|
|
120
207
|
field: "metadata.creationTimestamp",
|
|
121
208
|
render: (row) => {
|
|
209
|
+
if (!row.metadata.creationTimestamp) {
|
|
210
|
+
return /* @__PURE__ */ React.createElement(Typography, { variant: "body2" }, "-");
|
|
211
|
+
}
|
|
122
212
|
const date = new Date(row.metadata.creationTimestamp);
|
|
123
|
-
return date.toLocaleDateString();
|
|
213
|
+
return /* @__PURE__ */ React.createElement(Typography, { variant: "body2" }, date.toLocaleDateString());
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
title: "",
|
|
218
|
+
render: (row) => {
|
|
219
|
+
return /* @__PURE__ */ React.createElement(
|
|
220
|
+
IconButton,
|
|
221
|
+
{
|
|
222
|
+
size: "small",
|
|
223
|
+
onClick: (e) => {
|
|
224
|
+
e.stopPropagation();
|
|
225
|
+
const rect = e.currentTarget.getBoundingClientRect();
|
|
226
|
+
setMenuAnchor({ top: rect.bottom, left: rect.left });
|
|
227
|
+
setMenuRequest(row);
|
|
228
|
+
},
|
|
229
|
+
"aria-controls": menuAnchor ? "myapikeys-menu" : undefined,
|
|
230
|
+
"aria-haspopup": "true"
|
|
231
|
+
},
|
|
232
|
+
/* @__PURE__ */ React.createElement(MoreVertIcon, null)
|
|
233
|
+
);
|
|
124
234
|
}
|
|
125
235
|
}
|
|
126
236
|
];
|
|
@@ -136,8 +246,24 @@ const MyApiKeysCard = () => {
|
|
|
136
246
|
return allRequests;
|
|
137
247
|
}
|
|
138
248
|
};
|
|
249
|
+
const getTabColumns = () => {
|
|
250
|
+
switch (selectedTab) {
|
|
251
|
+
case 0:
|
|
252
|
+
return columns.filter((col) => col.title !== "Reason");
|
|
253
|
+
case 1:
|
|
254
|
+
return columns.filter(
|
|
255
|
+
(col) => col.title !== "Reason" && col.title !== "Reviewed By" && col.title !== "API Key"
|
|
256
|
+
);
|
|
257
|
+
case 2:
|
|
258
|
+
return columns.filter((col) => col.title !== "API Key");
|
|
259
|
+
default:
|
|
260
|
+
return columns;
|
|
261
|
+
}
|
|
262
|
+
};
|
|
139
263
|
const tabData = getTabData();
|
|
140
|
-
|
|
264
|
+
const tabColumns = getTabColumns();
|
|
265
|
+
const isPending = (row) => !row.status || row.status.phase === "Pending";
|
|
266
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
141
267
|
InfoCard,
|
|
142
268
|
{
|
|
143
269
|
title: "My API Keys",
|
|
@@ -164,11 +290,43 @@ const MyApiKeysCard = () => {
|
|
|
164
290
|
search: false,
|
|
165
291
|
toolbar: false
|
|
166
292
|
},
|
|
167
|
-
columns,
|
|
168
|
-
data: tabData
|
|
293
|
+
columns: tabColumns,
|
|
294
|
+
data: tabData.map((item) => ({
|
|
295
|
+
...item,
|
|
296
|
+
id: item.metadata.name
|
|
297
|
+
}))
|
|
169
298
|
}
|
|
170
299
|
)
|
|
171
|
-
)
|
|
300
|
+
), /* @__PURE__ */ React.createElement(
|
|
301
|
+
Menu,
|
|
302
|
+
{
|
|
303
|
+
id: "myapikeys-menu",
|
|
304
|
+
open: Boolean(menuAnchor),
|
|
305
|
+
onClose: handleMenuClose,
|
|
306
|
+
anchorReference: "anchorPosition",
|
|
307
|
+
anchorPosition: menuAnchor || { top: 0, left: 0 }
|
|
308
|
+
},
|
|
309
|
+
menuRequest && (() => {
|
|
310
|
+
const items = [];
|
|
311
|
+
if (isPending(menuRequest)) {
|
|
312
|
+
items.push(/* @__PURE__ */ React.createElement(MenuItem, { key: "edit", onClick: handleEdit }, "Edit"));
|
|
313
|
+
}
|
|
314
|
+
items.push(/* @__PURE__ */ React.createElement(MenuItem, { key: "delete", onClick: handleDelete }, "Delete"));
|
|
315
|
+
return items;
|
|
316
|
+
})()
|
|
317
|
+
), editDialogState.request && /* @__PURE__ */ React.createElement(
|
|
318
|
+
EditAPIKeyRequestDialog,
|
|
319
|
+
{
|
|
320
|
+
open: editDialogState.open,
|
|
321
|
+
request: editDialogState.request,
|
|
322
|
+
availablePlans: editDialogState.plans,
|
|
323
|
+
onClose: () => setEditDialogState({ open: false, request: null, plans: [] }),
|
|
324
|
+
onSuccess: () => {
|
|
325
|
+
setEditDialogState({ open: false, request: null, plans: [] });
|
|
326
|
+
setRefresh((r) => r + 1);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
));
|
|
172
330
|
};
|
|
173
331
|
|
|
174
332
|
export { MyApiKeysCard };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MyApiKeysCard.esm.js","sources":["../../../src/components/MyApiKeysCard/MyApiKeysCard.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { InfoCard, Table, TableColumn, Link } from '@backstage/core-components';\nimport { useApi, configApiRef, fetchApiRef, identityApiRef } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/lib/useAsync';\nimport { Box, Chip, Typography, Tabs, Tab, IconButton, Tooltip } from '@material-ui/core';\nimport VisibilityIcon from '@material-ui/icons/Visibility';\nimport VisibilityOffIcon from '@material-ui/icons/VisibilityOff';\n\ninterface APIKeyRequest {\n metadata: {\n name: string;\n namespace: string;\n creationTimestamp: string;\n };\n spec: {\n apiName: string;\n apiNamespace: string;\n planTier: string;\n useCase?: string;\n requestedBy: {\n userId: string;\n email?: string;\n };\n };\n status?: {\n phase: 'Pending' | 'Approved' | 'Rejected';\n apiKey?: string;\n apiHostname?: string;\n reason?: string;\n reviewedBy?: string;\n reviewedAt?: string;\n };\n}\n\nexport const MyApiKeysCard = () => {\n const config = useApi(configApiRef);\n const fetchApi = useApi(fetchApiRef);\n const identityApi = useApi(identityApiRef);\n const backendUrl = config.getString('backend.baseUrl');\n const [selectedTab, setSelectedTab] = useState(0);\n const [, setUserId] = useState<string>('');\n const [visibleKeys, setVisibleKeys] = useState<Set<string>>(new Set());\n\n useAsync(async () => {\n const identity = await identityApi.getBackstageIdentity();\n setUserId(identity.userEntityRef.split('/')[1] || 'guest');\n }, [identityApi]);\n\n const { value: requests, loading, error } = useAsync(async () => {\n const response = await fetchApi.fetch(\n `${backendUrl}/api/kuadrant/requests/my`\n );\n if (!response.ok) {\n throw new Error('failed to fetch requests');\n }\n const data = await response.json();\n return data.items || [];\n }, [backendUrl, fetchApi]);\n\n if (loading) {\n return (\n <InfoCard title=\"My API Keys\">\n <Typography>Loading...</Typography>\n </InfoCard>\n );\n }\n\n if (error) {\n return (\n <InfoCard title=\"My API Keys\">\n <Typography color=\"error\">Error loading API keys: {error.message}</Typography>\n </InfoCard>\n );\n }\n\n const allRequests = requests || [];\n const approvedRequests = allRequests.filter((r: APIKeyRequest) => r.status?.phase === 'Approved');\n const pendingRequests = allRequests.filter((r: APIKeyRequest) => !r.status?.phase || r.status.phase === 'Pending');\n const rejectedRequests = allRequests.filter((r: APIKeyRequest) => r.status?.phase === 'Rejected');\n\n const toggleKeyVisibility = (keyName: string) => {\n setVisibleKeys(prev => {\n const newSet = new Set(prev);\n if (newSet.has(keyName)) {\n newSet.delete(keyName);\n } else {\n newSet.add(keyName);\n }\n return newSet;\n });\n };\n\n const columns: TableColumn<APIKeyRequest>[] = [\n {\n title: 'API Product',\n field: 'spec.apiName',\n render: (row: APIKeyRequest) => (\n <Link to={`/catalog/default/api/${row.spec.apiName}/api-keys`}>\n <strong>{row.spec.apiName}</strong>\n </Link>\n ),\n },\n {\n title: 'Plan',\n field: 'spec.planTier',\n render: (row: APIKeyRequest) => {\n const color = row.spec.planTier === 'gold' ? 'primary' :\n row.spec.planTier === 'silver' ? 'default' : 'secondary';\n return <Chip label={row.spec.planTier} color={color} size=\"small\" />;\n },\n },\n {\n title: 'Use Case',\n field: 'spec.useCase',\n render: (row: APIKeyRequest) => {\n return (\n <Typography variant=\"body2\">\n {row.spec.useCase || '-'}\n </Typography>\n );\n },\n },\n {\n title: 'Status',\n field: 'status.phase',\n render: (row: APIKeyRequest) => {\n const phase = row.status?.phase || 'Pending';\n const color = phase === 'Approved' ? 'primary' :\n phase === 'Rejected' ? 'secondary' : 'default';\n return <Chip label={phase} color={color} size=\"small\" />;\n },\n },\n {\n title: 'Reason',\n render: (row: APIKeyRequest) => {\n if (row.status?.phase === 'Rejected' && row.status.reason) {\n return (\n <Typography variant=\"body2\" color=\"error\">\n {row.status.reason}\n </Typography>\n );\n }\n return <Typography variant=\"body2\" color=\"textSecondary\">-</Typography>;\n },\n },\n {\n title: 'Reviewed By',\n render: (row: APIKeyRequest) => {\n if ((row.status?.phase === 'Approved' || row.status?.phase === 'Rejected') && row.status.reviewedBy) {\n const reviewedDate = row.status.reviewedAt ? new Date(row.status.reviewedAt).toLocaleDateString() : '';\n return (\n <Box>\n <Typography variant=\"body2\">{row.status.reviewedBy}</Typography>\n {reviewedDate && (\n <Typography variant=\"caption\" color=\"textSecondary\">\n {reviewedDate}\n </Typography>\n )}\n </Box>\n );\n }\n return <Typography variant=\"body2\" color=\"textSecondary\">-</Typography>;\n },\n },\n {\n title: 'API Key',\n render: (row: APIKeyRequest) => {\n if (row.status?.phase === 'Approved' && row.status.apiKey) {\n const isVisible = visibleKeys.has(row.metadata.name);\n return (\n <Box display=\"flex\" alignItems=\"center\" style={{ gap: 8 }}>\n <Box fontFamily=\"monospace\" fontSize=\"0.875rem\">\n {isVisible ? row.status.apiKey : '•'.repeat(20) + '...'}\n </Box>\n <Tooltip title={isVisible ? 'hide key' : 'show key'}>\n <IconButton\n size=\"small\"\n onClick={() => toggleKeyVisibility(row.metadata.name)}\n >\n {isVisible ? <VisibilityOffIcon fontSize=\"small\" /> : <VisibilityIcon fontSize=\"small\" />}\n </IconButton>\n </Tooltip>\n </Box>\n );\n }\n return <Typography variant=\"body2\" color=\"textSecondary\">-</Typography>;\n },\n },\n {\n title: 'Requested',\n field: 'metadata.creationTimestamp',\n render: (row: APIKeyRequest) => {\n const date = new Date(row.metadata.creationTimestamp);\n return date.toLocaleDateString();\n },\n },\n ];\n\n const getTabData = () => {\n switch (selectedTab) {\n case 0:\n return approvedRequests;\n case 1:\n return pendingRequests;\n case 2:\n return rejectedRequests;\n default:\n return allRequests;\n }\n };\n\n const tabData = getTabData();\n\n return (\n <InfoCard\n title=\"My API Keys\"\n subheader={`${approvedRequests.length} active, ${pendingRequests.length} pending`}\n >\n <Box mb={2}>\n <Tabs\n value={selectedTab}\n onChange={(_, newValue) => setSelectedTab(newValue)}\n indicatorColor=\"primary\"\n textColor=\"primary\"\n >\n <Tab label={`Active (${approvedRequests.length})`} />\n <Tab label={`Pending (${pendingRequests.length})`} />\n <Tab label={`Rejected (${rejectedRequests.length})`} />\n </Tabs>\n </Box>\n {tabData.length === 0 ? (\n <Box p={3} textAlign=\"center\">\n <Typography variant=\"body1\" color=\"textSecondary\">\n {selectedTab === 0 && 'No active API keys. Request access to an API to get started.'}\n {selectedTab === 1 && 'No pending requests.'}\n {selectedTab === 2 && 'No rejected requests.'}\n </Typography>\n </Box>\n ) : (\n <Table\n options={{\n paging: tabData.length > 10,\n pageSize: 10,\n search: false,\n toolbar: false,\n }}\n columns={columns}\n data={tabData}\n />\n )}\n </InfoCard>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAkCO,MAAM,gBAAgB,MAAM;AACjC,EAAM,MAAA,MAAA,GAAS,OAAO,YAAY,CAAA;AAClC,EAAM,MAAA,QAAA,GAAW,OAAO,WAAW,CAAA;AACnC,EAAM,MAAA,WAAA,GAAc,OAAO,cAAc,CAAA;AACzC,EAAM,MAAA,UAAA,GAAa,MAAO,CAAA,SAAA,CAAU,iBAAiB,CAAA;AACrD,EAAA,MAAM,CAAC,WAAA,EAAa,cAAc,CAAA,GAAI,SAAS,CAAC,CAAA;AAChD,EAAA,MAAM,GAAG,SAAS,CAAA,GAAI,SAAiB,EAAE,CAAA;AACzC,EAAA,MAAM,CAAC,WAAa,EAAA,cAAc,IAAI,QAAsB,iBAAA,IAAI,KAAK,CAAA;AAErE,EAAA,QAAA,CAAS,YAAY;AACnB,IAAM,MAAA,QAAA,GAAW,MAAM,WAAA,CAAY,oBAAqB,EAAA;AACxD,IAAA,SAAA,CAAU,SAAS,aAAc,CAAA,KAAA,CAAM,GAAG,CAAE,CAAA,CAAC,KAAK,OAAO,CAAA;AAAA,GAC3D,EAAG,CAAC,WAAW,CAAC,CAAA;AAEhB,EAAA,MAAM,EAAE,KAAO,EAAA,QAAA,EAAU,SAAS,KAAM,EAAA,GAAI,SAAS,YAAY;AAC/D,IAAM,MAAA,QAAA,GAAW,MAAM,QAAS,CAAA,KAAA;AAAA,MAC9B,GAAG,UAAU,CAAA,yBAAA;AAAA,KACf;AACA,IAAI,IAAA,CAAC,SAAS,EAAI,EAAA;AAChB,MAAM,MAAA,IAAI,MAAM,0BAA0B,CAAA;AAAA;AAE5C,IAAM,MAAA,IAAA,GAAO,MAAM,QAAA,CAAS,IAAK,EAAA;AACjC,IAAO,OAAA,IAAA,CAAK,SAAS,EAAC;AAAA,GACrB,EAAA,CAAC,UAAY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AA,eAAA,CAAgB,MAAM,CAAK,CAAA,CAAA,EAAA,CAAA;AAAA,0CAClD,GAAI,EAAA,EAAA,KAAA,EAAO,CAAa,UAAA,EAAA,gBAAA,CAAiB,MAAM,CAAK,CAAA,CAAA,EAAA;AAAA,KAEzD,CAAA;AAAA,IACC,OAAA,CAAQ,MAAW,KAAA,CAAA,mBACjB,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAI,GAAG,CAAG,EAAA,SAAA,EAAU,QACnB,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,UAAW,EAAA,EAAA,OAAA,EAAQ,SAAQ,KAAM,EAAA,eAAA,EAAA,EAC/B,WAAgB,KAAA,CAAA,IAAK,8DACrB,EAAA,WAAA,KAAgB,CAAK,IAAA,sBAAA,EACrB,WAAgB,KAAA,CAAA,IAAK,uBACxB,CACF,CAEA,mBAAA,KAAA,CAAA,aAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,OAAS,EAAA;AAAA,UACP,MAAA,EAAQ,QAAQ,MAAS,GAAA,EAAA;AAAA,UACzB,QAAU,EAAA,EAAA;AAAA,UACV,MAAQ,EAAA,KAAA;AAAA,UACR,OAAS,EAAA;AAAA,SACX;AAAA,QACA,OAAA;AAAA,QACA,IAAM,EAAA;AAAA;AAAA;AACR,GAEJ;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"MyApiKeysCard.esm.js","sources":["../../../src/components/MyApiKeysCard/MyApiKeysCard.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { InfoCard, Table, TableColumn, Link } from '@backstage/core-components';\nimport { useApi, configApiRef, fetchApiRef, identityApiRef } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/lib/useAsync';\nimport { Box, Chip, Typography, Tabs, Tab, IconButton, Tooltip, Menu, MenuItem } from '@material-ui/core';\nimport VisibilityIcon from '@material-ui/icons/Visibility';\nimport VisibilityOffIcon from '@material-ui/icons/VisibilityOff';\nimport MoreVertIcon from '@material-ui/icons/MoreVert';\nimport { EditAPIKeyRequestDialog } from '../EditAPIKeyRequestDialog';\nimport { APIKeyRequest } from '../../types/api-management';\n\nexport const MyApiKeysCard = () => {\n const config = useApi(configApiRef);\n const fetchApi = useApi(fetchApiRef);\n const identityApi = useApi(identityApiRef);\n const backendUrl = config.getString('backend.baseUrl');\n const [selectedTab, setSelectedTab] = useState(0);\n const [, setUserId] = useState<string>('');\n const [visibleKeys, setVisibleKeys] = useState<Set<string>>(new Set());\n const [menuAnchor, setMenuAnchor] = useState<{ top: number; left: number } | null>(null);\n const [menuRequest, setMenuRequest] = useState<APIKeyRequest | null>(null);\n const [editDialogState, setEditDialogState] = useState<{ open: boolean; request: APIKeyRequest | null; plans: any[] }>({\n open: false,\n request: null,\n plans: [],\n });\n const [refresh, setRefresh] = useState(0);\n\n useAsync(async () => {\n const identity = await identityApi.getBackstageIdentity();\n const extractedUserId = identity.userEntityRef.split('/')[1] || 'guest';\n console.log(`MyApiKeysCard: setting userId from userEntityRef: ${identity.userEntityRef} -> \"${extractedUserId}\"`);\n setUserId(extractedUserId);\n }, [identityApi]);\n\n const { value: requests, loading, error } = useAsync(async () => {\n const response = await fetchApi.fetch(\n `${backendUrl}/api/kuadrant/requests/my`\n );\n if (!response.ok) {\n throw new Error('failed to fetch requests');\n }\n const data = await response.json();\n return data.items || [];\n }, [backendUrl, fetchApi, refresh]);\n\n if (loading) {\n return (\n <InfoCard title=\"My API Keys\">\n <Typography>Loading...</Typography>\n </InfoCard>\n );\n }\n\n if (error) {\n return (\n <InfoCard title=\"My API Keys\">\n <Typography color=\"error\">Error loading API keys: {error.message}</Typography>\n </InfoCard>\n );\n }\n\n const allRequests = requests || [];\n const approvedRequests = allRequests.filter((r: APIKeyRequest) => r.status?.phase === 'Approved');\n const pendingRequests = allRequests.filter((r: APIKeyRequest) => !r.status?.phase || r.status.phase === 'Pending');\n const rejectedRequests = allRequests.filter((r: APIKeyRequest) => r.status?.phase === 'Rejected');\n\n const toggleKeyVisibility = (keyName: string) => {\n setVisibleKeys(prev => {\n const newSet = new Set(prev);\n if (newSet.has(keyName)) {\n newSet.delete(keyName);\n } else {\n newSet.add(keyName);\n }\n return newSet;\n });\n };\n\n const handleMenuClose = () => {\n setMenuAnchor(null);\n setMenuRequest(null);\n };\n\n const handleEdit = async () => {\n if (!menuRequest) return;\n\n const request = menuRequest;\n handleMenuClose();\n\n // Fetch available plans for this API\n try {\n const apiProductResponse = await fetchApi.fetch(\n `${backendUrl}/api/kuadrant/apiproducts/${request.spec.apiNamespace}/${request.spec.apiName}`\n );\n\n if (apiProductResponse.ok) {\n const apiProduct = await apiProductResponse.json();\n const plans = apiProduct.spec?.plans || [];\n setEditDialogState({ open: true, request, plans });\n } else {\n console.error('Failed to fetch API product');\n setEditDialogState({ open: true, request, plans: [] });\n }\n } catch (err) {\n console.error('Error fetching plans:', err);\n setEditDialogState({ open: true, request, plans: [] });\n }\n };\n\n const handleDelete = async () => {\n if (!menuRequest) return;\n\n const request = menuRequest;\n handleMenuClose();\n\n if (!window.confirm('Are you sure you want to delete this request?')) {\n return;\n }\n\n try {\n const response = await fetchApi.fetch(\n `${backendUrl}/api/kuadrant/requests/${request.metadata.namespace}/${request.metadata.name}`,\n { method: 'DELETE' }\n );\n\n if (!response.ok) {\n throw new Error('Failed to delete request');\n }\n\n setRefresh(r => r + 1);\n } catch (err) {\n console.error('Error deleting request:', err);\n alert('Failed to delete request');\n }\n };\n\n const columns: TableColumn<APIKeyRequest>[] = [\n {\n title: 'API Product',\n field: 'spec.apiName',\n render: (row: APIKeyRequest) => (\n <Link to={`/catalog/default/api/${row.spec.apiName}/api-keys`}>\n <strong>{row.spec.apiName}</strong>\n </Link>\n ),\n },\n {\n title: 'Plan',\n field: 'spec.planTier',\n render: (row: APIKeyRequest) => {\n const color = row.spec.planTier === 'gold' ? 'primary' :\n row.spec.planTier === 'silver' ? 'default' : 'secondary';\n return <Chip label={row.spec.planTier} color={color} size=\"small\" />;\n },\n },\n {\n title: 'Use Case',\n field: 'spec.useCase',\n render: (row: APIKeyRequest) => {\n if (!row.spec.useCase) {\n return <Typography variant=\"body2\">-</Typography>;\n }\n return (\n <Tooltip title={row.spec.useCase} placement=\"top\">\n <Typography\n variant=\"body2\"\n style={{\n maxWidth: '200px',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n }}\n >\n {row.spec.useCase}\n </Typography>\n </Tooltip>\n );\n },\n },\n {\n title: 'Status',\n field: 'status.phase',\n render: (row: APIKeyRequest) => {\n const phase = row.status?.phase || 'Pending';\n const color = phase === 'Approved' ? 'primary' :\n phase === 'Rejected' ? 'secondary' : 'default';\n return <Chip label={phase} color={color} size=\"small\" />;\n },\n },\n {\n title: 'Reason',\n render: (row: APIKeyRequest) => {\n if (row.status?.reason) {\n const color = row.status.phase === 'Rejected' ? 'error' : 'textPrimary';\n return (\n <Tooltip title={row.status.reason} placement=\"top\">\n <Typography\n variant=\"body2\"\n color={color}\n style={{\n maxWidth: '200px',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n }}\n >\n {row.status.reason}\n </Typography>\n </Tooltip>\n );\n }\n return <Typography variant=\"body2\" color=\"textSecondary\">-</Typography>;\n },\n },\n {\n title: 'Reviewed By',\n render: (row: APIKeyRequest) => {\n if ((row.status?.phase === 'Approved' || row.status?.phase === 'Rejected') && row.status.reviewedBy) {\n const reviewedDate = row.status.reviewedAt ? new Date(row.status.reviewedAt).toLocaleDateString() : '';\n return (\n <Box>\n <Typography variant=\"body2\">{row.status.reviewedBy}</Typography>\n {reviewedDate && (\n <Typography variant=\"caption\" color=\"textSecondary\">\n {reviewedDate}\n </Typography>\n )}\n </Box>\n );\n }\n return <Typography variant=\"body2\" color=\"textSecondary\">-</Typography>;\n },\n },\n {\n title: 'API Key',\n render: (row: APIKeyRequest) => {\n if (row.status?.phase === 'Approved' && row.status.apiKey) {\n const isVisible = visibleKeys.has(row.metadata.name);\n return (\n <Box display=\"flex\" alignItems=\"center\" style={{ gap: 8 }}>\n <Box fontFamily=\"monospace\" fontSize=\"0.875rem\">\n {isVisible ? row.status.apiKey : '•'.repeat(20) + '...'}\n </Box>\n <Tooltip title={isVisible ? 'hide key' : 'show key'}>\n <IconButton\n size=\"small\"\n onClick={() => toggleKeyVisibility(row.metadata.name)}\n >\n {isVisible ? <VisibilityOffIcon fontSize=\"small\" /> : <VisibilityIcon fontSize=\"small\" />}\n </IconButton>\n </Tooltip>\n </Box>\n );\n }\n return <Typography variant=\"body2\" color=\"textSecondary\">-</Typography>;\n },\n },\n {\n title: 'Requested',\n field: 'metadata.creationTimestamp',\n render: (row: APIKeyRequest) => {\n if (!row.metadata.creationTimestamp) {\n return <Typography variant=\"body2\">-</Typography>;\n }\n const date = new Date(row.metadata.creationTimestamp);\n return <Typography variant=\"body2\">{date.toLocaleDateString()}</Typography>;\n },\n },\n {\n title: '',\n render: (row: APIKeyRequest) => {\n return (\n <IconButton\n size=\"small\"\n onClick={(e) => {\n e.stopPropagation();\n const rect = e.currentTarget.getBoundingClientRect();\n setMenuAnchor({ top: rect.bottom, left: rect.left });\n setMenuRequest(row);\n }}\n aria-controls={menuAnchor ? 'myapikeys-menu' : undefined}\n aria-haspopup=\"true\"\n >\n <MoreVertIcon />\n </IconButton>\n );\n },\n },\n ];\n\n const getTabData = () => {\n switch (selectedTab) {\n case 0:\n return approvedRequests;\n case 1:\n return pendingRequests;\n case 2:\n return rejectedRequests;\n default:\n return allRequests;\n }\n };\n\n const getTabColumns = () => {\n switch (selectedTab) {\n case 0: // Active - no Reason\n return columns.filter(col => col.title !== 'Reason');\n case 1: // Pending - no Reason, Reviewed By, API Key\n return columns.filter(col =>\n col.title !== 'Reason' &&\n col.title !== 'Reviewed By' &&\n col.title !== 'API Key'\n );\n case 2: // Rejected - no API Key\n return columns.filter(col => col.title !== 'API Key');\n default:\n return columns;\n }\n };\n\n const tabData = getTabData();\n const tabColumns = getTabColumns();\n const isPending = (row: APIKeyRequest) => !row.status || row.status.phase === 'Pending';\n\n return (\n <>\n <InfoCard\n title=\"My API Keys\"\n subheader={`${approvedRequests.length} active, ${pendingRequests.length} pending`}\n >\n <Box mb={2}>\n <Tabs\n value={selectedTab}\n onChange={(_, newValue) => setSelectedTab(newValue)}\n indicatorColor=\"primary\"\n textColor=\"primary\"\n >\n <Tab label={`Active (${approvedRequests.length})`} />\n <Tab label={`Pending (${pendingRequests.length})`} />\n <Tab label={`Rejected (${rejectedRequests.length})`} />\n </Tabs>\n </Box>\n {tabData.length === 0 ? (\n <Box p={3} textAlign=\"center\">\n <Typography variant=\"body1\" color=\"textSecondary\">\n {selectedTab === 0 && 'No active API keys. Request access to an API to get started.'}\n {selectedTab === 1 && 'No pending requests.'}\n {selectedTab === 2 && 'No rejected requests.'}\n </Typography>\n </Box>\n ) : (\n <Table\n options={{\n paging: tabData.length > 10,\n pageSize: 10,\n search: false,\n toolbar: false,\n }}\n columns={tabColumns}\n data={tabData.map((item: APIKeyRequest) => ({\n ...item,\n id: item.metadata.name,\n }))}\n />\n )}\n </InfoCard>\n\n <Menu\n id=\"myapikeys-menu\"\n open={Boolean(menuAnchor)}\n onClose={handleMenuClose}\n anchorReference=\"anchorPosition\"\n anchorPosition={menuAnchor || { top: 0, left: 0 }}\n >\n {menuRequest && (() => {\n const items = [];\n if (isPending(menuRequest)) {\n items.push(<MenuItem key=\"edit\" onClick={handleEdit}>Edit</MenuItem>);\n }\n items.push(<MenuItem key=\"delete\" onClick={handleDelete}>Delete</MenuItem>);\n return items;\n })()}\n </Menu>\n\n {editDialogState.request && (\n <EditAPIKeyRequestDialog\n open={editDialogState.open}\n request={editDialogState.request}\n availablePlans={editDialogState.plans}\n onClose={() => setEditDialogState({ open: false, request: null, plans: [] })}\n onSuccess={() => {\n setEditDialogState({ open: false, request: null, plans: [] });\n setRefresh(r => r + 1);\n }}\n />\n )}\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;AAWO,MAAM,gBAAgB,MAAM;AACjC,EAAM,MAAA,MAAA,G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,OAAA,KAAA;AAAA,KACN;AAAA,GACL,EAEC,gBAAgB,OACf,oBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,uBAAA;AAAA,IAAA;AAAA,MACC,MAAM,eAAgB,CAAA,IAAA;AAAA,MACtB,SAAS,eAAgB,CAAA,OAAA;AAAA,MACzB,gBAAgB,eAAgB,CAAA,KAAA;AAAA,MAChC,OAAA,EAAS,MAAM,kBAAA,CAAmB,EAAE,IAAA,EAAM,KAAO,EAAA,OAAA,EAAS,IAAM,EAAA,KAAA,EAAO,EAAC,EAAG,CAAA;AAAA,MAC3E,WAAW,MAAM;AACf,QAAmB,kBAAA,CAAA,EAAE,MAAM,KAAO,EAAA,OAAA,EAAS,MAAM,KAAO,EAAA,IAAI,CAAA;AAC5D,QAAW,UAAA,CAAA,CAAA,CAAA,KAAK,IAAI,CAAC,CAAA;AAAA;AACvB;AAAA,GAGN,CAAA;AAEJ;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -55,10 +55,45 @@ declare const kuadrantPlanPolicyReadPermission: _backstage_plugin_permission_com
|
|
|
55
55
|
declare const kuadrantPlanPolicyUpdatePermission: _backstage_plugin_permission_common.BasicPermission;
|
|
56
56
|
declare const kuadrantPlanPolicyDeletePermission: _backstage_plugin_permission_common.BasicPermission;
|
|
57
57
|
declare const kuadrantPlanPolicyListPermission: _backstage_plugin_permission_common.BasicPermission;
|
|
58
|
+
/**
|
|
59
|
+
* permission to create new API products
|
|
60
|
+
* granted to api owners and admins
|
|
61
|
+
*/
|
|
58
62
|
declare const kuadrantApiProductCreatePermission: _backstage_plugin_permission_common.BasicPermission;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
63
|
+
/**
|
|
64
|
+
* permission to read API products owned by the current user
|
|
65
|
+
* for api owners to view their own products
|
|
66
|
+
*/
|
|
67
|
+
declare const kuadrantApiProductReadOwnPermission: _backstage_plugin_permission_common.BasicPermission;
|
|
68
|
+
/**
|
|
69
|
+
* permission to read all API products regardless of ownership
|
|
70
|
+
* for platform engineers/admins who need to view all products
|
|
71
|
+
*/
|
|
72
|
+
declare const kuadrantApiProductReadAllPermission: _backstage_plugin_permission_common.BasicPermission;
|
|
73
|
+
/**
|
|
74
|
+
* permission to update API products owned by the current user
|
|
75
|
+
* for api owners to modify their own products
|
|
76
|
+
*/
|
|
77
|
+
declare const kuadrantApiProductUpdateOwnPermission: _backstage_plugin_permission_common.BasicPermission;
|
|
78
|
+
/**
|
|
79
|
+
* permission to update any API product regardless of ownership
|
|
80
|
+
* for platform engineers/admins
|
|
81
|
+
*/
|
|
82
|
+
declare const kuadrantApiProductUpdateAllPermission: _backstage_plugin_permission_common.BasicPermission;
|
|
83
|
+
/**
|
|
84
|
+
* permission to delete API products owned by the current user
|
|
85
|
+
* for api owners to remove their own products
|
|
86
|
+
*/
|
|
87
|
+
declare const kuadrantApiProductDeleteOwnPermission: _backstage_plugin_permission_common.BasicPermission;
|
|
88
|
+
/**
|
|
89
|
+
* permission to delete any API product regardless of ownership
|
|
90
|
+
* for platform engineers/admins
|
|
91
|
+
*/
|
|
92
|
+
declare const kuadrantApiProductDeleteAllPermission: _backstage_plugin_permission_common.BasicPermission;
|
|
93
|
+
/**
|
|
94
|
+
* permission to list API products
|
|
95
|
+
* backend filters results based on .own vs .all read permissions
|
|
96
|
+
*/
|
|
62
97
|
declare const kuadrantApiProductListPermission: _backstage_plugin_permission_common.BasicPermission;
|
|
63
98
|
/**
|
|
64
99
|
* permission to create API key requests
|
|
@@ -81,10 +116,25 @@ declare const kuadrantApiKeyRequestReadOwnPermission: _backstage_plugin_permissi
|
|
|
81
116
|
*/
|
|
82
117
|
declare const kuadrantApiKeyRequestReadAllPermission: _backstage_plugin_permission_common.BasicPermission;
|
|
83
118
|
/**
|
|
84
|
-
* permission to
|
|
85
|
-
*
|
|
119
|
+
* permission to update API key requests owned by the current user
|
|
120
|
+
* allows users to edit their own pending requests (change plan tier, use case)
|
|
121
|
+
*/
|
|
122
|
+
declare const kuadrantApiKeyRequestUpdateOwnPermission: _backstage_plugin_permission_common.BasicPermission;
|
|
123
|
+
/**
|
|
124
|
+
* permission to update any API key request regardless of ownership
|
|
125
|
+
* typically granted to API owners and platform engineers for approving/rejecting requests
|
|
126
|
+
*/
|
|
127
|
+
declare const kuadrantApiKeyRequestUpdateAllPermission: _backstage_plugin_permission_common.BasicPermission;
|
|
128
|
+
/**
|
|
129
|
+
* permission to delete API key requests created by the current user
|
|
130
|
+
* allows users to cancel their own pending requests
|
|
131
|
+
*/
|
|
132
|
+
declare const kuadrantApiKeyRequestDeleteOwnPermission: _backstage_plugin_permission_common.BasicPermission;
|
|
133
|
+
/**
|
|
134
|
+
* permission to delete any API key request regardless of ownership
|
|
135
|
+
* for platform engineers/admins
|
|
86
136
|
*/
|
|
87
|
-
declare const
|
|
137
|
+
declare const kuadrantApiKeyRequestDeleteAllPermission: _backstage_plugin_permission_common.BasicPermission;
|
|
88
138
|
declare const kuadrantApiKeyRequestListPermission: _backstage_plugin_permission_common.BasicPermission;
|
|
89
139
|
/**
|
|
90
140
|
* permission to read API keys owned by the current user
|
|
@@ -108,4 +158,4 @@ declare const kuadrantApiKeyDeleteOwnPermission: _backstage_plugin_permission_co
|
|
|
108
158
|
declare const kuadrantApiKeyDeleteAllPermission: _backstage_plugin_permission_common.BasicPermission;
|
|
109
159
|
declare const kuadrantPermissions: (_backstage_plugin_permission_common.BasicPermission | _backstage_plugin_permission_common.ResourcePermission<"apiproduct">)[];
|
|
110
160
|
|
|
111
|
-
export { ApiAccessCard, ApiKeyManagementTab, ApiProductInfoCard, ApprovalQueueCard, EntityKuadrantApiAccessCard, EntityKuadrantApiKeyManagementTab, EntityKuadrantApiKeysContent, EntityKuadrantApiProductInfoContent, KuadrantApprovalQueueCard, KuadrantPage, PlanPolicyDetailPage, kuadrantApiKeyDeleteAllPermission, kuadrantApiKeyDeleteOwnPermission, kuadrantApiKeyReadAllPermission, kuadrantApiKeyReadOwnPermission, kuadrantApiKeyRequestCreatePermission, kuadrantApiKeyRequestListPermission, kuadrantApiKeyRequestReadAllPermission, kuadrantApiKeyRequestReadOwnPermission,
|
|
161
|
+
export { ApiAccessCard, ApiKeyManagementTab, ApiProductInfoCard, ApprovalQueueCard, EntityKuadrantApiAccessCard, EntityKuadrantApiKeyManagementTab, EntityKuadrantApiKeysContent, EntityKuadrantApiProductInfoContent, KuadrantApprovalQueueCard, KuadrantPage, PlanPolicyDetailPage, kuadrantApiKeyDeleteAllPermission, kuadrantApiKeyDeleteOwnPermission, kuadrantApiKeyReadAllPermission, kuadrantApiKeyReadOwnPermission, kuadrantApiKeyRequestCreatePermission, kuadrantApiKeyRequestDeleteAllPermission, kuadrantApiKeyRequestDeleteOwnPermission, kuadrantApiKeyRequestListPermission, kuadrantApiKeyRequestReadAllPermission, kuadrantApiKeyRequestReadOwnPermission, kuadrantApiKeyRequestUpdateAllPermission, kuadrantApiKeyRequestUpdateOwnPermission, kuadrantApiProductCreatePermission, kuadrantApiProductDeleteAllPermission, kuadrantApiProductDeleteOwnPermission, kuadrantApiProductListPermission, kuadrantApiProductReadAllPermission, kuadrantApiProductReadOwnPermission, kuadrantApiProductUpdateAllPermission, kuadrantApiProductUpdateOwnPermission, kuadrantPermissions, kuadrantPlanPolicyCreatePermission, kuadrantPlanPolicyDeletePermission, kuadrantPlanPolicyListPermission, kuadrantPlanPolicyReadPermission, kuadrantPlanPolicyUpdatePermission, kuadrantPlugin };
|
package/dist/index.esm.js
CHANGED
|
@@ -3,5 +3,5 @@ export { ApiAccessCard } from './components/ApiAccessCard/ApiAccessCard.esm.js';
|
|
|
3
3
|
export { ApiKeyManagementTab } from './components/ApiKeyManagementTab/ApiKeyManagementTab.esm.js';
|
|
4
4
|
export { ApiProductInfoCard } from './components/ApiProductInfoCard/ApiProductInfoCard.esm.js';
|
|
5
5
|
export { ApprovalQueueCard } from './components/ApprovalQueueCard/ApprovalQueueCard.esm.js';
|
|
6
|
-
export { kuadrantApiKeyDeleteAllPermission, kuadrantApiKeyDeleteOwnPermission, kuadrantApiKeyReadAllPermission, kuadrantApiKeyReadOwnPermission, kuadrantApiKeyRequestCreatePermission, kuadrantApiKeyRequestListPermission, kuadrantApiKeyRequestReadAllPermission, kuadrantApiKeyRequestReadOwnPermission,
|
|
6
|
+
export { kuadrantApiKeyDeleteAllPermission, kuadrantApiKeyDeleteOwnPermission, kuadrantApiKeyReadAllPermission, kuadrantApiKeyReadOwnPermission, kuadrantApiKeyRequestCreatePermission, kuadrantApiKeyRequestDeleteAllPermission, kuadrantApiKeyRequestDeleteOwnPermission, kuadrantApiKeyRequestListPermission, kuadrantApiKeyRequestReadAllPermission, kuadrantApiKeyRequestReadOwnPermission, kuadrantApiKeyRequestUpdateAllPermission, kuadrantApiKeyRequestUpdateOwnPermission, kuadrantApiProductCreatePermission, kuadrantApiProductDeleteAllPermission, kuadrantApiProductDeleteOwnPermission, kuadrantApiProductListPermission, kuadrantApiProductReadAllPermission, kuadrantApiProductReadOwnPermission, kuadrantApiProductUpdateAllPermission, kuadrantApiProductUpdateOwnPermission, kuadrantPermissions, kuadrantPlanPolicyCreatePermission, kuadrantPlanPolicyDeletePermission, kuadrantPlanPolicyListPermission, kuadrantPlanPolicyReadPermission, kuadrantPlanPolicyUpdatePermission } from './permissions.esm.js';
|
|
7
7
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/permissions.esm.js
CHANGED
|
@@ -24,16 +24,28 @@ const kuadrantApiProductCreatePermission = createPermission({
|
|
|
24
24
|
name: "kuadrant.apiproduct.create",
|
|
25
25
|
attributes: { action: "create" }
|
|
26
26
|
});
|
|
27
|
-
const
|
|
28
|
-
name: "kuadrant.apiproduct.read",
|
|
27
|
+
const kuadrantApiProductReadOwnPermission = createPermission({
|
|
28
|
+
name: "kuadrant.apiproduct.read.own",
|
|
29
29
|
attributes: { action: "read" }
|
|
30
30
|
});
|
|
31
|
-
const
|
|
32
|
-
name: "kuadrant.apiproduct.
|
|
31
|
+
const kuadrantApiProductReadAllPermission = createPermission({
|
|
32
|
+
name: "kuadrant.apiproduct.read.all",
|
|
33
|
+
attributes: { action: "read" }
|
|
34
|
+
});
|
|
35
|
+
const kuadrantApiProductUpdateOwnPermission = createPermission({
|
|
36
|
+
name: "kuadrant.apiproduct.update.own",
|
|
37
|
+
attributes: { action: "update" }
|
|
38
|
+
});
|
|
39
|
+
const kuadrantApiProductUpdateAllPermission = createPermission({
|
|
40
|
+
name: "kuadrant.apiproduct.update.all",
|
|
33
41
|
attributes: { action: "update" }
|
|
34
42
|
});
|
|
35
|
-
const
|
|
36
|
-
name: "kuadrant.apiproduct.delete",
|
|
43
|
+
const kuadrantApiProductDeleteOwnPermission = createPermission({
|
|
44
|
+
name: "kuadrant.apiproduct.delete.own",
|
|
45
|
+
attributes: { action: "delete" }
|
|
46
|
+
});
|
|
47
|
+
const kuadrantApiProductDeleteAllPermission = createPermission({
|
|
48
|
+
name: "kuadrant.apiproduct.delete.all",
|
|
37
49
|
attributes: { action: "delete" }
|
|
38
50
|
});
|
|
39
51
|
const kuadrantApiProductListPermission = createPermission({
|
|
@@ -53,10 +65,22 @@ const kuadrantApiKeyRequestReadAllPermission = createPermission({
|
|
|
53
65
|
name: "kuadrant.apikeyrequest.read.all",
|
|
54
66
|
attributes: { action: "read" }
|
|
55
67
|
});
|
|
56
|
-
const
|
|
57
|
-
name: "kuadrant.apikeyrequest.update",
|
|
68
|
+
const kuadrantApiKeyRequestUpdateOwnPermission = createPermission({
|
|
69
|
+
name: "kuadrant.apikeyrequest.update.own",
|
|
58
70
|
attributes: { action: "update" }
|
|
59
71
|
});
|
|
72
|
+
const kuadrantApiKeyRequestUpdateAllPermission = createPermission({
|
|
73
|
+
name: "kuadrant.apikeyrequest.update.all",
|
|
74
|
+
attributes: { action: "update" }
|
|
75
|
+
});
|
|
76
|
+
const kuadrantApiKeyRequestDeleteOwnPermission = createPermission({
|
|
77
|
+
name: "kuadrant.apikeyrequest.delete.own",
|
|
78
|
+
attributes: { action: "delete" }
|
|
79
|
+
});
|
|
80
|
+
const kuadrantApiKeyRequestDeleteAllPermission = createPermission({
|
|
81
|
+
name: "kuadrant.apikeyrequest.delete.all",
|
|
82
|
+
attributes: { action: "delete" }
|
|
83
|
+
});
|
|
60
84
|
const kuadrantApiKeyRequestListPermission = createPermission({
|
|
61
85
|
name: "kuadrant.apikeyrequest.list",
|
|
62
86
|
attributes: { action: "read" }
|
|
@@ -84,14 +108,20 @@ const kuadrantPermissions = [
|
|
|
84
108
|
kuadrantPlanPolicyDeletePermission,
|
|
85
109
|
kuadrantPlanPolicyListPermission,
|
|
86
110
|
kuadrantApiProductCreatePermission,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
111
|
+
kuadrantApiProductReadOwnPermission,
|
|
112
|
+
kuadrantApiProductReadAllPermission,
|
|
113
|
+
kuadrantApiProductUpdateOwnPermission,
|
|
114
|
+
kuadrantApiProductUpdateAllPermission,
|
|
115
|
+
kuadrantApiProductDeleteOwnPermission,
|
|
116
|
+
kuadrantApiProductDeleteAllPermission,
|
|
90
117
|
kuadrantApiProductListPermission,
|
|
91
118
|
kuadrantApiKeyRequestCreatePermission,
|
|
92
119
|
kuadrantApiKeyRequestReadOwnPermission,
|
|
93
120
|
kuadrantApiKeyRequestReadAllPermission,
|
|
94
|
-
|
|
121
|
+
kuadrantApiKeyRequestUpdateOwnPermission,
|
|
122
|
+
kuadrantApiKeyRequestUpdateAllPermission,
|
|
123
|
+
kuadrantApiKeyRequestDeleteOwnPermission,
|
|
124
|
+
kuadrantApiKeyRequestDeleteAllPermission,
|
|
95
125
|
kuadrantApiKeyRequestListPermission,
|
|
96
126
|
kuadrantApiKeyReadOwnPermission,
|
|
97
127
|
kuadrantApiKeyReadAllPermission,
|
|
@@ -99,5 +129,5 @@ const kuadrantPermissions = [
|
|
|
99
129
|
kuadrantApiKeyDeleteAllPermission
|
|
100
130
|
];
|
|
101
131
|
|
|
102
|
-
export { kuadrantApiKeyDeleteAllPermission, kuadrantApiKeyDeleteOwnPermission, kuadrantApiKeyReadAllPermission, kuadrantApiKeyReadOwnPermission, kuadrantApiKeyRequestCreatePermission, kuadrantApiKeyRequestListPermission, kuadrantApiKeyRequestReadAllPermission, kuadrantApiKeyRequestReadOwnPermission,
|
|
132
|
+
export { kuadrantApiKeyDeleteAllPermission, kuadrantApiKeyDeleteOwnPermission, kuadrantApiKeyReadAllPermission, kuadrantApiKeyReadOwnPermission, kuadrantApiKeyRequestCreatePermission, kuadrantApiKeyRequestDeleteAllPermission, kuadrantApiKeyRequestDeleteOwnPermission, kuadrantApiKeyRequestListPermission, kuadrantApiKeyRequestReadAllPermission, kuadrantApiKeyRequestReadOwnPermission, kuadrantApiKeyRequestUpdateAllPermission, kuadrantApiKeyRequestUpdateOwnPermission, kuadrantApiProductCreatePermission, kuadrantApiProductDeleteAllPermission, kuadrantApiProductDeleteOwnPermission, kuadrantApiProductListPermission, kuadrantApiProductReadAllPermission, kuadrantApiProductReadOwnPermission, kuadrantApiProductUpdateAllPermission, kuadrantApiProductUpdateOwnPermission, kuadrantPermissions, kuadrantPlanPolicyCreatePermission, kuadrantPlanPolicyDeletePermission, kuadrantPlanPolicyListPermission, kuadrantPlanPolicyReadPermission, kuadrantPlanPolicyUpdatePermission };
|
|
103
133
|
//# sourceMappingURL=permissions.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permissions.esm.js","sources":["../src/permissions.ts"],"sourcesContent":["import { createPermission } from '@backstage/plugin-permission-common';\n\n/**\n * permission definitions for the kuadrant plugin\n *\n * these permissions control access to kuadrant resources and operations.\n * they must match the permissions defined in the backend plugin.\n *\n * permission types:\n * - BasicPermission: standard permission that applies globally\n * - ResourcePermission: permission scoped to specific resource types (e.g., apiproduct)\n *\n * permission patterns:\n * - `.create` - create new resources\n * - `.read` - read resource details\n * - `.read.own` - read only resources owned by the user\n * - `.read.all` - read all resources regardless of ownership\n * - `.update` - modify existing resources\n * - `.delete` - delete resources\n * - `.delete.own` - delete only resources owned by the user\n * - `.delete.all` - delete any resource regardless of ownership\n * - `.list` - list/view collections of resources\n */\n\n// planpolicy permissions\nexport const kuadrantPlanPolicyCreatePermission = createPermission({\n name: 'kuadrant.planpolicy.create',\n attributes: { action: 'create' },\n});\n\nexport const kuadrantPlanPolicyReadPermission = createPermission({\n name: 'kuadrant.planpolicy.read',\n attributes: { action: 'read' },\n});\n\nexport const kuadrantPlanPolicyUpdatePermission = createPermission({\n name: 'kuadrant.planpolicy.update',\n attributes: { action: 'update' },\n});\n\nexport const kuadrantPlanPolicyDeletePermission = createPermission({\n name: 'kuadrant.planpolicy.delete',\n attributes: { action: 'delete' },\n});\n\nexport const kuadrantPlanPolicyListPermission = createPermission({\n name: 'kuadrant.planpolicy.list',\n attributes: { action: 'read' },\n});\n\n// apiproduct permissions\nexport const kuadrantApiProductCreatePermission = createPermission({\n name: 'kuadrant.apiproduct.create',\n attributes: { action: 'create' },\n});\n\nexport const kuadrantApiProductReadPermission = createPermission({\n name: 'kuadrant.apiproduct.read',\n attributes: { action: 'read' },\n});\n\nexport const kuadrantApiProductUpdatePermission = createPermission({\n name: 'kuadrant.apiproduct.update',\n attributes: { action: 'update' },\n});\n\nexport const kuadrantApiProductDeletePermission = createPermission({\n name: 'kuadrant.apiproduct.delete',\n attributes: { action: 'delete' },\n});\n\nexport const kuadrantApiProductListPermission = createPermission({\n name: 'kuadrant.apiproduct.list',\n attributes: { action: 'read' },\n});\n\n// apikeyrequest permissions\n\n/**\n * permission to create API key requests\n *\n * this is a ResourcePermission scoped to 'apiproduct', allowing\n * fine-grained control over which API products users can request access to.\n *\n * use in frontend: useKuadrantPermission(kuadrantApiKeyRequestCreatePermission)\n * use in backend with resource: { permission, resourceRef: 'apiproduct:namespace/name' }\n */\nexport const kuadrantApiKeyRequestCreatePermission = createPermission({\n name: 'kuadrant.apikeyrequest.create',\n attributes: { action: 'create' },\n resourceType: 'apiproduct',\n});\n\n/**\n * permission to read API key requests created by the current user\n * use this for allowing users to see their own request history\n */\nexport const kuadrantApiKeyRequestReadOwnPermission = createPermission({\n name: 'kuadrant.apikeyrequest.read.own',\n attributes: { action: 'read' },\n});\n\n/**\n * permission to read all API key requests regardless of who created them\n * use this for platform engineers/admins who need to view the approval queue\n */\nexport const kuadrantApiKeyRequestReadAllPermission = createPermission({\n name: 'kuadrant.apikeyrequest.read.all',\n attributes: { action: 'read' },\n});\n\n/**\n * permission to approve or reject API key requests\n * typically granted to API owners and platform engineers\n */\nexport const kuadrantApiKeyRequestUpdatePermission = createPermission({\n name: 'kuadrant.apikeyrequest.update',\n attributes: { action: 'update' },\n});\n\nexport const kuadrantApiKeyRequestListPermission = createPermission({\n name: 'kuadrant.apikeyrequest.list',\n attributes: { action: 'read' },\n});\n\n// api key permissions\n\n/**\n * permission to read API keys owned by the current user\n * allows users to view their own active API keys\n */\nexport const kuadrantApiKeyReadOwnPermission = createPermission({\n name: 'kuadrant.apikey.read.own',\n attributes: { action: 'read' },\n});\n\n/**\n * permission to read all API keys regardless of ownership\n * for platform engineers/admins who need to audit keys\n */\nexport const kuadrantApiKeyReadAllPermission = createPermission({\n name: 'kuadrant.apikey.read.all',\n attributes: { action: 'read' },\n});\n\n/**\n * permission to delete API keys owned by the current user\n * allows users to revoke their own access\n */\nexport const kuadrantApiKeyDeleteOwnPermission = createPermission({\n name: 'kuadrant.apikey.delete.own',\n attributes: { action: 'delete' },\n});\n\n/**\n * permission to delete any API key regardless of ownership\n * for platform engineers/admins who need to revoke access\n */\nexport const kuadrantApiKeyDeleteAllPermission = createPermission({\n name: 'kuadrant.apikey.delete.all',\n attributes: { action: 'delete' },\n});\n\nexport const kuadrantPermissions = [\n kuadrantPlanPolicyCreatePermission,\n kuadrantPlanPolicyReadPermission,\n kuadrantPlanPolicyUpdatePermission,\n kuadrantPlanPolicyDeletePermission,\n kuadrantPlanPolicyListPermission,\n kuadrantApiProductCreatePermission,\n kuadrantApiProductReadPermission,\n kuadrantApiProductUpdatePermission,\n kuadrantApiProductDeletePermission,\n kuadrantApiProductListPermission,\n kuadrantApiKeyRequestCreatePermission,\n kuadrantApiKeyRequestReadOwnPermission,\n kuadrantApiKeyRequestReadAllPermission,\n kuadrantApiKeyRequestUpdatePermission,\n kuadrantApiKeyRequestListPermission,\n kuadrantApiKeyReadOwnPermission,\n kuadrantApiKeyReadAllPermission,\n kuadrantApiKeyDeleteOwnPermission,\n kuadrantApiKeyDeleteAllPermission,\n];\n"],"names":[],"mappings":";;AAyBO,MAAM,qCAAqC,gBAAiB,CAAA;AAAA,EACjE,IAAM,EAAA,4BAAA;AAAA,EACN,UAAA,EAAY,EAAE,MAAA,EAAQ,QAAS;AACjC,CAAC;AAEM,MAAM,mCAAmC,gBAAiB,CAAA;AAAA,EAC/D,IAAM,EAAA,0BAAA;AAAA,EACN,UAAA,EAAY,EAAE,MAAA,EAAQ,MAAO;AAC/B,CAAC;AAEM,MAAM,qCAAqC,gBAAiB,CAAA;AAAA,EACjE,IAAM,EAAA,4BAAA;AAAA,EACN,UAAA,EAAY,EAAE,MAAA,EAAQ,QAAS;AACjC,CAAC;AAEM,MAAM,qCAAqC,gBAAiB,CAAA;AAAA,EACjE,IAAM,EAAA,4BAAA;AAAA,EACN,UAAA,EAAY,EAAE,MAAA,EAAQ,QAAS;AACjC,CAAC;AAEM,MAAM,mCAAmC,gBAAiB,CAAA;AAAA,EAC/D,IAAM,EAAA,0BAAA;AAAA,EACN,UAAA,EAAY,EAAE,MAAA,EAAQ,MAAO;AAC/B,CAAC;AAGM,MAAM,qCAAqC,gBAAiB,CAAA;AAAA,EACjE,IAAM,EAAA,4BAAA;AAAA,EACN,UAAA,EAAY,EAAE,MAAA,EAAQ,QAAS;AACjC,CAAC;AAEM,MAAM,mCAAmC,gBAAiB,CAAA;AAAA,EAC/D,IAAM,EAAA,0BAAA;AAAA,EACN,UAAA,EAAY,EAAE,MAAA,EAAQ,MAAO;AAC/B,CAAC;AAEM,MAAM,qCAAqC,gBAAiB,CAAA;AAAA,EACjE,IAAM,EAAA,4BAAA;AAAA,EACN,UAAA,EAAY,EAAE,MAA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iB,CAAA;AAAA,EAChE,IAAM,EAAA,4BAAA;AAAA,EACN,UAAA,EAAY,EAAE,MAAA,EAAQ,QAAS;AACjC,CAAC;AAMM,MAAM,oCAAoC,gBAAiB,CAAA;AAAA,EAChE,IAAM,EAAA,4BAAA;AAAA,EACN,UAAA,EAAY,EAAE,MAAA,EAAQ,QAAS;AACjC,CAAC;AAEM,MAAM,mBAAsB,GAAA;AAAA,EACjC,kCAAA;AAAA,EACA,gCAAA;AAAA,EACA,kCAAA;AAAA,EACA,kCAAA;AAAA,EACA,gCAAA;AAAA,EACA,kCAAA;AAAA,EACA,gCAAA;AAAA,EACA,kCAAA;AAAA,EACA,kCAAA;AAAA,EACA,gCAAA;AAAA,EACA,qCAAA;AAAA,EACA,sCAAA;AAAA,EACA,sCAAA;AAAA,EACA,qCAAA;AAAA,EACA,mCAAA;AAAA,EACA,+BAAA;AAAA,EACA,+BAAA;AAAA,EACA,iCAAA;AAAA,EACA;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"permissions.esm.js","sources":["../src/permissions.ts"],"sourcesContent":["import { createPermission } from '@backstage/plugin-permission-common';\n\n/**\n * permission definitions for the kuadrant plugin\n *\n * these permissions control access to kuadrant resources and operations.\n * they must match the permissions defined in the backend plugin.\n *\n * permission types:\n * - BasicPermission: standard permission that applies globally\n * - ResourcePermission: permission scoped to specific resource types (e.g., apiproduct)\n *\n * permission patterns:\n * - `.create` - create new resources\n * - `.read` - read resource details\n * - `.read.own` - read only resources owned by the user\n * - `.read.all` - read all resources regardless of ownership\n * - `.update` - modify existing resources\n * - `.delete` - delete resources\n * - `.delete.own` - delete only resources owned by the user\n * - `.delete.all` - delete any resource regardless of ownership\n * - `.list` - list/view collections of resources\n */\n\n// planpolicy permissions\nexport const kuadrantPlanPolicyCreatePermission = createPermission({\n name: 'kuadrant.planpolicy.create',\n attributes: { action: 'create' },\n});\n\nexport const kuadrantPlanPolicyReadPermission = createPermission({\n name: 'kuadrant.planpolicy.read',\n attributes: { action: 'read' },\n});\n\nexport const kuadrantPlanPolicyUpdatePermission = createPermission({\n name: 'kuadrant.planpolicy.update',\n attributes: { action: 'update' },\n});\n\nexport const kuadrantPlanPolicyDeletePermission = createPermission({\n name: 'kuadrant.planpolicy.delete',\n attributes: { action: 'delete' },\n});\n\nexport const kuadrantPlanPolicyListPermission = createPermission({\n name: 'kuadrant.planpolicy.list',\n attributes: { action: 'read' },\n});\n\n// apiproduct permissions\n\n/**\n * permission to create new API products\n * granted to api owners and admins\n */\nexport const kuadrantApiProductCreatePermission = createPermission({\n name: 'kuadrant.apiproduct.create',\n attributes: { action: 'create' },\n});\n\n/**\n * permission to read API products owned by the current user\n * for api owners to view their own products\n */\nexport const kuadrantApiProductReadOwnPermission = createPermission({\n name: 'kuadrant.apiproduct.read.own',\n attributes: { action: 'read' },\n});\n\n/**\n * permission to read all API products regardless of ownership\n * for platform engineers/admins who need to view all products\n */\nexport const kuadrantApiProductReadAllPermission = createPermission({\n name: 'kuadrant.apiproduct.read.all',\n attributes: { action: 'read' },\n});\n\n/**\n * permission to update API products owned by the current user\n * for api owners to modify their own products\n */\nexport const kuadrantApiProductUpdateOwnPermission = createPermission({\n name: 'kuadrant.apiproduct.update.own',\n attributes: { action: 'update' },\n});\n\n/**\n * permission to update any API product regardless of ownership\n * for platform engineers/admins\n */\nexport const kuadrantApiProductUpdateAllPermission = createPermission({\n name: 'kuadrant.apiproduct.update.all',\n attributes: { action: 'update' },\n});\n\n/**\n * permission to delete API products owned by the current user\n * for api owners to remove their own products\n */\nexport const kuadrantApiProductDeleteOwnPermission = createPermission({\n name: 'kuadrant.apiproduct.delete.own',\n attributes: { action: 'delete' },\n});\n\n/**\n * permission to delete any API product regardless of ownership\n * for platform engineers/admins\n */\nexport const kuadrantApiProductDeleteAllPermission = createPermission({\n name: 'kuadrant.apiproduct.delete.all',\n attributes: { action: 'delete' },\n});\n\n/**\n * permission to list API products\n * backend filters results based on .own vs .all read permissions\n */\nexport const kuadrantApiProductListPermission = createPermission({\n name: 'kuadrant.apiproduct.list',\n attributes: { action: 'read' },\n});\n\n// apikeyrequest permissions\n\n/**\n * permission to create API key requests\n *\n * this is a ResourcePermission scoped to 'apiproduct', allowing\n * fine-grained control over which API products users can request access to.\n *\n * use in frontend: useKuadrantPermission(kuadrantApiKeyRequestCreatePermission)\n * use in backend with resource: { permission, resourceRef: 'apiproduct:namespace/name' }\n */\nexport const kuadrantApiKeyRequestCreatePermission = createPermission({\n name: 'kuadrant.apikeyrequest.create',\n attributes: { action: 'create' },\n resourceType: 'apiproduct',\n});\n\n/**\n * permission to read API key requests created by the current user\n * use this for allowing users to see their own request history\n */\nexport const kuadrantApiKeyRequestReadOwnPermission = createPermission({\n name: 'kuadrant.apikeyrequest.read.own',\n attributes: { action: 'read' },\n});\n\n/**\n * permission to read all API key requests regardless of who created them\n * use this for platform engineers/admins who need to view the approval queue\n */\nexport const kuadrantApiKeyRequestReadAllPermission = createPermission({\n name: 'kuadrant.apikeyrequest.read.all',\n attributes: { action: 'read' },\n});\n\n/**\n * permission to update API key requests owned by the current user\n * allows users to edit their own pending requests (change plan tier, use case)\n */\nexport const kuadrantApiKeyRequestUpdateOwnPermission = createPermission({\n name: 'kuadrant.apikeyrequest.update.own',\n attributes: { action: 'update' },\n});\n\n/**\n * permission to update any API key request regardless of ownership\n * typically granted to API owners and platform engineers for approving/rejecting requests\n */\nexport const kuadrantApiKeyRequestUpdateAllPermission = createPermission({\n name: 'kuadrant.apikeyrequest.update.all',\n attributes: { action: 'update' },\n});\n\n/**\n * permission to delete API key requests created by the current user\n * allows users to cancel their own pending requests\n */\nexport const kuadrantApiKeyRequestDeleteOwnPermission = createPermission({\n name: 'kuadrant.apikeyrequest.delete.own',\n attributes: { action: 'delete' },\n});\n\n/**\n * permission to delete any API key request regardless of ownership\n * for platform engineers/admins\n */\nexport const kuadrantApiKeyRequestDeleteAllPermission = createPermission({\n name: 'kuadrant.apikeyrequest.delete.all',\n attributes: { action: 'delete' },\n});\n\nexport const kuadrantApiKeyRequestListPermission = createPermission({\n name: 'kuadrant.apikeyrequest.list',\n attributes: { action: 'read' },\n});\n\n// api key permissions\n\n/**\n * permission to read API keys owned by the current user\n * allows users to view their own active API keys\n */\nexport const kuadrantApiKeyReadOwnPermission = createPermission({\n name: 'kuadrant.apikey.read.own',\n attributes: { action: 'read' },\n});\n\n/**\n * permission to read all API keys regardless of ownership\n * for platform engineers/admins who need to audit keys\n */\nexport const kuadrantApiKeyReadAllPermission = createPermission({\n name: 'kuadrant.apikey.read.all',\n attributes: { action: 'read' },\n});\n\n/**\n * permission to delete API keys owned by the current user\n * allows users to revoke their own access\n */\nexport const kuadrantApiKeyDeleteOwnPermission = createPermission({\n name: 'kuadrant.apikey.delete.own',\n attributes: { action: 'delete' },\n});\n\n/**\n * permission to delete any API key regardless of ownership\n * for platform engineers/admins who need to revoke access\n */\nexport const kuadrantApiKeyDeleteAllPermission = createPermission({\n name: 'kuadrant.apikey.delete.all',\n attributes: { action: 'delete' },\n});\n\nexport const kuadrantPermissions = [\n kuadrantPlanPolicyCreatePermission,\n kuadrantPlanPolicyReadPermission,\n kuadrantPlanPolicyUpdatePermission,\n kuadrantPlanPolicyDeletePermission,\n kuadrantPlanPolicyListPermission,\n kuadrantApiProductCreatePermission,\n kuadrantApiProductReadOwnPermission,\n kuadrantApiProductReadAllPermission,\n kuadrantApiProductUpdateOwnPermission,\n kuadrantApiProductUpdateAllPermission,\n kuadrantApiProductDeleteOwnPermission,\n kuadrantApiProductDeleteAllPermission,\n kuadrantApiProductListPermission,\n kuadrantApiKeyRequestCreatePermission,\n kuadrantApiKeyRequestReadOwnPermission,\n kuadrantApiKeyRequestReadAllPermission,\n kuadrantApiKeyRequestUpdateOwnPermission,\n kuadrantApiKeyRequestUpdateAllPermission,\n kuadrantApiKeyRequestDeleteOwnPermission,\n kuadrantApiKeyRequestDeleteAllPermission,\n kuadrantApiKeyRequestListPermission,\n kuadrantApiKeyReadOwnPermission,\n kuadrantApiKeyReadAllPermission,\n kuadrantAp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