@ai-grator/api 0.3.81 → 0.3.82
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 +8 -0
- package/admin/endpoints/commands/index.ts +2 -0
- package/admin/endpoints/commands/replace-admin-main-page-models.command.ts +34 -0
- package/admin/endpoints/commands/replace-admin-main-page-presets.command.ts +34 -0
- package/admin/endpoints/queries/get-admin-main-page-models.query.ts +22 -0
- package/admin/endpoints/queries/get-admin-main-page-presets.query.ts +22 -0
- package/admin/endpoints/queries/index.ts +2 -0
- package/admin/models/admin-main-page-model-response.schema.ts +51 -0
- package/admin/models/admin-main-page-preset-response.schema.ts +22 -0
- package/admin/models/index.ts +2 -0
- package/build/admin/endpoints/admin.d.ts +4 -0
- package/build/admin/endpoints/admin.d.ts.map +1 -1
- package/build/admin/endpoints/admin.js +6 -0
- package/build/admin/endpoints/commands/index.d.ts +2 -0
- package/build/admin/endpoints/commands/index.d.ts.map +1 -1
- package/build/admin/endpoints/commands/index.js +2 -0
- package/build/admin/endpoints/commands/replace-admin-main-page-models.command.d.ts +169 -0
- package/build/admin/endpoints/commands/replace-admin-main-page-models.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/replace-admin-main-page-models.command.js +30 -0
- package/build/admin/endpoints/commands/replace-admin-main-page-presets.command.d.ts +67 -0
- package/build/admin/endpoints/commands/replace-admin-main-page-presets.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/replace-admin-main-page-presets.command.js +30 -0
- package/build/admin/endpoints/queries/get-admin-main-page-models.query.d.ts +124 -0
- package/build/admin/endpoints/queries/get-admin-main-page-models.query.d.ts.map +1 -0
- package/build/admin/endpoints/queries/get-admin-main-page-models.query.js +21 -0
- package/build/admin/endpoints/queries/get-admin-main-page-presets.query.d.ts +46 -0
- package/build/admin/endpoints/queries/get-admin-main-page-presets.query.d.ts.map +1 -0
- package/build/admin/endpoints/queries/get-admin-main-page-presets.query.js +21 -0
- package/build/admin/endpoints/queries/get-admin-partner-links-stats.query.d.ts +2 -2
- package/build/admin/endpoints/queries/index.d.ts +2 -0
- package/build/admin/endpoints/queries/index.d.ts.map +1 -1
- package/build/admin/endpoints/queries/index.js +2 -0
- package/build/admin/models/admin-main-page-model-response.schema.d.ts +97 -0
- package/build/admin/models/admin-main-page-model-response.schema.d.ts.map +1 -0
- package/build/admin/models/admin-main-page-model-response.schema.js +43 -0
- package/build/admin/models/admin-main-page-preset-response.schema.d.ts +25 -0
- package/build/admin/models/admin-main-page-preset-response.schema.d.ts.map +1 -0
- package/build/admin/models/admin-main-page-preset-response.schema.js +20 -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 +70 -0
- package/build/errors/errors.d.ts.map +1 -1
- package/build/errors/errors.js +70 -0
- package/build/model-page/endpoints/model-page.d.ts +3 -0
- package/build/model-page/endpoints/model-page.d.ts.map +1 -1
- package/build/model-page/endpoints/model-page.js +4 -1
- package/build/model-page/endpoints/queries/index.d.ts +1 -0
- package/build/model-page/endpoints/queries/index.d.ts.map +1 -1
- package/build/model-page/endpoints/queries/index.js +1 -0
- package/build/model-page/endpoints/queries/list-main-page-models.query.d.ts +106 -0
- package/build/model-page/endpoints/queries/list-main-page-models.query.d.ts.map +1 -0
- package/build/model-page/endpoints/queries/list-main-page-models.query.js +32 -0
- package/build/model-page/enums/index.d.ts +1 -0
- package/build/model-page/enums/index.d.ts.map +1 -1
- package/build/model-page/enums/index.js +1 -0
- package/build/model-page/enums/main-page-model.enum.d.ts +14 -0
- package/build/model-page/enums/main-page-model.enum.d.ts.map +1 -0
- package/build/model-page/enums/main-page-model.enum.js +17 -0
- package/build/model-page/models/index.d.ts +1 -0
- package/build/model-page/models/index.d.ts.map +1 -1
- package/build/model-page/models/index.js +1 -0
- package/build/model-page/models/main-page-model.schema.d.ts +130 -0
- package/build/model-page/models/main-page-model.schema.d.ts.map +1 -0
- package/build/model-page/models/main-page-model.schema.js +80 -0
- package/build/preset/endpoints/preset.d.ts +4 -0
- package/build/preset/endpoints/preset.d.ts.map +1 -1
- package/build/preset/endpoints/preset.js +5 -1
- package/build/preset/endpoints/queries/index.d.ts +1 -0
- package/build/preset/endpoints/queries/index.d.ts.map +1 -1
- package/build/preset/endpoints/queries/index.js +1 -0
- package/build/preset/endpoints/queries/list-main-page-presets.query.d.ts +144 -0
- package/build/preset/endpoints/queries/list-main-page-presets.query.d.ts.map +1 -0
- package/build/preset/endpoints/queries/list-main-page-presets.query.js +19 -0
- package/build/preset/enums/preset-limits.d.ts +4 -0
- package/build/preset/enums/preset-limits.d.ts.map +1 -1
- package/build/preset/enums/preset-limits.js +5 -1
- package/build/preset/models/index.d.ts +1 -0
- package/build/preset/models/index.d.ts.map +1 -1
- package/build/preset/models/index.js +1 -0
- package/build/preset/models/main-page-preset.schema.d.ts +81 -0
- package/build/preset/models/main-page-preset.schema.d.ts.map +1 -0
- package/build/preset/models/main-page-preset.schema.js +30 -0
- package/build/pricing-page/endpoints/pricing-page.d.ts +1 -0
- package/build/pricing-page/endpoints/pricing-page.d.ts.map +1 -1
- package/build/pricing-page/endpoints/pricing-page.js +1 -0
- package/build/pricing-page/endpoints/queries/get-pricing-min-prices.query.d.ts +48 -0
- package/build/pricing-page/endpoints/queries/get-pricing-min-prices.query.d.ts.map +1 -0
- package/build/pricing-page/endpoints/queries/get-pricing-min-prices.query.js +16 -0
- package/build/pricing-page/endpoints/queries/index.d.ts +1 -0
- package/build/pricing-page/endpoints/queries/index.d.ts.map +1 -1
- package/build/pricing-page/endpoints/queries/index.js +1 -0
- package/build/pricing-page/models/index.d.ts +1 -0
- package/build/pricing-page/models/index.d.ts.map +1 -1
- package/build/pricing-page/models/index.js +1 -0
- package/build/pricing-page/models/pricing-min-prices.schema.d.ts +35 -0
- package/build/pricing-page/models/pricing-min-prices.schema.d.ts.map +1 -0
- package/build/pricing-page/models/pricing-min-prices.schema.js +17 -0
- package/build/referral/models/referral-advertising-stats.schema.d.ts +2 -2
- package/build/referral/models/referral-link-stats-response.schema.d.ts +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/errors/errors.ts +70 -0
- package/model-page/endpoints/model-page.ts +4 -0
- package/model-page/endpoints/queries/index.ts +1 -0
- package/model-page/endpoints/queries/list-main-page-models.query.ts +36 -0
- package/model-page/enums/index.ts +1 -0
- package/model-page/enums/main-page-model.enum.ts +14 -0
- package/model-page/models/index.ts +1 -0
- package/model-page/models/main-page-model.schema.ts +106 -0
- package/package.json +1 -1
- package/preset/endpoints/preset.ts +6 -0
- package/preset/endpoints/queries/index.ts +1 -0
- package/preset/endpoints/queries/list-main-page-presets.query.ts +20 -0
- package/preset/enums/preset-limits.ts +5 -0
- package/preset/models/index.ts +1 -0
- package/preset/models/main-page-preset.schema.ts +39 -0
- package/pricing-page/endpoints/pricing-page.ts +1 -0
- package/pricing-page/endpoints/queries/get-pricing-min-prices.query.ts +15 -0
- package/pricing-page/endpoints/queries/index.ts +1 -0
- package/pricing-page/models/index.ts +1 -0
- package/pricing-page/models/pricing-min-prices.schema.ts +21 -0
package/admin/endpoints/admin.ts
CHANGED
|
@@ -102,6 +102,14 @@ export const ADMIN_ROUTES = {
|
|
|
102
102
|
UPDATE_PRESET_CATEGORY: (categoryId: string) => `preset-categories/${categoryId}`,
|
|
103
103
|
DELETE_PRESET_CATEGORY: (categoryId: string) => `preset-categories/${categoryId}`,
|
|
104
104
|
|
|
105
|
+
// MAIN PAGE PRESETS
|
|
106
|
+
GET_MAIN_PAGE_PRESETS: 'main-page/presets',
|
|
107
|
+
REPLACE_MAIN_PAGE_PRESETS: 'main-page/presets',
|
|
108
|
+
|
|
109
|
+
// MAIN PAGE MODELS
|
|
110
|
+
GET_MAIN_PAGE_MODELS: 'main-page/models',
|
|
111
|
+
REPLACE_MAIN_PAGE_MODELS: 'main-page/models',
|
|
112
|
+
|
|
105
113
|
// ORGANIZATION
|
|
106
114
|
GET_ORGANIZATION: 'organization',
|
|
107
115
|
UPDATE_ORGANIZATION: 'organization',
|
|
@@ -36,3 +36,5 @@ export * from './update-admin-preset-category.command';
|
|
|
36
36
|
export * from './update-admin-preset-status.command';
|
|
37
37
|
export * from './update-admin-preset.command';
|
|
38
38
|
export * from './create-admin-vendor-deposit.command';
|
|
39
|
+
export * from './replace-admin-main-page-presets.command';
|
|
40
|
+
export * from './replace-admin-main-page-models.command';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineContract, HTTP_METHODS, HttpErrorResponseSchema } from '../../../_common';
|
|
3
|
+
import { MainPageModelsInputSchema } from '../../../model-page';
|
|
4
|
+
import { AdminMainPageModelResponseSchema } from '../../models';
|
|
5
|
+
import { ADMIN_ROUTES } from '../admin';
|
|
6
|
+
|
|
7
|
+
export const ReplaceAdminMainPageModelsCommandBody = z.object({
|
|
8
|
+
items: MainPageModelsInputSchema,
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export const ReplaceAdminMainPageModelsCommandResponse = z.object({
|
|
12
|
+
models: z.array(AdminMainPageModelResponseSchema),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export const ReplaceAdminMainPageModelsCommand = defineContract({
|
|
16
|
+
method: HTTP_METHODS.PUT,
|
|
17
|
+
path: ADMIN_ROUTES.REPLACE_MAIN_PAGE_MODELS,
|
|
18
|
+
summary:
|
|
19
|
+
'Replace the main page models block; position in the arrays is the order of rows and versions, versions must be pages of the row family, target is an active chat or generation model, empty list clears it',
|
|
20
|
+
request: {
|
|
21
|
+
body: ReplaceAdminMainPageModelsCommandBody,
|
|
22
|
+
},
|
|
23
|
+
responses: {
|
|
24
|
+
200: ReplaceAdminMainPageModelsCommandResponse,
|
|
25
|
+
400: HttpErrorResponseSchema,
|
|
26
|
+
401: HttpErrorResponseSchema,
|
|
27
|
+
403: HttpErrorResponseSchema,
|
|
28
|
+
404: HttpErrorResponseSchema,
|
|
29
|
+
500: HttpErrorResponseSchema,
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export type ReplaceAdminMainPageModelsCommandBodyType = z.infer<typeof ReplaceAdminMainPageModelsCommandBody>;
|
|
34
|
+
export type ReplaceAdminMainPageModelsCommandResponseType = z.infer<typeof ReplaceAdminMainPageModelsCommandResponse>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineContract, HTTP_METHODS, HttpErrorResponseSchema } from '../../../_common';
|
|
3
|
+
import { MainPagePresetsInputSchema } from '../../../preset';
|
|
4
|
+
import { AdminMainPagePresetResponseSchema } from '../../models';
|
|
5
|
+
import { ADMIN_ROUTES } from '../admin';
|
|
6
|
+
|
|
7
|
+
export const ReplaceAdminMainPagePresetsCommandBody = z.object({
|
|
8
|
+
items: MainPagePresetsInputSchema,
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export const ReplaceAdminMainPagePresetsCommandResponse = z.object({
|
|
12
|
+
presets: z.array(AdminMainPagePresetResponseSchema),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export const ReplaceAdminMainPagePresetsCommand = defineContract({
|
|
16
|
+
method: HTTP_METHODS.PUT,
|
|
17
|
+
path: ADMIN_ROUTES.REPLACE_MAIN_PAGE_PRESETS,
|
|
18
|
+
summary:
|
|
19
|
+
'Replace the main page carousel; position in the array is the order, only published presets, empty list clears it',
|
|
20
|
+
request: {
|
|
21
|
+
body: ReplaceAdminMainPagePresetsCommandBody,
|
|
22
|
+
},
|
|
23
|
+
responses: {
|
|
24
|
+
200: ReplaceAdminMainPagePresetsCommandResponse,
|
|
25
|
+
400: HttpErrorResponseSchema,
|
|
26
|
+
401: HttpErrorResponseSchema,
|
|
27
|
+
403: HttpErrorResponseSchema,
|
|
28
|
+
404: HttpErrorResponseSchema,
|
|
29
|
+
500: HttpErrorResponseSchema,
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export type ReplaceAdminMainPagePresetsCommandBodyType = z.infer<typeof ReplaceAdminMainPagePresetsCommandBody>;
|
|
34
|
+
export type ReplaceAdminMainPagePresetsCommandResponseType = z.infer<typeof ReplaceAdminMainPagePresetsCommandResponse>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineContract, HTTP_METHODS, HttpErrorResponseSchema } from '../../../_common';
|
|
3
|
+
import { AdminMainPageModelResponseSchema } from '../../models';
|
|
4
|
+
import { ADMIN_ROUTES } from '../admin';
|
|
5
|
+
|
|
6
|
+
export const GetAdminMainPageModelsQueryResponse = z.object({
|
|
7
|
+
models: z.array(AdminMainPageModelResponseSchema),
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export const GetAdminMainPageModelsQuery = defineContract({
|
|
11
|
+
method: HTTP_METHODS.GET,
|
|
12
|
+
path: ADMIN_ROUTES.GET_MAIN_PAGE_MODELS,
|
|
13
|
+
summary: 'Get rows of the main page models block ordered by order, including versions with inactive models',
|
|
14
|
+
responses: {
|
|
15
|
+
200: GetAdminMainPageModelsQueryResponse,
|
|
16
|
+
401: HttpErrorResponseSchema,
|
|
17
|
+
403: HttpErrorResponseSchema,
|
|
18
|
+
500: HttpErrorResponseSchema,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export type GetAdminMainPageModelsQueryResponseType = z.infer<typeof GetAdminMainPageModelsQueryResponse>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineContract, HTTP_METHODS, HttpErrorResponseSchema } from '../../../_common';
|
|
3
|
+
import { AdminMainPagePresetResponseSchema } from '../../models';
|
|
4
|
+
import { ADMIN_ROUTES } from '../admin';
|
|
5
|
+
|
|
6
|
+
export const GetAdminMainPagePresetsQueryResponse = z.object({
|
|
7
|
+
presets: z.array(AdminMainPagePresetResponseSchema),
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export const GetAdminMainPagePresetsQuery = defineContract({
|
|
11
|
+
method: HTTP_METHODS.GET,
|
|
12
|
+
path: ADMIN_ROUTES.GET_MAIN_PAGE_PRESETS,
|
|
13
|
+
summary: 'Get presets of the main page carousel ordered by order, including unpublished ones',
|
|
14
|
+
responses: {
|
|
15
|
+
200: GetAdminMainPagePresetsQueryResponse,
|
|
16
|
+
401: HttpErrorResponseSchema,
|
|
17
|
+
403: HttpErrorResponseSchema,
|
|
18
|
+
500: HttpErrorResponseSchema,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export type GetAdminMainPagePresetsQueryResponseType = z.infer<typeof GetAdminMainPagePresetsQueryResponse>;
|
|
@@ -32,3 +32,5 @@ export * from './get-admin-preset.query';
|
|
|
32
32
|
export * from './get-admin-presets.query';
|
|
33
33
|
export * from './get-admin-vendor-spend.query';
|
|
34
34
|
export * from './get-admin-vendor-deposits.query';
|
|
35
|
+
export * from './get-admin-main-page-presets.query';
|
|
36
|
+
export * from './get-admin-main-page-models.query';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { GenerationTypeSchema } from '../../generation-model';
|
|
3
|
+
import { MODEL_CATEGORY } from '../../model-catalog';
|
|
4
|
+
import { MAIN_PAGE_MODEL_TARGET, MainPageModelDemoSchema } from '../../model-page';
|
|
5
|
+
|
|
6
|
+
export const AdminMainPageModelFamilyRefSchema = z.object({
|
|
7
|
+
uuid: z.uuid(),
|
|
8
|
+
name: z.string(),
|
|
9
|
+
category: z.enum(MODEL_CATEGORY),
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export const AdminMainPageModelRefSchema = z.object({
|
|
13
|
+
uuid: z.uuid(),
|
|
14
|
+
title: z.string(),
|
|
15
|
+
isActive: z.boolean(),
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export const AdminMainPageModelVersionSchema = z.object({
|
|
19
|
+
pageId: z.uuid(),
|
|
20
|
+
versionName: z.string().nullable(),
|
|
21
|
+
model: AdminMainPageModelRefSchema,
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export const AdminMainPageModelTargetSchema = z.discriminatedUnion('type', [
|
|
25
|
+
z.object({
|
|
26
|
+
type: z.literal(MAIN_PAGE_MODEL_TARGET.CHAT),
|
|
27
|
+
model: AdminMainPageModelRefSchema,
|
|
28
|
+
}),
|
|
29
|
+
z.object({
|
|
30
|
+
type: z.literal(MAIN_PAGE_MODEL_TARGET.GENERATION),
|
|
31
|
+
model: AdminMainPageModelRefSchema,
|
|
32
|
+
generationType: GenerationTypeSchema,
|
|
33
|
+
}),
|
|
34
|
+
]);
|
|
35
|
+
|
|
36
|
+
export const AdminMainPageModelResponseSchema = z.object({
|
|
37
|
+
order: z.int(),
|
|
38
|
+
title: z.string().nullable(),
|
|
39
|
+
tagline: z.string().nullable(),
|
|
40
|
+
label: z.string(),
|
|
41
|
+
family: AdminMainPageModelFamilyRefSchema,
|
|
42
|
+
target: AdminMainPageModelTargetSchema,
|
|
43
|
+
versions: z.array(AdminMainPageModelVersionSchema),
|
|
44
|
+
demo: MainPageModelDemoSchema,
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export type AdminMainPageModelFamilyRefSchemaType = z.infer<typeof AdminMainPageModelFamilyRefSchema>;
|
|
48
|
+
export type AdminMainPageModelRefSchemaType = z.infer<typeof AdminMainPageModelRefSchema>;
|
|
49
|
+
export type AdminMainPageModelTargetSchemaType = z.infer<typeof AdminMainPageModelTargetSchema>;
|
|
50
|
+
export type AdminMainPageModelVersionSchemaType = z.infer<typeof AdminMainPageModelVersionSchema>;
|
|
51
|
+
export type AdminMainPageModelResponseSchemaType = z.infer<typeof AdminMainPageModelResponseSchema>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { PresetStatusSchema, PresetToolSchema } from '../../preset';
|
|
3
|
+
|
|
4
|
+
export const AdminMainPagePresetRefSchema = z.object({
|
|
5
|
+
uuid: z.uuid(),
|
|
6
|
+
slug: z.string(),
|
|
7
|
+
title: z.string(),
|
|
8
|
+
status: PresetStatusSchema,
|
|
9
|
+
tool: PresetToolSchema,
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export const AdminMainPagePresetResponseSchema = z.object({
|
|
13
|
+
order: z.int(),
|
|
14
|
+
label: z.string(),
|
|
15
|
+
title: z.string(),
|
|
16
|
+
description: z.string().nullable(),
|
|
17
|
+
isVisible: z.boolean(),
|
|
18
|
+
preset: AdminMainPagePresetRefSchema,
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export type AdminMainPagePresetRefSchemaType = z.infer<typeof AdminMainPagePresetRefSchema>;
|
|
22
|
+
export type AdminMainPagePresetResponseSchemaType = z.infer<typeof AdminMainPagePresetResponseSchema>;
|
package/admin/models/index.ts
CHANGED
|
@@ -25,3 +25,5 @@ export * from './admin-preset-category-response.schema';
|
|
|
25
25
|
export * from './admin-preset-response.schema';
|
|
26
26
|
export * from './admin-vendor-spend-response.schema';
|
|
27
27
|
export * from './admin-vendor-deposit-response.schema';
|
|
28
|
+
export * from './admin-main-page-preset-response.schema';
|
|
29
|
+
export * from './admin-main-page-model-response.schema';
|
|
@@ -70,6 +70,10 @@ export declare const ADMIN_ROUTES: {
|
|
|
70
70
|
readonly REORDER_PRESET_CATEGORIES: "preset-categories/reorder";
|
|
71
71
|
readonly UPDATE_PRESET_CATEGORY: (categoryId: string) => string;
|
|
72
72
|
readonly DELETE_PRESET_CATEGORY: (categoryId: string) => string;
|
|
73
|
+
readonly GET_MAIN_PAGE_PRESETS: "main-page/presets";
|
|
74
|
+
readonly REPLACE_MAIN_PAGE_PRESETS: "main-page/presets";
|
|
75
|
+
readonly GET_MAIN_PAGE_MODELS: "main-page/models";
|
|
76
|
+
readonly REPLACE_MAIN_PAGE_MODELS: "main-page/models";
|
|
73
77
|
readonly GET_ORGANIZATION: "organization";
|
|
74
78
|
readonly UPDATE_ORGANIZATION: "organization";
|
|
75
79
|
};
|
|
@@ -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;;;;;;;;;;;gCAmB/B,MAAM;6CACO,MAAM;gCACnB,MAAM;;kCAEJ,MAAM;;;;+CAQO,MAAM;;kDAIH,MAAM;;iDAIP,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;;;;oCAMnB,MAAM;uCACH,MAAM;uCACN,MAAM;8CACC,MAAM;;;;kDAMF,MAAM;kDACN,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;;;;;;;;;;;gCAmB/B,MAAM;6CACO,MAAM;gCACnB,MAAM;;kCAEJ,MAAM;;;;+CAQO,MAAM;;kDAIH,MAAM;;iDAIP,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;;;;oCAMnB,MAAM;uCACH,MAAM;uCACN,MAAM;8CACC,MAAM;;;;kDAMF,MAAM;kDACN,MAAM;;;;;;;CAarC,CAAC"}
|
|
@@ -88,6 +88,12 @@ exports.ADMIN_ROUTES = {
|
|
|
88
88
|
REORDER_PRESET_CATEGORIES: 'preset-categories/reorder',
|
|
89
89
|
UPDATE_PRESET_CATEGORY: (categoryId) => `preset-categories/${categoryId}`,
|
|
90
90
|
DELETE_PRESET_CATEGORY: (categoryId) => `preset-categories/${categoryId}`,
|
|
91
|
+
// MAIN PAGE PRESETS
|
|
92
|
+
GET_MAIN_PAGE_PRESETS: 'main-page/presets',
|
|
93
|
+
REPLACE_MAIN_PAGE_PRESETS: 'main-page/presets',
|
|
94
|
+
// MAIN PAGE MODELS
|
|
95
|
+
GET_MAIN_PAGE_MODELS: 'main-page/models',
|
|
96
|
+
REPLACE_MAIN_PAGE_MODELS: 'main-page/models',
|
|
91
97
|
// ORGANIZATION
|
|
92
98
|
GET_ORGANIZATION: 'organization',
|
|
93
99
|
UPDATE_ORGANIZATION: 'organization',
|
|
@@ -36,4 +36,6 @@ export * from './update-admin-preset-category.command';
|
|
|
36
36
|
export * from './update-admin-preset-status.command';
|
|
37
37
|
export * from './update-admin-preset.command';
|
|
38
38
|
export * from './create-admin-vendor-deposit.command';
|
|
39
|
+
export * from './replace-admin-main-page-presets.command';
|
|
40
|
+
export * from './replace-admin-main-page-models.command';
|
|
39
41
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../admin/endpoints/commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,gDAAgD,CAAC;AAC/D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC;AACvD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6CAA6C,CAAC;AAC5D,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,wCAAwC,CAAC;AACvD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wCAAwC,CAAC;AACvD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iCAAiC,CAAC;AAChD,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../admin/endpoints/commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,gDAAgD,CAAC;AAC/D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC;AACvD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6CAA6C,CAAC;AAC5D,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,wCAAwC,CAAC;AACvD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wCAAwC,CAAC;AACvD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iCAAiC,CAAC;AAChD,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC;AACtD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,0CAA0C,CAAC"}
|
|
@@ -52,3 +52,5 @@ __exportStar(require("./update-admin-preset-category.command"), exports);
|
|
|
52
52
|
__exportStar(require("./update-admin-preset-status.command"), exports);
|
|
53
53
|
__exportStar(require("./update-admin-preset.command"), exports);
|
|
54
54
|
__exportStar(require("./create-admin-vendor-deposit.command"), exports);
|
|
55
|
+
__exportStar(require("./replace-admin-main-page-presets.command"), exports);
|
|
56
|
+
__exportStar(require("./replace-admin-main-page-models.command"), exports);
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HTTP_METHODS } from '../../../_common';
|
|
3
|
+
export declare const ReplaceAdminMainPageModelsCommandBody: z.ZodObject<{
|
|
4
|
+
items: z.ZodArray<z.ZodObject<{
|
|
5
|
+
familyId: z.ZodUUID;
|
|
6
|
+
target: z.ZodObject<{
|
|
7
|
+
type: z.ZodEnum<typeof import("../../../model-page").MAIN_PAGE_MODEL_TARGET>;
|
|
8
|
+
modelId: z.ZodUUID;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
pageIds: z.ZodArray<z.ZodUUID>;
|
|
11
|
+
title: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
12
|
+
tagline: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
13
|
+
label: z.ZodString;
|
|
14
|
+
demo: z.ZodObject<{
|
|
15
|
+
prompt: z.ZodString;
|
|
16
|
+
answer: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
17
|
+
signature: z.ZodString;
|
|
18
|
+
mediaFileId: z.ZodDefault<z.ZodNullable<z.ZodUUID>>;
|
|
19
|
+
sourceFileId: z.ZodDefault<z.ZodNullable<z.ZodUUID>>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
}, z.core.$strip>>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
export declare const ReplaceAdminMainPageModelsCommandResponse: z.ZodObject<{
|
|
24
|
+
models: z.ZodArray<z.ZodObject<{
|
|
25
|
+
order: z.ZodInt;
|
|
26
|
+
title: z.ZodNullable<z.ZodString>;
|
|
27
|
+
tagline: z.ZodNullable<z.ZodString>;
|
|
28
|
+
label: z.ZodString;
|
|
29
|
+
family: z.ZodObject<{
|
|
30
|
+
uuid: z.ZodUUID;
|
|
31
|
+
name: z.ZodString;
|
|
32
|
+
category: z.ZodEnum<typeof import("../../..").MODEL_CATEGORY>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
target: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
35
|
+
type: z.ZodLiteral<import("../../../model-page").MAIN_PAGE_MODEL_TARGET.CHAT>;
|
|
36
|
+
model: z.ZodObject<{
|
|
37
|
+
uuid: z.ZodUUID;
|
|
38
|
+
title: z.ZodString;
|
|
39
|
+
isActive: z.ZodBoolean;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
42
|
+
type: z.ZodLiteral<import("../../../model-page").MAIN_PAGE_MODEL_TARGET.GENERATION>;
|
|
43
|
+
model: z.ZodObject<{
|
|
44
|
+
uuid: z.ZodUUID;
|
|
45
|
+
title: z.ZodString;
|
|
46
|
+
isActive: z.ZodBoolean;
|
|
47
|
+
}, z.core.$strip>;
|
|
48
|
+
generationType: z.ZodEnum<typeof import("../../..").GENERATION_TYPE>;
|
|
49
|
+
}, z.core.$strip>], "type">;
|
|
50
|
+
versions: z.ZodArray<z.ZodObject<{
|
|
51
|
+
pageId: z.ZodUUID;
|
|
52
|
+
versionName: z.ZodNullable<z.ZodString>;
|
|
53
|
+
model: z.ZodObject<{
|
|
54
|
+
uuid: z.ZodUUID;
|
|
55
|
+
title: z.ZodString;
|
|
56
|
+
isActive: z.ZodBoolean;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
}, z.core.$strip>>;
|
|
59
|
+
demo: z.ZodObject<{
|
|
60
|
+
prompt: z.ZodString;
|
|
61
|
+
answer: z.ZodNullable<z.ZodString>;
|
|
62
|
+
signature: z.ZodString;
|
|
63
|
+
media: z.ZodNullable<z.ZodObject<{
|
|
64
|
+
uuid: z.ZodUUID;
|
|
65
|
+
url: z.ZodURL;
|
|
66
|
+
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
67
|
+
fileType: z.ZodEnum<typeof import("../../..").FILE_TYPE>;
|
|
68
|
+
}, z.core.$strip>>;
|
|
69
|
+
sourceMedia: z.ZodNullable<z.ZodObject<{
|
|
70
|
+
uuid: z.ZodUUID;
|
|
71
|
+
url: z.ZodURL;
|
|
72
|
+
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
73
|
+
fileType: z.ZodEnum<typeof import("../../..").FILE_TYPE>;
|
|
74
|
+
}, z.core.$strip>>;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
}, z.core.$strip>>;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
export declare const ReplaceAdminMainPageModelsCommand: {
|
|
79
|
+
method: HTTP_METHODS.PUT;
|
|
80
|
+
path: "main-page/models";
|
|
81
|
+
summary: string;
|
|
82
|
+
request: {
|
|
83
|
+
body: z.ZodObject<{
|
|
84
|
+
items: z.ZodArray<z.ZodObject<{
|
|
85
|
+
familyId: z.ZodUUID;
|
|
86
|
+
target: z.ZodObject<{
|
|
87
|
+
type: z.ZodEnum<typeof import("../../../model-page").MAIN_PAGE_MODEL_TARGET>;
|
|
88
|
+
modelId: z.ZodUUID;
|
|
89
|
+
}, z.core.$strip>;
|
|
90
|
+
pageIds: z.ZodArray<z.ZodUUID>;
|
|
91
|
+
title: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
92
|
+
tagline: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
93
|
+
label: z.ZodString;
|
|
94
|
+
demo: z.ZodObject<{
|
|
95
|
+
prompt: z.ZodString;
|
|
96
|
+
answer: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
97
|
+
signature: z.ZodString;
|
|
98
|
+
mediaFileId: z.ZodDefault<z.ZodNullable<z.ZodUUID>>;
|
|
99
|
+
sourceFileId: z.ZodDefault<z.ZodNullable<z.ZodUUID>>;
|
|
100
|
+
}, z.core.$strip>;
|
|
101
|
+
}, z.core.$strip>>;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
};
|
|
104
|
+
responses: {
|
|
105
|
+
200: z.ZodObject<{
|
|
106
|
+
models: z.ZodArray<z.ZodObject<{
|
|
107
|
+
order: z.ZodInt;
|
|
108
|
+
title: z.ZodNullable<z.ZodString>;
|
|
109
|
+
tagline: z.ZodNullable<z.ZodString>;
|
|
110
|
+
label: z.ZodString;
|
|
111
|
+
family: z.ZodObject<{
|
|
112
|
+
uuid: z.ZodUUID;
|
|
113
|
+
name: z.ZodString;
|
|
114
|
+
category: z.ZodEnum<typeof import("../../..").MODEL_CATEGORY>;
|
|
115
|
+
}, z.core.$strip>;
|
|
116
|
+
target: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
117
|
+
type: z.ZodLiteral<import("../../../model-page").MAIN_PAGE_MODEL_TARGET.CHAT>;
|
|
118
|
+
model: z.ZodObject<{
|
|
119
|
+
uuid: z.ZodUUID;
|
|
120
|
+
title: z.ZodString;
|
|
121
|
+
isActive: z.ZodBoolean;
|
|
122
|
+
}, z.core.$strip>;
|
|
123
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
124
|
+
type: z.ZodLiteral<import("../../../model-page").MAIN_PAGE_MODEL_TARGET.GENERATION>;
|
|
125
|
+
model: z.ZodObject<{
|
|
126
|
+
uuid: z.ZodUUID;
|
|
127
|
+
title: z.ZodString;
|
|
128
|
+
isActive: z.ZodBoolean;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
generationType: z.ZodEnum<typeof import("../../..").GENERATION_TYPE>;
|
|
131
|
+
}, z.core.$strip>], "type">;
|
|
132
|
+
versions: z.ZodArray<z.ZodObject<{
|
|
133
|
+
pageId: z.ZodUUID;
|
|
134
|
+
versionName: z.ZodNullable<z.ZodString>;
|
|
135
|
+
model: z.ZodObject<{
|
|
136
|
+
uuid: z.ZodUUID;
|
|
137
|
+
title: z.ZodString;
|
|
138
|
+
isActive: z.ZodBoolean;
|
|
139
|
+
}, z.core.$strip>;
|
|
140
|
+
}, z.core.$strip>>;
|
|
141
|
+
demo: z.ZodObject<{
|
|
142
|
+
prompt: z.ZodString;
|
|
143
|
+
answer: z.ZodNullable<z.ZodString>;
|
|
144
|
+
signature: z.ZodString;
|
|
145
|
+
media: z.ZodNullable<z.ZodObject<{
|
|
146
|
+
uuid: z.ZodUUID;
|
|
147
|
+
url: z.ZodURL;
|
|
148
|
+
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
149
|
+
fileType: z.ZodEnum<typeof import("../../..").FILE_TYPE>;
|
|
150
|
+
}, z.core.$strip>>;
|
|
151
|
+
sourceMedia: z.ZodNullable<z.ZodObject<{
|
|
152
|
+
uuid: z.ZodUUID;
|
|
153
|
+
url: z.ZodURL;
|
|
154
|
+
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
155
|
+
fileType: z.ZodEnum<typeof import("../../..").FILE_TYPE>;
|
|
156
|
+
}, z.core.$strip>>;
|
|
157
|
+
}, z.core.$strip>;
|
|
158
|
+
}, z.core.$strip>>;
|
|
159
|
+
}, z.core.$strip>;
|
|
160
|
+
400: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
161
|
+
401: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
162
|
+
403: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
163
|
+
404: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
164
|
+
500: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
export type ReplaceAdminMainPageModelsCommandBodyType = z.infer<typeof ReplaceAdminMainPageModelsCommandBody>;
|
|
168
|
+
export type ReplaceAdminMainPageModelsCommandResponseType = z.infer<typeof ReplaceAdminMainPageModelsCommandResponse>;
|
|
169
|
+
//# sourceMappingURL=replace-admin-main-page-models.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replace-admin-main-page-models.command.d.ts","sourceRoot":"","sources":["../../../../admin/endpoints/commands/replace-admin-main-page-models.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAKzF,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;iBAEhD,CAAC;AAEH,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAEpD,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgB5C,CAAC;AAEH,MAAM,MAAM,yCAAyC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC;AAC9G,MAAM,MAAM,6CAA6C,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yCAAyC,CAAC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReplaceAdminMainPageModelsCommand = exports.ReplaceAdminMainPageModelsCommandResponse = exports.ReplaceAdminMainPageModelsCommandBody = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const _common_1 = require("../../../_common");
|
|
6
|
+
const model_page_1 = require("../../../model-page");
|
|
7
|
+
const models_1 = require("../../models");
|
|
8
|
+
const admin_1 = require("../admin");
|
|
9
|
+
exports.ReplaceAdminMainPageModelsCommandBody = zod_1.z.object({
|
|
10
|
+
items: model_page_1.MainPageModelsInputSchema,
|
|
11
|
+
});
|
|
12
|
+
exports.ReplaceAdminMainPageModelsCommandResponse = zod_1.z.object({
|
|
13
|
+
models: zod_1.z.array(models_1.AdminMainPageModelResponseSchema),
|
|
14
|
+
});
|
|
15
|
+
exports.ReplaceAdminMainPageModelsCommand = (0, _common_1.defineContract)({
|
|
16
|
+
method: _common_1.HTTP_METHODS.PUT,
|
|
17
|
+
path: admin_1.ADMIN_ROUTES.REPLACE_MAIN_PAGE_MODELS,
|
|
18
|
+
summary: 'Replace the main page models block; position in the arrays is the order of rows and versions, versions must be pages of the row family, target is an active chat or generation model, empty list clears it',
|
|
19
|
+
request: {
|
|
20
|
+
body: exports.ReplaceAdminMainPageModelsCommandBody,
|
|
21
|
+
},
|
|
22
|
+
responses: {
|
|
23
|
+
200: exports.ReplaceAdminMainPageModelsCommandResponse,
|
|
24
|
+
400: _common_1.HttpErrorResponseSchema,
|
|
25
|
+
401: _common_1.HttpErrorResponseSchema,
|
|
26
|
+
403: _common_1.HttpErrorResponseSchema,
|
|
27
|
+
404: _common_1.HttpErrorResponseSchema,
|
|
28
|
+
500: _common_1.HttpErrorResponseSchema,
|
|
29
|
+
},
|
|
30
|
+
});
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HTTP_METHODS } from '../../../_common';
|
|
3
|
+
export declare const ReplaceAdminMainPagePresetsCommandBody: z.ZodObject<{
|
|
4
|
+
items: z.ZodArray<z.ZodObject<{
|
|
5
|
+
presetId: z.ZodUUID;
|
|
6
|
+
label: z.ZodString;
|
|
7
|
+
title: z.ZodString;
|
|
8
|
+
description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
9
|
+
}, z.core.$strip>>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const ReplaceAdminMainPagePresetsCommandResponse: z.ZodObject<{
|
|
12
|
+
presets: z.ZodArray<z.ZodObject<{
|
|
13
|
+
order: z.ZodInt;
|
|
14
|
+
label: z.ZodString;
|
|
15
|
+
title: z.ZodString;
|
|
16
|
+
description: z.ZodNullable<z.ZodString>;
|
|
17
|
+
isVisible: z.ZodBoolean;
|
|
18
|
+
preset: z.ZodObject<{
|
|
19
|
+
uuid: z.ZodUUID;
|
|
20
|
+
slug: z.ZodString;
|
|
21
|
+
title: z.ZodString;
|
|
22
|
+
status: z.ZodEnum<typeof import("../../../preset").PRESET_STATUS>;
|
|
23
|
+
tool: z.ZodEnum<typeof import("../../../preset").PRESET_TOOL>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
}, z.core.$strip>>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
export declare const ReplaceAdminMainPagePresetsCommand: {
|
|
28
|
+
method: HTTP_METHODS.PUT;
|
|
29
|
+
path: "main-page/presets";
|
|
30
|
+
summary: string;
|
|
31
|
+
request: {
|
|
32
|
+
body: z.ZodObject<{
|
|
33
|
+
items: z.ZodArray<z.ZodObject<{
|
|
34
|
+
presetId: z.ZodUUID;
|
|
35
|
+
label: z.ZodString;
|
|
36
|
+
title: z.ZodString;
|
|
37
|
+
description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
38
|
+
}, z.core.$strip>>;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
};
|
|
41
|
+
responses: {
|
|
42
|
+
200: z.ZodObject<{
|
|
43
|
+
presets: z.ZodArray<z.ZodObject<{
|
|
44
|
+
order: z.ZodInt;
|
|
45
|
+
label: z.ZodString;
|
|
46
|
+
title: z.ZodString;
|
|
47
|
+
description: z.ZodNullable<z.ZodString>;
|
|
48
|
+
isVisible: z.ZodBoolean;
|
|
49
|
+
preset: z.ZodObject<{
|
|
50
|
+
uuid: z.ZodUUID;
|
|
51
|
+
slug: z.ZodString;
|
|
52
|
+
title: z.ZodString;
|
|
53
|
+
status: z.ZodEnum<typeof import("../../../preset").PRESET_STATUS>;
|
|
54
|
+
tool: z.ZodEnum<typeof import("../../../preset").PRESET_TOOL>;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
}, z.core.$strip>>;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
400: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
59
|
+
401: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
60
|
+
403: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
61
|
+
404: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
62
|
+
500: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
export type ReplaceAdminMainPagePresetsCommandBodyType = z.infer<typeof ReplaceAdminMainPagePresetsCommandBody>;
|
|
66
|
+
export type ReplaceAdminMainPagePresetsCommandResponseType = z.infer<typeof ReplaceAdminMainPagePresetsCommandResponse>;
|
|
67
|
+
//# sourceMappingURL=replace-admin-main-page-presets.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replace-admin-main-page-presets.command.d.ts","sourceRoot":"","sources":["../../../../admin/endpoints/commands/replace-admin-main-page-presets.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAKzF,eAAO,MAAM,sCAAsC;;;;;;;iBAEjD,CAAC;AAEH,eAAO,MAAM,0CAA0C;;;;;;;;;;;;;;;iBAErD,CAAC;AAEH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgB7C,CAAC;AAEH,MAAM,MAAM,0CAA0C,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAC;AAChH,MAAM,MAAM,8CAA8C,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0CAA0C,CAAC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReplaceAdminMainPagePresetsCommand = exports.ReplaceAdminMainPagePresetsCommandResponse = exports.ReplaceAdminMainPagePresetsCommandBody = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const _common_1 = require("../../../_common");
|
|
6
|
+
const preset_1 = require("../../../preset");
|
|
7
|
+
const models_1 = require("../../models");
|
|
8
|
+
const admin_1 = require("../admin");
|
|
9
|
+
exports.ReplaceAdminMainPagePresetsCommandBody = zod_1.z.object({
|
|
10
|
+
items: preset_1.MainPagePresetsInputSchema,
|
|
11
|
+
});
|
|
12
|
+
exports.ReplaceAdminMainPagePresetsCommandResponse = zod_1.z.object({
|
|
13
|
+
presets: zod_1.z.array(models_1.AdminMainPagePresetResponseSchema),
|
|
14
|
+
});
|
|
15
|
+
exports.ReplaceAdminMainPagePresetsCommand = (0, _common_1.defineContract)({
|
|
16
|
+
method: _common_1.HTTP_METHODS.PUT,
|
|
17
|
+
path: admin_1.ADMIN_ROUTES.REPLACE_MAIN_PAGE_PRESETS,
|
|
18
|
+
summary: 'Replace the main page carousel; position in the array is the order, only published presets, empty list clears it',
|
|
19
|
+
request: {
|
|
20
|
+
body: exports.ReplaceAdminMainPagePresetsCommandBody,
|
|
21
|
+
},
|
|
22
|
+
responses: {
|
|
23
|
+
200: exports.ReplaceAdminMainPagePresetsCommandResponse,
|
|
24
|
+
400: _common_1.HttpErrorResponseSchema,
|
|
25
|
+
401: _common_1.HttpErrorResponseSchema,
|
|
26
|
+
403: _common_1.HttpErrorResponseSchema,
|
|
27
|
+
404: _common_1.HttpErrorResponseSchema,
|
|
28
|
+
500: _common_1.HttpErrorResponseSchema,
|
|
29
|
+
},
|
|
30
|
+
});
|