@veruna/api-contracts 1.0.52 → 1.0.55
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/telegram-auth.controllers.d.ts +4 -0
- package/build/controllers/telegram-auth.controllers.js +7 -0
- package/build/routes/index.d.ts +1 -0
- package/build/routes/index.js +3 -1
- package/build/routes/telegram-auth.routes.d.ts +9 -0
- package/build/routes/telegram-auth.routes.js +12 -0
- package/build/shared/common.errors.d.ts +2 -1
- package/build/shared/common.errors.js +5 -0
- package/build/v1/auth/commands/signin.command.d.ts +1 -0
- package/build/v1/auth/commands/signup.command.d.ts +1 -0
- package/build/v1/auth/schemas/auth-response.schema.d.ts +1 -0
- package/build/v1/chat/commands/create-reg-chat.command.d.ts +7 -0
- package/build/v1/chat/commands/create-unreg-chat.command.d.ts +7 -0
- package/build/v1/chat/commands/update-chat-title.command.d.ts +7 -0
- package/build/v1/chat/commands/update-chat.command.d.ts +7 -0
- package/build/v1/chat/queries/get-last-active-chat.query.d.ts +7 -0
- package/build/v1/chat/queries/get-reg-chat.query.d.ts +7 -0
- package/build/v1/chat/queries/get-unreg-chat.query.d.ts +7 -0
- package/build/v1/chat/schemas/chat-with-messages-response.schema.d.ts +7 -0
- package/build/v1/index.d.ts +2 -0
- package/build/v1/index.js +2 -0
- package/build/v1/message/commands/create-message.command.d.ts +21 -2
- package/build/v1/message/message.errors.d.ts +3 -1
- package/build/v1/message/message.errors.js +10 -0
- package/build/v1/message/schemas/citation.schema.d.ts +12 -0
- package/build/v1/message/schemas/citation.schema.js +19 -0
- package/build/v1/message/schemas/index.d.ts +2 -1
- package/build/v1/message/schemas/index.js +4 -1
- package/build/v1/message/schemas/message-meta.schema.d.ts +7 -0
- package/build/v1/message/schemas/message-meta.schema.js +3 -0
- package/build/v1/message/schemas/message-response.schema.d.ts +7 -0
- package/build/v1/message/schemas/stream-events.schema.d.ts +51 -2
- package/build/v1/message/schemas/stream-events.schema.js +27 -3
- package/build/v1/telegram-auth/commands/index.d.ts +1 -0
- package/build/v1/telegram-auth/commands/index.js +2 -0
- package/build/v1/telegram-auth/index.d.ts +6 -0
- package/build/v1/telegram-auth/index.js +26 -0
- package/build/v1/telegram-auth/queries/index.d.ts +1 -0
- package/build/v1/telegram-auth/queries/index.js +2 -0
- package/build/v1/telegram-auth/schemas/index.d.ts +5 -0
- package/build/v1/telegram-auth/schemas/index.js +21 -0
- package/build/v1/telegram-auth/schemas/telegram-auth-exchange-request.schema.d.ts +5 -0
- package/build/v1/telegram-auth/schemas/telegram-auth-exchange-request.schema.js +9 -0
- package/build/v1/telegram-auth/schemas/telegram-auth-exchange-response.schema.d.ts +6 -0
- package/build/v1/telegram-auth/schemas/telegram-auth-exchange-response.schema.js +8 -0
- package/build/v1/telegram-auth/schemas/telegram-auth-init-response.schema.d.ts +7 -0
- package/build/v1/telegram-auth/schemas/telegram-auth-init-response.schema.js +9 -0
- package/build/v1/telegram-auth/schemas/telegram-auth-status-response.schema.d.ts +6 -0
- package/build/v1/telegram-auth/schemas/telegram-auth-status-response.schema.js +8 -0
- package/build/v1/telegram-auth/schemas/telegram-auth-status.enum.d.ts +6 -0
- package/build/v1/telegram-auth/schemas/telegram-auth-status.enum.js +10 -0
- package/build/v1/telegram-auth/telegram-auth.errors.d.ts +10 -0
- package/build/v1/telegram-auth/telegram-auth.errors.js +38 -0
- package/build/v1/telegram-profile/index.d.ts +1 -0
- package/build/v1/telegram-profile/index.js +17 -0
- package/build/v1/telegram-profile/telegram-profile.errors.d.ts +5 -0
- package/build/v1/telegram-profile/telegram-profile.errors.js +13 -0
- package/build/v1/users/commands/toggle-marketing-consent.command.d.ts +1 -0
- package/build/v1/users/commands/update-profile.command.d.ts +1 -0
- package/build/v1/users/queries/get-current-user.query.d.ts +1 -0
- package/build/v1/users/schemas/index.d.ts +1 -0
- package/build/v1/users/schemas/index.js +1 -0
- package/build/v1/users/schemas/register-type.enum.d.ts +7 -0
- package/build/v1/users/schemas/register-type.enum.js +11 -0
- package/build/v1/users/schemas/response-unions.schema.d.ts +3 -0
- package/build/v1/users/schemas/user-response.schema.d.ts +2 -0
- package/build/v1/users/schemas/user-response.schema.js +2 -0
- package/package.json +1 -1
|
@@ -17,3 +17,4 @@ export { SITEMAP_CONTROLLER } from './sitemap.controllers';
|
|
|
17
17
|
export { WALLET_CONTROLLER } from './wallet.controllers';
|
|
18
18
|
export { PAGE_HINTS_ADMIN_CONTROLLER } from './page-hints.controllers';
|
|
19
19
|
export { S2S_CONTROLLER } from './s2s.controllers';
|
|
20
|
+
export { TELEGRAM_AUTH_CONTROLLER } from './telegram-auth.controllers';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.S2S_CONTROLLER = exports.PAGE_HINTS_ADMIN_CONTROLLER = exports.WALLET_CONTROLLER = exports.SITEMAP_CONTROLLER = exports.VERIFICATION_CONTROLLER = exports.MESSAGE_REG_CONTROLLER = exports.MESSAGE_UNREG_CONTROLLER = exports.CHAT_HISTORY_CONTROLLER = exports.CHAT_REG_CONTROLLER = exports.CHAT_UNREG_CONTROLLER = exports.CHAT_PROJECT_CONTROLLER = exports.FILE_CONTROLLER = exports.AI_MODEL_UNREG_CONTROLLER = exports.AI_MODEL_PUBLIC_CONTROLLER = exports.AI_MODEL_ADMIN_CONTROLLER = exports.AI_PROVIDER_PUBLIC_CONTROLLER = exports.AI_PROVIDER_ADMIN_CONTROLLER = exports.SEO_PAGES_PUBLIC_CONTROLLER = exports.SEO_PAGES_ADMIN_CONTROLLER = exports.BLOG_PUBLIC_POSTS_CONTROLLER = exports.BLOG_PUBLIC_CATEGORIES_CONTROLLER = exports.BLOG_ADMIN_POSTS_CONTROLLER = exports.BLOG_ADMIN_CATEGORIES_CONTROLLER = exports.UNREG_USERS_CONTROLLER = exports.USERS_CONTROLLER = exports.AUTH_CONTROLLER = void 0;
|
|
3
|
+
exports.TELEGRAM_AUTH_CONTROLLER = exports.S2S_CONTROLLER = exports.PAGE_HINTS_ADMIN_CONTROLLER = exports.WALLET_CONTROLLER = exports.SITEMAP_CONTROLLER = exports.VERIFICATION_CONTROLLER = exports.MESSAGE_REG_CONTROLLER = exports.MESSAGE_UNREG_CONTROLLER = exports.CHAT_HISTORY_CONTROLLER = exports.CHAT_REG_CONTROLLER = exports.CHAT_UNREG_CONTROLLER = exports.CHAT_PROJECT_CONTROLLER = exports.FILE_CONTROLLER = exports.AI_MODEL_UNREG_CONTROLLER = exports.AI_MODEL_PUBLIC_CONTROLLER = exports.AI_MODEL_ADMIN_CONTROLLER = exports.AI_PROVIDER_PUBLIC_CONTROLLER = exports.AI_PROVIDER_ADMIN_CONTROLLER = exports.SEO_PAGES_PUBLIC_CONTROLLER = exports.SEO_PAGES_ADMIN_CONTROLLER = exports.BLOG_PUBLIC_POSTS_CONTROLLER = exports.BLOG_PUBLIC_CATEGORIES_CONTROLLER = exports.BLOG_ADMIN_POSTS_CONTROLLER = exports.BLOG_ADMIN_CATEGORIES_CONTROLLER = exports.UNREG_USERS_CONTROLLER = exports.USERS_CONTROLLER = exports.AUTH_CONTROLLER = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Centralized exports for all controllers
|
|
6
6
|
*/
|
|
@@ -46,3 +46,5 @@ var page_hints_controllers_1 = require("./page-hints.controllers");
|
|
|
46
46
|
Object.defineProperty(exports, "PAGE_HINTS_ADMIN_CONTROLLER", { enumerable: true, get: function () { return page_hints_controllers_1.PAGE_HINTS_ADMIN_CONTROLLER; } });
|
|
47
47
|
var s2s_controllers_1 = require("./s2s.controllers");
|
|
48
48
|
Object.defineProperty(exports, "S2S_CONTROLLER", { enumerable: true, get: function () { return s2s_controllers_1.S2S_CONTROLLER; } });
|
|
49
|
+
var telegram_auth_controllers_1 = require("./telegram-auth.controllers");
|
|
50
|
+
Object.defineProperty(exports, "TELEGRAM_AUTH_CONTROLLER", { enumerable: true, get: function () { return telegram_auth_controllers_1.TELEGRAM_AUTH_CONTROLLER; } });
|
package/build/routes/index.d.ts
CHANGED
|
@@ -23,3 +23,4 @@ export { SITEMAP_ROUTES } from './sitemap.routes';
|
|
|
23
23
|
export { WALLET_ROUTES } from './wallet.routes';
|
|
24
24
|
export { PAGE_HINTS_ROUTES } from './page-hints.routes';
|
|
25
25
|
export { S2S_ROUTES } from './s2s.routes';
|
|
26
|
+
export { TELEGRAM_AUTH_ROUTES } from './telegram-auth.routes';
|
package/build/routes/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.S2S_ROUTES = exports.PAGE_HINTS_ROUTES = exports.WALLET_ROUTES = exports.SITEMAP_ROUTES = exports.VERIFICATION_ROUTES = exports.MESSAGE_REG_ROUTES = exports.MESSAGE_UNREG_ROUTES = exports.CHAT_HISTORY_ROUTES = exports.CHAT_REG_ROUTES = exports.CHAT_UNREG_ROUTES = exports.CHAT_PROJECT_ROUTES = exports.FILE_ROUTES = exports.AI_MODEL_UNREG_ROUTES = exports.AI_MODEL_PUBLIC_ROUTES = exports.AI_MODEL_ADMIN_ROUTES = exports.AI_PROVIDER_PUBLIC_ROUTES = exports.AI_PROVIDER_ADMIN_ROUTES = exports.SEO_PAGES_PUBLIC_ROUTES = exports.SEO_PAGES_ADMIN_ROUTES = exports.BLOG_PUBLIC_POSTS_ROUTES = exports.BLOG_PUBLIC_CATEGORIES_ROUTES = exports.BLOG_ADMIN_POSTS_ROUTES = exports.BLOG_ADMIN_CATEGORIES_ROUTES = exports.UNREG_USERS_ROUTES = exports.USERS_ROUTES = exports.AUTH_ROUTES = void 0;
|
|
3
|
+
exports.TELEGRAM_AUTH_ROUTES = exports.S2S_ROUTES = exports.PAGE_HINTS_ROUTES = exports.WALLET_ROUTES = exports.SITEMAP_ROUTES = exports.VERIFICATION_ROUTES = exports.MESSAGE_REG_ROUTES = exports.MESSAGE_UNREG_ROUTES = exports.CHAT_HISTORY_ROUTES = exports.CHAT_REG_ROUTES = exports.CHAT_UNREG_ROUTES = exports.CHAT_PROJECT_ROUTES = exports.FILE_ROUTES = exports.AI_MODEL_UNREG_ROUTES = exports.AI_MODEL_PUBLIC_ROUTES = exports.AI_MODEL_ADMIN_ROUTES = exports.AI_PROVIDER_PUBLIC_ROUTES = exports.AI_PROVIDER_ADMIN_ROUTES = exports.SEO_PAGES_PUBLIC_ROUTES = exports.SEO_PAGES_ADMIN_ROUTES = exports.BLOG_PUBLIC_POSTS_ROUTES = exports.BLOG_PUBLIC_CATEGORIES_ROUTES = exports.BLOG_ADMIN_POSTS_ROUTES = exports.BLOG_ADMIN_CATEGORIES_ROUTES = exports.UNREG_USERS_ROUTES = exports.USERS_ROUTES = exports.AUTH_ROUTES = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Centralized exports for all routes
|
|
6
6
|
*/
|
|
@@ -52,3 +52,5 @@ var page_hints_routes_1 = require("./page-hints.routes");
|
|
|
52
52
|
Object.defineProperty(exports, "PAGE_HINTS_ROUTES", { enumerable: true, get: function () { return page_hints_routes_1.PAGE_HINTS_ROUTES; } });
|
|
53
53
|
var s2s_routes_1 = require("./s2s.routes");
|
|
54
54
|
Object.defineProperty(exports, "S2S_ROUTES", { enumerable: true, get: function () { return s2s_routes_1.S2S_ROUTES; } });
|
|
55
|
+
var telegram_auth_routes_1 = require("./telegram-auth.routes");
|
|
56
|
+
Object.defineProperty(exports, "TELEGRAM_AUTH_ROUTES", { enumerable: true, get: function () { return telegram_auth_routes_1.TELEGRAM_AUTH_ROUTES; } });
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TELEGRAM_AUTH_ROUTES = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Telegram Auth Routes
|
|
6
|
+
* For NestJS method decorators (@Get, @Post, etc.)
|
|
7
|
+
*/
|
|
8
|
+
exports.TELEGRAM_AUTH_ROUTES = {
|
|
9
|
+
INIT: 'init',
|
|
10
|
+
STATUS: 'status/:uuid',
|
|
11
|
+
EXCHANGE: 'exchange',
|
|
12
|
+
};
|
|
@@ -3,6 +3,7 @@ export declare enum CommonErrorCode {
|
|
|
3
3
|
INTERNAL_SERVER_ERROR = "INTERNAL_SERVER_ERROR",
|
|
4
4
|
VALIDATION_ERROR = "VALIDATION_ERROR",
|
|
5
5
|
DEVICE_NAME_EMPTY = "DEVICE_NAME_EMPTY",
|
|
6
|
-
USER_AGENT_EMPTY = "USER_AGENT_EMPTY"
|
|
6
|
+
USER_AGENT_EMPTY = "USER_AGENT_EMPTY",
|
|
7
|
+
RESOURCE_BUSY = "RESOURCE_BUSY"
|
|
7
8
|
}
|
|
8
9
|
export declare const COMMON_ERRORS: Record<CommonErrorCode, ErrorMetadata>;
|
|
@@ -7,6 +7,7 @@ var CommonErrorCode;
|
|
|
7
7
|
CommonErrorCode["VALIDATION_ERROR"] = "VALIDATION_ERROR";
|
|
8
8
|
CommonErrorCode["DEVICE_NAME_EMPTY"] = "DEVICE_NAME_EMPTY";
|
|
9
9
|
CommonErrorCode["USER_AGENT_EMPTY"] = "USER_AGENT_EMPTY";
|
|
10
|
+
CommonErrorCode["RESOURCE_BUSY"] = "RESOURCE_BUSY";
|
|
10
11
|
})(CommonErrorCode || (exports.CommonErrorCode = CommonErrorCode = {}));
|
|
11
12
|
exports.COMMON_ERRORS = {
|
|
12
13
|
[CommonErrorCode.INTERNAL_SERVER_ERROR]: {
|
|
@@ -25,4 +26,8 @@ exports.COMMON_ERRORS = {
|
|
|
25
26
|
code: CommonErrorCode.USER_AGENT_EMPTY,
|
|
26
27
|
statusCode: 400,
|
|
27
28
|
},
|
|
29
|
+
[CommonErrorCode.RESOURCE_BUSY]: {
|
|
30
|
+
code: CommonErrorCode.RESOURCE_BUSY,
|
|
31
|
+
statusCode: 409,
|
|
32
|
+
},
|
|
28
33
|
};
|
|
@@ -8,6 +8,7 @@ export declare const AuthResponseSchema: z.ZodObject<{
|
|
|
8
8
|
email: z.ZodString;
|
|
9
9
|
name: z.ZodString;
|
|
10
10
|
role: z.ZodString;
|
|
11
|
+
registerType: z.ZodEnum<typeof import("../..").RegisterType>;
|
|
11
12
|
marketingConsent: z.ZodBoolean;
|
|
12
13
|
createdAt: z.ZodString;
|
|
13
14
|
}, z.core.$strip>;
|
|
@@ -45,6 +45,13 @@ export declare namespace CreateRegChatCommand {
|
|
|
45
45
|
startedAt: z.ZodOptional<z.ZodString>;
|
|
46
46
|
completedAt: z.ZodOptional<z.ZodString>;
|
|
47
47
|
}, z.core.$strip>>>;
|
|
48
|
+
citations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
49
|
+
url: z.ZodString;
|
|
50
|
+
title: z.ZodString;
|
|
51
|
+
content: z.ZodOptional<z.ZodString>;
|
|
52
|
+
startIndex: z.ZodNumber;
|
|
53
|
+
endIndex: z.ZodNumber;
|
|
54
|
+
}, z.core.$strip>>>;
|
|
48
55
|
}, z.core.$strip>>;
|
|
49
56
|
createdAt: z.ZodString;
|
|
50
57
|
updatedAt: z.ZodString;
|
|
@@ -43,6 +43,13 @@ export declare namespace CreateUnregChatCommand {
|
|
|
43
43
|
startedAt: z.ZodOptional<z.ZodString>;
|
|
44
44
|
completedAt: z.ZodOptional<z.ZodString>;
|
|
45
45
|
}, z.core.$strip>>>;
|
|
46
|
+
citations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
47
|
+
url: z.ZodString;
|
|
48
|
+
title: z.ZodString;
|
|
49
|
+
content: z.ZodOptional<z.ZodString>;
|
|
50
|
+
startIndex: z.ZodNumber;
|
|
51
|
+
endIndex: z.ZodNumber;
|
|
52
|
+
}, z.core.$strip>>>;
|
|
46
53
|
}, z.core.$strip>>;
|
|
47
54
|
createdAt: z.ZodString;
|
|
48
55
|
updatedAt: z.ZodString;
|
|
@@ -45,6 +45,13 @@ export declare namespace UpdateChatTitleCommand {
|
|
|
45
45
|
startedAt: z.ZodOptional<z.ZodString>;
|
|
46
46
|
completedAt: z.ZodOptional<z.ZodString>;
|
|
47
47
|
}, z.core.$strip>>>;
|
|
48
|
+
citations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
49
|
+
url: z.ZodString;
|
|
50
|
+
title: z.ZodString;
|
|
51
|
+
content: z.ZodOptional<z.ZodString>;
|
|
52
|
+
startIndex: z.ZodNumber;
|
|
53
|
+
endIndex: z.ZodNumber;
|
|
54
|
+
}, z.core.$strip>>>;
|
|
48
55
|
}, z.core.$strip>>;
|
|
49
56
|
createdAt: z.ZodString;
|
|
50
57
|
updatedAt: z.ZodString;
|
|
@@ -46,6 +46,13 @@ export declare namespace UpdateChatCommand {
|
|
|
46
46
|
startedAt: z.ZodOptional<z.ZodString>;
|
|
47
47
|
completedAt: z.ZodOptional<z.ZodString>;
|
|
48
48
|
}, z.core.$strip>>>;
|
|
49
|
+
citations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
50
|
+
url: z.ZodString;
|
|
51
|
+
title: z.ZodString;
|
|
52
|
+
content: z.ZodOptional<z.ZodString>;
|
|
53
|
+
startIndex: z.ZodNumber;
|
|
54
|
+
endIndex: z.ZodNumber;
|
|
55
|
+
}, z.core.$strip>>>;
|
|
49
56
|
}, z.core.$strip>>;
|
|
50
57
|
createdAt: z.ZodString;
|
|
51
58
|
updatedAt: z.ZodString;
|
|
@@ -43,6 +43,13 @@ export declare namespace GetLastActiveChatQuery {
|
|
|
43
43
|
startedAt: z.ZodOptional<z.ZodString>;
|
|
44
44
|
completedAt: z.ZodOptional<z.ZodString>;
|
|
45
45
|
}, z.core.$strip>>>;
|
|
46
|
+
citations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
47
|
+
url: z.ZodString;
|
|
48
|
+
title: z.ZodString;
|
|
49
|
+
content: z.ZodOptional<z.ZodString>;
|
|
50
|
+
startIndex: z.ZodNumber;
|
|
51
|
+
endIndex: z.ZodNumber;
|
|
52
|
+
}, z.core.$strip>>>;
|
|
46
53
|
}, z.core.$strip>>;
|
|
47
54
|
createdAt: z.ZodString;
|
|
48
55
|
updatedAt: z.ZodString;
|
|
@@ -43,6 +43,13 @@ export declare namespace GetRegChatQuery {
|
|
|
43
43
|
startedAt: z.ZodOptional<z.ZodString>;
|
|
44
44
|
completedAt: z.ZodOptional<z.ZodString>;
|
|
45
45
|
}, z.core.$strip>>>;
|
|
46
|
+
citations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
47
|
+
url: z.ZodString;
|
|
48
|
+
title: z.ZodString;
|
|
49
|
+
content: z.ZodOptional<z.ZodString>;
|
|
50
|
+
startIndex: z.ZodNumber;
|
|
51
|
+
endIndex: z.ZodNumber;
|
|
52
|
+
}, z.core.$strip>>>;
|
|
46
53
|
}, z.core.$strip>>;
|
|
47
54
|
createdAt: z.ZodString;
|
|
48
55
|
updatedAt: z.ZodString;
|
|
@@ -43,6 +43,13 @@ export declare namespace GetUnregChatQuery {
|
|
|
43
43
|
startedAt: z.ZodOptional<z.ZodString>;
|
|
44
44
|
completedAt: z.ZodOptional<z.ZodString>;
|
|
45
45
|
}, z.core.$strip>>>;
|
|
46
|
+
citations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
47
|
+
url: z.ZodString;
|
|
48
|
+
title: z.ZodString;
|
|
49
|
+
content: z.ZodOptional<z.ZodString>;
|
|
50
|
+
startIndex: z.ZodNumber;
|
|
51
|
+
endIndex: z.ZodNumber;
|
|
52
|
+
}, z.core.$strip>>>;
|
|
46
53
|
}, z.core.$strip>>;
|
|
47
54
|
createdAt: z.ZodString;
|
|
48
55
|
updatedAt: z.ZodString;
|
|
@@ -37,6 +37,13 @@ export declare const ChatWithMessagesResponseSchema: z.ZodObject<{
|
|
|
37
37
|
startedAt: z.ZodOptional<z.ZodString>;
|
|
38
38
|
completedAt: z.ZodOptional<z.ZodString>;
|
|
39
39
|
}, z.core.$strip>>>;
|
|
40
|
+
citations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
41
|
+
url: z.ZodString;
|
|
42
|
+
title: z.ZodString;
|
|
43
|
+
content: z.ZodOptional<z.ZodString>;
|
|
44
|
+
startIndex: z.ZodNumber;
|
|
45
|
+
endIndex: z.ZodNumber;
|
|
46
|
+
}, z.core.$strip>>>;
|
|
40
47
|
}, z.core.$strip>>;
|
|
41
48
|
createdAt: z.ZodString;
|
|
42
49
|
updatedAt: z.ZodString;
|
package/build/v1/index.d.ts
CHANGED
package/build/v1/index.js
CHANGED
|
@@ -35,3 +35,5 @@ __exportStar(require("./registration-antifraud"), exports);
|
|
|
35
35
|
__exportStar(require("./page-hints"), exports);
|
|
36
36
|
__exportStar(require("./s3"), exports);
|
|
37
37
|
__exportStar(require("./s2s"), exports);
|
|
38
|
+
__exportStar(require("./telegram-auth"), exports);
|
|
39
|
+
__exportStar(require("./telegram-profile"), exports);
|
|
@@ -90,6 +90,11 @@ export declare namespace CreateMessageCommand {
|
|
|
90
90
|
chatId: z.ZodString;
|
|
91
91
|
messageId: z.ZodString;
|
|
92
92
|
type: z.ZodLiteral<import("../schemas").StreamEventType.IMAGE_GENERATION_START>;
|
|
93
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
94
|
+
id: z.ZodNumber;
|
|
95
|
+
chatId: z.ZodString;
|
|
96
|
+
messageId: z.ZodString;
|
|
97
|
+
type: z.ZodLiteral<import("../schemas").StreamEventType.IMAGE_GENERATION_ERROR>;
|
|
93
98
|
}, z.core.$strip>, z.ZodObject<{
|
|
94
99
|
id: z.ZodNumber;
|
|
95
100
|
chatId: z.ZodString;
|
|
@@ -97,6 +102,18 @@ export declare namespace CreateMessageCommand {
|
|
|
97
102
|
type: z.ZodLiteral<import("../schemas").StreamEventType.IMAGE_UPLOADED>;
|
|
98
103
|
imageUrl: z.ZodString;
|
|
99
104
|
imageIndex: z.ZodNumber;
|
|
105
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
106
|
+
id: z.ZodNumber;
|
|
107
|
+
chatId: z.ZodString;
|
|
108
|
+
messageId: z.ZodString;
|
|
109
|
+
type: z.ZodLiteral<import("../schemas").StreamEventType.CITATIONS>;
|
|
110
|
+
citations: z.ZodArray<z.ZodObject<{
|
|
111
|
+
url: z.ZodString;
|
|
112
|
+
title: z.ZodString;
|
|
113
|
+
content: z.ZodOptional<z.ZodString>;
|
|
114
|
+
startIndex: z.ZodNumber;
|
|
115
|
+
endIndex: z.ZodNumber;
|
|
116
|
+
}, z.core.$strip>>;
|
|
100
117
|
}, z.core.$strip>, z.ZodObject<{
|
|
101
118
|
id: z.ZodNumber;
|
|
102
119
|
chatId: z.ZodString;
|
|
@@ -108,7 +125,8 @@ export declare namespace CreateMessageCommand {
|
|
|
108
125
|
chatId: z.ZodString;
|
|
109
126
|
messageId: z.ZodString;
|
|
110
127
|
type: z.ZodLiteral<import("../schemas").StreamEventType.ERROR>;
|
|
111
|
-
|
|
128
|
+
errorCode: z.ZodOptional<z.ZodString>;
|
|
129
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
112
130
|
}, z.core.$strip>], "type">;
|
|
113
131
|
const ChunkEvent: z.ZodObject<{
|
|
114
132
|
id: z.ZodNumber;
|
|
@@ -129,7 +147,8 @@ export declare namespace CreateMessageCommand {
|
|
|
129
147
|
chatId: z.ZodString;
|
|
130
148
|
messageId: z.ZodString;
|
|
131
149
|
type: z.ZodLiteral<import("../schemas").StreamEventType.ERROR>;
|
|
132
|
-
|
|
150
|
+
errorCode: z.ZodOptional<z.ZodString>;
|
|
151
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
133
152
|
}, z.core.$strip>;
|
|
134
153
|
const URL: (pageId: string, chatId: string) => string;
|
|
135
154
|
const METHOD = HttpMethod.POST;
|
|
@@ -13,6 +13,8 @@ export declare enum MessageErrorCode {
|
|
|
13
13
|
AI_MODEL_INACTIVE = "AI_MODEL_INACTIVE",
|
|
14
14
|
AI_MODEL_NOT_AVAILABLE_FOR_UNREG = "AI_MODEL_NOT_AVAILABLE_FOR_UNREG",
|
|
15
15
|
CANNOT_RATE_USER_MESSAGE = "CANNOT_RATE_USER_MESSAGE",
|
|
16
|
-
COMPACTION_FAILED = "COMPACTION_FAILED"
|
|
16
|
+
COMPACTION_FAILED = "COMPACTION_FAILED",
|
|
17
|
+
IMAGE_CONTENT_FILTERED = "IMAGE_CONTENT_FILTERED",
|
|
18
|
+
IMAGE_GENERATION_FAILED = "IMAGE_GENERATION_FAILED"
|
|
17
19
|
}
|
|
18
20
|
export declare const MESSAGE_ERRORS: Record<MessageErrorCode, ErrorMetadata>;
|
|
@@ -17,6 +17,8 @@ var MessageErrorCode;
|
|
|
17
17
|
MessageErrorCode["AI_MODEL_NOT_AVAILABLE_FOR_UNREG"] = "AI_MODEL_NOT_AVAILABLE_FOR_UNREG";
|
|
18
18
|
MessageErrorCode["CANNOT_RATE_USER_MESSAGE"] = "CANNOT_RATE_USER_MESSAGE";
|
|
19
19
|
MessageErrorCode["COMPACTION_FAILED"] = "COMPACTION_FAILED";
|
|
20
|
+
MessageErrorCode["IMAGE_CONTENT_FILTERED"] = "IMAGE_CONTENT_FILTERED";
|
|
21
|
+
MessageErrorCode["IMAGE_GENERATION_FAILED"] = "IMAGE_GENERATION_FAILED";
|
|
20
22
|
})(MessageErrorCode || (exports.MessageErrorCode = MessageErrorCode = {}));
|
|
21
23
|
exports.MESSAGE_ERRORS = {
|
|
22
24
|
[MessageErrorCode.MESSAGE_NOT_FOUND]: {
|
|
@@ -75,4 +77,12 @@ exports.MESSAGE_ERRORS = {
|
|
|
75
77
|
code: MessageErrorCode.COMPACTION_FAILED,
|
|
76
78
|
statusCode: 500,
|
|
77
79
|
},
|
|
80
|
+
[MessageErrorCode.IMAGE_CONTENT_FILTERED]: {
|
|
81
|
+
code: MessageErrorCode.IMAGE_CONTENT_FILTERED,
|
|
82
|
+
statusCode: 400,
|
|
83
|
+
},
|
|
84
|
+
[MessageErrorCode.IMAGE_GENERATION_FAILED]: {
|
|
85
|
+
code: MessageErrorCode.IMAGE_GENERATION_FAILED,
|
|
86
|
+
statusCode: 500,
|
|
87
|
+
},
|
|
78
88
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Citation from web search
|
|
4
|
+
*/
|
|
5
|
+
export declare const CitationSchema: z.ZodObject<{
|
|
6
|
+
url: z.ZodString;
|
|
7
|
+
title: z.ZodString;
|
|
8
|
+
content: z.ZodOptional<z.ZodString>;
|
|
9
|
+
startIndex: z.ZodNumber;
|
|
10
|
+
endIndex: z.ZodNumber;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export type Citation = z.infer<typeof CitationSchema>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CitationSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* Citation from web search
|
|
7
|
+
*/
|
|
8
|
+
exports.CitationSchema = zod_1.z.object({
|
|
9
|
+
/** Source URL */
|
|
10
|
+
url: zod_1.z.string().url(),
|
|
11
|
+
/** Page title */
|
|
12
|
+
title: zod_1.z.string(),
|
|
13
|
+
/** Content snippet */
|
|
14
|
+
content: zod_1.z.string().optional(),
|
|
15
|
+
/** Start index in message content */
|
|
16
|
+
startIndex: zod_1.z.number().int().nonnegative(),
|
|
17
|
+
/** End index in message content */
|
|
18
|
+
endIndex: zod_1.z.number().int().nonnegative(),
|
|
19
|
+
});
|
|
@@ -4,7 +4,8 @@ export { UserRating } from './user-rating.enum';
|
|
|
4
4
|
export { CreateMessageRequestSchema } from './create-message-request.schema';
|
|
5
5
|
export { CreateMessageResponseSchema } from './create-message-response.schema';
|
|
6
6
|
export { MessageResponseSchema } from './message-response.schema';
|
|
7
|
-
export { StreamEventType, StreamEventSchema, StreamChunkEventSchema, StreamReasoningEventSchema, StreamImageEventSchema, StreamPromptGenerationEventSchema, StreamStepDoneEventSchema, StreamImageGenerationStartEventSchema, StreamDoneEventSchema, StreamErrorEventSchema, } from './stream-events.schema';
|
|
7
|
+
export { StreamEventType, StreamEventSchema, StreamChunkEventSchema, StreamReasoningEventSchema, StreamImageEventSchema, StreamPromptGenerationEventSchema, StreamStepDoneEventSchema, StreamImageGenerationStartEventSchema, StreamCitationsEventSchema, StreamDoneEventSchema, StreamErrorEventSchema, } from './stream-events.schema';
|
|
8
|
+
export { CitationSchema, type Citation } from './citation.schema';
|
|
8
9
|
export { AttachmentType, AttachmentSchema, AttachmentsSchema } from './message-attachment.schema';
|
|
9
10
|
export type { Attachment, Attachments } from './message-attachment.schema';
|
|
10
11
|
export { MessageMetaSchema, ReasoningMetaSchema, ReasoningDetailSchema, } from './message-meta.schema';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DeleteMessageResponseSchema = exports.DeleteMessageParamsSchema = exports.RateMessageParamsSchema = exports.RateMessageResponseSchema = exports.RateMessageRequestSchema = exports.GenerationStepType = exports.GenerationStepSchema = exports.ReasoningDetailSchema = exports.ReasoningMetaSchema = exports.MessageMetaSchema = exports.AttachmentsSchema = exports.AttachmentSchema = exports.AttachmentType = exports.StreamErrorEventSchema = exports.StreamDoneEventSchema = exports.StreamImageGenerationStartEventSchema = exports.StreamStepDoneEventSchema = exports.StreamPromptGenerationEventSchema = exports.StreamImageEventSchema = exports.StreamReasoningEventSchema = exports.StreamChunkEventSchema = exports.StreamEventSchema = exports.StreamEventType = exports.MessageResponseSchema = exports.CreateMessageResponseSchema = exports.CreateMessageRequestSchema = exports.UserRating = exports.MessageStatus = exports.MessageRole = void 0;
|
|
3
|
+
exports.DeleteMessageResponseSchema = exports.DeleteMessageParamsSchema = exports.RateMessageParamsSchema = exports.RateMessageResponseSchema = exports.RateMessageRequestSchema = exports.GenerationStepType = exports.GenerationStepSchema = exports.ReasoningDetailSchema = exports.ReasoningMetaSchema = exports.MessageMetaSchema = exports.AttachmentsSchema = exports.AttachmentSchema = exports.AttachmentType = exports.CitationSchema = exports.StreamErrorEventSchema = exports.StreamDoneEventSchema = exports.StreamCitationsEventSchema = exports.StreamImageGenerationStartEventSchema = exports.StreamStepDoneEventSchema = exports.StreamPromptGenerationEventSchema = exports.StreamImageEventSchema = exports.StreamReasoningEventSchema = exports.StreamChunkEventSchema = exports.StreamEventSchema = exports.StreamEventType = exports.MessageResponseSchema = exports.CreateMessageResponseSchema = exports.CreateMessageRequestSchema = exports.UserRating = exports.MessageStatus = exports.MessageRole = void 0;
|
|
4
4
|
var message_role_enum_1 = require("./message-role.enum");
|
|
5
5
|
Object.defineProperty(exports, "MessageRole", { enumerable: true, get: function () { return message_role_enum_1.MessageRole; } });
|
|
6
6
|
var message_status_enum_1 = require("./message-status.enum");
|
|
@@ -22,8 +22,11 @@ Object.defineProperty(exports, "StreamImageEventSchema", { enumerable: true, get
|
|
|
22
22
|
Object.defineProperty(exports, "StreamPromptGenerationEventSchema", { enumerable: true, get: function () { return stream_events_schema_1.StreamPromptGenerationEventSchema; } });
|
|
23
23
|
Object.defineProperty(exports, "StreamStepDoneEventSchema", { enumerable: true, get: function () { return stream_events_schema_1.StreamStepDoneEventSchema; } });
|
|
24
24
|
Object.defineProperty(exports, "StreamImageGenerationStartEventSchema", { enumerable: true, get: function () { return stream_events_schema_1.StreamImageGenerationStartEventSchema; } });
|
|
25
|
+
Object.defineProperty(exports, "StreamCitationsEventSchema", { enumerable: true, get: function () { return stream_events_schema_1.StreamCitationsEventSchema; } });
|
|
25
26
|
Object.defineProperty(exports, "StreamDoneEventSchema", { enumerable: true, get: function () { return stream_events_schema_1.StreamDoneEventSchema; } });
|
|
26
27
|
Object.defineProperty(exports, "StreamErrorEventSchema", { enumerable: true, get: function () { return stream_events_schema_1.StreamErrorEventSchema; } });
|
|
28
|
+
var citation_schema_1 = require("./citation.schema");
|
|
29
|
+
Object.defineProperty(exports, "CitationSchema", { enumerable: true, get: function () { return citation_schema_1.CitationSchema; } });
|
|
27
30
|
var message_attachment_schema_1 = require("./message-attachment.schema");
|
|
28
31
|
Object.defineProperty(exports, "AttachmentType", { enumerable: true, get: function () { return message_attachment_schema_1.AttachmentType; } });
|
|
29
32
|
Object.defineProperty(exports, "AttachmentSchema", { enumerable: true, get: function () { return message_attachment_schema_1.AttachmentSchema; } });
|
|
@@ -52,5 +52,12 @@ export declare const MessageMetaSchema: z.ZodObject<{
|
|
|
52
52
|
startedAt: z.ZodOptional<z.ZodString>;
|
|
53
53
|
completedAt: z.ZodOptional<z.ZodString>;
|
|
54
54
|
}, z.core.$strip>>>;
|
|
55
|
+
citations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
56
|
+
url: z.ZodString;
|
|
57
|
+
title: z.ZodString;
|
|
58
|
+
content: z.ZodOptional<z.ZodString>;
|
|
59
|
+
startIndex: z.ZodNumber;
|
|
60
|
+
endIndex: z.ZodNumber;
|
|
61
|
+
}, z.core.$strip>>>;
|
|
55
62
|
}, z.core.$strip>;
|
|
56
63
|
export type MessageMetaData = z.infer<typeof MessageMetaSchema>;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MessageMetaSchema = exports.ReasoningMetaSchema = exports.ReasoningDetailSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const generation_step_schema_1 = require("./generation-step.schema");
|
|
6
|
+
const citation_schema_1 = require("./citation.schema");
|
|
6
7
|
/**
|
|
7
8
|
* Reasoning detail from AI model (e.g., Claude extended thinking)
|
|
8
9
|
* Supports both plain text and encrypted reasoning formats
|
|
@@ -35,4 +36,6 @@ exports.MessageMetaSchema = zod_1.z.object({
|
|
|
35
36
|
reasoning: exports.ReasoningMetaSchema.optional(),
|
|
36
37
|
/** Generation steps for multi-stage processes (e.g., prompt → image) */
|
|
37
38
|
steps: zod_1.z.array(generation_step_schema_1.GenerationStepSchema).optional(),
|
|
39
|
+
/** Web search citations/sources */
|
|
40
|
+
citations: zod_1.z.array(citation_schema_1.CitationSchema).optional(),
|
|
38
41
|
});
|
|
@@ -31,6 +31,13 @@ export declare const MessageResponseSchema: z.ZodObject<{
|
|
|
31
31
|
startedAt: z.ZodOptional<z.ZodString>;
|
|
32
32
|
completedAt: z.ZodOptional<z.ZodString>;
|
|
33
33
|
}, z.core.$strip>>>;
|
|
34
|
+
citations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
35
|
+
url: z.ZodString;
|
|
36
|
+
title: z.ZodString;
|
|
37
|
+
content: z.ZodOptional<z.ZodString>;
|
|
38
|
+
startIndex: z.ZodNumber;
|
|
39
|
+
endIndex: z.ZodNumber;
|
|
40
|
+
}, z.core.$strip>>>;
|
|
34
41
|
}, z.core.$strip>>;
|
|
35
42
|
createdAt: z.ZodString;
|
|
36
43
|
updatedAt: z.ZodString;
|
|
@@ -16,8 +16,12 @@ export declare enum StreamEventType {
|
|
|
16
16
|
STEP_DONE = "step_done",
|
|
17
17
|
/** Image generation started */
|
|
18
18
|
IMAGE_GENERATION_START = "image_generation_start",
|
|
19
|
+
/** Image generation failed (content filter, etc.) */
|
|
20
|
+
IMAGE_GENERATION_ERROR = "image_generation_error",
|
|
19
21
|
/** Image uploaded to S3 */
|
|
20
22
|
IMAGE_UPLOADED = "image_uploaded",
|
|
23
|
+
/** Web search citations/sources */
|
|
24
|
+
CITATIONS = "citations",
|
|
21
25
|
/** Stream completed successfully */
|
|
22
26
|
DONE = "done",
|
|
23
27
|
/** Error occurred during streaming */
|
|
@@ -71,7 +75,8 @@ export declare const StreamErrorEventSchema: z.ZodObject<{
|
|
|
71
75
|
chatId: z.ZodString;
|
|
72
76
|
messageId: z.ZodString;
|
|
73
77
|
type: z.ZodLiteral<StreamEventType.ERROR>;
|
|
74
|
-
|
|
78
|
+
errorCode: z.ZodOptional<z.ZodString>;
|
|
79
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
75
80
|
}, z.core.$strip>;
|
|
76
81
|
/**
|
|
77
82
|
* Image event - AI generated image (base64)
|
|
@@ -116,6 +121,16 @@ export declare const StreamImageGenerationStartEventSchema: z.ZodObject<{
|
|
|
116
121
|
messageId: z.ZodString;
|
|
117
122
|
type: z.ZodLiteral<StreamEventType.IMAGE_GENERATION_START>;
|
|
118
123
|
}, z.core.$strip>;
|
|
124
|
+
/**
|
|
125
|
+
* Image generation error event - image generation failed (content filter, etc.)
|
|
126
|
+
* Same format as IMAGE_GENERATION_START but signals failure
|
|
127
|
+
*/
|
|
128
|
+
export declare const StreamImageGenerationErrorEventSchema: z.ZodObject<{
|
|
129
|
+
id: z.ZodNumber;
|
|
130
|
+
chatId: z.ZodString;
|
|
131
|
+
messageId: z.ZodString;
|
|
132
|
+
type: z.ZodLiteral<StreamEventType.IMAGE_GENERATION_ERROR>;
|
|
133
|
+
}, z.core.$strip>;
|
|
119
134
|
/**
|
|
120
135
|
* Image uploaded event - image has been uploaded to S3
|
|
121
136
|
*/
|
|
@@ -127,6 +142,22 @@ export declare const StreamImageUploadedEventSchema: z.ZodObject<{
|
|
|
127
142
|
imageUrl: z.ZodString;
|
|
128
143
|
imageIndex: z.ZodNumber;
|
|
129
144
|
}, z.core.$strip>;
|
|
145
|
+
/**
|
|
146
|
+
* Citations event - web search sources
|
|
147
|
+
*/
|
|
148
|
+
export declare const StreamCitationsEventSchema: z.ZodObject<{
|
|
149
|
+
id: z.ZodNumber;
|
|
150
|
+
chatId: z.ZodString;
|
|
151
|
+
messageId: z.ZodString;
|
|
152
|
+
type: z.ZodLiteral<StreamEventType.CITATIONS>;
|
|
153
|
+
citations: z.ZodArray<z.ZodObject<{
|
|
154
|
+
url: z.ZodString;
|
|
155
|
+
title: z.ZodString;
|
|
156
|
+
content: z.ZodOptional<z.ZodString>;
|
|
157
|
+
startIndex: z.ZodNumber;
|
|
158
|
+
endIndex: z.ZodNumber;
|
|
159
|
+
}, z.core.$strip>>;
|
|
160
|
+
}, z.core.$strip>;
|
|
130
161
|
/**
|
|
131
162
|
* Discriminated union of all stream events
|
|
132
163
|
* Use `type` field to narrow the type
|
|
@@ -180,6 +211,11 @@ export declare const StreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
180
211
|
chatId: z.ZodString;
|
|
181
212
|
messageId: z.ZodString;
|
|
182
213
|
type: z.ZodLiteral<StreamEventType.IMAGE_GENERATION_START>;
|
|
214
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
215
|
+
id: z.ZodNumber;
|
|
216
|
+
chatId: z.ZodString;
|
|
217
|
+
messageId: z.ZodString;
|
|
218
|
+
type: z.ZodLiteral<StreamEventType.IMAGE_GENERATION_ERROR>;
|
|
183
219
|
}, z.core.$strip>, z.ZodObject<{
|
|
184
220
|
id: z.ZodNumber;
|
|
185
221
|
chatId: z.ZodString;
|
|
@@ -187,6 +223,18 @@ export declare const StreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
187
223
|
type: z.ZodLiteral<StreamEventType.IMAGE_UPLOADED>;
|
|
188
224
|
imageUrl: z.ZodString;
|
|
189
225
|
imageIndex: z.ZodNumber;
|
|
226
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
227
|
+
id: z.ZodNumber;
|
|
228
|
+
chatId: z.ZodString;
|
|
229
|
+
messageId: z.ZodString;
|
|
230
|
+
type: z.ZodLiteral<StreamEventType.CITATIONS>;
|
|
231
|
+
citations: z.ZodArray<z.ZodObject<{
|
|
232
|
+
url: z.ZodString;
|
|
233
|
+
title: z.ZodString;
|
|
234
|
+
content: z.ZodOptional<z.ZodString>;
|
|
235
|
+
startIndex: z.ZodNumber;
|
|
236
|
+
endIndex: z.ZodNumber;
|
|
237
|
+
}, z.core.$strip>>;
|
|
190
238
|
}, z.core.$strip>, z.ZodObject<{
|
|
191
239
|
id: z.ZodNumber;
|
|
192
240
|
chatId: z.ZodString;
|
|
@@ -198,5 +246,6 @@ export declare const StreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
198
246
|
chatId: z.ZodString;
|
|
199
247
|
messageId: z.ZodString;
|
|
200
248
|
type: z.ZodLiteral<StreamEventType.ERROR>;
|
|
201
|
-
|
|
249
|
+
errorCode: z.ZodOptional<z.ZodString>;
|
|
250
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
202
251
|
}, z.core.$strip>], "type">;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StreamEventSchema = exports.StreamImageUploadedEventSchema = exports.StreamImageGenerationStartEventSchema = exports.StreamStepDoneEventSchema = exports.StreamPromptGenerationEventSchema = exports.StreamImageEventSchema = exports.StreamErrorEventSchema = exports.StreamDoneEventSchema = exports.StreamReasoningEventSchema = exports.StreamChunkEventSchema = exports.StreamEventType = void 0;
|
|
3
|
+
exports.StreamEventSchema = exports.StreamCitationsEventSchema = exports.StreamImageUploadedEventSchema = exports.StreamImageGenerationErrorEventSchema = exports.StreamImageGenerationStartEventSchema = exports.StreamStepDoneEventSchema = exports.StreamPromptGenerationEventSchema = exports.StreamImageEventSchema = exports.StreamErrorEventSchema = exports.StreamDoneEventSchema = exports.StreamReasoningEventSchema = exports.StreamChunkEventSchema = exports.StreamEventType = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const message_meta_schema_1 = require("./message-meta.schema");
|
|
6
6
|
const generation_step_schema_1 = require("./generation-step.schema");
|
|
7
|
+
const citation_schema_1 = require("./citation.schema");
|
|
7
8
|
/**
|
|
8
9
|
* Stream Event Types for message streaming (NDJSON format)
|
|
9
10
|
*/
|
|
@@ -21,8 +22,12 @@ var StreamEventType;
|
|
|
21
22
|
StreamEventType["STEP_DONE"] = "step_done";
|
|
22
23
|
/** Image generation started */
|
|
23
24
|
StreamEventType["IMAGE_GENERATION_START"] = "image_generation_start";
|
|
25
|
+
/** Image generation failed (content filter, etc.) */
|
|
26
|
+
StreamEventType["IMAGE_GENERATION_ERROR"] = "image_generation_error";
|
|
24
27
|
/** Image uploaded to S3 */
|
|
25
28
|
StreamEventType["IMAGE_UPLOADED"] = "image_uploaded";
|
|
29
|
+
/** Web search citations/sources */
|
|
30
|
+
StreamEventType["CITATIONS"] = "citations";
|
|
26
31
|
/** Stream completed successfully */
|
|
27
32
|
StreamEventType["DONE"] = "done";
|
|
28
33
|
/** Error occurred during streaming */
|
|
@@ -75,8 +80,10 @@ exports.StreamDoneEventSchema = BaseStreamEventSchema.extend({
|
|
|
75
80
|
*/
|
|
76
81
|
exports.StreamErrorEventSchema = BaseStreamEventSchema.extend({
|
|
77
82
|
type: zod_1.z.literal(StreamEventType.ERROR),
|
|
78
|
-
/**
|
|
79
|
-
|
|
83
|
+
/** Error code for frontend handling */
|
|
84
|
+
errorCode: zod_1.z.string().optional(),
|
|
85
|
+
/** Human-readable error message */
|
|
86
|
+
errorMessage: zod_1.z.string().optional(),
|
|
80
87
|
});
|
|
81
88
|
/**
|
|
82
89
|
* Image event - AI generated image (base64)
|
|
@@ -116,6 +123,13 @@ exports.StreamStepDoneEventSchema = BaseStreamEventSchema.extend({
|
|
|
116
123
|
exports.StreamImageGenerationStartEventSchema = BaseStreamEventSchema.extend({
|
|
117
124
|
type: zod_1.z.literal(StreamEventType.IMAGE_GENERATION_START),
|
|
118
125
|
});
|
|
126
|
+
/**
|
|
127
|
+
* Image generation error event - image generation failed (content filter, etc.)
|
|
128
|
+
* Same format as IMAGE_GENERATION_START but signals failure
|
|
129
|
+
*/
|
|
130
|
+
exports.StreamImageGenerationErrorEventSchema = BaseStreamEventSchema.extend({
|
|
131
|
+
type: zod_1.z.literal(StreamEventType.IMAGE_GENERATION_ERROR),
|
|
132
|
+
});
|
|
119
133
|
/**
|
|
120
134
|
* Image uploaded event - image has been uploaded to S3
|
|
121
135
|
*/
|
|
@@ -126,6 +140,14 @@ exports.StreamImageUploadedEventSchema = BaseStreamEventSchema.extend({
|
|
|
126
140
|
/** Image index (for multiple images in one message) */
|
|
127
141
|
imageIndex: zod_1.z.number().int().nonnegative(),
|
|
128
142
|
});
|
|
143
|
+
/**
|
|
144
|
+
* Citations event - web search sources
|
|
145
|
+
*/
|
|
146
|
+
exports.StreamCitationsEventSchema = BaseStreamEventSchema.extend({
|
|
147
|
+
type: zod_1.z.literal(StreamEventType.CITATIONS),
|
|
148
|
+
/** Array of citations from web search */
|
|
149
|
+
citations: zod_1.z.array(citation_schema_1.CitationSchema),
|
|
150
|
+
});
|
|
129
151
|
// ============================================================================
|
|
130
152
|
// Union Schema
|
|
131
153
|
// ============================================================================
|
|
@@ -140,7 +162,9 @@ exports.StreamEventSchema = zod_1.z.discriminatedUnion('type', [
|
|
|
140
162
|
exports.StreamPromptGenerationEventSchema,
|
|
141
163
|
exports.StreamStepDoneEventSchema,
|
|
142
164
|
exports.StreamImageGenerationStartEventSchema,
|
|
165
|
+
exports.StreamImageGenerationErrorEventSchema,
|
|
143
166
|
exports.StreamImageUploadedEventSchema,
|
|
167
|
+
exports.StreamCitationsEventSchema,
|
|
144
168
|
exports.StreamDoneEventSchema,
|
|
145
169
|
exports.StreamErrorEventSchema,
|
|
146
170
|
]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.TELEGRAM_AUTH_ROUTES = exports.TELEGRAM_AUTH_CONTROLLER = void 0;
|
|
18
|
+
__exportStar(require("./schemas"), exports);
|
|
19
|
+
__exportStar(require("./telegram-auth.errors"), exports);
|
|
20
|
+
__exportStar(require("./commands"), exports);
|
|
21
|
+
__exportStar(require("./queries"), exports);
|
|
22
|
+
// Re-export from centralized locations
|
|
23
|
+
var controllers_1 = require("../../controllers");
|
|
24
|
+
Object.defineProperty(exports, "TELEGRAM_AUTH_CONTROLLER", { enumerable: true, get: function () { return controllers_1.TELEGRAM_AUTH_CONTROLLER; } });
|
|
25
|
+
var routes_1 = require("../../routes");
|
|
26
|
+
Object.defineProperty(exports, "TELEGRAM_AUTH_ROUTES", { enumerable: true, get: function () { return routes_1.TELEGRAM_AUTH_ROUTES; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from './telegram-auth-status.enum';
|
|
2
|
+
export * from './telegram-auth-init-response.schema';
|
|
3
|
+
export * from './telegram-auth-status-response.schema';
|
|
4
|
+
export * from './telegram-auth-exchange-request.schema';
|
|
5
|
+
export * from './telegram-auth-exchange-response.schema';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./telegram-auth-status.enum"), exports);
|
|
18
|
+
__exportStar(require("./telegram-auth-init-response.schema"), exports);
|
|
19
|
+
__exportStar(require("./telegram-auth-status-response.schema"), exports);
|
|
20
|
+
__exportStar(require("./telegram-auth-exchange-request.schema"), exports);
|
|
21
|
+
__exportStar(require("./telegram-auth-exchange-response.schema"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TelegramAuthExchangeRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.TelegramAuthExchangeRequestSchema = zod_1.z.object({
|
|
6
|
+
uuid: zod_1.z
|
|
7
|
+
.string({ error: 'TelegramAuthExchangeRequest.uuid.required' })
|
|
8
|
+
.uuid({ message: 'TelegramAuthExchangeRequest.uuid.invalid' }),
|
|
9
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TelegramAuthExchangeResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.TelegramAuthExchangeResponseSchema = zod_1.z.object({
|
|
6
|
+
accessToken: zod_1.z.string(),
|
|
7
|
+
userId: zod_1.z.string().uuid(),
|
|
8
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const TelegramAuthInitResponseSchema: z.ZodObject<{
|
|
3
|
+
uuid: z.ZodString;
|
|
4
|
+
link: z.ZodString;
|
|
5
|
+
expiresAt: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export type TelegramAuthInitResponseDto = z.infer<typeof TelegramAuthInitResponseSchema>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TelegramAuthInitResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.TelegramAuthInitResponseSchema = zod_1.z.object({
|
|
6
|
+
uuid: zod_1.z.string().uuid(),
|
|
7
|
+
link: zod_1.z.string().url(),
|
|
8
|
+
expiresAt: zod_1.z.string().datetime(),
|
|
9
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TelegramAuthStatus } from './telegram-auth-status.enum';
|
|
3
|
+
export declare const TelegramAuthStatusResponseSchema: z.ZodObject<{
|
|
4
|
+
status: z.ZodEnum<typeof TelegramAuthStatus>;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export type TelegramAuthStatusResponseDto = z.infer<typeof TelegramAuthStatusResponseSchema>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TelegramAuthStatusResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const telegram_auth_status_enum_1 = require("./telegram-auth-status.enum");
|
|
6
|
+
exports.TelegramAuthStatusResponseSchema = zod_1.z.object({
|
|
7
|
+
status: zod_1.z.nativeEnum(telegram_auth_status_enum_1.TelegramAuthStatus),
|
|
8
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TelegramAuthStatus = void 0;
|
|
4
|
+
var TelegramAuthStatus;
|
|
5
|
+
(function (TelegramAuthStatus) {
|
|
6
|
+
TelegramAuthStatus["PENDING"] = "pending";
|
|
7
|
+
TelegramAuthStatus["CONFIRMED"] = "confirmed";
|
|
8
|
+
TelegramAuthStatus["EXCHANGED"] = "exchanged";
|
|
9
|
+
TelegramAuthStatus["EXPIRED"] = "expired";
|
|
10
|
+
})(TelegramAuthStatus || (exports.TelegramAuthStatus = TelegramAuthStatus = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ErrorMetadata } from '../../shared';
|
|
2
|
+
export declare enum TelegramAuthErrorCode {
|
|
3
|
+
AUTH_REQUEST_NOT_FOUND = "TELEGRAM_AUTH_REQUEST_NOT_FOUND",
|
|
4
|
+
AUTH_REQUEST_EXPIRED = "TELEGRAM_AUTH_REQUEST_EXPIRED",
|
|
5
|
+
AUTH_REQUEST_ALREADY_CONFIRMED = "TELEGRAM_AUTH_ALREADY_CONFIRMED",
|
|
6
|
+
AUTH_REQUEST_ALREADY_EXCHANGED = "TELEGRAM_AUTH_ALREADY_EXCHANGED",
|
|
7
|
+
AUTH_REQUEST_NOT_CONFIRMED = "TELEGRAM_AUTH_NOT_CONFIRMED",
|
|
8
|
+
INVALID_AUTH_CODE = "TELEGRAM_INVALID_AUTH_CODE"
|
|
9
|
+
}
|
|
10
|
+
export declare const TELEGRAM_AUTH_ERRORS: Record<TelegramAuthErrorCode, ErrorMetadata>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TELEGRAM_AUTH_ERRORS = exports.TelegramAuthErrorCode = void 0;
|
|
4
|
+
var TelegramAuthErrorCode;
|
|
5
|
+
(function (TelegramAuthErrorCode) {
|
|
6
|
+
TelegramAuthErrorCode["AUTH_REQUEST_NOT_FOUND"] = "TELEGRAM_AUTH_REQUEST_NOT_FOUND";
|
|
7
|
+
TelegramAuthErrorCode["AUTH_REQUEST_EXPIRED"] = "TELEGRAM_AUTH_REQUEST_EXPIRED";
|
|
8
|
+
TelegramAuthErrorCode["AUTH_REQUEST_ALREADY_CONFIRMED"] = "TELEGRAM_AUTH_ALREADY_CONFIRMED";
|
|
9
|
+
TelegramAuthErrorCode["AUTH_REQUEST_ALREADY_EXCHANGED"] = "TELEGRAM_AUTH_ALREADY_EXCHANGED";
|
|
10
|
+
TelegramAuthErrorCode["AUTH_REQUEST_NOT_CONFIRMED"] = "TELEGRAM_AUTH_NOT_CONFIRMED";
|
|
11
|
+
TelegramAuthErrorCode["INVALID_AUTH_CODE"] = "TELEGRAM_INVALID_AUTH_CODE";
|
|
12
|
+
})(TelegramAuthErrorCode || (exports.TelegramAuthErrorCode = TelegramAuthErrorCode = {}));
|
|
13
|
+
exports.TELEGRAM_AUTH_ERRORS = {
|
|
14
|
+
[TelegramAuthErrorCode.AUTH_REQUEST_NOT_FOUND]: {
|
|
15
|
+
code: TelegramAuthErrorCode.AUTH_REQUEST_NOT_FOUND,
|
|
16
|
+
statusCode: 404,
|
|
17
|
+
},
|
|
18
|
+
[TelegramAuthErrorCode.AUTH_REQUEST_EXPIRED]: {
|
|
19
|
+
code: TelegramAuthErrorCode.AUTH_REQUEST_EXPIRED,
|
|
20
|
+
statusCode: 410,
|
|
21
|
+
},
|
|
22
|
+
[TelegramAuthErrorCode.AUTH_REQUEST_ALREADY_CONFIRMED]: {
|
|
23
|
+
code: TelegramAuthErrorCode.AUTH_REQUEST_ALREADY_CONFIRMED,
|
|
24
|
+
statusCode: 409,
|
|
25
|
+
},
|
|
26
|
+
[TelegramAuthErrorCode.AUTH_REQUEST_ALREADY_EXCHANGED]: {
|
|
27
|
+
code: TelegramAuthErrorCode.AUTH_REQUEST_ALREADY_EXCHANGED,
|
|
28
|
+
statusCode: 409,
|
|
29
|
+
},
|
|
30
|
+
[TelegramAuthErrorCode.AUTH_REQUEST_NOT_CONFIRMED]: {
|
|
31
|
+
code: TelegramAuthErrorCode.AUTH_REQUEST_NOT_CONFIRMED,
|
|
32
|
+
statusCode: 400,
|
|
33
|
+
},
|
|
34
|
+
[TelegramAuthErrorCode.INVALID_AUTH_CODE]: {
|
|
35
|
+
code: TelegramAuthErrorCode.INVALID_AUTH_CODE,
|
|
36
|
+
statusCode: 400,
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './telegram-profile.errors';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./telegram-profile.errors"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TELEGRAM_PROFILE_ERRORS = exports.TelegramProfileErrorCode = void 0;
|
|
4
|
+
var TelegramProfileErrorCode;
|
|
5
|
+
(function (TelegramProfileErrorCode) {
|
|
6
|
+
TelegramProfileErrorCode["PROFILE_NOT_FOUND"] = "TELEGRAM_PROFILE_NOT_FOUND";
|
|
7
|
+
})(TelegramProfileErrorCode || (exports.TelegramProfileErrorCode = TelegramProfileErrorCode = {}));
|
|
8
|
+
exports.TELEGRAM_PROFILE_ERRORS = {
|
|
9
|
+
[TelegramProfileErrorCode.PROFILE_NOT_FOUND]: {
|
|
10
|
+
code: TelegramProfileErrorCode.PROFILE_NOT_FOUND,
|
|
11
|
+
statusCode: 404,
|
|
12
|
+
},
|
|
13
|
+
};
|
|
@@ -9,6 +9,7 @@ export declare namespace UserToggleMarketingConsentCommand {
|
|
|
9
9
|
email: z.ZodString;
|
|
10
10
|
name: z.ZodString;
|
|
11
11
|
role: z.ZodString;
|
|
12
|
+
registerType: z.ZodEnum<typeof import("..").RegisterType>;
|
|
12
13
|
marketingConsent: z.ZodBoolean;
|
|
13
14
|
createdAt: z.ZodString;
|
|
14
15
|
}, z.core.$strip>;
|
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./register-type.enum"), exports);
|
|
17
18
|
__exportStar(require("./user-response.schema"), exports);
|
|
18
19
|
__exportStar(require("./update-profile-request.schema"), exports);
|
|
19
20
|
__exportStar(require("./change-password-request.schema"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RegisterType = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* User registration type
|
|
6
|
+
*/
|
|
7
|
+
var RegisterType;
|
|
8
|
+
(function (RegisterType) {
|
|
9
|
+
RegisterType["EMAIL"] = "email";
|
|
10
|
+
RegisterType["TELEGRAM"] = "telegram";
|
|
11
|
+
})(RegisterType || (exports.RegisterType = RegisterType = {}));
|
|
@@ -7,6 +7,7 @@ export declare const UpdateProfileResponseSchema: z.ZodObject<{
|
|
|
7
7
|
email: z.ZodString;
|
|
8
8
|
name: z.ZodString;
|
|
9
9
|
role: z.ZodString;
|
|
10
|
+
registerType: z.ZodEnum<typeof import("./register-type.enum").RegisterType>;
|
|
10
11
|
marketingConsent: z.ZodBoolean;
|
|
11
12
|
createdAt: z.ZodString;
|
|
12
13
|
}, z.core.$strip>;
|
|
@@ -18,6 +19,7 @@ export declare const ToggleMarketingConsentResponseSchema: z.ZodObject<{
|
|
|
18
19
|
email: z.ZodString;
|
|
19
20
|
name: z.ZodString;
|
|
20
21
|
role: z.ZodString;
|
|
22
|
+
registerType: z.ZodEnum<typeof import("./register-type.enum").RegisterType>;
|
|
21
23
|
marketingConsent: z.ZodBoolean;
|
|
22
24
|
createdAt: z.ZodString;
|
|
23
25
|
}, z.core.$strip>;
|
|
@@ -29,6 +31,7 @@ export declare const GetCurrentUserResponseSchema: z.ZodObject<{
|
|
|
29
31
|
email: z.ZodString;
|
|
30
32
|
name: z.ZodString;
|
|
31
33
|
role: z.ZodString;
|
|
34
|
+
registerType: z.ZodEnum<typeof import("./register-type.enum").RegisterType>;
|
|
32
35
|
marketingConsent: z.ZodBoolean;
|
|
33
36
|
createdAt: z.ZodString;
|
|
34
37
|
}, z.core.$strip>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { RegisterType } from './register-type.enum';
|
|
2
3
|
/**
|
|
3
4
|
* User Response Schema
|
|
4
5
|
*/
|
|
@@ -7,6 +8,7 @@ export declare const UserResponseSchema: z.ZodObject<{
|
|
|
7
8
|
email: z.ZodString;
|
|
8
9
|
name: z.ZodString;
|
|
9
10
|
role: z.ZodString;
|
|
11
|
+
registerType: z.ZodEnum<typeof RegisterType>;
|
|
10
12
|
marketingConsent: z.ZodBoolean;
|
|
11
13
|
createdAt: z.ZodString;
|
|
12
14
|
}, z.core.$strip>;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.UserResponseSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const regex_1 = require("../../../shared/regex");
|
|
6
|
+
const register_type_enum_1 = require("./register-type.enum");
|
|
6
7
|
/**
|
|
7
8
|
* User Response Schema
|
|
8
9
|
*/
|
|
@@ -11,6 +12,7 @@ exports.UserResponseSchema = zod_1.z.object({
|
|
|
11
12
|
email: zod_1.z.string().regex(regex_1.EMAIL_REGEX),
|
|
12
13
|
name: zod_1.z.string(),
|
|
13
14
|
role: zod_1.z.string(),
|
|
15
|
+
registerType: zod_1.z.nativeEnum(register_type_enum_1.RegisterType),
|
|
14
16
|
marketingConsent: zod_1.z.boolean(),
|
|
15
17
|
createdAt: zod_1.z.string().regex(regex_1.DATETIME_REGEX),
|
|
16
18
|
});
|