vintasend 0.2.3 → 0.4.0
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/README.md +227 -12
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/next.config.d.ts +1 -1
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/next.config.js +9 -4
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/app/api/auth/forgot-password/forgot-password-notification-context.d.ts +6 -6
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/app/api/auth/forgot-password/forgot-password-notification-context.js +16 -17
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/app/api/auth/forgot-password/route.d.ts +7 -5
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/app/api/auth/forgot-password/route.js +105 -79
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/app/api/auth/login/route.d.ts +4 -5
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/app/api/auth/login/route.js +96 -66
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/app/api/auth/reset-password/route.d.ts +7 -5
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/app/api/auth/reset-password/route.js +95 -71
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/app/api/auth/signup/email-verification-notification-context.d.ts +6 -6
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/app/api/auth/signup/email-verification-notification-context.js +18 -18
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/app/api/auth/signup/route.d.ts +4 -5
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/app/api/auth/signup/route.js +124 -96
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/app/api/auth/verify-email/route.d.ts +7 -5
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/app/api/auth/verify-email/route.js +94 -70
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/app/auth/login/page.d.ts +1 -1
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/app/auth/login/page.js +67 -55
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/app/auth/reset-password/[token]/page.d.ts +1 -1
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/app/auth/reset-password/[token]/page.js +76 -63
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/app/auth/signup/page.d.ts +1 -1
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/app/auth/signup/page.js +87 -63
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/app/auth/verify-email/[token]/page.d.ts +1 -1
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/app/auth/verify-email/[token]/page.js +50 -35
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/app/auth/verify-email-sent/page.d.ts +1 -1
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/app/auth/verify-email-sent/page.js +12 -12
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/app/layout.d.ts +7 -5
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/app/layout.js +15 -16
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/app/page.d.ts +1 -1
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/app/page.js +65 -21
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/AuthLayout.d.ts +7 -4
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/AuthLayout.js +7 -8
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/accordion.d.ts +18 -6
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/accordion.js +86 -48
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/alert-dialog.d.ts +58 -14
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/alert-dialog.js +135 -53
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/alert.d.ts +21 -7
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/alert.js +85 -49
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/avatar.d.ts +14 -5
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/avatar.js +77 -40
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/button.d.ts +25 -9
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/button.js +80 -58
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/card.d.ts +19 -7
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/card.js +98 -48
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/checkbox.d.ts +6 -3
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/checkbox.js +66 -42
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/collapsible.d.ts +10 -4
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/collapsible.js +48 -35
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/dialog.d.ts +40 -13
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/dialog.js +116 -50
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/dropdown-menu.d.ts +83 -19
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/dropdown-menu.js +170 -68
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/form.d.ts +53 -21
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/form.js +137 -83
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/input.d.ts +8 -2
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/input.js +60 -37
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/label.d.ts +10 -4
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/label.js +61 -40
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/menubar.d.ts +77 -23
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/menubar.js +188 -64
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/select.d.ts +48 -12
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/select.js +148 -66
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/textarea.d.ts +8 -2
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/components/ui/textarea.js +59 -37
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/lib/api-clients/auth.d.ts +10 -10
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/lib/api-clients/auth.js +54 -55
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/lib/api-clients/core.d.ts +14 -11
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/lib/api-clients/core.js +1 -2
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/lib/email.js +0 -1
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/lib/logger.d.ts +3 -3
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/lib/logger.js +9 -10
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/lib/schemas/auth.d.ts +66 -32
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/lib/schemas/auth.js +74 -54
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/lib/services/auth.js +7 -8
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/lib/services/notifications-with-queue.d.ts +14 -4
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/lib/services/notifications-with-queue.js +14 -10
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/lib/services/notifications.d.ts +11 -7
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/lib/services/notifications.js +39 -26
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/lib/services/temporal-queue-service.d.ts +11 -8
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/lib/services/temporal-queue-service.js +14 -15
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/lib/temporal.d.ts +1 -1
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/lib/temporal.js +9 -10
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/lib/utils.d.ts +1 -1
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/lib/utils.js +4 -5
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/workers/notifications/activities.d.ts +6 -5
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/workers/notifications/activities.js +14 -14
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/workers/notifications/config.d.ts +1 -1
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/workers/notifications/config.js +2 -3
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/workers/notifications/constants.d.ts +1 -1
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/workers/notifications/constants.js +1 -2
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/workers/notifications/worker.js +20 -22
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/workers/notifications/workflows.d.ts +3 -2
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/src/workers/notifications/workflows.js +10 -9
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/tailwind.config.d.ts +74 -74
- package/dist/examples/nextjs-prisma-nodemailer-pug-temporal/tailwind.config.js +80 -81
- package/dist/implementations/vintasend-nodemailer/src/index.js +6 -4
- package/dist/implementations/vintasend-nodemailer/src/nodemailer-notification-adapter.d.ts +36 -14
- package/dist/implementations/vintasend-nodemailer/src/nodemailer-notification-adapter.js +26 -28
- package/dist/implementations/vintasend-prisma/src/index.js +6 -4
- package/dist/implementations/vintasend-prisma/src/prisma-notification-backend.d.ts +232 -138
- package/dist/implementations/vintasend-prisma/src/prisma-notification-backend.js +275 -262
- package/dist/implementations/vintasend-pug/src/index.js +6 -4
- package/dist/implementations/vintasend-pug/src/pug-email-template-renderer.d.ts +18 -7
- package/dist/implementations/vintasend-pug/src/pug-email-template-renderer.js +19 -21
- package/dist/implementations/vintasend-winston/src/index.js +6 -4
- package/dist/implementations/vintasend-winston/src/winston-logger.d.ts +6 -6
- package/dist/implementations/vintasend-winston/src/winston-logger.js +65 -50
- package/dist/index.d.ts +13 -5
- package/dist/index.js +13 -1
- package/dist/services/attachment-manager/base-attachment-manager.d.ts +42 -0
- package/dist/services/attachment-manager/base-attachment-manager.js +115 -0
- package/dist/services/attachment-manager/local-file-attachment-manager.d.ts +58 -0
- package/dist/services/attachment-manager/local-file-attachment-manager.js +192 -0
- package/dist/services/notification-adapters/base-notification-adapter.d.ts +36 -4
- package/dist/services/notification-adapters/base-notification-adapter.js +73 -4
- package/dist/services/notification-backends/base-notification-backend.d.ts +54 -11
- package/dist/services/notification-backends/base-notification-backend.js +12 -0
- package/dist/services/notification-context-generators-map.d.ts +1 -1
- package/dist/services/notification-context-registry.d.ts +14 -9
- package/dist/services/notification-context-registry.js +30 -31
- package/dist/services/notification-queue-service/base-notification-queue-service.d.ts +1 -1
- package/dist/services/notification-service.d.ts +73 -13
- package/dist/services/notification-service.js +125 -8
- package/dist/services/notification-template-renderers/base-email-template-renderer.d.ts +3 -3
- package/dist/services/notification-template-renderers/base-notification-template-renderer.d.ts +2 -2
- package/dist/types/attachment.d.ts +42 -0
- package/dist/types/attachment.js +7 -0
- package/dist/types/notification-type-config.d.ts +2 -2
- package/dist/types/notification.d.ts +21 -0
- package/dist/types/one-off-notification.d.ts +72 -0
- package/dist/types/one-off-notification.js +2 -0
- package/package.json +13 -11
|
@@ -1,96 +1,178 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
var __createBinding =
|
|
3
|
+
(this && this.__createBinding) ||
|
|
4
|
+
(Object.create
|
|
5
|
+
? (o, m, k, k2) => {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ('get' in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: () => m[k] };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}
|
|
13
|
+
: (o, m, k, k2) => {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
});
|
|
17
|
+
var __setModuleDefault =
|
|
18
|
+
(this && this.__setModuleDefault) ||
|
|
19
|
+
(Object.create
|
|
20
|
+
? (o, v) => {
|
|
21
|
+
Object.defineProperty(o, 'default', { enumerable: true, value: v });
|
|
22
|
+
}
|
|
23
|
+
: (o, v) => {
|
|
24
|
+
o['default'] = v;
|
|
25
|
+
});
|
|
26
|
+
var __importStar =
|
|
27
|
+
(this && this.__importStar) ||
|
|
28
|
+
(() => {
|
|
29
|
+
var ownKeys = (o) => {
|
|
30
|
+
ownKeys =
|
|
31
|
+
Object.getOwnPropertyNames ||
|
|
32
|
+
((o) => {
|
|
33
|
+
var ar = [];
|
|
34
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
35
|
+
return ar;
|
|
36
|
+
});
|
|
37
|
+
return ownKeys(o);
|
|
27
38
|
};
|
|
28
|
-
return
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
39
|
+
return (mod) => {
|
|
40
|
+
if (mod && mod.__esModule) return mod;
|
|
41
|
+
var result = {};
|
|
42
|
+
if (mod != null)
|
|
43
|
+
for (var k = ownKeys(mod), i = 0; i < k.length; i++)
|
|
44
|
+
if (k[i] !== 'default') __createBinding(result, mod, k[i]);
|
|
45
|
+
__setModuleDefault(result, mod);
|
|
46
|
+
return result;
|
|
34
47
|
};
|
|
35
|
-
})();
|
|
36
|
-
Object.defineProperty(exports,
|
|
37
|
-
exports.SelectScrollDownButton =
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
48
|
+
})();
|
|
49
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
50
|
+
exports.SelectScrollDownButton =
|
|
51
|
+
exports.SelectScrollUpButton =
|
|
52
|
+
exports.SelectSeparator =
|
|
53
|
+
exports.SelectItem =
|
|
54
|
+
exports.SelectLabel =
|
|
55
|
+
exports.SelectContent =
|
|
56
|
+
exports.SelectTrigger =
|
|
57
|
+
exports.SelectValue =
|
|
58
|
+
exports.SelectGroup =
|
|
59
|
+
exports.Select =
|
|
60
|
+
void 0;
|
|
61
|
+
const React = __importStar(require('react'));
|
|
62
|
+
const SelectPrimitive = __importStar(require('@radix-ui/react-select'));
|
|
63
|
+
const lucide_react_1 = require('lucide-react');
|
|
64
|
+
const utils_1 = require('../../lib/utils');
|
|
42
65
|
const Select = SelectPrimitive.Root;
|
|
43
66
|
exports.Select = Select;
|
|
44
67
|
const SelectGroup = SelectPrimitive.Group;
|
|
45
68
|
exports.SelectGroup = SelectGroup;
|
|
46
69
|
const SelectValue = SelectPrimitive.Value;
|
|
47
70
|
exports.SelectValue = SelectValue;
|
|
48
|
-
const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => (
|
|
71
|
+
const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => (
|
|
72
|
+
<SelectPrimitive.Trigger
|
|
73
|
+
ref={ref}
|
|
74
|
+
className={(0, utils_1.cn)(
|
|
75
|
+
'flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1',
|
|
76
|
+
className,
|
|
77
|
+
)}
|
|
78
|
+
{...props}
|
|
79
|
+
>
|
|
49
80
|
{children}
|
|
50
81
|
<SelectPrimitive.Icon asChild>
|
|
51
|
-
<lucide_react_1.ChevronDown className="h-4 w-4 opacity-50"/>
|
|
82
|
+
<lucide_react_1.ChevronDown className="h-4 w-4 opacity-50" />
|
|
52
83
|
</SelectPrimitive.Icon>
|
|
53
|
-
</SelectPrimitive.Trigger>
|
|
84
|
+
</SelectPrimitive.Trigger>
|
|
85
|
+
));
|
|
54
86
|
exports.SelectTrigger = SelectTrigger;
|
|
55
87
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
56
|
-
const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => (
|
|
57
|
-
|
|
58
|
-
|
|
88
|
+
const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => (
|
|
89
|
+
<SelectPrimitive.ScrollUpButton
|
|
90
|
+
ref={ref}
|
|
91
|
+
className={(0, utils_1.cn)('flex cursor-default items-center justify-center py-1', className)}
|
|
92
|
+
{...props}
|
|
93
|
+
>
|
|
94
|
+
<lucide_react_1.ChevronUp className="h-4 w-4" />
|
|
95
|
+
</SelectPrimitive.ScrollUpButton>
|
|
96
|
+
));
|
|
59
97
|
exports.SelectScrollUpButton = SelectScrollUpButton;
|
|
60
98
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
61
|
-
const SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => (
|
|
62
|
-
|
|
63
|
-
|
|
99
|
+
const SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => (
|
|
100
|
+
<SelectPrimitive.ScrollDownButton
|
|
101
|
+
ref={ref}
|
|
102
|
+
className={(0, utils_1.cn)('flex cursor-default items-center justify-center py-1', className)}
|
|
103
|
+
{...props}
|
|
104
|
+
>
|
|
105
|
+
<lucide_react_1.ChevronDown className="h-4 w-4" />
|
|
106
|
+
</SelectPrimitive.ScrollDownButton>
|
|
107
|
+
));
|
|
64
108
|
exports.SelectScrollDownButton = SelectScrollDownButton;
|
|
65
|
-
SelectScrollDownButton.displayName =
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
<SelectPrimitive.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
109
|
+
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
110
|
+
const SelectContent = React.forwardRef(
|
|
111
|
+
({ className, children, position = 'popper', ...props }, ref) => (
|
|
112
|
+
<SelectPrimitive.Portal>
|
|
113
|
+
<SelectPrimitive.Content
|
|
114
|
+
ref={ref}
|
|
115
|
+
className={(0, utils_1.cn)(
|
|
116
|
+
'relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
|
|
117
|
+
position === 'popper' &&
|
|
118
|
+
'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',
|
|
119
|
+
className,
|
|
120
|
+
)}
|
|
121
|
+
position={position}
|
|
122
|
+
{...props}
|
|
123
|
+
>
|
|
124
|
+
<SelectScrollUpButton />
|
|
125
|
+
<SelectPrimitive.Viewport
|
|
126
|
+
className={(0, utils_1.cn)(
|
|
127
|
+
'p-1',
|
|
128
|
+
position === 'popper' &&
|
|
129
|
+
'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]',
|
|
130
|
+
)}
|
|
131
|
+
>
|
|
132
|
+
{children}
|
|
133
|
+
</SelectPrimitive.Viewport>
|
|
134
|
+
<SelectScrollDownButton />
|
|
135
|
+
</SelectPrimitive.Content>
|
|
136
|
+
</SelectPrimitive.Portal>
|
|
137
|
+
),
|
|
138
|
+
);
|
|
78
139
|
exports.SelectContent = SelectContent;
|
|
79
140
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
80
|
-
const SelectLabel = React.forwardRef(({ className, ...props }, ref) => (
|
|
141
|
+
const SelectLabel = React.forwardRef(({ className, ...props }, ref) => (
|
|
142
|
+
<SelectPrimitive.Label
|
|
143
|
+
ref={ref}
|
|
144
|
+
className={(0, utils_1.cn)('py-1.5 pl-8 pr-2 text-sm font-semibold', className)}
|
|
145
|
+
{...props}
|
|
146
|
+
/>
|
|
147
|
+
));
|
|
81
148
|
exports.SelectLabel = SelectLabel;
|
|
82
149
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
83
|
-
const SelectItem = React.forwardRef(({ className, children, ...props }, ref) => (
|
|
150
|
+
const SelectItem = React.forwardRef(({ className, children, ...props }, ref) => (
|
|
151
|
+
<SelectPrimitive.Item
|
|
152
|
+
ref={ref}
|
|
153
|
+
className={(0, utils_1.cn)(
|
|
154
|
+
'relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
|
155
|
+
className,
|
|
156
|
+
)}
|
|
157
|
+
{...props}
|
|
158
|
+
>
|
|
84
159
|
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
85
160
|
<SelectPrimitive.ItemIndicator>
|
|
86
|
-
<lucide_react_1.Check className="h-4 w-4"/>
|
|
161
|
+
<lucide_react_1.Check className="h-4 w-4" />
|
|
87
162
|
</SelectPrimitive.ItemIndicator>
|
|
88
163
|
</span>
|
|
89
164
|
|
|
90
165
|
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
91
|
-
</SelectPrimitive.Item>
|
|
166
|
+
</SelectPrimitive.Item>
|
|
167
|
+
));
|
|
92
168
|
exports.SelectItem = SelectItem;
|
|
93
169
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
94
|
-
const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => (
|
|
170
|
+
const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => (
|
|
171
|
+
<SelectPrimitive.Separator
|
|
172
|
+
ref={ref}
|
|
173
|
+
className={(0, utils_1.cn)('-mx-1 my-1 h-px bg-muted', className)}
|
|
174
|
+
{...props}
|
|
175
|
+
/>
|
|
176
|
+
));
|
|
95
177
|
exports.SelectSeparator = SelectSeparator;
|
|
96
178
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
declare const Textarea: React.ForwardRefExoticComponent<
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
declare const Textarea: React.ForwardRefExoticComponent<
|
|
3
|
+
Omit<
|
|
4
|
+
React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>,
|
|
5
|
+
'ref'
|
|
6
|
+
> &
|
|
7
|
+
React.RefAttributes<HTMLTextAreaElement>
|
|
8
|
+
>;
|
|
3
9
|
export { Textarea };
|
|
@@ -1,43 +1,65 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
var __createBinding =
|
|
2
|
+
(this && this.__createBinding) ||
|
|
3
|
+
(Object.create
|
|
4
|
+
? (o, m, k, k2) => {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ('get' in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: () => m[k] };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}
|
|
12
|
+
: (o, m, k, k2) => {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
});
|
|
16
|
+
var __setModuleDefault =
|
|
17
|
+
(this && this.__setModuleDefault) ||
|
|
18
|
+
(Object.create
|
|
19
|
+
? (o, v) => {
|
|
20
|
+
Object.defineProperty(o, 'default', { enumerable: true, value: v });
|
|
21
|
+
}
|
|
22
|
+
: (o, v) => {
|
|
23
|
+
o['default'] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar =
|
|
26
|
+
(this && this.__importStar) ||
|
|
27
|
+
(() => {
|
|
28
|
+
var ownKeys = (o) => {
|
|
29
|
+
ownKeys =
|
|
30
|
+
Object.getOwnPropertyNames ||
|
|
31
|
+
((o) => {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
});
|
|
36
|
+
return ownKeys(o);
|
|
26
37
|
};
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
38
|
+
return (mod) => {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null)
|
|
42
|
+
for (var k = ownKeys(mod), i = 0; i < k.length; i++)
|
|
43
|
+
if (k[i] !== 'default') __createBinding(result, mod, k[i]);
|
|
44
|
+
__setModuleDefault(result, mod);
|
|
45
|
+
return result;
|
|
33
46
|
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports,
|
|
47
|
+
})();
|
|
48
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
36
49
|
exports.Textarea = void 0;
|
|
37
|
-
const React = __importStar(require(
|
|
38
|
-
const utils_1 = require(
|
|
50
|
+
const React = __importStar(require('react'));
|
|
51
|
+
const utils_1 = require('../../lib/utils');
|
|
39
52
|
const Textarea = React.forwardRef(({ className, ...props }, ref) => {
|
|
40
|
-
|
|
53
|
+
return (
|
|
54
|
+
<textarea
|
|
55
|
+
className={(0, utils_1.cn)(
|
|
56
|
+
'flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
|
|
57
|
+
className,
|
|
58
|
+
)}
|
|
59
|
+
ref={ref}
|
|
60
|
+
{...props}
|
|
61
|
+
/>
|
|
62
|
+
);
|
|
41
63
|
});
|
|
42
64
|
exports.Textarea = Textarea;
|
|
43
|
-
Textarea.displayName =
|
|
65
|
+
Textarea.displayName = 'Textarea';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ForgotPasswordApiResponse } from '../../app/api/auth/forgot-password/route';
|
|
2
2
|
import type { LoginApiResponse } from '../../app/api/auth/login/route';
|
|
3
|
+
import type { PasswordResetApiResponse } from '../../app/api/auth/reset-password/route';
|
|
3
4
|
import type { SignupApiResponse } from '../../app/api/auth/signup/route';
|
|
4
5
|
import type { VerifyEmailApiResponse } from '../../app/api/auth/verify-email/route';
|
|
5
|
-
import type {
|
|
6
|
-
import type { ForgotPasswordApiResponse } from '../../app/api/auth/forgot-password/route';
|
|
6
|
+
import type { LoginValues, PasswordResetValues, SignupValues } from '../../lib/schemas/auth';
|
|
7
7
|
export declare class AuthApi {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
private baseUrl;
|
|
9
|
+
constructor(baseUrl?: string);
|
|
10
|
+
login(data: LoginValues): Promise<LoginApiResponse>;
|
|
11
|
+
signup(data: SignupValues): Promise<SignupApiResponse>;
|
|
12
|
+
requestPasswordReset(email: string): Promise<ForgotPasswordApiResponse>;
|
|
13
|
+
resetPassword(data: PasswordResetValues): Promise<PasswordResetApiResponse>;
|
|
14
|
+
verifyEmail(token: string): Promise<VerifyEmailApiResponse>;
|
|
15
15
|
}
|
|
16
16
|
export declare const authApi: AuthApi;
|
|
@@ -1,60 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
2
|
exports.authApi = exports.AuthApi = void 0;
|
|
4
3
|
class AuthApi {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
4
|
+
constructor(baseUrl = '/api/auth') {
|
|
5
|
+
this.baseUrl = baseUrl;
|
|
6
|
+
}
|
|
7
|
+
async login(data) {
|
|
8
|
+
const response = await fetch(`${this.baseUrl}/login`, {
|
|
9
|
+
method: 'POST',
|
|
10
|
+
headers: {
|
|
11
|
+
'Content-Type': 'application/json',
|
|
12
|
+
},
|
|
13
|
+
body: JSON.stringify(data),
|
|
14
|
+
});
|
|
15
|
+
return response.json();
|
|
16
|
+
}
|
|
17
|
+
async signup(data) {
|
|
18
|
+
const response = await fetch(`${this.baseUrl}/signup`, {
|
|
19
|
+
method: 'POST',
|
|
20
|
+
headers: {
|
|
21
|
+
'Content-Type': 'application/json',
|
|
22
|
+
},
|
|
23
|
+
body: JSON.stringify(data),
|
|
24
|
+
});
|
|
25
|
+
return response.json();
|
|
26
|
+
}
|
|
27
|
+
async requestPasswordReset(email) {
|
|
28
|
+
const response = await fetch(`${this.baseUrl}/forgot-password`, {
|
|
29
|
+
method: 'POST',
|
|
30
|
+
headers: {
|
|
31
|
+
'Content-Type': 'application/json',
|
|
32
|
+
},
|
|
33
|
+
body: JSON.stringify({ email }),
|
|
34
|
+
});
|
|
35
|
+
return response.json();
|
|
36
|
+
}
|
|
37
|
+
async resetPassword(data) {
|
|
38
|
+
const response = await fetch(`${this.baseUrl}/reset-password`, {
|
|
39
|
+
method: 'POST',
|
|
40
|
+
headers: {
|
|
41
|
+
'Content-Type': 'application/json',
|
|
42
|
+
},
|
|
43
|
+
body: JSON.stringify(data),
|
|
44
|
+
});
|
|
45
|
+
return response.json();
|
|
46
|
+
}
|
|
47
|
+
async verifyEmail(token) {
|
|
48
|
+
const response = await fetch(`${this.baseUrl}/verify-email`, {
|
|
49
|
+
method: 'POST',
|
|
50
|
+
headers: {
|
|
51
|
+
'Content-Type': 'application/json',
|
|
52
|
+
},
|
|
53
|
+
body: JSON.stringify({ token }),
|
|
54
|
+
});
|
|
55
|
+
return response.json();
|
|
56
|
+
}
|
|
58
57
|
}
|
|
59
58
|
exports.AuthApi = AuthApi;
|
|
60
59
|
exports.authApi = new AuthApi();
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
type SuccessGenericApiResponse = {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
success: true;
|
|
3
|
+
message: string;
|
|
4
4
|
};
|
|
5
5
|
type SuccessDataApiResponse<SuccessSchema> = {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
success: true;
|
|
7
|
+
data: SuccessSchema;
|
|
8
8
|
};
|
|
9
9
|
type GenericErrorApiResponse = {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
success: false;
|
|
11
|
+
error: string;
|
|
12
12
|
};
|
|
13
13
|
type ValidationErrorApiResponse<ValidationErrorSchema> = {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
success: false;
|
|
15
|
+
error?: string;
|
|
16
|
+
details: ValidationErrorSchema;
|
|
17
17
|
};
|
|
18
|
-
export type WriteApiResponse<SuccessSchema = {}, ValidationErrorSchema = {}> =
|
|
19
|
-
|
|
18
|
+
export type WriteApiResponse<SuccessSchema = {}, ValidationErrorSchema = {}> =
|
|
19
|
+
| SuccessGenericApiResponse
|
|
20
|
+
| SuccessDataApiResponse<SuccessSchema>
|
|
21
|
+
| GenericErrorApiResponse
|
|
22
|
+
| ValidationErrorApiResponse<ValidationErrorSchema>;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Winston from 'winston';
|
|
1
|
+
import type Winston from 'winston';
|
|
2
2
|
export declare const loggerOptions: {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
format: Winston.Logform.Format;
|
|
4
|
+
transports: Winston.transports.ConsoleTransportInstance[];
|
|
5
5
|
};
|
|
6
6
|
export declare const logger: Winston.Logger;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
var __importDefault =
|
|
2
|
+
(this && this.__importDefault) || ((mod) => (mod && mod.__esModule ? mod : { default: mod }));
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
6
4
|
exports.logger = exports.loggerOptions = void 0;
|
|
7
|
-
const winston_1 = __importDefault(require(
|
|
5
|
+
const winston_1 = __importDefault(require('winston'));
|
|
8
6
|
exports.loggerOptions = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
format: winston_1.default.format.combine(
|
|
8
|
+
winston_1.default.format.timestamp(),
|
|
9
|
+
winston_1.default.format.json(),
|
|
10
|
+
),
|
|
11
|
+
transports: [new winston_1.default.transports.Console()],
|
|
13
12
|
};
|
|
14
13
|
exports.logger = winston_1.default.createLogger(exports.loggerOptions);
|