alepha 0.20.6 → 0.20.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/AGENTS.md +0 -1
  2. package/CLAUDE.md +0 -1
  3. package/assets/agents-template.md +0 -1
  4. package/dist/api/audits/index.browser.js +1 -0
  5. package/dist/api/audits/index.browser.js.map +1 -1
  6. package/dist/api/audits/index.d.ts +370 -355
  7. package/dist/api/audits/index.d.ts.map +1 -1
  8. package/dist/api/audits/index.js +1 -0
  9. package/dist/api/audits/index.js.map +1 -1
  10. package/dist/api/files/index.browser.js +1 -0
  11. package/dist/api/files/index.browser.js.map +1 -1
  12. package/dist/api/files/index.d.ts +179 -170
  13. package/dist/api/files/index.d.ts.map +1 -1
  14. package/dist/api/files/index.js +1 -0
  15. package/dist/api/files/index.js.map +1 -1
  16. package/dist/api/jobs/index.browser.js +7 -0
  17. package/dist/api/jobs/index.browser.js.map +1 -1
  18. package/dist/api/jobs/index.d.ts +259 -250
  19. package/dist/api/jobs/index.d.ts.map +1 -1
  20. package/dist/api/jobs/index.js +21 -3
  21. package/dist/api/jobs/index.js.map +1 -1
  22. package/dist/api/keys/index.d.ts +198 -192
  23. package/dist/api/keys/index.d.ts.map +1 -1
  24. package/dist/api/keys/index.js +1 -0
  25. package/dist/api/keys/index.js.map +1 -1
  26. package/dist/api/notifications/index.d.ts +246 -245
  27. package/dist/api/notifications/index.d.ts.map +1 -1
  28. package/dist/api/organizations/index.d.ts +100 -97
  29. package/dist/api/organizations/index.d.ts.map +1 -1
  30. package/dist/api/parameters/index.d.ts +323 -320
  31. package/dist/api/parameters/index.d.ts.map +1 -1
  32. package/dist/api/payments/index.d.ts +431 -376
  33. package/dist/api/payments/index.d.ts.map +1 -1
  34. package/dist/api/payments/index.js +202 -87
  35. package/dist/api/payments/index.js.map +1 -1
  36. package/dist/api/subscriptions/index.d.ts +1695 -0
  37. package/dist/api/subscriptions/index.d.ts.map +1 -0
  38. package/dist/api/subscriptions/index.js +1919 -0
  39. package/dist/api/subscriptions/index.js.map +1 -0
  40. package/dist/api/users/index.d.ts +857 -841
  41. package/dist/api/users/index.d.ts.map +1 -1
  42. package/dist/api/verifications/index.d.ts +128 -127
  43. package/dist/api/verifications/index.d.ts.map +1 -1
  44. package/dist/bucket/index.d.ts +3 -2
  45. package/dist/bucket/index.d.ts.map +1 -1
  46. package/dist/cache/core/index.d.ts +114 -4
  47. package/dist/cache/core/index.d.ts.map +1 -1
  48. package/dist/cache/core/index.js +181 -15
  49. package/dist/cache/core/index.js.map +1 -1
  50. package/dist/cache/core/index.workerd.js +181 -15
  51. package/dist/cache/core/index.workerd.js.map +1 -1
  52. package/dist/cache/database/index.d.ts +20 -19
  53. package/dist/cache/database/index.d.ts.map +1 -1
  54. package/dist/cache/redis/index.d.ts +3 -2
  55. package/dist/cache/redis/index.d.ts.map +1 -1
  56. package/dist/cli/core/index.d.ts +116 -132
  57. package/dist/cli/core/index.d.ts.map +1 -1
  58. package/dist/cli/core/index.js +75 -7
  59. package/dist/cli/core/index.js.map +1 -1
  60. package/dist/cli/devtools/index.d.ts +3 -2
  61. package/dist/cli/devtools/index.d.ts.map +1 -1
  62. package/dist/cli/platform/index.d.ts +346 -290
  63. package/dist/cli/platform/index.d.ts.map +1 -1
  64. package/dist/cli/platform/index.js +105 -6
  65. package/dist/cli/platform/index.js.map +1 -1
  66. package/dist/cli/vendor/index.d.ts +12 -11
  67. package/dist/cli/vendor/index.d.ts.map +1 -1
  68. package/dist/command/index.d.ts +5 -4
  69. package/dist/command/index.d.ts.map +1 -1
  70. package/dist/core/index.browser.js +1 -1
  71. package/dist/core/index.browser.js.map +1 -1
  72. package/dist/core/index.d.ts +119 -118
  73. package/dist/core/index.d.ts.map +1 -1
  74. package/dist/core/index.js +1 -1
  75. package/dist/core/index.js.map +1 -1
  76. package/dist/core/index.native.js +1 -1
  77. package/dist/core/index.native.js.map +1 -1
  78. package/dist/core/index.workerd.js +1 -1
  79. package/dist/core/index.workerd.js.map +1 -1
  80. package/dist/crypto/index.d.ts +3 -2
  81. package/dist/crypto/index.d.ts.map +1 -1
  82. package/dist/email/core/index.d.ts +3 -2
  83. package/dist/email/core/index.d.ts.map +1 -1
  84. package/dist/email/smtp/index.d.ts +7 -6
  85. package/dist/email/smtp/index.d.ts.map +1 -1
  86. package/dist/lock/core/index.d.ts +5 -4
  87. package/dist/lock/core/index.d.ts.map +1 -1
  88. package/dist/logger/index.d.ts +10 -9
  89. package/dist/logger/index.d.ts.map +1 -1
  90. package/dist/mcp/index.d.ts +9 -8
  91. package/dist/mcp/index.d.ts.map +1 -1
  92. package/dist/mcp/index.js +1 -1
  93. package/dist/mcp/index.js.map +1 -1
  94. package/dist/orm/core/index.browser.js +9 -3
  95. package/dist/orm/core/index.browser.js.map +1 -1
  96. package/dist/orm/core/index.bun.js +31 -10
  97. package/dist/orm/core/index.bun.js.map +1 -1
  98. package/dist/orm/core/index.d.ts +33 -14
  99. package/dist/orm/core/index.d.ts.map +1 -1
  100. package/dist/orm/core/index.js +31 -10
  101. package/dist/orm/core/index.js.map +1 -1
  102. package/dist/orm/postgres/index.d.ts +6 -5
  103. package/dist/orm/postgres/index.d.ts.map +1 -1
  104. package/dist/queue/core/index.d.ts +5 -4
  105. package/dist/queue/core/index.d.ts.map +1 -1
  106. package/dist/queue/redis/index.d.ts +3 -2
  107. package/dist/queue/redis/index.d.ts.map +1 -1
  108. package/dist/react/form/index.d.ts +5 -0
  109. package/dist/react/form/index.d.ts.map +1 -1
  110. package/dist/react/form/index.js +6 -4
  111. package/dist/react/form/index.js.map +1 -1
  112. package/dist/react/i18n/index.d.ts +2 -1
  113. package/dist/react/i18n/index.d.ts.map +1 -1
  114. package/dist/react/router/index.d.ts +206 -205
  115. package/dist/react/router/index.d.ts.map +1 -1
  116. package/dist/react/ui/index.d.ts +11 -11
  117. package/dist/react/ui/index.d.ts.map +1 -1
  118. package/dist/scheduler/index.d.ts +3 -2
  119. package/dist/scheduler/index.d.ts.map +1 -1
  120. package/dist/security/index.browser.js +29 -1
  121. package/dist/security/index.browser.js.map +1 -1
  122. package/dist/security/index.d.ts +82 -35
  123. package/dist/security/index.d.ts.map +1 -1
  124. package/dist/security/index.js +56 -3
  125. package/dist/security/index.js.map +1 -1
  126. package/dist/server/auth/index.d.ts +163 -158
  127. package/dist/server/auth/index.d.ts.map +1 -1
  128. package/dist/server/auth/index.js +16 -4
  129. package/dist/server/auth/index.js.map +1 -1
  130. package/dist/server/core/index.d.ts +35 -34
  131. package/dist/server/core/index.d.ts.map +1 -1
  132. package/dist/server/cors/index.d.ts +7 -6
  133. package/dist/server/cors/index.d.ts.map +1 -1
  134. package/dist/server/health/index.d.ts +16 -15
  135. package/dist/server/health/index.d.ts.map +1 -1
  136. package/dist/server/links/index.d.ts +51 -50
  137. package/dist/server/links/index.d.ts.map +1 -1
  138. package/dist/server/rate-limit/index.d.ts +6 -5
  139. package/dist/server/rate-limit/index.d.ts.map +1 -1
  140. package/dist/server/swagger/index.d.ts +2 -1
  141. package/dist/server/swagger/index.d.ts.map +1 -1
  142. package/dist/topic/redis/index.d.ts +3 -2
  143. package/dist/topic/redis/index.d.ts.map +1 -1
  144. package/package.json +16 -32
  145. package/src/api/audits/entities/audits.ts +1 -0
  146. package/src/api/files/entities/files.ts +1 -0
  147. package/src/api/jobs/__tests__/$job.spec.ts +92 -40
  148. package/src/api/jobs/entities/jobExecutionEntity.ts +1 -0
  149. package/src/api/jobs/providers/JobProvider.ts +20 -5
  150. package/src/api/jobs/schemas/jobConfigAtom.ts +5 -0
  151. package/src/api/keys/entities/apiKeyEntity.ts +1 -0
  152. package/src/api/payments/controllers/MockCheckoutController.ts +146 -0
  153. package/src/api/payments/index.ts +3 -0
  154. package/src/api/payments/providers/MemoryPaymentProvider.ts +9 -4
  155. package/src/api/payments/providers/PaymentProvider.ts +25 -9
  156. package/src/api/payments/services/PaymentService.ts +3 -0
  157. package/src/api/subscriptions/__tests__/BillingService.spec.ts +218 -0
  158. package/src/api/subscriptions/__tests__/SubscriptionService.spec.ts +278 -0
  159. package/src/api/subscriptions/controllers/AdminSubscriptionController.ts +212 -0
  160. package/src/api/subscriptions/controllers/SubscriptionController.ts +189 -0
  161. package/src/api/subscriptions/entities/subscriptionEvents.ts +54 -0
  162. package/src/api/subscriptions/entities/subscriptions.ts +68 -0
  163. package/src/api/subscriptions/index.ts +133 -0
  164. package/src/api/subscriptions/jobs/SubscriptionJobs.ts +382 -0
  165. package/src/api/subscriptions/middleware/$requireLimit.ts +50 -0
  166. package/src/api/subscriptions/middleware/$requirePlan.ts +49 -0
  167. package/src/api/subscriptions/notifications/SubscriptionNotifications.ts +110 -0
  168. package/src/api/subscriptions/schemas/cancelSubscriptionSchema.ts +8 -0
  169. package/src/api/subscriptions/schemas/changePlanSchema.ts +9 -0
  170. package/src/api/subscriptions/schemas/createSubscriptionSchema.ts +11 -0
  171. package/src/api/subscriptions/schemas/entitlementsSchema.ts +21 -0
  172. package/src/api/subscriptions/schemas/mrrSchema.ts +13 -0
  173. package/src/api/subscriptions/schemas/planDefinitionSchema.ts +71 -0
  174. package/src/api/subscriptions/schemas/planResourceSchema.ts +25 -0
  175. package/src/api/subscriptions/schemas/subscriptionEventResourceSchema.ts +8 -0
  176. package/src/api/subscriptions/schemas/subscriptionQuerySchema.ts +19 -0
  177. package/src/api/subscriptions/schemas/subscriptionResourceSchema.ts +6 -0
  178. package/src/api/subscriptions/schemas/subscriptionSettingsSchema.ts +32 -0
  179. package/src/api/subscriptions/schemas/subscriptionStatsSchema.ts +23 -0
  180. package/src/api/subscriptions/services/BillingService.ts +437 -0
  181. package/src/api/subscriptions/services/SubscriptionConfig.ts +56 -0
  182. package/src/api/subscriptions/services/SubscriptionService.ts +867 -0
  183. package/src/api/subscriptions/services/UsageService.ts +118 -0
  184. package/src/cache/core/__tests__/$cache.memory.spec.ts +450 -0
  185. package/src/cache/core/__tests__/$cache.swr.spec.ts +394 -0
  186. package/src/cache/core/index.ts +16 -0
  187. package/src/cache/core/primitives/$cache.ts +347 -21
  188. package/src/cli/core/tasks/BuildCloudflareTask.ts +16 -0
  189. package/src/cli/core/templates/agentMd.ts +39 -4
  190. package/src/cli/core/templates/biomeJson.ts +25 -1
  191. package/src/cli/core/templates/saasAdminLayoutTsx.ts +2 -2
  192. package/src/cli/platform/__tests__/CloudflareAdapter.spec.ts +117 -0
  193. package/src/cli/platform/adapters/CloudflareAdapter.ts +104 -7
  194. package/src/cli/platform/atoms/platformOptions.ts +13 -0
  195. package/src/cli/platform/schemas/platform.ts +1 -0
  196. package/src/cli/platform/services/CloudflareApi.ts +61 -0
  197. package/src/cli/platform/services/PlatformOrchestrator.ts +9 -4
  198. package/src/core/__tests__/$module.spec.ts +2 -2
  199. package/src/core/primitives/$module.ts +4 -4
  200. package/src/mcp/providers/McpServerProvider.ts +1 -1
  201. package/src/orm/core/providers/DatabaseTypeProvider.ts +9 -3
  202. package/src/orm/core/providers/drivers/DatabaseProvider.ts +1 -1
  203. package/src/orm/core/schemas/insertSchema.ts +10 -2
  204. package/src/orm/core/services/Repository.ts +27 -7
  205. package/src/react/form/hooks/useFormState.ts +8 -1
  206. package/src/react/form/index.ts +10 -1
  207. package/src/react/form/services/FormModel.ts +9 -3
  208. package/src/security/atoms/currentTenantAtom.ts +34 -0
  209. package/src/security/index.browser.ts +1 -0
  210. package/src/security/index.ts +12 -1
  211. package/src/security/primitives/$issuer.ts +17 -1
  212. package/src/security/providers/SecurityProvider.ts +37 -0
  213. package/src/server/auth/__tests__/validateRedirectUri.spec.ts +78 -0
  214. package/src/server/auth/providers/ServerAuthProvider.ts +21 -5
  215. package/tsconfig.base.json +2 -1
  216. package/dist/react/websocket/index.d.ts +0 -117
  217. package/dist/react/websocket/index.d.ts.map +0 -1
  218. package/dist/react/websocket/index.js +0 -108
  219. package/dist/react/websocket/index.js.map +0 -1
  220. package/dist/websocket/index.browser.js +0 -848
  221. package/dist/websocket/index.browser.js.map +0 -1
  222. package/dist/websocket/index.d.ts +0 -876
  223. package/dist/websocket/index.d.ts.map +0 -1
  224. package/dist/websocket/index.js +0 -1185
  225. package/dist/websocket/index.js.map +0 -1
  226. package/src/react/websocket/hooks/useRoom.tsx +0 -251
  227. package/src/react/websocket/index.ts +0 -7
  228. package/src/websocket/__tests__/$channel.spec.ts +0 -30
  229. package/src/websocket/__tests__/$websocket-new.spec.ts +0 -195
  230. package/src/websocket/__tests__/RoomManager.spec.ts +0 -146
  231. package/src/websocket/__tests__/websocket-integration.spec.ts +0 -951
  232. package/src/websocket/errors/WebSocketError.ts +0 -34
  233. package/src/websocket/index.browser.ts +0 -25
  234. package/src/websocket/index.shared.ts +0 -8
  235. package/src/websocket/index.ts +0 -85
  236. package/src/websocket/interfaces/WebSocketInterfaces.ts +0 -252
  237. package/src/websocket/primitives/$channel.ts +0 -131
  238. package/src/websocket/primitives/$websocket.ts +0 -107
  239. package/src/websocket/providers/NodeWebSocketServerProvider.ts +0 -617
  240. package/src/websocket/providers/WebSocketServerProvider.ts +0 -56
  241. package/src/websocket/services/RoomManager.ts +0 -160
  242. package/src/websocket/services/WebSocketClient.ts +0 -642
  243. 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: _$alepha.TUnsafe<"info" | "warning" | "critical">;
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<_$alepha.TObject<{
26
- id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$alepha.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
27
- createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$alepha.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
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: _$alepha.TString;
34
+ type: _$typebox.TString;
33
35
  /**
34
36
  * Specific action performed (e.g., "login", "logout", "create", "update", "delete").
35
37
  */
36
- action: _$alepha.TString;
38
+ action: _$typebox.TString;
37
39
  /**
38
40
  * Severity level of the event.
39
41
  */
40
- severity: _$alepha_orm0.PgAttr<_$alepha.TUnsafe<"info" | "warning" | "critical">, typeof _$alepha_orm0.PG_DEFAULT>;
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: _$alepha.TOptional<_$alepha.TString>;
46
+ userId: _$typebox.TOptional<_$typebox.TString>;
45
47
  /**
46
48
  * User realm for multi-tenant support.
47
49
  */
48
- userRealm: _$alepha.TOptional<_$alepha.TString>;
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: _$alepha.TOptional<_$alepha.TString>;
54
+ userEmail: _$typebox.TOptional<_$typebox.TString>;
53
55
  /**
54
56
  * Resource type affected (e.g., "user", "order", "file").
55
57
  */
56
- resourceType: _$alepha.TOptional<_$alepha.TString>;
58
+ resourceType: _$typebox.TOptional<_$typebox.TString>;
57
59
  /**
58
60
  * Resource ID affected.
59
61
  */
60
- resourceId: _$alepha.TOptional<_$alepha.TString>;
62
+ resourceId: _$typebox.TOptional<_$typebox.TString>;
61
63
  /**
62
64
  * Human-readable description of the event.
63
65
  */
64
- description: _$alepha.TOptional<_$alepha.TString>;
66
+ description: _$typebox.TOptional<_$typebox.TString>;
65
67
  /**
66
68
  * Additional metadata/context as JSON.
67
69
  */
68
- metadata: _$alepha.TOptional<_$alepha.TRecord<string, _$alepha.TAny>>;
70
+ metadata: _$typebox.TOptional<_$typebox.TRecord<string, _$typebox.TAny>>;
69
71
  /**
70
72
  * Client IP address.
71
73
  */
72
- ipAddress: _$alepha.TOptional<_$alepha.TString>;
74
+ ipAddress: _$typebox.TOptional<_$typebox.TString>;
73
75
  /**
74
76
  * Client user agent.
75
77
  */
76
- userAgent: _$alepha.TOptional<_$alepha.TString>;
78
+ userAgent: _$typebox.TOptional<_$typebox.TString>;
77
79
  /**
78
80
  * Session ID if applicable.
79
81
  */
80
- sessionId: _$alepha.TOptional<_$alepha.TString>;
82
+ sessionId: _$typebox.TOptional<_$typebox.TString>;
81
83
  /**
82
84
  * Request ID for correlation.
83
85
  */
84
- requestId: _$alepha.TOptional<_$alepha.TString>;
86
+ requestId: _$typebox.TOptional<_$typebox.TString>;
85
87
  /**
86
88
  * Whether the action was successful.
87
89
  */
88
- success: _$alepha_orm0.PgAttr<_$alepha.TBoolean, typeof _$alepha_orm0.PG_DEFAULT>;
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: _$alepha.TOptional<_$alepha.TString>;
94
+ errorMessage: _$typebox.TOptional<_$typebox.TString>;
93
95
  }>>;
