@veruna/api-contracts 1.0.46 → 1.0.48
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/build/controllers/index.d.ts +1 -0
- package/build/controllers/index.js +3 -1
- package/build/controllers/s2s.controllers.d.ts +5 -0
- package/build/controllers/s2s.controllers.js +8 -0
- package/build/locales/index.d.ts +2 -0
- package/build/locales/index.js +4 -1
- package/build/locales/validation.d.ts +1365 -0
- package/build/locales/validation.js +1402 -0
- package/build/rest-api.d.ts +3 -0
- package/build/rest-api.js +4 -0
- package/build/routes/index.d.ts +1 -0
- package/build/routes/index.js +3 -1
- package/build/routes/message.routes.d.ts +2 -0
- package/build/routes/message.routes.js +2 -0
- package/build/routes/s2s.routes.d.ts +7 -0
- package/build/routes/s2s.routes.js +10 -0
- package/build/shared/pagination.schema.d.ts +1 -0
- package/build/shared/pagination.schema.js +12 -2
- package/build/v1/ai-model/schemas/create-model-request.schema.d.ts +4 -0
- package/build/v1/ai-model/schemas/create-model-request.schema.js +40 -10
- package/build/v1/ai-model/schemas/get-models-filters.schema.d.ts +4 -0
- package/build/v1/ai-model/schemas/get-models-filters.schema.js +8 -1
- package/build/v1/ai-model/schemas/route-params.schema.d.ts +4 -0
- package/build/v1/ai-model/schemas/route-params.schema.js +7 -1
- package/build/v1/ai-model/schemas/update-model-request.schema.d.ts +4 -0
- package/build/v1/ai-model/schemas/update-model-request.schema.js +42 -9
- package/build/v1/ai-provider/schemas/create-provider-request.schema.d.ts +4 -0
- package/build/v1/ai-provider/schemas/create-provider-request.schema.js +16 -5
- package/build/v1/ai-provider/schemas/route-params.schema.d.ts +4 -0
- package/build/v1/ai-provider/schemas/route-params.schema.js +7 -1
- package/build/v1/ai-provider/schemas/update-provider-request.schema.d.ts +4 -0
- package/build/v1/ai-provider/schemas/update-provider-request.schema.js +16 -4
- package/build/v1/auth/schemas/signin-request.schema.d.ts +1 -1
- package/build/v1/auth/schemas/signin-request.schema.js +7 -3
- package/build/v1/auth/schemas/signup-request.schema.d.ts +1 -1
- package/build/v1/auth/schemas/signup-request.schema.js +12 -4
- package/build/v1/blog/schemas/create-category-request.schema.d.ts +4 -0
- package/build/v1/blog/schemas/create-category-request.schema.js +16 -4
- package/build/v1/blog/schemas/create-post-request.schema.d.ts +4 -0
- package/build/v1/blog/schemas/create-post-request.schema.js +51 -16
- package/build/v1/blog/schemas/route-params.schema.d.ts +2 -0
- package/build/v1/blog/schemas/route-params.schema.js +9 -5
- package/build/v1/blog/schemas/update-category-request.schema.d.ts +4 -0
- package/build/v1/blog/schemas/update-category-request.schema.js +17 -3
- package/build/v1/blog/schemas/update-post-request.schema.d.ts +4 -0
- package/build/v1/blog/schemas/update-post-request.schema.js +54 -15
- package/build/v1/chat/commands/create-reg-chat.command.d.ts +4 -1
- package/build/v1/chat/commands/create-unreg-chat.command.d.ts +4 -1
- package/build/v1/chat/commands/update-chat-title.command.d.ts +4 -1
- package/build/v1/chat/commands/update-chat.command.d.ts +4 -1
- package/build/v1/chat/queries/get-last-active-chat.query.d.ts +4 -1
- package/build/v1/chat/queries/get-reg-chat.query.d.ts +4 -1
- package/build/v1/chat/queries/get-unreg-chat.query.d.ts +4 -1
- package/build/v1/chat/schemas/chat-history.schema.d.ts +1 -0
- package/build/v1/chat/schemas/chat-history.schema.js +7 -1
- package/build/v1/chat/schemas/chat-id-param.schema.d.ts +4 -0
- package/build/v1/chat/schemas/chat-id-param.schema.js +7 -1
- package/build/v1/chat/schemas/chat-with-messages-response.schema.d.ts +4 -1
- package/build/v1/chat/schemas/create-chat-request.schema.d.ts +4 -0
- package/build/v1/chat/schemas/create-chat-request.schema.js +5 -1
- package/build/v1/chat/schemas/page-id-param.schema.d.ts +4 -0
- package/build/v1/chat/schemas/page-id-param.schema.js +7 -1
- package/build/v1/chat/schemas/update-chat-request.schema.d.ts +4 -0
- package/build/v1/chat/schemas/update-chat-request.schema.js +10 -2
- package/build/v1/chat/schemas/update-chat-title-request.schema.d.ts +4 -0
- package/build/v1/chat/schemas/update-chat-title-request.schema.js +8 -1
- package/build/v1/chat-project/schemas/create-project-request.schema.d.ts +1 -0
- package/build/v1/chat-project/schemas/create-project-request.schema.js +8 -2
- package/build/v1/chat-project/schemas/get-project-chats.schema.d.ts +1 -0
- package/build/v1/chat-project/schemas/get-project-chats.schema.js +7 -1
- package/build/v1/chat-project/schemas/route-params.schema.d.ts +1 -0
- package/build/v1/chat-project/schemas/route-params.schema.js +4 -1
- package/build/v1/chat-project/schemas/update-project-request.schema.d.ts +1 -0
- package/build/v1/chat-project/schemas/update-project-request.schema.js +10 -2
- package/build/v1/file/schemas/delete-file-by-key-request.schema.d.ts +1 -0
- package/build/v1/file/schemas/delete-file-by-key-request.schema.js +4 -1
- package/build/v1/file/schemas/list-files-request.schema.d.ts +1 -0
- package/build/v1/file/schemas/list-files-request.schema.js +12 -2
- package/build/v1/file/schemas/upload-file-request.schema.d.ts +1 -0
- package/build/v1/file/schemas/upload-file-request.schema.js +4 -1
- package/build/v1/file/schemas/upload-image-request.schema.d.ts +1 -0
- package/build/v1/file/schemas/upload-image-request.schema.js +7 -2
- package/build/v1/index.d.ts +1 -0
- package/build/v1/index.js +1 -0
- package/build/v1/message/commands/create-message.command.d.ts +4 -1
- package/build/v1/message/message.errors.d.ts +1 -0
- package/build/v1/message/message.errors.js +5 -0
- package/build/v1/message/schemas/create-message-request.schema.d.ts +4 -0
- package/build/v1/message/schemas/create-message-request.schema.js +11 -2
- package/build/v1/message/schemas/delete-message.schema.d.ts +15 -0
- package/build/v1/message/schemas/delete-message.schema.js +22 -0
- package/build/v1/message/schemas/index.d.ts +2 -0
- package/build/v1/message/schemas/index.js +4 -1
- package/build/v1/message/schemas/message-meta.schema.d.ts +13 -3
- package/build/v1/message/schemas/message-meta.schema.js +7 -1
- package/build/v1/message/schemas/message-response.schema.d.ts +4 -1
- package/build/v1/message/schemas/message-status.enum.d.ts +2 -1
- package/build/v1/message/schemas/message-status.enum.js +1 -0
- package/build/v1/message/schemas/rate-message.schema.d.ts +8 -0
- package/build/v1/message/schemas/rate-message.schema.js +20 -4
- package/build/v1/message/schemas/stream-events.schema.d.ts +8 -2
- package/build/v1/message/schemas/stream-events.schema.js +4 -9
- package/build/v1/page-hints/schemas/create-hint-request.schema.d.ts +1 -0
- package/build/v1/page-hints/schemas/create-hint-request.schema.js +9 -2
- package/build/v1/page-hints/schemas/update-hint-request.schema.d.ts +1 -0
- package/build/v1/page-hints/schemas/update-hint-request.schema.js +11 -2
- package/build/v1/s2s/index.d.ts +5 -0
- package/build/v1/s2s/index.js +24 -0
- package/build/v1/s2s/queries/get-user-by-session.query.d.ts +15 -0
- package/build/v1/s2s/queries/get-user-by-session.query.js +14 -0
- package/build/v1/s2s/queries/index.d.ts +1 -0
- package/build/v1/s2s/queries/index.js +17 -0
- package/build/v1/s2s/s2s.errors.d.ts +8 -0
- package/build/v1/s2s/s2s.errors.js +28 -0
- package/build/v1/s2s/schemas/index.d.ts +2 -0
- package/build/v1/s2s/schemas/index.js +18 -0
- package/build/v1/s2s/schemas/s2s-user-response.schema.d.ts +9 -0
- package/build/v1/s2s/schemas/s2s-user-response.schema.js +12 -0
- package/build/v1/s2s/schemas/session-id-param.schema.d.ts +8 -0
- package/build/v1/s2s/schemas/session-id-param.schema.js +13 -0
- package/build/v1/seo-pages/schemas/create-page-request.schema.d.ts +1 -0
- package/build/v1/seo-pages/schemas/create-page-request.schema.js +43 -16
- package/build/v1/seo-pages/schemas/faq.schema.d.ts +2 -0
- package/build/v1/seo-pages/schemas/faq.schema.js +11 -3
- package/build/v1/seo-pages/schemas/update-page-request.schema.d.ts +1 -0
- package/build/v1/seo-pages/schemas/update-page-request.schema.js +40 -15
- package/build/v1/unregistered-users/schemas/authenticate-request.schema.d.ts +2 -0
- package/build/v1/unregistered-users/schemas/authenticate-request.schema.js +6 -4
- package/build/v1/users/commands/email-change-start.command.d.ts +1 -1
- package/build/v1/users/schemas/change-password-request.schema.d.ts +1 -1
- package/build/v1/users/schemas/change-password-request.schema.js +9 -3
- package/build/v1/users/schemas/delete-account-start-request.schema.d.ts +4 -0
- package/build/v1/users/schemas/delete-account-start-request.schema.js +7 -1
- package/build/v1/users/schemas/email-change-start-request.schema.d.ts +5 -1
- package/build/v1/users/schemas/email-change-start-request.schema.js +7 -1
- package/build/v1/users/schemas/password-change-complete-request.schema.d.ts +4 -0
- package/build/v1/users/schemas/password-change-complete-request.schema.js +10 -2
- package/build/v1/users/schemas/password-change-start-request.schema.d.ts +4 -0
- package/build/v1/users/schemas/password-change-start-request.schema.js +7 -1
- package/build/v1/users/schemas/toggle-marketing-consent-request.schema.d.ts +1 -0
- package/build/v1/users/schemas/toggle-marketing-consent-request.schema.js +4 -1
- package/build/v1/users/schemas/update-profile-request.schema.d.ts +1 -1
- package/build/v1/users/schemas/update-profile-request.schema.js +5 -2
- package/build/v1/verification/schemas/verification-complete-request.schema.d.ts +4 -0
- package/build/v1/verification/schemas/verification-complete-request.schema.js +7 -1
- package/build/v1/verification/schemas/verification-resend-request.schema.d.ts +4 -0
- package/build/v1/verification/schemas/verification-resend-request.schema.js +10 -2
- package/build/v1/verification/schemas/verification-verify-request.schema.d.ts +4 -0
- package/build/v1/verification/schemas/verification-verify-request.schema.js +13 -3
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
/**
|
|
3
3
|
* Schema for UUID route parameter validation
|
|
4
4
|
* Used in admin endpoints: GET /posts/:uuid, DELETE /posts/:uuid, etc.
|
|
5
|
+
* Error messages: UuidParam.{field}.{rule}
|
|
5
6
|
*/
|
|
6
7
|
export declare const UuidParamSchema: z.ZodObject<{
|
|
7
8
|
uuid: z.ZodString;
|
|
@@ -9,6 +10,7 @@ export declare const UuidParamSchema: z.ZodObject<{
|
|
|
9
10
|
/**
|
|
10
11
|
* Schema for alias route parameter validation
|
|
11
12
|
* Used in public endpoints: GET /posts/:alias
|
|
13
|
+
* Error messages: AliasParam.{field}.{rule}
|
|
12
14
|
*/
|
|
13
15
|
export declare const AliasParamSchema: z.ZodObject<{
|
|
14
16
|
alias: z.ZodString;
|
|
@@ -6,18 +6,22 @@ const regex_1 = require("../../../shared/regex");
|
|
|
6
6
|
/**
|
|
7
7
|
* Schema for UUID route parameter validation
|
|
8
8
|
* Used in admin endpoints: GET /posts/:uuid, DELETE /posts/:uuid, etc.
|
|
9
|
+
* Error messages: UuidParam.{field}.{rule}
|
|
9
10
|
*/
|
|
10
11
|
exports.UuidParamSchema = zod_1.z.object({
|
|
11
|
-
uuid: zod_1.z
|
|
12
|
+
uuid: zod_1.z
|
|
13
|
+
.string({ error: 'UuidParam.uuid.required' })
|
|
14
|
+
.uuid({ message: 'UuidParam.uuid.invalid' }),
|
|
12
15
|
});
|
|
13
16
|
/**
|
|
14
17
|
* Schema for alias route parameter validation
|
|
15
18
|
* Used in public endpoints: GET /posts/:alias
|
|
19
|
+
* Error messages: AliasParam.{field}.{rule}
|
|
16
20
|
*/
|
|
17
21
|
exports.AliasParamSchema = zod_1.z.object({
|
|
18
22
|
alias: zod_1.z
|
|
19
|
-
.string()
|
|
20
|
-
.min(1, { message: '
|
|
21
|
-
.max(200, { message: '
|
|
22
|
-
.regex(regex_1.SLUG_REGEX, { message: '
|
|
23
|
+
.string({ error: 'AliasParam.alias.required' })
|
|
24
|
+
.min(1, { message: 'AliasParam.alias.min' })
|
|
25
|
+
.max(200, { message: 'AliasParam.alias.max' })
|
|
26
|
+
.regex(regex_1.SLUG_REGEX, { message: 'AliasParam.alias.invalid' }),
|
|
23
27
|
});
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { BlogCategoryStatus } from './blog-category-status.enum';
|
|
3
|
+
/**
|
|
4
|
+
* Update Category Request Schema
|
|
5
|
+
* Error messages: UpdateCategoryRequest.{field}.{rule}
|
|
6
|
+
*/
|
|
3
7
|
export declare const UpdateCategoryRequestSchema: z.ZodObject<{
|
|
4
8
|
alias: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
5
9
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -4,9 +4,23 @@ exports.UpdateCategoryRequestSchema = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const regex_1 = require("../../../shared/regex");
|
|
6
6
|
const blog_category_status_enum_1 = require("./blog-category-status.enum");
|
|
7
|
+
/**
|
|
8
|
+
* Update Category Request Schema
|
|
9
|
+
* Error messages: UpdateCategoryRequest.{field}.{rule}
|
|
10
|
+
*/
|
|
7
11
|
exports.UpdateCategoryRequestSchema = zod_1.z.object({
|
|
8
|
-
alias: zod_1.z
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
alias: zod_1.z
|
|
13
|
+
.string()
|
|
14
|
+
.min(1, { message: 'UpdateCategoryRequest.alias.min' })
|
|
15
|
+
.max(100, { message: 'UpdateCategoryRequest.alias.max' })
|
|
16
|
+
.regex(regex_1.SLUG_REGEX, { message: 'UpdateCategoryRequest.alias.invalid' })
|
|
17
|
+
.transform((val) => val.toLowerCase().trim())
|
|
18
|
+
.optional(),
|
|
19
|
+
title: zod_1.z
|
|
20
|
+
.string()
|
|
21
|
+
.min(1, { message: 'UpdateCategoryRequest.title.min' })
|
|
22
|
+
.max(200, { message: 'UpdateCategoryRequest.title.max' })
|
|
23
|
+
.optional(),
|
|
24
|
+
order: zod_1.z.number().int().nonnegative({ message: 'UpdateCategoryRequest.order.invalid' }).optional(),
|
|
11
25
|
status: zod_1.z.nativeEnum(blog_category_status_enum_1.BlogCategoryStatus).optional(),
|
|
12
26
|
});
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { BlogPostStatus } from './blog-post-status.enum';
|
|
3
3
|
import { BlogPostMark } from './blog-post-mark.enum';
|
|
4
|
+
/**
|
|
5
|
+
* Update Post Request Schema
|
|
6
|
+
* Error messages: UpdatePostRequest.{field}.{rule}
|
|
7
|
+
*/
|
|
4
8
|
export declare const UpdatePostRequestSchema: z.ZodObject<{
|
|
5
9
|
alias: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
6
10
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -5,28 +5,67 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const regex_1 = require("../../../shared/regex");
|
|
6
6
|
const blog_post_status_enum_1 = require("./blog-post-status.enum");
|
|
7
7
|
const blog_post_mark_enum_1 = require("./blog-post-mark.enum");
|
|
8
|
+
/**
|
|
9
|
+
* Update Post Request Schema
|
|
10
|
+
* Error messages: UpdatePostRequest.{field}.{rule}
|
|
11
|
+
*/
|
|
8
12
|
exports.UpdatePostRequestSchema = zod_1.z
|
|
9
13
|
.object({
|
|
10
14
|
alias: zod_1.z
|
|
11
15
|
.string()
|
|
12
|
-
.min(1)
|
|
13
|
-
.max(200)
|
|
14
|
-
.regex(regex_1.SLUG_REGEX)
|
|
16
|
+
.min(1, { message: 'UpdatePostRequest.alias.min' })
|
|
17
|
+
.max(200, { message: 'UpdatePostRequest.alias.max' })
|
|
18
|
+
.regex(regex_1.SLUG_REGEX, { message: 'UpdatePostRequest.alias.invalid' })
|
|
15
19
|
.transform((val) => val.toLowerCase().trim())
|
|
16
20
|
.optional(),
|
|
17
|
-
title: zod_1.z
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
title: zod_1.z
|
|
22
|
+
.string()
|
|
23
|
+
.min(1, { message: 'UpdatePostRequest.title.min' })
|
|
24
|
+
.max(300, { message: 'UpdatePostRequest.title.max' })
|
|
25
|
+
.optional(),
|
|
26
|
+
description: zod_1.z.string().max(1000, { message: 'UpdatePostRequest.description.max' }).optional(),
|
|
27
|
+
metaTitle: zod_1.z
|
|
28
|
+
.string()
|
|
29
|
+
.min(1, { message: 'UpdatePostRequest.metaTitle.min' })
|
|
30
|
+
.max(100, { message: 'UpdatePostRequest.metaTitle.max' })
|
|
31
|
+
.optional(),
|
|
32
|
+
metaDescription: zod_1.z
|
|
33
|
+
.string()
|
|
34
|
+
.min(1, { message: 'UpdatePostRequest.metaDescription.min' })
|
|
35
|
+
.max(200, { message: 'UpdatePostRequest.metaDescription.max' })
|
|
36
|
+
.optional(),
|
|
37
|
+
content: zod_1.z
|
|
38
|
+
.string()
|
|
39
|
+
.min(1, { message: 'UpdatePostRequest.content.min' })
|
|
40
|
+
.max(1000000, { message: 'UpdatePostRequest.content.max' })
|
|
41
|
+
.optional(),
|
|
42
|
+
image: zod_1.z.string().url({ message: 'UpdatePostRequest.image.invalid' }).optional(),
|
|
43
|
+
author: zod_1.z
|
|
44
|
+
.string()
|
|
45
|
+
.min(1, { message: 'UpdatePostRequest.author.min' })
|
|
46
|
+
.max(100, { message: 'UpdatePostRequest.author.max' })
|
|
47
|
+
.optional(),
|
|
48
|
+
categoryIds: zod_1.z
|
|
49
|
+
.array(zod_1.z.string().regex(regex_1.UUID_REGEX, { message: 'UpdatePostRequest.categoryIds.invalidUuid' }))
|
|
50
|
+
.min(1, { message: 'UpdatePostRequest.categoryIds.min' })
|
|
51
|
+
.optional(),
|
|
25
52
|
status: zod_1.z.nativeEnum(blog_post_status_enum_1.BlogPostStatus).optional(),
|
|
26
|
-
pageId: zod_1.z
|
|
53
|
+
pageId: zod_1.z
|
|
54
|
+
.string()
|
|
55
|
+
.regex(regex_1.UUID_REGEX, { message: 'UpdatePostRequest.pageId.invalidUuid' })
|
|
56
|
+
.nullable()
|
|
57
|
+
.optional(),
|
|
27
58
|
marks: zod_1.z.array(zod_1.z.nativeEnum(blog_post_mark_enum_1.BlogPostMark)).optional(),
|
|
28
|
-
aiWidgetPlaceholder: zod_1.z
|
|
29
|
-
|
|
59
|
+
aiWidgetPlaceholder: zod_1.z
|
|
60
|
+
.string()
|
|
61
|
+
.max(500, { message: 'UpdatePostRequest.aiWidgetPlaceholder.max' })
|
|
62
|
+
.nullable()
|
|
63
|
+
.optional(),
|
|
64
|
+
aiWidgetPrompt: zod_1.z
|
|
65
|
+
.string()
|
|
66
|
+
.max(2000, { message: 'UpdatePostRequest.aiWidgetPrompt.max' })
|
|
67
|
+
.nullable()
|
|
68
|
+
.optional(),
|
|
30
69
|
})
|
|
31
70
|
.refine((data) => {
|
|
32
71
|
if (data.marks?.includes(blog_post_mark_enum_1.BlogPostMark.AI_WIDGET)) {
|
|
@@ -34,5 +73,5 @@ exports.UpdatePostRequestSchema = zod_1.z
|
|
|
34
73
|
}
|
|
35
74
|
return true;
|
|
36
75
|
}, {
|
|
37
|
-
message: '
|
|
76
|
+
message: 'UpdatePostRequest.aiWidgetRequired',
|
|
38
77
|
});
|
|
@@ -28,9 +28,12 @@ export declare namespace CreateRegChatCommand {
|
|
|
28
28
|
content: z.ZodString;
|
|
29
29
|
details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
30
30
|
type: z.ZodString;
|
|
31
|
-
text: z.ZodString
|
|
31
|
+
text: z.ZodOptional<z.ZodString>;
|
|
32
32
|
format: z.ZodOptional<z.ZodString>;
|
|
33
33
|
index: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
id: z.ZodOptional<z.ZodString>;
|
|
35
|
+
data: z.ZodOptional<z.ZodString>;
|
|
36
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
34
37
|
}, z.core.$strip>>>;
|
|
35
38
|
}, z.core.$strip>>;
|
|
36
39
|
}, z.core.$strip>>;
|
|
@@ -26,9 +26,12 @@ export declare namespace CreateUnregChatCommand {
|
|
|
26
26
|
content: z.ZodString;
|
|
27
27
|
details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
28
28
|
type: z.ZodString;
|
|
29
|
-
text: z.ZodString
|
|
29
|
+
text: z.ZodOptional<z.ZodString>;
|
|
30
30
|
format: z.ZodOptional<z.ZodString>;
|
|
31
31
|
index: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
id: z.ZodOptional<z.ZodString>;
|
|
33
|
+
data: z.ZodOptional<z.ZodString>;
|
|
34
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
32
35
|
}, z.core.$strip>>>;
|
|
33
36
|
}, z.core.$strip>>;
|
|
34
37
|
}, z.core.$strip>>;
|
|
@@ -28,9 +28,12 @@ export declare namespace UpdateChatTitleCommand {
|
|
|
28
28
|
content: z.ZodString;
|
|
29
29
|
details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
30
30
|
type: z.ZodString;
|
|
31
|
-
text: z.ZodString
|
|
31
|
+
text: z.ZodOptional<z.ZodString>;
|
|
32
32
|
format: z.ZodOptional<z.ZodString>;
|
|
33
33
|
index: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
id: z.ZodOptional<z.ZodString>;
|
|
35
|
+
data: z.ZodOptional<z.ZodString>;
|
|
36
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
34
37
|
}, z.core.$strip>>>;
|
|
35
38
|
}, z.core.$strip>>;
|
|
36
39
|
}, z.core.$strip>>;
|
|
@@ -29,9 +29,12 @@ export declare namespace UpdateChatCommand {
|
|
|
29
29
|
content: z.ZodString;
|
|
30
30
|
details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
31
31
|
type: z.ZodString;
|
|
32
|
-
text: z.ZodString
|
|
32
|
+
text: z.ZodOptional<z.ZodString>;
|
|
33
33
|
format: z.ZodOptional<z.ZodString>;
|
|
34
34
|
index: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
id: z.ZodOptional<z.ZodString>;
|
|
36
|
+
data: z.ZodOptional<z.ZodString>;
|
|
37
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
35
38
|
}, z.core.$strip>>>;
|
|
36
39
|
}, z.core.$strip>>;
|
|
37
40
|
}, z.core.$strip>>;
|
|
@@ -26,9 +26,12 @@ export declare namespace GetLastActiveChatQuery {
|
|
|
26
26
|
content: z.ZodString;
|
|
27
27
|
details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
28
28
|
type: z.ZodString;
|
|
29
|
-
text: z.ZodString
|
|
29
|
+
text: z.ZodOptional<z.ZodString>;
|
|
30
30
|
format: z.ZodOptional<z.ZodString>;
|
|
31
31
|
index: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
id: z.ZodOptional<z.ZodString>;
|
|
33
|
+
data: z.ZodOptional<z.ZodString>;
|
|
34
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
32
35
|
}, z.core.$strip>>>;
|
|
33
36
|
}, z.core.$strip>>;
|
|
34
37
|
}, z.core.$strip>>;
|
|
@@ -26,9 +26,12 @@ export declare namespace GetRegChatQuery {
|
|
|
26
26
|
content: z.ZodString;
|
|
27
27
|
details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
28
28
|
type: z.ZodString;
|
|
29
|
-
text: z.ZodString
|
|
29
|
+
text: z.ZodOptional<z.ZodString>;
|
|
30
30
|
format: z.ZodOptional<z.ZodString>;
|
|
31
31
|
index: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
id: z.ZodOptional<z.ZodString>;
|
|
33
|
+
data: z.ZodOptional<z.ZodString>;
|
|
34
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
32
35
|
}, z.core.$strip>>>;
|
|
33
36
|
}, z.core.$strip>>;
|
|
34
37
|
}, z.core.$strip>>;
|
|
@@ -26,9 +26,12 @@ export declare namespace GetUnregChatQuery {
|
|
|
26
26
|
content: z.ZodString;
|
|
27
27
|
details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
28
28
|
type: z.ZodString;
|
|
29
|
-
text: z.ZodString
|
|
29
|
+
text: z.ZodOptional<z.ZodString>;
|
|
30
30
|
format: z.ZodOptional<z.ZodString>;
|
|
31
31
|
index: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
id: z.ZodOptional<z.ZodString>;
|
|
33
|
+
data: z.ZodOptional<z.ZodString>;
|
|
34
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
32
35
|
}, z.core.$strip>>>;
|
|
33
36
|
}, z.core.$strip>>;
|
|
34
37
|
}, z.core.$strip>>;
|
|
@@ -49,6 +49,7 @@ export declare const ChatPeriodSchema: z.ZodObject<{
|
|
|
49
49
|
export type ChatPeriodDto = z.infer<typeof ChatPeriodSchema>;
|
|
50
50
|
/**
|
|
51
51
|
* Get Chat History Request Schema
|
|
52
|
+
* Error messages: GetChatHistoryRequest.{field}.{rule}
|
|
52
53
|
*/
|
|
53
54
|
export declare const GetChatHistoryRequestSchema: z.ZodObject<{
|
|
54
55
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
@@ -60,9 +60,15 @@ exports.ChatPeriodSchema = zod_1.z.object({
|
|
|
60
60
|
});
|
|
61
61
|
/**
|
|
62
62
|
* Get Chat History Request Schema
|
|
63
|
+
* Error messages: GetChatHistoryRequest.{field}.{rule}
|
|
63
64
|
*/
|
|
64
65
|
exports.GetChatHistoryRequestSchema = zod_1.z.object({
|
|
65
|
-
limit: zod_1.z.coerce
|
|
66
|
+
limit: zod_1.z.coerce
|
|
67
|
+
.number()
|
|
68
|
+
.int({ message: 'GetChatHistoryRequest.limit.invalid' })
|
|
69
|
+
.min(1, { message: 'GetChatHistoryRequest.limit.min' })
|
|
70
|
+
.max(100, { message: 'GetChatHistoryRequest.limit.max' })
|
|
71
|
+
.default(20),
|
|
66
72
|
cursor: zod_1.z.string().optional(),
|
|
67
73
|
});
|
|
68
74
|
/**
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ChatIdParamSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* Chat ID Param Schema
|
|
7
|
+
* Error messages: ChatIdParam.{field}.{rule}
|
|
8
|
+
*/
|
|
5
9
|
exports.ChatIdParamSchema = zod_1.z.object({
|
|
6
|
-
chatId: zod_1.z
|
|
10
|
+
chatId: zod_1.z
|
|
11
|
+
.string({ error: 'ChatIdParam.chatId.required' })
|
|
12
|
+
.uuid({ message: 'ChatIdParam.chatId.invalid' }),
|
|
7
13
|
});
|
|
@@ -20,9 +20,12 @@ export declare const ChatWithMessagesResponseSchema: z.ZodObject<{
|
|
|
20
20
|
content: z.ZodString;
|
|
21
21
|
details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
22
22
|
type: z.ZodString;
|
|
23
|
-
text: z.ZodString
|
|
23
|
+
text: z.ZodOptional<z.ZodString>;
|
|
24
24
|
format: z.ZodOptional<z.ZodString>;
|
|
25
25
|
index: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
id: z.ZodOptional<z.ZodString>;
|
|
27
|
+
data: z.ZodOptional<z.ZodString>;
|
|
28
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
26
29
|
}, z.core.$strip>>>;
|
|
27
30
|
}, z.core.$strip>>;
|
|
28
31
|
}, z.core.$strip>>;
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CreateChatRequestSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* Create Chat Request Schema
|
|
7
|
+
* Error messages: CreateChatRequest.{field}.{rule}
|
|
8
|
+
*/
|
|
5
9
|
exports.CreateChatRequestSchema = zod_1.z.object({
|
|
6
|
-
folderId: zod_1.z.string().uuid().optional(),
|
|
10
|
+
folderId: zod_1.z.string().uuid({ message: 'CreateChatRequest.folderId.invalid' }).optional(),
|
|
7
11
|
});
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PageIdParamSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* Page ID Param Schema
|
|
7
|
+
* Error messages: PageIdParam.{field}.{rule}
|
|
8
|
+
*/
|
|
5
9
|
exports.PageIdParamSchema = zod_1.z.object({
|
|
6
|
-
pageId: zod_1.z
|
|
10
|
+
pageId: zod_1.z
|
|
11
|
+
.string({ error: 'PageIdParam.pageId.required' })
|
|
12
|
+
.uuid({ message: 'PageIdParam.pageId.invalid' }),
|
|
7
13
|
});
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Update Chat Request Schema
|
|
4
|
+
* Error messages: UpdateChatRequest.{field}.{rule}
|
|
5
|
+
*/
|
|
2
6
|
export declare const UpdateChatRequestSchema: z.ZodObject<{
|
|
3
7
|
title: z.ZodOptional<z.ZodString>;
|
|
4
8
|
folderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -2,7 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UpdateChatRequestSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* Update Chat Request Schema
|
|
7
|
+
* Error messages: UpdateChatRequest.{field}.{rule}
|
|
8
|
+
*/
|
|
5
9
|
exports.UpdateChatRequestSchema = zod_1.z.object({
|
|
6
|
-
title: zod_1.z
|
|
7
|
-
|
|
10
|
+
title: zod_1.z
|
|
11
|
+
.string()
|
|
12
|
+
.min(1, { message: 'UpdateChatRequest.title.min' })
|
|
13
|
+
.max(40, { message: 'UpdateChatRequest.title.max' })
|
|
14
|
+
.optional(),
|
|
15
|
+
folderId: zod_1.z.string().uuid({ message: 'UpdateChatRequest.folderId.invalid' }).nullable().optional(),
|
|
8
16
|
});
|
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UpdateChatTitleRequestSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* Update Chat Title Request Schema
|
|
7
|
+
* Error messages: UpdateChatTitleRequest.{field}.{rule}
|
|
8
|
+
*/
|
|
5
9
|
exports.UpdateChatTitleRequestSchema = zod_1.z.object({
|
|
6
|
-
title: zod_1.z
|
|
10
|
+
title: zod_1.z
|
|
11
|
+
.string({ error: 'UpdateChatTitleRequest.title.required' })
|
|
12
|
+
.min(1, { message: 'UpdateChatTitleRequest.title.min' })
|
|
13
|
+
.max(40, { message: 'UpdateChatTitleRequest.title.max' }),
|
|
7
14
|
});
|
|
@@ -5,8 +5,14 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const shared_1 = require("../../../shared");
|
|
6
6
|
/**
|
|
7
7
|
* Create Chat Project Request Schema
|
|
8
|
+
* Error messages: CreateProjectRequest.{field}.{rule}
|
|
8
9
|
*/
|
|
9
10
|
exports.CreateProjectRequestSchema = zod_1.z.object({
|
|
10
|
-
title: zod_1.z
|
|
11
|
-
|
|
11
|
+
title: zod_1.z
|
|
12
|
+
.string({ error: 'CreateProjectRequest.title.required' })
|
|
13
|
+
.min(1, { message: 'CreateProjectRequest.title.min' })
|
|
14
|
+
.max(100, { message: 'CreateProjectRequest.title.max' }),
|
|
15
|
+
color: zod_1.z
|
|
16
|
+
.string({ error: 'CreateProjectRequest.color.required' })
|
|
17
|
+
.regex(shared_1.HEX_COLOR_REGEX, { message: 'CreateProjectRequest.color.invalid' }),
|
|
12
18
|
});
|
|
@@ -11,6 +11,7 @@ export declare const ProjectChatItemSchema: z.ZodObject<{
|
|
|
11
11
|
export type ProjectChatItemDto = z.infer<typeof ProjectChatItemSchema>;
|
|
12
12
|
/**
|
|
13
13
|
* Get Project Chats Request Schema
|
|
14
|
+
* Error messages: GetProjectChatsRequest.{field}.{rule}
|
|
14
15
|
*/
|
|
15
16
|
export declare const GetProjectChatsRequestSchema: z.ZodObject<{
|
|
16
17
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
@@ -13,9 +13,15 @@ exports.ProjectChatItemSchema = zod_1.z.object({
|
|
|
13
13
|
});
|
|
14
14
|
/**
|
|
15
15
|
* Get Project Chats Request Schema
|
|
16
|
+
* Error messages: GetProjectChatsRequest.{field}.{rule}
|
|
16
17
|
*/
|
|
17
18
|
exports.GetProjectChatsRequestSchema = zod_1.z.object({
|
|
18
|
-
limit: zod_1.z.coerce
|
|
19
|
+
limit: zod_1.z.coerce
|
|
20
|
+
.number()
|
|
21
|
+
.int({ message: 'GetProjectChatsRequest.limit.invalid' })
|
|
22
|
+
.min(1, { message: 'GetProjectChatsRequest.limit.min' })
|
|
23
|
+
.max(100, { message: 'GetProjectChatsRequest.limit.max' })
|
|
24
|
+
.default(20),
|
|
19
25
|
cursor: zod_1.z.string().optional(),
|
|
20
26
|
});
|
|
21
27
|
/**
|
|
@@ -5,7 +5,10 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const shared_1 = require("../../../shared");
|
|
6
6
|
/**
|
|
7
7
|
* Project UUID param schema for route validation
|
|
8
|
+
* Error messages: ProjectUuidParam.{field}.{rule}
|
|
8
9
|
*/
|
|
9
10
|
exports.ProjectUuidParamSchema = zod_1.z.object({
|
|
10
|
-
uuid: zod_1.z
|
|
11
|
+
uuid: zod_1.z
|
|
12
|
+
.string({ error: 'ProjectUuidParam.uuid.required' })
|
|
13
|
+
.regex(shared_1.UUID_REGEX, { message: 'ProjectUuidParam.uuid.invalid' }),
|
|
11
14
|
});
|
|
@@ -5,8 +5,16 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const shared_1 = require("../../../shared");
|
|
6
6
|
/**
|
|
7
7
|
* Update Chat Project Request Schema
|
|
8
|
+
* Error messages: UpdateProjectRequest.{field}.{rule}
|
|
8
9
|
*/
|
|
9
10
|
exports.UpdateProjectRequestSchema = zod_1.z.object({
|
|
10
|
-
title: zod_1.z
|
|
11
|
-
|
|
11
|
+
title: zod_1.z
|
|
12
|
+
.string()
|
|
13
|
+
.min(1, { message: 'UpdateProjectRequest.title.min' })
|
|
14
|
+
.max(100, { message: 'UpdateProjectRequest.title.max' })
|
|
15
|
+
.optional(),
|
|
16
|
+
color: zod_1.z
|
|
17
|
+
.string()
|
|
18
|
+
.regex(shared_1.HEX_COLOR_REGEX, { message: 'UpdateProjectRequest.color.invalid' })
|
|
19
|
+
.optional(),
|
|
12
20
|
});
|
|
@@ -4,7 +4,10 @@ exports.DeleteFileByKeyQuerySchema = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
/**
|
|
6
6
|
* Delete file by key query parameters schema
|
|
7
|
+
* Error messages: DeleteFileByKeyQuery.{field}.{rule}
|
|
7
8
|
*/
|
|
8
9
|
exports.DeleteFileByKeyQuerySchema = zod_1.z.object({
|
|
9
|
-
key: zod_1.z
|
|
10
|
+
key: zod_1.z
|
|
11
|
+
.string({ error: 'DeleteFileByKeyQuery.key.required' })
|
|
12
|
+
.min(1, { message: 'DeleteFileByKeyQuery.key.min' }),
|
|
10
13
|
});
|
|
@@ -3,6 +3,7 @@ import { FileStatus } from './file-status.enum';
|
|
|
3
3
|
import { FileCategory } from './file-category.enum';
|
|
4
4
|
/**
|
|
5
5
|
* List files query parameters schema
|
|
6
|
+
* Error messages: ListFilesQuery.{field}.{rule}
|
|
6
7
|
*/
|
|
7
8
|
export declare const ListFilesQuerySchema: z.ZodObject<{
|
|
8
9
|
folder: z.ZodOptional<z.ZodString>;
|
|
@@ -6,12 +6,22 @@ const file_status_enum_1 = require("./file-status.enum");
|
|
|
6
6
|
const file_category_enum_1 = require("./file-category.enum");
|
|
7
7
|
/**
|
|
8
8
|
* List files query parameters schema
|
|
9
|
+
* Error messages: ListFilesQuery.{field}.{rule}
|
|
9
10
|
*/
|
|
10
11
|
exports.ListFilesQuerySchema = zod_1.z.object({
|
|
11
12
|
folder: zod_1.z.string().optional(),
|
|
12
13
|
status: zod_1.z.enum(file_status_enum_1.FileStatus).optional(),
|
|
13
14
|
category: zod_1.z.enum(file_category_enum_1.FileCategory).optional(),
|
|
14
15
|
uploadedBy: zod_1.z.string().optional(),
|
|
15
|
-
page: zod_1.z.coerce
|
|
16
|
-
|
|
16
|
+
page: zod_1.z.coerce
|
|
17
|
+
.number()
|
|
18
|
+
.int({ message: 'ListFilesQuery.page.invalid' })
|
|
19
|
+
.positive({ message: 'ListFilesQuery.page.invalid' })
|
|
20
|
+
.default(1),
|
|
21
|
+
limit: zod_1.z.coerce
|
|
22
|
+
.number()
|
|
23
|
+
.int({ message: 'ListFilesQuery.limit.invalid' })
|
|
24
|
+
.positive({ message: 'ListFilesQuery.limit.invalid' })
|
|
25
|
+
.max(100, { message: 'ListFilesQuery.limit.max' })
|
|
26
|
+
.default(20),
|
|
17
27
|
});
|