@kuadrant/kuadrant-backstage-plugin-frontend 0.0.2-dev-0b744dd → 0.0.2-dev-9be93a3
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/api.esm.js +220 -0
- package/dist/api.esm.js.map +1 -0
- package/dist/apis.esm.js +15 -0
- package/dist/apis.esm.js.map +1 -0
- package/dist/components/ApiAccessCard/ApiAccessCard.esm.js +27 -37
- package/dist/components/ApiAccessCard/ApiAccessCard.esm.js.map +1 -1
- package/dist/components/ApiKeyApprovalPage/ApiKeyApprovalPage.esm.js +10 -0
- package/dist/components/ApiKeyApprovalPage/ApiKeyApprovalPage.esm.js.map +1 -0
- package/dist/components/ApiKeyApprovalPage/index.esm.js +2 -0
- package/dist/components/ApiKeyDetailPage/ApiKeyDetailPage.esm.js +28 -40
- package/dist/components/ApiKeyDetailPage/ApiKeyDetailPage.esm.js.map +1 -1
- package/dist/components/ApiKeyManagementTab/ApiKeyManagementTab.esm.js +20 -46
- package/dist/components/ApiKeyManagementTab/ApiKeyManagementTab.esm.js.map +1 -1
- package/dist/components/ApiProductDetailPage/ApiProductDetailPage.esm.js +27 -35
- package/dist/components/ApiProductDetailPage/ApiProductDetailPage.esm.js.map +1 -1
- package/dist/components/ApiProductDetails/ApiProductDetails.esm.js +13 -3
- package/dist/components/ApiProductDetails/ApiProductDetails.esm.js.map +1 -1
- package/dist/components/ApiProductInfoCard/ApiProductInfoCard.esm.js +5 -13
- package/dist/components/ApiProductInfoCard/ApiProductInfoCard.esm.js.map +1 -1
- package/dist/components/ApiProductOpenApiAlert/ApiProductOpenApiAlert.esm.js +7 -10
- package/dist/components/ApiProductOpenApiAlert/ApiProductOpenApiAlert.esm.js.map +1 -1
- package/dist/components/ApprovalQueueTable/ApprovalQueueTable.esm.js +34 -66
- package/dist/components/ApprovalQueueTable/ApprovalQueueTable.esm.js.map +1 -1
- package/dist/components/CreateAPIProductDialog/CreateAPIProductDialog.esm.js +143 -58
- package/dist/components/CreateAPIProductDialog/CreateAPIProductDialog.esm.js.map +1 -1
- package/dist/components/EditAPIKeyDialog/EditAPIKeyDialog.esm.js +8 -18
- package/dist/components/EditAPIKeyDialog/EditAPIKeyDialog.esm.js.map +1 -1
- package/dist/components/EditAPIProductDialog/EditAPIProductDialog.esm.js +52 -30
- package/dist/components/EditAPIProductDialog/EditAPIProductDialog.esm.js.map +1 -1
- package/dist/components/EntityApiApprovalTab/EntityApiApprovalTab.esm.js +11 -27
- package/dist/components/EntityApiApprovalTab/EntityApiApprovalTab.esm.js.map +1 -1
- package/dist/components/KuadrantPage/ApiProductsPage.esm.js +71 -55
- package/dist/components/KuadrantPage/ApiProductsPage.esm.js.map +1 -1
- package/dist/components/MyApiKeysPage/MyApiKeysPage.esm.js +10 -0
- package/dist/components/MyApiKeysPage/MyApiKeysPage.esm.js.map +1 -0
- package/dist/components/MyApiKeysPage/index.esm.js +2 -0
- package/dist/components/MyApiKeysPage/index.esm.js.map +1 -0
- package/dist/components/MyApiKeysTable/MyApiKeysTable.esm.js +51 -57
- package/dist/components/MyApiKeysTable/MyApiKeysTable.esm.js.map +1 -1
- package/dist/components/RequestAccessDialog/RequestAccessDialog.esm.js +10 -25
- package/dist/components/RequestAccessDialog/RequestAccessDialog.esm.js.map +1 -1
- package/dist/components/SimpleRequestAccessDialog/SimpleRequestAccessDialog.esm.js +206 -0
- package/dist/components/SimpleRequestAccessDialog/SimpleRequestAccessDialog.esm.js.map +1 -0
- package/dist/index.d.ts +461 -2
- package/dist/index.esm.js +3 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/plugin.esm.js +11 -4
- package/dist/plugin.esm.js.map +1 -1
- package/dist/utils/styles.esm.js +44 -5
- package/dist/utils/styles.esm.js.map +1 -1
- package/dist-scalprum/internal.plugin-kuadrant.8bf02d5482a5a3ed6337.js +2 -0
- package/dist-scalprum/internal.plugin-kuadrant.8bf02d5482a5a3ed6337.js.map +1 -0
- package/dist-scalprum/plugin-manifest.json +3 -3
- package/dist-scalprum/static/2118.82433765.chunk.js +2 -0
- package/dist-scalprum/static/2118.82433765.chunk.js.map +1 -0
- package/dist-scalprum/static/2967.28e7c7f8.chunk.js +2 -0
- package/dist-scalprum/static/2967.28e7c7f8.chunk.js.map +1 -0
- package/dist-scalprum/static/369.2374941c.chunk.js +2 -0
- package/dist-scalprum/static/369.2374941c.chunk.js.map +1 -0
- package/dist-scalprum/static/3947.ff1c25cf.chunk.js +2 -0
- package/dist-scalprum/static/3947.ff1c25cf.chunk.js.map +1 -0
- package/dist-scalprum/static/3976.cf3ec7be.chunk.js +2 -0
- package/dist-scalprum/static/3976.cf3ec7be.chunk.js.map +1 -0
- package/dist-scalprum/static/4447.222bb58d.chunk.js +2 -0
- package/dist-scalprum/static/4447.222bb58d.chunk.js.map +1 -0
- package/dist-scalprum/static/5010.4ef96c87.chunk.js +3 -0
- package/dist-scalprum/static/5010.4ef96c87.chunk.js.map +1 -0
- package/dist-scalprum/static/5203.e92a3353.chunk.js +2 -0
- package/dist-scalprum/static/5203.e92a3353.chunk.js.map +1 -0
- package/dist-scalprum/static/6371.6ee1f11d.chunk.js +2 -0
- package/dist-scalprum/static/6371.6ee1f11d.chunk.js.map +1 -0
- package/dist-scalprum/static/6422.969d9b8c.chunk.js +2 -0
- package/dist-scalprum/static/6422.969d9b8c.chunk.js.map +1 -0
- package/dist-scalprum/static/6800.a7645f4c.chunk.js +2 -0
- package/dist-scalprum/static/6800.a7645f4c.chunk.js.map +1 -0
- package/dist-scalprum/static/69.1decc5e8.chunk.js +2 -0
- package/dist-scalprum/static/69.1decc5e8.chunk.js.map +1 -0
- package/dist-scalprum/static/7005.a9f73153.chunk.js +2 -0
- package/dist-scalprum/static/7005.a9f73153.chunk.js.map +1 -0
- package/dist-scalprum/static/7270.b0e185f1.chunk.js +2 -0
- package/dist-scalprum/static/7270.b0e185f1.chunk.js.map +1 -0
- package/dist-scalprum/static/7791.5c1eea8a.chunk.js +2 -0
- package/dist-scalprum/static/7791.5c1eea8a.chunk.js.map +1 -0
- package/dist-scalprum/static/{6763.d6cd937f.chunk.js → 8563.46f1a3e1.chunk.js} +3 -3
- package/dist-scalprum/static/8563.46f1a3e1.chunk.js.map +1 -0
- package/dist-scalprum/static/8789.84963cbc.chunk.js +2 -0
- package/dist-scalprum/static/8789.84963cbc.chunk.js.map +1 -0
- package/dist-scalprum/static/8804.63919453.chunk.js +2 -0
- package/dist-scalprum/static/8804.63919453.chunk.js.map +1 -0
- package/dist-scalprum/static/9051.db875198.chunk.js +2 -0
- package/dist-scalprum/static/9051.db875198.chunk.js.map +1 -0
- package/dist-scalprum/static/{2946.a35243f1.chunk.js → 9370.2e9fe34b.chunk.js} +3 -3
- package/dist-scalprum/static/9370.2e9fe34b.chunk.js.map +1 -0
- package/dist-scalprum/static/9838.5df9b1de.chunk.js +2 -0
- package/dist-scalprum/static/9838.5df9b1de.chunk.js.map +1 -0
- package/dist-scalprum/static/exposed-PluginRoot.8a8dd91f.chunk.js +2 -0
- package/dist-scalprum/static/exposed-PluginRoot.8a8dd91f.chunk.js.map +1 -0
- package/package.json +3 -1
- package/dist/components/ApiKeysPage/ApiKeysPage.esm.js +0 -43
- package/dist/components/ApiKeysPage/ApiKeysPage.esm.js.map +0 -1
- package/dist/components/ApiKeysPage/index.esm.js +0 -2
- package/dist-scalprum/internal.plugin-kuadrant.114cbbe1d3ddb939d776.js +0 -2
- package/dist-scalprum/internal.plugin-kuadrant.114cbbe1d3ddb939d776.js.map +0 -1
- package/dist-scalprum/static/2821.0829f14d.chunk.js +0 -2
- package/dist-scalprum/static/2821.0829f14d.chunk.js.map +0 -1
- package/dist-scalprum/static/2946.a35243f1.chunk.js.map +0 -1
- package/dist-scalprum/static/2967.65c51af8.chunk.js +0 -2
- package/dist-scalprum/static/2967.65c51af8.chunk.js.map +0 -1
- package/dist-scalprum/static/3650.ee76eba9.chunk.js +0 -2
- package/dist-scalprum/static/3650.ee76eba9.chunk.js.map +0 -1
- package/dist-scalprum/static/3947.7458971d.chunk.js +0 -2
- package/dist-scalprum/static/3947.7458971d.chunk.js.map +0 -1
- package/dist-scalprum/static/3984.647ef00c.chunk.js +0 -2
- package/dist-scalprum/static/3984.647ef00c.chunk.js.map +0 -1
- package/dist-scalprum/static/4651.c85cecc4.chunk.js +0 -2
- package/dist-scalprum/static/4651.c85cecc4.chunk.js.map +0 -1
- package/dist-scalprum/static/4682.75f17114.chunk.js +0 -2
- package/dist-scalprum/static/4682.75f17114.chunk.js.map +0 -1
- package/dist-scalprum/static/5010.0cd6c959.chunk.js +0 -3
- package/dist-scalprum/static/5010.0cd6c959.chunk.js.map +0 -1
- package/dist-scalprum/static/5203.b654e8e0.chunk.js +0 -2
- package/dist-scalprum/static/5203.b654e8e0.chunk.js.map +0 -1
- package/dist-scalprum/static/5453.ecdee66d.chunk.js +0 -2
- package/dist-scalprum/static/5453.ecdee66d.chunk.js.map +0 -1
- package/dist-scalprum/static/6371.d45f37cc.chunk.js +0 -2
- package/dist-scalprum/static/6371.d45f37cc.chunk.js.map +0 -1
- package/dist-scalprum/static/6763.d6cd937f.chunk.js.map +0 -1
- package/dist-scalprum/static/6800.20f46859.chunk.js +0 -2
- package/dist-scalprum/static/6800.20f46859.chunk.js.map +0 -1
- package/dist-scalprum/static/6840.1653e6b0.chunk.js +0 -2
- package/dist-scalprum/static/6840.1653e6b0.chunk.js.map +0 -1
- package/dist-scalprum/static/7236.f3886d59.chunk.js +0 -2
- package/dist-scalprum/static/7236.f3886d59.chunk.js.map +0 -1
- package/dist-scalprum/static/7791.ac1ac509.chunk.js +0 -2
- package/dist-scalprum/static/7791.ac1ac509.chunk.js.map +0 -1
- package/dist-scalprum/static/8172.cbe1f2c4.chunk.js +0 -2
- package/dist-scalprum/static/8172.cbe1f2c4.chunk.js.map +0 -1
- package/dist-scalprum/static/8799.939d14f9.chunk.js +0 -2
- package/dist-scalprum/static/8799.939d14f9.chunk.js.map +0 -1
- package/dist-scalprum/static/exposed-PluginRoot.ed95fa78.chunk.js +0 -2
- package/dist-scalprum/static/exposed-PluginRoot.ed95fa78.chunk.js.map +0 -1
- /package/dist/components/{ApiKeysPage → ApiKeyApprovalPage}/index.esm.js.map +0 -0
- /package/dist-scalprum/static/{5010.0cd6c959.chunk.js.LICENSE.txt → 5010.4ef96c87.chunk.js.LICENSE.txt} +0 -0
- /package/dist-scalprum/static/{6763.d6cd937f.chunk.js.LICENSE.txt → 8563.46f1a3e1.chunk.js.LICENSE.txt} +0 -0
- /package/dist-scalprum/static/{2946.a35243f1.chunk.js.LICENSE.txt → 9370.2e9fe34b.chunk.js.LICENSE.txt} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import react__default from 'react';
|
|
3
3
|
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
4
|
+
import { DiscoveryApi, FetchApi, IdentityApi } from '@backstage/core-plugin-api';
|
|
4
5
|
import * as _backstage_plugin_permission_common from '@backstage/plugin-permission-common';
|
|
6
|
+
import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
|
|
5
7
|
|
|
6
8
|
interface ApiKeyManagementTabProps {
|
|
7
9
|
namespace?: string;
|
|
@@ -19,7 +21,8 @@ declare const kuadrantPlugin: _backstage_core_plugin_api.BackstagePlugin<{
|
|
|
19
21
|
}, {}, {}>;
|
|
20
22
|
declare const KuadrantPage: () => react.JSX.Element;
|
|
21
23
|
declare const ApiProductsPage: () => react.JSX.Element;
|
|
22
|
-
declare const
|
|
24
|
+
declare const MyApiKeysPage: () => react.JSX.Element;
|
|
25
|
+
declare const ApiKeyApprovalPage: () => react.JSX.Element;
|
|
23
26
|
declare const EntityKuadrantApiAccessCard: ({ namespace: propNamespace }: ApiAccessCardProps) => react.JSX.Element;
|
|
24
27
|
declare const EntityKuadrantApiKeyManagementTab: ({ namespace: propNamespace, }: ApiKeyManagementTabProps) => react.JSX.Element;
|
|
25
28
|
declare const EntityKuadrantApiKeysContent: ({ namespace: propNamespace, }: ApiKeyManagementTabProps) => react.JSX.Element;
|
|
@@ -145,4 +148,460 @@ declare const kuadrantApiKeyDeleteAllPermission: _backstage_plugin_permission_co
|
|
|
145
148
|
declare const kuadrantApiKeyApprovePermission: _backstage_plugin_permission_common.BasicPermission;
|
|
146
149
|
declare const kuadrantPermissions: (_backstage_plugin_permission_common.BasicPermission | _backstage_plugin_permission_common.ResourcePermission<"apiproduct">)[];
|
|
147
150
|
|
|
148
|
-
|
|
151
|
+
type PlanTier = string;
|
|
152
|
+
type RequestPhase = 'Pending' | 'Approved' | 'Rejected';
|
|
153
|
+
interface PlanLimits {
|
|
154
|
+
daily?: number;
|
|
155
|
+
weekly?: number;
|
|
156
|
+
monthly?: number;
|
|
157
|
+
yearly?: number;
|
|
158
|
+
custom?: Array<{
|
|
159
|
+
limit: number;
|
|
160
|
+
window: string;
|
|
161
|
+
}>;
|
|
162
|
+
}
|
|
163
|
+
type OpenAPISpecConditionReason = 'SpecFetched' | 'SpecSizeTooLarge' | 'FetchFailed';
|
|
164
|
+
type StatusConditionType = 'OpenAPISpecReady' | string;
|
|
165
|
+
interface StatusCondition {
|
|
166
|
+
type: StatusConditionType;
|
|
167
|
+
status: 'True' | 'False' | 'Unknown';
|
|
168
|
+
reason?: OpenAPISpecConditionReason | string;
|
|
169
|
+
message?: string;
|
|
170
|
+
lastTransitionTime?: string;
|
|
171
|
+
}
|
|
172
|
+
interface APIKeySpec {
|
|
173
|
+
apiProductRef: {
|
|
174
|
+
name: string;
|
|
175
|
+
};
|
|
176
|
+
planTier: PlanTier;
|
|
177
|
+
useCase: string;
|
|
178
|
+
requestedBy: {
|
|
179
|
+
userId: string;
|
|
180
|
+
email: string;
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
interface CredentialsAuthorizationHeader {
|
|
184
|
+
prefix?: string;
|
|
185
|
+
}
|
|
186
|
+
interface CredentialsCustomHeader {
|
|
187
|
+
name: string;
|
|
188
|
+
prefix?: string;
|
|
189
|
+
}
|
|
190
|
+
interface CredentialsNamed {
|
|
191
|
+
name: string;
|
|
192
|
+
}
|
|
193
|
+
interface Credentials {
|
|
194
|
+
authorizationHeader?: CredentialsAuthorizationHeader;
|
|
195
|
+
customHeader?: CredentialsCustomHeader;
|
|
196
|
+
queryString?: CredentialsNamed;
|
|
197
|
+
cookie?: CredentialsNamed;
|
|
198
|
+
}
|
|
199
|
+
interface LabelSelector {
|
|
200
|
+
matchLabels?: Record<string, string>;
|
|
201
|
+
matchExpressions?: Array<{
|
|
202
|
+
key: string;
|
|
203
|
+
operator: 'In' | 'NotIn' | 'Exists' | 'DoesNotExist';
|
|
204
|
+
values?: string[];
|
|
205
|
+
}>;
|
|
206
|
+
}
|
|
207
|
+
interface AuthenticationSpec {
|
|
208
|
+
selector?: LabelSelector;
|
|
209
|
+
allNamespaces?: boolean;
|
|
210
|
+
}
|
|
211
|
+
interface APIKeyAuthScheme {
|
|
212
|
+
authenticationSpec?: AuthenticationSpec;
|
|
213
|
+
credentials?: Credentials;
|
|
214
|
+
}
|
|
215
|
+
interface APIKeyStatus {
|
|
216
|
+
phase?: RequestPhase;
|
|
217
|
+
reviewedBy?: string;
|
|
218
|
+
reviewedAt?: string;
|
|
219
|
+
apiHostname?: string;
|
|
220
|
+
limits?: PlanLimits;
|
|
221
|
+
secretRef?: {
|
|
222
|
+
name: string;
|
|
223
|
+
key: string;
|
|
224
|
+
};
|
|
225
|
+
canReadSecret?: boolean;
|
|
226
|
+
authScheme?: APIKeyAuthScheme;
|
|
227
|
+
conditions?: StatusCondition[];
|
|
228
|
+
}
|
|
229
|
+
interface APIKey {
|
|
230
|
+
apiVersion: 'devportal.kuadrant.io/v1alpha1';
|
|
231
|
+
kind: 'APIKey';
|
|
232
|
+
metadata: {
|
|
233
|
+
name: string;
|
|
234
|
+
namespace: string;
|
|
235
|
+
creationTimestamp?: string;
|
|
236
|
+
labels?: Record<string, string>;
|
|
237
|
+
annotations?: Record<string, string>;
|
|
238
|
+
};
|
|
239
|
+
spec: APIKeySpec;
|
|
240
|
+
status?: APIKeyStatus;
|
|
241
|
+
}
|
|
242
|
+
interface APIKeyRequest {
|
|
243
|
+
apiProductName: string;
|
|
244
|
+
namespace: string;
|
|
245
|
+
planTier: PlanTier;
|
|
246
|
+
useCase: string;
|
|
247
|
+
userEmail: string;
|
|
248
|
+
}
|
|
249
|
+
interface Plan {
|
|
250
|
+
tier: string;
|
|
251
|
+
description?: string;
|
|
252
|
+
limits?: PlanLimits;
|
|
253
|
+
}
|
|
254
|
+
interface APIProductSpec {
|
|
255
|
+
displayName: string;
|
|
256
|
+
description?: string;
|
|
257
|
+
version?: string;
|
|
258
|
+
tags?: string[];
|
|
259
|
+
targetRef: {
|
|
260
|
+
group: string;
|
|
261
|
+
kind: string;
|
|
262
|
+
name: string;
|
|
263
|
+
namespace: string;
|
|
264
|
+
};
|
|
265
|
+
approvalMode: 'automatic' | 'manual';
|
|
266
|
+
publishStatus: 'Draft' | 'Published';
|
|
267
|
+
documentation?: {
|
|
268
|
+
openAPISpecURL?: string;
|
|
269
|
+
swaggerUI?: string;
|
|
270
|
+
docsURL?: string;
|
|
271
|
+
gitRepository?: string;
|
|
272
|
+
techdocsRef?: string;
|
|
273
|
+
};
|
|
274
|
+
contact?: {
|
|
275
|
+
team?: string;
|
|
276
|
+
email?: string;
|
|
277
|
+
slack?: string;
|
|
278
|
+
url?: string;
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
interface DiscoveredAuthScheme {
|
|
282
|
+
authentication: Record<string, {
|
|
283
|
+
apiKey?: {
|
|
284
|
+
selector?: LabelSelector;
|
|
285
|
+
allNamespaces?: boolean;
|
|
286
|
+
};
|
|
287
|
+
jwt?: {
|
|
288
|
+
issuerUrl: string;
|
|
289
|
+
};
|
|
290
|
+
credentials?: Credentials;
|
|
291
|
+
metrics?: boolean;
|
|
292
|
+
priority?: number;
|
|
293
|
+
}>;
|
|
294
|
+
}
|
|
295
|
+
interface APIProductStatus {
|
|
296
|
+
observedGeneration?: number;
|
|
297
|
+
discoveredPlans?: Plan[];
|
|
298
|
+
discoveredAuthScheme?: DiscoveredAuthScheme;
|
|
299
|
+
openapi?: {
|
|
300
|
+
raw: string;
|
|
301
|
+
lastSyncTime: string;
|
|
302
|
+
};
|
|
303
|
+
oidcDiscovery?: {
|
|
304
|
+
tokenEndpoint: string;
|
|
305
|
+
};
|
|
306
|
+
conditions?: StatusCondition[];
|
|
307
|
+
}
|
|
308
|
+
interface APIProduct {
|
|
309
|
+
apiVersion: 'devportal.kuadrant.io/v1alpha1';
|
|
310
|
+
kind: 'APIProduct';
|
|
311
|
+
metadata: {
|
|
312
|
+
name: string;
|
|
313
|
+
namespace: string;
|
|
314
|
+
creationTimestamp?: string;
|
|
315
|
+
labels?: Record<string, string>;
|
|
316
|
+
annotations?: Record<string, string>;
|
|
317
|
+
};
|
|
318
|
+
spec: APIProductSpec;
|
|
319
|
+
status?: APIProductStatus;
|
|
320
|
+
}
|
|
321
|
+
interface PlanPolicyPlan {
|
|
322
|
+
tier: string;
|
|
323
|
+
predicate?: string;
|
|
324
|
+
description?: string;
|
|
325
|
+
limits?: PlanLimits;
|
|
326
|
+
}
|
|
327
|
+
interface PlanPolicy {
|
|
328
|
+
apiVersion: string;
|
|
329
|
+
kind: string;
|
|
330
|
+
metadata: {
|
|
331
|
+
name: string;
|
|
332
|
+
namespace: string;
|
|
333
|
+
creationTimestamp?: string;
|
|
334
|
+
labels?: Record<string, string>;
|
|
335
|
+
annotations?: Record<string, string>;
|
|
336
|
+
};
|
|
337
|
+
spec: {
|
|
338
|
+
targetRef: {
|
|
339
|
+
kind: 'HTTPRoute' | 'Gateway';
|
|
340
|
+
name: string;
|
|
341
|
+
namespace?: string;
|
|
342
|
+
};
|
|
343
|
+
plans: PlanPolicyPlan[];
|
|
344
|
+
};
|
|
345
|
+
status?: {
|
|
346
|
+
conditions?: StatusCondition[];
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
interface BulkOperationResult {
|
|
350
|
+
namespace: string;
|
|
351
|
+
name: string;
|
|
352
|
+
success: boolean;
|
|
353
|
+
error?: string;
|
|
354
|
+
}
|
|
355
|
+
interface ExtractedSecret {
|
|
356
|
+
apiKey: string;
|
|
357
|
+
}
|
|
358
|
+
interface K8sResource {
|
|
359
|
+
apiVersion: string;
|
|
360
|
+
kind: string;
|
|
361
|
+
metadata: {
|
|
362
|
+
name: string;
|
|
363
|
+
namespace?: string;
|
|
364
|
+
creationTimestamp?: string;
|
|
365
|
+
labels?: Record<string, string>;
|
|
366
|
+
annotations?: Record<string, string>;
|
|
367
|
+
[key: string]: any;
|
|
368
|
+
};
|
|
369
|
+
spec?: any;
|
|
370
|
+
status?: any;
|
|
371
|
+
data?: any;
|
|
372
|
+
stringData?: any;
|
|
373
|
+
[key: string]: any;
|
|
374
|
+
}
|
|
375
|
+
interface K8sList {
|
|
376
|
+
items: K8sResource[];
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Generic Kuadrant list type for API responses
|
|
381
|
+
*/
|
|
382
|
+
interface KuadrantList<T = any> {
|
|
383
|
+
items: T[];
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* Options for constructing the KuadrantApiClient
|
|
387
|
+
*/
|
|
388
|
+
type Options = {
|
|
389
|
+
discoveryApi: DiscoveryApi;
|
|
390
|
+
fetchApi: FetchApi;
|
|
391
|
+
identityApi: IdentityApi;
|
|
392
|
+
};
|
|
393
|
+
/**
|
|
394
|
+
* Kuadrant API interface defining all operations for managing
|
|
395
|
+
* API products, API keys, and related resources
|
|
396
|
+
*/
|
|
397
|
+
interface KuadrantAPI {
|
|
398
|
+
/**
|
|
399
|
+
* Fetch all API key requests per user
|
|
400
|
+
* @returns Promise with list of all API key requests
|
|
401
|
+
*/
|
|
402
|
+
getRequests(): Promise<KuadrantList<APIKey>>;
|
|
403
|
+
/**
|
|
404
|
+
* Fetch all API key requests
|
|
405
|
+
* @returns Promise with list of all API key requests
|
|
406
|
+
*/
|
|
407
|
+
getAllRequests(): Promise<KuadrantList<APIKey>>;
|
|
408
|
+
/**
|
|
409
|
+
* Fetch API key requests for a specific namespace
|
|
410
|
+
* @param namespace - Kubernetes namespace
|
|
411
|
+
* @returns Promise with list of requests in the namespace
|
|
412
|
+
*/
|
|
413
|
+
getRequestsByNamespace(namespace: string): Promise<KuadrantList<APIKey>>;
|
|
414
|
+
/**
|
|
415
|
+
* Fetch a single API key request
|
|
416
|
+
* @param namespace - API key request name
|
|
417
|
+
* @param name - Kubernetes namespace
|
|
418
|
+
* @returns Promise with the API key request
|
|
419
|
+
*/
|
|
420
|
+
getRequest(namespace: string, name: string): Promise<APIKey>;
|
|
421
|
+
/**
|
|
422
|
+
* Create a new API key request
|
|
423
|
+
* @param request - APIKeyRequest specification
|
|
424
|
+
* @returns Promise with the created API key
|
|
425
|
+
*/
|
|
426
|
+
createRequest(request: APIKeyRequest): Promise<APIKey>;
|
|
427
|
+
/**
|
|
428
|
+
* Update an existing API key request
|
|
429
|
+
* @param namespace - Kubernetes namespace
|
|
430
|
+
* @param name - API key request name
|
|
431
|
+
* @param patch - Partial API key spec with fields to update
|
|
432
|
+
* @returns Promise with the updated API key
|
|
433
|
+
*/
|
|
434
|
+
updateRequest(namespace: string, name: string, patch: Partial<APIKeySpec>): Promise<APIKey>;
|
|
435
|
+
/**
|
|
436
|
+
* Delete an API key request
|
|
437
|
+
* @param namespace - Kubernetes namespace
|
|
438
|
+
* @param name - API key request name
|
|
439
|
+
* @returns Promise that resolves when deletion completes
|
|
440
|
+
*/
|
|
441
|
+
deleteRequest(namespace: string, name: string): Promise<void>;
|
|
442
|
+
/**
|
|
443
|
+
* Approve an API key request
|
|
444
|
+
* @param namespace - Kubernetes namespace
|
|
445
|
+
* @param name - API key request name
|
|
446
|
+
* @param reviewedBy - Reviewed By User / System
|
|
447
|
+
* @returns Promise with the approved API key
|
|
448
|
+
*/
|
|
449
|
+
approveRequest(namespace: string, name: string, reviewedBy: string): Promise<APIKey>;
|
|
450
|
+
/**
|
|
451
|
+
* Reject an API key request
|
|
452
|
+
* @param namespace - Kubernetes namespace
|
|
453
|
+
* @param name - API key request name
|
|
454
|
+
* @param reviewedBy - Reviewed By User / System
|
|
455
|
+
* @returns Promise with the rejected API key
|
|
456
|
+
*/
|
|
457
|
+
rejectRequest(namespace: string, name: string, reviewedBy: string): Promise<APIKey>;
|
|
458
|
+
/**
|
|
459
|
+
* Bulk approve multiple API key requests
|
|
460
|
+
* @param requests - Array of namespace/name pairs to approve
|
|
461
|
+
* @param reviewedBy - Reviewed By User / System
|
|
462
|
+
* @returns Promise that resolves when all approvals complete
|
|
463
|
+
*/
|
|
464
|
+
bulkApproveRequests(requests: Array<{
|
|
465
|
+
namespace: string;
|
|
466
|
+
name: string;
|
|
467
|
+
}>, reviewedBy: string): Promise<Array<BulkOperationResult>>;
|
|
468
|
+
/**
|
|
469
|
+
* Bulk reject multiple API key requests
|
|
470
|
+
* @param requests - Array of namespace/name pairs to reject
|
|
471
|
+
* @param reviewedBy - Reviewed By User / System
|
|
472
|
+
* @returns Promise that resolves when all rejections complete
|
|
473
|
+
*/
|
|
474
|
+
bulkRejectRequests(requests: Array<{
|
|
475
|
+
namespace: string;
|
|
476
|
+
name: string;
|
|
477
|
+
}>, reviewedBy: string): Promise<Array<BulkOperationResult>>;
|
|
478
|
+
/**
|
|
479
|
+
* Fetch an API key resource
|
|
480
|
+
* @param namespace - Kubernetes namespace
|
|
481
|
+
* @param name - API key name
|
|
482
|
+
* @returns Promise with the API key
|
|
483
|
+
*/
|
|
484
|
+
getApiKey(namespace: string, name: string): Promise<APIKey>;
|
|
485
|
+
/**
|
|
486
|
+
* Retrieve the secret value for an API key (one-time operation)
|
|
487
|
+
* @param namespace - Kubernetes namespace
|
|
488
|
+
* @param name - API key name
|
|
489
|
+
* @returns Promise with the secret value
|
|
490
|
+
*/
|
|
491
|
+
getApiKeySecret(namespace: string, name: string): Promise<ExtractedSecret>;
|
|
492
|
+
/**
|
|
493
|
+
* Fetch all API products
|
|
494
|
+
* @returns Promise with list of all API products
|
|
495
|
+
*/
|
|
496
|
+
getApiProducts(): Promise<KuadrantList<APIProduct>>;
|
|
497
|
+
/**
|
|
498
|
+
* Fetch a single API product
|
|
499
|
+
* @param namespace - Kubernetes namespace
|
|
500
|
+
* @param name - API product name
|
|
501
|
+
* @returns Promise with the API product
|
|
502
|
+
*/
|
|
503
|
+
getApiProduct(namespace: string, name: string): Promise<APIProduct>;
|
|
504
|
+
/**
|
|
505
|
+
* Create a new API product
|
|
506
|
+
* @param product - API product specification
|
|
507
|
+
* @returns Promise with the created API product
|
|
508
|
+
*/
|
|
509
|
+
createApiProduct(product: APIProduct): Promise<APIProduct>;
|
|
510
|
+
/**
|
|
511
|
+
* Update an existing API product
|
|
512
|
+
* @param namespace - Kubernetes namespace
|
|
513
|
+
* @param name - API product name
|
|
514
|
+
* @param patch - Partial API product spec with fields to update
|
|
515
|
+
* @returns Promise with the updated API product
|
|
516
|
+
*/
|
|
517
|
+
updateApiProduct(namespace: string, name: string, patch: Partial<APIProduct>): Promise<APIProduct>;
|
|
518
|
+
/**
|
|
519
|
+
* Delete an API product
|
|
520
|
+
* @param namespace - Kubernetes namespace
|
|
521
|
+
* @param name - API product name
|
|
522
|
+
* @returns Promise that resolves when deletion completes
|
|
523
|
+
*/
|
|
524
|
+
deleteApiProduct(namespace: string, name: string): Promise<void>;
|
|
525
|
+
/**
|
|
526
|
+
* Fetch all HTTPRoute(s)
|
|
527
|
+
* @returns Promise with list of all HTTP routes
|
|
528
|
+
*/
|
|
529
|
+
getHttpRoutes(): Promise<K8sList>;
|
|
530
|
+
/**
|
|
531
|
+
* Fetch a specific HTTPRoute
|
|
532
|
+
* @param namespace - Kubernetes namespace
|
|
533
|
+
* @param name - HTTPRoute name
|
|
534
|
+
* @returns Promise with an HTTPRoute
|
|
535
|
+
*/
|
|
536
|
+
getHttpRoute(namespace: string, name: string): Promise<K8sResource>;
|
|
537
|
+
/**
|
|
538
|
+
* Fetch all plan policies
|
|
539
|
+
* @returns Promise with list of all plan policies
|
|
540
|
+
*/
|
|
541
|
+
getPlanPolicies(): Promise<KuadrantList<PlanPolicy>>;
|
|
542
|
+
}
|
|
543
|
+
/**
|
|
544
|
+
* API reference for the Kuadrant API
|
|
545
|
+
*/
|
|
546
|
+
declare const kuadrantApiRef: _backstage_frontend_plugin_api.ApiRef<KuadrantAPI>;
|
|
547
|
+
/**
|
|
548
|
+
* Implementation of the Kuadrant API client
|
|
549
|
+
*/
|
|
550
|
+
declare class KuadrantApiClient implements KuadrantAPI {
|
|
551
|
+
private readonly discoveryApi;
|
|
552
|
+
private readonly fetchApi;
|
|
553
|
+
constructor(options: Options);
|
|
554
|
+
/**
|
|
555
|
+
* Get the base URL for the backend API
|
|
556
|
+
*/
|
|
557
|
+
private getBaseUrl;
|
|
558
|
+
/**
|
|
559
|
+
* Wrapper for GET requests with automatic retry logic
|
|
560
|
+
* Retries on network failures or 5xx errors with exponential backoff
|
|
561
|
+
*/
|
|
562
|
+
private fetchWithRetry;
|
|
563
|
+
/**
|
|
564
|
+
* Wrapper for mutations (POST, PATCH, DELETE) without retry
|
|
565
|
+
* These operations are not retried to avoid duplicate side effects
|
|
566
|
+
*/
|
|
567
|
+
private fetchWithoutRetry;
|
|
568
|
+
getRequests(): Promise<KuadrantList<APIKey>>;
|
|
569
|
+
getAllRequests(): Promise<KuadrantList<APIKey>>;
|
|
570
|
+
getRequestsByNamespace(namespace: string): Promise<KuadrantList<APIKey>>;
|
|
571
|
+
getRequest(namespace: string, name: string): Promise<APIKey>;
|
|
572
|
+
createRequest(request: APIKeyRequest): Promise<APIKey>;
|
|
573
|
+
updateRequest(namespace: string, name: string, patch: Partial<APIKeySpec>): Promise<APIKey>;
|
|
574
|
+
deleteRequest(namespace: string, name: string): Promise<void>;
|
|
575
|
+
approveRequest(namespace: string, name: string, reviewedBy?: string): Promise<APIKey>;
|
|
576
|
+
rejectRequest(namespace: string, name: string, reviewedBy?: string): Promise<APIKey>;
|
|
577
|
+
bulkApproveRequests(requests: Array<{
|
|
578
|
+
namespace: string;
|
|
579
|
+
name: string;
|
|
580
|
+
}>, reviewedBy: string): Promise<Array<BulkOperationResult>>;
|
|
581
|
+
bulkRejectRequests(requests: Array<{
|
|
582
|
+
namespace: string;
|
|
583
|
+
name: string;
|
|
584
|
+
}>, reviewedBy: string): Promise<Array<BulkOperationResult>>;
|
|
585
|
+
getApiKey(namespace: string, name: string): Promise<APIKey>;
|
|
586
|
+
getApiKeySecret(namespace: string, name: string): Promise<ExtractedSecret>;
|
|
587
|
+
getApiProducts(): Promise<KuadrantList<APIProduct>>;
|
|
588
|
+
getApiProduct(namespace: string, name: string): Promise<APIProduct>;
|
|
589
|
+
createApiProduct(product: APIProduct): Promise<APIProduct>;
|
|
590
|
+
updateApiProduct(namespace: string, name: string, patch: Partial<APIProduct>): Promise<APIProduct>;
|
|
591
|
+
deleteApiProduct(namespace: string, name: string): Promise<void>;
|
|
592
|
+
getHttpRoutes(): Promise<K8sList>;
|
|
593
|
+
getHttpRoute(namespace: string, name: string): Promise<K8sResource>;
|
|
594
|
+
getPlanPolicies(): Promise<KuadrantList<PlanPolicy>>;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* API factory for the Kuadrant plugin
|
|
599
|
+
* This factory creates and configures the KuadrantApiClient with required dependencies
|
|
600
|
+
*/
|
|
601
|
+
declare const kuadrantApiFactory: _backstage_frontend_plugin_api.ApiFactory<KuadrantAPI, KuadrantApiClient, {
|
|
602
|
+
discoveryApi: _backstage_frontend_plugin_api.DiscoveryApi;
|
|
603
|
+
fetchApi: _backstage_frontend_plugin_api.FetchApi;
|
|
604
|
+
identityApi: _backstage_frontend_plugin_api.IdentityApi;
|
|
605
|
+
}>;
|
|
606
|
+
|
|
607
|
+
export { ApiAccessCard, ApiKeyApprovalPage, ApiKeyDetailPage, ApiKeyManagementTab, ApiProductDetailPage, ApiProductInfoCard, ApiProductsPage, EntityKuadrantApiAccessCard, EntityKuadrantApiApprovalTab, EntityKuadrantApiKeyManagementTab, EntityKuadrantApiKeysContent, EntityKuadrantApiProductInfoContent, EntityKuadrantApiProductOpenApiAlert, type KuadrantAPI, KuadrantPage, MyApiKeysPage, kuadrantApiFactory, kuadrantApiKeyApprovePermission, kuadrantApiKeyCreatePermission, kuadrantApiKeyDeleteAllPermission, kuadrantApiKeyDeleteOwnPermission, kuadrantApiKeyReadAllPermission, kuadrantApiKeyReadOwnPermission, kuadrantApiKeyUpdateAllPermission, kuadrantApiKeyUpdateOwnPermission, kuadrantApiProductCreatePermission, kuadrantApiProductDeleteAllPermission, kuadrantApiProductDeleteOwnPermission, kuadrantApiProductListPermission, kuadrantApiProductReadAllPermission, kuadrantApiProductReadOwnPermission, kuadrantApiProductUpdateAllPermission, kuadrantApiProductUpdateOwnPermission, kuadrantApiRef, kuadrantPermissions, kuadrantPlanPolicyCreatePermission, kuadrantPlanPolicyDeletePermission, kuadrantPlanPolicyListPermission, kuadrantPlanPolicyReadPermission, kuadrantPlanPolicyUpdatePermission, kuadrantPlugin };
|
package/dist/index.esm.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ApiKeyApprovalPage, ApiKeyDetailPage, ApiProductDetailPage, ApiProductsPage, EntityKuadrantApiAccessCard, EntityKuadrantApiApprovalTab, EntityKuadrantApiKeyManagementTab, EntityKuadrantApiKeysContent, EntityKuadrantApiProductInfoContent, EntityKuadrantApiProductOpenApiAlert, KuadrantPage, MyApiKeysPage, kuadrantPlugin } from './plugin.esm.js';
|
|
2
2
|
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 { kuadrantApiKeyApprovePermission, kuadrantApiKeyCreatePermission, kuadrantApiKeyDeleteAllPermission, kuadrantApiKeyDeleteOwnPermission, kuadrantApiKeyReadAllPermission, kuadrantApiKeyReadOwnPermission, kuadrantApiKeyUpdateAllPermission, kuadrantApiKeyUpdateOwnPermission, kuadrantApiProductCreatePermission, kuadrantApiProductDeleteAllPermission, kuadrantApiProductDeleteOwnPermission, kuadrantApiProductListPermission, kuadrantApiProductReadAllPermission, kuadrantApiProductReadOwnPermission, kuadrantApiProductUpdateAllPermission, kuadrantApiProductUpdateOwnPermission, kuadrantPermissions, kuadrantPlanPolicyCreatePermission, kuadrantPlanPolicyDeletePermission, kuadrantPlanPolicyListPermission, kuadrantPlanPolicyReadPermission, kuadrantPlanPolicyUpdatePermission } from './permissions.esm.js';
|
|
6
|
+
export { kuadrantApiRef } from './api.esm.js';
|
|
7
|
+
export { kuadrantApiFactory } from './apis.esm.js';
|
|
6
8
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
package/dist/plugin.esm.js
CHANGED
|
@@ -22,10 +22,17 @@ const ApiProductsPage = kuadrantPlugin.provide(
|
|
|
22
22
|
mountPoint: rootRouteRef
|
|
23
23
|
})
|
|
24
24
|
);
|
|
25
|
-
const
|
|
25
|
+
const MyApiKeysPage = kuadrantPlugin.provide(
|
|
26
26
|
createRoutableExtension({
|
|
27
|
-
name: "
|
|
28
|
-
component: () => import('./components/
|
|
27
|
+
name: "MyApiKeysPage",
|
|
28
|
+
component: () => import('./components/MyApiKeysPage/index.esm.js').then((m) => m.MyApiKeysPage),
|
|
29
|
+
mountPoint: rootRouteRef
|
|
30
|
+
})
|
|
31
|
+
);
|
|
32
|
+
const ApiKeyApprovalPage = kuadrantPlugin.provide(
|
|
33
|
+
createRoutableExtension({
|
|
34
|
+
name: "ApiKeyApprovalPage",
|
|
35
|
+
component: () => import('./components/ApiKeyApprovalPage/index.esm.js').then((m) => m.ApiKeyApprovalPage),
|
|
29
36
|
mountPoint: rootRouteRef
|
|
30
37
|
})
|
|
31
38
|
);
|
|
@@ -92,5 +99,5 @@ const ApiProductDetailPage = kuadrantPlugin.provide(
|
|
|
92
99
|
})
|
|
93
100
|
);
|
|
94
101
|
|
|
95
|
-
export {
|
|
102
|
+
export { ApiKeyApprovalPage, ApiKeyDetailPage, ApiProductDetailPage, ApiProductsPage, EntityKuadrantApiAccessCard, EntityKuadrantApiApprovalTab, EntityKuadrantApiKeyManagementTab, EntityKuadrantApiKeysContent, EntityKuadrantApiProductInfoContent, EntityKuadrantApiProductOpenApiAlert, KuadrantPage, MyApiKeysPage, kuadrantPlugin };
|
|
96
103
|
//# sourceMappingURL=plugin.esm.js.map
|
package/dist/plugin.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"sourcesContent":["import {\n createPlugin,\n createRoutableExtension,\n createComponentExtension,\n} from '@backstage/core-plugin-api';\n\nimport { rootRouteRef, resourceRouteRef } from './routes';\n\nexport const kuadrantPlugin = createPlugin({\n id: 'kuadrant',\n routes: {\n root: rootRouteRef,\n resource: resourceRouteRef,\n },\n});\n\nexport const KuadrantPage = kuadrantPlugin.provide(\n createRoutableExtension({\n name: 'KuadrantPage',\n component: () =>\n import('./components/KuadrantPage').then(m => m.ApiProductsPage),\n mountPoint: rootRouteRef,\n }),\n);\n\nexport const ApiProductsPage = kuadrantPlugin.provide(\n createRoutableExtension({\n name: 'ApiProductsPage',\n component: () =>\n import('./components/KuadrantPage').then(m => m.ApiProductsPage),\n mountPoint: rootRouteRef,\n }),\n);\n\nexport const
|
|
1
|
+
{"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"sourcesContent":["import {\n createPlugin,\n createRoutableExtension,\n createComponentExtension,\n} from '@backstage/core-plugin-api';\n\nimport { rootRouteRef, resourceRouteRef } from './routes';\n\nexport const kuadrantPlugin = createPlugin({\n id: 'kuadrant',\n routes: {\n root: rootRouteRef,\n resource: resourceRouteRef,\n },\n});\n\nexport const KuadrantPage = kuadrantPlugin.provide(\n createRoutableExtension({\n name: 'KuadrantPage',\n component: () =>\n import('./components/KuadrantPage').then(m => m.ApiProductsPage),\n mountPoint: rootRouteRef,\n }),\n);\n\nexport const ApiProductsPage = kuadrantPlugin.provide(\n createRoutableExtension({\n name: 'ApiProductsPage',\n component: () =>\n import('./components/KuadrantPage').then(m => m.ApiProductsPage),\n mountPoint: rootRouteRef,\n }),\n);\n\nexport const MyApiKeysPage = kuadrantPlugin.provide(\n createRoutableExtension({\n name: 'MyApiKeysPage',\n component: () =>\n import('./components/MyApiKeysPage').then(m => m.MyApiKeysPage),\n mountPoint: rootRouteRef,\n }),\n);\n\nexport const ApiKeyApprovalPage = kuadrantPlugin.provide(\n createRoutableExtension({\n name: 'ApiKeyApprovalPage',\n component: () =>\n import('./components/ApiKeyApprovalPage').then(m => m.ApiKeyApprovalPage),\n mountPoint: rootRouteRef,\n }),\n);\n\nexport const EntityKuadrantApiAccessCard = kuadrantPlugin.provide(\n createComponentExtension({\n name: 'EntityKuadrantApiAccessCard',\n component: {\n lazy: () =>\n import('./components/ApiAccessCard').then(m => m.ApiAccessCard),\n },\n }),\n);\n\nexport const EntityKuadrantApiKeyManagementTab = kuadrantPlugin.provide(\n createComponentExtension({\n name: 'EntityKuadrantApiKeyManagementTab',\n component: {\n lazy: () =>\n import('./components/ApiKeyManagementTab').then(m => m.ApiKeyManagementTab),\n },\n }),\n);\n\n// entity content extension for api keys tab\nexport const EntityKuadrantApiKeysContent = kuadrantPlugin.provide(\n createComponentExtension({\n name: 'EntityKuadrantApiKeysContent',\n component: {\n lazy: () =>\n import('./components/ApiKeyManagementTab').then(m => m.ApiKeyManagementTab),\n },\n }),\n);\n\nexport const EntityKuadrantApiProductInfoContent = kuadrantPlugin.provide(\n createComponentExtension({\n name: 'EntityKuadrantApiProductInfoContent',\n component: {\n lazy: () =>\n import('./components/ApiProductInfoCard').then(m => m.ApiProductInfoCard),\n },\n }),\n);\n\nexport const ApiKeyDetailPage = kuadrantPlugin.provide(\n createRoutableExtension({\n name: 'ApiKeyDetailPage',\n component: () =>\n import('./components/ApiKeyDetailPage').then(m => m.ApiKeyDetailPage),\n mountPoint: rootRouteRef,\n }),\n);\n\nexport const EntityKuadrantApiApprovalTab = kuadrantPlugin.provide(\n createComponentExtension({\n name: 'EntityKuadrantApiApprovalTab',\n component: {\n lazy: () =>\n import('./components/EntityApiApprovalTab').then(m => m.EntityApiApprovalTab),\n },\n }),\n);\n\nexport const EntityKuadrantApiProductOpenApiAlert = kuadrantPlugin.provide(\n createComponentExtension({\n name: 'EntityKuadrantApiProductOpenApiAlert',\n component: {\n lazy: () =>\n import('./components/ApiProductOpenApiAlert').then(m => m.ApiProductOpenApiAlert),\n },\n }),\n);\n\nexport const ApiProductDetailPage = kuadrantPlugin.provide(\n createRoutableExtension({\n name: 'ApiProductDetailPage',\n component: () =>\n import('./components/ApiProductDetailPage').then(m => m.ApiProductDetailPage),\n mountPoint: rootRouteRef,\n }),\n);\n"],"names":[],"mappings":";;;AAQO,MAAM,iBAAiB,YAAa,CAAA;AAAA,EACzC,EAAI,EAAA,UAAA;AAAA,EACJ,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,YAAA;AAAA,IACN,QAAU,EAAA;AAAA;AAEd,CAAC;AAEM,MAAM,eAAe,cAAe,CAAA,OAAA;AAAA,EACzC,uBAAwB,CAAA;AAAA,IACtB,IAAM,EAAA,cAAA;AAAA,IACN,SAAA,EAAW,MACT,OAAO,wCAA2B,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,eAAe,CAAA;AAAA,IACjE,UAAY,EAAA;AAAA,GACb;AACH;AAEO,MAAM,kBAAkB,cAAe,CAAA,OAAA;AAAA,EAC5C,uBAAwB,CAAA;AAAA,IACtB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A;AAAA,IAC9E,UAAY,EAAA;AAAA,GACb;AACH;;;;"}
|
package/dist/utils/styles.esm.js
CHANGED
|
@@ -1,14 +1,53 @@
|
|
|
1
|
-
const
|
|
1
|
+
const getMyApiKeysStatusChipStyle = (phase) => {
|
|
2
2
|
const base = { border: "none" };
|
|
3
3
|
switch (phase) {
|
|
4
4
|
case "Approved":
|
|
5
|
-
return { ...base, backgroundColor: "#
|
|
5
|
+
return { ...base, backgroundColor: "#1976d2", color: "#fff" };
|
|
6
|
+
// Blue
|
|
6
7
|
case "Rejected":
|
|
7
|
-
return { ...base, backgroundColor: "#
|
|
8
|
+
return { ...base, backgroundColor: "#d32f2f", color: "#fff" };
|
|
9
|
+
// Red
|
|
10
|
+
case "Pending":
|
|
11
|
+
return { ...base, backgroundColor: "#9c27b0", color: "#fff" };
|
|
12
|
+
// Purple
|
|
8
13
|
default:
|
|
9
|
-
return { ...base, backgroundColor: "#
|
|
14
|
+
return { ...base, backgroundColor: "#9c27b0", color: "#fff" };
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
const getApprovalQueueStatusChipStyle = (phase) => {
|
|
18
|
+
const base = { border: "none" };
|
|
19
|
+
switch (phase) {
|
|
20
|
+
case "Approved":
|
|
21
|
+
return { ...base, backgroundColor: "#2e7d32", color: "#fff" };
|
|
22
|
+
// Green
|
|
23
|
+
case "Rejected":
|
|
24
|
+
return { ...base, backgroundColor: "#d32f2f", color: "#fff" };
|
|
25
|
+
// Red
|
|
26
|
+
case "Pending":
|
|
27
|
+
return { ...base, backgroundColor: "#ed6c02", color: "#fff" };
|
|
28
|
+
// Orange
|
|
29
|
+
default:
|
|
30
|
+
return { ...base, backgroundColor: "#ed6c02", color: "#fff" };
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
const getLifecycleChipStyle = (lifecycle) => {
|
|
34
|
+
switch (lifecycle) {
|
|
35
|
+
case "production":
|
|
36
|
+
return { backgroundColor: "#1976d2", color: "#fff" };
|
|
37
|
+
// Blue
|
|
38
|
+
case "experimental":
|
|
39
|
+
return { backgroundColor: "#9c27b0", color: "#fff" };
|
|
40
|
+
// Purple
|
|
41
|
+
case "deprecated":
|
|
42
|
+
return { backgroundColor: "#ff9800", color: "#fff" };
|
|
43
|
+
// Orange
|
|
44
|
+
case "retired":
|
|
45
|
+
return { backgroundColor: "#d32f2f", color: "#fff" };
|
|
46
|
+
// Red
|
|
47
|
+
default:
|
|
48
|
+
return {};
|
|
10
49
|
}
|
|
11
50
|
};
|
|
12
51
|
|
|
13
|
-
export {
|
|
52
|
+
export { getApprovalQueueStatusChipStyle, getLifecycleChipStyle, getMyApiKeysStatusChipStyle };
|
|
14
53
|
//# sourceMappingURL=styles.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.esm.js","sources":["../../src/utils/styles.ts"],"sourcesContent":["import { CSSProperties } from \"react\";\n\n/**\n * Returns inline styles for API key status chips.\n * Uses inline styles to ensure proper specificity with Material-UI Chip.\n */\nexport const
|
|
1
|
+
{"version":3,"file":"styles.esm.js","sources":["../../src/utils/styles.ts"],"sourcesContent":["import { CSSProperties } from \"react\";\n\n/**\n * Returns inline styles for API key status chips on the My API Keys page.\n */\nexport const getMyApiKeysStatusChipStyle = (phase: string): CSSProperties => {\n const base = { border: \"none\" };\n switch (phase) {\n case \"Approved\":\n return { ...base, backgroundColor: \"#1976d2\", color: \"#fff\" }; // Blue\n case \"Rejected\":\n return { ...base, backgroundColor: \"#d32f2f\", color: \"#fff\" }; // Red\n case \"Pending\":\n return { ...base, backgroundColor: \"#9c27b0\", color: \"#fff\" }; // Purple\n default:\n return { ...base, backgroundColor: \"#9c27b0\", color: \"#fff\" }; // Purple (fallback for Pending)\n }\n};\n\n/**\n * Returns inline styles for API key status chips on the Approval Queue page.\n * Uses inline styles to ensure proper specificity with Material-UI Chip.\n */\nexport const getApprovalQueueStatusChipStyle = (phase: string): CSSProperties => {\n const base = { border: \"none\" };\n switch (phase) {\n case \"Approved\":\n return { ...base, backgroundColor: \"#2e7d32\", color: \"#fff\" }; // Green\n case \"Rejected\":\n return { ...base, backgroundColor: \"#d32f2f\", color: \"#fff\" }; // Red\n case \"Pending\":\n return { ...base, backgroundColor: \"#ed6c02\", color: \"#fff\" }; // Orange\n default:\n return { ...base, backgroundColor: \"#ed6c02\", color: \"#fff\" }; // Orange (fallback for Pending)\n }\n};\n\n/**\n * Returns inline styles for lifecycle chips.\n * Uses inline styles to ensure proper specificity with Material-UI Chip.\n */\nexport const getLifecycleChipStyle = (lifecycle: string): CSSProperties => {\n switch (lifecycle) {\n case \"production\":\n return { backgroundColor: \"#1976d2\", color: \"#fff\" }; // Blue\n case \"experimental\":\n return { backgroundColor: \"#9c27b0\", color: \"#fff\" }; // Purple\n case \"deprecated\":\n return { backgroundColor: \"#ff9800\", color: \"#fff\" }; // Orange\n case \"retired\":\n return { backgroundColor: \"#d32f2f\", color: \"#fff\" }; // Red\n default:\n return {};\n }\n};\n"],"names":[],"mappings":"AAKa,MAAA,2BAAA,GAA8B,CAAC,KAAiC,KAAA;AAC3E,EAAM,MAAA,IAAA,GAAO,EAAE,MAAA,EAAQ,MAAO,EAAA;AAC9B,EAAA,QAAQ,KAAO;AAAA,IACb,KAAK,UAAA;AACH,MAAA,OAAO,EAAE,GAAG,IAAA,EAAM,eAAiB,EAAA,SAAA,EAAW,OAAO,MAAO,EAAA;AAAA;AAAA,IAC9D,KAAK,UAAA;AACH,MAAA,OAAO,EAAE,GAAG,IAAA,EAAM,eAAiB,EAAA,SAAA,EAAW,OAAO,MAAO,EAAA;AAAA;AAAA,IAC9D,KAAK,SAAA;AACH,MAAA,OAAO,EAAE,GAAG,IAAA,EAAM,eAAiB,EAAA,SAAA,EAAW,OAAO,MAAO,EAAA;AAAA;AAAA,IAC9D;AACE,MAAA,OAAO,EAAE,GAAG,IAAA,EAAM,eAAiB,EAAA,SAAA,EAAW,OAAO,MAAO,EAAA;AAAA;AAElE;AAMa,MAAA,+BAAA,GAAkC,CAAC,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