94
- declare const auditEntitySchema: _$alepha.TObject<{
95
- id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$alepha.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
96
- createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$alepha.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
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: _$alepha.TString;
104
+ type: _$typebox.TString;
102
105
  /**
103
106
  * Specific action performed (e.g., "login", "logout", "create", "update", "delete").
104
107
  */
105
- action: _$alepha.TString;
108
+ action: _$typebox.TString;
106
109
  /**
107
110
  * Severity level of the event.
108
111
  */
109
- severity: _$alepha_orm0.PgAttr<_$alepha.TUnsafe<"info" | "warning" | "critical">, typeof _$alepha_orm0.PG_DEFAULT>;
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: _$alepha.TOptional<_$alepha.TString>;
116
+ userId: _$typebox.TOptional<_$typebox.TString>;
114
117
  /**
115
118
  * User realm for multi-tenant support.
116
119
  */
117
- userRealm: _$alepha.TOptional<_$alepha.TString>;
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: _$alepha.TOptional<_$alepha.TString>;
124
+ userEmail: _$typebox.TOptional<_$typebox.TString>;
122
125
  /**
123
126
  * Resource type affected (e.g., "user", "order", "file").
124
127
  */
125
- resourceType: _$alepha.TOptional<_$alepha.TString>;
128
+ resourceType: _$typebox.TOptional<_$typebox.TString>;
126
129
  /**
127
130
  * Resource ID affected.
128
131
  */
129
- resourceId: _$alepha.TOptional<_$alepha.TString>;
132
+ resourceId: _$typebox.TOptional<_$typebox.TString>;
130
133
  /**
131
134
  * Human-readable description of the event.
132
135
  */
133
- description: _$alepha.TOptional<_$alepha.TString>;
136
+ description: _$typebox.TOptional<_$typebox.TString>;
134
137
  /**
135
138
  * Additional metadata/context as JSON.
136
139
  */
137
- metadata: _$alepha.TOptional<_$alepha.TRecord<string, _$alepha.TAny>>;
140
+ metadata: _$typebox.TOptional<_$typebox.TRecord<string, _$typebox.TAny>>;
138
141
  /**
139
142
  * Client IP address.
140
143
  */
141
- ipAddress: _$alepha.TOptional<_$alepha.TString>;
144
+ ipAddress: _$typebox.TOptional<_$typebox.TString>;
142
145
  /**
143
146
  * Client user agent.
144
147
  */
145
- userAgent: _$alepha.TOptional<_$alepha.TString>;
148
+ userAgent: _$typebox.TOptional<_$typebox.TString>;
146
149
  /**
147
150
  * Session ID if applicable.
148
151
  */
149
- sessionId: _$alepha.TOptional<_$alepha.TString>;
152
+ sessionId: _$typebox.TOptional<_$typebox.TString>;
150
153
  /**
151
154
  * Request ID for correlation.
152
155
  */
153
- requestId: _$alepha.TOptional<_$alepha.TString>;
156
+ requestId: _$typebox.TOptional<_$typebox.TString>;
154
157
  /**
155
158
  * Whether the action was successful.
156
159
  */
157
- success: _$alepha_orm0.PgAttr<_$alepha.TBoolean, typeof _$alepha_orm0.PG_DEFAULT>;
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: _$alepha.TOptional<_$alepha.TString>;
164
+ errorMessage: _$typebox.TOptional<_$typebox.TString>;
162
165
  }>;
