@hed-hog/core 0.0.367 → 0.0.370

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 (62) hide show
  1. package/dist/file/file.service.d.ts +1 -0
  2. package/dist/file/file.service.d.ts.map +1 -1
  3. package/dist/file/file.service.js +1 -1
  4. package/dist/file/file.service.js.map +1 -1
  5. package/dist/notification/events/notification-stale-progress-check.event.d.ts +6 -0
  6. package/dist/notification/events/notification-stale-progress-check.event.d.ts.map +1 -0
  7. package/dist/notification/events/notification-stale-progress-check.event.js +11 -0
  8. package/dist/notification/events/notification-stale-progress-check.event.js.map +1 -0
  9. package/dist/notification/notification.service.d.ts +4 -1
  10. package/dist/notification/notification.service.d.ts.map +1 -1
  11. package/dist/notification/notification.service.js +9 -26
  12. package/dist/notification/notification.service.js.map +1 -1
  13. package/dist/task/task.service.d.ts +19 -0
  14. package/dist/task/task.service.d.ts.map +1 -1
  15. package/dist/task/task.service.js +46 -0
  16. package/dist/task/task.service.js.map +1 -1
  17. package/dist/user/user.controller.d.ts +23 -5
  18. package/dist/user/user.controller.d.ts.map +1 -1
  19. package/dist/user/user.controller.js +32 -15
  20. package/dist/user/user.controller.js.map +1 -1
  21. package/dist/user/user.service.d.ts +28 -8
  22. package/dist/user/user.service.d.ts.map +1 -1
  23. package/dist/user/user.service.js +120 -8
  24. package/dist/user/user.service.js.map +1 -1
  25. package/hedhog/data/integration_event_catalog.yaml +118 -118
  26. package/hedhog/data/route.yaml +162 -204
  27. package/hedhog/data/setting_group.yaml +14 -0
  28. package/hedhog/frontend/app/roles/page.tsx.ejs +4 -1
  29. package/hedhog/frontend/app/users/user-logs.tsx.ejs +190 -0
  30. package/hedhog/frontend/app/users/user-sheet.tsx.ejs +15 -1
  31. package/hedhog/frontend/messages/en.json +13 -0
  32. package/hedhog/frontend/messages/pt.json +13 -0
  33. package/hedhog/table/event_webhook.yaml +55 -55
  34. package/hedhog/table/event_webhook_delivery_log.yaml +66 -66
  35. package/hedhog/table/event_webhook_event.yaml +26 -26
  36. package/hedhog/table/integration_event_catalog.yaml +41 -41
  37. package/hedhog/table/mcp_conversation.yaml +12 -12
  38. package/hedhog/table/mcp_conversation_message.yaml +23 -23
  39. package/hedhog/table/mcp_tool_call_log.yaml +22 -22
  40. package/hedhog/table/route.yaml +33 -33
  41. package/hedhog/table/user_change_log.yaml +40 -0
  42. package/hedhog/table/webhook_call_log.yaml +46 -46
  43. package/hedhog/table/webhook_integration.yaml +43 -43
  44. package/package.json +5 -5
  45. package/src/file/file.service.ts +2 -1
  46. package/src/integration/types/event.types.ts +4 -4
  47. package/src/mcp/decorators/mcp-tool.decorator.ts +7 -7
  48. package/src/mcp/guards/mcp-permission.guard.ts +51 -51
  49. package/src/mcp/interfaces/mcp-tool-definition.interface.ts +6 -6
  50. package/src/mcp/mcp-server.service.ts +87 -87
  51. package/src/mcp/types/mcp-context.type.ts +6 -6
  52. package/src/mcp-chat/dto/create-conversation.dto.ts +7 -7
  53. package/src/mcp-chat/dto/send-message.dto.ts +7 -7
  54. package/src/notification/events/notification-stale-progress-check.event.ts +5 -0
  55. package/src/notification/notification.service.ts +12 -25
  56. package/src/route/dto/create.dto.ts +32 -32
  57. package/src/route/dto/update.dto.ts +31 -31
  58. package/src/task/task.service.ts +52 -0
  59. package/src/user/user.controller.ts +23 -9
  60. package/src/user/user.service.ts +183 -8
  61. package/src/webhook-integration/integration-event-catalog.controller.ts +50 -50
  62. package/src/webhook-integration/integration-event-catalog.service.ts +117 -117
