@veruna/api-contracts 1.0.44 → 1.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/build/controllers/index.d.ts +1 -0
  2. package/build/controllers/index.js +3 -1
  3. package/build/controllers/page-hints.controllers.d.ts +4 -0
  4. package/build/controllers/page-hints.controllers.js +7 -0
  5. package/build/rest-api.d.ts +9 -0
  6. package/build/rest-api.js +10 -0
  7. package/build/routes/index.d.ts +1 -0
  8. package/build/routes/index.js +3 -1
  9. package/build/routes/page-hints.routes.d.ts +10 -0
  10. package/build/routes/page-hints.routes.js +13 -0
  11. package/build/shared/api-error-response.schema.d.ts +3 -0
  12. package/build/shared/api-error-response.schema.js +7 -1
  13. package/build/v1/ai-model/admin/commands/create-model.command.d.ts +1 -1
  14. package/build/v1/ai-model/admin/commands/update-model.command.d.ts +1 -1
  15. package/build/v1/ai-model/schemas/create-model-request.schema.d.ts +1 -1
  16. package/build/v1/ai-model/schemas/create-model-request.schema.js +1 -1
  17. package/build/v1/ai-model/schemas/update-model-request.schema.d.ts +1 -1
  18. package/build/v1/ai-model/schemas/update-model-request.schema.js +1 -1
  19. package/build/v1/index.d.ts +2 -0
  20. package/build/v1/index.js +2 -0
  21. package/build/v1/message/commands/create-message.command.d.ts +10 -0
  22. package/build/v1/message/schemas/index.d.ts +3 -1
  23. package/build/v1/message/schemas/index.js +6 -1
  24. package/build/v1/message/schemas/message-attachment.schema.d.ts +27 -0
  25. package/build/v1/message/schemas/message-attachment.schema.js +28 -0
  26. package/build/v1/message/schemas/stream-events.schema.d.ts +26 -0
  27. package/build/v1/message/schemas/stream-events.schema.js +20 -1
  28. package/build/v1/page-hints/admin/commands/create-hint.command.d.ts +20 -0
  29. package/build/v1/page-hints/admin/commands/create-hint.command.js +13 -0
  30. package/build/v1/page-hints/admin/commands/delete-hint.command.d.ts +5 -0
  31. package/build/v1/page-hints/admin/commands/delete-hint.command.js +10 -0
  32. package/build/v1/page-hints/admin/commands/index.d.ts +3 -0
  33. package/build/v1/page-hints/admin/commands/index.js +9 -0
  34. package/build/v1/page-hints/admin/commands/update-hint.command.d.ts +20 -0
  35. package/build/v1/page-hints/admin/commands/update-hint.command.js +13 -0
  36. package/build/v1/page-hints/admin/queries/get-hint.query.d.ts +15 -0
  37. package/build/v1/page-hints/admin/queries/get-hint.query.js +12 -0
  38. package/build/v1/page-hints/admin/queries/get-hints.query.d.ts +15 -0
  39. package/build/v1/page-hints/admin/queries/get-hints.query.js +13 -0
  40. package/build/v1/page-hints/admin/queries/index.d.ts +2 -0
  41. package/build/v1/page-hints/admin/queries/index.js +7 -0
  42. package/build/v1/page-hints/index.d.ts +7 -0
  43. package/build/v1/page-hints/index.js +30 -0
  44. package/build/v1/page-hints/page-hints.errors.d.ts +8 -0
  45. package/build/v1/page-hints/page-hints.errors.js +31 -0
  46. package/build/v1/page-hints/schemas/create-hint-request.schema.d.ts +9 -0
  47. package/build/v1/page-hints/schemas/create-hint-request.schema.js +11 -0
  48. package/build/v1/page-hints/schemas/hint-response.schema.d.ts +22 -0
  49. package/build/v1/page-hints/schemas/hint-response.schema.js +24 -0
  50. package/build/v1/page-hints/schemas/index.d.ts +3 -0
  51. package/build/v1/page-hints/schemas/index.js +10 -0
  52. package/build/v1/page-hints/schemas/update-hint-request.schema.d.ts +9 -0
  53. package/build/v1/page-hints/schemas/update-hint-request.schema.js +11 -0
  54. package/build/v1/s3/index.d.ts +1 -0
  55. package/build/v1/s3/index.js +17 -0
  56. package/build/v1/s3/s3.errors.d.ts +13 -0
  57. package/build/v1/s3/s3.errors.js +29 -0
  58. package/build/v1/seo-pages/public/queries/get-page-by-alias.query.d.ts +5 -0
  59. package/build/v1/seo-pages/public/queries/get-page-by-alias.query.js +1 -1
  60. package/build/v1/seo-pages/schemas/index.d.ts +1 -1
  61. package/build/v1/seo-pages/schemas/index.js +2 -1
  62. package/build/v1/seo-pages/schemas/page-response.schema.d.ts +33 -0
  63. package/build/v1/seo-pages/schemas/page-response.schema.js +8 -1
  64. package/package.json +1 -1
@@ -15,3 +15,4 @@ export { MESSAGE_UNREG_CONTROLLER, MESSAGE_REG_CONTROLLER } from './message.cont
15
15
  export { VERIFICATION_CONTROLLER } from './verification.controllers';
16
16
  export { SITEMAP_CONTROLLER } from './sitemap.controllers';
17
17
  export { WALLET_CONTROLLER } from './wallet.controllers';
18
+ export { PAGE_HINTS_ADMIN_CONTROLLER } from './page-hints.controllers';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- 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.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
  */
@@ -42,3 +42,5 @@ var sitemap_controllers_1 = require("./sitemap.controllers");
42
42
  Object.defineProperty(exports, "SITEMAP_CONTROLLER", { enumerable: true, get: function () { return sitemap_controllers_1.SITEMAP_CONTROLLER; } });
43
43
  var wallet_controllers_1 = require("./wallet.controllers");
44
44
  Object.defineProperty(exports, "WALLET_CONTROLLER", { enumerable: true, get: function () { return wallet_controllers_1.WALLET_CONTROLLER; } });
45
+ var page_hints_controllers_1 = require("./page-hints.controllers");
46
+ Object.defineProperty(exports, "PAGE_HINTS_ADMIN_CONTROLLER", { enumerable: true, get: function () { return page_hints_controllers_1.PAGE_HINTS_ADMIN_CONTROLLER; } });
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Page Hints Controller paths for NestJS @Controller decorator
3
+ */
4
+ export declare const PAGE_HINTS_ADMIN_CONTROLLER: "v1/admin/seo-pages/:pageUuid/hints";
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PAGE_HINTS_ADMIN_CONTROLLER = void 0;
4
+ /**
5
+ * Page Hints Controller paths for NestJS @Controller decorator
6
+ */
7
+ exports.PAGE_HINTS_ADMIN_CONTROLLER = 'v1/admin/seo-pages/:pageUuid/hints';
@@ -81,6 +81,15 @@ export declare const REST_API: {
81
81
  readonly GET_BY_ALIAS: (alias: string) => string;
82
82
  };
83
83
  };
