feat: create application DTOs

Add data-transfer-object interfaces for the application layer:
upload, file, bucket, S3, and auth domains.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude
2026-07-28 17:56:49 +07:00
parent ee3167fbfb
commit 5e29589f1a
5 changed files with 294 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
/**
* Input for creating a new bucket.
*/
export interface CreateBucketInput {
/** Bucket name (must match S3 naming rules: 3-63 chars, lowercase, no underscore) */
name: string;
}
/**
* Single bucket representation returned by bucket endpoints.
*/
export interface BucketResponse {
/** Bucket UUID */
id: string;
/** Bucket name */
name: string;
/** ISO-8601 timestamp of when the bucket was created */
createdAt: string;
/** Number of non-deleted objects in the bucket */
objectCount?: number;
}
/**
* Response payload for the list-buckets endpoint.
*/
export interface BucketListResponse {
/** Array of buckets */
buckets: BucketResponse[];
}
/**
* Response payload for bucket creation.
*/
export interface CreateBucketResponse {
/** Bucket UUID */
id: string;
/** Bucket name */
name: string;
}
/**
* Response payload for bucket deletion.
*/
export interface DeleteBucketResponse {
/** Whether the deletion succeeded */
success: boolean;
}