@cobaltcore-dev/aurora 0.12.1 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/BucketToastNotifications-CxQ0_Spa.mjs +562 -0
- package/dist/client/BucketToastNotifications-CxQ0_Spa.mjs.map +1 -0
- package/dist/client/{ContentHeader-D2nIdJKJ.mjs → ContentHeader-Bpw0b1gD.mjs} +6 -2
- package/dist/client/ContentHeader-Bpw0b1gD.mjs.map +1 -0
- package/dist/client/{FloatingIpActionModals-RCvaamOg.mjs → FloatingIpActionModals-DWS9UO6o.mjs} +2 -2
- package/dist/client/{FloatingIpActionModals-RCvaamOg.mjs.map → FloatingIpActionModals-DWS9UO6o.mjs.map} +1 -1
- package/dist/client/{ImageToastNotifications-ClO-1yOH.mjs → ImageToastNotifications-B2BIyk1P.mjs} +2 -2
- package/dist/client/{ImageToastNotifications-ClO-1yOH.mjs.map → ImageToastNotifications-B2BIyk1P.mjs.map} +1 -1
- package/dist/client/{_flavorId-CtQEd28h.mjs → _flavorId-B5RlvE1F.mjs} +3 -2
- package/dist/client/_flavorId-B5RlvE1F.mjs.map +1 -0
- package/dist/client/{_flavorId-DVsGdXUf.mjs → _flavorId-BjVRHdWZ.mjs} +4 -4
- package/dist/client/_flavorId-BjVRHdWZ.mjs.map +1 -0
- package/dist/client/{_floatingIpId-CKMq7-4p2.mjs → _floatingIpId-DnSQdKNp2.mjs} +4 -4
- package/dist/client/{_floatingIpId-CKMq7-4p2.mjs.map → _floatingIpId-DnSQdKNp2.mjs.map} +1 -1
- package/dist/client/{_floatingIpId-DvTh6vdB.mjs → _floatingIpId-uQHRPZPg.mjs} +3 -2
- package/dist/client/_floatingIpId-uQHRPZPg.mjs.map +1 -0
- package/dist/client/{_imageId-xG8hC49j.mjs → _imageId-DLQ1-LPf.mjs} +4 -4
- package/dist/client/_imageId-DLQ1-LPf.mjs.map +1 -0
- package/dist/client/{_pcaId-Db_t0x6O.mjs → _pcaId-B1nd5Nm5.mjs} +4 -4
- package/dist/client/{_pcaId-Db_t0x6O.mjs.map → _pcaId-B1nd5Nm5.mjs.map} +1 -1
- package/dist/client/{_pcaId-WCJoukIk.mjs → _pcaId-CmcN3vRn.mjs} +12 -10
- package/dist/client/_pcaId-CmcN3vRn.mjs.map +1 -0
- package/dist/client/_projectId-CFOWOw4L.mjs +98 -0
- package/dist/client/_projectId-CFOWOw4L.mjs.map +1 -0
- package/dist/client/{_projectId-BCMkaH_h.mjs → _projectId-CX6OtON6.mjs} +54 -53
- package/dist/client/_projectId-CX6OtON6.mjs.map +1 -0
- package/dist/client/{_projectId-C8RGOqZb.mjs → _projectId-Dn_GjZnp.mjs} +2 -2
- package/dist/client/{_projectId-C8RGOqZb.mjs.map → _projectId-Dn_GjZnp.mjs.map} +1 -1
- package/dist/client/{_securityGroupId-DMi7YRux.mjs → _securityGroupId-BMzod4iC.mjs} +3 -3
- package/dist/client/{_securityGroupId-DMi7YRux.mjs.map → _securityGroupId-BMzod4iC.mjs.map} +1 -1
- package/dist/client/{_securityGroupId-CyQ3XmpB.mjs → _securityGroupId-Wa7Be5pg.mjs} +3 -2
- package/dist/client/_securityGroupId-Wa7Be5pg.mjs.map +1 -0
- package/dist/client/{_storageType-Bb6YZgXf.mjs → _storageType-CWzIdJ_b.mjs} +831 -908
- package/dist/client/_storageType-CWzIdJ_b.mjs.map +1 -0
- package/dist/client/{_storageType-g1zkFFRh.mjs → _storageType-Cks7X_kB.mjs} +4 -3
- package/dist/client/_storageType-Cks7X_kB.mjs.map +1 -0
- package/dist/client/_storageType-zeSZe--V.mjs.map +1 -1
- package/dist/client/{constants-D6IO9bPs.mjs → constants-D8Zrv7HP.mjs} +2 -2
- package/dist/client/{constants-D6IO9bPs.mjs.map → constants-D8Zrv7HP.mjs.map} +1 -1
- package/dist/client/{flavors-CO5l_6d0.mjs → flavors-BlXyPLQG.mjs} +3 -3
- package/dist/client/{flavors-CO5l_6d0.mjs.map → flavors-BlXyPLQG.mjs.map} +1 -1
- package/dist/client/{flavors-D4nGSs0r.mjs → flavors-CYlctjP_.mjs} +3 -2
- package/dist/client/flavors-CYlctjP_.mjs.map +1 -0
- package/dist/client/flavors-DWMZ6TuJ.mjs.map +1 -1
- package/dist/client/{floatingips-ClkRV7a7.mjs → floatingips-D7D6iFhe.mjs} +3 -3
- package/dist/client/{floatingips-ClkRV7a7.mjs.map → floatingips-D7D6iFhe.mjs.map} +1 -1
- package/dist/client/{images-C_OYLPqv.mjs → images-B_G5fdhf.mjs} +5 -5
- package/dist/client/{images-C_OYLPqv.mjs.map → images-B_G5fdhf.mjs.map} +1 -1
- package/dist/client/{images-CvPxoPC0.mjs → images-BlDW-6B9.mjs} +3 -2
- package/dist/client/images-BlDW-6B9.mjs.map +1 -0
- package/dist/client/index.js +190 -170
- package/dist/client/index.js.map +1 -1
- package/dist/client/{objects-D0grS6pk.mjs → objects-Bey_ABxf.mjs} +2259 -1961
- package/dist/client/objects-Bey_ABxf.mjs.map +1 -0
- package/dist/client/{objects-UQyUQxBj.mjs → objects-DK_YLkRr.mjs} +8 -7
- package/dist/client/objects-DK_YLkRr.mjs.map +1 -0
- package/dist/client/objects-o2Cj_ndZ.mjs.map +1 -1
- package/dist/client/{pca-BJPxOIgq.mjs → pca-BAZ7HS3X.mjs} +5 -5
- package/dist/client/{pca-BJPxOIgq.mjs.map → pca-BAZ7HS3X.mjs.map} +1 -1
- package/dist/client/pca-Dmt4JrxN.mjs +25 -0
- package/dist/client/pca-Dmt4JrxN.mjs.map +1 -0
- package/dist/client/pcaAccess-BYUY700H.mjs +9 -0
- package/dist/client/pcaAccess-BYUY700H.mjs.map +1 -0
- package/dist/client/{projects-CGjBlG2w.mjs → projects-CDFynG9q.mjs} +3 -2
- package/dist/client/projects-CDFynG9q.mjs.map +1 -0
- package/dist/client/projects-DvSiI5Vg.mjs.map +1 -1
- package/dist/client/{projects-C3wR-lvM.mjs → projects-sn_XPdCh.mjs} +2 -2
- package/dist/client/{projects-C3wR-lvM.mjs.map → projects-sn_XPdCh.mjs.map} +1 -1
- package/dist/client/projects-yiK0HGSA.mjs.map +1 -1
- package/dist/client/{routeInfo-Dy9l-wFB.mjs → routeInfo-CdTRlSxv.mjs} +8 -7
- package/dist/client/routeInfo-CdTRlSxv.mjs.map +1 -0
- package/dist/client/{securitygroups-n8ujBpJP.mjs → securitygroups-CEAGUVYa.mjs} +2 -2
- package/dist/client/{securitygroups-n8ujBpJP.mjs.map → securitygroups-CEAGUVYa.mjs.map} +1 -1
- package/dist/client/{trpcClient-BzPUgiM2.mjs → trpcClient-Dy_MP_Pv.mjs} +2 -2
- package/dist/client/trpcClient-Dy_MP_Pv.mjs.map +1 -0
- package/dist/server/index.js +592 -309
- package/package.json +2 -2
- package/dist/client/ContentHeader-D2nIdJKJ.mjs.map +0 -1
- package/dist/client/DeleteVersionsModal-DQO8lGmS.mjs +0 -331
- package/dist/client/DeleteVersionsModal-DQO8lGmS.mjs.map +0 -1
- package/dist/client/_flavorId-CtQEd28h.mjs.map +0 -1
- package/dist/client/_flavorId-DVsGdXUf.mjs.map +0 -1
- package/dist/client/_floatingIpId-DvTh6vdB.mjs.map +0 -1
- package/dist/client/_imageId-xG8hC49j.mjs.map +0 -1
- package/dist/client/_pcaId-WCJoukIk.mjs.map +0 -1
- package/dist/client/_projectId-BCMkaH_h.mjs.map +0 -1
- package/dist/client/_projectId-BdqRntcN.mjs +0 -107
- package/dist/client/_projectId-BdqRntcN.mjs.map +0 -1
- package/dist/client/_securityGroupId-CyQ3XmpB.mjs.map +0 -1
- package/dist/client/_storageType-Bb6YZgXf.mjs.map +0 -1
- package/dist/client/_storageType-g1zkFFRh.mjs.map +0 -1
- package/dist/client/flavors-D4nGSs0r.mjs.map +0 -1
- package/dist/client/images-CvPxoPC0.mjs.map +0 -1
- package/dist/client/objects-D0grS6pk.mjs.map +0 -1
- package/dist/client/objects-UQyUQxBj.mjs.map +0 -1
- package/dist/client/pca-C9MKOi3Z.mjs +0 -16
- package/dist/client/pca-C9MKOi3Z.mjs.map +0 -1
- package/dist/client/projects-CGjBlG2w.mjs.map +0 -1
- package/dist/client/routeInfo-Dy9l-wFB.mjs.map +0 -1
- package/dist/client/trpcClient-BzPUgiM2.mjs.map +0 -1
package/dist/server/index.js
CHANGED
|
@@ -4163,10 +4163,10 @@ var require_wrap_handler = __commonJS({
|
|
|
4163
4163
|
var require_dispatcher = __commonJS({
|
|
4164
4164
|
"../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/dispatcher/dispatcher.js"(exports2, module2) {
|
|
4165
4165
|
"use strict";
|
|
4166
|
-
var
|
|
4166
|
+
var EventEmitter4 = require("events");
|
|
4167
4167
|
var WrapHandler = require_wrap_handler();
|
|
4168
4168
|
var wrapInterceptor = /* @__PURE__ */ __name((dispatch) => (opts, handler) => dispatch(opts, WrapHandler.wrap(handler)), "wrapInterceptor");
|
|
4169
|
-
var Dispatcher = class Dispatcher extends
|
|
4169
|
+
var Dispatcher = class Dispatcher extends EventEmitter4 {
|
|
4170
4170
|
static {
|
|
4171
4171
|
__name(this, "Dispatcher");
|
|
4172
4172
|
}
|
|
@@ -11756,7 +11756,7 @@ var require_socks5_utils = __commonJS({
|
|
|
11756
11756
|
var require_socks5_client = __commonJS({
|
|
11757
11757
|
"../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/core/socks5-client.js"(exports2, module2) {
|
|
11758
11758
|
"use strict";
|
|
11759
|
-
var { EventEmitter:
|
|
11759
|
+
var { EventEmitter: EventEmitter4 } = require("events");
|
|
11760
11760
|
var { Buffer: Buffer2 } = require("buffer");
|
|
11761
11761
|
var { InvalidArgumentError, Socks5ProxyError } = require_errors();
|
|
11762
11762
|
var { debuglog } = require("util");
|
|
@@ -11801,7 +11801,7 @@ var require_socks5_client = __commonJS({
|
|
|
11801
11801
|
ERROR: "error",
|
|
11802
11802
|
CLOSED: "closed"
|
|
11803
11803
|
};
|
|
11804
|
-
var Socks5Client = class Socks5Client extends
|
|
11804
|
+
var Socks5Client = class Socks5Client extends EventEmitter4 {
|
|
11805
11805
|
static {
|
|
11806
11806
|
__name(this, "Socks5Client");
|
|
11807
11807
|
}
|
|
@@ -18571,9 +18571,9 @@ var require_memory_cache_store = __commonJS({
|
|
|
18571
18571
|
"../../node_modules/.pnpm/undici@7.28.0/node_modules/undici/lib/cache/memory-cache-store.js"(exports2, module2) {
|
|
18572
18572
|
"use strict";
|
|
18573
18573
|
var { Writable } = require("stream");
|
|
18574
|
-
var { EventEmitter:
|
|
18574
|
+
var { EventEmitter: EventEmitter4 } = require("events");
|
|
18575
18575
|
var { assertCacheKey, assertCacheValue } = require_cache();
|
|
18576
|
-
var MemoryCacheStore = class MemoryCacheStore extends
|
|
18576
|
+
var MemoryCacheStore = class MemoryCacheStore extends EventEmitter4 {
|
|
18577
18577
|
static {
|
|
18578
18578
|
__name(this, "MemoryCacheStore");
|
|
18579
18579
|
}
|
|
@@ -33743,6 +33743,15 @@ var updateMetadataInputSchema = projectScopedInputSchema.extend({
|
|
|
33743
33743
|
objectKey: import_zod13.z.string().min(1),
|
|
33744
33744
|
metadata: import_zod13.z.record(import_zod13.z.string(), import_zod13.z.string())
|
|
33745
33745
|
});
|
|
33746
|
+
var downloadObjectInputSchema2 = projectScopedInputSchema.extend({
|
|
33747
|
+
containerName: import_zod13.z.string().min(1),
|
|
33748
|
+
objectKey: import_zod13.z.string().min(1),
|
|
33749
|
+
filename: import_zod13.z.string().min(1),
|
|
33750
|
+
downloadId: import_zod13.z.string().min(1)
|
|
33751
|
+
});
|
|
33752
|
+
var watchDownloadProgressInputSchema = projectScopedInputSchema.extend({
|
|
33753
|
+
downloadId: import_zod13.z.string().min(1)
|
|
33754
|
+
});
|
|
33746
33755
|
var s3ServiceInfoSchema = import_zod13.z.object({
|
|
33747
33756
|
// Limits
|
|
33748
33757
|
limits: import_zod13.z.object({
|
|
@@ -34073,11 +34082,52 @@ var containerRouter = {
|
|
|
34073
34082
|
var import_client_s33 = require("@aws-sdk/client-s3");
|
|
34074
34083
|
var import_server13 = require("@trpc/server");
|
|
34075
34084
|
var import_zod14 = require("zod");
|
|
34085
|
+
var import_node_events3 = __toESM(require("events"));
|
|
34086
|
+
var downloadProgressEmitter2 = new import_node_events3.default();
|
|
34087
|
+
downloadProgressEmitter2.setMaxListeners(0);
|
|
34088
|
+
var downloadProgressMap2 = /* @__PURE__ */ new Map();
|
|
34076
34089
|
var deleteAllObjectsInputSchema = import_zod14.z.object({
|
|
34077
34090
|
project_id: import_zod14.z.string(),
|
|
34078
34091
|
containerName: import_zod14.z.string().min(1),
|
|
34079
34092
|
includeVersionsAndDeleteMarkers: import_zod14.z.boolean().optional().default(true)
|
|
34080
34093
|
});
|
|
34094
|
+
function resolveMimeFromKey(key) {
|
|
34095
|
+
const ext = key.split(".").pop()?.toLowerCase() ?? "";
|
|
34096
|
+
const map = {
|
|
34097
|
+
// Images
|
|
34098
|
+
jpg: "image/jpeg",
|
|
34099
|
+
jpeg: "image/jpeg",
|
|
34100
|
+
png: "image/png",
|
|
34101
|
+
gif: "image/gif",
|
|
34102
|
+
webp: "image/webp",
|
|
34103
|
+
svg: "image/svg+xml",
|
|
34104
|
+
ico: "image/x-icon",
|
|
34105
|
+
bmp: "image/bmp",
|
|
34106
|
+
avif: "image/avif",
|
|
34107
|
+
// Video
|
|
34108
|
+
mp4: "video/mp4",
|
|
34109
|
+
webm: "video/webm",
|
|
34110
|
+
ogv: "video/ogg",
|
|
34111
|
+
// Audio
|
|
34112
|
+
mp3: "audio/mpeg",
|
|
34113
|
+
wav: "audio/wav",
|
|
34114
|
+
ogg: "audio/ogg",
|
|
34115
|
+
flac: "audio/flac",
|
|
34116
|
+
aac: "audio/aac",
|
|
34117
|
+
// Documents / text
|
|
34118
|
+
pdf: "application/pdf",
|
|
34119
|
+
txt: "text/plain",
|
|
34120
|
+
md: "text/markdown",
|
|
34121
|
+
csv: "text/csv",
|
|
34122
|
+
log: "text/plain",
|
|
34123
|
+
xml: "application/xml",
|
|
34124
|
+
json: "application/json",
|
|
34125
|
+
html: "text/html",
|
|
34126
|
+
htm: "text/html"
|
|
34127
|
+
};
|
|
34128
|
+
return map[ext] ?? "application/octet-stream";
|
|
34129
|
+
}
|
|
34130
|
+
__name(resolveMimeFromKey, "resolveMimeFromKey");
|
|
34081
34131
|
var objectRouter = {
|
|
34082
34132
|
/**
|
|
34083
34133
|
* List objects in a container with optional prefix filtering and pagination.
|
|
@@ -34580,6 +34630,179 @@ var objectRouter = {
|
|
|
34580
34630
|
key: objectKey
|
|
34581
34631
|
});
|
|
34582
34632
|
}
|
|
34633
|
+
}),
|
|
34634
|
+
// ============================================================================
|
|
34635
|
+
// DOWNLOAD OPERATIONS
|
|
34636
|
+
// ============================================================================
|
|
34637
|
+
/**
|
|
34638
|
+
* Download a Ceph (S3) object via the BFF, streaming the content as chunks of
|
|
34639
|
+
* base64-encoded data using an async iterable.
|
|
34640
|
+
*
|
|
34641
|
+
* Mirrors the Swift `downloadObject` implementation so the existing client-side
|
|
34642
|
+
* download-assembly logic can be reused unchanged:
|
|
34643
|
+
* - tRPC iterables use a JSON-based SSE transport, so each yielded value must
|
|
34644
|
+
* be JSON-serializable. Each Uint8Array chunk is base64-encoded, and the
|
|
34645
|
+
* content-type + filename are sent only in the first chunk.
|
|
34646
|
+
* - The server never buffers the whole object in memory; it streams the S3
|
|
34647
|
+
* `GetObject` body chunk by chunk.
|
|
34648
|
+
*
|
|
34649
|
+
* Progress tracking:
|
|
34650
|
+
* Per-chunk progress is stored in `downloadProgressMap` and emitted via
|
|
34651
|
+
* `downloadProgressEmitter`, so a concurrent `watchDownloadProgress`
|
|
34652
|
+
* subscription can drive a progress bar. The client computes `downloadId`
|
|
34653
|
+
* as "<bucket>:<objectKey>:<uuid>" and passes it before the mutation starts.
|
|
34654
|
+
* The id is scoped with the project id to prevent cross-tenant observation.
|
|
34655
|
+
*
|
|
34656
|
+
* Client-side assembly:
|
|
34657
|
+
* Collect all base64 chunks -> decode each -> concatenate into a single
|
|
34658
|
+
* Uint8Array -> wrap in a Blob -> trigger <a download>.
|
|
34659
|
+
*/
|
|
34660
|
+
downloadObject: cephProtectedProcedure.input(downloadObjectInputSchema2).mutation(async function* ({ ctx, input }) {
|
|
34661
|
+
const s3 = ctx.getCephClient();
|
|
34662
|
+
const { project_id, containerName, objectKey, filename, downloadId } = input;
|
|
34663
|
+
const scopedDownloadId = `${project_id}:${downloadId}`;
|
|
34664
|
+
const emitMappedError = /* @__PURE__ */ __name((error) => {
|
|
34665
|
+
try {
|
|
34666
|
+
mapS3ErrorToTRPCError(error, {
|
|
34667
|
+
operation: "download object",
|
|
34668
|
+
bucket: containerName,
|
|
34669
|
+
key: objectKey
|
|
34670
|
+
});
|
|
34671
|
+
} catch (mappedError) {
|
|
34672
|
+
downloadProgressEmitter2.emit(`progress:${scopedDownloadId}:error`, mappedError);
|
|
34673
|
+
throw mappedError;
|
|
34674
|
+
}
|
|
34675
|
+
}, "emitMappedError");
|
|
34676
|
+
const response = await s3.send(new import_client_s33.GetObjectCommand({
|
|
34677
|
+
Bucket: containerName,
|
|
34678
|
+
Key: objectKey
|
|
34679
|
+
})).catch(emitMappedError);
|
|
34680
|
+
const body = response.Body;
|
|
34681
|
+
if (!body) {
|
|
34682
|
+
emitMappedError(new import_server13.TRPCError({
|
|
34683
|
+
code: "INTERNAL_SERVER_ERROR",
|
|
34684
|
+
message: "S3 response has no body"
|
|
34685
|
+
}));
|
|
34686
|
+
}
|
|
34687
|
+
const rawContentType = response.ContentType ?? "application/octet-stream";
|
|
34688
|
+
const mimeFromKey = resolveMimeFromKey(objectKey);
|
|
34689
|
+
const contentType = mimeFromKey !== "application/octet-stream" ? mimeFromKey : rawContentType;
|
|
34690
|
+
const total = response.ContentLength ?? 0;
|
|
34691
|
+
downloadProgressMap2.set(scopedDownloadId, {
|
|
34692
|
+
downloaded: 0,
|
|
34693
|
+
total,
|
|
34694
|
+
percent: 0
|
|
34695
|
+
});
|
|
34696
|
+
let isFirst = true;
|
|
34697
|
+
let downloaded = 0;
|
|
34698
|
+
try {
|
|
34699
|
+
for await (const value of body) {
|
|
34700
|
+
downloaded += value.byteLength;
|
|
34701
|
+
const progress = downloadProgressMap2.get(scopedDownloadId);
|
|
34702
|
+
progress.downloaded = downloaded;
|
|
34703
|
+
progress.percent = total > 0 ? Math.round(downloaded / total * 100) : 0;
|
|
34704
|
+
downloadProgressEmitter2.emit(`progress:${scopedDownloadId}`, {
|
|
34705
|
+
...progress
|
|
34706
|
+
});
|
|
34707
|
+
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
34708
|
+
yield {
|
|
34709
|
+
chunk: Buffer.from(value).toString("base64"),
|
|
34710
|
+
downloaded,
|
|
34711
|
+
total,
|
|
34712
|
+
...isFirst ? {
|
|
34713
|
+
contentType,
|
|
34714
|
+
filename
|
|
34715
|
+
} : {}
|
|
34716
|
+
};
|
|
34717
|
+
isFirst = false;
|
|
34718
|
+
}
|
|
34719
|
+
downloadProgressEmitter2.emit(`progress:${scopedDownloadId}:complete`);
|
|
34720
|
+
} catch (error) {
|
|
34721
|
+
emitMappedError(error);
|
|
34722
|
+
} finally {
|
|
34723
|
+
downloadProgressMap2.delete(scopedDownloadId);
|
|
34724
|
+
}
|
|
34725
|
+
}),
|
|
34726
|
+
/**
|
|
34727
|
+
* Subscribe to real-time download progress for a given `downloadId`.
|
|
34728
|
+
*
|
|
34729
|
+
* Mirrors the Swift `watchDownloadProgress` subscription. The `downloadId` is
|
|
34730
|
+
* computed client-side as "<bucket>:<objectKey>:<uuid>" and passed to
|
|
34731
|
+
* `downloadObject` before the mutation starts, so this subscription can be
|
|
34732
|
+
* opened in advance. Yields `{ downloaded, total, percent }` as bytes flow
|
|
34733
|
+
* through the server; completes when the download finishes or throws on error.
|
|
34734
|
+
*/
|
|
34735
|
+
watchDownloadProgress: cephProtectedProcedure.input(watchDownloadProgressInputSchema).subscription(async function* ({ input }) {
|
|
34736
|
+
const { project_id, downloadId } = input;
|
|
34737
|
+
const scopedDownloadId = `${project_id}:${downloadId}`;
|
|
34738
|
+
const current = downloadProgressMap2.get(scopedDownloadId);
|
|
34739
|
+
if (current) {
|
|
34740
|
+
yield {
|
|
34741
|
+
...current
|
|
34742
|
+
};
|
|
34743
|
+
}
|
|
34744
|
+
const queue = [];
|
|
34745
|
+
let isComplete = false;
|
|
34746
|
+
let isError = false;
|
|
34747
|
+
let caughtError;
|
|
34748
|
+
let waitResolver = null;
|
|
34749
|
+
const onProgress = /* @__PURE__ */ __name((data) => {
|
|
34750
|
+
queue.push(data);
|
|
34751
|
+
waitResolver?.();
|
|
34752
|
+
waitResolver = null;
|
|
34753
|
+
}, "onProgress");
|
|
34754
|
+
const onComplete = /* @__PURE__ */ __name(() => {
|
|
34755
|
+
isComplete = true;
|
|
34756
|
+
waitResolver?.();
|
|
34757
|
+
waitResolver = null;
|
|
34758
|
+
}, "onComplete");
|
|
34759
|
+
const onError = /* @__PURE__ */ __name((err) => {
|
|
34760
|
+
isError = true;
|
|
34761
|
+
caughtError = err instanceof Error ? err : new Error(String(err));
|
|
34762
|
+
waitResolver?.();
|
|
34763
|
+
waitResolver = null;
|
|
34764
|
+
}, "onError");
|
|
34765
|
+
downloadProgressEmitter2.on(`progress:${scopedDownloadId}`, onProgress);
|
|
34766
|
+
downloadProgressEmitter2.on(`progress:${scopedDownloadId}:complete`, onComplete);
|
|
34767
|
+
downloadProgressEmitter2.on(`progress:${scopedDownloadId}:error`, onError);
|
|
34768
|
+
try {
|
|
34769
|
+
while (!isComplete && !isError) {
|
|
34770
|
+
while (queue.length > 0) {
|
|
34771
|
+
yield {
|
|
34772
|
+
...queue.shift()
|
|
34773
|
+
};
|
|
34774
|
+
}
|
|
34775
|
+
if (!isComplete && !isError) {
|
|
34776
|
+
let timeoutId;
|
|
34777
|
+
const timeout = new Promise((resolve) => {
|
|
34778
|
+
timeoutId = setTimeout(resolve, 3e4);
|
|
34779
|
+
});
|
|
34780
|
+
try {
|
|
34781
|
+
await Promise.race([
|
|
34782
|
+
new Promise((resolve) => {
|
|
34783
|
+
waitResolver = resolve;
|
|
34784
|
+
}),
|
|
34785
|
+
timeout
|
|
34786
|
+
]);
|
|
34787
|
+
} finally {
|
|
34788
|
+
if (timeoutId) clearTimeout(timeoutId);
|
|
34789
|
+
}
|
|
34790
|
+
if (!isComplete && !isError && queue.length === 0) break;
|
|
34791
|
+
}
|
|
34792
|
+
}
|
|
34793
|
+
while (queue.length > 0) {
|
|
34794
|
+
yield {
|
|
34795
|
+
...queue.shift()
|
|
34796
|
+
};
|
|
34797
|
+
}
|
|
34798
|
+
if (isError && caughtError) {
|
|
34799
|
+
throw caughtError;
|
|
34800
|
+
}
|
|
34801
|
+
} finally {
|
|
34802
|
+
downloadProgressEmitter2.off(`progress:${scopedDownloadId}`, onProgress);
|
|
34803
|
+
downloadProgressEmitter2.off(`progress:${scopedDownloadId}:complete`, onComplete);
|
|
34804
|
+
downloadProgressEmitter2.off(`progress:${scopedDownloadId}:error`, onError);
|
|
34805
|
+
}
|
|
34583
34806
|
})
|
|
34584
34807
|
};
|
|
34585
34808
|
|
|
@@ -34730,6 +34953,7 @@ var ec2CredentialRouter = {
|
|
|
34730
34953
|
|
|
34731
34954
|
// src/server/Storage/routers/ceph/versioningRouter.ts
|
|
34732
34955
|
var import_client_s34 = require("@aws-sdk/client-s3");
|
|
34956
|
+
var import_zod17 = require("zod");
|
|
34733
34957
|
|
|
34734
34958
|
// src/server/Storage/types/versioning.ts
|
|
34735
34959
|
var import_zod16 = require("zod");
|
|
@@ -35043,13 +35267,72 @@ var versioningRouter = {
|
|
|
35043
35267
|
key: input.key
|
|
35044
35268
|
});
|
|
35045
35269
|
}
|
|
35270
|
+
}),
|
|
35271
|
+
/**
|
|
35272
|
+
* Check if folders contain deleted files (files with delete markers).
|
|
35273
|
+
*
|
|
35274
|
+
* For each folder, performs a query without delimiter to check all nested objects.
|
|
35275
|
+
* Returns whether each folder contains at least one file with a delete marker as latest version.
|
|
35276
|
+
*
|
|
35277
|
+
* Note: This can be expensive for many folders (N S3 requests for N folders).
|
|
35278
|
+
* Use sparingly and consider caching.
|
|
35279
|
+
*
|
|
35280
|
+
* @throws TRPCError NOT_FOUND - bucket does not exist
|
|
35281
|
+
* @throws TRPCError FORBIDDEN - no credentials or access denied
|
|
35282
|
+
*/
|
|
35283
|
+
checkDeletedContent: cephProtectedProcedure.input(import_zod17.z.object({
|
|
35284
|
+
project_id: import_zod17.z.string(),
|
|
35285
|
+
bucket: import_zod17.z.string().min(1),
|
|
35286
|
+
folders: import_zod17.z.array(import_zod17.z.string()).max(100)
|
|
35287
|
+
})).query(async ({ ctx, input }) => {
|
|
35288
|
+
const s3 = ctx.getCephClient();
|
|
35289
|
+
try {
|
|
35290
|
+
const results = await Promise.all(input.folders.map(async (folderPrefix) => {
|
|
35291
|
+
try {
|
|
35292
|
+
let hasDeleteMarkers = false;
|
|
35293
|
+
let keyMarker;
|
|
35294
|
+
let versionIdMarker;
|
|
35295
|
+
while (!hasDeleteMarkers) {
|
|
35296
|
+
const response = await s3.send(new import_client_s34.ListObjectVersionsCommand({
|
|
35297
|
+
Bucket: input.bucket,
|
|
35298
|
+
Prefix: folderPrefix,
|
|
35299
|
+
MaxKeys: 100,
|
|
35300
|
+
KeyMarker: keyMarker,
|
|
35301
|
+
VersionIdMarker: versionIdMarker
|
|
35302
|
+
}));
|
|
35303
|
+
hasDeleteMarkers = (response.DeleteMarkers?.length ?? 0) > 0;
|
|
35304
|
+
if (!response.IsTruncated || hasDeleteMarkers) {
|
|
35305
|
+
break;
|
|
35306
|
+
}
|
|
35307
|
+
keyMarker = response.NextKeyMarker;
|
|
35308
|
+
versionIdMarker = response.NextVersionIdMarker;
|
|
35309
|
+
}
|
|
35310
|
+
return {
|
|
35311
|
+
prefix: folderPrefix,
|
|
35312
|
+
hasDeletedContent: hasDeleteMarkers
|
|
35313
|
+
};
|
|
35314
|
+
} catch (error) {
|
|
35315
|
+
console.error(`Failed to check deleted content for folder ${folderPrefix}:`, error);
|
|
35316
|
+
return {
|
|
35317
|
+
prefix: folderPrefix,
|
|
35318
|
+
hasDeletedContent: false
|
|
35319
|
+
};
|
|
35320
|
+
}
|
|
35321
|
+
}));
|
|
35322
|
+
return results;
|
|
35323
|
+
} catch (error) {
|
|
35324
|
+
throw mapS3ErrorToTRPCError(error, {
|
|
35325
|
+
operation: "check deleted content",
|
|
35326
|
+
bucket: input.bucket
|
|
35327
|
+
});
|
|
35328
|
+
}
|
|
35046
35329
|
})
|
|
35047
35330
|
};
|
|
35048
35331
|
|
|
35049
35332
|
// src/server/Storage/routers/ceph/bucketPolicyRouter.ts
|
|
35050
35333
|
var import_client_s35 = require("@aws-sdk/client-s3");
|
|
35051
35334
|
var import_server15 = require("@trpc/server");
|
|
35052
|
-
var
|
|
35335
|
+
var import_zod18 = require("zod");
|
|
35053
35336
|
var policySetRateLimits = /* @__PURE__ */ new Map();
|
|
35054
35337
|
function checkPolicySetRateLimit(bucketName, projectId) {
|
|
35055
35338
|
const key = `${projectId}:${bucketName}`;
|
|
@@ -35213,7 +35496,7 @@ var bucketPolicyRouter = {
|
|
|
35213
35496
|
message: "Invalid JSON format"
|
|
35214
35497
|
});
|
|
35215
35498
|
}
|
|
35216
|
-
if (error instanceof
|
|
35499
|
+
if (error instanceof import_zod18.z.ZodError) {
|
|
35217
35500
|
const zodError = error;
|
|
35218
35501
|
const firstError = zodError.issues?.[0];
|
|
35219
35502
|
if (!firstError) {
|
|
@@ -35399,40 +35682,40 @@ var buildObjectStorageRouters = /* @__PURE__ */ __name((policyDir) => ({
|
|
|
35399
35682
|
}), "buildObjectStorageRouters");
|
|
35400
35683
|
|
|
35401
35684
|
// src/server/Project/routers/projectRouter.ts
|
|
35402
|
-
var
|
|
35685
|
+
var import_zod20 = require("zod");
|
|
35403
35686
|
var import_server16 = require("@trpc/server");
|
|
35404
35687
|
|
|
35405
35688
|
// src/server/Project/types/models.ts
|
|
35406
|
-
var
|
|
35407
|
-
var baseProjectSchema =
|
|
35408
|
-
id:
|
|
35409
|
-
name:
|
|
35410
|
-
enabled:
|
|
35411
|
-
domain_id:
|
|
35412
|
-
parent_id:
|
|
35413
|
-
is_domain:
|
|
35414
|
-
tags:
|
|
35415
|
-
options:
|
|
35416
|
-
description:
|
|
35417
|
-
links:
|
|
35418
|
-
self:
|
|
35689
|
+
var import_zod19 = require("zod");
|
|
35690
|
+
var baseProjectSchema = import_zod19.z.object({
|
|
35691
|
+
id: import_zod19.z.string(),
|
|
35692
|
+
name: import_zod19.z.string(),
|
|
35693
|
+
enabled: import_zod19.z.boolean(),
|
|
35694
|
+
domain_id: import_zod19.z.string().nullable().optional(),
|
|
35695
|
+
parent_id: import_zod19.z.string().nullable().optional(),
|
|
35696
|
+
is_domain: import_zod19.z.boolean().nullable().optional(),
|
|
35697
|
+
tags: import_zod19.z.array(import_zod19.z.string()).nullable().optional(),
|
|
35698
|
+
options: import_zod19.z.record(import_zod19.z.string(), import_zod19.z.string().or(import_zod19.z.boolean())).nullable().optional(),
|
|
35699
|
+
description: import_zod19.z.string().nullable().optional(),
|
|
35700
|
+
links: import_zod19.z.object({
|
|
35701
|
+
self: import_zod19.z.string().url().nullable().optional()
|
|
35419
35702
|
}).optional()
|
|
35420
35703
|
});
|
|
35421
35704
|
var projectSchema = baseProjectSchema.extend({
|
|
35422
|
-
domain_name:
|
|
35423
|
-
parents:
|
|
35705
|
+
domain_name: import_zod19.z.string().optional(),
|
|
35706
|
+
parents: import_zod19.z.array(import_zod19.z.object({
|
|
35424
35707
|
project: baseProjectSchema
|
|
35425
35708
|
})).optional()
|
|
35426
35709
|
});
|
|
35427
|
-
var projectResponseSchema =
|
|
35710
|
+
var projectResponseSchema = import_zod19.z.object({
|
|
35428
35711
|
project: projectSchema
|
|
35429
35712
|
});
|
|
35430
|
-
var projectsResponseSchema =
|
|
35431
|
-
projects:
|
|
35432
|
-
links:
|
|
35433
|
-
self:
|
|
35434
|
-
previous:
|
|
35435
|
-
next:
|
|
35713
|
+
var projectsResponseSchema = import_zod19.z.object({
|
|
35714
|
+
projects: import_zod19.z.array(projectSchema),
|
|
35715
|
+
links: import_zod19.z.object({
|
|
35716
|
+
self: import_zod19.z.string().url().optional(),
|
|
35717
|
+
previous: import_zod19.z.string().url().nullable().optional(),
|
|
35718
|
+
next: import_zod19.z.string().url().nullable().optional()
|
|
35436
35719
|
}).optional()
|
|
35437
35720
|
});
|
|
35438
35721
|
|
|
@@ -35518,10 +35801,10 @@ var projectRouter = {
|
|
|
35518
35801
|
return void 0;
|
|
35519
35802
|
}
|
|
35520
35803
|
const domainsData = domainsResponse ? await domainsResponse.json().catch(() => null) : null;
|
|
35521
|
-
const domainsResponseSchema =
|
|
35522
|
-
domains:
|
|
35523
|
-
id:
|
|
35524
|
-
name:
|
|
35804
|
+
const domainsResponseSchema = import_zod20.z.object({
|
|
35805
|
+
domains: import_zod20.z.array(import_zod20.z.object({
|
|
35806
|
+
id: import_zod20.z.string(),
|
|
35807
|
+
name: import_zod20.z.string()
|
|
35525
35808
|
}))
|
|
35526
35809
|
});
|
|
35527
35810
|
const parsedDomains = domainsResponseSchema.safeParse(domainsData);
|
|
@@ -35541,8 +35824,8 @@ var projectRouter = {
|
|
|
35541
35824
|
* filtered by the optional search term. Uses the OpenStack /v3/auth/projects
|
|
35542
35825
|
* endpoint which works with any valid token.
|
|
35543
35826
|
*/
|
|
35544
|
-
searchProjects: protectedProcedure.input(
|
|
35545
|
-
search:
|
|
35827
|
+
searchProjects: protectedProcedure.input(import_zod20.z.object({
|
|
35828
|
+
search: import_zod20.z.string().optional()
|
|
35546
35829
|
}).optional()).query(async ({ ctx, input }) => {
|
|
35547
35830
|
if (!ctx.openstack) {
|
|
35548
35831
|
throw new import_server16.TRPCError({
|
|
@@ -35641,16 +35924,16 @@ function validateOpenstackService(service, serviceName) {
|
|
|
35641
35924
|
__name(validateOpenstackService, "validateOpenstackService");
|
|
35642
35925
|
|
|
35643
35926
|
// src/server/Network/types/floatingIp.ts
|
|
35644
|
-
var
|
|
35927
|
+
var import_zod22 = require("zod");
|
|
35645
35928
|
|
|
35646
35929
|
// src/server/Network/types/index.ts
|
|
35647
|
-
var
|
|
35648
|
-
var ISO8601TimestampSchema =
|
|
35649
|
-
var SortDirSchema =
|
|
35930
|
+
var import_zod21 = require("zod");
|
|
35931
|
+
var ISO8601TimestampSchema = import_zod21.z.string().brand("ISO8601Timestamp");
|
|
35932
|
+
var SortDirSchema = import_zod21.z.enum([
|
|
35650
35933
|
"asc",
|
|
35651
35934
|
"desc"
|
|
35652
35935
|
]);
|
|
35653
|
-
var NetworkPortStatusSchema =
|
|
35936
|
+
var NetworkPortStatusSchema = import_zod21.z.enum([
|
|
35654
35937
|
"ACTIVE",
|
|
35655
35938
|
"DOWN",
|
|
35656
35939
|
"BUILD",
|
|
@@ -35658,154 +35941,154 @@ var NetworkPortStatusSchema = import_zod20.z.enum([
|
|
|
35658
35941
|
]);
|
|
35659
35942
|
|
|
35660
35943
|
// src/server/Network/types/floatingIp.ts
|
|
35661
|
-
var FloatingIpStatusSchema =
|
|
35944
|
+
var FloatingIpStatusSchema = import_zod22.z.enum([
|
|
35662
35945
|
"ACTIVE",
|
|
35663
35946
|
"DOWN",
|
|
35664
35947
|
"ERROR"
|
|
35665
35948
|
]);
|
|
35666
|
-
var PortDetailsSchema =
|
|
35949
|
+
var PortDetailsSchema = import_zod22.z.object({
|
|
35667
35950
|
/** The status of the port */
|
|
35668
35951
|
status: FloatingIpStatusSchema,
|
|
35669
35952
|
/** The name of the port */
|
|
35670
|
-
name:
|
|
35953
|
+
name: import_zod22.z.string(),
|
|
35671
35954
|
/** Administrative state of the port (true = UP, false = DOWN) */
|
|
35672
|
-
admin_state_up:
|
|
35955
|
+
admin_state_up: import_zod22.z.boolean(),
|
|
35673
35956
|
/** The ID of the network the port is attached to */
|
|
35674
|
-
network_id:
|
|
35957
|
+
network_id: import_zod22.z.string(),
|
|
35675
35958
|
/** The owner of the port device */
|
|
35676
|
-
device_owner:
|
|
35959
|
+
device_owner: import_zod22.z.string(),
|
|
35677
35960
|
/** The MAC address of the port */
|
|
35678
|
-
mac_address:
|
|
35961
|
+
mac_address: import_zod22.z.string(),
|
|
35679
35962
|
/** The ID of the device the port is attached to */
|
|
35680
|
-
device_id:
|
|
35963
|
+
device_id: import_zod22.z.string()
|
|
35681
35964
|
});
|
|
35682
|
-
var PortForwardingSchema =
|
|
35965
|
+
var PortForwardingSchema = import_zod22.z.object({
|
|
35683
35966
|
/** Port forwarding protocol */
|
|
35684
|
-
protocol:
|
|
35967
|
+
protocol: import_zod22.z.enum([
|
|
35685
35968
|
"tcp",
|
|
35686
35969
|
"udp"
|
|
35687
35970
|
]),
|
|
35688
35971
|
/** The internal fixed IP address associated with the port forwarding */
|
|
35689
|
-
internal_ip_address:
|
|
35972
|
+
internal_ip_address: import_zod22.z.string(),
|
|
35690
35973
|
/** The internal port number or starting port of the range */
|
|
35691
|
-
internal_port:
|
|
35974
|
+
internal_port: import_zod22.z.number().optional(),
|
|
35692
35975
|
/** The internal port range (e.g., "1024:2048") */
|
|
35693
|
-
internal_port_range:
|
|
35976
|
+
internal_port_range: import_zod22.z.string().optional(),
|
|
35694
35977
|
/** The internal port ID for the port forwarding (requires floating-ip-port-forwarding-detail extension) */
|
|
35695
|
-
internal_port_id:
|
|
35978
|
+
internal_port_id: import_zod22.z.string().optional(),
|
|
35696
35979
|
/** The external port number or starting port of the range */
|
|
35697
|
-
external_port:
|
|
35980
|
+
external_port: import_zod22.z.number().optional(),
|
|
35698
35981
|
/** The external port range (e.g., "8000:9000") */
|
|
35699
|
-
external_port_range:
|
|
35982
|
+
external_port_range: import_zod22.z.string().optional(),
|
|
35700
35983
|
/** The ID of the port forwarding resource */
|
|
35701
|
-
id:
|
|
35984
|
+
id: import_zod22.z.string(),
|
|
35702
35985
|
/** Description of the port forwarding rule (requires floating-ip-port-forwarding-description extension) */
|
|
35703
|
-
description:
|
|
35986
|
+
description: import_zod22.z.string().nullable().optional()
|
|
35704
35987
|
});
|
|
35705
|
-
var FloatingIpSchema =
|
|
35988
|
+
var FloatingIpSchema = import_zod22.z.object({
|
|
35706
35989
|
/** The ID of the router for the floating IP (null if not associated) */
|
|
35707
|
-
router_id:
|
|
35990
|
+
router_id: import_zod22.z.string().nullable(),
|
|
35708
35991
|
/** A human-readable description for the resource */
|
|
35709
|
-
description:
|
|
35992
|
+
description: import_zod22.z.string().nullable().optional(),
|
|
35710
35993
|
/** Whether this is a distributed floating IP (requires floating-ip-distributed extension) */
|
|
35711
|
-
distributed:
|
|
35994
|
+
distributed: import_zod22.z.boolean().optional(),
|
|
35712
35995
|
/** A valid DNS domain (requires dns-integration extension) */
|
|
35713
|
-
dns_domain:
|
|
35996
|
+
dns_domain: import_zod22.z.string().optional(),
|
|
35714
35997
|
/** A valid DNS name (requires dns-integration extension) */
|
|
35715
|
-
dns_name:
|
|
35998
|
+
dns_name: import_zod22.z.string().optional(),
|
|
35716
35999
|
/** Time at which the resource was created (UTC ISO8601 format, requires standard-attr-timestamp extension) */
|
|
35717
36000
|
created_at: ISO8601TimestampSchema.optional(),
|
|
35718
36001
|
/** Time at which the resource was last updated (UTC ISO8601 format, requires standard-attr-timestamp extension) */
|
|
35719
36002
|
updated_at: ISO8601TimestampSchema.optional(),
|
|
35720
36003
|
/** The revision number of the resource (set by server, for concurrency control) */
|
|
35721
|
-
revision_number:
|
|
36004
|
+
revision_number: import_zod22.z.number(),
|
|
35722
36005
|
/** The ID of the project that owns the floating IP */
|
|
35723
|
-
project_id:
|
|
36006
|
+
project_id: import_zod22.z.string(),
|
|
35724
36007
|
/** The ID of the tenant (deprecated, use project_id) */
|
|
35725
|
-
tenant_id:
|
|
36008
|
+
tenant_id: import_zod22.z.string(),
|
|
35726
36009
|
/** The ID of the network associated with the floating IP */
|
|
35727
|
-
floating_network_id:
|
|
36010
|
+
floating_network_id: import_zod22.z.string(),
|
|
35728
36011
|
/** The fixed IP address associated with the floating IP (null if not associated) */
|
|
35729
|
-
fixed_ip_address:
|
|
36012
|
+
fixed_ip_address: import_zod22.z.string().nullable(),
|
|
35730
36013
|
/** The floating IP address */
|
|
35731
|
-
floating_ip_address:
|
|
36014
|
+
floating_ip_address: import_zod22.z.string(),
|
|
35732
36015
|
/** The ID of the port associated with the floating IP (null if not associated) */
|
|
35733
|
-
port_id:
|
|
36016
|
+
port_id: import_zod22.z.string().nullable(),
|
|
35734
36017
|
/** The ID of the floating IP address */
|
|
35735
|
-
id:
|
|
36018
|
+
id: import_zod22.z.string(),
|
|
35736
36019
|
/** The status of the floating IP */
|
|
35737
36020
|
status: FloatingIpStatusSchema,
|
|
35738
36021
|
/** The information of the associated port (null if not associated, requires fip-port-details extension) */
|
|
35739
36022
|
port_details: PortDetailsSchema.nullable().optional(),
|
|
35740
36023
|
/** The list of tags on the resource (requires standard-attr-tag extension) */
|
|
35741
|
-
tags:
|
|
36024
|
+
tags: import_zod22.z.array(import_zod22.z.string()).optional(),
|
|
35742
36025
|
/** The associated port forwarding resources for the floating IP (requires expose-port-forwarding-in-fip extension) */
|
|
35743
|
-
port_forwardings:
|
|
36026
|
+
port_forwardings: import_zod22.z.array(PortForwardingSchema).nullish(),
|
|
35744
36027
|
/** The ID of the QoS policy of the network where this floating IP is plugged (requires qos-fip extension) */
|
|
35745
|
-
qos_network_policy_id:
|
|
36028
|
+
qos_network_policy_id: import_zod22.z.string().optional(),
|
|
35746
36029
|
/** The ID of the QoS policy associated with the floating IP (requires qos extension) */
|
|
35747
|
-
qos_policy_id:
|
|
35748
|
-
});
|
|
35749
|
-
var FloatingIpIdInputSchema =
|
|
35750
|
-
project_id:
|
|
35751
|
-
floatingip_id:
|
|
35752
|
-
});
|
|
35753
|
-
var FloatingIpCreateRequestSchema =
|
|
35754
|
-
tenant_id:
|
|
35755
|
-
project_id:
|
|
35756
|
-
floating_network_id:
|
|
35757
|
-
fixed_ip_address:
|
|
35758
|
-
floating_ip_address:
|
|
35759
|
-
port_id:
|
|
35760
|
-
subnet_id:
|
|
35761
|
-
distributed:
|
|
35762
|
-
description:
|
|
35763
|
-
dns_domain:
|
|
35764
|
-
dns_name:
|
|
35765
|
-
qos_policy_id:
|
|
35766
|
-
});
|
|
35767
|
-
var FloatingIpUpdateRequestSchema =
|
|
35768
|
-
project_id:
|
|
35769
|
-
floatingip_id:
|
|
35770
|
-
port_id:
|
|
35771
|
-
fixed_ip_address:
|
|
35772
|
-
description:
|
|
35773
|
-
distributed:
|
|
35774
|
-
});
|
|
35775
|
-
var FloatingIpResponseSchema =
|
|
36030
|
+
qos_policy_id: import_zod22.z.string().optional()
|
|
36031
|
+
});
|
|
36032
|
+
var FloatingIpIdInputSchema = import_zod22.z.object({
|
|
36033
|
+
project_id: import_zod22.z.string(),
|
|
36034
|
+
floatingip_id: import_zod22.z.string()
|
|
36035
|
+
});
|
|
36036
|
+
var FloatingIpCreateRequestSchema = import_zod22.z.object({
|
|
36037
|
+
tenant_id: import_zod22.z.string(),
|
|
36038
|
+
project_id: import_zod22.z.string(),
|
|
36039
|
+
floating_network_id: import_zod22.z.string(),
|
|
36040
|
+
fixed_ip_address: import_zod22.z.string().optional(),
|
|
36041
|
+
floating_ip_address: import_zod22.z.string().optional(),
|
|
36042
|
+
port_id: import_zod22.z.string().optional(),
|
|
36043
|
+
subnet_id: import_zod22.z.string().optional(),
|
|
36044
|
+
distributed: import_zod22.z.boolean().optional(),
|
|
36045
|
+
description: import_zod22.z.string().optional(),
|
|
36046
|
+
dns_domain: import_zod22.z.string().optional(),
|
|
36047
|
+
dns_name: import_zod22.z.string().optional(),
|
|
36048
|
+
qos_policy_id: import_zod22.z.string().optional()
|
|
36049
|
+
});
|
|
36050
|
+
var FloatingIpUpdateRequestSchema = import_zod22.z.object({
|
|
36051
|
+
project_id: import_zod22.z.string(),
|
|
36052
|
+
floatingip_id: import_zod22.z.string(),
|
|
36053
|
+
port_id: import_zod22.z.string().nullable(),
|
|
36054
|
+
fixed_ip_address: import_zod22.z.string().optional(),
|
|
36055
|
+
description: import_zod22.z.string().optional(),
|
|
36056
|
+
distributed: import_zod22.z.boolean().optional()
|
|
36057
|
+
});
|
|
36058
|
+
var FloatingIpResponseSchema = import_zod22.z.object({
|
|
35776
36059
|
floatingip: FloatingIpSchema
|
|
35777
36060
|
});
|
|
35778
|
-
var FloatingIpListResponseSchema =
|
|
36061
|
+
var FloatingIpListResponseSchema = import_zod22.z.object({
|
|
35779
36062
|
/** A list of floating IP objects */
|
|
35780
|
-
floatingips:
|
|
36063
|
+
floatingips: import_zod22.z.array(FloatingIpSchema)
|
|
35781
36064
|
});
|
|
35782
|
-
var FloatingIpQueryParametersSchema =
|
|
36065
|
+
var FloatingIpQueryParametersSchema = import_zod22.z.object({
|
|
35783
36066
|
/** Project ID for rescoping (required for projectScopedProcedure) */
|
|
35784
|
-
project_id:
|
|
36067
|
+
project_id: import_zod22.z.string(),
|
|
35785
36068
|
/** Filter by the ID of the floating IP */
|
|
35786
|
-
id:
|
|
36069
|
+
id: import_zod22.z.string().optional(),
|
|
35787
36070
|
/** Filter by the ID of the router for the floating IP */
|
|
35788
|
-
router_id:
|
|
36071
|
+
router_id: import_zod22.z.string().nullable().optional(),
|
|
35789
36072
|
/** Filter by the status of the floating IP */
|
|
35790
36073
|
status: FloatingIpStatusSchema.optional(),
|
|
35791
36074
|
/** Filter by the ID of the project that owns the resource */
|
|
35792
|
-
tenant_id:
|
|
36075
|
+
tenant_id: import_zod22.z.string().optional(),
|
|
35793
36076
|
/** Filter by the revision number of the resource */
|
|
35794
|
-
revision_number:
|
|
36077
|
+
revision_number: import_zod22.z.number().optional(),
|
|
35795
36078
|
/** Filter by the human-readable description of the resource */
|
|
35796
|
-
description:
|
|
36079
|
+
description: import_zod22.z.string().nullable().optional(),
|
|
35797
36080
|
/** Filter by the ID of the network associated with the floating IP */
|
|
35798
|
-
floating_network_id:
|
|
36081
|
+
floating_network_id: import_zod22.z.string().optional(),
|
|
35799
36082
|
/** Filter by the fixed IP address associated with the floating IP */
|
|
35800
|
-
fixed_ip_address:
|
|
36083
|
+
fixed_ip_address: import_zod22.z.string().optional(),
|
|
35801
36084
|
/** Filter by the floating IP address */
|
|
35802
|
-
floating_ip_address:
|
|
36085
|
+
floating_ip_address: import_zod22.z.string().optional(),
|
|
35803
36086
|
/** Filter by the ID of a port associated with the floating IP */
|
|
35804
|
-
port_id:
|
|
36087
|
+
port_id: import_zod22.z.string().nullable().optional(),
|
|
35805
36088
|
/** Sort direction (asc or desc) */
|
|
35806
36089
|
sort_dir: SortDirSchema.optional(),
|
|
35807
36090
|
/** Sort key - valid keys: fixed_ip_address, floating_ip_address, floating_network_id, id, router_id, status, tenant_id, project_id */
|
|
35808
|
-
sort_key:
|
|
36091
|
+
sort_key: import_zod22.z.enum([
|
|
35809
36092
|
"fixed_ip_address",
|
|
35810
36093
|
"floating_ip_address",
|
|
35811
36094
|
"floating_network_id",
|
|
@@ -35816,73 +36099,73 @@ var FloatingIpQueryParametersSchema = import_zod21.z.object({
|
|
|
35816
36099
|
"project_id"
|
|
35817
36100
|
]).optional(),
|
|
35818
36101
|
/** Filter by tags (comma-separated, resources must match all tags) - requires standard-attr-tag extension */
|
|
35819
|
-
tags:
|
|
36102
|
+
tags: import_zod22.z.array(import_zod22.z.string()).optional(),
|
|
35820
36103
|
/** Filter by tags with OR logic (comma-separated, resources match any tag) */
|
|
35821
|
-
"tags-any":
|
|
36104
|
+
"tags-any": import_zod22.z.string().optional(),
|
|
35822
36105
|
/** Exclude resources with these tags (comma-separated, resources must match all excluded tags) */
|
|
35823
|
-
"not-tags":
|
|
36106
|
+
"not-tags": import_zod22.z.string().optional(),
|
|
35824
36107
|
/** Exclude resources with these tags using OR logic (comma-separated, resources match any excluded tag) */
|
|
35825
|
-
"not-tags-any":
|
|
36108
|
+
"not-tags-any": import_zod22.z.string().optional(),
|
|
35826
36109
|
/** Specific fields to return (can be repeated) */
|
|
35827
|
-
fields:
|
|
35828
|
-
|
|
35829
|
-
|
|
36110
|
+
fields: import_zod22.z.union([
|
|
36111
|
+
import_zod22.z.string(),
|
|
36112
|
+
import_zod22.z.array(import_zod22.z.string())
|
|
35830
36113
|
]).optional(),
|
|
35831
36114
|
/** Pagination limit */
|
|
35832
|
-
limit:
|
|
36115
|
+
limit: import_zod22.z.number().optional(),
|
|
35833
36116
|
/** Pagination marker (ID of the last item in the previous list) */
|
|
35834
|
-
marker:
|
|
36117
|
+
marker: import_zod22.z.string().optional(),
|
|
35835
36118
|
/** Pagination direction (false = ascending, true = descending) */
|
|
35836
|
-
page_reverse:
|
|
36119
|
+
page_reverse: import_zod22.z.boolean().optional(),
|
|
35837
36120
|
// BFF-side search (filtered in BFF layer, not sent to OpenStack)
|
|
35838
|
-
searchTerm:
|
|
35839
|
-
});
|
|
35840
|
-
var ExternalNetworksQuerySchema =
|
|
35841
|
-
project_id:
|
|
35842
|
-
"router:external":
|
|
35843
|
-
});
|
|
35844
|
-
var ExternalNetworkSchema =
|
|
35845
|
-
id:
|
|
35846
|
-
name:
|
|
35847
|
-
project_id:
|
|
35848
|
-
"router:external":
|
|
35849
|
-
shared:
|
|
36121
|
+
searchTerm: import_zod22.z.string().optional()
|
|
36122
|
+
});
|
|
36123
|
+
var ExternalNetworksQuerySchema = import_zod22.z.object({
|
|
36124
|
+
project_id: import_zod22.z.string(),
|
|
36125
|
+
"router:external": import_zod22.z.literal(true).default(true)
|
|
36126
|
+
});
|
|
36127
|
+
var ExternalNetworkSchema = import_zod22.z.object({
|
|
36128
|
+
id: import_zod22.z.string(),
|
|
36129
|
+
name: import_zod22.z.string(),
|
|
36130
|
+
project_id: import_zod22.z.string(),
|
|
36131
|
+
"router:external": import_zod22.z.boolean().optional(),
|
|
36132
|
+
shared: import_zod22.z.boolean(),
|
|
35850
36133
|
status: NetworkPortStatusSchema,
|
|
35851
36134
|
updated_at: ISO8601TimestampSchema.optional(),
|
|
35852
|
-
is_default:
|
|
36135
|
+
is_default: import_zod22.z.boolean().optional()
|
|
35853
36136
|
});
|
|
35854
|
-
var ExternalNetworksResponseSchema =
|
|
35855
|
-
networks:
|
|
36137
|
+
var ExternalNetworksResponseSchema = import_zod22.z.object({
|
|
36138
|
+
networks: import_zod22.z.array(ExternalNetworkSchema)
|
|
35856
36139
|
});
|
|
35857
|
-
var DnsDomainSchema =
|
|
35858
|
-
id:
|
|
35859
|
-
name:
|
|
36140
|
+
var DnsDomainSchema = import_zod22.z.object({
|
|
36141
|
+
id: import_zod22.z.string(),
|
|
36142
|
+
name: import_zod22.z.string()
|
|
35860
36143
|
});
|
|
35861
|
-
var DnsDomainResponseSchema =
|
|
35862
|
-
zones:
|
|
36144
|
+
var DnsDomainResponseSchema = import_zod22.z.object({
|
|
36145
|
+
zones: import_zod22.z.array(DnsDomainSchema)
|
|
35863
36146
|
});
|
|
35864
|
-
var AvailablePortsQuerySchema =
|
|
35865
|
-
project_id:
|
|
36147
|
+
var AvailablePortsQuerySchema = import_zod22.z.object({
|
|
36148
|
+
project_id: import_zod22.z.string(),
|
|
35866
36149
|
/** Only ACTIVE ports are eligible for floating IP association */
|
|
35867
|
-
status:
|
|
36150
|
+
status: import_zod22.z.literal("ACTIVE").default("ACTIVE"),
|
|
35868
36151
|
/** Only administratively UP ports are eligible for floating IP association */
|
|
35869
|
-
admin_state_up:
|
|
36152
|
+
admin_state_up: import_zod22.z.literal(true).default(true)
|
|
35870
36153
|
});
|
|
35871
|
-
var AvailablePortSchema =
|
|
36154
|
+
var AvailablePortSchema = import_zod22.z.object({
|
|
35872
36155
|
/** The ID of the port */
|
|
35873
|
-
id:
|
|
36156
|
+
id: import_zod22.z.string(),
|
|
35874
36157
|
/** Human-readable name of the port */
|
|
35875
|
-
name:
|
|
36158
|
+
name: import_zod22.z.string().nullable().optional(),
|
|
35876
36159
|
/** List of fixed IPs assigned to the port, each entry pairs an IP address with its subnet. */
|
|
35877
|
-
fixed_ips:
|
|
36160
|
+
fixed_ips: import_zod22.z.array(import_zod22.z.object({
|
|
35878
36161
|
/** The fixed IP address assigned to the port */
|
|
35879
|
-
ip_address:
|
|
36162
|
+
ip_address: import_zod22.z.string(),
|
|
35880
36163
|
/** The ID of the subnet the IP belongs to */
|
|
35881
|
-
subnet_id:
|
|
36164
|
+
subnet_id: import_zod22.z.string().optional()
|
|
35882
36165
|
})).optional()
|
|
35883
36166
|
});
|
|
35884
|
-
var AvailablePortsResponseSchema =
|
|
35885
|
-
ports:
|
|
36167
|
+
var AvailablePortsResponseSchema = import_zod22.z.object({
|
|
36168
|
+
ports: import_zod22.z.array(AvailablePortSchema)
|
|
35886
36169
|
});
|
|
35887
36170
|
|
|
35888
36171
|
// src/server/Network/helpers/errorHandling.ts
|
|
@@ -36129,110 +36412,110 @@ var floatingIpRouter = {
|
|
|
36129
36412
|
};
|
|
36130
36413
|
|
|
36131
36414
|
// src/server/Network/types/securityGroup.ts
|
|
36132
|
-
var
|
|
36133
|
-
var securityGroupRuleSchema =
|
|
36134
|
-
id:
|
|
36135
|
-
direction:
|
|
36415
|
+
var import_zod23 = require("zod");
|
|
36416
|
+
var securityGroupRuleSchema = import_zod23.z.object({
|
|
36417
|
+
id: import_zod23.z.string(),
|
|
36418
|
+
direction: import_zod23.z.enum([
|
|
36136
36419
|
"ingress",
|
|
36137
36420
|
"egress"
|
|
36138
36421
|
]).optional(),
|
|
36139
|
-
ethertype:
|
|
36422
|
+
ethertype: import_zod23.z.enum([
|
|
36140
36423
|
"IPv4",
|
|
36141
36424
|
"IPv6"
|
|
36142
36425
|
]).optional(),
|
|
36143
|
-
description:
|
|
36144
|
-
security_group_id:
|
|
36145
|
-
protocol:
|
|
36146
|
-
port_range_min:
|
|
36147
|
-
port_range_max:
|
|
36148
|
-
remote_ip_prefix:
|
|
36149
|
-
remote_group_id:
|
|
36150
|
-
remote_address_group_id:
|
|
36151
|
-
tenant_id:
|
|
36152
|
-
project_id:
|
|
36153
|
-
revision_number:
|
|
36154
|
-
tags:
|
|
36155
|
-
created_at:
|
|
36156
|
-
updated_at:
|
|
36157
|
-
});
|
|
36158
|
-
var securityGroupSchema = import_zod22.z.object({
|
|
36159
|
-
id: import_zod22.z.string(),
|
|
36160
|
-
name: import_zod22.z.string().nullable().optional(),
|
|
36161
|
-
description: import_zod22.z.string().nullable().optional(),
|
|
36162
|
-
tenant_id: import_zod22.z.string().nullable().optional(),
|
|
36163
|
-
project_id: import_zod22.z.string().nullable().optional(),
|
|
36164
|
-
stateful: import_zod22.z.boolean().optional(),
|
|
36165
|
-
shared: import_zod22.z.boolean().optional(),
|
|
36166
|
-
tags: import_zod22.z.array(import_zod22.z.string()).optional(),
|
|
36167
|
-
security_group_rules: import_zod22.z.array(securityGroupRuleSchema).optional(),
|
|
36168
|
-
revision_number: import_zod22.z.number().optional(),
|
|
36169
|
-
created_at: import_zod22.z.string().optional(),
|
|
36170
|
-
updated_at: import_zod22.z.string().nullable().optional()
|
|
36171
|
-
});
|
|
36172
|
-
var securityGroupsResponseSchema = import_zod22.z.object({
|
|
36173
|
-
security_groups: import_zod22.z.array(securityGroupSchema)
|
|
36426
|
+
description: import_zod23.z.string().nullable().optional(),
|
|
36427
|
+
security_group_id: import_zod23.z.string().optional(),
|
|
36428
|
+
protocol: import_zod23.z.string().nullable().optional(),
|
|
36429
|
+
port_range_min: import_zod23.z.number().nullable().optional(),
|
|
36430
|
+
port_range_max: import_zod23.z.number().nullable().optional(),
|
|
36431
|
+
remote_ip_prefix: import_zod23.z.string().nullable().optional(),
|
|
36432
|
+
remote_group_id: import_zod23.z.string().nullable().optional(),
|
|
36433
|
+
remote_address_group_id: import_zod23.z.string().nullable().optional(),
|
|
36434
|
+
tenant_id: import_zod23.z.string().nullable().optional(),
|
|
36435
|
+
project_id: import_zod23.z.string().nullable().optional(),
|
|
36436
|
+
revision_number: import_zod23.z.number().optional(),
|
|
36437
|
+
tags: import_zod23.z.array(import_zod23.z.string()).optional(),
|
|
36438
|
+
created_at: import_zod23.z.string().optional(),
|
|
36439
|
+
updated_at: import_zod23.z.string().nullable().optional()
|
|
36174
36440
|
});
|
|
36175
|
-
var
|
|
36441
|
+
var securityGroupSchema = import_zod23.z.object({
|
|
36442
|
+
id: import_zod23.z.string(),
|
|
36443
|
+
name: import_zod23.z.string().nullable().optional(),
|
|
36444
|
+
description: import_zod23.z.string().nullable().optional(),
|
|
36445
|
+
tenant_id: import_zod23.z.string().nullable().optional(),
|
|
36446
|
+
project_id: import_zod23.z.string().nullable().optional(),
|
|
36447
|
+
stateful: import_zod23.z.boolean().optional(),
|
|
36448
|
+
shared: import_zod23.z.boolean().optional(),
|
|
36449
|
+
tags: import_zod23.z.array(import_zod23.z.string()).optional(),
|
|
36450
|
+
security_group_rules: import_zod23.z.array(securityGroupRuleSchema).optional(),
|
|
36451
|
+
revision_number: import_zod23.z.number().optional(),
|
|
36452
|
+
created_at: import_zod23.z.string().optional(),
|
|
36453
|
+
updated_at: import_zod23.z.string().nullable().optional()
|
|
36454
|
+
});
|
|
36455
|
+
var securityGroupsResponseSchema = import_zod23.z.object({
|
|
36456
|
+
security_groups: import_zod23.z.array(securityGroupSchema)
|
|
36457
|
+
});
|
|
36458
|
+
var securityGroupResponseSchema = import_zod23.z.object({
|
|
36176
36459
|
security_group: securityGroupSchema
|
|
36177
36460
|
});
|
|
36178
|
-
var securityGroupRuleResponseSchema =
|
|
36461
|
+
var securityGroupRuleResponseSchema = import_zod23.z.object({
|
|
36179
36462
|
security_group_rule: securityGroupRuleSchema
|
|
36180
36463
|
});
|
|
36181
36464
|
var listSecurityGroupsInputSchema = projectScopedInputSchema.extend({
|
|
36182
36465
|
// Sorting
|
|
36183
|
-
sort_key:
|
|
36466
|
+
sort_key: import_zod23.z.string().optional(),
|
|
36184
36467
|
sort_dir: SortDirSchema.optional(),
|
|
36185
36468
|
// Basic filtering
|
|
36186
|
-
name:
|
|
36187
|
-
description:
|
|
36188
|
-
tenant_id:
|
|
36189
|
-
shared:
|
|
36469
|
+
name: import_zod23.z.string().optional(),
|
|
36470
|
+
description: import_zod23.z.string().optional(),
|
|
36471
|
+
tenant_id: import_zod23.z.string().optional(),
|
|
36472
|
+
shared: import_zod23.z.boolean().optional(),
|
|
36190
36473
|
// Tag-based filtering (string values follow Neutron semantics)
|
|
36191
|
-
tags:
|
|
36192
|
-
tags_any:
|
|
36193
|
-
not_tags:
|
|
36194
|
-
not_tags_any:
|
|
36474
|
+
tags: import_zod23.z.string().optional(),
|
|
36475
|
+
tags_any: import_zod23.z.string().optional(),
|
|
36476
|
+
not_tags: import_zod23.z.string().optional(),
|
|
36477
|
+
not_tags_any: import_zod23.z.string().optional(),
|
|
36195
36478
|
// BFF-side search (filtered in BFF layer, not sent to OpenStack)
|
|
36196
|
-
searchTerm:
|
|
36479
|
+
searchTerm: import_zod23.z.string().optional()
|
|
36197
36480
|
});
|
|
36198
36481
|
var getSecurityGroupByIdInputSchema = projectScopedInputSchema.extend({
|
|
36199
|
-
securityGroupId:
|
|
36482
|
+
securityGroupId: import_zod23.z.string()
|
|
36200
36483
|
});
|
|
36201
36484
|
var createSecurityGroupInputSchema = projectScopedInputSchema.extend({
|
|
36202
|
-
name:
|
|
36203
|
-
description:
|
|
36204
|
-
stateful:
|
|
36485
|
+
name: import_zod23.z.string().min(1, "Name is required"),
|
|
36486
|
+
description: import_zod23.z.string().optional(),
|
|
36487
|
+
stateful: import_zod23.z.boolean().optional()
|
|
36205
36488
|
});
|
|
36206
36489
|
var deleteSecurityGroupInputSchema = projectScopedInputSchema.extend({
|
|
36207
|
-
securityGroupId:
|
|
36490
|
+
securityGroupId: import_zod23.z.string()
|
|
36208
36491
|
});
|
|
36209
36492
|
var updateSecurityGroupInputSchema = projectScopedInputSchema.extend({
|
|
36210
|
-
securityGroupId:
|
|
36211
|
-
name:
|
|
36212
|
-
description:
|
|
36213
|
-
stateful:
|
|
36493
|
+
securityGroupId: import_zod23.z.string(),
|
|
36494
|
+
name: import_zod23.z.string().min(1, "Name is required").optional(),
|
|
36495
|
+
description: import_zod23.z.string().optional(),
|
|
36496
|
+
stateful: import_zod23.z.boolean().optional()
|
|
36214
36497
|
});
|
|
36215
36498
|
var deleteSecurityGroupRuleInputSchema = projectScopedInputSchema.extend({
|
|
36216
|
-
ruleId:
|
|
36499
|
+
ruleId: import_zod23.z.string()
|
|
36217
36500
|
});
|
|
36218
36501
|
var createSecurityGroupRuleInputSchema = projectScopedInputSchema.extend({
|
|
36219
|
-
security_group_id:
|
|
36220
|
-
direction:
|
|
36502
|
+
security_group_id: import_zod23.z.string(),
|
|
36503
|
+
direction: import_zod23.z.enum([
|
|
36221
36504
|
"ingress",
|
|
36222
36505
|
"egress"
|
|
36223
36506
|
]),
|
|
36224
|
-
ethertype:
|
|
36507
|
+
ethertype: import_zod23.z.enum([
|
|
36225
36508
|
"IPv4",
|
|
36226
36509
|
"IPv6"
|
|
36227
36510
|
]).default("IPv4"),
|
|
36228
|
-
description:
|
|
36229
|
-
protocol:
|
|
36230
|
-
port_range_min:
|
|
36231
|
-
port_range_max:
|
|
36511
|
+
description: import_zod23.z.string().optional(),
|
|
36512
|
+
protocol: import_zod23.z.string().nullable().optional(),
|
|
36513
|
+
port_range_min: import_zod23.z.number().int().max(65535).nullable().optional(),
|
|
36514
|
+
port_range_max: import_zod23.z.number().int().max(65535).nullable().optional(),
|
|
36232
36515
|
// Transform empty strings to undefined for proper validation
|
|
36233
|
-
remote_ip_prefix:
|
|
36234
|
-
remote_group_id:
|
|
36235
|
-
remote_address_group_id:
|
|
36516
|
+
remote_ip_prefix: import_zod23.z.string().nullable().optional().transform((val) => val === "" ? void 0 : val),
|
|
36517
|
+
remote_group_id: import_zod23.z.string().nullable().optional().transform((val) => val === "" ? void 0 : val),
|
|
36518
|
+
remote_address_group_id: import_zod23.z.string().nullable().optional().transform((val) => val === "" ? void 0 : val)
|
|
36236
36519
|
});
|
|
36237
36520
|
|
|
36238
36521
|
// src/server/Network/helpers/securityGroupHelpers.ts
|
|
@@ -36750,42 +37033,42 @@ var securityGroupRuleRouter = {
|
|
|
36750
37033
|
};
|
|
36751
37034
|
|
|
36752
37035
|
// src/server/Network/types/rbacPolicy.ts
|
|
36753
|
-
var
|
|
36754
|
-
var rbacPolicySchema =
|
|
36755
|
-
id:
|
|
36756
|
-
object_type:
|
|
37036
|
+
var import_zod24 = require("zod");
|
|
37037
|
+
var rbacPolicySchema = import_zod24.z.object({
|
|
37038
|
+
id: import_zod24.z.string(),
|
|
37039
|
+
object_type: import_zod24.z.enum([
|
|
36757
37040
|
"qos_policy",
|
|
36758
37041
|
"network",
|
|
36759
37042
|
"security_group"
|
|
36760
37043
|
]),
|
|
36761
|
-
object_id:
|
|
36762
|
-
action:
|
|
37044
|
+
object_id: import_zod24.z.string(),
|
|
37045
|
+
action: import_zod24.z.enum([
|
|
36763
37046
|
"access_as_shared",
|
|
36764
37047
|
"access_as_external"
|
|
36765
37048
|
]),
|
|
36766
|
-
target_tenant:
|
|
36767
|
-
tenant_id:
|
|
36768
|
-
project_id:
|
|
37049
|
+
target_tenant: import_zod24.z.string(),
|
|
37050
|
+
tenant_id: import_zod24.z.string().nullable().optional(),
|
|
37051
|
+
project_id: import_zod24.z.string().nullable().optional()
|
|
36769
37052
|
});
|
|
36770
|
-
var rbacPoliciesResponseSchema =
|
|
36771
|
-
rbac_policies:
|
|
37053
|
+
var rbacPoliciesResponseSchema = import_zod24.z.object({
|
|
37054
|
+
rbac_policies: import_zod24.z.array(rbacPolicySchema)
|
|
36772
37055
|
});
|
|
36773
|
-
var rbacPolicyResponseSchema =
|
|
37056
|
+
var rbacPolicyResponseSchema = import_zod24.z.object({
|
|
36774
37057
|
rbac_policy: rbacPolicySchema
|
|
36775
37058
|
});
|
|
36776
37059
|
var listRBACPoliciesForSecurityGroupInputSchema = projectScopedInputSchema.extend({
|
|
36777
|
-
securityGroupId:
|
|
37060
|
+
securityGroupId: import_zod24.z.string()
|
|
36778
37061
|
});
|
|
36779
37062
|
var createRBACPolicyInputSchema = projectScopedInputSchema.extend({
|
|
36780
|
-
securityGroupId:
|
|
36781
|
-
targetTenant:
|
|
37063
|
+
securityGroupId: import_zod24.z.string(),
|
|
37064
|
+
targetTenant: import_zod24.z.string().trim().min(1, "Target project ID is required")
|
|
36782
37065
|
});
|
|
36783
37066
|
var updateRBACPolicyInputSchema = projectScopedInputSchema.extend({
|
|
36784
|
-
policyId:
|
|
36785
|
-
targetTenant:
|
|
37067
|
+
policyId: import_zod24.z.string(),
|
|
37068
|
+
targetTenant: import_zod24.z.string().trim().min(1, "Target project ID is required")
|
|
36786
37069
|
});
|
|
36787
37070
|
var deleteRBACPolicyInputSchema = projectScopedInputSchema.extend({
|
|
36788
|
-
policyId:
|
|
37071
|
+
policyId: import_zod24.z.string()
|
|
36789
37072
|
});
|
|
36790
37073
|
|
|
36791
37074
|
// src/server/Network/helpers/rbacPolicyHelpers.ts
|
|
@@ -37241,128 +37524,128 @@ var buildNetworkRouters = /* @__PURE__ */ __name((policyDir) => ({
|
|
|
37241
37524
|
}), "buildNetworkRouters");
|
|
37242
37525
|
|
|
37243
37526
|
// src/server/Services/types/pca.ts
|
|
37244
|
-
var
|
|
37245
|
-
var CertificateValiditySchema =
|
|
37246
|
-
not_after:
|
|
37247
|
-
not_before:
|
|
37527
|
+
var import_zod25 = require("zod");
|
|
37528
|
+
var CertificateValiditySchema = import_zod25.z.object({
|
|
37529
|
+
not_after: import_zod25.z.number().int(),
|
|
37530
|
+
not_before: import_zod25.z.number().int().optional()
|
|
37248
37531
|
});
|
|
37249
|
-
var CertificateAuthorityCertificateSchema =
|
|
37532
|
+
var CertificateAuthorityCertificateSchema = import_zod25.z.object({
|
|
37250
37533
|
/** PEM encoded certificate data. */
|
|
37251
|
-
pem:
|
|
37534
|
+
pem: import_zod25.z.string(),
|
|
37252
37535
|
validity: CertificateValiditySchema
|
|
37253
37536
|
});
|
|
37254
|
-
var CertificateAuthorityCertificateChainSchema =
|
|
37255
|
-
certificates:
|
|
37256
|
-
pem:
|
|
37537
|
+
var CertificateAuthorityCertificateChainSchema = import_zod25.z.object({
|
|
37538
|
+
certificates: import_zod25.z.array(import_zod25.z.object({
|
|
37539
|
+
pem: import_zod25.z.string()
|
|
37257
37540
|
})),
|
|
37258
37541
|
/** Concatenated PEM certificates of the chain. */
|
|
37259
|
-
pem:
|
|
37542
|
+
pem: import_zod25.z.string()
|
|
37260
37543
|
});
|
|
37261
|
-
var CertificateAuthorityAdditionalAttributeSchema =
|
|
37544
|
+
var CertificateAuthorityAdditionalAttributeSchema = import_zod25.z.object({
|
|
37262
37545
|
/** ASN.1 Object Identifier of the attribute */
|
|
37263
|
-
key:
|
|
37264
|
-
value:
|
|
37546
|
+
key: import_zod25.z.array(import_zod25.z.number().int()),
|
|
37547
|
+
value: import_zod25.z.string()
|
|
37265
37548
|
});
|
|
37266
|
-
var CertificateAuthoritySubjectSchema =
|
|
37267
|
-
additional_attribute:
|
|
37549
|
+
var CertificateAuthoritySubjectSchema = import_zod25.z.object({
|
|
37550
|
+
additional_attribute: import_zod25.z.array(CertificateAuthorityAdditionalAttributeSchema).optional(),
|
|
37268
37551
|
/** Typically domain name */
|
|
37269
|
-
common_name:
|
|
37552
|
+
common_name: import_zod25.z.string(),
|
|
37270
37553
|
/** Country codes (ISO 3166-1 alpha-2). */
|
|
37271
|
-
country:
|
|
37554
|
+
country: import_zod25.z.array(import_zod25.z.string()).optional(),
|
|
37272
37555
|
/** Locality/city names. */
|
|
37273
|
-
locality:
|
|
37556
|
+
locality: import_zod25.z.array(import_zod25.z.string()).optional(),
|
|
37274
37557
|
/** Organization names. */
|
|
37275
|
-
organization:
|
|
37558
|
+
organization: import_zod25.z.array(import_zod25.z.string()).optional(),
|
|
37276
37559
|
/** Organizational unit names. */
|
|
37277
|
-
organizational_unit:
|
|
37560
|
+
organizational_unit: import_zod25.z.array(import_zod25.z.string()).optional(),
|
|
37278
37561
|
/** Postal/ZIP codes. */
|
|
37279
|
-
postal_code:
|
|
37562
|
+
postal_code: import_zod25.z.array(import_zod25.z.string()).optional(),
|
|
37280
37563
|
/** State or province names. */
|
|
37281
|
-
province:
|
|
37282
|
-
serial_number:
|
|
37283
|
-
street_address:
|
|
37564
|
+
province: import_zod25.z.array(import_zod25.z.string()).optional(),
|
|
37565
|
+
serial_number: import_zod25.z.string().optional(),
|
|
37566
|
+
street_address: import_zod25.z.array(import_zod25.z.string()).optional()
|
|
37284
37567
|
});
|
|
37285
|
-
var CertificateAuthorityStateSchema =
|
|
37568
|
+
var CertificateAuthorityStateSchema = import_zod25.z.enum([
|
|
37286
37569
|
"CREATING",
|
|
37287
37570
|
"AWAITING_CERTIFICATE",
|
|
37288
37571
|
"READY",
|
|
37289
37572
|
"FAILED",
|
|
37290
37573
|
"UNEXPECTED"
|
|
37291
37574
|
]);
|
|
37292
|
-
var CertificateAuthoritySchema =
|
|
37575
|
+
var CertificateAuthoritySchema = import_zod25.z.object({
|
|
37293
37576
|
certificate: CertificateAuthorityCertificateSchema.optional(),
|
|
37294
37577
|
/** Details of Certificate Authority certificate's issuers chain. */
|
|
37295
37578
|
certificate_chain: CertificateAuthorityCertificateChainSchema.optional(),
|
|
37296
|
-
configuration:
|
|
37579
|
+
configuration: import_zod25.z.object({
|
|
37297
37580
|
/** X.509 subject of Certificate Authority. Required on create operation. */
|
|
37298
37581
|
subject: CertificateAuthoritySubjectSchema
|
|
37299
37582
|
}).optional(),
|
|
37300
|
-
csr:
|
|
37301
|
-
id:
|
|
37583
|
+
csr: import_zod25.z.string().optional(),
|
|
37584
|
+
id: import_zod25.z.string(),
|
|
37302
37585
|
/**
|
|
37303
37586
|
* Required on import certificate operation.
|
|
37304
37587
|
* Certificate Authority certificate chain, in PEM format. Consists of concatenated string
|
|
37305
37588
|
* of Certificate Authority certificate, followed by its intermediate issuing CAs certificates
|
|
37306
37589
|
* and root issuing CA certificate last.
|
|
37307
37590
|
*/
|
|
37308
|
-
imported_certificate_chain:
|
|
37591
|
+
imported_certificate_chain: import_zod25.z.string().optional(),
|
|
37309
37592
|
/** Identifier of OpenStack project that Certificate Authority belongs. */
|
|
37310
|
-
project_id:
|
|
37593
|
+
project_id: import_zod25.z.string(),
|
|
37311
37594
|
/** Current operational state of Certificate Authority. */
|
|
37312
37595
|
state: CertificateAuthorityStateSchema
|
|
37313
37596
|
});
|
|
37314
|
-
var LinkSchema =
|
|
37315
|
-
href:
|
|
37316
|
-
rel:
|
|
37597
|
+
var LinkSchema = import_zod25.z.object({
|
|
37598
|
+
href: import_zod25.z.string(),
|
|
37599
|
+
rel: import_zod25.z.string()
|
|
37317
37600
|
});
|
|
37318
|
-
var CertificateAuthoritiesListSchema =
|
|
37319
|
-
certificate_authorities:
|
|
37320
|
-
links:
|
|
37321
|
-
next_page_marker:
|
|
37601
|
+
var CertificateAuthoritiesListSchema = import_zod25.z.object({
|
|
37602
|
+
certificate_authorities: import_zod25.z.array(CertificateAuthoritySchema),
|
|
37603
|
+
links: import_zod25.z.array(LinkSchema),
|
|
37604
|
+
next_page_marker: import_zod25.z.string().optional()
|
|
37322
37605
|
});
|
|
37323
37606
|
var CertificateAuthoritiesListInputSchema = projectScopedInputSchema.extend({
|
|
37324
|
-
limit:
|
|
37325
|
-
next_page_marker:
|
|
37607
|
+
limit: import_zod25.z.number().int().min(1).max(1e3).optional(),
|
|
37608
|
+
next_page_marker: import_zod25.z.string().trim().min(1).optional()
|
|
37326
37609
|
});
|
|
37327
|
-
var CertificateAuthorityCreateSchema =
|
|
37328
|
-
configuration:
|
|
37610
|
+
var CertificateAuthorityCreateSchema = import_zod25.z.object({
|
|
37611
|
+
configuration: import_zod25.z.object({
|
|
37329
37612
|
subject: CertificateAuthoritySubjectSchema
|
|
37330
37613
|
})
|
|
37331
37614
|
});
|
|
37332
37615
|
var CertificateAuthorityIdInputSchema = projectScopedInputSchema.extend({
|
|
37333
|
-
certificate_authority_id:
|
|
37616
|
+
certificate_authority_id: import_zod25.z.string().min(1)
|
|
37334
37617
|
});
|
|
37335
37618
|
var CertificateAuthorityCertificatesListInputSchema = CertificateAuthorityIdInputSchema.extend({
|
|
37336
|
-
limit:
|
|
37337
|
-
next_page_marker:
|
|
37619
|
+
limit: import_zod25.z.number().int().min(1).max(1e3).optional(),
|
|
37620
|
+
next_page_marker: import_zod25.z.string().trim().min(1).optional()
|
|
37338
37621
|
});
|
|
37339
37622
|
var CertificateAuthorityImportInputSchema = CertificateAuthorityIdInputSchema.extend({
|
|
37340
|
-
imported_certificate_chain:
|
|
37623
|
+
imported_certificate_chain: import_zod25.z.string().min(1)
|
|
37341
37624
|
});
|
|
37342
37625
|
var CertificateIdInputSchema = CertificateAuthorityIdInputSchema.extend({
|
|
37343
|
-
certificate_id:
|
|
37626
|
+
certificate_id: import_zod25.z.string().min(1)
|
|
37344
37627
|
});
|
|
37345
|
-
var CertificateConfigurationSchema =
|
|
37628
|
+
var CertificateConfigurationSchema = import_zod25.z.object({
|
|
37346
37629
|
validity: CertificateValiditySchema
|
|
37347
37630
|
});
|
|
37348
37631
|
var CreateCertificateInputSchema = projectScopedInputSchema.extend({
|
|
37349
|
-
certificate_authority_id:
|
|
37350
|
-
csr:
|
|
37632
|
+
certificate_authority_id: import_zod25.z.string().min(1),
|
|
37633
|
+
csr: import_zod25.z.string().min(1),
|
|
37351
37634
|
configuration: CertificateConfigurationSchema
|
|
37352
37635
|
});
|
|
37353
|
-
var CertificateSchema =
|
|
37636
|
+
var CertificateSchema = import_zod25.z.object({
|
|
37354
37637
|
certificate: CertificateAuthorityCertificateSchema.optional(),
|
|
37355
|
-
certificate_authority_id:
|
|
37638
|
+
certificate_authority_id: import_zod25.z.string(),
|
|
37356
37639
|
certificate_chain: CertificateAuthorityCertificateChainSchema.optional(),
|
|
37357
37640
|
configuration: CertificateConfigurationSchema.optional(),
|
|
37358
|
-
csr:
|
|
37359
|
-
id:
|
|
37360
|
-
project_id:
|
|
37641
|
+
csr: import_zod25.z.string().optional(),
|
|
37642
|
+
id: import_zod25.z.string(),
|
|
37643
|
+
project_id: import_zod25.z.string()
|
|
37361
37644
|
});
|
|
37362
|
-
var CertificatesListSchema =
|
|
37363
|
-
certificates:
|
|
37364
|
-
links:
|
|
37365
|
-
next_page_marker:
|
|
37645
|
+
var CertificatesListSchema = import_zod25.z.object({
|
|
37646
|
+
certificates: import_zod25.z.array(CertificateSchema),
|
|
37647
|
+
links: import_zod25.z.array(LinkSchema),
|
|
37648
|
+
next_page_marker: import_zod25.z.string().optional()
|
|
37366
37649
|
});
|
|
37367
37650
|
|
|
37368
37651
|
// src/server/Services/routers/pcaRouter.ts
|
|
@@ -37781,7 +38064,7 @@ __name(createContext, "createContext");
|
|
|
37781
38064
|
// src/server/server.ts
|
|
37782
38065
|
var import_path2 = __toESM(require("path"));
|
|
37783
38066
|
var import_node_stream3 = require("stream");
|
|
37784
|
-
var
|
|
38067
|
+
var import_zod26 = require("zod");
|
|
37785
38068
|
|
|
37786
38069
|
// src/server/aurora-fastify-plugins/csrfProtection.ts
|
|
37787
38070
|
var import_csrf_protection = __toESM(require("@fastify/csrf-protection"));
|
|
@@ -37989,7 +38272,7 @@ async function createServer(config) {
|
|
|
37989
38272
|
router: appRouter,
|
|
37990
38273
|
createContext: /* @__PURE__ */ __name((opts) => createContext(opts, contextConfig), "createContext"),
|
|
37991
38274
|
onError: /* @__PURE__ */ __name((err) => {
|
|
37992
|
-
if (err.error.cause instanceof
|
|
38275
|
+
if (err.error.cause instanceof import_zod26.ZodError) err.error.message = err.error.cause.issues.map((e) => e.message).join(",");
|
|
37993
38276
|
}, "onError")
|
|
37994
38277
|
}
|
|
37995
38278
|
});
|