@cobaltcore-dev/aurora 0.18.0 → 0.19.1

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 (119) hide show
  1. package/dist/client/App.d.ts +12 -0
  2. package/dist/client/{BucketToastNotifications-D2Cq2VrV.mjs → BucketToastNotifications-BGd2wVmh.mjs} +2 -2
  3. package/dist/client/{BucketToastNotifications-D2Cq2VrV.mjs.map → BucketToastNotifications-BGd2wVmh.mjs.map} +1 -1
  4. package/dist/client/DeletePcaModal-BU6kbKsw.mjs +80 -0
  5. package/dist/client/DeletePcaModal-BU6kbKsw.mjs.map +1 -0
  6. package/dist/client/DetailsInfo-BUyuYpJj.mjs +52 -0
  7. package/dist/client/DetailsInfo-BUyuYpJj.mjs.map +1 -0
  8. package/dist/client/{FloatingIpActionModals-sJlSFIsK.mjs → FloatingIpActionModals-DAtZoYGS.mjs} +22 -22
  9. package/dist/client/{FloatingIpActionModals-sJlSFIsK.mjs.map → FloatingIpActionModals-DAtZoYGS.mjs.map} +1 -1
  10. package/dist/client/{ImageToastNotifications-CISH3c_d.mjs → ImageToastNotifications-BhjU1bfT.mjs} +7 -7
  11. package/dist/client/{ImageToastNotifications-CISH3c_d.mjs.map → ImageToastNotifications-BhjU1bfT.mjs.map} +1 -1
  12. package/dist/client/{_flavorId-Cx5tf2KQ.mjs → _flavorId-BQY7YhNx.mjs} +2 -2
  13. package/dist/client/{_flavorId-Cx5tf2KQ.mjs.map → _flavorId-BQY7YhNx.mjs.map} +1 -1
  14. package/dist/client/{_flavorId-C6RJfhh8.mjs → _flavorId-sS1sg_DZ.mjs} +3 -3
  15. package/dist/client/{_flavorId-C6RJfhh8.mjs.map → _flavorId-sS1sg_DZ.mjs.map} +1 -1
  16. package/dist/client/{_floatingIpId-C4Sa8tMa.mjs → _floatingIpId-BHZGh8U8.mjs} +2 -2
  17. package/dist/client/{_floatingIpId-C4Sa8tMa.mjs.map → _floatingIpId-BHZGh8U8.mjs.map} +1 -1
  18. package/dist/client/{_floatingIpId-CAUBZ5WD2.mjs → _floatingIpId-CR3aD38l2.mjs} +5 -5
  19. package/dist/client/{_floatingIpId-CAUBZ5WD2.mjs.map → _floatingIpId-CR3aD38l2.mjs.map} +1 -1
  20. package/dist/client/{_imageId-DpXNAIbD.mjs → _imageId-Cf-Xdksv.mjs} +3 -3
  21. package/dist/client/{_imageId-DpXNAIbD.mjs.map → _imageId-Cf-Xdksv.mjs.map} +1 -1
  22. package/dist/client/_pcaId-B7j0sXnY.mjs +545 -0
  23. package/dist/client/_pcaId-B7j0sXnY.mjs.map +1 -0
  24. package/dist/client/{_projectId-fEA6fnFQ.mjs → _projectId-Cq9JnhRj.mjs} +3 -3
  25. package/dist/client/{_projectId-fEA6fnFQ.mjs.map → _projectId-Cq9JnhRj.mjs.map} +1 -1
  26. package/dist/client/{_projectId-w-tZz0FI.mjs → _projectId-D8FHe0gr.mjs} +2 -2
  27. package/dist/client/{_projectId-w-tZz0FI.mjs.map → _projectId-D8FHe0gr.mjs.map} +1 -1
  28. package/dist/client/{_projectId-qvINx3Dx.mjs → _projectId-Ig3QqYzt.mjs} +2 -2
  29. package/dist/client/{_projectId-qvINx3Dx.mjs.map → _projectId-Ig3QqYzt.mjs.map} +1 -1
  30. package/dist/client/{_projectId-BOaPmCuz.mjs → _projectId-b4NGeECR.mjs} +3 -3
  31. package/dist/client/{_projectId-BOaPmCuz.mjs.map → _projectId-b4NGeECR.mjs.map} +1 -1
  32. package/dist/client/{_securityGroupId-B6_lD8ry.mjs → _securityGroupId-BVSsCus9.mjs} +2 -2
  33. package/dist/client/{_securityGroupId-B6_lD8ry.mjs.map → _securityGroupId-BVSsCus9.mjs.map} +1 -1
  34. package/dist/client/{_securityGroupId-D9FHSkNU.mjs → _securityGroupId-gwV4eB0s.mjs} +16 -16
  35. package/dist/client/{_securityGroupId-D9FHSkNU.mjs.map → _securityGroupId-gwV4eB0s.mjs.map} +1 -1
  36. package/dist/client/{_storageType-ZFnIALny.mjs → _storageType-CH2khFcZ.mjs} +2 -2
  37. package/dist/client/{_storageType-ZFnIALny.mjs.map → _storageType-CH2khFcZ.mjs.map} +1 -1
  38. package/dist/client/{_storageType-MgntkZb6.mjs → _storageType-D-1H6SX1.mjs} +856 -856
  39. package/dist/client/{_storageType-MgntkZb6.mjs.map → _storageType-D-1H6SX1.mjs.map} +1 -1
  40. package/dist/client/analytics/setupRouterAnalytics.d.ts +20 -0
  41. package/dist/client/assets/__mocks__/svgMock.d.ts +3 -0
  42. package/dist/client/build-DgeVmENN.mjs.map +1 -1
  43. package/dist/client/components/Auth/SessionExpirationTimer.d.ts +4 -0
  44. package/dist/client/components/ClipboardText.d.ts +10 -0
  45. package/dist/client/components/ContentHeader/ContentHeader.d.ts +10 -0
  46. package/dist/client/components/Error/RouteError.d.ts +9 -0
  47. package/dist/client/components/Error/StatusError.d.ts +11 -0
  48. package/dist/client/components/JsonEditor.d.ts +39 -0
  49. package/dist/client/components/ListToolbar/FiltersInput.d.ts +6 -0
  50. package/dist/client/components/ListToolbar/SelectedFilters.d.ts +24 -0
  51. package/dist/client/components/ListToolbar/SortInput.d.ts +11 -0
  52. package/dist/client/components/ListToolbar/index.d.ts +26 -0
  53. package/dist/client/components/ListToolbar/types.d.ts +116 -0
  54. package/dist/client/components/ProjectView/ProjectInfoBox.d.ts +12 -0
  55. package/dist/client/components/Slot.d.ts +7 -0
  56. package/dist/client/components/navigation/LanguageSelect.d.ts +3 -0
  57. package/dist/client/components/navigation/MainNavigation.d.ts +10 -0
  58. package/dist/client/components/navigation/UserMenu.d.ts +1 -0
  59. package/dist/client/components/navigation/types.d.ts +4 -0
  60. package/dist/client/{floatingips-DOGKGGkC.mjs → floatingips-DyBEotB8.mjs} +10 -10
  61. package/dist/client/{floatingips-DOGKGGkC.mjs.map → floatingips-DyBEotB8.mjs.map} +1 -1
  62. package/dist/client/hooks/index.d.ts +15 -0
  63. package/dist/client/hooks/useDomainId.d.ts +21 -0
  64. package/dist/client/hooks/useModalTracking.d.ts +33 -0
  65. package/dist/client/hooks/useProjectId.d.ts +22 -0
  66. package/dist/client/hooks-iGiEkLTp.mjs +12 -0
  67. package/dist/client/hooks-iGiEkLTp.mjs.map +1 -0
  68. package/dist/client/{images-B1wqMKYw.mjs → images-BklbSacK.mjs} +2 -2
  69. package/dist/client/{images-B1wqMKYw.mjs.map → images-BklbSacK.mjs.map} +1 -1
  70. package/dist/client/{images-D5UsQi8i.mjs → images-C3voJ3B1.mjs} +259 -259
  71. package/dist/client/{images-D5UsQi8i.mjs.map → images-C3voJ3B1.mjs.map} +1 -1
  72. package/dist/client/index.d.ts +2 -0
  73. package/dist/client/index.js +337 -344
  74. package/dist/client/index.js.map +1 -1
  75. package/dist/client/md-CyCflQee.mjs.map +1 -1
  76. package/dist/client/{objects-DpgXMFrG.mjs → objects-B3Z8h4RU.mjs} +2 -2
  77. package/dist/client/{objects-DpgXMFrG.mjs.map → objects-B3Z8h4RU.mjs.map} +1 -1
  78. package/dist/client/{objects-Deo1Ic1A.mjs → objects-CGOfO00N.mjs} +499 -475
  79. package/dist/client/objects-CGOfO00N.mjs.map +1 -0
  80. package/dist/client/{pca-DztTIs18.mjs → pca-72YR_Pk0.mjs} +3 -3
  81. package/dist/client/pca-72YR_Pk0.mjs.map +1 -0
  82. package/dist/client/pca-CsBx_IDO.mjs +251 -0
  83. package/dist/client/pca-CsBx_IDO.mjs.map +1 -0
  84. package/dist/client/pcaAccess-Br4kVjLQ.mjs +9 -0
  85. package/dist/client/pcaAccess-Br4kVjLQ.mjs.map +1 -0
  86. package/dist/client/router.d.ts +7 -0
  87. package/dist/client/{securitygroups-BRtHaTLm.mjs → securitygroups-8vRbXmBL.mjs} +3 -3
  88. package/dist/client/{securitygroups-BRtHaTLm.mjs.map → securitygroups-8vRbXmBL.mjs.map} +1 -1
  89. package/dist/client/store/AuthProvider.d.ts +23 -0
  90. package/dist/client/trpcClient-BxcNKnhv.mjs +65 -0
  91. package/dist/client/trpcClient-BxcNKnhv.mjs.map +1 -0
  92. package/dist/client/trpcClient.d.ts +56 -49
  93. package/dist/client/utils/buildFilterParams.d.ts +5 -0
  94. package/dist/client/utils/cn.d.ts +27 -0
  95. package/dist/client/utils/formatBytes.d.ts +40 -0
  96. package/dist/client/utils/formatFloatingIpStatus.d.ts +6 -0
  97. package/dist/client/utils/languageDetection.d.ts +11 -0
  98. package/dist/client/utils/trpcErrors.d.ts +13 -0
  99. package/dist/client/utils/useErrorTranslation.d.ts +4 -0
  100. package/dist/client/utils/useListWithFiltering.d.ts +84 -0
  101. package/dist/client/utils/useModal.d.ts +3 -0
  102. package/dist/server/index.d.ts +51 -49
  103. package/dist/server/index.js +53 -23
  104. package/package.json +4 -2
  105. package/dist/client/_pcaId-DY9GPV7t.mjs +0 -479
  106. package/dist/client/_pcaId-DY9GPV7t.mjs.map +0 -1
  107. package/dist/client/_pcaId-ldtkXsbp.mjs +0 -36
  108. package/dist/client/_pcaId-ldtkXsbp.mjs.map +0 -1
  109. package/dist/client/constants-COPE2ktv.mjs +0 -153
  110. package/dist/client/constants-COPE2ktv.mjs.map +0 -1
  111. package/dist/client/hooks-DvdvErNv.mjs +0 -2
  112. package/dist/client/objects-Deo1Ic1A.mjs.map +0 -1
  113. package/dist/client/pca-B7WldCGw.mjs +0 -202
  114. package/dist/client/pca-B7WldCGw.mjs.map +0 -1
  115. package/dist/client/pca-DztTIs18.mjs.map +0 -1
  116. package/dist/client/pcaAccess-BYUY700H.mjs +0 -9
  117. package/dist/client/pcaAccess-BYUY700H.mjs.map +0 -1
  118. package/dist/client/trpcClient-Dy_MP_Pv.mjs +0 -57
  119. package/dist/client/trpcClient-Dy_MP_Pv.mjs.map +0 -1
