@prorobotech/openapi-k8s-toolkit 1.1.0-alpha.12 → 1.1.0-alpha.14

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.
Files changed (45) hide show
  1. package/dist/openapi-k8s-toolkit.es.js +374 -385
  2. package/dist/openapi-k8s-toolkit.es.js.map +1 -1
  3. package/dist/openapi-k8s-toolkit.umd.js +374 -385
  4. package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
  5. package/dist/types/api/bff/scopes/checkScopes.d.ts +6 -6
  6. package/dist/types/api/bff/scopes/filterScopes.d.ts +4 -4
  7. package/dist/types/api/bff/search/getKinds.d.ts +2 -2
  8. package/dist/types/api/bff/swagger/getSwagger.d.ts +2 -2
  9. package/dist/types/api/getApiResource.d.ts +8 -8
  10. package/dist/types/api/getApiResourceTypes.d.ts +4 -4
  11. package/dist/types/api/getBuiltinResource.d.ts +8 -8
  12. package/dist/types/api/getBuiltinResourceTypes.d.ts +2 -2
  13. package/dist/types/api/getCrdData.d.ts +2 -2
  14. package/dist/types/api/getCrdResource.d.ts +5 -5
  15. package/dist/types/api/permissions.d.ts +4 -4
  16. package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/BlackholeForm.d.ts +3 -3
  17. package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeFormProvider/BlackholeFormProvider.d.ts +3 -3
  18. package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTable/types.d.ts +2 -2
  19. package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTableProvider/EnrichedTableProvider.d.ts +2 -2
  20. package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTableProvider/utils.d.ts +1 -1
  21. package/dist/types/components/molecules/Events/Events.d.ts +2 -2
  22. package/dist/types/components/molecules/MarketPlace/MarketPlace.d.ts +3 -3
  23. package/dist/types/components/molecules/MarketPlace/molecules/AddEditFormModal/AddEditFormModal.d.ts +3 -3
  24. package/dist/types/components/molecules/MarketPlace/molecules/MarketplaceCard/MarketplaceCard.d.ts +1 -1
  25. package/dist/types/components/molecules/MarketPlace/molecules/MarketplaceCard/utils.d.ts +9 -9
  26. package/dist/types/components/molecules/ProjectInfoCard/ProjectInfoCard.d.ts +3 -3
  27. package/dist/types/components/molecules/YamlEditorSingleton/YamlEditorSingleton.d.ts +1 -1
  28. package/dist/types/components/organisms/DynamicComponents/molecules/OwnerRefs/organsisms/RefsList/RefsList.d.ts +2 -2
  29. package/dist/types/components/organisms/DynamicComponents/types.d.ts +22 -18
  30. package/dist/types/hooks/useApiResource.d.ts +8 -8
  31. package/dist/types/hooks/useApisResourceTypes.d.ts +4 -4
  32. package/dist/types/hooks/useBuiltinResource.d.ts +8 -8
  33. package/dist/types/hooks/useBuiltinResourceTypes.d.ts +2 -2
  34. package/dist/types/hooks/useCrdData.d.ts +2 -2
  35. package/dist/types/hooks/useCrdResource.d.ts +5 -5
  36. package/dist/types/hooks/useK8sSmartResource.d.ts +3 -3
  37. package/dist/types/hooks/usePermissions.d.ts +4 -4
  38. package/dist/types/localTypes/bff/form.d.ts +5 -5
  39. package/dist/types/localTypes/bff/scopes.d.ts +6 -6
  40. package/dist/types/localTypes/bff/table.d.ts +2 -2
  41. package/dist/types/localTypes/form.d.ts +2 -2
  42. package/dist/types/localTypes/marketplace.d.ts +1 -1
  43. package/dist/types/utils/getGroupsByCategory/getGroupsByCategory.d.ts +2 -2
  44. package/dist/types/utils/tableLocations/tableLocations.d.ts +5 -5
  45. package/package.json +1 -1
@@ -7892,6 +7892,13 @@ const patchEntryWithReplaceOp = async ({
7892
7892
  "Content-Type": "application/json-patch+json"
7893
7893
  }
7894
7894
  };
