notifkit 0.1.7 → 0.1.8
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/dashboard/README.md +29 -0
- package/dashboard/dist/assets/index-7mvXb4bS.js +310 -0
- package/dashboard/dist/assets/index-o7L-f3-c.css +1 -0
- package/dashboard/dist/favicon.svg +4 -0
- package/dashboard/dist/index.html +14 -0
- package/dist/index.d.mts +433 -8
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{main-D6SG3Isk.mjs → main-0FHNtN5g.mjs} +2 -2
- package/dist/{main-D6SG3Isk.mjs.map → main-0FHNtN5g.mjs.map} +1 -1
- package/dist/{main-pFAfCkVX.mjs → main-7KMlWnDx.mjs} +2 -2
- package/dist/{main-pFAfCkVX.mjs.map → main-7KMlWnDx.mjs.map} +1 -1
- package/dist/{main-Bgi2wWck.mjs → main-B0BcY_JJ.mjs} +2 -2
- package/dist/{main-Bgi2wWck.mjs.map → main-B0BcY_JJ.mjs.map} +1 -1
- package/dist/{main-CFSukWm8.mjs → main-BAO4kKce.mjs} +366 -26
- package/dist/main-BAO4kKce.mjs.map +1 -0
- package/dist/{main-CRPxM-O3.mjs → main-BjXgGJBd.mjs} +2 -2
- package/dist/{main-CRPxM-O3.mjs.map → main-BjXgGJBd.mjs.map} +1 -1
- package/dist/{main-CjbVdUqa.mjs → main-BtXITy0k.mjs} +2 -2
- package/dist/{main-CjbVdUqa.mjs.map → main-BtXITy0k.mjs.map} +1 -1
- package/dist/{main-Yorxzw0Z.mjs → main-BxqAXTr6.mjs} +2 -2
- package/dist/{main-Yorxzw0Z.mjs.map → main-BxqAXTr6.mjs.map} +1 -1
- package/dist/{main-DFMHcN_d.mjs → main-zCpvA9Rx.mjs} +2 -2
- package/dist/{main-DFMHcN_d.mjs.map → main-zCpvA9Rx.mjs.map} +1 -1
- package/dist/{src-CPMwsUCJ.mjs → src-DkvHYM3y.mjs} +76 -19
- package/dist/src-DkvHYM3y.mjs.map +1 -0
- package/drizzle/0005_admin_users.sql +11 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +8 -3
- package/scripts/create-admin.mjs +67 -0
- package/src/config/index.ts +3 -0
- package/src/db/schema.ts +13 -0
- package/src/repositories/index.ts +82 -1
- package/src/services/api/admin-static.ts +224 -0
- package/src/services/api/handlers.ts +129 -12
- package/src/services/api/main.ts +72 -19
- package/src/services/auth/index.ts +103 -0
- package/dist/main-CFSukWm8.mjs.map +0 -1
- package/dist/src-CPMwsUCJ.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -17,6 +17,9 @@ declare const baseConfigSchema: z.ZodObject<{
|
|
|
17
17
|
REDIS_URL: z.ZodDefault<z.ZodString>;
|
|
18
18
|
DATABASE_URL: z.ZodDefault<z.ZodString>;
|
|
19
19
|
ADMIN_API_KEY: z.ZodOptional<z.ZodString>;
|
|
20
|
+
ADMIN_EMAIL: z.ZodOptional<z.ZodString>;
|
|
21
|
+
ADMIN_PASSWORD: z.ZodOptional<z.ZodString>;
|
|
22
|
+
ADMIN_USERNAME: z.ZodOptional<z.ZodString>;
|
|
20
23
|
WORKER_CONCURRENCY: z.ZodDefault<z.ZodNumber>;
|
|
21
24
|
QUEUE_MAX_LEN: z.ZodDefault<z.ZodNumber>;
|
|
22
25
|
DB_MAX_CONNECTIONS: z.ZodDefault<z.ZodNumber>;
|
|
@@ -50,6 +53,9 @@ declare const baseConfigSchema: z.ZodObject<{
|
|
|
50
53
|
LOG_BUFFER_MAX_SIZE: number;
|
|
51
54
|
SEGMENT_MAX_USERS: number;
|
|
52
55
|
ADMIN_API_KEY?: string | undefined;
|
|
56
|
+
ADMIN_EMAIL?: string | undefined;
|
|
57
|
+
ADMIN_PASSWORD?: string | undefined;
|
|
58
|
+
ADMIN_USERNAME?: string | undefined;
|
|
53
59
|
PUBLIC_URL?: string | undefined;
|
|
54
60
|
UNSUBSCRIBE_SECRET?: string | undefined;
|
|
55
61
|
}, {
|
|
@@ -60,6 +66,9 @@ declare const baseConfigSchema: z.ZodObject<{
|
|
|
60
66
|
REDIS_URL?: string | undefined;
|
|
61
67
|
DATABASE_URL?: string | undefined;
|
|
62
68
|
ADMIN_API_KEY?: string | undefined;
|
|
69
|
+
ADMIN_EMAIL?: string | undefined;
|
|
70
|
+
ADMIN_PASSWORD?: string | undefined;
|
|
71
|
+
ADMIN_USERNAME?: string | undefined;
|
|
63
72
|
WORKER_CONCURRENCY?: number | undefined;
|
|
64
73
|
QUEUE_MAX_LEN?: number | undefined;
|
|
65
74
|
DB_MAX_CONNECTIONS?: number | undefined;
|
|
@@ -462,6 +471,7 @@ declare const NotificationEnrichedPayloadSchema: z.ZodObject<{
|
|
|
462
471
|
priority: "low" | "normal" | "high" | "critical";
|
|
463
472
|
projectId: string;
|
|
464
473
|
recipientId: string;
|
|
474
|
+
rawEventId: string;
|
|
465
475
|
templateVariables: Record<string, unknown>;
|
|
466
476
|
recipient: {
|
|
467
477
|
preferences: {
|
|
@@ -484,7 +494,6 @@ declare const NotificationEnrichedPayloadSchema: z.ZodObject<{
|
|
|
484
494
|
pushToken?: string | undefined;
|
|
485
495
|
pushTokens?: string[] | undefined;
|
|
486
496
|
};
|
|
487
|
-
rawEventId: string;
|
|
488
497
|
aiPrompts?: Record<string, string> | undefined;
|
|
489
498
|
templateId?: string | undefined;
|
|
490
499
|
campaignId?: string | undefined;
|
|
@@ -495,6 +504,7 @@ declare const NotificationEnrichedPayloadSchema: z.ZodObject<{
|
|
|
495
504
|
priority: "low" | "normal" | "high" | "critical";
|
|
496
505
|
projectId: string;
|
|
497
506
|
recipientId: string;
|
|
507
|
+
rawEventId: string;
|
|
498
508
|
templateVariables: Record<string, unknown>;
|
|
499
509
|
recipient: {
|
|
500
510
|
preferences: {
|
|
@@ -517,7 +527,6 @@ declare const NotificationEnrichedPayloadSchema: z.ZodObject<{
|
|
|
517
527
|
pushTokens?: string[] | undefined;
|
|
518
528
|
locale?: string | undefined;
|
|
519
529
|
};
|
|
520
|
-
rawEventId: string;
|
|
521
530
|
aiPrompts?: Record<string, string> | undefined;
|
|
522
531
|
templateId?: string | undefined;
|
|
523
532
|
campaignId?: string | undefined;
|
|
@@ -735,9 +744,9 @@ declare const NotificationDispatchedPayloadSchema: z.ZodObject<{
|
|
|
735
744
|
priority: "low" | "normal" | "high" | "critical";
|
|
736
745
|
projectId: string;
|
|
737
746
|
taskId: string;
|
|
738
|
-
enrichedEventId: string;
|
|
739
747
|
recipientId: string;
|
|
740
748
|
templateVariables: Record<string, unknown>;
|
|
749
|
+
enrichedEventId: string;
|
|
741
750
|
renderedContent: {
|
|
742
751
|
content: Record<string, unknown>;
|
|
743
752
|
attachments?: {
|
|
@@ -783,8 +792,8 @@ declare const NotificationDispatchedPayloadSchema: z.ZodObject<{
|
|
|
783
792
|
priority: "low" | "normal" | "high" | "critical";
|
|
784
793
|
projectId: string;
|
|
785
794
|
taskId: string;
|
|
786
|
-
enrichedEventId: string;
|
|
787
795
|
recipientId: string;
|
|
796
|
+
enrichedEventId: string;
|
|
788
797
|
renderedContent: {
|
|
789
798
|
content: Record<string, unknown>;
|
|
790
799
|
attachments?: {
|
|
@@ -1041,7 +1050,6 @@ declare const NotificationAiPendingPayloadSchema: z.ZodObject<{
|
|
|
1041
1050
|
priority: "low" | "normal" | "high" | "critical";
|
|
1042
1051
|
aiPrompts: Record<string, string>;
|
|
1043
1052
|
projectId: string;
|
|
1044
|
-
enrichedEventId: string;
|
|
1045
1053
|
recipientId: string;
|
|
1046
1054
|
templateVariables: Record<string, unknown>;
|
|
1047
1055
|
recipient: {
|
|
@@ -1065,6 +1073,7 @@ declare const NotificationAiPendingPayloadSchema: z.ZodObject<{
|
|
|
1065
1073
|
pushToken?: string | undefined;
|
|
1066
1074
|
pushTokens?: string[] | undefined;
|
|
1067
1075
|
};
|
|
1076
|
+
enrichedEventId: string;
|
|
1068
1077
|
templateId?: string | undefined;
|
|
1069
1078
|
scheduledAt?: string | undefined;
|
|
1070
1079
|
fallbackChain?: ("push" | "email" | "sms" | "webhook" | "in-app" | "telegram" | "discord" | "whatsapp" | "slack")[] | undefined;
|
|
@@ -1073,7 +1082,6 @@ declare const NotificationAiPendingPayloadSchema: z.ZodObject<{
|
|
|
1073
1082
|
priority: "low" | "normal" | "high" | "critical";
|
|
1074
1083
|
aiPrompts: Record<string, string>;
|
|
1075
1084
|
projectId: string;
|
|
1076
|
-
enrichedEventId: string;
|
|
1077
1085
|
recipientId: string;
|
|
1078
1086
|
templateVariables: Record<string, unknown>;
|
|
1079
1087
|
recipient: {
|
|
@@ -1097,6 +1105,7 @@ declare const NotificationAiPendingPayloadSchema: z.ZodObject<{
|
|
|
1097
1105
|
pushTokens?: string[] | undefined;
|
|
1098
1106
|
locale?: string | undefined;
|
|
1099
1107
|
};
|
|
1108
|
+
enrichedEventId: string;
|
|
1100
1109
|
templateId?: string | undefined;
|
|
1101
1110
|
scheduledAt?: string | undefined;
|
|
1102
1111
|
fallbackChain?: ("push" | "email" | "sms" | "webhook" | "in-app" | "telegram" | "discord" | "whatsapp" | "slack")[] | undefined;
|
|
@@ -6346,7 +6355,7 @@ interface DLQMessageRecord {
|
|
|
6346
6355
|
timestamp: string;
|
|
6347
6356
|
}
|
|
6348
6357
|
declare namespace schema_d_exports {
|
|
6349
|
-
export { apiKeyRoleEnum, channelEnum, contactTopicPreferences, deliveryOutbox, insertDeliveryOutboxSchema, insertMessageLogSchema, insertProjectApiKeySchema, insertProjectSchema, insertScheduledPayloadSchema, insertSuppressionSchema, insertUserChannelPreferenceSchema, insertUserContactSchema, insertUserSchema, insertUserSegmentSchema, insertUserTopicPreferenceSchema, insertWorkflowInstanceSchema, insertWorkflowStepSchema, insertWorkflowWaiterSchema, messageLogs, projectApiKeys, projects, quietHours, scheduledPayloads, selectDeliveryOutboxSchema, selectMessageLogSchema, selectProjectApiKeySchema, selectProjectSchema, selectScheduledPayloadSchema, selectSuppressionSchema, selectUserChannelPreferenceSchema, selectUserContactSchema, selectUserSchema, selectUserSegmentSchema, selectUserTopicPreferenceSchema, selectWorkflowInstanceSchema, selectWorkflowStepSchema, selectWorkflowWaiterSchema, suppressions, templates, userChannelPreferences, userContacts, userSegments, userTopicPreferences, users, workflowDefinitions, workflowInstances, workflowStatusEnum, workflowSteps, workflowWaiters };
|
|
6358
|
+
export { adminUsers, apiKeyRoleEnum, channelEnum, contactTopicPreferences, deliveryOutbox, insertAdminUserSchema, insertDeliveryOutboxSchema, insertMessageLogSchema, insertProjectApiKeySchema, insertProjectSchema, insertScheduledPayloadSchema, insertSuppressionSchema, insertUserChannelPreferenceSchema, insertUserContactSchema, insertUserSchema, insertUserSegmentSchema, insertUserTopicPreferenceSchema, insertWorkflowInstanceSchema, insertWorkflowStepSchema, insertWorkflowWaiterSchema, messageLogs, projectApiKeys, projects, quietHours, scheduledPayloads, selectAdminUserSchema, selectDeliveryOutboxSchema, selectMessageLogSchema, selectProjectApiKeySchema, selectProjectSchema, selectScheduledPayloadSchema, selectSuppressionSchema, selectUserChannelPreferenceSchema, selectUserContactSchema, selectUserSchema, selectUserSegmentSchema, selectUserTopicPreferenceSchema, selectWorkflowInstanceSchema, selectWorkflowStepSchema, selectWorkflowWaiterSchema, suppressions, templates, userChannelPreferences, userContacts, userSegments, userTopicPreferences, users, workflowDefinitions, workflowInstances, workflowStatusEnum, workflowSteps, workflowWaiters };
|
|
6350
6359
|
}
|
|
6351
6360
|
declare const channelEnum: import("drizzle-orm/pg-core").PgEnum<["email", "sms", "push", "webhook", "in-app", "telegram", "discord", "whatsapp", "slack"]>;
|
|
6352
6361
|
declare const projects: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
@@ -8379,6 +8388,398 @@ declare const scheduledPayloads: import("drizzle-orm/pg-core").PgTableWithColumn
|
|
|
8379
8388
|
};
|
|
8380
8389
|
dialect: "pg";
|
|
8381
8390
|
}>;
|
|
8391
|
+
declare const adminUsers: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
8392
|
+
name: "admin_users";
|
|
8393
|
+
schema: undefined;
|
|
8394
|
+
columns: {
|
|
8395
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
8396
|
+
name: "id";
|
|
8397
|
+
tableName: "admin_users";
|
|
8398
|
+
dataType: "string";
|
|
8399
|
+
columnType: "PgUUID";
|
|
8400
|
+
data: string;
|
|
8401
|
+
driverParam: string;
|
|
8402
|
+
notNull: true;
|
|
8403
|
+
hasDefault: true;
|
|
8404
|
+
isPrimaryKey: true;
|
|
8405
|
+
isAutoincrement: false;
|
|
8406
|
+
hasRuntimeDefault: false;
|
|
8407
|
+
enumValues: undefined;
|
|
8408
|
+
baseColumn: never;
|
|
8409
|
+
identity: undefined;
|
|
8410
|
+
generated: undefined;
|
|
8411
|
+
}, {}, {}>;
|
|
8412
|
+
email: import("drizzle-orm/pg-core").PgColumn<{
|
|
8413
|
+
name: "email";
|
|
8414
|
+
tableName: "admin_users";
|
|
8415
|
+
dataType: "string";
|
|
8416
|
+
columnType: "PgVarchar";
|
|
8417
|
+
data: string;
|
|
8418
|
+
driverParam: string;
|
|
8419
|
+
notNull: true;
|
|
8420
|
+
hasDefault: false;
|
|
8421
|
+
isPrimaryKey: false;
|
|
8422
|
+
isAutoincrement: false;
|
|
8423
|
+
hasRuntimeDefault: false;
|
|
8424
|
+
enumValues: [string, ...string[]];
|
|
8425
|
+
baseColumn: never;
|
|
8426
|
+
identity: undefined;
|
|
8427
|
+
generated: undefined;
|
|
8428
|
+
}, {}, {
|
|
8429
|
+
length: number | undefined;
|
|
8430
|
+
}>;
|
|
8431
|
+
username: import("drizzle-orm/pg-core").PgColumn<{
|
|
8432
|
+
name: "username";
|
|
8433
|
+
tableName: "admin_users";
|
|
8434
|
+
dataType: "string";
|
|
8435
|
+
columnType: "PgVarchar";
|
|
8436
|
+
data: string;
|
|
8437
|
+
driverParam: string;
|
|
8438
|
+
notNull: false;
|
|
8439
|
+
hasDefault: false;
|
|
8440
|
+
isPrimaryKey: false;
|
|
8441
|
+
isAutoincrement: false;
|
|
8442
|
+
hasRuntimeDefault: false;
|
|
8443
|
+
enumValues: [string, ...string[]];
|
|
8444
|
+
baseColumn: never;
|
|
8445
|
+
identity: undefined;
|
|
8446
|
+
generated: undefined;
|
|
8447
|
+
}, {}, {
|
|
8448
|
+
length: number | undefined;
|
|
8449
|
+
}>;
|
|
8450
|
+
passwordHash: import("drizzle-orm/pg-core").PgColumn<{
|
|
8451
|
+
name: "password_hash";
|
|
8452
|
+
tableName: "admin_users";
|
|
8453
|
+
dataType: "string";
|
|
8454
|
+
columnType: "PgVarchar";
|
|
8455
|
+
data: string;
|
|
8456
|
+
driverParam: string;
|
|
8457
|
+
notNull: true;
|
|
8458
|
+
hasDefault: false;
|
|
8459
|
+
isPrimaryKey: false;
|
|
8460
|
+
isAutoincrement: false;
|
|
8461
|
+
hasRuntimeDefault: false;
|
|
8462
|
+
enumValues: [string, ...string[]];
|
|
8463
|
+
baseColumn: never;
|
|
8464
|
+
identity: undefined;
|
|
8465
|
+
generated: undefined;
|
|
8466
|
+
}, {}, {
|
|
8467
|
+
length: number | undefined;
|
|
8468
|
+
}>;
|
|
8469
|
+
role: import("drizzle-orm/pg-core").PgColumn<{
|
|
8470
|
+
name: "role";
|
|
8471
|
+
tableName: "admin_users";
|
|
8472
|
+
dataType: "string";
|
|
8473
|
+
columnType: "PgVarchar";
|
|
8474
|
+
data: string;
|
|
8475
|
+
driverParam: string;
|
|
8476
|
+
notNull: true;
|
|
8477
|
+
hasDefault: true;
|
|
8478
|
+
isPrimaryKey: false;
|
|
8479
|
+
isAutoincrement: false;
|
|
8480
|
+
hasRuntimeDefault: false;
|
|
8481
|
+
enumValues: [string, ...string[]];
|
|
8482
|
+
baseColumn: never;
|
|
8483
|
+
identity: undefined;
|
|
8484
|
+
generated: undefined;
|
|
8485
|
+
}, {}, {
|
|
8486
|
+
length: number | undefined;
|
|
8487
|
+
}>;
|
|
8488
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
8489
|
+
name: "created_at";
|
|
8490
|
+
tableName: "admin_users";
|
|
8491
|
+
dataType: "date";
|
|
8492
|
+
columnType: "PgTimestamp";
|
|
8493
|
+
data: Date;
|
|
8494
|
+
driverParam: string;
|
|
8495
|
+
notNull: true;
|
|
8496
|
+
hasDefault: true;
|
|
8497
|
+
isPrimaryKey: false;
|
|
8498
|
+
isAutoincrement: false;
|
|
8499
|
+
hasRuntimeDefault: false;
|
|
8500
|
+
enumValues: undefined;
|
|
8501
|
+
baseColumn: never;
|
|
8502
|
+
identity: undefined;
|
|
8503
|
+
generated: undefined;
|
|
8504
|
+
}, {}, {}>;
|
|
8505
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
8506
|
+
name: "updated_at";
|
|
8507
|
+
tableName: "admin_users";
|
|
8508
|
+
dataType: "date";
|
|
8509
|
+
columnType: "PgTimestamp";
|
|
8510
|
+
data: Date;
|
|
8511
|
+
driverParam: string;
|
|
8512
|
+
notNull: true;
|
|
8513
|
+
hasDefault: true;
|
|
8514
|
+
isPrimaryKey: false;
|
|
8515
|
+
isAutoincrement: false;
|
|
8516
|
+
hasRuntimeDefault: false;
|
|
8517
|
+
enumValues: undefined;
|
|
8518
|
+
baseColumn: never;
|
|
8519
|
+
identity: undefined;
|
|
8520
|
+
generated: undefined;
|
|
8521
|
+
}, {}, {}>;
|
|
8522
|
+
};
|
|
8523
|
+
dialect: "pg";
|
|
8524
|
+
}>;
|
|
8525
|
+
declare const insertAdminUserSchema: import("drizzle-zod").BuildSchema<"insert", {
|
|
8526
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
8527
|
+
name: "id";
|
|
8528
|
+
tableName: "admin_users";
|
|
8529
|
+
dataType: "string";
|
|
8530
|
+
columnType: "PgUUID";
|
|
8531
|
+
data: string;
|
|
8532
|
+
driverParam: string;
|
|
8533
|
+
notNull: true;
|
|
8534
|
+
hasDefault: true;
|
|
8535
|
+
isPrimaryKey: true;
|
|
8536
|
+
isAutoincrement: false;
|
|
8537
|
+
hasRuntimeDefault: false;
|
|
8538
|
+
enumValues: undefined;
|
|
8539
|
+
baseColumn: never;
|
|
8540
|
+
identity: undefined;
|
|
8541
|
+
generated: undefined;
|
|
8542
|
+
}, {}, {}>;
|
|
8543
|
+
email: import("drizzle-orm/pg-core").PgColumn<{
|
|
8544
|
+
name: "email";
|
|
8545
|
+
tableName: "admin_users";
|
|
8546
|
+
dataType: "string";
|
|
8547
|
+
columnType: "PgVarchar";
|
|
8548
|
+
data: string;
|
|
8549
|
+
driverParam: string;
|
|
8550
|
+
notNull: true;
|
|
8551
|
+
hasDefault: false;
|
|
8552
|
+
isPrimaryKey: false;
|
|
8553
|
+
isAutoincrement: false;
|
|
8554
|
+
hasRuntimeDefault: false;
|
|
8555
|
+
enumValues: [string, ...string[]];
|
|
8556
|
+
baseColumn: never;
|
|
8557
|
+
identity: undefined;
|
|
8558
|
+
generated: undefined;
|
|
8559
|
+
}, {}, {
|
|
8560
|
+
length: number | undefined;
|
|
8561
|
+
}>;
|
|
8562
|
+
username: import("drizzle-orm/pg-core").PgColumn<{
|
|
8563
|
+
name: "username";
|
|
8564
|
+
tableName: "admin_users";
|
|
8565
|
+
dataType: "string";
|
|
8566
|
+
columnType: "PgVarchar";
|
|
8567
|
+
data: string;
|
|
8568
|
+
driverParam: string;
|
|
8569
|
+
notNull: false;
|
|
8570
|
+
hasDefault: false;
|
|
8571
|
+
isPrimaryKey: false;
|
|
8572
|
+
isAutoincrement: false;
|
|
8573
|
+
hasRuntimeDefault: false;
|
|
8574
|
+
enumValues: [string, ...string[]];
|
|
8575
|
+
baseColumn: never;
|
|
8576
|
+
identity: undefined;
|
|
8577
|
+
generated: undefined;
|
|
8578
|
+
}, {}, {
|
|
8579
|
+
length: number | undefined;
|
|
8580
|
+
}>;
|
|
8581
|
+
passwordHash: import("drizzle-orm/pg-core").PgColumn<{
|
|
8582
|
+
name: "password_hash";
|
|
8583
|
+
tableName: "admin_users";
|
|
8584
|
+
dataType: "string";
|
|
8585
|
+
columnType: "PgVarchar";
|
|
8586
|
+
data: string;
|
|
8587
|
+
driverParam: string;
|
|
8588
|
+
notNull: true;
|
|
8589
|
+
hasDefault: false;
|
|
8590
|
+
isPrimaryKey: false;
|
|
8591
|
+
isAutoincrement: false;
|
|
8592
|
+
hasRuntimeDefault: false;
|
|
8593
|
+
enumValues: [string, ...string[]];
|
|
8594
|
+
baseColumn: never;
|
|
8595
|
+
identity: undefined;
|
|
8596
|
+
generated: undefined;
|
|
8597
|
+
}, {}, {
|
|
8598
|
+
length: number | undefined;
|
|
8599
|
+
}>;
|
|
8600
|
+
role: import("drizzle-orm/pg-core").PgColumn<{
|
|
8601
|
+
name: "role";
|
|
8602
|
+
tableName: "admin_users";
|
|
8603
|
+
dataType: "string";
|
|
8604
|
+
columnType: "PgVarchar";
|
|
8605
|
+
data: string;
|
|
8606
|
+
driverParam: string;
|
|
8607
|
+
notNull: true;
|
|
8608
|
+
hasDefault: true;
|
|
8609
|
+
isPrimaryKey: false;
|
|
8610
|
+
isAutoincrement: false;
|
|
8611
|
+
hasRuntimeDefault: false;
|
|
8612
|
+
enumValues: [string, ...string[]];
|
|
8613
|
+
baseColumn: never;
|
|
8614
|
+
identity: undefined;
|
|
8615
|
+
generated: undefined;
|
|
8616
|
+
}, {}, {
|
|
8617
|
+
length: number | undefined;
|
|
8618
|
+
}>;
|
|
8619
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
8620
|
+
name: "created_at";
|
|
8621
|
+
tableName: "admin_users";
|
|
8622
|
+
dataType: "date";
|
|
8623
|
+
columnType: "PgTimestamp";
|
|
8624
|
+
data: Date;
|
|
8625
|
+
driverParam: string;
|
|
8626
|
+
notNull: true;
|
|
8627
|
+
hasDefault: true;
|
|
8628
|
+
isPrimaryKey: false;
|
|
8629
|
+
isAutoincrement: false;
|
|
8630
|
+
hasRuntimeDefault: false;
|
|
8631
|
+
enumValues: undefined;
|
|
8632
|
+
baseColumn: never;
|
|
8633
|
+
identity: undefined;
|
|
8634
|
+
generated: undefined;
|
|
8635
|
+
}, {}, {}>;
|
|
8636
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
8637
|
+
name: "updated_at";
|
|
8638
|
+
tableName: "admin_users";
|
|
8639
|
+
dataType: "date";
|
|
8640
|
+
columnType: "PgTimestamp";
|
|
8641
|
+
data: Date;
|
|
8642
|
+
driverParam: string;
|
|
8643
|
+
notNull: true;
|
|
8644
|
+
hasDefault: true;
|
|
8645
|
+
isPrimaryKey: false;
|
|
8646
|
+
isAutoincrement: false;
|
|
8647
|
+
hasRuntimeDefault: false;
|
|
8648
|
+
enumValues: undefined;
|
|
8649
|
+
baseColumn: never;
|
|
8650
|
+
identity: undefined;
|
|
8651
|
+
generated: undefined;
|
|
8652
|
+
}, {}, {}>;
|
|
8653
|
+
}, undefined, undefined>;
|
|
8654
|
+
declare const selectAdminUserSchema: import("drizzle-zod").BuildSchema<"select", {
|
|
8655
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
8656
|
+
name: "id";
|
|
8657
|
+
tableName: "admin_users";
|
|
8658
|
+
dataType: "string";
|
|
8659
|
+
columnType: "PgUUID";
|
|
8660
|
+
data: string;
|
|
8661
|
+
driverParam: string;
|
|
8662
|
+
notNull: true;
|
|
8663
|
+
hasDefault: true;
|
|
8664
|
+
isPrimaryKey: true;
|
|
8665
|
+
isAutoincrement: false;
|
|
8666
|
+
hasRuntimeDefault: false;
|
|
8667
|
+
enumValues: undefined;
|
|
8668
|
+
baseColumn: never;
|
|
8669
|
+
identity: undefined;
|
|
8670
|
+
generated: undefined;
|
|
8671
|
+
}, {}, {}>;
|
|
8672
|
+
email: import("drizzle-orm/pg-core").PgColumn<{
|
|
8673
|
+
name: "email";
|
|
8674
|
+
tableName: "admin_users";
|
|
8675
|
+
dataType: "string";
|
|
8676
|
+
columnType: "PgVarchar";
|
|
8677
|
+
data: string;
|
|
8678
|
+
driverParam: string;
|
|
8679
|
+
notNull: true;
|
|
8680
|
+
hasDefault: false;
|
|
8681
|
+
isPrimaryKey: false;
|
|
8682
|
+
isAutoincrement: false;
|
|
8683
|
+
hasRuntimeDefault: false;
|
|
8684
|
+
enumValues: [string, ...string[]];
|
|
8685
|
+
baseColumn: never;
|
|
8686
|
+
identity: undefined;
|
|
8687
|
+
generated: undefined;
|
|
8688
|
+
}, {}, {
|
|
8689
|
+
length: number | undefined;
|
|
8690
|
+
}>;
|
|
8691
|
+
username: import("drizzle-orm/pg-core").PgColumn<{
|
|
8692
|
+
name: "username";
|
|
8693
|
+
tableName: "admin_users";
|
|
8694
|
+
dataType: "string";
|
|
8695
|
+
columnType: "PgVarchar";
|
|
8696
|
+
data: string;
|
|
8697
|
+
driverParam: string;
|
|
8698
|
+
notNull: false;
|
|
8699
|
+
hasDefault: false;
|
|
8700
|
+
isPrimaryKey: false;
|
|
8701
|
+
isAutoincrement: false;
|
|
8702
|
+
hasRuntimeDefault: false;
|
|
8703
|
+
enumValues: [string, ...string[]];
|
|
8704
|
+
baseColumn: never;
|
|
8705
|
+
identity: undefined;
|
|
8706
|
+
generated: undefined;
|
|
8707
|
+
}, {}, {
|
|
8708
|
+
length: number | undefined;
|
|
8709
|
+
}>;
|
|
8710
|
+
passwordHash: import("drizzle-orm/pg-core").PgColumn<{
|
|
8711
|
+
name: "password_hash";
|
|
8712
|
+
tableName: "admin_users";
|
|
8713
|
+
dataType: "string";
|
|
8714
|
+
columnType: "PgVarchar";
|
|
8715
|
+
data: string;
|
|
8716
|
+
driverParam: string;
|
|
8717
|
+
notNull: true;
|
|
8718
|
+
hasDefault: false;
|
|
8719
|
+
isPrimaryKey: false;
|
|
8720
|
+
isAutoincrement: false;
|
|
8721
|
+
hasRuntimeDefault: false;
|
|
8722
|
+
enumValues: [string, ...string[]];
|
|
8723
|
+
baseColumn: never;
|
|
8724
|
+
identity: undefined;
|
|
8725
|
+
generated: undefined;
|
|
8726
|
+
}, {}, {
|
|
8727
|
+
length: number | undefined;
|
|
8728
|
+
}>;
|
|
8729
|
+
role: import("drizzle-orm/pg-core").PgColumn<{
|
|
8730
|
+
name: "role";
|
|
8731
|
+
tableName: "admin_users";
|
|
8732
|
+
dataType: "string";
|
|
8733
|
+
columnType: "PgVarchar";
|
|
8734
|
+
data: string;
|
|
8735
|
+
driverParam: string;
|
|
8736
|
+
notNull: true;
|
|
8737
|
+
hasDefault: true;
|
|
8738
|
+
isPrimaryKey: false;
|
|
8739
|
+
isAutoincrement: false;
|
|
8740
|
+
hasRuntimeDefault: false;
|
|
8741
|
+
enumValues: [string, ...string[]];
|
|
8742
|
+
baseColumn: never;
|
|
8743
|
+
identity: undefined;
|
|
8744
|
+
generated: undefined;
|
|
8745
|
+
}, {}, {
|
|
8746
|
+
length: number | undefined;
|
|
8747
|
+
}>;
|
|
8748
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
8749
|
+
name: "created_at";
|
|
8750
|
+
tableName: "admin_users";
|
|
8751
|
+
dataType: "date";
|
|
8752
|
+
columnType: "PgTimestamp";
|
|
8753
|
+
data: Date;
|
|
8754
|
+
driverParam: string;
|
|
8755
|
+
notNull: true;
|
|
8756
|
+
hasDefault: true;
|
|
8757
|
+
isPrimaryKey: false;
|
|
8758
|
+
isAutoincrement: false;
|
|
8759
|
+
hasRuntimeDefault: false;
|
|
8760
|
+
enumValues: undefined;
|
|
8761
|
+
baseColumn: never;
|
|
8762
|
+
identity: undefined;
|
|
8763
|
+
generated: undefined;
|
|
8764
|
+
}, {}, {}>;
|
|
8765
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
8766
|
+
name: "updated_at";
|
|
8767
|
+
tableName: "admin_users";
|
|
8768
|
+
dataType: "date";
|
|
8769
|
+
columnType: "PgTimestamp";
|
|
8770
|
+
data: Date;
|
|
8771
|
+
driverParam: string;
|
|
8772
|
+
notNull: true;
|
|
8773
|
+
hasDefault: true;
|
|
8774
|
+
isPrimaryKey: false;
|
|
8775
|
+
isAutoincrement: false;
|
|
8776
|
+
hasRuntimeDefault: false;
|
|
8777
|
+
enumValues: undefined;
|
|
8778
|
+
baseColumn: never;
|
|
8779
|
+
identity: undefined;
|
|
8780
|
+
generated: undefined;
|
|
8781
|
+
}, {}, {}>;
|
|
8782
|
+
}, undefined, undefined>;
|
|
8382
8783
|
declare const insertProjectSchema: import("drizzle-zod").BuildSchema<"insert", {
|
|
8383
8784
|
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
8384
8785
|
name: "id";
|
|
@@ -11847,6 +12248,30 @@ declare class SegmentRepository {
|
|
|
11847
12248
|
constructor(db: Db);
|
|
11848
12249
|
listSegments(projectId: string): Promise<string[]>;
|
|
11849
12250
|
}
|
|
12251
|
+
interface AdminUserRecord {
|
|
12252
|
+
id: string;
|
|
12253
|
+
email: string;
|
|
12254
|
+
username: string | null;
|
|
12255
|
+
passwordHash: string;
|
|
12256
|
+
role: string;
|
|
12257
|
+
createdAt: Date;
|
|
12258
|
+
updatedAt: Date;
|
|
12259
|
+
}
|
|
12260
|
+
declare class AdminUserRepository {
|
|
12261
|
+
private readonly db;
|
|
12262
|
+
constructor(db: Db);
|
|
12263
|
+
findByEmailOrUsername(identifier: string): Promise<AdminUserRecord | null>;
|
|
12264
|
+
findById(id: string): Promise<AdminUserRecord | null>;
|
|
12265
|
+
create(data: {
|
|
12266
|
+
email: string;
|
|
12267
|
+
username?: string | null;
|
|
12268
|
+
passwordHash: string;
|
|
12269
|
+
role?: string;
|
|
12270
|
+
}): Promise<AdminUserRecord>;
|
|
12271
|
+
updatePassword(id: string, passwordHash: string): Promise<boolean>;
|
|
12272
|
+
list(): Promise<Omit<AdminUserRecord, "passwordHash">[]>;
|
|
12273
|
+
count(): Promise<number>;
|
|
12274
|
+
}
|
|
11850
12275
|
//#endregion
|
|
11851
12276
|
//#region src/shared/events.d.ts
|
|
11852
12277
|
declare const globalEmitter: EventEmitter<[never]>;
|
|
@@ -12518,5 +12943,5 @@ declare class NotifkitServer extends EventEmitter {
|
|
|
12518
12943
|
stop(): Promise<void>;
|
|
12519
12944
|
}
|
|
12520
12945
|
//#endregion
|
|
12521
|
-
export { AI_DEFAULTS, AddContactInput, AddContactSchema, AddUserInput, AddUserSchema, AiConfig, AppError, AsyncSemaphore, BaseConfig, BaseWorker, BatchAddContactsInput, BatchAddContactsSchema, BatchItem, BatchProcessor, CONSUMER_GROUPS, CircuitBreaker, CircuitBreakerOptions, ConsumerGroup, ContactChannel, ContactChannelSchema, ContactRepository, CreateWorkflowInput, CreateWorkflowSchema, DLQMessageRecord, DataLoader, DatabaseClients, DatabaseOptions, Db, DeliveryOptions, DeliveryOptionsSchema, DeliveryResult, DevicePlatform, DeviceToken, ENRICHED_STREAMS, EscapeMode, EventEnvelope, EventEnvelopeSchema, EventMetadata, EventMetadataSchema, EventPayloadMap, EventRegistry, INBOUND_STREAMS, IdempotencyGuard, IdempotencyOptions, IngestEventInput, IngestEventSchema, InlineUser, InlineUserSchema, KnownEventType, LRUCache, LUA_RELEASE_LOCK, LUA_RENEW_LOCK, LUA_SCHEDULER_CLAIM, LUA_SCHEDULER_POLL, LogLevel, Logger, LoggerOptions, NonRetryableError, NotificationAiPendingPayload, NotificationAiPendingPayloadSchema, NotificationCanceledPayload, NotificationCanceledPayloadSchema, NotificationChannel, NotificationChannelSchema, NotificationCreatedPayload, NotificationCreatedPayloadSchema, NotificationDeliveredPayload, NotificationDeliveredPayloadSchema, NotificationDispatchedPayload, NotificationDispatchedPayloadSchema, NotificationEnrichedPayload, NotificationEnrichedPayloadSchema, NotificationFailedPayload, NotificationFailedPayloadSchema, NotificationLogRecord, NotificationPreference, NotificationPriority, NotificationPrioritySchema, NotificationRequestedPayload, NotificationRequestedPayloadSchema, NotificationScheduledPayload, NotificationScheduledPayloadSchema, NotificationSkippedPayload, NotificationSkippedPayloadSchema, NotificationStatus, NotificationStatusSchema, NotificationTarget, NotificationTargetSchema, NotifkitClient, NotifkitClientOptions, NotifkitOptions, NotifkitServer, NotifyRequestInput, NotifyRequestSchema, OUTBOUND_STREAMS, PUBSUB_CHANNELS, ParseResult, PendingEntry, PendingMessageScanner, PendingMessageScannerOptions, PreferenceRepository, Preferences, PreferencesSchema, ProjectKeyRecord, ProjectRecord, ProjectRepository, ProjectSettingsCache, ProjectSettingsCacheOptions, ProjectThrottleSettings, PubSubChannel, QuietHours, QuietHoursSchema, RateLimitConfig, RecipientProfile, RecipientProfileSchema, Redis, RedisClient, RedisClientOptions, type RedisOptions, RenderedContent, RenderedContentSchema, STREAMS, SegmentRepository, Sql, StreamConsumer, StreamConsumerOptions, StreamEvent, StreamEventMetadata, StreamEventMetadataSchema, StreamEventSchema, StreamMessage, StreamName, StreamProducer, StreamProducerOptions, SuppressionRecord, SuspendExecutionError, SyncTemplatesInput, SyncTemplatesSchema, SystemHealthRecord, SystemMetricsRecord, TemplateCache, TemplateContext, TemplateInput, TemplateRecord, TemplateRecordResponse, TemplateRenderer, TemplateRepository, TemplateSchema, ThrottleCheckOptions, ThrottleResult, Transport, TriggerWorkflowInput, TriggerWorkflowSchema, TypedEventEnvelope, UnsubscribeClaim, UnsubscribeHeaderOptions, UpdateProjectInput, UpdateProjectSchema, UpdateUserInput, UpdateUserSchema, UserContact, UserContactInput, UserContactInputSchema, UserContactResponse, UserDetailResponse, UserProfile, UserProfileResponse, UserRecord, UserRepository, UserResponse, UserThrottle, UserThrottleOptions, ValidationError, WebhookEvent, WorkerHealth, WorkerOptions, WorkerState, WorkflowContext, WorkflowDefinitionRecord, WorkflowEvent, WorkflowInstanceRecord, WorkflowNotifyInput, WorkflowNotifyPayloadSchema, WorkflowNotifyResult, WorkflowRepository, WorkflowStepContext, WorkflowStepDef, WorkflowStepSchema, baseConfigSchema, buildStepNotifyPayload, buildStreamEvent, buildUnsubscribeHeaders, childLogger, createDatabase, createLogger, escapeHeader, escapeHtml, generateId, getAiConfig, getMetricsRegistry, getPriorityBucket, globalEmitter, interpolate, loadEnv, metrics, normaliseTarget, parseConfig, readBaseConfig, registerTransport, registry, renderTemplate, renderWithTemplate, resolveStepTarget, runMigrations, setAiConfig, setGlobalConfig, signUnsubscribeToken, sleep, startHealthReporter, templateRegistry, transportRegistry, verifyUnsubscribeToken, withContext, withRequestId, workflow, workflowRegistry };
|
|
12946
|
+
export { AI_DEFAULTS, AddContactInput, AddContactSchema, AddUserInput, AddUserSchema, AdminUserRecord, AdminUserRepository, AiConfig, AppError, AsyncSemaphore, BaseConfig, BaseWorker, BatchAddContactsInput, BatchAddContactsSchema, BatchItem, BatchProcessor, CONSUMER_GROUPS, CircuitBreaker, CircuitBreakerOptions, ConsumerGroup, ContactChannel, ContactChannelSchema, ContactRepository, CreateWorkflowInput, CreateWorkflowSchema, DLQMessageRecord, DataLoader, DatabaseClients, DatabaseOptions, Db, DeliveryOptions, DeliveryOptionsSchema, DeliveryResult, DevicePlatform, DeviceToken, ENRICHED_STREAMS, EscapeMode, EventEnvelope, EventEnvelopeSchema, EventMetadata, EventMetadataSchema, EventPayloadMap, EventRegistry, INBOUND_STREAMS, IdempotencyGuard, IdempotencyOptions, IngestEventInput, IngestEventSchema, InlineUser, InlineUserSchema, KnownEventType, LRUCache, LUA_RELEASE_LOCK, LUA_RENEW_LOCK, LUA_SCHEDULER_CLAIM, LUA_SCHEDULER_POLL, LogLevel, Logger, LoggerOptions, NonRetryableError, NotificationAiPendingPayload, NotificationAiPendingPayloadSchema, NotificationCanceledPayload, NotificationCanceledPayloadSchema, NotificationChannel, NotificationChannelSchema, NotificationCreatedPayload, NotificationCreatedPayloadSchema, NotificationDeliveredPayload, NotificationDeliveredPayloadSchema, NotificationDispatchedPayload, NotificationDispatchedPayloadSchema, NotificationEnrichedPayload, NotificationEnrichedPayloadSchema, NotificationFailedPayload, NotificationFailedPayloadSchema, NotificationLogRecord, NotificationPreference, NotificationPriority, NotificationPrioritySchema, NotificationRequestedPayload, NotificationRequestedPayloadSchema, NotificationScheduledPayload, NotificationScheduledPayloadSchema, NotificationSkippedPayload, NotificationSkippedPayloadSchema, NotificationStatus, NotificationStatusSchema, NotificationTarget, NotificationTargetSchema, NotifkitClient, NotifkitClientOptions, NotifkitOptions, NotifkitServer, NotifyRequestInput, NotifyRequestSchema, OUTBOUND_STREAMS, PUBSUB_CHANNELS, ParseResult, PendingEntry, PendingMessageScanner, PendingMessageScannerOptions, PreferenceRepository, Preferences, PreferencesSchema, ProjectKeyRecord, ProjectRecord, ProjectRepository, ProjectSettingsCache, ProjectSettingsCacheOptions, ProjectThrottleSettings, PubSubChannel, QuietHours, QuietHoursSchema, RateLimitConfig, RecipientProfile, RecipientProfileSchema, Redis, RedisClient, RedisClientOptions, type RedisOptions, RenderedContent, RenderedContentSchema, STREAMS, SegmentRepository, Sql, StreamConsumer, StreamConsumerOptions, StreamEvent, StreamEventMetadata, StreamEventMetadataSchema, StreamEventSchema, StreamMessage, StreamName, StreamProducer, StreamProducerOptions, SuppressionRecord, SuspendExecutionError, SyncTemplatesInput, SyncTemplatesSchema, SystemHealthRecord, SystemMetricsRecord, TemplateCache, TemplateContext, TemplateInput, TemplateRecord, TemplateRecordResponse, TemplateRenderer, TemplateRepository, TemplateSchema, ThrottleCheckOptions, ThrottleResult, Transport, TriggerWorkflowInput, TriggerWorkflowSchema, TypedEventEnvelope, UnsubscribeClaim, UnsubscribeHeaderOptions, UpdateProjectInput, UpdateProjectSchema, UpdateUserInput, UpdateUserSchema, UserContact, UserContactInput, UserContactInputSchema, UserContactResponse, UserDetailResponse, UserProfile, UserProfileResponse, UserRecord, UserRepository, UserResponse, UserThrottle, UserThrottleOptions, ValidationError, WebhookEvent, WorkerHealth, WorkerOptions, WorkerState, WorkflowContext, WorkflowDefinitionRecord, WorkflowEvent, WorkflowInstanceRecord, WorkflowNotifyInput, WorkflowNotifyPayloadSchema, WorkflowNotifyResult, WorkflowRepository, WorkflowStepContext, WorkflowStepDef, WorkflowStepSchema, baseConfigSchema, buildStepNotifyPayload, buildStreamEvent, buildUnsubscribeHeaders, childLogger, createDatabase, createLogger, escapeHeader, escapeHtml, generateId, getAiConfig, getMetricsRegistry, getPriorityBucket, globalEmitter, interpolate, loadEnv, metrics, normaliseTarget, parseConfig, readBaseConfig, registerTransport, registry, renderTemplate, renderWithTemplate, resolveStepTarget, runMigrations, setAiConfig, setGlobalConfig, signUnsubscribeToken, sleep, startHealthReporter, templateRegistry, transportRegistry, verifyUnsubscribeToken, withContext, withRequestId, workflow, workflowRegistry };
|
|
12522
12947
|
//# sourceMappingURL=index.d.mts.map
|