@@ -0,0 +1,65 @@
1
+ import { createTRPCReact as e } from "@trpc/react-query";
2
+ import { createTRPCClient as t, httpBatchLink as n, httpBatchStreamLink as r, httpLink as i, httpSubscriptionLink as a, isNonJsonSerializable as o, splitLink as s } from "@trpc/client";
3
+ //#region src/client/trpcClient.ts
4
+ var c = {
5
+ token: null,
6
+ pending: null,
7
+ async getHeaders() {
8
+ if (this.token) return { "x-csrf-token": this.token };
9
+ this.pending ||= fetch("/csrf-token").then((e) => e.json()).then(({ csrfToken: e }) => (this.token = e, this.pending = null, e)).catch((e) => (this.pending = null, console.error("Failed to fetch CSRF token:", e), null));
10
+ let e = await this.pending;
11
+ return e ? { "x-csrf-token": e } : {};
12
+ },
13
+ invalidate() {
14
+ this.token = null;
15
+ }
16
+ }, l = new Set(["storage.swift.downloadObject", "storage.ceph.objects.downloadObject"]), u = { bffEndpoint: "/polaris-bff" };
17
+ function d(e) {
18
+ u.bffEndpoint = e;
19
+ }
20
+ var f = () => [s({
21
+ condition: (e) => e.type === "subscription",
22
+ true: a({
23
+ url: u.bffEndpoint,
24
+ eventSourceOptions: async () => ({ headers: await c.getHeaders() })
25
+ }),
26
+ false: s({
27
+ condition: (e) => o(e.input),
28
+ true: i({
29
+ url: u.bffEndpoint,
30
+ async headers({ op: e }) {
31
+ let t = await c.getHeaders(), n = e.context?.headers ?? {};
32
+ return {
33
+ ...t,
34
+ ...n
35
+ };
36
+ }
37
+ }),
38
+ false: s({
39
+ condition: (e) => l.has(e.path),
40
+ true: r({
41
+ url: u.bffEndpoint,
42
+ async headers() {
43
+ return c.getHeaders();
44
+ }
45
+ }),
46
+ false: n({
47
+ url: u.bffEndpoint,
48
+ async headers() {
49
+ return c.getHeaders();
50
+ }
51
+ })
52
+ })
53
+ })
54
+ })], p = e(), m = {
55
+ react: null,
56
+ vanilla: null
57
+ }, h = new Proxy({}, { get(e, t) {
58
+ return m.react ||= p.createClient({ links: f() }), m.react[t];
59
+ } }), g = new Proxy({}, { get(e, n) {
60
+ return m.vanilla ||= t({ links: f() }), m.vanilla[n];
61
+ } });
62
+ //#endregion
63
+ export { h as i, g as n, p as r, d as t };
64
+
65
+ //# sourceMappingURL=trpcClient-BxcNKnhv.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trpcClient-BxcNKnhv.mjs","names":["createTRPCReact","createTRPCClient","httpBatchLink","httpBatchStreamLink","httpLink","splitLink","isNonJsonSerializable","httpSubscriptionLink","csrfCache","token","pending","getHeaders","fetch","then","res","json","csrfToken","catch","error","console","invalidate","invalidateCsrfToken","STREAMING_PROCEDURES","Set","config","bffEndpoint","setBffEndpoint","endpoint","getLinks","condition","op","type","true","url","eventSourceOptions","headers","false","input","csrf","extra","context","has","path","trpcReact","clients","react","vanilla","trpcReactClient","Proxy","get","_target","prop","createClient","links","trpcClient"],"sources":["../../src/client/trpcClient.ts"],"sourcesContent":["import { createTRPCReact } from \"@trpc/react-query\"\nimport type { CreateTRPCReact } from \"@trpc/react-query\"\nimport { createTRPCClient, type TRPCClient } from \"@trpc/client\"\nimport {\n httpBatchLink,\n httpBatchStreamLink,\n httpLink,\n splitLink,\n isNonJsonSerializable,\n httpSubscriptionLink,\n} from \"@trpc/client\"\nimport type { AuroraRouter } from \"../server/routers\"\n\n/** Type alias for the React tRPC client */\nexport type TrpcReact = ReturnType<typeof createTRPCReact<AuroraRouter>>\n\n/** Type alias for the vanilla tRPC client */\nexport type TrpcClient = ReturnType<typeof createTRPCClient<AuroraRouter>>\n\n/** Generic type for creating a typed React tRPC client with a custom router */\nexport type CreateTypedTrpcReact<TRouter extends AuroraRouter> = CreateTRPCReact<TRouter, unknown>\n\n/** Generic type for creating a typed vanilla tRPC client with a custom router */\nexport type CreateTypedTrpcClient<TRouter extends AuroraRouter> = TRPCClient<TRouter>\n\n// CSRF token cache with request deduplication\nconst csrfCache = {\n token: null as string | null,\n pending: null as Promise<string | null> | null,\n\n async getHeaders() {\n if (this.token) {\n return { \"x-csrf-token\": this.token }\n }\n\n // Dedupe concurrent fetches - only one request in flight at a time\n if (!this.pending) {\n this.pending = fetch(\"/csrf-token\")\n .then((res) => res.json())\n .then(({ csrfToken }) => {\n this.token = csrfToken\n this.pending = null\n return csrfToken as string\n })\n .catch((error) => {\n this.pending = null\n console.error(\"Failed to fetch CSRF token:\", error)\n return null\n })\n }\n\n const token = await this.pending\n return token ? { \"x-csrf-token\": token } : {}\n },\n\n invalidate() {\n this.token = null\n },\n}\n\n/**\n * Invalidate the cached CSRF token.\n * Call this when receiving a 403 response to trigger a fresh token fetch on the next request.\n */\nexport const invalidateCsrfToken = () => csrfCache.invalidate()\n\n// Procedures that return async iterables (chunked streaming responses).\n// These are routed through httpBatchStreamLink instead of httpBatchLink.\n// Add any new streaming procedure paths here.\nconst STREAMING_PROCEDURES = new Set<string>([\"storage.swift.downloadObject\", \"storage.ceph.objects.downloadObject\"])\n\n// BFF endpoint - set once by App before any tRPC calls are made\nconst config = {\n bffEndpoint: \"/polaris-bff\",\n}\n\nexport function setBffEndpoint(endpoint: string) {\n config.bffEndpoint = endpoint\n}\n\nconst getLinks = () => [\n splitLink({\n // First check: is it a subscription?\n condition: (op) => op.type === \"subscription\",\n // Use HTTP subscription link for subscriptions (long-polling)\n true: httpSubscriptionLink({\n url: config.bffEndpoint,\n // Callback to populate headers\n eventSourceOptions: async () => {\n return { headers: await csrfCache.getHeaders() }\n },\n }),\n // For non-subscriptions, check for non-JSON data or streaming procedures\n false: splitLink({\n // Non-JSON serializable input (FormData, Blob, ArrayBuffer, etc.) → plain httpLink.\n condition: (op) => isNonJsonSerializable(op.input),\n true: httpLink({\n url: config.bffEndpoint,\n async headers({ op }) {\n const csrf = await csrfCache.getHeaders()\n // Per-request headers can be injected via tRPC operation context.\n // op.context is set by the caller and forwarded through the link chain.\n const extra = (op.context as { headers?: Record<string, string> } | undefined)?.headers ?? {}\n return { ...csrf, ...extra }\n },\n }),\n // For JSON procedures, decide between streaming and regular batching\n false: splitLink({\n // Procedures returning async iterables must use httpBatchStreamLink.\n // httpBatchLink buffers the full response before resolving, which\n // breaks streaming. httpBatchStreamLink preserves batching while\n // supporting chunked/streamed responses.\n // Note: httpBatchStreamLink is intentionally NOT used globally because\n // it is incompatible with the @fastify/csrf-protection cookie rotation\n // used in this app — CSRF tokens can expire mid-stream on long-lived\n // connections. Scope it only to procedures that actually need streaming.\n condition: (op) => STREAMING_PROCEDURES.has(op.path),\n true: httpBatchStreamLink({\n url: config.bffEndpoint,\n async headers() {\n return csrfCache.getHeaders()\n },\n }),\n // Regular JSON mutations/queries — standard batching\n false: httpBatchLink({\n url: config.bffEndpoint,\n async headers() {\n return csrfCache.getHeaders()\n },\n }),\n }),\n }),\n }),\n]\n\n// React Query client (for hooks like useQuery/useMutation/useSubscription)\nexport const trpcReact: TrpcReact = createTRPCReact<AuroraRouter>()\n\n// Lazy-initialized clients - created on first access after setBffEndpoint() has been called by App\nconst clients = {\n react: null as ReturnType<typeof trpcReact.createClient> | null,\n vanilla: null as TrpcClient | null,\n}\n\nexport const trpcReactClient = new Proxy({} as ReturnType<typeof trpcReact.createClient>, {\n get(_target, prop) {\n if (!clients.react) {\n clients.react = trpcReact.createClient({ links: getLinks() })\n }\n return (clients.react as Record<string | symbol, unknown>)[prop]\n },\n})\n\nexport const trpcClient: TrpcClient = new Proxy({} as TrpcClient, {\n get(_target, prop) {\n if (!clients.vanilla) {\n clients.vanilla = createTRPCClient<AuroraRouter>({ links: getLinks() })\n }\n return (clients.vanilla as Record<string | symbol, unknown>)[prop]\n },\n})\n"],"mappings":";;;AA0BA,IAAMQ,IAAY;CAChBC,OAAO;CACPC,SAAS;CAET,MAAMC,aAAAA;EACJ,IAAI,KAAKF,OACP,OAAO,EAAE,gBAAgB,KAAKA,MAAM;EAItC,AACE,KAAKC,YAAUE,MAAM,aAAA,EAClBC,MAAMC,MAAQA,EAAIC,KAAI,CAAA,EACtBF,MAAM,EAAEG,oBACP,KAAKP,QAAQO,GACb,KAAKN,UAAU,MACRM,EACT,EACCC,OAAOC,OACN,KAAKR,UAAU,MACfS,QAAQD,MAAM,+BAA+BA,CAAAA,GACtC,KACT;EAGJ,IAAMT,IAAQ,MAAM,KAAKC;EACzB,OAAOD,IAAQ,EAAE,gBAAgBA,EAAM,IAAI,CAAC;CAC9C;CAEAW,aAAAA;EACE,KAAKX,QAAQ;CACf;AACF,GAWMa,IAAuB,IAAIC,IAAY,CAAC,gCAAgC,qCAAA,CAAsC,GAG9GC,IAAS,EACbC,aAAa,eACf;AAEA,SAAgBC,EAAeC,GAAgB;CAC7CH,EAAOC,cAAcE;AACvB;AAEA,IAAMC,UAAiB,CACrBvB,EAAU;CAERwB,YAAYC,MAAOA,EAAGC,SAAS;CAE/BC,MAAMzB,EAAqB;EACzB0B,KAAKT,EAAOC;EAEZS,oBAAoB,aACX,EAAEC,SAAS,MAAM3B,EAAUG,WAAU,EAAG;CAEnD,CAAA;CAEAyB,OAAO/B,EAAU;EAEfwB,YAAYC,MAAOxB,EAAsBwB,EAAGO,KAAK;EACjDL,MAAM5B,EAAS;GACb6B,KAAKT,EAAOC;GACZ,MAAMU,QAAQ,EAAEL,SAAI;IAClB,IAAMQ,IAAO,MAAM9B,EAAUG,WAAU,GAGjC4B,IAAQ,EAAIC,SAA8DL,WAAW,CAAC;IAC5F,OAAO;KAAE,GAAGG;KAAM,GAAGC;IAAM;GAC7B;EACF,CAAA;EAEAH,OAAO/B,EAAU;GASfwB,YAAYC,MAAOR,EAAqBmB,IAAIX,EAAGY,IAAI;GACnDV,MAAM7B,EAAoB;IACxB8B,KAAKT,EAAOC;IACZ,MAAMU,UAAAA;KACJ,OAAO3B,EAAUG,WAAU;IAC7B;GACF,CAAA;GAEAyB,OAAOlC,EAAc;IACnB+B,KAAKT,EAAOC;IACZ,MAAMU,UAAAA;KACJ,OAAO3B,EAAUG,WAAU;IAC7B;GACF,CAAA;EACF,CAAA;CACF,CAAA;AACF,CAAA,CAAA,GAIWgC,IAAuB3C,EAAAA,GAG9B4C,IAAU;CACdC,OAAO;CACPC,SAAS;AACX,GAEaC,IAAkB,IAAIC,MAAM,CAAC,GAAgD,EACxFC,IAAIC,GAASC,GAAI;CAIf,OAHA,AACEP,EAAQC,UAAQF,EAAUS,aAAa,EAAEC,OAAOzB,EAAAA,EAAW,CAAA,GAEtD,EAASiB,MAA2CM;AAC7D,EACF,CAAA,GAEaG,IAAyB,IAAIN,MAAM,CAAC,GAAiB,EAChEC,IAAIC,GAASC,GAAI;CAIf,OAHA,AACEP,EAAQE,YAAU7C,EAA+B,EAAEoD,OAAOzB,EAAAA,EAAW,CAAA,GAEhE,EAASkB,QAA6CK;AAC/D,EACF,CAAA"}
@@ -9,6 +9,11 @@ export type TrpcClient = ReturnType<typeof createTRPCClient<AuroraRouter>>;
9
9
  export type CreateTypedTrpcReact<TRouter extends AuroraRouter> = CreateTRPCReact<TRouter, unknown>;
