@vitnode/core 1.2.0-canary.23 → 1.2.0-canary.25
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/scripts/plugin.d.ts.map +1 -1
- package/dist/scripts/scripts.js +2 -9
- package/dist/scripts/shared/file-utils.d.ts.map +1 -1
- package/dist/src/api/{plugins → adapters}/email/nodemailer.d.ts +1 -1
- package/dist/src/api/adapters/email/nodemailer.d.ts.map +1 -0
- package/dist/src/api/{plugins → adapters}/email/nodemailer.js +1 -1
- package/dist/src/api/{plugins → adapters}/email/resend.d.ts +1 -1
- package/dist/src/api/adapters/email/resend.d.ts.map +1 -0
- package/dist/src/api/{plugins → adapters}/email/resend.js +1 -1
- package/dist/src/api/adapters/sso/discord.d.ts.map +1 -0
- package/dist/src/api/adapters/sso/facebook.d.ts.map +1 -0
- package/dist/src/api/adapters/sso/google.d.ts.map +1 -0
- package/dist/src/api/config.d.ts.map +1 -1
- package/dist/src/api/config.js +6 -5
- package/dist/src/api/lib/logger-middleware.d.ts +8 -0
- package/dist/src/api/lib/logger-middleware.d.ts.map +1 -0
- package/dist/src/api/lib/logger-middleware.js +35 -0
- package/dist/src/api/lib/route.d.ts +1 -1
- package/dist/src/api/lib/route.d.ts.map +1 -1
- package/dist/src/api/lib/route.js +1 -1
- package/dist/src/api/middlewares/{global/global.d.ts → global.middleware.d.ts} +10 -8
- package/dist/src/api/middlewares/global.middleware.d.ts.map +1 -0
- package/dist/src/api/middlewares/global.middleware.js +86 -0
- package/dist/src/api/middlewares/rate-limiter.middleware.d.ts +4 -0
- package/dist/src/api/middlewares/rate-limiter.middleware.d.ts.map +1 -0
- package/dist/src/api/middlewares/rate-limiter.middleware.js +26 -0
- package/dist/src/api/models/device.d.ts +4 -1
- package/dist/src/api/models/device.d.ts.map +1 -1
- package/dist/src/api/models/device.js +21 -14
- package/dist/src/api/models/email.d.ts +1 -2
- package/dist/src/api/models/email.d.ts.map +1 -1
- package/dist/src/api/models/email.js +9 -16
- package/dist/src/api/models/password.d.ts.map +1 -1
- package/dist/src/api/models/password.js +8 -1
- package/dist/src/api/models/session-admin.d.ts +1 -1
- package/dist/src/api/models/session-admin.d.ts.map +1 -1
- package/dist/src/api/models/session-admin.js +40 -16
- package/dist/src/api/models/session.d.ts +1 -1
- package/dist/src/api/models/session.d.ts.map +1 -1
- package/dist/src/api/models/session.js +28 -12
- package/dist/src/api/models/sso.js +1 -1
- package/dist/src/api/models/user/sign-up.d.ts +1 -1
- package/dist/src/api/models/user/sign-up.d.ts.map +1 -1
- package/dist/src/api/models/user/sign-up.js +2 -3
- package/dist/src/api/models/user.d.ts +1 -1
- package/dist/src/api/models/user.d.ts.map +1 -1
- package/dist/src/api/modules/admin/admin.module.d.ts +223 -8
- package/dist/src/api/modules/admin/admin.module.d.ts.map +1 -1
- package/dist/src/api/modules/admin/admin.module.js +3 -1
- package/dist/src/api/modules/admin/debug/debug.admin.module.d.ts +221 -0
- package/dist/src/api/modules/admin/debug/debug.admin.module.d.ts.map +1 -0
- package/dist/src/api/modules/admin/debug/debug.admin.module.js +10 -0
- package/dist/src/api/modules/admin/debug/routes/logs.route.d.ts +222 -0
- package/dist/src/api/modules/admin/debug/routes/logs.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/debug/routes/logs.route.js +90 -0
- package/dist/src/api/modules/admin/routes/session.route.d.ts +1 -5
- package/dist/src/api/modules/admin/routes/session.route.d.ts.map +1 -1
- package/dist/src/api/modules/admin/routes/session.route.js +0 -4
- package/dist/src/api/modules/admin/users/routes/list.route.d.ts +1 -1
- package/dist/src/api/modules/admin/users/routes/users.route.d.ts +1 -1
- package/dist/src/api/modules/admin/users/users.admin.module.d.ts +1 -1
- package/dist/src/api/modules/middleware/middleware.module.d.ts +1 -1
- package/dist/src/api/modules/middleware/route.d.ts +1 -1
- package/dist/src/api/modules/middleware/route.d.ts.map +1 -1
- package/dist/src/api/modules/middleware/route.js +2 -4
- package/dist/src/api/modules/users/routes/session.route.d.ts +1 -1
- package/dist/src/api/modules/users/routes/sign-in.route.d.ts +1 -1
- package/dist/src/api/modules/users/routes/sign-out.route.d.ts +1 -1
- package/dist/src/api/modules/users/routes/sign-up.route.d.ts +1 -1
- package/dist/src/api/modules/users/routes/test.route.d.ts +2 -2
- package/dist/src/api/modules/users/routes/test.route.d.ts.map +1 -1
- package/dist/src/api/modules/users/routes/test.route.js +9 -1
- package/dist/src/api/modules/users/sso/routes/callback.route.d.ts +1 -1
- package/dist/src/api/modules/users/sso/routes/create-url.route.d.ts +1 -1
- package/dist/src/api/modules/users/sso/sso.module.d.ts +2 -2
- package/dist/src/api/modules/users/users.module.d.ts +8 -8
- package/dist/src/app_admin/core/debug/page.d.ts +11 -0
- package/dist/src/app_admin/core/debug/page.d.ts.map +1 -0
- package/dist/src/app_admin/core/debug/page.js +44 -0
- package/dist/src/app_admin/core/users/page.d.ts +4 -1
- package/dist/src/app_admin/core/users/page.d.ts.map +1 -1
- package/dist/src/app_admin/core/users/page.js +3 -1
- package/dist/src/components/confirm-action/confirm-action-alert-dialog.d.ts +15 -0
- package/dist/src/components/confirm-action/confirm-action-alert-dialog.d.ts.map +1 -0
- package/dist/src/components/confirm-action/confirm-action-alert-dialog.js +41 -0
- package/dist/src/components/confirm-action/content.d.ts +7 -0
- package/dist/src/components/confirm-action/content.d.ts.map +1 -0
- package/dist/src/components/confirm-action/content.js +31 -0
- package/dist/src/components/date-format.d.ts +2 -1
- package/dist/src/components/date-format.d.ts.map +1 -1
- package/dist/src/components/date-format.js +4 -1
- package/dist/src/components/switchers/langs/language-swietcher.d.ts +5 -0
- package/dist/src/components/switchers/langs/language-swietcher.d.ts.map +1 -0
- package/dist/src/components/switchers/langs/language-swietcher.js +45 -0
- package/dist/src/components/switchers/themes/theme-switcher.d.ts.map +1 -0
- package/dist/src/components/switchers/{theme-switcher.js → themes/theme-switcher.js} +1 -1
- package/dist/src/components/table/data-table.d.ts.map +1 -1
- package/dist/src/components/table/data-table.js +2 -7
- package/dist/src/components/ui/alert-dialog.d.ts +7 -2
- package/dist/src/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/src/components/ui/alert-dialog.js +39 -5
- package/dist/src/components/ui/dialog.js +1 -1
- package/dist/src/database/logs.d.ts +203 -0
- package/dist/src/database/logs.d.ts.map +1 -0
- package/dist/src/database/logs.js +31 -0
- package/dist/src/database/sessions.d.ts +19 -0
- package/dist/src/database/sessions.d.ts.map +1 -1
- package/dist/src/database/sessions.js +3 -0
- package/dist/src/lib/fetcher/core.d.ts +2 -1
- package/dist/src/lib/fetcher/core.d.ts.map +1 -1
- package/dist/src/lib/fetcher/core.js +2 -2
- package/dist/src/lib/fetcher-client.d.ts +2 -1
- package/dist/src/lib/fetcher-client.d.ts.map +1 -1
- package/dist/src/lib/fetcher-client.js +3 -2
- package/dist/src/lib/fetcher.d.ts +2 -1
- package/dist/src/lib/fetcher.d.ts.map +1 -1
- package/dist/src/lib/fetcher.js +2 -1
- package/dist/src/views/admin/layouts/admin-layout.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/admin-layout.js +5 -1
- package/dist/src/views/admin/layouts/user-bar/client.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/user-bar/client.js +26 -18
- package/dist/src/views/admin/views/core/debug/actions/clear-cache/clear-cache.d.ts +2 -0
- package/dist/src/views/admin/views/core/debug/actions/clear-cache/clear-cache.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/debug/actions/clear-cache/clear-cache.js +35 -0
- package/dist/src/views/admin/views/core/debug/actions/clear-cache/mutation-api.d.ts +2 -0
- package/dist/src/views/admin/views/core/debug/actions/clear-cache/mutation-api.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/debug/actions/clear-cache/mutation-api.js +5 -0
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.d.ts +3 -0
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.js +281 -0
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.d.ts +5 -0
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.js +74 -0
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-status.d.ts +4 -0
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-status.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-status.js +8 -0
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-type-log.d.ts +3 -0
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-type-log.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-type-log.js +30 -0
- package/dist/src/views/admin/views/core/debug/system-logs/system-logs-view.d.ts +31 -0
- package/dist/src/views/admin/views/core/debug/system-logs/system-logs-view.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/debug/system-logs/system-logs-view.js +96 -0
- package/dist/src/views/auth/sso/buttons/sso-buttons.d.ts +1 -1
- package/dist/src/views/auth/sso/buttons/sso-buttons.d.ts.map +1 -1
- package/dist/src/views/auth/sso/buttons/sso-buttons.js +5 -2
- package/dist/src/views/layouts/theme/header/header.d.ts +4 -1
- package/dist/src/views/layouts/theme/header/header.d.ts.map +1 -1
- package/dist/src/views/layouts/theme/header/header.js +8 -4
- package/dist/src/views/layouts/theme/layout.d.ts +3 -1
- package/dist/src/views/layouts/theme/layout.d.ts.map +1 -1
- package/dist/src/views/layouts/theme/layout.js +4 -3
- package/dist/src/vitnode.config.d.ts +11 -5
- package/dist/src/vitnode.config.d.ts.map +1 -1
- package/dist/src/vitnode.config.js +2 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +45 -28
- package/src/locales/en.json +59 -1
- package/dist/src/api/lib/get-user-ip.d.ts +0 -3
- package/dist/src/api/lib/get-user-ip.d.ts.map +0 -1
- package/dist/src/api/lib/get-user-ip.js +0 -8
- package/dist/src/api/middlewares/global/global.d.ts.map +0 -1
- package/dist/src/api/middlewares/global/global.js +0 -47
- package/dist/src/api/plugins/email/nodemailer.d.ts.map +0 -1
- package/dist/src/api/plugins/email/resend.d.ts.map +0 -1
- package/dist/src/api/plugins/sso/discord.d.ts.map +0 -1
- package/dist/src/api/plugins/sso/facebook.d.ts.map +0 -1
- package/dist/src/api/plugins/sso/google.d.ts.map +0 -1
- package/dist/src/components/switchers/theme-switcher.d.ts.map +0 -1
- package/src/app/login/page.tsx +0 -22
- package/src/app/login/sso/[providerId]/page.tsx +0 -19
- package/src/app/register/page.tsx +0 -22
- package/src/app_admin/core/page.tsx +0 -5
- package/src/app_admin/core/test/page.tsx +0 -5
- package/src/app_admin/core/users/page.tsx +0 -35
- package/src/drizzle.config.ts +0 -58
- package/src/vitnode.config.ts +0 -104
- /package/dist/src/api/{plugins → adapters}/sso/discord.d.ts +0 -0
- /package/dist/src/api/{plugins → adapters}/sso/discord.js +0 -0
- /package/dist/src/api/{plugins → adapters}/sso/facebook.d.ts +0 -0
- /package/dist/src/api/{plugins → adapters}/sso/facebook.js +0 -0
- /package/dist/src/api/{plugins → adapters}/sso/google.d.ts +0 -0
- /package/dist/src/api/{plugins → adapters}/sso/google.js +0 -0
- /package/dist/src/components/switchers/{theme-switcher.d.ts → themes/theme-switcher.d.ts} +0 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { getTranslations } from "next-intl/server";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { I18nProvider } from "../../../components/i18n-provider.js";
|
|
5
|
+
import { DataTableSkeleton } from "../../../components/table/data-table.js";
|
|
6
|
+
import { HeaderContent } from "../../../components/ui/header-content.js";
|
|
7
|
+
import { ClearCacheAction } from "../../../views/admin/views/core/debug/actions/clear-cache/clear-cache.js";
|
|
8
|
+
const SystemLogsView = /*#__PURE__*/ React.lazy(async ()=>import("../../../views/admin/views/core/debug/system-logs/system-logs-view.js").then((module)=>({
|
|
9
|
+
default: module.SystemLogsView
|
|
10
|
+
})));
|
|
11
|
+
export const generateMetadata = async ()=>{
|
|
12
|
+
const t = await getTranslations('admin.debug');
|
|
13
|
+
return {
|
|
14
|
+
title: t('title'),
|
|
15
|
+
description: t('desc')
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export default async function Page(props) {
|
|
19
|
+
const t = await getTranslations('admin.debug');
|
|
20
|
+
return /*#__PURE__*/ _jsx(I18nProvider, {
|
|
21
|
+
namespaces: "admin.debug",
|
|
22
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
23
|
+
className: "p-4",
|
|
24
|
+
children: [
|
|
25
|
+
/*#__PURE__*/ _jsx(HeaderContent, {
|
|
26
|
+
desc: t('desc'),
|
|
27
|
+
h1: t('title'),
|
|
28
|
+
children: /*#__PURE__*/ _jsx(ClearCacheAction, {})
|
|
29
|
+
}),
|
|
30
|
+
/*#__PURE__*/ _jsx(HeaderContent, {
|
|
31
|
+
h2: t('logs.title')
|
|
32
|
+
}),
|
|
33
|
+
/*#__PURE__*/ _jsx(React.Suspense, {
|
|
34
|
+
fallback: /*#__PURE__*/ _jsx(DataTableSkeleton, {
|
|
35
|
+
columns: 4
|
|
36
|
+
}),
|
|
37
|
+
children: /*#__PURE__*/ _jsx(SystemLogsView, {
|
|
38
|
+
...props
|
|
39
|
+
})
|
|
40
|
+
})
|
|
41
|
+
]
|
|
42
|
+
})
|
|
43
|
+
});
|
|
44
|
+
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { Metadata } from 'next/dist/types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
|
|
3
|
+
declare const UsersAdminView: React.LazyExoticComponent<({ searchParams, }: {
|
|
4
|
+
searchParams: Promise<Record<string, string | string[] | undefined>>;
|
|
5
|
+
}) => Promise<import("react/jsx-runtime").JSX.Element>>;
|
|
4
6
|
export declare const generateMetadata: () => Promise<Metadata>;
|
|
5
7
|
export default function Page(props: React.ComponentProps<typeof UsersAdminView>): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
8
|
+
export {};
|
|
6
9
|
//# sourceMappingURL=page.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../src/app_admin/core/users/page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../src/app_admin/core/users/page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,QAAA,MAAM,cAAc;;uDAInB,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAa,OAAO,CAAC,QAAQ,CAMzD,CAAC;AAEF,wBAA8B,IAAI,CAChC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,oDAgBnD"}
|
|
@@ -3,7 +3,9 @@ import { getTranslations } from "next-intl/server";
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { DataTableSkeleton } from "../../../components/table/data-table.js";
|
|
5
5
|
import { HeaderContent } from "../../../components/ui/header-content.js";
|
|
6
|
-
|
|
6
|
+
const UsersAdminView = /*#__PURE__*/ React.lazy(async ()=>import("../../../views/admin/views/core/users/users-admin-view.js").then((module)=>({
|
|
7
|
+
default: module.UsersAdminView
|
|
8
|
+
})));
|
|
7
9
|
export const generateMetadata = async ()=>{
|
|
8
10
|
const t = await getTranslations('admin.global.nav.users');
|
|
9
11
|
return {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AlertDialog } from '../ui/alert-dialog';
|
|
3
|
+
declare const ContentConfirmAction: React.LazyExoticComponent<({ onSubmit, textSubmit, }: {
|
|
4
|
+
onSubmit: (props: {
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
}) => Promise<void> | void;
|
|
7
|
+
textSubmit?: string;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element>;
|
|
9
|
+
export declare const ConfirmActionAlertDialog: ({ children, title, description, textSubmit, onSubmit, ...props }: Omit<React.ComponentProps<typeof AlertDialog>, "children"> & React.ComponentProps<typeof ContentConfirmAction> & {
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
description?: React.ReactNode;
|
|
12
|
+
title?: React.ReactNode;
|
|
13
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=confirm-action-alert-dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirm-action-alert-dialog.d.ts","sourceRoot":"","sources":["../../../../src/components/confirm-action/confirm-action-alert-dialog.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,WAAW,EAOZ,MAAM,oBAAoB,CAAC;AAE5B,QAAA,MAAM,oBAAoB;;;;cACG,CAAC;8CAG7B,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,kEAOtC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,EAAE,UAAU,CAAC,GAC3D,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,GAAG;IAClD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB,4CAqBF,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useTranslations } from "next-intl";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { AlertDialog, AlertDialogContent, AlertDialogDescription, AlertDialogFooterSkeleton, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "../ui/alert-dialog.js";
|
|
6
|
+
const ContentConfirmAction = /*#__PURE__*/ React.lazy(async ()=>import("./content.js").then((module)=>({
|
|
7
|
+
default: module.ContentConfirmAction
|
|
8
|
+
})));
|
|
9
|
+
export const ConfirmActionAlertDialog = ({ children, title, description, textSubmit, onSubmit, ...props })=>{
|
|
10
|
+
const t = useTranslations('core.global.confirm_action');
|
|
11
|
+
return /*#__PURE__*/ _jsxs(AlertDialog, {
|
|
12
|
+
...props,
|
|
13
|
+
children: [
|
|
14
|
+
/*#__PURE__*/ _jsx(AlertDialogTrigger, {
|
|
15
|
+
asChild: true,
|
|
16
|
+
children: children
|
|
17
|
+
}),
|
|
18
|
+
/*#__PURE__*/ _jsxs(AlertDialogContent, {
|
|
19
|
+
children: [
|
|
20
|
+
/*#__PURE__*/ _jsxs(AlertDialogHeader, {
|
|
21
|
+
children: [
|
|
22
|
+
/*#__PURE__*/ _jsx(AlertDialogTitle, {
|
|
23
|
+
children: title ?? t('title')
|
|
24
|
+
}),
|
|
25
|
+
/*#__PURE__*/ _jsx(AlertDialogDescription, {
|
|
26
|
+
children: description ?? t('desc')
|
|
27
|
+
})
|
|
28
|
+
]
|
|
29
|
+
}),
|
|
30
|
+
/*#__PURE__*/ _jsx(React.Suspense, {
|
|
31
|
+
fallback: /*#__PURE__*/ _jsx(AlertDialogFooterSkeleton, {}),
|
|
32
|
+
children: /*#__PURE__*/ _jsx(ContentConfirmAction, {
|
|
33
|
+
onSubmit: onSubmit,
|
|
34
|
+
textSubmit: textSubmit
|
|
35
|
+
})
|
|
36
|
+
})
|
|
37
|
+
]
|
|
38
|
+
})
|
|
39
|
+
]
|
|
40
|
+
});
|
|
41
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../../src/components/confirm-action/content.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,oBAAoB,GAAI,2BAGlC;IACD,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACnE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,4CAmBA,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslations } from "next-intl";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { AlertDialogCancel, AlertDialogFooter, useAlertDialog } from "../ui/alert-dialog.js";
|
|
5
|
+
import { Button } from "../ui/button.js";
|
|
6
|
+
export const ContentConfirmAction = ({ onSubmit, textSubmit })=>{
|
|
7
|
+
const t = useTranslations('core.global.confirm_action');
|
|
8
|
+
const { setOpen } = useAlertDialog();
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10
|
+
const [_, formAction, isLoading] = React.useActionState(async ()=>{
|
|
11
|
+
await onSubmit({
|
|
12
|
+
onClose: ()=>setOpen?.(false)
|
|
13
|
+
});
|
|
14
|
+
}, null);
|
|
15
|
+
return /*#__PURE__*/ _jsx("form", {
|
|
16
|
+
action: formAction,
|
|
17
|
+
children: /*#__PURE__*/ _jsxs(AlertDialogFooter, {
|
|
18
|
+
children: [
|
|
19
|
+
/*#__PURE__*/ _jsx(AlertDialogCancel, {
|
|
20
|
+
children: t('cancel')
|
|
21
|
+
}),
|
|
22
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
23
|
+
isLoading: isLoading,
|
|
24
|
+
type: "submit",
|
|
25
|
+
variant: "destructive",
|
|
26
|
+
children: textSubmit ?? t('confirm')
|
|
27
|
+
})
|
|
28
|
+
]
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export declare const DateFormat: ({ date, updateInterval, }: {
|
|
1
|
+
export declare const DateFormat: ({ date, updateInterval, showFullDate, }: {
|
|
2
2
|
date: Date | string;
|
|
3
|
+
showFullDate?: boolean;
|
|
3
4
|
updateInterval?: number;
|
|
4
5
|
}) => string | import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
//# sourceMappingURL=date-format.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-format.d.ts","sourceRoot":"","sources":["../../../src/components/date-format.tsx"],"names":[],"mappings":"AAWA,eAAO,MAAM,UAAU,GAAI,
|
|
1
|
+
{"version":3,"file":"date-format.d.ts","sourceRoot":"","sources":["../../../src/components/date-format.tsx"],"names":[],"mappings":"AAWA,eAAO,MAAM,UAAU,GAAI,yCAIxB;IACD,IAAI,EAAE,IAAI,GAAG,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,qDAuCA,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useFormatter, useNow } from "next-intl";
|
|
4
4
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./ui/tooltip.js";
|
|
5
|
-
export const DateFormat = ({ date, updateInterval })=>{
|
|
5
|
+
export const DateFormat = ({ date, updateInterval, showFullDate })=>{
|
|
6
6
|
const dateToFormat = typeof date === 'string' ? new Date(date) : date;
|
|
7
7
|
const format = useFormatter();
|
|
8
8
|
const now = useNow({
|
|
@@ -16,6 +16,9 @@ export const DateFormat = ({ date, updateInterval })=>{
|
|
|
16
16
|
hour: 'numeric',
|
|
17
17
|
minute: 'numeric'
|
|
18
18
|
});
|
|
19
|
+
if (showFullDate) {
|
|
20
|
+
return fullDate;
|
|
21
|
+
}
|
|
19
22
|
// When date is < 7 days
|
|
20
23
|
if (now.getTime() - dateToFormat.getTime() < 604800000) {
|
|
21
24
|
return /*#__PURE__*/ _jsx(TooltipProvider, {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"language-swietcher.d.ts","sourceRoot":"","sources":["../../../../../src/components/switchers/langs/language-swietcher.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAYrD,eAAO,MAAM,gBAAgB,GAAI,aAAa;IAAE,OAAO,EAAE,YAAY,EAAE,CAAA;CAAE,4CAuCxE,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { CheckIcon, LanguagesIcon } from "lucide-react";
|
|
4
|
+
import { useLocale } from "next-intl";
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { usePathname, useRouter } from "../../../lib/navigation.js";
|
|
7
|
+
import { Button } from "../../ui/button.js";
|
|
8
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../../ui/dropdown-menu.js";
|
|
9
|
+
export const LanguageSwitcher = ({ locales })=>{
|
|
10
|
+
const currentLocale = useLocale();
|
|
11
|
+
const [isPending, startTransition] = React.useTransition();
|
|
12
|
+
const { replace } = useRouter();
|
|
13
|
+
const pathname = usePathname();
|
|
14
|
+
return /*#__PURE__*/ _jsxs(DropdownMenu, {
|
|
15
|
+
children: [
|
|
16
|
+
/*#__PURE__*/ _jsx(DropdownMenuTrigger, {
|
|
17
|
+
asChild: true,
|
|
18
|
+
children: /*#__PURE__*/ _jsx(Button, {
|
|
19
|
+
className: "relative",
|
|
20
|
+
isLoading: isPending,
|
|
21
|
+
size: "icon",
|
|
22
|
+
variant: "ghost",
|
|
23
|
+
children: /*#__PURE__*/ _jsx(LanguagesIcon, {})
|
|
24
|
+
})
|
|
25
|
+
}),
|
|
26
|
+
/*#__PURE__*/ _jsx(DropdownMenuContent, {
|
|
27
|
+
children: locales.map((locale)=>/*#__PURE__*/ _jsxs(DropdownMenuItem, {
|
|
28
|
+
onClick: ()=>{
|
|
29
|
+
startTransition(()=>{
|
|
30
|
+
replace(pathname, {
|
|
31
|
+
locale: locale.code
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
children: [
|
|
36
|
+
locale.name,
|
|
37
|
+
locale.code === currentLocale && /*#__PURE__*/ _jsx(CheckIcon, {
|
|
38
|
+
className: "ml-auto"
|
|
39
|
+
})
|
|
40
|
+
]
|
|
41
|
+
}, locale.code))
|
|
42
|
+
})
|
|
43
|
+
]
|
|
44
|
+
});
|
|
45
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-switcher.d.ts","sourceRoot":"","sources":["../../../../../src/components/switchers/themes/theme-switcher.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa,+CAiBzB,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Moon, Sun } from "lucide-react";
|
|
4
4
|
import { useTheme } from "next-themes";
|
|
5
|
-
import { Button } from "
|
|
5
|
+
import { Button } from "../../ui/button.js";
|
|
6
6
|
export const ThemeSwitcher = ()=>{
|
|
7
7
|
const { setTheme, resolvedTheme } = useTheme();
|
|
8
8
|
return /*#__PURE__*/ _jsxs(Button, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-table.d.ts","sourceRoot":"","sources":["../../../../src/components/table/data-table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAIxD,OAAO,EACL,KAAK,EAKN,MAAM,aAAa,CAAC;AAGrB,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,qBAAqB,CAAC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ACvB,CAAC;KACH,CAAC;CACH,2CAOJ"}
|
|
@@ -58,12 +58,7 @@ export function DataTable(props) {
|
|
|
58
58
|
code: 500
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
|
-
return /*#__PURE__*/ _jsx(
|
|
62
|
-
|
|
63
|
-
columns: props.columns.length
|
|
64
|
-
}),
|
|
65
|
-
children: /*#__PURE__*/ _jsx(ContentDataTable, {
|
|
66
|
-
...props
|
|
67
|
-
})
|
|
61
|
+
return /*#__PURE__*/ _jsx(ContentDataTable, {
|
|
62
|
+
...props
|
|
68
63
|
});
|
|
69
64
|
}
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import { AlertDialog as AlertDialogPrimitive } from 'radix-ui';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
declare
|
|
3
|
+
export declare const useAlertDialog: () => {
|
|
4
|
+
open: boolean;
|
|
5
|
+
setOpen?: (value: boolean) => void;
|
|
6
|
+
};
|
|
7
|
+
declare function AlertDialog({ onOpenChange, open: openProp, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
8
|
declare function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
9
|
declare function AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
6
10
|
declare function AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
|
|
7
11
|
declare function AlertDialogContent({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
8
12
|
declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
9
13
|
declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function AlertDialogFooterSkeleton({ className, ...props }: Omit<React.ComponentProps<'div'>, 'children'>): import("react/jsx-runtime").JSX.Element;
|
|
10
15
|
declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
11
16
|
declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
12
17
|
declare function AlertDialogAction({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action>): import("react/jsx-runtime").JSX.Element;
|
|
13
18
|
declare function AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };
|
|
19
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogFooterSkeleton, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };
|
|
15
20
|
//# sourceMappingURL=alert-dialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/alert-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/alert-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,KAAK,KA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OAAO,oBAAoB,CAAC,KAAK,CAAC,2CAQzD;AAED,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,WAAW,CAAC,2CAQ/D;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,MAAM,CAAC,2CAO1D;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,MAAM,CAAC,2CAO1D;AAED,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,EACjB,yBAAyB,EACzB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,GACnB,CAAC"}
|
|
@@ -4,10 +4,29 @@ import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
|
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { buttonVariants } from "./button.js";
|
|
6
6
|
import { cn } from "../../lib/utils.js";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
import { Skeleton } from "./skeleton.js";
|
|
8
|
+
const AlertDialogContext = /*#__PURE__*/ React.createContext({
|
|
9
|
+
open: false,
|
|
10
|
+
setOpen: ()=>{}
|
|
11
|
+
});
|
|
12
|
+
export const useAlertDialog = ()=>React.useContext(AlertDialogContext);
|
|
13
|
+
function AlertDialog({ onOpenChange, open: openProp, ...props }) {
|
|
14
|
+
const [open, setOpen] = React.useState(false);
|
|
15
|
+
const handleOpenChange = (newOpen)=>{
|
|
16
|
+
onOpenChange?.(newOpen);
|
|
17
|
+
setOpen(newOpen);
|
|
18
|
+
};
|
|
19
|
+
return /*#__PURE__*/ _jsx(AlertDialogContext, {
|
|
20
|
+
value: {
|
|
21
|
+
open,
|
|
22
|
+
setOpen
|
|
23
|
+
},
|
|
24
|
+
children: /*#__PURE__*/ _jsx(AlertDialogPrimitive.Root, {
|
|
25
|
+
"data-slot": "alert-dialog",
|
|
26
|
+
onOpenChange: handleOpenChange,
|
|
27
|
+
open: openProp ?? open,
|
|
28
|
+
...props
|
|
29
|
+
})
|
|
11
30
|
});
|
|
12
31
|
}
|
|
13
32
|
function AlertDialogTrigger({ ...props }) {
|
|
@@ -55,6 +74,21 @@ function AlertDialogFooter({ className, ...props }) {
|
|
|
55
74
|
...props
|
|
56
75
|
});
|
|
57
76
|
}
|
|
77
|
+
function AlertDialogFooterSkeleton({ className, ...props }) {
|
|
78
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
79
|
+
className: cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className),
|
|
80
|
+
"data-slot": "alert-dialog-footer",
|
|
81
|
+
...props,
|
|
82
|
+
children: [
|
|
83
|
+
/*#__PURE__*/ _jsx(Skeleton, {
|
|
84
|
+
className: "h-9 sm:w-24"
|
|
85
|
+
}),
|
|
86
|
+
/*#__PURE__*/ _jsx(Skeleton, {
|
|
87
|
+
className: "h-9 sm:w-24"
|
|
88
|
+
})
|
|
89
|
+
]
|
|
90
|
+
});
|
|
91
|
+
}
|
|
58
92
|
function AlertDialogTitle({ className, ...props }) {
|
|
59
93
|
return /*#__PURE__*/ _jsx(AlertDialogPrimitive.Title, {
|
|
60
94
|
className: cn('text-lg font-semibold', className),
|
|
@@ -83,4 +117,4 @@ function AlertDialogCancel({ className, ...props }) {
|
|
|
83
117
|
...props
|
|
84
118
|
});
|
|
85
119
|
}
|
|
86
|
-
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };
|
|
120
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogFooterSkeleton, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };
|
|
@@ -114,7 +114,7 @@ function DialogContent({ className, children, showCloseButton = true, ...props }
|
|
|
114
114
|
children: [
|
|
115
115
|
/*#__PURE__*/ _jsx(DialogOverlay, {}),
|
|
116
116
|
/*#__PURE__*/ _jsxs(DialogPrimitive.Content, {
|
|
117
|
-
className: cn('dark:bg-background bg-card data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed left-[50%] top-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg', 'max-h-
|
|
117
|
+
className: cn('dark:bg-background bg-card data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed left-[50%] top-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg', 'max-h-[calc(100vh_-_2rem)] overflow-y-scroll sm:max-h-[calc(100vh_-_5rem)]', className),
|
|
118
118
|
"data-slot": "dialog-content",
|
|
119
119
|
onInteractOutside: (e)=>{
|
|
120
120
|
// Prevent dismissing the dialog when clicking on a toast
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
export declare const coreLogsType: import("drizzle-orm/pg-core").PgEnum<["warn", "error", "debug"]>;
|
|
2
|
+
export type CoreLogsType = (typeof coreLogsType.enumValues)[number];
|
|
3
|
+
export declare const core_logs: Omit<import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
4
|
+
name: "core_logs";
|
|
5
|
+
schema: undefined;
|
|
6
|
+
columns: {
|
|
7
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
8
|
+
name: "id";
|
|
9
|
+
tableName: "core_logs";
|
|
10
|
+
dataType: "number";
|
|
11
|
+
columnType: "PgSerial";
|
|
12
|
+
data: number;
|
|
13
|
+
driverParam: number;
|
|
14
|
+
notNull: true;
|
|
15
|
+
hasDefault: true;
|
|
16
|
+
isPrimaryKey: true;
|
|
17
|
+
isAutoincrement: false;
|
|
18
|
+
hasRuntimeDefault: false;
|
|
19
|
+
enumValues: undefined;
|
|
20
|
+
baseColumn: never;
|
|
21
|
+
identity: undefined;
|
|
22
|
+
generated: undefined;
|
|
23
|
+
}, {}, {}>;
|
|
24
|
+
pluginId: import("drizzle-orm/pg-core").PgColumn<{
|
|
25
|
+
name: "pluginId";
|
|
26
|
+
tableName: "core_logs";
|
|
27
|
+
dataType: "string";
|
|
28
|
+
columnType: "PgVarchar";
|
|
29
|
+
data: string;
|
|
30
|
+
driverParam: string;
|
|
31
|
+
notNull: true;
|
|
32
|
+
hasDefault: false;
|
|
33
|
+
isPrimaryKey: false;
|
|
34
|
+
isAutoincrement: false;
|
|
35
|
+
hasRuntimeDefault: false;
|
|
36
|
+
enumValues: [string, ...string[]];
|
|
37
|
+
baseColumn: never;
|
|
38
|
+
identity: undefined;
|
|
39
|
+
generated: undefined;
|
|
40
|
+
}, {}, {
|
|
41
|
+
length: 255;
|
|
42
|
+
}>;
|
|
43
|
+
type: import("drizzle-orm/pg-core").PgColumn<{
|
|
44
|
+
name: "type";
|
|
45
|
+
tableName: "core_logs";
|
|
46
|
+
dataType: "string";
|
|
47
|
+
columnType: "PgEnumColumn";
|
|
48
|
+
data: "warn" | "error" | "debug";
|
|
49
|
+
driverParam: string;
|
|
50
|
+
notNull: true;
|
|
51
|
+
hasDefault: false;
|
|
52
|
+
isPrimaryKey: false;
|
|
53
|
+
isAutoincrement: false;
|
|
54
|
+
hasRuntimeDefault: false;
|
|
55
|
+
enumValues: ["warn", "error", "debug"];
|
|
56
|
+
baseColumn: never;
|
|
57
|
+
identity: undefined;
|
|
58
|
+
generated: undefined;
|
|
59
|
+
}, {}, {}>;
|
|
60
|
+
content: import("drizzle-orm/pg-core").PgColumn<{
|
|
61
|
+
name: "content";
|
|
62
|
+
tableName: "core_logs";
|
|
63
|
+
dataType: "string";
|
|
64
|
+
columnType: "PgText";
|
|
65
|
+
data: string;
|
|
66
|
+
driverParam: string;
|
|
67
|
+
notNull: true;
|
|
68
|
+
hasDefault: false;
|
|
69
|
+
isPrimaryKey: false;
|
|
70
|
+
isAutoincrement: false;
|
|
71
|
+
hasRuntimeDefault: false;
|
|
72
|
+
enumValues: [string, ...string[]];
|
|
73
|
+
baseColumn: never;
|
|
74
|
+
identity: undefined;
|
|
75
|
+
generated: undefined;
|
|
76
|
+
}, {}, {}>;
|
|
77
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
78
|
+
name: "createdAt";
|
|
79
|
+
tableName: "core_logs";
|
|
80
|
+
dataType: "date";
|
|
81
|
+
columnType: "PgTimestamp";
|
|
82
|
+
data: Date;
|
|
83
|
+
driverParam: string;
|
|
84
|
+
notNull: true;
|
|
85
|
+
hasDefault: true;
|
|
86
|
+
isPrimaryKey: false;
|
|
87
|
+
isAutoincrement: false;
|
|
88
|
+
hasRuntimeDefault: false;
|
|
89
|
+
enumValues: undefined;
|
|
90
|
+
baseColumn: never;
|
|
91
|
+
identity: undefined;
|
|
92
|
+
generated: undefined;
|
|
93
|
+
}, {}, {}>;
|
|
94
|
+
ipAddress: import("drizzle-orm/pg-core").PgColumn<{
|
|
95
|
+
name: "ipAddress";
|
|
96
|
+
tableName: "core_logs";
|
|
97
|
+
dataType: "string";
|
|
98
|
+
columnType: "PgVarchar";
|
|
99
|
+
data: string;
|
|
100
|
+
driverParam: string;
|
|
101
|
+
notNull: true;
|
|
102
|
+
hasDefault: false;
|
|
103
|
+
isPrimaryKey: false;
|
|
104
|
+
isAutoincrement: false;
|
|
105
|
+
hasRuntimeDefault: false;
|
|
106
|
+
enumValues: [string, ...string[]];
|
|
107
|
+
baseColumn: never;
|
|
108
|
+
identity: undefined;
|
|
109
|
+
generated: undefined;
|
|
110
|
+
}, {}, {
|
|
111
|
+
length: 45;
|
|
112
|
+
}>;
|
|
113
|
+
method: import("drizzle-orm/pg-core").PgColumn<{
|
|
114
|
+
name: "method";
|
|
115
|
+
tableName: "core_logs";
|
|
116
|
+
dataType: "string";
|
|
117
|
+
columnType: "PgVarchar";
|
|
118
|
+
data: string;
|
|
119
|
+
driverParam: string;
|
|
120
|
+
notNull: true;
|
|
121
|
+
hasDefault: true;
|
|
122
|
+
isPrimaryKey: false;
|
|
123
|
+
isAutoincrement: false;
|
|
124
|
+
hasRuntimeDefault: false;
|
|
125
|
+
enumValues: [string, ...string[]];
|
|
126
|
+
baseColumn: never;
|
|
127
|
+
identity: undefined;
|
|
128
|
+
generated: undefined;
|
|
129
|
+
}, {}, {
|
|
130
|
+
length: 10;
|
|
131
|
+
}>;
|
|
132
|
+
path: import("drizzle-orm/pg-core").PgColumn<{
|
|
133
|
+
name: "path";
|
|
134
|
+
tableName: "core_logs";
|
|
135
|
+
dataType: "string";
|
|
136
|
+
columnType: "PgText";
|
|
137
|
+
data: string;
|
|
138
|
+
driverParam: string;
|
|
139
|
+
notNull: true;
|
|
140
|
+
hasDefault: true;
|
|
141
|
+
isPrimaryKey: false;
|
|
142
|
+
isAutoincrement: false;
|
|
143
|
+
hasRuntimeDefault: false;
|
|
144
|
+
enumValues: [string, ...string[]];
|
|
145
|
+
baseColumn: never;
|
|
146
|
+
identity: undefined;
|
|
147
|
+
generated: undefined;
|
|
148
|
+
}, {}, {}>;
|
|
149
|
+
userAgent: import("drizzle-orm/pg-core").PgColumn<{
|
|
150
|
+
name: "userAgent";
|
|
151
|
+
tableName: "core_logs";
|
|
152
|
+
dataType: "string";
|
|
153
|
+
columnType: "PgText";
|
|
154
|
+
data: string;
|
|
155
|
+
driverParam: string;
|
|
156
|
+
notNull: false;
|
|
157
|
+
hasDefault: false;
|
|
158
|
+
isPrimaryKey: false;
|
|
159
|
+
isAutoincrement: false;
|
|
160
|
+
hasRuntimeDefault: false;
|
|
161
|
+
enumValues: [string, ...string[]];
|
|
162
|
+
baseColumn: never;
|
|
163
|
+
identity: undefined;
|
|
164
|
+
generated: undefined;
|
|
165
|
+
}, {}, {}>;
|
|
166
|
+
statusCode: import("drizzle-orm/pg-core").PgColumn<{
|
|
167
|
+
name: "statusCode";
|
|
168
|
+
tableName: "core_logs";
|
|
169
|
+
dataType: "number";
|
|
170
|
+
columnType: "PgInteger";
|
|
171
|
+
data: number;
|
|
172
|
+
driverParam: string | number;
|
|
173
|
+
notNull: true;
|
|
174
|
+
hasDefault: true;
|
|
175
|
+
isPrimaryKey: false;
|
|
176
|
+
isAutoincrement: false;
|
|
177
|
+
hasRuntimeDefault: false;
|
|
178
|
+
enumValues: undefined;
|
|
179
|
+
baseColumn: never;
|
|
180
|
+
identity: undefined;
|
|
181
|
+
generated: undefined;
|
|
182
|
+
}, {}, {}>;
|
|
183
|
+
userId: import("drizzle-orm/pg-core").PgColumn<{
|
|
184
|
+
name: "userId";
|
|
185
|
+
tableName: "core_logs";
|
|
186
|
+
dataType: "number";
|
|
187
|
+
columnType: "PgBigInt53";
|
|
188
|
+
data: number;
|
|
189
|
+
driverParam: string | number;
|
|
190
|
+
notNull: false;
|
|
191
|
+
hasDefault: false;
|
|
192
|
+
isPrimaryKey: false;
|
|
193
|
+
isAutoincrement: false;
|
|
194
|
+
hasRuntimeDefault: false;
|
|
195
|
+
enumValues: undefined;
|
|
196
|
+
baseColumn: never;
|
|
197
|
+
identity: undefined;
|
|
198
|
+
generated: undefined;
|
|
199
|
+
}, {}, {}>;
|
|
200
|
+
};
|
|
201
|
+
dialect: "pg";
|
|
202
|
+
}>, "enableRLS">;
|
|
203
|
+
//# sourceMappingURL=logs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logs.d.ts","sourceRoot":"","sources":["../../../src/database/logs.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY,kEAAqD,CAAC;AAE/E,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,YAAY,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAeP,CAAC"}
|