@hed-hog/core 0.0.294 → 0.0.296
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/auth/auth.controller.d.ts +4 -4
- package/dist/auth/auth.service.d.ts +4 -4
- package/dist/challenge/challenge.service.d.ts +2 -2
- package/dist/core.module.d.ts.map +1 -1
- package/dist/core.module.js +4 -1
- package/dist/core.module.js.map +1 -1
- package/dist/dashboard/dashboard-core/dashboard-core.controller.d.ts +1 -1
- package/dist/dashboard/dashboard-core/dashboard-core.service.d.ts +2 -2
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/dist/integration/index.d.ts +4 -0
- package/dist/integration/index.d.ts.map +1 -0
- package/dist/integration/index.js +20 -0
- package/dist/integration/index.js.map +1 -0
- package/dist/integration/integration-api.validation.d.ts +2 -0
- package/dist/integration/integration-api.validation.d.ts.map +1 -0
- package/dist/integration/integration-api.validation.js +126 -0
- package/dist/integration/integration-api.validation.js.map +1 -0
- package/dist/integration/integration.module.d.ts +3 -0
- package/dist/integration/integration.module.d.ts.map +1 -0
- package/dist/integration/integration.module.js +54 -0
- package/dist/integration/integration.module.js.map +1 -0
- package/dist/integration/services/domain-event.publisher.d.ts +31 -0
- package/dist/integration/services/domain-event.publisher.d.ts.map +1 -0
- package/dist/integration/services/domain-event.publisher.js +79 -0
- package/dist/integration/services/domain-event.publisher.js.map +1 -0
- package/dist/integration/services/event-subscriber.registry.d.ts +37 -0
- package/dist/integration/services/event-subscriber.registry.d.ts.map +1 -0
- package/dist/integration/services/event-subscriber.registry.js +86 -0
- package/dist/integration/services/event-subscriber.registry.js.map +1 -0
- package/dist/integration/services/inbox.service.d.ts +55 -0
- package/dist/integration/services/inbox.service.d.ts.map +1 -0
- package/dist/integration/services/inbox.service.js +173 -0
- package/dist/integration/services/inbox.service.js.map +1 -0
- package/dist/integration/services/index.d.ts +12 -0
- package/dist/integration/services/index.d.ts.map +1 -0
- package/dist/integration/services/index.js +28 -0
- package/dist/integration/services/index.js.map +1 -0
- package/dist/integration/services/integration-developer-api.service.d.ts +30 -0
- package/dist/integration/services/integration-developer-api.service.d.ts.map +1 -0
- package/dist/integration/services/integration-developer-api.service.js +55 -0
- package/dist/integration/services/integration-developer-api.service.js.map +1 -0
- package/dist/integration/services/integration-link.service.d.ts +52 -0
- package/dist/integration/services/integration-link.service.d.ts.map +1 -0
- package/dist/integration/services/integration-link.service.js +128 -0
- package/dist/integration/services/integration-link.service.js.map +1 -0
- package/dist/integration/services/integration-settings.service.d.ts +23 -0
- package/dist/integration/services/integration-settings.service.d.ts.map +1 -0
- package/dist/integration/services/integration-settings.service.js +81 -0
- package/dist/integration/services/integration-settings.service.js.map +1 -0
- package/dist/integration/services/outbox-polling.coordinator.d.ts +45 -0
- package/dist/integration/services/outbox-polling.coordinator.d.ts.map +1 -0
- package/dist/integration/services/outbox-polling.coordinator.js +143 -0
- package/dist/integration/services/outbox-polling.coordinator.js.map +1 -0
- package/dist/integration/services/outbox.notifier.d.ts +30 -0
- package/dist/integration/services/outbox.notifier.d.ts.map +1 -0
- package/dist/integration/services/outbox.notifier.js +57 -0
- package/dist/integration/services/outbox.notifier.js.map +1 -0
- package/dist/integration/services/outbox.processor.d.ts +42 -0
- package/dist/integration/services/outbox.processor.d.ts.map +1 -0
- package/dist/integration/services/outbox.processor.job.d.ts +43 -0
- package/dist/integration/services/outbox.processor.job.d.ts.map +1 -0
- package/dist/integration/services/outbox.processor.job.js +100 -0
- package/dist/integration/services/outbox.processor.job.js.map +1 -0
- package/dist/integration/services/outbox.processor.js +208 -0
- package/dist/integration/services/outbox.processor.js.map +1 -0
- package/dist/integration/services/outbox.service.d.ts +53 -0
- package/dist/integration/services/outbox.service.d.ts.map +1 -0
- package/dist/integration/services/outbox.service.js +149 -0
- package/dist/integration/services/outbox.service.js.map +1 -0
- package/dist/integration/types/event.types.d.ts +88 -0
- package/dist/integration/types/event.types.d.ts.map +1 -0
- package/dist/integration/types/event.types.js +35 -0
- package/dist/integration/types/event.types.js.map +1 -0
- package/dist/integration/types/index.d.ts +3 -0
- package/dist/integration/types/index.d.ts.map +1 -0
- package/dist/integration/types/index.js +19 -0
- package/dist/integration/types/index.js.map +1 -0
- package/dist/integration/types/subscriber.types.d.ts +31 -0
- package/dist/integration/types/subscriber.types.d.ts.map +1 -0
- package/dist/integration/types/subscriber.types.js +3 -0
- package/dist/integration/types/subscriber.types.js.map +1 -0
- package/dist/mail/mail.controller.d.ts +2 -2
- package/dist/mail/mail.service.d.ts +2 -2
- package/dist/mail-sent/mail-sent.controller.d.ts +3 -3
- package/dist/mail-sent/mail-sent.service.d.ts +3 -3
- package/dist/oauth/oauth.controller.js.map +1 -1
- package/dist/oauth/oauth.service.d.ts +3 -3
- package/dist/oauth/oauth.service.d.ts.map +1 -1
- package/dist/oauth/oauth.service.js.map +1 -1
- package/dist/profile/profile.controller.d.ts +3 -3
- package/dist/profile/profile.service.d.ts +3 -3
- package/dist/setting/setting.controller.d.ts +12 -8
- package/dist/setting/setting.controller.d.ts.map +1 -1
- package/dist/setting/setting.service.d.ts +12 -8
- package/dist/setting/setting.service.d.ts.map +1 -1
- package/dist/setting/setting.service.js +21 -1
- package/dist/setting/setting.service.js.map +1 -1
- package/dist/user/user.controller.d.ts +4 -4
- package/dist/user/user.service.d.ts +9 -9
- package/hedhog/data/route.yaml +2 -0
- package/hedhog/data/setting_group.yaml +955 -470
- package/hedhog/data/setting_subgroup.yaml +303 -0
- package/hedhog/frontend/app/configurations/[slug]/components/setting-field.tsx.ejs +44 -18
- package/hedhog/frontend/app/configurations/[slug]/page.tsx.ejs +134 -27
- package/hedhog/frontend/app/configurations/layout.tsx.ejs +84 -23
- package/hedhog/frontend/app/preferences/page.tsx.ejs +45 -48
- package/hedhog/table/inbox_event.yaml +40 -0
- package/hedhog/table/integration_link.yaml +33 -0
- package/hedhog/table/outbox_event.yaml +45 -0
- package/hedhog/table/setting.yaml +7 -0
- package/hedhog/table/setting_subgroup.yaml +19 -0
- package/package.json +8 -8
- package/src/core.module.ts +4 -1
- package/src/index.ts +15 -0
- package/src/integration/README.md +397 -0
- package/src/integration/USAGE_EXAMPLE.md +279 -0
- package/src/integration/index.ts +4 -0
- package/src/integration/integration-api.validation.ts +154 -0
- package/src/integration/integration.module.ts +53 -0
- package/src/integration/services/domain-event.publisher.ts +136 -0
- package/src/integration/services/event-subscriber.registry.ts +89 -0
- package/src/integration/services/inbox.service.ts +218 -0
- package/src/integration/services/index.ts +12 -0
- package/src/integration/services/integration-developer-api.service.ts +96 -0
- package/src/integration/services/integration-link.service.ts +154 -0
- package/src/integration/services/integration-settings.service.ts +128 -0
- package/src/integration/services/outbox-polling.coordinator.ts +146 -0
- package/src/integration/services/outbox.notifier.ts +48 -0
- package/src/integration/services/outbox.processor.job.ts +97 -0
- package/src/integration/services/outbox.processor.ts +266 -0
- package/src/integration/services/outbox.service.ts +209 -0
- package/src/integration/types/event.types.ts +93 -0
- package/src/integration/types/index.ts +3 -0
- package/src/integration/types/subscriber.types.ts +37 -0
- package/src/oauth/oauth.controller.ts +17 -17
- package/src/oauth/oauth.service.ts +20 -20
- package/src/setting/setting.service.ts +27 -2
|
@@ -18,6 +18,14 @@ import {
|
|
|
18
18
|
DropdownMenuItem,
|
|
19
19
|
DropdownMenuTrigger,
|
|
20
20
|
} from '@/components/ui/dropdown-menu';
|
|
21
|
+
import { ScrollArea, ScrollBar } from '@/components/ui/scroll-area';
|
|
22
|
+
import {
|
|
23
|
+
Select,
|
|
24
|
+
SelectContent,
|
|
25
|
+
SelectItem,
|
|
26
|
+
SelectTrigger,
|
|
27
|
+
SelectValue,
|
|
28
|
+
} from '@/components/ui/select';
|
|
21
29
|
import { cn } from '@/lib/utils';
|
|
22
30
|
import { PaginatedResult } from '@/types/pagination-result';
|
|
23
31
|
import { SettingGroup } from '@hed-hog/api-types';
|
|
@@ -25,8 +33,8 @@ import { useApp, useQuery } from '@hed-hog/next-app-provider';
|
|
|
25
33
|
import { Download, MenuIcon, Upload } from 'lucide-react';
|
|
26
34
|
import { useTranslations } from 'next-intl';
|
|
27
35
|
import Link from 'next/link';
|
|
28
|
-
import { usePathname } from 'next/navigation';
|
|
29
|
-
import { useCallback, useRef, useState } from 'react';
|
|
36
|
+
import { usePathname, useRouter } from 'next/navigation';
|
|
37
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
30
38
|
|
|
31
39
|
interface SettingsValidation {
|
|
32
40
|
totalSettings: number;
|
|
@@ -43,6 +51,7 @@ interface IProps {
|
|
|
43
51
|
export default function ConfigurationsLayout({ children }: IProps) {
|
|
44
52
|
const t = useTranslations('core.Configurations');
|
|
45
53
|
const pathname = usePathname();
|
|
54
|
+
const router = useRouter();
|
|
46
55
|
const { request, currentLocaleCode, showToastHandler } = useApp();
|
|
47
56
|
|
|
48
57
|
const { data: settingGroups, refetch } = useQuery<
|
|
@@ -62,6 +71,24 @@ export default function ConfigurationsLayout({ children }: IProps) {
|
|
|
62
71
|
const [importDialogOpen, setImportDialogOpen] = useState(false);
|
|
63
72
|
const [importData, setImportData] = useState<SettingsValidation | null>(null);
|
|
64
73
|
const fileInputRef = useRef<HTMLInputElement>(null);
|
|
74
|
+
const tabsContainerRef = useRef<HTMLDivElement>(null);
|
|
75
|
+
|
|
76
|
+
const groups = settingGroups?.data || [];
|
|
77
|
+
const activeGroup = groups.find(
|
|
78
|
+
(item) => pathname === `/core/configurations/${item.slug}`
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
useEffect(() => {
|
|
82
|
+
const activeTab = tabsContainerRef.current?.querySelector<HTMLElement>(
|
|
83
|
+
'[data-active="true"]'
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
activeTab?.scrollIntoView({
|
|
87
|
+
behavior: 'smooth',
|
|
88
|
+
inline: 'center',
|
|
89
|
+
block: 'nearest',
|
|
90
|
+
});
|
|
91
|
+
}, [pathname, groups.length]);
|
|
65
92
|
|
|
66
93
|
const handleExport = (includeSecrets: boolean) => {
|
|
67
94
|
request<Blob>({
|
|
@@ -144,7 +171,7 @@ export default function ConfigurationsLayout({ children }: IProps) {
|
|
|
144
171
|
}, [importData, request, refetch, showToastHandler, t]);
|
|
145
172
|
|
|
146
173
|
return (
|
|
147
|
-
<div className="flex flex-col
|
|
174
|
+
<div className="flex min-w-0 flex-col overflow-x-hidden px-4">
|
|
148
175
|
<PageHeader
|
|
149
176
|
breadcrumbs={[
|
|
150
177
|
{ label: t('breadcrumbHome'), href: '/' },
|
|
@@ -280,29 +307,63 @@ export default function ConfigurationsLayout({ children }: IProps) {
|
|
|
280
307
|
}
|
|
281
308
|
/>
|
|
282
309
|
|
|
283
|
-
<div className="border-b border-border
|
|
284
|
-
<
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
)
|
|
310
|
+
<div className="sticky top-0 z-20 -mx-4 mb-6 border-b border-border bg-background/95 px-4 backdrop-blur supports-[backdrop-filter]:bg-background/80">
|
|
311
|
+
<div className="min-w-0 overflow-x-hidden">
|
|
312
|
+
<div className="pb-4 pt-2 md:hidden">
|
|
313
|
+
<Select
|
|
314
|
+
value={activeGroup?.slug}
|
|
315
|
+
onValueChange={(value) =>
|
|
316
|
+
router.push(`/core/configurations/${value}`)
|
|
317
|
+
}
|
|
318
|
+
>
|
|
319
|
+
<SelectTrigger className="w-full bg-background">
|
|
320
|
+
<SelectValue placeholder={activeGroup?.name || t('title')} />
|
|
321
|
+
</SelectTrigger>
|
|
322
|
+
<SelectContent>
|
|
323
|
+
{groups.map((item: SettingGroup) => (
|
|
324
|
+
<SelectItem key={item.slug} value={item.slug}>
|
|
325
|
+
{item.name}
|
|
326
|
+
</SelectItem>
|
|
327
|
+
))}
|
|
328
|
+
</SelectContent>
|
|
329
|
+
</Select>
|
|
330
|
+
</div>
|
|
331
|
+
|
|
332
|
+
<div className="hidden min-w-0 overflow-x-hidden md:block">
|
|
333
|
+
<ScrollArea className="w-full min-w-0" type="auto">
|
|
334
|
+
<nav
|
|
335
|
+
ref={tabsContainerRef}
|
|
336
|
+
className="flex min-w-max gap-2"
|
|
337
|
+
aria-label="Configuration tabs"
|
|
297
338
|
>
|
|
298
|
-
{item
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
339
|
+
{groups.map((item: SettingGroup) => {
|
|
340
|
+
const isActive =
|
|
341
|
+
pathname === `/core/configurations/${item.slug}`;
|
|
342
|
+
|
|
343
|
+
return (
|
|
344
|
+
<Link
|
|
345
|
+
key={item.slug}
|
|
346
|
+
href={item.slug}
|
|
347
|
+
data-active={isActive}
|
|
348
|
+
className={cn(
|
|
349
|
+
'shrink-0 border-b-2 px-3 py-3 text-sm font-medium whitespace-nowrap transition-colors',
|
|
350
|
+
isActive
|
|
351
|
+
? 'border-primary text-primary'
|
|
352
|
+
: 'border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground'
|
|
353
|
+
)}
|
|
354
|
+
>
|
|
355
|
+
{item.name}
|
|
356
|
+
</Link>
|
|
357
|
+
);
|
|
358
|
+
})}
|
|
359
|
+
</nav>
|
|
360
|
+
<ScrollBar orientation="horizontal" />
|
|
361
|
+
</ScrollArea>
|
|
362
|
+
</div>
|
|
363
|
+
</div>
|
|
303
364
|
</div>
|
|
304
365
|
|
|
305
|
-
<div className="pb-
|
|
366
|
+
<div className="min-w-0 pb-25">{children}</div>
|
|
306
367
|
|
|
307
368
|
<input
|
|
308
369
|
ref={fileInputRef}
|
|
@@ -17,30 +17,30 @@ import { useApp, useQuery } from '@hed-hog/next-app-provider';
|
|
|
17
17
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
18
18
|
import { Loader } from 'lucide-react';
|
|
19
19
|
import { useTranslations } from 'next-intl';
|
|
20
|
-
import { useForm } from 'react-hook-form';
|
|
21
|
-
import { z } from 'zod';
|
|
22
|
-
|
|
23
|
-
const THEME_SOURCE_STORAGE_KEY = 'theme-source';
|
|
24
|
-
|
|
25
|
-
const getStoredThemeSource = (): 'explicit' | 'fallback' | null => {
|
|
26
|
-
if (typeof window === 'undefined') return null;
|
|
27
|
-
|
|
28
|
-
const rawThemeSource = window.localStorage.getItem(THEME_SOURCE_STORAGE_KEY);
|
|
29
|
-
if (rawThemeSource === null) return null;
|
|
30
|
-
|
|
31
|
-
try {
|
|
32
|
-
const parsedThemeSource = JSON.parse(rawThemeSource);
|
|
33
|
-
return parsedThemeSource === 'explicit' || parsedThemeSource === 'fallback'
|
|
34
|
-
? parsedThemeSource
|
|
35
|
-
: null;
|
|
36
|
-
} catch {
|
|
37
|
-
return rawThemeSource === 'explicit' || rawThemeSource === 'fallback'
|
|
38
|
-
? rawThemeSource
|
|
39
|
-
: null;
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export default function PreferencesPage() {
|
|
20
|
+
import { useForm } from 'react-hook-form';
|
|
21
|
+
import { z } from 'zod';
|
|
22
|
+
|
|
23
|
+
const THEME_SOURCE_STORAGE_KEY = 'theme-source';
|
|
24
|
+
|
|
25
|
+
const getStoredThemeSource = (): 'explicit' | 'fallback' | null => {
|
|
26
|
+
if (typeof window === 'undefined') return null;
|
|
27
|
+
|
|
28
|
+
const rawThemeSource = window.localStorage.getItem(THEME_SOURCE_STORAGE_KEY);
|
|
29
|
+
if (rawThemeSource === null) return null;
|
|
30
|
+
|
|
31
|
+
try {
|
|
32
|
+
const parsedThemeSource = JSON.parse(rawThemeSource);
|
|
33
|
+
return parsedThemeSource === 'explicit' || parsedThemeSource === 'fallback'
|
|
34
|
+
? parsedThemeSource
|
|
35
|
+
: null;
|
|
36
|
+
} catch {
|
|
37
|
+
return rawThemeSource === 'explicit' || rawThemeSource === 'fallback'
|
|
38
|
+
? rawThemeSource
|
|
39
|
+
: null;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export default function PreferencesPage() {
|
|
44
44
|
const {
|
|
45
45
|
currentTheme,
|
|
46
46
|
setCurrentTheme,
|
|
@@ -93,32 +93,29 @@ export default function PreferencesPage() {
|
|
|
93
93
|
theme: '',
|
|
94
94
|
},
|
|
95
95
|
});
|
|
96
|
-
|
|
97
|
-
const handleThemeChange = async (value: 'light' | 'dark' | 'system') => {
|
|
98
|
-
const previousTheme = currentTheme;
|
|
99
|
-
const previousThemeSource = getStoredThemeSource();
|
|
100
|
-
setCurrentTheme(value);
|
|
101
|
-
|
|
102
|
-
try {
|
|
96
|
+
|
|
97
|
+
const handleThemeChange = async (value: 'light' | 'dark' | 'system') => {
|
|
98
|
+
const previousTheme = currentTheme;
|
|
99
|
+
const previousThemeSource = getStoredThemeSource();
|
|
100
|
+
setCurrentTheme(value);
|
|
101
|
+
|
|
102
|
+
try {
|
|
103
103
|
await request({
|
|
104
104
|
url: '/profile/preferences',
|
|
105
105
|
method: 'PUT',
|
|
106
106
|
data: { theme: value },
|
|
107
107
|
});
|
|
108
108
|
await refetchUser();
|
|
109
|
-
} catch {
|
|
110
|
-
setCurrentTheme(previousTheme);
|
|
111
|
-
|
|
112
|
-
if (
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
await refetchUser();
|
|
120
|
-
showToastHandler(
|
|
121
|
-
'error',
|
|
109
|
+
} catch {
|
|
110
|
+
setCurrentTheme(previousTheme);
|
|
111
|
+
|
|
112
|
+
if (typeof window !== 'undefined' && previousThemeSource !== 'explicit') {
|
|
113
|
+
window.localStorage.removeItem(THEME_SOURCE_STORAGE_KEY);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
await refetchUser();
|
|
117
|
+
showToastHandler(
|
|
118
|
+
'error',
|
|
122
119
|
t('themeUpdateError') || 'Failed to update theme'
|
|
123
120
|
);
|
|
124
121
|
}
|
|
@@ -132,7 +129,7 @@ export default function PreferencesPage() {
|
|
|
132
129
|
data: { language: code },
|
|
133
130
|
});
|
|
134
131
|
await refetchUser();
|
|
135
|
-
} catch {
|
|
132
|
+
} catch (error) {
|
|
136
133
|
showToastHandler(
|
|
137
134
|
'error',
|
|
138
135
|
t('languageUpdateError') || 'Failed to update language'
|
|
@@ -148,7 +145,7 @@ export default function PreferencesPage() {
|
|
|
148
145
|
'success',
|
|
149
146
|
t('dateFormatUpdated') || 'Date format updated successfully'
|
|
150
147
|
);
|
|
151
|
-
} catch {
|
|
148
|
+
} catch {
|
|
152
149
|
showToastHandler(
|
|
153
150
|
'error',
|
|
154
151
|
t('dateFormatUpdateError') || 'Failed to update date format'
|
|
@@ -163,7 +160,7 @@ export default function PreferencesPage() {
|
|
|
163
160
|
'success',
|
|
164
161
|
t('timeFormatUpdated') || 'Time format updated successfully'
|
|
165
162
|
);
|
|
166
|
-
} catch {
|
|
163
|
+
} catch {
|
|
167
164
|
showToastHandler(
|
|
168
165
|
'error',
|
|
169
166
|
t('timeFormatUpdateError') || 'Failed to update time format'
|
|
@@ -178,7 +175,7 @@ export default function PreferencesPage() {
|
|
|
178
175
|
'success',
|
|
179
176
|
t('timezoneUpdated') || 'Timezone updated successfully'
|
|
180
177
|
);
|
|
181
|
-
} catch {
|
|
178
|
+
} catch {
|
|
182
179
|
showToastHandler(
|
|
183
180
|
'error',
|
|
184
181
|
t('timezoneUpdateError') || 'Failed to update timezone'
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- name: outbox_event_id
|
|
4
|
+
type: fk
|
|
5
|
+
references:
|
|
6
|
+
table: outbox_event
|
|
7
|
+
column: id
|
|
8
|
+
onDelete: CASCADE
|
|
9
|
+
- name: consumer_name
|
|
10
|
+
length: 255
|
|
11
|
+
- name: status
|
|
12
|
+
type: enum
|
|
13
|
+
enum:
|
|
14
|
+
- received
|
|
15
|
+
- processing
|
|
16
|
+
- processed
|
|
17
|
+
- failed
|
|
18
|
+
- skipped
|
|
19
|
+
default: received
|
|
20
|
+
- name: attempt_count
|
|
21
|
+
type: int
|
|
22
|
+
default: 0
|
|
23
|
+
- name: last_error
|
|
24
|
+
length: 1023
|
|
25
|
+
isNullable: true
|
|
26
|
+
- name: processed_at
|
|
27
|
+
type: timestamptz
|
|
28
|
+
isNullable: true
|
|
29
|
+
- type: created_at
|
|
30
|
+
- type: updated_at
|
|
31
|
+
|
|
32
|
+
indexes:
|
|
33
|
+
- columns:
|
|
34
|
+
- outbox_event_id
|
|
35
|
+
- consumer_name
|
|
36
|
+
isUnique: true
|
|
37
|
+
- columns:
|
|
38
|
+
- status
|
|
39
|
+
- columns:
|
|
40
|
+
- created_at
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- name: source_module
|
|
4
|
+
length: 127
|
|
5
|
+
- name: source_entity_type
|
|
6
|
+
length: 127
|
|
7
|
+
- name: source_entity_id
|
|
8
|
+
length: 36
|
|
9
|
+
- name: target_module
|
|
10
|
+
length: 127
|
|
11
|
+
- name: target_entity_type
|
|
12
|
+
length: 127
|
|
13
|
+
- name: target_entity_id
|
|
14
|
+
length: 36
|
|
15
|
+
- name: link_type
|
|
16
|
+
length: 63
|
|
17
|
+
- name: metadata
|
|
18
|
+
type: json
|
|
19
|
+
isNullable: true
|
|
20
|
+
- type: created_at
|
|
21
|
+
- type: updated_at
|
|
22
|
+
|
|
23
|
+
indexes:
|
|
24
|
+
- columns:
|
|
25
|
+
- source_module
|
|
26
|
+
- source_entity_type
|
|
27
|
+
- source_entity_id
|
|
28
|
+
- columns:
|
|
29
|
+
- target_module
|
|
30
|
+
- target_entity_type
|
|
31
|
+
- target_entity_id
|
|
32
|
+
- columns:
|
|
33
|
+
- link_type
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- name: event_name
|
|
4
|
+
length: 255
|
|
5
|
+
- name: source_module
|
|
6
|
+
length: 127
|
|
7
|
+
- name: aggregate_type
|
|
8
|
+
length: 127
|
|
9
|
+
- name: aggregate_id
|
|
10
|
+
length: 36
|
|
11
|
+
- name: payload
|
|
12
|
+
type: json
|
|
13
|
+
- name: status
|
|
14
|
+
type: enum
|
|
15
|
+
enum:
|
|
16
|
+
- pending
|
|
17
|
+
- processing
|
|
18
|
+
- processed
|
|
19
|
+
- failed
|
|
20
|
+
- dead_letter
|
|
21
|
+
default: pending
|
|
22
|
+
- name: attempt_count
|
|
23
|
+
type: int
|
|
24
|
+
default: 0
|
|
25
|
+
- name: last_error
|
|
26
|
+
length: 1023
|
|
27
|
+
isNullable: true
|
|
28
|
+
- name: available_at
|
|
29
|
+
type: timestamptz
|
|
30
|
+
- name: processed_at
|
|
31
|
+
type: timestamptz
|
|
32
|
+
isNullable: true
|
|
33
|
+
- type: created_at
|
|
34
|
+
- type: updated_at
|
|
35
|
+
|
|
36
|
+
indexes:
|
|
37
|
+
- columns:
|
|
38
|
+
- status
|
|
39
|
+
- available_at
|
|
40
|
+
- columns:
|
|
41
|
+
- source_module
|
|
42
|
+
- aggregate_type
|
|
43
|
+
- aggregate_id
|
|
44
|
+
- columns:
|
|
45
|
+
- created_at
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- type: slug
|
|
4
|
+
- name: name
|
|
5
|
+
type: locale_varchar
|
|
6
|
+
length: 63
|
|
7
|
+
isNullable: true
|
|
8
|
+
locale:
|
|
9
|
+
en: Name
|
|
10
|
+
pt: Nome
|
|
11
|
+
- name: description
|
|
12
|
+
type: locale_varchar
|
|
13
|
+
length: 255
|
|
14
|
+
isNullable: true
|
|
15
|
+
locale:
|
|
16
|
+
en: Description
|
|
17
|
+
pt: Descrição
|
|
18
|
+
- type: created_at
|
|
19
|
+
- type: updated_at
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hed-hog/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.296",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"dependencies": {
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"sharp": "^0.34.2",
|
|
31
31
|
"speakeasy": "^2.0.0",
|
|
32
32
|
"uuid": "^11.1.0",
|
|
33
|
-
"@hed-hog/api-
|
|
34
|
-
"@hed-hog/api
|
|
35
|
-
"@hed-hog/api": "0.0.
|
|
36
|
-
"@hed-hog/api-
|
|
37
|
-
"@hed-hog/api-
|
|
38
|
-
"@hed-hog/api-
|
|
33
|
+
"@hed-hog/api-locale": "0.0.14",
|
|
34
|
+
"@hed-hog/api": "0.0.6",
|
|
35
|
+
"@hed-hog/api-mail": "0.0.9",
|
|
36
|
+
"@hed-hog/api-prisma": "0.0.6",
|
|
37
|
+
"@hed-hog/api-pagination": "0.0.7",
|
|
38
|
+
"@hed-hog/api-types": "0.0.1"
|
|
39
39
|
},
|
|
40
40
|
"exports": {
|
|
41
41
|
".": {
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"_dev": "pnpm build --watch",
|
|
77
77
|
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\"",
|
|
78
78
|
"clean": "rimraf dist tsconfig.production.tsbuildinfo",
|
|
79
|
-
"prebuild": "pnpm run clean && pnpm exec ts-node
|
|
79
|
+
"prebuild": "pnpm run clean && pnpm --dir ../.. exec ts-node ./scripts/build-dependencies.ts libraries/core",
|
|
80
80
|
"build": "tsc --project tsconfig.production.json && pnpm run copy:templates",
|
|
81
81
|
"copy:templates": "node -e \"require('fs').cpSync('src/file/templates', 'dist/file/templates', {recursive: true})\"",
|
|
82
82
|
"patch": "pnpm exec ts-node ../../scripts/patch.ts libraries/core",
|
package/src/core.module.ts
CHANGED
|
@@ -13,6 +13,7 @@ import { SystemModule } from './core/system.module';
|
|
|
13
13
|
import { DashboardModule } from './dashboard/dashboard.module';
|
|
14
14
|
import { FileModule } from './file/file.module';
|
|
15
15
|
import { InstallModule } from './install/install.module';
|
|
16
|
+
import { IntegrationModule } from './integration/integration.module';
|
|
16
17
|
import { MailSentModule } from './mail-sent/mail-sent.module';
|
|
17
18
|
import { MailModule } from './mail/mail.module';
|
|
18
19
|
import { MenuModule } from './menu/menu.module';
|
|
@@ -60,7 +61,8 @@ import { ValidatorServiceLocator } from './validators/service-locator';
|
|
|
60
61
|
forwardRef(() => SecurityModule),
|
|
61
62
|
forwardRef(() => ProfileModule),
|
|
62
63
|
forwardRef(() => SessionModule),
|
|
63
|
-
forwardRef(() => OAuthModule)
|
|
64
|
+
forwardRef(() => OAuthModule),
|
|
65
|
+
forwardRef(() => IntegrationModule),
|
|
64
66
|
],
|
|
65
67
|
exports: [
|
|
66
68
|
UserModule,
|
|
@@ -75,6 +77,7 @@ import { ValidatorServiceLocator } from './validators/service-locator';
|
|
|
75
77
|
FileModule,
|
|
76
78
|
SessionModule,
|
|
77
79
|
AiModule,
|
|
80
|
+
IntegrationModule,
|
|
78
81
|
IsStrongPasswordWithSettingsConstraint,
|
|
79
82
|
IsEmailWithSettingsConstraint,
|
|
80
83
|
IsPinCodeWithSettingConstraint,
|
package/src/index.ts
CHANGED
|
@@ -29,6 +29,21 @@ export * from './setting/setting.service';
|
|
|
29
29
|
export * from './ai/ai.module';
|
|
30
30
|
export * from './ai/ai.service';
|
|
31
31
|
|
|
32
|
+
// Integration Module
|
|
33
|
+
export * from './integration/integration.module';
|
|
34
|
+
export * from './integration/services/domain-event.publisher';
|
|
35
|
+
export * from './integration/services/event-subscriber.registry';
|
|
36
|
+
export * from './integration/services/inbox.service';
|
|
37
|
+
export * from './integration/services/integration-developer-api.service';
|
|
38
|
+
export * from './integration/services/integration-link.service';
|
|
39
|
+
export * from './integration/services/integration-settings.service';
|
|
40
|
+
export * from './integration/services/outbox-polling.coordinator';
|
|
41
|
+
export * from './integration/services/outbox.notifier';
|
|
42
|
+
export * from './integration/services/outbox.processor';
|
|
43
|
+
export * from './integration/services/outbox.processor.job';
|
|
44
|
+
export * from './integration/services/outbox.service';
|
|
45
|
+
export * from './integration/types';
|
|
46
|
+
|
|
32
47
|
// Validators
|
|
33
48
|
export * from './validators/is-email-with-settings.validator';
|
|
34
49
|
export * from './validators/is-pin-code-with-setting.validator';
|