10
10
  /** Generic type for creating a typed vanilla tRPC client with a custom router */
11
11
  export type CreateTypedTrpcClient<TRouter extends AuroraRouter> = TRPCClient<TRouter>;
12
+ /**
13
+ * Invalidate the cached CSRF token.
14
+ * Call this when receiving a 403 response to trigger a fresh token fetch on the next request.
15
+ */
16
+ export declare const invalidateCsrfToken: () => void;
12
17
  export declare function setBffEndpoint(endpoint: string): void;
13
18
  export declare const trpcReact: TrpcReact;
14
19
  export declare const trpcReactClient: TRPCClient<import('@trpc/server').TRPCBuiltRouter<{
@@ -50,22 +55,25 @@ export declare const trpcReactClient: TRPCClient<import('@trpc/server').TRPCBuil
50
55
  } | undefined;
51
56
  configuration?: {
52
57
  subject: {
53
- common_name: string;
58
+ named_attributes: {
59
+ cn: string;
60
+ c?: string[] | undefined;
61
+ l?: string[] | undefined;
62
+ o?: string[] | undefined;
63
+ ou?: string[] | undefined;
64
+ postal_code?: string[] | undefined;
65
+ st?: string[] | undefined;
66
+ serial_number?: string | undefined;
67
+ street?: string[] | undefined;
68
+ };
54
69
  additional_attribute?: {
55
70
  key: number[];
56
71
  value: string;
57
72
  }[] | undefined;
58
- country?: string[] | undefined;
59
- locality?: string[] | undefined;
60
- organization?: string[] | undefined;
61
- organizational_unit?: string[] | undefined;
62
- postal_code?: string[] | undefined;
63
- province?: string[] | undefined;
64
- serial_number?: string | undefined;
65
- street_address?: string[] | undefined;
66
73
  };
67
74
  } | undefined;