@@ -1,118 +1,118 @@
1
- - slug: core.setting.changed
2
- name: Core setting changed
3
- module: core
4
- aggregate_type: setting
5
- description: Disparado quando uma configuração do core é alterada.
6
- status: active
7
- payload_schema:
8
- slug:
9
- type: string
10
- description: Slug da configuração alterada
11
- oldValue:
12
- type: string
13
- nullable: true
14
- description: Valor anterior da configuração
15
- newValue:
16
- type: string
17
- nullable: true
18
- description: Novo valor da configuração
19
- hasValue:
20
- type: boolean
21
- description: Indica se o novo valor está definido
22
- metadata_schema:
23
- settingSlug:
24
- type: string
25
- description: Slug da configuração (espelho de payload.slug, usado para roteamento)
26
- source:
27
- type: string
28
- description: Origem da alteração (ex. api, migration, seed)
29
-
30
- - slug: core.user.created
31
- name: Core user created
32
- module: core
33
- aggregate_type: user
34
- description: Disparado quando um novo usuário é criado.
35
- status: active
36
- payload_schema:
37
- id:
38
- type: number
39
- description: ID do usuário criado
40
- name:
41
- type: string
42
- description: Nome do usuário
43
- email:
44
- type: string
45
- description: E-mail do usuário
46
- metadata_schema: null
47
-
48
- - slug: core.user.updated
49
- name: Core user updated
50
- module: core
51
- aggregate_type: user
52
- description: Disparado quando os dados de um usuário são atualizados.
53
- status: active
54
- payload_schema:
55
- id:
56
- type: number
57
- description: ID do usuário atualizado
58
- name:
59
- type: string
60
- nullable: true
61
- description: Novo nome do usuário
62
- metadata_schema: null
63
-
64
- - slug: core.user.deleted
65
- name: Core user deleted
66
- module: core
67
- aggregate_type: user
68
- description: Disparado quando um ou mais usuários são excluídos.
69
- status: active
70
- payload_schema:
71
- ids:
72
- type: array
73
- description: IDs dos usuários excluídos
74
- metadata_schema: null
75
-
76
- - slug: core.role.created
77
- name: Core role created
78
- module: core
79
- aggregate_type: role
80
- description: Disparado quando um novo perfil de acesso é criado.
81
- status: active
82
- payload_schema:
83
- id:
84
- type: number
85
- description: ID do perfil criado
86
- slug:
87
- type: string
88
- description: Slug do perfil
89
- metadata_schema: null
90
-
91
- - slug: core.role.updated
92
- name: Core role updated
93
- module: core
94
- aggregate_type: role
95
- description: Disparado quando um perfil de acesso é atualizado.
96
- status: active
97
- payload_schema:
98
- id:
99
- type: number
100
- description: ID do perfil atualizado
101
- slug:
102
- type: string
103
- nullable: true
104
- description: Novo slug do perfil
105
- metadata_schema: null
106
-
107
- - slug: core.role.deleted
108
- name: Core role deleted
109
- module: core
110
- aggregate_type: role
111
- description: Disparado quando um ou mais perfis de acesso são excluídos.
112
- status: active
113
- payload_schema:
114
- ids:
115
- type: array
116
- description: IDs dos perfis excluídos
117
- metadata_schema: null
118
-
1
+ - slug: core.setting.changed
2
+ name: Core setting changed
3
+ module: core
4
+ aggregate_type: setting
5
+ description: Disparado quando uma configuração do core é alterada.
6
+ status: active
7
+ payload_schema:
8
+ slug:
9
+ type: string
10
+ description: Slug da configuração alterada
11
+ oldValue:
12
+ type: string
13
+ nullable: true
14
+ description: Valor anterior da configuração
15
+ newValue:
16
+ type: string
17
+ nullable: true
18
+ description: Novo valor da configuração
19
+ hasValue:
20
+ type: boolean
21
+ description: Indica se o novo valor está definido
22
+ metadata_schema:
23
+ settingSlug:
24
+ type: string
25
+ description: Slug da configuração (espelho de payload.slug, usado para roteamento)
26
+ source:
27
+ type: string
28
+ description: Origem da alteração (ex. api, migration, seed)
29
+
30
+ - slug: core.user.created
31
+ name: Core user created
32
+ module: core
33
+ aggregate_type: user
34
+ description: Disparado quando um novo usuário é criado.
35
+ status: active
36
+ payload_schema:
37
+ id:
38
+ type: number
39
+ description: ID do usuário criado
40
+ name:
41
+ type: string
42
+ description: Nome do usuário
43
+ email:
44
+ type: string
45
+ description: E-mail do usuário
46
+ metadata_schema: null
47
+
48
+ - slug: core.user.updated
49
+ name: Core user updated
50
+ module: core
51
+ aggregate_type: user
52
+ description: Disparado quando os dados de um usuário são atualizados.
53
+ status: active
54
+ payload_schema:
55
+ id:
56
+ type: number
57
+ description: ID do usuário atualizado
58
+ name:
59
+ type: string
60
+ nullable: true
61
+ description: Novo nome do usuário
62
+ metadata_schema: null
63
+
64
+ - slug: core.user.deleted
65
+ name: Core user deleted
66
+ module: core
67
+ aggregate_type: user
68
+ description: Disparado quando um ou mais usuários são excluídos.
69
+ status: active
70
+ payload_schema:
71
+ ids:
72
+ type: array
73
+ description: IDs dos usuários excluídos
74
+ metadata_schema: null
75
+
76
+ - slug: core.role.created
77
+ name: Core role created
78
+ module: core
79
+ aggregate_type: role
80
+ description: Disparado quando um novo perfil de acesso é criado.
81
+ status: active
82
+ payload_schema:
83
+ id:
84
+ type: number
85
+ description: ID do perfil criado
86
+ slug:
87
+ type: string
88
+ description: Slug do perfil
89
+ metadata_schema: null
90
+
91
+ - slug: core.role.updated
92
+ name: Core role updated
93
+ module: core
94
+ aggregate_type: role
95
+ description: Disparado quando um perfil de acesso é atualizado.
96
+ status: active
97
+ payload_schema:
98
+ id:
99
+ type: number
100
+ description: ID do perfil atualizado
101
+ slug:
102
+ type: string
103
+ nullable: true
104
+ description: Novo slug do perfil
105
+ metadata_schema: null
106
+
107
+ - slug: core.role.deleted
108
+ name: Core role deleted
109
+ module: core
110
+ aggregate_type: role
111
+ description: Disparado quando um ou mais perfis de acesso são excluídos.
112
+ status: active
113
+ payload_schema:
114
+ ids:
115
+ type: array
116
+ description: IDs dos perfis excluídos
117
+ metadata_schema: null
118
+
@@ -125,13 +125,6 @@
125
125
  role:
