@hed-hog/core 0.0.356 → 0.0.359

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 (250) hide show
  1. package/dist/auth/guards/auth.guard.d.ts +6 -1
  2. package/dist/auth/guards/auth.guard.d.ts.map +1 -1
  3. package/dist/auth/guards/auth.guard.js +33 -2
  4. package/dist/auth/guards/auth.guard.js.map +1 -1
  5. package/dist/file/file.controller.d.ts +4 -2
  6. package/dist/file/file.controller.d.ts.map +1 -1
  7. package/dist/file/file.controller.js +44 -38
  8. package/dist/file/file.controller.js.map +1 -1
  9. package/dist/file/file.service.d.ts +2 -2
  10. package/dist/file/file.service.d.ts.map +1 -1
  11. package/dist/file/file.service.js +25 -42
  12. package/dist/file/file.service.js.map +1 -1
  13. package/dist/file/provider/azure.provider.d.ts.map +1 -1
  14. package/dist/file/provider/azure.provider.js +10 -15
  15. package/dist/file/provider/azure.provider.js.map +1 -1
  16. package/dist/file/provider/gcs.provider.d.ts.map +1 -1
  17. package/dist/file/provider/gcs.provider.js +8 -9
  18. package/dist/file/provider/gcs.provider.js.map +1 -1
  19. package/dist/file/provider/local.provider.d.ts.map +1 -1
  20. package/dist/file/provider/local.provider.js +11 -10
  21. package/dist/file/provider/local.provider.js.map +1 -1
  22. package/dist/file/provider/provider.factory.d.ts +1 -1
  23. package/dist/file/provider/provider.factory.d.ts.map +1 -1
  24. package/dist/file/provider/provider.factory.js +16 -6
  25. package/dist/file/provider/provider.factory.js.map +1 -1
  26. package/dist/file/provider/s3.provider.d.ts.map +1 -1
  27. package/dist/file/provider/s3.provider.js +4 -20
  28. package/dist/file/provider/s3.provider.js.map +1 -1
  29. package/dist/file/provider/spaces.provider.d.ts.map +1 -1
  30. package/dist/file/provider/spaces.provider.js +4 -19
  31. package/dist/file/provider/spaces.provider.js.map +1 -1
  32. package/dist/integration-profile/integration-profile.controller.d.ts +1 -1
  33. package/dist/integration-profile/integration-profile.controller.d.ts.map +1 -1
  34. package/dist/integration-profile/integration-profile.controller.js +4 -3
  35. package/dist/integration-profile/integration-profile.controller.js.map +1 -1
  36. package/dist/integration-profile/integration-profile.service.d.ts +1 -1
  37. package/dist/integration-profile/integration-profile.service.d.ts.map +1 -1
  38. package/dist/integration-profile/integration-profile.service.js +7 -4
  39. package/dist/integration-profile/integration-profile.service.js.map +1 -1
  40. package/dist/integration-profile/integration-profile.utils.d.ts +6 -0
  41. package/dist/integration-profile/integration-profile.utils.d.ts.map +1 -1
  42. package/dist/integration-profile/integration-profile.utils.js +9 -0
  43. package/dist/integration-profile/integration-profile.utils.js.map +1 -1
  44. package/dist/mail/mail.module.d.ts.map +1 -1
  45. package/dist/mail/mail.module.js +9 -4
  46. package/dist/mail/mail.module.js.map +1 -1
  47. package/dist/mail/mail.service.d.ts +2 -1
  48. package/dist/mail/mail.service.d.ts.map +1 -1
  49. package/dist/mail/mail.service.js +11 -7
  50. package/dist/mail/mail.service.js.map +1 -1
  51. package/dist/mcp/guards/mcp-auth.guard.js +1 -1
  52. package/dist/mcp/guards/mcp-auth.guard.js.map +1 -1
  53. package/dist/mcp/mcp-api-key.controller.d.ts +2 -0
  54. package/dist/mcp/mcp-api-key.controller.d.ts.map +1 -1
  55. package/dist/mcp/mcp-api-key.controller.js +1 -1
  56. package/dist/mcp/mcp-api-key.controller.js.map +1 -1
  57. package/dist/mcp/mcp-api-key.service.d.ts +2 -1
  58. package/dist/mcp/mcp-api-key.service.d.ts.map +1 -1
  59. package/dist/mcp/mcp-api-key.service.js +6 -2
  60. package/dist/mcp/mcp-api-key.service.js.map +1 -1
  61. package/dist/mcp/mcp.module.d.ts.map +1 -1
  62. package/dist/mcp/mcp.module.js +1 -3
  63. package/dist/mcp/mcp.module.js.map +1 -1
  64. package/dist/oauth/interfaces/OAuthProvider.d.ts +1 -1
  65. package/dist/oauth/interfaces/OAuthProvider.d.ts.map +1 -1
  66. package/dist/oauth/oauth.controller.d.ts +4 -1
  67. package/dist/oauth/oauth.controller.d.ts.map +1 -1
  68. package/dist/oauth/oauth.controller.js +31 -5
  69. package/dist/oauth/oauth.controller.js.map +1 -1
  70. package/dist/oauth/oauth.service.d.ts +12 -1
  71. package/dist/oauth/oauth.service.d.ts.map +1 -1
  72. package/dist/oauth/oauth.service.js +125 -23
  73. package/dist/oauth/oauth.service.js.map +1 -1
  74. package/dist/oauth/providers/abstract.provider.d.ts +1 -1
  75. package/dist/oauth/providers/abstract.provider.d.ts.map +1 -1
  76. package/dist/oauth/providers/facebook.provider.d.ts +5 -2
  77. package/dist/oauth/providers/facebook.provider.d.ts.map +1 -1
  78. package/dist/oauth/providers/facebook.provider.js +34 -19
  79. package/dist/oauth/providers/facebook.provider.js.map +1 -1
  80. package/dist/oauth/providers/github.provider.d.ts +6 -2
  81. package/dist/oauth/providers/github.provider.d.ts.map +1 -1
  82. package/dist/oauth/providers/github.provider.js +43 -20
  83. package/dist/oauth/providers/github.provider.js.map +1 -1
  84. package/dist/oauth/providers/google.provider.d.ts +5 -2
  85. package/dist/oauth/providers/google.provider.d.ts.map +1 -1
  86. package/dist/oauth/providers/google.provider.js +34 -19
  87. package/dist/oauth/providers/google.provider.js.map +1 -1
  88. package/dist/oauth/providers/microsoft-entra-id.provider.d.ts +5 -2
  89. package/dist/oauth/providers/microsoft-entra-id.provider.d.ts.map +1 -1
  90. package/dist/oauth/providers/microsoft-entra-id.provider.js +43 -40
  91. package/dist/oauth/providers/microsoft-entra-id.provider.js.map +1 -1
  92. package/dist/oauth/providers/microsoft.provider.d.ts +5 -2
  93. package/dist/oauth/providers/microsoft.provider.d.ts.map +1 -1
  94. package/dist/oauth/providers/microsoft.provider.js +34 -19
  95. package/dist/oauth/providers/microsoft.provider.js.map +1 -1
  96. package/dist/profile/profile.controller.js +1 -1
  97. package/dist/profile/profile.controller.js.map +1 -1
  98. package/dist/security/security.service.d.ts +2 -0
  99. package/dist/security/security.service.d.ts.map +1 -1
  100. package/dist/security/security.service.js +21 -0
  101. package/dist/security/security.service.js.map +1 -1
  102. package/dist/setting/setting.service.d.ts +26 -1
  103. package/dist/setting/setting.service.d.ts.map +1 -1
  104. package/dist/setting/setting.service.js +240 -5
  105. package/dist/setting/setting.service.js.map +1 -1
  106. package/dist/user/user.controller.d.ts +2 -1
  107. package/dist/user/user.controller.d.ts.map +1 -1
  108. package/dist/user/user.controller.js +5 -4
  109. package/dist/user/user.controller.js.map +1 -1
  110. package/dist/user/user.service.d.ts +4 -2
  111. package/dist/user/user.service.d.ts.map +1 -1
  112. package/dist/user/user.service.js +19 -4
  113. package/dist/user/user.service.js.map +1 -1
  114. package/dist/webhook-integration/dto/webhook-action.dto.d.ts +17 -2
  115. package/dist/webhook-integration/dto/webhook-action.dto.d.ts.map +1 -1
  116. package/dist/webhook-integration/dto/webhook-action.dto.js +93 -2
  117. package/dist/webhook-integration/dto/webhook-action.dto.js.map +1 -1
  118. package/dist/webhook-integration/webhook-command.registry.d.ts +15 -0
  119. package/dist/webhook-integration/webhook-command.registry.d.ts.map +1 -0
  120. package/dist/webhook-integration/webhook-command.registry.js +36 -0
  121. package/dist/webhook-integration/webhook-command.registry.js.map +1 -0
  122. package/dist/webhook-integration/webhook-integration.controller.d.ts +19 -0
  123. package/dist/webhook-integration/webhook-integration.controller.d.ts.map +1 -1
  124. package/dist/webhook-integration/webhook-integration.controller.js +38 -0
  125. package/dist/webhook-integration/webhook-integration.controller.js.map +1 -1
  126. package/dist/webhook-integration/webhook-integration.module.d.ts.map +1 -1
  127. package/dist/webhook-integration/webhook-integration.module.js +5 -0
  128. package/dist/webhook-integration/webhook-integration.module.js.map +1 -1
  129. package/dist/webhook-integration/webhook-integration.service.d.ts +25 -1
  130. package/dist/webhook-integration/webhook-integration.service.d.ts.map +1 -1
  131. package/dist/webhook-integration/webhook-integration.service.js +332 -23
  132. package/dist/webhook-integration/webhook-integration.service.js.map +1 -1
  133. package/hedhog/data/integration_provider.yaml +16 -0
  134. package/hedhog/data/menu.yaml +0 -16
  135. package/hedhog/data/route.yaml +32 -383
  136. package/hedhog/data/setting_group.yaml +179 -174
  137. package/hedhog/data/setting_subgroup.yaml +16 -0
  138. package/hedhog/frontend/app/account/components/tokens.tsx.ejs +421 -0
  139. package/hedhog/frontend/app/account/layout.tsx.ejs +6 -3
  140. package/hedhog/frontend/app/account/mcp-tokens/page.tsx.ejs +2 -2
  141. package/hedhog/frontend/app/account/tokens/page.tsx.ejs +5 -0
  142. package/hedhog/frontend/app/configurations/[slug]/components/setting-field.tsx.ejs +414 -76
  143. package/hedhog/frontend/app/configurations/layout.tsx.ejs +1 -1
  144. package/hedhog/frontend/app/dashboard/dashboard-home-tabs.tsx.ejs +3 -1
  145. package/hedhog/frontend/app/integration/profiles/page.tsx.ejs +186 -18
  146. package/hedhog/frontend/app/integrations-webhooks/page.tsx.ejs +597 -21
  147. package/hedhog/frontend/app/mail/profiles/page.tsx.ejs +2 -2
  148. package/hedhog/frontend/app/setting-list/page.tsx.ejs +229 -395
  149. package/hedhog/frontend/messages/en.json +67 -3
  150. package/hedhog/frontend/messages/pt.json +67 -3
  151. package/hedhog/table/file.yaml +1 -1
  152. package/hedhog/table/mcp_api_key.yaml +4 -0
  153. package/hedhog/table/webhook_action.yaml +57 -1
  154. package/package.json +5 -4
  155. package/src/auth/guards/auth.guard.ts +32 -0
  156. package/src/file/file.controller.ts +51 -42
  157. package/src/file/file.service.ts +31 -52
  158. package/src/file/provider/azure.provider.ts +14 -28
  159. package/src/file/provider/gcs.provider.ts +9 -9
  160. package/src/file/provider/local.provider.ts +10 -13
  161. package/src/file/provider/provider.factory.ts +19 -7
  162. package/src/file/provider/s3.provider.ts +4 -20
  163. package/src/file/provider/spaces.provider.ts +4 -19
  164. package/src/integration-profile/integration-profile.controller.ts +2 -0
  165. package/src/integration-profile/integration-profile.service.ts +7 -2
  166. package/src/integration-profile/integration-profile.utils.ts +17 -0
  167. package/src/mail/mail.module.ts +14 -4
  168. package/src/mail/mail.service.ts +12 -7
  169. package/src/mcp/guards/mcp-auth.guard.ts +1 -1
  170. package/src/mcp/mcp-api-key.controller.ts +2 -2
  171. package/src/mcp/mcp-api-key.service.ts +6 -2
  172. package/src/mcp/mcp.module.ts +1 -3
  173. package/src/oauth/interfaces/OAuthProvider.ts +1 -1
  174. package/src/oauth/oauth.controller.ts +30 -2
  175. package/src/oauth/oauth.service.ts +194 -35
  176. package/src/oauth/providers/abstract.provider.ts +1 -1
  177. package/src/oauth/providers/facebook.provider.ts +36 -20
  178. package/src/oauth/providers/github.provider.ts +46 -23
  179. package/src/oauth/providers/google.provider.ts +36 -20
  180. package/src/oauth/providers/microsoft-entra-id.provider.ts +42 -46
  181. package/src/oauth/providers/microsoft.provider.ts +36 -21
  182. package/src/profile/profile.controller.ts +2 -2
  183. package/src/security/security.service.ts +34 -1
  184. package/src/setting/setting.service.ts +307 -7
  185. package/src/user/user.controller.ts +4 -1
  186. package/src/user/user.service.ts +20 -2
  187. package/src/webhook-integration/dto/webhook-action.dto.ts +85 -4
  188. package/src/webhook-integration/webhook-command.registry.ts +42 -0
  189. package/src/webhook-integration/webhook-integration.controller.ts +20 -0
  190. package/src/webhook-integration/webhook-integration.module.ts +50 -45
  191. package/src/webhook-integration/webhook-integration.service.ts +374 -11
  192. package/dist/mail-profile/dto/create.dto.d.ts +0 -23
  193. package/dist/mail-profile/dto/create.dto.d.ts.map +0 -1
  194. package/dist/mail-profile/dto/create.dto.js +0 -139
  195. package/dist/mail-profile/dto/create.dto.js.map +0 -1
  196. package/dist/mail-profile/dto/update.dto.d.ts +0 -6
  197. package/dist/mail-profile/dto/update.dto.d.ts.map +0 -1
  198. package/dist/mail-profile/dto/update.dto.js +0 -9
  199. package/dist/mail-profile/dto/update.dto.js.map +0 -1
  200. package/dist/mail-profile/mail-profile.controller.d.ts +0 -94
  201. package/dist/mail-profile/mail-profile.controller.d.ts.map +0 -1
  202. package/dist/mail-profile/mail-profile.controller.js +0 -95
  203. package/dist/mail-profile/mail-profile.controller.js.map +0 -1
  204. package/dist/mail-profile/mail-profile.module.d.ts +0 -3
  205. package/dist/mail-profile/mail-profile.module.d.ts.map +0 -1
  206. package/dist/mail-profile/mail-profile.module.js +0 -31
  207. package/dist/mail-profile/mail-profile.module.js.map +0 -1
  208. package/dist/mail-profile/mail-profile.service.d.ts +0 -109
  209. package/dist/mail-profile/mail-profile.service.d.ts.map +0 -1
  210. package/dist/mail-profile/mail-profile.service.js +0 -278
  211. package/dist/mail-profile/mail-profile.service.js.map +0 -1
  212. package/dist/mcp/tools/core-mail-profile.mcp-tools.d.ts +0 -20
  213. package/dist/mcp/tools/core-mail-profile.mcp-tools.d.ts.map +0 -1
  214. package/dist/mcp/tools/core-mail-profile.mcp-tools.js +0 -96
  215. package/dist/mcp/tools/core-mail-profile.mcp-tools.js.map +0 -1
  216. package/dist/whatsapp-profile/dto/create.dto.d.ts +0 -11
  217. package/dist/whatsapp-profile/dto/create.dto.d.ts.map +0 -1
  218. package/dist/whatsapp-profile/dto/create.dto.js +0 -55
  219. package/dist/whatsapp-profile/dto/create.dto.js.map +0 -1
  220. package/dist/whatsapp-profile/dto/update.dto.d.ts +0 -6
  221. package/dist/whatsapp-profile/dto/update.dto.d.ts.map +0 -1
  222. package/dist/whatsapp-profile/dto/update.dto.js +0 -9
  223. package/dist/whatsapp-profile/dto/update.dto.js.map +0 -1
  224. package/dist/whatsapp-profile/whatsapp-profile.controller.d.ts +0 -54
  225. package/dist/whatsapp-profile/whatsapp-profile.controller.d.ts.map +0 -1
  226. package/dist/whatsapp-profile/whatsapp-profile.controller.js +0 -85
  227. package/dist/whatsapp-profile/whatsapp-profile.controller.js.map +0 -1
  228. package/dist/whatsapp-profile/whatsapp-profile.module.d.ts +0 -3
  229. package/dist/whatsapp-profile/whatsapp-profile.module.d.ts.map +0 -1
  230. package/dist/whatsapp-profile/whatsapp-profile.module.js +0 -26
  231. package/dist/whatsapp-profile/whatsapp-profile.module.js.map +0 -1
  232. package/dist/whatsapp-profile/whatsapp-profile.service.d.ts +0 -63
  233. package/dist/whatsapp-profile/whatsapp-profile.service.d.ts.map +0 -1
  234. package/dist/whatsapp-profile/whatsapp-profile.service.js +0 -138
  235. package/dist/whatsapp-profile/whatsapp-profile.service.js.map +0 -1
  236. package/hedhog/data/mail_profile.yaml +0 -18
  237. package/hedhog/data/whatsapp_profile.yaml +0 -6
  238. package/hedhog/table/mail_profile.yaml +0 -75
  239. package/hedhog/table/whatsapp_profile.yaml +0 -26
  240. package/src/mail-profile/dto/create.dto.ts +0 -145
  241. package/src/mail-profile/dto/update.dto.ts +0 -4
  242. package/src/mail-profile/mail-profile.controller.ts +0 -56
  243. package/src/mail-profile/mail-profile.module.ts +0 -18
  244. package/src/mail-profile/mail-profile.service.ts +0 -308
  245. package/src/mcp/tools/core-mail-profile.mcp-tools.ts +0 -69
  246. package/src/whatsapp-profile/dto/create.dto.ts +0 -36
  247. package/src/whatsapp-profile/dto/update.dto.ts +0 -4
  248. package/src/whatsapp-profile/whatsapp-profile.controller.ts +0 -51
  249. package/src/whatsapp-profile/whatsapp-profile.module.ts +0 -13
  250. package/src/whatsapp-profile/whatsapp-profile.service.ts +0 -160