68
75
  csr?: string | undefined;
76
+ display_subject?: string | undefined;
69
77
  imported_certificate_chain?: string | undefined;
70
78
  }[];
71
79
  links: {
@@ -81,19 +89,9 @@ export declare const trpcReactClient: TRPCClient<import('@trpc/server').TRPCBuil
81
89
  project_id: string;
82
90
  configuration: {
83
91
  subject: {
84
- common_name: string;
85
- additional_attribute?: {
86
- key: number[];
87
- value: string;
88
- }[] | undefined;
89
- country?: string[] | undefined;
90
- locality?: string[] | undefined;
91
- organization?: string[] | undefined;
92
- organizational_unit?: string[] | undefined;
93
- postal_code?: string[] | undefined;
94
- province?: string[] | undefined;
95
- serial_number?: string | undefined;
96
- street_address?: string[] | undefined;
92
+ named_attributes: {
93
+ cn: string;
94
+ };
97
95
  };
98
96
  };
99
97
  };
@@ -116,22 +114,25 @@ export declare const trpcReactClient: TRPCClient<import('@trpc/server').TRPCBuil
116
114
  } | undefined;
117
115
  configuration?: {
118
116
  subject: {
119
- common_name: string;
117
+ named_attributes: {
118
+ cn: string;
119
+ c?: string[] | undefined;
120
+ l?: string[] | undefined;
121
+ o?: string[] | undefined;
122
+ ou?: string[] | undefined;
123
+ postal_code?: string[] | undefined;
124
+ st?: string[] | undefined;
125
+ serial_number?: string | undefined;
126
+ street?: string[] | undefined;
127
+ };
120
128
  additional_attribute?: {
121
129
  key: number[];
122
130
  value: string;
123
131
  }[] | undefined;
124
- country?: string[] | undefined;
125
- locality?: string[] | undefined;
126
- organization?: string[] | undefined;
127
- organizational_unit?: string[] | undefined;
128
- postal_code?: string[] | undefined;
129
- province?: string[] | undefined;
130
- serial_number?: string | undefined;
131
- street_address?: string[] | undefined;
132
132
  };
133
133
  } | undefined;