163
- declare const auditEntityInsertSchema: _$alepha_orm0.TObjectInsert<_$alepha.TObject<{
164
- id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$alepha.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
165
- createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$alepha.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
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: _$alepha.TString;
174
+ type: _$typebox.TString;
171
175
  /**
172
176
  * Specific action performed (e.g., "login", "logout", "create", "update", "delete").
173
177
  */
174
- action: _$alepha.TString;
178
+ action: _$typebox.TString;
175
179
  /**
176
180
  * Severity level of the event.
177
181
  */
178
- severity: _$alepha_orm0.PgAttr<_$alepha.TUnsafe<"info" | "warning" | "critical">, typeof _$alepha_orm0.PG_DEFAULT>;
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: _$alepha.TOptional<_$alepha.TString>;
186
+ userId: _$typebox.TOptional<_$typebox.TString>;
183
187
  /**
184
188
  * User realm for multi-tenant support.
185
189
  */
186
- userRealm: _$alepha.TOptional<_$alepha.TString>;
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: _$alepha.TOptional<_$alepha.TString>;
194
+ userEmail: _$typebox.TOptional<_$typebox.TString>;
191
195
  /**
192
196
  * Resource type affected (e.g., "user", "order", "file").
193
197
  */
194
- resourceType: _$alepha.TOptional<_$alepha.TString>;
198
+ resourceType: _$typebox.TOptional<_$typebox.TString>;
195
199
  /**
196
200
  * Resource ID affected.
197
201
  */
198
- resourceId: _$alepha.TOptional<_$alepha.TString>;
202
+ resourceId: _$typebox.TOptional<_$typebox.TString>;
199
203
  /**
200
204
  * Human-readable description of the event.
201
205
  */
202
- description: _$alepha.TOptional<_$alepha.TString>;
206
+ description: _$typebox.TOptional<_$typebox.TString>;
203
207
  /**
204
208
  * Additional metadata/context as JSON.
205
209
  */
206
- metadata: _$alepha.TOptional<_$alepha.TRecord<string, _$alepha.TAny>>;
210
+ metadata: _$typebox.TOptional<_$typebox.TRecord<string, _$typebox.TAny>>;
207
211
  /**
208
212
  * Client IP address.
209
213
  */
210
- ipAddress: _$alepha.TOptional<_$alepha.TString>;
214
+ ipAddress: _$typebox.TOptional<_$typebox.TString>;
211
215
  /**
212
216
  * Client user agent.
213
217
  */
214
- userAgent: _$alepha.TOptional<_$alepha.TString>;
218
+ userAgent: _$typebox.TOptional<_$typebox.TString>;
215
219
  /**
216
220
  * Session ID if applicable.
217
221
  */
218
- sessionId: _$alepha.TOptional<_$alepha.TString>;
222
+ sessionId: _$typebox.TOptional<_$typebox.TString>;
219
223
  /**
220
224
  * Request ID for correlation.
221
225
  */
222
- requestId: _$alepha.TOptional<_$alepha.TString>;
226
+ requestId: _$typebox.TOptional<_$typebox.TString>;
223
227
  /**
224
228
  * Whether the action was successful.
225
229
  */
226
- success: _$alepha_orm0.PgAttr<_$alepha.TBoolean, typeof _$alepha_orm0.PG_DEFAULT>;
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: _$alepha.TOptional<_$alepha.TString>;
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: _$alepha.TObject<{
239
- page: _$alepha.TOptional<_$alepha.TInteger>;
240
- size: _$alepha.TOptional<_$alepha.TInteger>;
241
- sort: _$alepha.TOptional<_$alepha.TString>;
242
- type: _$alepha.TOptional<_$alepha.TString>;
243
- action: _$alepha.TOptional<_$alepha.TString>;
244
- severity: _$alepha.TOptional<_$alepha.TUnsafe<"info" | "warning" | "critical">>;
245
- userId: _$alepha.TOptional<_$alepha.TString>;
246
- userRealm: _$alepha.TOptional<_$alepha.TString>;
247
- resourceType: _$alepha.TOptional<_$alepha.TString>;
248
- resourceId: _$alepha.TOptional<_$alepha.TString>;
249
- success: _$alepha.TOptional<_$alepha.TBoolean>;
250
- from: _$alepha.TOptional<_$alepha.TString>;
251
- to: _$alepha.TOptional<_$alepha.TString>;
252
- search: _$alepha.TOptional<_$alepha.TString>;
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: _$alepha.TObject<{
261
- type: _$alepha.TString;
262
- action: _$alepha.TString;
263
- severity: _$alepha.TOptional<_$alepha.TUnsafe<"info" | "warning" | "critical">>;
264
- userId: _$alepha.TOptional<_$alepha.TString>;
265
- userRealm: _$alepha.TOptional<_$alepha.TString>;
266
- userEmail: _$alepha.TOptional<_$alepha.TString>;
267
- resourceType: _$alepha.TOptional<_$alepha.TString>;
268
- resourceId: _$alepha.TOptional<_$alepha.TString>;
269
- description: _$alepha.TOptional<_$alepha.TString>;
270
- metadata: _$alepha.TOptional<_$alepha.TRecord<string, _$alepha.TAny>>;
271
- ipAddress: _$alepha.TOptional<_$alepha.TString>;
272
- userAgent: _$alepha.TOptional<_$alepha.TString>;
273
- sessionId: _$alepha.TOptional<_$alepha.TString>;
274
- requestId: _$alepha.TOptional<_$alepha.TString>;
275
- success: _$alepha.TOptional<_$alepha.TBoolean>;
276
- errorMessage: _$alepha.TOptional<_$alepha.TString>;
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<_$alepha.TObject<{
302
- id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$alepha.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
303
- createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$alepha.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
304
- type: _$alepha.TString;
305
- action: _$alepha.TString;
306
- severity: _$alepha_orm0.PgAttr<_$alepha.TUnsafe<"info" | "warning" | "critical">, typeof _$alepha_orm0.PG_DEFAULT>;
307
- userId: _$alepha.TOptional<_$alepha.TString>;
308
- userRealm: _$alepha.TOptional<_$alepha.TString>;
309
- userEmail: _$alepha.TOptional<_$alepha.TString>;
310
- resourceType: _$alepha.TOptional<_$alepha.TString>;
311
- resourceId: _$alepha.TOptional<_$alepha.TString>;
312
- description: _$alepha.TOptional<_$alepha.TString>;
313
- metadata: _$alepha.TOptional<_$alepha.TRecord<string, _$alepha.TAny>>;
314
- ipAddress: _$alepha.TOptional<_$alepha.TString>;
315
- userAgent: _$alepha.TOptional<_$alepha.TString>;
316
- sessionId: _$alepha.TOptional<_$alepha.TString>;
317
- requestId: _$alepha.TOptional<_$alepha.TString>;
318
- success: _$alepha_orm0.PgAttr<_$alepha.TBoolean, typeof _$alepha_orm0.PG_DEFAULT>;
319
- errorMessage: _$alepha.TOptional<_$alepha.TString>;
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<_$alepha.TObject<{
421
- id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$alepha.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
422
- createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$alepha.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
423
- type: _$alepha.TString;
424
- action: _$alepha.TString;
425
- severity: _$alepha_orm0.PgAttr<_$alepha.TUnsafe<"info" | "warning" | "critical">, typeof _$alepha_orm0.PG_DEFAULT>;
426
- userId: _$alepha.TOptional<_$alepha.TString>;
427
- userRealm: _$alepha.TOptional<_$alepha.TString>;
428
- userEmail: _$alepha.TOptional<_$alepha.TString>;
429
- resourceType: _$alepha.TOptional<_$alepha.TString>;
430
- resourceId: _$alepha.TOptional<_$alepha.TString>;
431
- description: _$alepha.TOptional<_$alepha.TString>;
432
- metadata: _$alepha.TOptional<_$alepha.TRecord<string, _$alepha.TAny>>;
433
- ipAddress: _$alepha.TOptional<_$alepha.TString>;
434
- userAgent: _$alepha.TOptional<_$alepha.TString>;
435
- sessionId: _$alepha.TOptional<_$alepha.TString>;
436
- requestId: _$alepha.TOptional<_$alepha.TString>;
437
- success: _$alepha_orm0.PgAttr<_$alepha.TBoolean, typeof _$alepha_orm0.PG_DEFAULT>;
438
- errorMessage: _$alepha.TOptional<_$alepha.TString>;
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: _$alepha.TObject<{
445
- page: _$alepha.TOptional<_$alepha.TInteger>;
446
- size: _$alepha.TOptional<_$alepha.TInteger>;
447
- sort: _$alepha.TOptional<_$alepha.TString>;
448
- type: _$alepha.TOptional<_$alepha.TString>;
449
- action: _$alepha.TOptional<_$alepha.TString>;
450
- severity: _$alepha.TOptional<_$alepha.TUnsafe<"info" | "warning" | "critical">>;
451
- userId: _$alepha.TOptional<_$alepha.TString>;
452
- userRealm: _$alepha.TOptional<_$alepha.TString>;
453
- resourceType: _$alepha.TOptional<_$alepha.TString>;
454
- resourceId: _$alepha.TOptional<_$alepha.TString>;
455
- success: _$alepha.TOptional<_$alepha.TBoolean>;
456
- from: _$alepha.TOptional<_$alepha.TString>;
457
- to: _$alepha.TOptional<_$alepha.TString>;
458
- search: _$alepha.TOptional<_$alepha.TString>;
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<_$alepha.TObject<{
461
- id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$alepha.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
462
- createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$alepha.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
463
- type: _$alepha.TString;
464
- action: _$alepha.TString;
465
- severity: _$alepha_orm0.PgAttr<_$alepha.TUnsafe<"info" | "warning" | "critical">, typeof _$alepha_orm0.PG_DEFAULT>;
466
- userId: _$alepha.TOptional<_$alepha.TString>;
467
- userRealm: _$alepha.TOptional<_$alepha.TString>;
468
- userEmail: _$alepha.TOptional<_$alepha.TString>;
469
- resourceType: _$alepha.TOptional<_$alepha.TString>;
470
- resourceId: _$alepha.TOptional<_$alepha.TString>;
471
- description: _$alepha.TOptional<_$alepha.TString>;
472
- metadata: _$alepha.TOptional<_$alepha.TRecord<string, _$alepha.TAny>>;
473
- ipAddress: _$alepha.TOptional<_$alepha.TString>;
474
- userAgent: _$alepha.TOptional<_$alepha.TString>;
475
- sessionId: _$alepha.TOptional<_$alepha.TString>;
476
- requestId: _$alepha.TOptional<_$alepha.TString>;
477
- success: _$alepha_orm0.PgAttr<_$alepha.TBoolean, typeof _$alepha_orm0.PG_DEFAULT>;
478
- errorMessage: _$alepha.TOptional<_$alepha.TString>;
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: _$alepha.TObject<{
486
- id: _$alepha.TString;
492
+ params: _$typebox.TObject<{
493
+ id: _$typebox.TString;
487
494
  }>;
488
- response: _$alepha.TObject<{
489
- id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$alepha.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
490
- createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$alepha.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
491
- type: _$alepha.TString;
492
- action: _$alepha.TString;
493
- severity: _$alepha_orm0.PgAttr<_$alepha.TUnsafe<"info" | "warning" | "critical">, typeof _$alepha_orm0.PG_DEFAULT>;
494
- userId: _$alepha.TOptional<_$alepha.TString>;
495
- userRealm: _$alepha.TOptional<_$alepha.TString>;
496
- userEmail: _$alepha.TOptional<_$alepha.TString>;
497
- resourceType: _$alepha.TOptional<_$alepha.TString>;
498
- resourceId: _$alepha.TOptional<_$alepha.TString>;
499
- description: _$alepha.TOptional<_$alepha.TString>;
500
- metadata: _$alepha.TOptional<_$alepha.TRecord<string, _$alepha.TAny>>;
501
- ipAddress: _$alepha.TOptional<_$alepha.TString>;
502
- userAgent: _$alepha.TOptional<_$alepha.TString>;
503
- sessionId: _$alepha.TOptional<_$alepha.TString>;
504
- requestId: _$alepha.TOptional<_$alepha.TString>;
505
- success: _$alepha_orm0.PgAttr<_$alepha.TBoolean, typeof _$alepha_orm0.PG_DEFAULT>;
506
- errorMessage: _$alepha.TOptional<_$alepha.TString>;
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: _$alepha.TObject<{
515
- ids: _$alepha.TArray<_$alepha.TString>;
522
+ body: _$typebox.TObject<{
523
+ ids: _$typebox.TArray<_$typebox.TString>;
516
524
  }>;
517
- response: _$alepha.TObject<{
518
- deleted: _$alepha.TArray<_$alepha.TString>;
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: _$alepha.TObject<{
527
- type: _$alepha.TString;
528
- action: _$alepha.TString;
529
- severity: _$alepha.TOptional<_$alepha.TUnsafe<"info" | "warning" | "critical">>;
530
- userId: _$alepha.TOptional<_$alepha.TString>;
531
- userRealm: _$alepha.TOptional<_$alepha.TString>;
532
- userEmail: _$alepha.TOptional<_$alepha.TString>;
533
- resourceType: _$alepha.TOptional<_$alepha.TString>;
534
- resourceId: _$alepha.TOptional<_$alepha.TString>;
535
- description: _$alepha.TOptional<_$alepha.TString>;
536
- metadata: _$alepha.TOptional<_$alepha.TRecord<string, _$alepha.TAny>>;
537
- ipAddress: _$alepha.TOptional<_$alepha.TString>;
538
- userAgent: _$alepha.TOptional<_$alepha.TString>;
539
- sessionId: _$alepha.TOptional<_$alepha.TString>;
540
- requestId: _$alepha.TOptional<_$alepha.TString>;
541
- success: _$alepha.TOptional<_$alepha.TBoolean>;
542
- errorMessage: _$alepha.TOptional<_$alepha.TString>;
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: _$alepha.TObject<{
545
- id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$alepha.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
546
- createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$alepha.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
547
- type: _$alepha.TString;
548
- action: _$alepha.TString;
549
- severity: _$alepha_orm0.PgAttr<_$alepha.TUnsafe<"info" | "warning" | "critical">, typeof _$alepha_orm0.PG_DEFAULT>;
550
- userId: _$alepha.TOptional<_$alepha.TString>;
551
- userRealm: _$alepha.TOptional<_$alepha.TString>;
552
- userEmail: _$alepha.TOptional<_$alepha.TString>;
553
- resourceType: _$alepha.TOptional<_$alepha.TString>;
554
- resourceId: _$alepha.TOptional<_$alepha.TString>;
555
- description: _$alepha.TOptional<_$alepha.TString>;
556
- metadata: _$alepha.TOptional<_$alepha.TRecord<string, _$alepha.TAny>>;
557
- ipAddress: _$alepha.TOptional<_$alepha.TString>;
558
- userAgent: _$alepha.TOptional<_$alepha.TString>;
559
- sessionId: _$alepha.TOptional<_$alepha.TString>;
560
- requestId: _$alepha.TOptional<_$alepha.TString>;
561
- success: _$alepha_orm0.PgAttr<_$alepha.TBoolean, typeof _$alepha_orm0.PG_DEFAULT>;
562
- errorMessage: _$alepha.TOptional<_$alepha.TString>;
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: _$alepha.TObject<{
570
- userId: _$alepha.TString;
578
+ params: _$typebox.TObject<{
579
+ userId: _$typebox.TString;
571
580
  }>;
572
- query: _$alepha.TObject<{
573
- type: _$alepha.TOptional<_$alepha.TString>;
574
- action: _$alepha.TOptional<_$alepha.TString>;
575
- severity: _$alepha.TOptional<_$alepha.TUnsafe<"info" | "warning" | "critical">>;
576
- search: _$alepha.TOptional<_$alepha.TString>;
577
- sort: _$alepha.TOptional<_$alepha.TString>;
578
- userRealm: _$alepha.TOptional<_$alepha.TString>;
579
- resourceType: _$alepha.TOptional<_$alepha.TString>;
580
- resourceId: _$alepha.TOptional<_$alepha.TString>;
581
- success: _$alepha.TOptional<_$alepha.TBoolean>;
582
- page: _$alepha.TOptional<_$alepha.TInteger>;
583
- size: _$alepha.TOptional<_$alepha.TInteger>;
584
- from: _$alepha.TOptional<_$alepha.TString>;
585
- to: _$alepha.TOptional<_$alepha.TString>;
581
+ query: _$typebox.TObject<{
582
+ type: _$typebox.TOptional<_$typebox.TString>;
583
+ search: _$typebox.TOptional<_$typebox.TString>;
584
+ action: _$typebox.TOptional<_$typebox.TString>;
585
+ severity: _$typebox.TOptional<_$typebox.TUnsafe<"info" | "warning" | "critical">>;
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<_$alepha.TObject<{
588
- id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$alepha.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
589
- createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$alepha.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
590
- type: _$alepha.TString;
591
- action: _$alepha.TString;
592
- severity: _$alepha_orm0.PgAttr<_$alepha.TUnsafe<"info" | "warning" | "critical">, typeof _$alepha_orm0.PG_DEFAULT>;
593
- userId: _$alepha.TOptional<_$alepha.TString>;
594
- userRealm: _$alepha.TOptional<_$alepha.TString>;
595
- userEmail: _$alepha.TOptional<_$alepha.TString>;
596
- resourceType: _$alepha.TOptional<_$alepha.TString>;
597
- resourceId: _$alepha.TOptional<_$alepha.TString>;
598
- description: _$alepha.TOptional<_$alepha.TString>;
599
- metadata: _$alepha.TOptional<_$alepha.TRecord<string, _$alepha.TAny>>;
600
- ipAddress: _$alepha.TOptional<_$alepha.TString>;
601
- userAgent: _$alepha.TOptional<_$alepha.TString>;
602
- sessionId: _$alepha.TOptional<_$alepha.TString>;
603
- requestId: _$alepha.TOptional<_$alepha.TString>;
604
- success: _$alepha_orm0.PgAttr<_$alepha.TBoolean, typeof _$alepha_orm0.PG_DEFAULT>;
605
- errorMessage: _$alepha.TOptional<_$alepha.TString>;
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: _$alepha.TObject<{
613
- resourceType: _$alepha.TString;
614
- resourceId: _$alepha.TString;
622
+ params: _$typebox.TObject<{
623
+ resourceType: _$typebox.TString;
624
+ resourceId: _$typebox.TString;
615
625
  }>;
616
- query: _$alepha.TObject<{
617
- type: _$alepha.TOptional<_$alepha.TString>;
618
- action: _$alepha.TOptional<_$alepha.TString>;
619
- severity: _$alepha.TOptional<_$alepha.TUnsafe<"info" | "warning" | "critical">>;
620
- search: _$alepha.TOptional<_$alepha.TString>;
621
- sort: _$alepha.TOptional<_$alepha.TString>;
622
- userId: _$alepha.TOptional<_$alepha.TString>;
623
- userRealm: _$alepha.TOptional<_$alepha.TString>;
624
- success: _$alepha.TOptional<_$alepha.TBoolean>;
625
- page: _$alepha.TOptional<_$alepha.TInteger>;
626
- size: _$alepha.TOptional<_$alepha.TInteger>;
627
- from: _$alepha.TOptional<_$alepha.TString>;
628
- to: _$alepha.TOptional<_$alepha.TString>;
626
+ query: _$typebox.TObject<{
627
+ type: _$typebox.TOptional<_$typebox.TString>;
628
+ search: _$typebox.TOptional<_$typebox.TString>;
629
+ action: _$typebox.TOptional<_$typebox.TString>;
630
+ severity: _$typebox.TOptional<_$typebox.TUnsafe<"info" | "warning" | "critical">>;
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<_$alepha.TObject<{
631
- id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$alepha.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
632
- createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$alepha.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
633
- type: _$alepha.TString;
634
- action: _$alepha.TString;
635
- severity: _$alepha_orm0.PgAttr<_$alepha.TUnsafe<"info" | "warning" | "critical">, typeof _$alepha_orm0.PG_DEFAULT>;
636
- userId: _$alepha.TOptional<_$alepha.TString>;
637
- userRealm: _$alepha.TOptional<_$alepha.TString>;
638
- userEmail: _$alepha.TOptional<_$alepha.TString>;
639
- resourceType: _$alepha.TOptional<_$alepha.TString>;
640
- resourceId: _$alepha.TOptional<_$alepha.TString>;
641
- description: _$alepha.TOptional<_$alepha.TString>;
642
- metadata: _$alepha.TOptional<_$alepha.TRecord<string, _$alepha.TAny>>;
643
- ipAddress: _$alepha.TOptional<_$alepha.TString>;
644
- userAgent: _$alepha.TOptional<_$alepha.TString>;
645
- sessionId: _$alepha.TOptional<_$alepha.TString>;
646
- requestId: _$alepha.TOptional<_$alepha.TString>;
647
- success: _$alepha_orm0.PgAttr<_$alepha.TBoolean, typeof _$alepha_orm0.PG_DEFAULT>;
648
- errorMessage: _$alepha.TOptional<_$alepha.TString>;
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: _$alepha.TObject<{
656
- from: _$alepha.TOptional<_$alepha.TString>;
657
- to: _$alepha.TOptional<_$alepha.TString>;
658
- userRealm: _$alepha.TOptional<_$alepha.TString>;
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: _$alepha.TObject<{
661
- total: _$alepha.TInteger;
662
- byType: _$alepha.TRecord<"^.*$", _$alepha.TInteger>;
663
- bySeverity: _$alepha.TObject<{
664
- info: _$alepha.TInteger;
665
- warning: _$alepha.TInteger;
666
- critical: _$alepha.TInteger;
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: _$alepha.TNumber;
669
- recentFailures: _$alepha.TArray<_$alepha.TObject<{
670
- id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$alepha.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
671
- createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$alepha.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
672
- type: _$alepha.TString;
673
- action: _$alepha.TString;
674
- severity: _$alepha_orm0.PgAttr<_$alepha.TUnsafe<"info" | "warning" | "critical">, typeof _$alepha_orm0.PG_DEFAULT>;
675
- userId: _$alepha.TOptional<_$alepha.TString>;
676
- userRealm: _$alepha.TOptional<_$alepha.TString>;
677
- userEmail: _$alepha.TOptional<_$alepha.TString>;
678
- resourceType: _$alepha.TOptional<_$alepha.TString>;
679
- resourceId: _$alepha.TOptional<_$alepha.TString>;
680
- description: _$alepha.TOptional<_$alepha.TString>;
681
- metadata: _$alepha.TOptional<_$alepha.TRecord<string, _$alepha.TAny>>;
682
- ipAddress: _$alepha.TOptional<_$alepha.TString>;
683
- userAgent: _$alepha.TOptional<_$alepha.TString>;
684
- sessionId: _$alepha.TOptional<_$alepha.TString>;
685
- requestId: _$alepha.TOptional<_$alepha.TString>;
686
- success: _$alepha_orm0.PgAttr<_$alepha.TBoolean, typeof _$alepha_orm0.PG_DEFAULT>;
687
- errorMessage: _$alepha.TOptional<_$alepha.TString>;
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: _$alepha.TArray<_$alepha.TObject<{
696
- type: _$alepha.TString;
697
- description: _$alepha.TOptional<_$alepha.TString>;
698
- actions: _$alepha.TArray<_$alepha.TString>;
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: _$alepha.TObject<{
706
- types: _$alepha.TArray<_$alepha.TString>;
707
- actions: _$alepha.TArray<_$alepha.TString>;
708
- resourceTypes: _$alepha.TArray<_$alepha.TString>;
709
- userRealms: _$alepha.TArray<_$alepha.TString>;
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: _$alepha.TObject<{
1117
- DATABASE_URL: _$alepha.TOptional<_$alepha.TString>;
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: _$alepha.TOptional<_$alepha.TBoolean>;
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: _$alepha.TObject<{
1136
- id: PgAttr<PgAttr<_$alepha.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1137
- createdAt: PgAttr<PgAttr<_$alepha.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1138
- type: _$alepha.TString;
1139
- action: _$alepha.TString;
1140
- severity: PgAttr<_$alepha.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
1141
- userId: _$alepha.TOptional<_$alepha.TString>;
1142
- userRealm: _$alepha.TOptional<_$alepha.TString>;
1143
- userEmail: _$alepha.TOptional<_$alepha.TString>;
1144
- resourceType: _$alepha.TOptional<_$alepha.TString>;
1145
- resourceId: _$alepha.TOptional<_$alepha.TString>;
1146
- description: _$alepha.TOptional<_$alepha.TString>;
1147
- metadata: _$alepha.TOptional<_$alepha.TRecord<string, _$alepha.TAny>>;
1148
- ipAddress: _$alepha.TOptional<_$alepha.TString>;
1149
- userAgent: _$alepha.TOptional<_$alepha.TString>;
1150
- sessionId: _$alepha.TOptional<_$alepha.TString>;
1151
- requestId: _$alepha.TOptional<_$alepha.TString>;
1152
- success: PgAttr<_$alepha.TBoolean, typeof PG_DEFAULT>;
1153
- errorMessage: _$alepha.TOptional<_$alepha.TString>;
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