126
126
  - where:
127
127
  slug: admin
128
- - url: /menu/:menuId/screen
129
- method: GET
130
- type: HTTP
131
- relations:
132
- role:
133
- - where:
134
- slug: admin
135
128
  - url: /menu/:menuId/role
136
129
  method: PATCH
137
130
  type: HTTP
@@ -139,13 +132,6 @@
139
132
  role:
140
133
  - where:
141
134
  slug: admin
142
- - url: /menu/:menuId/screen
143
- method: PATCH
144
- type: HTTP
145
- relations:
146
- role:
147
- - where:
148
- slug: admin
149
135
  - url: /menu/:menuId
150
136
  method: GET
151
137
  type: HTTP
@@ -416,8 +402,8 @@
416
402
  slug: admin
417
403
  - where:
418
404
  slug: admin-user
419
- - url: /user/:userId/role
420
- method: PATCH
405
+ - url: /user/:userId/role/:roleId
406
+ method: DELETE
421
407
  type: HTTP
422
408
  relations:
423
409
  role:
@@ -426,7 +412,7 @@
426
412
  - where:
427
413
  slug: admin-user
428
414
  - url: /user/:userId/role/:roleId
429
- method: DELETE
415
+ method: POST
430
416
  type: HTTP
431
417
  relations:
