@hed-hog/core 0.0.362 → 0.0.365

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 (185) hide show
  1. package/dist/ai/ai.controller.d.ts +4 -4
  2. package/dist/ai/ai.module.d.ts.map +1 -1
  3. package/dist/ai/ai.module.js +2 -0
  4. package/dist/ai/ai.module.js.map +1 -1
  5. package/dist/ai/ai.service.d.ts +7 -5
  6. package/dist/ai/ai.service.d.ts.map +1 -1
  7. package/dist/ai/ai.service.js +63 -31
  8. package/dist/ai/ai.service.js.map +1 -1
  9. package/dist/ai-instruction/ai-execution.service.d.ts +45 -0
  10. package/dist/ai-instruction/ai-execution.service.d.ts.map +1 -0
  11. package/dist/ai-instruction/ai-execution.service.js +203 -0
  12. package/dist/ai-instruction/ai-execution.service.js.map +1 -0
  13. package/dist/ai-instruction/ai-instruction.controller.d.ts +25 -0
  14. package/dist/ai-instruction/ai-instruction.controller.d.ts.map +1 -0
  15. package/dist/ai-instruction/ai-instruction.controller.js +117 -0
  16. package/dist/ai-instruction/ai-instruction.controller.js.map +1 -0
  17. package/dist/ai-instruction/ai-instruction.module.d.ts +3 -0
  18. package/dist/ai-instruction/ai-instruction.module.d.ts.map +1 -0
  19. package/dist/ai-instruction/ai-instruction.module.js +27 -0
  20. package/dist/ai-instruction/ai-instruction.module.js.map +1 -0
  21. package/dist/ai-instruction/ai-instruction.service.d.ts +38 -0
  22. package/dist/ai-instruction/ai-instruction.service.d.ts.map +1 -0
  23. package/dist/ai-instruction/ai-instruction.service.js +289 -0
  24. package/dist/ai-instruction/ai-instruction.service.js.map +1 -0
  25. package/dist/ai-instruction/ai-prompt-builder.service.d.ts +53 -0
  26. package/dist/ai-instruction/ai-prompt-builder.service.d.ts.map +1 -0
  27. package/dist/ai-instruction/ai-prompt-builder.service.js +132 -0
  28. package/dist/ai-instruction/ai-prompt-builder.service.js.map +1 -0
  29. package/dist/ai-instruction/dto/create-ai-instruction.dto.d.ts +12 -0
  30. package/dist/ai-instruction/dto/create-ai-instruction.dto.d.ts.map +1 -0
  31. package/dist/ai-instruction/dto/create-ai-instruction.dto.js +57 -0
  32. package/dist/ai-instruction/dto/create-ai-instruction.dto.js.map +1 -0
  33. package/dist/ai-instruction/dto/update-ai-instruction.dto.d.ts +10 -0
  34. package/dist/ai-instruction/dto/update-ai-instruction.dto.d.ts.map +1 -0
  35. package/dist/ai-instruction/dto/update-ai-instruction.dto.js +56 -0
  36. package/dist/ai-instruction/dto/update-ai-instruction.dto.js.map +1 -0
  37. package/dist/ai-instruction/types/ai-instruction.types.d.ts +78 -0
  38. package/dist/ai-instruction/types/ai-instruction.types.d.ts.map +1 -0
  39. package/dist/ai-instruction/types/ai-instruction.types.js +3 -0
  40. package/dist/ai-instruction/types/ai-instruction.types.js.map +1 -0
  41. package/dist/auth/auth.controller.d.ts +13 -5
  42. package/dist/auth/auth.controller.d.ts.map +1 -1
  43. package/dist/auth/auth.controller.js +39 -20
  44. package/dist/auth/auth.controller.js.map +1 -1
  45. package/dist/auth/auth.service.d.ts +18 -7
  46. package/dist/auth/auth.service.d.ts.map +1 -1
  47. package/dist/auth/auth.service.js +20 -16
  48. package/dist/auth/auth.service.js.map +1 -1
  49. package/dist/core.module.d.ts.map +1 -1
  50. package/dist/core.module.js +3 -0
  51. package/dist/core.module.js.map +1 -1
  52. package/dist/file/file.service.d.ts +37 -0
  53. package/dist/file/file.service.d.ts.map +1 -1
  54. package/dist/file/file.service.js +94 -4
  55. package/dist/file/file.service.js.map +1 -1
  56. package/dist/file/provider/abstract.provider.d.ts +6 -2
  57. package/dist/file/provider/abstract.provider.d.ts.map +1 -1
  58. package/dist/file/provider/abstract.provider.js.map +1 -1
  59. package/dist/file/provider/azure.provider.d.ts +4 -1
  60. package/dist/file/provider/azure.provider.d.ts.map +1 -1
  61. package/dist/file/provider/azure.provider.js +7 -2
  62. package/dist/file/provider/azure.provider.js.map +1 -1
  63. package/dist/file/provider/gcs.provider.d.ts +4 -1
  64. package/dist/file/provider/gcs.provider.d.ts.map +1 -1
  65. package/dist/file/provider/gcs.provider.js +7 -2
  66. package/dist/file/provider/gcs.provider.js.map +1 -1
  67. package/dist/file/provider/local.provider.d.ts +2 -2
  68. package/dist/file/provider/local.provider.d.ts.map +1 -1
  69. package/dist/file/provider/local.provider.js +7 -2
  70. package/dist/file/provider/local.provider.js.map +1 -1
  71. package/dist/file/provider/s3.provider.d.ts +4 -1
  72. package/dist/file/provider/s3.provider.d.ts.map +1 -1
  73. package/dist/file/provider/s3.provider.js +9 -6
  74. package/dist/file/provider/s3.provider.js.map +1 -1
  75. package/dist/file/provider/spaces.provider.d.ts +4 -1
  76. package/dist/file/provider/spaces.provider.d.ts.map +1 -1
  77. package/dist/file/provider/spaces.provider.js +9 -5
  78. package/dist/file/provider/spaces.provider.js.map +1 -1
  79. package/dist/integration-profile/integration-profile.controller.d.ts +3 -3
  80. package/dist/integration-profile/integration-profile.service.d.ts +3 -3
  81. package/dist/mcp-chat/mcp-chat.controller.d.ts +2 -2
  82. package/dist/mcp-chat/mcp-chat.module.d.ts.map +1 -1
  83. package/dist/mcp-chat/mcp-chat.module.js +2 -0
  84. package/dist/mcp-chat/mcp-chat.module.js.map +1 -1
  85. package/dist/mcp-chat/mcp-chat.service.d.ts +8 -3
  86. package/dist/mcp-chat/mcp-chat.service.d.ts.map +1 -1
  87. package/dist/mcp-chat/mcp-chat.service.js +100 -20
  88. package/dist/mcp-chat/mcp-chat.service.js.map +1 -1
  89. package/dist/notification/notification.service.d.ts +1 -0
  90. package/dist/notification/notification.service.d.ts.map +1 -1
  91. package/dist/notification/notification.service.js +29 -1
  92. package/dist/notification/notification.service.js.map +1 -1
  93. package/dist/oauth/oauth.service.d.ts +1 -0
  94. package/dist/oauth/oauth.service.d.ts.map +1 -1
  95. package/dist/oauth/oauth.service.js +55 -1
  96. package/dist/oauth/oauth.service.js.map +1 -1
  97. package/dist/profile/events/profile-avatar-updated.event.d.ts +7 -0
  98. package/dist/profile/events/profile-avatar-updated.event.d.ts.map +1 -0
  99. package/dist/profile/events/profile-avatar-updated.event.js +12 -0
  100. package/dist/profile/events/profile-avatar-updated.event.js.map +1 -0
  101. package/dist/profile/events/profile-email-changed.event.d.ts +7 -0
  102. package/dist/profile/events/profile-email-changed.event.d.ts.map +1 -0
  103. package/dist/profile/events/profile-email-changed.event.js +12 -0
  104. package/dist/profile/events/profile-email-changed.event.js.map +1 -0
  105. package/dist/profile/events/profile-updated.event.d.ts +7 -0
  106. package/dist/profile/events/profile-updated.event.d.ts.map +1 -0
  107. package/dist/profile/events/profile-updated.event.js +12 -0
  108. package/dist/profile/events/profile-updated.event.js.map +1 -0
  109. package/dist/profile/profile.service.d.ts +3 -1
  110. package/dist/profile/profile.service.d.ts.map +1 -1
  111. package/dist/profile/profile.service.js +28 -17
  112. package/dist/profile/profile.service.js.map +1 -1
  113. package/dist/session/session.controller.d.ts +1 -0
  114. package/dist/session/session.controller.d.ts.map +1 -1
  115. package/dist/session/session.service.d.ts +9 -4
  116. package/dist/session/session.service.d.ts.map +1 -1
  117. package/dist/session/session.service.js +61 -51
  118. package/dist/session/session.service.js.map +1 -1
  119. package/dist/setting/setting.controller.d.ts +5 -5
  120. package/dist/setting/setting.service.d.ts +5 -5
  121. package/dist/setting/setting.service.d.ts.map +1 -1
  122. package/dist/setting/setting.service.js +2 -0
  123. package/dist/setting/setting.service.js.map +1 -1
  124. package/dist/task/task.service.d.ts +8 -11
  125. package/dist/task/task.service.d.ts.map +1 -1
  126. package/dist/task/task.service.js +10 -16
  127. package/dist/task/task.service.js.map +1 -1
  128. package/dist/user/user.controller.d.ts +1 -0
  129. package/dist/user/user.controller.d.ts.map +1 -1
  130. package/dist/user/user.service.d.ts +3 -0
  131. package/dist/user/user.service.d.ts.map +1 -1
  132. package/dist/webhook-integration/webhook-command.registry.d.ts +9 -2
  133. package/dist/webhook-integration/webhook-command.registry.d.ts.map +1 -1
  134. package/dist/webhook-integration/webhook-command.registry.js.map +1 -1
  135. package/dist/webhook-integration/webhook-integration.service.d.ts.map +1 -1
  136. package/dist/webhook-integration/webhook-integration.service.js +13 -4
  137. package/dist/webhook-integration/webhook-integration.service.js.map +1 -1
  138. package/hedhog/data/integration_provider.yaml +17 -0
  139. package/hedhog/data/integration_type.yaml +6 -0
  140. package/hedhog/data/route.yaml +86 -2
  141. package/hedhog/frontend/app/configurations/[slug]/components/setting-field.tsx.ejs +109 -0
  142. package/hedhog/frontend/app/configurations/layout.tsx.ejs +6 -6
  143. package/hedhog/frontend/app/integration/profiles/page.tsx.ejs +169 -14
  144. package/hedhog/frontend/messages/en.json +11 -2
  145. package/hedhog/frontend/messages/pt.json +11 -2
  146. package/hedhog/table/ai_execution.yaml +79 -0
  147. package/hedhog/table/ai_execution_step.yaml +65 -0
  148. package/hedhog/table/ai_instruction.yaml +43 -0
  149. package/hedhog/table/ai_instruction_version.yaml +30 -0
  150. package/hedhog/table/ai_model_pricing.yaml +35 -0
  151. package/hedhog/table/user_session.yaml +2 -0
  152. package/package.json +5 -4
  153. package/src/ai/ai.module.ts +2 -0
  154. package/src/ai/ai.service.ts +64 -31
  155. package/src/ai-instruction/ai-execution.service.ts +244 -0
  156. package/src/ai-instruction/ai-instruction.controller.ts +73 -0
  157. package/src/ai-instruction/ai-instruction.module.ts +14 -0
  158. package/src/ai-instruction/ai-instruction.service.ts +343 -0
  159. package/src/ai-instruction/ai-prompt-builder.service.ts +142 -0
  160. package/src/ai-instruction/dto/create-ai-instruction.dto.ts +36 -0
  161. package/src/ai-instruction/dto/update-ai-instruction.dto.ts +35 -0
  162. package/src/ai-instruction/types/ai-instruction.types.ts +90 -0
  163. package/src/auth/auth.controller.ts +23 -5
  164. package/src/auth/auth.service.ts +26 -15
  165. package/src/core.module.ts +3 -0
  166. package/src/file/file.service.ts +136 -4
  167. package/src/file/provider/abstract.provider.ts +4 -2
  168. package/src/file/provider/azure.provider.ts +6 -3
  169. package/src/file/provider/gcs.provider.ts +5 -3
  170. package/src/file/provider/local.provider.ts +7 -3
  171. package/src/file/provider/s3.provider.ts +8 -6
  172. package/src/file/provider/spaces.provider.ts +8 -7
  173. package/src/mcp-chat/mcp-chat.module.ts +19 -17
  174. package/src/mcp-chat/mcp-chat.service.ts +95 -9
  175. package/src/notification/notification.service.ts +32 -1
  176. package/src/oauth/oauth.service.ts +74 -1
  177. package/src/profile/events/profile-avatar-updated.event.ts +8 -0
  178. package/src/profile/events/profile-email-changed.event.ts +8 -0
  179. package/src/profile/events/profile-updated.event.ts +8 -0
  180. package/src/profile/profile.service.ts +25 -16
  181. package/src/session/session.service.ts +70 -52
  182. package/src/setting/setting.service.ts +10 -8
  183. package/src/task/task.service.ts +10 -16
  184. package/src/webhook-integration/webhook-command.registry.ts +10 -2
  185. package/src/webhook-integration/webhook-integration.service.ts +31 -4
