@ai-grator/api 0.3.66 → 0.3.67

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 (192) hide show
  1. package/admin/endpoints/admin.ts +16 -0
  2. package/admin/endpoints/commands/create-admin-trend-category.command.ts +29 -0
  3. package/admin/endpoints/commands/create-admin-trend.command.ts +30 -0
  4. package/admin/endpoints/commands/delete-admin-trend-category.command.ts +28 -0
  5. package/admin/endpoints/commands/delete-admin-trend.command.ts +28 -0
  6. package/admin/endpoints/commands/index.ts +9 -0
  7. package/admin/endpoints/commands/probe-admin-trend-reference-video.command.ts +37 -0
  8. package/admin/endpoints/commands/reorder-admin-trends.command.ts +31 -0
  9. package/admin/endpoints/commands/update-admin-trend-category.command.ts +36 -0
  10. package/admin/endpoints/commands/update-admin-trend-status.command.ts +37 -0
  11. package/admin/endpoints/commands/update-admin-trend.command.ts +36 -0
  12. package/admin/endpoints/queries/get-admin-trend-categories.query.ts +22 -0
  13. package/admin/endpoints/queries/get-admin-trend.query.ts +29 -0
  14. package/admin/endpoints/queries/get-admin-trends.query.ts +36 -0
  15. package/admin/endpoints/queries/index.ts +3 -0
  16. package/admin/models/admin-trend-category-response.schema.ts +11 -0
  17. package/admin/models/admin-trend-response.schema.ts +61 -0
  18. package/admin/models/index.ts +2 -0
  19. package/build/admin/endpoints/admin.d.ts +12 -0
  20. package/build/admin/endpoints/admin.d.ts.map +1 -1
  21. package/build/admin/endpoints/admin.js +14 -0
  22. package/build/admin/endpoints/commands/create-admin-trend-category.command.d.ts +41 -0
  23. package/build/admin/endpoints/commands/create-admin-trend-category.command.d.ts.map +1 -0
  24. package/build/admin/endpoints/commands/create-admin-trend-category.command.js +25 -0
  25. package/build/admin/endpoints/commands/create-admin-trend.command.d.ts +144 -0
  26. package/build/admin/endpoints/commands/create-admin-trend.command.d.ts.map +1 -0
  27. package/build/admin/endpoints/commands/create-admin-trend.command.js +26 -0
  28. package/build/admin/endpoints/commands/delete-admin-trend-category.command.d.ts +26 -0
  29. package/build/admin/endpoints/commands/delete-admin-trend-category.command.d.ts.map +1 -0
  30. package/build/admin/endpoints/commands/delete-admin-trend-category.command.js +25 -0
  31. package/build/admin/endpoints/commands/delete-admin-trend.command.d.ts +26 -0
  32. package/build/admin/endpoints/commands/delete-admin-trend.command.d.ts.map +1 -0
  33. package/build/admin/endpoints/commands/delete-admin-trend.command.js +25 -0
  34. package/build/admin/endpoints/commands/index.d.ts +9 -0
  35. package/build/admin/endpoints/commands/index.d.ts.map +1 -1
  36. package/build/admin/endpoints/commands/index.js +9 -0
  37. package/build/admin/endpoints/commands/probe-admin-trend-reference-video.command.d.ts +37 -0
  38. package/build/admin/endpoints/commands/probe-admin-trend-reference-video.command.d.ts.map +1 -0
  39. package/build/admin/endpoints/commands/probe-admin-trend-reference-video.command.js +32 -0
  40. package/build/admin/endpoints/commands/reorder-admin-trends.command.d.ts +26 -0
  41. package/build/admin/endpoints/commands/reorder-admin-trends.command.d.ts.map +1 -0
  42. package/build/admin/endpoints/commands/reorder-admin-trends.command.js +28 -0
  43. package/build/admin/endpoints/commands/update-admin-trend-category.command.d.ts +49 -0
  44. package/build/admin/endpoints/commands/update-admin-trend-category.command.d.ts.map +1 -0
  45. package/build/admin/endpoints/commands/update-admin-trend-category.command.js +31 -0
  46. package/build/admin/endpoints/commands/update-admin-trend-status.command.d.ts +118 -0
  47. package/build/admin/endpoints/commands/update-admin-trend-status.command.d.ts.map +1 -0
  48. package/build/admin/endpoints/commands/update-admin-trend-status.command.js +32 -0
  49. package/build/admin/endpoints/commands/update-admin-trend.command.d.ts +151 -0
  50. package/build/admin/endpoints/commands/update-admin-trend.command.d.ts.map +1 -0
  51. package/build/admin/endpoints/commands/update-admin-trend.command.js +31 -0
  52. package/build/admin/endpoints/queries/get-admin-trend-categories.query.d.ts +32 -0
  53. package/build/admin/endpoints/queries/get-admin-trend-categories.query.d.ts.map +1 -0
  54. package/build/admin/endpoints/queries/get-admin-trend-categories.query.js +21 -0
  55. package/build/admin/endpoints/queries/get-admin-trend.query.d.ts +110 -0
  56. package/build/admin/endpoints/queries/get-admin-trend.query.d.ts.map +1 -0
  57. package/build/admin/endpoints/queries/get-admin-trend.query.js +26 -0
  58. package/build/admin/endpoints/queries/get-admin-trends.query.d.ts +63 -0
  59. package/build/admin/endpoints/queries/get-admin-trends.query.d.ts.map +1 -0
  60. package/build/admin/endpoints/queries/get-admin-trends.query.js +33 -0
  61. package/build/admin/endpoints/queries/index.d.ts +3 -0
  62. package/build/admin/endpoints/queries/index.d.ts.map +1 -1
  63. package/build/admin/endpoints/queries/index.js +3 -0
  64. package/build/admin/models/admin-trend-category-response.schema.d.ts +10 -0
  65. package/build/admin/models/admin-trend-category-response.schema.d.ts.map +1 -0
  66. package/build/admin/models/admin-trend-category-response.schema.js +11 -0
  67. package/build/admin/models/admin-trend-response.schema.d.ts +79 -0
  68. package/build/admin/models/admin-trend-response.schema.d.ts.map +1 -0
  69. package/build/admin/models/admin-trend-response.schema.js +53 -0
  70. package/build/admin/models/index.d.ts +2 -0
  71. package/build/admin/models/index.d.ts.map +1 -1
  72. package/build/admin/models/index.js +2 -0
  73. package/build/errors/errors.d.ts +142 -0
  74. package/build/errors/errors.d.ts.map +1 -1
  75. package/build/errors/errors.js +142 -0
  76. package/build/generation-job-chat/endpoints/commands/create-generation-job-chat.command.d.ts +2 -0
  77. package/build/generation-job-chat/endpoints/commands/create-generation-job-chat.command.d.ts.map +1 -1
  78. package/build/generation-job-chat/endpoints/commands/update-generation-job-chat.command.d.ts +2 -0
  79. package/build/generation-job-chat/endpoints/commands/update-generation-job-chat.command.d.ts.map +1 -1
  80. package/build/generation-job-chat/endpoints/queries/get-generation-job-chat-by-uuid.query.d.ts +2 -0
  81. package/build/generation-job-chat/endpoints/queries/get-generation-job-chat-by-uuid.query.d.ts.map +1 -1
  82. package/build/generation-job-chat/endpoints/queries/get-generation-job-chats.query.d.ts +2 -0
  83. package/build/generation-job-chat/endpoints/queries/get-generation-job-chats.query.d.ts.map +1 -1
  84. package/build/generation-job-chat/models/generation-job-chat-response.schema.d.ts +1 -0
  85. package/build/generation-job-chat/models/generation-job-chat-response.schema.d.ts.map +1 -1
  86. package/build/generation-job-chat/models/generation-job-chat-response.schema.js +1 -0
  87. package/build/generation-model/endpoints/queries/get-generation-models-by-type.query.d.ts +2 -0
  88. package/build/generation-model/endpoints/queries/get-generation-models-by-type.query.d.ts.map +1 -1
  89. package/build/generation-model/endpoints/queries/get-generation-models.query.d.ts +2 -0
  90. package/build/generation-model/endpoints/queries/get-generation-models.query.d.ts.map +1 -1
  91. package/build/generation-model/models/generation-model-response.schema.d.ts +3 -0
  92. package/build/generation-model/models/generation-model-response.schema.d.ts.map +1 -1
  93. package/build/generation-model/models/generation-model-response.schema.js +1 -0
  94. package/build/index.d.ts +1 -0
  95. package/build/index.d.ts.map +1 -1
  96. package/build/index.js +1 -0
  97. package/build/trend/endpoints/commands/generate-trend.command.d.ts +142 -0
  98. package/build/trend/endpoints/commands/generate-trend.command.d.ts.map +1 -0
  99. package/build/trend/endpoints/commands/generate-trend.command.js +54 -0
  100. package/build/trend/endpoints/commands/index.d.ts +2 -0
  101. package/build/trend/endpoints/commands/index.d.ts.map +1 -0
  102. package/build/trend/endpoints/commands/index.js +17 -0
  103. package/build/trend/endpoints/index.d.ts +4 -0
  104. package/build/trend/endpoints/index.d.ts.map +1 -0
  105. package/build/trend/endpoints/index.js +19 -0
  106. package/build/trend/endpoints/queries/get-public-trend-by-slug.query.d.ts +92 -0
  107. package/build/trend/endpoints/queries/get-public-trend-by-slug.query.d.ts.map +1 -0
  108. package/build/trend/endpoints/queries/get-public-trend-by-slug.query.js +24 -0
  109. package/build/trend/endpoints/queries/index.d.ts +4 -0
  110. package/build/trend/endpoints/queries/index.d.ts.map +1 -0
  111. package/build/trend/endpoints/queries/index.js +19 -0
  112. package/build/trend/endpoints/queries/list-public-trend-categories.query.d.ts +26 -0
  113. package/build/trend/endpoints/queries/list-public-trend-categories.query.d.ts.map +1 -0
  114. package/build/trend/endpoints/queries/list-public-trend-categories.query.js +19 -0
  115. package/build/trend/endpoints/queries/list-public-trends.query.d.ts +69 -0
  116. package/build/trend/endpoints/queries/list-public-trends.query.d.ts.map +1 -0
  117. package/build/trend/endpoints/queries/list-public-trends.query.js +28 -0
  118. package/build/trend/endpoints/trend.d.ts +11 -0
  119. package/build/trend/endpoints/trend.d.ts.map +1 -0
  120. package/build/trend/endpoints/trend.js +13 -0
  121. package/build/trend/enums/index.d.ts +6 -0
  122. package/build/trend/enums/index.d.ts.map +1 -0
  123. package/build/trend/enums/index.js +21 -0
  124. package/build/trend/enums/trend-aspect-ratio.enum.d.ts +9 -0
  125. package/build/trend/enums/trend-aspect-ratio.enum.d.ts.map +1 -0
  126. package/build/trend/enums/trend-aspect-ratio.enum.js +12 -0
  127. package/build/trend/enums/trend-field-type.enum.d.ts +5 -0
  128. package/build/trend/enums/trend-field-type.enum.d.ts.map +1 -0
  129. package/build/trend/enums/trend-field-type.enum.js +8 -0
  130. package/build/trend/enums/trend-limits.d.ts +11 -0
  131. package/build/trend/enums/trend-limits.d.ts.map +1 -0
  132. package/build/trend/enums/trend-limits.js +13 -0
  133. package/build/trend/enums/trend-quality.enum.d.ts +7 -0
  134. package/build/trend/enums/trend-quality.enum.d.ts.map +1 -0
  135. package/build/trend/enums/trend-quality.enum.js +10 -0
  136. package/build/trend/enums/trend-status.enum.d.ts +5 -0
  137. package/build/trend/enums/trend-status.enum.d.ts.map +1 -0
  138. package/build/trend/enums/trend-status.enum.js +8 -0
  139. package/build/trend/helpers/index.d.ts +2 -0
  140. package/build/trend/helpers/index.d.ts.map +1 -0
  141. package/build/trend/helpers/index.js +17 -0
  142. package/build/trend/helpers/trend-field-reference.helper.d.ts +4 -0
  143. package/build/trend/helpers/trend-field-reference.helper.d.ts.map +1 -0
  144. package/build/trend/helpers/trend-field-reference.helper.js +12 -0
  145. package/build/trend/index.d.ts +5 -0
  146. package/build/trend/index.d.ts.map +1 -0
  147. package/build/trend/index.js +20 -0
  148. package/build/trend/models/index.d.ts +5 -0
  149. package/build/trend/models/index.d.ts.map +1 -0
  150. package/build/trend/models/index.js +20 -0
  151. package/build/trend/models/public-trend.schema.d.ts +88 -0
  152. package/build/trend/models/public-trend.schema.d.ts.map +1 -0
  153. package/build/trend/models/public-trend.schema.js +44 -0
  154. package/build/trend/models/trend-category-input.schema.d.ts +7 -0
  155. package/build/trend/models/trend-category-input.schema.d.ts.map +1 -0
  156. package/build/trend/models/trend-category-input.schema.js +10 -0
  157. package/build/trend/models/trend-common.schema.d.ts +10 -0
  158. package/build/trend/models/trend-common.schema.d.ts.map +1 -0
  159. package/build/trend/models/trend-common.schema.js +17 -0
  160. package/build/trend/models/trend-input.schema.d.ts +33 -0
  161. package/build/trend/models/trend-input.schema.d.ts.map +1 -0
  162. package/build/trend/models/trend-input.schema.js +54 -0
  163. package/build/tsconfig.tsbuildinfo +1 -1
  164. package/build/video-generation-chain/endpoints/queries/get-video-generation-chain-config.query.d.ts +2 -0
  165. package/build/video-generation-chain/endpoints/queries/get-video-generation-chain-config.query.d.ts.map +1 -1
  166. package/errors/errors.ts +142 -0
  167. package/generation-job-chat/models/generation-job-chat-response.schema.ts +1 -0
  168. package/generation-model/models/generation-model-response.schema.ts +1 -0
  169. package/index.ts +1 -0
  170. package/package.json +1 -1
  171. package/trend/endpoints/commands/generate-trend.command.ts +63 -0
  172. package/trend/endpoints/commands/index.ts +1 -0
  173. package/trend/endpoints/index.ts +3 -0
  174. package/trend/endpoints/queries/get-public-trend-by-slug.query.ts +27 -0
  175. package/trend/endpoints/queries/index.ts +3 -0
  176. package/trend/endpoints/queries/list-public-trend-categories.query.ts +20 -0
  177. package/trend/endpoints/queries/list-public-trends.query.ts +31 -0
  178. package/trend/endpoints/trend.ts +13 -0
  179. package/trend/enums/index.ts +5 -0
  180. package/trend/enums/trend-aspect-ratio.enum.ts +8 -0
  181. package/trend/enums/trend-field-type.enum.ts +4 -0
  182. package/trend/enums/trend-limits.ts +10 -0
  183. package/trend/enums/trend-quality.enum.ts +7 -0
  184. package/trend/enums/trend-status.enum.ts +4 -0
  185. package/trend/helpers/index.ts +1 -0
  186. package/trend/helpers/trend-field-reference.helper.ts +9 -0
  187. package/trend/index.ts +4 -0
  188. package/trend/models/index.ts +4 -0
  189. package/trend/models/public-trend.schema.ts +58 -0
  190. package/trend/models/trend-category-input.schema.ts +10 -0
  191. package/trend/models/trend-common.schema.ts +26 -0
  192. package/trend/models/trend-input.schema.ts +69 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-public-trends.query.d.ts","sourceRoot":"","sources":["../../../../trend/endpoints/queries/list-public-trends.query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAA+C,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAItH,eAAO,MAAM,0BAA0B;;;;iBAErC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;iBAKxC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWhC,CAAC;AAEH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AACxF,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListPublicTrendsQuery = exports.ListPublicTrendsQueryResponse = exports.ListPublicTrendsQueryQuery = void 0;