432
418
  role:
@@ -434,8 +420,8 @@
434
420
  slug: admin
435
421
  - where:
436
422
  slug: admin-user
437
- - url: /user/:userId/role/:roleId
438
- method: POST
423
+ - url: /user/:userId
424
+ method: GET
439
425
  type: HTTP
440
426
  relations:
441
427
  role:
@@ -443,7 +429,7 @@
443
429
  slug: admin
444
430
  - where:
445
431
  slug: admin-user
446
- - url: /user/:userId
432
+ - url: /user/:userId/log
447
433
  method: GET
448
434
  type: HTTP
449
435
  relations:
@@ -520,7 +506,7 @@
520
506
  role:
521
507
  - where:
522
508
  slug: admin
523
- - url: /locale/:localeId
509
+ - url: /locale/:id
524
510
  method: GET
525
511
  type: HTTP
526
512
  relations:
@@ -541,7 +527,7 @@
541
527
  role:
542
528
  - where:
543
529
  slug: admin
544
- - url: /locale/:localeId
530
+ - url: /locale/:id
545
531
  method: PATCH
546
532
  type: HTTP
547
533
  relations:
@@ -633,188 +619,6 @@
633
619
  role:
634
620
  - where:
635
621
  slug: admin
636
- - url: /translation-namespace
637
- method: GET
638
- type: HTTP
639
- relations:
640
- role:
641
- - where:
642
- slug: admin
643
- - url: /translation-namespace
644
- method: POST
645
- type: HTTP
646
- relations:
647
- role:
648
- - where:
649
- slug: admin
650
- - url: /translation-namespace/:id
651
- method: GET
652
- type: HTTP
653
- relations:
654
- role:
655
- - where:
656
- slug: admin
657
- - url: /translation-namespace/:id
658
- method: PATCH
659
- type: HTTP
660
- relations:
661
- role:
662
- - where:
663
- slug: admin
664
- - url: /translation-namespace
665
- method: DELETE
666
- type: HTTP
667
- relations:
668
- role:
669
- - where:
670
- slug: admin
671
- - url: /translation
672
- method: GET
673
- type: HTTP
674
- relations:
675
- role:
676
- - where:
677
- slug: admin
678
- - url: /translation
679
- method: POST
680
- type: HTTP
681
- relations:
682
- role:
683
- - where:
684
- slug: admin
685
- - url: /translation/:id
686
- method: GET
687
- type: HTTP
688
- relations:
689
- role:
690
- - where:
691
- slug: admin
692
- - url: /translation/:id
693
- method: PATCH
694
- type: HTTP
695
- relations:
696
- role:
697
- - where:
698
- slug: admin
699
- - url: /translation
700
- method: DELETE
701
- type: HTTP
702
- relations:
703
- role:
704
- - where:
705
- slug: admin
706
- - url: /multifactor
707
- method: GET
708
- type: HTTP
709
- relations:
710
- role:
711
- - where:
712
- slug: admin
713
- - url: /multifactor
714
- method: POST
715
- type: HTTP
716
- relations:
717
- role:
718
- - where:
719
- slug: admin
720
- - url: /multifactor/:id
721
- method: GET
722
- type: HTTP
723
- relations:
724
- role:
725
- - where:
726
- slug: admin
727
- - url: /multifactor/:id
728
- method: PATCH
729
- type: HTTP
730
- relations:
731
- role:
732
- - where:
733
- slug: admin
734
- - url: /multifactor
735
- method: DELETE
736
- type: HTTP
737
- relations:
738
- role:
739
- - where:
740
- slug: admin
741
- - url: /user/:id
742
- method: GET
743
- type: HTTP
744
- relations:
745
- role:
746
- - where:
747
- slug: admin
748
- - url: /user/:id
749
- method: PATCH
750
- type: HTTP
751
- relations:
752
- role:
753
- - where:
754
- slug: admin
755
- - url: /screen/:id
756
- method: GET
757
- type: HTTP
758
- relations:
759
- role:
760
- - where:
761
- slug: admin
762
- - url: /screen/:id
763
- method: PATCH
764
- type: HTTP
765
- relations:
766
- role:
767
- - where:
768
- slug: admin
769
- - url: /menu/:id
770
- method: GET
771
- type: HTTP
772
- relations:
773
- role:
774
- - where:
775
- slug: admin
776
- - url: /menu/:id
777
- method: PATCH
778
- type: HTTP
779
- relations:
780
- role:
781
- - where:
782
- slug: admin
783
- - url: /menu-screen
784
- method: GET
785
- type: HTTP
786
- relations:
787
- role:
788
- - where:
789
- slug: admin
790
- - url: /menu-screen
791
- method: POST
792
- type: HTTP
793
- relations:
794
- role:
795
- - where:
796
- slug: admin
797
- - url: /menu-screen/:menu_id
798
- method: GET
799
- type: HTTP
800
- relations:
801
- role:
802
- - where:
803
- slug: admin
804
- - url: /menu-screen/:menu_id
805
- method: PATCH
806
- type: HTTP
807
- relations:
808
- role:
809
- - where:
810
- slug: admin
811
- - url: /menu-screen
812
- method: DELETE
813
- type: HTTP
814
- relations:
815
- role:
816
- - where:
817
- slug: admin
818
622
  - url: /dashboard-core/home
