@authhero/adapter-interfaces 2.5.0 → 2.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/dist/adapter-interfaces.cjs +1 -1
  2. package/dist/adapter-interfaces.d.ts +10911 -52339
  3. package/dist/adapter-interfaces.mjs +189 -211
  4. package/dist/tsconfig.types.tsbuildinfo +1 -0
  5. package/dist/types/adapters/ActionExecutions.d.ts +5 -0
  6. package/dist/types/adapters/ActionVersions.d.ts +20 -0
  7. package/dist/types/adapters/Actions.d.ts +12 -0
  8. package/dist/types/adapters/Analytics.d.ts +9 -0
  9. package/dist/types/adapters/AuthenticationMethods.d.ts +9 -0
  10. package/dist/types/adapters/Branding.d.ts +5 -0
  11. package/dist/types/adapters/Cache.d.ts +35 -0
  12. package/dist/types/adapters/ClientConnections.d.ts +26 -0
  13. package/dist/types/adapters/ClientGrants.d.ts +12 -0
  14. package/dist/types/adapters/ClientRegistrationTokens.d.ts +11 -0
  15. package/dist/types/adapters/Clients.d.ts +25 -0
  16. package/dist/types/adapters/CodeExecutor.d.ts +47 -0
  17. package/dist/types/adapters/Codes.d.ts +17 -0
  18. package/dist/types/adapters/Connections.d.ts +12 -0
  19. package/dist/types/adapters/CustomDomains.d.ts +9 -0
  20. package/dist/types/adapters/CustomText.d.ts +22 -0
  21. package/dist/types/adapters/EmailProviders.d.ts +7 -0
  22. package/dist/types/adapters/EmailService.d.ts +14 -0
  23. package/dist/types/adapters/EmailTemplates.d.ts +8 -0
  24. package/dist/types/adapters/Flows.d.ts +12 -0
  25. package/dist/types/adapters/Forms.d.ts +12 -0
  26. package/dist/types/adapters/Geo.d.ts +16 -0
  27. package/dist/types/adapters/HookCode.d.ts +7 -0
  28. package/dist/types/adapters/Hooks.d.ts +12 -0
  29. package/dist/types/adapters/Invites.d.ts +12 -0
  30. package/dist/types/adapters/Keys.d.ts +10 -0
  31. package/dist/types/adapters/LogStreams.d.ts +8 -0
  32. package/dist/types/adapters/LoginSessions.d.ts +7 -0
  33. package/dist/types/adapters/Logs.d.ts +11 -0
  34. package/dist/types/adapters/MigrationSources.d.ts +8 -0
  35. package/dist/types/adapters/OrganizationConnections.d.ts +8 -0
  36. package/dist/types/adapters/Organizations.d.ts +12 -0
  37. package/dist/types/adapters/Outbox.d.ts +59 -0
  38. package/dist/types/adapters/Passwords.d.ts +7 -0
  39. package/dist/types/adapters/PromptSettings.d.ts +5 -0
  40. package/dist/types/adapters/RateLimit.d.ts +27 -0
  41. package/dist/types/adapters/RefreshTokens.d.ts +36 -0
  42. package/dist/types/adapters/ResourceServers.d.ts +12 -0
  43. package/dist/types/adapters/RolePermissions.d.ts +7 -0
  44. package/dist/types/adapters/Roles.d.ts +13 -0
  45. package/dist/types/adapters/Sessions.d.ts +12 -0
  46. package/dist/types/adapters/SmsService.d.ts +11 -0
  47. package/dist/types/adapters/Stats.d.ts +15 -0
  48. package/dist/types/adapters/TenantSettings.d.ts +5 -0
  49. package/dist/types/adapters/Tenants.d.ts +21 -0
  50. package/dist/types/adapters/Themes.d.ts +7 -0
  51. package/dist/types/adapters/UniversalLoginTemplates.d.ts +8 -0
  52. package/dist/types/adapters/UserOrganizations.d.ts +27 -0
  53. package/dist/types/adapters/UserPermissions.d.ts +7 -0
  54. package/dist/types/adapters/UserRoles.d.ts +13 -0
  55. package/dist/types/adapters/Users.d.ts +20 -0
  56. package/dist/types/adapters/index.d.ts +217 -0
  57. package/dist/types/index.d.ts +4 -0
  58. package/dist/types/types/Action.d.ts +87 -0
  59. package/dist/types/types/ActionExecution.d.ts +128 -0
  60. package/dist/types/types/ActionVersion.d.ts +44 -0
  61. package/dist/types/types/Analytics.d.ts +91 -0
  62. package/dist/types/types/AttackProtection.d.ts +79 -0
  63. package/dist/types/types/AuditEvent.d.ts +208 -0
  64. package/dist/types/types/AuthParams.d.ts +67 -0
  65. package/dist/types/types/AuthenticationMethod.d.ts +59 -0
  66. package/dist/types/types/BaseEntity.d.ts +5 -0
  67. package/dist/types/types/Branding.d.ts +24 -0
  68. package/dist/types/types/Client.d.ts +249 -0
  69. package/dist/types/types/ClientGrant.d.ts +61 -0
  70. package/dist/types/types/ClientRegistrationToken.d.ts +37 -0
  71. package/dist/types/types/Code.d.ts +68 -0
  72. package/dist/types/types/Connection.d.ts +470 -0
  73. package/dist/types/types/CustomDomain.d.ts +116 -0
  74. package/dist/types/types/CustomText.d.ts +81 -0
  75. package/dist/types/types/Device.d.ts +9 -0
  76. package/dist/types/types/EmailProvider.d.ts +9 -0
  77. package/dist/types/types/EmailTemplate.d.ts +41 -0
  78. package/dist/types/types/Flow.d.ts +267 -0
  79. package/dist/types/types/Flows.d.ts +572 -0
  80. package/dist/types/types/Forms.d.ts +4943 -0
  81. package/dist/types/types/Hook.d.ts +152 -0
  82. package/dist/types/types/HookCode.d.ts +15 -0
  83. package/dist/types/types/Identity.d.ts +36 -0
  84. package/dist/types/types/Invite.d.ts +50 -0
  85. package/dist/types/types/JWKS.d.ts +89 -0
  86. package/dist/types/types/ListParams.d.ts +14 -0
  87. package/dist/types/types/LogStream.d.ts +67 -0
  88. package/dist/types/types/LoginSession.d.ts +143 -0
  89. package/dist/types/types/Logs.d.ts +255 -0
  90. package/dist/types/types/MigrationSource.d.ts +58 -0
  91. package/dist/types/types/Organization.d.ts +77 -0
  92. package/dist/types/types/OrganizationConnection.d.ts +34 -0
  93. package/dist/types/types/Password.d.ts +25 -0
  94. package/dist/types/types/PromptSetting.d.ts +11 -0
  95. package/dist/types/types/RefreshTokens.d.ts +59 -0
  96. package/dist/types/types/ResourceServer.d.ts +124 -0
  97. package/dist/types/types/Role.d.ts +29 -0
  98. package/dist/types/types/RolePermission.d.ts +21 -0
  99. package/dist/types/types/Session.d.ts +43 -0
  100. package/dist/types/types/SigningKey.d.ts +22 -0
  101. package/dist/types/types/SmsProvider.d.ts +11 -0
  102. package/dist/types/types/Stats.d.ts +12 -0
  103. package/dist/types/types/Strategy.d.ts +21 -0
  104. package/dist/types/types/Tenant.d.ts +367 -0
  105. package/dist/types/types/TenantSettings.d.ts +96 -0
  106. package/dist/types/types/Theme.d.ts +341 -0
  107. package/dist/types/types/Token.d.ts +25 -0
  108. package/dist/types/types/User.d.ts +222 -0
  109. package/dist/types/types/UserOrganization.d.ts +14 -0
  110. package/dist/types/types/UserPermission.d.ts +46 -0
  111. package/dist/types/types/UserRole.d.ts +23 -0
  112. package/dist/types/types/auth0/Query.d.ts +8 -0
  113. package/dist/types/types/auth0/Totals.d.ts +13 -0
  114. package/dist/types/types/auth0/UserResponse.d.ts +46 -0
  115. package/dist/types/types/auth0/index.d.ts +3 -0
  116. package/dist/types/types/index.d.ts +53 -0
  117. package/dist/types/utils/connection-attributes.d.ts +25 -0
  118. package/dist/types/utils/guards.d.ts +1 -0
  119. package/dist/types/utils/index.d.ts +4 -0
  120. package/dist/types/utils/passthrough.d.ts +111 -0
  121. package/dist/types/utils/user-id.d.ts +4 -0
  122. package/package.json +5 -5