84
+ readonly PAGE_HINTS: {
85
+ readonly ADMIN: {
86
+ readonly CREATE: (pageUuid: string) => string;
87
+ readonly GET_ALL: (pageUuid: string) => string;
88
+ readonly GET_BY_UUID: (pageUuid: string, hintUuid: string) => string;
89
+ readonly UPDATE: (pageUuid: string, hintUuid: string) => string;
90
+ readonly DELETE: (pageUuid: string, hintUuid: string) => string;
91
+ };
92
+ };
84
93
  readonly AI_PROVIDER: {
85
94
  readonly ADMIN: {
86
95
  readonly CREATE: "/api/v1/admin/ai-providers/";
package/build/rest-api.js CHANGED
@@ -91,6 +91,16 @@ exports.REST_API = {
91
91
  GET_BY_ALIAS: (alias) => `${exports.ROOT}/${controllers_1.SEO_PAGES_PUBLIC_CONTROLLER}/${alias}`,
92
92
  },
93
93
  },
94
+ // Page Hints module (nested under SEO Pages)
95
+ PAGE_HINTS: {
96
+ ADMIN: {
97
+ CREATE: (pageUuid) => `${exports.ROOT}/${controllers_1.PAGE_HINTS_ADMIN_CONTROLLER.replace(':pageUuid', pageUuid)}/${routes_1.PAGE_HINTS_ROUTES.CREATE}`,
98
+ GET_ALL: (pageUuid) => `${exports.ROOT}/${controllers_1.PAGE_HINTS_ADMIN_CONTROLLER.replace(':pageUuid', pageUuid)}/${routes_1.PAGE_HINTS_ROUTES.GET_ALL}`,
99
+ GET_BY_UUID: (pageUuid, hintUuid) => `${exports.ROOT}/${controllers_1.PAGE_HINTS_ADMIN_CONTROLLER.replace(':pageUuid', pageUuid)}/${hintUuid}`,
100
+ UPDATE: (pageUuid, hintUuid) => `${exports.ROOT}/${controllers_1.PAGE_HINTS_ADMIN_CONTROLLER.replace(':pageUuid', pageUuid)}/${hintUuid}`,
101
+ DELETE: (pageUuid, hintUuid) => `${exports.ROOT}/${controllers_1.PAGE_HINTS_ADMIN_CONTROLLER.replace(':pageUuid', pageUuid)}/${hintUuid}`,
102
+ },
103
+ },
94
104
  // AI Provider module
95
105
  AI_PROVIDER: {
96
106
  ADMIN: {
@@ -21,3 +21,4 @@ export { MESSAGE_UNREG_ROUTES, MESSAGE_REG_ROUTES } from './message.routes';
21
21
  export { VERIFICATION_ROUTES } from './verification.routes';
22
22
  export { SITEMAP_ROUTES } from './sitemap.routes';
23
23
  export { WALLET_ROUTES } from './wallet.routes';
24
+ export { PAGE_HINTS_ROUTES } from './page-hints.routes';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- 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.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
  */
@@ -48,3 +48,5 @@ var sitemap_routes_1 = require("./sitemap.routes");
48
48
  Object.defineProperty(exports, "SITEMAP_ROUTES", { enumerable: true, get: function () { return sitemap_routes_1.SITEMAP_ROUTES; } });
49
49
  var wallet_routes_1 = require("./wallet.routes");
50
50
  Object.defineProperty(exports, "WALLET_ROUTES", { enumerable: true, get: function () { return wallet_routes_1.WALLET_ROUTES; } });
51
+ var page_hints_routes_1 = require("./page-hints.routes");
52
+ Object.defineProperty(exports, "PAGE_HINTS_ROUTES", { enumerable: true, get: function () { return page_hints_routes_1.PAGE_HINTS_ROUTES; } });
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Page Hints Admin Routes
3
+ */
4
+ export declare const PAGE_HINTS_ROUTES: {
5
+ readonly CREATE: "";
6
+ readonly GET_ALL: "";
7
+ readonly GET_BY_UUID: ":hintUuid";
8
+ readonly UPDATE: ":hintUuid";
9
+ readonly DELETE: ":hintUuid";
10
+ };
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PAGE_HINTS_ROUTES = void 0;
4
+ /**
5
+ * Page Hints Admin Routes
6
+ */
7
+ exports.PAGE_HINTS_ROUTES = {
8
+ CREATE: '',
9
+ GET_ALL: '',
10
+ GET_BY_UUID: ':hintUuid',
11
+ UPDATE: ':hintUuid',
12
+ DELETE: ':hintUuid',
13
+ };
@@ -8,12 +8,14 @@ import { z } from 'zod';
8
8
  * @example
9
9
  * {
10
10
  * "code": "EMAIL_ALREADY_EXISTS",
11
+ * "message": "Email already exists",
11
12
  * "requestId": "41572f77-891e-4d64-9887-6f31b952e0a1"
12
13
  * }
13
14
  *
14
15
  * @example with details (validation errors)
15
16
  * {
16
17
  * "code": "VALIDATION_ERROR",
18
+ * "message": "Validation failed",
17
19
  * "requestId": "41572f77-891e-4d64-9887-6f31b952e0a1",
18
20
  * "details": {
19
21
  * "email": ["Invalid email format"],
@@ -23,6 +25,7 @@ import { z } from 'zod';
23
25
  */
24
26
  export declare const ApiErrorResponseSchema: z.ZodObject<{
25
27
  code: z.ZodString;
28
+ message: z.ZodString;
26
29
  requestId: z.ZodString;
27
30
  details: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodString>, z.ZodString]>>;
28
31
  }, z.core.$strip>;
@@ -11,12 +11,14 @@ const zod_1 = require("zod");
11
11
  * @example
12
12
  * {
13
13
  * "code": "EMAIL_ALREADY_EXISTS",
14
+ * "message": "Email already exists",
14
15
  * "requestId": "41572f77-891e-4d64-9887-6f31b952e0a1"
15
16
  * }
16
17
  *
17
18
  * @example with details (validation errors)
18
19
  * {
19
20
  * "code": "VALIDATION_ERROR",
21
+ * "message": "Validation failed",
20
22
  * "requestId": "41572f77-891e-4d64-9887-6f31b952e0a1",
21
23
  * "details": {
22
24
  * "email": ["Invalid email format"],
@@ -27,8 +29,12 @@ const zod_1 = require("zod");
27
29
  exports.ApiErrorResponseSchema = zod_1.z.object({
28
30
  /** Error code for client-side localization and error handling */
29
31
  code: zod_1.z.string(),
32
+ /** Human-readable error message */
33
+ message: zod_1.z.string(),
30
34
  /** Unique request identifier for debugging and support */
31
35
  requestId: zod_1.z.string().uuid(),
32
36
  /** Optional error details (validation errors, additional context) */
33
- details: zod_1.z.union([zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()), zod_1.z.array(zod_1.z.string()), zod_1.z.string()]).optional(),
37
+ details: zod_1.z
38
+ .union([zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()), zod_1.z.array(zod_1.z.string()), zod_1.z.string()])
39
+ .optional(),
34
40
  });
@@ -14,7 +14,7 @@ export declare namespace AdminAiModelCreateCommand {
14
14
  speed: z.ZodDefault<z.ZodNumber>;
15
15
  bestFor: z.ZodDefault<z.ZodArray<z.ZodString>>;
16
16
  usageExamples: z.ZodDefault<z.ZodArray<z.ZodString>>;
17
- contextLength: z.ZodDefault<z.ZodBigInt>;
17
+ contextLength: z.ZodDefault<z.ZodNumber>;
18
18
  apiProvider: z.ZodDefault<z.ZodEnum<typeof import("../../schemas").ApiProvider>>;
19
19
  inputModalities: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof import("../../schemas").Modality>>>;
20
20
  outputModalities: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof import("../../schemas").Modality>>>;
@@ -14,7 +14,7 @@ export declare namespace AdminAiModelUpdateCommand {
14
14
  speed: z.ZodOptional<z.ZodNumber>;
15
15
  bestFor: z.ZodOptional<z.ZodArray<z.ZodString>>;
16
16
  usageExamples: z.ZodOptional<z.ZodArray<z.ZodString>>;
17
- contextLength: z.ZodOptional<z.ZodBigInt>;
17
+ contextLength: z.ZodOptional<z.ZodNumber>;
18
18
  apiProvider: z.ZodOptional<z.ZodEnum<typeof import("../../schemas").ApiProvider>>;
19
19
  inputModalities: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof import("../../schemas").Modality>>>;
20
20
  outputModalities: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof import("../../schemas").Modality>>>;
@@ -17,7 +17,7 @@ export declare const CreateModelRequestSchema: z.ZodObject<{
17
17
  speed: z.ZodDefault<z.ZodNumber>;
18
18
  bestFor: z.ZodDefault<z.ZodArray<z.ZodString>>;
19
19
  usageExamples: z.ZodDefault<z.ZodArray<z.ZodString>>;
20
- contextLength: z.ZodDefault<z.ZodBigInt>;
20
+ contextLength: z.ZodDefault<z.ZodNumber>;
21
21
  apiProvider: z.ZodDefault<z.ZodEnum<typeof ApiProvider>>;
22
22
  inputModalities: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof Modality>>>;
23
23
  outputModalities: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof Modality>>>;
@@ -25,7 +25,7 @@ exports.CreateModelRequestSchema = zod_1.z.object({
25
25
  speed: zod_1.z.number().int().min(1).max(5).default(3),
26
26
  bestFor: zod_1.z.array(zod_1.z.string()).default([]),
27
27
  usageExamples: zod_1.z.array(zod_1.z.string()).default([]),
28
- contextLength: zod_1.z.bigint().positive().default(BigInt(128000)),
28
+ contextLength: zod_1.z.number().int().positive().default(128000),
29
29
  apiProvider: zod_1.z.nativeEnum(api_provider_enum_1.ApiProvider).default(api_provider_enum_1.ApiProvider.OPENROUTER),
30
30
  inputModalities: zod_1.z.array(zod_1.z.nativeEnum(modality_enum_1.Modality)).default([modality_enum_1.Modality.TEXT]),
31
31
  outputModalities: zod_1.z.array(zod_1.z.nativeEnum(modality_enum_1.Modality)).default([modality_enum_1.Modality.TEXT]),
@@ -17,7 +17,7 @@ export declare const UpdateModelRequestSchema: z.ZodObject<{
17
17
  speed: z.ZodOptional<z.ZodNumber>;
18
18
  bestFor: z.ZodOptional<z.ZodArray<z.ZodString>>;
19
19
  usageExamples: z.ZodOptional<z.ZodArray<z.ZodString>>;
20
- contextLength: z.ZodOptional<z.ZodBigInt>;
20
+ contextLength: z.ZodOptional<z.ZodNumber>;
21
21
  apiProvider: z.ZodOptional<z.ZodEnum<typeof ApiProvider>>;
22
22
  inputModalities: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof Modality>>>;
23
23
  outputModalities: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof Modality>>>;
@@ -26,7 +26,7 @@ exports.UpdateModelRequestSchema = zod_1.z.object({
26
26
  speed: zod_1.z.number().int().min(1).max(5).optional(),
27
27
  bestFor: zod_1.z.array(zod_1.z.string()).optional(),
28
28
  usageExamples: zod_1.z.array(zod_1.z.string()).optional(),
29
- contextLength: zod_1.z.bigint().positive().optional(),
29
+ contextLength: zod_1.z.number().int().positive().optional(),
30
30
  apiProvider: zod_1.z.nativeEnum(api_provider_enum_1.ApiProvider).optional(),
31
31
  inputModalities: zod_1.z.array(zod_1.z.nativeEnum(modality_enum_1.Modality)).optional(),
32
32
  outputModalities: zod_1.z.array(zod_1.z.nativeEnum(modality_enum_1.Modality)).optional(),
@@ -16,3 +16,5 @@ export * from './sitemap';
16
16
  export * from './wallet';
17
17
  export * from './email-validation';
18
18
  export * from './registration-antifraud';
19
+ export * from './page-hints';
20
+ export * from './s3';
package/build/v1/index.js CHANGED
@@ -32,3 +32,5 @@ __exportStar(require("./sitemap"), exports);
32
32
  __exportStar(require("./wallet"), exports);
33
33
  __exportStar(require("./email-validation"), exports);
34
34
  __exportStar(require("./registration-antifraud"), exports);
35
+ __exportStar(require("./page-hints"), exports);
36
+ __exportStar(require("./s3"), exports);
@@ -51,6 +51,7 @@ export declare namespace CreateMessageCommand {
51
51
  chatId: z.ZodString;
52
52
  messageId: z.ZodString;
53
53
  type: z.ZodLiteral<import("../schemas").StreamEventType.REASONING>;
54
+ content: z.ZodLiteral<"">;
54
55
  reasoning: z.ZodString;
55
56
  reasoningDetails: z.ZodOptional<z.ZodArray<z.ZodObject<{
56
57
  type: z.ZodString;
@@ -58,6 +59,15 @@ export declare namespace CreateMessageCommand {
58
59
  format: z.ZodOptional<z.ZodString>;
59
60
  index: z.ZodOptional<z.ZodNumber>;
60
61
  }, z.core.$strip>>>;
62
+ }, z.core.$strip>, z.ZodObject<{
63
+ id: z.ZodNumber;
64
+ chatId: z.ZodString;
65
+ messageId: z.ZodString;
66
+ type: z.ZodLiteral<import("../schemas").StreamEventType.IMAGE>;
67
+ content: z.ZodLiteral<"">;
68
+ imageBase64: z.ZodString;
69
+ imageMimeType: z.ZodString;
70
+ imageIndex: z.ZodNumber;
61
71
  }, z.core.$strip>, z.ZodObject<{
62
72
  id: z.ZodNumber;
63
73
  chatId: z.ZodString;
@@ -4,7 +4,9 @@ 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, StreamDoneEventSchema, StreamErrorEventSchema, } from './stream-events.schema';
7
+ export { StreamEventType, StreamEventSchema, StreamChunkEventSchema, StreamReasoningEventSchema, StreamImageEventSchema, StreamDoneEventSchema, StreamErrorEventSchema, } from './stream-events.schema';
8
+ export { AttachmentType, AttachmentSchema, AttachmentsSchema } from './message-attachment.schema';
9
+ export type { Attachment, Attachments } from './message-attachment.schema';
8
10
  export { MessageMetaSchema, ReasoningMetaSchema, ReasoningDetailSchema, } from './message-meta.schema';
9
11
  export { RateMessageRequestSchema, RateMessageResponseSchema, RateMessageParamsSchema, } from './rate-message.schema';
10
12
  export type { RateMessageRequestDto, RateMessageResponseDto, RateMessageParamsDto, } from './rate-message.schema';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RateMessageParamsSchema = exports.RateMessageResponseSchema = exports.RateMessageRequestSchema = exports.ReasoningDetailSchema = exports.ReasoningMetaSchema = exports.MessageMetaSchema = exports.StreamErrorEventSchema = exports.StreamDoneEventSchema = exports.StreamReasoningEventSchema = exports.StreamChunkEventSchema = exports.StreamEventSchema = exports.StreamEventType = exports.MessageResponseSchema = exports.CreateMessageResponseSchema = exports.CreateMessageRequestSchema = exports.UserRating = exports.MessageStatus = exports.MessageRole = void 0;
3
+ exports.RateMessageParamsSchema = exports.RateMessageResponseSchema = exports.RateMessageRequestSchema = exports.ReasoningDetailSchema = exports.ReasoningMetaSchema = exports.MessageMetaSchema = exports.AttachmentsSchema = exports.AttachmentSchema = exports.AttachmentType = exports.StreamErrorEventSchema = exports.StreamDoneEventSchema = 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");
@@ -18,8 +18,13 @@ Object.defineProperty(exports, "StreamEventType", { enumerable: true, get: funct
18
18
  Object.defineProperty(exports, "StreamEventSchema", { enumerable: true, get: function () { return stream_events_schema_1.StreamEventSchema; } });
19
19
  Object.defineProperty(exports, "StreamChunkEventSchema", { enumerable: true, get: function () { return stream_events_schema_1.StreamChunkEventSchema; } });
20
20
  Object.defineProperty(exports, "StreamReasoningEventSchema", { enumerable: true, get: function () { return stream_events_schema_1.StreamReasoningEventSchema; } });
21
+ Object.defineProperty(exports, "StreamImageEventSchema", { enumerable: true, get: function () { return stream_events_schema_1.StreamImageEventSchema; } });
21
22
  Object.defineProperty(exports, "StreamDoneEventSchema", { enumerable: true, get: function () { return stream_events_schema_1.StreamDoneEventSchema; } });
22
23
  Object.defineProperty(exports, "StreamErrorEventSchema", { enumerable: true, get: function () { return stream_events_schema_1.StreamErrorEventSchema; } });
24
+ var message_attachment_schema_1 = require("./message-attachment.schema");
25
+ Object.defineProperty(exports, "AttachmentType", { enumerable: true, get: function () { return message_attachment_schema_1.AttachmentType; } });
26
+ Object.defineProperty(exports, "AttachmentSchema", { enumerable: true, get: function () { return message_attachment_schema_1.AttachmentSchema; } });
27
+ Object.defineProperty(exports, "AttachmentsSchema", { enumerable: true, get: function () { return message_attachment_schema_1.AttachmentsSchema; } });
23
28
  var message_meta_schema_1 = require("./message-meta.schema");
24
29
  Object.defineProperty(exports, "MessageMetaSchema", { enumerable: true, get: function () { return message_meta_schema_1.MessageMetaSchema; } });
25
30
  Object.defineProperty(exports, "ReasoningMetaSchema", { enumerable: true, get: function () { return message_meta_schema_1.ReasoningMetaSchema; } });
@@ -0,0 +1,27 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Attachment types for message assets
4
+ */
5
+ export declare enum AttachmentType {
6
+ IMAGE = "image"
7
+ }
8
+ /**
9
+ * Attachment schema - stores S3 reference for generated assets
10
+ * Used internally for file management (deletion, tracking)
11
+ * NOT sent to frontend - frontend gets images via markdown in content
12
+ */
13
+ export declare const AttachmentSchema: z.ZodObject<{
14
+ type: z.ZodEnum<typeof AttachmentType>;
15
+ key: z.ZodString;
16
+ bucket: z.ZodString;
17
+ }, z.core.$strip>;
18
+ export type Attachment = z.infer<typeof AttachmentSchema>;
19
+ /**
20
+ * Array of attachments for message
21
+ */
22
+ export declare const AttachmentsSchema: z.ZodArray<z.ZodObject<{
23
+ type: z.ZodEnum<typeof AttachmentType>;
24
+ key: z.ZodString;
25
+ bucket: z.ZodString;
26
+ }, z.core.$strip>>;
27
+ export type Attachments = z.infer<typeof AttachmentsSchema>;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AttachmentsSchema = exports.AttachmentSchema = exports.AttachmentType = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * Attachment types for message assets
7
+ */
8
+ var AttachmentType;
9
+ (function (AttachmentType) {
10
+ AttachmentType["IMAGE"] = "image";
11
+ })(AttachmentType || (exports.AttachmentType = AttachmentType = {}));
12
+ /**
13
+ * Attachment schema - stores S3 reference for generated assets
14
+ * Used internally for file management (deletion, tracking)
15
+ * NOT sent to frontend - frontend gets images via markdown in content
16
+ */
17
+ exports.AttachmentSchema = zod_1.z.object({
18
+ /** Asset type */
19
+ type: zod_1.z.nativeEnum(AttachmentType),
20
+ /** S3 object key */
21
+ key: zod_1.z.string().min(1),
22
+ /** S3 bucket name */
23
+ bucket: zod_1.z.string().min(1),
24
+ });
25
+ /**
26
+ * Array of attachments for message
27
+ */
28
+ exports.AttachmentsSchema = zod_1.z.array(exports.AttachmentSchema);
@@ -7,6 +7,8 @@ export declare enum StreamEventType {
7
7
  CHUNK = "chunk",
8
8
  /** Reasoning chunk from AI */
9
9
  REASONING = "reasoning",
10
+ /** Image generated by AI */
11
+ IMAGE = "image",
10
12
  /** Stream completed successfully */
11
13
  DONE = "done",
12
14
  /** Error occurred during streaming */
@@ -30,6 +32,7 @@ export declare const StreamReasoningEventSchema: z.ZodObject<{
30
32
  chatId: z.ZodString;
31
33
  messageId: z.ZodString;
32
34
  type: z.ZodLiteral<StreamEventType.REASONING>;
35
+ content: z.ZodLiteral<"">;
33
36
  reasoning: z.ZodString;
34
37
  reasoningDetails: z.ZodOptional<z.ZodArray<z.ZodObject<{
35
38
  type: z.ZodString;
@@ -58,6 +61,19 @@ export declare const StreamErrorEventSchema: z.ZodObject<{
58
61
  type: z.ZodLiteral<StreamEventType.ERROR>;
59
62
  content: z.ZodLiteral<"">;
60
63
  }, z.core.$strip>;
64
+ /**
65
+ * Image event - AI generated image (base64)
66
+ */
67
+ export declare const StreamImageEventSchema: z.ZodObject<{
68
+ id: z.ZodNumber;
69
+ chatId: z.ZodString;
70
+ messageId: z.ZodString;
71
+ type: z.ZodLiteral<StreamEventType.IMAGE>;
72
+ content: z.ZodLiteral<"">;
73
+ imageBase64: z.ZodString;
74
+ imageMimeType: z.ZodString;
75
+ imageIndex: z.ZodNumber;
76
+ }, z.core.$strip>;
61
77
  /**
62
78
  * Discriminated union of all stream events
63
79
  * Use `type` field to narrow the type
@@ -73,6 +89,7 @@ export declare const StreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
73
89
  chatId: z.ZodString;
74
90
  messageId: z.ZodString;
75
91
  type: z.ZodLiteral<StreamEventType.REASONING>;
92
+ content: z.ZodLiteral<"">;
76
93
  reasoning: z.ZodString;
77
94
  reasoningDetails: z.ZodOptional<z.ZodArray<z.ZodObject<{
78
95
  type: z.ZodString;
@@ -80,6 +97,15 @@ export declare const StreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
80
97
  format: z.ZodOptional<z.ZodString>;
81
98
  index: z.ZodOptional<z.ZodNumber>;
82
99
  }, z.core.$strip>>>;
100
+ }, z.core.$strip>, z.ZodObject<{
101
+ id: z.ZodNumber;
102
+ chatId: z.ZodString;
103
+ messageId: z.ZodString;
104
+ type: z.ZodLiteral<StreamEventType.IMAGE>;
105
+ content: z.ZodLiteral<"">;
106
+ imageBase64: z.ZodString;
107
+ imageMimeType: z.ZodString;
108
+ imageIndex: z.ZodNumber;
83
109
  }, z.core.$strip>, z.ZodObject<{
84
110
  id: z.ZodNumber;
85
111
  chatId: z.ZodString;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StreamEventSchema = exports.StreamErrorEventSchema = exports.StreamDoneEventSchema = exports.StreamReasoningEventSchema = exports.StreamChunkEventSchema = exports.StreamEventType = void 0;
3
+ exports.StreamEventSchema = exports.StreamImageEventSchema = exports.StreamErrorEventSchema = exports.StreamDoneEventSchema = exports.StreamReasoningEventSchema = exports.StreamChunkEventSchema = exports.StreamEventType = void 0;
4
4
  const zod_1 = require("zod");
5
5
  /**
6
6
  * Stream Event Types for message streaming (NDJSON format)
@@ -11,6 +11,8 @@ var StreamEventType;
11
11
  StreamEventType["CHUNK"] = "chunk";
12
12
  /** Reasoning chunk from AI */
13
13
  StreamEventType["REASONING"] = "reasoning";
14
+ /** Image generated by AI */
15
+ StreamEventType["IMAGE"] = "image";
14
16
  /** Stream completed successfully */
15
17
  StreamEventType["DONE"] = "done";
16
18
  /** Error occurred during streaming */
@@ -43,6 +45,8 @@ exports.StreamChunkEventSchema = BaseStreamEventSchema.extend({
43
45
  */
44
46
  exports.StreamReasoningEventSchema = BaseStreamEventSchema.extend({
45
47
  type: zod_1.z.literal(StreamEventType.REASONING),
48
+ /** Always empty for reasoning event */
49
+ content: zod_1.z.literal(''),
46
50
  /** Partial reasoning text */
47
51
  reasoning: zod_1.z.string().min(1),
48
52
  reasoningDetails: zod_1.z
@@ -70,6 +74,20 @@ exports.StreamErrorEventSchema = BaseStreamEventSchema.extend({
70
74
  /** Always empty for error event */
71
75
  content: zod_1.z.literal(''),
72
76
  });
77
+ /**
78
+ * Image event - AI generated image (base64)
79
+ */
80
+ exports.StreamImageEventSchema = BaseStreamEventSchema.extend({
81
+ type: zod_1.z.literal(StreamEventType.IMAGE),
82
+ /** Always empty for image event */
83
+ content: zod_1.z.literal(''),
84
+ /** Base64 encoded image data */
85
+ imageBase64: zod_1.z.string().min(1),
86
+ /** Image MIME type (image/jpeg, image/png, etc.) */
87
+ imageMimeType: zod_1.z.string().min(1),
88
+ /** Image index (for multiple images in one message) */
89
+ imageIndex: zod_1.z.number().int().nonnegative(),
90
+ });
73
91
  // ============================================================================
74
92
  // Union Schema
75
93
  // ============================================================================
@@ -80,6 +98,7 @@ exports.StreamErrorEventSchema = BaseStreamEventSchema.extend({
80
98
  exports.StreamEventSchema = zod_1.z.discriminatedUnion('type', [
81
99
  exports.StreamChunkEventSchema,
82
100
  exports.StreamReasoningEventSchema,
101
+ exports.StreamImageEventSchema,
83
102
  exports.StreamDoneEventSchema,
84
103
  exports.StreamErrorEventSchema,
85
104
  ]);
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../../shared/http-method';
3
+ export declare namespace AdminCreateHintCommand {
4
+ const Request: z.ZodObject<{
5
+ icon: z.ZodString;
6
+ title: z.ZodString;
7
+ }, z.core.$strip>;
8
+ const Response: z.ZodObject<{
9
+ uuid: z.ZodString;
10
+ icon: z.ZodString;
11
+ title: z.ZodString;
12
+ pageId: z.ZodString;
13
+ createdAt: z.ZodString;
14
+ updatedAt: z.ZodString;
15
+ }, z.core.$strip>;
16
+ const URL: (pageUuid: string) => string;
17
+ const METHOD = HttpMethod.POST;
18
+ type RequestType = z.infer<typeof Request>;
19
+ type ResponseType = z.infer<typeof Response>;
20
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminCreateHintCommand = void 0;
4
+ const schemas_1 = require("../../schemas");
5
+ const http_method_1 = require("../../../../shared/http-method");
6
+ const rest_api_1 = require("../../../../rest-api");
7
+ var AdminCreateHintCommand;
8
+ (function (AdminCreateHintCommand) {
9
+ AdminCreateHintCommand.Request = schemas_1.CreateHintRequestSchema;
10
+ AdminCreateHintCommand.Response = schemas_1.HintResponseSchema;
11
+ AdminCreateHintCommand.URL = rest_api_1.REST_API.V1.PAGE_HINTS.ADMIN.CREATE;
12
+ AdminCreateHintCommand.METHOD = http_method_1.HttpMethod.POST;
13
+ })(AdminCreateHintCommand || (exports.AdminCreateHintCommand = AdminCreateHintCommand = {}));
@@ -0,0 +1,5 @@
1
+ import { HttpMethod } from '../../../../shared/http-method';
2
+ export declare namespace AdminDeleteHintCommand {
3
+ const URL: (pageUuid: string, hintUuid: string) => string;
4
+ const METHOD = HttpMethod.DELETE;
5
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminDeleteHintCommand = void 0;
4
+ const http_method_1 = require("../../../../shared/http-method");
5
+ const rest_api_1 = require("../../../../rest-api");
6
+ var AdminDeleteHintCommand;
7
+ (function (AdminDeleteHintCommand) {
8
+ AdminDeleteHintCommand.URL = rest_api_1.REST_API.V1.PAGE_HINTS.ADMIN.DELETE;
9
+ AdminDeleteHintCommand.METHOD = http_method_1.HttpMethod.DELETE;
10
+ })(AdminDeleteHintCommand || (exports.AdminDeleteHintCommand = AdminDeleteHintCommand = {}));
@@ -0,0 +1,3 @@
1
+ export { AdminCreateHintCommand } from './create-hint.command';
2
+ export { AdminUpdateHintCommand } from './update-hint.command';
3
+ export { AdminDeleteHintCommand } from './delete-hint.command';
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminDeleteHintCommand = exports.AdminUpdateHintCommand = exports.AdminCreateHintCommand = void 0;
4
+ var create_hint_command_1 = require("./create-hint.command");
5
+ Object.defineProperty(exports, "AdminCreateHintCommand", { enumerable: true, get: function () { return create_hint_command_1.AdminCreateHintCommand; } });
6
+ var update_hint_command_1 = require("./update-hint.command");
7
+ Object.defineProperty(exports, "AdminUpdateHintCommand", { enumerable: true, get: function () { return update_hint_command_1.AdminUpdateHintCommand; } });
8
+ var delete_hint_command_1 = require("./delete-hint.command");
9
+ Object.defineProperty(exports, "AdminDeleteHintCommand", { enumerable: true, get: function () { return delete_hint_command_1.AdminDeleteHintCommand; } });
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../../shared/http-method';
3
+ export declare namespace AdminUpdateHintCommand {
4
+ const Request: z.ZodObject<{
5
+ icon: z.ZodOptional<z.ZodString>;
6
+ title: z.ZodOptional<z.ZodString>;
7
+ }, z.core.$strip>;
8
+ const Response: z.ZodObject<{
9
+ uuid: z.ZodString;
10
+ icon: z.ZodString;
11
+ title: z.ZodString;
12
+ pageId: z.ZodString;
13
+ createdAt: z.ZodString;
14
+ updatedAt: z.ZodString;
15
+ }, z.core.$strip>;
16
+ const URL: (pageUuid: string, hintUuid: string) => string;
17
+ const METHOD = HttpMethod.PATCH;
18
+ type RequestType = z.infer<typeof Request>;
19
+ type ResponseType = z.infer<typeof Response>;
20
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminUpdateHintCommand = void 0;
4
+ const schemas_1 = require("../../schemas");
5
+ const http_method_1 = require("../../../../shared/http-method");
6
+ const rest_api_1 = require("../../../../rest-api");
7
+ var AdminUpdateHintCommand;
8
+ (function (AdminUpdateHintCommand) {
9
+ AdminUpdateHintCommand.Request = schemas_1.UpdateHintRequestSchema;
10
+ AdminUpdateHintCommand.Response = schemas_1.HintResponseSchema;
11
+ AdminUpdateHintCommand.URL = rest_api_1.REST_API.V1.PAGE_HINTS.ADMIN.UPDATE;
12
+ AdminUpdateHintCommand.METHOD = http_method_1.HttpMethod.PATCH;
13
+ })(AdminUpdateHintCommand || (exports.AdminUpdateHintCommand = AdminUpdateHintCommand = {}));
@@ -0,0 +1,15 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../../shared/http-method';
3
+ export declare namespace AdminGetHintQuery {
4
+ const Response: z.ZodObject<{
5
+ uuid: z.ZodString;
6
+ icon: z.ZodString;
7
+ title: z.ZodString;
8
+ pageId: z.ZodString;
9
+ createdAt: z.ZodString;
10
+ updatedAt: z.ZodString;
11
+ }, z.core.$strip>;
12
+ const URL: (pageUuid: string, hintUuid: string) => string;
13
+ const METHOD = HttpMethod.GET;
14
+ type ResponseType = z.infer<typeof Response>;
15
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminGetHintQuery = void 0;
4
+ const schemas_1 = require("../../schemas");
5
+ const http_method_1 = require("../../../../shared/http-method");
6
+ const rest_api_1 = require("../../../../rest-api");
7
+ var AdminGetHintQuery;
8
+ (function (AdminGetHintQuery) {
9
+ AdminGetHintQuery.Response = schemas_1.HintResponseSchema;
10
+ AdminGetHintQuery.URL = rest_api_1.REST_API.V1.PAGE_HINTS.ADMIN.GET_BY_UUID;
11
+ AdminGetHintQuery.METHOD = http_method_1.HttpMethod.GET;
12
+ })(AdminGetHintQuery || (exports.AdminGetHintQuery = AdminGetHintQuery = {}));
@@ -0,0 +1,15 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../../shared/http-method';
3
+ export declare namespace AdminGetHintsQuery {
4
+ const Response: z.ZodArray<z.ZodObject<{
5
+ uuid: z.ZodString;
6
+ icon: z.ZodString;
7
+ title: z.ZodString;
8
+ pageId: z.ZodString;
9
+ createdAt: z.ZodString;
10
+ updatedAt: z.ZodString;
11
+ }, z.core.$strip>>;
12
+ const URL: (pageUuid: string) => string;
13
+ const METHOD = HttpMethod.GET;
14
+ type ResponseType = z.infer<typeof Response>;
15
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminGetHintsQuery = void 0;
4
+ const zod_1 = require("zod");
5
+ const schemas_1 = require("../../schemas");
6
+ const http_method_1 = require("../../../../shared/http-method");
7
+ const rest_api_1 = require("../../../../rest-api");
8
+ var AdminGetHintsQuery;
9
+ (function (AdminGetHintsQuery) {
10
+ AdminGetHintsQuery.Response = zod_1.z.array(schemas_1.HintResponseSchema);
11
+ AdminGetHintsQuery.URL = rest_api_1.REST_API.V1.PAGE_HINTS.ADMIN.GET_ALL;
12
+ AdminGetHintsQuery.METHOD = http_method_1.HttpMethod.GET;
13
+ })(AdminGetHintsQuery || (exports.AdminGetHintsQuery = AdminGetHintsQuery = {}));
@@ -0,0 +1,2 @@
1
+ export { AdminGetHintsQuery } from './get-hints.query';
2
+ export { AdminGetHintQuery } from './get-hint.query';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminGetHintQuery = exports.AdminGetHintsQuery = void 0;
4
+ var get_hints_query_1 = require("./get-hints.query");
5
+ Object.defineProperty(exports, "AdminGetHintsQuery", { enumerable: true, get: function () { return get_hints_query_1.AdminGetHintsQuery; } });
6
+ var get_hint_query_1 = require("./get-hint.query");
7
+ Object.defineProperty(exports, "AdminGetHintQuery", { enumerable: true, get: function () { return get_hint_query_1.AdminGetHintQuery; } });
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Centralized exports for Page Hints contracts
3
+ */
4
+ export { PageHintErrorCode, PAGE_HINT_ERRORS } from './page-hints.errors';
5
+ export * from './schemas';
6
+ export * from './admin/commands';
7
+ export * from './admin/queries';
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ /**
3
+ * Centralized exports for Page Hints contracts
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
17
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
18
+ };
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.PAGE_HINT_ERRORS = exports.PageHintErrorCode = void 0;
21
+ // Errors
22
+ var page_hints_errors_1 = require("./page-hints.errors");
23
+ Object.defineProperty(exports, "PageHintErrorCode", { enumerable: true, get: function () { return page_hints_errors_1.PageHintErrorCode; } });
24
+ Object.defineProperty(exports, "PAGE_HINT_ERRORS", { enumerable: true, get: function () { return page_hints_errors_1.PAGE_HINT_ERRORS; } });
25
+ // Schemas
26
+ __exportStar(require("./schemas"), exports);
27
+ // Admin Commands
28
+ __exportStar(require("./admin/commands"), exports);
29
+ // Admin Queries
30
+ __exportStar(require("./admin/queries"), exports);
@@ -0,0 +1,8 @@
1
+ import { ErrorMetadata } from '../../shared';
2
+ export declare enum PageHintErrorCode {
3
+ HINT_NOT_FOUND = "HINT_NOT_FOUND",
4
+ INVALID_HINT_ICON = "INVALID_HINT_ICON",
5
+ INVALID_HINT_TITLE = "INVALID_HINT_TITLE",
6
+ HINT_ACCESS_DENIED = "HINT_ACCESS_DENIED"
7
+ }
8
+ export declare const PAGE_HINT_ERRORS: Record<PageHintErrorCode, ErrorMetadata>;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PAGE_HINT_ERRORS = exports.PageHintErrorCode = void 0;
4
+ var PageHintErrorCode;
5
+ (function (PageHintErrorCode) {
6
+ // Not Found (404)
7
+ PageHintErrorCode["HINT_NOT_FOUND"] = "HINT_NOT_FOUND";
8
+ // Validation errors (400)
9
+ PageHintErrorCode["INVALID_HINT_ICON"] = "INVALID_HINT_ICON";
10
+ PageHintErrorCode["INVALID_HINT_TITLE"] = "INVALID_HINT_TITLE";
11
+ // Authorization errors (403)
12
+ PageHintErrorCode["HINT_ACCESS_DENIED"] = "HINT_ACCESS_DENIED";
13
+ })(PageHintErrorCode || (exports.PageHintErrorCode = PageHintErrorCode = {}));
14
+ exports.PAGE_HINT_ERRORS = {
15
+ [PageHintErrorCode.HINT_NOT_FOUND]: {
16
+ code: PageHintErrorCode.HINT_NOT_FOUND,
17
+ statusCode: 404,
18
+ },
19
+ [PageHintErrorCode.INVALID_HINT_ICON]: {
20
+ code: PageHintErrorCode.INVALID_HINT_ICON,
21
+ statusCode: 400,
22
+ },
23
+ [PageHintErrorCode.INVALID_HINT_TITLE]: {
24
+ code: PageHintErrorCode.INVALID_HINT_TITLE,
25
+ statusCode: 400,
26
+ },
27
+ [PageHintErrorCode.HINT_ACCESS_DENIED]: {
28
+ code: PageHintErrorCode.HINT_ACCESS_DENIED,
29
+ statusCode: 403,
30
+ },
31
+ };
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Create Page Hint Request Schema
4
+ */
5
+ export declare const CreateHintRequestSchema: z.ZodObject<{
6
+ icon: z.ZodString;
7
+ title: z.ZodString;
8
+ }, z.core.$strip>;
9
+ export type CreateHintRequestType = z.infer<typeof CreateHintRequestSchema>;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateHintRequestSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * Create Page Hint Request Schema
7
+ */
8
+ exports.CreateHintRequestSchema = zod_1.z.object({
9
+ icon: zod_1.z.string().min(1).max(50),
10
+ title: zod_1.z.string().min(1).max(255),
11
+ });
@@ -0,0 +1,22 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Full Page Hint Response Schema (for admin)
4
+ */
5
+ export declare const HintResponseSchema: z.ZodObject<{
6
+ uuid: z.ZodString;
7
+ icon: z.ZodString;
8
+ title: z.ZodString;
9
+ pageId: z.ZodString;
10
+ createdAt: z.ZodString;
11
+ updatedAt: z.ZodString;
12
+ }, z.core.$strip>;
13
+ export type HintResponseType = z.infer<typeof HintResponseSchema>;
14
+ /**
15
+ * Public Page Hint Response Schema (minimal fields)
16
+ */
17
+ export declare const PublicHintResponseSchema: z.ZodObject<{
18
+ uuid: z.ZodString;
19
+ icon: z.ZodString;
20
+ title: z.ZodString;
21
+ }, z.core.$strip>;
22
+ export type PublicHintResponseType = z.infer<typeof PublicHintResponseSchema>;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PublicHintResponseSchema = exports.HintResponseSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const shared_1 = require("../../../shared");
6
+ /**
7
+ * Full Page Hint Response Schema (for admin)
8
+ */
9
+ exports.HintResponseSchema = zod_1.z.object({
10
+ uuid: zod_1.z.string().regex(shared_1.UUID_REGEX),
11
+ icon: zod_1.z.string(),
12
+ title: zod_1.z.string(),
13
+ pageId: zod_1.z.string().regex(shared_1.UUID_REGEX),
14
+ createdAt: zod_1.z.string().regex(shared_1.DATETIME_REGEX),
15
+ updatedAt: zod_1.z.string().regex(shared_1.DATETIME_REGEX),
16
+ });
17
+ /**
18
+ * Public Page Hint Response Schema (minimal fields)
19
+ */
20
+ exports.PublicHintResponseSchema = zod_1.z.object({
21
+ uuid: zod_1.z.string().regex(shared_1.UUID_REGEX),
22
+ icon: zod_1.z.string(),
23
+ title: zod_1.z.string(),
24
+ });
@@ -0,0 +1,3 @@
1
+ export { HintResponseSchema, HintResponseType, PublicHintResponseSchema, PublicHintResponseType, } from './hint-response.schema';
2
+ export { CreateHintRequestSchema, CreateHintRequestType } from './create-hint-request.schema';
3
+ export { UpdateHintRequestSchema, UpdateHintRequestType } from './update-hint-request.schema';
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateHintRequestSchema = exports.CreateHintRequestSchema = exports.PublicHintResponseSchema = exports.HintResponseSchema = void 0;
4
+ var hint_response_schema_1 = require("./hint-response.schema");
5
+ Object.defineProperty(exports, "HintResponseSchema", { enumerable: true, get: function () { return hint_response_schema_1.HintResponseSchema; } });
6
+ Object.defineProperty(exports, "PublicHintResponseSchema", { enumerable: true, get: function () { return hint_response_schema_1.PublicHintResponseSchema; } });
7
+ var create_hint_request_schema_1 = require("./create-hint-request.schema");
8
+ Object.defineProperty(exports, "CreateHintRequestSchema", { enumerable: true, get: function () { return create_hint_request_schema_1.CreateHintRequestSchema; } });
9
+ var update_hint_request_schema_1 = require("./update-hint-request.schema");
10
+ Object.defineProperty(exports, "UpdateHintRequestSchema", { enumerable: true, get: function () { return update_hint_request_schema_1.UpdateHintRequestSchema; } });
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Update Page Hint Request Schema
4
+ */
5
+ export declare const UpdateHintRequestSchema: z.ZodObject<{
6
+ icon: z.ZodOptional<z.ZodString>;
7
+ title: z.ZodOptional<z.ZodString>;
8
+ }, z.core.$strip>;
9
+ export type UpdateHintRequestType = z.infer<typeof UpdateHintRequestSchema>;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateHintRequestSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * Update Page Hint Request Schema
7
+ */
8
+ exports.UpdateHintRequestSchema = zod_1.z.object({
9
+ icon: zod_1.z.string().min(1).max(50).optional(),
10
+ title: zod_1.z.string().min(1).max(255).optional(),
11
+ });
@@ -0,0 +1 @@
1
+ export * from './s3.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("./s3.errors"), exports);
@@ -0,0 +1,13 @@
1
+ import { ErrorMetadata } from '../../shared/error-metadata';
2
+ /**
3
+ * S3 Error Codes
4
+ */
5
+ export declare enum S3ErrorCode {
6
+ UPLOAD_FAILED = "S3_UPLOAD_FAILED",
7
+ INVALID_BASE64 = "S3_INVALID_BASE64",
8
+ DELETE_FAILED = "S3_DELETE_FAILED"
9
+ }
10
+ /**
11
+ * S3 Error Metadata mapping
12
+ */
13
+ export declare const S3_ERRORS: Record<S3ErrorCode, ErrorMetadata>;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.S3_ERRORS = exports.S3ErrorCode = void 0;
4
+ /**
5
+ * S3 Error Codes
6
+ */
7
+ var S3ErrorCode;
8
+ (function (S3ErrorCode) {
9
+ S3ErrorCode["UPLOAD_FAILED"] = "S3_UPLOAD_FAILED";
10
+ S3ErrorCode["INVALID_BASE64"] = "S3_INVALID_BASE64";
11
+ S3ErrorCode["DELETE_FAILED"] = "S3_DELETE_FAILED";
12
+ })(S3ErrorCode || (exports.S3ErrorCode = S3ErrorCode = {}));
13
+ /**
14
+ * S3 Error Metadata mapping
15
+ */
16
+ exports.S3_ERRORS = {
17
+ [S3ErrorCode.UPLOAD_FAILED]: {
18
+ code: S3ErrorCode.UPLOAD_FAILED,
19
+ statusCode: 500,
20
+ },
21
+ [S3ErrorCode.INVALID_BASE64]: {
22
+ code: S3ErrorCode.INVALID_BASE64,
23
+ statusCode: 400,
24
+ },
25
+ [S3ErrorCode.DELETE_FAILED]: {
26
+ code: S3ErrorCode.DELETE_FAILED,
27
+ statusCode: 500,
28
+ },
29
+ };
@@ -25,6 +25,11 @@ export declare namespace SeoPageGetPageByAliasQuery {
25
25
  marks: z.ZodArray<z.ZodString>;
26
26
  createdAt: z.ZodString;
27
27
  updatedAt: z.ZodString;
28
+ hints: z.ZodArray<z.ZodObject<{
29
+ uuid: z.ZodString;
30
+ icon: z.ZodString;
31
+ title: z.ZodString;
32
+ }, z.core.$strip>>;
28
33
  }, z.core.$strip>;
29
34
  const URL: (alias: string) => string;
30
35
  const METHOD = HttpMethod.GET;
@@ -8,7 +8,7 @@ const http_method_1 = require("../../../../shared/http-method");
8
8
  var SeoPageGetPageByAliasQuery;
9
9
  (function (SeoPageGetPageByAliasQuery) {
10
10
  SeoPageGetPageByAliasQuery.Request = zod_1.z.object({});
11
- SeoPageGetPageByAliasQuery.Response = schemas_1.PageResponseSchema;
11
+ SeoPageGetPageByAliasQuery.Response = schemas_1.PublicPageResponseSchema;
12
12
  SeoPageGetPageByAliasQuery.URL = (alias) => rest_api_1.REST_API.V1.SEO_PAGES.PUBLIC.GET_BY_ALIAS(alias);
13
13
  SeoPageGetPageByAliasQuery.METHOD = http_method_1.HttpMethod.GET;
14
14
  })(SeoPageGetPageByAliasQuery || (exports.SeoPageGetPageByAliasQuery = SeoPageGetPageByAliasQuery = {}));
@@ -2,7 +2,7 @@
2
2
  * Centralized exports for SEO Pages schemas
3
3
  */
4
4
  export { PageType } from './page-type.enum';
5
- export { PageResponseSchema, PageListItemSchema } from './page-response.schema';
5
+ export { PageResponseSchema, PageListItemSchema, PublicPageResponseSchema, type PublicPageResponseType, } from './page-response.schema';
6
6
  export { PageHierarchySubItemSchema, PageHierarchyItemSchema, PageHierarchyListSchema, PageHierarchyResponseSchema, type PageHierarchySubItem, type PageHierarchyItem, type PageHierarchyList, type PageHierarchyResponse, } from './page-hierarchy.schema';
7
7
  export { CreatePageRequestSchema } from './create-page-request.schema';
8
8
  export { UpdatePageRequestSchema } from './update-page-request.schema';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FaqItemSchema = exports.FaqSchema = exports.UpdatePageRequestSchema = exports.CreatePageRequestSchema = exports.PageHierarchyResponseSchema = exports.PageHierarchyListSchema = exports.PageHierarchyItemSchema = exports.PageHierarchySubItemSchema = exports.PageListItemSchema = exports.PageResponseSchema = exports.PageType = void 0;
3
+ exports.FaqItemSchema = exports.FaqSchema = exports.UpdatePageRequestSchema = exports.CreatePageRequestSchema = exports.PageHierarchyResponseSchema = exports.PageHierarchyListSchema = exports.PageHierarchyItemSchema = exports.PageHierarchySubItemSchema = exports.PublicPageResponseSchema = exports.PageListItemSchema = exports.PageResponseSchema = exports.PageType = void 0;
4
4
  /**
5
5
  * Centralized exports for SEO Pages schemas
6
6
  */
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "PageType", { enumerable: true, get: function ()
9
9
  var page_response_schema_1 = require("./page-response.schema");
10
10
  Object.defineProperty(exports, "PageResponseSchema", { enumerable: true, get: function () { return page_response_schema_1.PageResponseSchema; } });
11
11
  Object.defineProperty(exports, "PageListItemSchema", { enumerable: true, get: function () { return page_response_schema_1.PageListItemSchema; } });
12
+ Object.defineProperty(exports, "PublicPageResponseSchema", { enumerable: true, get: function () { return page_response_schema_1.PublicPageResponseSchema; } });
12
13
  var page_hierarchy_schema_1 = require("./page-hierarchy.schema");
13
14
  Object.defineProperty(exports, "PageHierarchySubItemSchema", { enumerable: true, get: function () { return page_hierarchy_schema_1.PageHierarchySubItemSchema; } });
14
15
  Object.defineProperty(exports, "PageHierarchyItemSchema", { enumerable: true, get: function () { return page_hierarchy_schema_1.PageHierarchyItemSchema; } });
@@ -47,3 +47,36 @@ export declare const PageListItemSchema: z.ZodObject<{
47
47
  createdAt: z.ZodString;
48
48
  updatedAt: z.ZodString;
49
49
  }, z.core.$strip>;
50
+ /**
51
+ * Public Page Response Schema (with hints)
52
+ */
53
+ export declare const PublicPageResponseSchema: z.ZodObject<{
54
+ uuid: z.ZodString;
55
+ metaTitle: z.ZodString;
56
+ metaDescription: z.ZodString;
57
+ title: z.ZodString;
58
+ description: z.ZodString;
59
+ content: z.ZodString;
60
+ alias: z.ZodString;
61
+ type: z.ZodEnum<typeof PageType>;
62
+ icon: z.ZodString;
63
+ faq: z.ZodObject<{
64
+ items: z.ZodDefault<z.ZodArray<z.ZodObject<{
65
+ question: z.ZodString;
66
+ answer: z.ZodString;
67
+ }, z.core.$strip>>>;
68
+ }, z.core.$strip>;
69
+ parentId: z.ZodNullable<z.ZodString>;
70
+ order: z.ZodNumber;
71
+ placeholder: z.ZodNullable<z.ZodString>;
72
+ seoName: z.ZodNullable<z.ZodString>;
73
+ marks: z.ZodArray<z.ZodString>;
74
+ createdAt: z.ZodString;
75
+ updatedAt: z.ZodString;
76
+ hints: z.ZodArray<z.ZodObject<{
77
+ uuid: z.ZodString;
78
+ icon: z.ZodString;
79
+ title: z.ZodString;
80
+ }, z.core.$strip>>;
81
+ }, z.core.$strip>;
82
+ export type PublicPageResponseType = z.infer<typeof PublicPageResponseSchema>;
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PageListItemSchema = exports.PageResponseSchema = void 0;
3
+ exports.PublicPageResponseSchema = exports.PageListItemSchema = exports.PageResponseSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const shared_1 = require("../../../shared");
6
6
  const page_type_enum_1 = require("./page-type.enum");
7
7
  const faq_schema_1 = require("./faq.schema");
8
+ const schemas_1 = require("../../page-hints/schemas");
8
9
  /**
9
10
  * SEO Page Response Schema (full, with content)
10
11
  */
@@ -49,3 +50,9 @@ exports.PageListItemSchema = zod_1.z.object({
49
50
  createdAt: zod_1.z.string().regex(shared_1.DATETIME_REGEX),
50
51
  updatedAt: zod_1.z.string().regex(shared_1.DATETIME_REGEX),
51
52
  });
53
+ /**
54
+ * Public Page Response Schema (with hints)
55
+ */
56
+ exports.PublicPageResponseSchema = exports.PageResponseSchema.extend({
57
+ hints: zod_1.z.array(schemas_1.PublicHintResponseSchema),
58
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veruna/api-contracts",
3
- "version": "1.0.44",
3
+ "version": "1.0.46",
4
4
  "description": "API contracts for Veruna project - Zod schemas, types, and paths",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",