@@ -0,0 +1,132 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.AiPromptBuilderService = void 0;
16
+ const common_1 = require("@nestjs/common");
17
+ const ai_instruction_service_1 = require("./ai-instruction.service");
18
+ let AiPromptBuilderService = class AiPromptBuilderService {
19
+ constructor(instructionService) {
20
+ this.instructionService = instructionService;
21
+ }
22
+ /**
23
+ * Composes the system prompt from active layers in priority order.
24
+ * Only includes non-empty layers to minimize tokens.
25
+ *
26
+ * Layers sent:
27
+ * L1 system — always
28
+ * L2 product — always (if configured)
29
+ * L3 module — when moduleSlug is provided
30
+ * L4 agent — when agentSlug is provided
31
+ * runtime — injected by caller at send time (not stored here)
32
+ */
33
+ async build(ctx) {
34
+ const parts = [];
35
+ const names = [];
36
+ // L1 — system (always; has hardcoded fallback)
37
+ const system = await this.instructionService.getLayer('system');
38
+ if (system) {
39
+ parts.push(system);
40
+ names.push('system');
41
+ }
42
+ // L2 — product (optional, no fallback)
43
+ const product = await this.instructionService.getLayer('product');
44
+ if (product) {
45
+ parts.push(product);
46
+ names.push('product');
47
+ }
48
+ // L3 — module (only when moduleSlug provided)
49
+ if (ctx.moduleSlug) {
50
+ const module = await this.instructionService.getLayer('module', ctx.moduleSlug);
51
+ if (module) {
52
+ parts.push(module);
53
+ names.push(`module:${ctx.moduleSlug}`);
54
+ }
55
+ }
56
+ // L4 — agent (only when agentSlug provided)
57
+ if (ctx.agentSlug) {
58
+ const agent = await this.instructionService.getAgentInstruction(ctx.agentSlug);
59
+ if (agent) {
60
+ parts.push(agent);
61
+ names.push(`agent:${ctx.agentSlug}`);
62
+ }
63
+ }
64
+ const systemPrompt = parts.join('\n\n---\n\n');
65
+ return { systemPrompt, layers: parts, layerNames: names };
66
+ }
67
+ /**
68
+ * Builds a compact runtime context block (L6) to append to the system prompt.
69
+ * This is NEVER cached — it is generated fresh per request.
70
+ */
71
+ buildRuntimeContext(params) {
72
+ var _a;
73
+ const lines = ['[Runtime context]'];
74
+ if (params.userId)
75
+ lines.push(`user_id: ${params.userId}`);
76
+ if (params.locale)
77
+ lines.push(`locale: ${params.locale}`);
78
+ if ((_a = params.userRoles) === null || _a === void 0 ? void 0 : _a.length)
79
+ lines.push(`roles: ${params.userRoles.join(', ')}`);
80
+ if (params.currentDate)
81
+ lines.push(`date: ${params.currentDate}`);
82
+ if (params.extraContext) {
83
+ for (const [k, v] of Object.entries(params.extraContext)) {
84
+ lines.push(`${k}: ${v}`);
85
+ }
86
+ }
87
+ return lines.join('\n');
88
+ }
89
+ /**
90
+ * Builds a compact history summary for older messages to avoid
91
+ * sending full history on every turn.
92
+ *
93
+ * @param messages All conversation messages
94
+ * @param keepLast How many recent messages to keep verbatim
95
+ */
96
+ summarizeHistory(messages, keepLast = 6) {
97
+ if (messages.length <= keepLast)
98
+ return messages;
99
+ const older = messages.slice(0, messages.length - keepLast);
100
+ const recent = messages.slice(messages.length - keepLast);
101
+ // Simple extractive summary: keep first user turn + count of exchanges
102
+ const userMessages = older.filter((m) => m.role === 'user');
103
+ const toolCount = older.filter((m) => m.role === 'tool_call').length;
104
+ const summaryLines = [
105
+ `[Earlier conversation summary: ${older.length} messages]`,
106
+ ];
107
+ if (userMessages[0]) {
108
+ summaryLines.push(`First question: "${userMessages[0].content.slice(0, 120)}"`);
109
+ }
110
+ if (toolCount > 0) {
111
+ summaryLines.push(`Tools called: ${toolCount}`);
112
+ }
113
+ const summaryMessage = {
114
+ role: 'user',
115
+ content: summaryLines.join('\n'),
116
+ };
117
+ return [summaryMessage, ...recent];
118
+ }
119
+ /**
120
+ * Interpolates {{variable}} placeholders in a template string.
121
+ */
122
+ interpolate(template, variables) {
123
+ return template.replace(/\{\{(\w+)\}\}/g, (_, key) => { var _a; return (_a = variables[key]) !== null && _a !== void 0 ? _a : `{{${key}}}`; });
124
+ }
125
+ };
126
+ exports.AiPromptBuilderService = AiPromptBuilderService;
127
+ exports.AiPromptBuilderService = AiPromptBuilderService = __decorate([
128
+ (0, common_1.Injectable)(),
129
+ __param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => ai_instruction_service_1.AiInstructionService))),
130
+ __metadata("design:paramtypes", [ai_instruction_service_1.AiInstructionService])
131
+ ], AiPromptBuilderService);
132
+ //# sourceMappingURL=ai-prompt-builder.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-prompt-builder.service.js","sourceRoot":"","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AAC,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,WAAW,CAAC,QAAgB,EAAE,SAAiC;QAC7D,OAAO,QAAQ,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,WAAC,OAAA,MAAA,SAAS,CAAC,GAAG,CAAC,mCAAI,KAAK,GAAG,IAAI,CAAA,EAAA,CAAC,CAAC;IACxF,CAAC;CACF,CAAA;AAlIY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,6CAAoB,CAAC,CAAC,CAAA;qCACV,6CAAoB;GAHhD,sBAAsB,CAkIlC"}
@@ -0,0 +1,12 @@
1
+ import { AiInstructionLayer } from '../types/ai-instruction.types';
2
+ export declare class CreateAiInstructionDTO {
3
+ slug: string;
4
+ layer: AiInstructionLayer;
5
+ name: string;
6
+ content: string;
7
+ variables_schema?: Record<string, any>;
8
+ locale?: string;
9
+ module_slug?: string;
10
+ is_active?: boolean;
11
+ }
12
+ //# sourceMappingURL=create-ai-instruction.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-ai-instruction.dto.d.ts","sourceRoot":"","sources":["../../../src/ai-instruction/dto/create-ai-instruction.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,qBAAa,sBAAsB;IAGjC,IAAI,EAAE,MAAM,CAAC;IAGb,KAAK,EAAE,kBAAkB,CAAC;IAI1B,IAAI,EAAE,MAAM,CAAC;IAGb,OAAO,EAAE,MAAM,CAAC;IAIhB,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAKvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAKhB,WAAW,CAAC,EAAE,MAAM,CAAC;IAIrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CreateAiInstructionDTO = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class CreateAiInstructionDTO {
15
+ }
16
+ exports.CreateAiInstructionDTO = CreateAiInstructionDTO;
17
+ __decorate([
18
+ (0, class_validator_1.IsString)(),
19
+ (0, class_validator_1.MaxLength)(255),
20
+ __metadata("design:type", String)
21
+ ], CreateAiInstructionDTO.prototype, "slug", void 0);
22
+ __decorate([
23
+ (0, class_validator_1.IsEnum)(['system', 'product', 'module', 'agent', 'tool', 'output']),
24
+ __metadata("design:type", String)
25
+ ], CreateAiInstructionDTO.prototype, "layer", void 0);
26
+ __decorate([
27
+ (0, class_validator_1.IsString)(),
28
+ (0, class_validator_1.MaxLength)(200),
29
+ __metadata("design:type", String)
30
+ ], CreateAiInstructionDTO.prototype, "name", void 0);
31
+ __decorate([
32
+ (0, class_validator_1.IsString)(),
33
+ __metadata("design:type", String)
34
+ ], CreateAiInstructionDTO.prototype, "content", void 0);
35
+ __decorate([
36
+ (0, class_validator_1.IsOptional)(),
37
+ (0, class_validator_1.IsObject)(),
38
+ __metadata("design:type", Object)
39
+ ], CreateAiInstructionDTO.prototype, "variables_schema", void 0);
40
+ __decorate([
41
+ (0, class_validator_1.IsOptional)(),
42
+ (0, class_validator_1.IsString)(),
43
+ (0, class_validator_1.MaxLength)(10),
44
+ __metadata("design:type", String)
45
+ ], CreateAiInstructionDTO.prototype, "locale", void 0);
46
+ __decorate([
47
+ (0, class_validator_1.IsOptional)(),
48
+ (0, class_validator_1.IsString)(),
49
+ (0, class_validator_1.MaxLength)(255),
50
+ __metadata("design:type", String)
51
+ ], CreateAiInstructionDTO.prototype, "module_slug", void 0);
52
+ __decorate([
53
+ (0, class_validator_1.IsOptional)(),
54
+ (0, class_validator_1.IsBoolean)(),
55
+ __metadata("design:type", Boolean)
56
+ ], CreateAiInstructionDTO.prototype, "is_active", void 0);
57
+ //# sourceMappingURL=create-ai-instruction.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-ai-instruction.dto.js","sourceRoot":"","sources":["../../../src/ai-instruction/dto/create-ai-instruction.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+F;AAG/F,MAAa,sBAAsB;CAgClC;AAhCD,wDAgCC;AA7BC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,2BAAS,EAAC,GAAG,CAAC;;oDACF;AAGb;IADC,IAAA,wBAAM,EAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;;qDACzC;AAI1B;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,2BAAS,EAAC,GAAG,CAAC;;oDACF;AAGb;IADC,IAAA,0BAAQ,GAAE;;uDACK;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;gEAC4B;AAKvC;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,2BAAS,EAAC,EAAE,CAAC;;sDACE;AAKhB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,2BAAS,EAAC,GAAG,CAAC;;2DACM;AAIrB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;;yDACQ"}
@@ -0,0 +1,10 @@
1
+ export declare class UpdateAiInstructionDTO {
2
+ name?: string;
3
+ content?: string;
4
+ variables_schema?: Record<string, any>;
5
+ locale?: string;
6
+ module_slug?: string;
7
+ is_active?: boolean;
8
+ change_note?: string;
9
+ }
10
+ //# sourceMappingURL=update-ai-instruction.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-ai-instruction.dto.d.ts","sourceRoot":"","sources":["../../../src/ai-instruction/dto/update-ai-instruction.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,sBAAsB;IAIjC,IAAI,CAAC,EAAE,MAAM,CAAC;IAId,OAAO,CAAC,EAAE,MAAM,CAAC;IAIjB,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAKvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAKhB,WAAW,CAAC,EAAE,MAAM,CAAC;IAIrB,SAAS,CAAC,EAAE,OAAO,CAAC;IAKpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.UpdateAiInstructionDTO = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class UpdateAiInstructionDTO {
15
+ }
16
+ exports.UpdateAiInstructionDTO = UpdateAiInstructionDTO;
17
+ __decorate([
18
+ (0, class_validator_1.IsOptional)(),
19
+ (0, class_validator_1.IsString)(),
20
+ (0, class_validator_1.MaxLength)(200),
21
+ __metadata("design:type", String)
22
+ ], UpdateAiInstructionDTO.prototype, "name", void 0);
23
+ __decorate([
24
+ (0, class_validator_1.IsOptional)(),
25
+ (0, class_validator_1.IsString)(),
26
+ __metadata("design:type", String)
27
+ ], UpdateAiInstructionDTO.prototype, "content", void 0);
28
+ __decorate([
29
+ (0, class_validator_1.IsOptional)(),
30
+ (0, class_validator_1.IsObject)(),
31
+ __metadata("design:type", Object)
32
+ ], UpdateAiInstructionDTO.prototype, "variables_schema", void 0);
33
+ __decorate([
34
+ (0, class_validator_1.IsOptional)(),
35
+ (0, class_validator_1.IsString)(),
36
+ (0, class_validator_1.MaxLength)(10),
37
+ __metadata("design:type", String)
38
+ ], UpdateAiInstructionDTO.prototype, "locale", void 0);
39
+ __decorate([
40
+ (0, class_validator_1.IsOptional)(),
41
+ (0, class_validator_1.IsString)(),
42
+ (0, class_validator_1.MaxLength)(255),
43
+ __metadata("design:type", String)
44
+ ], UpdateAiInstructionDTO.prototype, "module_slug", void 0);
45
+ __decorate([
46
+ (0, class_validator_1.IsOptional)(),
47
+ (0, class_validator_1.IsBoolean)(),
48
+ __metadata("design:type", Boolean)
49
+ ], UpdateAiInstructionDTO.prototype, "is_active", void 0);
50
+ __decorate([
51
+ (0, class_validator_1.IsOptional)(),
52
+ (0, class_validator_1.IsString)(),
53
+ (0, class_validator_1.MaxLength)(500),
54
+ __metadata("design:type", String)
55
+ ], UpdateAiInstructionDTO.prototype, "change_note", void 0);
56
+ //# sourceMappingURL=update-ai-instruction.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-ai-instruction.dto.js","sourceRoot":"","sources":["../../../src/ai-instruction/dto/update-ai-instruction.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuF;AAEvF,MAAa,sBAAsB;CAgClC;AAhCD,wDAgCC;AA5BC;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,2BAAS,EAAC,GAAG,CAAC;;oDACD;AAId;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;uDACM;AAIjB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;gEAC4B;AAKvC;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,2BAAS,EAAC,EAAE,CAAC;;sDACE;AAKhB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,2BAAS,EAAC,GAAG,CAAC;;2DACM;AAIrB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;;yDACQ;AAKpB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,2BAAS,EAAC,GAAG,CAAC;;2DACM"}
@@ -0,0 +1,78 @@
1
+ export type AiInstructionLayer = 'system' | 'product' | 'module' | 'agent' | 'tool' | 'output';
2
+ export type AiInstructionRecord = {
3
+ id: number;
4
+ slug: string;
5
+ layer: AiInstructionLayer;
6
+ name: string;
7
+ content: string;
8
+ variables_schema: Record<string, any> | null;
9
+ locale: string;
10
+ module_slug: string | null;
11
+ is_active: boolean;
12
+ version: number;
13
+ created_at: Date;
14
+ updated_at: Date;
15
+ };
16
+ export type AiExecutionTrigger = 'manual' | 'webhook' | 'schedule' | 'tool' | 'api';
17
+ export type AiExecutionStatus = 'running' | 'completed' | 'failed' | 'cancelled';
18
+ export type AiExecutionStepType = 'prompt' | 'tool_call' | 'tool_result' | 'output' | 'error';
19
+ export type AiExecutionRecord = {
20
+ id: number;
21
+ user_id: number | null;
22
+ conversation_id: number | null;
23
+ agent_id: number | null;
24
+ trigger: AiExecutionTrigger;
25
+ status: AiExecutionStatus;
26
+ context_slug: string | null;
27
+ tokens_input: number;
28
+ tokens_output: number;
29
+ tokens_total: number;
30
+ cost_usd: number;
31
+ started_at: Date;
32
+ finished_at: Date | null;
33
+ error: string | null;
34
+ created_at: Date;
35
+ updated_at: Date;
36
+ };
37
+ export type AiExecutionStepRecord = {
38
+ id: number;
39
+ execution_id: number;
40
+ step_order: number;
41
+ type: AiExecutionStepType;
42
+ provider: string | null;
43
+ model: string | null;
44
+ tool_name: string | null;
45
+ tokens_input: number;
46
+ tokens_output: number;
47
+ cost_usd: number;
48
+ duration_ms: number;
49
+ input_summary: string | null;
50
+ output_summary: string | null;
51
+ success: boolean;
52
+ error: string | null;
53
+ created_at: Date;
54
+ };
55
+ export type AiModelPricingRecord = {
56
+ id: number;
57
+ provider: string;
58
+ model: string;
59
+ price_input_per_million: number;
60
+ price_output_per_million: number;
61
+ price_cached_input_per_million: number | null;
62
+ is_active: boolean;
63
+ valid_from: Date;
64
+ };
65
+ export type AiPromptBuildContext = {
66
+ moduleSlug?: string;
67
+ agentSlug?: string;
68
+ locale?: string;
69
+ userId?: number;
70
+ extraVariables?: Record<string, string>;
71
+ };
72
+ export type AiTokenUsage = {
73
+ input: number;
74
+ output: number;
75
+ total: number;
76
+ cached?: number;
77
+ };
78
+ //# sourceMappingURL=ai-instruction.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-instruction.types.d.ts","sourceRoot":"","sources":["../../../src/ai-instruction/types/ai-instruction.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAC1B,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,OAAO,GACP,MAAM,GACN,QAAQ,CAAC;AAEb,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,kBAAkB,CAAC;IAC1B,IAAI,EAAE,M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K,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ai-instruction.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-instruction.types.js","sourceRoot":"","sources":["../../../src/ai-instruction/types/ai-instruction.types.ts"],"names":[],"mappings":""}
@@ -84,6 +84,7 @@ export declare class AuthController {
84
84
  ip_address: string;
85
85
  revoked_at: Date | null;
86
86
  expires_at: Date;
87
+ browser_id: string | null;
87
88
  }[];