7895
+ const addOp = [
7896
+ {
7897
+ op: "add",
7898
+ path: pathToValue,
7899
+ value: body
7900
+ }
7901
+ ];
7895
7902
  const replaceOp = [
7896
7903
  {
7897
7904
  op: "replace",
@@ -7900,24 +7907,11 @@ const patchEntryWithReplaceOp = async ({
7900
7907
  }
7901
7908
  ];
7902
7909
  try {
7903
- return await axios.patch(endpoint, replaceOp, config);
7910
+ await axios.patch(endpoint, addOp, config);
7904
7911
  } catch (error) {
7905
- if (!isAxiosError(error)) {
7906
- throw error;
7907
- }
7908
- const status = error.response?.status;
7909
- if (status !== 422) {
7910
- throw error;
7911
- }
7912
- const addOp = [
7913
- {
7914
- op: "add",
7915
- path: pathToValue,
7916
- value: body
7917
- }
7918
- ];
7919
- return axios.patch(endpoint, addOp, config);
7912
+ console.error(`Error trying to add: ${error}`);
7920
7913
  }
7914
+ return axios.patch(endpoint, replaceOp, config);
7921
7915
  };
7922
7916
  const patchEntryWithDeleteOp = async ({
7923
7917
  endpoint,
@@ -9183,23 +9177,23 @@ const useListWatch = ({
9183
9177
  };
9184
9178
  };
9185
9179
 
9186
- const buildApiPrefix = (group, version) => {
9187
- const g = (group ?? "").trim();
9188
- const v = (version ?? "").trim();
9180
+ const buildApiPrefix = (apiGroup, apiVersion) => {
9181
+ const g = (apiGroup ?? "").trim();
9182
+ const v = (apiVersion ?? "").trim();
9189
9183
  const isCore = !g || g === "core" || g === "v1";
9190
9184
  return isCore ? `/api/${v}` : `/apis/${g}/${v}`;
9191
9185
  };
9192
9186
  const buildListUri = ({
9193
9187
  cluster,
9194
- group,
9195
- version,
9188
+ apiGroup,
9189
+ apiVersion,
9196
9190
  plural,
9197
9191
  namespace,
9198
9192
  fieldSelector,
9199
9193
  labelSelector,
9200
9194
  limit
9201
9195
  }) => {
9202
- const prefix = buildApiPrefix(group, version);
9196
+ const prefix = buildApiPrefix(apiGroup, apiVersion);
9203
9197
  const ns = namespace ? `/namespaces/${namespace}` : "";
9204
9198
  const base = `/api/clusters/${cluster}/k8s${prefix}${ns}/${plural}/`;
9205
9199
  const params = new URLSearchParams();
@@ -9210,8 +9204,8 @@ const buildListUri = ({
9210
9204
  };
9211
9205
  const useK8sSmartResource = ({
9212
9206
  cluster,
9213
- group,
9214
- version,
9207
+ apiGroup,
9208
+ apiVersion,
9215
9209
  plural,
9216
9210
  namespace,
9217
9211
  fieldSelector,
@@ -9229,15 +9223,15 @@ const useK8sSmartResource = ({
9229
9223
  error: verbsErrorObj
9230
9224
  } = useK8sVerbs({
9231
9225
  cluster,
9232
- group,
9233
- version,
9226
+ group: apiGroup,
9227
+ version: apiVersion,
9234
9228
  plural,
9235
9229
  isEnabled: Boolean(isEnabled && cluster && cluster.length > 0)
9236
9230
  });
9237
9231
  const listUri = buildListUri({
9238
9232
  cluster,
9239
- group,
9240
- version,
9233
+ apiGroup,
9234
+ apiVersion,
9241
9235
  plural,
9242
9236
  namespace,
9243
9237
  fieldSelector,
@@ -9257,8 +9251,8 @@ const useK8sSmartResource = ({
9257
9251
  queryKey: [
9258
9252
  "k8s-list",
9259
9253
  cluster,
9260
- group || "",
9261
- version,
9254
+ apiGroup || "",
9255
+ apiVersion,
9262
9256
  namespace || "",
9263
9257
  plural,
9264
9258
  fieldSelector || "",
@@ -9279,8 +9273,8 @@ const useK8sSmartResource = ({
9279
9273
  isEnabled: watchEnabled,
9280
9274
  pageSize: limit,
9281
9275
  query: {
9282
- apiGroup: group,
9283
- apiVersion: version,
9276
+ apiGroup,
9277
+ apiVersion,
9284
9278
  plural,
9285
9279
  namespace,
9286
9280
  fieldSelector,
@@ -9379,9 +9373,9 @@ const ManageableBreadcrumbsProvider = ({
9379
9373
  isError: rawDataError,
9380
9374
  isLoading: rawDataLoading
9381
9375
  } = useK8sSmartResource({
9382
- cluster: cluster || "",
9383
- group: apiGroup,
9384
- version: apiVersion,
9376
+ cluster,
9377
+ apiGroup,
9378
+ apiVersion,
9385
9379
  plural,
9386
9380
  isEnabled
9387
9381
  });
@@ -9591,8 +9585,8 @@ const ManageableSidebarProvider = ({
9591
9585
  isLoading: rawDataLoading
9592
9586
  } = useK8sSmartResource({
9593
9587
  cluster,
9594
- group: apiGroup,
9595
- version: apiVersion,
9588
+ apiGroup,
9589
+ apiVersion,
9596
9590
  plural,
9597
9591
  isEnabled
9598
9592
  });
@@ -34219,21 +34213,15 @@ const ProjectInfoCard$1 = ({
34219
34213
  data,
34220
34214
  children
34221
34215
  }) => {
34222
- const { id, clusterNamePartOfUrl, namespacePartOfUrl, accessGroups, ...props } = data;
34216
+ const { id, cluster, namespace, accessGroups, ...props } = data;
34223
34217
  const { data: multiQueryData, isError, errors } = useMultiQuery();
34224
34218
  const partsOfUrl = usePartsOfUrl();
34225
34219
  const replaceValues = partsOfUrl.partsOfUrl.reduce((acc, value, index) => {
34226
34220
  acc[index.toString()] = value;
34227
34221
  return acc;
34228
34222
  }, {});
34229
- const clusterName = prepareTemplate({
34230
- template: clusterNamePartOfUrl,
34231
- replaceValues
34232
- });
34233
- const namespace = prepareTemplate({
34234
- template: namespacePartOfUrl,
34235
- replaceValues
34236
- });
34223
+ const clusterPrepared = parseAll({ text: cluster, replaceValues, multiQueryData });
34224
+ const namespacePrepared = parseAll({ text: namespace, replaceValues, multiQueryData });
34237
34225
  const parsedAccessGroups = accessGroups.map(
34238
34226
  (accessGroup) => parseAll({ text: accessGroup, replaceValues, multiQueryData })
34239
34227
  );
@@ -34243,7 +34231,7 @@ const ProjectInfoCard$1 = ({
34243
34231
  /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { children: errors.map((e, i) => e && /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: typeof e === "string" ? e : e.message }, i)) })
34244
34232
  ] });
34245
34233
  }
34246
- return /* @__PURE__ */ jsxRuntimeExports.jsx(ProjectInfoCard, { clusterName, namespace, accessGroups: parsedAccessGroups, ...props, children });
34234
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ProjectInfoCard, { cluster: clusterPrepared, namespace: namespacePrepared, accessGroups: parsedAccessGroups, ...props, children });
34247
34235
  };
34248
34236
 
34249
34237
  const MarketplaceCard$1 = ({
@@ -34251,21 +34239,22 @@ const MarketplaceCard$1 = ({
34251
34239
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
34252
34240
  children
34253
34241
  }) => {
34254
- const { id, clusterNamePartOfUrl, namespacePartOfUrl, ...props } = data;
34242
+ const { id, cluster, namespace, ...props } = data;
34243
+ const { data: multiQueryData, isError, errors } = useMultiQuery();
34255
34244
  const partsOfUrl = usePartsOfUrl();
34256
34245
  const replaceValues = partsOfUrl.partsOfUrl.reduce((acc, value, index) => {
34257
34246
  acc[index.toString()] = value;
34258
34247
  return acc;
34259
34248
  }, {});
34260
- const clusterName = prepareTemplate({
34261
- template: clusterNamePartOfUrl,
34262
- replaceValues
34263
- });
34264
- const namespace = prepareTemplate({
34265
- template: namespacePartOfUrl,
34266
- replaceValues
34267
- });
34268
- return /* @__PURE__ */ jsxRuntimeExports.jsx(MarketPlace, { clusterName, namespace, ...props });
34249
+ const clusterPrepared = parseAll({ text: cluster, replaceValues, multiQueryData });
34250
+ const namespacePrepared = parseAll({ text: namespace, replaceValues, multiQueryData });
34251
+ if (isError) {
34252
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
34253
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { children: "Errors:" }),
34254
+ /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { children: errors.map((e, i) => e && /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: typeof e === "string" ? e : e.message }, i)) })
34255
+ ] });
34256
+ }
34257
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(MarketPlace, { cluster: clusterPrepared, namespace: namespacePrepared, ...props });
34269
34258
  };
34270
34259
 
34271
34260
  const ContentCard = ({
@@ -34393,7 +34382,7 @@ const SidebarProvider = ({
34393
34382
  };
34394
34383
 
34395
34384
  const checkPermission = async ({
34396
- clusterName,
34385
+ cluster,
34397
34386
  body
34398
34387
  }) => {
34399
34388
  const data = JSON.stringify({
@@ -34401,15 +34390,15 @@ const checkPermission = async ({
34401
34390
  kind: "SelfSubjectAccessReview",
34402
34391
  spec: {
34403
34392
  resourceAttributes: {
34404
- ...body.group ? { group: body.group } : {},
34405
- resource: body.resource,
34393
+ ...body.apiGroup ? { group: body.apiGroup } : {},
34394
+ resource: body.plural,
34406
34395
  verb: body.verb,
34407
34396
  ...body.namespace ? { namespace: body.namespace } : {},
34408
34397
  ...body.name ? { name: body.name } : {}
34409
34398
  }
34410
34399
  }
34411
34400
  });
34412
- return axios.post(`/api/clusters/${clusterName}/k8s/apis/authorization.k8s.io/v1/selfsubjectaccessreviews`, data, {
34401
+ return axios.post(`/api/clusters/${cluster}/k8s/apis/authorization.k8s.io/v1/selfsubjectaccessreviews`, data, {
34413
34402
  method: "POST",
34414
34403
  headers: {
34415
34404
  "Content-Type": "application/json"
@@ -34418,23 +34407,23 @@ const checkPermission = async ({
34418
34407
  };
34419
34408
 
34420
34409
  const usePermissions = ({
34421
- clusterName,
34410
+ cluster,
34422
34411
  namespace,
34423
- group,
34424
- resource,
34412
+ apiGroup,
34413
+ plural,
34425
34414
  verb,
34426
34415
  name,
34427
34416
  refetchInterval,
34428
34417
  enabler
34429
34418
  }) => {
34430
34419
  return useQuery({
34431
- queryKey: ["usePermissions", clusterName, namespace, group, resource, verb, name],
34420
+ queryKey: ["usePermissions", cluster, namespace, apiGroup, plural, verb, name],
34432
34421
  queryFn: async () => (await checkPermission({
34433
- clusterName,
34422
+ cluster,
34434
34423
  body: {
34435
34424
  namespace,
34436
- group,
34437
- resource,
34425
+ apiGroup,
34426
+ plural,
34438
34427
  verb
34439
34428
  }
34440
34429
  })).data,
@@ -34451,7 +34440,7 @@ const getLinkToBuiltinForm = ({
34451
34440
  baseprefix,
34452
34441
  namespace,
34453
34442
  syntheticProject,
34454
- typeName,
34443
+ plural,
34455
34444
  inside,
34456
34445
  fullPath
34457
34446
  }) => {
@@ -34460,7 +34449,7 @@ const getLinkToBuiltinForm = ({
34460
34449
  const backlink = getBackLinkToTable({
34461
34450
  fullPath
34462
34451
  });
34463
- return `${mainRoute}/forms/builtin/v1/${typeName}?backlink=${backlink}`;
34452
+ return `${mainRoute}/forms/builtin/v1/${plural}?backlink=${backlink}`;
34464
34453
  };
34465
34454
  const getLinkToApiForm = ({
34466
34455
  cluster,
@@ -34469,7 +34458,7 @@ const getLinkToApiForm = ({
34469
34458
  syntheticProject,
34470
34459
  apiGroup,
34471
34460
  apiVersion,
34472
- typeName,
34461
+ plural,
34473
34462
  inside,
34474
34463
  fullPath
34475
34464
  }) => {
@@ -34478,7 +34467,7 @@ const getLinkToApiForm = ({
34478
34467
  const backlink = getBackLinkToTable({
34479
34468
  fullPath
34480
34469
  });
34481
- return `${mainRoute}/forms/apis/${apiGroup}/${apiVersion}/${typeName}?backlink=${backlink}`;
34470
+ return `${mainRoute}/forms/apis/${apiGroup}/${apiVersion}/${plural}?backlink=${backlink}`;
34482
34471
  };
34483
34472
  const getLinkToForm = ({
34484
34473
  apiGroup,
@@ -34525,7 +34514,7 @@ const EnrichedTable$1 = ({
34525
34514
  fetchUrl,
34526
34515
  k8sResourceToFetch,
34527
34516
  pathToItems,
34528
- clusterNamePartOfUrl,
34517
+ cluster,
34529
34518
  labelSelector,
34530
34519
  labelSelectorFull,
34531
34520
  fieldSelector,
@@ -34541,36 +34530,33 @@ const EnrichedTable$1 = ({
34541
34530
  acc[index.toString()] = value;
34542
34531
  return acc;
34543
34532
  }, {});
34544
- const clusterName = prepareTemplate({
34545
- template: clusterNamePartOfUrl,
34546
- replaceValues
34547
- });
34533
+ const clusterPrepared = parseAll({ text: cluster, replaceValues, multiQueryData });
34548
34534
  const namespacePrepared = namespace ? parseAll({ text: namespace, replaceValues, multiQueryData }) : void 0;
34549
34535
  const k8sResourcePrePrepared = k8sResource ? {
34550
34536
  apiGroup: k8sResource.apiGroup ? parseAll({ text: k8sResource.apiGroup, replaceValues, multiQueryData }) : void 0,
34551
34537
  apiVersion: parseAll({ text: k8sResource.apiVersion, replaceValues, multiQueryData }),
34552
- resource: parseAll({ text: k8sResource.resource, replaceValues, multiQueryData })
34538
+ plural: parseAll({ text: k8sResource.plural, replaceValues, multiQueryData })
34553
34539
  } : void 0;
34554
- const k8sResourcePrepared = k8sResourcePrePrepared?.apiGroup === "-" ? { apiVersion: k8sResourcePrePrepared.apiVersion, resource: k8sResourcePrePrepared.resource } : k8sResourcePrePrepared;
34540
+ const k8sResourcePrepared = k8sResourcePrePrepared?.apiGroup === "-" ? { apiVersion: k8sResourcePrePrepared.apiVersion, plural: k8sResourcePrePrepared.plural } : k8sResourcePrePrepared;
34555
34541
  const dataForControlsPrepared = dataForControls ? {
34556
- cluster: clusterName,
34542
+ cluster: clusterPrepared,
34557
34543
  syntheticProject: dataForControls.syntheticProject ? parseAll({ text: dataForControls.syntheticProject, replaceValues, multiQueryData }) : void 0,
34558
- resource: parseAll({ text: dataForControls.resource, replaceValues, multiQueryData }),
34544
+ plural: parseAll({ text: dataForControls.plural, replaceValues, multiQueryData }),
34559
34545
  apiGroup: dataForControls.apiGroup ? parseAll({ text: dataForControls.apiGroup, replaceValues, multiQueryData }) : void 0,
34560
34546
  apiVersion: parseAll({ text: dataForControls.apiVersion, replaceValues, multiQueryData })
34561
34547
  } : void 0;
34562
34548
  const createPermission = usePermissions({
34563
- group: dataForControlsPrepared?.apiGroup,
34564
- resource: dataForControlsPrepared?.resource || "",
34549
+ apiGroup: dataForControlsPrepared?.apiGroup,
34550
+ plural: dataForControlsPrepared?.plural || "",
34565
34551
  namespace: namespacePrepared,
34566
- clusterName,
34552
+ cluster: clusterPrepared,
34567
34553
  verb: "create",
34568
34554
  refetchInterval: false
34569
34555
  });
34570
34556
  const fetchUrlPrepared = fetchUrl ? parseAll({ text: fetchUrl, replaceValues, multiQueryData }) : void 0;
34571
34557
  const k8sResourceToFetchPrepared = k8sResourceToFetch ? {
34572
- group: k8sResourceToFetch.group ? parseAll({ text: k8sResourceToFetch.group, replaceValues, multiQueryData }) : void 0,
34573
- version: parseAll({ text: k8sResourceToFetch.version, replaceValues, multiQueryData }),
34558
+ apiGroup: k8sResourceToFetch.apiGroup ? parseAll({ text: k8sResourceToFetch.apiGroup, replaceValues, multiQueryData }) : void 0,
34559
+ apiVersion: parseAll({ text: k8sResourceToFetch.apiVersion, replaceValues, multiQueryData }),
34574
34560
  plural: parseAll({ text: k8sResourceToFetch.plural, replaceValues, multiQueryData }),
34575
34561
  namespace: k8sResourceToFetch.namespace ? parseAll({ text: k8sResourceToFetch.namespace, replaceValues, multiQueryData }) : void 0
34576
34562
  } : void 0;
@@ -34617,10 +34603,10 @@ const EnrichedTable$1 = ({
34617
34603
  isLoading: isFetchedDataSocketLoading,
34618
34604
  error: fetchedDataSocketError
34619
34605
  } = useK8sSmartResource({
34620
- cluster: clusterName || "",
34606
+ cluster: clusterPrepared || "",
34621
34607
  namespace: k8sResourceToFetchPrepared?.namespace,
34622
- group: k8sResourceToFetchPrepared?.group,
34623
- version: k8sResourceToFetchPrepared?.version || "",
34608
+ apiGroup: k8sResourceToFetchPrepared?.apiGroup,
34609
+ apiVersion: k8sResourceToFetchPrepared?.apiVersion || "",
34624
34610
  plural: k8sResourceToFetchPrepared?.plural || "",
34625
34611
  fieldSelector: sParams.get("fieldSelector") || void 0,
34626
34612
  labelSelector: sParams.get("labelSelector") || void 0,
@@ -34671,7 +34657,7 @@ const EnrichedTable$1 = ({
34671
34657
  EnrichedTableProvider,
34672
34658
  {
34673
34659
  tableMappingsReplaceValues: replaceValues,
34674
- cluster: clusterName,
34660
+ cluster: clusterPrepared,
34675
34661
  namespace: namespacePrepared,
34676
34662
  theme,
34677
34663
  dataItems: items,
@@ -34705,13 +34691,13 @@ const EnrichedTable$1 = ({
34705
34691
  type: "primary",
34706
34692
  onClick: () => {
34707
34693
  const url = getLinkToForm({
34708
- cluster: clusterName,
34694
+ cluster: clusterPrepared,
34709
34695
  baseprefix,
34710
34696
  namespace: namespacePrepared,
34711
34697
  syntheticProject: params.syntheticProject,
34712
34698
  apiGroup: dataForControlsPrepared.apiGroup,
34713
34699
  apiVersion: dataForControlsPrepared.apiVersion,
34714
- typeName: dataForControlsPrepared.resource,
34700
+ plural: dataForControlsPrepared.plural,
34715
34701
  fullPath
34716
34702
  });
34717
34703
  navigate(url);
@@ -34792,7 +34778,7 @@ const PodTerminal$1 = ({
34792
34778
  } = useK8sSmartResource({
34793
34779
  cluster: clusterPrepared,
34794
34780
  namespace: namespacePrepared,
34795
- version: "v1",
34781
+ apiVersion: "v1",
34796
34782
  plural: "pods",
34797
34783
  fieldSelector: `metadata.name=${podNamePrepared}`,
34798
34784
  isEnabled: clusterPrepared !== void 0 && namespacePrepared !== void 0 && podNamePrepared !== void 0
@@ -34911,7 +34897,7 @@ const PodLogs$1 = ({
34911
34897
  } = useK8sSmartResource({
34912
34898
  cluster: clusterPrepared,
34913
34899
  namespace: namespacePrepared,
34914
- version: "v1",
34900
+ apiVersion: "v1",
34915
34901
  plural: "pods",
34916
34902
  fieldSelector: `metadata.name=${podNamePrepared}`,
34917
34903
  isEnabled: clusterPrepared !== void 0 && namespacePrepared !== void 0 && podNamePrepared !== void 0
@@ -34997,7 +34983,7 @@ const YamlEditorSingleton$1 = ({
34997
34983
  type,
34998
34984
  apiGroup,
34999
34985
  apiVersion,
35000
- typeName,
34986
+ plural,
35001
34987
  forcedKind,
35002
34988
  prefillValuesRequestIndex,
35003
34989
  pathToData,
@@ -35025,7 +35011,7 @@ const YamlEditorSingleton$1 = ({
35025
35011
  const clusterPrepared = parseAll({ text: cluster, replaceValues, multiQueryData });
35026
35012
  const apiGroupPrepared = apiGroup ? parseAll({ text: apiGroup, replaceValues, multiQueryData }) : "no-api-group";
35027
35013
  const apiVersionPrepared = apiVersion ? parseAll({ text: apiVersion, replaceValues, multiQueryData }) : "no-api-version";
35028
- const typeNamePrepared = parseAll({ text: typeName, replaceValues, multiQueryData });
35014
+ const pluralPrepared = parseAll({ text: plural, replaceValues, multiQueryData });
35029
35015
  const prefillValuesRaw = multiQueryData[`req${prefillValuesRequestIndex}`];
35030
35016
  const prefillValues = pathToData ? getDataByPath({ prefillValuesRaw, pathToData }) : prefillValuesRaw;
35031
35017
  const prefillValuesWithForces = getPrefillValuesWithForces({ prefillValues, forcedKind, apiGroup, apiVersion });
@@ -35043,7 +35029,7 @@ const YamlEditorSingleton$1 = ({
35043
35029
  isCreate: false,
35044
35030
  type,
35045
35031
  apiGroupApiVersion: type === "builtin" ? "api/v1" : `${apiGroupPrepared}/${apiVersionPrepared}`,
35046
- typeName: typeNamePrepared,
35032
+ plural: pluralPrepared,
35047
35033
  designNewLayout: true,
35048
35034
  designNewLayoutHeight: height,
35049
35035
  openNotification: true,
@@ -38030,7 +38016,7 @@ const Events$1 = ({
38030
38016
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
38031
38017
  id,
38032
38018
  baseprefix,
38033
- clusterNamePartOfUrl,
38019
+ cluster,
38034
38020
  wsUrl,
38035
38021
  pageSize,
38036
38022
  substractHeight,
@@ -38043,8 +38029,8 @@ const Events$1 = ({
38043
38029
  baseFactoryNamespacedBuiltinKey,
38044
38030
  baseFactoryClusterSceopedBuiltinKey,
38045
38031
  baseNamespaceFactoryKey,
38046
- baseNavigationPluralName,
38047
- baseNavigationSpecificName,
38032
+ baseNavigationPlural,
38033
+ baseNavigationName,
38048
38034
  ...props
38049
38035
  } = data;
38050
38036
  const theme = useTheme();
@@ -38053,10 +38039,7 @@ const Events$1 = ({
38053
38039
  acc[index.toString()] = value;
38054
38040
  return acc;
38055
38041
  }, {});
38056
- const clusterName = prepareTemplate({
38057
- template: clusterNamePartOfUrl,
38058
- replaceValues
38059
- });
38042
+ const clusterPrepared = parseAll({ text: cluster, replaceValues, multiQueryData });
38060
38043
  const wsUrlPrepared = parseAll({ text: wsUrl, replaceValues, multiQueryData });
38061
38044
  const params = new URLSearchParams();
38062
38045
  if (limit) {
@@ -38100,7 +38083,7 @@ const Events$1 = ({
38100
38083
  {
38101
38084
  theme,
38102
38085
  baseprefix,
38103
- cluster: clusterName,
38086
+ cluster: clusterPrepared,
38104
38087
  wsUrl: wsUrlWithParams,
38105
38088
  pageSize,
38106
38089
  substractHeight: substractHeight || 340,
@@ -38109,8 +38092,8 @@ const Events$1 = ({
38109
38092
  baseFactoryNamespacedBuiltinKey,
38110
38093
  baseFactoryClusterSceopedBuiltinKey,
38111
38094
  baseNamespaceFactoryKey,
38112
- baseNavigationPluralName,
38113
- baseNavigationSpecificName,
38095
+ baseNavigationPlural,
38096
+ baseNavigationName,
38114
38097
  ...props
38115
38098
  }
38116
38099
  ),
@@ -38118,8 +38101,8 @@ const Events$1 = ({
38118
38101
  ] });
38119
38102
  };
38120
38103
 
38121
- const getKinds = async ({ clusterName }) => {
38122
- const result = await axios.get(`/api/clusters/${clusterName}/openapi-bff/search/kinds/getKinds`);
38104
+ const getKinds = async ({ cluster }) => {
38105
+ const result = await axios.get(`/api/clusters/${cluster}/openapi-bff/search/kinds/getKinds`);
38123
38106
  return result.data;
38124
38107
  };
38125
38108
 
@@ -38316,14 +38299,14 @@ const RefsList = ({
38316
38299
  baseFactoryClusterSceopedAPIKey,
38317
38300
  baseFactoryNamespacedBuiltinKey,
38318
38301
  baseFactoryClusterSceopedBuiltinKey,
38319
- baseNavigationPluralName,
38320
- baseNavigationSpecificName,
38302
+ baseNavigationPlural,
38303
+ baseNavigationName,
38321
38304
  listFlexProps
38322
38305
  }) => {
38323
38306
  const [kindIndex, setKindIndex] = useState();
38324
38307
  const [kindsWithVersion, setKindWithVersion] = useState();
38325
38308
  useEffect(() => {
38326
- getKinds({ clusterName: cluster }).then((data) => {
38309
+ getKinds({ cluster }).then((data) => {
38327
38310
  setKindIndex(data);
38328
38311
  setKindWithVersion(getSortedKindsAll(data));
38329
38312
  }).catch((error) => {
@@ -38332,10 +38315,10 @@ const RefsList = ({
38332
38315
  }, [cluster]);
38333
38316
  const { data: navigationDataArr } = useK8sSmartResource({
38334
38317
  cluster,
38335
- group: "front.in-cloud.io",
38336
- version: "v1alpha1",
38337
- plural: baseNavigationPluralName,
38338
- fieldSelector: `metadata.name=${baseNavigationSpecificName}`
38318
+ apiGroup: "front.in-cloud.io",
38319
+ apiVersion: "v1alpha1",
38320
+ plural: baseNavigationPlural,
38321
+ fieldSelector: `metadata.name=${baseNavigationName}`
38339
38322
  });
38340
38323
  const getPlural = kindsWithVersion ? pluralByKind(kindsWithVersion) : void 0;
38341
38324
  const baseFactoriesMapping = navigationDataArr && navigationDataArr.items && navigationDataArr.items.length > 0 ? navigationDataArr.items[0].spec?.baseFactoriesMapping : void 0;
@@ -38385,7 +38368,7 @@ const OwnerRefs = ({
38385
38368
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
38386
38369
  id,
38387
38370
  baseprefix,
38388
- clusterNamePartOfUrl,
38371
+ cluster,
38389
38372
  reqIndex,
38390
38373
  errorText,
38391
38374
  notArrayErrorText,
@@ -38396,13 +38379,14 @@ const OwnerRefs = ({
38396
38379
  keysToForcedLabel,
38397
38380
  forcedRelatedValuePath,
38398
38381
  jsonPathToArrayOfRefs,
38382
+ forcedApiVersion,
38399
38383
  forcedNamespace,
38400
38384
  baseFactoryNamespacedAPIKey,
38401
38385
  baseFactoryClusterSceopedAPIKey,
38402
38386
  baseFactoryNamespacedBuiltinKey,
38403
38387
  baseFactoryClusterSceopedBuiltinKey,
38404
- baseNavigationPluralName,
38405
- baseNavigationSpecificName,
38388
+ baseNavigationPlural,
38389
+ baseNavigationName,
38406
38390
  ...props
38407
38391
  } = data;
38408
38392
  const theme = useTheme();
@@ -38411,10 +38395,17 @@ const OwnerRefs = ({
38411
38395
  acc[index.toString()] = value;
38412
38396
  return acc;
38413
38397
  }, {});
38414
- const clusterName = prepareTemplate({
38415
- template: clusterNamePartOfUrl,
38416
- replaceValues
38417
- });
38398
+ const clusterPrepared = parseAll({ text: cluster, replaceValues, multiQueryData });
38399
+ const preparedForcedApiVersion = forcedApiVersion ? forcedApiVersion.map(({ kind, apiVersion }) => ({
38400
+ kind: prepareTemplate({
38401
+ template: kind,
38402
+ replaceValues
38403
+ }),
38404
+ apiVersion: prepareTemplate({
38405
+ template: apiVersion,
38406
+ replaceValues
38407
+ })
38408
+ })) : void 0;
38418
38409
  const preparedForcedNamespace = forcedNamespace ? prepareTemplate({
38419
38410
  template: forcedNamespace,
38420
38411
  replaceValues
@@ -38423,17 +38414,24 @@ const OwnerRefs = ({
38423
38414
  if (jsonRoot === void 0) {
38424
38415
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: containerStyle, children: errorText });
38425
38416
  }
38426
- const refsArr = jp.query(jsonRoot, `$${jsonPathToArrayOfRefs}`)[0];
38417
+ const refsArr = jp.query(jsonRoot, `$${jsonPathToArrayOfRefs}`).flat();
38427
38418
  if (!Array.isArray(refsArr)) {
38428
38419
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: containerStyle, children: notArrayErrorText });
38429
38420
  }
38430
38421
  if (refsArr.length === 0) {
38431
38422
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: containerStyle, children: emptyArrayErrorText });
38432
38423
  }
38433
- if (refsArr.some((el) => !isOwnerReference(el))) {
38424
+ const refsArrWithForcedApiVersion = refsArr.map((el) => {
38425
+ const forceFound = preparedForcedApiVersion?.find((force) => force.kind === el.kind);
38426
+ if (forceFound) {
38427
+ return { ...el, apiVersion: forceFound.apiVersion };
38428
+ }
38429
+ return el;
38430
+ });
38431
+ if (refsArrWithForcedApiVersion.some((el) => !isOwnerReference(el))) {
38434
38432
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: containerStyle, children: isNotRefsArrayErrorText });
38435
38433
  }
38436
- const guardedRefsArr = refsArr;
38434
+ const guardedRefsArr = refsArrWithForcedApiVersion;
38437
38435
  if (isMultiqueryLoading) {
38438
38436
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading multiquery" });
38439
38437
  }
@@ -38443,7 +38441,7 @@ const OwnerRefs = ({
38443
38441
  {
38444
38442
  theme,
38445
38443
  baseprefix,
38446
- cluster: clusterName,
38444
+ cluster: clusterPrepared,
38447
38445
  refsArr: guardedRefsArr,
38448
38446
  keysToForcedLabel,
38449
38447
  forcedRelatedValuePath,
@@ -38454,8 +38452,8 @@ const OwnerRefs = ({
38454
38452
  baseFactoryClusterSceopedAPIKey,
38455
38453
  baseFactoryNamespacedBuiltinKey,
38456
38454
  baseFactoryClusterSceopedBuiltinKey,
38457
- baseNavigationPluralName,
38458
- baseNavigationSpecificName,
38455
+ baseNavigationPlural,
38456
+ baseNavigationName,
38459
38457
  listFlexProps,
38460
38458
  ...props
38461
38459
  }
@@ -38779,7 +38777,15 @@ const prepareUrlsToFetchForDynamicRenderer = ({
38779
38777
  );
38780
38778
  };
38781
38779
 
38782
- const STRING_KEYS = ["cluster", "group", "version", "plural", "namespace", "fieldSelector", "labelSelector"];
38780
+ const STRING_KEYS = [
38781
+ "cluster",
38782
+ "apiGroup",
38783
+ "apiVersion",
38784
+ "plural",
38785
+ "namespace",
38786
+ "fieldSelector",
38787
+ "labelSelector"
38788
+ ];
38783
38789
  const DynamicRendererWithProviders = (props) => {
38784
38790
  const location = useLocation();
38785
38791
  const { urlsToFetch, dataToApplyToContext, theme, nodeTerminalDefaultProfile, disableEventBubbling } = props;
@@ -38851,6 +38857,9 @@ const getCellRender = ({
38851
38857
  }) => {
38852
38858
  if (possibleCustomTypeWithProps) {
38853
38859
  const { type, customProps } = possibleCustomTypeWithProps;
38860
+ if (type === "factory") {
38861
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(TableFactory, { record, customProps, theme });
38862
+ }
38854
38863
  if (value === void 0 && possibleUndefinedValue) {
38855
38864
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ShortenedTextWithTooltip, { trimLength: possibleTrimLength, text: possibleUndefinedValue });
38856
38865
  }
@@ -38888,9 +38897,6 @@ const getCellRender = ({
38888
38897
  }
38889
38898
  return /* @__PURE__ */ jsxRuntimeExports.jsx(TrimmedTags, { tags, trimLength: possibleTrimLength });
38890
38899
  }
38891
- if (type === "factory") {
38892
- return /* @__PURE__ */ jsxRuntimeExports.jsx(TableFactory, { record, customProps, theme });
38893
- }
38894
38900
  }
38895
38901
  if (value === null) {
38896
38902
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "null" });
@@ -39071,13 +39077,13 @@ const getEnrichedColumnsWithControls = ({
39071
39077
  domEvent.preventDefault();
39072
39078
  if (key === "edit") {
39073
39079
  navigate(
39074
- `${baseprefix}/${value.cluster}${value.namespace ? `/${value.namespace}` : ""}${value.syntheticProject ? `/${value.syntheticProject}` : ""}/${value.pathPrefix}/${value.apiGroupAndVersion}/${value.typeName}/${value.entryName}?backlink=${value.backlink}`
39080
+ `${baseprefix}/${value.cluster}${value.namespace ? `/${value.namespace}` : ""}${value.syntheticProject ? `/${value.syntheticProject}` : ""}/${value.pathPrefix}/${value.apiGroupAndVersion}/${value.plural}/${value.name}?backlink=${value.backlink}`
39075
39081
  );
39076
39082
  }
39077
39083
  if (key === "delete") {
39078
39084
  value.onDeleteHandle(
39079
- value.entryName,
39080
- `${value.deletePathPrefix}/${value.apiGroupAndVersion}${value.namespace ? `/namespaces/${value.namespace}` : ""}/${value.typeName}/${value.entryName}`
39085
+ value.name,
39086
+ `${value.deletePathPrefix}/${value.apiGroupAndVersion}${value.namespace ? `/namespaces/${value.namespace}` : ""}/${value.plural}/${value.name}`
39081
39087
  );
39082
39088
  }
39083
39089
  }
@@ -39178,8 +39184,8 @@ const EnrichedTable = ({
39178
39184
  selectData.onChange(
39179
39185
  selectedRowKeys,
39180
39186
  rows.map(({ internalDataForControls }) => ({
39181
- name: internalDataForControls.entryName,
39182
- endpoint: `${internalDataForControls.deletePathPrefix}/${internalDataForControls.apiGroupAndVersion}${internalDataForControls.namespace ? `/namespaces/${internalDataForControls.namespace}` : ""}/${internalDataForControls.typeName}/${internalDataForControls.entryName}`
39187
+ name: internalDataForControls.name,
39188
+ endpoint: `${internalDataForControls.deletePathPrefix}/${internalDataForControls.apiGroupAndVersion}${internalDataForControls.namespace ? `/namespaces/${internalDataForControls.namespace}` : ""}/${internalDataForControls.plural}/${internalDataForControls.name}`
39183
39189
  }))
39184
39190
  );
39185
39191
  }
@@ -39280,8 +39286,8 @@ const prepare = ({
39280
39286
  syntheticProject: dataForControls.syntheticProject,
39281
39287
  pathPrefix: dataForControls.pathPrefix,
39282
39288
  apiGroupAndVersion: dataForControls.apiVersion,
39283
- typeName: dataForControls.typeName,
39284
- entryName: el.metadata.name,
39289
+ plural: dataForControls.plural,
39290
+ name: el.metadata.name,
39285
39291
  namespace: el.metadata.namespace || void 0,
39286
39292
  backlink: dataForControls.backlink,
39287
39293
  deletePathPrefix: dataForControls.deletePathPrefix,
@@ -39363,8 +39369,8 @@ const prepare = ({
39363
39369
  synthetichProject: dataForControls.syntheticProject,
39364
39370
  pathPrefix: dataForControls.pathPrefix,
39365
39371
  apiGroupAndVersion: dataForControls.apiVersion,
39366
- typeName: dataForControls.typeName,
39367
- entryName: el.metadata.name,
39372
+ plural: dataForControls.plural,
39373
+ name: el.metadata.name,
39368
39374
  namespace: el.metadata.namespace || void 0,
39369
39375
  backlink: dataForControls.backlink,
39370
39376
  deletePathPrefix: dataForControls.deletePathPrefix,
@@ -39409,18 +39415,18 @@ const EnrichedTableProvider = ({
39409
39415
  const [isLoading, setIsLoading] = useState(false);
39410
39416
  const [isError, setIsError] = useState(false);
39411
39417
  const updatePermission = usePermissions({
39412
- group: dataForControls?.apiGroup,
39413
- resource: dataForControls?.resource || "",
39418
+ apiGroup: dataForControls?.apiGroup,
39419
+ plural: dataForControls?.plural || "",
39414
39420
  namespace,
39415
- clusterName: cluster,
39421
+ cluster,
39416
39422
  verb: "update",
39417
39423
  refetchInterval: false
39418
39424
  });
39419
39425
  const deletePermission = usePermissions({
39420
- group: dataForControls?.apiGroup,
39421
- resource: dataForControls?.resource || "",
39426
+ apiGroup: dataForControls?.apiGroup,
39427
+ plural: dataForControls?.plural || "",
39422
39428
  namespace,
39423
- clusterName: cluster,
39429
+ cluster,
39424
39430
  verb: "delete",
39425
39431
  refetchInterval: false
39426
39432
  });
@@ -39428,7 +39434,7 @@ const EnrichedTableProvider = ({
39428
39434
  setIsError(void 0);
39429
39435
  setIsLoading(true);
39430
39436
  const payload = {
39431
- clusterName: cluster,
39437
+ cluster,
39432
39438
  customizationId,
39433
39439
  tableMappingsReplaceValues,
39434
39440
  forceDefaultAdditionalPrinterColumns,
@@ -39471,7 +39477,7 @@ const EnrichedTableProvider = ({
39471
39477
  cluster: dataForControls.cluster,
39472
39478
  syntheticProject: dataForControls.syntheticProject,
39473
39479
  pathPrefix: !dataForControls.apiGroup || dataForControls.apiGroup.length === 0 ? "forms/builtin" : "forms/apis",
39474
- typeName: dataForControls.resource,
39480
+ plural: dataForControls.plural,
39475
39481
  apiVersion: !dataForControls.apiGroup || dataForControls.apiGroup.length === 0 ? dataForControls.apiVersion : `${dataForControls.apiGroup}/${dataForControls.apiVersion}`,
39476
39482
  backlink: encodeURIComponent(fullPath),
39477
39483
  onDeleteHandle: dataForControlsInternal.onDeleteHandle,
@@ -47048,7 +47054,7 @@ const YamlEditorSingleton = ({
47048
47054
  isCreate,
47049
47055
  type,
47050
47056
  apiGroupApiVersion,
47051
- typeName,
47057
+ plural,
47052
47058
  backlink,
47053
47059
  designNewLayout,
47054
47060
  designNewLayoutHeight,
@@ -47114,7 +47120,7 @@ const YamlEditorSingleton = ({
47114
47120
  const { namespace } = currentValues.metadata;
47115
47121
  const { name } = currentValues.metadata;
47116
47122
  const body = currentValues;
47117
- const endpoint = `/api/clusters/${cluster}/k8s/${type === "builtin" ? "" : "apis/"}${apiGroupApiVersion}${isNameSpaced ? `/namespaces/${namespace}` : ""}/${typeName}/${isCreate ? "" : name}`;
47123
+ const endpoint = `/api/clusters/${cluster}/k8s/${type === "builtin" ? "" : "apis/"}${apiGroupApiVersion}${isNameSpaced ? `/namespaces/${namespace}` : ""}/${plural}/${isCreate ? "" : name}`;
47118
47124
  if (isCreate) {
47119
47125
  createNewEntry({ endpoint, body }).then((res) => {
47120
47126
  console.log(res);
@@ -47947,7 +47953,7 @@ const FormListInput = ({
47947
47953
  const onValuesChangeCallBack = useOnValuesChangeCallback();
47948
47954
  const isTouchedPeristed = useIsTouchedPersisted();
47949
47955
  const updateTouched = useUpdateIsTouchedPersisted();
47950
- const { clusterName, namespace, syntheticProject, entryName } = urlParams;
47956
+ const { cluster, namespace, syntheticProject, name: entryName } = urlParams;
47951
47957
  const form = Form.useFormInstance();
47952
47958
  const fieldValue = Form.useWatch(name === "nodeName" ? "nodeNameBecauseOfSuddenBug" : name, form);
47953
47959
  const fixedName = name === "nodeName" ? "nodeNameBecauseOfSuddenBug" : name;
@@ -48000,7 +48006,7 @@ const FormListInput = ({
48000
48006
  }, [relatedPath, form, arrName, fixedName, relatedFieldValue, onValuesChangeCallBack, isTouchedPeristed]);
48001
48007
  const uri = prepareTemplate({
48002
48008
  template: customProps.valueUri,
48003
- replaceValues: { clusterName, namespace, syntheticProject, relatedFieldValue, entryName }
48009
+ replaceValues: { cluster, namespace, syntheticProject, relatedFieldValue, name: entryName }
48004
48010
  });
48005
48011
  const {
48006
48012
  data: optionsObj,
@@ -48298,47 +48304,47 @@ const FormRangeInput = ({
48298
48304
  urlParams,
48299
48305
  onRemoveByMinus
48300
48306
  }) => {
48301
- const { clusterName, namespace, syntheticProject, entryName } = urlParams;
48307
+ const { cluster, namespace, syntheticProject, name: entryName } = urlParams;
48302
48308
  const minMaxAndStep = isEdit ? customProps.edit : customProps.add;
48303
48309
  const minValueUri = minMaxAndStep.min.type === "resourceValue" ? prepareTemplate({
48304
48310
  template: minMaxAndStep.min.valueUri,
48305
- replaceValues: { clusterName, namespace, syntheticProject, entryName }
48311
+ replaceValues: { cluster, namespace, syntheticProject, name: entryName }
48306
48312
  }) : void 0;
48307
48313
  const minSubstractFirstValueUri = minMaxAndStep.min.type === "substractResourceValues" ? prepareTemplate({
48308
48314
  template: minMaxAndStep.min.firstValueUri,
48309
- replaceValues: { clusterName, namespace, syntheticProject, entryName }
48315
+ replaceValues: { cluster, namespace, syntheticProject, name: entryName }
48310
48316
  }) : void 0;
48311
48317
  const minSubstractSecondValueUri = minMaxAndStep.min.type === "substractResourceValues" ? prepareTemplate({
48312
48318
  template: minMaxAndStep.min.secondValueUri,
48313
- replaceValues: { clusterName, namespace, syntheticProject, entryName }
48319
+ replaceValues: { cluster, namespace, syntheticProject, name: entryName }
48314
48320
  }) : void 0;
48315
48321
  const minAddFirstValueUri = minMaxAndStep.min.type === "addResourceValues" ? prepareTemplate({
48316
48322
  template: minMaxAndStep.min.firstValueUri,
48317
- replaceValues: { clusterName, namespace, syntheticProject, entryName }
48323
+ replaceValues: { cluster, namespace, syntheticProject, name: entryName }
48318
48324
  }) : void 0;
48319
48325
  const minAddSecondValueUri = minMaxAndStep.min.type === "addResourceValues" ? prepareTemplate({
48320
48326
  template: minMaxAndStep.min.secondValueUri,
48321
- replaceValues: { clusterName, namespace, syntheticProject, entryName }
48327
+ replaceValues: { cluster, namespace, syntheticProject, name: entryName }
48322
48328
  }) : void 0;
48323
48329
  const maxValueUri = minMaxAndStep.max.type === "resourceValue" ? prepareTemplate({
48324
48330
  template: minMaxAndStep.max.valueUri,
48325
- replaceValues: { clusterName, namespace, syntheticProject, entryName }
48331
+ replaceValues: { cluster, namespace, syntheticProject, name: entryName }
48326
48332
  }) : void 0;
48327
48333
  const maxSubstractFirstValueUri = minMaxAndStep.max.type === "substractResourceValues" ? prepareTemplate({
48328
48334
  template: minMaxAndStep.max.firstValueUri,
48329
- replaceValues: { clusterName, namespace, syntheticProject, entryName }
48335
+ replaceValues: { cluster, namespace, syntheticProject, name: entryName }
48330
48336
  }) : void 0;
48331
48337
  const maxSubstractSecondValueUri = minMaxAndStep.max.type === "substractResourceValues" ? prepareTemplate({
48332
48338
  template: minMaxAndStep.max.secondValueUri,
48333
- replaceValues: { clusterName, namespace, syntheticProject, entryName }
48339
+ replaceValues: { cluster, namespace, syntheticProject, name: entryName }
48334
48340
  }) : void 0;
48335
48341
  const maxAddFirstValueUri = minMaxAndStep.max.type === "addResourceValues" ? prepareTemplate({
48336
48342
  template: minMaxAndStep.max.firstValueUri,
48337
- replaceValues: { clusterName, namespace, syntheticProject, entryName }
48343
+ replaceValues: { cluster, namespace, syntheticProject, name: entryName }
48338
48344
  }) : void 0;
48339
48345
  const maxAddSecondValueUri = minMaxAndStep.max.type === "addResourceValues" ? prepareTemplate({
48340
48346
  template: minMaxAndStep.max.secondValueUri,
48341
- replaceValues: { clusterName, namespace, syntheticProject, entryName }
48347
+ replaceValues: { cluster, namespace, syntheticProject, name: entryName }
48342
48348
  }) : void 0;
48343
48349
  const {
48344
48350
  data: minValueObj,
@@ -50180,8 +50186,8 @@ const BlackholeForm = ({
50180
50186
  isCreate,
50181
50187
  type,
50182
50188
  apiGroupApiVersion,
50183
- kindName,
50184
- typeName,
50189
+ kind,
50190
+ plural,
50185
50191
  backlink,
50186
50192
  designNewLayout,
50187
50193
  designNewLayoutHeight
@@ -50216,8 +50222,8 @@ const BlackholeForm = ({
50216
50222
  const yamlToValuesAbortRef = useRef(null);
50217
50223
  const isAnyFieldFocusedRef = useRef(false);
50218
50224
  const editorUri = useMemo(
50219
- () => `inmemory://openapi-ui/${cluster}/${apiGroupApiVersion}/${type}/${typeName}/${kindName}${isCreate ? "/create" : "/edit"}.yaml`,
50220
- [cluster, apiGroupApiVersion, type, typeName, kindName, isCreate]
50225
+ () => `inmemory://openapi-ui/${cluster}/${apiGroupApiVersion}/${type}/${plural}/${kind}${isCreate ? "/create" : "/edit"}.yaml`,
50226
+ [cluster, apiGroupApiVersion, type, plural, kind, isCreate]
50221
50227
  );
50222
50228
  useEffect(() => {
50223
50229
  valuesToYamlReqId.current++;
@@ -50235,19 +50241,19 @@ const BlackholeForm = ({
50235
50241
  setYamlValues(void 0);
50236
50242
  }, [editorUri]);
50237
50243
  const createPermission = usePermissions({
50238
- group: type === "builtin" ? void 0 : urlParamsForPermissions.apiGroup ? urlParamsForPermissions.apiGroup : "",
50239
- resource: urlParamsForPermissions.typeName || "",
50244
+ apiGroup: type === "builtin" ? void 0 : urlParamsForPermissions.apiGroup ? urlParamsForPermissions.apiGroup : "",
50245
+ plural: urlParamsForPermissions.plural || "",
50240
50246
  namespace: isNameSpaced ? namespaceFromFormData : void 0,
50241
- clusterName: cluster,
50247
+ cluster,
50242
50248
  verb: "create",
50243
50249
  refetchInterval: false,
50244
50250
  enabler: isCreate === true
50245
50251
  });
50246
50252
  const updatePermission = usePermissions({
50247
- group: type === "builtin" ? void 0 : urlParamsForPermissions.apiGroup ? urlParamsForPermissions.apiGroup : "",
50248
- resource: urlParamsForPermissions.typeName || "",
50253
+ apiGroup: type === "builtin" ? void 0 : urlParamsForPermissions.apiGroup ? urlParamsForPermissions.apiGroup : "",
50254
+ plural: urlParamsForPermissions.plural || "",
50249
50255
  namespace: isNameSpaced ? namespaceFromFormData : void 0,
50250
- clusterName: cluster,
50256
+ cluster,
50251
50257
  verb: "update",
50252
50258
  refetchInterval: false,
50253
50259
  enabler: isCreate !== true
@@ -50277,7 +50283,7 @@ const BlackholeForm = ({
50277
50283
  payload
50278
50284
  ).then(({ data }) => {
50279
50285
  const body = data;
50280
- const endpoint = `/api/clusters/${cluster}/k8s/${type === "builtin" ? "" : "apis/"}${apiGroupApiVersion}${isNameSpaced ? `/namespaces/${namespace}` : ""}/${typeName}/${isCreate ? "" : name}`;
50286
+ const endpoint = `/api/clusters/${cluster}/k8s/${type === "builtin" ? "" : "apis/"}${apiGroupApiVersion}${isNameSpaced ? `/namespaces/${namespace}` : ""}/${plural}/${isCreate ? "" : name}`;
50281
50287
  if (isCreate) {
50282
50288
  createNewEntry({ endpoint, body }).then((res) => {
50283
50289
  console.log(res);
@@ -50335,7 +50341,7 @@ const BlackholeForm = ({
50335
50341
  const allValues2 = {};
50336
50342
  if (isCreate) {
50337
50343
  _$1.set(allValues2, ["apiVersion"], apiGroupApiVersion === "api/v1" ? "v1" : apiGroupApiVersion);
50338
- _$1.set(allValues2, ["kind"], kindName);
50344
+ _$1.set(allValues2, ["kind"], kind);
50339
50345
  }
50340
50346
  if (formsPrefills) {
50341
50347
  formsPrefills.spec.values.forEach(({ path, value }) => {
@@ -50355,7 +50361,7 @@ const BlackholeForm = ({
50355
50361
  }
50356
50362
  const sorted = Object.fromEntries(Object.entries(allValues2).sort(([a], [b]) => a.localeCompare(b)));
50357
50363
  return sorted;
50358
- }, [formsPrefills, prefillValueNamespaceOnly, isCreate, apiGroupApiVersion, kindName, normalizedPrefill]);
50364
+ }, [formsPrefills, prefillValueNamespaceOnly, isCreate, apiGroupApiVersion, kind, normalizedPrefill]);
50359
50365
  const prefillTemplates = useMemo(() => {
50360
50366
  const templates = [];
50361
50367
  if (formsPrefills?.spec?.values?.length) {
@@ -50726,7 +50732,7 @@ const BlackholeForm = ({
50726
50732
  return true;
50727
50733
  });
50728
50734
  setExpandedKeys([...uniqueKeys]);
50729
- }, [apiGroupApiVersion, formsPrefills, prefillValuesSchema, type, typeName]);
50735
+ }, [apiGroupApiVersion, formsPrefills, prefillValuesSchema, type, plural]);
50730
50736
  useEffect(() => {
50731
50737
  if (!initialValues) return;
50732
50738
  setProperties((prev) => {
@@ -50985,7 +50991,7 @@ const BlackholeFormProvider = ({
50985
50991
  setIsLoading(true);
50986
50992
  const payload = {
50987
50993
  data,
50988
- clusterName: cluster,
50994
+ cluster,
50989
50995
  customizationId
50990
50996
  };
50991
50997
  axios.post(`/api/clusters/${cluster}/openapi-bff/forms/formPrepare/prepareFormProps`, payload).then(({ data: data2 }) => {
@@ -51004,10 +51010,11 @@ const BlackholeFormProvider = ({
51004
51010
  expandedPaths: data2.expandedPaths || [],
51005
51011
  persistedPaths: data2.persistedPaths || [],
51006
51012
  sortPaths: data2.sortPaths,
51007
- kindName: data2.kindName || "",
51013
+ kind: data2.kind || "",
51008
51014
  formPrefills: data2.formPrefills,
51009
51015
  namespacesData: data2.namespacesData
51010
51016
  });
51017
+ setIsError(void 0);
51011
51018
  }
51012
51019
  }).catch((e) => {
51013
51020
  setIsError(e.message);
@@ -51029,7 +51036,7 @@ const BlackholeFormProvider = ({
51029
51036
  type: data.type,
51030
51037
  isNameSpaced: isNamespaced,
51031
51038
  apiGroupApiVersion: data.type === "builtin" ? "api/v1" : `${data.apiGroup}/${data.apiVersion}`,
51032
- typeName: data.typeName,
51039
+ plural: data.plural,
51033
51040
  backlink,
51034
51041
  designNewLayout,
51035
51042
  designNewLayoutHeight
@@ -51065,8 +51072,8 @@ const BlackholeFormProvider = ({
51065
51072
  type: data.type,
51066
51073
  isNameSpaced: isNamespaced ? preparedData.namespacesData : false,
51067
51074
  apiGroupApiVersion: data.type === "builtin" ? "api/v1" : `${data.apiGroup}/${data.apiVersion}`,
51068
- kindName: preparedData.kindName,
51069
- typeName: data.typeName,
51075
+ kind: preparedData.kind,
51076
+ plural: data.plural,
51070
51077
  backlink,
51071
51078
  designNewLayout,
51072
51079
  designNewLayoutHeight
@@ -51157,11 +51164,11 @@ function v4(options, buf, offset) {
51157
51164
  }
51158
51165
 
51159
51166
  const AddEditFormModal = ({
51160
- clusterName,
51167
+ cluster,
51161
51168
  baseApiGroup,
51162
51169
  baseApiVersion,
51163
- mpResourceName,
51164
- mpResourceKind,
51170
+ marketplacePlural,
51171
+ marketplaceKind,
51165
51172
  isOpen,
51166
51173
  setIsOpen,
51167
51174
  setError,
@@ -51177,7 +51184,7 @@ const AddEditFormModal = ({
51177
51184
  type: "direct",
51178
51185
  apiGroup: "",
51179
51186
  apiVersion: "",
51180
- typeName: "",
51187
+ plural: "",
51181
51188
  pathToNav: "",
51182
51189
  tags: [],
51183
51190
  disabled: false,
@@ -51186,10 +51193,10 @@ const AddEditFormModal = ({
51186
51193
  const onSubmit = (values) => {
51187
51194
  if (typeof isOpen === "boolean") {
51188
51195
  createNewEntry({
51189
- endpoint: `/api/clusters/${clusterName}/k8s/apis/${baseApiGroup}/${baseApiVersion}/${mpResourceName}`,
51196
+ endpoint: `/api/clusters/${cluster}/k8s/apis/${baseApiGroup}/${baseApiVersion}/${marketplacePlural}`,
51190
51197
  body: {
51191
51198
  apiVersion: `${baseApiGroup}/${baseApiVersion}`,
51192
- kind: mpResourceKind,
51199
+ kind: marketplaceKind,
51193
51200
  metadata: {
51194
51201
  name: v4()
51195
51202
  },
@@ -51206,10 +51213,10 @@ const AddEditFormModal = ({
51206
51213
  return;
51207
51214
  }
51208
51215
  updateEntry({
51209
- endpoint: `/api/clusters/${clusterName}/k8s/apis/${baseApiGroup}/${baseApiVersion}/${mpResourceName}/${isOpen.metadata.name}`,
51216
+ endpoint: `/api/clusters/${cluster}/k8s/apis/${baseApiGroup}/${baseApiVersion}/${marketplacePlural}/${isOpen.metadata.name}`,
51210
51217
  body: {
51211
51218
  apiVersion: `${baseApiGroup}/${baseApiVersion}`,
51212
- kind: mpResourceKind,
51219
+ kind: marketplaceKind,
51213
51220
  metadata: {
51214
51221
  name: isOpen.metadata.name,
51215
51222
  resourceVersion: isOpen.metadata.resourceVersion
@@ -51255,7 +51262,7 @@ const AddEditFormModal = ({
51255
51262
  ) }),
51256
51263
  /* @__PURE__ */ jsxRuntimeExports.jsx(Form.Item, { label: "Enter API group", name: "apiGroup", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Input, { disabled: type === "direct" || type === "built-in" }) }),
51257
51264
  /* @__PURE__ */ jsxRuntimeExports.jsx(Form.Item, { label: "Enter API version", name: "apiVersion", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Input, { disabled: type === "direct" }) }),
51258
- /* @__PURE__ */ jsxRuntimeExports.jsx(Form.Item, { label: "Enter resource type", name: "typeName", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Input, { disabled: type === "direct" }) }),
51265
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Form.Item, { label: "Enter resource type", name: "plural", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Input, { disabled: type === "direct" }) }),
51259
51266
  /* @__PURE__ */ jsxRuntimeExports.jsx(Form.Item, { label: "Enter path", name: "pathToNav", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Input, { disabled: type !== "direct" }) }),
51260
51267
  /* @__PURE__ */ jsxRuntimeExports.jsx(Form.Item, { label: "Tags", name: "tags", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
51261
51268
  Select,
@@ -51274,11 +51281,11 @@ const AddEditFormModal = ({
51274
51281
  };
51275
51282
 
51276
51283
  const getPathToNav = ({
51277
- clusterName,
51284
+ cluster,
51278
51285
  namespace,
51279
51286
  type,
51280
51287
  pathToNav,
51281
- typeName,
51288
+ plural,
51282
51289
  apiGroup,
51283
51290
  apiVersion,
51284
51291
  baseprefix
@@ -51288,19 +51295,19 @@ const getPathToNav = ({
51288
51295
  return pathToNav;
51289
51296
  }
51290
51297
  if (type === "crd") {
51291
- return `/${baseprefix}/${clusterName}/${namespace}/crd-table/${apiGroup}/${apiVersion}/${apiExtensionVersion}/${typeName}`;
51298
+ return `/${baseprefix}/${cluster}/${namespace}/crd-table/${apiGroup}/${apiVersion}/${apiExtensionVersion}/${plural}`;
51292
51299
  }
51293
51300
  if (type === "nonCrd") {
51294
- return `/${baseprefix}/${clusterName}/${namespace}/api-table/${apiGroup}/${apiVersion}/${typeName}`;
51301
+ return `/${baseprefix}/${cluster}/${namespace}/api-table/${apiGroup}/${apiVersion}/${plural}`;
51295
51302
  }
51296
- return `/${baseprefix}/${clusterName}/${namespace}/builtin-table/${typeName}`;
51303
+ return `/${baseprefix}/${cluster}/${namespace}/builtin-table/${plural}`;
51297
51304
  };
51298
51305
  const getCreatePathToNav = ({
51299
- clusterName,
51306
+ cluster,
51300
51307
  namespace,
51301
51308
  type,
51302
51309
  pathToNav,
51303
- typeName,
51310
+ plural,
51304
51311
  apiGroup,
51305
51312
  apiVersion,
51306
51313
  baseprefix
@@ -51309,12 +51316,12 @@ const getCreatePathToNav = ({
51309
51316
  return pathToNav;
51310
51317
  }
51311
51318
  if (type === "crd") {
51312
- return `/${baseprefix}/${clusterName}/${namespace}/forms/crds/${apiGroup}/${apiVersion}/${typeName}?backlink=${window.location.pathname}`;
51319
+ return `/${baseprefix}/${cluster}/${namespace}/forms/crds/${apiGroup}/${apiVersion}/${plural}?backlink=${window.location.pathname}`;
51313
51320
  }
51314
51321
  if (type === "nonCrd") {
51315
- return `/${baseprefix}/${clusterName}/${namespace}/forms/apis/${apiGroup}/${apiVersion}/${typeName}?backlink=${window.location.pathname}`;
51322
+ return `/${baseprefix}/${cluster}/${namespace}/forms/apis/${apiGroup}/${apiVersion}/${plural}?backlink=${window.location.pathname}`;
51316
51323
  }
51317
- return `/${baseprefix}/${clusterName}/${namespace}/forms/builtin/${apiVersion}/${typeName}?backlink=${window.location.pathname}`;
51324
+ return `/${baseprefix}/${cluster}/${namespace}/forms/builtin/${apiVersion}/${plural}?backlink=${window.location.pathname}`;
51318
51325
  };
51319
51326
 
51320
51327
  const CustomCard$4 = styled(Card$1)`
@@ -51404,11 +51411,11 @@ const MarketplaceCard = ({
51404
51411
  description,
51405
51412
  name,
51406
51413
  icon,
51407
- clusterName,
51414
+ cluster,
51408
51415
  namespace,
51409
51416
  type,
51410
51417
  pathToNav,
51411
- typeName,
51418
+ plural,
51412
51419
  apiGroup,
51413
51420
  apiVersion,
51414
51421
  tags,
@@ -51430,29 +51437,29 @@ const MarketplaceCard = ({
51430
51437
  decodedIcon = "Can't decode";
51431
51438
  }
51432
51439
  const navigateUrl = addedMode || standalone ? getPathToNav({
51433
- clusterName,
51440
+ cluster,
51434
51441
  namespace,
51435
51442
  type,
51436
51443
  pathToNav,
51437
- typeName,
51444
+ plural,
51438
51445
  apiGroup,
51439
51446
  apiVersion,
51440
51447
  baseprefix
51441
51448
  }) : getCreatePathToNav({
51442
- clusterName,
51449
+ cluster,
51443
51450
  namespace,
51444
51451
  type,
51445
51452
  pathToNav,
51446
- typeName,
51453
+ plural,
51447
51454
  apiGroup,
51448
51455
  apiVersion,
51449
51456
  baseprefix
51450
51457
  });
51451
51458
  const { data: k8sList, error: k8sListError } = useK8sSmartResource({
51452
- cluster: clusterName || "",
51459
+ cluster,
51453
51460
  namespace,
51454
- group: apiGroup,
51455
- version: apiVersion || "",
51461
+ apiGroup,
51462
+ apiVersion: apiVersion || "",
51456
51463
  plural: type,
51457
51464
  isEnabled: Boolean(apiVersion && addedMode && type !== "direct")
51458
51465
  });
@@ -51563,12 +51570,12 @@ const Styled$c = {
51563
51570
  };
51564
51571
 
51565
51572
  const MarketPlace = ({
51566
- clusterName,
51573
+ cluster,
51567
51574
  namespace,
51568
51575
  baseApiGroup,
51569
51576
  baseApiVersion,
51570
- mpResourceName,
51571
- mpResourceKind,
51577
+ marketplacePlural,
51578
+ marketplaceKind,
51572
51579
  baseprefix,
51573
51580
  standalone,
51574
51581
  forceAddedMode,
@@ -51589,30 +51596,29 @@ const MarketPlace = ({
51589
51596
  isLoading,
51590
51597
  error
51591
51598
  } = useK8sSmartResource({
51592
- cluster: clusterName || "",
51593
- group: baseApiGroup,
51594
- version: baseApiVersion,
51595
- plural: mpResourceName,
51596
- isEnabled: Boolean(clusterName !== void 0)
51599
+ cluster,
51600
+ apiGroup: baseApiGroup,
51601
+ apiVersion: baseApiVersion,
51602
+ plural: marketplacePlural
51597
51603
  });
51598
51604
  const createPermission = usePermissions({
51599
- group: baseApiGroup,
51600
- resource: mpResourceName,
51601
- clusterName: clusterName || "",
51605
+ apiGroup: baseApiGroup,
51606
+ plural: marketplacePlural,
51607
+ cluster,
51602
51608
  verb: "create",
51603
51609
  refetchInterval: false
51604
51610
  });
51605
51611
  const updatePermission = usePermissions({
51606
- group: baseApiGroup,
51607
- resource: mpResourceName,
51608
- clusterName: clusterName || "",
51612
+ apiGroup: baseApiGroup,
51613
+ plural: marketplacePlural,
51614
+ cluster,
51609
51615
  verb: "update",
51610
51616
  refetchInterval: false
51611
51617
  });
51612
51618
  const deletePermission = usePermissions({
51613
- group: baseApiGroup,
51614
- resource: mpResourceName,
51615
- clusterName: clusterName || "",
51619
+ apiGroup: baseApiGroup,
51620
+ plural: marketplacePlural,
51621
+ cluster,
51616
51622
  verb: "delete",
51617
51623
  refetchInterval: false
51618
51624
  });
@@ -51699,8 +51705,8 @@ const MarketPlace = ({
51699
51705
  }
51700
51706
  ),
51701
51707
  /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: 22, wrap: true, children: [
51702
- clusterName && namespace && filteredAndSortedData.map(
51703
- ({ name, description, icon, type, pathToNav, typeName, apiGroup, apiVersion, tags, disabled }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
51708
+ namespace && filteredAndSortedData.map(
51709
+ ({ name, description, icon, type, pathToNav, plural, apiGroup, apiVersion, tags, disabled }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
51704
51710
  MarketplaceCard,
51705
51711
  {
51706
51712
  baseprefix,
@@ -51709,11 +51715,11 @@ const MarketPlace = ({
51709
51715
  icon,
51710
51716
  isEditMode,
51711
51717
  name,
51712
- clusterName,
51718
+ cluster,
51713
51719
  namespace,
51714
51720
  type,
51715
51721
  pathToNav,
51716
- typeName,
51722
+ plural,
51717
51723
  apiGroup,
51718
51724
  apiVersion,
51719
51725
  tags,
@@ -51743,11 +51749,11 @@ const MarketPlace = ({
51743
51749
  isAddEditOpen && /* @__PURE__ */ jsxRuntimeExports.jsx(
51744
51750
  AddEditFormModal,
51745
51751
  {
51746
- clusterName,
51752
+ cluster,
51747
51753
  baseApiGroup,
51748
51754
  baseApiVersion,
51749
- mpResourceName,
51750
- mpResourceKind,
51755
+ marketplacePlural,
51756
+ marketplaceKind,
51751
51757
  isOpen: isAddEditOpen,
51752
51758
  setError: setCreateUpdateError,
51753
51759
  setIsOpen: setIsAddEditOpen,
@@ -51760,7 +51766,7 @@ const MarketPlace = ({
51760
51766
  {
51761
51767
  name: isDeleteOpen.name,
51762
51768
  onClose: () => setIsDeleteOpen(false),
51763
- endpoint: `/api/clusters/${clusterName}/k8s/apis/${baseApiGroup}/${baseApiVersion}/${mpResourceName}/${isDeleteOpen.name}`
51769
+ endpoint: `/api/clusters/${cluster}/k8s/apis/${baseApiGroup}/${baseApiVersion}/${marketplacePlural}/${isDeleteOpen.name}`
51764
51770
  }
51765
51771
  )
51766
51772
  ] });
@@ -51879,14 +51885,14 @@ const Styled$b = {
51879
51885
  ActionMenuPlaceholder};
51880
51886
 
51881
51887
  const ProjectInfoCard = ({
51882
- clusterName,
51888
+ cluster,
51883
51889
  namespace,
51884
51890
  baseApiGroup,
51885
51891
  baseApiVersion,
51886
51892
  baseProjectApiGroup,
51887
51893
  baseProjectVersion,
51888
- mpResourceName,
51889
- projectResourceName,
51894
+ marketplacePlural,
51895
+ projectPlural,
51890
51896
  baseprefix,
51891
51897
  accessGroups,
51892
51898
  showZeroResources,
@@ -51898,45 +51904,43 @@ const ProjectInfoCard = ({
51898
51904
  isLoading: marketplaceIsLoading
51899
51905
  // error: marketplaceError,
51900
51906
  } = useK8sSmartResource({
51901
- cluster: clusterName || "",
51902
- group: baseApiGroup,
51903
- version: baseApiVersion,
51904
- plural: mpResourceName,
51905
- isEnabled: Boolean(clusterName !== void 0)
51907
+ cluster,
51908
+ apiGroup: baseApiGroup,
51909
+ apiVersion: baseApiVersion,
51910
+ plural: marketplacePlural
51906
51911
  });
51907
51912
  const {
51908
51913
  data: projectArr,
51909
51914
  isLoading,
51910
51915
  error
51911
51916
  } = useK8sSmartResource({
51912
- cluster: clusterName || "",
51913
- group: baseProjectApiGroup,
51914
- version: baseProjectVersion,
51915
- plural: projectResourceName,
51916
- fieldSelector: `metadata.name=${namespace}`,
51917
- isEnabled: Boolean(clusterName !== void 0)
51917
+ cluster,
51918
+ apiGroup: baseProjectApiGroup,
51919
+ apiVersion: baseProjectVersion,
51920
+ plural: projectPlural,
51921
+ fieldSelector: `metadata.name=${namespace}`
51918
51922
  });
51919
51923
  const project = projectArr && projectArr.items && projectArr.items.length > 0 ? projectArr.items[0] : void 0;
51920
51924
  const [isDeleteModalOpen, setIsDeleteModalOpen] = useState(false);
51921
51925
  const updatePermission = usePermissions({
51922
- group: baseProjectApiGroup,
51923
- resource: projectResourceName,
51924
- clusterName: clusterName || "",
51926
+ apiGroup: baseProjectApiGroup,
51927
+ plural: projectPlural,
51928
+ cluster,
51925
51929
  verb: "update",
51926
51930
  refetchInterval: false
51927
51931
  });
51928
51932
  const deletePermission = usePermissions({
51929
- group: baseProjectApiGroup,
51930
- resource: projectResourceName,
51931
- clusterName: clusterName || "",
51933
+ apiGroup: baseProjectApiGroup,
51934
+ plural: projectPlural,
51935
+ cluster,
51932
51936
  verb: "delete",
51933
51937
  refetchInterval: false
51934
51938
  });
51935
51939
  const openUpdate = useCallback(() => {
51936
51940
  navigate(
51937
- `/${baseprefix}/${clusterName}/forms/apis/${baseProjectApiGroup}/${baseProjectVersion}/${projectResourceName}/${namespace}?backlink=${baseprefix}/clusters/${clusterName}`
51941
+ `/${baseprefix}/${cluster}/forms/apis/${baseProjectApiGroup}/${baseProjectVersion}/${projectPlural}/${namespace}?backlink=${baseprefix}/clusters/${cluster}`
51938
51942
  );
51939
- }, [baseprefix, clusterName, namespace, baseProjectApiGroup, baseProjectVersion, projectResourceName, navigate]);
51943
+ }, [baseprefix, cluster, namespace, baseProjectApiGroup, baseProjectVersion, projectPlural, navigate]);
51940
51944
  if (isLoading) {
51941
51945
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, {});
51942
51946
  }
@@ -51965,7 +51969,7 @@ const ProjectInfoCard = ({
51965
51969
  /* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 12, $samespace: true }),
51966
51970
  /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: 22, wrap: true, children: [
51967
51971
  marketplaceIsLoading && /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, {}),
51968
- clusterName && namespace && marketplacePanels?.items.map(({ spec }) => spec).sort().map(({ name, description, icon, type, pathToNav, typeName, apiGroup, apiVersion, tags, disabled }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
51972
+ namespace && marketplacePanels?.items.map(({ spec }) => spec).sort().map(({ name, description, icon, type, pathToNav, plural, apiGroup, apiVersion, tags, disabled }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
51969
51973
  MarketplaceCard,
51970
51974
  {
51971
51975
  baseprefix,
@@ -51974,11 +51978,11 @@ const ProjectInfoCard = ({
51974
51978
  icon,
51975
51979
  isEditMode: false,
51976
51980
  name,
51977
- clusterName,
51981
+ cluster,
51978
51982
  namespace,
51979
51983
  type,
51980
51984
  pathToNav,
51981
- typeName,
51985
+ plural,
51982
51986
  apiGroup,
51983
51987
  apiVersion,
51984
51988
  tags,
@@ -51994,9 +51998,9 @@ const ProjectInfoCard = ({
51994
51998
  name: project.metadata.name,
51995
51999
  onClose: () => {
51996
52000
  setIsDeleteModalOpen(false);
51997
- navigate(`${baseprefix}/clusters/${clusterName}`);
52001
+ navigate(`${baseprefix}/clusters/${cluster}`);
51998
52002
  },
51999
- endpoint: `/api/clusters/${clusterName}/k8s/apis/${baseProjectApiGroup}/${baseProjectVersion}/${projectResourceName}/${project.metadata.name}`
52003
+ endpoint: `/api/clusters/${cluster}/k8s/apis/${baseProjectApiGroup}/${baseProjectVersion}/${projectPlural}/${project.metadata.name}`
52000
52004
  }
52001
52005
  )
52002
52006
  ] });
@@ -53539,14 +53543,14 @@ const Events = ({
53539
53543
  baseFactoryNamespacedBuiltinKey,
53540
53544
  baseFactoryClusterSceopedBuiltinKey,
53541
53545
  baseNamespaceFactoryKey,
53542
- baseNavigationPluralName,
53543
- baseNavigationSpecificName
53546
+ baseNavigationPlural,
53547
+ baseNavigationName
53544
53548
  }) => {
53545
53549
  const { token } = theme.useToken();
53546
53550
  const [kindIndex, setKindIndex] = useState();
53547
53551
  const [kindsWithVersion, setKindWithVersion] = useState();
53548
53552
  useEffect(() => {
53549
- getKinds({ clusterName: cluster }).then((data) => {
53553
+ getKinds({ cluster }).then((data) => {
53550
53554
  setKindIndex(data);
53551
53555
  setKindWithVersion(getSortedKindsAll(data));
53552
53556
  }).catch((error) => {
@@ -53555,10 +53559,10 @@ const Events = ({
53555
53559
  }, [cluster]);
53556
53560
  const { data: navigationDataArr } = useK8sSmartResource({
53557
53561
  cluster,
53558
- group: "front.in-cloud.io",
53559
- version: "v1alpha1",
53560
- plural: baseNavigationPluralName,
53561
- fieldSelector: `metadata.name=${baseNavigationSpecificName}`
53562
+ apiGroup: "front.in-cloud.io",
53563
+ apiVersion: "v1alpha1",
53564
+ plural: baseNavigationPlural,
53565
+ fieldSelector: `metadata.name=${baseNavigationName}`
53562
53566
  });
53563
53567
  const [isPaused, setIsPaused] = useState(false);
53564
53568
  const pausedRef = useRef(isPaused);
@@ -53902,44 +53906,44 @@ const getBuiltinTreeData = (apis) => {
53902
53906
  };
53903
53907
 
53904
53908
  const filterIfApiInstanceNamespaceScoped = async ({
53909
+ cluster,
53905
53910
  namespace,
53906
- data,
53907
53911
  apiGroup,
53908
53912
  apiVersion,
53909
- clusterName
53913
+ data
53910
53914
  }) => {
53911
53915
  const payload = {
53916
+ cluster,
53912
53917
  namespace,
53913
- data,
53914
53918
  apiGroup,
53915
53919
  apiVersion,
53916
- clusterName
53920
+ data
53917
53921
  };
53918
53922
  const result = await axios.post(
53919
- `/api/clusters/${clusterName}/openapi-bff/scopes/filterScopes/filterIfApiNamespaceScoped`,
53923
+ `/api/clusters/${cluster}/openapi-bff/scopes/filterScopes/filterIfApiNamespaceScoped`,
53920
53924
  payload
53921
53925
  );
53922
53926
  return result.data;
53923
53927
  };
53924
53928
  const filterIfBuiltInInstanceNamespaceScoped = async ({
53929
+ cluster,
53925
53930
  namespace,
53926
- data,
53927
- clusterName
53931
+ data
53928
53932
  }) => {
53929
53933
  const payload = {
53934
+ cluster,
53930
53935
  namespace,
53931
- data,
53932
- clusterName
53936
+ data
53933
53937
  };
53934
53938
  const result = await axios.post(
53935
- `/api/clusters/${clusterName}/openapi-bff/scopes/filterScopes/filterIfBuiltInNamespaceScoped`,
53939
+ `/api/clusters/${cluster}/openapi-bff/scopes/filterScopes/filterIfBuiltInNamespaceScoped`,
53936
53940
  payload
53937
53941
  );
53938
53942
  return result.data;
53939
53943
  };
53940
53944
 
53941
53945
  const getGroupsByCategory = async ({
53942
- clusterName,
53946
+ cluster,
53943
53947
  apiGroupListData,
53944
53948
  builtinResourceTypesData,
53945
53949
  namespace,
@@ -53951,7 +53955,7 @@ const getGroupsByCategory = async ({
53951
53955
  const filteredBuiltinData = await filterIfBuiltInInstanceNamespaceScoped({
53952
53956
  namespace,
53953
53957
  data: builtinResourceTypesData,
53954
- clusterName
53958
+ cluster
53955
53959
  });
53956
53960
  return { crdGroups, nonCrdGroups, builtinGroups: filteredBuiltinData, apiExtensionVersion };
53957
53961
  };
@@ -54066,12 +54070,12 @@ const getClusterList = async () => {
54066
54070
  };
54067
54071
 
54068
54072
  const getApiResources = async ({
54069
- clusterName,
54073
+ cluster,
54070
54074
  namespace,
54071
54075
  apiGroup,
54072
54076
  apiVersion,
54073
- typeName,
54074
- specificName,
54077
+ plural,
54078
+ name,
54075
54079
  labels,
54076
54080
  fields,
54077
54081
  limit
@@ -54088,27 +54092,27 @@ const getApiResources = async ({
54088
54092
  }
54089
54093
  const searchParams = params.toString();
54090
54094
  return axios.get(
54091
- `/api/clusters/${clusterName}/k8s/apis/${apiGroup}/${apiVersion}${namespace ? `/namespaces/${namespace}` : ""}/${typeName}${specificName ? `/${specificName}` : ""}${searchParams.length > 0 ? `?${searchParams}` : ""}`
54095
+ `/api/clusters/${cluster}/k8s/apis/${apiGroup}/${apiVersion}${namespace ? `/namespaces/${namespace}` : ""}/${plural}${name ? `/${name}` : ""}${searchParams.length > 0 ? `?${searchParams}` : ""}`
54092
54096
  );
54093
54097
  };
54094
54098
  const getApiResourceSingle = async ({
54095
- clusterName,
54099
+ cluster,
54096
54100
  namespace,
54097
54101
  apiGroup,
54098
54102
  apiVersion,
54099
- typeName,
54100
- entryName
54103
+ plural,
54104
+ name
54101
54105
  }) => {
54102
54106
  return axios.get(
54103
- `/api/clusters/${clusterName}/k8s/apis/${apiGroup}/${apiVersion}${namespace ? `/namespaces/${namespace}` : ""}/${typeName}/${entryName}`
54107
+ `/api/clusters/${cluster}/k8s/apis/${apiGroup}/${apiVersion}${namespace ? `/namespaces/${namespace}` : ""}/${plural}/${name}`
54104
54108
  );
54105
54109
  };
54106
54110
 
54107
54111
  const getBuiltinResources = async ({
54108
- clusterName,
54112
+ cluster,
54109
54113
  namespace,
54110
- typeName,
54111
- specificName,
54114
+ plural,
54115
+ name,
54112
54116
  labels,
54113
54117
  fields,
54114
54118
  limit
@@ -54125,105 +54129,101 @@ const getBuiltinResources = async ({
54125
54129
  }
54126
54130
  const searchParams = params.toString();
54127
54131
  return axios.get(
54128
- `/api/clusters/${clusterName}/k8s/api/v1${namespace ? `/namespaces/${namespace}` : ""}/${typeName}${specificName ? `/${specificName}` : ""}${searchParams.length > 0 ? `?${searchParams}` : ""}`
54132
+ `/api/clusters/${cluster}/k8s/api/v1${namespace ? `/namespaces/${namespace}` : ""}/${plural}${name ? `/${name}` : ""}${searchParams.length > 0 ? `?${searchParams}` : ""}`
54129
54133
  );
54130
54134
  };
54131
54135
  const getBuiltinResourceSingle = async ({
54132
- clusterName,
54136
+ cluster,
54133
54137
  namespace,
54134
- typeName,
54135
- entryName
54138
+ plural,
54139
+ name
54136
54140
  }) => {
54137
54141
  return axios.get(
54138
- `/api/clusters/${clusterName}/k8s/api/v1${namespace ? `/namespaces/${namespace}` : ""}/${typeName}/${entryName}`
54142
+ `/api/clusters/${cluster}/k8s/api/v1${namespace ? `/namespaces/${namespace}` : ""}/${plural}/${name}`
54139
54143
  );
54140
54144
  };
54141
54145
 
54142
54146
  const getCrdResources = async ({
54143
- clusterName,
54147
+ cluster,
54144
54148
  namespace,
54145
54149
  apiGroup,
54146
54150
  apiVersion,
54147
54151
  crdName
54148
54152
  }) => {
54149
54153
  return axios.get(
54150
- `/api/clusters/${clusterName}/k8s/apis/${apiGroup}/${apiVersion}${namespace ? `/namespaces/${namespace}` : ""}/${crdName}`
54154
+ `/api/clusters/${cluster}/k8s/apis/${apiGroup}/${apiVersion}${namespace ? `/namespaces/${namespace}` : ""}/${crdName}`
54151
54155
  );
54152
54156
  };
54153
54157
  const getCrdResourceSingle = async ({
54154
- clusterName,
54158
+ cluster,
54155
54159
  namespace,
54156
54160
  apiGroup,
54157
54161
  apiVersion,
54158
54162
  crdName,
54159
- entryName
54163
+ name
54160
54164
  }) => {
54161
54165
  return axios.get(
54162
- `/api/clusters/${clusterName}/k8s/apis/${apiGroup}/${apiVersion}${namespace ? `/namespaces/${namespace}` : ""}/${crdName}/${entryName}`
54166
+ `/api/clusters/${cluster}/k8s/apis/${apiGroup}/${apiVersion}${namespace ? `/namespaces/${namespace}` : ""}/${crdName}/${name}`
54163
54167
  );
54164
54168
  };
54165
54169
 
54166
- const getApiResourceTypes = async ({ clusterName }) => {
54167
- return axios.get(`/api/clusters/${clusterName}/k8s/apis/`);
54170
+ const getApiResourceTypes = async ({ cluster }) => {
54171
+ return axios.get(`/api/clusters/${cluster}/k8s/apis/`);
54168
54172
  };
54169
54173
  const getApiResourceTypesByApiGroup = async ({
54170
- clusterName,
54174
+ cluster,
54171
54175
  apiGroup,
54172
54176
  apiVersion
54173
54177
  }) => {
54174
- return axios.get(`/api/clusters/${clusterName}/k8s/apis/${apiGroup}/${apiVersion}/`);
54178
+ return axios.get(`/api/clusters/${cluster}/k8s/apis/${apiGroup}/${apiVersion}/`);
54175
54179
  };
54176
54180
 
54177
- const getBuiltinResourceTypes = async ({
54178
- clusterName
54179
- }) => {
54180
- return axios.get(`/api/clusters/${clusterName}/k8s/api/v1`);
54181
+ const getBuiltinResourceTypes = async ({ cluster }) => {
54182
+ return axios.get(`/api/clusters/${cluster}/k8s/api/v1`);
54181
54183
  };
54182
54184
 
54183
54185
  const getCrdData = async ({
54184
- clusterName,
54186
+ cluster,
54185
54187
  apiExtensionVersion,
54186
54188
  crdName
54187
54189
  }) => {
54188
54190
  return axios.get(
54189
- `/api/clusters/${clusterName}/k8s/apis/apiextensions.k8s.io/${apiExtensionVersion}/customresourcedefinitions/${crdName}`
54191
+ `/api/clusters/${cluster}/k8s/apis/apiextensions.k8s.io/${apiExtensionVersion}/customresourcedefinitions/${crdName}`
54190
54192
  );
54191
54193
  };
54192
54194
 
54193
- const getSwagger = async ({
54194
- clusterName
54195
- }) => {
54196
- return axios.get(`/api/clusters/${clusterName}/openapi-bff/swagger/swagger/${clusterName}`);
54195
+ const getSwagger = async ({ cluster }) => {
54196
+ return axios.get(`/api/clusters/${cluster}/openapi-bff/swagger/swagger/${cluster}`);
54197
54197
  };
54198
54198
 
54199
54199
  const checkIfApiInstanceNamespaceScoped = async ({
54200
- typeName,
54200
+ plural,
54201
54201
  apiGroup,
54202
54202
  apiVersion,
54203
- clusterName
54203
+ cluster
54204
54204
  }) => {
54205
54205
  const payload = {
54206
- typeName,
54206
+ plural,
54207
54207
  apiGroup,
54208
54208
  apiVersion,
54209
- clusterName
54209
+ cluster
54210
54210
  };
54211
54211
  const { data } = await axios.post(
54212
- `/api/clusters/${clusterName}/openapi-bff/scopes/checkScopes/checkIfApiNamespaceScoped`,
54212
+ `/api/clusters/${cluster}/openapi-bff/scopes/checkScopes/checkIfApiNamespaceScoped`,
54213
54213
  payload
54214
54214
  );
54215
54215
  return data;
54216
54216
  };
54217
54217
  const checkIfBuiltInInstanceNamespaceScoped = async ({
54218
- typeName,
54219
- clusterName
54218
+ plural,
54219
+ cluster
54220
54220
  }) => {
54221
54221
  const payload = {
54222
- typeName,
54223
- clusterName
54222
+ plural,
54223
+ cluster
54224
54224
  };
54225
54225
  const { data } = await axios.post(
54226
- `/api/clusters/${clusterName}/openapi-bff/scopes/checkScopes/checkIfBuiltInNamespaceScoped`,
54226
+ `/api/clusters/${cluster}/openapi-bff/scopes/checkScopes/checkIfBuiltInNamespaceScoped`,
54227
54227
  payload
54228
54228
  );
54229
54229
  return data;
@@ -54238,12 +54238,12 @@ const useClusterList = ({ refetchInterval }) => {
54238
54238
  };
54239
54239
 
54240
54240
  const useApiResources = ({
54241
- clusterName,
54241
+ cluster,
54242
54242
  namespace,
54243
54243
  apiGroup,
54244
54244
  apiVersion,
54245
- typeName,
54246
- specificName,
54245
+ plural,
54246
+ name,
54247
54247
  labels,
54248
54248
  fields,
54249
54249
  limit,
@@ -54251,26 +54251,15 @@ const useApiResources = ({
54251
54251
  isEnabled
54252
54252
  }) => {
54253
54253
  return useQuery({
54254
- queryKey: [
54255
- "useApiResources",
54256
- clusterName,
54257
- namespace,
54258
- apiGroup,
54259
- apiVersion,
54260
- typeName,
54261
- specificName,
54262
- labels,
54263
- fields,
54264
- limit
54265
- ],
54254
+ queryKey: ["useApiResources", cluster, namespace, apiGroup, apiVersion, plural, name, labels, fields, limit],
54266
54255
  queryFn: async () => {
54267
54256
  const response = await getApiResources({
54268
- clusterName,
54257
+ cluster,
54269
54258
  namespace,
54270
54259
  apiGroup,
54271
54260
  apiVersion,
54272
- typeName,
54273
- specificName,
54261
+ plural,
54262
+ name,
54274
54263
  labels,
54275
54264
  fields,
54276
54265
  limit
@@ -54286,33 +54275,33 @@ const useApiResources = ({
54286
54275
  });
54287
54276
  };
54288
54277
  const useApiResourceSingle = ({
54289
- clusterName,
54278
+ cluster,
54290
54279
  namespace,
54291
54280
  apiGroup,
54292
54281
  apiVersion,
54293
- typeName,
54294
- entryName,
54282
+ plural,
54283
+ name,
54295
54284
  refetchInterval
54296
54285
  }) => {
54297
54286
  return useQuery({
54298
- queryKey: ["useApiResourceSingle", clusterName, namespace, apiGroup, apiVersion, typeName, entryName],
54287
+ queryKey: ["useApiResourceSingle", cluster, namespace, apiGroup, apiVersion, plural, name],
54299
54288
  queryFn: async () => (await getApiResourceSingle({
54300
- clusterName,
54289
+ cluster,
54301
54290
  namespace,
54302
54291
  apiGroup,
54303
54292
  apiVersion,
54304
- typeName,
54305
- entryName
54293
+ plural,
54294
+ name
54306
54295
  })).data,
54307
54296
  refetchInterval: refetchInterval !== void 0 ? refetchInterval : 5e3
54308
54297
  });
54309
54298
  };
54310
54299
 
54311
54300
  const useBuiltinResources = ({
54312
- clusterName,
54301
+ cluster,
54313
54302
  namespace,
54314
- typeName,
54315
- specificName,
54303
+ plural,
54304
+ name,
54316
54305
  labels,
54317
54306
  fields,
54318
54307
  limit,
@@ -54320,13 +54309,13 @@ const useBuiltinResources = ({
54320
54309
  isEnabled
54321
54310
  }) => {
54322
54311
  return useQuery({
54323
- queryKey: ["useBuiltinResourceType", clusterName, namespace, typeName, specificName, labels, fields, limit],
54312
+ queryKey: ["useBuiltinResourceType", cluster, namespace, plural, name, labels, fields, limit],
54324
54313
  queryFn: async () => {
54325
54314
  const response = await getBuiltinResources({
54326
- clusterName,
54315
+ cluster,
54327
54316
  namespace,
54328
- typeName,
54329
- specificName,
54317
+ plural,
54318
+ name,
54330
54319
  labels,
54331
54320
  fields,
54332
54321
  limit
@@ -54342,21 +54331,21 @@ const useBuiltinResources = ({
54342
54331
  });
54343
54332
  };
54344
54333
  const useBuiltinResourceSingle = ({
54345
- clusterName,
54334
+ cluster,
54346
54335
  namespace,
54347
- typeName,
54348
- entryName,
54336
+ plural,
54337
+ name,
54349
54338
  refetchInterval
54350
54339
  }) => {
54351
54340
  return useQuery({
54352
- queryKey: ["useBuiltinResourceSingle", clusterName, namespace, typeName, entryName],
54353
- queryFn: async () => (await getBuiltinResourceSingle({ clusterName, namespace, typeName, entryName })).data,
54341
+ queryKey: ["useBuiltinResourceSingle", cluster, namespace, plural, name],
54342
+ queryFn: async () => (await getBuiltinResourceSingle({ cluster, namespace, plural, name })).data,
54354
54343
  refetchInterval: refetchInterval !== void 0 ? refetchInterval : 5e3
54355
54344
  });
54356
54345
  };
54357
54346
 
54358
54347
  const useCrdResources = ({
54359
- clusterName,
54348
+ cluster,
54360
54349
  namespace,
54361
54350
  apiGroup,
54362
54351
  apiVersion,
@@ -54365,10 +54354,10 @@ const useCrdResources = ({
54365
54354
  isEnabled
54366
54355
  }) => {
54367
54356
  return useQuery({
54368
- queryKey: ["useCrdResources", clusterName, namespace, apiGroup, apiVersion, crdName],
54357
+ queryKey: ["useCrdResources", cluster, namespace, apiGroup, apiVersion, crdName],
54369
54358
  queryFn: async () => {
54370
54359
  const response = await getCrdResources({
54371
- clusterName,
54360
+ cluster,
54372
54361
  namespace,
54373
54362
  apiGroup,
54374
54363
  apiVersion,
@@ -54385,33 +54374,33 @@ const useCrdResources = ({
54385
54374
  });
54386
54375
  };
54387
54376
  const useCrdResourceSingle = ({
54388
- clusterName,
54377
+ cluster,
54389
54378
  namespace,
54390
54379
  apiGroup,
54391
54380
  apiVersion,
54392
54381
  crdName,
54393
- entryName,
54382
+ name,
54394
54383
  refetchInterval
54395
54384
  }) => {
54396
54385
  return useQuery({
54397
- queryKey: ["useCrdResourceSingle", clusterName, namespace, apiGroup, apiVersion, crdName, entryName],
54386
+ queryKey: ["useCrdResourceSingle", cluster, namespace, apiGroup, apiVersion, crdName, name],
54398
54387
  queryFn: async () => (await getCrdResourceSingle({
54399
- clusterName,
54388
+ cluster,
54400
54389
  namespace,
54401
54390
  apiGroup,
54402
54391
  apiVersion,
54403
54392
  crdName,
54404
- entryName
54393
+ name
54405
54394
  })).data,
54406
54395
  refetchInterval: refetchInterval !== void 0 ? refetchInterval : 5e3
54407
54396
  });
54408
54397
  };
54409
54398
 
54410
- const useApisResourceTypes = ({ clusterName }) => {
54399
+ const useApisResourceTypes = ({ cluster }) => {
54411
54400
  return useQuery({
54412
- queryKey: ["useApisResourceTypes", clusterName],
54401
+ queryKey: ["useApisResourceTypes", cluster],
54413
54402
  queryFn: async () => {
54414
- const response = await getApiResourceTypes({ clusterName });
54403
+ const response = await getApiResourceTypes({ cluster });
54415
54404
  const data = JSON.parse(JSON.stringify(response.data));
54416
54405
  if (data.metadata?.resourceVersion) {
54417
54406
  delete data.metadata.resourceVersion;
@@ -54422,15 +54411,15 @@ const useApisResourceTypes = ({ clusterName }) => {
54422
54411
  });
54423
54412
  };
54424
54413
  const useApiResourceTypesByGroup = ({
54425
- clusterName,
54414
+ cluster,
54426
54415
  apiGroup,
54427
54416
  apiVersion
54428
54417
  }) => {
54429
54418
  return useQuery({
54430
- queryKey: ["useApiResourceTypesByGroup", clusterName, apiGroup, apiVersion],
54419
+ queryKey: ["useApiResourceTypesByGroup", cluster, apiGroup, apiVersion],
54431
54420
  queryFn: async () => {
54432
54421
  const response = await getApiResourceTypesByApiGroup({
54433
- clusterName,
54422
+ cluster,
54434
54423
  apiGroup,
54435
54424
  apiVersion
54436
54425
  });
@@ -54444,11 +54433,11 @@ const useApiResourceTypesByGroup = ({
54444
54433
  });
54445
54434
  };
54446
54435
 
54447
- const useBuiltinResourceTypes = ({ clusterName }) => {
54436
+ const useBuiltinResourceTypes = ({ cluster }) => {
54448
54437
  return useQuery({
54449
- queryKey: ["useBuiltinResourceTypes", clusterName],
54438
+ queryKey: ["useBuiltinResourceTypes", cluster],
54450
54439
  queryFn: async () => {
54451
- const response = await getBuiltinResourceTypes({ clusterName });
54440
+ const response = await getBuiltinResourceTypes({ cluster });
54452
54441
  const data = JSON.parse(JSON.stringify(response.data));
54453
54442
  if (data.metadata?.resourceVersion) {
54454
54443
  delete data.metadata.resourceVersion;
@@ -54460,15 +54449,15 @@ const useBuiltinResourceTypes = ({ clusterName }) => {
54460
54449
  };
54461
54450
 
54462
54451
  const useCrdData = ({
54463
- clusterName,
54452
+ cluster,
54464
54453
  apiExtensionVersion,
54465
54454
  crdName
54466
54455
  }) => {
54467
54456
  return useQuery({
54468
- queryKey: ["useCrdData", clusterName, apiExtensionVersion, crdName],
54457
+ queryKey: ["useCrdData", cluster, apiExtensionVersion, crdName],
54469
54458
  queryFn: async () => {
54470
54459
  const response = await getCrdData({
54471
- clusterName,
54460
+ cluster,
54472
54461
  apiExtensionVersion,
54473
54462
  crdName
54474
54463
  });