819
623
  method: GET
820
624
  type: HTTP
@@ -3374,3 +3178,157 @@
3374
3178
  slug: admin
3375
3179
  - where:
3376
3180
  slug: admin-access
3181
+
3182
+ - url: /auth/verify
3183
+ method: GET
3184
+ type: HTTP
3185
+ relations: &core_user_roles
3186
+ role:
3187
+ - where:
3188
+ slug: admin
3189
+ - where:
3190
+ slug: admin-access
3191
+ - url: /auth/desktop-token
3192
+ method: GET
3193
+ type: HTTP
3194
+ relations: *core_user_roles
3195
+ - url: /auth/roles
3196
+ method: GET
3197
+ type: HTTP
3198
+ relations: *core_user_roles
3199
+ - url: /system
3200
+ method: GET
3201
+ type: HTTP
3202
+ relations: *core_user_roles
3203
+ - url: /dashboard-core/:slug
3204
+ method: GET
3205
+ type: HTTP
3206
+ relations: *core_user_roles
3207
+ - url: /oauth/:provider/callback/connect
3208
+ method: GET
3209
+ type: HTTP
3210
+ relations: *core_user_roles
3211
+ - url: /oauth/:provider
3212
+ method: DELETE
3213
+ type: HTTP
3214
+ relations: *core_user_roles
3215
+ - url: /profile/preferences
3216
+ method: PUT
3217
+ type: HTTP
3218
+ relations: *core_user_roles
3219
+ - url: /profile/mfa/check-verification
3220
+ method: POST
3221
+ type: HTTP
3222
+ relations: *core_user_roles
3223
+ - url: /profile/mfa/check-verification-remove
3224
+ method: POST
3225
+ type: HTTP
3226
+ relations: *core_user_roles
3227
+ - url: /profile/mfa/verify-before-add
3228
+ method: POST
3229
+ type: HTTP
3230
+ relations: *core_user_roles
3231
+ - url: /profile/totp/generate
3232
+ method: POST
3233
+ type: HTTP
3234
+ relations: *core_user_roles
3235
+ - url: /profile/totp/verify
3236
+ method: POST
3237
+ type: HTTP
3238
+ relations: *core_user_roles
3239
+ - url: /profile/totp/:mfaId/remove
3240
+ method: DELETE
3241
+ type: HTTP
3242
+ relations: *core_user_roles
3243
+ - url: /profile/email/verify/confirm
3244
+ method: POST
3245
+ type: HTTP
3246
+ relations: *core_user_roles
3247
+ - url: /profile/email/verify
3248
+ method: POST
3249
+ type: HTTP
3250
+ relations: *core_user_roles
3251
+ - url: /profile/mfa/email/verify
3252
+ method: POST
3253
+ type: HTTP
3254
+ relations: *core_user_roles
3255
+ - url: /profile/mfa/email/verify/confirm
3256
+ method: POST
3257
+ type: HTTP
3258
+ relations: *core_user_roles
3259
+ - url: /profile/email/send-code-to-remove
3260
+ method: POST
3261
+ type: HTTP
3262
+ relations: *core_user_roles
3263
+ - url: /profile/email
3264
+ method: GET
3265
+ type: HTTP
3266
+ relations: *core_user_roles
3267
+ - url: /profile/email/:mfaId/remove
3268
+ method: DELETE
3269
+ type: HTTP
3270
+ relations: *core_user_roles
3271
+ - url: /profile
3272
+ method: GET
3273
+ type: HTTP
3274
+ relations: *core_user_roles
3275
+ - url: /profile/mfa
3276
+ method: GET
3277
+ type: HTTP
3278
+ relations: *core_user_roles
3279
+ - url: /profile/update-mfa/:mfaId
3280
+ method: PUT
3281
+ type: HTTP
3282
+ relations: *core_user_roles
3283
+ - url: /profile/mfa/:mfaId/remove-with-recovery-code
3284
+ method: DELETE
3285
+ type: HTTP
3286
+ relations: *core_user_roles
3287
+ - url: /profile/mfa/:mfaId/remove
3288
+ method: DELETE
3289
+ type: HTTP
3290
+ relations: *core_user_roles
3291
+ - url: /profile/recovery-codes/send-verification
3292
+ method: POST
3293
+ type: HTTP
3294
+ relations: *core_user_roles
3295
+ - url: /profile/recovery-codes/regenerate
3296
+ method: POST
3297
+ type: HTTP
3298
+ relations: *core_user_roles
3299
+ - url: /profile/webauthn/generate
3300
+ method: POST
3301
+ type: HTTP
3302
+ relations: *core_user_roles
3303
+ - url: /profile/webauthn/verify
3304
+ method: POST
3305
+ type: HTTP
3306
+ relations: *core_user_roles
3307
+ - url: /profile/webauthn/authenticate/generate
3308
+ method: POST
3309
+ type: HTTP
3310
+ relations: *core_user_roles
3311
+ - url: /profile/webauthn/authenticate/verify
3312
+ method: POST
3313
+ type: HTTP
3314
+ relations: *core_user_roles
3315
+ - url: /profile/webauthn/:mfaId/remove
3316
+ method: DELETE
3317
+ type: HTTP
3318
+ relations: *core_user_roles
3319
+ - url: /profile/change-password
3320
+ method: PUT
3321
+ type: HTTP
3322
+ relations: *core_user_roles
3323
+ - url: /profile/change-email
3324
+ method: PUT
3325
+ type: HTTP
3326
+ relations: *core_user_roles
3327
+ - url: /profile/avatar
3328
+ method: PUT
3329
+ type: HTTP
3330
+ relations: *core_user_roles
3331
+ - url: /profile
3332
+ method: PUT
3333
+ type: HTTP
3334
+ relations: *core_user_roles
@@ -172,6 +172,20 @@
172
172
  subgroup_id:
173
173
  where:
174
174
  slug: notification-retention
175
+ - slug: stale-async-notification-hours
176
+ type: number
177
+ component: input-number
178
+ name:
179
+ en: Stale Async Notification Cleanup (hours)
180
+ pt: Limpeza de Notificações Assíncronas Travadas (horas)
181
+ description:
182
+ en: Number of hours an in-progress async notification (progress below 100% and not finished) may run before it is automatically deleted
183
+ pt: Número de horas que uma notificação assíncrona em andamento (progresso abaixo de 100% e não finalizada) pode ficar antes de ser excluída automaticamente
184
+ value: 24
185
+ user_override: false
186
+ subgroup_id:
187
+ where:
188
+ slug: notification-retention
175
189
  - slug: access-log-retention-days
176
190
  type: number
177
191
  component: input-number
@@ -948,7 +948,10 @@ export default function RolePage() {
948
948
  className="w-full"
949
949
  type="button"
950
950
  variant="outline"
951
- onClick={() => setEditingRole(null)}
951
+ onClick={() => {
952
+ clearEditDraft();
953
+ setEditingRole(null);
954
+ }}
952
955
  >
953
956
  {t('cancel')}
954
957
  </Button>