alepha 0.14.0 → 0.14.1
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/api/audits/index.d.ts +417 -338
- package/dist/api/audits/index.d.ts.map +1 -1
- package/dist/api/files/index.d.ts +80 -1
- package/dist/api/files/index.d.ts.map +1 -1
- package/dist/api/jobs/index.d.ts +236 -157
- package/dist/api/jobs/index.d.ts.map +1 -1
- package/dist/api/notifications/index.d.ts +21 -1
- package/dist/api/notifications/index.d.ts.map +1 -1
- package/dist/api/parameters/index.d.ts +451 -4
- package/dist/api/parameters/index.d.ts.map +1 -1
- package/dist/api/users/index.d.ts +833 -830
- package/dist/api/users/index.d.ts.map +1 -1
- package/dist/cli/index.d.ts +212 -29
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +320 -219
- package/dist/cli/index.js.map +1 -1
- package/dist/command/index.d.ts +206 -9
- package/dist/command/index.d.ts.map +1 -1
- package/dist/command/index.js +306 -69
- package/dist/command/index.js.map +1 -1
- package/dist/core/index.browser.js.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.native.js.map +1 -1
- package/dist/file/index.d.ts.map +1 -1
- package/dist/file/index.js.map +1 -1
- package/dist/orm/index.d.ts +180 -126
- package/dist/orm/index.d.ts.map +1 -1
- package/dist/orm/index.js +486 -512
- package/dist/orm/index.js.map +1 -1
- package/dist/queue/redis/index.js +2 -4
- package/dist/queue/redis/index.js.map +1 -1
- package/dist/redis/index.d.ts +400 -29
- package/dist/redis/index.d.ts.map +1 -1
- package/dist/redis/index.js +412 -21
- package/dist/redis/index.js.map +1 -1
- package/dist/scheduler/index.d.ts +6 -6
- package/dist/security/index.d.ts +28 -28
- package/dist/security/index.d.ts.map +1 -1
- package/dist/server/auth/index.d.ts +155 -155
- package/dist/server/core/index.d.ts +0 -1
- package/dist/server/core/index.d.ts.map +1 -1
- package/dist/server/core/index.js.map +1 -1
- package/dist/server/health/index.d.ts +17 -17
- package/dist/server/helmet/index.d.ts +4 -1
- package/dist/server/helmet/index.d.ts.map +1 -1
- package/dist/server/multipart/index.d.ts.map +1 -1
- package/dist/server/multipart/index.js.map +1 -1
- package/dist/server/proxy/index.js.map +1 -1
- package/dist/topic/redis/index.js +3 -3
- package/dist/topic/redis/index.js.map +1 -1
- package/dist/vite/index.js +9 -6
- package/dist/vite/index.js.map +1 -1
- package/package.json +3 -3
- package/src/cli/apps/AlephaCli.ts +8 -3
- package/src/cli/apps/AlephaPackageBuilderCli.ts +3 -0
- package/src/cli/atoms/changelogOptions.ts +45 -0
- package/src/cli/commands/ChangelogCommands.ts +187 -317
- package/src/cli/commands/DeployCommands.ts +118 -0
- package/src/cli/commands/DrizzleCommands.ts +28 -8
- package/src/cli/commands/ViteCommands.ts +23 -9
- package/src/cli/defineConfig.ts +15 -0
- package/src/cli/index.ts +3 -0
- package/src/cli/services/AlephaCliUtils.ts +4 -21
- package/src/cli/services/GitMessageParser.ts +77 -0
- package/src/command/helpers/EnvUtils.ts +37 -0
- package/src/command/index.ts +3 -1
- package/src/command/primitives/$command.ts +172 -6
- package/src/command/providers/CliProvider.ts +424 -91
- package/src/core/Alepha.ts +1 -1
- package/src/file/providers/NodeFileSystemProvider.ts +3 -1
- package/src/orm/index.ts +8 -4
- package/src/orm/interfaces/PgQueryWhere.ts +1 -26
- package/src/orm/providers/drivers/BunPostgresProvider.ts +225 -0
- package/src/orm/providers/drivers/BunSqliteProvider.ts +180 -0
- package/src/orm/providers/drivers/DatabaseProvider.ts +25 -0
- package/src/orm/providers/drivers/NodePostgresProvider.ts +0 -25
- package/src/orm/services/QueryManager.ts +10 -125
- package/src/queue/redis/providers/RedisQueueProvider.ts +2 -7
- package/src/redis/index.ts +65 -3
- package/src/redis/providers/BunRedisProvider.ts +304 -0
- package/src/redis/providers/BunRedisSubscriberProvider.ts +94 -0
- package/src/redis/providers/NodeRedisProvider.ts +280 -0
- package/src/redis/providers/NodeRedisSubscriberProvider.ts +94 -0
- package/src/redis/providers/RedisProvider.ts +134 -140
- package/src/redis/providers/RedisSubscriberProvider.ts +58 -49
- package/src/server/core/providers/BunHttpServerProvider.ts +0 -3
- package/src/server/core/providers/ServerBodyParserProvider.ts +3 -1
- package/src/server/core/providers/ServerProvider.ts +7 -4
- package/src/server/multipart/providers/ServerMultipartProvider.ts +3 -1
- package/src/server/proxy/providers/ServerProxyProvider.ts +1 -1
- package/src/topic/redis/providers/RedisTopicProvider.ts +3 -3
- package/src/vite/tasks/buildServer.ts +1 -0
- package/src/orm/services/PgJsonQueryManager.ts +0 -511
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as alepha381 from "alepha";
|
|
2
2
|
import { Alepha, KIND, Primitive, Static, TNull, TObject, TOptional, TSchema, TUnion } from "alepha";
|
|
3
|
-
import * as
|
|
3
|
+
import * as alepha_orm84 from "alepha/orm";
|
|
4
4
|
import { Page } from "alepha/orm";
|
|
5
5
|
import * as alepha_server0 from "alepha/server";
|
|
6
6
|
import { ServerRequest } from "alepha/server";
|
|
7
7
|
import * as alepha_logger0 from "alepha/logger";
|
|
8
|
+
import "bun";
|
|
9
|
+
import "bun:sqlite";
|
|
10
|
+
import "drizzle-orm/bun-sql";
|
|
11
|
+
import "drizzle-orm/bun-sqlite";
|
|
8
12
|
import "drizzle-orm/d1";
|
|
9
13
|
import { BuildExtraConfigColumns, SQL } from "drizzle-orm";
|
|
10
14
|
import { PgColumnBuilderBase, PgSequenceOptions, PgTableExtraConfigValue, UpdateDeleteAction } from "drizzle-orm/pg-core";
|
|
11
15
|
import "alepha/datetime";
|
|
12
16
|
import "alepha/retry";
|
|
13
|
-
import "drizzle-orm/sqlite-core";
|
|
14
17
|
import "alepha/lock";
|
|
18
|
+
import "drizzle-orm/sqlite-core";
|
|
15
19
|
import "drizzle-orm/postgres-js";
|
|
16
20
|
import "postgres";
|
|
17
21
|
|
|
@@ -19,7 +23,7 @@ import "postgres";
|
|
|
19
23
|
/**
|
|
20
24
|
* Audit severity levels for categorizing events.
|
|
21
25
|
*/
|
|
22
|
-
declare const auditSeveritySchema:
|
|
26
|
+
declare const auditSeveritySchema: alepha381.TUnsafe<"info" | "warning" | "critical">;
|
|
23
27
|
type AuditSeverity = Static<typeof auditSeveritySchema>;
|
|
24
28
|
/**
|
|
25
29
|
* Audit log entity for tracking important system events.
|
|
@@ -30,212 +34,212 @@ type AuditSeverity = Static<typeof auditSeveritySchema>;
|
|
|
30
34
|
* - When it happened (createdAt)
|
|
31
35
|
* - Context and details (metadata, ipAddress, userAgent)
|
|
32
36
|
*/
|
|
33
|
-
declare const audits:
|
|
34
|
-
id:
|
|
35
|
-
createdAt:
|
|
37
|
+
declare const audits: alepha_orm84.EntityPrimitive<alepha381.TObject<{
|
|
38
|
+
id: alepha_orm84.PgAttr<alepha_orm84.PgAttr<alepha381.TString, typeof alepha_orm84.PG_PRIMARY_KEY>, typeof alepha_orm84.PG_DEFAULT>;
|
|
39
|
+
createdAt: alepha_orm84.PgAttr<alepha_orm84.PgAttr<alepha381.TString, typeof alepha_orm84.PG_CREATED_AT>, typeof alepha_orm84.PG_DEFAULT>;
|
|
36
40
|
/**
|
|
37
41
|
* Audit event type (e.g., "auth", "user", "payment", "system").
|
|
38
42
|
* Used for categorizing and filtering audit events.
|
|
39
43
|
*/
|
|
40
|
-
type:
|
|
44
|
+
type: alepha381.TString;
|
|
41
45
|
/**
|
|
42
46
|
* Specific action performed (e.g., "login", "logout", "create", "update", "delete").
|
|
43
47
|
*/
|
|
44
|
-
action:
|
|
48
|
+
action: alepha381.TString;
|
|
45
49
|
/**
|
|
46
50
|
* Severity level of the event.
|
|
47
51
|
*/
|
|
48
|
-
severity:
|
|
52
|
+
severity: alepha_orm84.PgAttr<alepha381.TUnsafe<"info" | "warning" | "critical">, typeof alepha_orm84.PG_DEFAULT>;
|
|
49
53
|
/**
|
|
50
54
|
* User ID who performed the action (null for system events).
|
|
51
55
|
*/
|
|
52
|
-
userId:
|
|
56
|
+
userId: alepha381.TOptional<alepha381.TString>;
|
|
53
57
|
/**
|
|
54
58
|
* User realm for multi-tenant support.
|
|
55
59
|
*/
|
|
56
|
-
userRealm:
|
|
60
|
+
userRealm: alepha381.TOptional<alepha381.TString>;
|
|
57
61
|
/**
|
|
58
62
|
* User email at the time of the event (denormalized for history).
|
|
59
63
|
*/
|
|
60
|
-
userEmail:
|
|
64
|
+
userEmail: alepha381.TOptional<alepha381.TString>;
|
|
61
65
|
/**
|
|
62
66
|
* Resource type affected (e.g., "user", "order", "file").
|
|
63
67
|
*/
|
|
64
|
-
resourceType:
|
|
68
|
+
resourceType: alepha381.TOptional<alepha381.TString>;
|
|
65
69
|
/**
|
|
66
70
|
* Resource ID affected.
|
|
67
71
|
*/
|
|
68
|
-
resourceId:
|
|
72
|
+
resourceId: alepha381.TOptional<alepha381.TString>;
|
|
69
73
|
/**
|
|
70
74
|
* Human-readable description of the event.
|
|
71
75
|
*/
|
|
72
|
-
description:
|
|
76
|
+
description: alepha381.TOptional<alepha381.TString>;
|
|
73
77
|
/**
|
|
74
78
|
* Additional metadata/context as JSON.
|
|
75
79
|
*/
|
|
76
|
-
metadata:
|
|
80
|
+
metadata: alepha381.TOptional<alepha381.TRecord<string, alepha381.TAny>>;
|
|
77
81
|
/**
|
|
78
82
|
* Client IP address.
|
|
79
83
|
*/
|
|
80
|
-
ipAddress:
|
|
84
|
+
ipAddress: alepha381.TOptional<alepha381.TString>;
|
|
81
85
|
/**
|
|
82
86
|
* Client user agent.
|
|
83
87
|
*/
|
|
84
|
-
userAgent:
|
|
88
|
+
userAgent: alepha381.TOptional<alepha381.TString>;
|
|
85
89
|
/**
|
|
86
90
|
* Session ID if applicable.
|
|
87
91
|
*/
|
|
88
|
-
sessionId:
|
|
92
|
+
sessionId: alepha381.TOptional<alepha381.TString>;
|
|
89
93
|
/**
|
|
90
94
|
* Request ID for correlation.
|
|
91
95
|
*/
|
|
92
|
-
requestId:
|
|
96
|
+
requestId: alepha381.TOptional<alepha381.TString>;
|
|
93
97
|
/**
|
|
94
98
|
* Whether the action was successful.
|
|
95
99
|
*/
|
|
96
|
-
success:
|
|
100
|
+
success: alepha_orm84.PgAttr<alepha381.TBoolean, typeof alepha_orm84.PG_DEFAULT>;
|
|
97
101
|
/**
|
|
98
102
|
* Error message if the action failed.
|
|
99
103
|
*/
|
|
100
|
-
errorMessage:
|
|
104
|
+
errorMessage: alepha381.TOptional<alepha381.TString>;
|
|
101
105
|
}>>;
|
|
102
|
-
declare const auditEntitySchema:
|
|
103
|
-
id:
|
|
104
|
-
createdAt:
|
|
106
|
+
declare const auditEntitySchema: alepha381.TObject<{
|
|
107
|
+
id: alepha_orm84.PgAttr<alepha_orm84.PgAttr<alepha381.TString, typeof alepha_orm84.PG_PRIMARY_KEY>, typeof alepha_orm84.PG_DEFAULT>;
|
|
108
|
+
createdAt: alepha_orm84.PgAttr<alepha_orm84.PgAttr<alepha381.TString, typeof alepha_orm84.PG_CREATED_AT>, typeof alepha_orm84.PG_DEFAULT>;
|
|
105
109
|
/**
|
|
106
110
|
* Audit event type (e.g., "auth", "user", "payment", "system").
|
|
107
111
|
* Used for categorizing and filtering audit events.
|
|
108
112
|
*/
|
|
109
|
-
type:
|
|
113
|
+
type: alepha381.TString;
|
|
110
114
|
/**
|
|
111
115
|
* Specific action performed (e.g., "login", "logout", "create", "update", "delete").
|
|
112
116
|
*/
|
|
113
|
-
action:
|
|
117
|
+
action: alepha381.TString;
|
|
114
118
|
/**
|
|
115
119
|
* Severity level of the event.
|
|
116
120
|
*/
|
|
117
|
-
severity:
|
|
121
|
+
severity: alepha_orm84.PgAttr<alepha381.TUnsafe<"info" | "warning" | "critical">, typeof alepha_orm84.PG_DEFAULT>;
|
|
118
122
|
/**
|
|
119
123
|
* User ID who performed the action (null for system events).
|
|
120
124
|
*/
|
|
121
|
-
userId:
|
|
125
|
+
userId: alepha381.TOptional<alepha381.TString>;
|
|
122
126
|
/**
|
|
123
127
|
* User realm for multi-tenant support.
|
|
124
128
|
*/
|
|
125
|
-
userRealm:
|
|
129
|
+
userRealm: alepha381.TOptional<alepha381.TString>;
|
|
126
130
|
/**
|
|
127
131
|
* User email at the time of the event (denormalized for history).
|
|
128
132
|
*/
|
|
129
|
-
userEmail:
|
|
133
|
+
userEmail: alepha381.TOptional<alepha381.TString>;
|
|
130
134
|
/**
|
|
131
135
|
* Resource type affected (e.g., "user", "order", "file").
|
|
132
136
|
*/
|
|
133
|
-
resourceType:
|
|
137
|
+
resourceType: alepha381.TOptional<alepha381.TString>;
|
|
134
138
|
/**
|
|
135
139
|
* Resource ID affected.
|
|
136
140
|
*/
|
|
137
|
-
resourceId:
|
|
141
|
+
resourceId: alepha381.TOptional<alepha381.TString>;
|
|
138
142
|
/**
|
|
139
143
|
* Human-readable description of the event.
|
|
140
144
|
*/
|
|
141
|
-
description:
|
|
145
|
+
description: alepha381.TOptional<alepha381.TString>;
|
|
142
146
|
/**
|
|
143
147
|
* Additional metadata/context as JSON.
|
|
144
148
|
*/
|
|
145
|
-
metadata:
|
|
149
|
+
metadata: alepha381.TOptional<alepha381.TRecord<string, alepha381.TAny>>;
|
|
146
150
|
/**
|
|
147
151
|
* Client IP address.
|
|
148
152
|
*/
|
|
149
|
-
ipAddress:
|
|
153
|
+
ipAddress: alepha381.TOptional<alepha381.TString>;
|
|
150
154
|
/**
|
|
151
155
|
* Client user agent.
|
|
152
156
|
*/
|
|
153
|
-
userAgent:
|
|
157
|
+
userAgent: alepha381.TOptional<alepha381.TString>;
|
|
154
158
|
/**
|
|
155
159
|
* Session ID if applicable.
|
|
156
160
|
*/
|
|
157
|
-
sessionId:
|
|
161
|
+
sessionId: alepha381.TOptional<alepha381.TString>;
|
|
158
162
|
/**
|
|
159
163
|
* Request ID for correlation.
|
|
160
164
|
*/
|
|
161
|
-
requestId:
|
|
165
|
+
requestId: alepha381.TOptional<alepha381.TString>;
|
|
162
166
|
/**
|
|
163
167
|
* Whether the action was successful.
|
|
164
168
|
*/
|
|
165
|
-
success:
|
|
169
|
+
success: alepha_orm84.PgAttr<alepha381.TBoolean, typeof alepha_orm84.PG_DEFAULT>;
|
|
166
170
|
/**
|
|
167
171
|
* Error message if the action failed.
|
|
168
172
|
*/
|
|
169
|
-
errorMessage:
|
|
173
|
+
errorMessage: alepha381.TOptional<alepha381.TString>;
|
|
170
174
|
}>;
|
|
171
|
-
declare const auditEntityInsertSchema:
|
|
172
|
-
id:
|
|
173
|
-
createdAt:
|
|
175
|
+
declare const auditEntityInsertSchema: alepha_orm84.TObjectInsert<alepha381.TObject<{
|
|
176
|
+
id: alepha_orm84.PgAttr<alepha_orm84.PgAttr<alepha381.TString, typeof alepha_orm84.PG_PRIMARY_KEY>, typeof alepha_orm84.PG_DEFAULT>;
|
|
177
|
+
createdAt: alepha_orm84.PgAttr<alepha_orm84.PgAttr<alepha381.TString, typeof alepha_orm84.PG_CREATED_AT>, typeof alepha_orm84.PG_DEFAULT>;
|
|
174
178
|
/**
|
|
175
179
|
* Audit event type (e.g., "auth", "user", "payment", "system").
|
|
176
180
|
* Used for categorizing and filtering audit events.
|
|
177
181
|
*/
|
|
178
|
-
type:
|
|
182
|
+
type: alepha381.TString;
|
|
179
183
|
/**
|
|
180
184
|
* Specific action performed (e.g., "login", "logout", "create", "update", "delete").
|
|
181
185
|
*/
|
|
182
|
-
action:
|
|
186
|
+
action: alepha381.TString;
|
|
183
187
|
/**
|
|
184
188
|
* Severity level of the event.
|
|
185
189
|
*/
|
|
186
|
-
severity:
|
|
190
|
+
severity: alepha_orm84.PgAttr<alepha381.TUnsafe<"info" | "warning" | "critical">, typeof alepha_orm84.PG_DEFAULT>;
|
|
187
191
|
/**
|
|
188
192
|
* User ID who performed the action (null for system events).
|
|
189
193
|
*/
|
|
190
|
-
userId:
|
|
194
|
+
userId: alepha381.TOptional<alepha381.TString>;
|
|
191
195
|
/**
|
|
192
196
|
* User realm for multi-tenant support.
|
|
193
197
|
*/
|
|
194
|
-
userRealm:
|
|
198
|
+
userRealm: alepha381.TOptional<alepha381.TString>;
|
|
195
199
|
/**
|
|
196
200
|
* User email at the time of the event (denormalized for history).
|
|
197
201
|
*/
|
|
198
|
-
userEmail:
|
|
202
|
+
userEmail: alepha381.TOptional<alepha381.TString>;
|
|
199
203
|
/**
|
|
200
204
|
* Resource type affected (e.g., "user", "order", "file").
|
|
201
205
|
*/
|
|
202
|
-
resourceType:
|
|
206
|
+
resourceType: alepha381.TOptional<alepha381.TString>;
|
|
203
207
|
/**
|
|
204
208
|
* Resource ID affected.
|
|
205
209
|
*/
|
|
206
|
-
resourceId:
|
|
210
|
+
resourceId: alepha381.TOptional<alepha381.TString>;
|
|
207
211
|
/**
|
|
208
212
|
* Human-readable description of the event.
|
|
209
213
|
*/
|
|
210
|
-
description:
|
|
214
|
+
description: alepha381.TOptional<alepha381.TString>;
|
|
211
215
|
/**
|
|
212
216
|
* Additional metadata/context as JSON.
|
|
213
217
|
*/
|
|
214
|
-
metadata:
|
|
218
|
+
metadata: alepha381.TOptional<alepha381.TRecord<string, alepha381.TAny>>;
|
|
215
219
|
/**
|
|
216
220
|
* Client IP address.
|
|
217
221
|
*/
|
|
218
|
-
ipAddress:
|
|
222
|
+
ipAddress: alepha381.TOptional<alepha381.TString>;
|
|
219
223
|
/**
|
|
220
224
|
* Client user agent.
|
|
221
225
|
*/
|
|
222
|
-
userAgent:
|
|
226
|
+
userAgent: alepha381.TOptional<alepha381.TString>;
|
|
223
227
|
/**
|
|
224
228
|
* Session ID if applicable.
|
|
225
229
|
*/
|
|
226
|
-
sessionId:
|
|
230
|
+
sessionId: alepha381.TOptional<alepha381.TString>;
|
|
227
231
|
/**
|
|
228
232
|
* Request ID for correlation.
|
|
229
233
|
*/
|
|
230
|
-
requestId:
|
|
234
|
+
requestId: alepha381.TOptional<alepha381.TString>;
|
|
231
235
|
/**
|
|
232
236
|
* Whether the action was successful.
|
|
233
237
|
*/
|
|
234
|
-
success:
|
|
238
|
+
success: alepha_orm84.PgAttr<alepha381.TBoolean, typeof alepha_orm84.PG_DEFAULT>;
|
|
235
239
|
/**
|
|
236
240
|
* Error message if the action failed.
|
|
237
241
|
*/
|
|
238
|
-
errorMessage:
|
|
242
|
+
errorMessage: alepha381.TOptional<alepha381.TString>;
|
|
239
243
|
}>>;
|
|
240
244
|
type AuditEntity = Static<typeof audits.schema>;
|
|
241
245
|
//#endregion
|
|
@@ -243,21 +247,21 @@ type AuditEntity = Static<typeof audits.schema>;
|
|
|
243
247
|
/**
|
|
244
248
|
* Query schema for searching and filtering audit logs.
|
|
245
249
|
*/
|
|
246
|
-
declare const auditQuerySchema:
|
|
247
|
-
page:
|
|
248
|
-
size:
|
|
249
|
-
sort:
|
|
250
|
-
type:
|
|
251
|
-
action:
|
|
252
|
-
severity:
|
|
253
|
-
userId:
|
|
254
|
-
userRealm:
|
|
255
|
-
resourceType:
|
|
256
|
-
resourceId:
|
|
257
|
-
success:
|
|
258
|
-
from:
|
|
259
|
-
to:
|
|
260
|
-
search:
|
|
250
|
+
declare const auditQuerySchema: alepha381.TObject<{
|
|
251
|
+
page: alepha381.TOptional<alepha381.TInteger>;
|
|
252
|
+
size: alepha381.TOptional<alepha381.TInteger>;
|
|
253
|
+
sort: alepha381.TOptional<alepha381.TString>;
|
|
254
|
+
type: alepha381.TOptional<alepha381.TString>;
|
|
255
|
+
action: alepha381.TOptional<alepha381.TString>;
|
|
256
|
+
severity: alepha381.TOptional<alepha381.TUnsafe<"info" | "warning" | "critical">>;
|
|
257
|
+
userId: alepha381.TOptional<alepha381.TString>;
|
|
258
|
+
userRealm: alepha381.TOptional<alepha381.TString>;
|
|
259
|
+
resourceType: alepha381.TOptional<alepha381.TString>;
|
|
260
|
+
resourceId: alepha381.TOptional<alepha381.TString>;
|
|
261
|
+
success: alepha381.TOptional<alepha381.TBoolean>;
|
|
262
|
+
from: alepha381.TOptional<alepha381.TString>;
|
|
263
|
+
to: alepha381.TOptional<alepha381.TString>;
|
|
264
|
+
search: alepha381.TOptional<alepha381.TString>;
|
|
261
265
|
}>;
|
|
262
266
|
type AuditQuery = Static<typeof auditQuerySchema>;
|
|
263
267
|
//#endregion
|
|
@@ -265,23 +269,23 @@ type AuditQuery = Static<typeof auditQuerySchema>;
|
|
|
265
269
|
/**
|
|
266
270
|
* Schema for creating a new audit log entry.
|
|
267
271
|
*/
|
|
268
|
-
declare const createAuditSchema:
|
|
269
|
-
type:
|
|
270
|
-
action:
|
|
271
|
-
severity:
|
|
272
|
-
userId:
|
|
273
|
-
userRealm:
|
|
274
|
-
userEmail:
|
|
275
|
-
resourceType:
|
|
276
|
-
resourceId:
|
|
277
|
-
description:
|
|
278
|
-
metadata:
|
|
279
|
-
ipAddress:
|
|
280
|
-
userAgent:
|
|
281
|
-
sessionId:
|
|
282
|
-
requestId:
|
|
283
|
-
success:
|
|
284
|
-
errorMessage:
|
|
272
|
+
declare const createAuditSchema: alepha381.TObject<{
|
|
273
|
+
type: alepha381.TString;
|
|
274
|
+
action: alepha381.TString;
|
|
275
|
+
severity: alepha381.TOptional<alepha381.TUnsafe<"info" | "warning" | "critical">>;
|
|
276
|
+
userId: alepha381.TOptional<alepha381.TString>;
|
|
277
|
+
userRealm: alepha381.TOptional<alepha381.TString>;
|
|
278
|
+
userEmail: alepha381.TOptional<alepha381.TString>;
|
|
279
|
+
resourceType: alepha381.TOptional<alepha381.TString>;
|
|
280
|
+
resourceId: alepha381.TOptional<alepha381.TString>;
|
|
281
|
+
description: alepha381.TOptional<alepha381.TString>;
|
|
282
|
+
metadata: alepha381.TOptional<alepha381.TRecord<string, alepha381.TAny>>;
|
|
283
|
+
ipAddress: alepha381.TOptional<alepha381.TString>;
|
|
284
|
+
userAgent: alepha381.TOptional<alepha381.TString>;
|
|
285
|
+
sessionId: alepha381.TOptional<alepha381.TString>;
|
|
286
|
+
requestId: alepha381.TOptional<alepha381.TString>;
|
|
287
|
+
success: alepha381.TOptional<alepha381.TBoolean>;
|
|
288
|
+
errorMessage: alepha381.TOptional<alepha381.TString>;
|
|
285
289
|
}>;
|
|
286
290
|
type CreateAudit = Static<typeof createAuditSchema>;
|
|
287
291
|
//#endregion
|
|
@@ -306,25 +310,25 @@ interface AuditTypeDefinition {
|
|
|
306
310
|
declare class AuditService {
|
|
307
311
|
protected readonly alepha: Alepha;
|
|
308
312
|
protected readonly log: alepha_logger0.Logger;
|
|
309
|
-
protected readonly repo:
|
|
310
|
-
id:
|
|
311
|
-
createdAt:
|
|
312
|
-
type:
|
|
313
|
-
action:
|
|
314
|
-
severity:
|
|
315
|
-
userId:
|
|
316
|
-
userRealm:
|
|
317
|
-
userEmail:
|
|
318
|
-
resourceType:
|
|
319
|
-
resourceId:
|
|
320
|
-
description:
|
|
321
|
-
metadata:
|
|
322
|
-
ipAddress:
|
|
323
|
-
userAgent:
|
|
324
|
-
sessionId:
|
|
325
|
-
requestId:
|
|
326
|
-
success:
|
|
327
|
-
errorMessage:
|
|
313
|
+
protected readonly repo: alepha_orm84.Repository<alepha381.TObject<{
|
|
314
|
+
id: alepha_orm84.PgAttr<alepha_orm84.PgAttr<alepha381.TString, typeof alepha_orm84.PG_PRIMARY_KEY>, typeof alepha_orm84.PG_DEFAULT>;
|
|
315
|
+
createdAt: alepha_orm84.PgAttr<alepha_orm84.PgAttr<alepha381.TString, typeof alepha_orm84.PG_CREATED_AT>, typeof alepha_orm84.PG_DEFAULT>;
|
|
316
|
+
type: alepha381.TString;
|
|
317
|
+
action: alepha381.TString;
|
|
318
|
+
severity: alepha_orm84.PgAttr<alepha381.TUnsafe<"info" | "warning" | "critical">, typeof alepha_orm84.PG_DEFAULT>;
|
|
319
|
+
userId: alepha381.TOptional<alepha381.TString>;
|
|
320
|
+
userRealm: alepha381.TOptional<alepha381.TString>;
|
|
321
|
+
userEmail: alepha381.TOptional<alepha381.TString>;
|
|
322
|
+
resourceType: alepha381.TOptional<alepha381.TString>;
|
|
323
|
+
resourceId: alepha381.TOptional<alepha381.TString>;
|
|
324
|
+
description: alepha381.TOptional<alepha381.TString>;
|
|
325
|
+
metadata: alepha381.TOptional<alepha381.TRecord<string, alepha381.TAny>>;
|
|
326
|
+
ipAddress: alepha381.TOptional<alepha381.TString>;
|
|
327
|
+
userAgent: alepha381.TOptional<alepha381.TString>;
|
|
328
|
+
sessionId: alepha381.TOptional<alepha381.TString>;
|
|
329
|
+
requestId: alepha381.TOptional<alepha381.TString>;
|
|
330
|
+
success: alepha_orm84.PgAttr<alepha381.TBoolean, typeof alepha_orm84.PG_DEFAULT>;
|
|
331
|
+
errorMessage: alepha381.TOptional<alepha381.TString>;
|
|
328
332
|
}>>;
|
|
329
333
|
/**
|
|
330
334
|
* Registry of audit types and their allowed actions.
|
|
@@ -429,237 +433,237 @@ declare class AuditController {
|
|
|
429
433
|
* Find audit entries with filtering and pagination.
|
|
430
434
|
*/
|
|
431
435
|
readonly findAudits: alepha_server0.ActionPrimitiveFn<{
|
|
432
|
-
query:
|
|
433
|
-
page:
|
|
434
|
-
size:
|
|
435
|
-
sort:
|
|
436
|
-
type:
|
|
437
|
-
action:
|
|
438
|
-
severity:
|
|
439
|
-
userId:
|
|
440
|
-
userRealm:
|
|
441
|
-
resourceType:
|
|
442
|
-
resourceId:
|
|
443
|
-
success:
|
|
444
|
-
from:
|
|
445
|
-
to:
|
|
446
|
-
search:
|
|
436
|
+
query: alepha381.TObject<{
|
|
437
|
+
page: alepha381.TOptional<alepha381.TInteger>;
|
|
438
|
+
size: alepha381.TOptional<alepha381.TInteger>;
|
|
439
|
+
sort: alepha381.TOptional<alepha381.TString>;
|
|
440
|
+
type: alepha381.TOptional<alepha381.TString>;
|
|
441
|
+
action: alepha381.TOptional<alepha381.TString>;
|
|
442
|
+
severity: alepha381.TOptional<alepha381.TUnsafe<"info" | "warning" | "critical">>;
|
|
443
|
+
userId: alepha381.TOptional<alepha381.TString>;
|
|
444
|
+
userRealm: alepha381.TOptional<alepha381.TString>;
|
|
445
|
+
resourceType: alepha381.TOptional<alepha381.TString>;
|
|
446
|
+
resourceId: alepha381.TOptional<alepha381.TString>;
|
|
447
|
+
success: alepha381.TOptional<alepha381.TBoolean>;
|
|
448
|
+
from: alepha381.TOptional<alepha381.TString>;
|
|
449
|
+
to: alepha381.TOptional<alepha381.TString>;
|
|
450
|
+
search: alepha381.TOptional<alepha381.TString>;
|
|
447
451
|
}>;
|
|
448
|
-
response:
|
|
449
|
-
id:
|
|
450
|
-
createdAt:
|
|
451
|
-
type:
|
|
452
|
-
action:
|
|
453
|
-
severity:
|
|
454
|
-
userId:
|
|
455
|
-
userRealm:
|
|
456
|
-
userEmail:
|
|
457
|
-
resourceType:
|
|
458
|
-
resourceId:
|
|
459
|
-
description:
|
|
460
|
-
metadata:
|
|
461
|
-
ipAddress:
|
|
462
|
-
userAgent:
|
|
463
|
-
sessionId:
|
|
464
|
-
requestId:
|
|
465
|
-
success:
|
|
466
|
-
errorMessage:
|
|
452
|
+
response: alepha381.TPage<alepha381.TObject<{
|
|
453
|
+
id: alepha_orm84.PgAttr<alepha_orm84.PgAttr<alepha381.TString, typeof alepha_orm84.PG_PRIMARY_KEY>, typeof alepha_orm84.PG_DEFAULT>;
|
|
454
|
+
createdAt: alepha_orm84.PgAttr<alepha_orm84.PgAttr<alepha381.TString, typeof alepha_orm84.PG_CREATED_AT>, typeof alepha_orm84.PG_DEFAULT>;
|
|
455
|
+
type: alepha381.TString;
|
|
456
|
+
action: alepha381.TString;
|
|
457
|
+
severity: alepha_orm84.PgAttr<alepha381.TUnsafe<"info" | "warning" | "critical">, typeof alepha_orm84.PG_DEFAULT>;
|
|
458
|
+
userId: alepha381.TOptional<alepha381.TString>;
|
|
459
|
+
userRealm: alepha381.TOptional<alepha381.TString>;
|
|
460
|
+
userEmail: alepha381.TOptional<alepha381.TString>;
|
|
461
|
+
resourceType: alepha381.TOptional<alepha381.TString>;
|
|
462
|
+
resourceId: alepha381.TOptional<alepha381.TString>;
|
|
463
|
+
description: alepha381.TOptional<alepha381.TString>;
|
|
464
|
+
metadata: alepha381.TOptional<alepha381.TRecord<string, alepha381.TAny>>;
|
|
465
|
+
ipAddress: alepha381.TOptional<alepha381.TString>;
|
|
466
|
+
userAgent: alepha381.TOptional<alepha381.TString>;
|
|
467
|
+
sessionId: alepha381.TOptional<alepha381.TString>;
|
|
468
|
+
requestId: alepha381.TOptional<alepha381.TString>;
|
|
469
|
+
success: alepha_orm84.PgAttr<alepha381.TBoolean, typeof alepha_orm84.PG_DEFAULT>;
|
|
470
|
+
errorMessage: alepha381.TOptional<alepha381.TString>;
|
|
467
471
|
}>>;
|
|
468
472
|
}>;
|
|
469
473
|
/**
|
|
470
474
|
* Get a single audit entry by ID.
|
|
471
475
|
*/
|
|
472
476
|
readonly getAudit: alepha_server0.ActionPrimitiveFn<{
|
|
473
|
-
params:
|
|
474
|
-
id:
|
|
477
|
+
params: alepha381.TObject<{
|
|
478
|
+
id: alepha381.TString;
|
|
475
479
|
}>;
|
|
476
|
-
response:
|
|
477
|
-
id:
|
|
478
|
-
createdAt:
|
|
479
|
-
type:
|
|
480
|
-
action:
|
|
481
|
-
severity:
|
|
482
|
-
userId:
|
|
483
|
-
userRealm:
|
|
484
|
-
userEmail:
|
|
485
|
-
resourceType:
|
|
486
|
-
resourceId:
|
|
487
|
-
description:
|
|
488
|
-
metadata:
|
|
489
|
-
ipAddress:
|
|
490
|
-
userAgent:
|
|
491
|
-
sessionId:
|
|
492
|
-
requestId:
|
|
493
|
-
success:
|
|
494
|
-
errorMessage:
|
|
480
|
+
response: alepha381.TObject<{
|
|
481
|
+
id: alepha_orm84.PgAttr<alepha_orm84.PgAttr<alepha381.TString, typeof alepha_orm84.PG_PRIMARY_KEY>, typeof alepha_orm84.PG_DEFAULT>;
|
|
482
|
+
createdAt: alepha_orm84.PgAttr<alepha_orm84.PgAttr<alepha381.TString, typeof alepha_orm84.PG_CREATED_AT>, typeof alepha_orm84.PG_DEFAULT>;
|
|
483
|
+
type: alepha381.TString;
|
|
484
|
+
action: alepha381.TString;
|
|
485
|
+
severity: alepha_orm84.PgAttr<alepha381.TUnsafe<"info" | "warning" | "critical">, typeof alepha_orm84.PG_DEFAULT>;
|
|
486
|
+
userId: alepha381.TOptional<alepha381.TString>;
|
|
487
|
+
userRealm: alepha381.TOptional<alepha381.TString>;
|
|
488
|
+
userEmail: alepha381.TOptional<alepha381.TString>;
|
|
489
|
+
resourceType: alepha381.TOptional<alepha381.TString>;
|
|
490
|
+
resourceId: alepha381.TOptional<alepha381.TString>;
|
|
491
|
+
description: alepha381.TOptional<alepha381.TString>;
|
|
492
|
+
metadata: alepha381.TOptional<alepha381.TRecord<string, alepha381.TAny>>;
|
|
493
|
+
ipAddress: alepha381.TOptional<alepha381.TString>;
|
|
494
|
+
userAgent: alepha381.TOptional<alepha381.TString>;
|
|
495
|
+
sessionId: alepha381.TOptional<alepha381.TString>;
|
|
496
|
+
requestId: alepha381.TOptional<alepha381.TString>;
|
|
497
|
+
success: alepha_orm84.PgAttr<alepha381.TBoolean, typeof alepha_orm84.PG_DEFAULT>;
|
|
498
|
+
errorMessage: alepha381.TOptional<alepha381.TString>;
|
|
495
499
|
}>;
|
|
496
500
|
}>;
|
|
497
501
|
/**
|
|
498
502
|
* Create a new audit entry.
|
|
499
503
|
*/
|
|
500
504
|
readonly createAudit: alepha_server0.ActionPrimitiveFn<{
|
|
501
|
-
body:
|
|
502
|
-
type:
|
|
503
|
-
action:
|
|
504
|
-
severity:
|
|
505
|
-
userId:
|
|
506
|
-
userRealm:
|
|
507
|
-
userEmail:
|
|
508
|
-
resourceType:
|
|
509
|
-
resourceId:
|
|
510
|
-
description:
|
|
511
|
-
metadata:
|
|
512
|
-
ipAddress:
|
|
513
|
-
userAgent:
|
|
514
|
-
sessionId:
|
|
515
|
-
requestId:
|
|
516
|
-
success:
|
|
517
|
-
errorMessage:
|
|
505
|
+
body: alepha381.TObject<{
|
|
506
|
+
type: alepha381.TString;
|
|
507
|
+
action: alepha381.TString;
|
|
508
|
+
severity: alepha381.TOptional<alepha381.TUnsafe<"info" | "warning" | "critical">>;
|
|
509
|
+
userId: alepha381.TOptional<alepha381.TString>;
|
|
510
|
+
userRealm: alepha381.TOptional<alepha381.TString>;
|
|
511
|
+
userEmail: alepha381.TOptional<alepha381.TString>;
|
|
512
|
+
resourceType: alepha381.TOptional<alepha381.TString>;
|
|
513
|
+
resourceId: alepha381.TOptional<alepha381.TString>;
|
|
514
|
+
description: alepha381.TOptional<alepha381.TString>;
|
|
515
|
+
metadata: alepha381.TOptional<alepha381.TRecord<string, alepha381.TAny>>;
|
|
516
|
+
ipAddress: alepha381.TOptional<alepha381.TString>;
|
|
517
|
+
userAgent: alepha381.TOptional<alepha381.TString>;
|
|
518
|
+
sessionId: alepha381.TOptional<alepha381.TString>;
|
|
519
|
+
requestId: alepha381.TOptional<alepha381.TString>;
|
|
520
|
+
success: alepha381.TOptional<alepha381.TBoolean>;
|
|
521
|
+
errorMessage: alepha381.TOptional<alepha381.TString>;
|
|
518
522
|
}>;
|
|
519
|
-
response:
|
|
520
|
-
id:
|
|
521
|
-
createdAt:
|
|
522
|
-
type:
|
|
523
|
-
action:
|
|
524
|
-
severity:
|
|
525
|
-
userId:
|
|
526
|
-
userRealm:
|
|
527
|
-
userEmail:
|
|
528
|
-
resourceType:
|
|
529
|
-
resourceId:
|
|
530
|
-
description:
|
|
531
|
-
metadata:
|
|
532
|
-
ipAddress:
|
|
533
|
-
userAgent:
|
|
534
|
-
sessionId:
|
|
535
|
-
requestId:
|
|
536
|
-
success:
|
|
537
|
-
errorMessage:
|
|
523
|
+
response: alepha381.TObject<{
|
|
524
|
+
id: alepha_orm84.PgAttr<alepha_orm84.PgAttr<alepha381.TString, typeof alepha_orm84.PG_PRIMARY_KEY>, typeof alepha_orm84.PG_DEFAULT>;
|
|
525
|
+
createdAt: alepha_orm84.PgAttr<alepha_orm84.PgAttr<alepha381.TString, typeof alepha_orm84.PG_CREATED_AT>, typeof alepha_orm84.PG_DEFAULT>;
|
|
526
|
+
type: alepha381.TString;
|
|
527
|
+
action: alepha381.TString;
|
|
528
|
+
severity: alepha_orm84.PgAttr<alepha381.TUnsafe<"info" | "warning" | "critical">, typeof alepha_orm84.PG_DEFAULT>;
|
|
529
|
+
userId: alepha381.TOptional<alepha381.TString>;
|
|
530
|
+
userRealm: alepha381.TOptional<alepha381.TString>;
|
|
531
|
+
userEmail: alepha381.TOptional<alepha381.TString>;
|
|
532
|
+
resourceType: alepha381.TOptional<alepha381.TString>;
|
|
533
|
+
resourceId: alepha381.TOptional<alepha381.TString>;
|
|
534
|
+
description: alepha381.TOptional<alepha381.TString>;
|
|
535
|
+
metadata: alepha381.TOptional<alepha381.TRecord<string, alepha381.TAny>>;
|
|
536
|
+
ipAddress: alepha381.TOptional<alepha381.TString>;
|
|
537
|
+
userAgent: alepha381.TOptional<alepha381.TString>;
|
|
538
|
+
sessionId: alepha381.TOptional<alepha381.TString>;
|
|
539
|
+
requestId: alepha381.TOptional<alepha381.TString>;
|
|
540
|
+
success: alepha_orm84.PgAttr<alepha381.TBoolean, typeof alepha_orm84.PG_DEFAULT>;
|
|
541
|
+
errorMessage: alepha381.TOptional<alepha381.TString>;
|
|
538
542
|
}>;
|
|
539
543
|
}>;
|
|
540
544
|
/**
|
|
541
545
|
* Get audit entries for a specific user.
|
|
542
546
|
*/
|
|
543
547
|
readonly findByUser: alepha_server0.ActionPrimitiveFn<{
|
|
544
|
-
params:
|
|
545
|
-
userId:
|
|
548
|
+
params: alepha381.TObject<{
|
|
549
|
+
userId: alepha381.TString;
|
|
546
550
|
}>;
|
|
547
|
-
query:
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
551
|
+
query: alepha381.TObject<{
|
|
552
|
+
type: alepha381.TOptional<alepha381.TString>;
|
|
553
|
+
search: alepha381.TOptional<alepha381.TString>;
|
|
554
|
+
action: alepha381.TOptional<alepha381.TString>;
|
|
555
|
+
severity: alepha381.TOptional<alepha381.TUnsafe<"info" | "warning" | "critical">>;
|
|
556
|
+
sort: alepha381.TOptional<alepha381.TString>;
|
|
557
|
+
userRealm: alepha381.TOptional<alepha381.TString>;
|
|
558
|
+
resourceType: alepha381.TOptional<alepha381.TString>;
|
|
559
|
+
resourceId: alepha381.TOptional<alepha381.TString>;
|
|
560
|
+
success: alepha381.TOptional<alepha381.TBoolean>;
|
|
561
|
+
page: alepha381.TOptional<alepha381.TInteger>;
|
|
562
|
+
size: alepha381.TOptional<alepha381.TInteger>;
|
|
563
|
+
from: alepha381.TOptional<alepha381.TString>;
|
|
564
|
+
to: alepha381.TOptional<alepha381.TString>;
|
|
561
565
|
}>;
|
|
562
|
-
response:
|
|
563
|
-
id:
|
|
564
|
-
createdAt:
|
|
565
|
-
type:
|
|
566
|
-
action:
|
|
567
|
-
severity:
|
|
568
|
-
userId:
|
|
569
|
-
userRealm:
|
|
570
|
-
userEmail:
|
|
571
|
-
resourceType:
|
|
572
|
-
resourceId:
|
|
573
|
-
description:
|
|
574
|
-
metadata:
|
|
575
|
-
ipAddress:
|
|
576
|
-
userAgent:
|
|
577
|
-
sessionId:
|
|
578
|
-
requestId:
|
|
579
|
-
success:
|
|
580
|
-
errorMessage:
|
|
566
|
+
response: alepha381.TPage<alepha381.TObject<{
|
|
567
|
+
id: alepha_orm84.PgAttr<alepha_orm84.PgAttr<alepha381.TString, typeof alepha_orm84.PG_PRIMARY_KEY>, typeof alepha_orm84.PG_DEFAULT>;
|
|
568
|
+
createdAt: alepha_orm84.PgAttr<alepha_orm84.PgAttr<alepha381.TString, typeof alepha_orm84.PG_CREATED_AT>, typeof alepha_orm84.PG_DEFAULT>;
|
|
569
|
+
type: alepha381.TString;
|
|
570
|
+
action: alepha381.TString;
|
|
571
|
+
severity: alepha_orm84.PgAttr<alepha381.TUnsafe<"info" | "warning" | "critical">, typeof alepha_orm84.PG_DEFAULT>;
|
|
572
|
+
userId: alepha381.TOptional<alepha381.TString>;
|
|
573
|
+
userRealm: alepha381.TOptional<alepha381.TString>;
|
|
574
|
+
userEmail: alepha381.TOptional<alepha381.TString>;
|
|
575
|
+
resourceType: alepha381.TOptional<alepha381.TString>;
|
|
576
|
+
resourceId: alepha381.TOptional<alepha381.TString>;
|
|
577
|
+
description: alepha381.TOptional<alepha381.TString>;
|
|
578
|
+
metadata: alepha381.TOptional<alepha381.TRecord<string, alepha381.TAny>>;
|
|
579
|
+
ipAddress: alepha381.TOptional<alepha381.TString>;
|
|
580
|
+
userAgent: alepha381.TOptional<alepha381.TString>;
|
|
581
|
+
sessionId: alepha381.TOptional<alepha381.TString>;
|
|
582
|
+
requestId: alepha381.TOptional<alepha381.TString>;
|
|
583
|
+
success: alepha_orm84.PgAttr<alepha381.TBoolean, typeof alepha_orm84.PG_DEFAULT>;
|
|
584
|
+
errorMessage: alepha381.TOptional<alepha381.TString>;
|
|
581
585
|
}>>;
|
|
582
586
|
}>;
|
|
583
587
|
/**
|
|
584
588
|
* Get audit entries for a specific resource.
|
|
585
589
|
*/
|
|
586
590
|
readonly findByResource: alepha_server0.ActionPrimitiveFn<{
|
|
587
|
-
params:
|
|
588
|
-
resourceType:
|
|
589
|
-
resourceId:
|
|
591
|
+
params: alepha381.TObject<{
|
|
592
|
+
resourceType: alepha381.TString;
|
|
593
|
+
resourceId: alepha381.TString;
|
|
590
594
|
}>;
|
|
591
|
-
query:
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
595
|
+
query: alepha381.TObject<{
|
|
596
|
+
type: alepha381.TOptional<alepha381.TString>;
|
|
597
|
+
search: alepha381.TOptional<alepha381.TString>;
|
|
598
|
+
action: alepha381.TOptional<alepha381.TString>;
|
|
599
|
+
severity: alepha381.TOptional<alepha381.TUnsafe<"info" | "warning" | "critical">>;
|
|
600
|
+
sort: alepha381.TOptional<alepha381.TString>;
|
|
601
|
+
userId: alepha381.TOptional<alepha381.TString>;
|
|
602
|
+
userRealm: alepha381.TOptional<alepha381.TString>;
|
|
603
|
+
success: alepha381.TOptional<alepha381.TBoolean>;
|
|
604
|
+
page: alepha381.TOptional<alepha381.TInteger>;
|
|
605
|
+
size: alepha381.TOptional<alepha381.TInteger>;
|
|
606
|
+
from: alepha381.TOptional<alepha381.TString>;
|
|
607
|
+
to: alepha381.TOptional<alepha381.TString>;
|
|
604
608
|
}>;
|
|
605
|
-
response:
|
|
606
|
-
id:
|
|
607
|
-
createdAt:
|
|
608
|
-
type:
|
|
609
|
-
action:
|
|
610
|
-
severity:
|
|
611
|
-
userId:
|
|
612
|
-
userRealm:
|
|
613
|
-
userEmail:
|
|
614
|
-
resourceType:
|
|
615
|
-
resourceId:
|
|
616
|
-
description:
|
|
617
|
-
metadata:
|
|
618
|
-
ipAddress:
|
|
619
|
-
userAgent:
|
|
620
|
-
sessionId:
|
|
621
|
-
requestId:
|
|
622
|
-
success:
|
|
623
|
-
errorMessage:
|
|
609
|
+
response: alepha381.TPage<alepha381.TObject<{
|
|
610
|
+
id: alepha_orm84.PgAttr<alepha_orm84.PgAttr<alepha381.TString, typeof alepha_orm84.PG_PRIMARY_KEY>, typeof alepha_orm84.PG_DEFAULT>;
|
|
611
|
+
createdAt: alepha_orm84.PgAttr<alepha_orm84.PgAttr<alepha381.TString, typeof alepha_orm84.PG_CREATED_AT>, typeof alepha_orm84.PG_DEFAULT>;
|
|
612
|
+
type: alepha381.TString;
|
|
613
|
+
action: alepha381.TString;
|
|
614
|
+
severity: alepha_orm84.PgAttr<alepha381.TUnsafe<"info" | "warning" | "critical">, typeof alepha_orm84.PG_DEFAULT>;
|
|
615
|
+
userId: alepha381.TOptional<alepha381.TString>;
|
|
616
|
+
userRealm: alepha381.TOptional<alepha381.TString>;
|
|
617
|
+
userEmail: alepha381.TOptional<alepha381.TString>;
|
|
618
|
+
resourceType: alepha381.TOptional<alepha381.TString>;
|
|
619
|
+
resourceId: alepha381.TOptional<alepha381.TString>;
|
|
620
|
+
description: alepha381.TOptional<alepha381.TString>;
|
|
621
|
+
metadata: alepha381.TOptional<alepha381.TRecord<string, alepha381.TAny>>;
|
|
622
|
+
ipAddress: alepha381.TOptional<alepha381.TString>;
|
|
623
|
+
userAgent: alepha381.TOptional<alepha381.TString>;
|
|
624
|
+
sessionId: alepha381.TOptional<alepha381.TString>;
|
|
625
|
+
requestId: alepha381.TOptional<alepha381.TString>;
|
|
626
|
+
success: alepha_orm84.PgAttr<alepha381.TBoolean, typeof alepha_orm84.PG_DEFAULT>;
|
|
627
|
+
errorMessage: alepha381.TOptional<alepha381.TString>;
|
|
624
628
|
}>>;
|
|
625
629
|
}>;
|
|
626
630
|
/**
|
|
627
631
|
* Get audit statistics.
|
|
628
632
|
*/
|
|
629
633
|
readonly getStats: alepha_server0.ActionPrimitiveFn<{
|
|
630
|
-
query:
|
|
631
|
-
from:
|
|
632
|
-
to:
|
|
633
|
-
userRealm:
|
|
634
|
+
query: alepha381.TObject<{
|
|
635
|
+
from: alepha381.TOptional<alepha381.TString>;
|
|
636
|
+
to: alepha381.TOptional<alepha381.TString>;
|
|
637
|
+
userRealm: alepha381.TOptional<alepha381.TString>;
|
|
634
638
|
}>;
|
|
635
|
-
response:
|
|
636
|
-
total:
|
|
637
|
-
byType:
|
|
638
|
-
bySeverity:
|
|
639
|
-
info:
|
|
640
|
-
warning:
|
|
641
|
-
critical:
|
|
639
|
+
response: alepha381.TObject<{
|
|
640
|
+
total: alepha381.TInteger;
|
|
641
|
+
byType: alepha381.TRecord<"^.*$", alepha381.TInteger>;
|
|
642
|
+
bySeverity: alepha381.TObject<{
|
|
643
|
+
info: alepha381.TInteger;
|
|
644
|
+
warning: alepha381.TInteger;
|
|
645
|
+
critical: alepha381.TInteger;
|
|
642
646
|
}>;
|
|
643
|
-
successRate:
|
|
644
|
-
recentFailures:
|
|
645
|
-
id:
|
|
646
|
-
createdAt:
|
|
647
|
-
type:
|
|
648
|
-
action:
|
|
649
|
-
severity:
|
|
650
|
-
userId:
|
|
651
|
-
userRealm:
|
|
652
|
-
userEmail:
|
|
653
|
-
resourceType:
|
|
654
|
-
resourceId:
|
|
655
|
-
description:
|
|
656
|
-
metadata:
|
|
657
|
-
ipAddress:
|
|
658
|
-
userAgent:
|
|
659
|
-
sessionId:
|
|
660
|
-
requestId:
|
|
661
|
-
success:
|
|
662
|
-
errorMessage:
|
|
647
|
+
successRate: alepha381.TNumber;
|
|
648
|
+
recentFailures: alepha381.TArray<alepha381.TObject<{
|
|
649
|
+
id: alepha_orm84.PgAttr<alepha_orm84.PgAttr<alepha381.TString, typeof alepha_orm84.PG_PRIMARY_KEY>, typeof alepha_orm84.PG_DEFAULT>;
|
|
650
|
+
createdAt: alepha_orm84.PgAttr<alepha_orm84.PgAttr<alepha381.TString, typeof alepha_orm84.PG_CREATED_AT>, typeof alepha_orm84.PG_DEFAULT>;
|
|
651
|
+
type: alepha381.TString;
|
|
652
|
+
action: alepha381.TString;
|
|
653
|
+
severity: alepha_orm84.PgAttr<alepha381.TUnsafe<"info" | "warning" | "critical">, typeof alepha_orm84.PG_DEFAULT>;
|
|
654
|
+
userId: alepha381.TOptional<alepha381.TString>;
|
|
655
|
+
userRealm: alepha381.TOptional<alepha381.TString>;
|
|
656
|
+
userEmail: alepha381.TOptional<alepha381.TString>;
|
|
657
|
+
resourceType: alepha381.TOptional<alepha381.TString>;
|
|
658
|
+
resourceId: alepha381.TOptional<alepha381.TString>;
|
|
659
|
+
description: alepha381.TOptional<alepha381.TString>;
|
|
660
|
+
metadata: alepha381.TOptional<alepha381.TRecord<string, alepha381.TAny>>;
|
|
661
|
+
ipAddress: alepha381.TOptional<alepha381.TString>;
|
|
662
|
+
userAgent: alepha381.TOptional<alepha381.TString>;
|
|
663
|
+
sessionId: alepha381.TOptional<alepha381.TString>;
|
|
664
|
+
requestId: alepha381.TOptional<alepha381.TString>;
|
|
665
|
+
success: alepha_orm84.PgAttr<alepha381.TBoolean, typeof alepha_orm84.PG_DEFAULT>;
|
|
666
|
+
errorMessage: alepha381.TOptional<alepha381.TString>;
|
|
663
667
|
}>>;
|
|
664
668
|
}>;
|
|
665
669
|
}>;
|
|
@@ -667,21 +671,21 @@ declare class AuditController {
|
|
|
667
671
|
* Get registered audit types.
|
|
668
672
|
*/
|
|
669
673
|
readonly getTypes: alepha_server0.ActionPrimitiveFn<{
|
|
670
|
-
response:
|
|
671
|
-
type:
|
|
672
|
-
description:
|
|
673
|
-
actions:
|
|
674
|
+
response: alepha381.TArray<alepha381.TObject<{
|
|
675
|
+
type: alepha381.TString;
|
|
676
|
+
description: alepha381.TOptional<alepha381.TString>;
|
|
677
|
+
actions: alepha381.TArray<alepha381.TString>;
|
|
674
678
|
}>>;
|
|
675
679
|
}>;
|
|
676
680
|
/**
|
|
677
681
|
* Get distinct values for filters.
|
|
678
682
|
*/
|
|
679
683
|
readonly getFilterOptions: alepha_server0.ActionPrimitiveFn<{
|
|
680
|
-
response:
|
|
681
|
-
types:
|
|
682
|
-
actions:
|
|
683
|
-
resourceTypes:
|
|
684
|
-
userRealms:
|
|
684
|
+
response: alepha381.TObject<{
|
|
685
|
+
types: alepha381.TArray<alepha381.TString>;
|
|
686
|
+
actions: alepha381.TArray<alepha381.TString>;
|
|
687
|
+
resourceTypes: alepha381.TArray<alepha381.TString>;
|
|
688
|
+
userRealms: alepha381.TArray<alepha381.TString>;
|
|
685
689
|
}>;
|
|
686
690
|
}>;
|
|
687
691
|
}
|
|
@@ -1015,11 +1019,86 @@ interface PgRefOptions {
|
|
|
1015
1019
|
*/
|
|
1016
1020
|
type PgAttr<T extends TSchema, TAttr extends PgSymbolKeys> = T & { [K in TAttr]: PgSymbols[K] };
|
|
1017
1021
|
//#endregion
|
|
1022
|
+
//#region ../../src/orm/providers/drivers/BunPostgresProvider.d.ts
|
|
1023
|
+
declare module "alepha" {
|
|
1024
|
+
interface Env extends Partial<Static<typeof envSchema$1>> {}
|
|
1025
|
+
}
|
|
1026
|
+
declare const envSchema$1: alepha381.TObject<{
|
|
1027
|
+
/**
|
|
1028
|
+
* Main configuration for database connection.
|
|
1029
|
+
* Accept a string in the format of a Postgres connection URL.
|
|
1030
|
+
* Example: postgres://user:password@localhost:5432/database
|
|
1031
|
+
* or
|
|
1032
|
+
* Example: postgres://user:password@localhost:5432/database?sslmode=require
|
|
1033
|
+
*/
|
|
1034
|
+
DATABASE_URL: alepha381.TOptional<alepha381.TString>;
|
|
1035
|
+
/**
|
|
1036
|
+
* In addition to the DATABASE_URL, you can specify the postgres schema name.
|
|
1037
|
+
*/
|
|
1038
|
+
POSTGRES_SCHEMA: alepha381.TOptional<alepha381.TString>;
|
|
1039
|
+
}>;
|
|
1040
|
+
/**
|
|
1041
|
+
* Bun PostgreSQL provider using Drizzle ORM with Bun's native SQL client.
|
|
1042
|
+
*
|
|
1043
|
+
* This provider uses Bun's built-in SQL class for PostgreSQL connections,
|
|
1044
|
+
* which provides excellent performance on the Bun runtime.
|
|
1045
|
+
*
|
|
1046
|
+
* @example
|
|
1047
|
+
* ```ts
|
|
1048
|
+
* // Set DATABASE_URL environment variable
|
|
1049
|
+
* // DATABASE_URL=postgres://user:password@localhost:5432/database
|
|
1050
|
+
*
|
|
1051
|
+
* // Or configure programmatically
|
|
1052
|
+
* alepha.with({
|
|
1053
|
+
* provide: DatabaseProvider,
|
|
1054
|
+
* use: BunPostgresProvider,
|
|
1055
|
+
* });
|
|
1056
|
+
* ```
|
|
1057
|
+
*/
|
|
1058
|
+
//#endregion
|
|
1059
|
+
//#region ../../src/orm/providers/drivers/BunSqliteProvider.d.ts
|
|
1060
|
+
/**
|
|
1061
|
+
* Configuration options for the Bun SQLite database provider.
|
|
1062
|
+
*/
|
|
1063
|
+
declare const bunSqliteOptions: alepha381.Atom<alepha381.TObject<{
|
|
1064
|
+
path: alepha381.TOptional<alepha381.TString>;
|
|
1065
|
+
}>, "alepha.postgres.bun-sqlite.options">;
|
|
1066
|
+
type BunSqliteProviderOptions = Static<typeof bunSqliteOptions.schema>;
|
|
1067
|
+
declare module "alepha" {
|
|
1068
|
+
interface State {
|
|
1069
|
+
[bunSqliteOptions.key]: BunSqliteProviderOptions;
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
/**
|
|
1073
|
+
* Bun SQLite provider using Drizzle ORM with Bun's native SQLite client.
|
|
1074
|
+
*
|
|
1075
|
+
* This provider uses Bun's built-in `bun:sqlite` for SQLite connections,
|
|
1076
|
+
* which provides excellent performance on the Bun runtime.
|
|
1077
|
+
*
|
|
1078
|
+
* @example
|
|
1079
|
+
* ```ts
|
|
1080
|
+
* // Set DATABASE_URL environment variable
|
|
1081
|
+
* // DATABASE_URL=sqlite://./my-database.db
|
|
1082
|
+
*
|
|
1083
|
+
* // Or configure programmatically
|
|
1084
|
+
* alepha.with({
|
|
1085
|
+
* provide: DatabaseProvider,
|
|
1086
|
+
* use: BunSqliteProvider,
|
|
1087
|
+
* });
|
|
1088
|
+
*
|
|
1089
|
+
* // Or use options atom
|
|
1090
|
+
* alepha.store.mut(bunSqliteOptions, (old) => ({
|
|
1091
|
+
* ...old,
|
|
1092
|
+
* path: ":memory:",
|
|
1093
|
+
* }));
|
|
1094
|
+
* ```
|
|
1095
|
+
*/
|
|
1096
|
+
//#endregion
|
|
1018
1097
|
//#region ../../src/orm/providers/drivers/NodePostgresProvider.d.ts
|
|
1019
1098
|
declare module "alepha" {
|
|
1020
1099
|
interface Env extends Partial<Static<typeof envSchema>> {}
|
|
1021
1100
|
}
|
|
1022
|
-
declare const envSchema:
|
|
1101
|
+
declare const envSchema: alepha381.TObject<{
|
|
1023
1102
|
/**
|
|
1024
1103
|
* Main configuration for database connection.
|
|
1025
1104
|
* Accept a string in the format of a Postgres connection URL.
|
|
@@ -1027,21 +1106,21 @@ declare const envSchema: alepha349.TObject<{
|
|
|
1027
1106
|
* or
|
|
1028
1107
|
* Example: postgres://user:password@localhost:5432/database?sslmode=require
|
|
1029
1108
|
*/
|
|
1030
|
-
DATABASE_URL:
|
|
1109
|
+
DATABASE_URL: alepha381.TOptional<alepha381.TString>;
|
|
1031
1110
|
/**
|
|
1032
1111
|
* In addition to the DATABASE_URL, you can specify the postgres schema name.
|
|
1033
1112
|
*
|
|
1034
1113
|
* It will monkey patch drizzle tables.
|
|
1035
1114
|
*/
|
|
1036
|
-
POSTGRES_SCHEMA:
|
|
1115
|
+
POSTGRES_SCHEMA: alepha381.TOptional<alepha381.TString>;
|
|
1037
1116
|
}>;
|
|
1038
1117
|
//#endregion
|
|
1039
1118
|
//#region ../../src/orm/providers/drivers/NodeSqliteProvider.d.ts
|
|
1040
1119
|
/**
|
|
1041
1120
|
* Configuration options for the Node.js SQLite database provider.
|
|
1042
1121
|
*/
|
|
1043
|
-
declare const nodeSqliteOptions:
|
|
1044
|
-
path:
|
|
1122
|
+
declare const nodeSqliteOptions: alepha381.Atom<alepha381.TObject<{
|
|
1123
|
+
path: alepha381.TOptional<alepha381.TString>;
|
|
1045
1124
|
}>, "alepha.postgres.node-sqlite.options">;
|
|
1046
1125
|
type NodeSqliteProviderOptions = Static<typeof nodeSqliteOptions.schema>;
|
|
1047
1126
|
declare module "alepha" {
|
|
@@ -1128,25 +1207,25 @@ declare module "alepha" {
|
|
|
1128
1207
|
/**
|
|
1129
1208
|
* Resource schema for audit log responses.
|
|
1130
1209
|
*/
|
|
1131
|
-
declare const auditResourceSchema:
|
|
1132
|
-
id: PgAttr<PgAttr<
|
|
1133
|
-
createdAt: PgAttr<PgAttr<
|
|
1134
|
-
type:
|
|
1135
|
-
action:
|
|
1136
|
-
severity: PgAttr<
|
|
1137
|
-
userId:
|
|
1138
|
-
userRealm:
|
|
1139
|
-
userEmail:
|
|
1140
|
-
resourceType:
|
|
1141
|
-
resourceId:
|
|
1142
|
-
description:
|
|
1143
|
-
metadata:
|
|
1144
|
-
ipAddress:
|
|
1145
|
-
userAgent:
|
|
1146
|
-
sessionId:
|
|
1147
|
-
requestId:
|
|
1148
|
-
success: PgAttr<
|
|
1149
|
-
errorMessage:
|
|
1210
|
+
declare const auditResourceSchema: alepha381.TObject<{
|
|
1211
|
+
id: PgAttr<PgAttr<alepha381.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
1212
|
+
createdAt: PgAttr<PgAttr<alepha381.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
1213
|
+
type: alepha381.TString;
|
|
1214
|
+
action: alepha381.TString;
|
|
1215
|
+
severity: PgAttr<alepha381.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
|
|
1216
|
+
userId: alepha381.TOptional<alepha381.TString>;
|
|
1217
|
+
userRealm: alepha381.TOptional<alepha381.TString>;
|
|
1218
|
+
userEmail: alepha381.TOptional<alepha381.TString>;
|
|
1219
|
+
resourceType: alepha381.TOptional<alepha381.TString>;
|
|
1220
|
+
resourceId: alepha381.TOptional<alepha381.TString>;
|
|
1221
|
+
description: alepha381.TOptional<alepha381.TString>;
|
|
1222
|
+
metadata: alepha381.TOptional<alepha381.TRecord<string, alepha381.TAny>>;
|
|
1223
|
+
ipAddress: alepha381.TOptional<alepha381.TString>;
|
|
1224
|
+
userAgent: alepha381.TOptional<alepha381.TString>;
|
|
1225
|
+
sessionId: alepha381.TOptional<alepha381.TString>;
|
|
1226
|
+
requestId: alepha381.TOptional<alepha381.TString>;
|
|
1227
|
+
success: PgAttr<alepha381.TBoolean, typeof PG_DEFAULT>;
|
|
1228
|
+
errorMessage: alepha381.TOptional<alepha381.TString>;
|
|
1150
1229
|
}>;
|
|
1151
1230
|
type AuditResource = Static<typeof auditResourceSchema>;
|
|
1152
1231
|
//#endregion
|
|
@@ -1189,7 +1268,7 @@ type AuditResource = Static<typeof auditResourceSchema>;
|
|
|
1189
1268
|
* }
|
|
1190
1269
|
* ```
|
|
1191
1270
|
*/
|
|
1192
|
-
declare const AlephaApiAudits:
|
|
1271
|
+
declare const AlephaApiAudits: alepha381.Service<alepha381.Module>;
|
|
1193
1272
|
//#endregion
|
|
1194
1273
|
export { $audit, AlephaApiAudits, AuditController, AuditEntity, AuditLogOptions, AuditPrimitive, AuditPrimitiveOptions, AuditQuery, AuditResource, AuditService, AuditSeverity, AuditStats, AuditTypeDefinition, CreateAudit, auditEntityInsertSchema, auditEntitySchema, auditQuerySchema, auditResourceSchema, auditSeveritySchema, audits, createAuditSchema };
|
|
1195
1274
|
//# sourceMappingURL=index.d.ts.map
|