4
+ const zod_1 = require("zod");
5
+ const _common_1 = require("../../../_common");
6
+ const models_1 = require("../../models");
7
+ const trend_1 = require("../trend");
8
+ exports.ListPublicTrendsQueryQuery = (0, _common_1.defineOffsetPaginationQuery)().extend({
9
+ categorySlug: zod_1.z.string().min(1).optional(),
10
+ });
11
+ exports.ListPublicTrendsQueryResponse = zod_1.z.object({
12
+ trends: zod_1.z.array(models_1.PublicTrendCardSchema),
13
+ total: zod_1.z.number().int().nonnegative(),
14
+ page: zod_1.z.number().int().positive(),
15
+ limit: zod_1.z.number().int().positive(),
16
+ });
17
+ exports.ListPublicTrendsQuery = (0, _common_1.defineContract)({
18
+ method: _common_1.HTTP_METHODS.GET,
19
+ path: trend_1.TREND_ROUTES.LIST,
20
+ summary: 'List published trends with available models, ordered by admin order',
21
+ request: {
22
+ query: exports.ListPublicTrendsQueryQuery,
23
+ },
24
+ responses: {
25
+ 200: exports.ListPublicTrendsQueryResponse,
26
+ 500: _common_1.HttpErrorResponseSchema,
27
+ },
28
+ });
@@ -0,0 +1,11 @@
1
+ export declare const TREND_CONTROLLER: "trends";
2
+ export declare const TREND_ROUTES: {
3
+ readonly LIST: "";
4
+ readonly GET_BY_SLUG: (slug: string) => string;
5
+ readonly GENERATE: (slug: string) => string;
6
+ };
7
+ export declare const TREND_CATEGORY_CONTROLLER: "trend-categories";
8
+ export declare const TREND_CATEGORY_ROUTES: {
9
+ readonly LIST: "";
10
+ };
11
+ //# sourceMappingURL=trend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trend.d.ts","sourceRoot":"","sources":["../../../trend/endpoints/trend.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,QAAiB,CAAC;AAElD,eAAO,MAAM,YAAY;;iCAED,MAAM;8BACT,MAAM;CACjB,CAAC;AAEX,eAAO,MAAM,yBAAyB,EAAG,kBAA2B,CAAC;AAErE,eAAO,MAAM,qBAAqB;;CAExB,CAAC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TREND_CATEGORY_ROUTES = exports.TREND_CATEGORY_CONTROLLER = exports.TREND_ROUTES = exports.TREND_CONTROLLER = void 0;
4
+ exports.TREND_CONTROLLER = 'trends';
5
+ exports.TREND_ROUTES = {
6
+ LIST: '',
7
+ GET_BY_SLUG: (slug) => `${slug}`,
8
+ GENERATE: (slug) => `${slug}/generate`,
9
+ };
10
+ exports.TREND_CATEGORY_CONTROLLER = 'trend-categories';
11
+ exports.TREND_CATEGORY_ROUTES = {
12
+ LIST: '',
13
+ };
@@ -0,0 +1,6 @@
1
+ export * from './trend-status.enum';
2
+ export * from './trend-field-type.enum';
3
+ export * from './trend-aspect-ratio.enum';
4
+ export * from './trend-quality.enum';
5
+ export * from './trend-limits';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../trend/enums/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,21 @@
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
+ __exportStar(require("./trend-status.enum"), exports);
18
+ __exportStar(require("./trend-field-type.enum"), exports);
19
+ __exportStar(require("./trend-aspect-ratio.enum"), exports);
20
+ __exportStar(require("./trend-quality.enum"), exports);
21
+ __exportStar(require("./trend-limits"), exports);
@@ -0,0 +1,9 @@
1
+ export declare enum TREND_ASPECT_RATIO {
2
+ SQUARE = "1:1",
3
+ LANDSCAPE = "16:9",
4
+ ULTRAWIDE = "21:9",
5
+ PORTRAIT_3_4 = "3:4",
6
+ LANDSCAPE_4_3 = "4:3",
7
+ PORTRAIT = "9:16"
8
+ }
9
+ //# sourceMappingURL=trend-aspect-ratio.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trend-aspect-ratio.enum.d.ts","sourceRoot":"","sources":["../../../trend/enums/trend-aspect-ratio.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,kBAAkB;IAC1B,MAAM,QAAQ;IACd,SAAS,SAAS;IAClB,SAAS,SAAS;IAClB,YAAY,QAAQ;IACpB,aAAa,QAAQ;IACrB,QAAQ,SAAS;CACpB"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TREND_ASPECT_RATIO = void 0;
4
+ var TREND_ASPECT_RATIO;
5
+ (function (TREND_ASPECT_RATIO) {
6
+ TREND_ASPECT_RATIO["SQUARE"] = "1:1";
7
+ TREND_ASPECT_RATIO["LANDSCAPE"] = "16:9";
8
+ TREND_ASPECT_RATIO["ULTRAWIDE"] = "21:9";
9
+ TREND_ASPECT_RATIO["PORTRAIT_3_4"] = "3:4";
10
+ TREND_ASPECT_RATIO["LANDSCAPE_4_3"] = "4:3";
11
+ TREND_ASPECT_RATIO["PORTRAIT"] = "9:16";
12
+ })(TREND_ASPECT_RATIO || (exports.TREND_ASPECT_RATIO = TREND_ASPECT_RATIO = {}));
@@ -0,0 +1,5 @@
1
+ export declare enum TREND_FIELD_TYPE {
2
+ FILE = "file",
3
+ TEXT = "text"
4
+ }
5
+ //# sourceMappingURL=trend-field-type.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trend-field-type.enum.d.ts","sourceRoot":"","sources":["../../../trend/enums/trend-field-type.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,gBAAgB;IACxB,IAAI,SAAS;IACb,IAAI,SAAS;CAChB"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TREND_FIELD_TYPE = void 0;
4
+ var TREND_FIELD_TYPE;
5
+ (function (TREND_FIELD_TYPE) {
6
+ TREND_FIELD_TYPE["FILE"] = "file";
7
+ TREND_FIELD_TYPE["TEXT"] = "text";
8
+ })(TREND_FIELD_TYPE || (exports.TREND_FIELD_TYPE = TREND_FIELD_TYPE = {}));
@@ -0,0 +1,11 @@
1
+ export declare const TREND_TITLE_MAX_LENGTH = 255;
2
+ export declare const TREND_PROMPT_MAX_LENGTH = 5000;
3
+ export declare const TREND_FIELD_NAME_MAX_LENGTH = 50;
4
+ export declare const TREND_TEXT_VALUE_MAX_LENGTH = 500;
5
+ export declare const TREND_MIN_FIELDS = 1;
6
+ export declare const TREND_MAX_FIELDS = 10;
7
+ export declare const TREND_DURATION_TOLERANCE_SEC = 1;
8
+ export declare const TREND_CATEGORY_NAME_MAX_LENGTH = 100;
9
+ export declare const TREND_SLUG_MAX_LENGTH = 255;
10
+ export declare const TREND_SLUG_PATTERN: RegExp;
11
+ //# sourceMappingURL=trend-limits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trend-limits.d.ts","sourceRoot":"","sources":["../../../trend/enums/trend-limits.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAC1C,eAAO,MAAM,uBAAuB,OAAO,CAAC;AAC5C,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAC9C,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAC/C,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAC9C,eAAO,MAAM,8BAA8B,MAAM,CAAC;AAClD,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC,eAAO,MAAM,kBAAkB,QAAgC,CAAC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TREND_SLUG_PATTERN = exports.TREND_SLUG_MAX_LENGTH = exports.TREND_CATEGORY_NAME_MAX_LENGTH = exports.TREND_DURATION_TOLERANCE_SEC = exports.TREND_MAX_FIELDS = exports.TREND_MIN_FIELDS = exports.TREND_TEXT_VALUE_MAX_LENGTH = exports.TREND_FIELD_NAME_MAX_LENGTH = exports.TREND_PROMPT_MAX_LENGTH = exports.TREND_TITLE_MAX_LENGTH = void 0;
4
+ exports.TREND_TITLE_MAX_LENGTH = 255;
5
+ exports.TREND_PROMPT_MAX_LENGTH = 5000;
6
+ exports.TREND_FIELD_NAME_MAX_LENGTH = 50;
7
+ exports.TREND_TEXT_VALUE_MAX_LENGTH = 500;
8
+ exports.TREND_MIN_FIELDS = 1;
9
+ exports.TREND_MAX_FIELDS = 10;
10
+ exports.TREND_DURATION_TOLERANCE_SEC = 1;
11
+ exports.TREND_CATEGORY_NAME_MAX_LENGTH = 100;
12
+ exports.TREND_SLUG_MAX_LENGTH = 255;
13
+ exports.TREND_SLUG_PATTERN = /^[a-z0-9]+(?:-[a-z0-9.]+)*$/;
@@ -0,0 +1,7 @@
1
+ export declare enum TREND_QUALITY {
2
+ P480 = "480p",
3
+ P720 = "720p",
4
+ P1080 = "1080p"
5
+ }
6
+ export declare const TREND_DEFAULT_QUALITY = TREND_QUALITY.P720;
7
+ //# sourceMappingURL=trend-quality.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trend-quality.enum.d.ts","sourceRoot":"","sources":["../../../trend/enums/trend-quality.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa;IACrB,IAAI,SAAS;IACb,IAAI,SAAS;IACb,KAAK,UAAU;CAClB;AAED,eAAO,MAAM,qBAAqB,qBAAqB,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TREND_DEFAULT_QUALITY = exports.TREND_QUALITY = void 0;
4
+ var TREND_QUALITY;
5
+ (function (TREND_QUALITY) {
6
+ TREND_QUALITY["P480"] = "480p";
7
+ TREND_QUALITY["P720"] = "720p";
8
+ TREND_QUALITY["P1080"] = "1080p";
9
+ })(TREND_QUALITY || (exports.TREND_QUALITY = TREND_QUALITY = {}));
10
+ exports.TREND_DEFAULT_QUALITY = TREND_QUALITY.P720;
@@ -0,0 +1,5 @@
1
+ export declare enum TREND_STATUS {
2
+ DRAFT = "draft",
3
+ PUBLISHED = "published"
4
+ }
5
+ //# sourceMappingURL=trend-status.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trend-status.enum.d.ts","sourceRoot":"","sources":["../../../trend/enums/trend-status.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACpB,KAAK,UAAU;IACf,SAAS,cAAc;CAC1B"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TREND_STATUS = void 0;
4
+ var TREND_STATUS;
5
+ (function (TREND_STATUS) {
6
+ TREND_STATUS["DRAFT"] = "draft";
7
+ TREND_STATUS["PUBLISHED"] = "published";
8
+ })(TREND_STATUS || (exports.TREND_STATUS = TREND_STATUS = {}));
@@ -0,0 +1,2 @@
1
+ export * from './trend-field-reference.helper';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../trend/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC"}
@@ -0,0 +1,17 @@
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
+ __exportStar(require("./trend-field-reference.helper"), exports);
@@ -0,0 +1,4 @@
1
+ export declare const TREND_FIELD_REFERENCE_PATTERN: RegExp;
2
+ export declare function toTrendFieldReference(fieldName: string): string;
3
+ export declare function extractTrendFieldReferences(prompt: string): string[];
4
+ //# sourceMappingURL=trend-field-reference.helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trend-field-reference.helper.d.ts","sourceRoot":"","sources":["../../../trend/helpers/trend-field-reference.helper.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,6BAA6B,QAAkB,CAAC;AAE7D,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAEpE"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TREND_FIELD_REFERENCE_PATTERN = void 0;
4
+ exports.toTrendFieldReference = toTrendFieldReference;
5
+ exports.extractTrendFieldReferences = extractTrendFieldReferences;
6
+ exports.TREND_FIELD_REFERENCE_PATTERN = /\{([^{}]+)\}/g;
7
+ function toTrendFieldReference(fieldName) {
8
+ return `{${fieldName}}`;
9
+ }
10
+ function extractTrendFieldReferences(prompt) {
11
+ return [...new Set(Array.from(prompt.matchAll(exports.TREND_FIELD_REFERENCE_PATTERN), (match) => match[1]))];
12
+ }
@@ -0,0 +1,5 @@
1
+ export * from './enums';
2
+ export * from './helpers';
3
+ export * from './models';
4
+ export * from './endpoints';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../trend/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC"}
@@ -0,0 +1,20 @@
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
+ __exportStar(require("./enums"), exports);
18
+ __exportStar(require("./helpers"), exports);
19
+ __exportStar(require("./models"), exports);
20
+ __exportStar(require("./endpoints"), exports);
@@ -0,0 +1,5 @@
1
+ export * from './trend-common.schema';
2
+ export * from './trend-input.schema';
3
+ export * from './trend-category-input.schema';
4
+ export * from './public-trend.schema';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../trend/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,20 @@
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
+ __exportStar(require("./trend-common.schema"), exports);
18
+ __exportStar(require("./trend-input.schema"), exports);
19
+ __exportStar(require("./trend-category-input.schema"), exports);
20
+ __exportStar(require("./public-trend.schema"), exports);
@@ -0,0 +1,88 @@
1
+ import { z } from 'zod';
2
+ export declare const PublicTrendCategorySchema: z.ZodObject<{
3
+ uuid: z.ZodUUID;
4
+ slug: z.ZodString;
5
+ name: z.ZodString;
6
+ }, z.core.$strip>;
7
+ export declare const PublicTrendFieldSchema: z.ZodObject<{
8
+ uuid: z.ZodUUID;
9
+ type: z.ZodEnum<typeof import("..").TREND_FIELD_TYPE>;
10
+ name: z.ZodString;
11
+ order: z.ZodInt;
12
+ }, z.core.$strip>;
13
+ export declare const PublicTrendCardSchema: z.ZodObject<{
14
+ uuid: z.ZodUUID;
15
+ slug: z.ZodString;
16
+ title: z.ZodString;
17
+ previewUrl: z.ZodURL;
18
+ fields: z.ZodArray<z.ZodObject<{
19
+ uuid: z.ZodUUID;
20
+ type: z.ZodEnum<typeof import("..").TREND_FIELD_TYPE>;
21
+ name: z.ZodString;
22
+ order: z.ZodInt;
23
+ }, z.core.$strip>>;
24
+ categories: z.ZodArray<z.ZodObject<{
25
+ uuid: z.ZodUUID;
26
+ slug: z.ZodString;
27
+ name: z.ZodString;
28
+ }, z.core.$strip>>;
29
+ }, z.core.$strip>;
30
+ export declare const PublicTrendModelQualitySchema: z.ZodObject<{
31
+ quality: z.ZodEnum<typeof import("..").TREND_QUALITY>;
32
+ price: z.ZodNumber;
33
+ }, z.core.$strip>;
34
+ export declare const PublicTrendModelSchema: z.ZodObject<{
35
+ uuid: z.ZodUUID;
36
+ titleModel: z.ZodString;
37
+ icons: z.ZodObject<{
38
+ light: z.ZodString;
39
+ dark: z.ZodString;
40
+ }, z.core.$strip>;
41
+ isDefault: z.ZodBoolean;
42
+ defaultQuality: z.ZodEnum<typeof import("..").TREND_QUALITY>;
43
+ qualities: z.ZodArray<z.ZodObject<{
44
+ quality: z.ZodEnum<typeof import("..").TREND_QUALITY>;
45
+ price: z.ZodNumber;
46
+ }, z.core.$strip>>;
47
+ }, z.core.$strip>;
48
+ export declare const PublicTrendSchema: z.ZodObject<{
49
+ uuid: z.ZodUUID;
50
+ slug: z.ZodString;
51
+ title: z.ZodString;
52
+ previewUrl: z.ZodURL;
53
+ fields: z.ZodArray<z.ZodObject<{
54
+ uuid: z.ZodUUID;
55
+ type: z.ZodEnum<typeof import("..").TREND_FIELD_TYPE>;
56
+ name: z.ZodString;
57
+ order: z.ZodInt;
58
+ }, z.core.$strip>>;
59
+ categories: z.ZodArray<z.ZodObject<{
60
+ uuid: z.ZodUUID;
61
+ slug: z.ZodString;
62
+ name: z.ZodString;
63
+ }, z.core.$strip>>;
64
+ prompt: z.ZodString;
65
+ referenceVideoUrl: z.ZodURL;
66
+ aspectRatio: z.ZodEnum<typeof import("..").TREND_ASPECT_RATIO>;
67
+ durationSec: z.ZodInt;
68
+ models: z.ZodArray<z.ZodObject<{
69
+ uuid: z.ZodUUID;
70
+ titleModel: z.ZodString;
71
+ icons: z.ZodObject<{
72
+ light: z.ZodString;
73
+ dark: z.ZodString;
74
+ }, z.core.$strip>;
75
+ isDefault: z.ZodBoolean;
76
+ defaultQuality: z.ZodEnum<typeof import("..").TREND_QUALITY>;
77
+ qualities: z.ZodArray<z.ZodObject<{
78
+ quality: z.ZodEnum<typeof import("..").TREND_QUALITY>;
79
+ price: z.ZodNumber;
80
+ }, z.core.$strip>>;
81
+ }, z.core.$strip>>;
82
+ }, z.core.$strip>;
83
+ export type PublicTrendCategorySchemaType = z.infer<typeof PublicTrendCategorySchema>;
84
+ export type PublicTrendFieldSchemaType = z.infer<typeof PublicTrendFieldSchema>;
85
+ export type PublicTrendCardSchemaType = z.infer<typeof PublicTrendCardSchema>;
86
+ export type PublicTrendModelSchemaType = z.infer<typeof PublicTrendModelSchema>;
87
+ export type PublicTrendSchemaType = z.infer<typeof PublicTrendSchema>;
88
+ //# sourceMappingURL=public-trend.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-trend.schema.d.ts","sourceRoot":"","sources":["../../../trend/models/public-trend.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,yBAAyB;;;;iBAIpC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;iBAKjC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;iBAOhC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;iBAGxC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;iBAOjC,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAM5B,CAAC;AAEH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AACtF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAChF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAC9E,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAChF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PublicTrendSchema = exports.PublicTrendModelSchema = exports.PublicTrendModelQualitySchema = exports.PublicTrendCardSchema = exports.PublicTrendFieldSchema = exports.PublicTrendCategorySchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const _common_1 = require("../../_common");
6
+ const trend_common_schema_1 = require("./trend-common.schema");
7
+ exports.PublicTrendCategorySchema = zod_1.z.object({
8
+ uuid: zod_1.z.uuid(),
9
+ slug: zod_1.z.string(),
10
+ name: zod_1.z.string(),
11
+ });
12
+ exports.PublicTrendFieldSchema = zod_1.z.object({
13
+ uuid: zod_1.z.uuid(),
14
+ type: trend_common_schema_1.TrendFieldTypeSchema,
15
+ name: zod_1.z.string(),
16
+ order: zod_1.z.int().nonnegative(),
17
+ });
18
+ exports.PublicTrendCardSchema = zod_1.z.object({
19
+ uuid: zod_1.z.uuid(),
20
+ slug: zod_1.z.string(),
21
+ title: zod_1.z.string(),
22
+ previewUrl: zod_1.z.url(),
23
+ fields: zod_1.z.array(exports.PublicTrendFieldSchema),
24
+ categories: zod_1.z.array(exports.PublicTrendCategorySchema),
25
+ });
26
+ exports.PublicTrendModelQualitySchema = zod_1.z.object({
27
+ quality: trend_common_schema_1.TrendQualitySchema,
28
+ price: zod_1.z.number().nonnegative(),
29
+ });
30
+ exports.PublicTrendModelSchema = zod_1.z.object({
31
+ uuid: zod_1.z.uuid(),
32
+ titleModel: zod_1.z.string(),
33
+ icons: _common_1.IconSchema,
34
+ isDefault: zod_1.z.boolean(),
35
+ defaultQuality: trend_common_schema_1.TrendQualitySchema,
36
+ qualities: zod_1.z.array(exports.PublicTrendModelQualitySchema).min(1),
37
+ });
38
+ exports.PublicTrendSchema = exports.PublicTrendCardSchema.extend({
39
+ prompt: zod_1.z.string(),
40
+ referenceVideoUrl: zod_1.z.url(),
41
+ aspectRatio: trend_common_schema_1.TrendAspectRatioSchema,
42
+ durationSec: trend_common_schema_1.TrendDurationSecSchema,
43
+ models: zod_1.z.array(exports.PublicTrendModelSchema).min(1),
44
+ });
@@ -0,0 +1,7 @@
1
+ import { z } from 'zod';
2
+ export declare const TrendCategoryInputSchema: z.ZodObject<{
3
+ slug: z.ZodString;
4
+ name: z.ZodString;
5
+ }, z.core.$strip>;
6
+ export type TrendCategoryInputSchemaType = z.infer<typeof TrendCategoryInputSchema>;
7
+ //# sourceMappingURL=trend-category-input.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trend-category-input.schema.d.ts","sourceRoot":"","sources":["../../../trend/models/trend-category-input.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,wBAAwB;;;iBAGnC,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TrendCategoryInputSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const enums_1 = require("../enums");
6
+ const trend_common_schema_1 = require("./trend-common.schema");
7
+ exports.TrendCategoryInputSchema = zod_1.z.object({
8
+ slug: trend_common_schema_1.TrendSlugSchema,
9
+ name: zod_1.z.string().trim().min(1).max(enums_1.TREND_CATEGORY_NAME_MAX_LENGTH),
10
+ });
@@ -0,0 +1,10 @@
1
+ import { z } from 'zod';
2
+ import { TREND_ASPECT_RATIO, TREND_FIELD_TYPE, TREND_QUALITY, TREND_STATUS } from '../enums';
3
+ export declare const TrendStatusSchema: z.ZodEnum<typeof TREND_STATUS>;
4
+ export declare const TrendFieldTypeSchema: z.ZodEnum<typeof TREND_FIELD_TYPE>;
5
+ export declare const TrendAspectRatioSchema: z.ZodEnum<typeof TREND_ASPECT_RATIO>;
6
+ export declare const TrendQualitySchema: z.ZodEnum<typeof TREND_QUALITY>;
7
+ export declare const TrendSlugSchema: z.ZodString;
8
+ export declare const TrendFieldNameSchema: z.ZodString;
9
+ export declare const TrendDurationSecSchema: z.ZodInt;
10
+ //# sourceMappingURL=trend-common.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trend-common.schema.d.ts","sourceRoot":"","sources":["../../../trend/models/trend-common.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACH,kBAAkB,EAElB,gBAAgB,EAChB,aAAa,EAGb,YAAY,EACf,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,iBAAiB,gCAAuB,CAAC;AACtD,eAAO,MAAM,oBAAoB,oCAA2B,CAAC;AAC7D,eAAO,MAAM,sBAAsB,sCAA6B,CAAC;AACjE,eAAO,MAAM,kBAAkB,iCAAwB,CAAC;AAExD,eAAO,MAAM,eAAe,aAAyE,CAAC;AAEtG,eAAO,MAAM,oBAAoB,aAK2B,CAAC;AAE7D,eAAO,MAAM,sBAAsB,UAAqB,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TrendDurationSecSchema = exports.TrendFieldNameSchema = exports.TrendSlugSchema = exports.TrendQualitySchema = exports.TrendAspectRatioSchema = exports.TrendFieldTypeSchema = exports.TrendStatusSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const enums_1 = require("../enums");
6
+ exports.TrendStatusSchema = zod_1.z.enum(enums_1.TREND_STATUS);
7
+ exports.TrendFieldTypeSchema = zod_1.z.enum(enums_1.TREND_FIELD_TYPE);
8
+ exports.TrendAspectRatioSchema = zod_1.z.enum(enums_1.TREND_ASPECT_RATIO);
9
+ exports.TrendQualitySchema = zod_1.z.enum(enums_1.TREND_QUALITY);
10
+ exports.TrendSlugSchema = zod_1.z.string().min(1).max(enums_1.TREND_SLUG_MAX_LENGTH).regex(enums_1.TREND_SLUG_PATTERN);
11
+ exports.TrendFieldNameSchema = zod_1.z
12
+ .string()
13
+ .trim()
14
+ .min(1)
15
+ .max(enums_1.TREND_FIELD_NAME_MAX_LENGTH)
16
+ .regex(/^[^{}]+$/, 'Field name must not contain { or }');
17
+ exports.TrendDurationSecSchema = zod_1.z.int().positive();
@@ -0,0 +1,33 @@
1
+ import { z } from 'zod';
2
+ export declare const TrendFieldInputSchema: z.ZodObject<{
3
+ uuid: z.ZodOptional<z.ZodUUID>;
4
+ type: z.ZodEnum<typeof import("../enums").TREND_FIELD_TYPE>;
5
+ name: z.ZodString;
6
+ }, z.core.$strip>;
7
+ export declare const TrendModelInputSchema: z.ZodObject<{
8
+ modelId: z.ZodUUID;
9
+ isDefault: z.ZodDefault<z.ZodBoolean>;
10
+ }, z.core.$strip>;
11
+ export declare const TrendInputSchema: z.ZodObject<{
12
+ slug: z.ZodString;
13
+ title: z.ZodString;
14
+ prompt: z.ZodString;
15
+ referenceVideoFileId: z.ZodUUID;
16
+ previewFileId: z.ZodUUID;
17
+ aspectRatio: z.ZodEnum<typeof import("../enums").TREND_ASPECT_RATIO>;
18
+ durationSec: z.ZodInt;
19
+ categoryIds: z.ZodDefault<z.ZodArray<z.ZodUUID>>;
20
+ fields: z.ZodArray<z.ZodObject<{
21
+ uuid: z.ZodOptional<z.ZodUUID>;
22
+ type: z.ZodEnum<typeof import("../enums").TREND_FIELD_TYPE>;
23
+ name: z.ZodString;
24
+ }, z.core.$strip>>;
25
+ models: z.ZodArray<z.ZodObject<{
26
+ modelId: z.ZodUUID;
27
+ isDefault: z.ZodDefault<z.ZodBoolean>;
28
+ }, z.core.$strip>>;
29
+ }, z.core.$strip>;
30
+ export type TrendFieldInputSchemaType = z.infer<typeof TrendFieldInputSchema>;
31
+ export type TrendModelInputSchemaType = z.infer<typeof TrendModelInputSchema>;
32
+ export type TrendInputSchemaType = z.infer<typeof TrendInputSchema>;
33
+ //# sourceMappingURL=trend-input.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trend-input.schema.d.ts","sourceRoot":"","sources":["../../../trend/models/trend-input.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,qBAAqB;;;;iBAIhC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;iBAGhC,CAAC;AAMH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;iBAuCvB,CAAC;AAEP,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAC9E,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAC9E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TrendInputSchema = exports.TrendModelInputSchema = exports.TrendFieldInputSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const enums_1 = require("../enums");
6
+ const trend_common_schema_1 = require("./trend-common.schema");
7
+ exports.TrendFieldInputSchema = zod_1.z.object({
8
+ uuid: zod_1.z.uuid().optional(),
9
+ type: trend_common_schema_1.TrendFieldTypeSchema,
10
+ name: trend_common_schema_1.TrendFieldNameSchema,
11
+ });
12
+ exports.TrendModelInputSchema = zod_1.z.object({
13
+ modelId: zod_1.z.uuid(),
14
+ isDefault: zod_1.z.boolean().default(false),
15
+ });
16
+ function findDuplicates(values) {
17
+ return [...new Set(values.filter((value, index) => values.indexOf(value) !== index))];
18
+ }
19
+ exports.TrendInputSchema = zod_1.z
20
+ .object({
21
+ slug: trend_common_schema_1.TrendSlugSchema,
22
+ title: zod_1.z.string().trim().min(1).max(enums_1.TREND_TITLE_MAX_LENGTH),
23
+ prompt: zod_1.z.string().trim().min(1).max(enums_1.TREND_PROMPT_MAX_LENGTH),
24
+ referenceVideoFileId: zod_1.z.uuid(),
25
+ previewFileId: zod_1.z.uuid(),
26
+ aspectRatio: trend_common_schema_1.TrendAspectRatioSchema,
27
+ durationSec: trend_common_schema_1.TrendDurationSecSchema,
28
+ categoryIds: zod_1.z.array(zod_1.z.uuid()).default([]),
29
+ fields: zod_1.z.array(exports.TrendFieldInputSchema).min(enums_1.TREND_MIN_FIELDS).max(enums_1.TREND_MAX_FIELDS),
30
+ models: zod_1.z.array(exports.TrendModelInputSchema).min(1),
31
+ })
32
+ .superRefine((trend, ctx) => {
33
+ const duplicateNames = findDuplicates(trend.fields.map((field) => field.name));
34
+ if (duplicateNames.length > 0) {
35
+ ctx.addIssue({
36
+ code: 'custom',
37
+ path: ['fields'],
38
+ message: `Field names must be unique: ${duplicateNames.join(', ')}`,
39
+ });
40
+ }
41
+ const fieldUuids = trend.fields.flatMap((field) => (field.uuid ? [field.uuid] : []));
42
+ if (findDuplicates(fieldUuids).length > 0) {
43
+ ctx.addIssue({ code: 'custom', path: ['fields'], message: 'Field uuids must be unique' });
44
+ }
45
+ if (findDuplicates(trend.models.map((model) => model.modelId)).length > 0) {
46
+ ctx.addIssue({ code: 'custom', path: ['models'], message: 'Models must be unique' });
47
+ }
48
+ if (trend.models.filter((model) => model.isDefault).length > 1) {
49
+ ctx.addIssue({ code: 'custom', path: ['models'], message: 'Only one model can be default' });
50
+ }
51
+ if (findDuplicates(trend.categoryIds).length > 0) {
52
+ ctx.addIssue({ code: 'custom', path: ['categoryIds'], message: 'Categories must be unique' });
53
+ }
54
+ });