@veruna/api-contracts 1.0.18 → 1.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/build/controllers/ai-model.controllers.d.ts +5 -0
  2. package/build/controllers/ai-model.controllers.js +8 -0
  3. package/build/controllers/ai-provider.controllers.d.ts +5 -0
  4. package/build/controllers/ai-provider.controllers.js +8 -0
  5. package/build/controllers/file.controllers.d.ts +5 -0
  6. package/build/controllers/file.controllers.js +8 -0
  7. package/build/controllers/index.d.ts +3 -0
  8. package/build/controllers/index.js +9 -1
  9. package/build/rest-api.d.ts +33 -0
  10. package/build/rest-api.js +39 -0
  11. package/build/routes/ai-model-admin.routes.d.ts +11 -0
  12. package/build/routes/ai-model-admin.routes.js +14 -0
  13. package/build/routes/ai-model-public.routes.d.ts +7 -0
  14. package/build/routes/ai-model-public.routes.js +10 -0
  15. package/build/routes/ai-provider-admin.routes.d.ts +11 -0
  16. package/build/routes/ai-provider-admin.routes.js +14 -0
  17. package/build/routes/ai-provider-public.routes.d.ts +7 -0
  18. package/build/routes/ai-provider-public.routes.js +10 -0
  19. package/build/routes/file.routes.d.ts +14 -0
  20. package/build/routes/file.routes.js +20 -0
  21. package/build/routes/index.d.ts +5 -0
  22. package/build/routes/index.js +11 -1
  23. package/build/v1/ai-model/admin/commands/create-model.command.d.ts +29 -0
  24. package/build/v1/ai-model/admin/commands/create-model.command.js +13 -0
  25. package/build/v1/ai-model/admin/commands/delete-model.command.d.ts +12 -0
  26. package/build/v1/ai-model/admin/commands/delete-model.command.js +14 -0
  27. package/build/v1/ai-model/admin/commands/index.d.ts +3 -0
  28. package/build/v1/ai-model/admin/commands/index.js +19 -0
  29. package/build/v1/ai-model/admin/commands/update-model.command.d.ts +29 -0
  30. package/build/v1/ai-model/admin/commands/update-model.command.js +13 -0
  31. package/build/v1/ai-model/admin/queries/get-model.query.d.ts +21 -0
  32. package/build/v1/ai-model/admin/queries/get-model.query.js +14 -0
  33. package/build/v1/ai-model/admin/queries/get-models.query.d.ts +37 -0
  34. package/build/v1/ai-model/admin/queries/get-models.query.js +14 -0
  35. package/build/v1/ai-model/admin/queries/index.d.ts +2 -0
  36. package/build/v1/ai-model/admin/queries/index.js +18 -0
  37. package/build/v1/ai-model/ai-model.errors.d.ts +8 -0
  38. package/build/v1/ai-model/ai-model.errors.js +28 -0
  39. package/build/v1/ai-model/index.d.ts +5 -0
  40. package/build/v1/ai-model/index.js +21 -0
  41. package/build/v1/ai-model/public/queries/get-active-models.query.d.ts +21 -0
  42. package/build/v1/ai-model/public/queries/get-active-models.query.js +14 -0
  43. package/build/v1/ai-model/public/queries/index.d.ts +1 -0
  44. package/build/v1/ai-model/public/queries/index.js +17 -0
  45. package/build/v1/ai-model/schemas/ai-model-status.enum.d.ts +7 -0
  46. package/build/v1/ai-model/schemas/ai-model-status.enum.js +11 -0
  47. package/build/v1/ai-model/schemas/create-model-request.schema.d.ts +11 -0
  48. package/build/v1/ai-model/schemas/create-model-request.schema.js +19 -0
  49. package/build/v1/ai-model/schemas/get-models-filters.schema.d.ts +6 -0
  50. package/build/v1/ai-model/schemas/get-models-filters.schema.js +9 -0
  51. package/build/v1/ai-model/schemas/index.d.ts +6 -0
  52. package/build/v1/ai-model/schemas/index.js +22 -0
  53. package/build/v1/ai-model/schemas/model-response.schema.d.ts +17 -0
  54. package/build/v1/ai-model/schemas/model-response.schema.js +21 -0
  55. package/build/v1/ai-model/schemas/route-params.schema.d.ts +4 -0
  56. package/build/v1/ai-model/schemas/route-params.schema.js +7 -0
  57. package/build/v1/ai-model/schemas/update-model-request.schema.d.ts +11 -0
  58. package/build/v1/ai-model/schemas/update-model-request.schema.js +20 -0
  59. package/build/v1/ai-provider/admin/commands/create-provider.command.d.ts +23 -0
  60. package/build/v1/ai-provider/admin/commands/create-provider.command.js +13 -0
  61. package/build/v1/ai-provider/admin/commands/delete-provider.command.d.ts +14 -0
  62. package/build/v1/ai-provider/admin/commands/delete-provider.command.js +14 -0
  63. package/build/v1/ai-provider/admin/commands/index.d.ts +3 -0
  64. package/build/v1/ai-provider/admin/commands/index.js +19 -0
  65. package/build/v1/ai-provider/admin/commands/update-provider.command.d.ts +27 -0
  66. package/build/v1/ai-provider/admin/commands/update-provider.command.js +14 -0
  67. package/build/v1/ai-provider/admin/queries/get-provider.query.d.ts +20 -0
  68. package/build/v1/ai-provider/admin/queries/get-provider.query.js +13 -0
  69. package/build/v1/ai-provider/admin/queries/get-providers.query.d.ts +31 -0
  70. package/build/v1/ai-provider/admin/queries/get-providers.query.js +14 -0
  71. package/build/v1/ai-provider/admin/queries/index.d.ts +2 -0
  72. package/build/v1/ai-provider/admin/queries/index.js +18 -0
  73. package/build/v1/ai-provider/ai-provider.errors.d.ts +7 -0
  74. package/build/v1/ai-provider/ai-provider.errors.js +23 -0
  75. package/build/v1/ai-provider/index.d.ts +5 -0
  76. package/build/v1/ai-provider/index.js +21 -0
  77. package/build/v1/ai-provider/public/queries/get-active-providers.query.d.ts +18 -0
  78. package/build/v1/ai-provider/public/queries/get-active-providers.query.js +16 -0
  79. package/build/v1/ai-provider/public/queries/index.d.ts +1 -0
  80. package/build/v1/ai-provider/public/queries/index.js +17 -0
  81. package/build/v1/ai-provider/schemas/ai-provider-status.enum.d.ts +7 -0
  82. package/build/v1/ai-provider/schemas/ai-provider-status.enum.js +11 -0
  83. package/build/v1/ai-provider/schemas/create-provider-request.schema.d.ts +9 -0
  84. package/build/v1/ai-provider/schemas/create-provider-request.schema.js +16 -0
  85. package/build/v1/ai-provider/schemas/index.d.ts +5 -0
  86. package/build/v1/ai-provider/schemas/index.js +21 -0
  87. package/build/v1/ai-provider/schemas/provider-response.schema.d.ts +15 -0
  88. package/build/v1/ai-provider/schemas/provider-response.schema.js +18 -0
  89. package/build/v1/ai-provider/schemas/route-params.schema.d.ts +4 -0
  90. package/build/v1/ai-provider/schemas/route-params.schema.js +8 -0
  91. package/build/v1/ai-provider/schemas/update-provider-request.schema.d.ts +9 -0
  92. package/build/v1/ai-provider/schemas/update-provider-request.schema.js +17 -0
  93. package/build/v1/file/commands/delete-file-by-key.command.d.ts +15 -0
  94. package/build/v1/file/commands/delete-file-by-key.command.js +15 -0
  95. package/build/v1/file/commands/delete-file.command.d.ts +15 -0
  96. package/build/v1/file/commands/delete-file.command.js +18 -0
  97. package/build/v1/file/commands/index.d.ts +4 -0
  98. package/build/v1/file/commands/index.js +20 -0
  99. package/build/v1/file/commands/upload-file.command.d.ts +16 -0
  100. package/build/v1/file/commands/upload-file.command.js +15 -0
  101. package/build/v1/file/commands/upload-image.command.d.ts +19 -0
  102. package/build/v1/file/commands/upload-image.command.js +15 -0
  103. package/build/v1/file/file.errors.d.ts +15 -0
  104. package/build/v1/file/file.errors.js +73 -0
  105. package/build/v1/file/index.d.ts +6 -0
  106. package/build/v1/file/index.js +26 -0
  107. package/build/v1/file/queries/get-file.query.d.ts +33 -0
  108. package/build/v1/file/queries/get-file.query.js +18 -0
  109. package/build/v1/file/queries/index.d.ts +3 -0
  110. package/build/v1/file/queries/index.js +19 -0
  111. package/build/v1/file/queries/list-files.query.d.ts +38 -0
  112. package/build/v1/file/queries/list-files.query.js +15 -0
  113. package/build/v1/file/queries/list-folders.query.d.ts +17 -0
  114. package/build/v1/file/queries/list-folders.query.js +15 -0
  115. package/build/v1/file/schemas/delete-file-by-key-request.schema.d.ts +7 -0
  116. package/build/v1/file/schemas/delete-file-by-key-request.schema.js +10 -0
  117. package/build/v1/file/schemas/delete-file-response.schema.d.ts +15 -0
  118. package/build/v1/file/schemas/delete-file-response.schema.js +18 -0
  119. package/build/v1/file/schemas/file-category.enum.d.ts +9 -0
  120. package/build/v1/file/schemas/file-category.enum.js +13 -0
  121. package/build/v1/file/schemas/file-response.schema.d.ts +18 -0
  122. package/build/v1/file/schemas/file-response.schema.js +21 -0
  123. package/build/v1/file/schemas/file-status.enum.d.ts +10 -0
  124. package/build/v1/file/schemas/file-status.enum.js +14 -0
  125. package/build/v1/file/schemas/file-variant-response.schema.d.ts +13 -0
  126. package/build/v1/file/schemas/file-variant-response.schema.js +16 -0
  127. package/build/v1/file/schemas/file-with-variants-response.schema.d.ts +26 -0
  128. package/build/v1/file/schemas/file-with-variants-response.schema.js +13 -0
  129. package/build/v1/file/schemas/folder-response.schema.d.ts +17 -0
  130. package/build/v1/file/schemas/folder-response.schema.js +17 -0
  131. package/build/v1/file/schemas/image-format.enum.d.ts +7 -0
  132. package/build/v1/file/schemas/image-format.enum.js +11 -0
  133. package/build/v1/file/schemas/index.d.ts +16 -0
  134. package/build/v1/file/schemas/index.js +37 -0
  135. package/build/v1/file/schemas/list-files-request.schema.d.ts +14 -0
  136. package/build/v1/file/schemas/list-files-request.schema.js +17 -0
  137. package/build/v1/file/schemas/list-files-response.schema.d.ts +26 -0
  138. package/build/v1/file/schemas/list-files-response.schema.js +13 -0
  139. package/build/v1/file/schemas/list-folders-request.schema.d.ts +7 -0
  140. package/build/v1/file/schemas/list-folders-request.schema.js +10 -0
  141. package/build/v1/file/schemas/upload-file-request.schema.d.ts +7 -0
  142. package/build/v1/file/schemas/upload-file-request.schema.js +10 -0
  143. package/build/v1/file/schemas/upload-file-response.schema.d.ts +9 -0
  144. package/build/v1/file/schemas/upload-file-response.schema.js +12 -0
  145. package/build/v1/file/schemas/upload-image-request.schema.d.ts +18 -0
  146. package/build/v1/file/schemas/upload-image-request.schema.js +28 -0
  147. package/build/v1/file/schemas/upload-image-response.schema.d.ts +10 -0
  148. package/build/v1/file/schemas/upload-image-response.schema.js +19 -0
  149. package/build/v1/index.d.ts +2 -0
  150. package/build/v1/index.js +2 -0
  151. package/package.json +1 -1
