alepha 0.20.6 → 0.20.7
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/AGENTS.md +0 -1
- package/CLAUDE.md +0 -1
- package/assets/agents-template.md +0 -1
- package/dist/api/audits/index.browser.js +1 -0
- package/dist/api/audits/index.browser.js.map +1 -1
- package/dist/api/audits/index.d.ts +370 -355
- package/dist/api/audits/index.d.ts.map +1 -1
- package/dist/api/audits/index.js +1 -0
- package/dist/api/audits/index.js.map +1 -1
- package/dist/api/files/index.browser.js +1 -0
- package/dist/api/files/index.browser.js.map +1 -1
- package/dist/api/files/index.d.ts +179 -170
- package/dist/api/files/index.d.ts.map +1 -1
- package/dist/api/files/index.js +1 -0
- package/dist/api/files/index.js.map +1 -1
- package/dist/api/jobs/index.browser.js +7 -0
- package/dist/api/jobs/index.browser.js.map +1 -1
- package/dist/api/jobs/index.d.ts +271 -262
- package/dist/api/jobs/index.d.ts.map +1 -1
- package/dist/api/jobs/index.js +21 -3
- package/dist/api/jobs/index.js.map +1 -1
- package/dist/api/keys/index.d.ts +198 -192
- package/dist/api/keys/index.d.ts.map +1 -1
- package/dist/api/keys/index.js +1 -0
- package/dist/api/keys/index.js.map +1 -1
- package/dist/api/notifications/index.d.ts +246 -245
- package/dist/api/notifications/index.d.ts.map +1 -1
- package/dist/api/organizations/index.d.ts +100 -97
- package/dist/api/organizations/index.d.ts.map +1 -1
- package/dist/api/parameters/index.d.ts +323 -320
- package/dist/api/parameters/index.d.ts.map +1 -1
- package/dist/api/payments/index.d.ts +431 -376
- package/dist/api/payments/index.d.ts.map +1 -1
- package/dist/api/payments/index.js +202 -87
- package/dist/api/payments/index.js.map +1 -1
- package/dist/api/subscriptions/index.d.ts +1695 -0
- package/dist/api/subscriptions/index.d.ts.map +1 -0
- package/dist/api/subscriptions/index.js +1919 -0
- package/dist/api/subscriptions/index.js.map +1 -0
- package/dist/api/users/index.d.ts +863 -847
- package/dist/api/users/index.d.ts.map +1 -1
- package/dist/api/verifications/index.d.ts +126 -125
- package/dist/api/verifications/index.d.ts.map +1 -1
- package/dist/bucket/index.d.ts +3 -2
- package/dist/bucket/index.d.ts.map +1 -1
- package/dist/cache/core/index.d.ts +114 -4
- package/dist/cache/core/index.d.ts.map +1 -1
- package/dist/cache/core/index.js +181 -15
- package/dist/cache/core/index.js.map +1 -1
- package/dist/cache/core/index.workerd.js +181 -15
- package/dist/cache/core/index.workerd.js.map +1 -1
- package/dist/cache/database/index.d.ts +20 -19
- package/dist/cache/database/index.d.ts.map +1 -1
- package/dist/cache/redis/index.d.ts +3 -2
- package/dist/cache/redis/index.d.ts.map +1 -1
- package/dist/cli/core/index.d.ts +113 -129
- package/dist/cli/core/index.d.ts.map +1 -1
- package/dist/cli/core/index.js +75 -7
- package/dist/cli/core/index.js.map +1 -1
- package/dist/cli/devtools/index.d.ts +3 -2
- package/dist/cli/devtools/index.d.ts.map +1 -1
- package/dist/cli/platform/index.d.ts +346 -290
- package/dist/cli/platform/index.d.ts.map +1 -1
- package/dist/cli/platform/index.js +105 -6
- package/dist/cli/platform/index.js.map +1 -1
- package/dist/cli/vendor/index.d.ts +12 -11
- package/dist/cli/vendor/index.d.ts.map +1 -1
- package/dist/command/index.d.ts +5 -4
- package/dist/command/index.d.ts.map +1 -1
- package/dist/core/index.browser.js +1 -1
- package/dist/core/index.browser.js.map +1 -1
- package/dist/core/index.d.ts +119 -118
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.native.js +1 -1
- package/dist/core/index.native.js.map +1 -1
- package/dist/core/index.workerd.js +1 -1
- package/dist/core/index.workerd.js.map +1 -1
- package/dist/crypto/index.d.ts +3 -2
- package/dist/crypto/index.d.ts.map +1 -1
- package/dist/email/core/index.d.ts +3 -2
- package/dist/email/core/index.d.ts.map +1 -1
- package/dist/email/smtp/index.d.ts +7 -6
- package/dist/email/smtp/index.d.ts.map +1 -1
- package/dist/lock/core/index.d.ts +5 -4
- package/dist/lock/core/index.d.ts.map +1 -1
- package/dist/logger/index.d.ts +10 -9
- package/dist/logger/index.d.ts.map +1 -1
- package/dist/mcp/index.d.ts +9 -8
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/index.js.map +1 -1
- package/dist/orm/core/index.browser.js +9 -3
- package/dist/orm/core/index.browser.js.map +1 -1
- package/dist/orm/core/index.bun.js +31 -10
- package/dist/orm/core/index.bun.js.map +1 -1
- package/dist/orm/core/index.d.ts +33 -14
- package/dist/orm/core/index.d.ts.map +1 -1
- package/dist/orm/core/index.js +31 -10
- package/dist/orm/core/index.js.map +1 -1
- package/dist/orm/postgres/index.d.ts +6 -5
- package/dist/orm/postgres/index.d.ts.map +1 -1
- package/dist/queue/core/index.d.ts +5 -4
- package/dist/queue/core/index.d.ts.map +1 -1
- package/dist/queue/redis/index.d.ts +3 -2
- package/dist/queue/redis/index.d.ts.map +1 -1
- package/dist/react/form/index.d.ts +5 -0
- package/dist/react/form/index.d.ts.map +1 -1
- package/dist/react/form/index.js +6 -4
- package/dist/react/form/index.js.map +1 -1
- package/dist/react/i18n/index.d.ts +2 -1
- package/dist/react/i18n/index.d.ts.map +1 -1
- package/dist/react/router/index.d.ts +206 -205
- package/dist/react/router/index.d.ts.map +1 -1
- package/dist/react/ui/index.d.ts +11 -11
- package/dist/react/ui/index.d.ts.map +1 -1
- package/dist/scheduler/index.d.ts +3 -2
- package/dist/scheduler/index.d.ts.map +1 -1
- package/dist/security/index.browser.js +29 -1
- package/dist/security/index.browser.js.map +1 -1
- package/dist/security/index.d.ts +82 -35
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/index.js +56 -3
- package/dist/security/index.js.map +1 -1
- package/dist/server/auth/index.d.ts +163 -158
- package/dist/server/auth/index.d.ts.map +1 -1
- package/dist/server/auth/index.js +16 -4
- package/dist/server/auth/index.js.map +1 -1
- package/dist/server/core/index.d.ts +35 -34
- package/dist/server/core/index.d.ts.map +1 -1
- package/dist/server/cors/index.d.ts +7 -6
- package/dist/server/cors/index.d.ts.map +1 -1
- package/dist/server/health/index.d.ts +16 -15
- package/dist/server/health/index.d.ts.map +1 -1
- package/dist/server/links/index.d.ts +51 -50
- package/dist/server/links/index.d.ts.map +1 -1
- package/dist/server/rate-limit/index.d.ts +6 -5
- package/dist/server/rate-limit/index.d.ts.map +1 -1
- package/dist/server/swagger/index.d.ts +2 -1
- package/dist/server/swagger/index.d.ts.map +1 -1
- package/dist/topic/redis/index.d.ts +3 -2
- package/dist/topic/redis/index.d.ts.map +1 -1
- package/package.json +16 -32
- package/src/api/audits/entities/audits.ts +1 -0
- package/src/api/files/entities/files.ts +1 -0
- package/src/api/jobs/__tests__/$job.spec.ts +92 -40
- package/src/api/jobs/entities/jobExecutionEntity.ts +1 -0
- package/src/api/jobs/providers/JobProvider.ts +20 -5
- package/src/api/jobs/schemas/jobConfigAtom.ts +5 -0
- package/src/api/keys/entities/apiKeyEntity.ts +1 -0
- package/src/api/payments/controllers/MockCheckoutController.ts +146 -0
- package/src/api/payments/index.ts +3 -0
- package/src/api/payments/providers/MemoryPaymentProvider.ts +9 -4
- package/src/api/payments/providers/PaymentProvider.ts +25 -9
- package/src/api/payments/services/PaymentService.ts +3 -0
- package/src/api/subscriptions/__tests__/BillingService.spec.ts +218 -0
- package/src/api/subscriptions/__tests__/SubscriptionService.spec.ts +278 -0
- package/src/api/subscriptions/controllers/AdminSubscriptionController.ts +212 -0
- package/src/api/subscriptions/controllers/SubscriptionController.ts +189 -0
- package/src/api/subscriptions/entities/subscriptionEvents.ts +54 -0
- package/src/api/subscriptions/entities/subscriptions.ts +68 -0
- package/src/api/subscriptions/index.ts +133 -0
- package/src/api/subscriptions/jobs/SubscriptionJobs.ts +382 -0
- package/src/api/subscriptions/middleware/$requireLimit.ts +50 -0
- package/src/api/subscriptions/middleware/$requirePlan.ts +49 -0
- package/src/api/subscriptions/notifications/SubscriptionNotifications.ts +110 -0
- package/src/api/subscriptions/schemas/cancelSubscriptionSchema.ts +8 -0
- package/src/api/subscriptions/schemas/changePlanSchema.ts +9 -0
- package/src/api/subscriptions/schemas/createSubscriptionSchema.ts +11 -0
- package/src/api/subscriptions/schemas/entitlementsSchema.ts +21 -0
- package/src/api/subscriptions/schemas/mrrSchema.ts +13 -0
- package/src/api/subscriptions/schemas/planDefinitionSchema.ts +71 -0
- package/src/api/subscriptions/schemas/planResourceSchema.ts +25 -0
- package/src/api/subscriptions/schemas/subscriptionEventResourceSchema.ts +8 -0
- package/src/api/subscriptions/schemas/subscriptionQuerySchema.ts +19 -0
- package/src/api/subscriptions/schemas/subscriptionResourceSchema.ts +6 -0
- package/src/api/subscriptions/schemas/subscriptionSettingsSchema.ts +32 -0
- package/src/api/subscriptions/schemas/subscriptionStatsSchema.ts +23 -0
- package/src/api/subscriptions/services/BillingService.ts +437 -0
- package/src/api/subscriptions/services/SubscriptionConfig.ts +56 -0
- package/src/api/subscriptions/services/SubscriptionService.ts +867 -0
- package/src/api/subscriptions/services/UsageService.ts +118 -0
- package/src/cache/core/__tests__/$cache.memory.spec.ts +450 -0
- package/src/cache/core/__tests__/$cache.swr.spec.ts +394 -0
- package/src/cache/core/index.ts +16 -0
- package/src/cache/core/primitives/$cache.ts +347 -21
- package/src/cli/core/tasks/BuildCloudflareTask.ts +16 -0
- package/src/cli/core/templates/agentMd.ts +39 -4
- package/src/cli/core/templates/biomeJson.ts +25 -1
- package/src/cli/core/templates/saasAdminLayoutTsx.ts +2 -2
- package/src/cli/platform/__tests__/CloudflareAdapter.spec.ts +117 -0
- package/src/cli/platform/adapters/CloudflareAdapter.ts +104 -7
- package/src/cli/platform/atoms/platformOptions.ts +13 -0
- package/src/cli/platform/schemas/platform.ts +1 -0
- package/src/cli/platform/services/CloudflareApi.ts +61 -0
- package/src/cli/platform/services/PlatformOrchestrator.ts +9 -4
- package/src/core/__tests__/$module.spec.ts +2 -2
- package/src/core/primitives/$module.ts +4 -4
- package/src/mcp/providers/McpServerProvider.ts +1 -1
- package/src/orm/core/providers/DatabaseTypeProvider.ts +9 -3
- package/src/orm/core/providers/drivers/DatabaseProvider.ts +1 -1
- package/src/orm/core/schemas/insertSchema.ts +10 -2
- package/src/orm/core/services/Repository.ts +27 -7
- package/src/react/form/hooks/useFormState.ts +8 -1
- package/src/react/form/index.ts +10 -1
- package/src/react/form/services/FormModel.ts +9 -3
- package/src/security/atoms/currentTenantAtom.ts +34 -0
- package/src/security/index.browser.ts +1 -0
- package/src/security/index.ts +12 -1
- package/src/security/primitives/$issuer.ts +17 -1
- package/src/security/providers/SecurityProvider.ts +37 -0
- package/src/server/auth/__tests__/validateRedirectUri.spec.ts +78 -0
- package/src/server/auth/providers/ServerAuthProvider.ts +21 -5
- package/tsconfig.base.json +2 -1
- package/dist/react/websocket/index.d.ts +0 -117
- package/dist/react/websocket/index.d.ts.map +0 -1
- package/dist/react/websocket/index.js +0 -108
- package/dist/react/websocket/index.js.map +0 -1
- package/dist/websocket/index.browser.js +0 -848
- package/dist/websocket/index.browser.js.map +0 -1
- package/dist/websocket/index.d.ts +0 -876
- package/dist/websocket/index.d.ts.map +0 -1
- package/dist/websocket/index.js +0 -1185
- package/dist/websocket/index.js.map +0 -1
- package/src/react/websocket/hooks/useRoom.tsx +0 -251
- package/src/react/websocket/index.ts +0 -7
- package/src/websocket/__tests__/$channel.spec.ts +0 -30
- package/src/websocket/__tests__/$websocket-new.spec.ts +0 -195
- package/src/websocket/__tests__/RoomManager.spec.ts +0 -146
- package/src/websocket/__tests__/websocket-integration.spec.ts +0 -951
- package/src/websocket/errors/WebSocketError.ts +0 -34
- package/src/websocket/index.browser.ts +0 -25
- package/src/websocket/index.shared.ts +0 -8
- package/src/websocket/index.ts +0 -85
- package/src/websocket/interfaces/WebSocketInterfaces.ts +0 -252
- package/src/websocket/primitives/$channel.ts +0 -131
- package/src/websocket/primitives/$websocket.ts +0 -107
- package/src/websocket/providers/NodeWebSocketServerProvider.ts +0 -617
- package/src/websocket/providers/WebSocketServerProvider.ts +0 -56
- package/src/websocket/services/RoomManager.ts +0 -160
- package/src/websocket/services/WebSocketClient.ts +0 -642
- package/src/websocket/services/WebSocketTopicService.ts +0 -108
|
@@ -5,13 +5,14 @@ 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 * as _$typebox from "typebox";
|
|
8
9
|
import { BuildExtraConfigColumns, SQL } from "drizzle-orm";
|
|
9
10
|
import { PgColumnBuilderBase, PgSequenceOptions, PgTableExtraConfigValue, UpdateDeleteAction } from "drizzle-orm/pg-core";
|
|
10
11
|
//#region ../../src/api/audits/entities/audits.d.ts
|
|
11
12
|
/**
|
|
12
13
|
* Audit severity levels for categorizing events.
|
|
13
14
|
*/
|
|
14
|
-
declare const auditSeveritySchema: _$
|
|
15
|
+
declare const auditSeveritySchema: _$typebox.TUnsafe<"info" | "warning" | "critical">;
|
|
15
16
|
type AuditSeverity = Static<typeof auditSeveritySchema>;
|
|
16
17
|
/**
|
|
17
18
|
* Audit log entity for tracking important system events.
|
|
@@ -22,212 +23,215 @@ type AuditSeverity = Static<typeof auditSeveritySchema>;
|
|
|
22
23
|
* - When it happened (createdAt)
|
|
23
24
|
* - Context and details (metadata, ipAddress, userAgent)
|
|
24
25
|
*/
|
|
25
|
-
declare const audits: _$alepha_orm0.EntityPrimitive<_$
|
|
26
|
-
id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$
|
|
27
|
-
createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$
|
|
26
|
+
declare const audits: _$alepha_orm0.EntityPrimitive<_$typebox.TObject<{
|
|
27
|
+
id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
28
|
+
createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
29
|
+
organizationId: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_ORGANIZATION>;
|
|
28
30
|
/**
|
|
29
31
|
* Audit event type (e.g., "auth", "user", "payment", "system").
|
|
30
32
|
* Used for categorizing and filtering audit events.
|
|
31
33
|
*/
|
|
32
|
-
type: _$
|
|
34
|
+
type: _$typebox.TString;
|
|
33
35
|
/**
|
|
34
36
|
* Specific action performed (e.g., "login", "logout", "create", "update", "delete").
|
|
35
37
|
*/
|
|
36
|
-
action: _$
|
|
38
|
+
action: _$typebox.TString;
|
|
37
39
|
/**
|
|
38
40
|
* Severity level of the event.
|
|
39
41
|
*/
|
|
40
|
-
severity: _$alepha_orm0.PgAttr<_$
|
|
42
|
+
severity: _$alepha_orm0.PgAttr<_$typebox.TUnsafe<"info" | "warning" | "critical">, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
41
43
|
/**
|
|
42
44
|
* User ID who performed the action (null for system events).
|
|
43
45
|
*/
|
|
44
|
-
userId: _$
|
|
46
|
+
userId: _$typebox.TOptional<_$typebox.TString>;
|
|
45
47
|
/**
|
|
46
48
|
* User realm for multi-tenant support.
|
|
47
49
|
*/
|
|
48
|
-
userRealm: _$
|
|
50
|
+
userRealm: _$typebox.TOptional<_$typebox.TString>;
|
|
49
51
|
/**
|
|
50
52
|
* User email at the time of the event (denormalized for history).
|
|
51
53
|
*/
|
|
52
|
-
userEmail: _$
|
|
54
|
+
userEmail: _$typebox.TOptional<_$typebox.TString>;
|
|
53
55
|
/**
|
|
54
56
|
* Resource type affected (e.g., "user", "order", "file").
|
|
55
57
|
*/
|
|
56
|
-
resourceType: _$
|
|
58
|
+
resourceType: _$typebox.TOptional<_$typebox.TString>;
|
|
57
59
|
/**
|
|
58
60
|
* Resource ID affected.
|
|
59
61
|
*/
|
|
60
|
-
resourceId: _$
|
|
62
|
+
resourceId: _$typebox.TOptional<_$typebox.TString>;
|
|
61
63
|
/**
|
|
62
64
|
* Human-readable description of the event.
|
|
63
65
|
*/
|
|
64
|
-
description: _$
|
|
66
|
+
description: _$typebox.TOptional<_$typebox.TString>;
|
|
65
67
|
/**
|
|
66
68
|
* Additional metadata/context as JSON.
|
|
67
69
|
*/
|
|
68
|
-
metadata: _$
|
|
70
|
+
metadata: _$typebox.TOptional<_$typebox.TRecord<string, _$typebox.TAny>>;
|
|
69
71
|
/**
|
|
70
72
|
* Client IP address.
|
|
71
73
|
*/
|
|
72
|
-
ipAddress: _$
|
|
74
|
+
ipAddress: _$typebox.TOptional<_$typebox.TString>;
|
|
73
75
|
/**
|
|
74
76
|
* Client user agent.
|
|
75
77
|
*/
|
|
76
|
-
userAgent: _$
|
|
78
|
+
userAgent: _$typebox.TOptional<_$typebox.TString>;
|
|
77
79
|
/**
|
|
78
80
|
* Session ID if applicable.
|
|
79
81
|
*/
|
|
80
|
-
sessionId: _$
|
|
82
|
+
sessionId: _$typebox.TOptional<_$typebox.TString>;
|
|
81
83
|
/**
|
|
82
84
|
* Request ID for correlation.
|
|
83
85
|
*/
|
|
84
|
-
requestId: _$
|
|
86
|
+
requestId: _$typebox.TOptional<_$typebox.TString>;
|
|
85
87
|
/**
|
|
86
88
|
* Whether the action was successful.
|
|
87
89
|
*/
|
|
88
|
-
success: _$alepha_orm0.PgAttr<_$
|
|
90
|
+
success: _$alepha_orm0.PgAttr<_$typebox.TBoolean, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
89
91
|
/**
|
|
90
92
|
* Error message if the action failed.
|
|
91
93
|
*/
|
|
92
|
-
errorMessage: _$
|
|
94
|
+
errorMessage: _$typebox.TOptional<_$typebox.TString>;
|
|
93
95
|
}>>;
|
|
94
|
-
declare const auditEntitySchema: _$
|
|
95
|
-
id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$
|
|
96
|
-
createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$
|
|
96
|
+
declare const auditEntitySchema: _$typebox.TObject<{
|
|
97
|
+
id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
98
|
+
createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
99
|
+
organizationId: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_ORGANIZATION>;
|
|
97
100
|
/**
|
|
98
101
|
* Audit event type (e.g., "auth", "user", "payment", "system").
|
|
99
102
|
* Used for categorizing and filtering audit events.
|
|
100
103
|
*/
|
|
101
|
-
type: _$
|
|
104
|
+
type: _$typebox.TString;
|
|
102
105
|
/**
|
|
103
106
|
* Specific action performed (e.g., "login", "logout", "create", "update", "delete").
|
|
104
107
|
*/
|
|
105
|
-
action: _$
|
|
108
|
+
action: _$typebox.TString;
|
|
106
109
|
/**
|
|
107
110
|
* Severity level of the event.
|
|
108
111
|
*/
|
|
109
|
-
severity: _$alepha_orm0.PgAttr<_$
|
|
112
|
+
severity: _$alepha_orm0.PgAttr<_$typebox.TUnsafe<"info" | "warning" | "critical">, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
110
113
|
/**
|
|
111
114
|
* User ID who performed the action (null for system events).
|
|
112
115
|
*/
|
|
113
|
-
userId: _$
|
|
116
|
+
userId: _$typebox.TOptional<_$typebox.TString>;
|
|
114
117
|
/**
|
|
115
118
|
* User realm for multi-tenant support.
|
|
116
119
|
*/
|
|
117
|
-
userRealm: _$
|
|
120
|
+
userRealm: _$typebox.TOptional<_$typebox.TString>;
|
|
118
121
|
/**
|
|
119
122
|
* User email at the time of the event (denormalized for history).
|
|
120
123
|
*/
|
|
121
|
-
userEmail: _$
|
|
124
|
+
userEmail: _$typebox.TOptional<_$typebox.TString>;
|
|
122
125
|
/**
|
|
123
126
|
* Resource type affected (e.g., "user", "order", "file").
|
|
124
127
|
*/
|
|
125
|
-
resourceType: _$
|
|
128
|
+
resourceType: _$typebox.TOptional<_$typebox.TString>;
|
|
126
129
|
/**
|
|
127
130
|
* Resource ID affected.
|
|
128
131
|
*/
|
|
129
|
-
resourceId: _$
|
|
132
|
+
resourceId: _$typebox.TOptional<_$typebox.TString>;
|
|
130
133
|
/**
|
|
131
134
|
* Human-readable description of the event.
|
|
132
135
|
*/
|
|
133
|
-
description: _$
|
|
136
|
+
description: _$typebox.TOptional<_$typebox.TString>;
|
|
134
137
|
/**
|
|
135
138
|
* Additional metadata/context as JSON.
|
|
136
139
|
*/
|
|
137
|
-
metadata: _$
|
|
140
|
+
metadata: _$typebox.TOptional<_$typebox.TRecord<string, _$typebox.TAny>>;
|
|
138
141
|
/**
|
|
139
142
|
* Client IP address.
|
|
140
143
|
*/
|
|
141
|
-
ipAddress: _$
|
|
144
|
+
ipAddress: _$typebox.TOptional<_$typebox.TString>;
|
|
142
145
|
/**
|
|
143
146
|
* Client user agent.
|
|
144
147
|
*/
|
|
145
|
-
userAgent: _$
|
|
148
|
+
userAgent: _$typebox.TOptional<_$typebox.TString>;
|
|
146
149
|
/**
|
|
147
150
|
* Session ID if applicable.
|
|
148
151
|
*/
|
|
149
|
-
sessionId: _$
|
|
152
|
+
sessionId: _$typebox.TOptional<_$typebox.TString>;
|
|
150
153
|
/**
|
|
151
154
|
* Request ID for correlation.
|
|
152
155
|
*/
|
|
153
|
-
requestId: _$
|
|
156
|
+
requestId: _$typebox.TOptional<_$typebox.TString>;
|
|
154
157
|
/**
|
|
155
158
|
* Whether the action was successful.
|
|
156
159
|
*/
|
|
157
|
-
success: _$alepha_orm0.PgAttr<_$
|
|
160
|
+
success: _$alepha_orm0.PgAttr<_$typebox.TBoolean, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
158
161
|
/**
|
|
159
162
|
* Error message if the action failed.
|
|
160
163
|
*/
|
|
161
|
-
errorMessage: _$
|
|
164
|
+
errorMessage: _$typebox.TOptional<_$typebox.TString>;
|
|
162
165
|
}>;
|
|
163
|
-
declare const auditEntityInsertSchema: _$alepha_orm0.TObjectInsert<_$
|
|
164
|
-
id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$
|
|
165
|
-
createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$
|
|
166
|
+
declare const auditEntityInsertSchema: _$alepha_orm0.TObjectInsert<_$typebox.TObject<{
|
|
167
|
+
id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
168
|
+
createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
169
|
+
organizationId: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_ORGANIZATION>;
|
|
166
170
|
/**
|
|
167
171
|
* Audit event type (e.g., "auth", "user", "payment", "system").
|
|
168
172
|
* Used for categorizing and filtering audit events.
|
|
169
173
|
*/
|
|
170
|
-
type: _$
|
|
174
|
+
type: _$typebox.TString;
|
|
171
175
|
/**
|
|
172
176
|
* Specific action performed (e.g., "login", "logout", "create", "update", "delete").
|
|
173
177
|
*/
|
|
174
|
-
action: _$
|
|
178
|
+
action: _$typebox.TString;
|
|
175
179
|
/**
|
|
176
180
|
* Severity level of the event.
|
|
177
181
|
*/
|
|
178
|
-
severity: _$alepha_orm0.PgAttr<_$
|
|
182
|
+
severity: _$alepha_orm0.PgAttr<_$typebox.TUnsafe<"info" | "warning" | "critical">, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
179
183
|
/**
|
|
180
184
|
* User ID who performed the action (null for system events).
|
|
181
185
|
*/
|
|
182
|
-
userId: _$
|
|
186
|
+
userId: _$typebox.TOptional<_$typebox.TString>;
|
|
183
187
|
/**
|
|
184
188
|
* User realm for multi-tenant support.
|
|
185
189
|
*/
|
|
186
|
-
userRealm: _$
|
|
190
|
+
userRealm: _$typebox.TOptional<_$typebox.TString>;
|
|
187
191
|
/**
|
|
188
192
|
* User email at the time of the event (denormalized for history).
|
|
189
193
|
*/
|
|
190
|
-
userEmail: _$
|
|
194
|
+
userEmail: _$typebox.TOptional<_$typebox.TString>;
|
|
191
195
|
/**
|
|
192
196
|
* Resource type affected (e.g., "user", "order", "file").
|
|
193
197
|
*/
|
|
194
|
-
resourceType: _$
|
|
198
|
+
resourceType: _$typebox.TOptional<_$typebox.TString>;
|
|
195
199
|
/**
|
|
196
200
|
* Resource ID affected.
|
|
197
201
|
*/
|
|
198
|
-
resourceId: _$
|
|
202
|
+
resourceId: _$typebox.TOptional<_$typebox.TString>;
|
|
199
203
|
/**
|
|
200
204
|
* Human-readable description of the event.
|
|
201
205
|
*/
|
|
202
|
-
description: _$
|
|
206
|
+
description: _$typebox.TOptional<_$typebox.TString>;
|
|
203
207
|
/**
|
|
204
208
|
* Additional metadata/context as JSON.
|
|
205
209
|
*/
|
|
206
|
-
metadata: _$
|
|
210
|
+
metadata: _$typebox.TOptional<_$typebox.TRecord<string, _$typebox.TAny>>;
|
|
207
211
|
/**
|
|
208
212
|
* Client IP address.
|
|
209
213
|
*/
|
|
210
|
-
ipAddress: _$
|
|
214
|
+
ipAddress: _$typebox.TOptional<_$typebox.TString>;
|
|
211
215
|
/**
|
|
212
216
|
* Client user agent.
|
|
213
217
|
*/
|
|
214
|
-
userAgent: _$
|
|
218
|
+
userAgent: _$typebox.TOptional<_$typebox.TString>;
|
|
215
219
|
/**
|
|
216
220
|
* Session ID if applicable.
|
|
217
221
|
*/
|
|
218
|
-
sessionId: _$
|
|
222
|
+
sessionId: _$typebox.TOptional<_$typebox.TString>;
|
|
219
223
|
/**
|
|
220
224
|
* Request ID for correlation.
|
|
221
225
|
*/
|
|
222
|
-
requestId: _$
|
|
226
|
+
requestId: _$typebox.TOptional<_$typebox.TString>;
|
|
223
227
|
/**
|
|
224
228
|
* Whether the action was successful.
|
|
225
229
|
*/
|
|
226
|
-
success: _$alepha_orm0.PgAttr<_$
|
|
230
|
+
success: _$alepha_orm0.PgAttr<_$typebox.TBoolean, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
227
231
|
/**
|
|
228
232
|
* Error message if the action failed.
|
|
229
233
|
*/
|
|
230
|
-
errorMessage: _$
|
|
234
|
+
errorMessage: _$typebox.TOptional<_$typebox.TString>;
|
|
231
235
|
}>>;
|
|
232
236
|
type AuditEntity = Static<typeof audits.schema>;
|
|
233
237
|
//#endregion
|
|
@@ -235,21 +239,21 @@ type AuditEntity = Static<typeof audits.schema>;
|
|
|
235
239
|
/**
|
|
236
240
|
* Query schema for searching and filtering audit logs.
|
|
237
241
|
*/
|
|
238
|
-
declare const auditQuerySchema: _$
|
|
239
|
-
page: _$
|
|
240
|
-
size: _$
|
|
241
|
-
sort: _$
|
|
242
|
-
type: _$
|
|
243
|
-
action: _$
|
|
244
|
-
severity: _$
|
|
245
|
-
userId: _$
|
|
246
|
-
userRealm: _$
|
|
247
|
-
resourceType: _$
|
|
248
|
-
resourceId: _$
|
|
249
|
-
success: _$
|
|
250
|
-
from: _$
|
|
251
|
-
to: _$
|
|
252
|
-
search: _$
|
|
242
|
+
declare const auditQuerySchema: _$typebox.TObject<{
|
|
243
|
+
page: _$typebox.TOptional<_$typebox.TInteger>;
|
|
244
|
+
size: _$typebox.TOptional<_$typebox.TInteger>;
|
|
245
|
+
sort: _$typebox.TOptional<_$typebox.TString>;
|
|
246
|
+
type: _$typebox.TOptional<_$typebox.TString>;
|
|
247
|
+
action: _$typebox.TOptional<_$typebox.TString>;
|
|
248
|
+
severity: _$typebox.TOptional<_$typebox.TUnsafe<"info" | "warning" | "critical">>;
|
|
249
|
+
userId: _$typebox.TOptional<_$typebox.TString>;
|
|
250
|
+
userRealm: _$typebox.TOptional<_$typebox.TString>;
|
|
251
|
+
resourceType: _$typebox.TOptional<_$typebox.TString>;
|
|
252
|
+
resourceId: _$typebox.TOptional<_$typebox.TString>;
|
|
253
|
+
success: _$typebox.TOptional<_$typebox.TBoolean>;
|
|
254
|
+
from: _$typebox.TOptional<_$typebox.TString>;
|
|
255
|
+
to: _$typebox.TOptional<_$typebox.TString>;
|
|
256
|
+
search: _$typebox.TOptional<_$typebox.TString>;
|
|
253
257
|
}>;
|
|
254
258
|
type AuditQuery = Static<typeof auditQuerySchema>;
|
|
255
259
|
//#endregion
|
|
@@ -257,23 +261,23 @@ type AuditQuery = Static<typeof auditQuerySchema>;
|
|
|
257
261
|
/**
|
|
258
262
|
* Schema for creating a new audit log entry.
|
|
259
263
|
*/
|
|
260
|
-
declare const createAuditSchema: _$
|
|
261
|
-
type: _$
|
|
262
|
-
action: _$
|
|
263
|
-
severity: _$
|
|
264
|
-
userId: _$
|
|
265
|
-
userRealm: _$
|
|
266
|
-
userEmail: _$
|
|
267
|
-
resourceType: _$
|
|
268
|
-
resourceId: _$
|
|
269
|
-
description: _$
|
|
270
|
-
metadata: _$
|
|
271
|
-
ipAddress: _$
|
|
272
|
-
userAgent: _$
|
|
273
|
-
sessionId: _$
|
|
274
|
-
requestId: _$
|
|
275
|
-
success: _$
|
|
276
|
-
errorMessage: _$
|
|
264
|
+
declare const createAuditSchema: _$typebox.TObject<{
|
|
265
|
+
type: _$typebox.TString;
|
|
266
|
+
action: _$typebox.TString;
|
|
267
|
+
severity: _$typebox.TOptional<_$typebox.TUnsafe<"info" | "warning" | "critical">>;
|
|
268
|
+
userId: _$typebox.TOptional<_$typebox.TString>;
|
|
269
|
+
userRealm: _$typebox.TOptional<_$typebox.TString>;
|
|
270
|
+
userEmail: _$typebox.TOptional<_$typebox.TString>;
|
|
271
|
+
resourceType: _$typebox.TOptional<_$typebox.TString>;
|
|
272
|
+
resourceId: _$typebox.TOptional<_$typebox.TString>;
|
|
273
|
+
description: _$typebox.TOptional<_$typebox.TString>;
|
|
274
|
+
metadata: _$typebox.TOptional<_$typebox.TRecord<string, _$typebox.TAny>>;
|
|
275
|
+
ipAddress: _$typebox.TOptional<_$typebox.TString>;
|
|
276
|
+
userAgent: _$typebox.TOptional<_$typebox.TString>;
|
|
277
|
+
sessionId: _$typebox.TOptional<_$typebox.TString>;
|
|
278
|
+
requestId: _$typebox.TOptional<_$typebox.TString>;
|
|
279
|
+
success: _$typebox.TOptional<_$typebox.TBoolean>;
|
|
280
|
+
errorMessage: _$typebox.TOptional<_$typebox.TString>;
|
|
277
281
|
}>;
|
|
278
282
|
type CreateAudit = Static<typeof createAuditSchema>;
|
|
279
283
|
//#endregion
|
|
@@ -298,25 +302,26 @@ interface AuditTypeDefinition {
|
|
|
298
302
|
declare class AuditService {
|
|
299
303
|
protected readonly alepha: Alepha;
|
|
300
304
|
protected readonly log: _$alepha_logger0.Logger;
|
|
301
|
-
protected readonly repo: _$alepha_orm0.Repository<_$
|
|
302
|
-
id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$
|
|
303
|
-
createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
305
|
+
protected readonly repo: _$alepha_orm0.Repository<_$typebox.TObject<{
|
|
306
|
+
id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
307
|
+
createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
308
|
+
organizationId: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_ORGANIZATION>;
|
|
309
|
+
type: _$typebox.TString;
|
|
310
|
+
action: _$typebox.TString;
|
|
311
|
+
severity: _$alepha_orm0.PgAttr<_$typebox.TUnsafe<"info" | "warning" | "critical">, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
312
|
+
userId: _$typebox.TOptional<_$typebox.TString>;
|
|
313
|
+
userRealm: _$typebox.TOptional<_$typebox.TString>;
|
|
314
|
+
userEmail: _$typebox.TOptional<_$typebox.TString>;
|
|
315
|
+
resourceType: _$typebox.TOptional<_$typebox.TString>;
|
|
316
|
+
resourceId: _$typebox.TOptional<_$typebox.TString>;
|
|
317
|
+
description: _$typebox.TOptional<_$typebox.TString>;
|
|
318
|
+
metadata: _$typebox.TOptional<_$typebox.TRecord<string, _$typebox.TAny>>;
|
|
319
|
+
ipAddress: _$typebox.TOptional<_$typebox.TString>;
|
|
320
|
+
userAgent: _$typebox.TOptional<_$typebox.TString>;
|
|
321
|
+
sessionId: _$typebox.TOptional<_$typebox.TString>;
|
|
322
|
+
requestId: _$typebox.TOptional<_$typebox.TString>;
|
|
323
|
+
success: _$alepha_orm0.PgAttr<_$typebox.TBoolean, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
324
|
+
errorMessage: _$typebox.TOptional<_$typebox.TString>;
|
|
320
325
|
}>>;
|
|
321
326
|
/**
|
|
322
327
|
* Registry of audit types and their allowed actions.
|
|
@@ -417,93 +422,96 @@ declare class AdminAuditController {
|
|
|
417
422
|
protected readonly url = "/audits";
|
|
418
423
|
protected readonly group = "admin:audits";
|
|
419
424
|
protected readonly auditService: AuditService;
|
|
420
|
-
protected readonly repo: _$alepha_orm0.Repository<_$
|
|
421
|
-
id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$
|
|
422
|
-
createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
425
|
+
protected readonly repo: _$alepha_orm0.Repository<_$typebox.TObject<{
|
|
426
|
+
id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
427
|
+
createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
428
|
+
organizationId: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_ORGANIZATION>;
|
|
429
|
+
type: _$typebox.TString;
|
|
430
|
+
action: _$typebox.TString;
|
|
431
|
+
severity: _$alepha_orm0.PgAttr<_$typebox.TUnsafe<"info" | "warning" | "critical">, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
432
|
+
userId: _$typebox.TOptional<_$typebox.TString>;
|
|
433
|
+
userRealm: _$typebox.TOptional<_$typebox.TString>;
|
|
434
|
+
userEmail: _$typebox.TOptional<_$typebox.TString>;
|
|
435
|
+
resourceType: _$typebox.TOptional<_$typebox.TString>;
|
|
436
|
+
resourceId: _$typebox.TOptional<_$typebox.TString>;
|
|
437
|
+
description: _$typebox.TOptional<_$typebox.TString>;
|
|
438
|
+
metadata: _$typebox.TOptional<_$typebox.TRecord<string, _$typebox.TAny>>;
|
|
439
|
+
ipAddress: _$typebox.TOptional<_$typebox.TString>;
|
|
440
|
+
userAgent: _$typebox.TOptional<_$typebox.TString>;
|
|
441
|
+
sessionId: _$typebox.TOptional<_$typebox.TString>;
|
|
442
|
+
requestId: _$typebox.TOptional<_$typebox.TString>;
|
|
443
|
+
success: _$alepha_orm0.PgAttr<_$typebox.TBoolean, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
444
|
+
errorMessage: _$typebox.TOptional<_$typebox.TString>;
|
|
439
445
|
}>>;
|
|
440
446
|
/**
|
|
441
447
|
* Find audit entries with filtering and pagination.
|
|
442
448
|
*/
|
|
443
449
|
readonly findAudits: _$alepha_server0.ActionPrimitiveFn<{
|
|
444
|
-
query: _$
|
|
445
|
-
page: _$
|
|
446
|
-
size: _$
|
|
447
|
-
sort: _$
|
|
448
|
-
type: _$
|
|
449
|
-
action: _$
|
|
450
|
-
severity: _$
|
|
451
|
-
userId: _$
|
|
452
|
-
userRealm: _$
|
|
453
|
-
resourceType: _$
|
|
454
|
-
resourceId: _$
|
|
455
|
-
success: _$
|
|
456
|
-
from: _$
|
|
457
|
-
to: _$
|
|
458
|
-
search: _$
|
|
450
|
+
query: _$typebox.TObject<{
|
|
451
|
+
page: _$typebox.TOptional<_$typebox.TInteger>;
|
|
452
|
+
size: _$typebox.TOptional<_$typebox.TInteger>;
|
|
453
|
+
sort: _$typebox.TOptional<_$typebox.TString>;
|
|
454
|
+
type: _$typebox.TOptional<_$typebox.TString>;
|
|
455
|
+
action: _$typebox.TOptional<_$typebox.TString>;
|
|
456
|
+
severity: _$typebox.TOptional<_$typebox.TUnsafe<"info" | "warning" | "critical">>;
|
|
457
|
+
userId: _$typebox.TOptional<_$typebox.TString>;
|
|
458
|
+
userRealm: _$typebox.TOptional<_$typebox.TString>;
|
|
459
|
+
resourceType: _$typebox.TOptional<_$typebox.TString>;
|
|
460
|
+
resourceId: _$typebox.TOptional<_$typebox.TString>;
|
|
461
|
+
success: _$typebox.TOptional<_$typebox.TBoolean>;
|
|
462
|
+
from: _$typebox.TOptional<_$typebox.TString>;
|
|
463
|
+
to: _$typebox.TOptional<_$typebox.TString>;
|
|
464
|
+
search: _$typebox.TOptional<_$typebox.TString>;
|
|
459
465
|
}>;
|
|
460
|
-
response: _$alepha.TPage<_$
|
|
461
|
-
id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$
|
|
462
|
-
createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
466
|
+
response: _$alepha.TPage<_$typebox.TObject<{
|
|
467
|
+
id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
468
|
+
createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
469
|
+
organizationId: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_ORGANIZATION>;
|
|
470
|
+
type: _$typebox.TString;
|
|
471
|
+
action: _$typebox.TString;
|
|
472
|
+
severity: _$alepha_orm0.PgAttr<_$typebox.TUnsafe<"info" | "warning" | "critical">, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
473
|
+
userId: _$typebox.TOptional<_$typebox.TString>;
|
|
474
|
+
userRealm: _$typebox.TOptional<_$typebox.TString>;
|
|
475
|
+
userEmail: _$typebox.TOptional<_$typebox.TString>;
|
|
476
|
+
resourceType: _$typebox.TOptional<_$typebox.TString>;
|
|
477
|
+
resourceId: _$typebox.TOptional<_$typebox.TString>;
|
|
478
|
+
description: _$typebox.TOptional<_$typebox.TString>;
|
|
479
|
+
metadata: _$typebox.TOptional<_$typebox.TRecord<string, _$typebox.TAny>>;
|
|
480
|
+
ipAddress: _$typebox.TOptional<_$typebox.TString>;
|
|
481
|
+
userAgent: _$typebox.TOptional<_$typebox.TString>;
|
|
482
|
+
sessionId: _$typebox.TOptional<_$typebox.TString>;
|
|
483
|
+
requestId: _$typebox.TOptional<_$typebox.TString>;
|
|
484
|
+
success: _$alepha_orm0.PgAttr<_$typebox.TBoolean, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
485
|
+
errorMessage: _$typebox.TOptional<_$typebox.TString>;
|
|
479
486
|
}>>;
|
|
480
487
|
}>;
|
|
481
488
|
/**
|
|
482
489
|
* Get a single audit entry by ID.
|
|
483
490
|
*/
|
|
484
491
|
readonly getAudit: _$alepha_server0.ActionPrimitiveFn<{
|
|
485
|
-
params: _$
|
|
486
|
-
id: _$
|
|
492
|
+
params: _$typebox.TObject<{
|
|
493
|
+
id: _$typebox.TString;
|
|
487
494
|
}>;
|
|
488
|
-
response: _$
|
|
489
|
-
id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$
|
|
490
|
-
createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
495
|
+
response: _$typebox.TObject<{
|
|
496
|
+
id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
497
|
+
createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
498
|
+
organizationId: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_ORGANIZATION>;
|
|
499
|
+
type: _$typebox.TString;
|
|
500
|
+
action: _$typebox.TString;
|
|
501
|
+
severity: _$alepha_orm0.PgAttr<_$typebox.TUnsafe<"info" | "warning" | "critical">, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
502
|
+
userId: _$typebox.TOptional<_$typebox.TString>;
|
|
503
|
+
userRealm: _$typebox.TOptional<_$typebox.TString>;
|
|
504
|
+
userEmail: _$typebox.TOptional<_$typebox.TString>;
|
|
505
|
+
resourceType: _$typebox.TOptional<_$typebox.TString>;
|
|
506
|
+
resourceId: _$typebox.TOptional<_$typebox.TString>;
|
|
507
|
+
description: _$typebox.TOptional<_$typebox.TString>;
|
|
508
|
+
metadata: _$typebox.TOptional<_$typebox.TRecord<string, _$typebox.TAny>>;
|
|
509
|
+
ipAddress: _$typebox.TOptional<_$typebox.TString>;
|
|
510
|
+
userAgent: _$typebox.TOptional<_$typebox.TString>;
|
|
511
|
+
sessionId: _$typebox.TOptional<_$typebox.TString>;
|
|
512
|
+
requestId: _$typebox.TOptional<_$typebox.TString>;
|
|
513
|
+
success: _$alepha_orm0.PgAttr<_$typebox.TBoolean, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
514
|
+
errorMessage: _$typebox.TOptional<_$typebox.TString>;
|
|
507
515
|
}>;
|
|
508
516
|
}>;
|
|
509
517
|
/**
|
|
@@ -511,11 +519,11 @@ declare class AdminAuditController {
|
|
|
511
519
|
* audit logs are usually retained for compliance reasons.
|
|
512
520
|
*/
|
|
513
521
|
readonly deleteAudits: _$alepha_server0.ActionPrimitiveFn<{
|
|
514
|
-
body: _$
|
|
515
|
-
ids: _$
|
|
522
|
+
body: _$typebox.TObject<{
|
|
523
|
+
ids: _$typebox.TArray<_$typebox.TString>;
|
|
516
524
|
}>;
|
|
517
|
-
response: _$
|
|
518
|
-
deleted: _$
|
|
525
|
+
response: _$typebox.TObject<{
|
|
526
|
+
deleted: _$typebox.TArray<_$typebox.TString>;
|
|
519
527
|
}>;
|
|
520
528
|
}>;
|
|
521
529
|
/**
|
|
@@ -523,168 +531,172 @@ declare class AdminAuditController {
|
|
|
523
531
|
* System-only — this permission should never be assigned to human roles.
|
|
524
532
|
*/
|
|
525
533
|
readonly createAudit: _$alepha_server0.ActionPrimitiveFn<{
|
|
526
|
-
body: _$
|
|
527
|
-
type: _$
|
|
528
|
-
action: _$
|
|
529
|
-
severity: _$
|
|
530
|
-
userId: _$
|
|
531
|
-
userRealm: _$
|
|
532
|
-
userEmail: _$
|
|
533
|
-
resourceType: _$
|
|
534
|
-
resourceId: _$
|
|
535
|
-
description: _$
|
|
536
|
-
metadata: _$
|
|
537
|
-
ipAddress: _$
|
|
538
|
-
userAgent: _$
|
|
539
|
-
sessionId: _$
|
|
540
|
-
requestId: _$
|
|
541
|
-
success: _$
|
|
542
|
-
errorMessage: _$
|
|
534
|
+
body: _$typebox.TObject<{
|
|
535
|
+
type: _$typebox.TString;
|
|
536
|
+
action: _$typebox.TString;
|
|
537
|
+
severity: _$typebox.TOptional<_$typebox.TUnsafe<"info" | "warning" | "critical">>;
|
|
538
|
+
userId: _$typebox.TOptional<_$typebox.TString>;
|
|
539
|
+
userRealm: _$typebox.TOptional<_$typebox.TString>;
|
|
540
|
+
userEmail: _$typebox.TOptional<_$typebox.TString>;
|
|
541
|
+
resourceType: _$typebox.TOptional<_$typebox.TString>;
|
|
542
|
+
resourceId: _$typebox.TOptional<_$typebox.TString>;
|
|
543
|
+
description: _$typebox.TOptional<_$typebox.TString>;
|
|
544
|
+
metadata: _$typebox.TOptional<_$typebox.TRecord<string, _$typebox.TAny>>;
|
|
545
|
+
ipAddress: _$typebox.TOptional<_$typebox.TString>;
|
|
546
|
+
userAgent: _$typebox.TOptional<_$typebox.TString>;
|
|
547
|
+
sessionId: _$typebox.TOptional<_$typebox.TString>;
|
|
548
|
+
requestId: _$typebox.TOptional<_$typebox.TString>;
|
|
549
|
+
success: _$typebox.TOptional<_$typebox.TBoolean>;
|
|
550
|
+
errorMessage: _$typebox.TOptional<_$typebox.TString>;
|
|
543
551
|
}>;
|
|
544
|
-
response: _$
|
|
545
|
-
id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$
|
|
546
|
-
createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
552
|
+
response: _$typebox.TObject<{
|
|
553
|
+
id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
554
|
+
createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
555
|
+
organizationId: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_ORGANIZATION>;
|
|
556
|
+
type: _$typebox.TString;
|
|
557
|
+
action: _$typebox.TString;
|
|
558
|
+
severity: _$alepha_orm0.PgAttr<_$typebox.TUnsafe<"info" | "warning" | "critical">, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
559
|
+
userId: _$typebox.TOptional<_$typebox.TString>;
|
|
560
|
+
userRealm: _$typebox.TOptional<_$typebox.TString>;
|
|
561
|
+
userEmail: _$typebox.TOptional<_$typebox.TString>;
|
|
562
|
+
resourceType: _$typebox.TOptional<_$typebox.TString>;
|
|
563
|
+
resourceId: _$typebox.TOptional<_$typebox.TString>;
|
|
564
|
+
description: _$typebox.TOptional<_$typebox.TString>;
|
|
565
|
+
metadata: _$typebox.TOptional<_$typebox.TRecord<string, _$typebox.TAny>>;
|
|
566
|
+
ipAddress: _$typebox.TOptional<_$typebox.TString>;
|
|
567
|
+
userAgent: _$typebox.TOptional<_$typebox.TString>;
|
|
568
|
+
sessionId: _$typebox.TOptional<_$typebox.TString>;
|
|
569
|
+
requestId: _$typebox.TOptional<_$typebox.TString>;
|
|
570
|
+
success: _$alepha_orm0.PgAttr<_$typebox.TBoolean, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
571
|
+
errorMessage: _$typebox.TOptional<_$typebox.TString>;
|
|
563
572
|
}>;
|
|
564
573
|
}>;
|
|
565
574
|
/**
|
|
566
575
|
* Get audit entries for a specific user.
|
|
567
576
|
*/
|
|
568
577
|
readonly findByUser: _$alepha_server0.ActionPrimitiveFn<{
|
|
569
|
-
params: _$
|
|
570
|
-
userId: _$
|
|
578
|
+
params: _$typebox.TObject<{
|
|
579
|
+
userId: _$typebox.TString;
|
|
571
580
|
}>;
|
|
572
|
-
query: _$
|
|
573
|
-
type: _$
|
|
574
|
-
action: _$
|
|
575
|
-
severity: _$
|
|
576
|
-
search: _$
|
|
577
|
-
sort: _$
|
|
578
|
-
userRealm: _$
|
|
579
|
-
resourceType: _$
|
|
580
|
-
resourceId: _$
|
|
581
|
-
success: _$
|
|
582
|
-
page: _$
|
|
583
|
-
size: _$
|
|
584
|
-
from: _$
|
|
585
|
-
to: _$
|
|
581
|
+
query: _$typebox.TObject<{
|
|
582
|
+
type: _$typebox.TOptional<_$typebox.TString>;
|
|
583
|
+
action: _$typebox.TOptional<_$typebox.TString>;
|
|
584
|
+
severity: _$typebox.TOptional<_$typebox.TUnsafe<"info" | "warning" | "critical">>;
|
|
585
|
+
search: _$typebox.TOptional<_$typebox.TString>;
|
|
586
|
+
sort: _$typebox.TOptional<_$typebox.TString>;
|
|
587
|
+
userRealm: _$typebox.TOptional<_$typebox.TString>;
|
|
588
|
+
resourceType: _$typebox.TOptional<_$typebox.TString>;
|
|
589
|
+
resourceId: _$typebox.TOptional<_$typebox.TString>;
|
|
590
|
+
success: _$typebox.TOptional<_$typebox.TBoolean>;
|
|
591
|
+
page: _$typebox.TOptional<_$typebox.TInteger>;
|
|
592
|
+
size: _$typebox.TOptional<_$typebox.TInteger>;
|
|
593
|
+
from: _$typebox.TOptional<_$typebox.TString>;
|
|
594
|
+
to: _$typebox.TOptional<_$typebox.TString>;
|
|
586
595
|
}>;
|
|
587
|
-
response: _$alepha.TPage<_$
|
|
588
|
-
id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$
|
|
589
|
-
createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
596
|
+
response: _$alepha.TPage<_$typebox.TObject<{
|
|
597
|
+
id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
598
|
+
createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
599
|
+
organizationId: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_ORGANIZATION>;
|
|
600
|
+
type: _$typebox.TString;
|
|
601
|
+
action: _$typebox.TString;
|
|
602
|
+
severity: _$alepha_orm0.PgAttr<_$typebox.TUnsafe<"info" | "warning" | "critical">, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
603
|
+
userId: _$typebox.TOptional<_$typebox.TString>;
|
|
604
|
+
userRealm: _$typebox.TOptional<_$typebox.TString>;
|
|
605
|
+
userEmail: _$typebox.TOptional<_$typebox.TString>;
|
|
606
|
+
resourceType: _$typebox.TOptional<_$typebox.TString>;
|
|
607
|
+
resourceId: _$typebox.TOptional<_$typebox.TString>;
|
|
608
|
+
description: _$typebox.TOptional<_$typebox.TString>;
|
|
609
|
+
metadata: _$typebox.TOptional<_$typebox.TRecord<string, _$typebox.TAny>>;
|
|
610
|
+
ipAddress: _$typebox.TOptional<_$typebox.TString>;
|
|
611
|
+
userAgent: _$typebox.TOptional<_$typebox.TString>;
|
|
612
|
+
sessionId: _$typebox.TOptional<_$typebox.TString>;
|
|
613
|
+
requestId: _$typebox.TOptional<_$typebox.TString>;
|
|
614
|
+
success: _$alepha_orm0.PgAttr<_$typebox.TBoolean, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
615
|
+
errorMessage: _$typebox.TOptional<_$typebox.TString>;
|
|
606
616
|
}>>;
|
|
607
617
|
}>;
|
|
608
618
|
/**
|
|
609
619
|
* Get audit entries for a specific resource.
|
|
610
620
|
*/
|
|
611
621
|
readonly findByResource: _$alepha_server0.ActionPrimitiveFn<{
|
|
612
|
-
params: _$
|
|
613
|
-
resourceType: _$
|
|
614
|
-
resourceId: _$
|
|
622
|
+
params: _$typebox.TObject<{
|
|
623
|
+
resourceType: _$typebox.TString;
|
|
624
|
+
resourceId: _$typebox.TString;
|
|
615
625
|
}>;
|
|
616
|
-
query: _$
|
|
617
|
-
type: _$
|
|
618
|
-
action: _$
|
|
619
|
-
severity: _$
|
|
620
|
-
search: _$
|
|
621
|
-
sort: _$
|
|
622
|
-
userId: _$
|
|
623
|
-
userRealm: _$
|
|
624
|
-
success: _$
|
|
625
|
-
page: _$
|
|
626
|
-
size: _$
|
|
627
|
-
from: _$
|
|
628
|
-
to: _$
|
|
626
|
+
query: _$typebox.TObject<{
|
|
627
|
+
type: _$typebox.TOptional<_$typebox.TString>;
|
|
628
|
+
action: _$typebox.TOptional<_$typebox.TString>;
|
|
629
|
+
severity: _$typebox.TOptional<_$typebox.TUnsafe<"info" | "warning" | "critical">>;
|
|
630
|
+
search: _$typebox.TOptional<_$typebox.TString>;
|
|
631
|
+
sort: _$typebox.TOptional<_$typebox.TString>;
|
|
632
|
+
userId: _$typebox.TOptional<_$typebox.TString>;
|
|
633
|
+
userRealm: _$typebox.TOptional<_$typebox.TString>;
|
|
634
|
+
success: _$typebox.TOptional<_$typebox.TBoolean>;
|
|
635
|
+
page: _$typebox.TOptional<_$typebox.TInteger>;
|
|
636
|
+
size: _$typebox.TOptional<_$typebox.TInteger>;
|
|
637
|
+
from: _$typebox.TOptional<_$typebox.TString>;
|
|
638
|
+
to: _$typebox.TOptional<_$typebox.TString>;
|
|
629
639
|
}>;
|
|
630
|
-
response: _$alepha.TPage<_$
|
|
631
|
-
id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$
|
|
632
|
-
createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
640
|
+
response: _$alepha.TPage<_$typebox.TObject<{
|
|
641
|
+
id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
642
|
+
createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
643
|
+
organizationId: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_ORGANIZATION>;
|
|
644
|
+
type: _$typebox.TString;
|
|
645
|
+
action: _$typebox.TString;
|
|
646
|
+
severity: _$alepha_orm0.PgAttr<_$typebox.TUnsafe<"info" | "warning" | "critical">, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
647
|
+
userId: _$typebox.TOptional<_$typebox.TString>;
|
|
648
|
+
userRealm: _$typebox.TOptional<_$typebox.TString>;
|
|
649
|
+
userEmail: _$typebox.TOptional<_$typebox.TString>;
|
|
650
|
+
resourceType: _$typebox.TOptional<_$typebox.TString>;
|
|
651
|
+
resourceId: _$typebox.TOptional<_$typebox.TString>;
|
|
652
|
+
description: _$typebox.TOptional<_$typebox.TString>;
|
|
653
|
+
metadata: _$typebox.TOptional<_$typebox.TRecord<string, _$typebox.TAny>>;
|
|
654
|
+
ipAddress: _$typebox.TOptional<_$typebox.TString>;
|
|
655
|
+
userAgent: _$typebox.TOptional<_$typebox.TString>;
|
|
656
|
+
sessionId: _$typebox.TOptional<_$typebox.TString>;
|
|
657
|
+
requestId: _$typebox.TOptional<_$typebox.TString>;
|
|
658
|
+
success: _$alepha_orm0.PgAttr<_$typebox.TBoolean, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
659
|
+
errorMessage: _$typebox.TOptional<_$typebox.TString>;
|
|
649
660
|
}>>;
|
|
650
661
|
}>;
|
|
651
662
|
/**
|
|
652
663
|
* Get audit statistics.
|
|
653
664
|
*/
|
|
654
665
|
readonly getAuditStats: _$alepha_server0.ActionPrimitiveFn<{
|
|
655
|
-
query: _$
|
|
656
|
-
from: _$
|
|
657
|
-
to: _$
|
|
658
|
-
userRealm: _$
|
|
666
|
+
query: _$typebox.TObject<{
|
|
667
|
+
from: _$typebox.TOptional<_$typebox.TString>;
|
|
668
|
+
to: _$typebox.TOptional<_$typebox.TString>;
|
|
669
|
+
userRealm: _$typebox.TOptional<_$typebox.TString>;
|
|
659
670
|
}>;
|
|
660
|
-
response: _$
|
|
661
|
-
total: _$
|
|
662
|
-
byType: _$
|
|
663
|
-
bySeverity: _$
|
|
664
|
-
info: _$
|
|
665
|
-
warning: _$
|
|
666
|
-
critical: _$
|
|
671
|
+
response: _$typebox.TObject<{
|
|
672
|
+
total: _$typebox.TInteger;
|
|
673
|
+
byType: _$typebox.TRecord<"^.*$", _$typebox.TInteger>;
|
|
674
|
+
bySeverity: _$typebox.TObject<{
|
|
675
|
+
info: _$typebox.TInteger;
|
|
676
|
+
warning: _$typebox.TInteger;
|
|
677
|
+
critical: _$typebox.TInteger;
|
|
667
678
|
}>;
|
|
668
|
-
successRate: _$
|
|
669
|
-
recentFailures: _$
|
|
670
|
-
id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$
|
|
671
|
-
createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
679
|
+
successRate: _$typebox.TNumber;
|
|
680
|
+
recentFailures: _$typebox.TArray<_$typebox.TObject<{
|
|
681
|
+
id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
682
|
+
createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
683
|
+
organizationId: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_ORGANIZATION>;
|
|
684
|
+
type: _$typebox.TString;
|
|
685
|
+
action: _$typebox.TString;
|
|
686
|
+
severity: _$alepha_orm0.PgAttr<_$typebox.TUnsafe<"info" | "warning" | "critical">, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
687
|
+
userId: _$typebox.TOptional<_$typebox.TString>;
|
|
688
|
+
userRealm: _$typebox.TOptional<_$typebox.TString>;
|
|
689
|
+
userEmail: _$typebox.TOptional<_$typebox.TString>;
|
|
690
|
+
resourceType: _$typebox.TOptional<_$typebox.TString>;
|
|
691
|
+
resourceId: _$typebox.TOptional<_$typebox.TString>;
|
|
692
|
+
description: _$typebox.TOptional<_$typebox.TString>;
|
|
693
|
+
metadata: _$typebox.TOptional<_$typebox.TRecord<string, _$typebox.TAny>>;
|
|
694
|
+
ipAddress: _$typebox.TOptional<_$typebox.TString>;
|
|
695
|
+
userAgent: _$typebox.TOptional<_$typebox.TString>;
|
|
696
|
+
sessionId: _$typebox.TOptional<_$typebox.TString>;
|
|
697
|
+
requestId: _$typebox.TOptional<_$typebox.TString>;
|
|
698
|
+
success: _$alepha_orm0.PgAttr<_$typebox.TBoolean, typeof _$alepha_orm0.PG_DEFAULT>;
|
|
699
|
+
errorMessage: _$typebox.TOptional<_$typebox.TString>;
|
|
688
700
|
}>>;
|
|
689
701
|
}>;
|
|
690
702
|
}>;
|
|
@@ -692,21 +704,21 @@ declare class AdminAuditController {
|
|
|
692
704
|
* Get registered audit types.
|
|
693
705
|
*/
|
|
694
706
|
readonly getTypes: _$alepha_server0.ActionPrimitiveFn<{
|
|
695
|
-
response: _$
|
|
696
|
-
type: _$
|
|
697
|
-
description: _$
|
|
698
|
-
actions: _$
|
|
707
|
+
response: _$typebox.TArray<_$typebox.TObject<{
|
|
708
|
+
type: _$typebox.TString;
|
|
709
|
+
description: _$typebox.TOptional<_$typebox.TString>;
|
|
710
|
+
actions: _$typebox.TArray<_$typebox.TString>;
|
|
699
711
|
}>>;
|
|
700
712
|
}>;
|
|
701
713
|
/**
|
|
702
714
|
* Get distinct values for filters.
|
|
703
715
|
*/
|
|
704
716
|
readonly getFilterOptions: _$alepha_server0.ActionPrimitiveFn<{
|
|
705
|
-
response: _$
|
|
706
|
-
types: _$
|
|
707
|
-
actions: _$
|
|
708
|
-
resourceTypes: _$
|
|
709
|
-
userRealms: _$
|
|
717
|
+
response: _$typebox.TObject<{
|
|
718
|
+
types: _$typebox.TArray<_$typebox.TString>;
|
|
719
|
+
actions: _$typebox.TArray<_$typebox.TString>;
|
|
720
|
+
resourceTypes: _$typebox.TArray<_$typebox.TString>;
|
|
721
|
+
userRealms: _$typebox.TArray<_$typebox.TString>;
|
|
710
722
|
}>;
|
|
711
723
|
}>;
|
|
712
724
|
}
|
|
@@ -838,6 +850,8 @@ type TObjectInsert<T extends TObject> = TObject<{ [K in keyof T["properties"] as
|
|
|
838
850
|
[PG_GENERATED]: any;
|
|
839
851
|
} ? never : K]: T["properties"][K] extends {
|
|
840
852
|
[PG_DEFAULT]: any;
|
|
853
|
+
} | {
|
|
854
|
+
[PG_ORGANIZATION]: any;
|
|
841
855
|
} | {
|
|
842
856
|
"~optional": true;
|
|
843
857
|
} ? TOptional<T["properties"][K]> : T["properties"][K] }>;
|
|
@@ -1113,8 +1127,8 @@ type PgAttr<T extends TSchema, TAttr extends PgSymbolKeys> = T & { [K in TAttr]:
|
|
|
1113
1127
|
* - `d1://BINDING_NAME` — Cloudflare D1
|
|
1114
1128
|
* - `hyperdrive://BINDING_NAME` — Cloudflare Hyperdrive
|
|
1115
1129
|
*/
|
|
1116
|
-
declare const databaseEnvSchema: _$
|
|
1117
|
-
DATABASE_URL: _$
|
|
1130
|
+
declare const databaseEnvSchema: _$typebox.TObject<{
|
|
1131
|
+
DATABASE_URL: _$typebox.TOptional<_$typebox.TString>;
|
|
1118
1132
|
/**
|
|
1119
1133
|
* Enable or disable push-based schema synchronization (drizzle-kit push).
|
|
1120
1134
|
*
|
|
@@ -1122,7 +1136,7 @@ declare const databaseEnvSchema: _$alepha.TObject<{
|
|
|
1122
1136
|
* Set to `false` in development to skip automatic schema sync
|
|
1123
1137
|
* (e.g. when managing migrations manually).
|
|
1124
1138
|
*/
|
|
1125
|
-
DATABASE_SYNC: _$
|
|
1139
|
+
DATABASE_SYNC: _$typebox.TOptional<_$typebox.TBoolean>;
|
|
1126
1140
|
}>;
|
|
1127
1141
|
declare module "alepha" {
|
|
1128
1142
|
interface Env extends Partial<Static<typeof databaseEnvSchema>> {}
|
|
@@ -1132,25 +1146,26 @@ declare module "alepha" {
|
|
|
1132
1146
|
/**
|
|
1133
1147
|
* Resource schema for audit log responses.
|
|
1134
1148
|
*/
|
|
1135
|
-
declare const auditResourceSchema: _$
|
|
1136
|
-
id: PgAttr<PgAttr<_$
|
|
1137
|
-
createdAt: PgAttr<PgAttr<_$
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1149
|
+
declare const auditResourceSchema: _$typebox.TObject<{
|
|
1150
|
+
id: PgAttr<PgAttr<_$typebox.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
1151
|
+
createdAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
1152
|
+
organizationId: PgAttr<_$typebox.TString, typeof PG_ORGANIZATION>;
|
|
1153
|
+
type: _$typebox.TString;
|
|
1154
|
+
action: _$typebox.TString;
|
|
1155
|
+
severity: PgAttr<_$typebox.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
|
|
1156
|
+
userId: _$typebox.TOptional<_$typebox.TString>;
|
|
1157
|
+
userRealm: _$typebox.TOptional<_$typebox.TString>;
|
|
1158
|
+
userEmail: _$typebox.TOptional<_$typebox.TString>;
|
|
1159
|
+
resourceType: _$typebox.TOptional<_$typebox.TString>;
|
|
1160
|
+
resourceId: _$typebox.TOptional<_$typebox.TString>;
|
|
1161
|
+
description: _$typebox.TOptional<_$typebox.TString>;
|
|
1162
|
+
metadata: _$typebox.TOptional<_$typebox.TRecord<string, _$typebox.TAny>>;
|
|
1163
|
+
ipAddress: _$typebox.TOptional<_$typebox.TString>;
|
|
1164
|
+
userAgent: _$typebox.TOptional<_$typebox.TString>;
|
|
1165
|
+
sessionId: _$typebox.TOptional<_$typebox.TString>;
|
|
1166
|
+
requestId: _$typebox.TOptional<_$typebox.TString>;
|
|
1167
|
+
success: PgAttr<_$typebox.TBoolean, typeof PG_DEFAULT>;
|
|
1168
|
+
errorMessage: _$typebox.TOptional<_$typebox.TString>;
|
|
1154
1169
|
}>;
|
|
1155
1170
|
type AuditResource = Static<typeof auditResourceSchema>;
|
|
1156
1171
|
//#endregion
|