88
89
  id: number;
89
90
  created_at: Date;
@@ -95,16 +96,22 @@ export declare class AuthController {
95
96
  deactivated_at: Date | null;
96
97
  updated_at: Date;
97
98
  }>;
99
+ desktopToken({ id }: {
100
+ id: any;
101
+ }, locale: string, ipAddress: string, userAgent: string): Promise<{
102
+ accessToken: string;
103
+ refreshToken: string;
104
+ }>;
98
105
  roles(user: any, locale: string): Promise<{
99
106
  roles: {
100
107
  slug: string;
101
108
  }[];
102
109
  }>;
103
- refresh(locale: string, req: any, res: any, refreshTokenFromBody: string, userAgent: string, ipAddress: string): Promise<{
110
+ refresh(locale: string, req: any, res: any, refreshTokenFromBody: string, userAgent: string, browserId: string, ipAddress: string): Promise<{
104
111
  accessToken: string;
105
112
  refreshToken: string;
106
113
  }>;
107
- login(locale: string, data: LoginDTO, ipAddress: string, userAgent: string, res: any): Promise<{
114
+ login(locale: string, data: LoginDTO, ipAddress: string, userAgent: string, browserId: string, res: any): Promise<{
108
115
  requiresMfa: boolean;
109
116
  token: string;
110
117
  } | {
@@ -126,7 +133,7 @@ export declare class AuthController {
126
133
  id: number;
127
134
  }[];
128
135
  }>;
129
- emailVerificationLogin(locale: string, { token, code }: LoginEmailVerificationDTO, ipAddress: string, userAgent: string, res: any): Promise<{
136
+ emailVerificationLogin(locale: string, { token, code }: LoginEmailVerificationDTO, ipAddress: string, userAgent: string, browserId: string, res: any): Promise<{
130
137
  accessToken: string;
131
138
  refreshToken: string;
132
139
  requiresPasswordReset: boolean;
@@ -152,12 +159,12 @@ export declare class AuthController {
152
159
  challengeId: number;
153
160
  };
154
161
  }>;
155
- loginCode(locale: string, { token, code, methodType }: LoginWithCodeDTO, ipAddress: string, userAgent: string, res: any): Promise<{
162
+ loginCode(locale: string, { token, code, methodType }: LoginWithCodeDTO, ipAddress: string, userAgent: string, browserId: string, res: any): Promise<{
156
163
  accessToken: string;
157
164
  refreshToken: string;
158
165
  requiresPasswordReset: boolean;
159
166
  }>;
160
- loginRecoveryCode(locale: string, { token, code }: LoginWithRecoveryCodeDTO, ipAddress: string, userAgent: string, res: any): Promise<{
167
+ loginRecoveryCode(locale: string, { token, code }: LoginWithRecoveryCodeDTO, ipAddress: string, userAgent: string, browserId: string, res: any): Promise<{
161
168
  accessToken: string;
162
169
  refreshToken: string;
163
170
  requiresPasswordReset: boolean;
@@ -196,6 +203,7 @@ export declare class AuthController {
196
203
  ip_address: string;
197
204
  revoked_at: Date | null;
198
205
  expires_at: Date;
206
+ browser_id: string | null;
199
207
  };
200
208
  }>;
201
209
  }
@@ -1 +1 @@
1
- {"version":3,"file":"auth.controller.d.ts","sourceRoot":"","sources":["../../src/auth/auth.controller.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,6BAA6B,EAAE,MAAM,gDAAgD,CAAC;AAC/F,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,+BAA+B,EAAE,MAAM,2CAA2C,CAAC;AAC5F,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,O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tC,cAAc,CACR,MAAM,EAAE,MAAM,EAChB,EAAE,QAAQ,EAAE,iBAAiB,EAAE,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,iBAAiB,EAAE,GAAG,CAAA;KAAE,EAC/E,SAAS,EAAE,MAAM,EACA,SAAS,EAAE,MAAM,EACZ,GAAG,KAAA;;;;;IAgB3B,MAAM,CACA,MAAM,EAAE,MAAM,EAExB,IAAI,EAAE,SAAS;;;IAOX,MAAM,CACH,GAAG,KAAA,EACkB,GAAG,KAAA,EACT,oBAAoB,EAAE,MAAM;;;IAa9C,WAAW,CACL,MAAM,EAAE,MAAM,EAChB,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,QAAQ,EAC9B,SAAS,EAAE,MAAM,EACA,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;CAI3C"}
@@ -39,26 +39,29 @@ let AuthController = AuthController_1 = class AuthController {
39
39
  async verify({ id }, locale) {
40
40
  return this.service.verifyUser(locale, id);
41
41
  }
42
+ async desktopToken({ id }, locale, ipAddress, userAgent) {
43
+ return this.service.issueDesktopToken(locale, id, ipAddress, userAgent);
44
+ }
42
45
  async roles(user, locale) {
43
46
  const roles = !user || !user.id ? [] : await this.service.verifyRoles(locale, user.id);
44
47
  return { roles };
45
48
  }
46
- async refresh(locale, req, res, refreshTokenFromBody, userAgent, ipAddress) {
49
+ async refresh(locale, req, res, refreshTokenFromBody, userAgent, browserId, ipAddress) {
47
50
  const tokenSource = req.cookies['rt'] ? 'cookie' : (refreshTokenFromBody ? 'body' : 'none');
48
51
  this.logger.debug(`[AuthController] POST /auth/refresh tokenSource=${tokenSource} ip=${ipAddress}`);
49
52
  const currentRefreshToken = req.cookies['rt'] || refreshTokenFromBody;
50
- const { session, refreshToken, accessToken } = await this.service.refreshAccessToken(locale, currentRefreshToken, ipAddress, userAgent);
53
+ const { session, refreshToken, accessToken } = await this.service.refreshAccessToken(locale, currentRefreshToken, ipAddress, userAgent, browserId || null);
51
54
  await this.token.setRefreshTokenCookie(locale, res, refreshToken, session.expires_at);
52
55
  return {
53
56
  accessToken,
54
57
  refreshToken,
55
58
  };
56
59
  }
57
- async login(locale, data, ipAddress, userAgent, res) {
58
- return this.service.loginWithEmailAndPassword(res, locale, ipAddress, userAgent, data);
60
+ async login(locale, data, ipAddress, userAgent, browserId, res) {
61
+ return this.service.loginWithEmailAndPassword(res, locale, ipAddress, userAgent, data, browserId || null);
59
62
  }
60
- async emailVerificationLogin(locale, { token, code }, ipAddress, userAgent, res) {
61
- return this.service.emailVerificationLogin(locale, token, code, ipAddress, userAgent, res);
63
+ async emailVerificationLogin(locale, { token, code }, ipAddress, userAgent, browserId, res) {
64
+ return this.service.emailVerificationLogin(locale, token, code, ipAddress, userAgent, res, browserId || null);
62
65
  }
63
66
  async emailVerificationLoginResend(locale, { token }) {
64
67
  return this.service.emailVerificationLoginResend(locale, token);
@@ -66,13 +69,13 @@ let AuthController = AuthController_1 = class AuthController {
66
69
  async registerWithEmailAndPassword(locale, data) {
67
70
  return this.user.createWithEmailAndPassword(locale, data);
68
71
  }
69
- async loginCode(locale, { token, code, methodType }, ipAddress, userAgent, res) {
70
- const { accessToken, refreshToken, session, requiresPasswordReset } = await this.service.verifyMfaCode(locale, token, code, ipAddress, userAgent, methodType);
72
+ async loginCode(locale, { token, code, methodType }, ipAddress, userAgent, browserId, res) {
73
+ const { accessToken, refreshToken, session, requiresPasswordReset } = await this.service.verifyMfaCode(locale, token, code, ipAddress, userAgent, methodType, browserId || null);
71
74
  await this.token.setRefreshTokenCookie(locale, res, refreshToken, session.expires_at);
72
75
  return { accessToken, refreshToken, requiresPasswordReset };
73
76
  }
74
- async loginRecoveryCode(locale, { token, code }, ipAddress, userAgent, res) {
75
- const { accessToken, refreshToken, session, requiresPasswordReset } = await this.service.verifyMfaRecoveryCode(locale, token, code, ipAddress, userAgent);
77
+ async loginRecoveryCode(locale, { token, code }, ipAddress, userAgent, browserId, res) {
78
+ const { accessToken, refreshToken, session, requiresPasswordReset } = await this.service.verifyMfaRecoveryCode(locale, token, code, ipAddress, userAgent, browserId || null);
76
79
  await this.token.setRefreshTokenCookie(locale, res, refreshToken, session.expires_at);
77
80
  return { accessToken, refreshToken, requiresPasswordReset };
78
81
  }
@@ -112,6 +115,17 @@ __decorate([
112
115
  __metadata("design:paramtypes", [Object, String]),
113
116
  __metadata("design:returntype", Promise)
114
117
  ], AuthController.prototype, "verify", null);
118
+ __decorate([
119
+ (0, api_1.NoRole)(),
120
+ (0, common_1.Get)('desktop-token'),
121
+ __param(0, (0, api_1.User)()),
122
+ __param(1, (0, api_locale_1.Locale)()),
123
+ __param(2, (0, common_1.Ip)()),
124
+ __param(3, (0, common_1.Headers)('user-agent')),
125
+ __metadata("design:type", Function),
126
+ __metadata("design:paramtypes", [Object, String, String, String]),
127
+ __metadata("design:returntype", Promise)
128
+ ], AuthController.prototype, "desktopToken", null);
115
129
  __decorate([
116
130
  (0, api_1.NoRole)(),
117
131
  (0, common_1.Get)('roles'),
@@ -129,9 +143,10 @@ __decorate([
129
143
  __param(2, (0, common_1.Res)({ passthrough: true })),
130
144
  __param(3, (0, common_1.Body)('refreshToken')),
131
145
  __param(4, (0, common_1.Headers)('user-agent')),
132
- __param(5, (0, common_1.Ip)()),
146
+ __param(5, (0, common_1.Headers)('x-browser-id')),
147
+ __param(6, (0, common_1.Ip)()),
133
148
  __metadata("design:type", Function),
134
- __metadata("design:paramtypes", [String, Object, Object, String, String, String]),
149
+ __metadata("design:paramtypes", [String, Object, Object, String, String, String, String]),
135
150
  __metadata("design:returntype", Promise)
136
151
  ], AuthController.prototype, "refresh", null);
137
152
  __decorate([
@@ -141,9 +156,10 @@ __decorate([
141
156
  __param(1, (0, common_1.Body)()),
142
157
  __param(2, (0, common_1.Ip)()),
143
158
  __param(3, (0, common_1.Headers)('user-agent')),
144
- __param(4, (0, common_1.Res)({ passthrough: true })),
159
+ __param(4, (0, common_1.Headers)('x-browser-id')),
160
+ __param(5, (0, common_1.Res)({ passthrough: true })),
145
161
  __metadata("design:type", Function),
146
- __metadata("design:paramtypes", [String, login_dto_1.LoginDTO, String, String, Object]),
162
+ __metadata("design:paramtypes", [String, login_dto_1.LoginDTO, String, String, String, Object]),
147
163
  __metadata("design:returntype", Promise)
148
164
  ], AuthController.prototype, "login", null);
149
165
  __decorate([
@@ -153,9 +169,10 @@ __decorate([
153
169
  __param(1, (0, common_1.Body)()),
154
170
  __param(2, (0, common_1.Ip)()),
155
171
  __param(3, (0, common_1.Headers)('user-agent')),
156
- __param(4, (0, common_1.Res)({ passthrough: true })),
172
+ __param(4, (0, common_1.Headers)('x-browser-id')),
173
+ __param(5, (0, common_1.Res)({ passthrough: true })),
157
174
  __metadata("design:type", Function),
158
- __metadata("design:paramtypes", [String, login_email_verification_dto_1.LoginEmailVerificationDTO, String, String, Object]),
175
+ __metadata("design:paramtypes", [String, login_email_verification_dto_1.LoginEmailVerificationDTO, String, String, String, Object]),
159
176
  __metadata("design:returntype", Promise)
160
177
  ], AuthController.prototype, "emailVerificationLogin", null);
161
178
  __decorate([
@@ -183,9 +200,10 @@ __decorate([
183
200
  __param(1, (0, common_1.Body)()),
184
201
  __param(2, (0, common_1.Ip)()),
185
202
  __param(3, (0, common_1.Headers)('user-agent')),
186
- __param(4, (0, common_1.Res)({ passthrough: true })),
203
+ __param(4, (0, common_1.Headers)('x-browser-id')),
204
+ __param(5, (0, common_1.Res)({ passthrough: true })),
187
205
  __metadata("design:type", Function),
188
- __metadata("design:paramtypes", [String, login_with_code_dto_1.LoginWithCodeDTO, String, String, Object]),
206
+ __metadata("design:paramtypes", [String, login_with_code_dto_1.LoginWithCodeDTO, String, String, String, Object]),
189
207
  __metadata("design:returntype", Promise)
190
208
  ], AuthController.prototype, "loginCode", null);
191
209
  __decorate([
@@ -195,9 +213,10 @@ __decorate([
195
213
  __param(1, (0, common_1.Body)()),
196
214
  __param(2, (0, common_1.Ip)()),
197
215
  __param(3, (0, common_1.Headers)('user-agent')),
198
- __param(4, (0, common_1.Res)({ passthrough: true })),
216
+ __param(4, (0, common_1.Headers)('x-browser-id')),
217
+ __param(5, (0, common_1.Res)({ passthrough: true })),
199
218
  __metadata("design:type", Function),
200
- __metadata("design:paramtypes", [String, login_with_recovery_code_1.LoginWithRecoveryCodeDTO, String, String, Object]),
219
+ __metadata("design:paramtypes", [String, login_with_recovery_code_1.LoginWithRecoveryCodeDTO, String, String, String, Object]),
201
220
  __metadata("design:returntype", Promise)
202
221
  ], AuthController.prototype, "loginRecoveryCode", null);
203
222
  __decorate([