@@ -0,0 +1,7 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Delete file by key query parameters schema
4
+ */
5
+ export declare const DeleteFileByKeyQuerySchema: z.ZodObject<{
6
+ key: z.ZodString;
7
+ }, z.core.$strip>;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteFileByKeyQuerySchema = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * Delete file by key query parameters schema
7
+ */
8
+ exports.DeleteFileByKeyQuerySchema = zod_1.z.object({
9
+ key: zod_1.z.string().min(1),
10
+ });
@@ -0,0 +1,15 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Delete file by ID response schema
4
+ */
5
+ export declare const DeleteFileResponseSchema: z.ZodObject<{
6
+ success: z.ZodBoolean;
7
+ message: z.ZodString;
8
+ }, z.core.$strip>;
9
+ /**
10
+ * Delete file by key response schema (legacy)
11
+ */
12
+ export declare const DeleteFileByKeyResponseSchema: z.ZodObject<{
13
+ message: z.ZodString;
14
+ key: z.ZodString;
15
+ }, z.core.$strip>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteFileByKeyResponseSchema = exports.DeleteFileResponseSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * Delete file by ID response schema
7
+ */
8
+ exports.DeleteFileResponseSchema = zod_1.z.object({
9
+ success: zod_1.z.boolean(),
10
+ message: zod_1.z.string(),
11
+ });
12
+ /**
13
+ * Delete file by key response schema (legacy)
14
+ */
15
+ exports.DeleteFileByKeyResponseSchema = zod_1.z.object({
16
+ message: zod_1.z.string(),
17
+ key: zod_1.z.string(),
18
+ });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * File category based on content type
3
+ */
4
+ export declare enum FileCategory {
5
+ IMAGE = "image",
6
+ DOCUMENT = "document",
7
+ VIDEO = "video",
8
+ OTHER = "other"
9
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FileCategory = void 0;
4
+ /**
5
+ * File category based on content type
6
+ */
7
+ var FileCategory;
8
+ (function (FileCategory) {
9
+ FileCategory["IMAGE"] = "image";
10
+ FileCategory["DOCUMENT"] = "document";
11
+ FileCategory["VIDEO"] = "video";
12
+ FileCategory["OTHER"] = "other";
13
+ })(FileCategory || (exports.FileCategory = FileCategory = {}));
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ import { FileStatus } from './file-status.enum';
3
+ import { FileCategory } from './file-category.enum';
4
+ /**
5
+ * File item schema (for list responses)
6
+ */
7
+ export declare const FileItemResponseSchema: z.ZodObject<{
8
+ id: z.ZodString;
9
+ folder: z.ZodString;
10
+ filename: z.ZodString;
11
+ size: z.ZodNumber;
12
+ contentType: z.ZodString;
13
+ category: z.ZodEnum<typeof FileCategory>;
14
+ status: z.ZodEnum<typeof FileStatus>;
15
+ url: z.ZodOptional<z.ZodString>;
16
+ uploadedBy: z.ZodString;
17
+ uploadedAt: z.ZodString;
18
+ }, z.core.$strip>;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FileItemResponseSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const file_status_enum_1 = require("./file-status.enum");
6
+ const file_category_enum_1 = require("./file-category.enum");
7
+ /**
8
+ * File item schema (for list responses)
9
+ */
10
+ exports.FileItemResponseSchema = zod_1.z.object({
11
+ id: zod_1.z.string().uuid(),
12
+ folder: zod_1.z.string(),
13
+ filename: zod_1.z.string(),
14
+ size: zod_1.z.number().int().nonnegative(),
15
+ contentType: zod_1.z.string(),
16
+ category: zod_1.z.enum(file_category_enum_1.FileCategory),
17
+ status: zod_1.z.enum(file_status_enum_1.FileStatus),
18
+ url: zod_1.z.string().optional(),
19
+ uploadedBy: zod_1.z.string(),
20
+ uploadedAt: zod_1.z.string().datetime(),
21
+ });
@@ -0,0 +1,10 @@
1
+ /**
2
+ * File processing status
3
+ */
4
+ export declare enum FileStatus {
5
+ UPLOADING = "UPLOADING",
6
+ PROCESSING = "PROCESSING",
7
+ READY = "READY",
8
+ FAILED = "FAILED",
9
+ DELETED = "DELETED"
10
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FileStatus = void 0;
4
+ /**
5
+ * File processing status
6
+ */
7
+ var FileStatus;
8
+ (function (FileStatus) {
9
+ FileStatus["UPLOADING"] = "UPLOADING";
10
+ FileStatus["PROCESSING"] = "PROCESSING";
11
+ FileStatus["READY"] = "READY";
12
+ FileStatus["FAILED"] = "FAILED";
13
+ FileStatus["DELETED"] = "DELETED";
14
+ })(FileStatus || (exports.FileStatus = FileStatus = {}));
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * File variant schema (for images with different sizes/formats)
4
+ */
5
+ export declare const FileVariantResponseSchema: z.ZodObject<{
6
+ id: z.ZodString;
7
+ sizeName: z.ZodString;
8
+ format: z.ZodString;
9
+ sizeBytes: z.ZodNumber;
10
+ width: z.ZodOptional<z.ZodNumber>;
11
+ height: z.ZodOptional<z.ZodNumber>;
12
+ url: z.ZodOptional<z.ZodString>;
13
+ }, z.core.$strip>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FileVariantResponseSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * File variant schema (for images with different sizes/formats)
7
+ */
8
+ exports.FileVariantResponseSchema = zod_1.z.object({
9
+ id: zod_1.z.string().uuid(),
10
+ sizeName: zod_1.z.string(),
11
+ format: zod_1.z.string(),
12
+ sizeBytes: zod_1.z.number().int().nonnegative(),
13
+ width: zod_1.z.number().int().positive().optional(),
14
+ height: zod_1.z.number().int().positive().optional(),
15
+ url: zod_1.z.string().optional(),
16
+ });
@@ -0,0 +1,26 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * File with variants schema (for single file response)
4
+ */
5
+ export declare const FileWithVariantsResponseSchema: z.ZodObject<{
6
+ id: z.ZodString;
7
+ folder: z.ZodString;
8
+ filename: z.ZodString;
9
+ size: z.ZodNumber;
10
+ contentType: z.ZodString;
11
+ category: z.ZodEnum<typeof import("./file-category.enum").FileCategory>;
12
+ status: z.ZodEnum<typeof import("./file-status.enum").FileStatus>;
13
+ url: z.ZodOptional<z.ZodString>;
14
+ uploadedBy: z.ZodString;
15
+ uploadedAt: z.ZodString;
16
+ updatedAt: z.ZodString;
17
+ variants: z.ZodArray<z.ZodObject<{
18
+ id: z.ZodString;
19
+ sizeName: z.ZodString;
20
+ format: z.ZodString;
21
+ sizeBytes: z.ZodNumber;
22
+ width: z.ZodOptional<z.ZodNumber>;
23
+ height: z.ZodOptional<z.ZodNumber>;
24
+ url: z.ZodOptional<z.ZodString>;
25
+ }, z.core.$strip>>;
26
+ }, z.core.$strip>;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FileWithVariantsResponseSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const file_response_schema_1 = require("./file-response.schema");
6
+ const file_variant_response_schema_1 = require("./file-variant-response.schema");
7
+ /**
8
+ * File with variants schema (for single file response)
9
+ */
10
+ exports.FileWithVariantsResponseSchema = file_response_schema_1.FileItemResponseSchema.extend({
11
+ updatedAt: zod_1.z.string().datetime(),
12
+ variants: zod_1.z.array(file_variant_response_schema_1.FileVariantResponseSchema),
13
+ });
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Folder item schema
4
+ */
5
+ export declare const FolderItemSchema: z.ZodObject<{
6
+ path: z.ZodString;
7
+ fileCount: z.ZodNumber;
8
+ }, z.core.$strip>;
9
+ /**
10
+ * List folders response schema
11
+ */
12
+ export declare const ListFoldersResponseSchema: z.ZodObject<{
13
+ folders: z.ZodArray<z.ZodObject<{
14
+ path: z.ZodString;
15
+ fileCount: z.ZodNumber;
16
+ }, z.core.$strip>>;
17
+ }, z.core.$strip>;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListFoldersResponseSchema = exports.FolderItemSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * Folder item schema
7
+ */
8
+ exports.FolderItemSchema = zod_1.z.object({
9
+ path: zod_1.z.string(),
10
+ fileCount: zod_1.z.number().int().nonnegative(),
11
+ });
12
+ /**
13
+ * List folders response schema
14
+ */
15
+ exports.ListFoldersResponseSchema = zod_1.z.object({
16
+ folders: zod_1.z.array(exports.FolderItemSchema),
17
+ });
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Supported image formats for conversion
3
+ */
4
+ export declare enum ImageFormat {
5
+ WEBP = "webp",
6
+ JPEG = "jpeg"
7
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ImageFormat = void 0;
4
+ /**
5
+ * Supported image formats for conversion
6
+ */
7
+ var ImageFormat;
8
+ (function (ImageFormat) {
9
+ ImageFormat["WEBP"] = "webp";
10
+ ImageFormat["JPEG"] = "jpeg";
11
+ })(ImageFormat || (exports.ImageFormat = ImageFormat = {}));
@@ -0,0 +1,16 @@
1
+ export * from './file-status.enum';
2
+ export * from './file-category.enum';
3
+ export * from './image-format.enum';
4
+ export * from './file-response.schema';
5
+ export * from './file-variant-response.schema';
6
+ export * from './file-with-variants-response.schema';
7
+ export * from './folder-response.schema';
8
+ export * from './upload-image-request.schema';
9
+ export * from './upload-image-response.schema';
10
+ export * from './upload-file-request.schema';
11
+ export * from './upload-file-response.schema';
12
+ export * from './list-files-request.schema';
13
+ export * from './list-files-response.schema';
14
+ export * from './list-folders-request.schema';
15
+ export * from './delete-file-response.schema';
16
+ export * from './delete-file-by-key-request.schema';
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ // Enums
18
+ __exportStar(require("./file-status.enum"), exports);
19
+ __exportStar(require("./file-category.enum"), exports);
20
+ __exportStar(require("./image-format.enum"), exports);
21
+ // Response schemas
22
+ __exportStar(require("./file-response.schema"), exports);
23
+ __exportStar(require("./file-variant-response.schema"), exports);
24
+ __exportStar(require("./file-with-variants-response.schema"), exports);
25
+ __exportStar(require("./folder-response.schema"), exports);
26
+ // Upload schemas
27
+ __exportStar(require("./upload-image-request.schema"), exports);
28
+ __exportStar(require("./upload-image-response.schema"), exports);
29
+ __exportStar(require("./upload-file-request.schema"), exports);
30
+ __exportStar(require("./upload-file-response.schema"), exports);
31
+ // List schemas
32
+ __exportStar(require("./list-files-request.schema"), exports);
33
+ __exportStar(require("./list-files-response.schema"), exports);
34
+ __exportStar(require("./list-folders-request.schema"), exports);
35
+ // Delete schemas
36
+ __exportStar(require("./delete-file-response.schema"), exports);
37
+ __exportStar(require("./delete-file-by-key-request.schema"), exports);
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ import { FileStatus } from './file-status.enum';
3
+ import { FileCategory } from './file-category.enum';
4
+ /**
5
+ * List files query parameters schema
6
+ */
7
+ export declare const ListFilesQuerySchema: z.ZodObject<{
8
+ folder: z.ZodOptional<z.ZodString>;
9
+ status: z.ZodOptional<z.ZodEnum<typeof FileStatus>>;
10
+ category: z.ZodOptional<z.ZodEnum<typeof FileCategory>>;
11
+ uploadedBy: z.ZodOptional<z.ZodString>;
12
+ page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
13
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
14
+ }, z.core.$strip>;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListFilesQuerySchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const file_status_enum_1 = require("./file-status.enum");
6
+ const file_category_enum_1 = require("./file-category.enum");
7
+ /**
8
+ * List files query parameters schema
9
+ */
10
+ exports.ListFilesQuerySchema = zod_1.z.object({
11
+ folder: zod_1.z.string().optional(),
12
+ status: zod_1.z.enum(file_status_enum_1.FileStatus).optional(),
13
+ category: zod_1.z.enum(file_category_enum_1.FileCategory).optional(),
14
+ uploadedBy: zod_1.z.string().optional(),
15
+ page: zod_1.z.coerce.number().int().positive().default(1),
16
+ limit: zod_1.z.coerce.number().int().positive().max(100).default(20),
17
+ });
@@ -0,0 +1,26 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * List files paginated response schema
4
+ */
5
+ export declare const ListFilesResponseSchema: z.ZodObject<{
6
+ data: z.ZodArray<z.ZodObject<{
7
+ id: z.ZodString;
8
+ folder: z.ZodString;
9
+ filename: z.ZodString;
10
+ size: z.ZodNumber;
11
+ contentType: z.ZodString;
12
+ category: z.ZodEnum<typeof import("./file-category.enum").FileCategory>;
13
+ status: z.ZodEnum<typeof import("./file-status.enum").FileStatus>;
14
+ url: z.ZodOptional<z.ZodString>;
15
+ uploadedBy: z.ZodString;
16
+ uploadedAt: z.ZodString;
17
+ }, z.core.$strip>>;
18
+ meta: z.ZodObject<{
19
+ page: z.ZodNumber;
20
+ limit: z.ZodNumber;
21
+ total: z.ZodNumber;
22
+ totalPages: z.ZodNumber;
23
+ hasNext: z.ZodBoolean;
24
+ hasPrev: z.ZodBoolean;
25
+ }, z.core.$strip>;
26
+ }, z.core.$strip>;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListFilesResponseSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const file_response_schema_1 = require("./file-response.schema");
6
+ const shared_1 = require("../../../shared");
7
+ /**
8
+ * List files paginated response schema
9
+ */
10
+ exports.ListFilesResponseSchema = zod_1.z.object({
11
+ data: zod_1.z.array(file_response_schema_1.FileItemResponseSchema),
12
+ meta: shared_1.PaginationMetaSchema,
13
+ });
@@ -0,0 +1,7 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * List folders query parameters schema
4
+ */
5
+ export declare const ListFoldersQuerySchema: z.ZodObject<{
6
+ prefix: z.ZodOptional<z.ZodString>;
7
+ }, z.core.$strip>;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListFoldersQuerySchema = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * List folders query parameters schema
7
+ */
8
+ exports.ListFoldersQuerySchema = zod_1.z.object({
9
+ prefix: zod_1.z.string().optional(),
10
+ });
@@ -0,0 +1,7 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Upload file query parameters schema
4
+ */
5
+ export declare const UploadFileQuerySchema: z.ZodObject<{
6
+ folder: z.ZodString;
7
+ }, z.core.$strip>;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UploadFileQuerySchema = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * Upload file query parameters schema
7
+ */
8
+ exports.UploadFileQuerySchema = zod_1.z.object({
9
+ folder: zod_1.z.string().min(1),
10
+ });
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Upload file response schema
4
+ */
5
+ export declare const UploadFileResponseSchema: z.ZodObject<{
6
+ key: z.ZodString;
7
+ cdnUrl: z.ZodString;
8
+ s3Url: z.ZodString;
9
+ }, z.core.$strip>;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UploadFileResponseSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * Upload file response schema
7
+ */
8
+ exports.UploadFileResponseSchema = zod_1.z.object({
9
+ key: zod_1.z.string(),
10
+ cdnUrl: zod_1.z.string().url(),
11
+ s3Url: zod_1.z.string().url(),
12
+ });
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ import { ImageFormat } from './image-format.enum';
3
+ /**
4
+ * Upload image query parameters schema
5
+ */
6
+ export declare const UploadImageQuerySchema: z.ZodObject<{
7
+ folder: z.ZodString;
8
+ formats: z.ZodString;
9
+ sizes: z.ZodOptional<z.ZodString>;
10
+ }, z.core.$strip>;
11
+ /**
12
+ * Helper to parse formats string to array
13
+ */
14
+ export declare function parseFormats(formats: string): ImageFormat[];
15
+ /**
16
+ * Helper to parse sizes string to array
17
+ */
18
+ export declare function parseSizes(sizes: string | undefined): string[];
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UploadImageQuerySchema = void 0;
4
+ exports.parseFormats = parseFormats;
5
+ exports.parseSizes = parseSizes;
6
+ const zod_1 = require("zod");
7
+ /**
8
+ * Upload image query parameters schema
9
+ */
10
+ exports.UploadImageQuerySchema = zod_1.z.object({
11
+ folder: zod_1.z.string().min(1),
12
+ formats: zod_1.z.string().min(1), // comma-separated: "webp" | "jpeg" | "webp,jpeg"
13
+ sizes: zod_1.z.string().optional(), // comma-separated: "1024x1024,512x512"
14
+ });
15
+ /**
16
+ * Helper to parse formats string to array
17
+ */
18
+ function parseFormats(formats) {
19
+ return formats.split(',').map((f) => f.trim());
20
+ }
21
+ /**
22
+ * Helper to parse sizes string to array
23
+ */
24
+ function parseSizes(sizes) {
25
+ if (!sizes)
26
+ return [];
27
+ return sizes.split(',').map((s) => s.trim());
28
+ }
@@ -0,0 +1,10 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Upload image response schema
4
+ */
5
+ export declare const UploadImageResponseSchema: z.ZodObject<{
6
+ id: z.ZodString;
7
+ variants: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>;
8
+ cdnUrl: z.ZodString;
9
+ s3Url: z.ZodString;
10
+ }, z.core.$strip>;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UploadImageResponseSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * Variants map: size -> format -> path
7
+ * Example: { "1024x1024": { "webp": "path/to/file.webp", "jpeg": "path/to/file.jpg" } }
8
+ */
9
+ const VariantsMapSchema = zod_1.z.record(zod_1.z.string(), // size name
10
+ zod_1.z.record(zod_1.z.string(), zod_1.z.string()));
11
+ /**
12
+ * Upload image response schema
13
+ */
14
+ exports.UploadImageResponseSchema = zod_1.z.object({
15
+ id: zod_1.z.string().uuid(),
16
+ variants: VariantsMapSchema,
17
+ cdnUrl: zod_1.z.string().url(),
18
+ s3Url: zod_1.z.string().url(),
19
+ });
@@ -5,3 +5,5 @@ export * from './users';
5
5
  export * from './email';
6
6
  export * from './notifications';
7
7
  export * from './seo-pages';
8
+ export * from './ai-provider';
9
+ export * from './ai-model';
package/build/v1/index.js CHANGED
@@ -21,3 +21,5 @@ __exportStar(require("./users"), exports);
21
21
  __exportStar(require("./email"), exports);
22
22
  __exportStar(require("./notifications"), exports);
23
23
  __exportStar(require("./seo-pages"), exports);
24
+ __exportStar(require("./ai-provider"), exports);
25
+ __exportStar(require("./ai-model"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veruna/api-contracts",
3
- "version": "1.0.18",
3
+ "version": "1.0.20",
4
4
  "description": "API contracts for Veruna project - Zod schemas, types, and paths",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",