134
134
  csr?: string | undefined;
135
+ display_subject?: string | undefined;
135
136
  imported_certificate_chain?: string | undefined;
136
137
  };
137
138
  meta: object;
@@ -160,22 +161,25 @@ export declare const trpcReactClient: TRPCClient<import('@trpc/server').TRPCBuil
160
161
  } | undefined;
161
162
  configuration?: {
162
163
  subject: {
163
- common_name: string;
164
+ named_attributes: {
165
+ cn: string;
166
+ c?: string[] | undefined;
167
+ l?: string[] | undefined;
168
+ o?: string[] | undefined;
169
+ ou?: string[] | undefined;
170
+ postal_code?: string[] | undefined;
171
+ st?: string[] | undefined;
172
+ serial_number?: string | undefined;
173
+ street?: string[] | undefined;
174
+ };
164
175
  additional_attribute?: {
165
176
  key: number[];
166
177
  value: string;
167
178
  }[] | undefined;
168
- country?: string[] | undefined;
169
- locality?: string[] | undefined;
170
- organization?: string[] | undefined;
171
- organizational_unit?: string[] | undefined;
172
- postal_code?: string[] | undefined;
173
- province?: string[] | undefined;
174
- serial_number?: string | undefined;
175
- street_address?: string[] | undefined;
176
179
  };
177
180
  } | undefined;
