@cobaltcore-dev/aurora 0.2.1 → 0.2.2
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/{_pcaId-DWHfvMhT.mjs → _pcaId-Bck7S7gJ.mjs} +2 -2
- package/dist/client/{_pcaId-DWHfvMhT.mjs.map → _pcaId-Bck7S7gJ.mjs.map} +1 -1
- package/dist/client/_pcaId-CFuKY82d.mjs +369 -0
- package/dist/client/_pcaId-CFuKY82d.mjs.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.js.map +1 -1
- package/dist/client/trpcClient-BxguzNYF.mjs.map +1 -1
- package/dist/server/index.js +624 -306
- package/package.json +2 -2
- package/dist/client/_pcaId-r2BTjN9y.mjs +0 -242
- package/dist/client/_pcaId-r2BTjN9y.mjs.map +0 -1
package/dist/server/index.js
CHANGED
|
@@ -27677,7 +27677,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
27677
27677
|
var import_fastify = __toESM(require("fastify"));
|
|
27678
27678
|
var import_static = __toESM(require("@fastify/static"));
|
|
27679
27679
|
var import_vite = __toESM(require("@fastify/vite"));
|
|
27680
|
-
var
|
|
27680
|
+
var import_cookie2 = __toESM(require("@fastify/cookie"));
|
|
27681
27681
|
var import_helmet = __toESM(require("@fastify/helmet"));
|
|
27682
27682
|
var import_rate_limit = __toESM(require("@fastify/rate-limit"));
|
|
27683
27683
|
var import_multipart = __toESM(require("@fastify/multipart"));
|
|
@@ -33251,9 +33251,12 @@ var S3_ERROR_MAP = {
|
|
|
33251
33251
|
NoSuchBucket: "NOT_FOUND",
|
|
33252
33252
|
NoSuchKey: "NOT_FOUND",
|
|
33253
33253
|
NoSuchUpload: "NOT_FOUND",
|
|
33254
|
+
NoSuchVersion: "NOT_FOUND",
|
|
33254
33255
|
BucketAlreadyExists: "CONFLICT",
|
|
33255
33256
|
BucketAlreadyOwnedByYou: "CONFLICT",
|
|
33256
33257
|
BucketNotEmpty: "PRECONDITION_FAILED",
|
|
33258
|
+
InvalidBucketState: "BAD_REQUEST",
|
|
33259
|
+
VersioningNotEnabled: "PRECONDITION_FAILED",
|
|
33257
33260
|
AccessDenied: "FORBIDDEN",
|
|
33258
33261
|
AllAccessDisabled: "FORBIDDEN",
|
|
33259
33262
|
InvalidAccessKeyId: "UNAUTHORIZED",
|
|
@@ -34046,6 +34049,324 @@ var ec2CredentialRouter = {
|
|
|
34046
34049
|
})
|
|
34047
34050
|
};
|
|
34048
34051
|
|
|
34052
|
+
// src/server/Storage/routers/ceph/versioningRouter.ts
|
|
34053
|
+
var import_client_s34 = require("@aws-sdk/client-s3");
|
|
34054
|
+
|
|
34055
|
+
// src/server/Storage/types/versioning.ts
|
|
34056
|
+
var import_zod16 = require("zod");
|
|
34057
|
+
var versioningStatusSchema = import_zod16.z.object({
|
|
34058
|
+
status: import_zod16.z.enum([
|
|
34059
|
+
"Enabled",
|
|
34060
|
+
"Suspended",
|
|
34061
|
+
"Unversioned"
|
|
34062
|
+
]),
|
|
34063
|
+
mfaDelete: import_zod16.z.enum([
|
|
34064
|
+
"Enabled",
|
|
34065
|
+
"Disabled"
|
|
34066
|
+
]).optional()
|
|
34067
|
+
});
|
|
34068
|
+
var setVersioningInputSchema = projectScopedInputSchema.extend({
|
|
34069
|
+
bucket: import_zod16.z.string().min(1),
|
|
34070
|
+
status: import_zod16.z.enum([
|
|
34071
|
+
"Enabled",
|
|
34072
|
+
"Suspended"
|
|
34073
|
+
])
|
|
34074
|
+
});
|
|
34075
|
+
var getVersioningStatusInputSchema = projectScopedInputSchema.extend({
|
|
34076
|
+
bucket: import_zod16.z.string().min(1)
|
|
34077
|
+
});
|
|
34078
|
+
var objectVersionSchema = import_zod16.z.object({
|
|
34079
|
+
key: import_zod16.z.string(),
|
|
34080
|
+
versionId: import_zod16.z.string(),
|
|
34081
|
+
isLatest: import_zod16.z.boolean(),
|
|
34082
|
+
lastModified: import_zod16.z.string(),
|
|
34083
|
+
size: import_zod16.z.number(),
|
|
34084
|
+
storageClass: import_zod16.z.string().optional(),
|
|
34085
|
+
owner: import_zod16.z.object({
|
|
34086
|
+
displayName: import_zod16.z.string().optional(),
|
|
34087
|
+
id: import_zod16.z.string().optional()
|
|
34088
|
+
}).optional(),
|
|
34089
|
+
etag: import_zod16.z.string().optional(),
|
|
34090
|
+
isDeleteMarker: import_zod16.z.boolean().default(false)
|
|
34091
|
+
});
|
|
34092
|
+
var listVersionsInputSchema = projectScopedInputSchema.extend({
|
|
34093
|
+
bucket: import_zod16.z.string().min(1),
|
|
34094
|
+
prefix: import_zod16.z.string().optional(),
|
|
34095
|
+
keyMarker: import_zod16.z.string().optional(),
|
|
34096
|
+
versionIdMarker: import_zod16.z.string().optional(),
|
|
34097
|
+
maxKeys: import_zod16.z.number().int().positive().max(1e3).optional()
|
|
34098
|
+
});
|
|
34099
|
+
var listVersionsOutputSchema = import_zod16.z.object({
|
|
34100
|
+
versions: import_zod16.z.array(objectVersionSchema),
|
|
34101
|
+
deleteMarkers: import_zod16.z.array(objectVersionSchema),
|
|
34102
|
+
isTruncated: import_zod16.z.boolean(),
|
|
34103
|
+
nextKeyMarker: import_zod16.z.string().optional(),
|
|
34104
|
+
nextVersionIdMarker: import_zod16.z.string().optional(),
|
|
34105
|
+
prefix: import_zod16.z.string().optional(),
|
|
34106
|
+
maxKeys: import_zod16.z.number().optional()
|
|
34107
|
+
});
|
|
34108
|
+
var deleteVersionInputSchema = projectScopedInputSchema.extend({
|
|
34109
|
+
bucket: import_zod16.z.string().min(1),
|
|
34110
|
+
key: import_zod16.z.string().min(1),
|
|
34111
|
+
versionId: import_zod16.z.string().min(1)
|
|
34112
|
+
});
|
|
34113
|
+
var restoreVersionInputSchema = projectScopedInputSchema.extend({
|
|
34114
|
+
bucket: import_zod16.z.string().min(1),
|
|
34115
|
+
key: import_zod16.z.string().min(1),
|
|
34116
|
+
versionId: import_zod16.z.string().min(1)
|
|
34117
|
+
});
|
|
34118
|
+
var restoreVersionOutputSchema = import_zod16.z.object({
|
|
34119
|
+
success: import_zod16.z.boolean(),
|
|
34120
|
+
versionId: import_zod16.z.string()
|
|
34121
|
+
});
|
|
34122
|
+
var listObjectVersionsInputSchema = projectScopedInputSchema.extend({
|
|
34123
|
+
bucket: import_zod16.z.string().min(1),
|
|
34124
|
+
key: import_zod16.z.string().min(1)
|
|
34125
|
+
});
|
|
34126
|
+
|
|
34127
|
+
// src/server/Storage/routers/ceph/versioningRouter.ts
|
|
34128
|
+
var versioningRouter = {
|
|
34129
|
+
/**
|
|
34130
|
+
* Get versioning status for a bucket.
|
|
34131
|
+
*
|
|
34132
|
+
* Returns whether versioning is Enabled, Suspended, or Unversioned.
|
|
34133
|
+
*
|
|
34134
|
+
* @throws TRPCError NOT_FOUND - bucket does not exist
|
|
34135
|
+
* @throws TRPCError FORBIDDEN - no credentials or access denied
|
|
34136
|
+
*/
|
|
34137
|
+
getStatus: cephProtectedProcedure.input(getVersioningStatusInputSchema).query(async ({ ctx, input }) => {
|
|
34138
|
+
const s3 = ctx.getCephClient();
|
|
34139
|
+
try {
|
|
34140
|
+
const response = await s3.send(new import_client_s34.GetBucketVersioningCommand({
|
|
34141
|
+
Bucket: input.bucket
|
|
34142
|
+
}));
|
|
34143
|
+
const status = response.Status || "Unversioned";
|
|
34144
|
+
return {
|
|
34145
|
+
status,
|
|
34146
|
+
mfaDelete: response.MFADelete
|
|
34147
|
+
};
|
|
34148
|
+
} catch (error) {
|
|
34149
|
+
throw mapS3ErrorToTRPCError(error, {
|
|
34150
|
+
operation: "get versioning status",
|
|
34151
|
+
bucket: input.bucket
|
|
34152
|
+
});
|
|
34153
|
+
}
|
|
34154
|
+
}),
|
|
34155
|
+
/**
|
|
34156
|
+
* Enable or suspend versioning on a bucket.
|
|
34157
|
+
*
|
|
34158
|
+
* Important: Once enabled, versioning cannot be fully disabled (only suspended).
|
|
34159
|
+
* Suspending versioning preserves existing versions but stops creating new ones.
|
|
34160
|
+
*
|
|
34161
|
+
* @throws TRPCError NOT_FOUND - bucket does not exist
|
|
34162
|
+
* @throws TRPCError FORBIDDEN - no credentials or access denied
|
|
34163
|
+
* @throws TRPCError BAD_REQUEST - invalid request
|
|
34164
|
+
*/
|
|
34165
|
+
setStatus: cephProtectedProcedure.input(setVersioningInputSchema).mutation(async ({ ctx, input }) => {
|
|
34166
|
+
const s3 = ctx.getCephClient();
|
|
34167
|
+
try {
|
|
34168
|
+
await s3.send(new import_client_s34.PutBucketVersioningCommand({
|
|
34169
|
+
Bucket: input.bucket,
|
|
34170
|
+
VersioningConfiguration: {
|
|
34171
|
+
Status: input.status
|
|
34172
|
+
}
|
|
34173
|
+
}));
|
|
34174
|
+
return {
|
|
34175
|
+
success: true
|
|
34176
|
+
};
|
|
34177
|
+
} catch (error) {
|
|
34178
|
+
throw mapS3ErrorToTRPCError(error, {
|
|
34179
|
+
operation: "set versioning status",
|
|
34180
|
+
bucket: input.bucket
|
|
34181
|
+
});
|
|
34182
|
+
}
|
|
34183
|
+
}),
|
|
34184
|
+
/**
|
|
34185
|
+
* List all versions in a bucket (paginated).
|
|
34186
|
+
*
|
|
34187
|
+
* Returns both regular versions and delete markers. Use pagination markers
|
|
34188
|
+
* for buckets with many versions.
|
|
34189
|
+
*
|
|
34190
|
+
* Pagination:
|
|
34191
|
+
* - First request: don't provide keyMarker or versionIdMarker
|
|
34192
|
+
* - Subsequent requests: use nextKeyMarker and nextVersionIdMarker from previous response
|
|
34193
|
+
*
|
|
34194
|
+
* @throws TRPCError NOT_FOUND - bucket does not exist
|
|
34195
|
+
* @throws TRPCError FORBIDDEN - no credentials or access denied
|
|
34196
|
+
*/
|
|
34197
|
+
listVersions: cephProtectedProcedure.input(listVersionsInputSchema).query(async ({ ctx, input }) => {
|
|
34198
|
+
const s3 = ctx.getCephClient();
|
|
34199
|
+
try {
|
|
34200
|
+
const response = await s3.send(new import_client_s34.ListObjectVersionsCommand({
|
|
34201
|
+
Bucket: input.bucket,
|
|
34202
|
+
Prefix: input.prefix,
|
|
34203
|
+
KeyMarker: input.keyMarker,
|
|
34204
|
+
VersionIdMarker: input.versionIdMarker,
|
|
34205
|
+
MaxKeys: input.maxKeys ?? 100
|
|
34206
|
+
}));
|
|
34207
|
+
const versions = (response.Versions ?? []).map((v) => ({
|
|
34208
|
+
key: v.Key,
|
|
34209
|
+
versionId: v.VersionId,
|
|
34210
|
+
isLatest: v.IsLatest ?? false,
|
|
34211
|
+
lastModified: v.LastModified.toISOString(),
|
|
34212
|
+
size: v.Size ?? 0,
|
|
34213
|
+
storageClass: v.StorageClass,
|
|
34214
|
+
owner: v.Owner ? {
|
|
34215
|
+
displayName: v.Owner.DisplayName,
|
|
34216
|
+
id: v.Owner.ID
|
|
34217
|
+
} : void 0,
|
|
34218
|
+
etag: v.ETag,
|
|
34219
|
+
isDeleteMarker: false
|
|
34220
|
+
}));
|
|
34221
|
+
const deleteMarkers = (response.DeleteMarkers ?? []).map((dm) => ({
|
|
34222
|
+
key: dm.Key,
|
|
34223
|
+
versionId: dm.VersionId,
|
|
34224
|
+
isLatest: dm.IsLatest ?? false,
|
|
34225
|
+
lastModified: dm.LastModified.toISOString(),
|
|
34226
|
+
size: 0,
|
|
34227
|
+
owner: dm.Owner ? {
|
|
34228
|
+
displayName: dm.Owner.DisplayName,
|
|
34229
|
+
id: dm.Owner.ID
|
|
34230
|
+
} : void 0,
|
|
34231
|
+
isDeleteMarker: true
|
|
34232
|
+
}));
|
|
34233
|
+
return {
|
|
34234
|
+
versions,
|
|
34235
|
+
deleteMarkers,
|
|
34236
|
+
isTruncated: response.IsTruncated ?? false,
|
|
34237
|
+
nextKeyMarker: response.NextKeyMarker,
|
|
34238
|
+
nextVersionIdMarker: response.NextVersionIdMarker,
|
|
34239
|
+
prefix: response.Prefix,
|
|
34240
|
+
maxKeys: response.MaxKeys
|
|
34241
|
+
};
|
|
34242
|
+
} catch (error) {
|
|
34243
|
+
throw mapS3ErrorToTRPCError(error, {
|
|
34244
|
+
operation: "list versions",
|
|
34245
|
+
bucket: input.bucket
|
|
34246
|
+
});
|
|
34247
|
+
}
|
|
34248
|
+
}),
|
|
34249
|
+
/**
|
|
34250
|
+
* List versions for a specific object.
|
|
34251
|
+
*
|
|
34252
|
+
* Returns all versions (including delete markers) for a single object key,
|
|
34253
|
+
* sorted by date descending (newest first).
|
|
34254
|
+
*
|
|
34255
|
+
* @throws TRPCError NOT_FOUND - bucket does not exist
|
|
34256
|
+
* @throws TRPCError FORBIDDEN - no credentials or access denied
|
|
34257
|
+
*/
|
|
34258
|
+
listObjectVersions: cephProtectedProcedure.input(listObjectVersionsInputSchema).query(async ({ ctx, input }) => {
|
|
34259
|
+
const s3 = ctx.getCephClient();
|
|
34260
|
+
try {
|
|
34261
|
+
const response = await s3.send(new import_client_s34.ListObjectVersionsCommand({
|
|
34262
|
+
Bucket: input.bucket,
|
|
34263
|
+
Prefix: input.key
|
|
34264
|
+
}));
|
|
34265
|
+
const versions = (response.Versions ?? []).map((v) => ({
|
|
34266
|
+
key: v.Key,
|
|
34267
|
+
versionId: v.VersionId,
|
|
34268
|
+
isLatest: v.IsLatest ?? false,
|
|
34269
|
+
lastModified: v.LastModified.toISOString(),
|
|
34270
|
+
size: v.Size ?? 0,
|
|
34271
|
+
storageClass: v.StorageClass,
|
|
34272
|
+
owner: v.Owner ? {
|
|
34273
|
+
displayName: v.Owner.DisplayName,
|
|
34274
|
+
id: v.Owner.ID
|
|
34275
|
+
} : void 0,
|
|
34276
|
+
etag: v.ETag,
|
|
34277
|
+
isDeleteMarker: false
|
|
34278
|
+
}));
|
|
34279
|
+
const deleteMarkers = (response.DeleteMarkers ?? []).map((dm) => ({
|
|
34280
|
+
key: dm.Key,
|
|
34281
|
+
versionId: dm.VersionId,
|
|
34282
|
+
isLatest: dm.IsLatest ?? false,
|
|
34283
|
+
lastModified: dm.LastModified.toISOString(),
|
|
34284
|
+
size: 0,
|
|
34285
|
+
owner: dm.Owner ? {
|
|
34286
|
+
displayName: dm.Owner.DisplayName,
|
|
34287
|
+
id: dm.Owner.ID
|
|
34288
|
+
} : void 0,
|
|
34289
|
+
isDeleteMarker: true
|
|
34290
|
+
}));
|
|
34291
|
+
const allVersions = [
|
|
34292
|
+
...versions,
|
|
34293
|
+
...deleteMarkers
|
|
34294
|
+
].filter((v) => v.key === input.key);
|
|
34295
|
+
return allVersions.sort((a, b) => new Date(b.lastModified).getTime() - new Date(a.lastModified).getTime());
|
|
34296
|
+
} catch (error) {
|
|
34297
|
+
throw mapS3ErrorToTRPCError(error, {
|
|
34298
|
+
operation: "list object versions",
|
|
34299
|
+
bucket: input.bucket,
|
|
34300
|
+
key: input.key
|
|
34301
|
+
});
|
|
34302
|
+
}
|
|
34303
|
+
}),
|
|
34304
|
+
/**
|
|
34305
|
+
* Permanently delete a specific version.
|
|
34306
|
+
*
|
|
34307
|
+
* WARNING: This operation is irreversible. The version will be permanently removed.
|
|
34308
|
+
*
|
|
34309
|
+
* Use cases:
|
|
34310
|
+
* - Removing a delete marker to "undelete" an object
|
|
34311
|
+
* - Permanently removing old versions to save space
|
|
34312
|
+
* - Compliance requirements (data retention policies)
|
|
34313
|
+
*
|
|
34314
|
+
* @throws TRPCError NOT_FOUND - version does not exist
|
|
34315
|
+
* @throws TRPCError FORBIDDEN - no credentials or access denied
|
|
34316
|
+
*/
|
|
34317
|
+
deleteVersion: cephProtectedProcedure.input(deleteVersionInputSchema).mutation(async ({ ctx, input }) => {
|
|
34318
|
+
const s3 = ctx.getCephClient();
|
|
34319
|
+
try {
|
|
34320
|
+
await s3.send(new import_client_s34.DeleteObjectCommand({
|
|
34321
|
+
Bucket: input.bucket,
|
|
34322
|
+
Key: input.key,
|
|
34323
|
+
VersionId: input.versionId
|
|
34324
|
+
}));
|
|
34325
|
+
return {
|
|
34326
|
+
success: true
|
|
34327
|
+
};
|
|
34328
|
+
} catch (error) {
|
|
34329
|
+
throw mapS3ErrorToTRPCError(error, {
|
|
34330
|
+
operation: "delete version",
|
|
34331
|
+
bucket: input.bucket,
|
|
34332
|
+
key: input.key
|
|
34333
|
+
});
|
|
34334
|
+
}
|
|
34335
|
+
}),
|
|
34336
|
+
/**
|
|
34337
|
+
* Restore an old version (makes it the new latest version).
|
|
34338
|
+
*
|
|
34339
|
+
* How it works:
|
|
34340
|
+
* 1. Copies the old version to the same key
|
|
34341
|
+
* 2. Creates a new latest version with the old version's content
|
|
34342
|
+
* 3. All versions are preserved (including the old and new versions)
|
|
34343
|
+
*
|
|
34344
|
+
* @returns The new version ID created by the restore operation
|
|
34345
|
+
* @throws TRPCError NOT_FOUND - version does not exist
|
|
34346
|
+
* @throws TRPCError FORBIDDEN - no credentials or access denied
|
|
34347
|
+
*/
|
|
34348
|
+
restoreVersion: cephProtectedProcedure.input(restoreVersionInputSchema).mutation(async ({ ctx, input }) => {
|
|
34349
|
+
const s3 = ctx.getCephClient();
|
|
34350
|
+
try {
|
|
34351
|
+
const response = await s3.send(new import_client_s34.CopyObjectCommand({
|
|
34352
|
+
Bucket: input.bucket,
|
|
34353
|
+
Key: input.key,
|
|
34354
|
+
CopySource: `${input.bucket}/${encodeURIComponent(input.key)}?versionId=${encodeURIComponent(input.versionId)}`
|
|
34355
|
+
}));
|
|
34356
|
+
return {
|
|
34357
|
+
success: true,
|
|
34358
|
+
versionId: response.VersionId ?? "null"
|
|
34359
|
+
};
|
|
34360
|
+
} catch (error) {
|
|
34361
|
+
throw mapS3ErrorToTRPCError(error, {
|
|
34362
|
+
operation: "restore version",
|
|
34363
|
+
bucket: input.bucket,
|
|
34364
|
+
key: input.key
|
|
34365
|
+
});
|
|
34366
|
+
}
|
|
34367
|
+
})
|
|
34368
|
+
};
|
|
34369
|
+
|
|
34049
34370
|
// src/server/Storage/routers/index.ts
|
|
34050
34371
|
var objectStorageRouters = {
|
|
34051
34372
|
storage: {
|
|
@@ -34061,45 +34382,48 @@ var objectStorageRouters = {
|
|
|
34061
34382
|
}),
|
|
34062
34383
|
objects: auroraRouter({
|
|
34063
34384
|
...objectRouter
|
|
34385
|
+
}),
|
|
34386
|
+
versioning: auroraRouter({
|
|
34387
|
+
...versioningRouter
|
|
34064
34388
|
})
|
|
34065
34389
|
})
|
|
34066
34390
|
}
|
|
34067
34391
|
};
|
|
34068
34392
|
|
|
34069
34393
|
// src/server/Project/routers/projectRouter.ts
|
|
34070
|
-
var
|
|
34394
|
+
var import_zod18 = require("zod");
|
|
34071
34395
|
var import_server15 = require("@trpc/server");
|
|
34072
34396
|
|
|
34073
34397
|
// src/server/Project/types/models.ts
|
|
34074
|
-
var
|
|
34075
|
-
var baseProjectSchema =
|
|
34076
|
-
id:
|
|
34077
|
-
name:
|
|
34078
|
-
enabled:
|
|
34079
|
-
domain_id:
|
|
34080
|
-
parent_id:
|
|
34081
|
-
is_domain:
|
|
34082
|
-
tags:
|
|
34083
|
-
options:
|
|
34084
|
-
description:
|
|
34085
|
-
links:
|
|
34086
|
-
self:
|
|
34398
|
+
var import_zod17 = require("zod");
|
|
34399
|
+
var baseProjectSchema = import_zod17.z.object({
|
|
34400
|
+
id: import_zod17.z.string(),
|
|
34401
|
+
name: import_zod17.z.string(),
|
|
34402
|
+
enabled: import_zod17.z.boolean(),
|
|
34403
|
+
domain_id: import_zod17.z.string().nullable().optional(),
|
|
34404
|
+
parent_id: import_zod17.z.string().nullable().optional(),
|
|
34405
|
+
is_domain: import_zod17.z.boolean().nullable().optional(),
|
|
34406
|
+
tags: import_zod17.z.array(import_zod17.z.string()).nullable().optional(),
|
|
34407
|
+
options: import_zod17.z.record(import_zod17.z.string(), import_zod17.z.string().or(import_zod17.z.boolean())).nullable().optional(),
|
|
34408
|
+
description: import_zod17.z.string().nullable().optional(),
|
|
34409
|
+
links: import_zod17.z.object({
|
|
34410
|
+
self: import_zod17.z.string().url().nullable().optional()
|
|
34087
34411
|
}).optional()
|
|
34088
34412
|
});
|
|
34089
34413
|
var projectSchema = baseProjectSchema.extend({
|
|
34090
|
-
parents:
|
|
34414
|
+
parents: import_zod17.z.array(import_zod17.z.object({
|
|
34091
34415
|
project: baseProjectSchema
|
|
34092
34416
|
})).optional()
|
|
34093
34417
|
});
|
|
34094
|
-
var projectResponseSchema =
|
|
34418
|
+
var projectResponseSchema = import_zod17.z.object({
|
|
34095
34419
|
project: projectSchema
|
|
34096
34420
|
});
|
|
34097
|
-
var projectsResponseSchema =
|
|
34098
|
-
projects:
|
|
34099
|
-
links:
|
|
34100
|
-
self:
|
|
34101
|
-
previous:
|
|
34102
|
-
next:
|
|
34421
|
+
var projectsResponseSchema = import_zod17.z.object({
|
|
34422
|
+
projects: import_zod17.z.array(projectSchema),
|
|
34423
|
+
links: import_zod17.z.object({
|
|
34424
|
+
self: import_zod17.z.string().url().optional(),
|
|
34425
|
+
previous: import_zod17.z.string().url().nullable().optional(),
|
|
34426
|
+
next: import_zod17.z.string().url().nullable().optional()
|
|
34103
34427
|
}).optional()
|
|
34104
34428
|
});
|
|
34105
34429
|
|
|
@@ -34190,8 +34514,8 @@ var projectRouter = {
|
|
|
34190
34514
|
* filtered by the optional search term. Uses the OpenStack /v3/auth/projects
|
|
34191
34515
|
* endpoint which works with any valid token.
|
|
34192
34516
|
*/
|
|
34193
|
-
searchProjects: protectedProcedure.input(
|
|
34194
|
-
search:
|
|
34517
|
+
searchProjects: protectedProcedure.input(import_zod18.z.object({
|
|
34518
|
+
search: import_zod18.z.string().optional()
|
|
34195
34519
|
}).optional()).query(async ({ ctx, input }) => {
|
|
34196
34520
|
if (!ctx.openstack) {
|
|
34197
34521
|
throw new import_server15.TRPCError({
|
|
@@ -34244,8 +34568,8 @@ var projectRouter = {
|
|
|
34244
34568
|
* If in the future we need to access project-specific resources (compute, network, etc.),
|
|
34245
34569
|
* we should create a separate procedure using projectScopedProcedure.
|
|
34246
34570
|
*/
|
|
34247
|
-
getProjectById: protectedProcedure.input(
|
|
34248
|
-
id:
|
|
34571
|
+
getProjectById: protectedProcedure.input(import_zod18.z.object({
|
|
34572
|
+
id: import_zod18.z.string()
|
|
34249
34573
|
})).query(async ({ input, ctx }) => {
|
|
34250
34574
|
const identityService = ctx.openstack?.service("identity");
|
|
34251
34575
|
if (!ctx.openstack || !identityService) {
|
|
@@ -34330,16 +34654,16 @@ function validateOpenstackService(service, serviceName) {
|
|
|
34330
34654
|
__name(validateOpenstackService, "validateOpenstackService");
|
|
34331
34655
|
|
|
34332
34656
|
// src/server/Network/types/floatingIp.ts
|
|
34333
|
-
var
|
|
34657
|
+
var import_zod20 = require("zod");
|
|
34334
34658
|
|
|
34335
34659
|
// src/server/Network/types/index.ts
|
|
34336
|
-
var
|
|
34337
|
-
var ISO8601TimestampSchema =
|
|
34338
|
-
var SortDirSchema =
|
|
34660
|
+
var import_zod19 = require("zod");
|
|
34661
|
+
var ISO8601TimestampSchema = import_zod19.z.string().brand("ISO8601Timestamp");
|
|
34662
|
+
var SortDirSchema = import_zod19.z.enum([
|
|
34339
34663
|
"asc",
|
|
34340
34664
|
"desc"
|
|
34341
34665
|
]);
|
|
34342
|
-
var NetworkPortStatusSchema =
|
|
34666
|
+
var NetworkPortStatusSchema = import_zod19.z.enum([
|
|
34343
34667
|
"ACTIVE",
|
|
34344
34668
|
"DOWN",
|
|
34345
34669
|
"BUILD",
|
|
@@ -34347,154 +34671,154 @@ var NetworkPortStatusSchema = import_zod18.z.enum([
|
|
|
34347
34671
|
]);
|
|
34348
34672
|
|
|
34349
34673
|
// src/server/Network/types/floatingIp.ts
|
|
34350
|
-
var FloatingIpStatusSchema =
|
|
34674
|
+
var FloatingIpStatusSchema = import_zod20.z.enum([
|
|
34351
34675
|
"ACTIVE",
|
|
34352
34676
|
"DOWN",
|
|
34353
34677
|
"ERROR"
|
|
34354
34678
|
]);
|
|
34355
|
-
var PortDetailsSchema =
|
|
34679
|
+
var PortDetailsSchema = import_zod20.z.object({
|
|
34356
34680
|
/** The status of the port */
|
|
34357
34681
|
status: FloatingIpStatusSchema,
|
|
34358
34682
|
/** The name of the port */
|
|
34359
|
-
name:
|
|
34683
|
+
name: import_zod20.z.string(),
|
|
34360
34684
|
/** Administrative state of the port (true = UP, false = DOWN) */
|
|
34361
|
-
admin_state_up:
|
|
34685
|
+
admin_state_up: import_zod20.z.boolean(),
|
|
34362
34686
|
/** The ID of the network the port is attached to */
|
|
34363
|
-
network_id:
|
|
34687
|
+
network_id: import_zod20.z.string(),
|
|
34364
34688
|
/** The owner of the port device */
|
|
34365
|
-
device_owner:
|
|
34689
|
+
device_owner: import_zod20.z.string(),
|
|
34366
34690
|
/** The MAC address of the port */
|
|
34367
|
-
mac_address:
|
|
34691
|
+
mac_address: import_zod20.z.string(),
|
|
34368
34692
|
/** The ID of the device the port is attached to */
|
|
34369
|
-
device_id:
|
|
34693
|
+
device_id: import_zod20.z.string()
|
|
34370
34694
|
});
|
|
34371
|
-
var PortForwardingSchema =
|
|
34695
|
+
var PortForwardingSchema = import_zod20.z.object({
|
|
34372
34696
|
/** Port forwarding protocol */
|
|
34373
|
-
protocol:
|
|
34697
|
+
protocol: import_zod20.z.enum([
|
|
34374
34698
|
"tcp",
|
|
34375
34699
|
"udp"
|
|
34376
34700
|
]),
|
|
34377
34701
|
/** The internal fixed IP address associated with the port forwarding */
|
|
34378
|
-
internal_ip_address:
|
|
34702
|
+
internal_ip_address: import_zod20.z.string(),
|
|
34379
34703
|
/** The internal port number or starting port of the range */
|
|
34380
|
-
internal_port:
|
|
34704
|
+
internal_port: import_zod20.z.number().optional(),
|
|
34381
34705
|
/** The internal port range (e.g., "1024:2048") */
|
|
34382
|
-
internal_port_range:
|
|
34706
|
+
internal_port_range: import_zod20.z.string().optional(),
|
|
34383
34707
|
/** The internal port ID for the port forwarding (requires floating-ip-port-forwarding-detail extension) */
|
|
34384
|
-
internal_port_id:
|
|
34708
|
+
internal_port_id: import_zod20.z.string().optional(),
|
|
34385
34709
|
/** The external port number or starting port of the range */
|
|
34386
|
-
external_port:
|
|
34710
|
+
external_port: import_zod20.z.number().optional(),
|
|
34387
34711
|
/** The external port range (e.g., "8000:9000") */
|
|
34388
|
-
external_port_range:
|
|
34712
|
+
external_port_range: import_zod20.z.string().optional(),
|
|
34389
34713
|
/** The ID of the port forwarding resource */
|
|
34390
|
-
id:
|
|
34714
|
+
id: import_zod20.z.string(),
|
|
34391
34715
|
/** Description of the port forwarding rule (requires floating-ip-port-forwarding-description extension) */
|
|
34392
|
-
description:
|
|
34716
|
+
description: import_zod20.z.string().nullable().optional()
|
|
34393
34717
|
});
|
|
34394
|
-
var FloatingIpSchema =
|
|
34718
|
+
var FloatingIpSchema = import_zod20.z.object({
|
|
34395
34719
|
/** The ID of the router for the floating IP (null if not associated) */
|
|
34396
|
-
router_id:
|
|
34720
|
+
router_id: import_zod20.z.string().nullable(),
|
|
34397
34721
|
/** A human-readable description for the resource */
|
|
34398
|
-
description:
|
|
34722
|
+
description: import_zod20.z.string().nullable().optional(),
|
|
34399
34723
|
/** Whether this is a distributed floating IP (requires floating-ip-distributed extension) */
|
|
34400
|
-
distributed:
|
|
34724
|
+
distributed: import_zod20.z.boolean().optional(),
|
|
34401
34725
|
/** A valid DNS domain (requires dns-integration extension) */
|
|
34402
|
-
dns_domain:
|
|
34726
|
+
dns_domain: import_zod20.z.string().optional(),
|
|
34403
34727
|
/** A valid DNS name (requires dns-integration extension) */
|
|
34404
|
-
dns_name:
|
|
34728
|
+
dns_name: import_zod20.z.string().optional(),
|
|
34405
34729
|
/** Time at which the resource was created (UTC ISO8601 format, requires standard-attr-timestamp extension) */
|
|
34406
34730
|
created_at: ISO8601TimestampSchema.optional(),
|
|
34407
34731
|
/** Time at which the resource was last updated (UTC ISO8601 format, requires standard-attr-timestamp extension) */
|
|
34408
34732
|
updated_at: ISO8601TimestampSchema.optional(),
|
|
34409
34733
|
/** The revision number of the resource (set by server, for concurrency control) */
|
|
34410
|
-
revision_number:
|
|
34734
|
+
revision_number: import_zod20.z.number(),
|
|
34411
34735
|
/** The ID of the project that owns the floating IP */
|
|
34412
|
-
project_id:
|
|
34736
|
+
project_id: import_zod20.z.string(),
|
|
34413
34737
|
/** The ID of the tenant (deprecated, use project_id) */
|
|
34414
|
-
tenant_id:
|
|
34738
|
+
tenant_id: import_zod20.z.string(),
|
|
34415
34739
|
/** The ID of the network associated with the floating IP */
|
|
34416
|
-
floating_network_id:
|
|
34740
|
+
floating_network_id: import_zod20.z.string(),
|
|
34417
34741
|
/** The fixed IP address associated with the floating IP (null if not associated) */
|
|
34418
|
-
fixed_ip_address:
|
|
34742
|
+
fixed_ip_address: import_zod20.z.string().nullable(),
|
|
34419
34743
|
/** The floating IP address */
|
|
34420
|
-
floating_ip_address:
|
|
34744
|
+
floating_ip_address: import_zod20.z.string(),
|
|
34421
34745
|
/** The ID of the port associated with the floating IP (null if not associated) */
|
|
34422
|
-
port_id:
|
|
34746
|
+
port_id: import_zod20.z.string().nullable(),
|
|
34423
34747
|
/** The ID of the floating IP address */
|
|
34424
|
-
id:
|
|
34748
|
+
id: import_zod20.z.string(),
|
|
34425
34749
|
/** The status of the floating IP */
|
|
34426
34750
|
status: FloatingIpStatusSchema,
|
|
34427
34751
|
/** The information of the associated port (null if not associated, requires fip-port-details extension) */
|
|
34428
34752
|
port_details: PortDetailsSchema.nullable().optional(),
|
|
34429
34753
|
/** The list of tags on the resource (requires standard-attr-tag extension) */
|
|
34430
|
-
tags:
|
|
34754
|
+
tags: import_zod20.z.array(import_zod20.z.string()).optional(),
|
|
34431
34755
|
/** The associated port forwarding resources for the floating IP (requires expose-port-forwarding-in-fip extension) */
|
|
34432
|
-
port_forwardings:
|
|
34756
|
+
port_forwardings: import_zod20.z.array(PortForwardingSchema).nullish(),
|
|
34433
34757
|
/** The ID of the QoS policy of the network where this floating IP is plugged (requires qos-fip extension) */
|
|
34434
|
-
qos_network_policy_id:
|
|
34758
|
+
qos_network_policy_id: import_zod20.z.string().optional(),
|
|
34435
34759
|
/** The ID of the QoS policy associated with the floating IP (requires qos extension) */
|
|
34436
|
-
qos_policy_id:
|
|
34437
|
-
});
|
|
34438
|
-
var FloatingIpIdInputSchema =
|
|
34439
|
-
project_id:
|
|
34440
|
-
floatingip_id:
|
|
34441
|
-
});
|
|
34442
|
-
var FloatingIpCreateRequestSchema =
|
|
34443
|
-
tenant_id:
|
|
34444
|
-
project_id:
|
|
34445
|
-
floating_network_id:
|
|
34446
|
-
fixed_ip_address:
|
|
34447
|
-
floating_ip_address:
|
|
34448
|
-
port_id:
|
|
34449
|
-
subnet_id:
|
|
34450
|
-
distributed:
|
|
34451
|
-
description:
|
|
34452
|
-
dns_domain:
|
|
34453
|
-
dns_name:
|
|
34454
|
-
qos_policy_id:
|
|
34455
|
-
});
|
|
34456
|
-
var FloatingIpUpdateRequestSchema =
|
|
34457
|
-
project_id:
|
|
34458
|
-
floatingip_id:
|
|
34459
|
-
port_id:
|
|
34460
|
-
fixed_ip_address:
|
|
34461
|
-
description:
|
|
34462
|
-
distributed:
|
|
34463
|
-
});
|
|
34464
|
-
var FloatingIpResponseSchema =
|
|
34760
|
+
qos_policy_id: import_zod20.z.string().optional()
|
|
34761
|
+
});
|
|
34762
|
+
var FloatingIpIdInputSchema = import_zod20.z.object({
|
|
34763
|
+
project_id: import_zod20.z.string(),
|
|
34764
|
+
floatingip_id: import_zod20.z.string()
|
|
34765
|
+
});
|
|
34766
|
+
var FloatingIpCreateRequestSchema = import_zod20.z.object({
|
|
34767
|
+
tenant_id: import_zod20.z.string(),
|
|
34768
|
+
project_id: import_zod20.z.string(),
|
|
34769
|
+
floating_network_id: import_zod20.z.string(),
|
|
34770
|
+
fixed_ip_address: import_zod20.z.string().optional(),
|
|
34771
|
+
floating_ip_address: import_zod20.z.string().optional(),
|
|
34772
|
+
port_id: import_zod20.z.string().optional(),
|
|
34773
|
+
subnet_id: import_zod20.z.string().optional(),
|
|
34774
|
+
distributed: import_zod20.z.boolean().optional(),
|
|
34775
|
+
description: import_zod20.z.string().optional(),
|
|
34776
|
+
dns_domain: import_zod20.z.string().optional(),
|
|
34777
|
+
dns_name: import_zod20.z.string().optional(),
|
|
34778
|
+
qos_policy_id: import_zod20.z.string().optional()
|
|
34779
|
+
});
|
|
34780
|
+
var FloatingIpUpdateRequestSchema = import_zod20.z.object({
|
|
34781
|
+
project_id: import_zod20.z.string(),
|
|
34782
|
+
floatingip_id: import_zod20.z.string(),
|
|
34783
|
+
port_id: import_zod20.z.string().nullable(),
|
|
34784
|
+
fixed_ip_address: import_zod20.z.string().optional(),
|
|
34785
|
+
description: import_zod20.z.string().optional(),
|
|
34786
|
+
distributed: import_zod20.z.boolean().optional()
|
|
34787
|
+
});
|
|
34788
|
+
var FloatingIpResponseSchema = import_zod20.z.object({
|
|
34465
34789
|
floatingip: FloatingIpSchema
|
|
34466
34790
|
});
|
|
34467
|
-
var FloatingIpListResponseSchema =
|
|
34791
|
+
var FloatingIpListResponseSchema = import_zod20.z.object({
|
|
34468
34792
|
/** A list of floating IP objects */
|
|
34469
|
-
floatingips:
|
|
34793
|
+
floatingips: import_zod20.z.array(FloatingIpSchema)
|
|
34470
34794
|
});
|
|
34471
|
-
var FloatingIpQueryParametersSchema =
|
|
34795
|
+
var FloatingIpQueryParametersSchema = import_zod20.z.object({
|
|
34472
34796
|
/** Project ID for rescoping (required for projectScopedProcedure) */
|
|
34473
|
-
project_id:
|
|
34797
|
+
project_id: import_zod20.z.string(),
|
|
34474
34798
|
/** Filter by the ID of the floating IP */
|
|
34475
|
-
id:
|
|
34799
|
+
id: import_zod20.z.string().optional(),
|
|
34476
34800
|
/** Filter by the ID of the router for the floating IP */
|
|
34477
|
-
router_id:
|
|
34801
|
+
router_id: import_zod20.z.string().nullable().optional(),
|
|
34478
34802
|
/** Filter by the status of the floating IP */
|
|
34479
34803
|
status: FloatingIpStatusSchema.optional(),
|
|
34480
34804
|
/** Filter by the ID of the project that owns the resource */
|
|
34481
|
-
tenant_id:
|
|
34805
|
+
tenant_id: import_zod20.z.string().optional(),
|
|
34482
34806
|
/** Filter by the revision number of the resource */
|
|
34483
|
-
revision_number:
|
|
34807
|
+
revision_number: import_zod20.z.number().optional(),
|
|
34484
34808
|
/** Filter by the human-readable description of the resource */
|
|
34485
|
-
description:
|
|
34809
|
+
description: import_zod20.z.string().nullable().optional(),
|
|
34486
34810
|
/** Filter by the ID of the network associated with the floating IP */
|
|
34487
|
-
floating_network_id:
|
|
34811
|
+
floating_network_id: import_zod20.z.string().optional(),
|
|
34488
34812
|
/** Filter by the fixed IP address associated with the floating IP */
|
|
34489
|
-
fixed_ip_address:
|
|
34813
|
+
fixed_ip_address: import_zod20.z.string().optional(),
|
|
34490
34814
|
/** Filter by the floating IP address */
|
|
34491
|
-
floating_ip_address:
|
|
34815
|
+
floating_ip_address: import_zod20.z.string().optional(),
|
|
34492
34816
|
/** Filter by the ID of a port associated with the floating IP */
|
|
34493
|
-
port_id:
|
|
34817
|
+
port_id: import_zod20.z.string().nullable().optional(),
|
|
34494
34818
|
/** Sort direction (asc or desc) */
|
|
34495
34819
|
sort_dir: SortDirSchema.optional(),
|
|
34496
34820
|
/** Sort key - valid keys: fixed_ip_address, floating_ip_address, floating_network_id, id, router_id, status, tenant_id, project_id */
|
|
34497
|
-
sort_key:
|
|
34821
|
+
sort_key: import_zod20.z.enum([
|
|
34498
34822
|
"fixed_ip_address",
|
|
34499
34823
|
"floating_ip_address",
|
|
34500
34824
|
"floating_network_id",
|
|
@@ -34505,73 +34829,73 @@ var FloatingIpQueryParametersSchema = import_zod19.z.object({
|
|
|
34505
34829
|
"project_id"
|
|
34506
34830
|
]).optional(),
|
|
34507
34831
|
/** Filter by tags (comma-separated, resources must match all tags) - requires standard-attr-tag extension */
|
|
34508
|
-
tags:
|
|
34832
|
+
tags: import_zod20.z.array(import_zod20.z.string()).optional(),
|
|
34509
34833
|
/** Filter by tags with OR logic (comma-separated, resources match any tag) */
|
|
34510
|
-
"tags-any":
|
|
34834
|
+
"tags-any": import_zod20.z.string().optional(),
|
|
34511
34835
|
/** Exclude resources with these tags (comma-separated, resources must match all excluded tags) */
|
|
34512
|
-
"not-tags":
|
|
34836
|
+
"not-tags": import_zod20.z.string().optional(),
|
|
34513
34837
|
/** Exclude resources with these tags using OR logic (comma-separated, resources match any excluded tag) */
|
|
34514
|
-
"not-tags-any":
|
|
34838
|
+
"not-tags-any": import_zod20.z.string().optional(),
|
|
34515
34839
|
/** Specific fields to return (can be repeated) */
|
|
34516
|
-
fields:
|
|
34517
|
-
|
|
34518
|
-
|
|
34840
|
+
fields: import_zod20.z.union([
|
|
34841
|
+
import_zod20.z.string(),
|
|
34842
|
+
import_zod20.z.array(import_zod20.z.string())
|
|
34519
34843
|
]).optional(),
|
|
34520
34844
|
/** Pagination limit */
|
|
34521
|
-
limit:
|
|
34845
|
+
limit: import_zod20.z.number().optional(),
|
|
34522
34846
|
/** Pagination marker (ID of the last item in the previous list) */
|
|
34523
|
-
marker:
|
|
34847
|
+
marker: import_zod20.z.string().optional(),
|
|
34524
34848
|
/** Pagination direction (false = ascending, true = descending) */
|
|
34525
|
-
page_reverse:
|
|
34849
|
+
page_reverse: import_zod20.z.boolean().optional(),
|
|
34526
34850
|
// BFF-side search (filtered in BFF layer, not sent to OpenStack)
|
|
34527
|
-
searchTerm:
|
|
34528
|
-
});
|
|
34529
|
-
var ExternalNetworksQuerySchema =
|
|
34530
|
-
project_id:
|
|
34531
|
-
"router:external":
|
|
34532
|
-
});
|
|
34533
|
-
var ExternalNetworkSchema =
|
|
34534
|
-
id:
|
|
34535
|
-
name:
|
|
34536
|
-
project_id:
|
|
34537
|
-
"router:external":
|
|
34538
|
-
shared:
|
|
34851
|
+
searchTerm: import_zod20.z.string().optional()
|
|
34852
|
+
});
|
|
34853
|
+
var ExternalNetworksQuerySchema = import_zod20.z.object({
|
|
34854
|
+
project_id: import_zod20.z.string(),
|
|
34855
|
+
"router:external": import_zod20.z.literal(true).default(true)
|
|
34856
|
+
});
|
|
34857
|
+
var ExternalNetworkSchema = import_zod20.z.object({
|
|
34858
|
+
id: import_zod20.z.string(),
|
|
34859
|
+
name: import_zod20.z.string(),
|
|
34860
|
+
project_id: import_zod20.z.string(),
|
|
34861
|
+
"router:external": import_zod20.z.boolean().optional(),
|
|
34862
|
+
shared: import_zod20.z.boolean(),
|
|
34539
34863
|
status: NetworkPortStatusSchema,
|
|
34540
34864
|
updated_at: ISO8601TimestampSchema.optional(),
|
|
34541
|
-
is_default:
|
|
34865
|
+
is_default: import_zod20.z.boolean().optional()
|
|
34542
34866
|
});
|
|
34543
|
-
var ExternalNetworksResponseSchema =
|
|
34544
|
-
networks:
|
|
34867
|
+
var ExternalNetworksResponseSchema = import_zod20.z.object({
|
|
34868
|
+
networks: import_zod20.z.array(ExternalNetworkSchema)
|
|
34545
34869
|
});
|
|
34546
|
-
var DnsDomainSchema =
|
|
34547
|
-
id:
|
|
34548
|
-
name:
|
|
34870
|
+
var DnsDomainSchema = import_zod20.z.object({
|
|
34871
|
+
id: import_zod20.z.string(),
|
|
34872
|
+
name: import_zod20.z.string()
|
|
34549
34873
|
});
|
|
34550
|
-
var DnsDomainResponseSchema =
|
|
34551
|
-
zones:
|
|
34874
|
+
var DnsDomainResponseSchema = import_zod20.z.object({
|
|
34875
|
+
zones: import_zod20.z.array(DnsDomainSchema)
|
|
34552
34876
|
});
|
|
34553
|
-
var AvailablePortsQuerySchema =
|
|
34554
|
-
project_id:
|
|
34877
|
+
var AvailablePortsQuerySchema = import_zod20.z.object({
|
|
34878
|
+
project_id: import_zod20.z.string(),
|
|
34555
34879
|
/** Only ACTIVE ports are eligible for floating IP association */
|
|
34556
|
-
status:
|
|
34880
|
+
status: import_zod20.z.literal("ACTIVE").default("ACTIVE"),
|
|
34557
34881
|
/** Only administratively UP ports are eligible for floating IP association */
|
|
34558
|
-
admin_state_up:
|
|
34882
|
+
admin_state_up: import_zod20.z.literal(true).default(true)
|
|
34559
34883
|
});
|
|
34560
|
-
var AvailablePortSchema =
|
|
34884
|
+
var AvailablePortSchema = import_zod20.z.object({
|
|
34561
34885
|
/** The ID of the port */
|
|
34562
|
-
id:
|
|
34886
|
+
id: import_zod20.z.string(),
|
|
34563
34887
|
/** Human-readable name of the port */
|
|
34564
|
-
name:
|
|
34888
|
+
name: import_zod20.z.string().nullable().optional(),
|
|
34565
34889
|
/** List of fixed IPs assigned to the port, each entry pairs an IP address with its subnet. */
|
|
34566
|
-
fixed_ips:
|
|
34890
|
+
fixed_ips: import_zod20.z.array(import_zod20.z.object({
|
|
34567
34891
|
/** The fixed IP address assigned to the port */
|
|
34568
|
-
ip_address:
|
|
34892
|
+
ip_address: import_zod20.z.string(),
|
|
34569
34893
|
/** The ID of the subnet the IP belongs to */
|
|
34570
|
-
subnet_id:
|
|
34894
|
+
subnet_id: import_zod20.z.string().optional()
|
|
34571
34895
|
})).optional()
|
|
34572
34896
|
});
|
|
34573
|
-
var AvailablePortsResponseSchema =
|
|
34574
|
-
ports:
|
|
34897
|
+
var AvailablePortsResponseSchema = import_zod20.z.object({
|
|
34898
|
+
ports: import_zod20.z.array(AvailablePortSchema)
|
|
34575
34899
|
});
|
|
34576
34900
|
|
|
34577
34901
|
// src/server/Network/helpers/errorHandling.ts
|
|
@@ -34818,110 +35142,110 @@ var floatingIpRouter = {
|
|
|
34818
35142
|
};
|
|
34819
35143
|
|
|
34820
35144
|
// src/server/Network/types/securityGroup.ts
|
|
34821
|
-
var
|
|
34822
|
-
var securityGroupRuleSchema =
|
|
34823
|
-
id:
|
|
34824
|
-
direction:
|
|
35145
|
+
var import_zod21 = require("zod");
|
|
35146
|
+
var securityGroupRuleSchema = import_zod21.z.object({
|
|
35147
|
+
id: import_zod21.z.string(),
|
|
35148
|
+
direction: import_zod21.z.enum([
|
|
34825
35149
|
"ingress",
|
|
34826
35150
|
"egress"
|
|
34827
35151
|
]).optional(),
|
|
34828
|
-
ethertype:
|
|
35152
|
+
ethertype: import_zod21.z.enum([
|
|
34829
35153
|
"IPv4",
|
|
34830
35154
|
"IPv6"
|
|
34831
35155
|
]).optional(),
|
|
34832
|
-
description:
|
|
34833
|
-
security_group_id:
|
|
34834
|
-
protocol:
|
|
34835
|
-
port_range_min:
|
|
34836
|
-
port_range_max:
|
|
34837
|
-
remote_ip_prefix:
|
|
34838
|
-
remote_group_id:
|
|
34839
|
-
remote_address_group_id:
|
|
34840
|
-
tenant_id:
|
|
34841
|
-
project_id:
|
|
34842
|
-
revision_number:
|
|
34843
|
-
tags:
|
|
34844
|
-
created_at:
|
|
34845
|
-
updated_at:
|
|
34846
|
-
});
|
|
34847
|
-
var securityGroupSchema = import_zod20.z.object({
|
|
34848
|
-
id: import_zod20.z.string(),
|
|
34849
|
-
name: import_zod20.z.string().nullable().optional(),
|
|
34850
|
-
description: import_zod20.z.string().nullable().optional(),
|
|
34851
|
-
tenant_id: import_zod20.z.string().nullable().optional(),
|
|
34852
|
-
project_id: import_zod20.z.string().nullable().optional(),
|
|
34853
|
-
stateful: import_zod20.z.boolean().optional(),
|
|
34854
|
-
shared: import_zod20.z.boolean().optional(),
|
|
34855
|
-
tags: import_zod20.z.array(import_zod20.z.string()).optional(),
|
|
34856
|
-
security_group_rules: import_zod20.z.array(securityGroupRuleSchema).optional(),
|
|
34857
|
-
revision_number: import_zod20.z.number().optional(),
|
|
34858
|
-
created_at: import_zod20.z.string().optional(),
|
|
34859
|
-
updated_at: import_zod20.z.string().nullable().optional()
|
|
34860
|
-
});
|
|
34861
|
-
var securityGroupsResponseSchema = import_zod20.z.object({
|
|
34862
|
-
security_groups: import_zod20.z.array(securityGroupSchema)
|
|
35156
|
+
description: import_zod21.z.string().nullable().optional(),
|
|
35157
|
+
security_group_id: import_zod21.z.string().optional(),
|
|
35158
|
+
protocol: import_zod21.z.string().nullable().optional(),
|
|
35159
|
+
port_range_min: import_zod21.z.number().nullable().optional(),
|
|
35160
|
+
port_range_max: import_zod21.z.number().nullable().optional(),
|
|
35161
|
+
remote_ip_prefix: import_zod21.z.string().nullable().optional(),
|
|
35162
|
+
remote_group_id: import_zod21.z.string().nullable().optional(),
|
|
35163
|
+
remote_address_group_id: import_zod21.z.string().nullable().optional(),
|
|
35164
|
+
tenant_id: import_zod21.z.string().nullable().optional(),
|
|
35165
|
+
project_id: import_zod21.z.string().nullable().optional(),
|
|
35166
|
+
revision_number: import_zod21.z.number().optional(),
|
|
35167
|
+
tags: import_zod21.z.array(import_zod21.z.string()).optional(),
|
|
35168
|
+
created_at: import_zod21.z.string().optional(),
|
|
35169
|
+
updated_at: import_zod21.z.string().nullable().optional()
|
|
34863
35170
|
});
|
|
34864
|
-
var
|
|
35171
|
+
var securityGroupSchema = import_zod21.z.object({
|
|
35172
|
+
id: import_zod21.z.string(),
|
|
35173
|
+
name: import_zod21.z.string().nullable().optional(),
|
|
35174
|
+
description: import_zod21.z.string().nullable().optional(),
|
|
35175
|
+
tenant_id: import_zod21.z.string().nullable().optional(),
|
|
35176
|
+
project_id: import_zod21.z.string().nullable().optional(),
|
|
35177
|
+
stateful: import_zod21.z.boolean().optional(),
|
|
35178
|
+
shared: import_zod21.z.boolean().optional(),
|
|
35179
|
+
tags: import_zod21.z.array(import_zod21.z.string()).optional(),
|
|
35180
|
+
security_group_rules: import_zod21.z.array(securityGroupRuleSchema).optional(),
|
|
35181
|
+
revision_number: import_zod21.z.number().optional(),
|
|
35182
|
+
created_at: import_zod21.z.string().optional(),
|
|
35183
|
+
updated_at: import_zod21.z.string().nullable().optional()
|
|
35184
|
+
});
|
|
35185
|
+
var securityGroupsResponseSchema = import_zod21.z.object({
|
|
35186
|
+
security_groups: import_zod21.z.array(securityGroupSchema)
|
|
35187
|
+
});
|
|
35188
|
+
var securityGroupResponseSchema = import_zod21.z.object({
|
|
34865
35189
|
security_group: securityGroupSchema
|
|
34866
35190
|
});
|
|
34867
|
-
var securityGroupRuleResponseSchema =
|
|
35191
|
+
var securityGroupRuleResponseSchema = import_zod21.z.object({
|
|
34868
35192
|
security_group_rule: securityGroupRuleSchema
|
|
34869
35193
|
});
|
|
34870
35194
|
var listSecurityGroupsInputSchema = projectScopedInputSchema.extend({
|
|
34871
35195
|
// Sorting
|
|
34872
|
-
sort_key:
|
|
35196
|
+
sort_key: import_zod21.z.string().optional(),
|
|
34873
35197
|
sort_dir: SortDirSchema.optional(),
|
|
34874
35198
|
// Basic filtering
|
|
34875
|
-
name:
|
|
34876
|
-
description:
|
|
34877
|
-
tenant_id:
|
|
34878
|
-
shared:
|
|
35199
|
+
name: import_zod21.z.string().optional(),
|
|
35200
|
+
description: import_zod21.z.string().optional(),
|
|
35201
|
+
tenant_id: import_zod21.z.string().optional(),
|
|
35202
|
+
shared: import_zod21.z.boolean().optional(),
|
|
34879
35203
|
// Tag-based filtering (string values follow Neutron semantics)
|
|
34880
|
-
tags:
|
|
34881
|
-
tags_any:
|
|
34882
|
-
not_tags:
|
|
34883
|
-
not_tags_any:
|
|
35204
|
+
tags: import_zod21.z.string().optional(),
|
|
35205
|
+
tags_any: import_zod21.z.string().optional(),
|
|
35206
|
+
not_tags: import_zod21.z.string().optional(),
|
|
35207
|
+
not_tags_any: import_zod21.z.string().optional(),
|
|
34884
35208
|
// BFF-side search (filtered in BFF layer, not sent to OpenStack)
|
|
34885
|
-
searchTerm:
|
|
35209
|
+
searchTerm: import_zod21.z.string().optional()
|
|
34886
35210
|
});
|
|
34887
35211
|
var getSecurityGroupByIdInputSchema = projectScopedInputSchema.extend({
|
|
34888
|
-
securityGroupId:
|
|
35212
|
+
securityGroupId: import_zod21.z.string()
|
|
34889
35213
|
});
|
|
34890
35214
|
var createSecurityGroupInputSchema = projectScopedInputSchema.extend({
|
|
34891
|
-
name:
|
|
34892
|
-
description:
|
|
34893
|
-
stateful:
|
|
35215
|
+
name: import_zod21.z.string().min(1, "Name is required"),
|
|
35216
|
+
description: import_zod21.z.string().optional(),
|
|
35217
|
+
stateful: import_zod21.z.boolean().optional()
|
|
34894
35218
|
});
|
|
34895
35219
|
var deleteSecurityGroupInputSchema = projectScopedInputSchema.extend({
|
|
34896
|
-
securityGroupId:
|
|
35220
|
+
securityGroupId: import_zod21.z.string()
|
|
34897
35221
|
});
|
|
34898
35222
|
var updateSecurityGroupInputSchema = projectScopedInputSchema.extend({
|
|
34899
|
-
securityGroupId:
|
|
34900
|
-
name:
|
|
34901
|
-
description:
|
|
34902
|
-
stateful:
|
|
35223
|
+
securityGroupId: import_zod21.z.string(),
|
|
35224
|
+
name: import_zod21.z.string().min(1, "Name is required").optional(),
|
|
35225
|
+
description: import_zod21.z.string().optional(),
|
|
35226
|
+
stateful: import_zod21.z.boolean().optional()
|
|
34903
35227
|
});
|
|
34904
35228
|
var deleteSecurityGroupRuleInputSchema = projectScopedInputSchema.extend({
|
|
34905
|
-
ruleId:
|
|
35229
|
+
ruleId: import_zod21.z.string()
|
|
34906
35230
|
});
|
|
34907
35231
|
var createSecurityGroupRuleInputSchema = projectScopedInputSchema.extend({
|
|
34908
|
-
security_group_id:
|
|
34909
|
-
direction:
|
|
35232
|
+
security_group_id: import_zod21.z.string(),
|
|
35233
|
+
direction: import_zod21.z.enum([
|
|
34910
35234
|
"ingress",
|
|
34911
35235
|
"egress"
|
|
34912
35236
|
]),
|
|
34913
|
-
ethertype:
|
|
35237
|
+
ethertype: import_zod21.z.enum([
|
|
34914
35238
|
"IPv4",
|
|
34915
35239
|
"IPv6"
|
|
34916
35240
|
]).default("IPv4"),
|
|
34917
|
-
description:
|
|
34918
|
-
protocol:
|
|
34919
|
-
port_range_min:
|
|
34920
|
-
port_range_max:
|
|
35241
|
+
description: import_zod21.z.string().optional(),
|
|
35242
|
+
protocol: import_zod21.z.string().nullable().optional(),
|
|
35243
|
+
port_range_min: import_zod21.z.number().int().max(65535).nullable().optional(),
|
|
35244
|
+
port_range_max: import_zod21.z.number().int().max(65535).nullable().optional(),
|
|
34921
35245
|
// Transform empty strings to undefined for proper validation
|
|
34922
|
-
remote_ip_prefix:
|
|
34923
|
-
remote_group_id:
|
|
34924
|
-
remote_address_group_id:
|
|
35246
|
+
remote_ip_prefix: import_zod21.z.string().nullable().optional().transform((val) => val === "" ? void 0 : val),
|
|
35247
|
+
remote_group_id: import_zod21.z.string().nullable().optional().transform((val) => val === "" ? void 0 : val),
|
|
35248
|
+
remote_address_group_id: import_zod21.z.string().nullable().optional().transform((val) => val === "" ? void 0 : val)
|
|
34925
35249
|
});
|
|
34926
35250
|
|
|
34927
35251
|
// src/server/Network/helpers/securityGroupHelpers.ts
|
|
@@ -35439,42 +35763,42 @@ var securityGroupRuleRouter = {
|
|
|
35439
35763
|
};
|
|
35440
35764
|
|
|
35441
35765
|
// src/server/Network/types/rbacPolicy.ts
|
|
35442
|
-
var
|
|
35443
|
-
var rbacPolicySchema =
|
|
35444
|
-
id:
|
|
35445
|
-
object_type:
|
|
35766
|
+
var import_zod22 = require("zod");
|
|
35767
|
+
var rbacPolicySchema = import_zod22.z.object({
|
|
35768
|
+
id: import_zod22.z.string(),
|
|
35769
|
+
object_type: import_zod22.z.enum([
|
|
35446
35770
|
"qos_policy",
|
|
35447
35771
|
"network",
|
|
35448
35772
|
"security_group"
|
|
35449
35773
|
]),
|
|
35450
|
-
object_id:
|
|
35451
|
-
action:
|
|
35774
|
+
object_id: import_zod22.z.string(),
|
|
35775
|
+
action: import_zod22.z.enum([
|
|
35452
35776
|
"access_as_shared",
|
|
35453
35777
|
"access_as_external"
|
|
35454
35778
|
]),
|
|
35455
|
-
target_tenant:
|
|
35456
|
-
tenant_id:
|
|
35457
|
-
project_id:
|
|
35779
|
+
target_tenant: import_zod22.z.string(),
|
|
35780
|
+
tenant_id: import_zod22.z.string().nullable().optional(),
|
|
35781
|
+
project_id: import_zod22.z.string().nullable().optional()
|
|
35458
35782
|
});
|
|
35459
|
-
var rbacPoliciesResponseSchema =
|
|
35460
|
-
rbac_policies:
|
|
35783
|
+
var rbacPoliciesResponseSchema = import_zod22.z.object({
|
|
35784
|
+
rbac_policies: import_zod22.z.array(rbacPolicySchema)
|
|
35461
35785
|
});
|
|
35462
|
-
var rbacPolicyResponseSchema =
|
|
35786
|
+
var rbacPolicyResponseSchema = import_zod22.z.object({
|
|
35463
35787
|
rbac_policy: rbacPolicySchema
|
|
35464
35788
|
});
|
|
35465
35789
|
var listRBACPoliciesForSecurityGroupInputSchema = projectScopedInputSchema.extend({
|
|
35466
|
-
securityGroupId:
|
|
35790
|
+
securityGroupId: import_zod22.z.string()
|
|
35467
35791
|
});
|
|
35468
35792
|
var createRBACPolicyInputSchema = projectScopedInputSchema.extend({
|
|
35469
|
-
securityGroupId:
|
|
35470
|
-
targetTenant:
|
|
35793
|
+
securityGroupId: import_zod22.z.string(),
|
|
35794
|
+
targetTenant: import_zod22.z.string().trim().min(1, "Target project ID is required")
|
|
35471
35795
|
});
|
|
35472
35796
|
var updateRBACPolicyInputSchema = projectScopedInputSchema.extend({
|
|
35473
|
-
policyId:
|
|
35474
|
-
targetTenant:
|
|
35797
|
+
policyId: import_zod22.z.string(),
|
|
35798
|
+
targetTenant: import_zod22.z.string().trim().min(1, "Target project ID is required")
|
|
35475
35799
|
});
|
|
35476
35800
|
var deleteRBACPolicyInputSchema = projectScopedInputSchema.extend({
|
|
35477
|
-
policyId:
|
|
35801
|
+
policyId: import_zod22.z.string()
|
|
35478
35802
|
});
|
|
35479
35803
|
|
|
35480
35804
|
// src/server/Network/helpers/rbacPolicyHelpers.ts
|
|
@@ -35711,122 +36035,117 @@ var networkRouters = {
|
|
|
35711
36035
|
};
|
|
35712
36036
|
|
|
35713
36037
|
// src/server/Services/types/pca.ts
|
|
35714
|
-
var
|
|
35715
|
-
var CertificateValiditySchema =
|
|
35716
|
-
not_after:
|
|
35717
|
-
not_before:
|
|
36038
|
+
var import_zod23 = require("zod");
|
|
36039
|
+
var CertificateValiditySchema = import_zod23.z.object({
|
|
36040
|
+
not_after: import_zod23.z.number().int(),
|
|
36041
|
+
not_before: import_zod23.z.number().int().optional()
|
|
35718
36042
|
});
|
|
35719
|
-
var CertificateAuthorityCertificateSchema =
|
|
36043
|
+
var CertificateAuthorityCertificateSchema = import_zod23.z.object({
|
|
35720
36044
|
/** PEM encoded certificate data. */
|
|
35721
|
-
pem:
|
|
36045
|
+
pem: import_zod23.z.string(),
|
|
35722
36046
|
validity: CertificateValiditySchema
|
|
35723
36047
|
});
|
|
35724
|
-
var CertificateAuthorityCertificateChainSchema =
|
|
35725
|
-
certificates:
|
|
35726
|
-
pem:
|
|
36048
|
+
var CertificateAuthorityCertificateChainSchema = import_zod23.z.object({
|
|
36049
|
+
certificates: import_zod23.z.array(import_zod23.z.object({
|
|
36050
|
+
pem: import_zod23.z.string()
|
|
35727
36051
|
})),
|
|
35728
36052
|
/** Concatenated PEM certificates of the chain. */
|
|
35729
|
-
pem:
|
|
36053
|
+
pem: import_zod23.z.string()
|
|
35730
36054
|
});
|
|
35731
|
-
var CertificateAuthorityAdditionalAttributeSchema =
|
|
36055
|
+
var CertificateAuthorityAdditionalAttributeSchema = import_zod23.z.object({
|
|
35732
36056
|
/** ASN.1 Object Identifier of the attribute */
|
|
35733
|
-
key:
|
|
35734
|
-
value:
|
|
36057
|
+
key: import_zod23.z.array(import_zod23.z.number().int()),
|
|
36058
|
+
value: import_zod23.z.string()
|
|
35735
36059
|
});
|
|
35736
|
-
var CertificateAuthoritySubjectSchema =
|
|
35737
|
-
additional_attribute:
|
|
36060
|
+
var CertificateAuthoritySubjectSchema = import_zod23.z.object({
|
|
36061
|
+
additional_attribute: import_zod23.z.array(CertificateAuthorityAdditionalAttributeSchema).optional(),
|
|
35738
36062
|
/** Typically domain name */
|
|
35739
|
-
common_name:
|
|
36063
|
+
common_name: import_zod23.z.string(),
|
|
35740
36064
|
/** Country codes (ISO 3166-1 alpha-2). */
|
|
35741
|
-
country:
|
|
36065
|
+
country: import_zod23.z.array(import_zod23.z.string()).optional(),
|
|
35742
36066
|
/** Locality/city names. */
|
|
35743
|
-
locality:
|
|
36067
|
+
locality: import_zod23.z.array(import_zod23.z.string()).optional(),
|
|
35744
36068
|
/** Organization names. */
|
|
35745
|
-
organization:
|
|
36069
|
+
organization: import_zod23.z.array(import_zod23.z.string()).optional(),
|
|
35746
36070
|
/** Organizational unit names. */
|
|
35747
|
-
organizational_unit:
|
|
36071
|
+
organizational_unit: import_zod23.z.array(import_zod23.z.string()).optional(),
|
|
35748
36072
|
/** Postal/ZIP codes. */
|
|
35749
|
-
postal_code:
|
|
36073
|
+
postal_code: import_zod23.z.array(import_zod23.z.string()).optional(),
|
|
35750
36074
|
/** State or province names. */
|
|
35751
|
-
province:
|
|
35752
|
-
serial_number:
|
|
35753
|
-
street_address:
|
|
36075
|
+
province: import_zod23.z.array(import_zod23.z.string()).optional(),
|
|
36076
|
+
serial_number: import_zod23.z.string().optional(),
|
|
36077
|
+
street_address: import_zod23.z.array(import_zod23.z.string()).optional()
|
|
35754
36078
|
});
|
|
35755
|
-
var CertificateAuthorityStateSchema =
|
|
36079
|
+
var CertificateAuthorityStateSchema = import_zod23.z.enum([
|
|
35756
36080
|
"CREATING",
|
|
35757
36081
|
"AWAITING_CERTIFICATE",
|
|
35758
36082
|
"READY",
|
|
35759
36083
|
"FAILED",
|
|
35760
36084
|
"UNEXPECTED"
|
|
35761
36085
|
]);
|
|
35762
|
-
var CertificateAuthoritySchema =
|
|
36086
|
+
var CertificateAuthoritySchema = import_zod23.z.object({
|
|
35763
36087
|
certificate: CertificateAuthorityCertificateSchema.optional(),
|
|
35764
36088
|
/** Details of Certificate Authority certificate's issuers chain. */
|
|
35765
36089
|
certificate_chain: CertificateAuthorityCertificateChainSchema.optional(),
|
|
35766
|
-
configuration:
|
|
36090
|
+
configuration: import_zod23.z.object({
|
|
35767
36091
|
/** X.509 subject of Certificate Authority. Required on create operation. */
|
|
35768
36092
|
subject: CertificateAuthoritySubjectSchema
|
|
35769
36093
|
}).optional(),
|
|
35770
|
-
csr:
|
|
35771
|
-
id:
|
|
36094
|
+
csr: import_zod23.z.string().optional(),
|
|
36095
|
+
id: import_zod23.z.string(),
|
|
35772
36096
|
/**
|
|
35773
36097
|
* Required on import certificate operation.
|
|
35774
36098
|
* Certificate Authority certificate chain, in PEM format. Consists of concatenated string
|
|
35775
36099
|
* of Certificate Authority certificate, followed by its intermediate issuing CAs certificates
|
|
35776
36100
|
* and root issuing CA certificate last.
|
|
35777
36101
|
*/
|
|
35778
|
-
imported_certificate_chain:
|
|
36102
|
+
imported_certificate_chain: import_zod23.z.string().optional(),
|
|
35779
36103
|
/** Identifier of OpenStack project that Certificate Authority belongs. */
|
|
35780
|
-
project_id:
|
|
36104
|
+
project_id: import_zod23.z.string(),
|
|
35781
36105
|
/** Current operational state of Certificate Authority. */
|
|
35782
36106
|
state: CertificateAuthorityStateSchema
|
|
35783
36107
|
});
|
|
35784
|
-
var CertificateAuthorityResponseSchema =
|
|
36108
|
+
var CertificateAuthorityResponseSchema = import_zod23.z.object({
|
|
35785
36109
|
certificate_authority: CertificateAuthoritySchema
|
|
35786
36110
|
});
|
|
35787
|
-
var CertificateAuthoritiesListSchema =
|
|
35788
|
-
certificate_authorities:
|
|
36111
|
+
var CertificateAuthoritiesListSchema = import_zod23.z.object({
|
|
36112
|
+
certificate_authorities: import_zod23.z.array(CertificateAuthoritySchema)
|
|
35789
36113
|
});
|
|
35790
|
-
var CertificateAuthorityCreateSchema =
|
|
35791
|
-
configuration:
|
|
36114
|
+
var CertificateAuthorityCreateSchema = import_zod23.z.object({
|
|
36115
|
+
configuration: import_zod23.z.object({
|
|
35792
36116
|
subject: CertificateAuthoritySubjectSchema
|
|
35793
36117
|
})
|
|
35794
36118
|
});
|
|
35795
|
-
var CertificateAuthorityIdInputSchema =
|
|
35796
|
-
project_id:
|
|
35797
|
-
certificate_authority_id:
|
|
36119
|
+
var CertificateAuthorityIdInputSchema = import_zod23.z.object({
|
|
36120
|
+
project_id: import_zod23.z.string(),
|
|
36121
|
+
certificate_authority_id: import_zod23.z.string().min(1)
|
|
35798
36122
|
});
|
|
35799
36123
|
var CertificateAuthorityImportInputSchema = CertificateAuthorityIdInputSchema.extend({
|
|
35800
|
-
imported_certificate_chain:
|
|
36124
|
+
imported_certificate_chain: import_zod23.z.string().min(1)
|
|
35801
36125
|
});
|
|
35802
36126
|
var CertificateIdInputSchema = CertificateAuthorityIdInputSchema.extend({
|
|
35803
|
-
certificate_id:
|
|
36127
|
+
certificate_id: import_zod23.z.string().min(1)
|
|
35804
36128
|
});
|
|
35805
|
-
var CertificateConfigurationSchema =
|
|
36129
|
+
var CertificateConfigurationSchema = import_zod23.z.object({
|
|
35806
36130
|
validity: CertificateValiditySchema
|
|
35807
36131
|
});
|
|
35808
|
-
var CreateCertificateInputSchema =
|
|
35809
|
-
project_id:
|
|
35810
|
-
certificate_authority_id:
|
|
35811
|
-
|
|
35812
|
-
|
|
35813
|
-
csr: import_zod22.z.string()
|
|
35814
|
-
})
|
|
36132
|
+
var CreateCertificateInputSchema = import_zod23.z.object({
|
|
36133
|
+
project_id: import_zod23.z.string(),
|
|
36134
|
+
certificate_authority_id: import_zod23.z.string().min(1),
|
|
36135
|
+
csr: import_zod23.z.string().min(1),
|
|
36136
|
+
configuration: CertificateConfigurationSchema
|
|
35815
36137
|
});
|
|
35816
|
-
var CertificateSchema =
|
|
36138
|
+
var CertificateSchema = import_zod23.z.object({
|
|
35817
36139
|
certificate: CertificateAuthorityCertificateSchema.optional(),
|
|
35818
|
-
certificate_authority_id:
|
|
36140
|
+
certificate_authority_id: import_zod23.z.string(),
|
|
35819
36141
|
certificate_chain: CertificateAuthorityCertificateChainSchema.optional(),
|
|
35820
36142
|
configuration: CertificateConfigurationSchema.optional(),
|
|
35821
|
-
csr:
|
|
35822
|
-
id:
|
|
35823
|
-
project_id:
|
|
36143
|
+
csr: import_zod23.z.string().optional(),
|
|
36144
|
+
id: import_zod23.z.string(),
|
|
36145
|
+
project_id: import_zod23.z.string()
|
|
35824
36146
|
});
|
|
35825
|
-
var
|
|
35826
|
-
|
|
35827
|
-
});
|
|
35828
|
-
var CertificatesListSchema = import_zod22.z.object({
|
|
35829
|
-
certificates: import_zod22.z.array(CertificateSchema)
|
|
36147
|
+
var CertificatesListSchema = import_zod23.z.object({
|
|
36148
|
+
certificates: import_zod23.z.array(CertificateSchema)
|
|
35830
36149
|
});
|
|
35831
36150
|
|
|
35832
36151
|
// src/server/Services/routers/pcaRouter.ts
|
|
@@ -35905,14 +36224,12 @@ var pcaRouter = {
|
|
|
35905
36224
|
}),
|
|
35906
36225
|
createCertificate: projectScopedProcedure.input(CreateCertificateInputSchema).mutation(async ({ input, ctx }) => {
|
|
35907
36226
|
return withErrorHandling3(async () => {
|
|
35908
|
-
const pca = ctx.openstack?.service("
|
|
35909
|
-
validateOpenstackService(pca, "
|
|
36227
|
+
const pca = ctx.openstack?.service("pca");
|
|
36228
|
+
validateOpenstackService(pca, "pca");
|
|
35910
36229
|
const url = `${PCA_BASE_URL}/${input.certificate_authority_id}/certificates`;
|
|
35911
|
-
const response = await pca.post(url,
|
|
35912
|
-
body: JSON.stringify(input.certificate)
|
|
35913
|
-
});
|
|
36230
|
+
const response = await pca.post(url, omit(input, "project_id", "certificate_authority_id"));
|
|
35914
36231
|
const data = await response.json();
|
|
35915
|
-
return parseOrThrow(
|
|
36232
|
+
return parseOrThrow(CertificateSchema, data, "pcaRouter.createCertificate");
|
|
35916
36233
|
}, "create certificate for certificate authority");
|
|
35917
36234
|
}),
|
|
35918
36235
|
getByIdCertificate: projectScopedProcedure.input(CertificateIdInputSchema).query(async ({ input, ctx }) => {
|
|
@@ -35941,6 +36258,7 @@ var appRouter = mergeRouters(auroraRouter(authRouters), auroraRouter(computeRout
|
|
|
35941
36258
|
var import_signal_openstack = __toESM(require_esm2());
|
|
35942
36259
|
|
|
35943
36260
|
// src/server/sessionCookie.ts
|
|
36261
|
+
var import_cookie = require("@fastify/cookie");
|
|
35944
36262
|
var DEFAULT_COOKIE_NAME = "dashboard-session-auth";
|
|
35945
36263
|
function extractCookieDomain(hostname, crossDomainCookie) {
|
|
35946
36264
|
if (!crossDomainCookie) return void 0;
|
|
@@ -36246,7 +36564,7 @@ __name(createContext, "createContext");
|
|
|
36246
36564
|
// src/server/server.ts
|
|
36247
36565
|
var import_path2 = __toESM(require("path"));
|
|
36248
36566
|
var import_node_stream3 = require("stream");
|
|
36249
|
-
var
|
|
36567
|
+
var import_zod24 = require("zod");
|
|
36250
36568
|
|
|
36251
36569
|
// src/server/aurora-fastify-plugins/csrfProtection.ts
|
|
36252
36570
|
var import_csrf_protection = __toESM(require("@fastify/csrf-protection"));
|
|
@@ -36340,7 +36658,7 @@ async function createServer(config) {
|
|
|
36340
36658
|
maxParamLength: 5e3
|
|
36341
36659
|
}
|
|
36342
36660
|
});
|
|
36343
|
-
server.register(
|
|
36661
|
+
server.register(import_cookie2.default, {
|
|
36344
36662
|
secret: void 0
|
|
36345
36663
|
});
|
|
36346
36664
|
await server.register(import_rate_limit.default, {
|
|
@@ -36453,7 +36771,7 @@ async function createServer(config) {
|
|
|
36453
36771
|
router: appRouter,
|
|
36454
36772
|
createContext: /* @__PURE__ */ __name((opts) => createContext(opts, contextConfig), "createContext"),
|
|
36455
36773
|
onError: /* @__PURE__ */ __name((err) => {
|
|
36456
|
-
if (err.error.cause instanceof
|
|
36774
|
+
if (err.error.cause instanceof import_zod24.ZodError) err.error.message = err.error.cause.issues.map((e) => e.message).join(",");
|
|
36457
36775
|
}, "onError")
|
|
36458
36776
|
}
|
|
36459
36777
|
});
|