@hed-hog/core 0.0.385 → 0.0.386
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-command/app-command.registry.d.ts +2 -0
- package/dist/app-command/app-command.registry.d.ts.map +1 -1
- package/dist/app-command/app-command.registry.js.map +1 -1
- package/dist/auth/auth.controller.d.ts +22 -0
- package/dist/auth/auth.controller.d.ts.map +1 -1
- package/dist/auth/auth.controller.js +27 -0
- package/dist/auth/auth.controller.js.map +1 -1
- package/dist/auth/auth.service.d.ts +50 -0
- package/dist/auth/auth.service.d.ts.map +1 -1
- package/dist/auth/auth.service.js +108 -0
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/auth/dto/complete-account.dto.d.ts +9 -0
- package/dist/auth/dto/complete-account.dto.d.ts.map +1 -0
- package/dist/auth/dto/complete-account.dto.js +43 -0
- package/dist/auth/dto/complete-account.dto.js.map +1 -0
- package/dist/authorize/authorize.controller.d.ts +45 -0
- package/dist/authorize/authorize.controller.d.ts.map +1 -0
- package/dist/authorize/authorize.controller.js +120 -0
- package/dist/authorize/authorize.controller.js.map +1 -0
- package/dist/authorize/authorize.module.d.ts +8 -0
- package/dist/authorize/authorize.module.d.ts.map +1 -0
- package/dist/authorize/authorize.module.js +36 -0
- package/dist/authorize/authorize.module.js.map +1 -0
- package/dist/authorize/authorize.service.d.ts +79 -0
- package/dist/authorize/authorize.service.d.ts.map +1 -0
- package/dist/authorize/authorize.service.js +196 -0
- package/dist/authorize/authorize.service.js.map +1 -0
- package/dist/authorize/dto/authorize-info.dto.d.ts +8 -0
- package/dist/authorize/dto/authorize-info.dto.d.ts.map +1 -0
- package/dist/authorize/dto/authorize-info.dto.js +42 -0
- package/dist/authorize/dto/authorize-info.dto.js.map +1 -0
- package/dist/authorize/dto/consent.dto.d.ts +8 -0
- package/dist/authorize/dto/consent.dto.d.ts.map +1 -0
- package/dist/authorize/dto/consent.dto.js +42 -0
- package/dist/authorize/dto/consent.dto.js.map +1 -0
- package/dist/authorize/dto/token.dto.d.ts +8 -0
- package/dist/authorize/dto/token.dto.d.ts.map +1 -0
- package/dist/authorize/dto/token.dto.js +42 -0
- package/dist/authorize/dto/token.dto.js.map +1 -0
- package/dist/challenge/challenge.service.d.ts +7 -0
- package/dist/challenge/challenge.service.d.ts.map +1 -1
- package/dist/challenge/challenge.service.js +22 -0
- package/dist/challenge/challenge.service.js.map +1 -1
- package/dist/core.module.d.ts.map +1 -1
- package/dist/core.module.js +2 -0
- package/dist/core.module.js.map +1 -1
- package/dist/file/file.service.d.ts +7 -0
- package/dist/file/file.service.d.ts.map +1 -1
- package/dist/file/file.service.js +16 -0
- package/dist/file/file.service.js.map +1 -1
- package/dist/integration-profile/integration-profile.secrets.d.ts +6 -2
- package/dist/integration-profile/integration-profile.secrets.d.ts.map +1 -1
- package/dist/integration-profile/integration-profile.secrets.js +11 -2
- package/dist/integration-profile/integration-profile.secrets.js.map +1 -1
- package/dist/integration-profile/integration-profile.service.d.ts.map +1 -1
- package/dist/integration-profile/integration-profile.service.js +18 -2
- package/dist/integration-profile/integration-profile.service.js.map +1 -1
- package/dist/integration-profile/integration-profile.utils.d.ts +10 -0
- package/dist/integration-profile/integration-profile.utils.d.ts.map +1 -1
- package/dist/integration-profile/integration-profile.utils.js +24 -1
- package/dist/integration-profile/integration-profile.utils.js.map +1 -1
- package/dist/oauth/interfaces/OAuthProvider.d.ts +1 -1
- package/dist/oauth/interfaces/OAuthProvider.d.ts.map +1 -1
- package/dist/oauth/oauth.controller.d.ts +26 -0
- package/dist/oauth/oauth.controller.d.ts.map +1 -1
- package/dist/oauth/oauth.controller.js +94 -0
- package/dist/oauth/oauth.controller.js.map +1 -1
- package/dist/oauth/oauth.service.d.ts +39 -1
- package/dist/oauth/oauth.service.d.ts.map +1 -1
- package/dist/oauth/oauth.service.js +115 -7
- package/dist/oauth/oauth.service.js.map +1 -1
- package/dist/oauth/providers/microsoft-entra-id.provider.d.ts +5 -1
- package/dist/oauth/providers/microsoft-entra-id.provider.d.ts.map +1 -1
- package/dist/oauth/providers/microsoft-entra-id.provider.js +37 -6
- package/dist/oauth/providers/microsoft-entra-id.provider.js.map +1 -1
- package/dist/profile/profile.controller.d.ts +1 -1
- package/dist/profile/profile.service.d.ts +1 -1
- package/dist/webhook-integration/webhook-integration.service.d.ts.map +1 -1
- package/dist/webhook-integration/webhook-integration.service.js +7 -1
- package/dist/webhook-integration/webhook-integration.service.js.map +1 -1
- package/hedhog/data/integration_provider.yaml +8 -0
- package/hedhog/data/integration_type.yaml +6 -0
- package/hedhog/data/mail.yaml +39 -0
- package/hedhog/data/route.yaml +12 -0
- package/hedhog/data/setting_group.yaml +15 -1
- package/hedhog/frontend/app/account/components/regenerate-codes-dialog.tsx.ejs +11 -7
- package/hedhog/frontend/app/account/components/verify-before-add-dialog.tsx.ejs +9 -7
- package/hedhog/frontend/app/account/hooks/use-mfa-setup.ts.ejs +6 -2
- package/hedhog/frontend/app/dashboard/dashboard-home-tabs.tsx.ejs +130 -34
- package/hedhog/frontend/messages/en.json +33 -1
- package/hedhog/frontend/messages/pt.json +33 -1
- package/package.json +10 -5
- package/src/app-command/app-command.registry.ts +2 -0
- package/src/auth/auth.controller.ts +21 -0
- package/src/auth/auth.service.ts +133 -0
- package/src/auth/dto/complete-account.dto.ts +24 -0
- package/src/authorize/authorize.controller.ts +99 -0
- package/src/authorize/authorize.module.ts +23 -0
- package/src/authorize/authorize.service.spec.ts +307 -0
- package/src/authorize/authorize.service.ts +245 -0
- package/src/authorize/dto/authorize-info.dto.ts +23 -0
- package/src/authorize/dto/consent.dto.ts +23 -0
- package/src/authorize/dto/token.dto.ts +23 -0
- package/src/challenge/challenge.service.ts +28 -0
- package/src/core.module.ts +2 -0
- package/src/file/file.service.ts +19 -0
- package/src/integration-profile/integration-profile.secrets.spec.ts +114 -0
- package/src/integration-profile/integration-profile.secrets.ts +11 -2
- package/src/integration-profile/integration-profile.service.ts +19 -0
- package/src/integration-profile/integration-profile.utils.ts +40 -0
- package/src/oauth/interfaces/OAuthProvider.ts +5 -1
- package/src/oauth/oauth.controller.ts +89 -0
- package/src/oauth/oauth.service.ts +190 -8
- package/src/oauth/providers/microsoft-entra-id.provider.ts +45 -5
- package/src/webhook-integration/webhook-integration.service.ts +18 -2
|
@@ -610,6 +610,10 @@ export class WebhookIntegrationService {
|
|
|
610
610
|
body,
|
|
611
611
|
remoteIp,
|
|
612
612
|
webhookHeaders: normalizeJsonObject(headers) || {},
|
|
613
|
+
// `rawBody` is stashed onto the request by the API's global body-parser `verify`
|
|
614
|
+
// callback (apps/api/src/main.ts); typed loosely here since this package doesn't
|
|
615
|
+
// own that Express.Request augmentation.
|
|
616
|
+
webhookRawBody: (req as Request & { rawBody?: Buffer }).rawBody,
|
|
613
617
|
startedAt,
|
|
614
618
|
});
|
|
615
619
|
}
|
|
@@ -625,10 +629,18 @@ export class WebhookIntegrationService {
|
|
|
625
629
|
body: any;
|
|
626
630
|
remoteIp: string | null;
|
|
627
631
|
webhookHeaders: Record<string, unknown>;
|
|
632
|
+
webhookRawBody?: Buffer;
|
|
628
633
|
startedAt: number;
|
|
629
634
|
}) {
|
|
630
|
-
const {
|
|
631
|
-
|
|
635
|
+
const {
|
|
636
|
+
integration,
|
|
637
|
+
uuid,
|
|
638
|
+
body,
|
|
639
|
+
remoteIp,
|
|
640
|
+
webhookHeaders,
|
|
641
|
+
webhookRawBody,
|
|
642
|
+
startedAt,
|
|
643
|
+
} = input;
|
|
632
644
|
const actionLogs: ActionExecutionLog[] = [];
|
|
633
645
|
|
|
634
646
|
try {
|
|
@@ -639,6 +651,7 @@ export class WebhookIntegrationService {
|
|
|
639
651
|
try {
|
|
640
652
|
const result = await this.executeAction(action, body, {
|
|
641
653
|
webhookHeaders,
|
|
654
|
+
webhookRawBody,
|
|
642
655
|
remoteIp,
|
|
643
656
|
publicUuid: uuid,
|
|
644
657
|
integrationId: integration.id,
|
|
@@ -811,6 +824,7 @@ export class WebhookIntegrationService {
|
|
|
811
824
|
body: any,
|
|
812
825
|
context?: {
|
|
813
826
|
webhookHeaders?: Record<string, unknown>;
|
|
827
|
+
webhookRawBody?: Buffer;
|
|
814
828
|
remoteIp?: string | null;
|
|
815
829
|
publicUuid?: string;
|
|
816
830
|
integrationId?: number;
|
|
@@ -1138,6 +1152,7 @@ export class WebhookIntegrationService {
|
|
|
1138
1152
|
body: any,
|
|
1139
1153
|
context?: {
|
|
1140
1154
|
webhookHeaders?: Record<string, unknown>;
|
|
1155
|
+
webhookRawBody?: Buffer;
|
|
1141
1156
|
remoteIp?: string | null;
|
|
1142
1157
|
publicUuid?: string;
|
|
1143
1158
|
integrationId?: number;
|
|
@@ -1172,6 +1187,7 @@ export class WebhookIntegrationService {
|
|
|
1172
1187
|
result = await this.commandRegistry.dispatch(slug, renderedParams, {
|
|
1173
1188
|
webhookBody: body,
|
|
1174
1189
|
webhookHeaders: context?.webhookHeaders,
|
|
1190
|
+
webhookRawBody: context?.webhookRawBody,
|
|
1175
1191
|
remoteIp: context?.remoteIp,
|
|
1176
1192
|
publicUuid: context?.publicUuid,
|
|
1177
1193
|
integrationId: context?.integrationId,
|