@ai-grator/api 0.3.66 → 0.3.68
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/admin/endpoints/admin.ts +16 -0
- package/admin/endpoints/commands/create-admin-trend-category.command.ts +29 -0
- package/admin/endpoints/commands/create-admin-trend.command.ts +30 -0
- package/admin/endpoints/commands/delete-admin-trend-category.command.ts +28 -0
- package/admin/endpoints/commands/delete-admin-trend.command.ts +28 -0
- package/admin/endpoints/commands/index.ts +9 -0
- package/admin/endpoints/commands/probe-admin-trend-reference-video.command.ts +37 -0
- package/admin/endpoints/commands/reorder-admin-trends.command.ts +31 -0
- package/admin/endpoints/commands/update-admin-trend-category.command.ts +36 -0
- package/admin/endpoints/commands/update-admin-trend-status.command.ts +37 -0
- package/admin/endpoints/commands/update-admin-trend.command.ts +36 -0
- package/admin/endpoints/queries/get-admin-trend-categories.query.ts +22 -0
- package/admin/endpoints/queries/get-admin-trend.query.ts +29 -0
- package/admin/endpoints/queries/get-admin-trends.query.ts +36 -0
- package/admin/endpoints/queries/index.ts +3 -0
- package/admin/models/admin-trend-category-response.schema.ts +11 -0
- package/admin/models/admin-trend-response.schema.ts +61 -0
- package/admin/models/index.ts +2 -0
- package/build/admin/endpoints/admin.d.ts +12 -0
- package/build/admin/endpoints/admin.d.ts.map +1 -1
- package/build/admin/endpoints/admin.js +14 -0
- package/build/admin/endpoints/commands/create-admin-trend-category.command.d.ts +41 -0
- package/build/admin/endpoints/commands/create-admin-trend-category.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/create-admin-trend-category.command.js +25 -0
- package/build/admin/endpoints/commands/create-admin-trend.command.d.ts +144 -0
- package/build/admin/endpoints/commands/create-admin-trend.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/create-admin-trend.command.js +26 -0
- package/build/admin/endpoints/commands/delete-admin-trend-category.command.d.ts +26 -0
- package/build/admin/endpoints/commands/delete-admin-trend-category.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/delete-admin-trend-category.command.js +25 -0
- package/build/admin/endpoints/commands/delete-admin-trend.command.d.ts +26 -0
- package/build/admin/endpoints/commands/delete-admin-trend.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/delete-admin-trend.command.js +25 -0
- package/build/admin/endpoints/commands/index.d.ts +9 -0
- package/build/admin/endpoints/commands/index.d.ts.map +1 -1
- package/build/admin/endpoints/commands/index.js +9 -0
- package/build/admin/endpoints/commands/probe-admin-trend-reference-video.command.d.ts +37 -0
- package/build/admin/endpoints/commands/probe-admin-trend-reference-video.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/probe-admin-trend-reference-video.command.js +32 -0
- package/build/admin/endpoints/commands/reorder-admin-trends.command.d.ts +26 -0
- package/build/admin/endpoints/commands/reorder-admin-trends.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/reorder-admin-trends.command.js +28 -0
- package/build/admin/endpoints/commands/update-admin-trend-category.command.d.ts +49 -0
- package/build/admin/endpoints/commands/update-admin-trend-category.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/update-admin-trend-category.command.js +31 -0
- package/build/admin/endpoints/commands/update-admin-trend-status.command.d.ts +118 -0
- package/build/admin/endpoints/commands/update-admin-trend-status.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/update-admin-trend-status.command.js +32 -0
- package/build/admin/endpoints/commands/update-admin-trend.command.d.ts +151 -0
- package/build/admin/endpoints/commands/update-admin-trend.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/update-admin-trend.command.js +31 -0
- package/build/admin/endpoints/queries/get-admin-trend-categories.query.d.ts +32 -0
- package/build/admin/endpoints/queries/get-admin-trend-categories.query.d.ts.map +1 -0
- package/build/admin/endpoints/queries/get-admin-trend-categories.query.js +21 -0
- package/build/admin/endpoints/queries/get-admin-trend.query.d.ts +110 -0
- package/build/admin/endpoints/queries/get-admin-trend.query.d.ts.map +1 -0
- package/build/admin/endpoints/queries/get-admin-trend.query.js +26 -0
- package/build/admin/endpoints/queries/get-admin-trends.query.d.ts +63 -0
- package/build/admin/endpoints/queries/get-admin-trends.query.d.ts.map +1 -0
- package/build/admin/endpoints/queries/get-admin-trends.query.js +33 -0
- package/build/admin/endpoints/queries/index.d.ts +3 -0
- package/build/admin/endpoints/queries/index.d.ts.map +1 -1
- package/build/admin/endpoints/queries/index.js +3 -0
- package/build/admin/models/admin-trend-category-response.schema.d.ts +10 -0
- package/build/admin/models/admin-trend-category-response.schema.d.ts.map +1 -0
- package/build/admin/models/admin-trend-category-response.schema.js +11 -0
- package/build/admin/models/admin-trend-response.schema.d.ts +79 -0
- package/build/admin/models/admin-trend-response.schema.d.ts.map +1 -0
- package/build/admin/models/admin-trend-response.schema.js +53 -0
- package/build/admin/models/index.d.ts +2 -0
- package/build/admin/models/index.d.ts.map +1 -1
- package/build/admin/models/index.js +2 -0
- package/build/errors/errors.d.ts +154 -0
- package/build/errors/errors.d.ts.map +1 -1
- package/build/errors/errors.js +154 -0
- package/build/generation-job-chat/endpoints/commands/create-generation-job-chat.command.d.ts +2 -0
- package/build/generation-job-chat/endpoints/commands/create-generation-job-chat.command.d.ts.map +1 -1
- package/build/generation-job-chat/endpoints/commands/update-generation-job-chat.command.d.ts +2 -0
- package/build/generation-job-chat/endpoints/commands/update-generation-job-chat.command.d.ts.map +1 -1
- package/build/generation-job-chat/endpoints/queries/get-generation-job-chat-by-uuid.query.d.ts +2 -0
- package/build/generation-job-chat/endpoints/queries/get-generation-job-chat-by-uuid.query.d.ts.map +1 -1
- package/build/generation-job-chat/endpoints/queries/get-generation-job-chats.query.d.ts +2 -0
- package/build/generation-job-chat/endpoints/queries/get-generation-job-chats.query.d.ts.map +1 -1
- package/build/generation-job-chat/models/generation-job-chat-response.schema.d.ts +1 -0
- package/build/generation-job-chat/models/generation-job-chat-response.schema.d.ts.map +1 -1
- package/build/generation-job-chat/models/generation-job-chat-response.schema.js +1 -0
- package/build/generation-model/endpoints/queries/get-generation-models-by-type.query.d.ts +2 -0
- package/build/generation-model/endpoints/queries/get-generation-models-by-type.query.d.ts.map +1 -1
- package/build/generation-model/endpoints/queries/get-generation-models.query.d.ts +2 -0
- package/build/generation-model/endpoints/queries/get-generation-models.query.d.ts.map +1 -1
- package/build/generation-model/models/generation-model-response.schema.d.ts +3 -0
- package/build/generation-model/models/generation-model-response.schema.d.ts.map +1 -1
- package/build/generation-model/models/generation-model-response.schema.js +1 -0
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -0
- package/build/trend/endpoints/commands/generate-trend.command.d.ts +142 -0
- package/build/trend/endpoints/commands/generate-trend.command.d.ts.map +1 -0
- package/build/trend/endpoints/commands/generate-trend.command.js +54 -0
- package/build/trend/endpoints/commands/index.d.ts +2 -0
- package/build/trend/endpoints/commands/index.d.ts.map +1 -0
- package/build/trend/endpoints/commands/index.js +17 -0
- package/build/trend/endpoints/index.d.ts +4 -0
- package/build/trend/endpoints/index.d.ts.map +1 -0
- package/build/trend/endpoints/index.js +19 -0
- package/build/trend/endpoints/queries/get-public-trend-by-slug.query.d.ts +92 -0
- package/build/trend/endpoints/queries/get-public-trend-by-slug.query.d.ts.map +1 -0
- package/build/trend/endpoints/queries/get-public-trend-by-slug.query.js +24 -0
- package/build/trend/endpoints/queries/index.d.ts +4 -0
- package/build/trend/endpoints/queries/index.d.ts.map +1 -0
- package/build/trend/endpoints/queries/index.js +19 -0
- package/build/trend/endpoints/queries/list-public-trend-categories.query.d.ts +26 -0
- package/build/trend/endpoints/queries/list-public-trend-categories.query.d.ts.map +1 -0
- package/build/trend/endpoints/queries/list-public-trend-categories.query.js +19 -0
- package/build/trend/endpoints/queries/list-public-trends.query.d.ts +69 -0
- package/build/trend/endpoints/queries/list-public-trends.query.d.ts.map +1 -0
- package/build/trend/endpoints/queries/list-public-trends.query.js +28 -0
- package/build/trend/endpoints/trend.d.ts +11 -0
- package/build/trend/endpoints/trend.d.ts.map +1 -0
- package/build/trend/endpoints/trend.js +13 -0
- package/build/trend/enums/index.d.ts +6 -0
- package/build/trend/enums/index.d.ts.map +1 -0
- package/build/trend/enums/index.js +21 -0
- package/build/trend/enums/trend-aspect-ratio.enum.d.ts +9 -0
- package/build/trend/enums/trend-aspect-ratio.enum.d.ts.map +1 -0
- package/build/trend/enums/trend-aspect-ratio.enum.js +12 -0
- package/build/trend/enums/trend-field-type.enum.d.ts +5 -0
- package/build/trend/enums/trend-field-type.enum.d.ts.map +1 -0
- package/build/trend/enums/trend-field-type.enum.js +8 -0
- package/build/trend/enums/trend-limits.d.ts +11 -0
- package/build/trend/enums/trend-limits.d.ts.map +1 -0
- package/build/trend/enums/trend-limits.js +13 -0
- package/build/trend/enums/trend-quality.enum.d.ts +7 -0
- package/build/trend/enums/trend-quality.enum.d.ts.map +1 -0
- package/build/trend/enums/trend-quality.enum.js +10 -0
- package/build/trend/enums/trend-status.enum.d.ts +5 -0
- package/build/trend/enums/trend-status.enum.d.ts.map +1 -0
- package/build/trend/enums/trend-status.enum.js +8 -0
- package/build/trend/helpers/index.d.ts +2 -0
- package/build/trend/helpers/index.d.ts.map +1 -0
- package/build/trend/helpers/index.js +17 -0
- package/build/trend/helpers/trend-field-reference.helper.d.ts +4 -0
- package/build/trend/helpers/trend-field-reference.helper.d.ts.map +1 -0
- package/build/trend/helpers/trend-field-reference.helper.js +12 -0
- package/build/trend/index.d.ts +5 -0
- package/build/trend/index.d.ts.map +1 -0
- package/build/trend/index.js +20 -0
- package/build/trend/models/index.d.ts +5 -0
- package/build/trend/models/index.d.ts.map +1 -0
- package/build/trend/models/index.js +20 -0
- package/build/trend/models/public-trend.schema.d.ts +88 -0
- package/build/trend/models/public-trend.schema.d.ts.map +1 -0
- package/build/trend/models/public-trend.schema.js +44 -0
- package/build/trend/models/trend-category-input.schema.d.ts +7 -0
- package/build/trend/models/trend-category-input.schema.d.ts.map +1 -0
- package/build/trend/models/trend-category-input.schema.js +10 -0
- package/build/trend/models/trend-common.schema.d.ts +10 -0
- package/build/trend/models/trend-common.schema.d.ts.map +1 -0
- package/build/trend/models/trend-common.schema.js +17 -0
- package/build/trend/models/trend-input.schema.d.ts +33 -0
- package/build/trend/models/trend-input.schema.d.ts.map +1 -0
- package/build/trend/models/trend-input.schema.js +54 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/video-generation-chain/endpoints/queries/get-video-generation-chain-config.query.d.ts +2 -0
- package/build/video-generation-chain/endpoints/queries/get-video-generation-chain-config.query.d.ts.map +1 -1
- package/errors/errors.ts +154 -0
- package/generation-job-chat/models/generation-job-chat-response.schema.ts +1 -0
- package/generation-model/models/generation-model-response.schema.ts +1 -0
- package/index.ts +1 -0
- package/package.json +1 -1
- package/trend/endpoints/commands/generate-trend.command.ts +63 -0
- package/trend/endpoints/commands/index.ts +1 -0
- package/trend/endpoints/index.ts +3 -0
- package/trend/endpoints/queries/get-public-trend-by-slug.query.ts +27 -0
- package/trend/endpoints/queries/index.ts +3 -0
- package/trend/endpoints/queries/list-public-trend-categories.query.ts +20 -0
- package/trend/endpoints/queries/list-public-trends.query.ts +31 -0
- package/trend/endpoints/trend.ts +13 -0
- package/trend/enums/index.ts +5 -0
- package/trend/enums/trend-aspect-ratio.enum.ts +8 -0
- package/trend/enums/trend-field-type.enum.ts +4 -0
- package/trend/enums/trend-limits.ts +10 -0
- package/trend/enums/trend-quality.enum.ts +7 -0
- package/trend/enums/trend-status.enum.ts +4 -0
- package/trend/helpers/index.ts +1 -0
- package/trend/helpers/trend-field-reference.helper.ts +9 -0
- package/trend/index.ts +4 -0
- package/trend/models/index.ts +4 -0
- package/trend/models/public-trend.schema.ts +58 -0
- package/trend/models/trend-category-input.schema.ts +10 -0
- package/trend/models/trend-common.schema.ts +26 -0
- package/trend/models/trend-input.schema.ts +69 -0
package/admin/endpoints/admin.ts
CHANGED
|
@@ -57,6 +57,22 @@ export const ADMIN_ROUTES = {
|
|
|
57
57
|
UPDATE_MODEL_FAMILY: (familyId: string) => `model-families/${familyId}`,
|
|
58
58
|
DELETE_MODEL_FAMILY: (familyId: string) => `model-families/${familyId}`,
|
|
59
59
|
|
|
60
|
+
// TRENDS
|
|
61
|
+
GET_TRENDS: 'trends',
|
|
62
|
+
CREATE_TREND: 'trends',
|
|
63
|
+
REORDER_TRENDS: 'trends/reorder',
|
|
64
|
+
PROBE_TREND_REFERENCE_VIDEO: 'trends/reference-video/probe',
|
|
65
|
+
GET_TREND: (trendId: string) => `trends/${trendId}`,
|
|
66
|
+
UPDATE_TREND: (trendId: string) => `trends/${trendId}`,
|
|
67
|
+
DELETE_TREND: (trendId: string) => `trends/${trendId}`,
|
|
68
|
+
UPDATE_TREND_STATUS: (trendId: string) => `trends/${trendId}/status`,
|
|
69
|
+
|
|
70
|
+
// TREND CATEGORIES
|
|
71
|
+
GET_TREND_CATEGORIES: 'trend-categories',
|
|
72
|
+
CREATE_TREND_CATEGORY: 'trend-categories',
|
|
73
|
+
UPDATE_TREND_CATEGORY: (categoryId: string) => `trend-categories/${categoryId}`,
|
|
74
|
+
DELETE_TREND_CATEGORY: (categoryId: string) => `trend-categories/${categoryId}`,
|
|
75
|
+
|
|
60
76
|
// ORGANIZATION
|
|
61
77
|
GET_ORGANIZATION: 'organization',
|
|
62
78
|
UPDATE_ORGANIZATION: 'organization',
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineContract, HTTP_METHODS, HttpErrorResponseSchema } from '../../../_common';
|
|
3
|
+
import { TrendCategoryInputSchema } from '../../../trend';
|
|
4
|
+
import { AdminTrendCategoryResponseSchema } from '../../models';
|
|
5
|
+
import { ADMIN_ROUTES } from '../admin';
|
|
6
|
+
|
|
7
|
+
export const CreateAdminTrendCategoryCommandBody = TrendCategoryInputSchema;
|
|
8
|
+
|
|
9
|
+
export const CreateAdminTrendCategoryCommandResponse = AdminTrendCategoryResponseSchema;
|
|
10
|
+
|
|
11
|
+
export const CreateAdminTrendCategoryCommand = defineContract({
|
|
12
|
+
method: HTTP_METHODS.POST,
|
|
13
|
+
path: ADMIN_ROUTES.CREATE_TREND_CATEGORY,
|
|
14
|
+
summary: 'Create trend category',
|
|
15
|
+
request: {
|
|
16
|
+
body: CreateAdminTrendCategoryCommandBody,
|
|
17
|
+
},
|
|
18
|
+
responses: {
|
|
19
|
+
201: CreateAdminTrendCategoryCommandResponse,
|
|
20
|
+
400: HttpErrorResponseSchema,
|
|
21
|
+
401: HttpErrorResponseSchema,
|
|
22
|
+
403: HttpErrorResponseSchema,
|
|
23
|
+
409: HttpErrorResponseSchema,
|
|
24
|
+
500: HttpErrorResponseSchema,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export type CreateAdminTrendCategoryCommandBodyType = z.infer<typeof CreateAdminTrendCategoryCommandBody>;
|
|
29
|
+
export type CreateAdminTrendCategoryCommandResponseType = z.infer<typeof CreateAdminTrendCategoryCommandResponse>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineContract, HTTP_METHODS, HttpErrorResponseSchema } from '../../../_common';
|
|
3
|
+
import { TrendInputSchema } from '../../../trend';
|
|
4
|
+
import { AdminTrendResponseSchema } from '../../models';
|
|
5
|
+
import { ADMIN_ROUTES } from '../admin';
|
|
6
|
+
|
|
7
|
+
export const CreateAdminTrendCommandBody = TrendInputSchema;
|
|
8
|
+
|
|
9
|
+
export const CreateAdminTrendCommandResponse = AdminTrendResponseSchema;
|
|
10
|
+
|
|
11
|
+
export const CreateAdminTrendCommand = defineContract({
|
|
12
|
+
method: HTTP_METHODS.POST,
|
|
13
|
+
path: ADMIN_ROUTES.CREATE_TREND,
|
|
14
|
+
summary: 'Create trend as draft',
|
|
15
|
+
request: {
|
|
16
|
+
body: CreateAdminTrendCommandBody,
|
|
17
|
+
},
|
|
18
|
+
responses: {
|
|
19
|
+
201: CreateAdminTrendCommandResponse,
|
|
20
|
+
400: HttpErrorResponseSchema,
|
|
21
|
+
401: HttpErrorResponseSchema,
|
|
22
|
+
403: HttpErrorResponseSchema,
|
|
23
|
+
404: HttpErrorResponseSchema,
|
|
24
|
+
409: HttpErrorResponseSchema,
|
|
25
|
+
500: HttpErrorResponseSchema,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export type CreateAdminTrendCommandBodyType = z.infer<typeof CreateAdminTrendCommandBody>;
|
|
30
|
+
export type CreateAdminTrendCommandResponseType = z.infer<typeof CreateAdminTrendCommandResponse>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineContract, HTTP_METHODS, HttpErrorResponseSchema, HttpSuccessResponseSchema } from '../../../_common';
|
|
3
|
+
import { ADMIN_ROUTES } from '../admin';
|
|
4
|
+
|
|
5
|
+
export const DeleteAdminTrendCategoryCommandParams = z.object({
|
|
6
|
+
categoryId: z.uuid(),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export const DeleteAdminTrendCategoryCommandResponse = HttpSuccessResponseSchema;
|
|
10
|
+
|
|
11
|
+
export const DeleteAdminTrendCategoryCommand = defineContract({
|
|
12
|
+
method: HTTP_METHODS.DELETE,
|
|
13
|
+
path: ADMIN_ROUTES.DELETE_TREND_CATEGORY(':categoryId'),
|
|
14
|
+
summary: 'Delete trend category and detach it from trends',
|
|
15
|
+
request: {
|
|
16
|
+
params: DeleteAdminTrendCategoryCommandParams,
|
|
17
|
+
},
|
|
18
|
+
responses: {
|
|
19
|
+
200: DeleteAdminTrendCategoryCommandResponse,
|
|
20
|
+
401: HttpErrorResponseSchema,
|
|
21
|
+
403: HttpErrorResponseSchema,
|
|
22
|
+
404: HttpErrorResponseSchema,
|
|
23
|
+
500: HttpErrorResponseSchema,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export type DeleteAdminTrendCategoryCommandParamsType = z.infer<typeof DeleteAdminTrendCategoryCommandParams>;
|
|
28
|
+
export type DeleteAdminTrendCategoryCommandResponseType = z.infer<typeof DeleteAdminTrendCategoryCommandResponse>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineContract, HTTP_METHODS, HttpErrorResponseSchema, HttpSuccessResponseSchema } from '../../../_common';
|
|
3
|
+
import { ADMIN_ROUTES } from '../admin';
|
|
4
|
+
|
|
5
|
+
export const DeleteAdminTrendCommandParams = z.object({
|
|
6
|
+
trendId: z.uuid(),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export const DeleteAdminTrendCommandResponse = HttpSuccessResponseSchema;
|
|
10
|
+
|
|
11
|
+
export const DeleteAdminTrendCommand = defineContract({
|
|
12
|
+
method: HTTP_METHODS.DELETE,
|
|
13
|
+
path: ADMIN_ROUTES.DELETE_TREND(':trendId'),
|
|
14
|
+
summary: 'Delete trend; generated chats keep working',
|
|
15
|
+
request: {
|
|
16
|
+
params: DeleteAdminTrendCommandParams,
|
|
17
|
+
},
|
|
18
|
+
responses: {
|
|
19
|
+
200: DeleteAdminTrendCommandResponse,
|
|
20
|
+
401: HttpErrorResponseSchema,
|
|
21
|
+
403: HttpErrorResponseSchema,
|
|
22
|
+
404: HttpErrorResponseSchema,
|
|
23
|
+
500: HttpErrorResponseSchema,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export type DeleteAdminTrendCommandParamsType = z.infer<typeof DeleteAdminTrendCommandParams>;
|
|
28
|
+
export type DeleteAdminTrendCommandResponseType = z.infer<typeof DeleteAdminTrendCommandResponse>;
|
|
@@ -13,3 +13,12 @@ export * from './update-admin-model-family.command';
|
|
|
13
13
|
export * from './delete-admin-model-family.command';
|
|
14
14
|
export * from './update-admin-organization.command';
|
|
15
15
|
export * from './ban-admin-users.command';
|
|
16
|
+
export * from './create-admin-trend.command';
|
|
17
|
+
export * from './update-admin-trend.command';
|
|
18
|
+
export * from './update-admin-trend-status.command';
|
|
19
|
+
export * from './delete-admin-trend.command';
|
|
20
|
+
export * from './reorder-admin-trends.command';
|
|
21
|
+
export * from './probe-admin-trend-reference-video.command';
|
|
22
|
+
export * from './create-admin-trend-category.command';
|
|
23
|
+
export * from './update-admin-trend-category.command';
|
|
24
|
+
export * from './delete-admin-trend-category.command';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineContract, HTTP_METHODS, HttpErrorResponseSchema } from '../../../_common';
|
|
3
|
+
import { TrendAspectRatioSchema, TrendDurationSecSchema } from '../../../trend';
|
|
4
|
+
import { ADMIN_ROUTES } from '../admin';
|
|
5
|
+
|
|
6
|
+
export const ProbeAdminTrendReferenceVideoCommandBody = z.object({
|
|
7
|
+
fileId: z.uuid(),
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export const ProbeAdminTrendReferenceVideoCommandResponse = z.object({
|
|
11
|
+
durationSec: TrendDurationSecSchema,
|
|
12
|
+
aspectRatio: TrendAspectRatioSchema,
|
|
13
|
+
width: z.int().positive(),
|
|
14
|
+
height: z.int().positive(),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export const ProbeAdminTrendReferenceVideoCommand = defineContract({
|
|
18
|
+
method: HTTP_METHODS.POST,
|
|
19
|
+
path: ADMIN_ROUTES.PROBE_TREND_REFERENCE_VIDEO,
|
|
20
|
+
summary: 'Detect duration and nearest supported aspect ratio of an uploaded reference video',
|
|
21
|
+
request: {
|
|
22
|
+
body: ProbeAdminTrendReferenceVideoCommandBody,
|
|
23
|
+
},
|
|
24
|
+
responses: {
|
|
25
|
+
200: ProbeAdminTrendReferenceVideoCommandResponse,
|
|
26
|
+
400: HttpErrorResponseSchema,
|
|
27
|
+
401: HttpErrorResponseSchema,
|
|
28
|
+
403: HttpErrorResponseSchema,
|
|
29
|
+
404: HttpErrorResponseSchema,
|
|
30
|
+
500: HttpErrorResponseSchema,
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export type ProbeAdminTrendReferenceVideoCommandBodyType = z.infer<typeof ProbeAdminTrendReferenceVideoCommandBody>;
|
|
35
|
+
export type ProbeAdminTrendReferenceVideoCommandResponseType = z.infer<
|
|
36
|
+
typeof ProbeAdminTrendReferenceVideoCommandResponse
|
|
37
|
+
>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineContract, HTTP_METHODS, HttpErrorResponseSchema, HttpSuccessResponseSchema } from '../../../_common';
|
|
3
|
+
import { ADMIN_ROUTES } from '../admin';
|
|
4
|
+
|
|
5
|
+
export const ReorderAdminTrendsCommandBody = z.object({
|
|
6
|
+
trendIds: z
|
|
7
|
+
.array(z.uuid())
|
|
8
|
+
.min(1)
|
|
9
|
+
.refine((ids) => new Set(ids).size === ids.length, { message: 'Trend ids must be unique' }),
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export const ReorderAdminTrendsCommandResponse = HttpSuccessResponseSchema;
|
|
13
|
+
|
|
14
|
+
export const ReorderAdminTrendsCommand = defineContract({
|
|
15
|
+
method: HTTP_METHODS.POST,
|
|
16
|
+
path: ADMIN_ROUTES.REORDER_TRENDS,
|
|
17
|
+
summary: 'Set catalog order of all trends; position in the array is the order',
|
|
18
|
+
request: {
|
|
19
|
+
body: ReorderAdminTrendsCommandBody,
|
|
20
|
+
},
|
|
21
|
+
responses: {
|
|
22
|
+
200: ReorderAdminTrendsCommandResponse,
|
|
23
|
+
400: HttpErrorResponseSchema,
|
|
24
|
+
401: HttpErrorResponseSchema,
|
|
25
|
+
403: HttpErrorResponseSchema,
|
|
26
|
+
500: HttpErrorResponseSchema,
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export type ReorderAdminTrendsCommandBodyType = z.infer<typeof ReorderAdminTrendsCommandBody>;
|
|
31
|
+
export type ReorderAdminTrendsCommandResponseType = z.infer<typeof ReorderAdminTrendsCommandResponse>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineContract, HTTP_METHODS, HttpErrorResponseSchema } from '../../../_common';
|
|
3
|
+
import { TrendCategoryInputSchema } from '../../../trend';
|
|
4
|
+
import { AdminTrendCategoryResponseSchema } from '../../models';
|
|
5
|
+
import { ADMIN_ROUTES } from '../admin';
|
|
6
|
+
|
|
7
|
+
export const UpdateAdminTrendCategoryCommandParams = z.object({
|
|
8
|
+
categoryId: z.uuid(),
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export const UpdateAdminTrendCategoryCommandBody = TrendCategoryInputSchema;
|
|
12
|
+
|
|
13
|
+
export const UpdateAdminTrendCategoryCommandResponse = AdminTrendCategoryResponseSchema;
|
|
14
|
+
|
|
15
|
+
export const UpdateAdminTrendCategoryCommand = defineContract({
|
|
16
|
+
method: HTTP_METHODS.PUT,
|
|
17
|
+
path: ADMIN_ROUTES.UPDATE_TREND_CATEGORY(':categoryId'),
|
|
18
|
+
summary: 'Replace trend category slug and name',
|
|
19
|
+
request: {
|
|
20
|
+
params: UpdateAdminTrendCategoryCommandParams,
|
|
21
|
+
body: UpdateAdminTrendCategoryCommandBody,
|
|
22
|
+
},
|
|
23
|
+
responses: {
|
|
24
|
+
200: UpdateAdminTrendCategoryCommandResponse,
|
|
25
|
+
400: HttpErrorResponseSchema,
|
|
26
|
+
401: HttpErrorResponseSchema,
|
|
27
|
+
403: HttpErrorResponseSchema,
|
|
28
|
+
404: HttpErrorResponseSchema,
|
|
29
|
+
409: HttpErrorResponseSchema,
|
|
30
|
+
500: HttpErrorResponseSchema,
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export type UpdateAdminTrendCategoryCommandParamsType = z.infer<typeof UpdateAdminTrendCategoryCommandParams>;
|
|
35
|
+
export type UpdateAdminTrendCategoryCommandBodyType = z.infer<typeof UpdateAdminTrendCategoryCommandBody>;
|
|
36
|
+
export type UpdateAdminTrendCategoryCommandResponseType = z.infer<typeof UpdateAdminTrendCategoryCommandResponse>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineContract, HTTP_METHODS, HttpErrorResponseSchema } from '../../../_common';
|
|
3
|
+
import { TrendStatusSchema } from '../../../trend';
|
|
4
|
+
import { AdminTrendResponseSchema } from '../../models';
|
|
5
|
+
import { ADMIN_ROUTES } from '../admin';
|
|
6
|
+
|
|
7
|
+
export const UpdateAdminTrendStatusCommandParams = z.object({
|
|
8
|
+
trendId: z.uuid(),
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export const UpdateAdminTrendStatusCommandBody = z.object({
|
|
12
|
+
status: TrendStatusSchema,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export const UpdateAdminTrendStatusCommandResponse = AdminTrendResponseSchema;
|
|
16
|
+
|
|
17
|
+
export const UpdateAdminTrendStatusCommand = defineContract({
|
|
18
|
+
method: HTTP_METHODS.PATCH,
|
|
19
|
+
path: ADMIN_ROUTES.UPDATE_TREND_STATUS(':trendId'),
|
|
20
|
+
summary: 'Publish or unpublish trend',
|
|
21
|
+
request: {
|
|
22
|
+
params: UpdateAdminTrendStatusCommandParams,
|
|
23
|
+
body: UpdateAdminTrendStatusCommandBody,
|
|
24
|
+
},
|
|
25
|
+
responses: {
|
|
26
|
+
200: UpdateAdminTrendStatusCommandResponse,
|
|
27
|
+
400: HttpErrorResponseSchema,
|
|
28
|
+
401: HttpErrorResponseSchema,
|
|
29
|
+
403: HttpErrorResponseSchema,
|
|
30
|
+
404: HttpErrorResponseSchema,
|
|
31
|
+
500: HttpErrorResponseSchema,
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export type UpdateAdminTrendStatusCommandParamsType = z.infer<typeof UpdateAdminTrendStatusCommandParams>;
|
|
36
|
+
export type UpdateAdminTrendStatusCommandBodyType = z.infer<typeof UpdateAdminTrendStatusCommandBody>;
|
|
37
|
+
export type UpdateAdminTrendStatusCommandResponseType = z.infer<typeof UpdateAdminTrendStatusCommandResponse>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineContract, HTTP_METHODS, HttpErrorResponseSchema } from '../../../_common';
|
|
3
|
+
import { TrendInputSchema } from '../../../trend';
|
|
4
|
+
import { AdminTrendResponseSchema } from '../../models';
|
|
5
|
+
import { ADMIN_ROUTES } from '../admin';
|
|
6
|
+
|
|
7
|
+
export const UpdateAdminTrendCommandParams = z.object({
|
|
8
|
+
trendId: z.uuid(),
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export const UpdateAdminTrendCommandBody = TrendInputSchema;
|
|
12
|
+
|
|
13
|
+
export const UpdateAdminTrendCommandResponse = AdminTrendResponseSchema;
|
|
14
|
+
|
|
15
|
+
export const UpdateAdminTrendCommand = defineContract({
|
|
16
|
+
method: HTTP_METHODS.PUT,
|
|
17
|
+
path: ADMIN_ROUTES.UPDATE_TREND(':trendId'),
|
|
18
|
+
summary: 'Replace trend settings; renamed fields are rewritten in prompts',
|
|
19
|
+
request: {
|
|
20
|
+
params: UpdateAdminTrendCommandParams,
|
|
21
|
+
body: UpdateAdminTrendCommandBody,
|
|
22
|
+
},
|
|
23
|
+
responses: {
|
|
24
|
+
200: UpdateAdminTrendCommandResponse,
|
|
25
|
+
400: HttpErrorResponseSchema,
|
|
26
|
+
401: HttpErrorResponseSchema,
|
|
27
|
+
403: HttpErrorResponseSchema,
|
|
28
|
+
404: HttpErrorResponseSchema,
|
|
29
|
+
409: HttpErrorResponseSchema,
|
|
30
|
+
500: HttpErrorResponseSchema,
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export type UpdateAdminTrendCommandParamsType = z.infer<typeof UpdateAdminTrendCommandParams>;
|
|
35
|
+
export type UpdateAdminTrendCommandBodyType = z.infer<typeof UpdateAdminTrendCommandBody>;
|
|
36
|
+
export type UpdateAdminTrendCommandResponseType = z.infer<typeof UpdateAdminTrendCommandResponse>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineContract, HTTP_METHODS, HttpErrorResponseSchema } from '../../../_common';
|
|
3
|
+
import { AdminTrendCategoryResponseSchema } from '../../models';
|
|
4
|
+
import { ADMIN_ROUTES } from '../admin';
|
|
5
|
+
|
|
6
|
+
export const GetAdminTrendCategoriesQueryResponse = z.object({
|
|
7
|
+
categories: z.array(AdminTrendCategoryResponseSchema),
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export const GetAdminTrendCategoriesQuery = defineContract({
|
|
11
|
+
method: HTTP_METHODS.GET,
|
|
12
|
+
path: ADMIN_ROUTES.GET_TREND_CATEGORIES,
|
|
13
|
+
summary: 'Get all trend categories',
|
|
14
|
+
responses: {
|
|
15
|
+
200: GetAdminTrendCategoriesQueryResponse,
|
|
16
|
+
401: HttpErrorResponseSchema,
|
|
17
|
+
403: HttpErrorResponseSchema,
|
|
18
|
+
500: HttpErrorResponseSchema,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export type GetAdminTrendCategoriesQueryResponseType = z.infer<typeof GetAdminTrendCategoriesQueryResponse>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineContract, HTTP_METHODS, HttpErrorResponseSchema } from '../../../_common';
|
|
3
|
+
import { AdminTrendResponseSchema } from '../../models';
|
|
4
|
+
import { ADMIN_ROUTES } from '../admin';
|
|
5
|
+
|
|
6
|
+
export const GetAdminTrendQueryParams = z.object({
|
|
7
|
+
trendId: z.uuid(),
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export const GetAdminTrendQueryResponse = AdminTrendResponseSchema;
|
|
11
|
+
|
|
12
|
+
export const GetAdminTrendQuery = defineContract({
|
|
13
|
+
method: HTTP_METHODS.GET,
|
|
14
|
+
path: ADMIN_ROUTES.GET_TREND(':trendId'),
|
|
15
|
+
summary: 'Get trend with all settings and generations count',
|
|
16
|
+
request: {
|
|
17
|
+
params: GetAdminTrendQueryParams,
|
|
18
|
+
},
|
|
19
|
+
responses: {
|
|
20
|
+
200: GetAdminTrendQueryResponse,
|
|
21
|
+
401: HttpErrorResponseSchema,
|
|
22
|
+
403: HttpErrorResponseSchema,
|
|
23
|
+
404: HttpErrorResponseSchema,
|
|
24
|
+
500: HttpErrorResponseSchema,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export type GetAdminTrendQueryParamsType = z.infer<typeof GetAdminTrendQueryParams>;
|
|
29
|
+
export type GetAdminTrendQueryResponseType = z.infer<typeof GetAdminTrendQueryResponse>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineContract, defineOffsetPaginationQuery, HTTP_METHODS, HttpErrorResponseSchema } from '../../../_common';
|
|
3
|
+
import { TrendStatusSchema } from '../../../trend';
|
|
4
|
+
import { AdminTrendListItemSchema } from '../../models';
|
|
5
|
+
import { ADMIN_ROUTES } from '../admin';
|
|
6
|
+
|
|
7
|
+
export const GetAdminTrendsQueryQuery = defineOffsetPaginationQuery().extend({
|
|
8
|
+
search: z.string().trim().max(255).optional(),
|
|
9
|
+
status: TrendStatusSchema.optional(),
|
|
10
|
+
categoryId: z.uuid().optional(),
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export const GetAdminTrendsQueryResponse = z.object({
|
|
14
|
+
trends: z.array(AdminTrendListItemSchema),
|
|
15
|
+
total: z.number().int().nonnegative(),
|
|
16
|
+
page: z.number().int().positive(),
|
|
17
|
+
limit: z.number().int().positive(),
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export const GetAdminTrendsQuery = defineContract({
|
|
21
|
+
method: HTTP_METHODS.GET,
|
|
22
|
+
path: ADMIN_ROUTES.GET_TRENDS,
|
|
23
|
+
summary: 'Get trends list ordered by catalog order',
|
|
24
|
+
request: {
|
|
25
|
+
query: GetAdminTrendsQueryQuery,
|
|
26
|
+
},
|
|
27
|
+
responses: {
|
|
28
|
+
200: GetAdminTrendsQueryResponse,
|
|
29
|
+
401: HttpErrorResponseSchema,
|
|
30
|
+
403: HttpErrorResponseSchema,
|
|
31
|
+
500: HttpErrorResponseSchema,
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export type GetAdminTrendsQueryQueryType = z.infer<typeof GetAdminTrendsQueryQuery>;
|
|
36
|
+
export type GetAdminTrendsQueryResponseType = z.infer<typeof GetAdminTrendsQueryResponse>;
|
|
@@ -22,3 +22,6 @@ export * from './get-admin-partner-referral-deposits.query';
|
|
|
22
22
|
export * from './get-admin-dashboard.query';
|
|
23
23
|
export * from './export-admin-dashboard.query';
|
|
24
24
|
export * from './get-admin-linked-account-clusters.query';
|
|
25
|
+
export * from './get-admin-trends.query';
|
|
26
|
+
export * from './get-admin-trend.query';
|
|
27
|
+
export * from './get-admin-trend-categories.query';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export const AdminTrendCategoryResponseSchema = z.object({
|
|
4
|
+
uuid: z.uuid(),
|
|
5
|
+
slug: z.string(),
|
|
6
|
+
name: z.string(),
|
|
7
|
+
createdAt: z.iso.datetime(),
|
|
8
|
+
updatedAt: z.iso.datetime(),
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export type AdminTrendCategoryResponseSchemaType = z.infer<typeof AdminTrendCategoryResponseSchema>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TrendAspectRatioSchema, TrendDurationSecSchema, TrendFieldTypeSchema, TrendStatusSchema } from '../../trend';
|
|
3
|
+
import { AdminTrendCategoryResponseSchema } from './admin-trend-category-response.schema';
|
|
4
|
+
|
|
5
|
+
export const AdminTrendFileSchema = z.object({
|
|
6
|
+
uuid: z.uuid(),
|
|
7
|
+
url: z.url(),
|
|
8
|
+
thumbnailUrl: z.url().nullable(),
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export const AdminTrendFieldSchema = z.object({
|
|
12
|
+
uuid: z.uuid(),
|
|
13
|
+
type: TrendFieldTypeSchema,
|
|
14
|
+
name: z.string(),
|
|
15
|
+
order: z.int().nonnegative(),
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export const AdminTrendModelSchema = z.object({
|
|
19
|
+
modelId: z.uuid(),
|
|
20
|
+
titleModel: z.string(),
|
|
21
|
+
order: z.int().nonnegative(),
|
|
22
|
+
isDefault: z.boolean(),
|
|
23
|
+
isAvailable: z.boolean(),
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export const AdminTrendResponseSchema = z.object({
|
|
27
|
+
uuid: z.uuid(),
|
|
28
|
+
slug: z.string(),
|
|
29
|
+
title: z.string(),
|
|
30
|
+
prompt: z.string(),
|
|
31
|
+
status: TrendStatusSchema,
|
|
32
|
+
order: z.int(),
|
|
33
|
+
referenceVideo: AdminTrendFileSchema,
|
|
34
|
+
preview: AdminTrendFileSchema,
|
|
35
|
+
aspectRatio: TrendAspectRatioSchema,
|
|
36
|
+
durationSec: TrendDurationSecSchema,
|
|
37
|
+
categories: z.array(AdminTrendCategoryResponseSchema),
|
|
38
|
+
fields: z.array(AdminTrendFieldSchema),
|
|
39
|
+
models: z.array(AdminTrendModelSchema),
|
|
40
|
+
generationsCount: z.int().nonnegative(),
|
|
41
|
+
createdAt: z.iso.datetime(),
|
|
42
|
+
updatedAt: z.iso.datetime(),
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export const AdminTrendListItemSchema = z.object({
|
|
46
|
+
uuid: z.uuid(),
|
|
47
|
+
slug: z.string(),
|
|
48
|
+
status: TrendStatusSchema,
|
|
49
|
+
order: z.int(),
|
|
50
|
+
title: z.string(),
|
|
51
|
+
previewUrl: z.url(),
|
|
52
|
+
generationsCount: z.int().nonnegative(),
|
|
53
|
+
createdAt: z.iso.datetime(),
|
|
54
|
+
updatedAt: z.iso.datetime(),
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
export type AdminTrendFileSchemaType = z.infer<typeof AdminTrendFileSchema>;
|
|
58
|
+
export type AdminTrendFieldSchemaType = z.infer<typeof AdminTrendFieldSchema>;
|
|
59
|
+
export type AdminTrendModelSchemaType = z.infer<typeof AdminTrendModelSchema>;
|
|
60
|
+
export type AdminTrendResponseSchemaType = z.infer<typeof AdminTrendResponseSchema>;
|
|
61
|
+
export type AdminTrendListItemSchemaType = z.infer<typeof AdminTrendListItemSchema>;
|
package/admin/models/index.ts
CHANGED
|
@@ -17,3 +17,5 @@ export * from './admin-page-response.schema';
|
|
|
17
17
|
export * from './admin-dashboard-response.schema';
|
|
18
18
|
export * from './admin-time-zone.schema';
|
|
19
19
|
export * from './admin-linked-account-cluster.schema';
|
|
20
|
+
export * from './admin-trend-category-response.schema';
|
|
21
|
+
export * from './admin-trend-response.schema';
|
|
@@ -37,6 +37,18 @@ export declare const ADMIN_ROUTES: {
|
|
|
37
37
|
readonly CREATE_MODEL_FAMILY: "model-families";
|
|
38
38
|
readonly UPDATE_MODEL_FAMILY: (familyId: string) => string;
|
|
39
39
|
readonly DELETE_MODEL_FAMILY: (familyId: string) => string;
|
|
40
|
+
readonly GET_TRENDS: "trends";
|
|
41
|
+
readonly CREATE_TREND: "trends";
|
|
42
|
+
readonly REORDER_TRENDS: "trends/reorder";
|
|
43
|
+
readonly PROBE_TREND_REFERENCE_VIDEO: "trends/reference-video/probe";
|
|
44
|
+
readonly GET_TREND: (trendId: string) => string;
|
|
45
|
+
readonly UPDATE_TREND: (trendId: string) => string;
|
|
46
|
+
readonly DELETE_TREND: (trendId: string) => string;
|
|
47
|
+
readonly UPDATE_TREND_STATUS: (trendId: string) => string;
|
|
48
|
+
readonly GET_TREND_CATEGORIES: "trend-categories";
|
|
49
|
+
readonly CREATE_TREND_CATEGORY: "trend-categories";
|
|
50
|
+
readonly UPDATE_TREND_CATEGORY: (categoryId: string) => string;
|
|
51
|
+
readonly DELETE_TREND_CATEGORY: (categoryId: string) => string;
|
|
40
52
|
readonly GET_ORGANIZATION: "organization";
|
|
41
53
|
readonly UPDATE_ORGANIZATION: "organization";
|
|
42
54
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../../admin/endpoints/admin.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD,eAAO,MAAM,YAAY;;sCAGI,MAAM;gDACI,MAAM;iDACL,MAAM;sDACD,MAAM;yDACH,MAAM;kDACb,MAAM;+DACO,MAAM;wDACb,MAAM,aAAa,MAAM;uDAE1B,MAAM;yDACJ,MAAM;;;;;;;;gCAgB/B,MAAM;6CACO,MAAM;gCACnB,MAAM;;;;iDAQW,MAAM;0CACb,MAAM;8CACF,MAAM;;;gCAKpB,MAAM;mCACH,MAAM;mCACN,MAAM;0CACC,MAAM;;;6CAKH,MAAM;6CACN,MAAM;;;
|
|
1
|
+
{"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../../admin/endpoints/admin.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD,eAAO,MAAM,YAAY;;sCAGI,MAAM;gDACI,MAAM;iDACL,MAAM;sDACD,MAAM;yDACH,MAAM;kDACb,MAAM;+DACO,MAAM;wDACb,MAAM,aAAa,MAAM;uDAE1B,MAAM;yDACJ,MAAM;;;;;;;;gCAgB/B,MAAM;6CACO,MAAM;gCACnB,MAAM;;;;iDAQW,MAAM;0CACb,MAAM;8CACF,MAAM;;;gCAKpB,MAAM;mCACH,MAAM;mCACN,MAAM;0CACC,MAAM;;;6CAKH,MAAM;6CACN,MAAM;;;;;kCAOjB,MAAM;qCACH,MAAM;qCACN,MAAM;4CACC,MAAM;;;iDAKD,MAAM;iDACN,MAAM;;;CAKpC,CAAC"}
|
|
@@ -49,6 +49,20 @@ exports.ADMIN_ROUTES = {
|
|
|
49
49
|
CREATE_MODEL_FAMILY: 'model-families',
|
|
50
50
|
UPDATE_MODEL_FAMILY: (familyId) => `model-families/${familyId}`,
|
|
51
51
|
DELETE_MODEL_FAMILY: (familyId) => `model-families/${familyId}`,
|
|
52
|
+
// TRENDS
|
|
53
|
+
GET_TRENDS: 'trends',
|
|
54
|
+
CREATE_TREND: 'trends',
|
|
55
|
+
REORDER_TRENDS: 'trends/reorder',
|
|
56
|
+
PROBE_TREND_REFERENCE_VIDEO: 'trends/reference-video/probe',
|
|
57
|
+
GET_TREND: (trendId) => `trends/${trendId}`,
|
|
58
|
+
UPDATE_TREND: (trendId) => `trends/${trendId}`,
|
|
59
|
+
DELETE_TREND: (trendId) => `trends/${trendId}`,
|
|
60
|
+
UPDATE_TREND_STATUS: (trendId) => `trends/${trendId}/status`,
|
|
61
|
+
// TREND CATEGORIES
|
|
62
|
+
GET_TREND_CATEGORIES: 'trend-categories',
|
|
63
|
+
CREATE_TREND_CATEGORY: 'trend-categories',
|
|
64
|
+
UPDATE_TREND_CATEGORY: (categoryId) => `trend-categories/${categoryId}`,
|
|
65
|
+
DELETE_TREND_CATEGORY: (categoryId) => `trend-categories/${categoryId}`,
|
|
52
66
|
// ORGANIZATION
|
|
53
67
|
GET_ORGANIZATION: 'organization',
|
|
54
68
|
UPDATE_ORGANIZATION: 'organization',
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HTTP_METHODS } from '../../../_common';
|
|
3
|
+
export declare const CreateAdminTrendCategoryCommandBody: z.ZodObject<{
|
|
4
|
+
slug: z.ZodString;
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const CreateAdminTrendCategoryCommandResponse: z.ZodObject<{
|
|
8
|
+
uuid: z.ZodUUID;
|
|
9
|
+
slug: z.ZodString;
|
|
10
|
+
name: z.ZodString;
|
|
11
|
+
createdAt: z.ZodISODateTime;
|
|
12
|
+
updatedAt: z.ZodISODateTime;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export declare const CreateAdminTrendCategoryCommand: {
|
|
15
|
+
method: HTTP_METHODS.POST;
|
|
16
|
+
path: "trend-categories";
|
|
17
|
+
summary: string;
|
|
18
|
+
request: {
|
|
19
|
+
body: z.ZodObject<{
|
|
20
|
+
slug: z.ZodString;
|
|
21
|
+
name: z.ZodString;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
};
|
|
24
|
+
responses: {
|
|
25
|
+
201: z.ZodObject<{
|
|
26
|
+
uuid: z.ZodUUID;
|
|
27
|
+
slug: z.ZodString;
|
|
28
|
+
name: z.ZodString;
|
|
29
|
+
createdAt: z.ZodISODateTime;
|
|
30
|
+
updatedAt: z.ZodISODateTime;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
400: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
33
|
+
401: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
34
|
+
403: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
35
|
+
409: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
36
|
+
500: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export type CreateAdminTrendCategoryCommandBodyType = z.infer<typeof CreateAdminTrendCategoryCommandBody>;
|
|
40
|
+
export type CreateAdminTrendCategoryCommandResponseType = z.infer<typeof CreateAdminTrendCategoryCommandResponse>;
|
|
41
|
+
//# sourceMappingURL=create-admin-trend-category.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-admin-trend-category.command.d.ts","sourceRoot":"","sources":["../../../../admin/endpoints/commands/create-admin-trend-category.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAKzF,eAAO,MAAM,mCAAmC;;;iBAA2B,CAAC;AAE5E,eAAO,MAAM,uCAAuC;;;;;;iBAAmC,CAAC;AAExF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;CAe1C,CAAC;AAEH,MAAM,MAAM,uCAAuC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;AAC1G,MAAM,MAAM,2CAA2C,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uCAAuC,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateAdminTrendCategoryCommand = exports.CreateAdminTrendCategoryCommandResponse = exports.CreateAdminTrendCategoryCommandBody = void 0;
|
|
4
|
+
const _common_1 = require("../../../_common");
|
|
5
|
+
const trend_1 = require("../../../trend");
|
|
6
|
+
const models_1 = require("../../models");
|
|
7
|
+
const admin_1 = require("../admin");
|
|
8
|
+
exports.CreateAdminTrendCategoryCommandBody = trend_1.TrendCategoryInputSchema;
|
|
9
|
+
exports.CreateAdminTrendCategoryCommandResponse = models_1.AdminTrendCategoryResponseSchema;
|
|
10
|
+
exports.CreateAdminTrendCategoryCommand = (0, _common_1.defineContract)({
|
|
11
|
+
method: _common_1.HTTP_METHODS.POST,
|
|
12
|
+
path: admin_1.ADMIN_ROUTES.CREATE_TREND_CATEGORY,
|
|
13
|
+
summary: 'Create trend category',
|
|
14
|
+
request: {
|
|
15
|
+
body: exports.CreateAdminTrendCategoryCommandBody,
|
|
16
|
+
},
|
|
17
|
+
responses: {
|
|
18
|
+
201: exports.CreateAdminTrendCategoryCommandResponse,
|
|
19
|
+
400: _common_1.HttpErrorResponseSchema,
|
|
20
|
+
401: _common_1.HttpErrorResponseSchema,
|
|
21
|
+
403: _common_1.HttpErrorResponseSchema,
|
|
22
|
+
409: _common_1.HttpErrorResponseSchema,
|
|
23
|
+
500: _common_1.HttpErrorResponseSchema,
|
|
24
|
+
},
|
|
25
|
+
});
|