@@ -0,0 +1,217 @@
1
+ import { ActionsAdapter } from "./Actions";
2
+ import { ActionExecutionsAdapter } from "./ActionExecutions";
3
+ import { ActionVersionsAdapter } from "./ActionVersions";
4
+ import { FlowsAdapter } from "./Flows";
5
+ import { CacheAdapter } from "./Cache";
6
+ import { ClientsAdapter } from "./Clients";
7
+ import { ClientConnectionsAdapter } from "./ClientConnections";
8
+ import { ClientGrantsAdapter } from "./ClientGrants";
9
+ import { ClientRegistrationTokensAdapter } from "./ClientRegistrationTokens";
10
+ import { CodesAdapter } from "./Codes";
11
+ import { PasswordsAdapter } from "./Passwords";
12
+ import { SessionsAdapter } from "./Sessions";
13
+ import { TenantsDataAdapter } from "./Tenants";
14
+ import { UserDataAdapter } from "./Users";
15
+ import { LogsDataAdapter } from "./Logs";
16
+ import { LogStreamsAdapter } from "./LogStreams";
17
+ import { MigrationSourcesAdapter } from "./MigrationSources";
18
+ import { ConnectionsAdapter } from "./Connections";
19
+ import { CustomDomainsAdapter } from "./CustomDomains";
20
+ import { KeysAdapter } from "./Keys";
21
+ import { BrandingAdapter } from "./Branding";
22
+ import { HooksAdapter } from "./Hooks";
23
+ import { HookCodeAdapter } from "./HookCode";
24
+ import { ThemesAdapter } from "./Themes";
25
+ import { LoginSessionsAdapter } from "./LoginSessions";
26
+ import { PromptSettingsAdapter } from "./PromptSettings";
27
+ import { EmailProvidersAdapter } from "./EmailProviders";
28
+ import { EmailTemplatesAdapter } from "./EmailTemplates";
29
+ import { RefreshTokensAdapter } from "./RefreshTokens";
30
+ import { FormsAdapter } from "./Forms";
31
+ import { ResourceServersAdapter } from "./ResourceServers";
32
+ import { RolePermissionsAdapter } from "./RolePermissions";
33
+ import { UserPermissionsAdapter } from "./UserPermissions";
34
+ import { RolesAdapter } from "./Roles";
35
+ import { UserRolesAdapter } from "./UserRoles";
36
+ import { OrganizationsAdapter } from "./Organizations";
37
+ import { OrganizationConnectionsAdapter } from "./OrganizationConnections";
38
+ import { UserOrganizationsAdapter } from "./UserOrganizations";
39
+ import { InvitesAdapter } from "./Invites";
40
+ import { GeoAdapter } from "./Geo";
41
+ import { AuthenticationMethodsAdapter } from "./AuthenticationMethods";
42
+ import { StatsAdapter } from "./Stats";
43
+ import { AnalyticsAdapter } from "./Analytics";
44
+ import { UniversalLoginTemplatesAdapter } from "./UniversalLoginTemplates";
45
+ import { CustomTextAdapter } from "./CustomText";
46
+ import { EmailServiceAdapter } from "./EmailService";
47
+ import { SmsServiceAdapter } from "./SmsService";
48
+ import { OutboxAdapter } from "./Outbox";
49
+ import { RateLimitAdapter } from "./RateLimit";
50
+ /**
51
+ * Parameters for cleaning up expired sessions
52
+ */
53
+ export interface SessionCleanupParams {
54
+ /** Optional tenant ID to scope cleanup to a specific tenant */
55
+ tenant_id?: string;
56
+ /** Optional user ID to scope cleanup to a specific user */
57
+ user_id?: string;
58
+ }
59
+ export interface DataAdapters {
60
+ actions: ActionsAdapter;
61
+ actionExecutions: ActionExecutionsAdapter;
62
+ actionVersions: ActionVersionsAdapter;
63
+ branding: BrandingAdapter;
64
+ cache?: CacheAdapter;
65
+ clients: ClientsAdapter;
66
+ clientConnections: ClientConnectionsAdapter;
67
+ clientGrants: ClientGrantsAdapter;
68
+ clientRegistrationTokens?: ClientRegistrationTokensAdapter;
69
+ codes: CodesAdapter;
70
+ connections: ConnectionsAdapter;
71
+ customDomains: CustomDomainsAdapter;
72
+ emailProviders: EmailProvidersAdapter;
73
+ emailTemplates: EmailTemplatesAdapter;
74
+ flows: FlowsAdapter;
75
+ forms: FormsAdapter;
76
+ geo?: GeoAdapter;
77
+ hookCode: HookCodeAdapter;
78
+ hooks: HooksAdapter;
79
+ invites: InvitesAdapter;
80
+ keys: KeysAdapter;
81
+ loginSessions: LoginSessionsAdapter;
82
+ logs: LogsDataAdapter;
83
+ logStreams?: LogStreamsAdapter;
84
+ /**
85
+ * Optional tenant-level migration sources for lazy refresh-token re-mint
86
+ * against upstream IdPs (Auth0, Cognito, Okta, generic OIDC). When unset,
87
+ * unrecognized refresh tokens fail with `invalid_grant` as usual.
88
+ */
89
+ migrationSources?: MigrationSourcesAdapter;
90
+ passwords: PasswordsAdapter;
91
+ promptSettings: PromptSettingsAdapter;
92
+ refreshTokens: RefreshTokensAdapter;
93
+ resourceServers: ResourceServersAdapter;
94
+ rolePermissions: RolePermissionsAdapter;
95
+ userPermissions: UserPermissionsAdapter;
96
+ roles: RolesAdapter;
97
+ sessions: SessionsAdapter;
98
+ stats?: StatsAdapter;
99
+ /**
100
+ * Optional richer analytics surface, exposed via `/api/v2/analytics/*`.
101
+ * Returns ClickHouse-style `{ meta, data }` responses with filtering and
102
+ * grouping. Unlike `stats`, this is not Auth0 wire-compatible.
103
+ */
104
+ analytics?: AnalyticsAdapter;
105
+ tenants: TenantsDataAdapter;
106
+ themes: ThemesAdapter;
107
+ universalLoginTemplates: UniversalLoginTemplatesAdapter;
108
+ customText: CustomTextAdapter;
109
+ users: UserDataAdapter;
110
+ userRoles: UserRolesAdapter;
111
+ organizations: OrganizationsAdapter;
112
+ organizationConnections: OrganizationConnectionsAdapter;
113
+ authenticationMethods: AuthenticationMethodsAdapter;
114
+ userOrganizations: UserOrganizationsAdapter;
115
+ emailService?: EmailServiceAdapter;
116
+ smsService?: SmsServiceAdapter;
117
+ /** Optional outbox adapter for transactional audit event capture */
118
+ outbox?: OutboxAdapter;
119
+ /**
120
+ * Optional rate-limit adapter for short-window abuse protection
121
+ * (e.g. backed by the Cloudflare Workers Rate Limiter binding).
122
+ * Auth flows treat this as opt-in: when undefined, no extra
123
+ * throttling is applied.
124
+ */
125
+ rateLimit?: RateLimitAdapter;
126
+ /**
127
+ * Execute a callback within a database transaction.
128
+ * The callback receives a set of adapters scoped to the transaction.
129
+ * If the callback throws, the transaction is rolled back.
130
+ */
131
+ transaction<T>(fn: (trxAdapters: DataAdapters) => Promise<T>): Promise<T>;
132
+ /**
133
+ * Optional session cleanup function.
134
+ * Cleans up expired login_sessions, sessions, and refresh_tokens.
135
+ * Can be scoped to a specific tenant and/or user.
136
+ */
137
+ sessionCleanup?: (params?: SessionCleanupParams) => Promise<void>;
138
+ /**
139
+ * Multi-tenancy configuration set by withRuntimeFallback.
140
+ * Used by the tenants route for access control and by runtime helpers
141
+ * (e.g. `getEnrichedClient`) to decide which control plane to inherit from.
142
+ */
143
+ multiTenancyConfig?: {
144
+ controlPlaneTenantId?: string;
145
+ controlPlaneClientId?: string;
146
+ /**
147
+ * Per-tenant override for runtime inheritance lookups. When defined,
148
+ * runtime helpers must consult it for the tenant being read instead of
149
+ * relying on the static `controlPlaneTenantId` / `controlPlaneClientId`.
150
+ * Return `undefined` to opt that tenant out of inheritance.
151
+ *
152
+ * Access control, sync direction, and tenant management routing always
153
+ * use the static `controlPlaneTenantId` and are not affected by this
154
+ * resolver.
155
+ */
156
+ resolveControlPlane?: (params: {
157
+ tenant_id: string;
158
+ }) => {
159
+ tenantId: string;
160
+ clientId?: string;
161
+ } | undefined | Promise<{
162
+ tenantId: string;
163
+ clientId?: string;
164
+ } | undefined>;
165
+ };
166
+ }
167
+ export * from "./Actions";
168
+ export * from "./ActionExecutions";
169
+ export * from "./ActionVersions";
170
+ export * from "./Flows";
171
+ export * from "./Cache";
172
+ export * from "./Clients";
173
+ export * from "./ClientConnections";
174
+ export * from "./ClientGrants";
175
+ export * from "./ClientRegistrationTokens";
176
+ export * from "./Keys";
177
+ export * from "./RolePermissions";
178
+ export * from "./UserPermissions";
179
+ export * from "./UserRoles";
180
+ export * from "./Organizations";
181
+ export * from "./OrganizationConnections";
182
+ export * from "./UserOrganizations";
183
+ export * from "./Invites";
184
+ export * from "./Geo";
185
+ export * from "./Stats";
186
+ export * from "./Analytics";
187
+ export * from "./UniversalLoginTemplates";
188
+ export * from "./CustomText";
189
+ export * from "./AuthenticationMethods";
190
+ export * from "./LogStreams";
191
+ export * from "./MigrationSources";
192
+ export * from "./EmailService";
193
+ export * from "./SmsService";
194
+ export * from "./Outbox";
195
+ export * from "./RateLimit";
196
+ export * from "./HookCode";
197
+ export * from "./CodeExecutor";
198
+ export * from "./RefreshTokens";
199
+ export * from "./Branding";
200
+ export * from "./Codes";
201
+ export * from "./Connections";
202
+ export * from "./CustomDomains";
203
+ export * from "./EmailProviders";
204
+ export * from "./EmailTemplates";
205
+ export * from "./Forms";
206
+ export * from "./Hooks";
207
+ export * from "./LoginSessions";
208
+ export * from "./Logs";
209
+ export * from "./Passwords";
210
+ export * from "./PromptSettings";
211
+ export * from "./ResourceServers";
212
+ export * from "./Roles";
213
+ export * from "./Sessions";
214
+ export * from "./TenantSettings";
215
+ export * from "./Tenants";
216
+ export * from "./Themes";
217
+ export * from "./Users";
@@ -0,0 +1,4 @@
1
+ export * from "./types";
2
+ export * from "./utils";
3
+ export type * from "./types";
4
+ export type * from "./adapters";
@@ -0,0 +1,87 @@
1
+ import { z } from "@hono/zod-openapi";
2
+ export declare const actionTriggerSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ version: z.ZodOptional<z.ZodString>;
5
+ }, z.core.$strip>;
6
+ export declare const actionDependencySchema: z.ZodObject<{
7
+ name: z.ZodString;
8
+ version: z.ZodString;
9
+ }, z.core.$strip>;
10
+ export declare const actionSecretSchema: z.ZodObject<{
11
+ name: z.ZodString;
12
+ value: z.ZodOptional<z.ZodString>;
13
+ }, z.core.$strip>;
14
+ export declare const actionInsertSchema: z.ZodObject<{
15
+ name: z.ZodString;
16
+ code: z.ZodString;
17
+ supported_triggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
18
+ id: z.ZodString;
19
+ version: z.ZodOptional<z.ZodString>;
20
+ }, z.core.$strip>>>;
21
+ runtime: z.ZodOptional<z.ZodString>;
22
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
23
+ name: z.ZodString;
24
+ version: z.ZodString;
25
+ }, z.core.$strip>>>;
26
+ secrets: z.ZodOptional<z.ZodArray<z.ZodObject<{
27
+ name: z.ZodString;
28
+ value: z.ZodOptional<z.ZodString>;
29
+ }, z.core.$strip>>>;
30
+ is_system: z.ZodOptional<z.ZodBoolean>;
31
+ inherit: z.ZodOptional<z.ZodBoolean>;
32
+ }, z.core.$strip>;
33
+ export type ActionInsert = z.infer<typeof actionInsertSchema>;
34
+ export declare const actionUpdateSchema: z.ZodObject<{
35
+ name: z.ZodOptional<z.ZodString>;
36
+ code: z.ZodOptional<z.ZodString>;
37
+ supported_triggers: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
38
+ id: z.ZodString;
39
+ version: z.ZodOptional<z.ZodString>;
40
+ }, z.core.$strip>>>>;
41
+ runtime: z.ZodOptional<z.ZodOptional<z.ZodString>>;
42
+ dependencies: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
43
+ name: z.ZodString;
44
+ version: z.ZodString;
45
+ }, z.core.$strip>>>>;
46
+ secrets: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
47
+ name: z.ZodString;
48
+ value: z.ZodOptional<z.ZodString>;
49
+ }, z.core.$strip>>>>;
50
+ is_system: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
51
+ inherit: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
52
+ status: z.ZodOptional<z.ZodEnum<{
53
+ draft: "draft";
54
+ built: "built";
55
+ }>>;
56
+ deployed_at: z.ZodOptional<z.ZodString>;
57
+ }, z.core.$strip>;
58
+ export type ActionUpdate = z.infer<typeof actionUpdateSchema>;
59
+ export declare const actionSchema: z.ZodObject<{
60
+ name: z.ZodString;
61
+ code: z.ZodString;
62
+ supported_triggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
63
+ id: z.ZodString;
64
+ version: z.ZodOptional<z.ZodString>;
65
+ }, z.core.$strip>>>;
66
+ runtime: z.ZodOptional<z.ZodString>;
67
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
68
+ name: z.ZodString;
69
+ version: z.ZodString;
70
+ }, z.core.$strip>>>;
71
+ is_system: z.ZodOptional<z.ZodBoolean>;
72
+ inherit: z.ZodOptional<z.ZodBoolean>;
73
+ id: z.ZodString;
74
+ tenant_id: z.ZodString;
75
+ status: z.ZodDefault<z.ZodEnum<{
76
+ draft: "draft";
77
+ built: "built";
78
+ }>>;
79
+ deployed_at: z.ZodOptional<z.ZodString>;
80
+ secrets: z.ZodOptional<z.ZodArray<z.ZodObject<{
81
+ name: z.ZodString;
82
+ value: z.ZodOptional<z.ZodString>;
83
+ }, z.core.$strip>>>;
84
+ created_at: z.ZodString;
85
+ updated_at: z.ZodString;
86
+ }, z.core.$strip>;
87
+ export type Action = z.infer<typeof actionSchema>;
@@ -0,0 +1,128 @@
1
+ import { z } from "@hono/zod-openapi";
2
+ export declare const actionExecutionTriggerIdSchema: z.ZodString;
3
+ export declare const actionExecutionStatusSchema: z.ZodEnum<{
4
+ unspecified: "unspecified";
5
+ pending: "pending";
6
+ final: "final";
7
+ partial: "partial";
8
+ canceled: "canceled";
9
+ suspended: "suspended";
10
+ }>;
11
+ export type ActionExecutionStatus = z.infer<typeof actionExecutionStatusSchema>;
12
+ export declare const actionExecutionErrorSchema: z.ZodObject<{
13
+ id: z.ZodString;
14
+ msg: z.ZodString;
15
+ url: z.ZodOptional<z.ZodString>;
16
+ }, z.core.$strip>;
17
+ export type ActionExecutionError = z.infer<typeof actionExecutionErrorSchema>;
18
+ export declare const actionExecutionResultSchema: z.ZodObject<{
19
+ action_name: z.ZodString;
20
+ error: z.ZodNullable<z.ZodObject<{
21
+ id: z.ZodString;
22
+ msg: z.ZodString;
23
+ url: z.ZodOptional<z.ZodString>;
24
+ }, z.core.$strip>>;
25
+ started_at: z.ZodString;
26
+ ended_at: z.ZodString;
27
+ }, z.core.$strip>;
28
+ export type ActionExecutionResult = z.infer<typeof actionExecutionResultSchema>;
29
+ export declare const actionExecutionLogEntrySchema: z.ZodObject<{
30
+ level: z.ZodEnum<{
31
+ error: "error";
32
+ log: "log";
33
+ info: "info";
34
+ warn: "warn";
35
+ debug: "debug";
36
+ }>;
37
+ message: z.ZodString;
38
+ }, z.core.$strip>;
39
+ export type ActionExecutionLogEntry = z.infer<typeof actionExecutionLogEntrySchema>;
40
+ export declare const actionExecutionLogsSchema: z.ZodArray<z.ZodObject<{
41
+ action_name: z.ZodString;
42
+ lines: z.ZodArray<z.ZodObject<{
43
+ level: z.ZodEnum<{
44
+ error: "error";
45
+ log: "log";
46
+ info: "info";
47
+ warn: "warn";
48
+ debug: "debug";
49
+ }>;
50
+ message: z.ZodString;
51
+ }, z.core.$strip>>;
52
+ }, z.core.$strip>>;
53
+ export type ActionExecutionLogs = z.infer<typeof actionExecutionLogsSchema>;
54
+ export declare const actionExecutionSchema: z.ZodObject<{
55
+ id: z.ZodString;
56
+ tenant_id: z.ZodString;
57
+ trigger_id: z.ZodString;
58
+ status: z.ZodEnum<{
59
+ unspecified: "unspecified";
60
+ pending: "pending";
61
+ final: "final";
62
+ partial: "partial";
63
+ canceled: "canceled";
64
+ suspended: "suspended";
65
+ }>;
66
+ results: z.ZodArray<z.ZodObject<{
67
+ action_name: z.ZodString;
68
+ error: z.ZodNullable<z.ZodObject<{
69
+ id: z.ZodString;
70
+ msg: z.ZodString;
71
+ url: z.ZodOptional<z.ZodString>;
72
+ }, z.core.$strip>>;
73
+ started_at: z.ZodString;
74
+ ended_at: z.ZodString;
75
+ }, z.core.$strip>>;
76
+ logs: z.ZodOptional<z.ZodArray<z.ZodObject<{
77
+ action_name: z.ZodString;
78
+ lines: z.ZodArray<z.ZodObject<{
79
+ level: z.ZodEnum<{
80
+ error: "error";
81
+ log: "log";
82
+ info: "info";
83
+ warn: "warn";
84
+ debug: "debug";
85
+ }>;
86
+ message: z.ZodString;
87
+ }, z.core.$strip>>;
88
+ }, z.core.$strip>>>;
89
+ created_at: z.ZodString;
90
+ updated_at: z.ZodString;
91
+ }, z.core.$strip>;
92
+ export type ActionExecution = z.infer<typeof actionExecutionSchema>;
93
+ export declare const actionExecutionInsertSchema: z.ZodObject<{
94
+ id: z.ZodString;
95
+ status: z.ZodEnum<{
96
+ unspecified: "unspecified";
97
+ pending: "pending";
98
+ final: "final";
99
+ partial: "partial";
100
+ canceled: "canceled";
101
+ suspended: "suspended";
102
+ }>;
103
+ trigger_id: z.ZodString;
104
+ results: z.ZodArray<z.ZodObject<{
105
+ action_name: z.ZodString;
106
+ error: z.ZodNullable<z.ZodObject<{
107
+ id: z.ZodString;
108
+ msg: z.ZodString;
109
+ url: z.ZodOptional<z.ZodString>;
110
+ }, z.core.$strip>>;
111
+ started_at: z.ZodString;
112
+ ended_at: z.ZodString;
113
+ }, z.core.$strip>>;
114
+ logs: z.ZodOptional<z.ZodArray<z.ZodObject<{
115
+ action_name: z.ZodString;
116
+ lines: z.ZodArray<z.ZodObject<{
117
+ level: z.ZodEnum<{
118
+ error: "error";
119
+ log: "log";
120
+ info: "info";
121
+ warn: "warn";
122
+ debug: "debug";
123
+ }>;
124
+ message: z.ZodString;
125
+ }, z.core.$strip>>;
126
+ }, z.core.$strip>>>;
127
+ }, z.core.$strip>;
128
+ export type ActionExecutionInsert = z.infer<typeof actionExecutionInsertSchema>;
@@ -0,0 +1,44 @@
1
+ import { z } from "@hono/zod-openapi";
2
+ export declare const actionVersionInsertSchema: z.ZodObject<{
3
+ action_id: z.ZodString;
4
+ code: z.ZodString;
5
+ runtime: z.ZodOptional<z.ZodString>;
6
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
7
+ name: z.ZodString;
8
+ version: z.ZodString;
9
+ }, z.core.$strip>>>;
10
+ secrets: z.ZodOptional<z.ZodArray<z.ZodObject<{
11
+ name: z.ZodString;
12
+ value: z.ZodOptional<z.ZodString>;
13
+ }, z.core.$strip>>>;
14
+ supported_triggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
15
+ id: z.ZodString;
16
+ version: z.ZodOptional<z.ZodString>;
17
+ }, z.core.$strip>>>;
18
+ deployed: z.ZodDefault<z.ZodBoolean>;
19
+ }, z.core.$strip>;
20
+ export type ActionVersionInsert = z.infer<typeof actionVersionInsertSchema>;
21
+ export declare const actionVersionSchema: z.ZodObject<{
22
+ action_id: z.ZodString;
23
+ code: z.ZodString;
24
+ runtime: z.ZodOptional<z.ZodString>;
25
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
26
+ name: z.ZodString;
27
+ version: z.ZodString;
28
+ }, z.core.$strip>>>;
29
+ secrets: z.ZodOptional<z.ZodArray<z.ZodObject<{
30
+ name: z.ZodString;
31
+ value: z.ZodOptional<z.ZodString>;
32
+ }, z.core.$strip>>>;
33
+ supported_triggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
34
+ id: z.ZodString;
35
+ version: z.ZodOptional<z.ZodString>;
36
+ }, z.core.$strip>>>;
37
+ deployed: z.ZodDefault<z.ZodBoolean>;
38
+ id: z.ZodString;
39
+ tenant_id: z.ZodString;
40
+ number: z.ZodNumber;
41
+ created_at: z.ZodString;
42
+ updated_at: z.ZodString;
43
+ }, z.core.$strip>;
44
+ export type ActionVersion = z.infer<typeof actionVersionSchema>;
@@ -0,0 +1,91 @@
1
+ import { z } from "@hono/zod-openapi";
2
+ export declare const analyticsResourceSchema: z.ZodEnum<{
3
+ sessions: "sessions";
4
+ logins: "logins";
5
+ signups: "signups";
6
+ "active-users": "active-users";
7
+ "refresh-tokens": "refresh-tokens";
8
+ }>;
9
+ export type AnalyticsResource = z.infer<typeof analyticsResourceSchema>;
10
+ export declare const analyticsIntervalSchema: z.ZodEnum<{
11
+ hour: "hour";
12
+ day: "day";
13
+ week: "week";
14
+ month: "month";
15
+ }>;
16
+ export type AnalyticsInterval = z.infer<typeof analyticsIntervalSchema>;
17
+ export declare const analyticsGroupBySchema: z.ZodEnum<{
18
+ client_id: "client_id";
19
+ connection: "connection";
20
+ time: "time";
21
+ user_type: "user_type";
22
+ event: "event";
23
+ }>;
24
+ export type AnalyticsGroupBy = z.infer<typeof analyticsGroupBySchema>;
25
+ export declare const analyticsUserTypeSchema: z.ZodEnum<{
26
+ password: "password";
27
+ passwordless: "passwordless";
28
+ social: "social";
29
+ enterprise: "enterprise";
30
+ }>;
31
+ export type AnalyticsUserType = z.infer<typeof analyticsUserTypeSchema>;
32
+ export interface AnalyticsFilters {
33
+ connection?: string[];
34
+ client_id?: string[];
35
+ user_type?: AnalyticsUserType[];
36
+ user_id?: string[];
37
+ }
38
+ export interface AnalyticsQueryParams {
39
+ /** Inclusive lower bound, ISO 8601 datetime in UTC */
40
+ from: string;
41
+ /** Exclusive upper bound, ISO 8601 datetime in UTC */
42
+ to: string;
43
+ interval: AnalyticsInterval;
44
+ /** IANA timezone for bucket boundaries */
45
+ tz: string;
46
+ filters: AnalyticsFilters;
47
+ group_by: AnalyticsGroupBy[];
48
+ limit: number;
49
+ offset: number;
50
+ /** Column name, prefix with `-` for descending */
51
+ order_by?: string;
52
+ }
53
+ export interface AnalyticsColumnMeta {
54
+ name: string;
55
+ /** ClickHouse-style type label (e.g. "Date", "String", "UInt64", "DateTime") */
56
+ type: string;
57
+ }
58
+ export interface AnalyticsQueryResponse {
59
+ meta: AnalyticsColumnMeta[];
60
+ data: Array<Record<string, unknown>>;
61
+ rows: number;
62
+ rows_before_limit_at_least?: number;
63
+ statistics?: {
64
+ elapsed: number;
65
+ rows_read?: number;
66
+ bytes_read?: number;
67
+ };
68
+ }
69
+ export declare const analyticsColumnMetaSchema: z.ZodObject<{
70
+ name: z.ZodString;
71
+ type: z.ZodString;
72
+ }, z.core.$strip>;
73
+ export declare const analyticsStatisticsSchema: z.ZodObject<{
74
+ elapsed: z.ZodNumber;
75
+ rows_read: z.ZodOptional<z.ZodNumber>;
76
+ bytes_read: z.ZodOptional<z.ZodNumber>;
77
+ }, z.core.$strip>;
78
+ export declare const analyticsQueryResponseSchema: z.ZodObject<{
79
+ meta: z.ZodArray<z.ZodObject<{
80
+ name: z.ZodString;
81
+ type: z.ZodString;
82
+ }, z.core.$strip>>;
83
+ data: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>;
84
+ rows: z.ZodNumber;
85
+ rows_before_limit_at_least: z.ZodOptional<z.ZodNumber>;
86
+ statistics: z.ZodOptional<z.ZodObject<{
87
+ elapsed: z.ZodNumber;
88
+ rows_read: z.ZodOptional<z.ZodNumber>;
89
+ bytes_read: z.ZodOptional<z.ZodNumber>;
90
+ }, z.core.$strip>>;
91
+ }, z.core.$strip>;
@@ -0,0 +1,79 @@
1
+ import { z } from "@hono/zod-openapi";
2
+ export declare const breachedPasswordDetectionSchema: z.ZodObject<{
3
+ enabled: z.ZodOptional<z.ZodBoolean>;
4
+ shields: z.ZodOptional<z.ZodArray<z.ZodString>>;
5
+ admin_notification_frequency: z.ZodOptional<z.ZodArray<z.ZodString>>;
6
+ method: z.ZodOptional<z.ZodString>;
7
+ stage: z.ZodOptional<z.ZodObject<{
8
+ "pre-user-registration": z.ZodOptional<z.ZodObject<{
9
+ shields: z.ZodOptional<z.ZodArray<z.ZodString>>;
10
+ }, z.core.$strip>>;
11
+ "pre-change-password": z.ZodOptional<z.ZodObject<{
12
+ shields: z.ZodOptional<z.ZodArray<z.ZodString>>;
13
+ }, z.core.$strip>>;
14
+ }, z.core.$strip>>;
15
+ }, z.core.$strip>;
16
+ export type BreachedPasswordDetection = z.infer<typeof breachedPasswordDetectionSchema>;
17
+ export declare const bruteForceProtectionSchema: z.ZodObject<{
18
+ enabled: z.ZodOptional<z.ZodBoolean>;
19
+ shields: z.ZodOptional<z.ZodArray<z.ZodString>>;
20
+ allowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
21
+ mode: z.ZodOptional<z.ZodString>;
22
+ max_attempts: z.ZodOptional<z.ZodNumber>;
23
+ }, z.core.$strip>;
24
+ export type BruteForceProtection = z.infer<typeof bruteForceProtectionSchema>;
25
+ export declare const suspiciousIpThrottlingSchema: z.ZodObject<{
26
+ enabled: z.ZodOptional<z.ZodBoolean>;
27
+ shields: z.ZodOptional<z.ZodArray<z.ZodString>>;
28
+ allowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
29
+ stage: z.ZodOptional<z.ZodObject<{
30
+ "pre-login": z.ZodOptional<z.ZodObject<{
31
+ max_attempts: z.ZodOptional<z.ZodNumber>;
32
+ rate: z.ZodOptional<z.ZodNumber>;
33
+ }, z.core.$strip>>;
34
+ "pre-user-registration": z.ZodOptional<z.ZodObject<{
35
+ max_attempts: z.ZodOptional<z.ZodNumber>;
36
+ rate: z.ZodOptional<z.ZodNumber>;
37
+ }, z.core.$strip>>;
38
+ }, z.core.$strip>>;
39
+ }, z.core.$strip>;
40
+ export type SuspiciousIpThrottling = z.infer<typeof suspiciousIpThrottlingSchema>;
41
+ export declare const attackProtectionSchema: z.ZodObject<{
42
+ breached_password_detection: z.ZodOptional<z.ZodObject<{
43
+ enabled: z.ZodOptional<z.ZodBoolean>;
44
+ shields: z.ZodOptional<z.ZodArray<z.ZodString>>;
45
+ admin_notification_frequency: z.ZodOptional<z.ZodArray<z.ZodString>>;
46
+ method: z.ZodOptional<z.ZodString>;
47
+ stage: z.ZodOptional<z.ZodObject<{
48
+ "pre-user-registration": z.ZodOptional<z.ZodObject<{
49
+ shields: z.ZodOptional<z.ZodArray<z.ZodString>>;
50
+ }, z.core.$strip>>;
51
+ "pre-change-password": z.ZodOptional<z.ZodObject<{
52
+ shields: z.ZodOptional<z.ZodArray<z.ZodString>>;
53
+ }, z.core.$strip>>;
54
+ }, z.core.$strip>>;
55
+ }, z.core.$strip>>;
56
+ brute_force_protection: z.ZodOptional<z.ZodObject<{
57
+ enabled: z.ZodOptional<z.ZodBoolean>;
58
+ shields: z.ZodOptional<z.ZodArray<z.ZodString>>;
59
+ allowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
60
+ mode: z.ZodOptional<z.ZodString>;
61
+ max_attempts: z.ZodOptional<z.ZodNumber>;
62
+ }, z.core.$strip>>;
63
+ suspicious_ip_throttling: z.ZodOptional<z.ZodObject<{
64
+ enabled: z.ZodOptional<z.ZodBoolean>;
65
+ shields: z.ZodOptional<z.ZodArray<z.ZodString>>;
66
+ allowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
67
+ stage: z.ZodOptional<z.ZodObject<{
68
+ "pre-login": z.ZodOptional<z.ZodObject<{
69
+ max_attempts: z.ZodOptional<z.ZodNumber>;
70
+ rate: z.ZodOptional<z.ZodNumber>;
71
+ }, z.core.$strip>>;
72
+ "pre-user-registration": z.ZodOptional<z.ZodObject<{
73
+ max_attempts: z.ZodOptional<z.ZodNumber>;
74
+ rate: z.ZodOptional<z.ZodNumber>;
75
+ }, z.core.$strip>>;
76
+ }, z.core.$strip>>;
77
+ }, z.core.$strip>>;
78
+ }, z.core.$strip>;
79
+ export type AttackProtection = z.infer<typeof attackProtectionSchema>;