178
181
  csr?: string | undefined;
182
+ display_subject?: string | undefined;
179
183
  imported_certificate_chain?: string | undefined;
180
184
  };
181
185
  meta: object;
@@ -213,22 +217,25 @@ export declare const trpcReactClient: TRPCClient<import('@trpc/server').TRPCBuil
213
217
  } | undefined;
214
218
  configuration?: {
215
219
  subject: {
216
- common_name: string;
220
+ named_attributes: {
221
+ cn: string;
222
+ c?: string[] | undefined;
223
+ l?: string[] | undefined;
224
+ o?: string[] | undefined;
225
+ ou?: string[] | undefined;
226
+ postal_code?: string[] | undefined;
227
+ st?: string[] | undefined;
228
+ serial_number?: string | undefined;
229
+ street?: string[] | undefined;
230
+ };
217
231
  additional_attribute?: {
218
232
  key: number[];
219
233
  value: string;
220
234
  }[] | undefined;
221
- country?: string[] | undefined;
222
- locality?: string[] | undefined;
223
- organization?: string[] | undefined;
224
- organizational_unit?: string[] | undefined;
225
- postal_code?: string[] | undefined;
226
- province?: string[] | undefined;
227
- serial_number?: string | undefined;
228
- street_address?: string[] | undefined;
229
235
  };
230
236
  } | undefined;
231
237
  csr?: string | undefined;
238
+ display_subject?: string | undefined;
232
239
  imported_certificate_chain?: string | undefined;
233
240
  };
234
241
  meta: object;