@@ -1,278 +0,0 @@
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.MailProfileService = void 0;
16
- const api_mail_1 = require("@hed-hog/api-mail");
17
- const api_pagination_1 = require("@hed-hog/api-pagination");
18
- const api_prisma_1 = require("@hed-hog/api-prisma");
19
- const common_1 = require("@nestjs/common");
20
- const mail_service_1 = require("../mail/mail.service");
21
- let MailProfileService = class MailProfileService {
22
- constructor(prismaService, paginationService, mailMainService, mailService) {
23
- this.prismaService = prismaService;
24
- this.paginationService = paginationService;
25
- this.mailMainService = mailMainService;
26
- this.mailService = mailService;
27
- }
28
- async list(paginationParams) {
29
- const fields = ['slug', 'name', 'from_email', 'reply_to_email'];
30
- const OR = this.prismaService.createInsensitiveSearch(fields, paginationParams);
31
- return this.paginationService.paginate(this.prismaService.mail_profile, paginationParams, {
32
- where: OR.length > 0 ? { OR } : {},
33
- select: {
34
- id: true,
35
- slug: true,
36
- name: true,
37
- provider: true,
38
- from_name: true,
39
- from_email: true,
40
- reply_to_name: true,
41
- reply_to_email: true,
42
- created_at: true,
43
- updated_at: true,
44
- },
45
- orderBy: [{ updated_at: 'desc' }, { id: 'desc' }],
46
- });
47
- }
48
- async get(id) {
49
- const profile = await this.prismaService.mail_profile.findUnique({
50
- where: { id },
51
- });
52
- if (!profile) {
53
- throw new common_1.NotFoundException(`Mail profile with id ${id} not found.`);
54
- }
55
- return profile;
56
- }
57
- async create(data) {
58
- await this.ensureSlugIsAvailable(data.slug);
59
- this.validateProviderFields(data);
60
- return this.prismaService.mail_profile.create({
61
- data: this.normalizeData(data),
62
- });
63
- }
64
- async update({ id, data }) {
65
- const existing = await this.prismaService.mail_profile.findUnique({
66
- where: { id },
67
- });
68
- if (!existing) {
69
- throw new common_1.NotFoundException(`Mail profile with id ${id} not found.`);
70
- }
71
- if (data.slug && data.slug !== existing.slug) {
72
- await this.ensureSlugIsAvailable(data.slug);
73
- }
74
- const merged = Object.assign(Object.assign({}, existing), data);
75
- this.validateProviderFields(merged);
76
- return this.prismaService.mail_profile.update({
77
- where: { id },
78
- data: this.normalizeData(merged),
79
- });
80
- }
81
- async delete({ ids }) {
82
- if (!(ids === null || ids === void 0 ? void 0 : ids.length)) {
83
- throw new common_1.BadRequestException('You must select at least one item to delete.');
84
- }
85
- return this.prismaService.mail_profile.deleteMany({
86
- where: {
87
- id: {
88
- in: ids,
89
- },
90
- },
91
- });
92
- }
93
- async test(data) {
94
- this.validateProviderFields(data);
95
- const normalized = this.normalizeData(data);
96
- const config = this.buildMailConfig(normalized);
97
- const destinationEmail = normalized.from_email;
98
- const sender = normalized.from_name
99
- ? `${normalized.from_name} <${normalized.from_email}>`
100
- : normalized.from_email;
101
- const replyTo = normalized.reply_to_email
102
- ? normalized.reply_to_name
103
- ? `${normalized.reply_to_name} <${normalized.reply_to_email}>`
104
- : normalized.reply_to_email
105
- : undefined;
106
- try {
107
- this.mailMainService.setConfig(config);
108
- await this.mailMainService.send({
109
- to: destinationEmail,
110
- from: sender,
111
- replyTo,
112
- subject: `[HedHog] Teste do perfil ${normalized.name}`,
113
- body: `
114
- <p>Este e-mail confirma que o perfil <strong>${normalized.name}</strong> foi validado com sucesso.</p>
115
- <p><strong>Slug:</strong> ${normalized.slug}</p>
116
- <p><strong>Provedor:</strong> ${normalized.provider}</p>
117
- <p><strong>Remetente:</strong> ${sender}</p>
118
- `,
119
- });
120
- return {
121
- success: true,
122
- destination: destinationEmail,
123
- };
124
- }
125
- finally {
126
- await this.mailService.reloadConfig().catch(() => undefined);
127
- }
128
- }
129
- async ensureSlugIsAvailable(slug) {
130
- const existing = await this.prismaService.mail_profile.findUnique({
131
- where: { slug },
132
- select: { id: true },
133
- });
134
- if (existing) {
135
- throw new common_1.BadRequestException(`Mail profile with slug "${slug}" already exists.`);
136
- }
137
- }
138
- validateProviderFields(input) {
139
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
140
- const provider = String((_a = input.provider) !== null && _a !== void 0 ? _a : '').toUpperCase();
141
- if (!provider) {
142
- throw new common_1.BadRequestException('Provider is required.');
143
- }
144
- if (!String((_b = input.from_email) !== null && _b !== void 0 ? _b : '').trim()) {
145
- throw new common_1.BadRequestException('Sender email is required.');
146
- }
147
- switch (provider) {
148
- case 'SMTP':
149
- if (!String((_c = input.smtp_host) !== null && _c !== void 0 ? _c : '').trim()) {
150
- throw new common_1.BadRequestException('SMTP host is required.');
151
- }
152
- if (!input.smtp_port) {
153
- throw new common_1.BadRequestException('SMTP port is required.');
154
- }
155
- if (!String((_d = input.smtp_username) !== null && _d !== void 0 ? _d : '').trim()) {
156
- throw new common_1.BadRequestException('SMTP username is required.');
157
- }
158
- if (!String((_e = input.smtp_password) !== null && _e !== void 0 ? _e : '').trim()) {
159
- throw new common_1.BadRequestException('SMTP password is required.');
160
- }
161
- break;
162
- case 'GMAIL':
163
- if (!String((_f = input.gmail_client_id) !== null && _f !== void 0 ? _f : '').trim()) {
164
- throw new common_1.BadRequestException('Gmail client ID is required.');
165
- }
166
- if (!String((_g = input.gmail_client_secret) !== null && _g !== void 0 ? _g : '').trim()) {
167
- throw new common_1.BadRequestException('Gmail client secret is required.');
168
- }
169
- if (!String((_h = input.gmail_refresh_token) !== null && _h !== void 0 ? _h : '').trim()) {
170
- throw new common_1.BadRequestException('Gmail refresh token is required.');
171
- }
172
- break;
173
- case 'SES':
174
- if (!String((_j = input.ses_access_key_id) !== null && _j !== void 0 ? _j : '').trim()) {
175
- throw new common_1.BadRequestException('SES access key ID is required.');
176
- }
177
- if (!String((_k = input.ses_secret_access_key) !== null && _k !== void 0 ? _k : '').trim()) {
178
- throw new common_1.BadRequestException('SES secret access key is required.');
179
- }
180
- if (!String((_l = input.ses_region) !== null && _l !== void 0 ? _l : '').trim()) {
181
- throw new common_1.BadRequestException('SES region is required.');
182
- }
183
- break;
184
- default:
185
- throw new common_1.BadRequestException(`Invalid provider: ${provider}`);
186
- }
187
- }
188
- normalizeData(input) {
189
- var _a;
190
- const provider = String((_a = input.provider) !== null && _a !== void 0 ? _a : '').toUpperCase();
191
- return {
192
- slug: this.normalizeString(input.slug),
193
- name: this.normalizeString(input.name),
194
- provider,
195
- from_name: this.normalizeNullableString(input.from_name),
196
- from_email: this.normalizeString(input.from_email),
197
- reply_to_name: this.normalizeNullableString(input.reply_to_name),
198
- reply_to_email: this.normalizeNullableString(input.reply_to_email),
199
- smtp_host: provider === 'SMTP' ? this.normalizeNullableString(input.smtp_host) : null,
200
- smtp_port: provider === 'SMTP' && input.smtp_port !== undefined && input.smtp_port !== null
201
- ? Number(input.smtp_port)
202
- : null,
203
- smtp_secure: provider === 'SMTP' ? Boolean(input.smtp_secure) : false,
204
- smtp_username: provider === 'SMTP' ? this.normalizeNullableString(input.smtp_username) : null,
205
- smtp_password: provider === 'SMTP' ? this.normalizeNullableString(input.smtp_password) : null,
206
- gmail_client_id: provider === 'GMAIL' ? this.normalizeNullableString(input.gmail_client_id) : null,
207
- gmail_client_secret: provider === 'GMAIL'
208
- ? this.normalizeNullableString(input.gmail_client_secret)
209
- : null,
210
- gmail_refresh_token: provider === 'GMAIL'
211
- ? this.normalizeNullableString(input.gmail_refresh_token)
212
- : null,
213
- ses_access_key_id: provider === 'SES' ? this.normalizeNullableString(input.ses_access_key_id) : null,
214
- ses_secret_access_key: provider === 'SES'
215
- ? this.normalizeNullableString(input.ses_secret_access_key)
216
- : null,
217
- ses_region: provider === 'SES' ? this.normalizeNullableString(input.ses_region) : null,
218
- };
219
- }
220
- buildMailConfig(input) {
221
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
222
- switch (input.provider) {
223
- case 'SMTP':
224
- return {
225
- global: true,
226
- type: 'SMTP',
227
- host: (_a = input.smtp_host) !== null && _a !== void 0 ? _a : '',
228
- port: (_b = input.smtp_port) !== null && _b !== void 0 ? _b : 587,
229
- secure: input.smtp_secure,
230
- username: (_c = input.smtp_username) !== null && _c !== void 0 ? _c : '',
231
- password: (_d = input.smtp_password) !== null && _d !== void 0 ? _d : '',
232
- };
233
- case 'GMAIL':
234
- return {
235
- global: true,
236
- type: 'GMAIL',
237
- clientId: (_e = input.gmail_client_id) !== null && _e !== void 0 ? _e : '',
238
- clientSecret: (_f = input.gmail_client_secret) !== null && _f !== void 0 ? _f : '',
239
- refreshToken: (_g = input.gmail_refresh_token) !== null && _g !== void 0 ? _g : '',
240
- from: input.from_email,
241
- };
242
- case 'SES':
243
- return {
244
- global: true,
245
- type: 'SES',
246
- region: (_h = input.ses_region) !== null && _h !== void 0 ? _h : '',
247
- accessKeyId: (_j = input.ses_access_key_id) !== null && _j !== void 0 ? _j : '',
248
- secretAccessKey: (_k = input.ses_secret_access_key) !== null && _k !== void 0 ? _k : '',
249
- from: input.from_email,
250
- };
251
- default:
252
- throw new common_1.BadRequestException(`Invalid provider: ${input.provider}`);
253
- }
254
- }
255
- normalizeString(value) {
256
- return String(value !== null && value !== void 0 ? value : '').trim();
257
- }
258
- normalizeNullableString(value) {
259
- if (value === undefined || value === null) {
260
- return null;
261
- }
262
- const normalized = String(value).trim();
263
- return normalized.length > 0 ? normalized : null;
264
- }
265
- };
266
- exports.MailProfileService = MailProfileService;
267
- exports.MailProfileService = MailProfileService = __decorate([
268
- (0, common_1.Injectable)(),
269
- __param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => api_prisma_1.PrismaService))),
270
- __param(1, (0, common_1.Inject)((0, common_1.forwardRef)(() => api_pagination_1.PaginationService))),
271
- __param(2, (0, common_1.Inject)((0, common_1.forwardRef)(() => api_mail_1.MailService))),
272
- __param(3, (0, common_1.Inject)((0, common_1.forwardRef)(() => mail_service_1.MailService))),
273
- __metadata("design:paramtypes", [api_prisma_1.PrismaService,
274
- api_pagination_1.PaginationService,
275
- api_mail_1.MailService,
276
- mail_service_1.MailService])
277
- ], MailProfileService);
278
- //# sourceMappingURL=mail-profile.service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mail-profile.service.js","sourceRoot":"","sources":["../../src/mail-profile/mail-profile.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,gDAAmE;AACnE,4DAA2E;AAC3E,oDAAoD;AACpD,2CAMwB;AACxB,uDAAmD;AAK5C,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AM,IAAI,4BAAmB,CAAC,qBAAqB,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;IAEO,eAAe,CAAC,KAAc;QACpC,OAAO,MAAM,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACpC,CAAC;IAEO,uBAAuB,CAAC,KAAc;QAC5C,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YAC1C,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;QACxC,OAAO,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC;IACnD,CAAC;CACF,CAAA;AAnSY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,0BAAa,CAAC,CAAC,CAAA;IAEvC,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,kCAAiB,CAAC,CAAC,CAAA;IAE3C,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,sBAAe,CAAC,CAAC,CAAA;IAEzC,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,0BAAW,CAAC,CAAC,CAAA;qCALN,0BAAa;QAET,kCAAiB;QAEnB,sBAAe;QAEnB,0BAAW;GAThC,kBAAkB,CAmS9B"}
@@ -1,20 +0,0 @@
1
- import { IntegrationProfileService } from '../../integration-profile/integration-profile.service';
2
- import { McpContext } from '../types/mcp-context.type';
3
- export declare class CoreMailProfileMcpTools {
4
- private readonly integrationProfileService;
5
- constructor(integrationProfileService: IntegrationProfileService);
6
- listMailProfiles(args: {
7
- page?: number;
8
- pageSize?: number;
9
- search?: string;
10
- sortField?: string;
11
- sortOrder?: string;
12
- }, _context: McpContext): Promise<any>;
13
- getMailProfile(args: {
14
- id: number;
15
- }, _context: McpContext): Promise<any>;
16
- deleteMailProfiles(args: {
17
- ids: number[];
18
- }, _context: McpContext): Promise<any>;
19
- }
20
- //# sourceMappingURL=core-mail-profile.mcp-tools.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"core-mail-profile.mcp-tools.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/core-mail-profile.mcp-tools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uDAAuD,CAAC;AAElG,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,qBACa,uBAAuB;IACtB,OAAO,CAAC,QAAQ,CAAC,yBAAyB;gBAAzB,yBAAyB,EAAE,yBAAyB;IAiB3E,gBAAgB,CACpB,IAAI,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,EACnG,QAAQ,EAAE,UAAU,GACnB,OAAO,CAAC,GAAG,CAAC;IAuBT,cAAc,CAAC,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,EAAE,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC;IAexE,kBAAkB,CAAC,IAAI,EAAE;QAAE,GAAG,EAAE,MAAM,EAAE,CAAA;KAAE,EAAE,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC;CAGtF"}
@@ -1,96 +0,0 @@
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.CoreMailProfileMcpTools = void 0;
13
- const common_1 = require("@nestjs/common");
14
- const integration_profile_service_1 = require("../../integration-profile/integration-profile.service");
15
- const mcp_tool_decorator_1 = require("../decorators/mcp-tool.decorator");
16
- let CoreMailProfileMcpTools = class CoreMailProfileMcpTools {
17
- constructor(integrationProfileService) {
18
- this.integrationProfileService = integrationProfileService;
19
- }
20
- async listMailProfiles(args, _context) {
21
- var _a, _b, _c, _d, _e;
22
- return this.integrationProfileService.list({
23
- page: (_a = args.page) !== null && _a !== void 0 ? _a : 1,
24
- pageSize: (_b = args.pageSize) !== null && _b !== void 0 ? _b : 20,
25
- search: (_c = args.search) !== null && _c !== void 0 ? _c : '',
26
- sortField: (_d = args.sortField) !== null && _d !== void 0 ? _d : 'id',
27
- sortOrder: (_e = args.sortOrder) !== null && _e !== void 0 ? _e : 'asc',
28
- fields: '',
29
- });
30
- }
31
- async getMailProfile(args, _context) {
32
- return this.integrationProfileService.get(args.id);
33
- }
34
- async deleteMailProfiles(args, _context) {
35
- return this.integrationProfileService.delete({ ids: args.ids });
36
- }
37
- };
38
- exports.CoreMailProfileMcpTools = CoreMailProfileMcpTools;
39
- __decorate([
40
- (0, mcp_tool_decorator_1.McpTool)({
41
- name: 'core.mail-profile.list',
42
- description: 'Lists integration profiles with optional pagination. Admin only.',
43
- inputSchema: {
44
- type: 'object',
45
- properties: {
46
- page: { type: 'number', description: 'Page number (default: 1)' },
47
- pageSize: { type: 'number', description: 'Items per page (default: 20)' },
48
- search: { type: 'string', description: 'Search term' },
49
- sortField: { type: 'string', description: 'Field to sort by' },
50
- sortOrder: { type: 'string', enum: ['asc', 'desc'], description: 'Sort direction' },
51
- },
52
- },
53
- readOnly: true,
54
- }),
55
- __metadata("design:type", Function),
56
- __metadata("design:paramtypes", [Object, Object]),
57
- __metadata("design:returntype", Promise)
58
- ], CoreMailProfileMcpTools.prototype, "listMailProfiles", null);
59
- __decorate([
60
- (0, mcp_tool_decorator_1.McpTool)({
61
- name: 'core.mail-profile.get',
62
- description: 'Returns a single integration profile by ID. Admin only.',
63
- inputSchema: {
64
- type: 'object',
65
- properties: {
66
- id: { type: 'number', description: 'Profile ID' },
67
- },
68
- required: ['id'],
69
- },
70
- readOnly: true,
71
- }),
72
- __metadata("design:type", Function),
73
- __metadata("design:paramtypes", [Object, Object]),
74
- __metadata("design:returntype", Promise)
75
- ], CoreMailProfileMcpTools.prototype, "getMailProfile", null);
76
- __decorate([
77
- (0, mcp_tool_decorator_1.McpTool)({
78
- name: 'core.mail-profile.delete',
79
- description: 'Deletes one or more integration profiles by their IDs. Admin only.',
80
- inputSchema: {
81
- type: 'object',
82
- properties: {
83
- ids: { type: 'array', items: { type: 'number' }, description: 'Profile IDs to delete' },
84
- },
85
- required: ['ids'],
86
- },
87
- }),
88
- __metadata("design:type", Function),
89
- __metadata("design:paramtypes", [Object, Object]),
90
- __metadata("design:returntype", Promise)
91
- ], CoreMailProfileMcpTools.prototype, "deleteMailProfiles", null);
92
- exports.CoreMailProfileMcpTools = CoreMailProfileMcpTools = __decorate([
93
- (0, common_1.Injectable)(),
94
- __metadata("design:paramtypes", [integration_profile_service_1.IntegrationProfileService])
95
- ], CoreMailProfileMcpTools);
96
- //# sourceMappingURL=core-mail-profile.mcp-tools.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"core-mail-profile.mcp-tools.js","sourceRoot":"","sources":["../../../src/mcp/tools/core-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
5
- provider: (typeof providerOptions)[number];
6
- host: string;
7
- token: string;
8
- instance_name: string;
9
- }
10
- export {};
11
- //# sourceMappingURL=create.dto.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create.dto.d.ts","sourceRoot":"","sources":["../../../src/whatsapp-profile/dto/create.dto.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,eAAe,2BAA4B,CAAC;AAElD,qBAAa,SAAS;IAIpB,IAAI,EAAE,MAAM,CAAC;IAKb,IAAI,EAAE,MAAM,CAAC;IAIb,QAAQ,EAAE,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;IAK3C,IAAI,EAAE,MAAM,CAAC;IAKb,KAAK,EAAE,MAAM,CAAC;IAKd,aAAa,EAAE,MAAM,CAAC;CACvB"}
@@ -1,55 +0,0 @@
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.CreateDTO = void 0;
13
- const api_locale_1 = require("@hed-hog/api-locale");
14
- const class_transformer_1 = require("class-transformer");
15
- const class_validator_1 = require("class-validator");
16
- const providerOptions = ['WHATSAPP_API'];
17
- class CreateDTO {
18
- }
19
- exports.CreateDTO = CreateDTO;
20
- __decorate([
21
- (0, class_validator_1.IsString)({ message: (args) => (0, api_locale_1.getLocaleText)('validation.stringRequired', args.value) }),
22
- (0, class_validator_1.MaxLength)(127),
23
- (0, class_transformer_1.Transform)(({ value }) => String(value !== null && value !== void 0 ? value : '').trim()),
24
- __metadata("design:type", String)
25
- ], CreateDTO.prototype, "slug", void 0);
26
- __decorate([
27
- (0, class_validator_1.IsString)({ message: (args) => (0, api_locale_1.getLocaleText)('validation.stringRequired', args.value) }),
28
- (0, class_validator_1.MaxLength)(127),
29
- (0, class_transformer_1.Transform)(({ value }) => String(value !== null && value !== void 0 ? value : '').trim()),
30
- __metadata("design:type", String)
31
- ], CreateDTO.prototype, "name", void 0);
32
- __decorate([
33
- (0, class_validator_1.IsIn)(providerOptions),
34
- (0, class_transformer_1.Transform)(({ value }) => String(value !== null && value !== void 0 ? value : '').trim().toUpperCase()),
35
- __metadata("design:type", Object)
36
- ], CreateDTO.prototype, "provider", void 0);
37
- __decorate([
38
- (0, class_validator_1.IsString)({ message: (args) => (0, api_locale_1.getLocaleText)('validation.stringRequired', args.value) }),
39
- (0, class_validator_1.MaxLength)(255),
40
- (0, class_transformer_1.Transform)(({ value }) => String(value !== null && value !== void 0 ? value : '').trim()),
41
- __metadata("design:type", String)
42
- ], CreateDTO.prototype, "host", void 0);
43
- __decorate([
44
- (0, class_validator_1.IsString)({ message: (args) => (0, api_locale_1.getLocaleText)('validation.stringRequired', args.value) }),
45
- (0, class_validator_1.MaxLength)(255),
46
- (0, class_transformer_1.Transform)(({ value }) => String(value !== null && value !== void 0 ? value : '').trim()),
47
- __metadata("design:type", String)
48
- ], CreateDTO.prototype, "token", void 0);
49
- __decorate([
50
- (0, class_validator_1.IsString)({ message: (args) => (0, api_locale_1.getLocaleText)('validation.stringRequired', args.value) }),
51
- (0, class_validator_1.MaxLength)(127),
52
- (0, class_transformer_1.Transform)(({ value }) => String(value !== null && value !== void 0 ? value : '').trim()),
53
- __metadata("design:type", String)
54
- ], CreateDTO.prototype, "instance_name", void 0);
55
- //# sourceMappingURL=create.dto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create.dto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AA2B,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;IACvF,IAAA,2BAAS,EAAC,GAAG,CAAC;IACd,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;;uCACxC;AAKb;IAHC,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,0BAAa,EAAC,2BAA2B,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;IACvF,IAAA,2BAAS,EAAC,GAAG,CAAC;IACd,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;;wCACvC;AAKd;IAHC,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,0BAAa,EAAC,2BAA2B,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;IACvF,IAAA,2BAAS,EAAC,GAAG,CAAC;IACd,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;;gDAC/B"}
@@ -1,6 +0,0 @@
1
- import { CreateDTO } from './create.dto';
2
- declare const UpdateDTO_base: import("@nestjs/mapped-types").MappedType<Partial<CreateDTO>>;
3
- export declare class UpdateDTO extends UpdateDTO_base {
4
- }
5
- export {};
6
- //# sourceMappingURL=update.dto.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update.dto.d.ts","sourceRoot":"","sources":["../../../src/whatsapp-profile/dto/update.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;;AAEzC,qBAAa,SAAU,SAAQ,cAAsB;CAAG"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UpdateDTO = void 0;
4
- const mapped_types_1 = require("@nestjs/mapped-types");
5
- const create_dto_1 = require("./create.dto");
6
- class UpdateDTO extends (0, mapped_types_1.PartialType)(create_dto_1.CreateDTO) {
7
- }
8
- exports.UpdateDTO = UpdateDTO;
9
- //# sourceMappingURL=update.dto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update.dto.js","sourceRoot":"","sources":["../../../src/whatsapp-profile/dto/update.dto.ts"],"names":[],"mappings":";;;AAAA,uDAAmD;AACnD,6CAAyC;AAEzC,MAAa,SAAU,SAAQ,IAAA,0BAAW,EAAC,sBAAS,CAAC;CAAG;AAAxD,8BAAwD"}
@@ -1,54 +0,0 @@
1
- import { DeleteDTO } from '@hed-hog/api';
2
- import { CreateDTO } from './dto/create.dto';
3
- import { UpdateDTO } from './dto/update.dto';
4
- import { WhatsAppProfileService } from './whatsapp-profile.service';
5
- export declare class WhatsAppProfileController {
6
- private readonly whatsappProfileService;
7
- constructor(whatsappProfileService: WhatsAppProfileService);
8
- list(paginationParams: any): Promise<{
9
- total: any;
10
- lastPage: number;
11
- page: number;
12
- pageSize: number;
13
- prev: number;
14
- next: number;
15
- data: any[];
16
- }>;
17
- get(id: number): Promise<{
18
- name: string;
19
- id: number;
20
- host: string;
21
- provider: import("@prisma/client").$Enums.whatsapp_profile_provider_enum;
22
- created_at: Date;
23
- updated_at: Date;
24
- slug: string;
25
- token: string;
26
- instance_name: string;
27
- }>;
28
- create(data: CreateDTO): Promise<{
29
- name: string;
30
- id: number;
31
- host: string;
32
- provider: import("@prisma/client").$Enums.whatsapp_profile_provider_enum;
33
- created_at: Date;
34
- updated_at: Date;
35
- slug: string;
36
- token: string;
37
- instance_name: string;
38
- }>;
39
- update(id: number, data: UpdateDTO): Promise<{
40
- name: string;
41
- id: number;
42
- host: string;
43
- provider: import("@prisma/client").$Enums.whatsapp_profile_provider_enum;
44
- created_at: Date;
45
- updated_at: Date;
46
- slug: string;
47
- token: string;
48
- instance_name: string;
49
- }>;
50
- delete(data: DeleteDTO): Promise<{
51
- count: number;
52
- }>;
53
- }
54
- //# sourceMappingURL=whatsapp-profile.controller.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"whatsapp-profile.controller.d.ts","sourceRoot":"","sources":["../../src/whatsapp-profile/whatsapp-profile.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAQ,MAAM,cAAc,CAAC;AAc/C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,qBAEa,yBAAyB;IAGlC,OAAO,CAAC,QAAQ,CAAC,sBAAsB;gBAAtB,sBAAsB,EAAE,sBAAsB;IAI3D,IAAI,CAAe,gBAAgB,KAAA;;;;;;;;;IAKnC,GAAG,CAA4B,EAAE,EAAE,MAAM;;;;;;;;;;;IAKzC,MAAM,CAAS,IAAI,EAAE,SAAS;;;;;;;;;;;IAK9B,MAAM,CAA4B,EAAE,EAAE,MAAM,EAAU,IAAI,EAAE,SAAS;;;;;;;;;;;IAKrE,MAAM,CAAS,IAAI,EAAE,SAAS;;;CAGrC"}