@@ -0,0 +1,5 @@
1
+ import { FilterSettings } from '../components/ListToolbar/types';
2
+ /**
3
+ * Builds filter parameters from current filter settings
4
+ */
5
+ export declare const buildFilterParams: (filterSettings: FilterSettings) => Record<string, string | boolean>;
@@ -0,0 +1,27 @@
1
+ import { ClassValue } from 'clsx';
2
+ /**
3
+ * A utility function that combines clsx and tailwind-merge
4
+ *
5
+ * This function takes multiple class values (strings, objects, arrays, etc.)
6
+ * and combines them into a single string of CSS classes.
7
+ * It then uses tailwind-merge to resolve any Tailwind CSS conflicts.
8
+ *
9
+ * @param inputs - Class values to be combined
10
+ * @returns A string of CSS classes with Tailwind conflicts resolved
11
+ *
12
+ * @example
13
+ * // Basic usage
14
+ * cn('text-red-500', 'bg-blue-500')
15
+ * // => 'text-red-500 bg-blue-500'
16
+ *
17
+ * @example
18
+ * // With conditionals
19
+ * cn('text-white', isError && 'bg-red-500', !isError && 'bg-blue-500')
20
+ * // => 'text-white bg-red-500' or 'text-white bg-blue-500'
21
+ *
22
+ * @example
23
+ * // Resolving conflicts
24
+ * cn('text-red-500', 'text-blue-500')
25
+ * // => 'text-blue-500' (the latter class wins)
26
+ */
27
+ export declare function cn(...inputs: ClassValue[]): string;
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Supported unit systems for byte formatting.
3
+ *
4
+ * - `"binary"` (IEC): uses powers of 1024 → B, KiB, MiB, GiB, TiB, PiB, EiB, ZiB, YiB
5
+ * - `"decimal"` (SI): uses powers of 1000 → B, KB, MB, GB, TB, PB, EB, ZB, YB
6
+ *
7
+ * Default is `"binary"`.
8
+ */
9
+ export type ByteUnitSystem = "binary" | "decimal";
10
+ export interface FormatBytesOptions {
11
+ /** Number of decimal places to display. Defaults to `2`. */
12
+ decimals?: number;
13
+ /** Unit system to use. Defaults to `"binary"`. */
14
+ unitSystem?: ByteUnitSystem;
15
+ }
16
+ /**
17
+ * Formats a raw byte count into a human-readable string.
18
+ *
19
+ * @example
20
+ * formatBytes(1536) // "1.50 KiB" (binary, default)
21
+ * formatBytes(1500, { unitSystem: "decimal" }) // "1.50 KB"
22
+ * formatBytes(1073741824) // "1.00 GiB"
23
+ * formatBytes(0) // "0 B"
24
+ * formatBytes(null) // "0 B"
25
+ */
26
+ export declare function formatBytes(bytes: number | null | undefined, { decimals, unitSystem }?: FormatBytesOptions): string;
27
+ /**
28
+ * Convenience wrapper that always uses the decimal (SI) unit system.
29
+ *
30
+ * @example
31
+ * formatBytesDecimal(1500000) // "1.50 MB"
32
+ */
33
+ export declare const formatBytesDecimal: (bytes: number | null | undefined, decimals?: number) => string;
34
+ /**
35
+ * Convenience wrapper that always uses the binary (IEC) unit system.
36
+ *
37
+ * @example
38
+ * formatBytesBinary(1048576) // "1.00 MiB"
39
+ */
40
+ export declare const formatBytesBinary: (bytes: number | null | undefined, decimals?: number) => string;
@@ -0,0 +1,6 @@
1
+ import { FloatingIpStatus } from '../../server/Network/types/floatingIp';
2
+ /**
3
+ * Formats a floating IP status value from uppercase enum to title case.
4
+ * Example: "ACTIVE" → "Active", "DOWN" → "Down", "ERROR" → "Error"
5
+ */
6
+ export declare const formatFloatingIpStatus: (status: FloatingIpStatus) => string;
@@ -0,0 +1,11 @@
1
+ export declare const SUPPORTED_LOCALES: readonly ["en", "de"];
2
+ export type SupportedLocale = (typeof SUPPORTED_LOCALES)[number];
3
+ /**
4
+ * Detects the user's preferred language with fallback chain:
5
+ * 1. Saved preference (localStorage)
6
+ * 2. Browser language settings
7
+ * 3. Default locale
8
+ */
9
+ export declare function detectLanguage(): SupportedLocale;
10
+ export declare function saveLanguagePreference(locale: SupportedLocale): void;
11
+ export declare function getLanguagePreference(): SupportedLocale | null;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Type guard to check if an error is a tRPC error with UNAUTHORIZED code
3
+ */
4
+ export declare function isTRPCUnauthorized(error: unknown): boolean;
5
+ /**
6
+ * Type guard to check if an error is a tRPC error
7
+ */
8
+ export declare function isTRPCError(error: unknown): error is {
9
+ data: {
10
+ code: string;
11
+ };
12
+ message?: string;
13
+ };
@@ -0,0 +1,4 @@
1
+ export declare const useErrorTranslation: () => {
2
+ translateError: (errorCode: string) => string;
3
+ isRetryableError: (errorCode: string) => boolean;
4
+ };
@@ -0,0 +1,84 @@
1
+ import { FilterSettings, SortOption, SortSettings } from '../components/ListToolbar/types';
2
+ /**
3
+ * Sort direction enumeration
4
+ * Used across all sort-enabled list views
5
+ */
6
+ export type SortDirection = "asc" | "desc";
7
+ /**
8
+ * Generic required sort settings with guaranteed non-optional properties
9
+ * Used by components to maintain a fully-defined sort state
10
+ *
11
+ * Type parameter K is the sort key type (string literal union of allowed sort fields)
12
+ *
13
+ * @example
14
+ * // For floating IPs
15
+ * type FloatingIpListSortSettings = ListSortConfig<FloatingIpsSortKey>
16
+ *
17
+ * // For security groups
18
+ * type SecurityGroupListSortSettings = ListSortConfig<"name" | "project_id">
19
+ */
20
+ export type ListSortConfig<T extends string = string> = {
21
+ /**
22
+ * Array of available sort options to display in the UI
23
+ */
24
+ options: SortOption[];
25
+ /**
26
+ * The currently selected sort field (guaranteed to be one of the available options)
27
+ */
28
+ sortBy: T;
29
+ /**
30
+ * The currently active sort direction (guaranteed to be either "asc" or "desc")
31
+ */
32
+ sortDirection: SortDirection;
33
+ };
34
+ /**
35
+ * Configuration options for the useListWithFiltering hook
36
+ */
37
+ export interface UseListWithFilteringOptions<T extends string> {
38
+ /** Default sort key to use on initial render */
39
+ defaultSortKey: T;
40
+ /** Default sort direction to use on initial render */
41
+ defaultSortDir: SortDirection;
42
+ /** Available sort options to display in the sort dropdown */
43
+ sortOptions: Array<{
44
+ label: string;
45
+ value: string;
46
+ }>;
47
+ /** Initial filter settings configuration */
48
+ filterSettings: FilterSettings;
49
+ }
50
+ /**
51
+ * Return value from the useListWithFiltering hook
52
+ */
53
+ export interface UseListWithFilteringReturn<T extends string> {
54
+ searchTerm: string;
55
+ sortSettings: ListSortConfig<T>;
56
+ filterSettings: FilterSettings;
57
+ handleSearchChange: (term: string | number | string[] | undefined) => void;
58
+ handleSortChange: (newSortSettings: SortSettings) => void;
59
+ handleFilterChange: (newFilterSettings: FilterSettings) => void;
60
+ }
61
+ /**
62
+ * Custom hook to manage common list view state: search, sort, and filter
63
+ *
64
+ * Extracts shared logic from list components to ensure consistent behavior
65
+ * across all list pages and reduce code duplication.
66
+ *
67
+ * @example
68
+ * ```tsx
69
+ * const listState = useListWithFiltering({
70
+ * defaultSortKey: "name",
71
+ * defaultSortDir: "asc",
72
+ * sortOptions: [
73
+ * { label: t`Name`, value: "name" },
74
+ * { label: t`Created`, value: "created_at" },
75
+ * ],
76
+ * filterSettings: {
77
+ * filters: [
78
+ * { displayName: t`Status`, filterName: "status", values: ["active", "inactive"] }
79
+ * ]
80
+ * }
81
+ * })
82
+ * ```
83
+ */
84
+ export declare function useListWithFiltering<T extends string>({ defaultSortKey, defaultSortDir, sortOptions, filterSettings: initialFilterSettings, }: UseListWithFilteringOptions<T>): UseListWithFilteringReturn<T>;
@@ -0,0 +1,3 @@
1
+ type UseModalReturn = [boolean, () => void];
2
+ export declare const useModal: (initialState?: boolean) => UseModalReturn;
3
+ export {};
@@ -708,22 +708,25 @@ declare const buildBaseRouter: (policyDir: string) => _trpc_server.TRPCBuiltRout
708
708
  } | undefined;
709
709
  configuration?: {
710
710
  subject: {
711
- common_name: string;
711
+ named_attributes: {
712
+ cn: string;
713
+ c?: string[] | undefined;
714
+ l?: string[] | undefined;
715
+ o?: string[] | undefined;
716
+ ou?: string[] | undefined;
717
+ postal_code?: string[] | undefined;
718
+ st?: string[] | undefined;
719
+ serial_number?: string | undefined;
720
+ street?: string[] | undefined;
721
+ };
712
722
  additional_attribute?: {
713
723
  key: number[];
714
724
  value: string;
715
725
  }[] | undefined;
716
- country?: string[] | undefined;
717
- locality?: string[] | undefined;
718
- organization?: string[] | undefined;
719
- organizational_unit?: string[] | undefined;
720
- postal_code?: string[] | undefined;
721
- province?: string[] | undefined;
722
- serial_number?: string | undefined;
723
- street_address?: string[] | undefined;
724
726
  };
725
727
  } | undefined;
726
728
  csr?: string | undefined;
729
+ display_subject?: string | undefined;
727
730
  imported_certificate_chain?: string | undefined;
728
731
  }[];
729
732
  links: {
@@ -739,19 +742,9 @@ declare const buildBaseRouter: (policyDir: string) => _trpc_server.TRPCBuiltRout
739
742
  project_id: string;
740
743
  configuration: {
741
744
  subject: {
742
- common_name: string;
743
- additional_attribute?: {
744
- key: number[];
745
- value: string;
746
- }[] | undefined;
747
- country?: string[] | undefined;
748
- locality?: string[] | undefined;
749
- organization?: string[] | undefined;
750
- organizational_unit?: string[] | undefined;
751
- postal_code?: string[] | undefined;
752
- province?: string[] | undefined;
753
- serial_number?: string | undefined;
754
- street_address?: string[] | undefined;
745
+ named_attributes: {
746
+ cn: string;
747
+ };
755
748
  };
756
749
  };
757
750
  };
@@ -774,22 +767,25 @@ declare const buildBaseRouter: (policyDir: string) => _trpc_server.TRPCBuiltRout
774
767
  } | undefined;
775
768
  configuration?: {
776
769
  subject: {
777
- common_name: string;
770
+ named_attributes: {
771
+ cn: string;
772
+ c?: string[] | undefined;
773
+ l?: string[] | undefined;
774
+ o?: string[] | undefined;
775
+ ou?: string[] | undefined;
776
+ postal_code?: string[] | undefined;
777
+ st?: string[] | undefined;
778
+ serial_number?: string | undefined;
779
+ street?: string[] | undefined;
780
+ };
778
781
  additional_attribute?: {
779
782
  key: number[];
780
783
  value: string;
781
784
  }[] | undefined;
782
- country?: string[] | undefined;
783
- locality?: string[] | undefined;
784
- organization?: string[] | undefined;
785
- organizational_unit?: string[] | undefined;
786
- postal_code?: string[] | undefined;
787
- province?: string[] | undefined;
788
- serial_number?: string | undefined;
789
- street_address?: string[] | undefined;
790
785
  };
791
786
  } | undefined;
792
787
  csr?: string | undefined;
788
+ display_subject?: string | undefined;
793
789
  imported_certificate_chain?: string | undefined;
794
790
  };
795
791
  meta: object;
@@ -818,22 +814,25 @@ declare const buildBaseRouter: (policyDir: string) => _trpc_server.TRPCBuiltRout
818
814
  } | undefined;
819
815
  configuration?: {
820
816
  subject: {
821
- common_name: string;
817
+ named_attributes: {
818
+ cn: string;
819
+ c?: string[] | undefined;
820
+ l?: string[] | undefined;
821
+ o?: string[] | undefined;
822
+ ou?: string[] | undefined;
823
+ postal_code?: string[] | undefined;
824
+ st?: string[] | undefined;
825
+ serial_number?: string | undefined;
826
+ street?: string[] | undefined;
827
+ };
822
828
  additional_attribute?: {
823
829
  key: number[];
824
830
  value: string;
825
831
  }[] | undefined;
826
- country?: string[] | undefined;
827
- locality?: string[] | undefined;
828
- organization?: string[] | undefined;
829
- organizational_unit?: string[] | undefined;
830
- postal_code?: string[] | undefined;
831
- province?: string[] | undefined;
832
- serial_number?: string | undefined;
833
- street_address?: string[] | undefined;
834
832
  };
835
833
  } | undefined;
836
834
  csr?: string | undefined;
835
+ display_subject?: string | undefined;
837
836
  imported_certificate_chain?: string | undefined;
838
837
  };
839
838
  meta: object;
@@ -871,22 +870,25 @@ declare const buildBaseRouter: (policyDir: string) => _trpc_server.TRPCBuiltRout
871
870
  } | undefined;
872
871
  configuration?: {
873
872
  subject: {
874
- common_name: string;
873
+ named_attributes: {
874
+ cn: string;
875
+ c?: string[] | undefined;
876
+ l?: string[] | undefined;
877
+ o?: string[] | undefined;
878
+ ou?: string[] | undefined;
879
+ postal_code?: string[] | undefined;
880
+ st?: string[] | undefined;
881
+ serial_number?: string | undefined;
882
+ street?: string[] | undefined;
883
+ };
875
884
  additional_attribute?: {
876
885
  key: number[];
877
886
  value: string;
878
887
  }[] | undefined;
879
- country?: string[] | undefined;
880
- locality?: string[] | undefined;
881
- organization?: string[] | undefined;
882
- organizational_unit?: string[] | undefined;
883
- postal_code?: string[] | undefined;
884
- province?: string[] | undefined;
885
- serial_number?: string | undefined;
886
- street_address?: string[] | undefined;
887
888
  };
888
889
  } | undefined;
889
890
  csr?: string | undefined;
891
+ display_subject?: string | undefined;
890
892
  imported_certificate_chain?: string | undefined;
891
893
  };
892
894
  meta: object;